Import Geant4 1.0.0 source tree
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IMuBremsstrahlung.cc,v 1.2 1999/05/04 14:24:21 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4IMuBremsstrahlung.cc,v 1.2.8.1 1999/12/07 20:50:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IMuEnergyLoss.cc,v 1.1 1999/01/07 16:11:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4IMuEnergyLoss.cc,v 1.3.6.1 1999/12/07 20:50:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
// $Id:
|
||||
// --------------------------------------------------------------
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
#include "G4IMuEnergyLoss.hh"
|
||||
#include "G4EnergyLossTables.hh"
|
||||
#include "G4Poisson.hh"
|
||||
|
||||
// Initialisation of static members **********************************************
|
||||
// ( this stuff should be defined later using RW ..........)
|
||||
@@ -1336,7 +1337,6 @@ G4VParticleChange* G4IMuEnergyLoss::AlongStepDoIt(
|
||||
|
||||
}
|
||||
|
||||
|
||||
G4double G4IMuEnergyLoss::GetLossWithFluct(const G4DynamicParticle *aParticle,
|
||||
G4Material *aMaterial)
|
||||
// calculate actual loss from the mean loss
|
||||
@@ -1364,7 +1364,7 @@ G4double G4IMuEnergyLoss::GetLossWithFluct(const G4DynamicParticle *aParticle,
|
||||
G4double Tkin,rmass,tau,tau1,tau2,Tm,w1,w2,w3,lnw3,C,prob,
|
||||
beta2,suma,e0,Em,loss,lossc ,w ;
|
||||
G4double a1,a2,a3 ;
|
||||
long p1,p2,p3 ;
|
||||
G4long p1,p2,p3 ;
|
||||
G4int nb ;
|
||||
G4double Corrfac, na,alfa,rfac,namean,sa,alfa1,ea,sea ;
|
||||
G4double dp1,dnmaxDirectFluct,dp3,dnmaxCont2 ;
|
||||
@@ -1428,14 +1428,14 @@ G4double G4IMuEnergyLoss::GetLossWithFluct(const G4DynamicParticle *aParticle,
|
||||
if( Tm<= 0.)
|
||||
{
|
||||
a1=fMeanLoss/e0;
|
||||
p1 = RandPoisson::shoot(a1);
|
||||
p1 = G4Poisson(a1);
|
||||
loss = p1*e0 ;
|
||||
}
|
||||
else
|
||||
{
|
||||
Em = Tm+e0;
|
||||
a1 = fMeanLoss*(Em-e0)/(Em*e0*log(Em/e0));
|
||||
p1 = RandPoisson::shoot(a1);
|
||||
p1 = G4Poisson(a1);
|
||||
w = (Em-e0)/Em;
|
||||
// just to save time .....
|
||||
if ( p1> nmaxDirectFluct)
|
||||
@@ -1461,13 +1461,13 @@ G4double G4IMuEnergyLoss::GetLossWithFluct(const G4DynamicParticle *aParticle,
|
||||
else
|
||||
// not so small Step ...
|
||||
{
|
||||
p1 = RandPoisson::shoot(a1);
|
||||
p2 = RandPoisson::shoot(a2);
|
||||
p1 = G4Poisson(a1);
|
||||
p2 = G4Poisson(a2);
|
||||
loss = p1*e1Fluct+p2*e2Fluct;
|
||||
if(loss>0.)
|
||||
loss += (1.-2.*G4UniformRand())*e1Fluct;
|
||||
|
||||
p3 = RandPoisson::shoot(a3);
|
||||
p3 = G4Poisson(a3);
|
||||
|
||||
// direct sampling of the 'ionization' loss
|
||||
// --------it is slow-------------------
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IMuIonisation.cc,v 1.2 1999/04/13 09:09:42 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4IMuIonisation.cc,v 1.2.8.1 1999/12/07 20:50:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IMuPairProduction.cc,v 1.2 1999/05/04 14:24:23 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4IMuPairProduction.cc,v 1.2.8.1 1999/12/07 20:50:45 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
// $Id:
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MuBremsstrahlung.cc,v 1.5 1999/06/14 13:26:30 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4MuBremsstrahlung.cc,v 1.5.8.1 1999/12/07 20:50:45 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MuEnergyLoss.cc,v 1.6 1999/06/18 11:30:47 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4MuEnergyLoss.cc,v 1.8.6.1 1999/12/07 20:50:45 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
// $Id:
|
||||
// --------------------------------------------------------------
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
#include "G4MuEnergyLoss.hh"
|
||||
#include "G4EnergyLossTables.hh"
|
||||
#include "G4Poisson.hh"
|
||||
|
||||
// Initialisation of static members *******************************************
|
||||
// contributing processes : ion.loss,bremsstrahlung,pair production
|
||||
@@ -1226,7 +1227,7 @@ G4double G4MuEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
|
||||
G4double threshold,w1,w2,w3,lnw3,C,prob,
|
||||
beta2,suma,e0,Em,loss,lossc ,w;
|
||||
G4double a1,a2,a3;
|
||||
long p1,p2,p3;
|
||||
G4long p1,p2,p3;
|
||||
G4int nb;
|
||||
G4double Corrfac, na,alfa,rfac,namean,sa,alfa1,ea,sea;
|
||||
G4double dp1,dnmaxDirectFluct,dp3,dnmaxCont2;
|
||||
@@ -1268,14 +1269,14 @@ G4double G4MuEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
|
||||
if (Tm <= 0.)
|
||||
{
|
||||
a1 = MeanLoss/e0;
|
||||
p1 = RandPoisson::shoot(a1);
|
||||
p1 = G4Poisson(a1);
|
||||
loss = p1*e0 ;
|
||||
}
|
||||
else
|
||||
{
|
||||
Em = Tm+e0;
|
||||
a1 = MeanLoss*(Em-e0)/(Em*e0*log(Em/e0));
|
||||
p1 = RandPoisson::shoot(a1);
|
||||
p1 = G4Poisson(a1);
|
||||
w = (Em-e0)/Em;
|
||||
// just to save time
|
||||
if (p1 > nmaxDirectFluct)
|
||||
@@ -1295,11 +1296,11 @@ G4double G4MuEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
|
||||
|
||||
else // not so small Step
|
||||
{
|
||||
p1 = RandPoisson::shoot(a1);
|
||||
p2 = RandPoisson::shoot(a2);
|
||||
p1 = G4Poisson(a1);
|
||||
p2 = G4Poisson(a2);
|
||||
loss = p1*e1Fluct+p2*e2Fluct;
|
||||
if (loss>0.) loss += (1.-2.*G4UniformRand())*e1Fluct;
|
||||
p3 = RandPoisson::shoot(a3);
|
||||
p3 = G4Poisson(a3);
|
||||
|
||||
lossc = 0.; na = 0.; alfa = 1.;
|
||||
if (p3 > nmaxCont2)
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MuIonisation.cc,v 1.3 1999/04/13 09:09:41 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4MuIonisation.cc,v 1.4.8.1 1999/12/07 20:50:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -90,6 +90,7 @@ void G4MuIonisation::BuildLossTable(const G4ParticleDefinition& aParticleType)
|
||||
DeltaCutInKineticEnergy = theElectron->GetCutsInEnergy() ;
|
||||
|
||||
G4double LowEdgeEnergy , ionloss ;
|
||||
G4double deltaloss ;
|
||||
G4double RateMass ;
|
||||
G4bool isOutRange ;
|
||||
static const G4MaterialTable* theMaterialTable=
|
||||
@@ -144,11 +145,18 @@ void G4MuIonisation::BuildLossTable(const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
LowEdgeEnergy = aVector->GetLowEdgeEnergy(i) ;
|
||||
tau = LowEdgeEnergy/ParticleMass ;
|
||||
gamma = tau +1. ;
|
||||
bg2 = tau*(tau+2.) ;
|
||||
beta2 = bg2/(gamma*gamma) ;
|
||||
Tmax = 2.*electron_mass_c2*bg2
|
||||
/(1.+2.*gamma*RateMass+RateMass*RateMass) ;
|
||||
|
||||
if ( tau < taul )
|
||||
// low energy part , parametrized energy loss formulae
|
||||
{
|
||||
ionloss = 0. ;
|
||||
deltaloss = 0. ;
|
||||
|
||||
for (G4int iel=0; iel<NumberOfElements; iel++)
|
||||
{
|
||||
const G4Element* element = (*theElementVector)(iel);
|
||||
@@ -161,15 +169,21 @@ void G4MuIonisation::BuildLossTable(const G4ParticleDefinition& aParticleType)
|
||||
ionloss += theAtomicNumDensityVector[iel]
|
||||
* element->GetIonisation()->GetClow()/sqrt(tau) ;
|
||||
}
|
||||
if ( DeltaCutInKineticEnergyNow < Tmax)
|
||||
{
|
||||
deltaloss = log(Tmax/DeltaCutInKineticEnergyNow)-
|
||||
beta2*(1.-DeltaCutInKineticEnergyNow/Tmax) ;
|
||||
if(aParticleType.GetPDGSpin() == 0.5)
|
||||
deltaloss += 0.25*(Tmax-DeltaCutInKineticEnergyNow)*
|
||||
(Tmax-DeltaCutInKineticEnergyNow)/
|
||||
(LowEdgeEnergy*LowEdgeEnergy+proton_mass_c2*proton_mass_c2) ;
|
||||
deltaloss *= Factor*ElectronDensity/beta2 ;
|
||||
}
|
||||
ionloss -= deltaloss ;
|
||||
}
|
||||
else
|
||||
// high energy part , Bethe-Bloch formula
|
||||
{
|
||||
gamma = tau +1. ;
|
||||
bg2 = tau*(tau+2.) ;
|
||||
beta2 = bg2/(gamma*gamma) ;
|
||||
Tmax = 2.*electron_mass_c2*bg2
|
||||
/(1.+2.*gamma*RateMass+RateMass*RateMass) ;
|
||||
|
||||
if ( DeltaCutInKineticEnergyNow < Tmax)
|
||||
rcut = DeltaCutInKineticEnergyNow/Tmax ;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MuPairProduction.cc,v 1.6 1999/06/14 13:26:35 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4MuPairProduction.cc,v 1.6.8.1 1999/12/07 20:50:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
|
||||
Reference in New Issue
Block a user