Import Geant4 5.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:57:27 +02:00
parent 330b82b769
commit 37fff30d2e
5733 changed files with 263867 additions and 74574 deletions
@@ -80,6 +80,10 @@
// 10 Jun 2002 V.Ivanchenko Restore fStopButAlive
// 12 Jun 2002 V.Ivanchenko Fix in fluctuations - if tmax<2*Ipot Gaussian
// fluctuations enables
// 20 Sept 2002 V.Ivanchenko Clean up energy ranges for models
// 07 Oct 2002 V.Ivanchenko Clean up initialisation of fluorescence
// 28 Oct 2002 V.Ivanchenko Optimal binning for dE/dx
// 10 Dec 2002 V.Ivanchenko antiProtonLowEnergy -> 25 keV, QEG model below
// -----------------------------------------------------------------------
@@ -138,12 +142,12 @@ G4hLowEnergyIonisation::G4hLowEnergyIonisation(const G4String& processName)
void G4hLowEnergyIonisation::InitializeMe()
{
LowestKineticEnergy = 10.0*eV ;
HighestKineticEnergy = 100.0*TeV ;
HighestKineticEnergy = 100.0*GeV ;
MinKineticEnergy = 10.0*eV ;
TotBin = 200 ;
TotBin = 360 ;
protonLowEnergy = 1.*keV ;
protonHighEnergy = 2.*MeV ;
antiProtonLowEnergy = 1.*keV ;
antiProtonLowEnergy = 25.*keV ;
antiProtonHighEnergy = 2.*MeV ;
minGammaEnergy = 25.*keV;
minElectronEnergy = 25.*keV;
@@ -197,9 +201,6 @@ void G4hLowEnergyIonisation::SetElectronicStoppingPowerModel(
void G4hLowEnergyIonisation::InitializeParametrisation()
{
G4Proton* theProton = G4Proton::Proton();
G4AntiProton* theAntiProton = G4AntiProton::AntiProton();
// Define models for parametrisation of electronic energy losses
theBetheBlochModel = new G4hBetheBlochModel("Bethe-Bloch") ;
theProtonModel = new G4hParametrisedLossModel(theProtonTable) ;
@@ -208,22 +209,6 @@ void G4hLowEnergyIonisation::InitializeParametrisation()
theIonEffChargeModel = new G4hIonEffChargeSquare("Ziegler1988") ;
theIonChuFluctuationModel = new G4IonChuFluctuationModel("Chu") ;
theIonYangFluctuationModel = new G4IonYangFluctuationModel("Yang") ;
// Energy limits for parametrisation of electronic energy losses
protonLowEnergy = G4std::max(protonLowEnergy,
theProtonModel->LowEnergyLimit(theProton)) ;
G4double x1 = theBetheBlochModel->LowEnergyLimit(theProton) ;
G4double x2 = theProtonModel->HighEnergyLimit(theProton) ;
if(protonHighEnergy < x1) protonHighEnergy = x1 ;
if(protonHighEnergy > x2) protonHighEnergy = x2 ;
antiProtonLowEnergy = G4std::max(antiProtonLowEnergy,
theAntiProtonModel->LowEnergyLimit(theAntiProton)) ;
x2 = theAntiProtonModel->HighEnergyLimit(theAntiProton) ;
if(antiProtonHighEnergy < x1) antiProtonHighEnergy = x1 ;
if(antiProtonHighEnergy > x2) antiProtonHighEnergy = x2 ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -349,6 +334,9 @@ void G4hLowEnergyIonisation::BuildPhysicsTable(
BuildLambdaTable(aParticleType) ;
BuildDataForFluorescence(aParticleType);
if(verboseLevel > 1) {
G4cout << (*theMeanFreePathTable) << G4endl;
}
if(verboseLevel > 0) {
G4cout << "G4hLowEnergyIonisation::BuildPhysicsTable: "
@@ -356,6 +344,9 @@ void G4hLowEnergyIonisation::BuildPhysicsTable(
}
BuildDEDXTable(aParticleType) ;
if(verboseLevel > 1) {
G4cout << (*theDEDXpTable) << G4endl;
}
if((&aParticleType == theProton) ) PrintInfoDefinition() ;
@@ -410,25 +401,15 @@ void G4hLowEnergyIonisation::BuildLossTable(
// get material parameters needed for the energy loss calculation
const G4Material* material= (*theMaterialTable)[j];
// low energy of Bethe-Bloch formula for this material
G4double highE = G4std::max(highEnergy,theBetheBlochModel->
LowEnergyLimit(&aParticleType,material)) ;
if ( charge > 0.0 ) {
ionloss = ProtonParametrisedDEDX(material,highE) ;
ionloss = ProtonParametrisedDEDX(material,highEnergy) ;
} else {
ionloss = AntiProtonParametrisedDEDX(material,highE) ;
ionloss = AntiProtonParametrisedDEDX(material,highEnergy) ;
}
ionlossBB = theBetheBlochModel->TheValue(&aParticleType,material,highE) ;
ionlossBB -= DeltaRaysEnergy(material,highE,proton_mass_c2) ;
ionlossBB = theBetheBlochModel->TheValue(&aParticleType,material,highEnergy) ;
ionlossBB -= DeltaRaysEnergy(material,highEnergy,proton_mass_c2) ;
/*
if(theBarkas) {
ionlossBB += BarkasTerm(material,highE)*charge ;
ionlossBB += BlochTerm(material,highE,1.0) ;
}
*/
paramB = ionloss/ionlossBB - 1.0 ;
@@ -437,7 +418,7 @@ void G4hLowEnergyIonisation::BuildLossTable(
lowEdgeEnergy = aVector->GetLowEdgeEnergy(i) ;
// low energy part for this material, parametrised energy loss formulae
if ( lowEdgeEnergy < highE ) {
if ( lowEdgeEnergy < highEnergy ) {
if ( charge > 0.0 ) {
ionloss = ProtonParametrisedDEDX(material,lowEdgeEnergy) ;
@@ -453,12 +434,6 @@ void G4hLowEnergyIonisation::BuildLossTable(
ionloss -= DeltaRaysEnergy(material,lowEdgeEnergy,proton_mass_c2) ;
/*
if(theBarkas) {
ionloss += BarkasTerm(material,lowEdgeEnergy)*charge ;
ionloss += BlochTerm(material,lowEdgeEnergy,1.0) ;
}
*/
ionloss *= (1.0 + paramB*highEnergy/lowEdgeEnergy) ;
}
@@ -488,6 +463,9 @@ void G4hLowEnergyIonisation::BuildDataForFluorescence(
// fill data for fluorescence
deexcitationManager.SetCutForSecondaryPhotons(minGammaEnergy);
deexcitationManager.SetCutForAugerElectrons(minElectronEnergy);
G4double mass = aParticleType.GetPDGMass();
const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
@@ -1061,8 +1039,8 @@ G4double G4hLowEnergyIonisation::AntiProtonParametrisedDEDX(
// Antiproton model is used
if(theAntiProtonModel->IsInCharge(theAntiProton,material)) {
if(kineticEnergy < antiProtonLowEnergy) {
eloss = theAntiProtonModel->TheValue(theAntiProton,material,
antiProtonLowEnergy);
eloss = theAntiProtonModel->TheValue(theAntiProton,material,antiProtonLowEnergy)
* sqrt(kineticEnergy/antiProtonLowEnergy) ;
// Parametrisation
} else {
@@ -1072,9 +1050,8 @@ G4double G4hLowEnergyIonisation::AntiProtonParametrisedDEDX(
// The proton model is used + Barkas correction
} else {
if(kineticEnergy < antiProtonLowEnergy) {
eloss = theProtonModel->TheValue(G4Proton::Proton(),material,
antiProtonLowEnergy);
if(kineticEnergy < protonLowEnergy) {
eloss = theProtonModel->TheValue(G4Proton::Proton(),material,protonLowEnergy);
// Parametrisation
} else {
@@ -1942,8 +1919,6 @@ G4double G4hLowEnergyIonisation::ElectronicLossFluctuation(
void G4hLowEnergyIonisation::SetCutForSecondaryPhotons(G4double cut)
{
minGammaEnergy = cut;
deexcitationManager.SetCutForSecondaryPhotons(cut);
theFluo = true;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -1951,8 +1926,6 @@ void G4hLowEnergyIonisation::SetCutForSecondaryPhotons(G4double cut)
void G4hLowEnergyIonisation::SetCutForAugerElectrons(G4double cut)
{
minElectronEnergy = cut;
deexcitationManager.SetCutForAugerElectrons(cut);
theFluo = true;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....