143{
144
145
146
147
148
149
150
151
152
153
154
155 if (verboseLevel > 3)
156 G4cout <<
"Calling SampleSecondaries() of G4LivermoreNuclearGammaConversionModel" <<
G4endl;
157
160
162 G4double epsilon0Local = electron_mass_c2 / photonEnergy ;
163
164
165 if (photonEnergy < smallEnergy )
166 {
167 epsilon = epsilon0Local + (0.5 - epsilon0Local) *
G4UniformRand();
168 }
169 else
170 {
171
172
175
176 if (element == 0)
177 {
178 G4cout <<
"G4LivermoreNuclearGammaConversionModel::SampleSecondaries - element = 0"
180 return;
181 }
183 if (ionisation == 0)
184 {
185 G4cout <<
"G4LivermoreNuclearGammaConversionModel::SampleSecondaries - ionisation = 0"
187 return;
188 }
189
190
192 if (photonEnergy > 50. * MeV) fZ += 8. * (element->
GetfCoulomb());
193
194
196 G4double screenMax = std::exp ((42.24 - fZ)/8.368) - 0.952 ;
197 G4double screenMin = std::min(4.*screenFactor,screenMax) ;
198
199
200 G4double epsilon1 = 0.5 - 0.5 * std::sqrt(1. - screenMin / screenMax) ;
201 G4double epsilonMin = std::max(epsilon0Local,epsilon1);
202 G4double epsilonRange = 0.5 - epsilonMin ;
203
204
207
208 G4double f10 = ScreenFunction1(screenMin) - fZ;
209 G4double f20 = ScreenFunction2(screenMin) - fZ;
210 G4double normF1 = std::max(f10 * epsilonRange * epsilonRange,0.);
211 G4double normF2 = std::max(1.5 * f20,0.);
212
213 do {
215 {
216 epsilon = 0.5 - epsilonRange * std::pow(
G4UniformRand(), 0.3333) ;
217 screen = screenFactor / (epsilon * (1. - epsilon));
218 gReject = (ScreenFunction1(screen) - fZ) / f10 ;
219 }
220 else
221 {
223 screen = screenFactor / (epsilon * (1 - epsilon));
224 gReject = (ScreenFunction2(screen) - fZ) / f20 ;
225 }
227
228 }
229
230
231
234
236 {
237 electronTotEnergy = (1. - epsilon) * photonEnergy;
238 positronTotEnergy = epsilon * photonEnergy;
239 }
240 else
241 {
242 positronTotEnergy = (1. - epsilon) * photonEnergy;
243 electronTotEnergy = epsilon * photonEnergy;
244 }
245
246
247
248
249
253
254
255
257 {
259 }
260 else
261 {
263 }
264
265 G4double thetaEle = u*electron_mass_c2/electronTotEnergy;
266 G4double thetaPos = u*electron_mass_c2/positronTotEnergy;
268
269 G4double dxEle= std::sin(thetaEle)*std::cos(phi),dyEle= std::sin(thetaEle)*std::sin(phi),dzEle=std::cos(thetaEle);
270 G4double dxPos=-std::sin(thetaPos)*std::cos(phi),dyPos=-std::sin(thetaPos)*std::sin(phi),dzPos=std::cos(thetaPos);
271
272
273
274
275
276
277 G4double electronKineEnergy = std::max(0.,electronTotEnergy - electron_mass_c2) ;
278
279
280
282 electronDirection.rotateUz(photonDirection);
283
285 electronDirection,
286 electronKineEnergy);
287
288
289 G4double positronKineEnergy = std::max(0.,positronTotEnergy - electron_mass_c2) ;
290
291
292
294 positronDirection.rotateUz(photonDirection);
295
296
298 positronDirection, positronKineEnergy);
299
300
301 fvect->push_back(particle1);
302 fvect->push_back(particle2);
303
304
307
308}
const G4ThreeVector & GetMomentumDirection() const
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
static G4Electron * Electron()
G4double GetfCoulomb() const
G4IonisParamElm * GetIonisation() const
G4double GetlogZ3() const
void SetProposedKineticEnergy(G4double proposedKinEnergy)
static G4Positron * Positron()
const G4Element * SelectRandomAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
void ProposeTrackStatus(G4TrackStatus status)