Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4KleinNishinaCompton Class Reference

#include <G4KleinNishinaCompton.hh>

+ Inheritance diagram for G4KleinNishinaCompton:

Public Member Functions

 G4KleinNishinaCompton (const G4ParticleDefinition *p=nullptr, const G4String &nam="Klein-Nishina")
 
 ~G4KleinNishinaCompton () override
 
void Initialise (const G4ParticleDefinition *, const G4DataVector &) override
 
void InitialiseLocal (const G4ParticleDefinition *, G4VEmModel *masterModel) override
 
G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A, G4double cut, G4double emax) override
 
void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
 
G4KleinNishinaComptonoperator= (const G4KleinNishinaCompton &right)=delete
 
 G4KleinNishinaCompton (const G4KleinNishinaCompton &)=delete
 
- Public Member Functions inherited from G4VEmModel
 G4VEmModel (const G4String &nam)
 
virtual ~G4VEmModel ()
 
virtual void InitialiseForMaterial (const G4ParticleDefinition *, const G4Material *)
 
virtual void InitialiseForElement (const G4ParticleDefinition *, G4int Z)
 
virtual G4double ComputeDEDXPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
 
virtual G4double CrossSectionPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
virtual G4double GetPartialCrossSection (const G4Material *, G4int level, const G4ParticleDefinition *, G4double kineticEnergy)
 
