G4QIsotope Class Reference

#include <G4QIsotope.hh>


Public Member Functions

 ~G4QIsotope ()
G4int InitElement (G4int Z, G4int index, std::vector< std::pair< G4int, G4double > * > *abund)
G4int GetLastIndex (G4int Z)
G4bool IsDefined (G4int Z, G4int Ind)
G4int GetNeutrons (G4int Z, G4int index=0)
G4int GetProtons (G4int A, std::vector< G4int > &isoV)
std::vector< std::pair< G4int,
G4double > * > * 
GetCSVector (G4int Z, G4int index=0)
std::vector< std::pair< G4int,
G4double > * > * 
GetAbuVector (G4int Z, G4int index=0)
std::vector< std::pair< G4int,
G4double > * > * 
GetSumAVector (G4int Z, G4int index=0)
G4double GetMeanCrossSection (G4int Z, G4int index=0)
G4int GetCSNeutrons (G4int Z, G4int index=0)

Static Public Member Functions

static G4QIsotopeGet ()

Protected Member Functions

 G4QIsotope ()


Detailed Description

Definition at line 56 of file G4QIsotope.hh.


Constructor & Destructor Documentation

G4QIsotope::G4QIsotope (  )  [protected]

Definition at line 65 of file G4QIsotope.cc.

References G4cout, G4endl, G4InuclParticleNames::k0, CLHEP::detail::n, and G4InuclParticleNames::nn.

