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