Import Geant4 5.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:15:15 +02:00
parent 37fff30d2e
commit fbd4999cf7
4396 changed files with 56662 additions and 52446 deletions
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4AntiNeutrinoE.cc,v 1.10 2001/10/28 05:05:29 kurasige Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: G4AntiNeutrinoE.cc,v 1.11 2002/12/16 11:15:42 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// ----------------------------------------------------------------------
@@ -84,14 +84,4 @@ G4AntiNeutrinoE* G4AntiNeutrinoE::AntiNeutrinoE()
{
return &theAntiNeutrinoE;
}
// **********************************************************************
// **************************** SetCuts *********************************
// **********************************************************************
void G4AntiNeutrinoE::CalcEnergyCuts( const G4Material* )
{
// Set Energy Cut values to lowest for all materials
SetEnergyCutValues(0.0*keV);
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4AntiNeutrinoMu.cc,v 1.10 2001/10/28 05:05:29 kurasige Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: G4AntiNeutrinoMu.cc,v 1.11 2002/12/16 11:15:42 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// ----------------------------------------------------------------------
@@ -88,14 +88,3 @@ G4AntiNeutrinoMu* G4AntiNeutrinoMu::AntiNeutrinoMu()
return &theAntiNeutrinoMu;
}
// **********************************************************************
// **************************** SetCuts *********************************
// **********************************************************************
void G4AntiNeutrinoMu::CalcEnergyCuts( const G4Material* )
{
// Set Energy Cut values to lowest for all materials
SetEnergyCutValues(0.0*keV);
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4AntiNeutrinoTau.cc,v 1.10 2001/10/28 05:05:30 kurasige Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: G4AntiNeutrinoTau.cc,v 1.11 2002/12/16 11:15:42 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// ----------------------------------------------------------------------
@@ -88,15 +88,3 @@ G4AntiNeutrinoTau* G4AntiNeutrinoTau::AntiNeutrinoTau()
return &theAntiNeutrinoTau;
}
// **********************************************************************
// **************************** SetCuts *********************************
// **********************************************************************
void G4AntiNeutrinoTau::CalcEnergyCuts( const G4Material* )
{
// Set Energy Cut values to lowest for all materials
SetEnergyCutValues(0.0*keV);
}
+2 -120
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Electron.cc,v 1.7 2001/10/16 08:16:17 kurasige Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: G4Electron.cc,v 1.8 2002/12/16 11:15:42 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// ----------------------------------------------------------------------
@@ -84,124 +84,6 @@ G4Electron G4Electron::theElectron(
G4Electron* G4Electron::ElectronDefinition(){return &theElectron;}
// **********************************************************************
// ************************* ComputeLoss ********************************
// **********************************************************************
G4double G4Electron::ComputeLoss(G4double AtomicNumber,
G4double KineticEnergy) const
{
static G4double Z;
static G4double taul, ionpot, ionpotlog;
const G4double cbr1=0.02, cbr2=-5.7e-5, cbr3=1., cbr4=0.072;
const G4double Tlow=10.*keV, Thigh=1.*GeV;
static G4double bremfactor= 0.1 ;
// calculate dE/dx for electrons
if( abs(AtomicNumber-Z)>0.1 )
{
Z = AtomicNumber;
taul = Tlow/GetPDGMass();
ionpot = 1.6e-5*MeV*exp(0.9*log(Z))/GetPDGMass();
ionpotlog = log(ionpot);
}
G4double tau = KineticEnergy/GetPDGMass();
G4double dEdx;
if(tau<taul) {
G4double t1 = taul+1.;
G4double t2 = taul+2.;
G4double tsq = taul*taul;
G4double beta2 = taul*t2/(t1*t1);
G4double f = 1.-beta2+log(tsq/2.)
+(0.5+0.25*tsq+(1.+2.*taul)*log(0.5))/(t1*t1);
dEdx = (log(2.*taul+4.)-2.*ionpotlog+f)/beta2;
dEdx = twopi_mc2_rcl2*Z*dEdx;
G4double clow = dEdx*sqrt(taul);
dEdx = clow/sqrt(KineticEnergy/GetPDGMass());
} else {
G4double t1 = tau+1.;
G4double t2 = tau+2.;
G4double tsq = tau*tau;
G4double beta2 = tau*t2/(t1*t1);
G4double f = 1.-beta2+log(tsq/2.)
+(0.5+0.25*tsq+(1.+2.*tau)*log(0.5))/(t1*t1);
dEdx = (log(2.*tau+4.)-2.*ionpotlog+f)/beta2;
dEdx = twopi_mc2_rcl2*Z*dEdx;
// loss from bremsstrahlung follows
G4double cbrem = (cbr1+cbr2*Z)
*(cbr3+cbr4*log(KineticEnergy/Thigh));
cbrem = Z*(Z+1.)*cbrem*tau/beta2;
cbrem *= bremfactor ;
dEdx += twopi_mc2_rcl2*cbrem;
}
return dEdx;
}
// **********************************************************************
// *********************** BuildRangeVector *****************************
// **********************************************************************
void G4Electron::BuildRangeVector(const G4Material* aMaterial,
const G4LossTable* aLossTable,
G4double maxEnergy,
G4double aMass,
G4PhysicsLogVector* rangeVector)
{
// create range vector for a material
const G4double tlim = 10.*keV;
const G4int maxnbint = 100;
const G4ElementVector* elementVector = aMaterial->GetElementVector();
const G4double* atomicNumDensityVector = aMaterial->GetAtomicNumDensityVector();
G4int NumEl = aMaterial->GetNumberOfElements();
// calculate parameters of the low energy part first
G4int i;
G4double loss=0.;
for (i=0; i<NumEl; i++)
{
G4bool isOut;
G4int IndEl = (*elementVector)[i]->GetIndex();
loss += atomicNumDensityVector[i]*
(*aLossTable)[IndEl]->GetValue(tlim,isOut);
}
G4double taulim = tlim/aMass;
G4double clim = sqrt(taulim)*loss;
G4double taumax = maxEnergy/aMass;
// now the range vector can be filled
for ( i=0; i<TotBin; i++)
{
G4double LowEdgeEnergy = rangeVector->GetLowEdgeEnergy(i);
G4double tau = LowEdgeEnergy/aMass;
if ( tau <= taulim ) {
G4double Value = 2.*aMass*tau*sqrt(tau)/(3.*clim);
rangeVector->PutValue(i,Value);
} else {
G4double rangelim = 2.*aMass*taulim*sqrt(taulim)/(3.*clim);
G4double ltaulow = log(taulim);
G4double ltauhigh = log(tau);
G4double ltaumax = log(taumax);
G4int nbin = G4int(maxnbint*(ltauhigh-ltaulow)/(ltaumax-ltaulow));
if( nbin < 1 ) nbin = 1;
G4double Value = RangeLogSimpson(elementVector, atomicNumDensityVector,
aLossTable, aMass,
ltaulow, ltauhigh,
nbin, NumEl) + rangelim;
rangeVector->PutValue(i,Value);
}
}
}
G4Electron* G4Electron::Electron()
{
return &theElectron;
@@ -22,7 +22,7 @@
//
//
// $Id: G4LeptonConstructor.cc,v 1.3 2001/07/11 10:01:53 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// --------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4MuonMinus.cc,v 1.7 2001/10/16 08:16:17 kurasige Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// ----------------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4MuonPlus.cc,v 1.7 2001/10/16 08:16:18 kurasige Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// ----------------------------------------------------------------------
+2 -17
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4NeutrinoE.cc,v 1.10 2001/10/28 05:05:30 kurasige Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: G4NeutrinoE.cc,v 1.11 2002/12/16 11:15:42 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// ----------------------------------------------------------------------
@@ -81,18 +81,3 @@ G4NeutrinoE G4NeutrinoE::theNeutrinoE(
G4NeutrinoE* G4NeutrinoE::NeutrinoEDefinition() {return &theNeutrinoE;}
G4NeutrinoE* G4NeutrinoE::NeutrinoE() {return &theNeutrinoE;}
// **********************************************************************
// **************************** SetCuts *********************************
// **********************************************************************
void G4NeutrinoE::CalcEnergyCuts( const G4Material* )
{
// Set Energy Cut values to lowest for all materials
SetEnergyCutValues(0.0*keV);
}
+2 -13
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4NeutrinoMu.cc,v 1.10 2001/10/28 05:05:30 kurasige Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: G4NeutrinoMu.cc,v 1.12 2002/12/16 14:06:29 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// ----------------------------------------------------------------------
@@ -88,14 +88,3 @@ G4NeutrinoMu* G4NeutrinoMu::NeutrinoMu()
return &theNeutrinoMu;
}
// **********************************************************************
// **************************** SetCuts *********************************
// **********************************************************************
void G4NeutrinoMu::CalcEnergyCuts( const G4Material* )
{
// Set Energy Cut values to lowest for all materials
SetEnergyCutValues(0.0*keV);
}
+2 -13
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4NeutrinoTau.cc,v 1.10 2001/10/28 05:05:30 kurasige Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: G4NeutrinoTau.cc,v 1.11 2002/12/16 11:15:42 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// ----------------------------------------------------------------------
@@ -81,14 +81,3 @@ G4NeutrinoTau G4NeutrinoTau::theNeutrinoTau(
G4NeutrinoTau* G4NeutrinoTau::NeutrinoTauDefinition(){return &theNeutrinoTau;}
G4NeutrinoTau* G4NeutrinoTau::NeutrinoTau(){return &theNeutrinoTau;}
// **********************************************************************
// **************************** SetCuts *********************************
// **********************************************************************
void G4NeutrinoTau::CalcEnergyCuts( const G4Material* )
{
// Set Energy Cut values to lowest for all materials
SetEnergyCutValues(0.0*keV);
}
+2 -79
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Positron.cc,v 1.6 2001/10/16 08:16:18 kurasige Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: G4Positron.cc,v 1.7 2002/12/16 11:15:42 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// ----------------------------------------------------------------------
@@ -84,83 +84,6 @@ G4Positron G4Positron::thePositron(
G4Positron* G4Positron::PositronDefinition() {return &thePositron;}
// **********************************************************************
// ************************* ComputeLoss ********************************
// **********************************************************************
G4double G4Positron::ComputeLoss(G4double AtomicNumber,
G4double KineticEnergy) const
{
static G4double Z;
static G4double taul, ionpot, ionpotlog;
const G4double cbr1=0.02, cbr2=-5.7e-5, cbr3=1., cbr4=0.072;
const G4double Tlow=10.*keV, Thigh=1.*GeV;
static G4double bremfactor = 0.1 ;
// calculate dE/dx for electrons
if( abs(AtomicNumber-Z)>0.1 )
{
Z = AtomicNumber;
taul = Tlow/GetPDGMass();
ionpot = 1.6e-5*MeV*exp(0.9*log(Z))/GetPDGMass();
ionpotlog = log(ionpot);
}
G4double tau = KineticEnergy/GetPDGMass();
G4double dEdx;
if(tau<taul)
{
G4double t1 = taul+1.;
G4double t2 = taul+2.;
G4double tsq = taul*taul;
G4double beta2 = taul*t2/(t1*t1);
G4double f = 2.*log(taul)
-(6.*taul+1.5*tsq-taul*(1.-tsq/3.)/t2-tsq*(0.5-tsq/12.)/
(t2*t2))/(t1*t1);
dEdx = (log(2.*taul+4.)-2.*ionpotlog+f)/beta2;
dEdx = twopi_mc2_rcl2*Z*dEdx;
G4double clow = dEdx*sqrt(taul);
dEdx = clow/sqrt(KineticEnergy/GetPDGMass());
} else {
G4double t1 = tau+1.;
G4double t2 = tau+2.;
G4double tsq = tau*tau;
G4double beta2 = tau*t2/(t1*t1);
G4double f = 2.*log(tau)
- (6.*tau+1.5*tsq-tau*(1.-tsq/3.)/t2-tsq*(0.5-tsq/12.)/
(t2*t2))/(t1*t1);
dEdx = (log(2.*tau+4.)-2.*ionpotlog+f)/beta2;
dEdx = twopi_mc2_rcl2*Z*dEdx;
// loss from bremsstrahlung follows
G4double cbrem = (cbr1+cbr2*Z)
*(cbr3+cbr4*log(KineticEnergy/Thigh));
cbrem = Z*(Z+1.)*cbrem*tau/beta2;
cbrem *= bremfactor ;
dEdx += twopi_mc2_rcl2*cbrem;
}
return dEdx;
}
// **********************************************************************
// *********************** BuildRangeVector *****************************
// **********************************************************************
void G4Positron::BuildRangeVector(const G4Material* aMaterial,
const G4LossTable* aLossTable,
G4double maxEnergy,
G4double aMass,
G4PhysicsLogVector* rangeVector)
{
G4Electron* pElectron = G4Electron::ElectronDefinition();
pElectron->BuildRangeVector(aMaterial,
aLossTable,
maxEnergy,
aMass,
rangeVector);
}
G4Positron* G4Positron::Positron()
{
return &thePositron;
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4TauMinus.cc,v 1.8 2002/03/08 08:48:31 kurasige Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// ----------------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4TauPlus.cc,v 1.8 2002/03/08 08:48:31 kurasige Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// ----------------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4VLepton.cc,v 1.3 2001/07/11 10:01:54 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// --------------------------------------------------------------