00066 {
00067 #ifdef cdebug
00068   G4cout<<"G4QIsotope::Constructor is called"<<G4endl;
00069 #endif
00070   vector<vector<pair<G4int,G4double> >*> natEl;
00071 #ifdef cdebug
00072   G4cout<<"G4QIsotope::Constructor natEl is booked"<<G4endl;
00073 #endif
00074   vector<pair<G4int,G4double> >*a0=new vector<pair<G4int,G4double> >;
00075 #ifdef cdebug
00076   G4cout<<"G4QIsotope::Constructor a0 is booked"<<G4endl;
00077 #endif
00078   a0->push_back(make_pair(1,1.));
00079 #ifdef cdebug
00080   G4cout<<"G4QIsotope::Constructor a0 is filled by a pair"<<G4endl;
00081 #endif
00082   natEl.push_back(a0);
00083 #ifdef cdebug
00084   G4cout<<"G4QIsotope::Constructor a0 is filled in natEl"<<G4endl;
00085 #endif
00086   // If an error is found in this initialization, please, correct the simple tree below
00087   vector<pair<G4int,G4double> >*a1=new vector<pair<G4int,G4double> >; // 1-H
00088   a1->push_back(make_pair(0,.99985));
00089   a1->push_back(make_pair(1,1.));
00090   natEl.push_back(a1);
00091   vector<pair<G4int,G4double> >*a2=new vector<pair<G4int,G4double> >; // 2-He
00092   a2->push_back(make_pair(2,.999999863));
00093   a2->push_back(make_pair(1,1.));
00094   natEl.push_back(a2);
00095   vector<pair<G4int,G4double> >*a3=new vector<pair<G4int,G4double> >; // 3-Li
00096   a3->push_back(make_pair(4,.925));
00097   a3->push_back(make_pair(3,1.));
00098   natEl.push_back(a3);
00099   vector<pair<G4int,G4double> >*a4=new vector<pair<G4int,G4double> >; // 4-Be
00100   a4->push_back(make_pair(5,1.));
00101   natEl.push_back(a4);
00102   vector<pair<G4int,G4double> >*a5=new vector<pair<G4int,G4double> >; // 5-B
00103   a5->push_back(make_pair(6,.801));
00104   a5->push_back(make_pair(5,1.));
00105   natEl.push_back(a5);
00106   vector<pair<G4int,G4double> >*a6=new vector<pair<G4int,G4double> >; // 6-C
00107   a6->push_back(make_pair(6,.989));
00108   a6->push_back(make_pair(7,1.));
00109   natEl.push_back(a6);
00110   vector<pair<G4int,G4double> >*a7=new vector<pair<G4int,G4double> >; // 7-N
00111   a7->push_back(make_pair(7,.9963));
00112   a7->push_back(make_pair(8,1.));
00113   natEl.push_back(a7);
00114   vector<pair<G4int,G4double> >*a8=new vector<pair<G4int,G4double> >; // 8-O
00115   a8->push_back(make_pair(8,.9976));
00116   a8->push_back(make_pair(10,.9996));
00117   a8->push_back(make_pair(9,1.));
00118   natEl.push_back(a8);
00119   vector<pair<G4int,G4double> >*a9=new vector<pair<G4int,G4double> >; // 9-F
00120   a9->push_back(make_pair(10,1.));
00121   natEl.push_back(a9);
00122   vector<pair<G4int,G4double> >*b0=new vector<pair<G4int,G4double> >; // 10-Ne
00123   b0->push_back(make_pair(10,.9948));
00124   b0->push_back(make_pair(11,.9975));
00125   b0->push_back(make_pair(12,1.));
00126   natEl.push_back(b0);
00127   vector<pair<G4int,G4double> >*b1=new vector<pair<G4int,G4double> >; // 11-Na
00128   b1->push_back(make_pair(12,1.));
00129   natEl.push_back(b1);
00130   vector<pair<G4int,G4double> >*b2=new vector<pair<G4int,G4double> >; // 12-Mg
00131   b2->push_back(make_pair(12,.7899));
00132   b2->push_back(make_pair(13,.8899));
00133   b2->push_back(make_pair(14,1.));
00134   natEl.push_back(b2);
00135   vector<pair<G4int,G4double> >*b3=new vector<pair<G4int,G4double> >; // 13-Al
00136   b3->push_back(make_pair(14,1.));
00137   natEl.push_back(b3);
00138   vector<pair<G4int,G4double> >*b4=new vector<pair<G4int,G4double> >; // 14-Si
00139   b4->push_back(make_pair(14,.9223));
00140   b4->push_back(make_pair(15,.969));
00141   b4->push_back(make_pair(16,1.));
00142   natEl.push_back(b4);
00143   vector<pair<G4int,G4double> >*b5=new vector<pair<G4int,G4double> >; // 15-P
00144   b5->push_back(make_pair(16,1.));
00145   natEl.push_back(b5);
00146   vector<pair<G4int,G4double> >*b6=new vector<pair<G4int,G4double> >; // 16-S
00147   b6->push_back(make_pair(16,.9502));
00148   b6->push_back(make_pair(18,.9923));
00149   b6->push_back(make_pair(17,.9998));
00150   b6->push_back(make_pair(20,1.));
00151   natEl.push_back(b6);
00152   vector<pair<G4int,G4double> >*b7=new vector<pair<G4int,G4double> >; // 17-Cl
00153   b7->push_back(make_pair(18,.7577));
00154   b7->push_back(make_pair(20,1.));
00155   natEl.push_back(b7);
00156   vector<pair<G4int,G4double> >*b8=new vector<pair<G4int,G4double> >; // 18-Ar
00157   b8->push_back(make_pair(22,.996));
00158   b8->push_back(make_pair(18,.99937));
00159   b8->push_back(make_pair(20,1.));
00160   natEl.push_back(b8);
00161   vector<pair<G4int,G4double> >*b9=new vector<pair<G4int,G4double> >; // 19-K
00162   b9->push_back(make_pair(20,.932581));
00163   b9->push_back(make_pair(22,.999883));
00164   b9->push_back(make_pair(21,1.));
00165   natEl.push_back(b9);
00166   vector<pair<G4int,G4double> >*c0=new vector<pair<G4int,G4double> >; // 20-Ca
00167   c0->push_back(make_pair(20,.96941));
00168   c0->push_back(make_pair(24,.99027));
00169   c0->push_back(make_pair(22,.99674));
00170   c0->push_back(make_pair(28,.99861));
00171   c0->push_back(make_pair(23,.99996));
00172   c0->push_back(make_pair(26,1.));
00173   natEl.push_back(c0);
00174   vector<pair<G4int,G4double> >*c1=new vector<pair<G4int,G4double> >; // 21-Sc
00175   c1->push_back(make_pair(24,1.));
00176   natEl.push_back(c1);
00177   vector<pair<G4int,G4double> >*c2=new vector<pair<G4int,G4double> >; // 22-Ti
00178   c2->push_back(make_pair(26,.738));
00179   c2->push_back(make_pair(24,.818));
00180   c2->push_back(make_pair(25,.891));
00181   c2->push_back(make_pair(27,.946));
00182   c2->push_back(make_pair(28,1.));
00183   natEl.push_back(c2);
00184   vector<pair<G4int,G4double> >*c3=new vector<pair<G4int,G4double> >; // 23-V
00185   c3->push_back(make_pair(28,.9975));
00186   c3->push_back(make_pair(27,1.));
00187   natEl.push_back(c3);
00188   vector<pair<G4int,G4double> >*c4=new vector<pair<G4int,G4double> >; // 24-Cr
00189   c4->push_back(make_pair(28,.8379));
00190   c4->push_back(make_pair(29,.9329));
00191   c4->push_back(make_pair(26,.97635));
00192   c4->push_back(make_pair(30,1.));
00193   natEl.push_back(c4);
00194   vector<pair<G4int,G4double> >*c5=new vector<pair<G4int,G4double> >; // 25-Mn
00195   c5->push_back(make_pair(30,1.));
00196   natEl.push_back(c5);
00197   vector<pair<G4int,G4double> >*c6=new vector<pair<G4int,G4double> >; // 26-Fe
00198   c6->push_back(make_pair(30,.9172));
00199   c6->push_back(make_pair(28,.9762));
00200   c6->push_back(make_pair(31,.9972));
00201   c6->push_back(make_pair(32,1.));
00202   natEl.push_back(c6);
00203   vector<pair<G4int,G4double> >*c7=new vector<pair<G4int,G4double> >; // 27-Co
00204   c7->push_back(make_pair(32,1.));
00205   natEl.push_back(c7);
00206   vector<pair<G4int,G4double> >*c8=new vector<pair<G4int,G4double> >; // 28-Ni
00207   c8->push_back(make_pair(30,.68077));
00208   c8->push_back(make_pair(32,.943));
00209   c8->push_back(make_pair(34,.97934));
00210   c8->push_back(make_pair(33,.99074));
00211   c8->push_back(make_pair(36,1.));
00212   natEl.push_back(c8);
00213   vector<pair<G4int,G4double> >*c9=new vector<pair<G4int,G4double> >; // 29-Cu
00214   c9->push_back(make_pair(34,.6917));
00215   c9->push_back(make_pair(36,1.));
00216   natEl.push_back(c9);
00217   vector<pair<G4int,G4double> >*d0=new vector<pair<G4int,G4double> >; // 30-Zn
00218   d0->push_back(make_pair(34,.486));
00219   d0->push_back(make_pair(36,.765));
00220   d0->push_back(make_pair(38,.953));
00221   d0->push_back(make_pair(37,.994));
00222   d0->push_back(make_pair(40,1.));
00223   natEl.push_back(d0);
00224   vector<pair<G4int,G4double> >*d1=new vector<pair<G4int,G4double> >; // 31-Ga
00225   d1->push_back(make_pair(38,.60108));
00226   d1->push_back(make_pair(40,1.));
00227   natEl.push_back(d1);
00228   vector<pair<G4int,G4double> >*d2=new vector<pair<G4int,G4double> >; // 32-Ge
00229   d2->push_back(make_pair(42,.3594));
00230   d2->push_back(make_pair(40,.6360));
00231   d2->push_back(make_pair(38,.8484));
00232   d2->push_back(make_pair(41,.9256));
00233   d2->push_back(make_pair(44,1.));
00234   natEl.push_back(d2);
00235   vector<pair<G4int,G4double> >*d3=new vector<pair<G4int,G4double> >; // 33-As
00236   d3->push_back(make_pair(42,1.));
00237   natEl.push_back(d3);
00238   vector<pair<G4int,G4double> >*d4=new vector<pair<G4int,G4double> >; // 34-Se
00239   d4->push_back(make_pair(46,.4961));
00240   d4->push_back(make_pair(44,.7378));
00241   d4->push_back(make_pair(42,.8274));
00242   d4->push_back(make_pair(48,.9148));
00243   d4->push_back(make_pair(43,.9911));
00244   d4->push_back(make_pair(40,1.));
00245   natEl.push_back(d4);
00246   vector<pair<G4int,G4double> >*d5=new vector<pair<G4int,G4double> >; // 35-Br
00247   d5->push_back(make_pair(44,.5069));
00248   d5->push_back(make_pair(46,1.));
00249   natEl.push_back(d5);
00250   vector<pair<G4int,G4double> >*d6=new vector<pair<G4int,G4double> >; // 36-Kr
00251   d6->push_back(make_pair(48,.57));
00252   d6->push_back(make_pair(50,.743));
00253   d6->push_back(make_pair(46,.859));
00254   d6->push_back(make_pair(47,.974));
00255   d6->push_back(make_pair(44,.9965));
00256   d6->push_back(make_pair(42,1.));
00257   natEl.push_back(d6);
00258   vector<pair<G4int,G4double> >*d7=new vector<pair<G4int,G4double> >; // 37-Rb
00259   d7->push_back(make_pair(48,.7217));
00260   d7->push_back(make_pair(50,1.));
00261   natEl.push_back(d7);
00262   vector<pair<G4int,G4double> >*d8=new vector<pair<G4int,G4double> >; // 38-sr
00263   d8->push_back(make_pair(50,.8258));
00264   d8->push_back(make_pair(48,.9244));
00265   d8->push_back(make_pair(49,.9944));
00266   d8->push_back(make_pair(46,1.));
00267   natEl.push_back(d8);
00268   vector<pair<G4int,G4double> >*d9=new vector<pair<G4int,G4double> >; // 39-Y
00269   d9->push_back(make_pair(50,1.));
00270   natEl.push_back(d9);
00271   vector<pair<G4int,G4double> >*e0=new vector<pair<G4int,G4double> >; // 40-Zr
00272   e0->push_back(make_pair(50,.5145));
00273   e0->push_back(make_pair(54,.6883));
00274   e0->push_back(make_pair(52,.8598));
00275   e0->push_back(make_pair(51,.972));
00276   e0->push_back(make_pair(56,1.));
00277   natEl.push_back(e0);
00278   vector<pair<G4int,G4double> >*e1=new vector<pair<G4int,G4double> >; // 41-Nb
00279   e1->push_back(make_pair(52,1.));
00280   natEl.push_back(e1);
00281   vector<pair<G4int,G4double> >*e2=new vector<pair<G4int,G4double> >; // 42-Mo
00282   e2->push_back(make_pair(56,.2413));
00283   e2->push_back(make_pair(54,.4081));
00284   e2->push_back(make_pair(53,.5673));
00285   e2->push_back(make_pair(50,.7157));
00286   e2->push_back(make_pair(58,.8120));
00287   e2->push_back(make_pair(55,.9075));
00288   e2->push_back(make_pair(52,1.));
00289   natEl.push_back(e2);
00290   vector<pair<G4int,G4double> >*e3=new vector<pair<G4int,G4double> >; // 43-Tc
00291   e3->push_back(make_pair(55,1.));
00292   natEl.push_back(e3);
00293   vector<pair<G4int,G4double> >*e4=new vector<pair<G4int,G4double> >; // 44-Ru
00294   e4->push_back(make_pair(58,.316));
00295   e4->push_back(make_pair(60,.502));
00296   e4->push_back(make_pair(57,.673));
00297   e4->push_back(make_pair(55,.8));
00298   e4->push_back(make_pair(56,.926));
00299   e4->push_back(make_pair(52,.9814));
00300   e4->push_back(make_pair(54,1.));
00301   natEl.push_back(e4);
00302   vector<pair<G4int,G4double> >*e5=new vector<pair<G4int,G4double> >; // 45-Rh
00303   e5->push_back(make_pair(58,1.));
00304   natEl.push_back(e5);
00305   vector<pair<G4int,G4double> >*e6=new vector<pair<G4int,G4double> >; // 46-Pd
00306   e6->push_back(make_pair(60,.2733));
00307   e6->push_back(make_pair(62,.5379));
00308   e6->push_back(make_pair(59,.7612));
00309   e6->push_back(make_pair(55,.8784));
00310   e6->push_back(make_pair(58,.9898));
00311   e6->push_back(make_pair(56,1.));
00312   natEl.push_back(e6);
00313   vector<pair<G4int,G4double> >*e7=new vector<pair<G4int,G4double> >; // 47-Ag
00314   e7->push_back(make_pair(60,.51839));
00315   e7->push_back(make_pair(62,1.));
00316   natEl.push_back(e7);
00317   vector<pair<G4int,G4double> >*e8=new vector<pair<G4int,G4double> >; // 48-Cd
00318   e8->push_back(make_pair(66,.2873));
00319   e8->push_back(make_pair(64,.5286));
00320   e8->push_back(make_pair(59,.6566));
00321   e8->push_back(make_pair(62,.7815));
00322   e8->push_back(make_pair(65,.9037));
00323   e8->push_back(make_pair(68,.9786));
00324   e8->push_back(make_pair(58,.9911));
00325   e8->push_back(make_pair(60,1.));
00326   natEl.push_back(e8);
00327   vector<pair<G4int,G4double> >*e9=new vector<pair<G4int,G4double> >; // 49-In
00328   e9->push_back(make_pair(66,.9577));
00329   e9->push_back(make_pair(64,1.));
00330   natEl.push_back(e9);
00331   vector<pair<G4int,G4double> >*f0=new vector<pair<G4int,G4double> >; // 50-Sn
00332   f0->push_back(make_pair(70,.3259));
00333   f0->push_back(make_pair(68,.5681));
00334   f0->push_back(make_pair(66,.7134));
00335   f0->push_back(make_pair(69,.7992));
00336   f0->push_back(make_pair(67,.8760));
00337   f0->push_back(make_pair(74,.9339));
00338   f0->push_back(make_pair(72,.9802));
00339   f0->push_back(make_pair(62,.9899));
00340   f0->push_back(make_pair(64,1.));
00341   //f0->push_back(make_pair(64,.9964));
00342   //f0->push_back(make_pair(65,1.)); // Nine isotopes is the maximum, so Sn115 is out
00343   natEl.push_back(f0);
00344   vector<pair<G4int,G4double> >*f1=new vector<pair<G4int,G4double> >; // 51-Sb
00345   f1->push_back(make_pair(70,.5736));
00346   f1->push_back(make_pair(72,1.));
00347   natEl.push_back(f1);
00348   vector<pair<G4int,G4double> >*f2=new vector<pair<G4int,G4double> >; // 52-Te
00349   f2->push_back(make_pair(78,.3387));
00350   f2->push_back(make_pair(76,.6557));
00351   f2->push_back(make_pair(74,.8450));
00352   f2->push_back(make_pair(73,.9162));
00353   f2->push_back(make_pair(72,.9641));
00354   f2->push_back(make_pair(70,.9900));
00355   f2->push_back(make_pair(71,.99905));
00356   f2->push_back(make_pair(68,1.));
00357   natEl.push_back(f2);
00358   vector<pair<G4int,G4double> >*f3=new vector<pair<G4int,G4double> >; // 53-I
00359   f3->push_back(make_pair(74,1.));
00360   natEl.push_back(f3);
00361   vector<pair<G4int,G4double> >*f4=new vector<pair<G4int,G4double> >; // 54-Xe
00362   f4->push_back(make_pair(78,.269));
00363   f4->push_back(make_pair(75,.533));
00364   f4->push_back(make_pair(77,.745));
00365   f4->push_back(make_pair(80,.849));
00366   f4->push_back(make_pair(82,.938));
00367   f4->push_back(make_pair(76,.979));
00368   f4->push_back(make_pair(74,.9981));
00369   f4->push_back(make_pair(70,.9991));
00370   f4->push_back(make_pair(72,1.));
00371   natEl.push_back(f4);
00372   vector<pair<G4int,G4double> >*f5=new vector<pair<G4int,G4double> >; // 55-Cs
00373   f5->push_back(make_pair(78,1.));
00374   natEl.push_back(f5);
00375   vector<pair<G4int,G4double> >*f6=new vector<pair<G4int,G4double> >; // 56-Ba
00376   f6->push_back(make_pair(82,.717));
00377   f6->push_back(make_pair(81,.8293));
00378   f6->push_back(make_pair(80,.9078));
00379   f6->push_back(make_pair(79,.97373));
00380   f6->push_back(make_pair(78,.99793));
00381   f6->push_back(make_pair(74,.99899));
00382   f6->push_back(make_pair(76,1.));
00383   natEl.push_back(f6);
00384   vector<pair<G4int,G4double> >*f7=new vector<pair<G4int,G4double> >; // 57-La
00385   f7->push_back(make_pair(82,.999098));
00386   f7->push_back(make_pair(81,1.));
00387   natEl.push_back(f7);
00388   vector<pair<G4int,G4double> >*f8=new vector<pair<G4int,G4double> >; // 58-Ce
00389   f8->push_back(make_pair(82,.8843));
00390   f8->push_back(make_pair(84,.9956));
00391   f8->push_back(make_pair(80,.9981));
00392   f8->push_back(make_pair(78,1.));
00393   natEl.push_back(f8);
00394   vector<pair<G4int,G4double> >*f9=new vector<pair<G4int,G4double> >; // 59-Pr
00395   f9->push_back(make_pair(82,1.));
00396   natEl.push_back(f9);
00397   vector<pair<G4int,G4double> >*g0=new vector<pair<G4int,G4double> >; // 60-Nd
00398   g0->push_back(make_pair(82,.2713));
00399   g0->push_back(make_pair(84,.5093));
00400   g0->push_back(make_pair(86,.6812));
00401   g0->push_back(make_pair(83,.8030));
00402   g0->push_back(make_pair(85,.8860));
00403   g0->push_back(make_pair(88,.9436));
00404   g0->push_back(make_pair(90,1.));
00405   natEl.push_back(g0);
00406   vector<pair<G4int,G4double> >*g1=new vector<pair<G4int,G4double> >; // 61-Pm
00407   g1->push_back(make_pair(85,1.));
00408   natEl.push_back(g1);
00409   vector<pair<G4int,G4double> >*g2=new vector<pair<G4int,G4double> >; // 62-Sm
00410   g2->push_back(make_pair(90,.267));
00411   g2->push_back(make_pair(92,.494));
00412   g2->push_back(make_pair(85,.644));
00413   g2->push_back(make_pair(87,.782));
00414   g2->push_back(make_pair(86,.895));
00415   g2->push_back(make_pair(88,.969));
00416   g2->push_back(make_pair(82,1.));
00417   natEl.push_back(g2);
00418   vector<pair<G4int,G4double> >*g3=new vector<pair<G4int,G4double> >; // 63-Eu
00419   g3->push_back(make_pair(90,.522));
00420   g3->push_back(make_pair(89,1.));
00421   natEl.push_back(g3);
00422   vector<pair<G4int,G4double> >*g4=new vector<pair<G4int,G4double> >; // 64-Gd
00423   g4->push_back(make_pair(94,.2484));
00424   g4->push_back(make_pair(96,.4670));
00425   g4->push_back(make_pair(92,.6717));
00426   g4->push_back(make_pair(93,.8282));
00427   g4->push_back(make_pair(91,.9762));
00428   g4->push_back(make_pair(90,.9980));
00429   g4->push_back(make_pair(88,1.));
00430   natEl.push_back(g4);
00431   vector<pair<G4int,G4double> >*g5=new vector<pair<G4int,G4double> >; // 65-Tb
00432   g5->push_back(make_pair(94,1.));
00433   natEl.push_back(g5);
00434   vector<pair<G4int,G4double> >*g6=new vector<pair<G4int,G4double> >; // 66-Dy
00435   g6->push_back(make_pair(98,.282));
00436   g6->push_back(make_pair(96,.537));
00437   g6->push_back(make_pair(97,.786));
00438   g6->push_back(make_pair(95,.975));
00439   g6->push_back(make_pair(94,.9984));
00440   g6->push_back(make_pair(92,.9994));
00441   g6->push_back(make_pair(90,1.));
00442   natEl.push_back(g6);
00443   vector<pair<G4int,G4double> >*g7=new vector<pair<G4int,G4double> >; // 67-Ho
00444   g7->push_back(make_pair(98,1.));
00445   natEl.push_back(g7);
00446   vector<pair<G4int,G4double> >*g8=new vector<pair<G4int,G4double> >; // 68-Er
00447   g8->push_back(make_pair( 98,.3360));
00448   g8->push_back(make_pair(100,.6040));
00449   g8->push_back(make_pair( 99,.8335));
00450   g8->push_back(make_pair(102,.9825));
00451   g8->push_back(make_pair( 96,.9986));
00452   g8->push_back(make_pair( 94,1.));
00453   natEl.push_back(g8);
00454   vector<pair<G4int,G4double> >*g9=new vector<pair<G4int,G4double> >; // 69-Tm
00455   g9->push_back(make_pair(100,1.));
00456   natEl.push_back(g9);
00457   vector<pair<G4int,G4double> >*h0=new vector<pair<G4int,G4double> >; // 70-Yb
00458   h0->push_back(make_pair(104,.3180));
00459   h0->push_back(make_pair(102,.5370));
00460   h0->push_back(make_pair(103,.6982));
00461   h0->push_back(make_pair(101,.8412));
00462   h0->push_back(make_pair(106,.9682));
00463   h0->push_back(make_pair(100,.9987));
00464   h0->push_back(make_pair( 98,1.));
00465   natEl.push_back(h0);
00466   vector<pair<G4int,G4double> >*h1=new vector<pair<G4int,G4double> >; // 71-Lu
00467   h1->push_back(make_pair(104,.9741));
00468   h1->push_back(make_pair(105,1.));
00469   natEl.push_back(h1);
00470   vector<pair<G4int,G4double> >*h2=new vector<pair<G4int,G4double> >; // 72-Hf
00471   h2->push_back(make_pair(108,.35100));
00472   h2->push_back(make_pair(106,.62397));
00473   h2->push_back(make_pair(105,.81003));
00474   h2->push_back(make_pair(107,.94632));
00475   h2->push_back(make_pair(104,.99838));
00476   h2->push_back(make_pair(102,1.));
00477   natEl.push_back(h2);
00478   vector<pair<G4int,G4double> >*h3=new vector<pair<G4int,G4double> >; // 73-Ta
00479   h3->push_back(make_pair(108,.99988));
00480   h3->push_back(make_pair(107,1.));
00481   natEl.push_back(h3);
00482   vector<pair<G4int,G4double> >*h4=new vector<pair<G4int,G4double> >; // 74-W
00483   h4->push_back(make_pair(110,.307));
00484   h4->push_back(make_pair(112,.593));
00485   h4->push_back(make_pair(108,.856));
00486   h4->push_back(make_pair(109,.9988));
00487   h4->push_back(make_pair(106,1.));
00488   natEl.push_back(h4);
00489   vector<pair<G4int,G4double> >*h5=new vector<pair<G4int,G4double> >; // 75-Re
00490   h5->push_back(make_pair(112,.626));
00491   h5->push_back(make_pair(110,1.));
00492   natEl.push_back(h5);
00493   vector<pair<G4int,G4double> >*h6=new vector<pair<G4int,G4double> >; // 78-Os
00494   h6->push_back(make_pair(116,.410));
00495   h6->push_back(make_pair(114,.674));
00496   h6->push_back(make_pair(113,.835));
00497   h6->push_back(make_pair(112,.968));
00498   h6->push_back(make_pair(111,.984));
00499   h6->push_back(make_pair(110,.9998));
00500   h6->push_back(make_pair(108,1.));
00501   natEl.push_back(h6);
00502   vector<pair<G4int,G4double> >*h7=new vector<pair<G4int,G4double> >; // 77-Ir
00503   h7->push_back(make_pair(116,.627));
00504   h7->push_back(make_pair(114,1.));
00505   natEl.push_back(h7);
00506   vector<pair<G4int,G4double> >*h8=new vector<pair<G4int,G4double> >; // 78-Pt
00507   h8->push_back(make_pair(117,.338));
00508   h8->push_back(make_pair(116,.667));
00509   h8->push_back(make_pair(118,.920));
00510   h8->push_back(make_pair(120,.992));
00511   h8->push_back(make_pair(114,.9999));
00512   h8->push_back(make_pair(112,1.));
00513   natEl.push_back(h8);
00514   vector<pair<G4int,G4double> >*h9=new vector<pair<G4int,G4double> >; // 79-Au
00515   h9->push_back(make_pair(118,1.));
00516   natEl.push_back(h9);
00517   vector<pair<G4int,G4double> >*i0=new vector<pair<G4int,G4double> >; // 80-Hg
00518   i0->push_back(make_pair(122,.2986));
00519   i0->push_back(make_pair(120,.5296));
00520   i0->push_back(make_pair(119,.6983));
00521   i0->push_back(make_pair(121,.8301));
00522   i0->push_back(make_pair(118,.9298));
00523   i0->push_back(make_pair(124,.9985));
00524   i0->push_back(make_pair(116,1.));
00525   natEl.push_back(i0);
00526   vector<pair<G4int,G4double> >*i1=new vector<pair<G4int,G4double> >; // 81-Tl
00527   i1->push_back(make_pair(124,.70476));
00528   i1->push_back(make_pair(122,1.));
00529   natEl.push_back(i1);
00530   vector<pair<G4int,G4double> >*i2=new vector<pair<G4int,G4double> >; // 82-Pb
00531   i2->push_back(make_pair(126,.524));
00532   i2->push_back(make_pair(124,.765));
00533   i2->push_back(make_pair(125,.986));
00534   i2->push_back(make_pair(122,1.));
00535   natEl.push_back(i2);
00536   vector<pair<G4int,G4double> >*i3=new vector<pair<G4int,G4double> >; // 83-Bi
00537   i3->push_back(make_pair(126,1.));
00538   natEl.push_back(i3);
00539   vector<pair<G4int,G4double> >*i4=new vector<pair<G4int,G4double> >; // 84-Po
00540   i4->push_back(make_pair(125,1.));
00541   natEl.push_back(i4);
00542   vector<pair<G4int,G4double> >*i5=new vector<pair<G4int,G4double> >; // 85-At
00543   i5->push_back(make_pair(136,1.));
00544   natEl.push_back(i5);
00545   vector<pair<G4int,G4double> >*i6=new vector<pair<G4int,G4double> >; // 86-Ru
00546   i6->push_back(make_pair(136,1.));
00547   natEl.push_back(i6);
00548   vector<pair<G4int,G4double> >*i7=new vector<pair<G4int,G4double> >; // 87-Fr
00549   i7->push_back(make_pair(138,1.));
00550   natEl.push_back(i7);
00551   vector<pair<G4int,G4double> >*i8=new vector<pair<G4int,G4double> >; // 88-Ra
00552   i8->push_back(make_pair(138,1.));
00553   natEl.push_back(i8);
00554   vector<pair<G4int,G4double> >*i9=new vector<pair<G4int,G4double> >; // 89-Ac
00555   i9->push_back(make_pair(142,1.));
00556   natEl.push_back(i9);
00557   vector<pair<G4int,G4double> >*j0=new vector<pair<G4int,G4double> >; // 90-Th
00558   j0->push_back(make_pair(142,1.));
00559   natEl.push_back(j0);
00560   vector<pair<G4int,G4double> >*j1=new vector<pair<G4int,G4double> >; // 91-Pa
00561   j1->push_back(make_pair(140,1.));
00562   natEl.push_back(j1);
00563   vector<pair<G4int,G4double> >*j2=new vector<pair<G4int,G4double> >; // 92-U
00564   j2->push_back(make_pair(146,.992745));
00565   j2->push_back(make_pair(143,.999945));
00566   j2->push_back(make_pair(142,1.));
00567   natEl.push_back(j2);
00568   vector<pair<G4int,G4double> >*j3=new vector<pair<G4int,G4double> >; // 93-Np
00569   j3->push_back(make_pair(144,1.));
00570   natEl.push_back(j3);
00571   vector<pair<G4int,G4double> >*j4=new vector<pair<G4int,G4double> >; // 94-Pu
00572   j4->push_back(make_pair(150,1.));
00573   natEl.push_back(j4);
00574   vector<pair<G4int,G4double> >*j5=new vector<pair<G4int,G4double> >; // 95-Am
00575   j5->push_back(make_pair(148,1.));
00576   natEl.push_back(j5);
00577   vector<pair<G4int,G4double> >*j6=new vector<pair<G4int,G4double> >; // 96-Cm
00578   j6->push_back(make_pair(151,1.));
00579   natEl.push_back(j6);
00580   vector<pair<G4int,G4double> >*j7=new vector<pair<G4int,G4double> >; // 97-Bk
00581   j7->push_back(make_pair(150,1.));
00582   natEl.push_back(j7);
00583   vector<pair<G4int,G4double> >*j8=new vector<pair<G4int,G4double> >; // 98-Cf
00584   j8->push_back(make_pair(153,1.));
00585   natEl.push_back(j8);
00586   vector<pair<G4int,G4double> >*j9=new vector<pair<G4int,G4double> >; // 99-Es
00587   j9->push_back(make_pair(157,1.));
00588   natEl.push_back(j9);
00589   vector<pair<G4int,G4double> >*k0=new vector<pair<G4int,G4double> >; // 100-Fm
00590   k0->push_back(make_pair(157,1.));
00591   natEl.push_back(k0);
00592   vector<pair<G4int,G4double> >*k1=new vector<pair<G4int,G4double> >; // 101-Md
00593   k1->push_back(make_pair(157,1.));
00594   natEl.push_back(k1);
00595   vector<pair<G4int,G4double> >*k2=new vector<pair<G4int,G4double> >; // 102-No
00596   k2->push_back(make_pair(157,1.));
00597   natEl.push_back(k2);
00598   vector<pair<G4int,G4double> >*k3=new vector<pair<G4int,G4double> >; // 103-Lr
00599   k3->push_back(make_pair(157,1.));
00600   natEl.push_back(k3);
00601   vector<pair<G4int,G4double> >*k4=new vector<pair<G4int,G4double> >; // 104-Rf
00602   k4->push_back(make_pair(157,1.));
00603   natEl.push_back(k4);
00604   vector<pair<G4int,G4double> >*k5=new vector<pair<G4int,G4double> >; // 105-Db
00605   k5->push_back(make_pair(157,1.));
00606   natEl.push_back(k5);
00607   vector<pair<G4int,G4double> >*k6=new vector<pair<G4int,G4double> >; // 106-Sg
00608   k6->push_back(make_pair(157,1.));
00609   natEl.push_back(k6);
00610   vector<pair<G4int,G4double> >*k7=new vector<pair<G4int,G4double> >; // 107-Bh
00611   k7->push_back(make_pair(155,1.));
00612   natEl.push_back(k7);
00613   vector<pair<G4int,G4double> >*k8=new vector<pair<G4int,G4double> >; // 108-Hs
00614   k8->push_back(make_pair(157,1.));
00615   natEl.push_back(k8);
00616   vector<pair<G4int,G4double> >*k9=new vector<pair<G4int,G4double> >; // 109-Mt
00617   k9->push_back(make_pair(157,1.));
00618   natEl.push_back(k9);
00619   // Now fill natElements and natIsoCrossS
00620   G4int nona=natEl.size();
00621 #ifdef cdebug
00622   G4cout<<"G4QIsotope::Constructor natEl filling is finished nE="<<nona<<G4endl;
00623 #endif
00624   for(G4int i=0; i<nona; i++)
00625   {
00626     vector<pair<G4int,G4double> >* is=natEl[i]; // Pointer to theElement
00627     G4int n=is->size();
00628 #ifdef cdebug
00629     G4cout<<"G4QIsotope::Constructor: Element # "<<i<<", nOfIsotopes="<<n<<G4endl;
00630 #endif
00631     vector<pair<G4int,G4double>*>*a=new vector<pair<G4int,G4double>*>;
00632     vector<pair<G4int,G4double>*>*s_vec=new vector<pair<G4int,G4double>*>;
00633     G4double last=0.;
00634     if(n) for(G4int j=0; j<n; j++)
00635     {
00636       G4int    nn =(*is)[j].first; // #ofNeutrons in the isotope
00637       G4double cur=(*is)[j].second;// value of the summed abundancy
00638       pair<G4int,G4double>* aP = new pair<G4int,G4double>(nn,cur-last);
00639       last=cur;                     // Update the summed value
00640       pair<G4int,G4double>* sP = new pair<G4int,G4double>((*is)[j]);
00641       a->push_back(aP);
00642       s_vec->push_back(sP);
00643 #ifdef cdebug
00644       G4cout<<"G4QIsotope::Constructor:Element# "<<i<<", Pair # "<<j<<" is filled"<<G4endl;
00645 #endif
00646     }
00647     natElements.push_back(a);       // Fill abundancies for the particular isotope
00648     natSumAbund.push_back(s_vec);   // Fill summes abundancies up to this isotope
00649 #ifdef cdebug
00650     G4cout<<"G4QIsotope::Constructor: natElements is filled"<<G4endl;
00651 #endif
00652     vector<pair<G4int,G4double>*>*c=new vector<pair<G4int,G4double>*>;
00653     if(n) for(G4int j=0; j<n; j++)  // Cross sections are 0. by default
00654     {
00655       pair<G4int,G4double>* cP = new pair<G4int,G4double>((*is)[j].first,0.);
00656       c->push_back(cP);
00657 #ifdef cdebug
00658       G4cout<<"G4QIsotope::Constructor:CrosSecPair i="<<i<<", j="<<j<<" is filled"<<G4endl;
00659 #endif
00660     }
00661     natIsoCrosS.push_back(c);       // FillPrototypeCrossSec's (0) for theParticularIsotope
00662 #ifdef cdebug
00663     G4cout<<"G4QIsotope::Constructor: natIsoCrosS is filled"<<G4endl;
00664 #endif
00665     delete is;
00666   }
00667 #ifdef cdebug
00668   G4cout<<"G4QIsotope::Constructor: is finished"<<G4endl;
00669 #endif
00670 }

