Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4EmCorrections Class Reference

#include <G4EmCorrections.hh>

Public Member Functions

 G4EmCorrections (G4int verb)
 
 ~G4EmCorrections ()
 
G4double HighOrderCorrections (const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy, const G4double cutEnergy)
 
G4double IonHighOrderCorrections (const G4ParticleDefinition *, const G4MaterialCutsCouple *, const G4double kineticEnergy)
 
G4double ComputeIonCorrections (const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy)
 
G4double IonBarkasCorrection (const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy)
 
G4double Bethe (const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy)
 
G4double SpinCorrection (const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy)
 
G4double KShellCorrection (const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy)
 
G4double LShellCorrection (const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy)
 
G4double ShellCorrection (const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy)
 
G4double ShellCorrectionSTD (const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy)
 
G4double DensityCorrection (const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy)
 
G4double BarkasCorrection (const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy, const G4bool isInitialized=false)
 
G4double BlochCorrection (const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy, const G4bool isInitialized=false)
 
G4double MottCorrection (const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy, const G4bool isInitialized=false)
 
void AddStoppingData (const G4int Z, const G4int A, const G4String &materialName, G4PhysicsVector *dVector)
 
void InitialiseForNewRun ()
 
G4double EffectiveChargeCorrection (const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy)
 
G4double GetParticleCharge (const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy)
 
G4double EffectiveChargeSquareRatio (const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy)
 
void SetIonisationModels (G4VEmModel *mod1=nullptr, G4VEmModel *mod2=nullptr)
 
G4int GetNumberOfStoppingVectors () const
 
void SetVerbose (G4int verb)
 
G4EmCorrectionsoperator= (const G4EmCorrections &right)=delete
 
 G4EmCorrections (const G4EmCorrections &)=delete
 

Detailed Description

Definition at line 68 of file G4EmCorrections.hh.

Constructor & Destructor Documentation

◆ G4EmCorrections() [1/2]

G4EmCorrections::G4EmCorrections ( G4int verb)
explicit

Definition at line 111 of file G4EmCorrections.cc.

112 : verbose(verb)
113{
114 eth = 2.0*CLHEP::MeV;
115 eCorrMin = 25.*CLHEP::keV;
116 eCorrMax = 1.*CLHEP::GeV;
117
119 g4calc = G4Pow::GetInstance();
120
121 // fill vectors
122 if (nullptr == sBarkasCorr) {
123 Initialise();
124 isInitializer = true;
125 }
126}
G4IonTable * GetIonTable() const
static G4ParticleTable * GetParticleTable()
static G4Pow * GetInstance()
Definition G4Pow.cc:41

◆ ~G4EmCorrections()

G4EmCorrections::~G4EmCorrections ( )

Definition at line 130 of file G4EmCorrections.cc.

131{
132 for (G4int i=0; i<nIons; ++i) { delete stopData[i]; }
133 if (isInitializer) {
134 delete sBarkasCorr;
135 delete sThetaK;
136 delete sThetaL;
137 sBarkasCorr = sThetaK = sThetaL = nullptr;
138 }
139}
int G4int
Definition G4Types.hh:85

◆ G4EmCorrections() [2/2]

G4EmCorrections::G4EmCorrections ( const G4EmCorrections & )
delete

Member Function Documentation

◆ AddStoppingData()

void G4EmCorrections::AddStoppingData ( const G4int Z,
const G4int A,
const G4String & materialName,
G4PhysicsVector * dVector )

Definition at line 772 of file G4EmCorrections.cc.

775{
776 G4int i = 0;
777 for(; i<nIons; ++i) {
778 if(Z == Zion[i] && A == Aion[i] && mname == materialName[i]) break;
779 }
780 if(i == nIons) {
781 Zion.push_back(Z);
782 Aion.push_back(A);
783 materialName.push_back(mname);
784 materialList.push_back(nullptr);
785 ionList.push_back(nullptr);
786 stopData.push_back(dVector);
787 nIons++;
788 if(verbose > 1) {
789 G4cout << "AddStoppingData Z= " << Z << " A= " << A << " " << mname
790 << " idx= " << i << G4endl;
791 }
792 }
793}
const G4double A[17]
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout

◆ BarkasCorrection()

G4double G4EmCorrections::BarkasCorrection ( const G4ParticleDefinition * p,
const G4Material * mat,
const G4double kineticEnergy,
const G4bool isInitialized = false )

Definition at line 635 of file G4EmCorrections.cc.

639{
640 // . Z^3 Barkas effect in the stopping power of matter for charged particles
641 // J.C Ashley and R.H.Ritchie
642 // Physical review B Vol.5 No.7 1 April 1972 pp. 2393-2397
643 // valid for kineticEnergy > 0.5 MeV
644
645 if (!isInitialized) { SetupKinematics(p, mat, e); }
646 G4double BarkasTerm = 0.0;
647
648 for (G4int i = 0; i<numberOfElements; ++i) {
649
650 const G4int iz = (*theElementVector)[i]->GetZasInt();
651 if(iz == 47) {
652 BarkasTerm += atomDensity[i]*0.006812*G4Exp(-G4Log(beta)*0.9);
653 } else if(iz >= 64) {
654 BarkasTerm += atomDensity[i]*0.002833*G4Exp(-G4Log(beta)*1.2);
655 } else {
656
657 const G4double Z = (*theElementVector)[i]->GetZ();
658 const G4double X = ba2 / Z;
659 G4double b = 1.3;
660 if(1 == iz) { b = (material->GetName() == "G4_lH2") ? 0.6 : 1.8; }
661 else if(2 == iz) { b = 0.6; }
662 else if(10 >= iz) { b = 1.8; }
663 else if(17 >= iz) { b = 1.4; }
664 else if(18 == iz) { b = 1.8; }
665 else if(25 >= iz) { b = 1.4; }
666 else if(50 >= iz) { b = 1.35;}
667
668 const G4double W = b/std::sqrt(X);
669
670 G4double val = sBarkasCorr->Value(W, idxBarkas);
671 if (W > sWmaxBarkas) { val *= (sWmaxBarkas/W); }
672 // G4cout << "i= " << i << " b= " << b << " W= " << W
673 // << " Z= " << Z << " X= " << X << " val= " << val<< G4endl;
674 BarkasTerm += val*atomDensity[i] / (std::sqrt(Z*X)*X);
675 }
676 }
677
678 BarkasTerm *= 1.29*charge/material->GetTotNbOfAtomsPerVolume();
679
680 return BarkasTerm;
681}
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition G4Exp.hh:180
G4double G4Log(G4double x)
Definition G4Log.hh:227
double G4double
Definition G4Types.hh:83
G4double GetTotNbOfAtomsPerVolume() const
const G4String & GetName() const
G4double Value(const G4double energy, std::size_t &lastidx) const
#define W
Definition crc32.c:85

Referenced by ComputeIonCorrections(), G4LindhardSorensenIonModel::CorrectionsAlongStep(), HighOrderCorrections(), and IonBarkasCorrection().

◆ Bethe()

G4double G4EmCorrections::Bethe ( const G4ParticleDefinition * p,
const G4Material * mat,
const G4double kineticEnergy )

Definition at line 290 of file G4EmCorrections.cc.

293{
294 SetupKinematics(p, mat, e);
295 const G4double eexc = material->GetIonisation()->GetMeanExcitationEnergy();
296 const G4double eexc2 = eexc*eexc;
297 return 0.5*G4Log(2.0*electron_mass_c2*bg2*tmax/eexc2)-beta2;
298}
G4double GetMeanExcitationEnergy() const
G4IonisParamMat * GetIonisation() const

◆ BlochCorrection()

