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

#include <G4PairProductionRelModel.hh>

+ Inheritance diagram for G4PairProductionRelModel:

Public Member Functions

 G4PairProductionRelModel (const G4ParticleDefinition *p=nullptr, const G4String &nam="BetheHeitlerLPM")
 
 ~G4PairProductionRelModel () 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=0., G4double cut=0., G4double emax=DBL_MAX) override
 
void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
 
void SetupForMaterial (const G4ParticleDefinition *, const G4Material *, G4double) override
 
void SetLPMflag (G4bool val)
 
G4bool LPMflag () const
 
G4PairProductionRelModeloperator= (const G4PairProductionRelModel &right)=delete
 
 G4PairProductionRelModel (const G4PairProductionRelModel &)=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 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 Member Functions

void ComputePhi12 (const G4double delta, G4double &phi1, G4double &phi2)
 
G4double ScreenFunction1 (const G4double delta)
 
G4double ScreenFunction2 (const G4double delta)
 
void ScreenFunction12 (const G4double delta, G4double &f1, G4double &f2)
 
G4double ComputeParametrizedXSectionPerAtom (G4double gammaEnergy, G4double Z)
 
G4double ComputeXSectionPerAtom (G4double gammaEnergy, G4double Z)
 
G4double ComputeDXSectionPerAtom (G4double eplusEnergy, G4double gammaEnergy, G4double Z)
 
G4double ComputeRelDXSectionPerAtom (G4double eplusEnergy, G4double gammaEnergy, G4double Z)
 
- Protected Member Functions inherited from G4VEmModel
G4ParticleChangeForLossGetParticleChangeForLoss ()
 
G4ParticleChangeForGammaGetParticleChangeForGamma ()
 
virtual G4double MaxSecondaryEnergy (const G4ParticleDefinition *, G4double kineticEnergy)
 
const G4MaterialCutsCoupleCurrentCouple () const
 
void SetCurrentElement (const G4Element *)
 

Protected Attributes

G4bool isFirstInstance {false}
 
G4bool fIsUseLPMCorrection
 
G4bool fIsUseCompleteScreening
 
G4double fLPMEnergy
 
G4double fParametrizedXSectionThreshold
 
G4double fCoulombCorrectionThreshold
 
G4PowfG4Calc
 
G4ParticleDefinitionfTheGamma
 
G4ParticleDefinitionfTheElectron
 
G4ParticleDefinitionfThePositron
 
G4ParticleChangeForGammafParticleChange
 
- 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
 

Static Protected Attributes

static const G4int gMaxZet = 120
 
static const G4double gLPMconstant
 
static const G4double gXGL [8]
 
static const G4double gWGL [8]
 
static const G4double gFelLowZet [8]
 
static const G4double gFinelLowZet [8]
 
static const G4double gXSecFactor
 
static const G4double gEgLPMActivation = 100.*CLHEP::GeV
 
static std::vector< ElementData * > gElementData
 
static LPMFuncs gLPMFuncs
 

Detailed Description

Definition at line 65 of file G4PairProductionRelModel.hh.

Constructor & Destructor Documentation

◆ G4PairProductionRelModel() [1/2]

G4PairProductionRelModel::G4PairProductionRelModel ( const G4ParticleDefinition * p = nullptr,
const G4String & nam = "BetheHeitlerLPM" )
explicit

Definition at line 120 of file G4PairProductionRelModel.cc.

125 fParticleChange(nullptr)
126{
127 // gamma energy below which the parametrized atomic x-section is used (30 GeV)
128 fParametrizedXSectionThreshold = 30.0*CLHEP::GeV;
129 // gamma energy below the Coulomb correction is turned off (50 MeV)
130 fCoulombCorrectionThreshold = 50.0*CLHEP::MeV;
131 // set angular generator used in the final state kinematics computation
133}
static G4Electron * Electron()
Definition G4Electron.cc:91
static G4Gamma * Gamma()
Definition G4Gamma.cc:81
G4ParticleDefinition * fThePositron
G4ParticleChangeForGamma * fParticleChange
G4ParticleDefinition * fTheElectron
static G4Positron * Positron()
Definition G4Positron.cc:90
static G4Pow * GetInstance()
Definition G4Pow.cc:41
G4VEmModel(const G4String &nam)
Definition G4VEmModel.cc:67
void SetAngularDistribution(G4VEmAngularDistribution *)

◆ ~G4PairProductionRelModel()

G4PairProductionRelModel::~G4PairProductionRelModel ( )
override