G4QIsotope::~G4QIsotope (  ) 

Definition at line 672 of file G4QIsotope.cc.

References G4cerr, G4cout, G4endl, CLHEP::detail::n, and G4InuclParticleNames::nn.

00673 {
00674 #ifdef debug
00675   G4cout<<"G4QIsotope::Destructor is called"<<G4endl;
00676 #endif
00677   G4int uP=natElements.size();
00678   if(uP) for(G4int i=0; i<uP; i++)
00679   {
00680     vector<pair<G4int,G4double>*>* curA=natElements[i];
00681     G4int nn=curA->size();         // Can not be 0 by definition
00682     if(nn) for(G4int n=0; n<nn; n++) delete (*curA)[n]; // Delete pair(N,Ab)
00683     delete curA;                   // Delet abundancy vector
00684     vector<pair<G4int,G4double>*>* curS=natSumAbund[i];
00685     G4int ns_value=curS->size();   // Can not be 0 by definition
00686     if(ns_value) for(G4int n=0; n<ns_value; n++) delete (*curS)[n]; // Delete pair(N,Ab)
00687     delete curS;                   // Delet abundancy vector
00688     vector<pair<G4int,G4double>*>* curC=natIsoCrosS[i];
00689     G4int nc=curC->size();         // Can not be 0 by definition
00690     if(nc) for(G4int k=0; k<nc; k++) delete (*curC)[k]; // Delete pair(N,CS)
00691     delete curC;                   // Delete cross section vector
00692   }
00693   G4int nP=newElems.size();
00694   if(nP) for(G4int j=0; j<nP; j++) // LOOP over new UserDefinedElements
00695   {
00696     pair<G4int, vector<pair<G4int,G4double>*>* >* nEl= newElems[j];
00697     G4int nEn=nEl->second->size();
00698     if(nEn) for(G4int k=0; k<nEn; k++) delete (*(nEl->second))[k]; // Del vect<pair(N,A)*>
00699     delete nEl->second;            // Delete the vector
00700     delete nEl;                    // Delete vect<IndZ,vect<pair(N,Ab)*>*> newElementVector
00701     //
00702     pair<G4int, vector<pair<G4int,G4double>*>* >* nSA= newSumAb[j];
00703     G4int nSn=nSA->second->size();
00704     if(nSn) for(G4int n=0; n<nSn; n++) delete (*(nSA->second))[n]; // Del vect<pair(N,S)*>
00705     delete nSA->second;            // Delete the vector
00706     delete nSA;                    // Delete vect<IndZ,vect<pair(N,SA)*>*> newSumAbunVector
00707     //
00708     pair<G4int, vector<pair<G4int,G4double>*>* >* nCS= newIsoCS[j];
00709     G4int nCn=nCS->second->size();
00710     if(nCn) for(G4int n=0; n<nCn; n++) delete (*(nCS->second))[n]; // Del vect<pair(N,C)*>
00711     delete nCS->second;            // Delete the vector
00712     delete nCS;                    // Delete vect<IndZ,vect<pair(N,CS)*>*> newIsoCroSVector
00713     //
00714     if(nEn!=nCn) G4cerr<<"*G4QIsotope-WORNING-:#El="<<j<<":nE="<<nEn<<"!=nC="<<nCn<<G4endl;
00715     if(nEn!=nSn) G4cerr<<"*G4QIsotope-WORNING-:#El="<<j<<":nE="<<nEn<<"!=nS="<<nSn<<G4endl;
00716   }
00717 }


