Import Geant4 9.2.0 source tree
This commit is contained in:
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4hIonisation.cc,v 1.69 2007/05/22 17:34:36 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4hIonisation.cc,v 1.81 2008/10/22 16:02:20 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -77,6 +77,7 @@
|
||||
// 26-05-06 scale negative particles from pi- and pbar,
|
||||
// positive from pi+ and p (VI)
|
||||
// 14-01-07 use SetEmModel() and SetFluctModel() from G4VEnergyLossProcess (mma)
|
||||
// 12-09-08 Removed CorrectionsAlongStep (VI)
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -89,12 +90,14 @@
|
||||
#include "G4AntiProton.hh"
|
||||
#include "G4BraggModel.hh"
|
||||
#include "G4BetheBlochModel.hh"
|
||||
#include "G4IonFluctuations.hh"
|
||||
#include "G4UniversalFluctuation.hh"
|
||||
#include "G4BohrFluctuations.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4PionPlus.hh"
|
||||
#include "G4PionMinus.hh"
|
||||
#include "G4LossTableManager.hh"
|
||||
#include "G4KaonPlus.hh"
|
||||
#include "G4KaonMinus.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -102,16 +105,15 @@ using namespace std;
|
||||
|
||||
G4hIonisation::G4hIonisation(const G4String& name)
|
||||
: G4VEnergyLossProcess(name),
|
||||
theParticle(0),
|
||||
theBaseParticle(0),
|
||||
isInitialised(false)
|
||||
isInitialised(false),
|
||||
nuclearStopping(true)
|
||||
{
|
||||
SetStepFunction(0.2, 1*mm);
|
||||
SetIntegral(true);
|
||||
SetVerboseLevel(1);
|
||||
// SetStepFunction(0.2, 1.0*mm);
|
||||
//SetIntegral(true);
|
||||
//SetVerboseLevel(1);
|
||||
SetProcessSubType(fIonisation);
|
||||
mass = 0.0;
|
||||
ratio = 0.0;
|
||||
corr = G4LossTableManager::Instance()->EmCorrections();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
@@ -125,61 +127,74 @@ void G4hIonisation::InitialiseEnergyLossProcess(
|
||||
const G4ParticleDefinition* part,
|
||||
const G4ParticleDefinition* bpart)
|
||||
{
|
||||
if(isInitialised) return;
|
||||
if(!isInitialised) {
|
||||
|
||||
theParticle = part;
|
||||
const G4ParticleDefinition* theBaseParticle = 0;
|
||||
G4String pname = part->GetParticleName();
|
||||
|
||||
G4String pname = part->GetParticleName();
|
||||
// standard base particles
|
||||
if(part == bpart || pname == "proton" ||
|
||||
pname == "anti_proton" ||
|
||||
pname == "pi+" || pname == "pi-" ||
|
||||
pname == "kaon+" || pname == "kaon-")
|
||||
{
|
||||
theBaseParticle = 0;
|
||||
}
|
||||
// select base particle
|
||||
else if(bpart == 0) {
|
||||
|
||||
// standard base particles
|
||||
if(part == bpart || pname == "proton" ||
|
||||
pname == "anti_proton" || pname == "pi+" || pname == "pi-" )
|
||||
theBaseParticle = 0;
|
||||
if(part->GetPDGSpin() == 0.0)
|
||||
if(part->GetPDGCharge() > 0.0 ) {
|
||||
theBaseParticle = G4KaonPlus::KaonPlus();
|
||||
} else {
|
||||
theBaseParticle = G4KaonMinus::KaonMinus();
|
||||
}
|
||||
else if(part->GetPDGCharge() > 0.0) {
|
||||
theBaseParticle = G4Proton::Proton();
|
||||
} else {
|
||||
theBaseParticle = G4AntiProton::AntiProton();
|
||||
}
|
||||
// base particle defined by interface
|
||||
} else {
|
||||
theBaseParticle = bpart;
|
||||
}
|
||||
SetBaseParticle(theBaseParticle);
|
||||
SetSecondaryParticle(G4Electron::Electron());
|
||||
|
||||
// select base particle
|
||||
else if(bpart == 0) {
|
||||
mass = part->GetPDGMass();
|
||||
ratio = electron_mass_c2/mass;
|
||||
|
||||
if(pname == "kaon+") theBaseParticle = G4PionPlus::PionPlus();
|
||||
else if(pname == "kaon-") theBaseParticle = G4PionMinus::PionMinus();
|
||||
else if(part->GetPDGCharge() > 0.0) theBaseParticle = G4Proton::Proton();
|
||||
else theBaseParticle = G4AntiProton::AntiProton();
|
||||
if(mass < 900.*MeV) nuclearStopping = false;
|
||||
|
||||
} else theBaseParticle = bpart;
|
||||
if (!EmModel(1)) SetEmModel(new G4BraggModel(),1);
|
||||
EmModel(1)->SetLowEnergyLimit(MinKinEnergy());
|
||||
|
||||
SetBaseParticle(theBaseParticle);
|
||||
SetSecondaryParticle(G4Electron::Electron());
|
||||
mass = theParticle->GetPDGMass();
|
||||
ratio = electron_mass_c2/mass;
|
||||
massratio = 1.0;
|
||||
if(theBaseParticle) massratio = theBaseParticle->GetPDGMass()/mass;
|
||||
// model limit defined for protons
|
||||
eth = (EmModel(1)->HighEnergyLimit())*mass/proton_mass_c2;
|
||||
EmModel(1)->SetHighEnergyLimit(eth);
|
||||
AddEmModel(1, EmModel(1), new G4IonFluctuations());
|
||||
|
||||
if (!EmModel(1)) SetEmModel(new G4BraggModel(),1);
|
||||
EmModel(1)->SetLowEnergyLimit(100*eV);
|
||||
eth = 2.0*MeV*mass/proton_mass_c2;
|
||||
EmModel(1)->SetHighEnergyLimit(eth);
|
||||
if (!FluctModel()) SetFluctModel(new G4UniversalFluctuation());
|
||||
AddEmModel(1, EmModel(1), FluctModel());
|
||||
if (!FluctModel()) SetFluctModel(new G4UniversalFluctuation());
|
||||
|
||||
if (!EmModel(2)) SetEmModel(new G4BetheBlochModel(),2);
|
||||
EmModel(2)->SetLowEnergyLimit(eth);
|
||||
EmModel(2)->SetHighEnergyLimit(100*TeV);
|
||||
AddEmModel(2, EmModel(2), FluctModel());
|
||||
if (!EmModel(2)) SetEmModel(new G4BetheBlochModel(),2);
|
||||
EmModel(2)->SetLowEnergyLimit(eth);
|
||||
EmModel(2)->SetHighEnergyLimit(MaxKinEnergy());
|
||||
AddEmModel(2, EmModel(2), FluctModel());
|
||||
|
||||
isInitialised = true;
|
||||
isInitialised = true;
|
||||
}
|
||||
EmModel(1)->ActivateNuclearStopping(nuclearStopping);
|
||||
EmModel(2)->ActivateNuclearStopping(nuclearStopping);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4hIonisation::PrintInfo()
|
||||
{
|
||||
if(EmModel(1) && EmModel(2))
|
||||
G4cout << " Scaling relation is used from proton dE/dx and range."
|
||||
<< "\n Delta cross sections and sampling from "
|
||||
<< EmModel(2)->GetName() << " model for scaled energy > "
|
||||
<< eth/MeV << " MeV"
|
||||
<< "\n Parametrisation from "
|
||||
<< EmModel(1)->GetName() << " for protons below."
|
||||
if(EmModel(1) && EmModel(2)) {
|
||||
G4cout << " NuclearStopping= " << nuclearStopping
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
Reference in New Issue
Block a user