Definition at line 136 of file G4PairProductionRelModel.cc.

137{
138 if (isFirstInstance) {
139 // clear ElementData container
140 for (auto const & ptr : gElementData) { delete ptr; }
141 gElementData.clear();
142 // clear LPMFunctions (if any)
144 gLPMFuncs.fLPMFuncG.clear();
145 gLPMFuncs.fLPMFuncPhi.clear();
146 gLPMFuncs.fIsInitialized = false;
147 }
148 }
149}
static std::vector< ElementData * > gElementData

◆ G4PairProductionRelModel() [2/2]

G4PairProductionRelModel::G4PairProductionRelModel ( const G4PairProductionRelModel & )
delete

Member Function Documentation

◆ ComputeCrossSectionPerAtom()

G4double G4PairProductionRelModel::ComputeCrossSectionPerAtom ( const G4ParticleDefinition * ,
G4double kinEnergy,
G4double Z,
G4double A = 0.,
G4double cut = 0.,
G4double emax = DBL_MAX )
overridevirtual

Reimplemented from G4VEmModel.

Definition at line 320 of file G4PairProductionRelModel.cc.

322{
323 G4double crossSection = 0.0 ;
324 // check kinematical limit
325 if ( gammaEnergy <= 2.0*electron_mass_c2 ) { return crossSection; }
326 // compute the atomic cross section either by using x-section parametrization
327 // or by numerically integrationg the DCS (with or without LPM)
328 if ( gammaEnergy < fParametrizedXSectionThreshold) {
329 // using the parametrized cross sections (max up to 80 GeV)
330 crossSection = ComputeParametrizedXSectionPerAtom(gammaEnergy, Z);
331 } else {
332 // by numerical integration of the DCS:
333 // Computes the cross section with or without LPM suppression depending on
334 // settings (by default with if the gamma energy is above a given threshold)
335 // and using or not using complete sreening approximation (by default not).
336 // Only the dependent part is computed in the numerical integration of the DCS
337 // i.e. the result must be multiplied here with 4 \alpha r_0^2 Z(Z+\eta(Z))
338 crossSection = ComputeXSectionPerAtom(gammaEnergy, Z);
339 // apply the constant factors:
340 // - eta(Z) is a correction to account interaction in the field of e-
341 // - gXSecFactor = 4 \alpha r_0^2
342 const G4int iz = std::min(gMaxZet, G4lrint(Z));
343 const G4double eta = gElementData[iz]->fEtaValue;
344 crossSection *= gXSecFactor*Z*(Z+eta);
345 }
346 // final protection
347 return std::max(crossSection, 0.);
348}
double G4double
Definition G4Types.hh:83
int G4int
Definition G4Types.hh:85
G4double ComputeParametrizedXSectionPerAtom(G4double gammaEnergy, G4double Z)
G4double ComputeXSectionPerAtom(G4double gammaEnergy, G4double Z)
int G4lrint(double ad)
Definition templates.hh:134

◆ ComputeDXSectionPerAtom()

G4double G4PairProductionRelModel::ComputeDXSectionPerAtom ( G4double eplusEnergy,
G4double gammaEnergy,
G4double Z )
protected

Definition at line 237 of file G4PairProductionRelModel.cc.

240{
241 G4double xSection = 0.;
242 const G4int iz = std::min(gMaxZet, G4lrint(Z));
243 const G4double eps = pEnergy/gammaEnergy;
244 const G4double epsm = 1.-eps;
245 const G4double dum = eps*epsm;
247 // complete screening:
248 const G4double Lel = gElementData[iz]->fLradEl;
249 const G4double fc = gElementData[iz]->fCoulomb;
250 xSection = (eps*eps + epsm*epsm + 2.*dum/3.)*(Lel-fc) - dum/9.;
251 } else {
252 // normal case:
253 const G4double eps0 = CLHEP::electron_mass_c2/gammaEnergy;
254 const G4double fc = gElementData[iz]->fCoulomb;
255 const G4double lnZ13 = gElementData[iz]->fLogZ13;
256 const G4double delta = gElementData[iz]->fDeltaFactor*eps0/dum;
257 G4double phi1, phi2;
258 ComputePhi12(delta, phi1, phi2);
259 xSection = (eps*eps + epsm*epsm)*(0.25*phi1-lnZ13-fc)
260 + 2.*dum*(0.25*phi2-lnZ13-fc)/3.;
261 }
262 // non-const. part of the DCS differential in total energy transfer not in eps
263 // ds/dEt=ds/deps deps/dEt with deps/dEt=1/Eg
264 return std::max(xSection, 0.0)/gammaEnergy;
265}
void ComputePhi12(const G4double delta, G4double &phi1, G4double &phi2)