Member Function Documentation

G4QIsotope * G4QIsotope::Get (  )  [static]

Definition at line 720 of file G4QIsotope.cc.

References G4cout, and G4endl.

Referenced by G4QCaptureAtRest::AtRestDoIt(), G4QNGamma::GetMeanFreePath(), G4QLowEnergy::GetMeanFreePath(), G4QIonIonElastic::GetMeanFreePath(), G4QInelastic::GetMeanFreePath(), G4QElastic::GetMeanFreePath(), G4QDiffraction::GetMeanFreePath(), G4QCoherentChargeExchange::GetMeanFreePath(), G4QAtomicElectronScattering::GetMeanFreePath(), and G4QAtomicElectronScattering::PostStepDoIt().

00721 {
00722 #ifdef pdebug
00723   G4cout<<"G4QIsotope::Get is called"<<G4endl;
00724 #endif
00725   static G4QIsotope theIsotopes;             // *** Static body of the G4QIsotope class ***
00726   return &theIsotopes;
00727 }

vector< pair< G4int, G4double > * > * G4QIsotope::GetAbuVector ( G4int  Z,
G4int  index = 0 
)

Definition at line 1772 of file G4QIsotope.cc.

References G4cerr, and G4cout.

01773 {
01774 #ifdef debug
01775   G4cout<<"G4QIsotope::GetAbuVector is called"<<G4endl;
01776 #endif
01777   if(index<0)
01778   {
01779     G4cerr<<"---Worning---G4QIsotope::GetAbuVector:(-1) Negative Index i="<<index<<G4endl;
01780     return 0;
01781   }
01782   else if(!index) return natElements[Z];
01783   // For the positive index tries to find the newUserDefinedElement
01784   G4bool found=false;                 // Prototype of the"ZWithTheSameIndex is found" event
01785   G4int nE=newElems.size();           // A number of definitions in the newElements Vector
01786   G4int i=0;
01787   if(nE) for(i=0; i<nE; i++)
01788   {
01789     G4int zin=newElems[i]->first;
01790     G4int in=zin/1000;                // Existing index
01791     G4int zi=zin%1000;                // Existing Z
01792     if(Z==zi && in==index)
01793     {
01794       found=true;                     // The newElement with the same Z & index is found
01795       break;                          // Finish the search and quit the loop
01796     }
01797   }
01798   if(!found)
01799   {
01800     G4cerr<<"--Worning--G4QIsotope::GetAbuVector:(-2)NotFound Z="<<Z<<",i="<<index<<G4endl;
01801     return 0;
01802   }
01803   return newElems[i]->second;
01804 }

