Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
G4RToEConvForGamma Class Reference

#include <G4RToEConvForGamma.hh>

Inheritance diagram for G4RToEConvForGamma:
G4VRangeToEnergyConverter

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)
 
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 ()
 
G4double ConvertCutToKineticEnergy (G4RangeVector *theRangeVector, G4double theCutInLength, size_t materialIndex) const
 

Protected Attributes

G4double Z
 
G4double s200keV
 
G4double s1keV
 
G4double tmin
 
G4double tlow
 
G4double smin
 
G4double slow
 
G4double cmin
 
G4double clow
 
G4double chigh
 
- Protected Attributes inherited from G4VRangeToEnergyConverter
G4double fMaxEnergyCut
 
const G4ParticleDefinitiontheParticle
 
G4LossTabletheLossTable
 
G4int NumberOfElements
 
const G4int TotBin
 
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 51 of file G4RToEConvForGamma.hh.

Member Typedef Documentation

Definition at line 74 of file G4RToEConvForGamma.hh.

Constructor & Destructor Documentation

G4RToEConvForGamma::G4RToEConvForGamma ( )

Definition at line 44 of file G4RToEConvForGamma.cc.

References G4ParticleTable::FindParticle(), G4cout, G4endl, G4ParticleTable::GetParticleTable(), G4VRangeToEnergyConverter::GetVerboseLevel(), and G4VRangeToEnergyConverter::theParticle.

46  Z(-1),
47  s200keV(0.), s1keV(0.),
48  tmin(0.), tlow(0.),
49  smin(0.), slow(0.),
50  cmin(0.), clow(0.), chigh(0.)
51 {
53  if (theParticle ==0) {
54 #ifdef G4VERBOSE
55  if (GetVerboseLevel()>0) {
56  G4cout << " G4RToEConvForGamma::G4RToEConvForGamma() ";
57  G4cout << " Gamma is not defined !!" << G4endl;
58  }
59 #endif
60  }
61 }
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
G4GLOB_DLL std::ostream G4cout
static G4ParticleTable * GetParticleTable()
#define G4endl
Definition: G4ios.hh:61
const G4ParticleDefinition * theParticle
G4RToEConvForGamma::~G4RToEConvForGamma ( )
virtual

Definition at line 63 of file G4RToEConvForGamma.cc.

64 {
65 }

Member Function Documentation

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

Definition at line 71 of file G4RToEConvForGamma.cc.

References G4Material::GetAtomicNumDensityVector(), G4Material::GetElementVector(), G4Material::GetNumberOfElements(), G4PhysicsVector::PutValue(), G4VRangeToEnergyConverter::theLossTable, and G4VRangeToEnergyConverter::TotBin.

Referenced by BuildRangeVector().

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

Reimplemented from G4VRangeToEnergyConverter.

Definition at line 98 of file G4RToEConvForGamma.hh.

References BuildAbsorptionLengthVector().

101 {
102  BuildAbsorptionLengthVector(aMaterial, rangeVector);
103 }
void BuildAbsorptionLengthVector(const G4Material *aMaterial, G4RangeVector *rangeVector)
G4double G4RToEConvForGamma::ComputeCrossSection ( G4double  AtomicNumber,
G4double  KineticEnergy 
)
protected

Definition at line 105 of file G4RToEConvForGamma.cc.

References python.hepunit::barn, chigh, clow, cmin, python.hepunit::keV, python.hepunit::MeV, s1keV, s200keV, slow, smin, tlow, tmin, and Z.

Referenced by ComputeLoss().

107 {
108  // Compute the "absorption" cross section of the photon "absorption"
109  // cross section means here the sum of the cross sections of the
110  // pair production, Compton scattering and photoelectric processes
111  const G4double t1keV = 1.*keV;
112  const G4double t200keV = 200.*keV;
113  const G4double t100MeV = 100.*MeV;
114 
115  // compute Z dependent quantities in the case of a new AtomicNumber
116  if(std::abs(AtomicNumber-Z)>0.1) {
117  Z = AtomicNumber;
118  G4double Zsquare = Z*Z;
119  G4double Zlog = std::log(Z);
120  G4double Zlogsquare = Zlog*Zlog;
121 
122  s200keV = (0.2651-0.1501*Zlog+0.02283*Zlogsquare)*Zsquare;
123  tmin = (0.552+218.5/Z+557.17/Zsquare)*MeV;
124  smin = (0.01239+0.005585*Zlog-0.000923*Zlogsquare)*std::exp(1.5*Zlog);
125  cmin=std::log(s200keV/smin)/(std::log(tmin/t200keV)*std::log(tmin/t200keV));
126  tlow = 0.2*std::exp(-7.355/std::sqrt(Z))*MeV;
127  slow = s200keV*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 
131  chigh=(7.55e-5-0.0542e-5*Z)*Zsquare*Z/std::log(t100MeV/tmin);
132  }
133 
134  // calculate the cross section (using an approximate empirical formula)
135  G4double xs;
136  if ( KineticEnergy<tlow ) {
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  xs = s200keV
142  * std::exp(0.042*Z*std::log(t200keV/KineticEnergy)*std::log(t200keV/KineticEnergy));
143 
144  } else if( KineticEnergy<tmin ){
145  xs = smin
146  * std::exp(cmin*std::log(tmin/KineticEnergy)*std::log(tmin/KineticEnergy));
147 
148  } else {
149  xs = smin + chigh*std::log(KineticEnergy/tmin);
150 
151  }
152  return xs * barn;
153 }
double G4double
Definition: G4Types.hh:76
G4double G4RToEConvForGamma::ComputeLoss ( G4double  AtomicNumber,
G4double  KineticEnergy 
)
inlineprotectedvirtual

Implements G4VRangeToEnergyConverter.

Definition at line 91 of file G4RToEConvForGamma.hh.

References ComputeCrossSection().

93 {
94  return ComputeCrossSection(AtomicNumber,KineticEnergy);
95 }
G4double ComputeCrossSection(G4double AtomicNumber, G4double KineticEnergy)

Field Documentation

G4double G4RToEConvForGamma::chigh
protected

Definition at line 86 of file G4RToEConvForGamma.hh.

Referenced by ComputeCrossSection().

G4double G4RToEConvForGamma::clow
protected

Definition at line 86 of file G4RToEConvForGamma.hh.

Referenced by ComputeCrossSection().

G4double G4RToEConvForGamma::cmin
protected

Definition at line 86 of file G4RToEConvForGamma.hh.

Referenced by ComputeCrossSection().

G4double G4RToEConvForGamma::s1keV
protected

Definition at line 83 of file G4RToEConvForGamma.hh.

Referenced by ComputeCrossSection().

G4double G4RToEConvForGamma::s200keV
protected

Definition at line 83 of file G4RToEConvForGamma.hh.

Referenced by ComputeCrossSection().

G4double G4RToEConvForGamma::slow
protected

Definition at line 85 of file G4RToEConvForGamma.hh.

Referenced by ComputeCrossSection().

G4double G4RToEConvForGamma::smin
protected

Definition at line 85 of file G4RToEConvForGamma.hh.

Referenced by ComputeCrossSection().

G4double G4RToEConvForGamma::tlow
protected

Definition at line 84 of file G4RToEConvForGamma.hh.

Referenced by ComputeCrossSection().

G4double G4RToEConvForGamma::tmin
protected

Definition at line 84 of file G4RToEConvForGamma.hh.

Referenced by ComputeCrossSection().

G4double G4RToEConvForGamma::Z
protected

Definition at line 82 of file G4RToEConvForGamma.hh.

Referenced by ComputeCrossSection().


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