Referenced by ComputeXSectionPerAtom().

◆ ComputeParametrizedXSectionPerAtom()

G4double G4PairProductionRelModel::ComputeParametrizedXSectionPerAtom ( G4double gammaEnergy,
G4double Z )
protected

Definition at line 657 of file G4PairProductionRelModel.cc.

659{
660 G4double xSection = 0.0 ;
661 // short versions
662 static const G4double kMC2 = CLHEP::electron_mass_c2;
663 // zero cross section below the kinematical limit: Eg<2mc^2
664 if (Z < 0.9 || gammaE <= 2.0*kMC2) { return xSection; }
665 //
666 static const G4double gammaEnergyLimit = 1.5*CLHEP::MeV;
667 // set coefficients a, b c
668 static const G4double a0 = 8.7842e+2*CLHEP::microbarn;
669 static const G4double a1 = -1.9625e+3*CLHEP::microbarn;
670 static const G4double a2 = 1.2949e+3*CLHEP::microbarn;
671 static const G4double a3 = -2.0028e+2*CLHEP::microbarn;
672 static const G4double a4 = 1.2575e+1*CLHEP::microbarn;
673 static const G4double a5 = -2.8333e-1*CLHEP::microbarn;
674
675 static const G4double b0 = -1.0342e+1*CLHEP::microbarn;
676 static const G4double b1 = 1.7692e+1*CLHEP::microbarn;
677 static const G4double b2 = -8.2381 *CLHEP::microbarn;
678 static const G4double b3 = 1.3063 *CLHEP::microbarn;
679 static const G4double b4 = -9.0815e-2*CLHEP::microbarn;
680 static const G4double b5 = 2.3586e-3*CLHEP::microbarn;
681
682 static const G4double c0 = -4.5263e+2*CLHEP::microbarn;
683 static const G4double c1 = 1.1161e+3*CLHEP::microbarn;
684 static const G4double c2 = -8.6749e+2*CLHEP::microbarn;
685 static const G4double c3 = 2.1773e+2*CLHEP::microbarn;
686 static const G4double c4 = -2.0467e+1*CLHEP::microbarn;
687 static const G4double c5 = 6.5372e-1*CLHEP::microbarn;
688 // check low energy limit of the approximation (1.5 MeV)
689 G4double gammaEnergyOrg = gammaE;
690 if (gammaE < gammaEnergyLimit) { gammaE = gammaEnergyLimit; }
691 // compute gamma energy variables
692 const G4double x = G4Log(gammaE/kMC2);
693 const G4double x2 = x *x;
694 const G4double x3 = x2*x;
695 const G4double x4 = x3*x;
696 const G4double x5 = x4*x;
697 //
698 const G4double F1 = a0 + a1*x + a2*x2 + a3*x3 + a4*x4 + a5*x5;
699 const G4double F2 = b0 + b1*x + b2*x2 + b3*x3 + b4*x4 + b5*x5;
700 const G4double F3 = c0 + c1*x + c2*x2 + c3*x3 + c4*x4 + c5*x5;
701 // compute the approximated cross section
702 xSection = (Z + 1.)*(F1*Z + F2*Z*Z + F3);
703 // check if we are below the limit of the approximation and apply correction
704 if (gammaEnergyOrg < gammaEnergyLimit) {
705 const G4double dum = (gammaEnergyOrg-2.*kMC2)/(gammaEnergyLimit-2.*kMC2);
706 xSection *= dum*dum;
707 }
708 return xSection;
709}
const G4double a0
G4double G4Log(G4double x)
Definition G4Log.hh:227

Referenced by ComputeCrossSectionPerAtom().

◆ ComputePhi12()

void G4PairProductionRelModel::ComputePhi12 ( const G4double delta,
G4double & phi1,
G4double & phi2 )
inlineprotected

Definition at line 201 of file G4PairProductionRelModel.hh.

204{
205 if (delta > 1.4) {
206 phi1 = 21.0190 - 4.145*G4Log(delta + 0.958);
207 phi2 = phi1;
208 } else {
209 phi1 = 20.806 - delta*(3.190 - 0.5710*delta);
210 phi2 = 20.234 - delta*(2.126 - 0.0903*delta);
211 }
212}

Referenced by ComputeDXSectionPerAtom(), ComputeRelDXSectionPerAtom(), and SampleSecondaries().