G4int G4QIsotope::GetCSNeutrons ( G4int  Z,
G4int  index = 0 
)

Definition at line 1916 of file G4QIsotope.cc.

References G4cerr, G4cout, and G4UniformRand.

01917 {
01918   vector<pair<G4int,G4double>*>* ab;
01919   vector<pair<G4int,G4double>*>* cs;
01920 #ifdef debug
01921   G4cout<<"G4QIsotope::GetCSNeutrons is called"<<G4endl;
01922 #endif
01923   if(index<0)
01924   {
01925     G4cerr<<"---Worning---G4QIsotope::GetCSNeutrons:(-1) Negative Index i="<<index<<G4endl;
01926     return -1;
01927   }
01928   else if(!index)           // =---------=> Natural Abundancies for Isotopes of the Element
01929   {
01930     ab=natElements[Z];
01931     cs=natIsoCrosS[Z];
01932   }
01933   else                      // =-------=> UserDefinedAbundancies for Isotopes of theElement
01934   {
01935     // For the positive index tries to find the newUserDefinedElement
01936     G4bool found=false;               // Prototype of the"ZWithTheSameIndex is found" event
01937     G4int nE=newIsoCS.size();         // A number of definitions in the newElements Vector
01938     G4int i=0;
01939     if(nE) for(i=0; i<nE; i++)
01940     {
01941       G4int zin=newIsoCS[i]->first;
01942       G4int in=zin/1000;              // Existing index
01943       G4int zi=zin%1000;              // Existing Z
01944       if(Z==zi && in==index)
01945       {
01946         found=true;                   // The newElement with the same Z & index is found
01947         break;                        // Finish the search and quit the loop
01948       }
01949     }
01950     if(!found)
01951     {
01952       G4cerr<<"--Worning--G4QIsotope::GetCSNeut:(-2) NotFound Z="<<Z<<",i="<<index<<G4endl;
01953       return -2;
01954     }
01955     ab=newElems[i]->second;
01956     cs=newIsoCS[i]->second;
01957   }
01958   G4int nis=ab->size();
01959   G4double last=0.;
01960   if(!nis)
01961   {
01962     G4cerr<<"--Worning--G4QIsotope::GetCSNeutrons:(-3) Empty Z="<<Z<<",i="<<index<<G4endl;
01963     return -3;
01964   }
01965   else
01966   {
01967     G4double sum=0.;
01968     vector<G4double> scs(nis);
01969     for(G4int j=0; j<nis; j++)
01970     {
01971       G4double cur=(*ab)[j]->second;
01972       G4double abunda=cur-last;
01973       last=cur;
01974       sum+=abunda * (*cs)[j]->second;;
01975       scs.push_back(sum);
01976     }
01977     G4double rnd=sum*G4UniformRand();
01978     sum=0;
01979     G4int k=0;
01980     if(nis>1) for(k=0; k<nis; k++) if(rnd<scs[k]) break;
01981     return (*ab)[k]->first;
01982   }
01983 }