virtual G4double ComputeCrossSectionPerShell (const G4ParticleDefinition *, G4int Z, G4int shellIdx, G4double kinEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
virtual G4double ChargeSquareRatio (const G4Track &)
 
virtual G4double GetChargeSquareRatio (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual G4double GetParticleCharge (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual void StartTracking (G4Track *)
 
virtual void CorrectionsAlongStep (const G4MaterialCutsCouple *, const G4DynamicParticle *, const G4double &length, G4double &eloss)
 
virtual G4double Value (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy)
 
virtual G4double MinPrimaryEnergy (const G4Material *, const G4ParticleDefinition *, G4double cut=0.0)
 
virtual G4double MinEnergyCut (const G4ParticleDefinition *, const G4MaterialCutsCouple *)
 
virtual void SetupForMaterial (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual void DefineForRegion (const G4Region *)
 
virtual void FillNumberOfSecondaries (G4int &numberOfTriplets, G4int &numberOfRecoil)
 
virtual void ModelDescription (std::ostream &outFile) const
 
void InitialiseElementSelectors (const G4ParticleDefinition *, const G4DataVector &)
 
std::vector< G4EmElementSelector * > * GetElementSelectors ()
 
void SetElementSelectors (std::vector< G4EmElementSelector * > *)
 
G4double ComputeDEDX (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
 
G4double CrossSection (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4double ComputeMeanFreePath (const G4ParticleDefinition *, G4double kineticEnergy, const G4Material *, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, const G4Element *, G4double kinEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
const G4ElementSelectRandomAtom (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
const G4ElementSelectTargetAtom (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double logKineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
const G4ElementSelectRandomAtom (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
const G4ElementGetCurrentElement (const G4Material *mat=nullptr) const
 
G4int SelectRandomAtomNumber (const G4Material *) const
 
const G4IsotopeGetCurrentIsotope (const G4Element *elm=nullptr) const
 
G4int SelectIsotopeNumber (const G4Element *) const
 
void SetParticleChange (G4VParticleChange *, G4VEmFluctuationModel *f=nullptr)
 
void SetCrossSectionTable (G4PhysicsTable *, G4bool isLocal)
 
G4ElementDataGetElementData ()
 
G4PhysicsTableGetCrossSectionTable ()
 
G4VEmFluctuationModelGetModelOfFluctuations ()
 
G4VEmAngularDistributionGetAngularDistribution ()
 
G4VEmModelGetTripletModel ()
 
void SetTripletModel (G4VEmModel *)
 
void SetAngularDistribution (G4VEmAngularDistribution *)
 
G4double HighEnergyLimit () const
 
G4double LowEnergyLimit () const
 
G4double HighEnergyActivationLimit () const
 
G4double LowEnergyActivationLimit () const
 
G4double PolarAngleLimit () const
 
G4double SecondaryThreshold () const
 
G4bool DeexcitationFlag () const
 
G4bool ForceBuildTableFlag () const
 
G4bool UseAngularGeneratorFlag () const
 
void SetAngularGeneratorFlag (G4bool)
 
void SetHighEnergyLimit (G4double)
 
void SetLowEnergyLimit (G4double)
 
void SetActivationHighEnergyLimit (G4double)
 
void SetActivationLowEnergyLimit (G4double)
 
G4bool IsActive (G4double kinEnergy) const
 
void SetPolarAngleLimit (G4double)
 
void SetSecondaryThreshold (G4double)
 
void SetDeexcitationFlag (G4bool val)
 
void SetForceBuildTable (G4bool val)
 
void SetFluctuationFlag (G4bool val)
 
void SetMasterThread (G4bool val)
 
G4bool IsMaster () const
 
void SetUseBaseMaterials (G4bool val)
 
G4bool UseBaseMaterials () const
 
G4double MaxSecondaryKinEnergy (const G4DynamicParticle *dynParticle)
 
const G4StringGetName () const
 
void SetCurrentCouple (const G4MaterialCutsCouple *)
 
G4bool IsLocked () const
 
void SetLocked (G4bool)
 
void SetLPMFlag (G4bool)
 
G4VEmModeloperator= (const G4VEmModel &right)=delete
 
 G4VEmModel (const G4VEmModel &)=delete
 

Protected Attributes

G4ParticleDefinitiontheGamma
 
G4ParticleDefinitiontheElectron
 
G4ParticleChangeForGammafParticleChange
 
G4double lowestSecondaryEnergy
 
- Protected Attributes inherited from G4VEmModel
G4ElementDatafElementData = nullptr
 
G4VParticleChangepParticleChange = nullptr
 
G4PhysicsTablexSectionTable = nullptr
 
const G4MaterialpBaseMaterial = nullptr
 
const std::vector< G4double > * theDensityFactor = nullptr
 
const std::vector< G4int > * theDensityIdx = nullptr
 
G4double inveplus
 
G4double pFactor = 1.0
 
std::size_t currentCoupleIndex = 0
 
std::size_t basedCoupleIndex = 0
 
G4bool lossFlucFlag = true
 

Additional Inherited Members

- Protected Member Functions inherited from G4VEmModel
G4ParticleChangeForLossGetParticleChangeForLoss ()
 
G4ParticleChangeForGammaGetParticleChangeForGamma ()
 
virtual G4double MaxSecondaryEnergy (const G4ParticleDefinition *, G4double kineticEnergy)
 
const G4MaterialCutsCoupleCurrentCouple () const
 
void SetCurrentElement (const G4Element *)
 

Detailed Description

Definition at line 57 of file G4KleinNishinaCompton.hh.

Constructor & Destructor Documentation

◆ G4KleinNishinaCompton() [1/2]

G4KleinNishinaCompton::G4KleinNishinaCompton ( const G4ParticleDefinition * p = nullptr,
const G4String & nam = "Klein-Nishina" )
explicit

Definition at line 64 of file G4KleinNishinaCompton.cc.

66 : G4VEmModel(nam)
67{
70 lowestSecondaryEnergy = 100.0*eV;
71 fParticleChange = nullptr;
72}
static G4Electron * Electron()
Definition G4Electron.cc:91
static G4Gamma * Gamma()
Definition G4Gamma.cc:81
G4ParticleDefinition * theGamma
G4ParticleChangeForGamma * fParticleChange
G4ParticleDefinition * theElectron
G4VEmModel(const G4String &nam)
Definition G4VEmModel.cc:67

◆ ~G4KleinNishinaCompton()

G4KleinNishinaCompton::~G4KleinNishinaCompton ( )
overridedefault

◆ G4KleinNishinaCompton() [2/2]

G4KleinNishinaCompton::G4KleinNishinaCompton ( const G4KleinNishinaCompton & )
delete

Member Function Documentation

◆ ComputeCrossSectionPerAtom()

G4double G4KleinNishinaCompton::ComputeCrossSectionPerAtom ( const G4ParticleDefinition * ,
G4double kinEnergy,
G4double Z,
G4double A,
G4double cut,
G4double emax )
overridevirtual

Reimplemented from G4VEmModel.

Reimplemented in G4PolarizedComptonModel.

Definition at line 99 of file G4KleinNishinaCompton.cc.

104{
105 G4double xSection = 0.0 ;
106 if (GammaEnergy <= LowEnergyLimit()) { return xSection; }
107
108 static const G4double a = 20.0 , b = 230.0 , c = 440.0;
109
110 static const G4double
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;
117
118 G4double p1Z = Z*(d1 + e1*Z + f1*Z*Z), p2Z = Z*(d2 + e2*Z + f2*Z*Z),
119 p3Z = Z*(d3 + e3*Z + f3*Z*Z), p4Z = Z*(d4 + e4*Z + f4*Z*Z);
120
121 G4double T0 = 15.0*keV;
122 if (Z < 1.5) { T0 = 40.0*keV; }
123
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);
127
128 // modification for low energy. (special case for Hydrogen)
129 if (GammaEnergy < T0) {
130 static const G4double dT0 = keV;
131 X = (T0+dT0) / electron_mass_c2 ;
132 G4double sigma = p1Z*G4Log(1.+2*X)/X
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);
135 G4double c2 = 0.150;
136 if (Z > 1.5) { c2 = 0.375-0.0556*G4Log(Z); }
137 G4double y = G4Log(GammaEnergy/T0);
138 xSection *= G4Exp(-y*(c1+c2*y));
139 }
140 // G4cout<<"e= "<< GammaEnergy<<" Z= "<<Z<<" cross= " << xSection << G4endl;
141 return xSection;
142}
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition G4Exp.hh:180
G4double G4Log(G4double x)
Definition G4Log.hh:227
double G4double
Definition G4Types.hh:83
G4double LowEnergyLimit() const
T max(const T t1, const T t2)
brief Return the largest of the two arguments

Referenced by G4PolarizedComptonModel::ComputeCrossSectionPerAtom().

◆ Initialise()

void G4KleinNishinaCompton::Initialise ( const G4ParticleDefinition * p,
const G4DataVector & cuts )
overridevirtual

Implements G4VEmModel.

Definition at line 80 of file G4KleinNishinaCompton.cc.

82{
83 if(IsMaster()) { InitialiseElementSelectors(p, cuts); }
84 if(nullptr == fParticleChange) {
86 }
87}
G4ParticleChangeForGamma * GetParticleChangeForGamma()
G4bool IsMaster() const
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)

◆ InitialiseLocal()

void G4KleinNishinaCompton::InitialiseLocal ( const G4ParticleDefinition * ,
G4VEmModel * masterModel )
overridevirtual

Reimplemented from G4VEmModel.

Definition at line 91 of file G4KleinNishinaCompton.cc.

93{
95}
void SetElementSelectors(std::vector< G4EmElementSelector * > *)
std::vector< G4EmElementSelector * > * GetElementSelectors()

◆ operator=()

G4KleinNishinaCompton & G4KleinNishinaCompton::operator= ( const G4KleinNishinaCompton & right)
delete

◆ SampleSecondaries()

void G4KleinNishinaCompton::SampleSecondaries ( std::vector< G4DynamicParticle * > * fvect,
const G4MaterialCutsCouple * ,
const G4DynamicParticle * aDynamicGamma,
G4double tmin,
G4double maxEnergy )
overridevirtual

Implements G4VEmModel.

Reimplemented in G4PolarizedComptonModel.

Definition at line 146 of file G4KleinNishinaCompton.cc.

152{
153 // The scattered gamma energy is sampled according to Klein - Nishina formula.
154 // The random number techniques of Butcher & Messel are used
155 // (Nuc Phys 20(1960),15).
156 // Note : Effects due to binding of atomic electrons are negliged.
157
158 G4double gamEnergy0 = aDynamicGamma->GetKineticEnergy();
159
160 // do nothing below the threshold
161 if(gamEnergy0 <= LowEnergyLimit()) { return; }
162
163 G4double E0_m = gamEnergy0 / electron_mass_c2 ;
164
165 G4ThreeVector gamDirection0 = aDynamicGamma->GetMomentumDirection();
166
167 //
168 // sample the energy rate of the scattered gamma
169 //
170
171 G4double epsilon, epsilonsq, onecost, sint2, greject ;
172
173 G4double eps0 = 1./(1. + 2.*E0_m);
174 G4double epsilon0sq = eps0*eps0;
175 G4double alpha1 = - G4Log(eps0);
176 G4double alpha2 = alpha1 + 0.5*(1.- epsilon0sq);
177
178 CLHEP::HepRandomEngine* rndmEngineMod = G4Random::getTheEngine();
179 G4double rndm[3];
180
181 static const G4int nlooplim = 1000;
182 G4int nloop = 0;
183 do {
184 ++nloop;
185 // false interaction if too many iterations
186 if(nloop > nlooplim) { return; }
187
188 // 3 random numbers to sample scattering
189 rndmEngineMod->flatArray(3, rndm);
190
191 if ( alpha1 > alpha2*rndm[0] ) {
192 epsilon = G4Exp(-alpha1*rndm[1]); // eps0**r
193 epsilonsq = epsilon*epsilon;
194
195 } else {
196 epsilonsq = epsilon0sq + (1.- epsilon0sq)*rndm[1];
197 epsilon = sqrt(epsilonsq);
198 };
199
200 onecost = (1.- epsilon)/(epsilon*E0_m);
201 sint2 = onecost*(2.-onecost);
202 greject = 1. - epsilon*sint2/(1.+ epsilonsq);
203
204 // Loop checking, 03-Aug-2015, Vladimir Ivanchenko
205 } while (greject < rndm[2]);
206
207 //
208 // scattered gamma angles. ( Z - axis along the parent gamma)
209 //
210
211 if(sint2 < 0.0) { sint2 = 0.0; }
212 G4double cosTeta = 1. - onecost;
213 G4double sinTeta = sqrt (sint2);
214 G4double Phi = twopi * rndmEngineMod->flat();
215
216 //
217 // update G4VParticleChange for the scattered gamma
218 //
219
220 G4ThreeVector gamDirection1(sinTeta*cos(Phi), sinTeta*sin(Phi), cosTeta);
221 gamDirection1.rotateUz(gamDirection0);
222 G4double gamEnergy1 = epsilon*gamEnergy0;
223 G4double edep = 0.0;
224 if(gamEnergy1 > lowestSecondaryEnergy) {
227 } else {
230 edep = gamEnergy1;
231 }
232
233 //
234 // kinematic of the scattered electron
235 //
236
237 G4double eKinEnergy = gamEnergy0 - gamEnergy1;
238
239 if(eKinEnergy > lowestSecondaryEnergy) {
240 G4ThreeVector eDirection = gamEnergy0*gamDirection0 - gamEnergy1*gamDirection1;
241 eDirection = eDirection.unit();
242
243 // create G4DynamicParticle object for the electron.
244 auto dp = new G4DynamicParticle(theElectron,eDirection,eKinEnergy);
245 fvect->push_back(dp);
246 } else {
247 edep += eKinEnergy;
248 }
249 // energy balance
250 if(edep > 0.0) {
252 }
253}
G4double epsilon(G4double density, G4double temperature)
@ fStopAndKill
int G4int
Definition G4Types.hh:85
const G4double alpha2
Hep3Vector unit() const
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void ProposeMomentumDirection(const G4ThreeVector &Pfinal)
void ProposeTrackStatus(G4TrackStatus status)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)

Member Data Documentation

◆ fParticleChange

G4ParticleChangeForGamma* G4KleinNishinaCompton::fParticleChange
protected

◆ lowestSecondaryEnergy

G4double G4KleinNishinaCompton::lowestSecondaryEnergy
protected

◆ theElectron

G4ParticleDefinition* G4KleinNishinaCompton::theElectron
protected

◆ theGamma

G4ParticleDefinition* G4KleinNishinaCompton::theGamma
protected

Definition at line 93 of file G4KleinNishinaCompton.hh.

Referenced by G4KleinNishinaCompton().


The documentation for this class was generated from the following files: