#include <G4RToEConvForProton.hh>
Inheritance diagram for G4RToEConvForProton:
Public Member Functions | |
G4RToEConvForProton () | |
virtual | ~G4RToEConvForProton () |
virtual G4double | Convert (G4double rangeCut, const G4Material *material) |
virtual void | Reset () |
Protected Member Functions | |
virtual G4double | ComputeLoss (G4double AtomicNumber, G4double KineticEnergy) const |
Definition at line 51 of file G4RToEConvForProton.hh.
G4RToEConvForProton::G4RToEConvForProton | ( | ) |
Definition at line 44 of file G4RToEConvForProton.cc.
References G4ParticleTable::FindParticle(), G4cout, G4endl, G4ParticleTable::GetParticleTable(), G4VRangeToEnergyConverter::GetVerboseLevel(), and G4VRangeToEnergyConverter::theParticle.
00044 : G4VRangeToEnergyConverter() 00045 { 00046 theParticle = G4ParticleTable::GetParticleTable()->FindParticle("proton"); 00047 if (theParticle ==0) { 00048 #ifdef G4VERBOSE 00049 if (GetVerboseLevel()>0) { 00050 G4cout << " G4RToEConvForProton::G4RToEConvForProton() "; 00051 G4cout << " proton is not defined !!" << G4endl; 00052 } 00053 #endif 00054 } 00055 }
G4RToEConvForProton::~G4RToEConvForProton | ( | ) | [virtual] |
G4double G4RToEConvForProton::ComputeLoss | ( | G4double | AtomicNumber, | |
G4double | KineticEnergy | |||
) | const [protected, virtual] |
Implements G4VRangeToEnergyConverter.
Definition at line 73 of file G4RToEConvForProton.cc.
References G4ParticleDefinition::GetPDGCharge(), G4ParticleDefinition::GetPDGMass(), and G4VRangeToEnergyConverter::theParticle.
00075 { 00076 // calculate dE/dx 00077 00078 static G4double Z; 00079 static G4double ionpot, tau0, taum, taul, ca, cba, cc; 00080 00081 G4double z2Particle = theParticle->GetPDGCharge()/eplus; 00082 z2Particle *= z2Particle; 00083 if (z2Particle < 0.1) return 0.0; 00084 00085 if( std::fabs(AtomicNumber-Z)>0.1 ){ 00086 // recalculate constants 00087 Z = AtomicNumber; 00088 G4double Z13 = std::exp(std::log(Z)/3.); 00089 tau0 = 0.1*Z13*MeV/proton_mass_c2; 00090 taum = 0.035*Z13*MeV/proton_mass_c2; 00091 taul = 2.*MeV/proton_mass_c2; 00092 ionpot = 1.6e-5*MeV*std::exp(0.9*std::log(Z)); 00093 cc = (taul+1.)*(taul+1.)*std::log(2.*electron_mass_c2*taul*(taul+2.)/ionpot)/(taul*(taul+2.))-1.; 00094 cc = 2.*twopi_mc2_rcl2*Z*cc*std::sqrt(taul); 00095 ca = cc/((1.-0.5*std::sqrt(tau0/taum))*tau0); 00096 cba = -0.5/std::sqrt(taum); 00097 } 00098 00099 G4double tau = KineticEnergy/theParticle->GetPDGMass(); 00100 G4double dEdx; 00101 if ( tau <= tau0 ) { 00102 dEdx = ca*(std::sqrt(tau)+cba*tau); 00103 } else { 00104 if( tau <= taul ) { 00105 dEdx = cc/std::sqrt(tau); 00106 } else { 00107 dEdx = (tau+1.)*(tau+1.)* 00108 std::log(2.*electron_mass_c2*tau*(tau+2.)/ionpot)/(tau*(tau+2.))-1.; 00109 dEdx = 2.*twopi_mc2_rcl2*Z*dEdx; 00110 } 00111 } 00112 return dEdx*z2Particle ; 00113 }
G4double G4RToEConvForProton::Convert | ( | G4double | rangeCut, | |
const G4Material * | material | |||
) | [virtual] |
Reimplemented from G4VRangeToEnergyConverter.
Definition at line 62 of file G4RToEConvForProton.cc.
00063 { 00064 // Simple formula 00065 // range = Ekin/(100*keV)*(1*mm); 00066 return (rangeCut/(1.0*mm)) * (100.0*keV); 00067 }
void G4RToEConvForProton::Reset | ( | ) | [virtual] |
Reimplemented from G4VRangeToEnergyConverter.
Definition at line 119 of file G4RToEConvForProton.cc.
00120 { 00121 // do nothing because loss tables and range vectors are not used 00122 return; 00123 }