108 static const G4double a = 20.0 , b = 230.0 , c = 440.0;
111 d1= 2.7965e-1*CLHEP::barn, d2=-1.8300e-1*CLHEP::barn,
112 d3= 6.7527 *CLHEP::barn, d4=-1.9798e+1*CLHEP::barn,
113 e1= 1.9756e-5*CLHEP::barn, e2=-1.0205e-2*CLHEP::barn,
114 e3=-7.3913e-2*CLHEP::barn, e4= 2.7079e-2*CLHEP::barn,
115 f1=-3.9178e-7*CLHEP::barn, f2= 6.8241e-5*CLHEP::barn,
116 f3= 6.0480e-5*CLHEP::barn, f4= 3.0274e-4*CLHEP::barn;
119 p3Z =
Z*(d3 + e3*
Z + f3*
Z*
Z), p4Z =
Z*(d4 + e4*
Z + f4*
Z*
Z);
122 if (
Z < 1.5) { T0 = 40.0*keV; }
124 G4double X = max(GammaEnergy, T0) / electron_mass_c2;
125 xSection = p1Z*
G4Log(1.+2.*X)/X
126 + (p2Z + p3Z*X + p4Z*X*X)/(1. + a*X + b*X*X + c*X*X*X);
129 if (GammaEnergy < T0) {
131 X = (T0+dT0) / electron_mass_c2 ;
133 + (p2Z + p3Z*X + p4Z*X*X)/(1. + a*X + b*X*X + c*X*X*X);
134 G4double c1 = -T0*(sigma-xSection)/(xSection*dT0);
136 if (
Z > 1.5) { c2 = 0.375-0.0556*
G4Log(
Z); }
138 xSection *=
G4Exp(-y*(c1+c2*y));
147 std::vector<G4DynamicParticle*>* fvect,
163 G4double E0_m = gamEnergy0 / electron_mass_c2 ;
181 static const G4int nlooplim = 1000;
186 if(nloop > nlooplim) {
return; }
189 rndmEngineMod->flatArray(3, rndm);
191 if ( alpha1 >
alpha2*rndm[0] ) {
196 epsilonsq = epsilon0sq + (1.- epsilon0sq)*rndm[1];
201 sint2 = onecost*(2.-onecost);
202 greject = 1. -
epsilon*sint2/(1.+ epsilonsq);
205 }
while (greject < rndm[2]);
211 if(sint2 < 0.0) { sint2 = 0.0; }
214 G4double Phi = twopi * rndmEngineMod->flat();
220 G4ThreeVector gamDirection1(sinTeta*cos(Phi), sinTeta*sin(Phi), cosTeta);
221 gamDirection1.
rotateUz(gamDirection0);
237 G4double eKinEnergy = gamEnergy0 - gamEnergy1;
240 G4ThreeVector eDirection = gamEnergy0*gamDirection0 - gamEnergy1*gamDirection1;
241 eDirection = eDirection.
unit();
245 fvect->push_back(dp);
G4double epsilon(G4double density, G4double temperature)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
Hep3Vector & rotateUz(const Hep3Vector &)
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
static G4Electron * Electron()
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
G4double lowestSecondaryEnergy
G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A, G4double cut, G4double emax) override
void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel) override
G4KleinNishinaCompton(const G4ParticleDefinition *p=nullptr, const G4String &nam="Klein-Nishina")
G4ParticleDefinition * theGamma
G4ParticleChangeForGamma * fParticleChange
G4ParticleDefinition * theElectron
void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
~G4KleinNishinaCompton() override
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void ProposeMomentumDirection(const G4ThreeVector &Pfinal)
void SetElementSelectors(std::vector< G4EmElementSelector * > *)
G4ParticleChangeForGamma * GetParticleChangeForGamma()
G4double LowEnergyLimit() const
std::vector< G4EmElementSelector * > * GetElementSelectors()
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)
void ProposeTrackStatus(G4TrackStatus status)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)