74const G4int G4eBremsstrahlungRelModel::gMaxZet = 120;
78 = 16. * CLHEP::fine_structure_const * CLHEP::classic_electr_radius
79 * CLHEP::classic_electr_radius/3.;
83 = 4. * CLHEP::pi * CLHEP::classic_electr_radius
84 * CLHEP::electron_Compton_length * CLHEP::electron_Compton_length;
87const G4double G4eBremsstrahlungRelModel::gLPMconstant
88 = CLHEP::fine_structure_const * CLHEP::electron_mass_c2
89 * CLHEP::electron_mass_c2 / (4. * CLHEP::pi * CLHEP::hbarc);
93const G4double G4eBremsstrahlungRelModel::gXGL[] = {
94 1.98550718e-02, 1.01666761e-01, 2.37233795e-01, 4.08282679e-01,
95 5.91717321e-01, 7.62766205e-01, 8.98333239e-01, 9.80144928e-01
97const G4double G4eBremsstrahlungRelModel::gWGL[] = {
98 5.06142681e-02, 1.11190517e-01, 1.56853323e-01, 1.81341892e-01,
99 1.81341892e-01, 1.56853323e-01, 1.11190517e-01, 5.06142681e-02
104const G4double G4eBremsstrahlungRelModel::gFelLowZet [] = {
105 0.0, 5.3104, 4.7935, 4.7402, 4.7112, 4.6694, 4.6134, 4.5520
107const G4double G4eBremsstrahlungRelModel::gFinelLowZet[] = {
108 0.0, 5.9173, 5.6125, 5.5377, 5.4728, 5.4174, 5.3688, 5.3236
112G4eBremsstrahlungRelModel::LPMFuncs G4eBremsstrahlungRelModel::gLPMFuncs;
115std::vector<G4eBremsstrahlungRelModel::ElementData*> G4eBremsstrahlungRelModel::gElementData;
126 fLPMEnergyThreshold = 1.e+39;
142 for (std::size_t iz = 0; iz < gElementData.size(); ++iz) {
143 if (
nullptr != gElementData[iz]) {
144 delete gElementData[iz];
147 gElementData.clear();
150 gLPMFuncs.fLPMFuncG.clear();
151 gLPMFuncs.fLPMFuncPhi.clear();
152 gLPMFuncs.fIsInitialized =
false;
166 InitialiseElementData();
167 if (
LPMFlag()) { InitLPMFunctions(); }
204 fLPMEnergy = gLPMconstant*mat->
GetRadlen();
209 fLPMEnergyThreshold = 1.e+39;
243 G4double tmax = std::min(cutEnergy, kineticEnergy);
252 const std::size_t numberOfElements = theElemVector->size();
255 for (std::size_t ie = 0; ie < numberOfElements; ++ie) {
257 G4int zet = (*theElemVector)[ie]->GetZasInt();
259 dedx += (zet*zet)*theAtomNumDensVector[ie]*ComputeBremLoss(tmax);
263 return std::max(dedx,0.);
292 for (
G4int l = 0; l < nSub; ++l) {
293 for (
G4int igl = 0; igl < 8; ++igl) {
298 ? ComputeRelDXSectionPerAtom(k)
308 return std::max(dedxInteg,0.);
329 const G4double tmin = std::min(cut, kineticEnergy);
330 const G4double tmax = std::min(maxEnergy, kineticEnergy);
338 crossSection = ComputeXSectionPerAtom(tmin);
343 if (tmax < kineticEnergy) {
344 crossSection -= ComputeXSectionPerAtom(tmax);
348 return std::max(crossSection, 0.);
374 const G4int nSub = (
G4int)(0.45*(alphaMax-alphaMin))+4;
378 for (
G4int l = 0; l < nSub; ++l) {
379 for (
G4int igl = 0; igl < 8; ++igl) {
384 ? ComputeRelDXSectionPerAtom(k)
395 return std::max(xSection, 0.);
422G4eBremsstrahlungRelModel::ComputeRelDXSectionPerAtom(
G4double gammaEnergy)
425 if (gammaEnergy < 0.) {
433 ComputeLPMfunctions(funcXiS, funcGS, funcPhiS, gammaEnergy);
434 const ElementData* elDat = gElementData[
fCurrentIZ];
435 const G4double term1 = funcXiS*(dum0*funcGS+(onemy+2.0*dum0)*funcPhiS);
436 dxsec = term1*elDat->fZFactor1+onemy*elDat->fZFactor2;
440 fNucTerm = term1*elDat->fZFactor11 + onemy/12.;
442 return std::max(dxsec,0.0);
472 if (gammaEnergy < 0.) {
477 const G4double dum0 = onemy+0.75*y*y;
478 const ElementData* elDat = gElementData[
fCurrentIZ];
480 if (
fCurrentIZ < 5 || fIsUseCompleteScreening) {
481 dxsec = dum0*elDat->fZFactor1;
482 dxsec += onemy*elDat->fZFactor2;
485 fNucTerm = dum0*elDat->fZFactor11+onemy/12.;
494 const G4double gamma = dum1*elDat->fGammaFactor;
497 G4double phi1, phi1m2, psi1, psi1m2;
498 ComputeScreeningFunctions(phi1, phi1m2, psi1, psi1m2, gamma,
epsilon);
499 dxsec = dum0*((0.25*phi1-Fz) + (0.25*psi1-2.*logZ/3.)*invZ);
500 dxsec += 0.125*onemy*(phi1m2 + psi1m2*invZ);
503 fNucTerm = dum0*(0.25*phi1-Fz) + 0.125*onemy*phi1m2;
506 return std::max(dxsec,0.0);
515void G4eBremsstrahlungRelModel::ComputeScreeningFunctions(
G4double& phi1,
523 phi1 = 16.863-2.0*
G4Log(1.0+0.311877*gam2)+2.4*
G4Exp(-0.9*gam)
524 +1.6*
G4Exp(-1.5*gam);
525 phi1m2 = 2.0/(3.0+19.5*gam+18.0*gam2);
527 psi1 = 24.34-2.0*
G4Log(1.0+13.111641*eps2)+2.8*
G4Exp(-8.0*eps)
528 +1.2*
G4Exp(-29.2*eps);
529 psi1m2 = 2.0/(3.0+120.0*eps+1200.0*eps2);
545 const G4double tmin = std::min(cutEnergy, kineticEnergy);
546 const G4double tmax = std::min(maxEnergy, kineticEnergy);
556 const ElementData* elDat = gElementData[
fCurrentIZ];
557 const G4double funcMax = elDat->fZFactor1+elDat->fZFactor2;
569 ? ComputeRelDXSectionPerAtom(gammaEnergy)
581 }
while (funcVal < funcMax*rndm[1]);
596 vdp->push_back(gamma);
599 const G4double totMomentum = std::sqrt(kineticEnergy*(
603 const G4double finalE = kineticEnergy-gammaEnergy;
619void G4eBremsstrahlungRelModel::InitialiseElementData()
621 const G4int size = (
G4int)gElementData.size();
622 if (size < gMaxZet+1) {
623 gElementData.resize(gMaxZet+1,
nullptr);
627 std::size_t numElems = (*elemTable).size();
628 for (std::size_t ielem=0; ielem<numElems; ++ielem) {
632 if (!gElementData[izet]) {
633 auto elemData =
new ElementData();
637 elemData->fLogZ =
G4Log(zet);
638 elemData->fFz = elemData->fLogZ/3.+fc;
640 Fel = gFelLowZet[izet];
641 Finel = gFinelLowZet[izet];
643 Fel =
G4Log(184.15) - elemData->fLogZ/3.;
644 Finel =
G4Log(1194) - 2.*elemData->fLogZ/3.;
646 const G4double z23 = std::pow(zet,2./3.);
647 const G4double z13 = std::pow(zet,1./3.);
648 elemData->fZFactor1 = (Fel-fc)+Finel/zet;
649 elemData->fZFactor11 = (Fel-fc);
650 elemData->fZFactor2 = (1.+1./zet)/12.;
651 elemData->fVarS1 = z23/(184.15*184.15);
652 elemData->fILVarS1Cond = 1./(
G4Log(std::sqrt(2.0)*elemData->fVarS1));
653 elemData->fILVarS1 = 1./
G4Log(elemData->fVarS1);
654 elemData->fGammaFactor = 100.0*electron_mass_c2/z13;
655 elemData->fEpsilonFactor = 100.0*electron_mass_c2/z23;
656 gElementData[izet] = elemData;
661void G4eBremsstrahlungRelModel::ComputeLPMfunctions(
G4double& funcXiS,
666 static const G4double sqrt2 = std::sqrt(2.);
668 const G4double varSprime = std::sqrt(0.125*redegamma*fLPMEnergy/
670 const ElementData* elDat = gElementData[
fCurrentIZ];
671 const G4double varS1 = elDat->fVarS1;
674 if (varSprime > 1.0) {
677 const G4double ilVarS1Cond = elDat->fILVarS1Cond;
679 funcXiSprime = 1.0 + funcHSprime - 0.08*(1.0-funcHSprime)*funcHSprime
680 *(2.0-funcHSprime)*ilVarS1Cond;
682 const G4double varS = varSprime/std::sqrt(funcXiSprime);
688 }
else if (varShat > varS1) {
689 funcXiS = 1.0+
G4Log(varShat)*elDat->fILVarS1;
691 GetLPMFunctions(funcGS, funcPhiS, varShat);
695 if (funcXiS*funcPhiS > 1. || varShat > 0.57) {
700void G4eBremsstrahlungRelModel::ComputeLPMGsPhis(
G4double& funcGS,
704 if (varShat < 0.01) {
705 funcPhiS = 6.0*varShat*(1.0-CLHEP::pi*varShat);
706 funcGS = 12.0*varShat-2.0*funcPhiS;
708 const G4double varShat2 = varShat*varShat;
709 const G4double varShat3 = varShat*varShat2;
710 const G4double varShat4 = varShat2*varShat2;
712 if (varShat < 0.415827) {
713 funcPhiS = 1.0-
G4Exp(-6.0*varShat*(1.0+varShat*(3.0-CLHEP::pi))
714 + varShat3/(0.623+0.796*varShat+0.658*varShat2));
717 - 8.0*varShat2/(1.0+3.936*varShat+4.97*varShat2
718 - 0.05*varShat3 + 7.5*varShat4));
720 funcGS = 3.0*funcPsiS - 2.0*funcPhiS;
721 }
else if (varShat<1.55) {
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));
724 const G4double dum0 = -0.160723 + 3.755030*varShat
725 -1.798138*varShat2 + 0.672827*varShat3
727 funcGS = std::tanh(dum0);
729 funcPhiS = 1.0-0.011905/varShat4;
730 if (varShat<1.9156) {
731 const G4double dum0 = -0.160723 + 3.755030*varShat
732 -1.798138*varShat2 + 0.672827*varShat3
734 funcGS = std::tanh(dum0);
736 funcGS = 1.0-0.023065/varShat4;
743void G4eBremsstrahlungRelModel::InitLPMFunctions()
745 if (!gLPMFuncs.fIsInitialized) {
746 const G4int num = gLPMFuncs.fSLimit*gLPMFuncs.fISDelta+1;
747 gLPMFuncs.fLPMFuncG.resize(num);
748 gLPMFuncs.fLPMFuncPhi.resize(num);
749 for (
G4int i = 0; i < num; ++i) {
750 const G4double sval=i/gLPMFuncs.fISDelta;
751 ComputeLPMGsPhis(gLPMFuncs.fLPMFuncG[i],gLPMFuncs.fLPMFuncPhi[i],sval);
753 gLPMFuncs.fIsInitialized =
true;
757void G4eBremsstrahlungRelModel::GetLPMFunctions(
G4double& lpmGs,
761 if (sval < gLPMFuncs.fSLimit) {
762 G4double val = sval*gLPMFuncs.fISDelta;
765 lpmGs = (gLPMFuncs.fLPMFuncG[ilow+1]-gLPMFuncs.fLPMFuncG[ilow])*val
766 + gLPMFuncs.fLPMFuncG[ilow];
767 lpmPhis = (gLPMFuncs.fLPMFuncPhi[ilow+1]-gLPMFuncs.fLPMFuncPhi[ilow])*val
768 + gLPMFuncs.fLPMFuncPhi[ilow];
772 lpmPhis = 1.0-0.01190476/ss;
773 lpmGs = 1.0-0.0230655/ss;
G4double epsilon(G4double density, G4double temperature)
std::vector< G4Element * > G4ElementTable
std::vector< const G4Element * > G4ElementVector
G4double condition(const G4ErrorSymMatrix &m)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
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()
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
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 SetLPMFlag(G4bool val)
G4double HighEnergyLimit() const
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