G4double G4EmCorrections::BlochCorrection ( const G4ParticleDefinition * p,
const G4Material * mat,
const G4double kineticEnergy,
const G4bool isInitialized = false )

Definition at line 685 of file G4EmCorrections.cc.

689{
690 if (!isInitialized) { SetupKinematics(p, mat, e); }
691
692 G4double y2 = q2/ba2;
693
694 G4double term = 1.0/(1.0 + y2);
695 G4double del;
696 G4double j = 1.0;
697 do {
698 j += 1.0;
699 del = 1.0/(j* (j*j + y2));
700 term += del;
701 // Loop checking, 03-Aug-2015, Vladimir Ivanchenko
702 } while (del > 0.01*term);
703
704 return -y2*term;
705}

Referenced by ComputeIonCorrections(), and HighOrderCorrections().

◆ ComputeIonCorrections()

G4double G4EmCorrections::ComputeIonCorrections ( const G4ParticleDefinition * p,
const G4Material * mat,
const G4double kineticEnergy )

Definition at line 218 of file G4EmCorrections.cc.

221{
222 // . Z^3 Barkas effect in the stopping power of matter for charged particles
223 // J.C Ashley and R.H.Ritchie
224 // Physical review B Vol.5 No.7 1 April 1972 pagg. 2393-2397
225 // and ICRU49 report
226 // valid for kineticEnergy < 0.5 MeV
227 // Other corrections from S.P.Ahlen Rev. Mod. Phys., Vol 52, No1, 1980
228 SetupKinematics(p, mat, e);
229 if(tau <= 0.0) { return 0.0; }
230
231 const G4double Barkas = BarkasCorrection (p, mat, e, true);
232 const G4double Bloch = BlochCorrection (p, mat, e, true);
233 const G4double Mott = MottCorrection (p, mat, e, true);
234
235 G4double sum = 2.0*(Barkas*(charge - 1.0)/charge + Bloch) + Mott;
236
237 if(verbose > 1) {
238 G4cout << "EmCorrections: E(MeV)= " << e/MeV << " Barkas= " << Barkas
239 << " Bloch= " << Bloch << " Mott= " << Mott
240 << " Sum= " << sum << G4endl;
241 }
242 sum *= material->GetElectronDensity() * q2 * CLHEP::twopi_mc2_rcl2 /beta2;
243
244 if(verbose > 1) { G4cout << " Sum= " << sum << G4endl; }
245 return sum;
246}
G4double MottCorrection(const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy, const G4bool isInitialized=false)
G4double BlochCorrection(const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy, const G4bool isInitialized=false)
G4double BarkasCorrection(const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy, const G4bool isInitialized=false)
G4double GetElectronDensity() const

Referenced by IonHighOrderCorrections().

◆ DensityCorrection()

G4double G4EmCorrections::DensityCorrection ( const G4ParticleDefinition * p,
const G4Material * mat,
const G4double kineticEnergy )

Definition at line 608 of file G4EmCorrections.cc.

611{
612 SetupKinematics(p, mat, e);
613
614 G4double cden = material->GetIonisation()->GetCdensity();
615 G4double mden = material->GetIonisation()->GetMdensity();
616 G4double aden = material->GetIonisation()->GetAdensity();
617 G4double x0den = material->GetIonisation()->GetX0density();
618 G4double x1den = material->GetIonisation()->GetX1density();
619
620 G4double dedx = 0.0;
621
622 // density correction
623 static const G4double twoln10 = 2.0*G4Log(10.0);
624 G4double x = G4Log(bg2)/twoln10;
625 if ( x >= x0den ) {
626 dedx = twoln10*x - cden ;
627 if ( x < x1den ) dedx += aden*G4Exp(G4Log(x1den-x)*mden) ;
628 }
629
630 return dedx;
631}
G4double GetMdensity() const
G4double GetX1density() const
G4double GetX0density() const
G4double GetCdensity() const
G4double GetAdensity() const

