73const G4int G4eBremsstrahlungRelModel::gMaxZet = 120;
77 = 16. * CLHEP::fine_structure_const * CLHEP::classic_electr_radius
78 * CLHEP::classic_electr_radius/3.;
82 = 4. * CLHEP::pi * CLHEP::classic_electr_radius
83 * CLHEP::electron_Compton_length * CLHEP::electron_Compton_length;
86const G4double G4eBremsstrahlungRelModel::gLPMconstant
87 = CLHEP::fine_structure_const * CLHEP::electron_mass_c2
88 * CLHEP::electron_mass_c2 / (4. * CLHEP::pi * CLHEP::hbarc);
92const G4double G4eBremsstrahlungRelModel::gXGL[] = {
93 1.98550718e-02, 1.01666761e-01, 2.37233795e-01, 4.08282679e-01,
94 5.91717321e-01, 7.62766205e-01, 8.98333239e-01, 9.80144928e-01
96const G4double G4eBremsstrahlungRelModel::gWGL[] = {
97 5.06142681e-02, 1.11190517e-01, 1.56853323e-01, 1.81341892e-01,
98 1.81341892e-01, 1.56853323e-01, 1.11190517e-01, 5.06142681e-02
103const G4double G4eBremsstrahlungRelModel::gFelLowZet [] = {
104 0.0, 5.3104, 4.7935, 4.7402, 4.7112, 4.6694, 4.6134, 4.5520
106const G4double G4eBremsstrahlungRelModel::gFinelLowZet[] = {
107 0.0, 5.9173, 5.6125, 5.5377, 5.4728, 5.4174, 5.3688, 5.3236
111G4eBremsstrahlungRelModel::LPMFuncs G4eBremsstrahlungRelModel::gLPMFuncs;
114std::vector<G4eBremsstrahlungRelModel::ElementData*> G4eBremsstrahlungRelModel::gElementData;
118:
G4VEmModel(nam), fIsElectron(true), fIsScatOffElectron(false),
119 fIsLPMActive(false), fPrimaryParticle(nullptr), fIsUseCompleteScreening(false)
138 fLPMEnergyThreshold = 1.e+39;
155 for (
size_t iz = 0; iz < gElementData.size(); ++iz) {
156 if (gElementData[iz]) {
157 delete gElementData[iz];
160 gElementData.clear();
163 gLPMFuncs.fLPMFuncG.clear();
164 gLPMFuncs.fLPMFuncPhi.clear();
165 gLPMFuncs.fIsInitialized =
false;
179 InitialiseElementData();
180 if (
LPMFlag()) { InitLPMFunctions(); }
215 fLPMEnergy = gLPMconstant*mat->
GetRadlen();
220 fLPMEnergyThreshold = 1.e+39;
254 G4double tmax = std::min(cutEnergy, kineticEnergy);
263 const size_t numberOfElements = theElemVector->size();
266 for (
size_t ie = 0; ie < numberOfElements; ++ie) {
269 const G4double zet = (*theElemVector)[ie]->GetZ();
271 dedx += theAtomNumDensVector[ie]*zet*zet*ComputeBremLoss(tmax);
275 return std::max(dedx,0.);
304 for (
G4int l = 0; l < nSub; ++l) {
305 for (
G4int igl = 0; igl < 8; ++igl) {
310 ? ComputeRelDXSectionPerAtom(k)
320 return std::max(dedxInteg,0.);
341 const G4double tmin = std::min(cut, kineticEnergy);
342 const G4double tmax = std::min(maxEnergy, kineticEnergy);
350 crossSection = ComputeXSectionPerAtom(tmin);
355 if (tmax < kineticEnergy) {
356 crossSection -= ComputeXSectionPerAtom(tmax);
360 return std::max(crossSection, 0.);
386 const G4int nSub = (
G4int)(0.45*(alphaMax-alphaMin))+4;
390 for (
G4int l = 0; l < nSub; ++l) {
391 for (
G4int igl = 0; igl < 8; ++igl) {
396 ? ComputeRelDXSectionPerAtom(k)
407 return std::max(xSection, 0.);
434G4eBremsstrahlungRelModel::ComputeRelDXSectionPerAtom(
G4double gammaEnergy)
437 if (gammaEnergy < 0.) {
445 ComputeLPMfunctions(funcXiS, funcGS, funcPhiS, gammaEnergy);
446 const ElementData* elDat = gElementData[
fCurrentIZ];
447 const G4double term1 = funcXiS*(dum0*funcGS+(onemy+2.0*dum0)*funcPhiS);
448 dxsec = term1*elDat->fZFactor1+onemy*elDat->fZFactor2;
452 fNucTerm = term1*elDat->fZFactor11 + onemy/12.;
454 return std::max(dxsec,0.0);
484 if (gammaEnergy < 0.) {
489 const G4double dum0 = onemy+0.75*y*y;
490 const ElementData* elDat = gElementData[
fCurrentIZ];
492 if (
fCurrentIZ < 5 || fIsUseCompleteScreening) {
493 dxsec = dum0*elDat->fZFactor1;
494 dxsec += onemy*elDat->fZFactor2;
497 fNucTerm = dum0*elDat->fZFactor11+onemy/12.;
506 const G4double gamma = dum1*elDat->fGammaFactor;
509 G4double phi1, phi1m2, psi1, psi1m2;
510 ComputeScreeningFunctions(phi1, phi1m2, psi1, psi1m2, gamma,
epsilon);
511 dxsec = dum0*((0.25*phi1-Fz) + (0.25*psi1-2.*logZ/3.)*invZ);
512 dxsec += 0.125*onemy*(phi1m2 + psi1m2*invZ);
515 fNucTerm = dum0*(0.25*phi1-Fz) + 0.125*onemy*phi1m2;
518 return std::max(dxsec,0.0);
527void G4eBremsstrahlungRelModel::ComputeScreeningFunctions(
G4double& phi1,
535 phi1 = 16.863-2.0*
G4Log(1.0+0.311877*gam2)+2.4*
G4Exp(-0.9*gam)
536 +1.6*
G4Exp(-1.5*gam);
537 phi1m2 = 2.0/(3.0+19.5*gam+18.0*gam2);
539 psi1 = 24.34-2.0*
G4Log(1.0+13.111641*eps2)+2.8*
G4Exp(-8.0*eps)
540 +1.2*
G4Exp(-29.2*eps);
541 psi1m2 = 2.0/(3.0+120.0*eps+1200.0*eps2);
557 const G4double tmin = std::min(cutEnergy, kineticEnergy);
558 const G4double tmax = std::min(maxEnergy, kineticEnergy);
568 const ElementData* elDat = gElementData[
fCurrentIZ];
569 const G4double funcMax = elDat->fZFactor1+elDat->fZFactor2;
581 ? ComputeRelDXSectionPerAtom(gammaEnergy)
593 }
while (funcVal < funcMax*rndm[1]);
609 vdp->push_back(gamma);
612 const G4double totMomentum = std::sqrt(kineticEnergy*(
616 const G4double finalE = kineticEnergy-gammaEnergy;
632void G4eBremsstrahlungRelModel::InitialiseElementData()
634 const G4int size = gElementData.size();
635 if (size < gMaxZet+1) {
636 gElementData.resize(gMaxZet+1,
nullptr);
640 size_t numElems = (*elemTable).size();
641 for (
size_t ielem=0; ielem<numElems; ++ielem) {
642 const G4Element* elem = (*elemTable)[ielem];
645 if (!gElementData[izet]) {
646 ElementData *elemData =
new ElementData();
650 elemData->fLogZ =
G4Log(zet);
651 elemData->fFz = elemData->fLogZ/3.+fc;
653 Fel = gFelLowZet[izet];
654 Finel = gFinelLowZet[izet];
656 Fel =
G4Log(184.15) - elemData->fLogZ/3.;
657 Finel =
G4Log(1194) - 2.*elemData->fLogZ/3.;
659 const G4double z23 = std::pow(zet,2./3.);
660 const G4double z13 = std::pow(zet,1./3.);
661 elemData->fZFactor1 = (Fel-fc)+Finel/zet;
662 elemData->fZFactor11 = (Fel-fc);
663 elemData->fZFactor2 = (1.+1./zet)/12.;
664 elemData->fVarS1 = z23/(184.15*184.15);
665 elemData->fILVarS1Cond = 1./(
G4Log(std::sqrt(2.0)*elemData->fVarS1));
666 elemData->fILVarS1 = 1./
G4Log(elemData->fVarS1);
667 elemData->fGammaFactor = 100.0*electron_mass_c2/z13;
668 elemData->fEpsilonFactor = 100.0*electron_mass_c2/z23;
669 gElementData[izet] = elemData;
674void G4eBremsstrahlungRelModel::ComputeLPMfunctions(
G4double& funcXiS,
679 static const G4double sqrt2 = std::sqrt(2.);
681 const G4double varSprime = std::sqrt(0.125*redegamma*fLPMEnergy/
683 const ElementData* elDat = gElementData[
fCurrentIZ];
684 const G4double varS1 = elDat->fVarS1;
687 if (varSprime > 1.0) {
690 const G4double ilVarS1Cond = elDat->fILVarS1Cond;
692 funcXiSprime = 1.0 + funcHSprime - 0.08*(1.0-funcHSprime)*funcHSprime
693 *(2.0-funcHSprime)*ilVarS1Cond;
695 const G4double varS = varSprime/std::sqrt(funcXiSprime);
701 }
else if (varShat > varS1) {
702 funcXiS = 1.0+
G4Log(varShat)*elDat->fILVarS1;
704 GetLPMFunctions(funcGS, funcPhiS, varShat);
708 if (funcXiS*funcPhiS > 1. || varShat > 0.57) {
713void G4eBremsstrahlungRelModel::ComputeLPMGsPhis(
G4double& funcGS,
717 if (varShat < 0.01) {
718 funcPhiS = 6.0*varShat*(1.0-CLHEP::pi*varShat);
719 funcGS = 12.0*varShat-2.0*funcPhiS;
721 const G4double varShat2 = varShat*varShat;
722 const G4double varShat3 = varShat*varShat2;
723 const G4double varShat4 = varShat2*varShat2;
725 if (varShat < 0.415827) {
726 funcPhiS = 1.0-
G4Exp(-6.0*varShat*(1.0+varShat*(3.0-CLHEP::pi))
727 + varShat3/(0.623+0.796*varShat+0.658*varShat2));
730 - 8.0*varShat2/(1.0+3.936*varShat+4.97*varShat2
731 - 0.05*varShat3 + 7.5*varShat4));
733 funcGS = 3.0*funcPsiS - 2.0*funcPhiS;
734 }
else if (varShat<1.55) {
735 funcPhiS = 1.0-
G4Exp(-6.0*varShat*(1.0+varShat*(3.0-CLHEP::pi))
736 + varShat3/(0.623+0.796*varShat+0.658*varShat2));
737 const G4double dum0 = -0.160723 + 3.755030*varShat
738 -1.798138*varShat2 + 0.672827*varShat3
740 funcGS = std::tanh(dum0);
742 funcPhiS = 1.0-0.011905/varShat4;
743 if (varShat<1.9156) {
744 const G4double dum0 = -0.160723 + 3.755030*varShat
745 -1.798138*varShat2 + 0.672827*varShat3
747 funcGS = std::tanh(dum0);
749 funcGS = 1.0-0.023065/varShat4;
756void G4eBremsstrahlungRelModel::InitLPMFunctions()
758 if (!gLPMFuncs.fIsInitialized) {
759 const G4int num = gLPMFuncs.fSLimit*gLPMFuncs.fISDelta+1;
760 gLPMFuncs.fLPMFuncG.resize(num);
761 gLPMFuncs.fLPMFuncPhi.resize(num);
762 for (
G4int i = 0; i < num; ++i) {
763 const G4double sval=i/gLPMFuncs.fISDelta;
764 ComputeLPMGsPhis(gLPMFuncs.fLPMFuncG[i],gLPMFuncs.fLPMFuncPhi[i],sval);
766 gLPMFuncs.fIsInitialized =
true;
770void G4eBremsstrahlungRelModel::GetLPMFunctions(
G4double& lpmGs,
774 if (sval < gLPMFuncs.fSLimit) {
775 G4double val = sval*gLPMFuncs.fISDelta;
778 lpmGs = (gLPMFuncs.fLPMFuncG[ilow+1]-gLPMFuncs.fLPMFuncG[ilow])*val
779 + gLPMFuncs.fLPMFuncG[ilow];
780 lpmPhis = (gLPMFuncs.fLPMFuncPhi[ilow+1]-gLPMFuncs.fLPMFuncPhi[ilow])*val
781 + gLPMFuncs.fLPMFuncPhi[ilow];
785 lpmPhis = 1.0-0.01190476/ss;
786 lpmGs = 1.0-0.0230655/ss;
double epsilon(double density, double temperature)
std::vector< G4Element * > G4ElementTable
std::vector< 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()
G4double GetfCoulomb() const
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
virtual ~G4eBremsstrahlungRelModel()
void SetParticle(const G4ParticleDefinition *p)
G4double fPrimaryKinEnergy
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double ekin, G4double zet, G4double, G4double cutEnergy, G4double maxEnergy=DBL_MAX) override
G4eBremsstrahlungRelModel(const G4ParticleDefinition *p=0, const G4String &nam="eBremLPM")
virtual G4double ComputeDXSectionPerAtom(G4double gammaEnergy)
const G4ParticleDefinition * fPrimaryParticle
static const G4double gBremFactor
virtual void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel) override
G4bool fIsScatOffElectron
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double cutEnergy, G4double maxEnergy) override
G4double fPrimaryTotalEnergy
virtual G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double ekin, G4double cutEnergy) override
G4double fLowestKinEnergy
G4ParticleDefinition * fGammaParticle
virtual void SetupForMaterial(const G4ParticleDefinition *, const G4Material *, G4double) override
G4ParticleChangeForLoss * fParticleChange
virtual G4double MinPrimaryEnergy(const G4Material *, const G4ParticleDefinition *, G4double cutEnergy) override
static const G4double gMigdalConstant
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &) override