Import Geant4 10.3.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2016-06-30 14:12:05 +02:00
parent a654a7ab1f
commit 4ec577e5c4
2021 changed files with 100995 additions and 78277 deletions
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4AnnihiToMuPair.cc 91869 2015-08-07 15:21:02Z gcosmo $
// $Id: G4AnnihiToMuPair.cc 97391 2016-06-02 10:08:45Z gcosmo $
//
// ------------ G4AnnihiToMuPair physics process ------
// by H.Burkhardt, S. Kelner and R. Kokoulin, November 2002
@@ -60,10 +60,10 @@ G4AnnihiToMuPair::G4AnnihiToMuPair(const G4String& processName,
{
//e+ Energy threshold
const G4double Mu_massc2 = G4MuonPlus::MuonPlus()->GetPDGMass();
LowestEnergyLimit = 2*Mu_massc2*Mu_massc2/electron_mass_c2 - electron_mass_c2;
LowestEnergyLimit = 2.*Mu_massc2*Mu_massc2/electron_mass_c2 - electron_mass_c2;
//modele ok up to 1000 TeV due to neglected Z-interference
HighestEnergyLimit = 1000*TeV;
HighestEnergyLimit = 1000.*TeV;
CurrentSigma = 0.0;
CrossSecFactor = 1.;
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4GammaConversionToMuons.cc 91869 2015-08-07 15:21:02Z gcosmo $
// $Id: G4GammaConversionToMuons.cc 97391 2016-06-02 10:08:45Z gcosmo $
//
// ------------ G4GammaConversionToMuons physics process ------
// by H.Burkhardt, S. Kelner and R. Kokoulin, April 2002
@@ -57,7 +57,7 @@ G4GammaConversionToMuons::G4GammaConversionToMuons(const G4String& processName,
: G4VDiscreteProcess (processName, type),
Mmuon(G4MuonPlus::MuonPlus()->GetPDGMass()),
Rc(elm_coupling/Mmuon),
LowestEnergyLimit (4*Mmuon), // 4*Mmuon
LowestEnergyLimit (4.*Mmuon), // 4*Mmuon
HighestEnergyLimit(1e21*eV), // ok to 1e21eV=1e12GeV, then LPM suppression
CrossSecFactor(1.)
{
@@ -156,7 +156,7 @@ G4double G4GammaConversionToMuons::ComputeCrossSectionPerAtom(
// Total cross section parametrisation from H.Burkhardt
// It gives a good description at any energy (from 0 to 10**21 eV)
{
if(Egam <= LowestEnergyLimit) return 0 ; // below threshold return 0
if(Egam <= LowestEnergyLimit) return 0.0 ; // below threshold return 0
G4int Z = G4lrint(ZZ);
G4double CrossSection = 0.0;
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eeToHadrons.cc 85013 2014-10-23 09:45:07Z gcosmo $
// $Id: G4eeToHadrons.cc 97391 2016-06-02 10:08:45Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -59,7 +59,7 @@ using namespace std;
G4eeToHadrons::G4eeToHadrons(const G4String& name)
: G4VEmProcess(name),
multimodel(0),
multimodel(nullptr),
csFactor(1.0),
isInitialised(false)
{
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eeToHadronsModel.cc 94080 2015-11-05 15:04:02Z gcosmo $
// $Id: G4eeToHadronsModel.cc 97391 2016-06-02 10:08:45Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -128,7 +128,7 @@ void G4eeToHadronsModel::Initialise(const G4ParticleDefinition*,
ComputeCMCrossSectionPerElectron();
if(verbose>1) {
G4cout << "G4eeToHadronsModel: Cross secsions per electron"
G4cout << "G4eeToHadronsModel: Cross sections per electron"
<< " nbins= " << nbins
<< " emin(MeV)= " << emin/MeV
<< " emax(MeV)= " << emax/MeV
@@ -279,7 +279,7 @@ void G4eeToHadronsModel::ComputeCMCrossSectionPerElectron()
G4DynamicParticle* G4eeToHadronsModel::GenerateCMPhoton(G4double e)
{
G4double x;
G4DynamicParticle* gamma = 0;
G4DynamicParticle* gamma = nullptr;
G4double LL = 2.0*G4Log(e/electron_mass_c2);
G4double bt = 2.0*fine_structure_const*(LL - 1.)/pi;
G4double btm1= bt - 1.0;
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eeToHadronsMultiModel.cc 82961 2014-07-21 09:20:49Z gcosmo $
// $Id: G4eeToHadronsMultiModel.cc 97391 2016-06-02 10:08:45Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -72,8 +72,8 @@ G4eeToHadronsMultiModel::G4eeToHadronsMultiModel(G4int ver,
{
thKineticEnergy = DBL_MAX;
maxKineticEnergy = 4.521*GeV; //crresponding to 10TeV in lab
fParticleChange = 0;
cross = 0;
fParticleChange = nullptr;
cross = nullptr;
delta = 1.0*MeV; //for bin width
}
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4hBremsstrahlung.cc 85013 2014-10-23 09:45:07Z gcosmo $
// $Id: G4hBremsstrahlung.cc 97391 2016-06-02 10:08:45Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -80,7 +80,7 @@ void G4hBremsstrahlung::InitialiseEnergyLossProcess(
isInitialised = true;
if (!EmModel()) { SetEmModel(new G4hBremsstrahlungModel()); }
G4VEmFluctuationModel* fm = 0;
G4VEmFluctuationModel* fm = nullptr;
G4EmParameters* param = G4EmParameters::Instance();
EmModel()->SetLowEnergyLimit(param->MinKinEnergy());
EmModel()->SetHighEnergyLimit(param->MaxKinEnergy());
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4hPairProduction.cc 85013 2014-10-23 09:45:07Z gcosmo $
// $Id: G4hPairProduction.cc 97391 2016-06-02 10:08:45Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -81,10 +81,10 @@ void G4hPairProduction::InitialiseEnergyLossProcess(
theParticle = part;
if (!EmModel()) { SetEmModel(new G4hPairProductionModel(part)); }
G4double limit = part->GetPDGMass()*8;
G4double limit = part->GetPDGMass()*8.;
if(limit > lowestKinEnergy) { lowestKinEnergy = limit; }
G4VEmFluctuationModel* fm = 0;
G4VEmFluctuationModel* fm = nullptr;
G4EmParameters* param = G4EmParameters::Instance();
EmModel()->SetLowEnergyLimit(param->MinKinEnergy());
EmModel()->SetHighEnergyLimit(param->MaxKinEnergy());
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4hPairProductionModel.cc 74020 2013-09-19 13:38:38Z gcosmo $
// $Id: G4hPairProductionModel.cc 97391 2016-06-02 10:08:45Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -100,7 +100,7 @@ G4double G4hPairProductionModel::ComputeDMicroscopicCrossSection(
if( Z < 1.5 ) { bbb = bbbh ; g1 = g1h ; g2 = g2h ; }
else { bbb = bbbtf; g1 = g1tf; g2 = g2tf; }
G4double zeta = 0;
G4double zeta = 0.;
G4double zeta1 =
0.073*G4Log(totalEnergy/(particleMass+g1*z23*totalEnergy))-0.26;
if ( zeta1 > 0.)
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4hhIonisation.cc 85013 2014-10-23 09:45:07Z gcosmo $
// $Id: G4hhIonisation.cc 97391 2016-06-02 10:08:45Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -63,8 +63,8 @@
G4hhIonisation::G4hhIonisation(const G4String& name)
: G4VEnergyLossProcess(name),
theParticle(0),
theBaseParticle(0),
theParticle(nullptr),
//theBaseParticle(nullptr),
isInitialised(false)
{
SetStepFunction(0.1, 0.1*mm);
@@ -73,7 +73,7 @@ G4hhIonisation::G4hhIonisation(const G4String& name)
SetSecondaryParticle(G4Electron::Electron());
mass = 0.0;
ratio = 0.0;
flucModel = 0;
flucModel = nullptr;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -130,7 +130,7 @@ void G4hhIonisation::InitialiseEnergyLossProcess(
G4int bin = G4lrint(param->NumberOfBinsPerDecade()*std::log10(emax/emin));
SetDEDXBinning(bin);
G4VEmModel* em = 0;
G4VEmModel* em = nullptr;
if(part->GetPDGCharge() > 0.0) { em = new G4BraggNoDeltaModel(); }
else { em = new G4ICRU73NoDeltaModel(); }
em->SetLowEnergyLimit(emin);
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4mplIonisationModel.cc 91869 2015-08-07 15:21:02Z gcosmo $
// $Id: G4mplIonisationModel.cc 97391 2016-06-02 10:08:45Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -66,7 +66,7 @@
using namespace std;
std::vector<G4double>* G4mplIonisationModel::dedx0 = 0;
std::vector<G4double>* G4mplIonisationModel::dedx0 = nullptr;
G4mplIonisationModel::G4mplIonisationModel(G4double mCharge, const G4String& nam)
: G4VEmModel(nam),G4VEmFluctuationModel(nam),
@@ -83,8 +83,8 @@ G4mplIonisationModel::G4mplIonisationModel(G4double mCharge, const G4String& nam
pi_hbarc2_over_mc2 = pi * hbarc * hbarc / electron_mass_c2;
chargeSquare = magCharge * magCharge;
dedxlim = 45.*nmpl*nmpl*GeV*cm2/g;
fParticleChange = 0;
monopole = 0;
fParticleChange = nullptr;
monopole = nullptr;
mass = 0.0;
}
@@ -102,9 +102,9 @@ void G4mplIonisationModel::SetParticle(const G4ParticleDefinition* p)
monopole = p;
mass = monopole->GetPDGMass();
G4double emin =
std::min(LowEnergyLimit(),0.1*mass*(1/sqrt(1 - betalow*betalow) - 1));
std::min(LowEnergyLimit(),0.1*mass*(1./sqrt(1. - betalow*betalow) - 1.));
G4double emax =
std::max(HighEnergyLimit(),10*mass*(1/sqrt(1 - beta2lim) - 1));
std::max(HighEnergyLimit(),10.*mass*(1./sqrt(1. - beta2lim) - 1.));
SetLowEnergyLimit(emin);
SetHighEnergyLimit(emax);
}
@@ -130,9 +130,9 @@ void G4mplIonisationModel::Initialise(const G4ParticleDefinition* p,
const G4Material* material =
theCoupleTable->GetMaterialCutsCouple(i)->GetMaterial();
G4double eDensity = material->GetElectronDensity();
G4double vF = electron_Compton_length*pow(3*pi*pi*eDensity,0.3333333333);
G4double vF = electron_Compton_length*pow(3.*pi*pi*eDensity,0.3333333333);
(*dedx0)[i] = pi_hbarc2_over_mc2*eDensity*nmpl*nmpl*
(G4Log(2*vF/fine_structure_const) - 0.5)/vF;
(G4Log(2.*vF/fine_structure_const) - 0.5)/vF;
}
}
}
@@ -214,7 +214,7 @@ G4double G4mplIonisationModel::ComputeDEDXAhlen(const G4Material* material,
// now compute the total ionization loss
dedx *= pi_hbarc2_over_mc2 * eDensity * nmpl * nmpl;
if (dedx < 0.0) dedx = 0;
if (dedx < 0.0) dedx = 0.;
return dedx;
}
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4mplIonisationWithDeltaModel.cc 91869 2015-08-07 15:21:02Z gcosmo $
// $Id: G4mplIonisationWithDeltaModel.cc 97391 2016-06-02 10:08:45Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -68,7 +68,7 @@
using namespace std;
std::vector<G4double>* G4mplIonisationWithDeltaModel::dedx0 = 0;
std::vector<G4double>* G4mplIonisationWithDeltaModel::dedx0 = nullptr;
G4mplIonisationWithDeltaModel::G4mplIonisationWithDeltaModel(G4double mCharge,
const G4String& nam)
@@ -86,11 +86,11 @@ G4mplIonisationWithDeltaModel::G4mplIonisationWithDeltaModel(G4double mCharge,
pi_hbarc2_over_mc2 = pi * hbarc * hbarc / electron_mass_c2;
chargeSquare = magCharge * magCharge;
dedxlim = 45.*nmpl*nmpl*GeV*cm2/g;
fParticleChange = 0;
fParticleChange = nullptr;
theElectron = G4Electron::Electron();
G4cout << "### Monopole ionisation model with d-electron production, Gmag= "
<< magCharge/eplus << G4endl;
monopole = 0;
monopole = nullptr;
mass = 0.0;
}
@@ -108,9 +108,9 @@ void G4mplIonisationWithDeltaModel::SetParticle(const G4ParticleDefinition* p)
monopole = p;
mass = monopole->GetPDGMass();
G4double emin =
std::min(LowEnergyLimit(),0.1*mass*(1/sqrt(1 - betalow*betalow) - 1));
std::min(LowEnergyLimit(),0.1*mass*(1./sqrt(1. - betalow*betalow) - 1.));
G4double emax =
std::max(HighEnergyLimit(),10*mass*(1/sqrt(1 - beta2lim) - 1));
std::max(HighEnergyLimit(),10*mass*(1./sqrt(1. - beta2lim) - 1.));
SetLowEnergyLimit(emin);
SetHighEnergyLimit(emax);
}
@@ -137,7 +137,7 @@ G4mplIonisationWithDeltaModel::Initialise(const G4ParticleDefinition* p,
const G4Material* material =
theCoupleTable->GetMaterialCutsCouple(i)->GetMaterial();
G4double eDensity = material->GetElectronDensity();
G4double vF = electron_Compton_length*pow(3*pi*pi*eDensity,0.3333333333);
G4double vF = electron_Compton_length*pow(3.*pi*pi*eDensity,0.3333333333);
(*dedx0)[i] = pi_hbarc2_over_mc2*eDensity*nmpl*nmpl*
(G4Log(2*vF/fine_structure_const) - 0.5)/vF;
}
@@ -218,7 +218,7 @@ G4mplIonisationWithDeltaModel::ComputeDEDXAhlen(const G4Material* material,
// now compute the total ionization loss
dedx *= pi_hbarc2_over_mc2 * eDensity * nmpl * nmpl;
if (dedx < 0.0) { dedx = 0; }
if (dedx < 0.0) { dedx = 0.; }
return dedx;
}