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

#include <G4RToEConvForGamma.hh>

+ Inheritance diagram for G4RToEConvForGamma:

Public Member Functions

 G4RToEConvForGamma ()
 
virtual ~G4RToEConvForGamma ()
 
- Public Member Functions inherited from G4VRangeToEnergyConverter
 G4VRangeToEnergyConverter ()
 
 G4VRangeToEnergyConverter (const G4VRangeToEnergyConverter &r)
 
G4VRangeToEnergyConverteroperator= (const G4VRangeToEnergyConverter &r)
 
virtual ~G4VRangeToEnergyConverter ()
 
G4bool operator== (const G4VRangeToEnergyConverter &r) const
 
G4bool operator!= (const G4VRangeToEnergyConverter &r) const
 
virtual G4double Convert (G4double rangeCut, const G4Material *material)
 
const G4ParticleDefinitionGetParticleType () const
 
const G4PhysicsTableGetLossTable () const
 
virtual void Reset ()
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 

Protected Types

using G4CrossSectionTable = G4LossTable
 
- Protected Types inherited from G4VRangeToEnergyConverter
using G4LossVector = G4PhysicsLogVector
 
using G4RangeVector = G4PhysicsLogVector
 
using G4LossTable = G4PhysicsTable
 

Protected Member Functions

virtual G4double ComputeLoss (G4double AtomicNumber, G4double KineticEnergy)
 
virtual void BuildRangeVector (const G4Material *aMaterial, G4RangeVector *rangeVector)
 
void BuildAbsorptionLengthVector (const G4Material *aMaterial, G4RangeVector *rangeVector)
 
G4double ComputeCrossSection (G4double AtomicNumber, G4double KineticEnergy)
 
- Protected Member Functions inherited from G4VRangeToEnergyConverter
virtual void BuildLossTable ()
 
virtual G4double ComputeLoss (G4double AtomicNumber, G4double KineticEnergy)=0
 
virtual void BuildRangeVector (const G4Material *aMaterial, G4RangeVector *rangeVector)
 
G4double ConvertCutToKineticEnergy (G4RangeVector *theRangeVector, G4double theCutInLength, std::size_t materialIndex) const
 

Protected Attributes

G4double Z = -1.0
 
G4double s200keV = 0.0
 
G4double s1keV = 0.0
 
G4double tmin = 0.0
 
G4double tlow = 0.0
 
G4double smin = 0.0
 
G4double slow = 0.0
 
G4double cmin = 0.0
 
G4double clow = 0.0
 
G4double chigh = 0.0
 
- Protected Attributes inherited from G4VRangeToEnergyConverter
G4double fMaxEnergyCut = 0.0
 
const G4ParticleDefinitiontheParticle = nullptr
 
G4LossTabletheLossTable = nullptr
 
G4int NumberOfElements = 0
 
const G4int TotBin = 300
 
std::vector< G4RangeVector * > fRangeVectorStore
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VRangeToEnergyConverter
static void SetEnergyRange (G4double lowedge, G4double highedge)
 
static G4double GetLowEdgeEnergy ()
 
static G4double GetHighEdgeEnergy ()
 
static G4double GetMaxEnergyCut ()
 
static void SetMaxEnergyCut (G4double value)
 
- Static Protected Attributes inherited from G4VRangeToEnergyConverter
static G4double LowestEnergy = 0.99e-3*MeV
 
static G4double HighestEnergy = 100.0e6*MeV
 
static G4double MaxEnergyCut = 10.0*GeV
 

Detailed Description

Definition at line 43 of file G4RToEConvForGamma.hh.

Member Typedef Documentation

◆ G4CrossSectionTable

Definition at line 55 of file G4RToEConvForGamma.hh.

Constructor & Destructor Documentation

◆ G4RToEConvForGamma()

G4RToEConvForGamma::G4RToEConvForGamma ( )

Definition at line 41 of file G4RToEConvForGamma.cc.

