75 G4eBremsstrahlungRelModel::xgi[]={ 0.0199, 0.1017, 0.2372, 0.4083,
76 0.5917, 0.7628, 0.8983, 0.9801 };
78 G4eBremsstrahlungRelModel::wgi[]={ 0.0506, 0.1112, 0.1569, 0.1813,
79 0.1813, 0.1569, 0.1112, 0.0506 };
81 G4eBremsstrahlungRelModel::Fel_light[] = {0., 5.31 , 4.79 , 4.74 , 4.71};
83 G4eBremsstrahlungRelModel::Finel_light[] = {0., 6.144 , 5.621 , 5.805 , 5.924};
95 fXiLPM(0), fPhiLPM(0), fGLPM(0),
96 use_completescreening(false),isInitialised(false)
101 lowestKinEnergy = 1.0*
MeV;
112 = xiLPM = phiLPM = gLPM = klpm = kp = 0.0;
114 energyThresholdLPM = 1.e39;
116 InitialiseConstants();
117 if(p) { SetParticle(p); }
122 void G4eBremsstrahlungRelModel::InitialiseConstants()
124 facFel =
G4Log(184.15);
125 facFinel =
G4Log(1194.);
127 preS1 = 1./(184.15*184.15);
154 lpmEnergy = mat->
GetRadlen()*fLPMconstant;
160 energyThresholdLPM=1.e39;
168 klpm=totalEnergy*totalEnergy/lpmEnergy;
178 if(p) { SetParticle(p); }
184 if(isInitialised) {
return; }
186 isInitialised =
true;
204 return std::max(lowestKinEnergy, cut);
218 if(cut == 0.0) {
return 0.0; }
233 dedx += theAtomicNumDensityVector[i]*
currentZ*
currentZ*ComputeBremLoss(cut);
256 for(
G4int l=0; l<
n; l++) {
258 for(
G4int i=0; i<8; i++) {
263 xs = ComputeRelDXSectionPerAtom(eg);
291 if(cut >= tmax) {
return 0.0; }
295 G4double cross = ComputeXSectionPerAtom(cut);
298 if(tmax <
kinEnergy) { cross -= ComputeXSectionPerAtom(tmax); }
323 for(
G4int l=0; l<
n; l++) {
325 for(
G4int i=0; i<8; i++) {
330 xs = ComputeRelDXSectionPerAtom(eg);
346 void G4eBremsstrahlungRelModel::CalcLPMFunctions(
G4double k)
353 G4double logS1 = 2./3.*lnZ-2.*facFel;
360 else if (sprime>sqrt(2.)*s1) {
362 xiLPM = 1+h-0.08*(1-h)*(1-
sqr(1-h))/logTS1;
375 if (s0<=s1) xiLPM = 2.;
376 else if ( (s1<s0) && (s0<=1) ) { xiLPM = 1. +
G4Log(s0)/logS1; }
387 phiLPM = 6.*s0 - 18.84955592153876*s2 + 39.47841760435743*s3
388 - 57.69873135166053*s4;
389 gLPM = 37.69911184307752*s2 - 236.8705056261446*s3 + 807.7822389*s4;
391 else if (s0<1.9516) {
394 phiLPM = 1.-
G4Exp(-6.*s0*(1.+(3.-
pi)*s0)
395 +s3/(0.623+0.795*s0+0.658*s2));
396 if (s0<0.415827397755) {
398 G4double psiLPM = 1-
G4Exp(-4*s0-8*s2/(1+3.936*s0+4.97*s2-0.05*s3+7.50*s4));
399 gLPM = 3*psiLPM-2*phiLPM;
403 G4double pre = -0.16072300849123999 + s0*3.7550300067531581 + s2*-1.7981383069010097
404 + s3*0.67282686077812381 + s4*-0.1207722909879257;
410 phiLPM = 1. - 0.0119048/s4;
411 gLPM = 1. - 0.0230655/s4;
416 if (xiLPM*phiLPM>1. || s0>0.57) { xiLPM=1./phiLPM; }
422 G4double G4eBremsstrahlungRelModel::ComputeRelDXSectionPerAtom(
G4double gammaEnergy)
427 if(gammaEnergy < 0.0) {
return 0.0; }
437 CalcLPMFunctions(gammaEnergy);
439 G4double mainLPM = xiLPM*(y2 * gLPM + yone2*phiLPM) * ( (Fel-fCoulomb) + Finel/
currentZ );
442 G4double cross = mainLPM+secondTerm;
455 if(gammaEnergy < 0.0) {
return 0.0; }
461 if (use_completescreening||
currentZ<5) {
463 main = (3./4.*y*y - y + 1.) * ( (Fel-fCoulomb) + Finel/
currentZ );
464 secondTerm = (1.-
y)/12.*(1.+1./
currentZ);
474 main = (3./4.*y*y - y + 1.) * ( (0.25*phi1-1./3.*lnZ-fCoulomb) + (0.25*psi1-2./3.*lnZ)/
currentZ );
475 secondTerm = (1.-
y)/8.*(phi1m2+psi1m2/
currentZ);
484 std::vector<G4DynamicParticle*>* vdp,
494 if(cut >= emax) {
return; }
508 if(totalEnergy < energyThresholdLPM) { highe =
false; }
516 if(x < 0.0) { x = 0.0; }
517 gammaEnergy = sqrt(x);
518 if(highe) { f = ComputeRelDXSectionPerAtom(gammaEnergy); }
522 G4cout <<
"### G4eBremsstrahlungRelModel Warning: Majoranta exceeded! "
523 << f <<
" > " << fMax
524 <<
" Egamma(MeV)= " << gammaEnergy
525 <<
" Ee(MeV)= " << kineticEnergy
545 vdp->push_back(gamma);
549 - gammaEnergy*gammaDirection).unit();
552 G4double finalE = kineticEnergy - gammaEnergy;
G4double LowEnergyLimit() const
G4ParticleChangeForLoss * GetParticleChangeForLoss()
G4double SecondaryThreshold() const
G4bool isElectron(G4int ityp)
std::vector< G4Element * > G4ElementVector
G4double GetKineticEnergy() const
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)
virtual G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy)
G4VEmAngularDistribution * GetAngularDistribution()
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double tkin, G4double Z, G4double, G4double cutEnergy, G4double maxEnergy=DBL_MAX)
int main(int argc, char **argv)
const G4ElementVector * GetElementVector() const
virtual void SetupForMaterial(const G4ParticleDefinition *, const G4Material *, G4double)
static G4NistManager * Instance()
const G4ParticleDefinition * particle
G4ParticleDefinition * theGamma
G4GLOB_DLL std::ostream G4cout
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")
G4double G4Log(G4double x)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double cutEnergy, G4double maxEnergy)
virtual G4double MinPrimaryEnergy(const G4Material *, const G4ParticleDefinition *, G4double cut)
void SetElementSelectors(std::vector< G4EmElementSelector * > *)
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()
const G4String & GetName() const
G4ParticleChangeForLoss * fParticleChange
size_t GetNumberOfElements() const
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)
void ProposeTrackStatus(G4TrackStatus status)
void SetLowEnergyLimit(G4double)
void SetCurrentElement(const G4Element *)
virtual void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel)
const G4Element * SelectRandomAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
const G4Material * GetMaterial() const
void SetCurrentElement(const G4double)