vector< pair< G4int, G4double > * > * G4QIsotope::GetCSVector ( G4int  Z,
G4int  index = 0 
)

Definition at line 1737 of file G4QIsotope.cc.

References G4cerr, and G4cout.

Referenced by G4QNGamma::GetMeanFreePath(), G4QLowEnergy::GetMeanFreePath(), G4QIonIonElastic::GetMeanFreePath(), G4QInelastic::GetMeanFreePath(), G4QElastic::GetMeanFreePath(), G4QDiffraction::GetMeanFreePath(), G4QCoherentChargeExchange::GetMeanFreePath(), and G4QAtomicElectronScattering::GetMeanFreePath().

01738 {
01739 #ifdef debug
01740   G4cout<<"G4QIsotope::GetCSVector is called"<<G4endl;
01741 #endif
01742   if(index<0)
01743   {
01744     G4cerr<<"---Worning---G4QIsotope::GetSCVector:(-1) Negative Index i="<<index<<G4endl;
01745     return 0;
01746   }
01747   else if(!index) return natIsoCrosS[Z];
01748   // For the positive index tries to find the newUserDefinedElement
01749   G4bool found=false;                 // Prototype of the"ZWithTheSameIndex is found" event
01750   G4int nE=newIsoCS.size();           // A number of definitions in the newElements Vector
01751   G4int i=0;
01752   if(nE) for(i=0; i<nE; i++)
01753   {
01754     G4int zin=newIsoCS[i]->first;
01755     G4int in=zin/1000;                // Existing index
01756     G4int zi=zin%1000;                // Existing Z
01757     if(Z==zi && in==index)
01758     {
01759       found=true;                     // The newElement with the same Z & index is found
01760       break;                          // Finish the search and quit the loop
01761     }
01762   }
01763   if(!found)
01764   {
01765     G4cerr<<"--Worning--G4QIsotope::GetSCVector:(-2) NotFound Z="<<Z<<",i="<<index<<G4endl;
01766     return 0;
01767   }
01768   return newIsoCS[i]->second;
01769 }

