285 if (verboseLevel > 1) {
286 G4cout <<
"Calling SampleSecondaries() of G4LivermoreGammaConversionModelRC"
302 if (photonEnergy < smallEnergy )
304 epsilon = epsilon0Local + (0.5 - epsilon0Local) *
G4UniformRand();
307 electronTotEnergy = (1. -
epsilon) * photonEnergy;
308 positronTotEnergy = epsilon * photonEnergy;
312 positronTotEnergy = (1. -
epsilon) * photonEnergy;
313 electronTotEnergy = epsilon * photonEnergy;
325 G4cout <<
"G4LivermoreGammaConversionModelRC::SampleSecondaries - element = 0"
332 G4cout <<
"G4LivermoreGammaConversionModelRC::SampleSecondaries - ionisation = 0"
339 if (photonEnergy > 50. *
MeV) fZ += 8. * (element->
GetfCoulomb());
347 G4double epsilon1 = 0.5 - 0.5 * std::sqrt(1. - screenMin / screenMax) ;
349 G4double epsilonRange = 0.5 - epsilonMin ;
355 G4double f10 = ScreenFunction1(screenMin) - fZ;
356 G4double f20 = ScreenFunction2(screenMin) - fZ;
362 G4double a=393.3750918,
b=115.3070201,
c=810.6428451, d=19.96497475, e=1016.874592, f=1.936685510,
363 gLocal=751.2140962, h=0.099751048, i=299.9466339, j=0.002057250, k=49.81034926;
364 G4double aa=-18.6371131,
bb=-1729.95248, cc=9450.971186, dd=106336.0145, ee=55143.09287, ff=-117602.840,
365 gg=-721455.467, hh=693957.8635, ii=156266.1085, jj=533209.9347;
367 G4double logepsMin = log(epsilonMin);
368 G4double NormaRC = a +
b*logepsMin +
c/logepsMin + d*pow(logepsMin,2.) + e/pow(logepsMin,2.) + f*pow(logepsMin,3.) +
369 gLocal/pow(logepsMin,3.) + h*pow(logepsMin,4.) + i/pow(logepsMin,4.) + j*pow(logepsMin,5.) +
372 G4double HardPhotonThreshold = 0.08;
373 G4double r1, r2, r3, beta=0, gbeta, sigt = 582.068, sigh, rejet;
378 sigh = 1028.58*
G4Exp(-HardPhotonThreshold/0.09033) + 136.63;
381 if (r1 > 1.- sigh/sigt) {
386 beta = (-2./11.)*log(
G4Exp(-0.08*11./2.)-r3*11./(2.*cg));
387 gbeta =
G4Exp(-11.*beta/2.);
388 rejet = fbeta(beta)/(8000.*gbeta);
390 HardPhotonEnergy = beta * photonEnergy;
393 HardPhotonEnergy = 0.;
396 photonEnergy -= HardPhotonEnergy;
404 epsilon = 0.5 - epsilonRange * std::pow(
G4UniformRand(), 0.333333) ;
405 screen = screenFactor / (epsilon * (1. -
epsilon));
406 gReject = (ScreenFunction1(screen) - fZ) / f10 ;
411 screen = screenFactor / (epsilon * (1 -
epsilon));
412 gReject = (ScreenFunction2(screen) - fZ) / f20 ;
421 G4double deltaP_R1 = 1. + (a +
b*logepsilon +
c/logepsilon + d*pow(logepsilon,2.) + e/pow(logepsilon,2.) +
422 f*pow(logepsilon,3.) + gLocal/pow(logepsilon,3.) + h*pow(logepsilon,4.) + i/pow(logepsilon,4.) +
423 j*pow(logepsilon,5.) + k/pow(logepsilon,5.))/100.;
424 G4double deltaP_R2 = 1.+((aa + cc*logepsilon + ee*pow(logepsilon,2.) + gg*pow(logepsilon,3.) + ii*pow(logepsilon,4.))
425 / (1. +
bb*logepsilon + dd*pow(logepsilon,2.) + ff*pow(logepsilon,3.) + hh*pow(logepsilon,4.)
426 + jj*pow(logepsilon,5.) ))/100.;
430 Rechazo = deltaP_R1/NormaRC;
434 Rechazo = deltaP_R2/NormaRC;
440 electronTotEnergy = (1. -
epsilon) * photonEnergy;
441 positronTotEnergy = epsilon * photonEnergy;
471 G4double dxEle= std::sin(thetaEle)*std::cos(phi),dyEle= std::sin(thetaEle)*std::sin(phi),dzEle=std::cos(thetaEle);
472 G4double dxPos=-std::sin(thetaPos)*std::cos(phi),dyPos=-std::sin(thetaPos)*std::sin(phi),dzPos=std::cos(thetaPos);
482 electronDirection.rotateUz(photonDirection);
492 positronDirection.rotateUz(photonDirection);
499 fvect->push_back(particle1);
500 fvect->push_back(particle2);
502 if (HardPhotonEnergy > 0.)
506 G4double dxHardP= std::sin(thetaHardPhoton)*std::cos(phi);
507 G4double dyHardP= std::sin(thetaHardPhoton)*std::sin(phi);
508 G4double dzHardP =std::cos(thetaHardPhoton);
510 G4ThreeVector hardPhotonDirection (dxHardP, dyHardP, dzHardP);
511 hardPhotonDirection.rotateUz(photonDirection);
515 fvect->push_back(particle3);
G4double GetKineticEnergy() const
std::vector< ExP01TrackerHit * > a
G4double GetfCoulomb() const
G4ParticleDefinition * GetDefinition() const
static constexpr double twopi
G4GLOB_DLL std::ostream G4cout
const G4ThreeVector & GetMomentumDirection() const
G4double GetlogZ3() const
G4double G4Log(G4double x)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
static G4Positron * Positron()
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4IonisParamElm * GetIonisation() const
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
static G4Electron * Electron()
void SetProposedKineticEnergy(G4double proposedKinEnergy)
static constexpr double MeV
void ProposeTrackStatus(G4TrackStatus status)
double epsilon(double density, double temperature)
const G4Element * SelectRandomAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)