76 fProbabilities.resize(9,0.0);
79 fAtomDeexcitation =
nullptr;
117 static const G4double a = 20.0 , b = 230.0 , c = 440.0;
120 d1= 2.7965e-1*CLHEP::barn, d2=-1.8300e-1*CLHEP::barn,
121 d3= 6.7527 *CLHEP::barn, d4=-1.9798e+1*CLHEP::barn,
122 e1= 1.9756e-5*CLHEP::barn, e2=-1.0205e-2*CLHEP::barn,
123 e3=-7.3913e-2*CLHEP::barn, e4= 2.7079e-2*CLHEP::barn,
124 f1=-3.9178e-7*CLHEP::barn, f2= 6.8241e-5*CLHEP::barn,
125 f3= 6.0480e-5*CLHEP::barn, f4= 3.0274e-4*CLHEP::barn;
127 G4double p1Z = Z*(d1 + e1*Z + f1*Z*Z), p2Z = Z*(d2 + e2*Z + f2*Z*Z),
128 p3Z = Z*(d3 + e3*Z + f3*Z*Z), p4Z = Z*(d4 + e4*Z + f4*Z*Z);
131 if (Z < 1.5) { T0 = 40.0*keV; }
133 G4double X = max(gammaEnergy, T0) / electron_mass_c2;
134 xSection = p1Z*
G4Log(1.+2.*X)/X
135 + (p2Z + p3Z*X + p4Z*X*X)/(1. + a*X + b*X*X + c*X*X*X);
139 if (gammaEnergy < T0) {
140 X = (T0+dT0) / electron_mass_c2 ;
142 + (p2Z + p3Z*X + p4Z*X*X)/(1. + a*X + b*X*X + c*X*X*X);
143 G4double c1 = -T0*(sigma-xSection)/(xSection*dT0);
145 if (Z > 1.5) { c2 = 0.375-0.0556*
G4Log(Z); }
147 xSection *=
G4Exp(-y*(c1+c2*y));
150 if(xSection < 0.0) { xSection = 0.0; }
159 std::vector<G4DynamicParticle*>* fvect,
178 if(nShells > (
G4int)fProbabilities.size()) { fProbabilities.resize(nShells); }
181 for(i=0; i<nShells; ++i) {
185 fProbabilities[i] = totprob;
189 static const G4int nlooplim = 1000;
192 G4double bindingEnergy, ePotEnergy, eKinEnergy;
206 for(i=0; i<nShells; ++i) {
if(xprob <= fProbabilities[i]) {
break; } }
209 lv1.
set(0.0,0.0,energy,energy);
217 eKinEnergy = bindingEnergy*x;
218 ePotEnergy = bindingEnergy*(1.0 + x);
221 G4double eTotMomentum = sqrt(eKinEnergy*(eKinEnergy + 2*electron_mass_c2));
224 G4double sintet = sqrt((1 - costet)*(1 + costet));
225 lv2.
set(eTotMomentum*sintet*cos(phi),eTotMomentum*sintet*sin(phi),
226 eTotMomentum*costet,eKinEnergy + electron_mass_c2);
230 gamEnergy0 = lv1.
e();
236 G4double E0_m = gamEnergy0/electron_mass_c2;
253 if(nloop > nlooplim) {
return; }
258 if ( alpha1 >
alpha2*rndm[0] ) {
263 epsilonsq = epsilon0sq + (1.- epsilon0sq)*rndm[1];
268 sint2 = onecost*(2.-onecost);
269 greject = 1. -
epsilon*sint2/(1.+ epsilonsq);
272 }
while (greject < rndm[2]);
273 gamEnergy1 =
epsilon*gamEnergy0;
276 lv2.
set(0.0,0.0,0.0,electron_mass_c2);
282 if(sint2 < 0.0) { sint2 = 0.0; }
283 costet = 1. - onecost;
284 sintet = sqrt(sint2);
285 phi = twopi * rndmEngineMod->
flat();
293 lv1.
set(gamEnergy1*v.
x(),gamEnergy1*v.
y(),gamEnergy1*v.
z(),gamEnergy1);
298 eKinEnergy = lv2.
e() - electron_mass_c2 - ePotEnergy;
302 }
while ( eKinEnergy < 0.0 );
309 gamEnergy1 = lv1.
e();
328 fvect->push_back(dp);
329 }
else { eKinEnergy = 0.0; }
331 G4double edep = energy - gamEnergy1 - eKinEnergy;
336 if(
nullptr != fAtomDeexcitation) {
346 for (
G4int j=nbefore; j<nafter; ++j) {
347 G4double e = ((*fvect)[j])->GetKineticEnergy();
348 if(esec + e > edep) {
351 ((*fvect)[j])->SetKineticEnergy(e);
364 for (
G4int jj=nafter-1; jj>j; --jj) {
375 if(std::abs(energy - gamEnergy1 - eKinEnergy - esec - edep) > eV) {
376 G4cout <<
"### G4KleinNishinaModel dE(eV)= "
377 << (energy - gamEnergy1 - eKinEnergy - esec - edep)/eV
379 <<
" E(keV)= " << energy/keV
380 <<
" Ebind(keV)= " << bindingEnergy/keV
381 <<
" Eg(keV)= " << gamEnergy1/keV
382 <<
" Ee(keV)= " << eKinEnergy/keV
383 <<
" Esec(keV)= " << esec/keV
384 <<
" Edep(keV)= " << edep/keV
G4double epsilon(G4double density, G4double temperature)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
Hep3Vector & rotateUz(const Hep3Vector &)
Hep3Vector boostVector() const
HepLorentzVector & boost(double, double, double)
void set(double x, double y, double z, double t)
virtual void flatArray(const int size, double *vect)=0
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
static G4Electron * Electron()
G4int GetNbOfAtomicShells() const
G4int GetNbOfShellElectrons(G4int index) const
G4double GetAtomicShell(G4int index) const
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
G4ParticleDefinition * theElectron
G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A, G4double cut, G4double emax) override
~G4KleinNishinaModel() override
void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel) override
G4KleinNishinaModel(const G4String &nam="KleinNishina")
G4double lowestSecondaryEnergy
void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
G4ParticleChangeForGamma * fParticleChange
G4ParticleDefinition * theGamma
static G4LossTableManager * Instance()
G4VAtomDeexcitation * AtomDeexcitation()
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void ProposeMomentumDirection(const G4ThreeVector &Pfinal)
G4bool CheckDeexcitationActiveRegion(G4int coupleIndex)
virtual const G4AtomicShell * GetAtomicShell(G4int Z, G4AtomicShellEnumerator shell)=0
void GenerateParticles(std::vector< G4DynamicParticle * > *secVect, const G4AtomicShell *, G4int Z, G4int coupleIndex)
void SetElementSelectors(std::vector< G4EmElementSelector * > *)
G4ParticleChangeForGamma * GetParticleChangeForGamma()
G4double LowEnergyLimit() const
std::vector< G4EmElementSelector * > * GetElementSelectors()
const G4Element * SelectRandomAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
void SetDeexcitationFlag(G4bool val)
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)
void ProposeTrackStatus(G4TrackStatus status)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)