262{
263
264
265
266
267
268
269
270
271
272
273 if (verboseLevel > 1) {
274 G4cout <<
"Calling SampleSecondaries() of G4LivermoreNuclearGammaConversionModel"
276 }
277
280
282 G4double epsilon0Local = electron_mass_c2 / photonEnergy ;
283
284
285 if (photonEnergy < smallEnergy )
286 {
288 }
289 else
290 {
291
294
295 if (element == nullptr)
296 {
297 G4cout <<
"G4LivermoreNuclearGammaConversionModel::SampleSecondaries - element = 0"
299 return;
300 }
302 if (ionisation == nullptr)
303 {
304 G4cout <<
"G4LivermoreNuclearGammaConversionModel::SampleSecondaries - ionisation = 0"
306 return;
307 }
308
309
311 if (photonEnergy > 50. * MeV) fZ += 8. * (element->
GetfCoulomb());
312
313
316 G4double screenMin = std::min(4.*screenFactor,screenMax) ;
317
318
319 G4double epsilon1 = 0.5 - 0.5 * std::sqrt(1. - screenMin / screenMax) ;
320 G4double epsilonMin = std::max(epsilon0Local,epsilon1);
321 G4double epsilonRange = 0.5 - epsilonMin ;
322
323
326
327 G4double f10 = ScreenFunction1(screenMin) - fZ;
328 G4double f20 = ScreenFunction2(screenMin) - fZ;
329 G4double normF1 = std::max(f10 * epsilonRange * epsilonRange,0.);
330 G4double normF2 = std::max(1.5 * f20,0.);
331
332 do
333 {
335 {
338 gReject = (ScreenFunction1(screen) - fZ) / f10 ;
339 }
340 else
341 {
344 gReject = (ScreenFunction2(screen) - fZ) / f20 ;
345 }
347 }
348
349
352
354 {
355 electronTotEnergy = (1. -
epsilon) * photonEnergy;
356 positronTotEnergy =
epsilon * photonEnergy;
357 }
358 else
359 {
360 positronTotEnergy = (1. -
epsilon) * photonEnergy;
361 electronTotEnergy =
epsilon * photonEnergy;
362 }
363
364
365
366
367
371
373 {
375 }
376 else
377 {
379 }
380
381 G4double thetaEle = u*electron_mass_c2/electronTotEnergy;
382 G4double thetaPos = u*electron_mass_c2/positronTotEnergy;
384
385 G4double dxEle= std::sin(thetaEle)*std::cos(phi),dyEle= std::sin(thetaEle)*std::sin(phi),dzEle=std::cos(thetaEle);
386 G4double dxPos=-std::sin(thetaPos)*std::cos(phi),dyPos=-std::sin(thetaPos)*std::sin(phi),dzPos=std::cos(thetaPos);
387
388
389
390
391
392 G4double electronKineEnergy = std::max(0.,electronTotEnergy - electron_mass_c2) ;
393
395 electronDirection.rotateUz(photonDirection);
396
398 electronDirection,
399 electronKineEnergy);
400
401
402 G4double positronKineEnergy = std::max(0.,positronTotEnergy - electron_mass_c2) ;
403
405 positronDirection.rotateUz(photonDirection);
406
407
409 positronDirection,
410 positronKineEnergy);
411
412 fvect->push_back(particle1);
413 fvect->push_back(particle2);
414
415
418
419}
G4double epsilon(G4double density, G4double temperature)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
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)