Import Geant4 5.1.0 source tree
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user