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

#include <G4RToEConvForProton.hh>

+ Inheritance diagram for G4RToEConvForProton:

Public Member Functions

 G4RToEConvForProton ()
 
virtual ~G4RToEConvForProton ()
 
virtual G4double Convert (G4double rangeCut, const G4Material *material)
 
virtual void Reset ()
 
- 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 Member Functions

virtual G4double ComputeLoss (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 Mass = 0.0
 
G4double Z = -1.0
 
G4double tau0 = 0.0
 
G4double taul = 0.0
 
G4double taum = 0.0
 
G4double ionpot = 0.0
 
G4double ca = 0.0
 
G4double cba = 0.0
 
G4double cc = 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)
 
- Protected Types inherited from G4VRangeToEnergyConverter
using G4LossVector = G4PhysicsLogVector
 
using G4RangeVector = G4PhysicsLogVector
 
using G4LossTable = G4PhysicsTable
 
- 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 G4RToEConvForProton.hh.

Constructor & Destructor Documentation

◆ G4RToEConvForProton()

G4RToEConvForProton::G4RToEConvForProton ( )

Definition at line 41 of file G4RToEConvForProton.cc.

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

◆ ~G4RToEConvForProton()

G4RToEConvForProton::~G4RToEConvForProton ( )
virtual

Definition at line 62 of file G4RToEConvForProton.cc.

63{
64}

Member Function Documentation

◆ ComputeLoss()

G4double G4RToEConvForProton::ComputeLoss ( G4double  AtomicNumber,
G4double  KineticEnergy 
)
protectedvirtual

Implements G4VRangeToEnergyConverter.

Definition at line 77 of file G4RToEConvForProton.cc.

79{
80 // calculate dE/dx
81 const G4double z2Particle = 1.0;
82
83 if( std::fabs(AtomicNumber-Z)>0.1 )
84 {
85 // recalculate constants
86 Z = AtomicNumber;
87 G4double Z13 = std::exp(std::log(Z)/3.);
88 tau0 = 0.1*Z13*MeV/proton_mass_c2;
89 taum = 0.035*Z13*MeV/proton_mass_c2;
90 taul = 2.*MeV/proton_mass_c2;
91 ionpot = 1.6e-5*MeV*std::exp(0.9*std::log(Z));
92 cc = (taul+1.)*(taul+1.)*std::log(2.*electron_mass_c2*taul*(taul+2.)/ionpot)
93 / (taul*(taul+2.))-1.;
94 cc = 2.*twopi_mc2_rcl2*Z*cc*std::sqrt(taul);
95 ca = cc/((1.-0.5*std::sqrt(tau0/taum))*tau0);
96 cba = -0.5/std::sqrt(taum);
97 }
98
100 G4double dEdx;
101 if ( tau <= tau0 )
102 {
103 dEdx = ca*(std::sqrt(tau)+cba*tau);
104 }
105 else
106 {
107 if( tau <= taul )
108 {
109 dEdx = cc/std::sqrt(tau);
110 }
111 else
112 {
113 dEdx = (tau+1.)*(tau+1.)
114 * std::log(2.*electron_mass_c2*tau*(tau+2.)/ionpot)
115 / (tau*(tau+2.))-1.;
116 dEdx = 2.*twopi_mc2_rcl2*Z*dEdx;
117 }
118 }
119 return dEdx*z2Particle ;
120}
double G4double
Definition: G4Types.hh:83

◆ Convert()

G4double G4RToEConvForProton::Convert ( G4double  rangeCut,
const G4Material material 
)
virtual

Reimplemented from G4VRangeToEnergyConverter.

Definition at line 67 of file G4RToEConvForProton.cc.

68{
69 // Simple formula - range = Ekin/(100*keV)*(1*mm);
70
71 return (rangeCut/(1.0*mm)) * (100.0*keV);
72}

◆ Reset()

void G4RToEConvForProton::Reset ( )
virtual

Reimplemented from G4VRangeToEnergyConverter.

Definition at line 125 of file G4RToEConvForProton.cc.

126{
127 // do nothing because loss tables and range vectors are not used
128
129 return;
130}

Member Data Documentation

◆ ca

G4double G4RToEConvForProton::ca = 0.0
protected

Definition at line 69 of file G4RToEConvForProton.hh.

Referenced by ComputeLoss().

◆ cba

G4double G4RToEConvForProton::cba = 0.0
protected

Definition at line 70 of file G4RToEConvForProton.hh.

Referenced by ComputeLoss().

◆ cc

G4double G4RToEConvForProton::cc = 0.0
protected

Definition at line 71 of file G4RToEConvForProton.hh.

Referenced by ComputeLoss().

◆ ionpot

G4double G4RToEConvForProton::ionpot = 0.0
protected

Definition at line 68 of file G4RToEConvForProton.hh.

Referenced by ComputeLoss().

◆ Mass

G4double G4RToEConvForProton::Mass = 0.0
protected

Definition at line 63 of file G4RToEConvForProton.hh.

Referenced by ComputeLoss(), and G4RToEConvForProton().

◆ tau0

G4double G4RToEConvForProton::tau0 = 0.0
protected

Definition at line 65 of file G4RToEConvForProton.hh.

Referenced by ComputeLoss().

◆ taul

G4double G4RToEConvForProton::taul = 0.0
protected

Definition at line 66 of file G4RToEConvForProton.hh.

Referenced by ComputeLoss().

◆ taum

G4double G4RToEConvForProton::taum = 0.0
protected

Definition at line 67 of file G4RToEConvForProton.hh.

Referenced by ComputeLoss().

◆ Z

G4double G4RToEConvForProton::Z = -1.0
protected

Definition at line 64 of file G4RToEConvForProton.hh.

Referenced by ComputeLoss().


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