◆ ComputeRelDXSectionPerAtom()

G4double G4PairProductionRelModel::ComputeRelDXSectionPerAtom ( G4double eplusEnergy,
G4double gammaEnergy,
G4double Z )
protected

Definition at line 286 of file G4PairProductionRelModel.cc.

289{
290 G4double xSection = 0.;
291 const G4int iz = std::min(gMaxZet, G4lrint(Z));
292 const G4double eps = pEnergy/gammaEnergy;
293 const G4double epsm = 1.-eps;
294 const G4double dum = eps*epsm;
295 // evaluate LPM suppression functions
296 G4double fXiS, fGS, fPhiS;
297 ComputeLPMfunctions(fXiS, fGS, fPhiS, eps, gammaEnergy, iz);
299 // complete screening:
300 const G4double Lel = gElementData[iz]->fLradEl;
301 const G4double fc = gElementData[iz]->fCoulomb;
302 xSection = (Lel-fc)*((eps*eps+epsm*epsm)*2.*fPhiS + fGS)/3. - dum*fGS/9.;
303 } else {
304 // normal case:
305 const G4double eps0 = CLHEP::electron_mass_c2/gammaEnergy;
306 const G4double fc = gElementData[iz]->fCoulomb;
307 const G4double lnZ13 = gElementData[iz]->fLogZ13;
308 const G4double delta = gElementData[iz]->fDeltaFactor*eps0/dum;
309 G4double phi1, phi2;
310 ComputePhi12(delta, phi1, phi2);
311 xSection = (eps*eps + epsm*epsm)*(2.*fPhiS+fGS)*(0.25*phi1-lnZ13-fc)/3.
312 + 2.*dum*fGS*(0.25*phi2-lnZ13-fc)/3.;
313 }
314 // non-const. part of the DCS differential in total energy transfer not in eps
315 // ds/dEt=ds/deps deps/dEt with deps/dEt=1/Eg
316 return std::max(fXiS*xSection, 0.0)/gammaEnergy;
317}

Referenced by ComputeXSectionPerAtom().

◆ ComputeXSectionPerAtom()

G4double G4PairProductionRelModel::ComputeXSectionPerAtom ( G4double gammaEnergy,
G4double Z )
protected

Definition at line 182 of file G4PairProductionRelModel.cc.

184{
185 G4double xSection = 0.0;
186 // check if LPM suppression needs to be used
187 const G4bool isLPM = (fIsUseLPMCorrection && gammaEnergy>gEgLPMActivation);
188 // determine the kinematical limits (taken into account the correction due to
189 // the way in which the Coulomb correction is applied i.e. avoid negative DCS)
190 const G4int iz = std::min(gMaxZet, G4lrint(Z));
191 const G4double eps0 = CLHEP::electron_mass_c2/gammaEnergy;
192 // Coulomb correction is always included in the DCS even below 50 MeV (note:
193 // that this DCS is only used to get the integrated x-section)
194 const G4double dmax = gElementData[iz]->fDeltaMaxHigh;
195 const G4double dmin = 4.*eps0*gElementData[iz]->fDeltaFactor;
196 const G4double eps1 = 0.5 - 0.5*std::sqrt(1.-dmin/dmax);
197 const G4double epsMin = std::max(eps0, eps1);
198 const G4double epsMax = 0.5; // DCS is symmetric around eps=0.5
199 // let Et be the total energy transferred to the e- or to the e+
200 // the [Et-min, Et-max] interval will be divided into i=1,2,..,n subintervals
201 // with width of dInterv = (Et-max - Et-min)/n and numerical integration will
202 // be done in each sub-inteval using the xi = (Et - Et_i-min)/dInterv variable
203 // that is in [0,1]. The 8-point GL q. is used for the integration on [0,1].
204 const G4int numSub = 2;
205 const G4double dInterv= (epsMax - epsMin)*gammaEnergy/G4double(numSub);
206 G4double minEti = epsMin*gammaEnergy; // Et-min i.e. Et_0-min
207 for (G4int i = 0; i < numSub; ++i) {
208 for (G4int ngl = 0; ngl < 8; ++ngl) {
209 const G4double Et = (minEti + gXGL[ngl]*dInterv);
210 const G4double xs = isLPM ? ComputeRelDXSectionPerAtom(Et, gammaEnergy, Z)
211 : ComputeDXSectionPerAtom(Et, gammaEnergy, Z);
212 xSection += gWGL[ngl]*xs;
213 }
214 // update minimum Et of the sub-inteval
215 minEti += dInterv;
216 }
217 // apply corrections of variable transformation and half interval integration
218 xSection = std::max(2.*xSection*dInterv, 0.);
219 return xSection;
220}
bool G4bool
Definition G4Types.hh:86
G4double ComputeRelDXSectionPerAtom(G4double eplusEnergy, G4double gammaEnergy, G4double Z)
static const G4double gEgLPMActivation
static const G4double gXGL[8]
G4double ComputeDXSectionPerAtom(G4double eplusEnergy, G4double gammaEnergy, G4double Z)
static const G4double gWGL[8]