G4int G4QIsotope::GetLastIndex ( G4int  Z  ) 

Definition at line 1642 of file G4QIsotope.cc.

References G4cout.

Referenced by G4QAtomicElectronScattering::PostStepDoIt().

01642                                                                                     : =0)
01643 {
01644 #ifdef debug
01645   G4cout<<"G4QIsotope::GetLastIndex is called Z="<<Z<<G4endl;
01646 #endif
01647   G4int mind=0;                       // Prototype of the maximum existing index for this Z
01648   G4int nE=newElems.size();           // A number of definitions in the newElements vector
01649   if(nE) for(G4int i=0; i<nE; i++)    // LOOP over new UserDefinedElements
01650   {
01651     G4int zin=newElems[i]->first;
01652     G4int zi=zin%1000;                // Existing Z
01653     G4int in=zin/1000;                // Existing index
01654     if(Z==zi && in>mind) mind=in;     // maximum index for this Z
01655   }
01656   return mind;
01657 }

G4double G4QIsotope::GetMeanCrossSection ( G4int  Z,
G4int  index = 0 
)

Definition at line 1842 of file G4QIsotope.cc.

References G4cerr, and G4cout.

Referenced by G4QNGamma::GetMeanFreePath(), G4QLowEnergy::GetMeanFreePath(), G4QIonIonElastic::GetMeanFreePath(), G4QInelastic::GetMeanFreePath(), G4QElastic::GetMeanFreePath(), G4QDiffraction::GetMeanFreePath(), G4QCoherentChargeExchange::GetMeanFreePath(), and G4QAtomicElectronScattering::GetMeanFreePath().

01843 {
01844   vector<pair<G4int,G4double>*>* ab;
01845   vector<pair<G4int,G4double>*>* cs;
01846 #ifdef ppdebug
01847   G4cout<<"G4QIsotope::GetMeanCrossSection is called"<<G4endl;
01848 #endif
01849   if(index<0)
01850   {
01851     G4cerr<<"---Worning---G4QIsotope::GetMeanCS:(-1) Negative Index i="<<index<<G4endl;
01852     return -1.;
01853   }
01854   else if(!index)           // =-------=> Natural Abundancies for Isotopes of the Element
01855   {
01856 #ifdef ppdebug
01857     G4cout<<"G4QIsotope::GetMeanCrossSection: Nat Abundance, Z="<<Z<<G4endl;
01858 #endif
01859     ab=natElements[Z];
01860     cs=natIsoCrosS[Z];
01861   }
01862   else                      // =------=> UserDefinedAbundancies for Isotopes of theElement
01863   {
01864 #ifdef ppdebug
01865     G4cout<<"G4QIsotope::GetMeanCrossSection: Art Abund, Z="<<Z<<",ind="<<index<<G4endl;
01866 #endif
01867     // For the positive index tries to find the newUserDefinedElement
01868     G4bool found=false;               // Prototype of the"ZWithTheSameIndex is found" event
01869     G4int nE=newIsoCS.size();         // A number of definitions in the newElements Vector
01870     G4int i=0;
01871     if(nE) for(i=0; i<nE; i++)
01872     {
01873       G4int zin=newIsoCS[i]->first;
01874       G4int in=zin/1000;              // Existing index
01875       G4int zi=zin%1000;              // Existing Z
01876       if(Z==zi && in==index)
01877       {
01878         found=true;                   // The newElement with the same Z & index is found
01879         break;                        // Finish the search and quit the loop
01880       }
01881     }
01882     if(!found)
01883     {
01884       G4cerr<<"--Worning--G4QIsotope::GetMeanCS:(-2) NotFound Z="<<Z<<",i="<<index<<G4endl;
01885       return -2.;
01886     }
01887     ab=newElems[i]->second;
01888     cs=newIsoCS[i]->second;
01889   }
01890   G4int nis=ab->size();
01891   //G4double last=0.;
01892   if(!nis)
01893   {
01894     G4cerr<<"--Worning--G4QIsotope::GetMeanCS:(-3) Empty Z="<<Z<<",i="<<index<<G4endl;
01895     return -3.;
01896   }
01897   else
01898   {
01899     G4double sum=0.;
01900     for(G4int j=0; j<nis; j++)
01901     {
01902       G4double cur=(*ab)[j]->second;
01903       //G4double abunda=cur-last;
01904       //last=cur;
01905 #ifdef ppdebug
01906       G4cout<<"G4QIsot::GetMeanCS:j="<<j<<",ab="<<cur<<",CS="<<(*cs)[j]->second<<G4endl;
01907 #endif
01908       //sum+=abunda * (*cs)[j]->second;
01909       sum+=cur * (*cs)[j]->second;
01910     }
01911     return sum;
01912   }
01913 }

