Geant4 9.6.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 &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 Member Functions

virtual G4double ComputeLoss (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 Types inherited from G4VRangeToEnergyConverter
typedef G4PhysicsTable G4LossTable
 
typedef G4PhysicsLogVector G4LossVector
 
typedef G4PhysicsLogVector G4RangeVector
 
- 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 G4RToEConvForProton.hh.

Constructor & Destructor Documentation

◆ G4RToEConvForProton()

G4RToEConvForProton::G4RToEConvForProton ( )

Definition at line 44 of file G4RToEConvForProton.cc.

45{
47 if (theParticle ==0) {
48#ifdef G4VERBOSE
49 if (GetVerboseLevel()>0) {
50 G4cout << " G4RToEConvForProton::G4RToEConvForProton() ";
51 G4cout << " proton 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

◆ ~G4RToEConvForProton()

G4RToEConvForProton::~G4RToEConvForProton ( )
virtual

Definition at line 57 of file G4RToEConvForProton.cc.

58{
59}

Member Function Documentation

◆ ComputeLoss()

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

Implements G4VRangeToEnergyConverter.

Definition at line 73 of file G4RToEConvForProton.cc.

75{
76 // calculate dE/dx
77
78 static G4double Z;
79 static G4double ionpot, tau0, taum, taul, ca, cba, cc;
80
81 G4double z2Particle = theParticle->GetPDGCharge()/eplus;
82 z2Particle *= z2Particle;
83 if (z2Particle < 0.1) return 0.0;
84
85 if( std::fabs(AtomicNumber-Z)>0.1 ){
86 // recalculate constants
87 Z = AtomicNumber;
88 G4double Z13 = std::exp(std::log(Z)/3.);
89 tau0 = 0.1*Z13*MeV/proton_mass_c2;
90 taum = 0.035*Z13*MeV/proton_mass_c2;
91 taul = 2.*MeV/proton_mass_c2;
92 ionpot = 1.6e-5*MeV*std::exp(0.9*std::log(Z));
93 cc = (taul+1.)*(taul+1.)*std::log(2.*electron_mass_c2*taul*(taul+2.)/ionpot)/(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
99 G4double tau = KineticEnergy/theParticle->GetPDGMass();
100 G4double dEdx;
101 if ( tau <= tau0 ) {
102 dEdx = ca*(std::sqrt(tau)+cba*tau);
103 } else {
104 if( tau <= taul ) {
105 dEdx = cc/std::sqrt(tau);
106 } else {
107 dEdx = (tau+1.)*(tau+1.)*
108 std::log(2.*electron_mass_c2*tau*(tau+2.)/ionpot)/(tau*(tau+2.))-1.;
109 dEdx = 2.*twopi_mc2_rcl2*Z*dEdx;
110 }
111 }
112 return dEdx*z2Particle ;
113}
double G4double
Definition: G4Types.hh:64
G4double GetPDGCharge() const

◆ Convert()

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

Reimplemented from G4VRangeToEnergyConverter.

Definition at line 62 of file G4RToEConvForProton.cc.

63{
64 // Simple formula
65 // range = Ekin/(100*keV)*(1*mm);
66 return (rangeCut/(1.0*mm)) * (100.0*keV);
67}

◆ Reset()

void G4RToEConvForProton::Reset ( )
virtual

Reimplemented from G4VRangeToEnergyConverter.

Definition at line 119 of file G4RToEConvForProton.cc.

120{
121 // do nothing because loss tables and range vectors are not used
122 return;
123}

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