95{
96
97
98 if(0 == nElmMinusOne || cut == cutEnergy) { return; }
99
100 cutEnergy = cut;
101
103
104 const G4double* theAtomNumDensityVector =
106
107
108 for(
G4int j=0; j<=nbins; ++j) {
109 G4double e = (xSections[0])->Energy(j);
111 cross = 0.0;
112
113 for (
G4int i=0; i<=nElmMinusOne; ++i) {
114 cross += theAtomNumDensityVector[i]*
116 cutEnergy, e);
117 xSections[i]->PutValue(j, cross);
118 }
119 }
120
121 if(0.0 == (*xSections[nElmMinusOne])[0]) {
122 for (
G4int i=0; i<=nElmMinusOne; ++i) {
123 xSections[i]->PutValue(0, (*xSections[i])[1]);
124 }
125 }
126
127 if(0.0 == (*xSections[nElmMinusOne])[nbins]) {
128 for (
G4int i=0; i<=nElmMinusOne; ++i) {
129 xSections[i]->PutValue(nbins, (*xSections[i])[nbins-1]);
130 }
131 }
132
133 for(
G4int j=0; j<=nbins; ++j) {
134 cross = (*xSections[nElmMinusOne])[j];
135
136 if(cross > 0.0) {
137 for (
G4int i=0; i<nElmMinusOne; ++i) {
138 G4double x = (*xSections[i])[j]/cross;
139 xSections[i]->PutValue(j, x);
140 }
141 }
142 }
143
144
145
146
147
148
149
150
151}
const G4double * GetVecNbOfAtomsPerVolume() const
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0., G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
virtual void SetupForMaterial(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)