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

#include <G4RToEConvForProton.hh>

Inheritance diagram for G4RToEConvForProton:
G4VRangeToEnergyConverter

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
 
const G4ParticleDefinitionGetParticleType () const
 
const G4PhysicsTableGetLossTable () const
 
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 void BuildRangeVector (const G4Material *aMaterial, G4RangeVector *rangeVector)
 
G4double ConvertCutToKineticEnergy (G4RangeVector *theRangeVector, G4double theCutInLength, size_t materialIndex) const
 

Protected Attributes

G4double Mass
 
G4double Z
 
G4double tau0
 
G4double taul
 
G4double taum
 
G4double ionpot
 
G4double ca
 
G4double cba
 
G4double cc
 
- 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)
 
- Protected Types inherited from G4VRangeToEnergyConverter
typedef G4PhysicsTable G4LossTable
 
typedef G4PhysicsLogVector G4LossVector
 
typedef G4PhysicsLogVector G4RangeVector
 
- 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 ( )

Definition at line 44 of file G4RToEConvForProton.cc.

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

46  Mass(0.0),
47  Z(-1.),
48  tau0(0.0), taul(0.0), taum(0.0),
49  ionpot(0.0),
50  ca(0.0), cba(0.0), cc(0.0)
51 {
53  if (theParticle ==0) {
54 #ifdef G4VERBOSE
55  if (GetVerboseLevel()>0) {
56  G4cout << " G4RToEConvForProton::G4RToEConvForProton() ";
57  G4cout << " proton is not defined !!" << G4endl;
58  }
59 #endif
60  } else {
62  }
63 }
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
G4GLOB_DLL std::ostream G4cout
G4double GetPDGMass() const
static G4ParticleTable * GetParticleTable()
#define G4endl
Definition: G4ios.hh:61
const G4ParticleDefinition * theParticle
G4RToEConvForProton::~G4RToEConvForProton ( )
virtual

Definition at line 65 of file G4RToEConvForProton.cc.

66 {
67 }

Member Function Documentation

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

Implements G4VRangeToEnergyConverter.

Definition at line 81 of file G4RToEConvForProton.cc.

References ca, cba, cc, python.hepunit::electron_mass_c2, ionpot, Mass, python.hepunit::MeV, python.hepunit::proton_mass_c2, tau0, taul, taum, python.hepunit::twopi_mc2_rcl2, and Z.

83 {
84  // calculate dE/dx
85  const G4double z2Particle = 1.0;
86 
87  if( std::fabs(AtomicNumber-Z)>0.1 ){
88  // recalculate constants
89  Z = AtomicNumber;
90  G4double Z13 = std::exp(std::log(Z)/3.);
91  tau0 = 0.1*Z13*MeV/proton_mass_c2;
92  taum = 0.035*Z13*MeV/proton_mass_c2;
93  taul = 2.*MeV/proton_mass_c2;
94  ionpot = 1.6e-5*MeV*std::exp(0.9*std::log(Z));
95  cc = (taul+1.)*(taul+1.)*std::log(2.*electron_mass_c2*taul*(taul+2.)/ionpot)/(taul*(taul+2.))-1.;
96  cc = 2.*twopi_mc2_rcl2*Z*cc*std::sqrt(taul);
97  ca = cc/((1.-0.5*std::sqrt(tau0/taum))*tau0);
98  cba = -0.5/std::sqrt(taum);
99  }
100 
101  G4double tau = KineticEnergy/Mass;
102  G4double dEdx;
103  if ( tau <= tau0 ) {
104  dEdx = ca*(std::sqrt(tau)+cba*tau);
105  } else {
106  if( tau <= taul ) {
107  dEdx = cc/std::sqrt(tau);
108  } else {
109  dEdx = (tau+1.)*(tau+1.)*
110  std::log(2.*electron_mass_c2*tau*(tau+2.)/ionpot)/(tau*(tau+2.))-1.;
111  dEdx = 2.*twopi_mc2_rcl2*Z*dEdx;
112  }
113  }
114  return dEdx*z2Particle ;
115 }
float proton_mass_c2
Definition: hepunit.py:275
float electron_mass_c2
Definition: hepunit.py:274
double G4double
Definition: G4Types.hh:76
G4double G4RToEConvForProton::Convert ( G4double  rangeCut,
const G4Material material 
)
virtual

Reimplemented from G4VRangeToEnergyConverter.

Definition at line 70 of file G4RToEConvForProton.cc.

References python.hepunit::keV, and python.hepunit::mm.

71 {
72  // Simple formula
73  // range = Ekin/(100*keV)*(1*mm);
74  return (rangeCut/(1.0*mm)) * (100.0*keV);
75 }
void G4RToEConvForProton::Reset ( )
virtual

Reimplemented from G4VRangeToEnergyConverter.

Definition at line 121 of file G4RToEConvForProton.cc.

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

Field Documentation

G4double G4RToEConvForProton::ca
protected

Definition at line 78 of file G4RToEConvForProton.hh.

Referenced by ComputeLoss().

G4double G4RToEConvForProton::cba
protected

Definition at line 79 of file G4RToEConvForProton.hh.

Referenced by ComputeLoss().

G4double G4RToEConvForProton::cc
protected

Definition at line 80 of file G4RToEConvForProton.hh.

Referenced by ComputeLoss().

G4double G4RToEConvForProton::ionpot
protected

Definition at line 77 of file G4RToEConvForProton.hh.

Referenced by ComputeLoss().

G4double G4RToEConvForProton::Mass
protected

Definition at line 72 of file G4RToEConvForProton.hh.

Referenced by ComputeLoss(), and G4RToEConvForProton().

G4double G4RToEConvForProton::tau0
protected

Definition at line 74 of file G4RToEConvForProton.hh.

Referenced by ComputeLoss().

G4double G4RToEConvForProton::taul
protected

Definition at line 75 of file G4RToEConvForProton.hh.

Referenced by ComputeLoss().

G4double G4RToEConvForProton::taum
protected

Definition at line 76 of file G4RToEConvForProton.hh.

Referenced by ComputeLoss().

G4double G4RToEConvForProton::Z
protected

Definition at line 73 of file G4RToEConvForProton.hh.

Referenced by ComputeLoss().


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