00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #define INCLXX_IN_GEANT4_MODE 1
00034
00035 #include "globals.hh"
00036
00044 #include "G4INCLNaturalIsotopicDistributions.hh"
00045 #include "G4INCLRandom.hh"
00046
00047 #include <utility>
00048 #include <iostream>
00049
00050 namespace G4INCL {
00051
00052 Isotope::Isotope(const G4int A, const G4double abundance) :
00053 theA(A),
00054 theAbundance(abundance)
00055 {}
00056
00057 IsotopicDistribution::IsotopicDistribution(IsotopeVector const &aVector) :
00058 theIsotopes(aVector)
00059 {
00060 G4double previousAbundance = 0.;
00061
00062 for(IsotopeIter i=theIsotopes.begin(); i!=theIsotopes.end(); ++i) {
00063 i->theAbundance += previousAbundance;
00064 previousAbundance = i->theAbundance;
00065 }
00066
00067 const G4double normalisation = 1./theIsotopes.back().theAbundance;
00068 for(IsotopeIter i=theIsotopes.begin(); i!=theIsotopes.end(); ++i)
00069 i->theAbundance *= normalisation;
00070 }
00071
00072 G4int IsotopicDistribution::drawRandomIsotope() const {
00073 const G4double r = Random::shoot();
00074 for(unsigned int i=0; i<theIsotopes.size()-1; ++i) {
00075 if(r<=theIsotopes.at(i).theAbundance)
00076 return theIsotopes.at(i).theA;
00077 }
00078 return theIsotopes.back().theA;
00079 }
00080
00081 IsotopeVector const &IsotopicDistribution::getIsotopes() const {
00082 return theIsotopes;
00083 }
00084
00085 IsotopicDistribution const &NaturalIsotopicDistributions::getIsotopicDistribution(G4int Z) const {
00086 std::map<G4int, IsotopicDistribution>::const_iterator i = theDistributions.find(Z);
00087 if(i!=theDistributions.end())
00088 return i->second;
00089 else {
00090 FATAL("Requested natural isotopic distribution for synthetic element Z = " << Z << std::endl);
00091 return theDistributions.begin()->second;
00092 }
00093 }
00094
00095 G4int NaturalIsotopicDistributions::drawRandomIsotope(G4int Z) const {
00096 return getIsotopicDistribution(Z).drawRandomIsotope();
00097 }
00098
00099 namespace {
00100 std::pair<G4int, Isotope> theRawDistributions[] = {
00101 std::pair<G4int, Isotope>(1, Isotope(1, 99.985)),
00102 std::pair<G4int, Isotope>(1, Isotope(2, 0.015)),
00103 std::pair<G4int, Isotope>(2, Isotope(3, 0.000137)),
00104 std::pair<G4int, Isotope>(2, Isotope(4, 99.999863)),
00105 std::pair<G4int, Isotope>(3, Isotope(6, 7.5)),
00106 std::pair<G4int, Isotope>(3, Isotope(7, 92.5)),
00107 std::pair<G4int, Isotope>(4, Isotope(9, 100.0)),
00108 std::pair<G4int, Isotope>(5, Isotope(10, 19.9)),
00109 std::pair<G4int, Isotope>(5, Isotope(11, 80.1)),
00110 std::pair<G4int, Isotope>(6, Isotope(12, 98.90)),
00111 std::pair<G4int, Isotope>(6, Isotope(13, 1.10)),
00112 std::pair<G4int, Isotope>(7, Isotope(14, 99.634)),
00113 std::pair<G4int, Isotope>(7, Isotope(15, 0.366)),
00114 std::pair<G4int, Isotope>(8, Isotope(16, 99.762)),
00115 std::pair<G4int, Isotope>(8, Isotope(17, 0.038)),
00116 std::pair<G4int, Isotope>(8, Isotope(18, 0.200)),
00117 std::pair<G4int, Isotope>(9, Isotope(19, 100.0)),
00118 std::pair<G4int, Isotope>(10, Isotope(20, 90.48)),
00119 std::pair<G4int, Isotope>(10, Isotope(21, 0.27)),
00120 std::pair<G4int, Isotope>(10, Isotope(22, 9.25)),
00121 std::pair<G4int, Isotope>(11, Isotope(23, 100.0)),
00122 std::pair<G4int, Isotope>(12, Isotope(24, 78.99)),
00123 std::pair<G4int, Isotope>(12, Isotope(25, 10.00)),
00124 std::pair<G4int, Isotope>(12, Isotope(26, 11.01)),
00125 std::pair<G4int, Isotope>(13, Isotope(27, 100.0)),
00126 std::pair<G4int, Isotope>(14, Isotope(28, 92.23)),
00127 std::pair<G4int, Isotope>(14, Isotope(29, 4.67)),
00128 std::pair<G4int, Isotope>(14, Isotope(30, 3.10)),
00129 std::pair<G4int, Isotope>(15, Isotope(31, 100.0)),
00130 std::pair<G4int, Isotope>(16, Isotope(32, 95.02)),
00131 std::pair<G4int, Isotope>(16, Isotope(33, 0.75)),
00132 std::pair<G4int, Isotope>(16, Isotope(34, 4.21)),
00133 std::pair<G4int, Isotope>(16, Isotope(36, 0.02)),
00134 std::pair<G4int, Isotope>(17, Isotope(35, 75.77)),
00135 std::pair<G4int, Isotope>(17, Isotope(37, 24.23)),
00136 std::pair<G4int, Isotope>(18, Isotope(36, 0.337)),
00137 std::pair<G4int, Isotope>(18, Isotope(38, 0.063)),
00138 std::pair<G4int, Isotope>(18, Isotope(40, 99.600)),
00139 std::pair<G4int, Isotope>(19, Isotope(39, 93.2581)),
00140 std::pair<G4int, Isotope>(19, Isotope(40, 0.0117)),
00141 std::pair<G4int, Isotope>(19, Isotope(41, 6.7302)),
00142 std::pair<G4int, Isotope>(20, Isotope(40, 96.941)),
00143 std::pair<G4int, Isotope>(20, Isotope(42, 0.647)),
00144 std::pair<G4int, Isotope>(20, Isotope(43, 0.135)),
00145 std::pair<G4int, Isotope>(20, Isotope(44, 2.086)),
00146 std::pair<G4int, Isotope>(20, Isotope(46, 0.004)),
00147 std::pair<G4int, Isotope>(20, Isotope(48, 0.187)),
00148 std::pair<G4int, Isotope>(21, Isotope(45, 100.0)),
00149 std::pair<G4int, Isotope>(22, Isotope(46, 8.0)),
00150 std::pair<G4int, Isotope>(22, Isotope(47, 7.3)),
00151 std::pair<G4int, Isotope>(22, Isotope(48, 73.8)),
00152 std::pair<G4int, Isotope>(22, Isotope(49, 5.5)),
00153 std::pair<G4int, Isotope>(22, Isotope(50, 5.4)),
00154 std::pair<G4int, Isotope>(23, Isotope(50, 0.250)),
00155 std::pair<G4int, Isotope>(23, Isotope(51, 99.750)),
00156 std::pair<G4int, Isotope>(24, Isotope(50, 4.345)),
00157 std::pair<G4int, Isotope>(24, Isotope(52, 83.789)),
00158 std::pair<G4int, Isotope>(24, Isotope(53, 9.501)),
00159 std::pair<G4int, Isotope>(24, Isotope(54, 2.365)),
00160 std::pair<G4int, Isotope>(25, Isotope(55, 100.0)),
00161 std::pair<G4int, Isotope>(26, Isotope(54, 5.8)),
00162 std::pair<G4int, Isotope>(26, Isotope(56, 91.72)),
00163 std::pair<G4int, Isotope>(26, Isotope(57, 2.2)),
00164 std::pair<G4int, Isotope>(26, Isotope(58, 0.28)),
00165 std::pair<G4int, Isotope>(27, Isotope(59, 100.0)),
00166 std::pair<G4int, Isotope>(28, Isotope(58, 68.077)),
00167 std::pair<G4int, Isotope>(28, Isotope(60, 26.223)),
00168 std::pair<G4int, Isotope>(28, Isotope(61, 1.140)),
00169 std::pair<G4int, Isotope>(28, Isotope(62, 3.634)),
00170 std::pair<G4int, Isotope>(28, Isotope(64, 0.926)),
00171 std::pair<G4int, Isotope>(29, Isotope(63, 69.17)),
00172 std::pair<G4int, Isotope>(29, Isotope(65, 30.83)),
00173 std::pair<G4int, Isotope>(30, Isotope(64, 48.6)),
00174 std::pair<G4int, Isotope>(30, Isotope(66, 27.9)),
00175 std::pair<G4int, Isotope>(30, Isotope(67, 4.1)),
00176 std::pair<G4int, Isotope>(30, Isotope(68, 18.8)),
00177 std::pair<G4int, Isotope>(30, Isotope(70, 0.6)),
00178 std::pair<G4int, Isotope>(31, Isotope(69, 60.108)),
00179 std::pair<G4int, Isotope>(31, Isotope(71, 39.892)),
00180 std::pair<G4int, Isotope>(32, Isotope(70, 21.23)),
00181 std::pair<G4int, Isotope>(32, Isotope(72, 27.66)),
00182 std::pair<G4int, Isotope>(32, Isotope(73, 7.73)),
00183 std::pair<G4int, Isotope>(32, Isotope(74, 35.94)),
00184 std::pair<G4int, Isotope>(32, Isotope(76, 7.44)),
00185 std::pair<G4int, Isotope>(33, Isotope(75, 100.0)),
00186 std::pair<G4int, Isotope>(34, Isotope(74, 0.89)),
00187 std::pair<G4int, Isotope>(34, Isotope(76, 9.36)),
00188 std::pair<G4int, Isotope>(34, Isotope(77, 7.63)),
00189 std::pair<G4int, Isotope>(34, Isotope(78, 23.78)),
00190 std::pair<G4int, Isotope>(34, Isotope(80, 49.61)),
00191 std::pair<G4int, Isotope>(34, Isotope(82, 8.73)),
00192 std::pair<G4int, Isotope>(35, Isotope(79, 50.69)),
00193 std::pair<G4int, Isotope>(35, Isotope(81, 49.31)),
00194 std::pair<G4int, Isotope>(36, Isotope(78, 0.35)),
00195 std::pair<G4int, Isotope>(36, Isotope(80, 2.25)),
00196 std::pair<G4int, Isotope>(36, Isotope(82, 11.6)),
00197 std::pair<G4int, Isotope>(36, Isotope(83, 11.5)),
00198 std::pair<G4int, Isotope>(36, Isotope(84, 57.0)),
00199 std::pair<G4int, Isotope>(36, Isotope(86, 17.3)),
00200 std::pair<G4int, Isotope>(37, Isotope(85, 72.165)),
00201 std::pair<G4int, Isotope>(37, Isotope(87, 27.835)),
00202 std::pair<G4int, Isotope>(38, Isotope(84, 0.56)),
00203 std::pair<G4int, Isotope>(38, Isotope(86, 9.86)),
00204 std::pair<G4int, Isotope>(38, Isotope(87, 7.00)),
00205 std::pair<G4int, Isotope>(38, Isotope(88, 82.58)),
00206 std::pair<G4int, Isotope>(39, Isotope(89, 100.0)),
00207 std::pair<G4int, Isotope>(40, Isotope(90, 51.45)),
00208 std::pair<G4int, Isotope>(40, Isotope(91, 11.22)),
00209 std::pair<G4int, Isotope>(40, Isotope(92, 17.15)),
00210 std::pair<G4int, Isotope>(40, Isotope(94, 17.38)),
00211 std::pair<G4int, Isotope>(40, Isotope(96, 2.80)),
00212 std::pair<G4int, Isotope>(41, Isotope(93, 100.0)),
00213 std::pair<G4int, Isotope>(42, Isotope(92, 14.84)),
00214 std::pair<G4int, Isotope>(42, Isotope(94, 9.25)),
00215 std::pair<G4int, Isotope>(42, Isotope(95, 15.92)),
00216 std::pair<G4int, Isotope>(42, Isotope(96, 16.68)),
00217 std::pair<G4int, Isotope>(42, Isotope(97, 9.55)),
00218 std::pair<G4int, Isotope>(42, Isotope(98, 24.13)),
00219 std::pair<G4int, Isotope>(42, Isotope(100, 9.63)),
00220 std::pair<G4int, Isotope>(44, Isotope(96, 5.52)),
00221 std::pair<G4int, Isotope>(44, Isotope(98, 1.88)),
00222 std::pair<G4int, Isotope>(44, Isotope(99, 12.7)),
00223 std::pair<G4int, Isotope>(44, Isotope(100, 12.6)),
00224 std::pair<G4int, Isotope>(44, Isotope(101, 17.0)),
00225 std::pair<G4int, Isotope>(44, Isotope(102, 31.6)),
00226 std::pair<G4int, Isotope>(44, Isotope(104, 18.7)),
00227 std::pair<G4int, Isotope>(45, Isotope(103, 100.0)),
00228 std::pair<G4int, Isotope>(46, Isotope(102, 1.02)),
00229 std::pair<G4int, Isotope>(46, Isotope(104, 11.14)),
00230 std::pair<G4int, Isotope>(46, Isotope(105, 22.33)),
00231 std::pair<G4int, Isotope>(46, Isotope(106, 27.33)),
00232 std::pair<G4int, Isotope>(46, Isotope(108, 26.46)),
00233 std::pair<G4int, Isotope>(46, Isotope(110, 11.72)),
00234 std::pair<G4int, Isotope>(47, Isotope(107, 51.839)),
00235 std::pair<G4int, Isotope>(47, Isotope(109, 48.161)),
00236 std::pair<G4int, Isotope>(48, Isotope(106, 1.25)),
00237 std::pair<G4int, Isotope>(48, Isotope(108, 0.89)),
00238 std::pair<G4int, Isotope>(48, Isotope(110, 12.49)),
00239 std::pair<G4int, Isotope>(48, Isotope(111, 12.80)),
00240 std::pair<G4int, Isotope>(48, Isotope(112, 24.13)),
00241 std::pair<G4int, Isotope>(48, Isotope(113, 12.22)),
00242 std::pair<G4int, Isotope>(48, Isotope(114, 28.73)),
00243 std::pair<G4int, Isotope>(48, Isotope(116, 7.49)),
00244 std::pair<G4int, Isotope>(49, Isotope(113, 4.3)),
00245 std::pair<G4int, Isotope>(49, Isotope(115, 95.7)),
00246 std::pair<G4int, Isotope>(50, Isotope(112, 0.97)),
00247 std::pair<G4int, Isotope>(50, Isotope(114, 0.65)),
00248 std::pair<G4int, Isotope>(50, Isotope(115, 0.34)),
00249 std::pair<G4int, Isotope>(50, Isotope(116, 14.53)),
00250 std::pair<G4int, Isotope>(50, Isotope(117, 7.68)),
00251 std::pair<G4int, Isotope>(50, Isotope(118, 24.23)),
00252 std::pair<G4int, Isotope>(50, Isotope(119, 8.59)),
00253 std::pair<G4int, Isotope>(50, Isotope(120, 32.59)),
00254 std::pair<G4int, Isotope>(50, Isotope(122, 4.63)),
00255 std::pair<G4int, Isotope>(50, Isotope(124, 5.79)),
00256 std::pair<G4int, Isotope>(51, Isotope(121, 57.36)),
00257 std::pair<G4int, Isotope>(51, Isotope(123, 42.64)),
00258 std::pair<G4int, Isotope>(52, Isotope(120, 0.096)),
00259 std::pair<G4int, Isotope>(52, Isotope(122, 2.603)),
00260 std::pair<G4int, Isotope>(52, Isotope(123, 0.908)),
00261 std::pair<G4int, Isotope>(52, Isotope(124, 4.816)),
00262 std::pair<G4int, Isotope>(52, Isotope(125, 7.139)),
00263 std::pair<G4int, Isotope>(52, Isotope(126, 18.95)),
00264 std::pair<G4int, Isotope>(52, Isotope(128, 31.69)),
00265 std::pair<G4int, Isotope>(52, Isotope(130, 33.80)),
00266 std::pair<G4int, Isotope>(53, Isotope(127, 100.0)),
00267 std::pair<G4int, Isotope>(54, Isotope(124, 0.10)),
00268 std::pair<G4int, Isotope>(54, Isotope(126, 0.09)),
00269 std::pair<G4int, Isotope>(54, Isotope(128, 1.91)),
00270 std::pair<G4int, Isotope>(54, Isotope(129, 26.4)),
00271 std::pair<G4int, Isotope>(54, Isotope(130, 4.1)),
00272 std::pair<G4int, Isotope>(54, Isotope(131, 21.2)),
00273 std::pair<G4int, Isotope>(54, Isotope(132, 26.9)),
00274 std::pair<G4int, Isotope>(54, Isotope(134, 10.4)),
00275 std::pair<G4int, Isotope>(54, Isotope(136, 8.9)),
00276 std::pair<G4int, Isotope>(55, Isotope(133, 100.0)),
00277 std::pair<G4int, Isotope>(56, Isotope(130, 0.106)),
00278 std::pair<G4int, Isotope>(56, Isotope(132, 0.101)),
00279 std::pair<G4int, Isotope>(56, Isotope(134, 2.417)),
00280 std::pair<G4int, Isotope>(56, Isotope(135, 6.592)),
00281 std::pair<G4int, Isotope>(56, Isotope(136, 7.854)),
00282 std::pair<G4int, Isotope>(56, Isotope(137, 11.23)),
00283 std::pair<G4int, Isotope>(56, Isotope(138, 71.70)),
00284 std::pair<G4int, Isotope>(57, Isotope(138, 0.0902)),
00285 std::pair<G4int, Isotope>(57, Isotope(139, 99.9098)),
00286 std::pair<G4int, Isotope>(58, Isotope(136, 0.19)),
00287 std::pair<G4int, Isotope>(58, Isotope(138, 0.25)),
00288 std::pair<G4int, Isotope>(58, Isotope(140, 88.48)),
00289 std::pair<G4int, Isotope>(58, Isotope(142, 11.08)),
00290 std::pair<G4int, Isotope>(59, Isotope(141, 100.0)),
00291 std::pair<G4int, Isotope>(60, Isotope(142, 27.13)),
00292 std::pair<G4int, Isotope>(60, Isotope(143, 12.18)),
00293 std::pair<G4int, Isotope>(60, Isotope(144, 23.80)),
00294 std::pair<G4int, Isotope>(60, Isotope(145, 8.30)),
00295 std::pair<G4int, Isotope>(60, Isotope(146, 17.19)),
00296 std::pair<G4int, Isotope>(60, Isotope(148, 5.76)),
00297 std::pair<G4int, Isotope>(60, Isotope(150, 5.64)),
00298 std::pair<G4int, Isotope>(62, Isotope(144, 3.1)),
00299 std::pair<G4int, Isotope>(62, Isotope(147, 15.0)),
00300 std::pair<G4int, Isotope>(62, Isotope(148, 11.3)),
00301 std::pair<G4int, Isotope>(62, Isotope(149, 13.8)),
00302 std::pair<G4int, Isotope>(62, Isotope(150, 7.4)),
00303 std::pair<G4int, Isotope>(62, Isotope(152, 26.7)),
00304 std::pair<G4int, Isotope>(62, Isotope(154, 22.7)),
00305 std::pair<G4int, Isotope>(63, Isotope(151, 47.8)),
00306 std::pair<G4int, Isotope>(63, Isotope(153, 52.2)),
00307 std::pair<G4int, Isotope>(64, Isotope(152, 0.20)),
00308 std::pair<G4int, Isotope>(64, Isotope(154, 2.18)),
00309 std::pair<G4int, Isotope>(64, Isotope(155, 14.80)),
00310 std::pair<G4int, Isotope>(64, Isotope(156, 20.47)),
00311 std::pair<G4int, Isotope>(64, Isotope(157, 15.65)),
00312 std::pair<G4int, Isotope>(64, Isotope(158, 24.84)),
00313 std::pair<G4int, Isotope>(64, Isotope(160, 21.86)),
00314 std::pair<G4int, Isotope>(65, Isotope(159, 100.0)),
00315 std::pair<G4int, Isotope>(66, Isotope(156, 0.06)),
00316 std::pair<G4int, Isotope>(66, Isotope(158, 0.10)),
00317 std::pair<G4int, Isotope>(66, Isotope(160, 2.34)),
00318 std::pair<G4int, Isotope>(66, Isotope(161, 18.9)),
00319 std::pair<G4int, Isotope>(66, Isotope(162, 25.5)),
00320 std::pair<G4int, Isotope>(66, Isotope(163, 24.9)),
00321 std::pair<G4int, Isotope>(66, Isotope(164, 28.2)),
00322 std::pair<G4int, Isotope>(67, Isotope(165, 100.0)),
00323 std::pair<G4int, Isotope>(68, Isotope(162, 0.14)),
00324 std::pair<G4int, Isotope>(68, Isotope(164, 1.61)),
00325 std::pair<G4int, Isotope>(68, Isotope(166, 33.6)),
00326 std::pair<G4int, Isotope>(68, Isotope(167, 22.95)),
00327 std::pair<G4int, Isotope>(68, Isotope(168, 26.8)),
00328 std::pair<G4int, Isotope>(68, Isotope(170, 14.9)),
00329 std::pair<G4int, Isotope>(69, Isotope(169, 100.0)),
00330 std::pair<G4int, Isotope>(70, Isotope(168, 0.13)),
00331 std::pair<G4int, Isotope>(70, Isotope(170, 3.05)),
00332 std::pair<G4int, Isotope>(70, Isotope(171, 14.3)),
00333 std::pair<G4int, Isotope>(70, Isotope(172, 21.9)),
00334 std::pair<G4int, Isotope>(70, Isotope(173, 16.12)),
00335 std::pair<G4int, Isotope>(70, Isotope(174, 31.8)),
00336 std::pair<G4int, Isotope>(70, Isotope(176, 12.7)),
00337 std::pair<G4int, Isotope>(71, Isotope(175, 97.41)),
00338 std::pair<G4int, Isotope>(71, Isotope(176, 2.59)),
00339 std::pair<G4int, Isotope>(72, Isotope(174, 0.162)),
00340 std::pair<G4int, Isotope>(72, Isotope(176, 5.206)),
00341 std::pair<G4int, Isotope>(72, Isotope(177, 18.606)),
00342 std::pair<G4int, Isotope>(72, Isotope(178, 27.297)),
00343 std::pair<G4int, Isotope>(72, Isotope(179, 13.629)),
00344 std::pair<G4int, Isotope>(72, Isotope(180, 35.100)),
00345 std::pair<G4int, Isotope>(73, Isotope(180, 0.012)),
00346 std::pair<G4int, Isotope>(73, Isotope(181, 99.988)),
00347 std::pair<G4int, Isotope>(74, Isotope(180, 0.13)),
00348 std::pair<G4int, Isotope>(74, Isotope(182, 26.3)),
00349 std::pair<G4int, Isotope>(74, Isotope(183, 14.3)),
00350 std::pair<G4int, Isotope>(74, Isotope(184, 30.67)),
00351 std::pair<G4int, Isotope>(74, Isotope(186, 28.6)),
00352 std::pair<G4int, Isotope>(75, Isotope(185, 37.40)),
00353 std::pair<G4int, Isotope>(75, Isotope(187, 62.60)),
00354 std::pair<G4int, Isotope>(76, Isotope(184, 0.02)),
00355 std::pair<G4int, Isotope>(76, Isotope(186, 1.58)),
00356 std::pair<G4int, Isotope>(76, Isotope(187, 1.6)),
00357 std::pair<G4int, Isotope>(76, Isotope(188, 13.3)),
00358 std::pair<G4int, Isotope>(76, Isotope(189, 16.1)),
00359 std::pair<G4int, Isotope>(76, Isotope(190, 26.4)),
00360 std::pair<G4int, Isotope>(76, Isotope(192, 41.0)),
00361 std::pair<G4int, Isotope>(77, Isotope(191, 37.3)),
00362 std::pair<G4int, Isotope>(77, Isotope(193, 62.7)),
00363 std::pair<G4int, Isotope>(78, Isotope(190, 0.01)),
00364 std::pair<G4int, Isotope>(78, Isotope(192, 0.79)),
00365 std::pair<G4int, Isotope>(78, Isotope(194, 32.9)),
00366 std::pair<G4int, Isotope>(78, Isotope(195, 33.8)),
00367 std::pair<G4int, Isotope>(78, Isotope(196, 25.3)),
00368 std::pair<G4int, Isotope>(78, Isotope(198, 7.2)),
00369 std::pair<G4int, Isotope>(79, Isotope(197, 100.0)),
00370 std::pair<G4int, Isotope>(80, Isotope(196, 0.15)),
00371 std::pair<G4int, Isotope>(80, Isotope(198, 9.97)),
00372 std::pair<G4int, Isotope>(80, Isotope(199, 16.87)),
00373 std::pair<G4int, Isotope>(80, Isotope(200, 23.10)),
00374 std::pair<G4int, Isotope>(80, Isotope(201, 13.18)),
00375 std::pair<G4int, Isotope>(80, Isotope(202, 29.86)),
00376 std::pair<G4int, Isotope>(80, Isotope(204, 6.87)),
00377 std::pair<G4int, Isotope>(81, Isotope(203, 29.524)),
00378 std::pair<G4int, Isotope>(81, Isotope(205, 70.476)),
00379 std::pair<G4int, Isotope>(82, Isotope(204, 1.4)),
00380 std::pair<G4int, Isotope>(82, Isotope(206, 24.1)),
00381 std::pair<G4int, Isotope>(82, Isotope(207, 22.1)),
00382 std::pair<G4int, Isotope>(82, Isotope(208, 52.4)),
00383 std::pair<G4int, Isotope>(83, Isotope(209, 100.0)),
00384 std::pair<G4int, Isotope>(90, Isotope(232, 100.0)),
00385 std::pair<G4int, Isotope>(92, Isotope(234, 0.0055)),
00386 std::pair<G4int, Isotope>(92, Isotope(235, 0.7200)),
00387 std::pair<G4int, Isotope>(92, Isotope(238, 99.2745))
00388 };
00389
00390
00391 template<typename T, ::std::size_t N> inline ::std::size_t sizeOfArray(const T(&)[ N ] ) {
00392 return N;
00393 }
00394 }
00395
00396 NaturalIsotopicDistributions::NaturalIsotopicDistributions() {
00397 G4int oldZ = -1;
00398 IsotopeVector aVector;
00399 for(unsigned int i=0; i<sizeOfArray(theRawDistributions); ++i) {
00400 std::pair<G4int, Isotope> const &aPair = theRawDistributions[i];
00401 if(aPair.first == oldZ) {
00402 aVector.push_back(aPair.second);
00403 } else {
00404 if(oldZ!=-1)
00405 theDistributions.insert(std::pair<G4int, IsotopicDistribution>(oldZ, IsotopicDistribution(aVector)));
00406 oldZ = aPair.first;
00407 aVector.clear();
00408 aVector.push_back(aPair.second);
00409 }
00410 }
00411
00412 theDistributions.insert(std::pair<G4int, IsotopicDistribution>(oldZ, IsotopicDistribution(aVector)));
00413 }
00414
00415 }
00416