Referenced by ComputeCrossSectionPerAtom().

◆ Initialise()

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

Implements G4VEmModel.

Definition at line 151 of file G4PairProductionRelModel.cc.

153{
155
156 if (isFirstInstance || gElementData.empty()) {
157 // init element data and LPM funcs
158 G4AutoLock l(&thePairProdRelMutex);
159 if (gElementData.empty()) {
160 isFirstInstance = true;
161 gElementData.resize(gMaxZet+1, nullptr);
162 }
163 // static data should be initialised only in the one instance
164 InitialiseElementData();
166 InitLPMFunctions();
167 }
168 l.unlock();
169 }
170 // element selectors should be initialised in the master thread
171 if (IsMaster()) {
173 }
174}
G4ParticleChangeForGamma * GetParticleChangeForGamma()
G4bool IsMaster() const
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)

Referenced by G4BetheHeitler5DModel::Initialise(), and G4LivermoreGammaConversionModel::Initialise().

◆ InitialiseLocal()

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

Reimplemented from G4VEmModel.

Definition at line 176 of file G4PairProductionRelModel.cc.

178{
180}
void SetElementSelectors(std::vector< G4EmElementSelector * > *)
std::vector< G4EmElementSelector * > * GetElementSelectors()

◆ LPMflag()

G4bool G4PairProductionRelModel::LPMflag ( ) const
inline

Definition at line 97 of file G4PairProductionRelModel.hh.

97{ return fIsUseLPMCorrection; }

◆ operator=()

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

◆ SampleSecondaries()

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

Implements G4VEmModel.

Definition at line 357 of file G4PairProductionRelModel.cc.

