78 G4eBremsstrahlungRelModel::xgi[]={ 0.0199, 0.1017, 0.2372, 0.4083,
79 0.5917, 0.7628, 0.8983, 0.9801 };
81 G4eBremsstrahlungRelModel::wgi[]={ 0.0506, 0.1112, 0.1569, 0.1813,
82 0.1813, 0.1569, 0.1112, 0.0506 };
84 G4eBremsstrahlungRelModel::Fel_light[] = {0., 5.31 , 4.79 , 4.74 , 4.71};
86 G4eBremsstrahlungRelModel::Finel_light[] = {0., 6.144 , 5.621 , 5.805 , 5.924};
98 use_completescreening(false)
103 lowestKinEnergy = 1.0*
MeV;
114 = xiLPM = phiLPM = gLPM = klpm = kp = 0.0;
116 energyThresholdLPM = 1.e39;
118 InitialiseConstants();
119 if(p) { SetParticle(p); }
124 void G4eBremsstrahlungRelModel::InitialiseConstants()
126 facFel =
G4Log(184.15);
127 facFinel =
G4Log(1194.);
129 preS1 = 1./(184.15*184.15);
156 lpmEnergy = mat->
GetRadlen()*fLPMconstant;
162 energyThresholdLPM=1.e39;
170 klpm=totalEnergy*totalEnergy/lpmEnergy;
179 if(p) { SetParticle(p); }
207 return std::max(lowestKinEnergy, cut);
221 if(cut == 0.0) {
return 0.0; }
236 dedx += theAtomicNumDensityVector[i]*(
currentZ*
currentZ)*ComputeBremLoss(cut);
259 for(
G4int l=0; l<
n; l++) {
261 for(
G4int i=0; i<8; i++) {
266 xs = ComputeRelDXSectionPerAtom(eg);
294 if(cut >= tmax) {
return 0.0; }
298 G4double cross = ComputeXSectionPerAtom(cut);
301 if(tmax <
kinEnergy) { cross -= ComputeXSectionPerAtom(tmax); }
326 for(
G4int l=0; l<
n; l++) {
328 for(
G4int i=0; i<8; i++) {
333 xs = ComputeRelDXSectionPerAtom(eg);
349 void G4eBremsstrahlungRelModel::CalcLPMFunctions(
G4double k)
356 G4double logS1 = 2./3.*lnZ-2.*facFel;
363 else if (sprime>sqrt(2.)*s1) {
365 xiLPM = 1+h-0.08*(1-h)*(1-
sqr(1-h))/logTS1;
378 if (s0<=s1) xiLPM = 2.;
379 else if ( (s1<s0) && (s0<=1) ) { xiLPM = 1. +
G4Log(s0)/logS1; }
390 phiLPM = 6.*s0 - 18.84955592153876*s2 + 39.47841760435743*s3
391 - 57.69873135166053*s4;
392 gLPM = 37.69911184307752*s2 - 236.8705056261446*s3 + 807.7822389*s4;
394 else if (s0<1.9516) {
397 phiLPM = 1.-
G4Exp(-6.*s0*(1.+(3.-
pi)*s0)
398 +s3/(0.623+0.795*s0+0.658*s2));
399 if (s0<0.415827397755) {
401 G4double psiLPM = 1-
G4Exp(-4*s0-8*s2/(1+3.936*s0+4.97*s2-0.05*s3+7.50*s4));
402 gLPM = 3*psiLPM-2*phiLPM;
406 G4double pre = -0.16072300849123999 + s0*3.7550300067531581 + s2*-1.7981383069010097
407 + s3*0.67282686077812381 + s4*-0.1207722909879257;
413 phiLPM = 1. - 0.0119048/s4;
414 gLPM = 1. - 0.0230655/s4;
419 if (xiLPM*phiLPM>1. || s0>0.57) { xiLPM=1./phiLPM; }
425 G4double G4eBremsstrahlungRelModel::ComputeRelDXSectionPerAtom(
G4double gammaEnergy)
430 if(gammaEnergy < 0.0) {
return 0.0; }
440 CalcLPMFunctions(gammaEnergy);
443 G4double mainLPM = xiLPM*(y2 * gLPM + yone2*phiLPM) * ( (Fel-fCoulomb) + Finel*xz );
444 G4double secondTerm = (1.-y)/12.*(1. + xz);
446 G4double cross = mainLPM+secondTerm;
459 if(gammaEnergy < 0.0) {
return 0.0; }
466 if (use_completescreening||
currentZ<5) {
468 main = (3./4.*y*y - y + 1.) * ( (Fel-fCoulomb) + Finel/currZ );
469 secondTerm = (1.-y)/12.*(1.+1./currZ);
476 G4double phi1=Phi1(gg,currZ), phi1m2=Phi1M2(gg,currZ);
477 G4double psi1=Psi1(eps,currZ), psi1m2=Psi1M2(eps,currZ);
479 main = (3./4.*y*y - y + 1.) *
480 ( (0.25*phi1-1./3.*lnZ-fCoulomb) + (0.25*psi1-2./3.*lnZ)/currZ );
481 secondTerm = (1.-y)/8.*(phi1m2+psi1m2/currZ);
490 std::vector<G4DynamicParticle*>* vdp,
500 if(cut >= emax) {
return; }
514 if(totalEnergy < energyThresholdLPM) { highe =
false; }
524 if(x < 0.0) { x = 0.0; }
525 gammaEnergy = sqrt(x);
526 if(highe) { f = ComputeRelDXSectionPerAtom(gammaEnergy); }
530 G4cout <<
"### G4eBremsstrahlungRelModel Warning: Majoranta exceeded! "
531 << f <<
" > " << fMax
532 <<
" Egamma(MeV)= " << gammaEnergy
533 <<
" Ee(MeV)= " << kineticEnergy
539 }
while (f < fMax*rndmEngine->
flat());
554 vdp->push_back(gamma);
558 - gammaEnergy*gammaDirection).unit();
561 G4double finalE = kineticEnergy - gammaEnergy;
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double cutEnergy, G4double maxEnergy) override
G4double LowEnergyLimit() const
G4ParticleChangeForLoss * GetParticleChangeForLoss()
G4double SecondaryThreshold() const
void SetCurrentElement(G4int)
G4bool isElectron(G4int ityp)
std::vector< G4Element * > G4ElementVector
G4double GetKineticEnergy() const
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)
G4double HighEnergyLimit() const
G4VEmAngularDistribution * GetAngularDistribution()
int main(int argc, char **argv)
static const G4double eps
const G4ElementVector * GetElementVector() const
static G4NistManager * Instance()
const G4ParticleDefinition * particle
G4ParticleDefinition * theGamma
G4GLOB_DLL std::ostream G4cout
virtual G4double MinPrimaryEnergy(const G4Material *, const G4ParticleDefinition *, G4double cut) override
virtual G4ThreeVector & SampleDirection(const G4DynamicParticle *dp, G4double finalTotalEnergy, G4int Z, const G4Material *)=0
G4double GetElectronDensity() const
const G4ThreeVector & GetMomentumDirection() const
void SetProposedKineticEnergy(G4double proposedKinEnergy)
virtual ~G4eBremsstrahlungRelModel()
std::vector< G4EmElementSelector * > * GetElementSelectors()
void SetProposedMomentumDirection(const G4ThreeVector &dir)
G4double GetRadlen() const
const G4double * GetAtomicNumDensityVector() const
G4eBremsstrahlungRelModel(const G4ParticleDefinition *p=0, const G4String &nam="eBremLPM")
static const G4double emax
G4double G4Log(G4double x)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
void SetElementSelectors(std::vector< G4EmElementSelector * > *)
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
virtual void SetupForMaterial(const G4ParticleDefinition *, const G4Material *, G4double) override
G4double GetPDGMass() const
T max(const T t1, const T t2)
brief Return the largest of the two arguments
virtual G4double ComputeDXSectionPerAtom(G4double gammaEnergy)
void SetLPMFlag(G4bool val)
void SetAngularDistribution(G4VEmAngularDistribution *)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
static G4Electron * Electron()
static constexpr double MeV
const G4String & GetName() const
G4ParticleChangeForLoss * fParticleChange
static constexpr double pi
size_t GetNumberOfElements() const
void ProposeTrackStatus(G4TrackStatus status)
virtual void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel) override
void SetLowEnergyLimit(G4double)
virtual G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy) override
void SetCurrentElement(const G4Element *)
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double tkin, G4double Z, G4double, G4double cutEnergy, G4double maxEnergy=DBL_MAX) override
const G4Element * SelectRandomAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
const G4Material * GetMaterial() const