43{
45 if (theParticle == nullptr)
46 {
47#ifdef G4VERBOSE
48 if (GetVerboseLevel()>0)
49 {
50 G4cout << " G4RToEConvForGamma::G4RToEConvForGamma() - ";
51 G4cout << "Gamma is not defined !!" << G4endl;
52 }
53#endif
54 }
55}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
const G4ParticleDefinition * theParticle

◆ ~G4RToEConvForGamma()

G4RToEConvForGamma::~G4RToEConvForGamma ( )
virtual

Definition at line 57 of file G4RToEConvForGamma.cc.

58{
59}

Member Function Documentation

◆ BuildAbsorptionLengthVector()

void G4RToEConvForGamma::BuildAbsorptionLengthVector ( const G4Material aMaterial,
G4RangeVector rangeVector 
)
protected

Definition at line 64 of file G4RToEConvForGamma.cc.

67{
68 // fill the absorption length vector for this material
69 // absorption length is defined here as:
70 // absorption length = 5./ macroscopic absorption cross section
71 //
72 const G4CrossSectionTable* aCrossSectionTable
74 const G4ElementVector* elementVector
75 = aMaterial->GetElementVector();
76 const G4double* atomicNumDensityVector
77 = aMaterial->GetAtomicNumDensityVector();
78
79 // fill absorption length vector
80 G4int NumEl = aMaterial->GetNumberOfElements();
81 G4double absorptionLengthMax = 0.0;
82 for (std::size_t ibin=0; ibin<size_t(TotBin); ++ibin)
83 {
84 G4double SIGMA = 0.;
85 for (std::size_t iel=0; iel<size_t(NumEl); ++iel)
86 {
87 G4int IndEl = (*elementVector)[iel]->GetIndex();
88 SIGMA += atomicNumDensityVector[iel]
89 * (*((*aCrossSectionTable)[IndEl]))[ibin];
90 }
91 // absorption length=5./SIGMA
92 absorptionLengthVector->PutValue(ibin, 5./SIGMA);
93 if (absorptionLengthMax < 5./SIGMA )
94 absorptionLengthMax = 5./SIGMA;
95 }
96}
std::vector< G4Element * > G4ElementVector
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
const G4ElementVector * GetElementVector() const
Definition: G4Material.hh:188
size_t GetNumberOfElements() const
Definition: G4Material.hh:184
const G4double * GetAtomicNumDensityVector() const
Definition: G4Material.hh:214
G4LossTable G4CrossSectionTable

Referenced by BuildRangeVector().

◆ BuildRangeVector()

void G4RToEConvForGamma::BuildRangeVector ( const G4Material aMaterial,
G4RangeVector rangeVector 
)
inlineprotectedvirtual

Reimplemented from G4VRangeToEnergyConverter.

Definition at line 89 of file G4RToEConvForGamma.hh.

91{
92 BuildAbsorptionLengthVector(aMaterial, rangeVector);
93}
void BuildAbsorptionLengthVector(const G4Material *aMaterial, G4RangeVector *rangeVector)

◆ ComputeCrossSection()

G4double G4RToEConvForGamma::ComputeCrossSection ( G4double  AtomicNumber,
G4double  KineticEnergy 
)
protected

Definition at line 101 of file G4RToEConvForGamma.cc.