374{
375 const G4Material* mat = couple->GetMaterial();
376 const G4double gammaEnergy = aDynamicGamma->GetKineticEnergy();
377 const G4double eps0 = CLHEP::electron_mass_c2/gammaEnergy ;
378 //
379 // check kinematical limit: gamma energy(Eg) must be at least 2 e- rest mass
380 // (but the model should be used at higher energies above 100 MeV)
381 if (eps0 > 0.5) { return; }
382 //
383 // select target atom of the material
384 const G4Element* anElement = SelectTargetAtom(couple, fTheGamma, gammaEnergy,
385 aDynamicGamma->GetLogKineticEnergy());
386 CLHEP::HepRandomEngine* rndmEngine = G4Random::getTheEngine();
387 //
388 // 'eps' is the total energy transferred to one of the e-/e+ pair in initial
389 // gamma energy units Eg. Since the corresponding DCS is symmetric on eps=0.5,
390 // the kinematical limits for eps0=mc^2/Eg <= eps <= 0.5
391 // 1. 'eps' is sampled uniformly on the [eps0, 0.5] inteval if Eg<Egsmall
392 // 2. otherwise, on the [eps_min, 0.5] interval according to the DCS (case 2.)
393 G4double eps;
394 // case 1.
395 static const G4double Egsmall = 2.*CLHEP::MeV;
396 if (gammaEnergy < Egsmall) {
397 eps = eps0 + (0.5-eps0)*rndmEngine->flat();
398 } else {
399 // case 2.
400 // get the Coulomb factor for the target element (Z) and gamma energy (Eg)
401 // F(Z) = 8*ln(Z)/3 if Eg <= 50 [MeV] => no Coulomb correction
402 // F(Z) = 8*ln(Z)/3 + 8*fc(Z) if Eg > 50 [MeV] => fc(Z) is the Coulomb cor.
403 //
404 // The screening variable 'delta(eps)' = 136*Z^{-1/3}*eps0/[eps(1-eps)]
405 // Due to the Coulomb correction, the DCS can go below zero even at
406 // kinematicaly allowed eps > eps0 values. In order to exclude this eps
407 // range with negative DCS, the minimum eps value will be set to eps_min =
408 // max[eps0, epsp] with epsp is the solution of SF(delta(epsp)) - F(Z)/2 = 0
409 // with SF being the screening function (SF1=SF2 at high value of delta).
410 // The solution is epsp = 0.5 - 0.5*sqrt[ 1 - 4*136*Z^{-1/3}eps0/deltap]
411 // with deltap = Exp[(42.038-F(Z))/8.29]-0.958. So the limits are:
412 // - when eps=eps_max = 0.5 => delta_min = 136*Z^{-1/3}*eps0/4
413 // - epsp = 0.5 - 0.5*sqrt[ 1 - delta_min/deltap]
414 // - and eps_min = max[eps0, epsp]
415 const G4int iZet = std::min(gMaxZet, anElement->GetZasInt());
416 const G4double deltaFactor = gElementData[iZet]->fDeltaFactor*eps0;
417 const G4double deltaMin = 4.*deltaFactor;
418 G4double deltaMax = gElementData[iZet]->fDeltaMaxLow;
419 G4double FZ = 8.*gElementData[iZet]->fLogZ13;
420 if ( gammaEnergy > fCoulombCorrectionThreshold ) { // Eg > 50 MeV ?
421 FZ += 8.*gElementData[iZet]->fCoulomb;
422 deltaMax = gElementData[iZet]->fDeltaMaxHigh;
423 }
424 // compute the limits of eps
425 const G4double epsp = 0.5 - 0.5*std::sqrt(1. - deltaMin/deltaMax) ;
426 const G4double epsMin = std::max(eps0,epsp);
427 const G4double epsRange = 0.5 - epsMin;
428 //
429 // sample the energy rate (eps) of the created electron (or positron)
431 ScreenFunction12(deltaMin, F10, F20);
432 F10 -= FZ;
433 F20 -= FZ;
434 const G4double NormF1 = std::max(F10 * epsRange * epsRange, 0.);
435 const G4double NormF2 = std::max(1.5 * F20 , 0.);
436 const G4double NormCond = NormF1/(NormF1 + NormF2);
437 // check if LPM correction is active
438 const G4bool isLPM = (fIsUseLPMCorrection && gammaEnergy>gEgLPMActivation);
440 // we will need 3 uniform random number for each trial of sampling
441 G4double rndmv[3];
442 G4double greject = 0.;
443 do {
444 rndmEngine->flatArray(3, rndmv);
445 if (NormCond > rndmv[0]) {
446 eps = 0.5 - epsRange * fG4Calc->A13(rndmv[1]);
447 const G4double delta = deltaFactor/(eps*(1.-eps));
448 if (isLPM) {
449 G4double lpmXiS, lpmGS, lpmPhiS, phi1, phi2;
450 ComputePhi12(delta, phi1, phi2);
451 ComputeLPMfunctions(lpmXiS, lpmGS, lpmPhiS, eps, gammaEnergy, iZet);
452 greject = lpmXiS*((2.*lpmPhiS+lpmGS)*phi1-lpmGS*phi2-lpmPhiS*FZ)/F10;
453 } else {
454 greject = (ScreenFunction1(delta)-FZ)/F10;
455 }
456 } else {
457 eps = epsMin + epsRange*rndmv[1];
458 const G4double delta = deltaFactor/(eps*(1.-eps));
459 if (isLPM) {
460 G4double lpmXiS, lpmGS, lpmPhiS, phi1, phi2;
461 ComputePhi12(delta, phi1, phi2);
462 ComputeLPMfunctions(lpmXiS, lpmGS, lpmPhiS, eps, gammaEnergy, iZet);
463 greject = lpmXiS*( (lpmPhiS+0.5*lpmGS)*phi1 + 0.5*lpmGS*phi2
464 -0.5*(lpmGS+lpmPhiS)*FZ )/F20;
465 } else {
466 greject = (ScreenFunction2(delta)-FZ)/F20;
467 }
468 }
469 // Loop checking, 03-Aug-2015, Vladimir Ivanchenko
470 } while (greject < rndmv[2]);
471 // end of eps sampling
472 }
473 //
474 // select charges randomly
475 G4double eTotEnergy, pTotEnergy;
476 if (rndmEngine->flat() > 0.5) {
477 eTotEnergy = (1.-eps)*gammaEnergy;
478 pTotEnergy = eps*gammaEnergy;
479 } else {
480 pTotEnergy = (1.-eps)*gammaEnergy;
481 eTotEnergy = eps*gammaEnergy;
482 }
483 //
484 // sample pair kinematics
485 //
486 const G4double eKinEnergy = std::max(0.,eTotEnergy - CLHEP::electron_mass_c2);
487 const G4double pKinEnergy = std::max(0.,pTotEnergy - CLHEP::electron_mass_c2);
488 //
489 G4ThreeVector eDirection, pDirection;
490 //
492 eKinEnergy, pKinEnergy, eDirection, pDirection);
493 // create G4DynamicParticle object for the particle1
494 auto aParticle1 = new G4DynamicParticle(fTheElectron,eDirection,eKinEnergy);
495
496 // create G4DynamicParticle object for the particle2
497 auto aParticle2 = new G4DynamicParticle(fThePositron,pDirection,pKinEnergy);
498 // Fill output vector
499 fvect->push_back(aParticle1);
500 fvect->push_back(aParticle2);
501 // kill incident photon
504}
#define F10
#define F20
@ fStopAndKill
virtual double flat()=0
virtual void flatArray(const int size, double *vect)=0
G4double GetLogKineticEnergy() const
G4double GetKineticEnergy() const
G4int GetZasInt() const
Definition G4Element.hh:120
const G4Material * GetMaterial() const
G4double GetRadlen() const
void ScreenFunction12(const G4double delta, G4double &f1, G4double &f2)
G4double ScreenFunction1(const G4double delta)
G4double ScreenFunction2(const G4double delta)
void SetProposedKineticEnergy(G4double proposedKinEnergy)
G4double A13(G4double A) const
Definition G4Pow.cc:116
virtual void SamplePairDirections(const G4DynamicParticle *dp, G4double elecKinEnergy, G4double posiKinEnergy, G4ThreeVector &dirElectron, G4ThreeVector &dirPositron, G4int Z=0, const G4Material *mat=nullptr)
G4VEmAngularDistribution * GetAngularDistribution()
const G4Element * SelectTargetAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double logKineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
void ProposeTrackStatus(G4TrackStatus status)

◆ ScreenFunction1()

G4double G4PairProductionRelModel::ScreenFunction1 ( const G4double delta)
inlineprotected

Definition at line 215 of file G4PairProductionRelModel.hh.

216{
217 return (delta > 1.4) ? 42.038 - 8.29*G4Log(delta + 0.958)
218 : 42.184 - delta*(7.444 - 1.623*delta);
219}

Referenced by SampleSecondaries().

◆ ScreenFunction12()

void G4PairProductionRelModel::ScreenFunction12 ( const G4double delta,
G4double & f1,
G4double & f2 )
inlineprotected

Definition at line 229 of file G4PairProductionRelModel.hh.

231{
232 if (delta > 1.4) {
233 f1 = 42.038 - 8.29*G4Log(delta + 0.958);
234 f2 = f1;
235 } else {
236 f1 = 42.184 - delta*(7.444 - 1.623*delta);
237 f2 = 41.326 - delta*(5.848 - 0.902*delta);
238 }
239}

Referenced by SampleSecondaries().

◆ ScreenFunction2()

G4double G4PairProductionRelModel::ScreenFunction2 ( const G4double delta)
inlineprotected

Definition at line 222 of file G4PairProductionRelModel.hh.

223{
224 return (delta > 1.4) ? 42.038 - 8.29*G4Log(delta + 0.958)
225 : 41.326 - delta*(5.848 - 0.902*delta);
226}

Referenced by SampleSecondaries().

◆ SetLPMflag()

void G4PairProductionRelModel::SetLPMflag ( G4bool val)
inline

Definition at line 96 of file G4PairProductionRelModel.hh.

96{ fIsUseLPMCorrection = val; }

◆ SetupForMaterial()

void G4PairProductionRelModel::SetupForMaterial ( const G4ParticleDefinition * ,
const G4Material * mat,
G4double  )
overridevirtual

Reimplemented from G4VEmModel.

Definition at line 350 of file G4PairProductionRelModel.cc.

352{
354}

Member Data Documentation

◆ fCoulombCorrectionThreshold

G4double G4PairProductionRelModel::fCoulombCorrectionThreshold
protected

Definition at line 176 of file G4PairProductionRelModel.hh.

Referenced by G4PairProductionRelModel(), and SampleSecondaries().

◆ fG4Calc

G4Pow* G4PairProductionRelModel::fG4Calc
protected

Definition at line 178 of file G4PairProductionRelModel.hh.

Referenced by SampleSecondaries().

◆ fIsUseCompleteScreening

G4bool G4PairProductionRelModel::fIsUseCompleteScreening
protected

◆ fIsUseLPMCorrection

G4bool G4PairProductionRelModel::fIsUseLPMCorrection
protected

◆ fLPMEnergy

G4double G4PairProductionRelModel::fLPMEnergy
protected

Definition at line 173 of file G4PairProductionRelModel.hh.

Referenced by SampleSecondaries(), and SetupForMaterial().

◆ fParametrizedXSectionThreshold

G4double G4PairProductionRelModel::fParametrizedXSectionThreshold
protected

◆ fParticleChange

G4ParticleChangeForGamma* G4PairProductionRelModel::fParticleChange
protected

◆ fTheElectron

G4ParticleDefinition* G4PairProductionRelModel::fTheElectron
protected

◆ fTheGamma

G4ParticleDefinition* G4PairProductionRelModel::fTheGamma
protected

◆ fThePositron

G4ParticleDefinition* G4PairProductionRelModel::fThePositron
protected

Definition at line 181 of file G4PairProductionRelModel.hh.

Referenced by SampleSecondaries().

◆ gEgLPMActivation

const G4double G4PairProductionRelModel::gEgLPMActivation = 100.*CLHEP::GeV
staticprotected

Definition at line 164 of file G4PairProductionRelModel.hh.

Referenced by ComputeXSectionPerAtom(), and SampleSecondaries().

◆ gElementData

std::vector< G4PairProductionRelModel::ElementData * > G4PairProductionRelModel::gElementData
staticprotected

◆ gFelLowZet

const G4double G4PairProductionRelModel::gFelLowZet
staticprotected
Initial value:
= {
0.0, 5.3104, 4.7935, 4.7402, 4.7112, 4.6694, 4.6134, 4.5520
}

Definition at line 92 of file G4PairProductionRelModel.hh.

◆ gFinelLowZet

const G4double G4PairProductionRelModel::gFinelLowZet
staticprotected
Initial value:
= {
0.0, 5.9173, 5.6125, 5.5377, 5.4728, 5.4174, 5.3688, 5.3236
}

Definition at line 95 of file G4PairProductionRelModel.hh.

96 { fIsUseLPMCorrection = val; }
97 inline G4bool LPMflag() const { return fIsUseLPMCorrection; }

◆ gLPMconstant

const G4double G4PairProductionRelModel::gLPMconstant
staticprotected
Initial value:
=
CLHEP::fine_structure_const*CLHEP::electron_mass_c2*CLHEP::electron_mass_c2
/(4.*CLHEP::pi*CLHEP::hbarc)

Definition at line 156 of file G4PairProductionRelModel.hh.

Referenced by SampleSecondaries(), and SetupForMaterial().

◆ gLPMFuncs

G4PairProductionRelModel::LPMFuncs G4PairProductionRelModel::gLPMFuncs
staticprotected

Definition at line 167 of file G4PairProductionRelModel.hh.

Referenced by ~G4PairProductionRelModel().

◆ gMaxZet

const G4int G4PairProductionRelModel::gMaxZet = 120
staticprotected

◆ gWGL

const G4double G4PairProductionRelModel::gWGL
staticprotected
Initial value:
= {
5.06142681e-02, 1.11190517e-01, 1.56853323e-01, 1.81341892e-01,
1.81341892e-01, 1.56853323e-01, 1.11190517e-01, 5.06142681e-02
}

Definition at line 85 of file G4PairProductionRelModel.hh.

Referenced by ComputeXSectionPerAtom().

◆ gXGL

const G4double G4PairProductionRelModel::gXGL
staticprotected
Initial value:
= {
1.98550718e-02, 1.01666761e-01, 2.37233795e-01, 4.08282679e-01,
5.91717321e-01, 7.62766205e-01, 8.98333239e-01, 9.80144928e-01
}

Definition at line 81 of file G4PairProductionRelModel.hh.

Referenced by ComputeXSectionPerAtom().

◆ gXSecFactor

const G4double G4PairProductionRelModel::gXSecFactor
staticprotected
Initial value:
=
4.*CLHEP::fine_structure_const*CLHEP::classic_electr_radius
*CLHEP::classic_electr_radius

Definition at line 163 of file G4PairProductionRelModel.hh.

Referenced by ComputeCrossSectionPerAtom().

◆ isFirstInstance

G4bool G4PairProductionRelModel::isFirstInstance {false}
protected

Definition at line 169 of file G4PairProductionRelModel.hh.

169{false};

Referenced by Initialise(), and ~G4PairProductionRelModel().


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