◆ EffectiveChargeCorrection()

G4double G4EmCorrections::EffectiveChargeCorrection ( const G4ParticleDefinition * p,
const G4Material * mat,
const G4double kineticEnergy )

Definition at line 721 of file G4EmCorrections.cc.

724{
725 G4double factor = 1.0;
726 if(p->GetPDGCharge() <= 2.5*CLHEP::eplus || nIons <= 0) { return factor; }
727
728 if(verbose > 1) {
729 G4cout << "EffectiveChargeCorrection: " << p->GetParticleName()
730 << " in " << mat->GetName()
731 << " ekin(MeV)= " << ekin/MeV << G4endl;
732 }
733
734 if(p != curParticle || mat != curMaterial) {
735 curParticle = p;
736 curMaterial = mat;
737 curVector = nullptr;
738 currentZ = p->GetAtomicNumber();
739 if(verbose > 1) {
740 G4cout << "G4EmCorrections::EffectiveChargeCorrection: Zion= "
741 << currentZ << " Aion= " << p->GetPDGMass()/amu_c2 << G4endl;
742 }
743 massFactor = CLHEP::proton_mass_c2/p->GetPDGMass();
744 idx = -1;
745
746 for(G4int i=0; i<nIons; ++i) {
747 if(materialList[i] == mat && currentZ == Zion[i]) {
748 idx = i;
749 break;
750 }
751 }
752 //G4cout << " idx= " << idx << " dz= " << G4endl;
753 if(idx >= 0) {
754 if(nullptr == ionList[idx]) { BuildCorrectionVector(); }
755 curVector = stopData[idx];
756 } else {
757 return factor;
758 }
759 }
760 if(nullptr != curVector) {
761 factor = curVector->Value(ekin*massFactor);
762 if(verbose > 1) {
763 G4cout << "E= " << ekin << " factor= " << factor << " massfactor= "
764 << massFactor << G4endl;
765 }
766 }
767 return factor;
768}
G4int GetAtomicNumber() const
const G4String & GetParticleName() const

Referenced by G4AtimaEnergyLossModel::GetChargeSquareRatio().

◆ EffectiveChargeSquareRatio()

◆ GetNumberOfStoppingVectors()

G4int G4EmCorrections::GetNumberOfStoppingVectors ( ) const
inline

Definition at line 306 of file G4EmCorrections.hh.

307{
308 return nIons;
309}

◆ GetParticleCharge()

G4double G4EmCorrections::GetParticleCharge ( const G4ParticleDefinition * p,
const G4Material * mat,
const G4double kineticEnergy )
inline

Definition at line 312 of file G4EmCorrections.hh.

315{
316 return effCharge.EffectiveCharge(p,mat,kineticEnergy);
317}
G4double EffectiveCharge(const G4ParticleDefinition *p, const G4Material *material, G4double kineticEnergy)

Referenced by G4AtimaEnergyLossModel::GetParticleCharge(), G4BetheBlochModel::GetParticleCharge(), G4BraggModel::GetParticleCharge(), and G4LindhardSorensenIonModel::GetParticleCharge().

◆ HighOrderCorrections()

G4double G4EmCorrections::HighOrderCorrections ( const G4ParticleDefinition * p,
const G4Material * mat,
const G4double kineticEnergy,
const G4double cutEnergy )

Definition at line 172 of file G4EmCorrections.cc.

