Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4INCLNaturalIsotopicDistributions.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // INCL++ intra-nuclear cascade model
27 // Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
28 // Davide Mancusi, CEA
29 // Alain Boudard, CEA
30 // Sylvie Leray, CEA
31 // Joseph Cugnon, University of Liege
32 //
33 #define INCLXX_IN_GEANT4_MODE 1
34 
35 #include "globals.hh"
36 
37 /** \file G4INCLNaturalIsotopicDistributions.cc
38  * \brief Classes that stores isotopic abundances
39  *
40  * \date 21st October 2012
41  * \author Davide Mancusi
42  */
43 
45 #include "G4INCLRandom.hh"
46 // #include <cassert>
47 #include <utility>
48 #include <iostream>
49 
50 namespace G4INCL {
51 
52  Isotope::Isotope(const G4int A, const G4double abundance) :
53  theA(A),
54  theAbundance(abundance)
55  {}
56 
58  theIsotopes(aVector)
59  {
60  G4double previousAbundance = 0.;
61  // Cumulate the abundances
62  for(IsotopeIter i=theIsotopes.begin(), e=theIsotopes.end(); i!=e; ++i) {
63  i->theAbundance += previousAbundance;
64  previousAbundance = i->theAbundance;
65  }
66  // Normalize the abundances to 1
67  const G4double normalisation = 1./theIsotopes.back().theAbundance;
68  for(IsotopeIter i=theIsotopes.begin(), e=theIsotopes.end(); i!=e; ++i)
69  i->theAbundance *= normalisation;
70  }
71 
73  const G4double r = Random::shoot();
74  for(unsigned int i=0; i<theIsotopes.size()-1; ++i) {
75  if(r<=theIsotopes.at(i).theAbundance)
76  return theIsotopes.at(i).theA;
77  }
78  return theIsotopes.back().theA;
79  }
80 
82  return theIsotopes;
83  }
84 
86  std::map<G4int, IsotopicDistribution>::const_iterator i = theDistributions.find(Z);
87  if(i!=theDistributions.end())
88  return i->second;
89  else {
90  INCL_FATAL("Requested natural isotopic distribution for synthetic element Z = " << Z << std::endl);
91  return theDistributions.begin()->second;
92  }
93  }
94 
95  G4int NaturalIsotopicDistributions::drawRandomIsotope(G4int Z) const {
96  return getIsotopicDistribution(Z).drawRandomIsotope();
97  }
98 
99  namespace {
100  std::pair<G4int, Isotope> theRawDistributions[] = {
101  std::pair<G4int, Isotope>(1, Isotope(1, 99.985)),
102  std::pair<G4int, Isotope>(1, Isotope(2, 0.015)),
103  std::pair<G4int, Isotope>(2, Isotope(3, 0.000137)),
104  std::pair<G4int, Isotope>(2, Isotope(4, 99.999863)),
105  std::pair<G4int, Isotope>(3, Isotope(6, 7.5)),
106  std::pair<G4int, Isotope>(3, Isotope(7, 92.5)),
107  std::pair<G4int, Isotope>(4, Isotope(9, 100.0)),
108  std::pair<G4int, Isotope>(5, Isotope(10, 19.9)),
109  std::pair<G4int, Isotope>(5, Isotope(11, 80.1)),
110  std::pair<G4int, Isotope>(6, Isotope(12, 98.90)),
111  std::pair<G4int, Isotope>(6, Isotope(13, 1.10)),
112  std::pair<G4int, Isotope>(7, Isotope(14, 99.634)),
113  std::pair<G4int, Isotope>(7, Isotope(15, 0.366)),
114  std::pair<G4int, Isotope>(8, Isotope(16, 99.762)),
115  std::pair<G4int, Isotope>(8, Isotope(17, 0.038)),
116  std::pair<G4int, Isotope>(8, Isotope(18, 0.200)),
117  std::pair<G4int, Isotope>(9, Isotope(19, 100.0)),
118  std::pair<G4int, Isotope>(10, Isotope(20, 90.48)),
119  std::pair<G4int, Isotope>(10, Isotope(21, 0.27)),
120  std::pair<G4int, Isotope>(10, Isotope(22, 9.25)),
121  std::pair<G4int, Isotope>(11, Isotope(23, 100.0)),
122  std::pair<G4int, Isotope>(12, Isotope(24, 78.99)),
123  std::pair<G4int, Isotope>(12, Isotope(25, 10.00)),
124  std::pair<G4int, Isotope>(12, Isotope(26, 11.01)),
125  std::pair<G4int, Isotope>(13, Isotope(27, 100.0)),
126  std::pair<G4int, Isotope>(14, Isotope(28, 92.23)),
127  std::pair<G4int, Isotope>(14, Isotope(29, 4.67)),
128  std::pair<G4int, Isotope>(14, Isotope(30, 3.10)),
129  std::pair<G4int, Isotope>(15, Isotope(31, 100.0)),
130  std::pair<G4int, Isotope>(16, Isotope(32, 95.02)),
131  std::pair<G4int, Isotope>(16, Isotope(33, 0.75)),
132  std::pair<G4int, Isotope>(16, Isotope(34, 4.21)),
133  std::pair<G4int, Isotope>(16, Isotope(36, 0.02)),
134  std::pair<G4int, Isotope>(17, Isotope(35, 75.77)),
135  std::pair<G4int, Isotope>(17, Isotope(37, 24.23)),
136  std::pair<G4int, Isotope>(18, Isotope(36, 0.337)),
137  std::pair<G4int, Isotope>(18, Isotope(38, 0.063)),
138  std::pair<G4int, Isotope>(18, Isotope(40, 99.600)),
139  std::pair<G4int, Isotope>(19, Isotope(39, 93.2581)),
140  std::pair<G4int, Isotope>(19, Isotope(40, 0.0117)),
141  std::pair<G4int, Isotope>(19, Isotope(41, 6.7302)),
142  std::pair<G4int, Isotope>(20, Isotope(40, 96.941)),
143  std::pair<G4int, Isotope>(20, Isotope(42, 0.647)),
144  std::pair<G4int, Isotope>(20, Isotope(43, 0.135)),
145  std::pair<G4int, Isotope>(20, Isotope(44, 2.086)),
146  std::pair<G4int, Isotope>(20, Isotope(46, 0.004)),
147  std::pair<G4int, Isotope>(20, Isotope(48, 0.187)),
148  std::pair<G4int, Isotope>(21, Isotope(45, 100.0)),
149  std::pair<G4int, Isotope>(22, Isotope(46, 8.0)),
150  std::pair<G4int, Isotope>(22, Isotope(47, 7.3)),
151  std::pair<G4int, Isotope>(22, Isotope(48, 73.8)),
152  std::pair<G4int, Isotope>(22, Isotope(49, 5.5)),
153  std::pair<G4int, Isotope>(22, Isotope(50, 5.4)),
154  std::pair<G4int, Isotope>(23, Isotope(50, 0.250)),
155  std::pair<G4int, Isotope>(23, Isotope(51, 99.750)),
156  std::pair<G4int, Isotope>(24, Isotope(50, 4.345)),
157  std::pair<G4int, Isotope>(24, Isotope(52, 83.789)),
158  std::pair<G4int, Isotope>(24, Isotope(53, 9.501)),
159  std::pair<G4int, Isotope>(24, Isotope(54, 2.365)),
160  std::pair<G4int, Isotope>(25, Isotope(55, 100.0)),
161  std::pair<G4int, Isotope>(26, Isotope(54, 5.8)),
162  std::pair<G4int, Isotope>(26, Isotope(56, 91.72)),
163  std::pair<G4int, Isotope>(26, Isotope(57, 2.2)),
164  std::pair<G4int, Isotope>(26, Isotope(58, 0.28)),
165  std::pair<G4int, Isotope>(27, Isotope(59, 100.0)),
166  std::pair<G4int, Isotope>(28, Isotope(58, 68.077)),
167  std::pair<G4int, Isotope>(28, Isotope(60, 26.223)),
168  std::pair<G4int, Isotope>(28, Isotope(61, 1.140)),
169  std::pair<G4int, Isotope>(28, Isotope(62, 3.634)),
170  std::pair<G4int, Isotope>(28, Isotope(64, 0.926)),
171  std::pair<G4int, Isotope>(29, Isotope(63, 69.17)),
172  std::pair<G4int, Isotope>(29, Isotope(65, 30.83)),
173  std::pair<G4int, Isotope>(30, Isotope(64, 48.6)),
174  std::pair<G4int, Isotope>(30, Isotope(66, 27.9)),
175  std::pair<G4int, Isotope>(30, Isotope(67, 4.1)),
176  std::pair<G4int, Isotope>(30, Isotope(68, 18.8)),
177  std::pair<G4int, Isotope>(30, Isotope(70, 0.6)),
178  std::pair<G4int, Isotope>(31, Isotope(69, 60.108)),
179  std::pair<G4int, Isotope>(31, Isotope(71, 39.892)),
180  std::pair<G4int, Isotope>(32, Isotope(70, 21.23)),
181  std::pair<G4int, Isotope>(32, Isotope(72, 27.66)),
182  std::pair<G4int, Isotope>(32, Isotope(73, 7.73)),
183  std::pair<G4int, Isotope>(32, Isotope(74, 35.94)),
184  std::pair<G4int, Isotope>(32, Isotope(76, 7.44)),
185  std::pair<G4int, Isotope>(33, Isotope(75, 100.0)),
186  std::pair<G4int, Isotope>(34, Isotope(74, 0.89)),
187  std::pair<G4int, Isotope>(34, Isotope(76, 9.36)),
188  std::pair<G4int, Isotope>(34, Isotope(77, 7.63)),
189  std::pair<G4int, Isotope>(34, Isotope(78, 23.78)),
190  std::pair<G4int, Isotope>(34, Isotope(80, 49.61)),
191  std::pair<G4int, Isotope>(34, Isotope(82, 8.73)),
192  std::pair<G4int, Isotope>(35, Isotope(79, 50.69)),
193  std::pair<G4int, Isotope>(35, Isotope(81, 49.31)),
194  std::pair<G4int, Isotope>(36, Isotope(78, 0.35)),
195  std::pair<G4int, Isotope>(36, Isotope(80, 2.25)),
196  std::pair<G4int, Isotope>(36, Isotope(82, 11.6)),
197  std::pair<G4int, Isotope>(36, Isotope(83, 11.5)),
198  std::pair<G4int, Isotope>(36, Isotope(84, 57.0)),
199  std::pair<G4int, Isotope>(36, Isotope(86, 17.3)),
200  std::pair<G4int, Isotope>(37, Isotope(85, 72.165)),
201  std::pair<G4int, Isotope>(37, Isotope(87, 27.835)),
202  std::pair<G4int, Isotope>(38, Isotope(84, 0.56)),
203  std::pair<G4int, Isotope>(38, Isotope(86, 9.86)),
204  std::pair<G4int, Isotope>(38, Isotope(87, 7.00)),
205  std::pair<G4int, Isotope>(38, Isotope(88, 82.58)),
206  std::pair<G4int, Isotope>(39, Isotope(89, 100.0)),
207  std::pair<G4int, Isotope>(40, Isotope(90, 51.45)),
208  std::pair<G4int, Isotope>(40, Isotope(91, 11.22)),
209  std::pair<G4int, Isotope>(40, Isotope(92, 17.15)),
210  std::pair<G4int, Isotope>(40, Isotope(94, 17.38)),
211  std::pair<G4int, Isotope>(40, Isotope(96, 2.80)),
212  std::pair<G4int, Isotope>(41, Isotope(93, 100.0)),
213  std::pair<G4int, Isotope>(42, Isotope(92, 14.84)),
214  std::pair<G4int, Isotope>(42, Isotope(94, 9.25)),
215  std::pair<G4int, Isotope>(42, Isotope(95, 15.92)),
216  std::pair<G4int, Isotope>(42, Isotope(96, 16.68)),
217  std::pair<G4int, Isotope>(42, Isotope(97, 9.55)),
218  std::pair<G4int, Isotope>(42, Isotope(98, 24.13)),
219  std::pair<G4int, Isotope>(42, Isotope(100, 9.63)),
220  std::pair<G4int, Isotope>(44, Isotope(96, 5.52)),
221  std::pair<G4int, Isotope>(44, Isotope(98, 1.88)),
222  std::pair<G4int, Isotope>(44, Isotope(99, 12.7)),
223  std::pair<G4int, Isotope>(44, Isotope(100, 12.6)),
224  std::pair<G4int, Isotope>(44, Isotope(101, 17.0)),
225  std::pair<G4int, Isotope>(44, Isotope(102, 31.6)),
226  std::pair<G4int, Isotope>(44, Isotope(104, 18.7)),
227  std::pair<G4int, Isotope>(45, Isotope(103, 100.0)),
228  std::pair<G4int, Isotope>(46, Isotope(102, 1.02)),
229  std::pair<G4int, Isotope>(46, Isotope(104, 11.14)),
230  std::pair<G4int, Isotope>(46, Isotope(105, 22.33)),
231  std::pair<G4int, Isotope>(46, Isotope(106, 27.33)),
232  std::pair<G4int, Isotope>(46, Isotope(108, 26.46)),
233  std::pair<G4int, Isotope>(46, Isotope(110, 11.72)),
234  std::pair<G4int, Isotope>(47, Isotope(107, 51.839)),
235  std::pair<G4int, Isotope>(47, Isotope(109, 48.161)),
236  std::pair<G4int, Isotope>(48, Isotope(106, 1.25)),
237  std::pair<G4int, Isotope>(48, Isotope(108, 0.89)),
238  std::pair<G4int, Isotope>(48, Isotope(110, 12.49)),
239  std::pair<G4int, Isotope>(48, Isotope(111, 12.80)),
240  std::pair<G4int, Isotope>(48, Isotope(112, 24.13)),
241  std::pair<G4int, Isotope>(48, Isotope(113, 12.22)),
242  std::pair<G4int, Isotope>(48, Isotope(114, 28.73)),
243  std::pair<G4int, Isotope>(48, Isotope(116, 7.49)),
244  std::pair<G4int, Isotope>(49, Isotope(113, 4.3)),
245  std::pair<G4int, Isotope>(49, Isotope(115, 95.7)),
246  std::pair<G4int, Isotope>(50, Isotope(112, 0.97)),
247  std::pair<G4int, Isotope>(50, Isotope(114, 0.65)),
248  std::pair<G4int, Isotope>(50, Isotope(115, 0.34)),
249  std::pair<G4int, Isotope>(50, Isotope(116, 14.53)),
250  std::pair<G4int, Isotope>(50, Isotope(117, 7.68)),
251  std::pair<G4int, Isotope>(50, Isotope(118, 24.23)),
252  std::pair<G4int, Isotope>(50, Isotope(119, 8.59)),
253  std::pair<G4int, Isotope>(50, Isotope(120, 32.59)),
254  std::pair<G4int, Isotope>(50, Isotope(122, 4.63)),
255  std::pair<G4int, Isotope>(50, Isotope(124, 5.79)),
256  std::pair<G4int, Isotope>(51, Isotope(121, 57.36)),
257  std::pair<G4int, Isotope>(51, Isotope(123, 42.64)),
258  std::pair<G4int, Isotope>(52, Isotope(120, 0.096)),
259  std::pair<G4int, Isotope>(52, Isotope(122, 2.603)),
260  std::pair<G4int, Isotope>(52, Isotope(123, 0.908)),
261  std::pair<G4int, Isotope>(52, Isotope(124, 4.816)),
262  std::pair<G4int, Isotope>(52, Isotope(125, 7.139)),
263  std::pair<G4int, Isotope>(52, Isotope(126, 18.95)),
264  std::pair<G4int, Isotope>(52, Isotope(128, 31.69)),
265  std::pair<G4int, Isotope>(52, Isotope(130, 33.80)),
266  std::pair<G4int, Isotope>(53, Isotope(127, 100.0)),
267  std::pair<G4int, Isotope>(54, Isotope(124, 0.10)),
268  std::pair<G4int, Isotope>(54, Isotope(126, 0.09)),
269  std::pair<G4int, Isotope>(54, Isotope(128, 1.91)),
270  std::pair<G4int, Isotope>(54, Isotope(129, 26.4)),
271  std::pair<G4int, Isotope>(54, Isotope(130, 4.1)),
272  std::pair<G4int, Isotope>(54, Isotope(131, 21.2)),
273  std::pair<G4int, Isotope>(54, Isotope(132, 26.9)),
274  std::pair<G4int, Isotope>(54, Isotope(134, 10.4)),
275  std::pair<G4int, Isotope>(54, Isotope(136, 8.9)),
276  std::pair<G4int, Isotope>(55, Isotope(133, 100.0)),
277  std::pair<G4int, Isotope>(56, Isotope(130, 0.106)),
278  std::pair<G4int, Isotope>(56, Isotope(132, 0.101)),
279  std::pair<G4int, Isotope>(56, Isotope(134, 2.417)),
280  std::pair<G4int, Isotope>(56, Isotope(135, 6.592)),
281  std::pair<G4int, Isotope>(56, Isotope(136, 7.854)),
282  std::pair<G4int, Isotope>(56, Isotope(137, 11.23)),
283  std::pair<G4int, Isotope>(56, Isotope(138, 71.70)),
284  std::pair<G4int, Isotope>(57, Isotope(138, 0.0902)),
285  std::pair<G4int, Isotope>(57, Isotope(139, 99.9098)),
286  std::pair<G4int, Isotope>(58, Isotope(136, 0.19)),
287  std::pair<G4int, Isotope>(58, Isotope(138, 0.25)),
288  std::pair<G4int, Isotope>(58, Isotope(140, 88.48)),
289  std::pair<G4int, Isotope>(58, Isotope(142, 11.08)),
290  std::pair<G4int, Isotope>(59, Isotope(141, 100.0)),
291  std::pair<G4int, Isotope>(60, Isotope(142, 27.13)),
292  std::pair<G4int, Isotope>(60, Isotope(143, 12.18)),
293  std::pair<G4int, Isotope>(60, Isotope(144, 23.80)),
294  std::pair<G4int, Isotope>(60, Isotope(145, 8.30)),
295  std::pair<G4int, Isotope>(60, Isotope(146, 17.19)),
296  std::pair<G4int, Isotope>(60, Isotope(148, 5.76)),
297  std::pair<G4int, Isotope>(60, Isotope(150, 5.64)),
298  std::pair<G4int, Isotope>(62, Isotope(144, 3.1)),
299  std::pair<G4int, Isotope>(62, Isotope(147, 15.0)),
300  std::pair<G4int, Isotope>(62, Isotope(148, 11.3)),
301  std::pair<G4int, Isotope>(62, Isotope(149, 13.8)),
302  std::pair<G4int, Isotope>(62, Isotope(150, 7.4)),
303  std::pair<G4int, Isotope>(62, Isotope(152, 26.7)),
304  std::pair<G4int, Isotope>(62, Isotope(154, 22.7)),
305  std::pair<G4int, Isotope>(63, Isotope(151, 47.8)),
306  std::pair<G4int, Isotope>(63, Isotope(153, 52.2)),
307  std::pair<G4int, Isotope>(64, Isotope(152, 0.20)),
308  std::pair<G4int, Isotope>(64, Isotope(154, 2.18)),
309  std::pair<G4int, Isotope>(64, Isotope(155, 14.80)),
310  std::pair<G4int, Isotope>(64, Isotope(156, 20.47)),
311  std::pair<G4int, Isotope>(64, Isotope(157, 15.65)),
312  std::pair<G4int, Isotope>(64, Isotope(158, 24.84)),
313  std::pair<G4int, Isotope>(64, Isotope(160, 21.86)),
314  std::pair<G4int, Isotope>(65, Isotope(159, 100.0)),
315  std::pair<G4int, Isotope>(66, Isotope(156, 0.06)),
316  std::pair<G4int, Isotope>(66, Isotope(158, 0.10)),
317  std::pair<G4int, Isotope>(66, Isotope(160, 2.34)),
318  std::pair<G4int, Isotope>(66, Isotope(161, 18.9)),
319  std::pair<G4int, Isotope>(66, Isotope(162, 25.5)),
320  std::pair<G4int, Isotope>(66, Isotope(163, 24.9)),
321  std::pair<G4int, Isotope>(66, Isotope(164, 28.2)),
322  std::pair<G4int, Isotope>(67, Isotope(165, 100.0)),
323  std::pair<G4int, Isotope>(68, Isotope(162, 0.14)),
324  std::pair<G4int, Isotope>(68, Isotope(164, 1.61)),
325  std::pair<G4int, Isotope>(68, Isotope(166, 33.6)),
326  std::pair<G4int, Isotope>(68, Isotope(167, 22.95)),
327  std::pair<G4int, Isotope>(68, Isotope(168, 26.8)),
328  std::pair<G4int, Isotope>(68, Isotope(170, 14.9)),
329  std::pair<G4int, Isotope>(69, Isotope(169, 100.0)),
330  std::pair<G4int, Isotope>(70, Isotope(168, 0.13)),
331  std::pair<G4int, Isotope>(70, Isotope(170, 3.05)),
332  std::pair<G4int, Isotope>(70, Isotope(171, 14.3)),
333  std::pair<G4int, Isotope>(70, Isotope(172, 21.9)),
334  std::pair<G4int, Isotope>(70, Isotope(173, 16.12)),
335  std::pair<G4int, Isotope>(70, Isotope(174, 31.8)),
336  std::pair<G4int, Isotope>(70, Isotope(176, 12.7)),
337  std::pair<G4int, Isotope>(71, Isotope(175, 97.41)),
338  std::pair<G4int, Isotope>(71, Isotope(176, 2.59)),
339  std::pair<G4int, Isotope>(72, Isotope(174, 0.162)),
340  std::pair<G4int, Isotope>(72, Isotope(176, 5.206)),
341  std::pair<G4int, Isotope>(72, Isotope(177, 18.606)),
342  std::pair<G4int, Isotope>(72, Isotope(178, 27.297)),
343  std::pair<G4int, Isotope>(72, Isotope(179, 13.629)),
344  std::pair<G4int, Isotope>(72, Isotope(180, 35.100)),
345  std::pair<G4int, Isotope>(73, Isotope(180, 0.012)),
346  std::pair<G4int, Isotope>(73, Isotope(181, 99.988)),
347  std::pair<G4int, Isotope>(74, Isotope(180, 0.13)),
348  std::pair<G4int, Isotope>(74, Isotope(182, 26.3)),
349  std::pair<G4int, Isotope>(74, Isotope(183, 14.3)),
350  std::pair<G4int, Isotope>(74, Isotope(184, 30.67)),
351  std::pair<G4int, Isotope>(74, Isotope(186, 28.6)),
352  std::pair<G4int, Isotope>(75, Isotope(185, 37.40)),
353  std::pair<G4int, Isotope>(75, Isotope(187, 62.60)),
354  std::pair<G4int, Isotope>(76, Isotope(184, 0.02)),
355  std::pair<G4int, Isotope>(76, Isotope(186, 1.58)),
356  std::pair<G4int, Isotope>(76, Isotope(187, 1.6)),
357  std::pair<G4int, Isotope>(76, Isotope(188, 13.3)),
358  std::pair<G4int, Isotope>(76, Isotope(189, 16.1)),
359  std::pair<G4int, Isotope>(76, Isotope(190, 26.4)),
360  std::pair<G4int, Isotope>(76, Isotope(192, 41.0)),
361  std::pair<G4int, Isotope>(77, Isotope(191, 37.3)),
362  std::pair<G4int, Isotope>(77, Isotope(193, 62.7)),
363  std::pair<G4int, Isotope>(78, Isotope(190, 0.01)),
364  std::pair<G4int, Isotope>(78, Isotope(192, 0.79)),
365  std::pair<G4int, Isotope>(78, Isotope(194, 32.9)),
366  std::pair<G4int, Isotope>(78, Isotope(195, 33.8)),
367  std::pair<G4int, Isotope>(78, Isotope(196, 25.3)),
368  std::pair<G4int, Isotope>(78, Isotope(198, 7.2)),
369  std::pair<G4int, Isotope>(79, Isotope(197, 100.0)),
370  std::pair<G4int, Isotope>(80, Isotope(196, 0.15)),
371  std::pair<G4int, Isotope>(80, Isotope(198, 9.97)),
372  std::pair<G4int, Isotope>(80, Isotope(199, 16.87)),
373  std::pair<G4int, Isotope>(80, Isotope(200, 23.10)),
374  std::pair<G4int, Isotope>(80, Isotope(201, 13.18)),
375  std::pair<G4int, Isotope>(80, Isotope(202, 29.86)),
376  std::pair<G4int, Isotope>(80, Isotope(204, 6.87)),
377  std::pair<G4int, Isotope>(81, Isotope(203, 29.524)),
378  std::pair<G4int, Isotope>(81, Isotope(205, 70.476)),
379  std::pair<G4int, Isotope>(82, Isotope(204, 1.4)),
380  std::pair<G4int, Isotope>(82, Isotope(206, 24.1)),
381  std::pair<G4int, Isotope>(82, Isotope(207, 22.1)),
382  std::pair<G4int, Isotope>(82, Isotope(208, 52.4)),
383  std::pair<G4int, Isotope>(83, Isotope(209, 100.0)),
384  std::pair<G4int, Isotope>(90, Isotope(232, 100.0)),
385  std::pair<G4int, Isotope>(92, Isotope(234, 0.0055)),
386  std::pair<G4int, Isotope>(92, Isotope(235, 0.7200)),
387  std::pair<G4int, Isotope>(92, Isotope(238, 99.2745))
388  };
389 
390  // Cool hack to get the size of an array in C++
391  template<typename T, ::std::size_t N> inline ::std::size_t sizeOfArray(const T(&)[ N ] ) {
392  return N;
393  }
394  }
395 
396  NaturalIsotopicDistributions::NaturalIsotopicDistributions() {
397  G4int oldZ = -1;
398  IsotopeVector aVector;
399  for(unsigned int i=0; i<sizeOfArray(theRawDistributions); ++i) {
400  std::pair<G4int, Isotope> const &aPair = theRawDistributions[i];
401  if(aPair.first == oldZ) {
402  aVector.push_back(aPair.second);
403  } else {
404  if(oldZ!=-1)
405  theDistributions.insert(std::pair<G4int, IsotopicDistribution>(oldZ, IsotopicDistribution(aVector)));
406  oldZ = aPair.first;
407  aVector.clear();
408  aVector.push_back(aPair.second);
409  }
410  }
411  // last element
412  theDistributions.insert(std::pair<G4int, IsotopicDistribution>(oldZ, IsotopicDistribution(aVector)));
413  }
414 
415 }
416 
#define INCL_FATAL(x)
IsotopeVector::iterator IsotopeIter
IsotopicDistribution const & getIsotopicDistribution(G4int const Z) const
Get an isotopic distribution.
G4int drawRandomIsotope() const
Draw a random isotope based on the abundance vector.
int G4int
Definition: G4Types.hh:78
Isotope(const G4int A, const G4double abundance)
Classes that stores isotopic abundances.
Class that stores isotopic abundances for a given element.
Holds an isotope and an abundance.
std::vector< Isotope > IsotopeVector
IsotopeVector const & getIsotopes() const
Get the isotope vector.
**D E S C R I P T I O N
G4double shoot()
Definition: G4INCLRandom.cc:74
IsotopicDistribution(IsotopeVector const &aVector)
Constructor.
double G4double
Definition: G4Types.hh:76