G4int G4QIsotope::GetNeutrons ( G4int  Z,
G4int  index = 0 
)

Definition at line 1682 of file G4QIsotope.cc.

References G4cerr, G4cout, G4UniformRand, and G4InuclParticleNames::nn.

Referenced by G4QCaptureAtRest::AtRestDoIt(), and G4QAtomicElectronScattering::PostStepDoIt().

01683 {
01684 #ifdef debug
01685   G4cout<<"G4QIsotope::GetNeutrons is called Z="<<Z<<", index="<<index<<G4endl;
01686 #endif
01687   // To reduce the code, but make the member function a bit slower, one can use for natural
01688   // isotopes the same algorithm as for the newElements, splitting the natElements Vector
01689   if(!index) return RandomizeNeutrons(Z); // @@ Fast decision for the natural isotopes
01690   else if(index<0)
01691   {
01692     G4cerr<<"---Worning---G4QIsotope::GetNeutrons:(-2) Negative Index i="<<index<<G4endl;
01693     return -2;
01694   }
01695   // For the positive index tries to randomize the newUserDefinedElement
01696   G4bool found=false;                 // Prototype of the"ZWithTheSameIndex is found" event
01697   G4int nE=newElems.size();           // A number of definitions in the newElements Vector
01698   G4int i=0;
01699   if(nE) for(i=0; i<nE; i++)
01700   {
01701     G4int zin=newElems[i]->first;
01702     G4int in=zin/1000;                // Existing index
01703     G4int zi=zin%1000;                // Existing Z
01704     if(Z==zi && in==index)
01705     {
01706       found=true;                     // The newElement with the same Z & index is found
01707       break;                          // Finish the search and quit the loop
01708     }
01709   }
01710   if(!found)
01711   {
01712     G4cerr<<"--Worning--G4QIsotope::GetNeutrons:(-1) NotFound Z="<<Z<<",i="<<index<<G4endl;
01713     return -1;
01714   }
01715   vector<pair<G4int,G4double>*>* abu = newSumAb[i]->second;
01716   G4int nn = abu->size();             // A#Of UserDefinedIsotopes for the newElement
01717   if(nn>0)
01718   {
01719     if(nn==1) return (*abu)[0]->first;
01720     else
01721     {
01722       G4double rnd=G4UniformRand();
01723       G4int j=0;
01724       for(j=0; j<nn; j++) if ( rnd < (*abu)[j]->second ) break;
01725       if(j>=nn) j=nn-1;
01726       return (*abu)[j]->first;
01727     }
01728   }
01729   else
01730   {
01731     G4cerr<<"--Worning--G4QIsotope::GetNeutrons:(-3) Empty Z="<<Z<<",i="<<index<<G4endl;
01732     return -3;
01733   }
01734 }

G4int G4QIsotope::GetProtons ( G4int  A,
std::vector< G4int > &  isoV 
)

vector< pair< G4int, G4double > * > * G4QIsotope::GetSumAVector ( G4int  Z,
G4int  index = 0 
)

Definition at line 1807 of file G4QIsotope.cc.

References G4cerr, and G4cout.

01808 {
01809 #ifdef debug
01810   G4cout<<"G4QIsotope::GetSumAVector is called"<<G4endl;
01811 #endif
01812   if(index<0)
01813   {
01814     G4cerr<<"---Worning---G4QIsotope::GetSumAVector:(-1) Negative Index i="<<index<<G4endl;
01815     return 0;
01816   }
01817   else if(!index) return natSumAbund[Z];
01818   // For the positive index tries to find the newUserDefinedElement
01819   G4bool found=false;                 // Prototype of the"ZWithTheSameIndex is found" event
01820   G4int nE=newSumAb.size();           // A number of definitions in the newElements Vector
01821   G4int i=0;
01822   if(nE) for(i=0; i<nE; i++)
01823   {
01824     G4int zin=newSumAb[i]->first;
01825     G4int in=zin/1000;                // Existing index
01826     G4int zi=zin%1000;                // Existing Z
01827     if(Z==zi && in==index)
01828     {
01829       found=true;                     // The newElement with the same Z & index is found
01830       break;                          // Finish the search and quit the loop
01831     }
01832   }
01833   if(!found)
01834   {
01835     G4cerr<<"-Worning-G4QIsotope::GetSumAVector:(-2)Not Found Z="<<Z<<",i="<<index<<G4endl;
01836     return 0;
01837   }
01838   return newSumAb[i]->second;
01839 }

G4int G4QIsotope::InitElement ( G4int  Z,
G4int  index,
std::vector< std::pair< G4int, G4double > * > *  abund 
)

Referenced by G4QCaptureAtRest::AtRestDoIt(), G4QNGamma::GetMeanFreePath(), G4QLowEnergy::GetMeanFreePath(), G4QIonIonElastic::GetMeanFreePath(), G4QInelastic::GetMeanFreePath(), G4QElastic::GetMeanFreePath(), G4QDiffraction::GetMeanFreePath(), G4QCoherentChargeExchange::GetMeanFreePath(), and G4QAtomicElectronScattering::PostStepDoIt().

G4bool G4QIsotope::IsDefined ( G4int  Z,
G4int  Ind 
)

Definition at line 1660 of file G4QIsotope.cc.

References G4cerr, and G4cout.

Referenced by G4QCaptureAtRest::AtRestDoIt(), G4QNGamma::GetMeanFreePath(), G4QLowEnergy::GetMeanFreePath(), G4QIonIonElastic::GetMeanFreePath(), G4QInelastic::GetMeanFreePath(), G4QElastic::GetMeanFreePath(), G4QDiffraction::GetMeanFreePath(), and G4QCoherentChargeExchange::GetMeanFreePath().

01661 {
01662 #ifdef debug
01663   G4cout<<"G4QIsotope::IsDefined is called Z="<<Z<<", I="<<Ind<<G4endl;
01664 #endif
01665   if(Ind<=0)
01666   {
01667     if(Ind<0) G4cerr<<"-W-G4QIsotope::IsDefined: Z="<<Z<<", Ind="<<Ind<<" < 0->=0"<<G4endl;
01668     return true;                      // to avoid definition with the negative index
01669   }
01670   G4int nE=newElems.size();           // A number of definitions in the newElements vector
01671   if(nE) for(G4int i=0; i<nE; i++)    // LOOP over new UserDefinedElements
01672   {
01673     G4int zin=newElems[i]->first;
01674     G4int zi=zin%1000;                // Existing Z
01675     G4int in=zin/1000;                // Existing index
01676     if(Z==zi && Ind==in) return true;  // The index for the element Z is found
01677   }
01678   return false;                       // The index for the element Z is not found
01679 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:53:10 2013 for Geant4 by  doxygen 1.4.7