175{
176 // . Z^3 Barkas effect in the stopping power of matter for charged particles
177 // J.C Ashley and R.H.Ritchie
178 // Physical review B Vol.5 No.7 1 April 1972 pagg. 2393-2397
179 // and ICRU49 report
180 // valid for kineticEnergy < 0.5 MeV
181 // Other corrections from S.P.Ahlen Rev. Mod. Phys., Vol 52, No1, 1980
182
183 SetupKinematics(p, mat, e);
184 if(tau <= 0.0) { return 0.0; }
185
186 const G4double Barkas = BarkasCorrection(p, mat, e, true);
187 const G4double Bloch = BlochCorrection(p, mat, e, true);
188 const G4double Mott = MottCorrection(p, mat, e, true);
189
190 G4double sum = 2.0*(Barkas + Bloch) + Mott;
191
192 if(verbose > 1) {
193 G4cout << "EmCorrections: E(MeV)= " << e/MeV << " Barkas= " << Barkas
194 << " Bloch= " << Bloch << " Mott= " << Mott
195 << " Sum= " << sum << " q2= " << q2 << G4endl;
196 G4cout << " ShellCorrection: " << ShellCorrection(p, mat, e)
197 << " Kshell= " << KShellCorrection(p, mat, e)
198 << " Lshell= " << LShellCorrection(p, mat, e)
199 << " " << mat->GetName() << G4endl;
200 }
201 sum *= material->GetElectronDensity()*q2*CLHEP::twopi_mc2_rcl2/beta2;
202 return sum;
203}
G4double KShellCorrection(const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy)
G4double LShellCorrection(const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy)
G4double ShellCorrection(const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy)

Referenced by G4BetheBlochModel::ComputeDEDXPerVolume(), and G4MuBetheBlochModel::ComputeDEDXPerVolume().

◆ InitialiseForNewRun()

void G4EmCorrections::InitialiseForNewRun ( )

Definition at line 864 of file G4EmCorrections.cc.

865{
867 ncouples = tb->GetTableSize();
868 if(currmat.size() != ncouples) {
869 currmat.resize(ncouples);
870 for(auto it = thcorr.begin(); it != thcorr.end(); ++it){
871 (it->second).clear();
872 }
873 thcorr.clear();
874 for(std::size_t i=0; i<ncouples; ++i) {
875 currmat[i] = tb->GetMaterialCutsCouple((G4int)i)->GetMaterial();
876 G4String nam = currmat[i]->GetName();
877 for(G4int j=0; j<nIons; ++j) {
878 if(nam == materialName[j]) { materialList[j] = currmat[i]; }
879 }
880 }
881 }
882}
const G4Material * GetMaterial() const
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
std::size_t GetTableSize() const
static G4ProductionCutsTable * GetProductionCutsTable()

◆ IonBarkasCorrection()

G4double G4EmCorrections::IonBarkasCorrection ( const G4ParticleDefinition * p,
const G4Material * mat,
const G4double kineticEnergy )

Definition at line 207 of file G4EmCorrections.cc.

210{
211 SetupKinematics(p, mat, e);
212 return 2.0*BarkasCorrection(p, mat, e, true)*
213 material->GetElectronDensity() * q2 * CLHEP::twopi_mc2_rcl2 /beta2;
214}

Referenced by G4BetheBlochModel::ComputeDEDXPerVolume().

◆ IonHighOrderCorrections()

G4double G4EmCorrections::IonHighOrderCorrections ( const G4ParticleDefinition * p,
const G4MaterialCutsCouple * couple,
const G4double kineticEnergy )

Definition at line 250 of file G4EmCorrections.cc.