103{
104 // Compute the "absorption" cross-section of the photon "absorption".
105 // Cross-section means here the sum of the cross-sections of the
106 // pair production, Compton scattering and photoelectric processes
107
108 const G4double t1keV = 1.*keV;
109 const G4double t200keV = 200.*keV;
110 const G4double t100MeV = 100.*MeV;
111
112 // Compute Z dependent quantities in the case of a new AtomicNumber
113 if(std::abs(AtomicNumber-Z)>0.1)
114 {
115 Z = AtomicNumber;
116 G4double Zsquare = Z*Z;
117 G4double Zlog = std::log(Z);
118 G4double Zlogsquare = Zlog*Zlog;
119
120 s200keV = (0.2651-0.1501*Zlog+0.02283*Zlogsquare)*Zsquare;
121 tmin = (0.552+218.5/Z+557.17/Zsquare)*MeV;
122 smin = (0.01239+0.005585*Zlog-0.000923*Zlogsquare)*std::exp(1.5*Zlog);
123 cmin = std::log(s200keV/smin)
124 /(std::log(tmin/t200keV)*std::log(tmin/t200keV));
125 tlow = 0.2*std::exp(-7.355/std::sqrt(Z))*MeV;
126 slow = s200keV
127 * std::exp(0.042*Z*std::log(t200keV/tlow)*std::log(t200keV/tlow));
128 s1keV = 300.*Zsquare;
129 clow = std::log(s1keV/slow)/std::log(tlow/t1keV);
130 chigh = (7.55e-5-0.0542e-5*Z)*Zsquare*Z/std::log(t100MeV/tmin);
131 }
132
133 // Calculate the cross-section (using an approximate empirical formula)
134 G4double xs;
135 if ( KineticEnergy<tlow )
136 {
137 if(KineticEnergy<t1keV) xs = slow*std::exp(clow*std::log(tlow/t1keV));
138 else xs = slow*std::exp(clow*std::log(tlow/KineticEnergy));
139 }
140 else if ( KineticEnergy<t200keV )
141 {
142 xs = s200keV
143 * std::exp(0.042*Z*std::log(t200keV/KineticEnergy)
144 *std::log(t200keV/KineticEnergy));
145 }
146 else if( KineticEnergy<tmin )
147 {
148 xs = smin
149 * std::exp(cmin*std::log(tmin/KineticEnergy)
150 *std::log(tmin/KineticEnergy));
151 }
152 else
153 {
154 xs = smin + chigh*std::log(KineticEnergy/tmin);
155 }
156 return xs * barn;
157}

Referenced by ComputeLoss().

◆ ComputeLoss()

G4double G4RToEConvForGamma::ComputeLoss ( G4double  AtomicNumber,
G4double  KineticEnergy 
)
inlineprotectedvirtual

Implements G4VRangeToEnergyConverter.

Definition at line 82 of file G4RToEConvForGamma.hh.

84{
85 return ComputeCrossSection(AtomicNumber,KineticEnergy);
86}
G4double ComputeCrossSection(G4double AtomicNumber, G4double KineticEnergy)

Member Data Documentation

◆ chigh

G4double G4RToEConvForGamma::chigh = 0.0
protected

Definition at line 74 of file G4RToEConvForGamma.hh.

Referenced by ComputeCrossSection().

◆ clow

G4double G4RToEConvForGamma::clow = 0.0
protected

Definition at line 74 of file G4RToEConvForGamma.hh.

Referenced by ComputeCrossSection().

◆ cmin

G4double G4RToEConvForGamma::cmin = 0.0
protected

Definition at line 74 of file G4RToEConvForGamma.hh.

Referenced by ComputeCrossSection().

◆ s1keV

G4double G4RToEConvForGamma::s1keV = 0.0
protected

Definition at line 71 of file G4RToEConvForGamma.hh.

Referenced by ComputeCrossSection().

◆ s200keV

G4double G4RToEConvForGamma::s200keV = 0.0
protected

Definition at line 71 of file G4RToEConvForGamma.hh.

Referenced by ComputeCrossSection().

◆ slow

G4double G4RToEConvForGamma::slow = 0.0
protected

Definition at line 73 of file G4RToEConvForGamma.hh.

Referenced by ComputeCrossSection().

◆ smin

G4double G4RToEConvForGamma::smin = 0.0
protected

Definition at line 73 of file G4RToEConvForGamma.hh.

Referenced by ComputeCrossSection().

◆ tlow

G4double G4RToEConvForGamma::tlow = 0.0
protected

Definition at line 72 of file G4RToEConvForGamma.hh.

Referenced by ComputeCrossSection().

◆ tmin

G4double G4RToEConvForGamma::tmin = 0.0
protected

Definition at line 72 of file G4RToEConvForGamma.hh.

Referenced by ComputeCrossSection().

◆ Z

G4double G4RToEConvForGamma::Z = -1.0
protected

Definition at line 70 of file G4RToEConvForGamma.hh.

Referenced by ComputeCrossSection().


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