Geant4 9.6.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 &right)
 
G4VRangeToEnergyConverteroperator= (const G4VRangeToEnergyConverter &right)
 
virtual ~G4VRangeToEnergyConverter ()
 
G4int operator== (const G4VRangeToEnergyConverter &right) const
 
G4int operator!= (const G4VRangeToEnergyConverter &right) 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

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

Protected Member Functions

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

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)
 
- Protected Attributes inherited from G4VRangeToEnergyConverter
G4double fMaxEnergyCut
 
const G4ParticleDefinitiontheParticle
 
G4LossTabletheLossTable
 
G4int NumberOfElements
 
const G4int TotBin
 
std::vector< G4RangeVector * > fRangeVectorStore
 
- 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 51 of file G4RToEConvForGamma.hh.

Member Typedef Documentation

◆ G4CrossSectionTable

Definition at line 74 of file G4RToEConvForGamma.hh.

Constructor & Destructor Documentation

◆ G4RToEConvForGamma()

G4RToEConvForGamma::G4RToEConvForGamma ( )

Definition at line 44 of file G4RToEConvForGamma.cc.

45{
47 if (theParticle ==0) {
48#ifdef G4VERBOSE
49 if (GetVerboseLevel()>0) {
50 G4cout << " G4RToEConvForGamma::G4RToEConvForGamma() ";
51 G4cout << " Gamma is not defined !!" << G4endl;
52 }
53#endif
54 }
55}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT 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 65 of file G4RToEConvForGamma.cc.

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

Referenced by BuildRangeVector().

◆ BuildRangeVector()

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

Reimplemented from G4VRangeToEnergyConverter.

Definition at line 93 of file G4RToEConvForGamma.hh.

96{
97 BuildAbsorptionLengthVector(aMaterial, rangeVector);
98}
void BuildAbsorptionLengthVector(const G4Material *aMaterial, G4RangeVector *rangeVector)

◆ ComputeCrossSection()

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

Definition at line 99 of file G4RToEConvForGamma.cc.

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

Referenced by ComputeLoss().

◆ ComputeLoss()

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

Implements G4VRangeToEnergyConverter.

Definition at line 86 of file G4RToEConvForGamma.hh.

88{
89 return ComputeCrossSection(AtomicNumber,KineticEnergy);
90}
G4double ComputeCrossSection(G4double AtomicNumber, G4double KineticEnergy) const

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