253{
254 // . Z^3 Barkas effect in the stopping power of matter for charged particles
255 // J.C Ashley and R.H.Ritchie
256 // Physical review B Vol.5 No.7 1 April 1972 pagg. 2393-2397
257 // and ICRU49 report
258 // valid for kineticEnergy < 0.5 MeV
259 // Other corrections from S.P.Ahlen Rev. Mod. Phys., Vol 52, No1, 1980
260
261 G4double sum = 0.0;
262
263 if(nullptr != ionHEModel) {
264 G4int Z = G4lrint(p->GetPDGCharge()*inveplus);
265 Z = std::max(std::min(Z, 99), 1);
266
267 const G4double ethscaled = eth*p->GetPDGMass()/CLHEP::proton_mass_c2;
268 const G4int ionPDG = p->GetPDGEncoding();
269 if(thcorr.find(ionPDG)==thcorr.end()) { // Not found: fill the map
270 std::vector<G4double> v;
271 for(std::size_t i=0; i<ncouples; ++i){
272 v.push_back(ethscaled*ComputeIonCorrections(p,currmat[i],ethscaled));
273 }
274 thcorr.insert(std::pair< G4int, std::vector<G4double> >(ionPDG,v));
275 }
276
277 const G4double rest = (thcorr.find(ionPDG)->second)[couple->GetIndex()];
278
279 sum = ComputeIonCorrections(p,couple->GetMaterial(),e) - rest/e;
280
281 if(verbose > 1) {
282 G4cout << " Sum= " << sum << " dSum= " << rest/e << G4endl;
283 }
284 }
285 return sum;
286}
G4double ComputeIonCorrections(const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy)
int G4lrint(double ad)
Definition templates.hh:134

◆ KShellCorrection()

G4double G4EmCorrections::KShellCorrection ( const G4ParticleDefinition * p,
const G4Material * mat,
const G4double kineticEnergy )

Definition at line 313 of file G4EmCorrections.cc.

316{
317 SetupKinematics(p, mat, e);
318 G4double term = 0.0;
319 for (G4int i = 0; i<numberOfElements; ++i) {
320
321 G4double Z = (*theElementVector)[i]->GetZ();
322 G4int iz = (*theElementVector)[i]->GetZasInt();
323 G4double f = 1.0;
324 G4double Z2= (Z-0.3)*(Z-0.3);
325 if(1 == iz) {
326 f = 0.5;
327 Z2 = 1.0;
328 }
329 const G4double eta = ba2/Z2;
330 const G4double tet = (11 < iz) ? sThetaK->Value(Z) : Z2*(1. + Z2*0.25*alpha2);
331 term += f*atomDensity[i]*KShell(tet,eta)/Z;
332 }
333
334 term /= material->GetTotNbOfAtomsPerVolume();
335
336 return term;
337}
const G4double alpha2

Referenced by HighOrderCorrections().

◆ LShellCorrection()

G4double G4EmCorrections::LShellCorrection ( const G4ParticleDefinition * p,
const G4Material * mat,
const G4double kineticEnergy )

Definition at line 341 of file G4EmCorrections.cc.

344{
345 SetupKinematics(p, mat, e);
346 G4double term = 0.0;
347 for (G4int i = 0; i<numberOfElements; ++i) {
348
349 const G4double Z = (*theElementVector)[i]->GetZ();
350 const G4int iz = (*theElementVector)[i]->GetZasInt();
351 if(2 < iz) {
352 const G4double Zeff = (iz < 10) ? Z - ZD[iz] : Z - ZD[10];
353 const G4double Z2= Zeff*Zeff;
354 const G4double eta = ba2/Z2;
355 G4double tet = sThetaL->Value(Z);
356 G4int nmax = std::min(4, G4AtomicShells::GetNumberOfShells(iz));
357 for (G4int j=1; j<nmax; ++j) {
359 if (15 >= iz) {
360 tet = (3 > j) ? 0.25*Z2*(1.0 + 5*Z2*alpha2/16.) :
361 0.25*Z2*(1.0 + Z2*alpha2/16.);
362 }
363 //G4cout << " LShell: j= " << j << " ne= " << ne << " e(eV)= " << e/eV
364 // << " ThetaL= " << tet << G4endl;
365 term += 0.125*ne*atomDensity[i]*LShell(tet,eta)/Z;
366 }
367 }
368 }
369
370 term /= material->GetTotNbOfAtomsPerVolume();
371
372 return term;
373}
static G4int GetNumberOfElectrons(G4int Z, G4int SubshellNb)
static G4int GetNumberOfShells(G4int Z)

Referenced by HighOrderCorrections().

◆ MottCorrection()

