60{
61
62
63
64
65 size_t i = 0;
69
70 if(1 < numberOfElements) {
71 if(numberOfElements >
prob.size()) {
prob.resize(numberOfElements, 0.0); }
72
74
76 for (i=0; i < numberOfElements; ++i) {
77
78 G4int Z = (*theElementVector)[i]->GetZasInt();
79
80
81 if( (9 ==
Z) || (17 ==
Z) || (35 ==
Z) || (53 ==
Z) || (85 ==
Z) ) {
82 sum += 0.66 *
Z * theAtomNumDensity[i];
83
84
86 sum += 0.56 *
Z * theAtomNumDensity[i];
87
88
89 } else {
90 sum +=
Z * theAtomNumDensity[i];
91 }
93 }
94
96 for (i=0; i < numberOfElements; ++i) {
97 if(sum <=
prob[i]) {
break; }
98 }
99 }
100
101 const G4Element* elm = (*theElementVector)[i];
103
104
106 size_t ni = isv->size();
107 i = 0;
108
109 if(1 < ni) {
110
113 for(i=0; i<ni; ++i) {
115 if(y <= 0.0) { break; }
116 }
117 }
118
121
122 return elm;
123}
std::vector< const G4Element * > G4ElementVector
std::vector< G4Isotope * > G4IsotopeVector
std::vector< G4double > prob
G4double * GetRelativeAbundanceVector() const
const G4Isotope * GetIsotope(G4int iso) const
G4IsotopeVector * GetIsotopeVector() const
const G4ElementVector * GetElementVector() const
size_t GetNumberOfElements() const
const G4double * GetAtomicNumDensityVector() const
void SetParameters(const G4double A, const G4double Z, const G4int numberOfLambdas=0)
G4Material * GetMaterial() const