#include <G4hIonisation.hh>
Inheritance diagram for G4hIonisation:
Public Member Functions | |
G4hIonisation (const G4String &name="hIoni") | |
virtual | ~G4hIonisation () |
virtual G4bool | IsApplicable (const G4ParticleDefinition &p) |
virtual G4double | MinPrimaryEnergy (const G4ParticleDefinition *p, const G4Material *, G4double cut) |
virtual void | PrintInfo () |
Protected Member Functions | |
virtual void | InitialiseEnergyLossProcess (const G4ParticleDefinition *, const G4ParticleDefinition *) |
Definition at line 85 of file G4hIonisation.hh.
G4hIonisation::G4hIonisation | ( | const G4String & | name = "hIoni" |
) |
Definition at line 109 of file G4hIonisation.cc.
References G4Electron::Electron(), fIonisation, G4VProcess::SetProcessSubType(), G4VEnergyLossProcess::SetSecondaryParticle(), and G4VEnergyLossProcess::SetStepFunction().
00110 : G4VEnergyLossProcess(name), 00111 isInitialised(false) 00112 { 00113 SetStepFunction(0.2, 0.1*mm); 00114 SetProcessSubType(fIonisation); 00115 SetSecondaryParticle(G4Electron::Electron()); 00116 mass = 0.0; 00117 ratio = 0.0; 00118 eth = 2*MeV; 00119 }
G4hIonisation::~G4hIonisation | ( | ) | [virtual] |
void G4hIonisation::InitialiseEnergyLossProcess | ( | const G4ParticleDefinition * | , | |
const G4ParticleDefinition * | ||||
) | [protected, virtual] |
Implements G4VEnergyLossProcess.
Definition at line 147 of file G4hIonisation.cc.
References G4VEnergyLossProcess::AddEmModel(), G4AntiProton::AntiProton(), G4VEnergyLossProcess::EmModel(), G4VEnergyLossProcess::FluctModel(), G4ParticleDefinition::GetParticleName(), G4ParticleDefinition::GetPDGCharge(), G4ParticleDefinition::GetPDGMass(), G4ParticleDefinition::GetPDGSpin(), G4KaonMinus::KaonMinus(), G4KaonPlus::KaonPlus(), G4VEnergyLossProcess::MaxKinEnergy(), G4VEnergyLossProcess::MinKinEnergy(), G4Proton::Proton(), G4VEnergyLossProcess::SetBaseParticle(), G4VEnergyLossProcess::SetEmModel(), G4VEnergyLossProcess::SetFluctModel(), G4VEmModel::SetHighEnergyLimit(), and G4VEmModel::SetLowEnergyLimit().
00150 { 00151 if(!isInitialised) { 00152 00153 const G4ParticleDefinition* theBaseParticle = 0; 00154 G4String pname = part->GetParticleName(); 00155 G4double q = part->GetPDGCharge(); 00156 00157 // standard base particles 00158 if(part == bpart || pname == "proton" || 00159 pname == "anti_proton" || 00160 pname == "pi+" || pname == "pi-" || 00161 pname == "kaon+" || pname == "kaon-") 00162 { 00163 theBaseParticle = 0; 00164 } 00165 // select base particle 00166 else if(bpart == 0) { 00167 00168 if(part->GetPDGSpin() == 0.0) { 00169 if(q > 0.0) { theBaseParticle = G4KaonPlus::KaonPlus(); } 00170 else { theBaseParticle = G4KaonMinus::KaonMinus(); } 00171 } else { 00172 if(q > 0.0) { theBaseParticle = G4Proton::Proton(); } 00173 else { theBaseParticle = G4AntiProton::AntiProton(); } 00174 } 00175 00176 // base particle defined by interface 00177 } else { 00178 theBaseParticle = bpart; 00179 } 00180 SetBaseParticle(theBaseParticle); 00181 00182 mass = part->GetPDGMass(); 00183 ratio = electron_mass_c2/mass; 00184 eth = 2.0*MeV*mass/proton_mass_c2; 00185 00186 if (!EmModel(1)) { 00187 if(q > 0.0) { SetEmModel(new G4BraggModel(),1); } 00188 else { SetEmModel(new G4ICRU73QOModel(),1); } 00189 } 00190 EmModel(1)->SetLowEnergyLimit(MinKinEnergy()); 00191 00192 // model limit defined for protons 00193 //eth = (EmModel(1)->HighEnergyLimit())*mass/proton_mass_c2; 00194 EmModel(1)->SetHighEnergyLimit(eth); 00195 AddEmModel(1, EmModel(1), new G4IonFluctuations()); 00196 00197 if (!FluctModel()) { SetFluctModel(new G4UniversalFluctuation()); } 00198 00199 if (!EmModel(2)) { SetEmModel(new G4BetheBlochModel(),2); } 00200 EmModel(2)->SetLowEnergyLimit(eth); 00201 EmModel(2)->SetHighEnergyLimit(MaxKinEnergy()); 00202 AddEmModel(2, EmModel(2), FluctModel()); 00203 00204 isInitialised = true; 00205 } 00206 }
G4bool G4hIonisation::IsApplicable | ( | const G4ParticleDefinition & | p | ) | [virtual] |
Implements G4VEnergyLossProcess.
Definition at line 128 of file G4hIonisation.cc.
References G4ParticleDefinition::GetPDGCharge(), G4ParticleDefinition::GetPDGMass(), and G4ParticleDefinition::IsShortLived().
00129 { 00130 return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV && 00131 !p.IsShortLived()); 00132 }
G4double G4hIonisation::MinPrimaryEnergy | ( | const G4ParticleDefinition * | p, | |
const G4Material * | , | |||
G4double | cut | |||
) | [virtual] |
Reimplemented from G4VEnergyLossProcess.
Definition at line 136 of file G4hIonisation.cc.
References G4InuclParticleNames::gam.
00139 { 00140 G4double x = 0.5*cut/electron_mass_c2; 00141 G4double gam = x*ratio + std::sqrt((1. + x)*(1. + x*ratio*ratio)); 00142 return mass*(gam - 1.0); 00143 }
void G4hIonisation::PrintInfo | ( | ) | [virtual] |