G4double G4EmCorrections::MottCorrection ( const G4ParticleDefinition * p,
const G4Material * mat,
const G4double kineticEnergy,
const G4bool isInitialized = false )

Definition at line 709 of file G4EmCorrections.cc.

713{
714 if (!isInitialized) { SetupKinematics(p, mat, e); }
715 return CLHEP::pi*CLHEP::fine_structure_const*beta*charge;
716}

Referenced by ComputeIonCorrections(), and HighOrderCorrections().

◆ operator=()

G4EmCorrections & G4EmCorrections::operator= ( const G4EmCorrections & right)
delete

◆ SetIonisationModels()

void G4EmCorrections::SetIonisationModels ( G4VEmModel * mod1 = nullptr,
G4VEmModel * mod2 = nullptr )
inline

Definition at line 300 of file G4EmCorrections.hh.

301{
302 if(nullptr != mod1) { ionLEModel = mod1; }
303 if(nullptr != mod2) { ionHEModel = mod2; }
304}

◆ SetVerbose()

void G4EmCorrections::SetVerbose ( G4int verb)
inline

Definition at line 327 of file G4EmCorrections.hh.

328{
329 verbose = verb;
330}

Referenced by G4LossTableManager::ResetParameters().

◆ ShellCorrection()

G4double G4EmCorrections::ShellCorrection ( const G4ParticleDefinition * p,
const G4Material * mat,
const G4double kineticEnergy )

Definition at line 507 of file G4EmCorrections.cc.

510{
511 SetupKinematics(p, mat, ekin);
512 G4double term = 0.0;
513 //G4cout << "### G4EmCorrections::ShellCorrection " << mat->GetName()
514 // << " " << ekin/MeV << " MeV " << G4endl;
515 for (G4int i = 0; i<numberOfElements; ++i) {
516
517 G4double res = 0.0;
518 G4double res0 = 0.0;
519 const G4double Z = (*theElementVector)[i]->GetZ();
520 const G4int iz = (*theElementVector)[i]->GetZasInt();
521 G4double Z2= (Z-0.3)*(Z-0.3);
522 G4double f = 1.0;
523 if(1 == iz) {
524 f = 0.5;
525 Z2 = 1.0;
526 }
527 G4double eta = ba2/Z2;
528 G4double tet = (11 < iz) ? sThetaK->Value(Z) : Z2*(1. + Z2*0.25*alpha2);
529 res0 = f*KShell(tet,eta);
530 res += res0;
531 //G4cout << " Z= " << iz << " Shell 0" << " tet= " << tet
532 // << " eta= " << eta << " resK= " << res0 << G4endl;
533
534 if(2 < iz) {
535 const G4double Zeff = (iz < 10) ? Z - ZD[iz] : Z - ZD[10];
536 Z2= Zeff*Zeff;
537 eta = ba2/Z2;
538 tet = sThetaL->Value(Z);
539 f = 0.125;
541 const G4int nmax = std::min(4, ntot);
542 G4double norm = 0.0;
543 G4double eshell = 0.0;
544 for(G4int j=1; j<nmax; ++j) {
546 if(15 >= iz) {
547 tet = (3 > j) ? 0.25*Z2*(1.0 + 5*Z2*alpha2/16.) :
548 0.25*Z2*(1.0 + Z2*alpha2/16.);
549 }
550 norm += ne;
551 eshell += tet*ne;
552 res0 = f*ne*LShell(tet,eta);
553 res += res0;
554 //G4cout << " Zeff= " << Zeff << " Shell " << j << " Ne= " << ne
555 // << " tet= " << tet << " eta= " << eta
556 // << " resL= " << res0 << G4endl;
557 }
558 if(ntot > nmax) {
559 eshell /= norm;
560
561 static const G4double HM[53] = {
562 12.0, 12.0, 12.0, 12.0, 11.9, 11.7, 11.5, 11.2, 10.8, 10.4,
563 10.0, 9.51, 8.97, 8.52, 8.03, 7.46, 6.95, 6.53, 6.18, 5.87,
564 5.61, 5.39, 5.19, 5.01, 4.86, 4.72, 4.62, 4.53, 4.44, 4.38,
565 4.32, 4.26, 4.20, 4.15, 4.1, 4.04, 4.00, 3.95, 3.93, 3.91,
566 3.90, 3.89, 3.89, 3.88, 3.88, 3.88, 3.88, 3.88, 3.89, 3.89,
567 3.90, 3.92, 3.93 };
568 static const G4double HN[31] = {
569 75.5, 61.9, 52.2, 45.1, 39.6, 35.4, 31.9, 29.1, 27.2, 25.8,
570 24.5, 23.6, 22.7, 22.0, 21.4, 20.9, 20.5, 20.2, 19.9, 19.7,
571 19.5, 19.3, 19.2, 19.1, 18.4, 18.8, 18.7, 18.6, 18.5, 18.4,
572 18.2};
573
574 // Add M-shell
575 if(28 > iz) {
576 res += f*(iz - 10)*LShell(eshell,HM[iz-11]*eta);
577 } else if(63 > iz) {
578 res += f*18*LShell(eshell,HM[iz-11]*eta);
579 } else {
580 res += f*18*LShell(eshell,HM[52]*eta);
581 }
582 // Add N-shell
583 if(32 < iz) {
584 if(60 > iz) {
585 res += f*(iz - 28)*LShell(eshell,HN[iz-33]*eta);
586 } else if(63 > iz) {
587 res += 4*LShell(eshell,HN[iz-33]*eta);
588 } else {
589 res += 4*LShell(eshell,HN[30]*eta);
590 }
591 // Add O-P-shells
592 if(60 < iz) {
593 res += f*(iz - 60)*LShell(eshell,150*eta);
594 }
595 }
596 }
597 }
598 term += res*atomDensity[i]/Z;
599 }
600
601 term /= material->GetTotNbOfAtomsPerVolume();
602 //G4cout << "##Shell Correction=" << term << G4endl;
603 return term;
604}

