78const G4int G4eBremsstrahlungRelModel::gMaxZet = 120;
82 = 16. * CLHEP::fine_structure_const * CLHEP::classic_electr_radius
83 * CLHEP::classic_electr_radius/3.;
87 = 4. * CLHEP::pi * CLHEP::classic_electr_radius
88 * CLHEP::electron_Compton_length * CLHEP::electron_Compton_length;
91const G4double G4eBremsstrahlungRelModel::gLPMconstant
92 = CLHEP::fine_structure_const * CLHEP::electron_mass_c2
93 * CLHEP::electron_mass_c2 / (4. * CLHEP::pi * CLHEP::hbarc);
97const G4double G4eBremsstrahlungRelModel::gXGL[] = {
98 1.98550718e-02, 1.01666761e-01, 2.37233795e-01, 4.08282679e-01,
99 5.91717321e-01, 7.62766205e-01, 8.98333239e-01, 9.80144928e-01
101const G4double G4eBremsstrahlungRelModel::gWGL[] = {
102 5.06142681e-02, 1.11190517e-01, 1.56853323e-01, 1.81341892e-01,
103 1.81341892e-01, 1.56853323e-01, 1.11190517e-01, 5.06142681e-02
108const G4double G4eBremsstrahlungRelModel::gFelLowZet [] = {
109 0.0, 5.3104, 4.7935, 4.7402, 4.7112, 4.6694, 4.6134, 4.5520
111const G4double G4eBremsstrahlungRelModel::gFinelLowZet[] = {
112 0.0, 5.9173, 5.6125, 5.5377, 5.4728, 5.4174, 5.3688, 5.3236
116G4eBremsstrahlungRelModel::LPMFuncs G4eBremsstrahlungRelModel::gLPMFuncs;
119std::vector<G4eBremsstrahlungRelModel::ElementData*> G4eBremsstrahlungRelModel::gElementData;
121static std::once_flag applyOnce;
137 fLPMEnergyThreshold = 1.e+39;
148 if (fIsInitializer) {
150 for (
auto const & ptr : gElementData) {
delete ptr; }
151 gElementData.clear();
153 if (gLPMFuncs.fIsInitialized) {
154 gLPMFuncs.fLPMFuncG.clear();
155 gLPMFuncs.fLPMFuncPhi.clear();
156 gLPMFuncs.fIsInitialized =
false;
172 std::call_once(applyOnce, [
this]() { fIsInitializer =
true; });
175 if (fIsInitializer || gElementData.empty()) {
177 if (gElementData.empty()) {
178 gElementData.resize(gMaxZet+1,
nullptr);
180 InitialiseElementData();
220 fLPMEnergy = gLPMconstant*mat->
GetRadlen();
225 fLPMEnergyThreshold = 1.e+39;
259 G4double tmax = std::min(cutEnergy, kineticEnergy);
268 const std::size_t numberOfElements = theElemVector->size();
271 for (std::size_t ie = 0; ie < numberOfElements; ++ie) {
273 G4int zet = (*theElemVector)[ie]->GetZasInt();
275 dedx += (zet*zet)*theAtomNumDensVector[ie]*ComputeBremLoss(tmax);
279 return std::max(dedx,0.);
308 for (
G4int l = 0; l < nSub; ++l) {
309 for (
G4int igl = 0; igl < 8; ++igl) {
314 ? ComputeRelDXSectionPerAtom(k)
324 return std::max(dedxInteg,0.);
345 const G4double tmin = std::min(cut, kineticEnergy);
346 const G4double tmax = std::min(maxEnergy, kineticEnergy);
354 crossSection = ComputeXSectionPerAtom(tmin);
359 if (tmax < kineticEnergy) {
360 crossSection -= ComputeXSectionPerAtom(tmax);
364 return std::max(crossSection, 0.);
390 const G4int nSub = std::max((
G4int)(0.45*alphaMax), 0) + 4;
394 for (
G4int l = 0; l < nSub; ++l) {
395 for (
G4int igl = 0; igl < 8; ++igl) {
400 ? ComputeRelDXSectionPerAtom(k)
411 return std::max(xSection, 0.);
438G4eBremsstrahlungRelModel::ComputeRelDXSectionPerAtom(
G4double gammaEnergy)
441 if (gammaEnergy < 0.) {
449 ComputeLPMfunctions(funcXiS, funcGS, funcPhiS, gammaEnergy);
450 const ElementData* elDat = gElementData[
fCurrentIZ];
451 const G4double term1 = funcXiS*(dum0*funcGS+(onemy+2.0*dum0)*funcPhiS);
452 dxsec = term1*elDat->fZFactor1+onemy*elDat->fZFactor2;
456 fNucTerm = term1*elDat->fZFactor11 + onemy/12.;
458 return std::max(dxsec,0.0);
488 if (gammaEnergy < 0.) {
493 const G4double dum0 = onemy+0.75*y*y;
494 const ElementData* elDat = gElementData[
fCurrentIZ];
496 if (
fCurrentIZ < 5 || fIsUseCompleteScreening) {
497 dxsec = dum0*elDat->fZFactor1;
498 dxsec += onemy*elDat->fZFactor2;
501 fNucTerm = dum0*elDat->fZFactor11+onemy/12.;
510 const G4double gamma = dum1*elDat->fGammaFactor;
513 G4double phi1, phi1m2, psi1, psi1m2;
514 ComputeScreeningFunctions(phi1, phi1m2, psi1, psi1m2, gamma,
epsilon);
515 dxsec = dum0*((0.25*phi1-Fz) + (0.25*psi1-2.*logZ/3.)*invZ);
516 dxsec += 0.125*onemy*(phi1m2 + psi1m2*invZ);
519 fNucTerm = dum0*(0.25*phi1-Fz) + 0.125*onemy*phi1m2;
522 return std::max(dxsec,0.0);
531void G4eBremsstrahlungRelModel::ComputeScreeningFunctions(
G4double& phi1,
539 phi1 = 16.863-2.0*
G4Log(1.0+0.311877*gam2)+2.4*
G4Exp(-0.9*gam)
540 +1.6*
G4Exp(-1.5*gam);
541 phi1m2 = 2.0/(3.0+19.5*gam+18.0*gam2);
543 psi1 = 24.34-2.0*
G4Log(1.0+13.111641*eps2)+2.8*
G4Exp(-8.0*eps)
544 +1.2*
G4Exp(-29.2*eps);
545 psi1m2 = 2.0/(3.0+120.0*eps+1200.0*eps2);
560 const G4double tmin = std::min(cutEnergy, kineticEnergy);
561 const G4double tmax = std::min(maxEnergy, kineticEnergy);
571 const ElementData* elDat = gElementData[
fCurrentIZ];
572 const G4double funcMax = elDat->fZFactor1+elDat->fZFactor2;
584 ? ComputeRelDXSectionPerAtom(gammaEnergy)
596 }
while (funcVal < funcMax*rndm[1]);
611 vdp->push_back(gamma);
614 const G4double totMomentum = std::sqrt(kineticEnergy*(
618 const G4double finalE = kineticEnergy-gammaEnergy;
634void G4eBremsstrahlungRelModel::InitialiseElementData()
638 for (
auto const &
elem : *elemTable) {
640 const G4int izet = std::min(
elem->GetZasInt(), gMaxZet);
641 if (
nullptr == gElementData[izet]) {
642 auto elemData =
new ElementData();
646 elemData->fLogZ =
G4Log(zet);
647 elemData->fFz = elemData->fLogZ/3.+fc;
649 Fel = gFelLowZet[izet];
650 Finel = gFinelLowZet[izet];
652 Fel =
G4Log(184.15) - elemData->fLogZ/3.;
653 Finel =
G4Log(1194) - 2.*elemData->fLogZ/3.;
657 elemData->fZFactor1 = (Fel-fc)+Finel/zet;
658 elemData->fZFactor11 = (Fel-fc);
659 elemData->fZFactor2 = (1.+1./zet)/12.;
660 elemData->fVarS1 = z23/(184.15*184.15);
661 elemData->fILVarS1Cond = 1./(
G4Log(std::sqrt(2.0)*elemData->fVarS1));
662 elemData->fILVarS1 = 1./
G4Log(elemData->fVarS1);
663 elemData->fGammaFactor = 100.0*electron_mass_c2/z13;
664 elemData->fEpsilonFactor = 100.0*electron_mass_c2/z23;
665 gElementData[izet] = elemData;
670void G4eBremsstrahlungRelModel::ComputeLPMfunctions(
G4double& funcXiS,
675 static const G4double sqrt2 = std::sqrt(2.);
677 const G4double varSprime = std::sqrt(0.125*redegamma*fLPMEnergy/
679 const ElementData* elDat = gElementData[
fCurrentIZ];
680 const G4double varS1 = elDat->fVarS1;
683 if (varSprime > 1.0) {
686 const G4double ilVarS1Cond = elDat->fILVarS1Cond;
688 funcXiSprime = 1.0 + funcHSprime - 0.08*(1.0-funcHSprime)*funcHSprime
689 *(2.0-funcHSprime)*ilVarS1Cond;
691 const G4double varS = varSprime/std::sqrt(funcXiSprime);
697 }
else if (varShat > varS1) {
698 funcXiS = 1.0+
G4Log(varShat)*elDat->fILVarS1;
700 GetLPMFunctions(funcGS, funcPhiS, varShat);
704 if (funcXiS*funcPhiS > 1. || varShat > 0.57) {
709void G4eBremsstrahlungRelModel::ComputeLPMGsPhis(
G4double& funcGS,
713 if (varShat < 0.01) {
714 funcPhiS = 6.0*varShat*(1.0-CLHEP::pi*varShat);
715 funcGS = 12.0*varShat-2.0*funcPhiS;
717 const G4double varShat2 = varShat*varShat;
718 const G4double varShat3 = varShat*varShat2;
719 const G4double varShat4 = varShat2*varShat2;
721 if (varShat < 0.415827) {
722 funcPhiS = 1.0-
G4Exp(-6.0*varShat*(1.0+varShat*(3.0-CLHEP::pi))
723 + varShat3/(0.623+0.796*varShat+0.658*varShat2));
726 - 8.0*varShat2/(1.0+3.936*varShat+4.97*varShat2
727 - 0.05*varShat3 + 7.5*varShat4));
729 funcGS = 3.0*funcPsiS - 2.0*funcPhiS;
730 }
else if (varShat<1.55) {
731 funcPhiS = 1.0-
G4Exp(-6.0*varShat*(1.0+varShat*(3.0-CLHEP::pi))
732 + varShat3/(0.623+0.796*varShat+0.658*varShat2));
733 const G4double dum0 = -0.160723 + 3.755030*varShat
734 -1.798138*varShat2 + 0.672827*varShat3
736 funcGS = std::tanh(dum0);
738 funcPhiS = 1.0-0.011905/varShat4;
739 if (varShat<1.9156) {
740 const G4double dum0 = -0.160723 + 3.755030*varShat
741 -1.798138*varShat2 + 0.672827*varShat3
743 funcGS = std::tanh(dum0);
745 funcGS = 1.0-0.023065/varShat4;
752void G4eBremsstrahlungRelModel::InitLPMFunctions()
754 if (!gLPMFuncs.fIsInitialized) {
755 const G4int num = gLPMFuncs.fSLimit*gLPMFuncs.fISDelta+1;
756 gLPMFuncs.fLPMFuncG.resize(num);
757 gLPMFuncs.fLPMFuncPhi.resize(num);
758 for (
G4int i = 0; i < num; ++i) {
759 const G4double sval=i/gLPMFuncs.fISDelta;
760 ComputeLPMGsPhis(gLPMFuncs.fLPMFuncG[i],gLPMFuncs.fLPMFuncPhi[i],sval);
762 gLPMFuncs.fIsInitialized =
true;
766void G4eBremsstrahlungRelModel::GetLPMFunctions(
G4double& lpmGs,
770 if (sval < gLPMFuncs.fSLimit) {
771 G4double val = sval*gLPMFuncs.fISDelta;
774 lpmGs = (gLPMFuncs.fLPMFuncG[ilow+1]-gLPMFuncs.fLPMFuncG[ilow])*val
775 + gLPMFuncs.fLPMFuncG[ilow];
776 lpmPhis = (gLPMFuncs.fLPMFuncPhi[ilow+1]-gLPMFuncs.fLPMFuncPhi[ilow])*val
777 + gLPMFuncs.fLPMFuncPhi[ilow];
781 lpmPhis = 1.0-0.01190476/ss;
782 lpmGs = 1.0-0.0230655/ss;
G4double epsilon(G4double density, G4double temperature)
std::vector< const G4Element * > G4ElementVector
G4double condition(const G4ErrorSymMatrix &m)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
#define G4MUTEX_INITIALIZER
virtual void flatArray(const int size, double *vect)=0
const G4ThreeVector & GetMomentumDirection() const
G4double GetLogKineticEnergy() const
G4double GetKineticEnergy() const
static G4Electron * Electron()
static G4ElementTable * GetElementTable()
static G4EmParameters * Instance()
const G4Material * GetMaterial() const
const G4ElementVector * GetElementVector() const
const G4double * GetAtomicNumDensityVector() const
G4double GetElectronDensity() const
G4double GetRadlen() const
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void SetProposedMomentumDirection(const G4ThreeVector &dir)
G4double GetPDGMass() const
static G4Pow * GetInstance()
G4double Z13(G4int Z) const
virtual G4ThreeVector & SampleDirection(const G4DynamicParticle *dp, G4double finalTotalEnergy, G4int Z, const G4Material *)=0
void SetElementSelectors(std::vector< G4EmElementSelector * > *)
G4VEmAngularDistribution * GetAngularDistribution()
G4double LowEnergyLimit() const
std::vector< G4EmElementSelector * > * GetElementSelectors()
G4VEmModel * GetTripletModel()
void SetCurrentElement(const G4Element *)
void SetLowEnergyLimit(G4double)
void SetAngularDistribution(G4VEmAngularDistribution *)
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin=0.0, G4double tmax=DBL_MAX)=0
const G4Element * SelectTargetAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double logKineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)=0
G4double SecondaryThreshold() const
G4ParticleChangeForLoss * GetParticleChangeForLoss()
void ProposeTrackStatus(G4TrackStatus status)
G4double fPrimaryParticleMass
void SetParticle(const G4ParticleDefinition *p)
G4double fPrimaryKinEnergy
G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double ekin, G4double zet, G4double, G4double cutEnergy, G4double maxEnergy=DBL_MAX) override
virtual G4double ComputeDXSectionPerAtom(G4double gammaEnergy)
const G4ParticleDefinition * fPrimaryParticle
static const G4double gBremFactor
void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel) override
G4bool fIsScatOffElectron
void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double cutEnergy, G4double maxEnergy) override
G4double fPrimaryTotalEnergy
G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double ekin, G4double cutEnergy) override
G4eBremsstrahlungRelModel(const G4ParticleDefinition *p=nullptr, const G4String &nam="eBremLPM")
~G4eBremsstrahlungRelModel() override
G4double fLowestKinEnergy
G4ParticleDefinition * fGammaParticle
void SetupForMaterial(const G4ParticleDefinition *, const G4Material *, G4double) override
G4ParticleChangeForLoss * fParticleChange
G4double MinPrimaryEnergy(const G4Material *, const G4ParticleDefinition *, G4double cutEnergy) override
static const G4double gMigdalConstant
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override