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