Referenced by G4BetheBlochModel::ComputeDEDXPerVolume(), G4MuBetheBlochModel::ComputeDEDXPerVolume(), and HighOrderCorrections().

◆ ShellCorrectionSTD()

G4double G4EmCorrections::ShellCorrectionSTD ( const G4ParticleDefinition * p,
const G4Material * mat,
const G4double kineticEnergy )

Definition at line 473 of file G4EmCorrections.cc.

476{
477 SetupKinematics(p, mat, e);
478 G4double taulim= 8.0*MeV/mass;
479 G4double bg2lim= taulim * (taulim+2.0);
480
481 G4double* shellCorrectionVector =
483 G4double sh = 0.0;
484 G4double x = 1.0;
485 G4double taul = material->GetIonisation()->GetTaul();
486
487 if ( bg2 >= bg2lim ) {
488 for (G4int k=0; k<3; ++k) {
489 x *= bg2 ;
490 sh += shellCorrectionVector[k]/x;
491 }
492
493 } else {
494 for (G4int k=0; k<3; ++k) {
495 x *= bg2lim ;
496 sh += shellCorrectionVector[k]/x;
497 }
498 sh *= G4Log(tau/taul)/G4Log(taulim/taul);
499 }
500 sh *= 0.5;
501 return sh;
502}
G4double * GetShellCorrectionVector() const
G4double GetTaul() const

◆ SpinCorrection()

G4double G4EmCorrections::SpinCorrection ( const G4ParticleDefinition * p,
const G4Material * mat,
const G4double kineticEnergy )

Definition at line 302 of file G4EmCorrections.cc.

305{
306 SetupKinematics(p, mat, e);
307 const G4double dedx = 0.5*tmax/(kinEnergy + mass);
308 return 0.5*dedx*dedx;
309}

The documentation for this class was generated from the following files: