117 static const G4double a = 20.0 , b = 230.0 , c = 440.0;
120 p3Z = Z*(
d3 +
e3*Z +
f3*Z*Z), p4Z = Z*(
d4 +
e4*Z +
f4*Z*Z);
123 if (Z < 1.5) { T0 = 40.0*
keV; }
125 G4double X =
max(GammaEnergy, T0) / electron_mass_c2;
126 xSection = p1Z*
G4Log(1.+2.*X)/X
127 + (p2Z + p3Z*X + p4Z*X*X)/(1. + a*X + b*X*X + c*X*X*X);
130 if (GammaEnergy < T0) {
132 X = (T0+
dT0) / electron_mass_c2 ;
134 + (p2Z + p3Z*X + p4Z*X*X)/(1. + a*X + b*X*X + c*X*X*X);
135 G4double c1 = -T0*(sigma-xSection)/(xSection*dT0);
137 if (Z > 1.5) { c2 = 0.375-0.0556*
G4Log(Z); }
139 xSection *=
G4Exp(-y*(c1+c2*y));
148 std::vector<G4DynamicParticle*>* fvect,
164 G4double E0_m = gamEnergy0 / electron_mass_c2 ;
172 G4double epsilon, epsilonsq, onecost, sint2, greject ;
177 G4double alpha2 = 0.5*(1.- epsilon0sq);
189 epsilonsq = epsilon*epsilon;
192 epsilonsq = epsilon0sq + (1.- epsilon0sq)*
rndmEngineMod->flat();
193 epsilon = sqrt(epsilonsq);
196 onecost = (1.- epsilon)/(epsilon*E0_m);
197 sint2 = onecost*(2.-onecost);
198 greject = 1. - epsilon*sint2/(1.+ epsilonsq);
200 }
while (greject < rndmEngineMod->
flat());
206 if(sint2 < 0.0) { sint2 = 0.0; }
215 G4ThreeVector gamDirection1(sinTeta*cos(Phi), sinTeta*sin(Phi), cosTeta);
216 gamDirection1.rotateUz(gamDirection0);
217 G4double gamEnergy1 = epsilon*gamEnergy0;
232 G4double eKinEnergy = gamEnergy0 - gamEnergy1;
235 G4ThreeVector eDirection = gamEnergy0*gamDirection0 - gamEnergy1*gamDirection1;
236 eDirection = eDirection.unit();
240 fvect->push_back(dp);
static c2_factory< G4double > c2
G4double LowEnergyLimit() const
G4ParticleChangeForGamma * fParticleChange
G4KleinNishinaCompton(const G4ParticleDefinition *p=0, const G4String &nam="Klein-Nishina")
G4double GetKineticEnergy() const
CLHEP::Hep3Vector G4ThreeVector
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)
static const G4int nlooplim
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A, G4double cut, G4double emax)
CLHEP::HepRandomEngine * rndmEngineMod
const G4ThreeVector & GetMomentumDirection() const
G4double lowestSecondaryEnergy
std::vector< G4EmElementSelector * > * GetElementSelectors()
G4double G4Log(G4double x)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
void SetElementSelectors(std::vector< G4EmElementSelector * > *)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
static G4Electron * Electron()
void SetProposedKineticEnergy(G4double proposedKinEnergy)
G4ParticleDefinition * theElectron
void ProposeTrackStatus(G4TrackStatus status)
virtual ~G4KleinNishinaCompton()
virtual void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel)
G4ParticleDefinition * theGamma
static const G4double dT0
G4ParticleChangeForGamma * GetParticleChangeForGamma()
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)