Import Geant4 2.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:42:07 +02:00
parent 103bda00c8
commit e7d7193284
3106 changed files with 171117 additions and 90550 deletions
@@ -5,21 +5,12 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ComptonScattering.hh,v 1.1.10.1 1999/12/07 20:50:47 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4ComptonScattering.hh,v 1.4 1999/12/17 16:20:49 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file --- Copyright CERN 1995
// CERN Geneva Switzerland
//
// For information related to this code contact:
// CERN, CN Division, ASD group
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4ComptonScattering physics process ------
// by Michel Maire, April 1996
// ************************************************************
//
// 10-06-96, updated by M.Maire
// 21-06-96, SetCuts implementation, M.Maire
// 06-01-97, crossection table + meanfreepath table, M.Maire
@@ -29,6 +20,14 @@
// 13-08-98, new methods SetBining() PrintInfo()
// ------------------------------------------------------------
// class description
//
// inherit from G4VDiscreteProcess
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef G4ComptonScattering_h
#define G4ComptonScattering_h 1
@@ -43,34 +42,58 @@
#include "G4Electron.hh"
#include "G4Step.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4ComptonScattering : public G4VDiscreteProcess
{
public:
public: // with description
G4ComptonScattering(const G4String& processName ="compt");
~G4ComptonScattering();
G4bool IsApplicable(const G4ParticleDefinition&);
// true for Gamma only.
void SetPhysicsTableBining(G4double lowE, G4double highE, G4int nBins);
// Allows to define the binning of the PhysicsTables,
// before to build them.
void BuildPhysicsTable(const G4ParticleDefinition& GammaType);
// It builds the total CrossSectionPerAtom table, for Gamma,
// and for every element contained in the elementTable.
// It builds the MeanFreePath table, for Gamma,
// and for every material contained in the materialTable.
// This function overloads a virtual function of the base class.
// It is invoked by the G4ParticleWithCuts::SetCut() method.
void PrintInfoDefinition();
void PrintInfoDefinition();
// Print few lines of informations about the process: validity range,
// origine ..etc..
// Invoked by BuildPhysicsTable().
G4double GetMeanFreePath(const G4Track& aTrack,
G4double previousStepSize,
G4ForceCondition* condition);
// It returns the MeanFreePath of the process for the current track :
// (energy, material)
// The previousStepSize and G4ForceCondition* are not used.
// This function overloads a virtual function of the base class.
// It is invoked by the ProcessManager of the Particle.
G4double GetMicroscopicCrossSection(G4DynamicParticle* aDynamicGamma,
G4Element* anElement);
G4Element* anElement);
// It returns the total CrossSectionPerAtom of the process,
// for the current DynamicGamma (energy), in anElement.
G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
const G4Step& aStep);
// It computes the final state of the process (at end of step),
// returned as a ParticleChange object.
// This function overloads a virtual function of the base class.
// It is invoked by the ProcessManager of the Particle.
protected:
virtual G4double ComputeCrossSectionPerAtom(G4double GammaEnergy,
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ComptonScattering.icc,v 1.1.10.1 1999/12/07 20:50:47 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4ComptonScattering.icc,v 1.2 1999/12/15 14:51:45 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// ---------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4EnergyLossMessenger.hh,v 1.1.10.1 1999/12/07 20:50:48 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4EnergyLossMessenger.hh,v 1.3 2000/05/23 14:39:27 urban Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
@@ -37,6 +37,7 @@ class G4EnergyLossMessenger: public G4UImessenger
G4UIcmdWithABool* RndmStepCmd;
G4UIcmdWithABool* EnlossFlucCmd;
G4UIcmdWithABool* SubSecCmd;
G4UIcommand* StepFuncCmd;
};
@@ -5,21 +5,12 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4GammaConversion.hh,v 1.1.10.1 1999/12/07 20:50:48 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4GammaConversion.hh,v 1.4 1999/12/17 18:26:11 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
// CERN Geneva Switzerland
//
// For information related to this code contact:
// CERN, CN Division, ASD group
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4GammaConversion physics process ------
// by Michel Maire, 24 May 1996
// ************************************************************
//
// 11-06-96, Added GetRandomAtom() method and new data member
// for cumulative total cross section, by M.Maire
// 21-06-96, SetCuts inplementation, M.Maire
@@ -30,6 +21,15 @@
// 13-08-98, new methods SetBining() PrintInfo()
// ------------------------------------------------------------
// class description
//
// gamma ---> e+ e-
// inherit from G4VDiscreteProcess
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef G4GammaConversion_h
#define G4GammaConversion_h 1
@@ -44,34 +44,59 @@
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4Step.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4GammaConversion : public G4VDiscreteProcess
{
public:
public: // with description
G4GammaConversion(const G4String& processName ="conv");
~G4GammaConversion();
G4bool IsApplicable(const G4ParticleDefinition&);
// true for Gamma only.
void SetPhysicsTableBining(G4double lowE, G4double highE, G4int nBins);
void BuildPhysicsTable(const G4ParticleDefinition& GammaType);
// Allows to define the binning of the PhysicsTables,
// before to build them.
void BuildPhysicsTable(const G4ParticleDefinition& GammaType);
// It builds the total CrossSectionPerAtom table, for Gamma,
// and for every element contained in the elementTable.
// It builds the MeanFreePath table, for Gamma,
// and for every material contained in the materialTable.
// This function overloads a virtual function of the base class.
// It is invoked by the G4ParticleWithCuts::SetCut() method.
void PrintInfoDefinition();
// Print few lines of informations about the process: validity range,
// origine ..etc..
// Invoked by BuildPhysicsTable().
G4double GetMeanFreePath(const G4Track& aTrack,
G4double previousStepSize,
G4ForceCondition* condition);
// It returns the MeanFreePath of the process for the current track :
// (energy, material)
// The previousStepSize and G4ForceCondition* are not used.
// This function overloads a virtual function of the base class.
// It is invoked by the ProcessManager of the Particle.
G4double GetMicroscopicCrossSection(const G4DynamicParticle* aDynamicGamma,
G4Element* anElement);
// It returns the total CrossSectionPerAtom of the process,
// for the current DynamicGamma (energy), in anElement.
G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
const G4Step& aStep);
// It computes the final state of the process (at end of step),
// returned as a ParticleChange object.
// This function overloads a virtual function of the base class.
// It is invoked by the ProcessManager of the Particle.
protected:
virtual G4double ComputeMicroscopicCrossSection(G4double GammaEnergy,
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4GammaConversion.icc,v 1.1.10.1 1999/12/07 20:50:48 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4GammaConversion.icc,v 1.2 1999/12/15 14:51:45 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// ---------------------------------------------------------------
@@ -1,156 +0,0 @@
// This code implementation is the intellectual property of
// 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: G4IMultipleScattering.hh,v 1.1.10.1.2.2 1999/12/14 07:08:20 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// $Id:
// --------------------------------------------------------------
// GEANT 4 class header file
//
// For information related to this code contact:
// CERN, IT Division, ASD Group
// History: based on object model of
// 2nd December 1995, G.Cosmo
// --------- G4IMultipleScattering physics process --------
// by Laszlo Urban, October 1997
// **************************************************************
// UNIVERSAL: for arbitrary single charged particle
// 09/12/98: charge can be != +- 1 !!!! L.Urban
// --------------------------------------------------------------
// *****************************************************************
// It is the first implementation of the multiple scattering process
// using an INTEGRAL APPROACH instead of the differential
// one used in the standard implementation .
// *****************************************************************
// by Laszlo Urban, 23 June 1998
// -----------------------------------------------------------------
// 27/10/98: cleanup , L.Urban
#ifndef G4IMultipleScattering_h
#define G4IMultipleScattering_h 1
#include "G4ios.hh"
#include "g4std/fstream"
#include "g4std/iomanip"
#include "globals.hh"
#include "Randomize.hh"
#include "G4EnergyLossTables.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4MuonPlus.hh"
#include "G4Proton.hh"
#include "G4PhysicsLogVector.hh"
#include "G4GPILSelection.hh"
#include "G4VContinuousDiscreteProcess.hh"
#include "G4Step.hh"
#include "G4Track.hh"
#include "G4MaterialTable.hh"
#include "G4ElementTable.hh"
#include "G4ElementVector.hh"
#include "G4VParticleChange.hh"
class G4IMultipleScattering : public G4VContinuousDiscreteProcess
{
public:
G4IMultipleScattering(const G4String& processName="Imsc") ;
~G4IMultipleScattering() ;
G4bool IsApplicable ( const G4ParticleDefinition& ) ;
void SetPhysicsTableBining(G4double lowE,G4double highE,G4int nBins);
void BuildPhysicsTable(const G4ParticleDefinition& aParticleType) ;
void BuildIntegralITable(const G4ParticleDefinition& aParticleType) ;
void BuildIntegralJTable(const G4ParticleDefinition& aParticleType) ;
G4double GetIntegralI(const G4ParticleDefinition *aParticle,
G4double KineticEnergy,G4Material* aMaterial) ;
G4double GetIntegralJ(const G4ParticleDefinition *aParticle,
G4double KineticEnergy,G4Material* aMaterial) ;
void PrintInfoDefinition();
G4double GetContinuousStepLimit(const G4Track& aTrack,
G4double previousStepSize,
G4double currentMinimumStep,
G4double& currentSafety) ;
G4double GetMeanFreePath(const G4Track& aTrack,
G4double previousStepSize,
G4ForceCondition* condition) ;
G4VParticleChange* AlongStepDoIt(const G4Track& aTrack,const G4Step& aStep) ;
G4VParticleChange* PostStepDoIt(const G4Track& aTrack,const G4Step& aStep) ;
protected:
G4double ComputeTransportCrossSection(
const G4ParticleDefinition& aParticleType,
G4double KineticEnergy,
G4double AtomicNumber) ;
G4double TrueToGeomTransformation(const G4DynamicParticle* aParticle,
G4Material* aMaterial,
G4double truePathLength) ;
private:
// hide assignment operator as private
G4IMultipleScattering & operator = (const G4IMultipleScattering &right) ;
G4IMultipleScattering ( const G4IMultipleScattering &) ;
private:
// data members ...................................................
G4PhysicsTable* theTransportMeanFreePathTable;
G4PhysicsTable* theIntegralITable ;
G4PhysicsTable* theIntegralJTable ;
G4double fTransportMeanFreePath ;
G4double fMeanLateralDisplacement ;
G4double LowestKineticEnergy ;
G4double HighestKineticEnergy ;
G4int TotBin ;
const G4Electron* theElectron ;
const G4Positron* thePositron ;
G4Material* lastMaterial;
G4double lastKineticEnergy;
// GeomStepFinal is the geom.steplength at the end of the AlongStep loop
// the others are some 'cache' variables
G4double GeomStepFinal ;
G4double tLast,zLast,CosTheta ;
G4double biglambda ;
//parameters for low energy extrapolation of dE/dx and lambda
const G4double plowloss,plowlambda ;
G4int NumberOfBuildPhysicsTableCalls ;
G4double tuning ;
};
#include "G4IMultipleScattering.icc"
#endif
@@ -1,268 +0,0 @@
// This code implementation is the intellectual property of
// 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: G4IMultipleScattering.icc,v 1.1.10.1 1999/12/07 20:50:48 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// $Id:
// -------------------------------------------------------------
// GEANT 4 class inlined methods file
//
// For information related to this code contact:
// CERN, IT Division, ASD Group
// History: based on object model of
// 2nd December 1995, G.Cosmo
// ------- G4IMultipleScattering physics process ------
// by Laszlo Urban, October 1997
// **************************************************************
// 25/11/97: mods for KinEnergy > HighestLimit
//---------------------------------------------------------------
// *****************************************************************
// It is the first implementation of the multiple scattering process
// using an INTEGRAL APPROACH instead of the differential
// one used in the standard implementation .
// *****************************************************************
// by Laszlo Urban, 23 June 1998
// -----------------------------------------------------------------
// 27/10/98: cleanup , L.Urban
inline G4double G4IMultipleScattering::TrueToGeomTransformation(
const G4DynamicParticle *aParticle,
G4Material *aMaterial,
G4double truePathLength)
// it sets the data member fTransportMeanFreePath and
// performs the true path length -> geometrical path length
// transformation
{
const G4double factt=1.-1.e-6,tausmall=5.e-5,taubig=50.,
minim=1.e-6,smalldroverr=1.e-2,smalldToverT=2.e-2 ;
G4double KineticEnergy,Tfinal,tau,etau,geomPathLength,range,w1,w2,ww1,ww2 ;
G4int materialIndex ;
G4bool isOut ;
KineticEnergy = aParticle->GetKineticEnergy() ;
if((lastMaterial == aMaterial) && (lastKineticEnergy == KineticEnergy))
{ ; }
else
{
lastMaterial=aMaterial;
lastKineticEnergy=KineticEnergy;
materialIndex = aMaterial->GetIndex() ;
if(KineticEnergy<LowestKineticEnergy)
{
fTransportMeanFreePath =
exp(plowlambda*log((KineticEnergy/LowestKineticEnergy)))*
(*theTransportMeanFreePathTable)
(materialIndex)->GetValue(LowestKineticEnergy,isOut);
}
else
{
if(KineticEnergy>HighestKineticEnergy)
KineticEnergy=HighestKineticEnergy;
fTransportMeanFreePath = (*theTransportMeanFreePathTable)
(materialIndex)->GetValue(KineticEnergy,isOut);
}
}
// do the true -> geom transformation
if( fTransportMeanFreePath > biglambda )
{
geomPathLength = truePathLength ;
CosTheta = 1. ;
}
else
{
const G4ParticleDefinition *theParticle = aParticle->GetDefinition() ;
G4double range = G4EnergyLossTables::GetPreciseRangeFromEnergy(
theParticle,KineticEnergy,aMaterial) ;
if(truePathLength > factt*range)
{
geomPathLength = GetIntegralJ(theParticle,
KineticEnergy,aMaterial) ;
CosTheta = 0. ;
}
else
{
if(truePathLength/range < smalldroverr)
{
Tfinal = KineticEnergy - truePathLength*
G4EnergyLossTables::GetPreciseDEDX(
theParticle,KineticEnergy,aMaterial) ;
}
else
{
Tfinal = G4EnergyLossTables::GetPreciseEnergyFromRange(
theParticle,range-truePathLength,
aMaterial) ;
}
if((KineticEnergy-Tfinal)> smalldToverT)
{
w1 = GetIntegralI(theParticle,KineticEnergy,aMaterial) ;
w2 = GetIntegralI(theParticle,Tfinal ,aMaterial) ;
CosTheta = exp(w2-w1) ;
if( CosTheta < minim)
CosTheta = 0. ;
ww1 = GetIntegralJ(theParticle,KineticEnergy,aMaterial) ;
ww2 = GetIntegralJ(theParticle,Tfinal ,aMaterial) ;
geomPathLength = ww1 - ww2*CosTheta ;
}
else
{
tau = truePathLength/fTransportMeanFreePath ;
if(tau<tausmall)
etau = tau ;
else
{
if(tau>taubig)
etau = 1. ;
else
etau = 1.-exp(-tau) ;
}
geomPathLength = fTransportMeanFreePath*etau ;
CosTheta = exp(-truePathLength/fTransportMeanFreePath) ;
}
}
}
if(geomPathLength>truePathLength)
geomPathLength = truePathLength ;
tLast = truePathLength ;
zLast = geomPathLength ;
return geomPathLength ;
}
inline G4double G4IMultipleScattering::GetContinuousStepLimit(
const G4Track& track,
G4double,
G4double currentMinimumStep,
G4double&)
{
G4double zPathLength,tPathLength ;
const G4DynamicParticle* aParticle ;
// this process is not a candidate for selection!!!!!!!!!
SetGPILSelection(NotCandidateForSelection) ;
tPathLength = currentMinimumStep ;
aParticle = track.GetDynamicParticle() ;
zPathLength = TrueToGeomTransformation(aParticle,
track.GetMaterial(),tPathLength);
return zPathLength ;
}
inline G4double G4IMultipleScattering::GetMeanFreePath(const G4Track&,
G4double,
G4ForceCondition* condition)
// it does not limit the Step size , but it sets condition to
// Forced , because the PostStepDoIt always has to be called
{
*condition = Forced ;
return DBL_MAX ;
}
inline G4VParticleChange* G4IMultipleScattering::AlongStepDoIt(
const G4Track& track,const G4Step& Step)
// only a geom path->true path transformation is performed
{
const G4double Tlowlimit=100.*keV ;
const G4double fact = 1.-1.e-10 ;
//!! const G4double tausmall=5.e-5,taubig=0.9999,trueBig=5. ;
const G4double tausmall=5.e-5,taubig=0.9999,trueBig=9.21034 ;
G4double tau ,geomPathLength, truePathLength ;
aParticleChange.Initialize(track);
geomPathLength = track.GetStepLength() ;
//Store this value for later use in PostStepDoIt
GeomStepFinal = geomPathLength ;
if(geomPathLength == zLast)
{
truePathLength = tLast ;
}
else
{
if( fTransportMeanFreePath > biglambda )
{
truePathLength = track.GetStepLength() ;
CosTheta = 1. ;
}
else
{
G4double T = track.GetDynamicParticle()->GetKineticEnergy() ;
if(T < Tlowlimit)
{ // spec. low energy msc code
G4double range = G4EnergyLossTables::GetPreciseRangeFromEnergy(
track.GetDynamicParticle()->GetDefinition(),
T,track.GetMaterial()) ;
G4double alfa = 1.+range/fTransportMeanFreePath ;
G4double z = geomPathLength ;
//protection: z can not be greater than zmax !!!!!!!
G4double zmax = fact*range/alfa ;
if(z > zmax)
z = zmax ;
if(z == zmax)
{
truePathLength = range ;
CosTheta = 0. ;
}
else
{
truePathLength = range*
(1.-exp(log(1.-alfa*z/range)/alfa)) ;
CosTheta = (1.-alfa*z/range)/(1.-truePathLength/range) ;
}
}
else
{
tau = geomPathLength/fTransportMeanFreePath ;
if(tau<tausmall)
truePathLength = fTransportMeanFreePath*tau*(1.+0.5*tau) ;
else
{
if(tau<taubig)
truePathLength = -fTransportMeanFreePath*log(1.-tau) ;
else
truePathLength = fTransportMeanFreePath*trueBig ;
}
CosTheta = exp(-truePathLength/fTransportMeanFreePath) ;
}
}
}
if(truePathLength<geomPathLength)
truePathLength = geomPathLength ;
aParticleChange.SetTrueStepLength(truePathLength) ;
return &aParticleChange ;
}
inline G4bool G4IMultipleScattering::IsApplicable(
const G4ParticleDefinition& particle)
{
return(particle.GetPDGCharge() != 0.);
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4IeBremsstrahlung.hh,v 1.2.8.1 1999/12/07 20:50:48 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4IeBremsstrahlung.hh,v 1.4 2000/04/25 14:33:00 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// $Id:
// ------------------------------------------------------------
@@ -39,7 +39,7 @@
#include "G4ios.hh"
#include "globals.hh"
#include "Randomize.hh"
#include "G4IeEnergyLoss.hh"
#include "G4VIeEnergyLoss.hh"
#include "G4EnergyLossTables.hh"
#include "G4Track.hh"
#include "G4Step.hh"
@@ -50,7 +50,7 @@
#include "G4PhysicsTable.hh"
#include "G4PhysicsLogVector.hh"
class G4IeBremsstrahlung : public G4IeEnergyLoss
class G4IeBremsstrahlung : public G4VIeEnergyLoss
{
public:
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4IeBremsstrahlung.icc,v 1.2.8.1.2.1 1999/12/08 17:34:21 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4IeBremsstrahlung.icc,v 1.3 1999/12/15 14:51:46 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// $Id:
// ---------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4IeIonisation.hh,v 1.2.8.1.2.2 1999/12/14 07:08:20 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4IeIonisation.hh,v 1.4 2000/04/25 14:33:00 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// $Id:
// ------------------------------------------------------------
@@ -34,7 +34,7 @@
#include "g4std/iomanip"
#include "globals.hh"
#include "Randomize.hh"
#include "G4IeEnergyLoss.hh"
#include "G4VIeEnergyLoss.hh"
#include "G4EnergyLossTables.hh"
#include "globals.hh"
#include "G4Track.hh"
@@ -45,7 +45,7 @@
#include "G4PhysicsLogVector.hh"
#include "G4PhysicsLinearVector.hh"
class G4IeIonisation : public G4IeEnergyLoss
class G4IeIonisation : public G4VIeEnergyLoss
{
public:
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4IeIonisation.icc,v 1.2.8.1.2.1 1999/12/08 17:34:21 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4IeIonisation.icc,v 1.3 1999/12/15 14:51:46 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// $Id:
// ---------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4IeplusAnnihilation.hh,v 1.1.10.1 1999/12/07 20:50:49 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4IeplusAnnihilation.hh,v 1.2 1999/12/15 14:51:46 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// $Id:
// ------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4IeplusAnnihilation.icc,v 1.1.10.1.2.1 1999/12/08 17:34:21 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4IeplusAnnihilation.icc,v 1.2 1999/12/15 14:51:46 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// $Id:
// ---------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4IhIonisation.hh,v 1.2.8.1 1999/12/07 20:50:50 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4IhIonisation.hh,v 1.4 2000/04/25 14:33:01 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// ------------------------------------------------------------
@@ -34,7 +34,7 @@
#include "G4ios.hh"
#include "globals.hh"
#include "Randomize.hh"
#include "G4IhEnergyLoss.hh"
#include "G4VIhEnergyLoss.hh"
#include "G4EnergyLossTables.hh"
#include "globals.hh"
#include "G4Track.hh"
@@ -46,7 +46,7 @@
#include "G4PhysicsLinearVector.hh"
class G4IhIonisation : public G4IhEnergyLoss
class G4IhIonisation : public G4VIhEnergyLoss
{
public:
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4IhIonisation.icc,v 1.1.10.1.2.1 1999/12/08 17:34:21 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4IhIonisation.icc,v 1.2 1999/12/15 14:51:47 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// ---------------------------------------------------------------
@@ -0,0 +1,97 @@
// It is process which allows to select PAIonisation model for some logic volume
// in an application. In other logical volumes standard ionisation models
// depending on particle type are realised.
// The process is declared in PhysicsList::ConstructEM() instead of declaration
// of ionisation processes
//
//
//
// History:
// 04.01.00 V. Grichine, first version based on recommendations of J.Apostolakis
// and S. Giani
#ifndef G4IonisationByLogicalVolume_h
#define G4IonisationByLogicalVolume_h 1
#include "G4ios.hh"
#include "globals.hh"
#include "Randomize.hh"
#include "G4VPAIenergyLoss.hh"
#include "globals.hh"
#include "G4Track.hh"
#include "G4Step.hh"
#include "G4Electron.hh"
#include "G4PhysicsLogVector.hh"
#include "G4PhysicsLinearVector.hh"
#include "G4PhysicsFreeVector.hh"
#include "G4PhysicsVector.hh"
#include "G4LogicalVolume.hh"
#include "G4VContinuousDiscreteProcess.hh"
#include "G4PAIonisation.hh"
#include "G4eIonisation.hh"
#include "G4MuIonisation.hh"
#include "G4hIonisation.hh"
class G4IonisationByLogicalVolume : public G4VContinuousDiscreteProcess
{
public:
G4IonisationByLogicalVolume( const G4String& particleName,
G4LogicalVolume* volumeForPAImodel,
const G4String& processName );
~G4IonisationByLogicalVolume() ;
// Methods
G4bool IsApplicable(const G4ParticleDefinition&);
// G4double GetConstraints(const G4DynamicParticle *aParticle,
// G4Material *aMaterial );
G4VParticleChange* PostStepDoIt( const G4Track& track,
const G4Step& Step ) ;
void BuildPhysicsTable(const G4ParticleDefinition& aParticleType);
G4double
GetContinuousStepLimit( const G4Track& track,
G4double previousStepSize,
G4double currentMinimumStep,
G4double& currentSafety ) ;
G4double GetMeanFreePath( const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition ) ;
G4VParticleChange* AlongStepDoIt( const G4Track& track ,
const G4Step& Step ) ;
void SetVolumeForPAImodel( G4LogicalVolume* volumeForPAImodel );
protected:
private:
G4String fParticleName ;
G4String fMaterialNameForPAI ;
G4LogicalVolume* fVolumeForPAImodel ;
G4bool fTriggerPAI ;
G4PAIonisation* fPAIonisation ;
G4eIonisation* feIonisation ;
G4MuIonisation* fMuIonisation ;
G4hIonisation* fhIonisation ;
} ;
#endif
@@ -1,159 +0,0 @@
// This code implementation is the intellectual property of
// 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: G4MultipleScattering.hh,v 1.6.6.1 1999/12/07 20:50:50 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// $Id:
// --------------------------------------------------------------
// GEANT 4 class header file
//
// For information related to this code contact:
// CERN, IT Division, ASD Group
// History: based on object model of
// 2nd December 1995, G.Cosmo
// --------- G4MultipleScattering physics process --------
// by Laszlo Urban, October 1997
// **************************************************************
// UNIVERSAL: for arbitrary single charged particle
// 09/12/98: charge can be != +- 1 !!!! L.Urban
// 30/09/99: nuclear size effect correction L.Urban
// --------------------------------------------------------------
// 22/10/98: cleanup , L.Urban
#ifndef G4MultipleScattering_h
#define G4MultipleScattering_h 1
#include "G4ios.hh"
#include "globals.hh"
#include "Randomize.hh"
#include "G4EnergyLossTables.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4MuonPlus.hh"
#include "G4PionPlus.hh"
#include "G4Proton.hh"
#include "G4PhysicsLogVector.hh"
#include "G4GPILSelection.hh"
#include "G4VContinuousDiscreteProcess.hh"
#include "G4Step.hh"
#include "G4Track.hh"
#include "G4Material.hh"
#include "G4ParticleChangeForMSC.hh"
#include "G4UnitsTable.hh"
class G4MultipleScattering : public G4VContinuousDiscreteProcess
{
public:
G4MultipleScattering(const G4String& processName="msc") ;
~G4MultipleScattering() ;
G4bool IsApplicable ( const G4ParticleDefinition& ) ;
void SetPhysicsTableBining(G4double lowE,G4double highE,G4int nBins);
void BuildPhysicsTable(const G4ParticleDefinition& aParticleType) ;
void PrintInfoDefinition();
G4double GetContinuousStepLimit(const G4Track& aTrack,
G4double previousStepSize,
G4double currentMinimumStep,
G4double& currentSafety) ;
G4double GetMeanFreePath(const G4Track& aTrack,
G4double previousStepSize,
G4ForceCondition* condition) ;
G4VParticleChange* AlongStepDoIt(const G4Track& aTrack,const G4Step& aStep);
G4VParticleChange* PostStepDoIt(const G4Track& aTrack,const G4Step& aStep) ;
G4double GetLambda(G4double KineticEnergy,G4Material* material);
void SetScatteringParameter(G4double value)
{ scatteringparameter = value ; } ;
void SetTuning(G4double value) { tuning = value ; };
void SetCpar (G4double value) { cpar = value ; };
void SetTlimitmsc (G4double value) { Tlimit = value ; };
void SetLateralDisplacementFlag(G4bool flag) {fLatDisplFlag = flag;};
void SetNuclCorrPar(G4double val) { NuclCorrPar = val; } ;
void SetFactPar(G4double val) { FactPar = val ; } ;
protected:
G4double ComputeTransportCrossSection(
const G4ParticleDefinition& aParticleType,
G4double KineticEnergy,
G4double AtomicNumber,
G4double AtomicWeight) ;
G4double TrueToGeomTransformation(const G4DynamicParticle* aParticle,
G4Material* aMaterial,
G4double truePathLength) ;
private:
// hide assignment operator as private
G4MultipleScattering & operator = (const G4MultipleScattering &right) ;
G4MultipleScattering ( const G4MultipleScattering &) ;
// data members ...................................................
private:
G4PhysicsTable* theTransportMeanFreePathTable ;
G4double fTransportMeanFreePath ;
G4double range,alpha1 ;
G4int stepFlag ;
G4double biglambda ;
G4double LowestKineticEnergy ;
G4double HighestKineticEnergy ;
G4int TotBin ;
const G4Electron* theElectron ;
const G4Positron* thePositron ;
G4Material* lastMaterial;
G4double lastKineticEnergy;
G4int materialIndex ;
G4double tLast ;
G4double zLast ;
G4double Tlimit ;
// model parameters
G4double scatteringparameter;
G4double tuning;
G4double cpar;
// with/without lateral displacement
G4bool fLatDisplFlag ;
// nuclear size effect correction
G4double NuclCorrPar ;
G4double FactPar ;
//New ParticleChange
G4ParticleChangeForMSC fParticleChange ;
};
#include "G4MultipleScattering.icc"
#endif
@@ -1,178 +0,0 @@
// This code implementation is the intellectual property of
// 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: G4MultipleScattering.icc,v 1.5.6.1 1999/12/07 20:50:50 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// $Id:
// -------------------------------------------------------------
// GEANT 4 class inlined methods file
//
// For information related to this code contact:
// CERN, IT Division, ASD Group
// History: based on object model of
// 2nd December 1995, G.Cosmo
// ------- G4MultipleScattering physics process ------
// by Laszlo Urban, October 1997
// **************************************************************
// 25/11/97: mods for KinEnergy > HighestLimit
// 22/10/98: cleanup , L.Urban
// 15/10/99: bugfix, some accuracy problems fixed , L.Urban
//---------------------------------------------------------------
inline G4double G4MultipleScattering::GetContinuousStepLimit(
const G4Track& track,
G4double,
G4double currentMinimumStep,
G4double&)
{
G4double zPathLength,tPathLength ;
const G4DynamicParticle* aParticle ;
G4Material* aMaterial ;
G4double KineticEnergy,tau ;
G4bool isOut ;
// this process is not a candidate for selection!!!!!!!!!
SetGPILSelection(NotCandidateForSelection) ;
if(track.GetCurrentStepNumber() == 1)
stepFlag = 0 ;
tPathLength = currentMinimumStep ;
aMaterial = track.GetMaterial() ;
materialIndex = aMaterial->GetIndex() ;
aParticle = track.GetDynamicParticle() ;
KineticEnergy = aParticle->GetKineticEnergy() ;
if((lastMaterial != aMaterial) || (lastKineticEnergy != KineticEnergy))
{
lastKineticEnergy = KineticEnergy ;
materialIndex = aMaterial->GetIndex() ;
if((lastMaterial != aMaterial)||(KineticEnergy >= Tlimit)||(stepFlag != 1))
fTransportMeanFreePath = (*theTransportMeanFreePathTable)
(materialIndex)->GetValue(KineticEnergy,isOut);
lastMaterial = aMaterial;
if(KineticEnergy < Tlimit)
{
stepFlag = 1 ;
range = G4EnergyLossTables::GetRange(aParticle->GetDefinition(),
KineticEnergy,aMaterial) ;
alpha1 = range/fTransportMeanFreePath+1 ;
}
}
// do the true -> geom transformation
if( fTransportMeanFreePath > biglambda )
{
zPathLength = tPathLength ;
}
else if(stepFlag == 0)
{
tau = tPathLength/fTransportMeanFreePath ;
if(tau < perMillion)
zPathLength = tPathLength ;
else
zPathLength = fTransportMeanFreePath*(1.-exp(-tau)) ;
}
else
{
tau = tPathLength/range ;
if(tau<perMillion)
zPathLength = range*(1.-exp(-alpha1*tau))/alpha1 ;
else if(tau<0.99)
zPathLength = range*(1.-exp(alpha1*log(1.-tau)))/alpha1 ;
else
zPathLength = range/alpha1 ;
}
tLast = tPathLength ;
zLast = zPathLength ;
return zPathLength ;
}
inline G4double G4MultipleScattering::GetMeanFreePath(
const G4Track& track,
G4double,
G4ForceCondition* condition)
// it does not limit the Step size , but it sets condition to
// Forced , because the PostStepDoIt always has to be called
{
*condition = Forced ;
return DBL_MAX ;
}
inline G4VParticleChange* G4MultipleScattering::AlongStepDoIt(
const G4Track& track,const G4Step& Step)
// only a geom path->true path transformation is performed
{
G4double tau,geomPathLength, truePathLength ;
fParticleChange.Initialize(track);
geomPathLength = track.GetStepLength() ;
if(geomPathLength == zLast)
{
truePathLength = tLast ;
}
else if( fTransportMeanFreePath > biglambda )
{
truePathLength = geomPathLength ;
}
else if(stepFlag == 0)
{
tau = geomPathLength/fTransportMeanFreePath ;
if(tau<perMillion)
truePathLength = fTransportMeanFreePath*tau ;
else
truePathLength = -fTransportMeanFreePath*log(1.-tau) ;
}
else
{
if(geomPathLength/range < perMillion)
truePathLength = range*(1.-exp(-geomPathLength/range)) ;
else
truePathLength = range*(1.-exp(log(1.-alpha1*geomPathLength/range)/
alpha1)) ;
}
fParticleChange.SetTrueStepLength(truePathLength) ;
return &fParticleChange ;
}
inline G4bool G4MultipleScattering::IsApplicable(
const G4ParticleDefinition& particle)
{
return(particle.GetPDGCharge() != 0.);
}
inline G4double G4MultipleScattering::GetLambda(
G4double KineticEnergy,
G4Material* material)
{
G4bool isOut;
const G4MaterialTable* theMaterialTable =
G4Material::GetMaterialTable() ;
G4double lambda = (*theTransportMeanFreePathTable)
(material->GetIndex())->
GetValue(KineticEnergy,isOut);
return lambda;
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PAIonisation.hh,v 1.2.8.1 1999/12/07 20:50:51 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4PAIonisation.hh,v 1.4 2000/04/25 14:33:02 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// ------------------------------------------------------------
@@ -35,7 +35,7 @@
#include "G4ios.hh"
#include "globals.hh"
#include "Randomize.hh"
#include "G4PAIenergyLoss.hh"
#include "G4VPAIenergyLoss.hh"
#include "globals.hh"
#include "G4Track.hh"
#include "G4Step.hh"
@@ -46,7 +46,7 @@
#include "G4PhysicsVector.hh"
class G4PAIonisation : public G4PAIenergyLoss
class G4PAIonisation : public G4VPAIenergyLoss
{
public:
@@ -5,8 +5,6 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PAIonisation.icc,v 1.3.8.1.2.1 1999/12/08 17:34:22 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// ---------------------------------------------------------------
@@ -21,7 +19,9 @@
// It calculates the ionisation of charged hadrons.
// ***************************************************************
// corrected by L.Urban on 24/09/97
// ---------------------------------------------------------------
// 06.01.00 V.Grichine, modifications in GetConstraints and GetMenaFreePath
//
//
////////////////////////////////////////////////////////////////////
@@ -44,11 +44,11 @@ inline G4double
{
if(aMaterial->GetState() == kStateGas)
{
return 10*mm ;
return 100*mm ;
}
else
{
return 0.01*mm ;
return 0.1*mm ;
}
}
}
@@ -97,7 +97,7 @@ inline G4double G4PAIonisation::GetMeanFreePath(
}
else
{
return 1*mm ;
return DBL_MAX ; // 1*mm ;
}
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PAIxSection.hh,v 1.3.6.1 1999/12/07 20:50:51 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4PAIxSection.hh,v 1.4 1999/12/15 14:51:47 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// G4PAIxSection.hh -- header file
@@ -5,21 +5,12 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PhotoElectricEffect.hh,v 1.3.8.1 1999/12/07 20:50:51 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4PhotoElectricEffect.hh,v 1.5 1999/12/17 18:26:12 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
// CERN Geneva Switzerland
//
// For information related to this code contact:
// CERN, CN Division, ASD group
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4PhotoElectricEffect physics process ------
// by Michel Maire, April 1996
// ************************************************************
//
// 12-06-96, Added SelectRandomAtom() method and new data member
// for cumulative total cross section, by M.Maire
// 21-06-96, SetCuts implementation, M.Maire
@@ -32,6 +23,14 @@
// 06-01-99, Sandia crossSection below 50 keV, V.Grichine mma
// ------------------------------------------------------------
// class description
//
// inherit from G4VDiscreteProcess
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef G4PhotoElectricEffect_h
#define G4PhotoElectricEffect_h 1
@@ -45,34 +44,59 @@
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4Step.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4PhotoElectricEffect : public G4VDiscreteProcess
{
public:
public: // with description
G4PhotoElectricEffect(const G4String& processName ="phot");
~G4PhotoElectricEffect();
G4bool IsApplicable(const G4ParticleDefinition&);
// true for Gamma only.
void SetPhysicsTableBining(G4double lowE, G4double highE, G4int nBins);
// Allows to define the binning of the PhysicsTables,
// before to build them.
void BuildPhysicsTable(const G4ParticleDefinition& PhotonType);
// It builds the total CrossSectionPerAtom table, for Gamma,
// and for every element contained in the elementTable.
// It builds the MeanFreePath table, for Gamma,
// and for every material contained in the materialTable.
// This function overloads a virtual function of the base class.
// It is invoked by the G4ParticleWithCuts::SetCut() method.
void PrintInfoDefinition();
// Print few lines of informations about the process: validity range,
// origine ..etc..
// Invoked by BuildPhysicsTable().
G4double GetMeanFreePath(const G4Track& aTrack,
G4double previousStepSize,
G4ForceCondition* condition);
// It returns the MeanFreePath of the process for the current track :
// (energy, material)
// The previousStepSize and G4ForceCondition* are not used.
// This function overloads a virtual function of the base class.
// It is invoked by the ProcessManager of the Particle.
G4double GetCrossSectionPerAtom(const G4DynamicParticle* aDynamicPhoton,
G4Element* anElement);
// It returns the total CrossSectionPerAtom of the process,
// for the current DynamicGamma (energy), in anElement.
G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
const G4Step& aStep);
// It computes the final state of the process (at end of step),
// returned as a ParticleChange object.
// This function overloads a virtual function of the base class.
// It is invoked by the ProcessManager of the Particle.
protected:
virtual inline G4double ComputeKBindingEnergy(G4double AtomicNumber);
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PhotoElectricEffect.icc,v 1.2.8.1 1999/12/07 20:50:51 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4PhotoElectricEffect.icc,v 1.3 1999/12/15 14:51:48 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// ---------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PolarizedComptonScattering.hh,v 1.1.10.1 1999/12/07 20:50:51 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4PolarizedComptonScattering.hh,v 1.2 1999/12/15 14:51:48 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// ------------------------------------------------------------
// GEANT 4 class header file --- Copyright CERN 1995
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4SynchrotronRadiation.hh,v 1.1.10.1 1999/12/07 20:50:51 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4SynchrotronRadiation.hh,v 1.2 1999/12/15 14:51:48 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// ------------------------------------------------------------
// GEANT 4 class header file
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4IeEnergyLoss.hh,v 1.1.10.1 1999/12/07 20:50:48 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4VIeEnergyLoss.hh,v 1.2 2000/06/07 17:00:48 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// $Id:
// ------------------------------------------------------------
@@ -16,7 +16,7 @@
// CERN, IT Division, ASD group
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ---------- G4IeEnergyLoss physics process -----------
// ---------- G4VIeEnergyLoss physics process -----------
// by Laszlo Urban, 20 March 1997
// ************************************************************
// It is the first implementation of the new unified Energy Loss process.
@@ -33,8 +33,8 @@
// 26.10.98 revision , L.Urban
// ------------------------------------------------------------
#ifndef G4IeEnergyLoss_h
#define G4IeEnergyLoss_h 1
#ifndef G4VIeEnergyLoss_h
#define G4VIeEnergyLoss_h 1
#include "G4ios.hh"
#include "globals.hh"
@@ -54,14 +54,14 @@
class G4EnergyLossMessenger;
class G4IeEnergyLoss : public G4IVContinuousDiscreteProcess
class G4VIeEnergyLoss : public G4IVContinuousDiscreteProcess
{
public:
G4IeEnergyLoss(const G4String& );
G4VIeEnergyLoss(const G4String& );
~G4IeEnergyLoss();
virtual ~G4VIeEnergyLoss();
G4bool IsApplicable(const G4ParticleDefinition&);
@@ -120,8 +120,8 @@ class G4IeEnergyLoss : public G4IVContinuousDiscreteProcess
G4double threshold);
// hide assignment operator
G4IeEnergyLoss (G4IeEnergyLoss &);
G4IeEnergyLoss & operator=(const G4IeEnergyLoss &right);
G4VIeEnergyLoss (G4VIeEnergyLoss &);
G4VIeEnergyLoss & operator=(const G4VIeEnergyLoss &right);
protected:
@@ -193,7 +193,7 @@ class G4IeEnergyLoss : public G4IVContinuousDiscreteProcess
static G4PhysicsTable* theProperTimeElectronTable ;
static G4PhysicsTable* theProperTimePositronTable ;
//processes inherited from G4IeEnergyLoss
//processes inherited from G4VIeEnergyLoss
//register themselves in the static array Recorder
//for electrons/positrons separately
//nb of contributing processes = NbOfProcesses
@@ -235,7 +235,7 @@ class G4IeEnergyLoss : public G4IVContinuousDiscreteProcess
{dRoverRange = c1; finalRange = c2;}
};
#include "G4IeEnergyLoss.icc"
#include "G4VIeEnergyLoss.icc"
#endif
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4IeEnergyLoss.icc,v 1.1.10.1 1999/12/07 20:50:49 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4VIeEnergyLoss.icc,v 1.1 2000/04/25 14:33:02 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// $Id:
// ---------------------------------------------------------------
@@ -16,7 +16,7 @@
// CERN, IT Division, ASD group
// History: based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4IeEnergyLoss physics process ------------
// ------------ G4VIeEnergyLoss physics process ------------
// by Laszlo Urban, 20 March 1997
// ***************************************************************
// It is the first implementation of the NEW UNIFIED ENERGY LOSS PROCESS.
@@ -28,7 +28,7 @@
// 26-10-98: cleanup , L.Urban
// ---------------------------------------------------------------
inline G4bool G4IeEnergyLoss::IsApplicable(const G4ParticleDefinition&
inline G4bool G4VIeEnergyLoss::IsApplicable(const G4ParticleDefinition&
particle)
{
return( (&particle == G4Electron::Electron())
@@ -37,7 +37,7 @@ inline G4bool G4IeEnergyLoss::IsApplicable(const G4ParticleDefinition&
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4IeEnergyLoss::GetContinuousStepLimit(
inline G4double G4VIeEnergyLoss::GetContinuousStepLimit(
const G4Track& track,
G4double,
G4double currentMinimumStep,
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4IhEnergyLoss.hh,v 1.2.8.1 1999/12/07 20:50:49 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4VIhEnergyLoss.hh,v 1.2 2000/06/07 17:00:48 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// $Id:
// ------------------------------------------------------------
@@ -16,7 +16,7 @@
// CERN, IT Division, ASD group
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ---------- G4IhEnergyLoss physics process -----------
// ---------- G4VIhEnergyLoss physics process -----------
// by Laszlo Urban, 30 May 1997
//
// ************************************************************
@@ -38,8 +38,8 @@
// 26/10/98 cleanup , L.Urban
//
#ifndef G4IhEnergyLoss_h
#define G4IhEnergyLoss_h 1
#ifndef G4VIhEnergyLoss_h
#define G4VIhEnergyLoss_h 1
#include "G4ios.hh"
#include "globals.hh"
@@ -58,14 +58,14 @@
class G4EnergyLossMessenger;
class G4IhEnergyLoss : public G4IVContinuousDiscreteProcess
class G4VIhEnergyLoss : public G4IVContinuousDiscreteProcess
{
public:
G4IhEnergyLoss(const G4String& );
G4VIhEnergyLoss(const G4String& );
~G4IhEnergyLoss();
virtual ~G4VIhEnergyLoss();
G4bool IsApplicable(const G4ParticleDefinition&);
@@ -88,8 +88,8 @@ class G4IhEnergyLoss : public G4IVContinuousDiscreteProcess
// hide assignment operator
G4IhEnergyLoss(G4IhEnergyLoss &);
G4IhEnergyLoss & operator=(const G4IhEnergyLoss &right);
G4VIhEnergyLoss(G4VIhEnergyLoss &);
G4VIhEnergyLoss & operator=(const G4VIhEnergyLoss &right);
G4double GetConstraints(const G4DynamicParticle *aParticle,
G4Material *aMaterial);
@@ -225,7 +225,7 @@ class G4IhEnergyLoss : public G4IVContinuousDiscreteProcess
static G4PhysicsTable* theProperTimepTable ;
static G4PhysicsTable* theProperTimepbarTable ;
// processes inherited from G4IhEnergyLoss
// processes inherited from G4VIhEnergyLoss
// register themselves in the static array Recorder
static G4PhysicsTable** RecorderOfpProcess;
static G4PhysicsTable** RecorderOfpbarProcess;
@@ -287,7 +287,7 @@ class G4IhEnergyLoss : public G4IVContinuousDiscreteProcess
};
#include "G4IhEnergyLoss.icc"
#include "G4VIhEnergyLoss.icc"
#endif
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4IhEnergyLoss.icc,v 1.1.10.1 1999/12/07 20:50:50 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4VIhEnergyLoss.icc,v 1.1 2000/04/25 14:33:02 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// $Id:
// ---------------------------------------------------------------
@@ -16,7 +16,7 @@
// CERN, IT Division, ASD group
// History: based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4IhEnergyLoss physics process ------------
// ------------ G4VIhEnergyLoss physics process ------------
// by Laszlo Urban, 30 May 1997
// ***************************************************************
// It is the first implementation of the NEW UNIFIED ENERGY LOSS PROCESS.
@@ -25,13 +25,13 @@
// 26/10/98: cleanup , L.Urban
// ---------------------------------------------------------------
inline G4bool G4IhEnergyLoss::IsApplicable(const G4ParticleDefinition&
inline G4bool G4VIhEnergyLoss::IsApplicable(const G4ParticleDefinition&
particle)
{
return(particle.GetPDGCharge()!= 0.);
}
inline G4double G4IhEnergyLoss::GetContinuousStepLimit(
inline G4double G4VIhEnergyLoss::GetContinuousStepLimit(
const G4Track& track,
G4double,
G4double currentMinimumStep,
@@ -5,10 +5,9 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PAIenergyLoss.hh,v 1.3.2.1.2.2 1999/12/14 07:08:20 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4VPAIenergyLoss.hh,v 1.2 2000/06/07 17:00:48 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// $Id:
// ------------------------------------------------------------
// GEANT 4 class header file
//
@@ -16,7 +15,7 @@
// CERN, IT Division, ASD group
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ---------- G4PAIenergyLoss physics process -----------
// ---------- G4VPAIenergyLoss physics process -----------
// by V. Grichine, 30 Nov 97
// ************************************************************
// It is the first implementation of the NEW UNIFIED ENERGY LOSS PROCESS.
@@ -33,10 +32,11 @@
//*******************************************************************************
// corrected by V. Grichine on 24/11/97
// corrected by L. Urban on 27/05/98 (other corrections come soon!)
// 10/02/00 modifications , new e.m. structure, L.Urban
// ------------------------------------------------------------
#ifndef G4PAIenergyLoss_h
#define G4PAIenergyLoss_h 1
#ifndef G4VPAIenergyLoss_h
#define G4VPAIenergyLoss_h 1
#include "G4ios.hh"
#include "g4std/fstream"
@@ -45,7 +45,7 @@
#include "globals.hh"
#include "Randomize.hh"
#include "G4VContinuousDiscreteProcess.hh"
#include "G4VEnergyLoss.hh"
#include "G4MaterialTable.hh"
#include "G4ElementTable.hh"
#include "G4ElementVector.hh"
@@ -61,21 +61,21 @@
#include "G4PhysicsFreeVector.hh"
class G4PAIenergyLoss : public G4VContinuousDiscreteProcess
class G4VPAIenergyLoss : public G4VEnergyLoss
{
public:
G4PAIenergyLoss(const G4String& );
G4PAIenergyLoss(G4PAIenergyLoss &);
G4VPAIenergyLoss(const G4String& );
G4VPAIenergyLoss(G4VPAIenergyLoss &);
~G4PAIenergyLoss();
virtual ~G4VPAIenergyLoss();
G4bool IsApplicable(const G4ParticleDefinition&);
private:
// hide assignment operator
G4PAIenergyLoss & operator=(const G4PAIenergyLoss &right);
G4VPAIenergyLoss & operator=(const G4VPAIenergyLoss &right);
public:
@@ -109,19 +109,6 @@ class G4PAIenergyLoss : public G4VContinuousDiscreteProcess
//----------------------------------------------
// public functions .........................
// get the number of processes contributing to the cont.energy loss
static G4int GetNUMBEROFPROCESSES() { return NUMBEROFPROCESSES; };
// set the number of processes contributing to the cont.energy loss
static void SetNUMBEROFPROCESSES(G4int number)
{ NUMBEROFPROCESSES=number ; };
// Increment the number of processes contributing to the cont.energy loss
static void PlusNUMBEROFPROCESSES()
{ NUMBEROFPROCESSES++ ; };
// decrement the number of processes contributing to the cont.energy loss
static void MinusNUMBEROFPROCESSES()
{ NUMBEROFPROCESSES-- ; };
//*****************************************************************************
//
G4double GetcurrentInteractionLength() const { return currentInteractionLength; } ;
@@ -136,19 +123,39 @@ class G4PAIenergyLoss : public G4VContinuousDiscreteProcess
G4double GetMeanLoss() const { return fMeanLoss; } ;
// don't use!
G4double OldGetRange(const G4DynamicParticle *aParticle,
G4Material *aMaterial);
G4double GetConstraints(const G4DynamicParticle *aParticle,
G4Material *aMaterial);
// static
G4PhysicsTable* GetPAItransferBank(){ return fPAItransferBank ; } ;
static G4double GetMaxKineticEnergy() { return HighestKineticEnergy ; } ;
static G4double GetMinKineticEnergy() { return LowestKineticEnergy ; } ;
static G4int GetBinNumber() { return TotBin ; } ;
static G4double GetMaxKineticEnergy() { return UpperBoundEloss ; } ;
static G4double GetMinKineticEnergy() { return LowerBoundEloss ; } ;
static G4int GetBinNumber() { return NbinEloss ; } ;
public: // With description
static void SetNbOfProcesses(G4int nb) {NbOfProcesses=nb;};
// Sets number of processes giving contribution to the energy loss
static void PlusNbOfProcesses() {NbOfProcesses++ ;};
// Increases number of processes giving contribution to the energy loss
static void MinusNbOfProcesses() {NbOfProcesses-- ;};
// Decreases number of processes giving contribution to the energy loss
static G4int GetNbOfProcesses() {return NbOfProcesses;};
// Gets number of processes giving contribution to the energy loss
// ( default value = 1)
static void SetLowerBoundEloss(G4double val) {LowerBoundEloss=val;};
static void SetUpperBoundEloss(G4double val) {UpperBoundEloss=val;};
static void SetNbinEloss(G4int nb) {NbinEloss=nb;};
static G4double GetLowerBoundEloss() {return LowerBoundEloss;};
static G4double GetUpperBoundEloss() {return UpperBoundEloss;};
static G4int GetNbinEloss() {return NbinEloss;};
protected:
@@ -180,11 +187,10 @@ class G4PAIenergyLoss : public G4VContinuousDiscreteProcess
// processes inherited from G4hEnergyLoss
// processes inherited from G4VhEnergyLoss
// register themselves in the static array Recorder
// nb of contributing processes = NUMBEROFPROCESSES
static G4int NUMBEROFPROCESSES ;
static G4int NbOfProcesses ;
static G4PhysicsTable** RecorderOfpProcess;
static G4PhysicsTable** RecorderOfpbarProcess;
static G4int CounterOfpProcess ;
@@ -193,31 +199,19 @@ class G4PAIenergyLoss : public G4VContinuousDiscreteProcess
private:
// private functions ..................................
static void BuildRangeTable(const G4ParticleDefinition& aParticleType);
static void BuildRangeVector(G4int materialIndex,
G4PhysicsLogVector* rangeVector);
static G4double RangeIntLin(G4PhysicsVector* physicsVector,G4int nbin);
static G4double RangeIntLog(G4PhysicsVector* physicsVector,G4int nbin);
static void BuildRangeCoeffATable(const G4ParticleDefinition& aParticleType);
static void BuildRangeCoeffBTable(const G4ParticleDefinition& aParticleType);
static void BuildRangeCoeffCTable(const G4ParticleDefinition& aParticleType);
private:
static G4PhysicsTable* theDEDXTable;
// G4PhysicsTable* theRangeTable;
// private data members ...............................
static G4PhysicsTable* theDEDXTable ;
// fdEdx=(-dE/dx)
// computed in GetConstraints at every call;
// it can be used by other processes ( Cherenkov, ...)
G4double fdEdx;
G4double dToverTini ;
// EnergyBinNumber,RangeCoeffA,... are needed to compute range
G4int EnergyBinNumber ;
@@ -231,34 +225,21 @@ class G4PAIenergyLoss : public G4VContinuousDiscreteProcess
static G4PhysicsTable* thepbarRangeCoeffBTable;
static G4PhysicsTable* thepbarRangeCoeffCTable;
//................................................................
// G4PhysicsTable* theRangeCoeffATable;
// G4PhysicsTable* theRangeCoeffBTable;
// G4PhysicsTable* theRangeCoeffCTable;
// dToverTini is the maximum allowed relative energy loss in one Step
// ( set in this class for the moment)
const G4double dToverTini;
// LowestKineticEnergy = lower limit of particle kinetic energy
// HighestKineticEnergy = upper limit of particle kinetic energy
// TotBin = number of bins calculated in BuildPhysicsTable
// from LowestKineticEnergy,HighestKineticEnergy and
// dToverTini
// LowerBoundEloss = lower limit of particle kinetic energy
// UpperBoundEloss = upper limit of particle kinetic energy
// NbinEloss = number of bins
// ---------in the energy loss/range tables-------------------
static const G4double LowestKineticEnergy;
static const G4double HighestKineticEnergy;
static G4int TotBin;
static G4double LowerBoundEloss;
static G4double UpperBoundEloss;
static G4int NbinEloss;
static G4double RTable,LOGRTable; // LOGRTable=log(HighestKineticEnergy
// /LowestKineticEnergy)/TotBin
static G4double RTable,LOGRTable; // LOGRTable=log(UpperBoundEloss
// /LowerBoundEloss)/NbinEloss
// RTable = exp(LOGRTable)
// variables for the integration routines
static G4double Mass,taulow,tauhigh,ltaulow,ltauhigh;
// cut in range
static G4double CutInRange;
@@ -271,17 +252,10 @@ class G4PAIenergyLoss : public G4VContinuousDiscreteProcess
const G4Proton* theProton;
const G4AntiProton* theAntiProton;
// data members to speed up the fluctuation calculation
G4Material *lastMaterial ;
G4double f1Fluct,f2Fluct,e1Fluct,e2Fluct,rateFluct,ipotFluct;
G4double e1LogFluct,e2LogFluct,ipotLogFluct;
const G4double MaxExcitationNumber ;
const G4double probLimFluct ;
const long nmaxDirectFluct,nmaxCont1,nmaxCont2 ;
};
#include "G4PAIenergyLoss.icc"
#include "G4VPAIenergyLoss.icc"
#endif
@@ -294,7 +268,3 @@ class G4PAIenergyLoss : public G4VContinuousDiscreteProcess
@@ -5,8 +5,6 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PAIenergyLoss.icc,v 1.3.8.1.2.1 1999/12/08 17:34:21 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// $Id:
// ---------------------------------------------------------------
@@ -16,14 +14,14 @@
// CERN, IT Division, ASD group
// History: based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4PAIenergyLoss physics process ------------
// ------------ G4VPAIenergyLoss physics process ------------
// by Laszlo Urban, 30 May 1997
// ***************************************************************
// It is the first implementation of the NEW UNIFIED ENERGY LOSS PROCESS.
// It calculates the energy loss of charged hadrons.
// ***************************************************************
// corrected by L.Urban on 24/09/97
//
// 06.01.00 V.Grichine, modifications in GetConstraints
//
////////////////////////////////////////////////////////////////////
@@ -31,12 +29,20 @@
//
inline G4double
G4PAIenergyLoss::GetConstraints(const G4DynamicParticle *aParticle,
G4VPAIenergyLoss::GetConstraints(const G4DynamicParticle *aParticle,
G4Material *aMaterial )
{
// G4cout<<"G4PAIenergyLoss::GetConstraints is called"<<G4endl ;
return 2*mm ;
// G4cout<<"G4VPAIenergyLoss::GetConstraints is called"<<endl ;
// return 2*mm ;
if(aMaterial->GetState() == kStateGas)
{
return 100*mm ;
}
else
{
return 0.1*mm ;
}
}
//////////////////////////////////////////////////////////////////////////
@@ -45,7 +51,7 @@ inline G4double
/* ***********************************************************************
inline G4double G4PAIenergyLoss::GetContinuousStepLimit(
inline G4double G4VPAIenergyLoss::GetContinuousStepLimit(
const G4Track& track,
G4double,
G4double currentMinimumStep,
@@ -62,7 +68,7 @@ inline G4double G4PAIenergyLoss::GetContinuousStepLimit(
*********************************************************** */
inline G4bool G4PAIenergyLoss::IsApplicable(const G4ParticleDefinition&
inline G4bool G4VPAIenergyLoss::IsApplicable(const G4ParticleDefinition&
particle)
{
return(particle.GetPDGCharge()!= 0.);
@@ -5,10 +5,9 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4eEnergyLossPlus.hh,v 1.4.4.1 1999/12/07 20:50:53 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4VeEnergyLoss.hh,v 1.3 2000/06/07 17:00:49 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// $Id:
// ------------------------------------------------------------
// GEANT 4 class header file
//
@@ -16,21 +15,22 @@
// CERN, IT Division, ASD group
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ---------- G4eEnergyLossPlus physics process -----------
// ---------- G4VeEnergyLoss physics process -----------
// by Laszlo Urban, 20 March 1997
// 18/11/98 , L. Urban
// It is a modified version of G4eEnergyLoss:
// It is a modified version of G4VeEnergyLoss:
// continuous energy loss with generation of subcutoff delta rays
// 02/02/99 new data members , L.Urban
// 10/02/00 modifications , new e.m. structure, L.Urban
// ---------------------------------------------------------------
#ifndef G4eEnergyLossPlus_h
#define G4eEnergyLossPlus_h 1
#ifndef G4VeEnergyLoss_h
#define G4VeEnergyLoss_h 1
#include "G4ios.hh"
#include "globals.hh"
#include "Randomize.hh"
#include "G4VContinuousDiscreteProcess.hh"
#include "G4VEnergyLoss.hh"
#include "G4Material.hh"
#include "G4Element.hh"
#include "G4VParticleChange.hh"
@@ -58,19 +58,19 @@ class G4EnergyLossMessenger;
// more can be added ..........
// This class creates static dE/dx and range tables for e+ and e-,
// which tables can be used by other processes , too.
// G4eEnergyLoss is the base class for the processes giving contribution
// G4VeEnergyLoss is the base class for the processes giving contribution
// to the (continuous) energy loss of e+/e- .
// Class description - end
class G4eEnergyLossPlus : public G4VContinuousDiscreteProcess
class G4VeEnergyLoss : public G4VEnergyLoss
{
public:
G4eEnergyLossPlus(const G4String& );
G4VeEnergyLoss(const G4String& );
~G4eEnergyLossPlus();
virtual ~G4VeEnergyLoss();
public: // With description
@@ -115,69 +115,27 @@ class G4eEnergyLossPlus : public G4VContinuousDiscreteProcess
private:
void BuildRangeTable(const G4ParticleDefinition& aParticleType);
void BuildInverseRangeTable(const G4ParticleDefinition& aParticleType);
void BuildTimeTables(const G4ParticleDefinition& aParticleType);
void BuildRangeVector(G4int materialIndex,
G4PhysicsLogVector* rangeVector);
void BuildLabTimeVector(G4int materialIndex,
G4PhysicsLogVector* rangeVector);
void BuildProperTimeVector(G4int materialIndex,
G4PhysicsLogVector* rangeVector);
void InvertRangeVector(G4int materialIndex,
G4PhysicsLogVector* rangeVector);
G4double RangeIntLin(G4PhysicsVector* physicsVector,G4int nbin);
G4double RangeIntLog(G4PhysicsVector* physicsVector,G4int nbin);
G4double LabTimeIntLog(G4PhysicsVector* physicsVector,G4int nbin);
G4double ProperTimeIntLog(G4PhysicsVector* physicsVector,G4int nbin);
void BuildRangeCoeffATable(const G4ParticleDefinition& aParticleType);
void BuildRangeCoeffBTable(const G4ParticleDefinition& aParticleType);
void BuildRangeCoeffCTable(const G4ParticleDefinition& aParticleType);
G4double GetConstraints(const G4DynamicParticle* aParticle,
G4Material* aMaterial);
G4Material* aMaterial);
G4double GetLossWithFluct(const G4DynamicParticle* aParticle,
G4Material* aMaterial,
G4double threshold);
// hide assignment operator
G4eEnergyLossPlus (G4eEnergyLossPlus &);
G4eEnergyLossPlus & operator=(const G4eEnergyLossPlus &right);
G4VeEnergyLoss (G4VeEnergyLoss &);
G4VeEnergyLoss & operator=(const G4VeEnergyLoss &right);
protected:
G4PhysicsTable* theLossTable;
G4double ParticleMass; // heavily used
G4double MinKineticEnergy ; //
G4double Charge,lastCharge ;
G4PhysicsTable* theDEDXTable;
G4PhysicsTable* theRangeTable;
G4PhysicsTable* theRangeCoeffATable;
G4PhysicsTable* theRangeCoeffBTable;
G4PhysicsTable* theRangeCoeffCTable;
private:
G4PhysicsTable* theInverseRangeTable;
G4PhysicsTable* theDEDXTable;
G4PhysicsTable* theLabTimeTable ;
G4PhysicsTable* theProperTimeTable ;
G4int CounterOfProcess;
G4PhysicsTable** RecorderOfProcess;
@@ -186,32 +144,36 @@ class G4eEnergyLossPlus : public G4VContinuousDiscreteProcess
G4double linLossLimit ; //
G4int TotBin; // number of bins in table,
// calculated in BuildPhysicTable
G4double LowestKineticEnergy;
G4double HighestKineticEnergy;
G4double RTable,LOGRTable; // LOGRTable=log(HighestKineticEnergy-
// LowestKineticEnergy)/TotBin
// RTable = exp(LOGRTable)
G4double c1N,c2N ; // coeffs to compute nb of deltas
G4int Ndeltamax ; // upper limit for nb of subcutoff
// delta rays in one step
// variables for the integration routines
G4double taulow,tauhigh,ltaulow,ltauhigh;
// data members to speed up the fluctuation calculation
G4Material* lastMaterial;
G4int imat;
G4double f1Fluct,f2Fluct,e1Fluct,e2Fluct,rateFluct,ipotFluct;
G4double e1LogFluct,e2LogFluct,ipotLogFluct;
const G4double MaxExcitationNumber ;
const G4double probLimFluct ;
const long nmaxDirectFluct,nmaxCont1,nmaxCont2 ;
//
// static part of the class
//
public: // With description
static void SetNbOfProcesses(G4int nb) {NbOfProcesses=nb;};
// Sets number of processes giving contribution to the energy loss
static void PlusNbOfProcesses() {NbOfProcesses++ ;};
// Increases number of processes giving contribution to the energy loss
static void MinusNbOfProcesses() {NbOfProcesses-- ;};
// Decreases number of processes giving contribution to the energy loss
static G4int GetNbOfProcesses() {return NbOfProcesses;};
// Gets number of processes giving contribution to the energy loss
// ( default value = 2)
static void SetLowerBoundEloss(G4double val) {LowerBoundEloss=val;};
static void SetUpperBoundEloss(G4double val) {UpperBoundEloss=val;};
static void SetNbinEloss(G4int nb) {NbinEloss=nb;};
static G4double GetLowerBoundEloss() {return LowerBoundEloss;};
static G4double GetUpperBoundEloss() {return UpperBoundEloss;};
static G4int GetNbinEloss() {return NbinEloss;};
protected:
@@ -231,11 +193,12 @@ class G4eEnergyLossPlus : public G4VContinuousDiscreteProcess
static G4PhysicsTable* theProperTimeElectronTable ;
static G4PhysicsTable* theProperTimePositronTable ;
//processes inherited from G4eEnergyLossPlus
//processes inherited from G4VeEnergyLoss
//register themselves in the static array Recorder
//for electrons/positrons separately
//nb of contributing processes = NbOfProcesses
static G4int NbOfProcesses;
static G4int CounterOfElectronProcess;
static G4int CounterOfPositronProcess ;
static G4PhysicsTable** RecorderOfElectronProcess;
@@ -244,8 +207,18 @@ class G4eEnergyLossPlus : public G4VContinuousDiscreteProcess
static G4double MinDeltaCutInRange; // minimum cut for delta rays
static G4double* MinDeltaEnergy ;
static G4bool setMinDeltaCutInRange ;
private:
static G4int NbinEloss; // number of bins in table,
// calculated in BuildPhysicTable
static G4double LowerBoundEloss;
static G4double UpperBoundEloss;
static G4double RTable,LOGRTable; // LOGRTable=log(UpperBoundEloss-
// LowerBoundEloss)/NbinEloss
// RTable = exp(LOGRTable)
//for interpolation within the tables
static G4PhysicsTable* theeRangeCoeffATable;
static G4PhysicsTable* theeRangeCoeffBTable;
@@ -254,58 +227,20 @@ class G4eEnergyLossPlus : public G4VContinuousDiscreteProcess
static G4PhysicsTable* thepRangeCoeffBTable;
static G4PhysicsTable* thepRangeCoeffCTable;
static G4double dRoverRange; // dRoverRange is the maximum allowed
// deltarange/range in one Step
static G4double finalRange; // final step before stopping
static G4double c1lim,c2lim,c3lim ; // coeffs for computing steplimit
static G4bool rndmStepFlag; // control the randomization of the step
static G4bool EnlossFlucFlag; // control the energy loss fluctuation
static G4EnergyLossMessenger* eLossMessenger;
public: // With description
static void SetNbOfProcesses(G4int nb) {NbOfProcesses=nb;};
// Sets number of processes giving contribution to the energy loss
static void PlusNbOfProcesses() {NbOfProcesses++ ;};
// Increases number of processes giving contribution to the energy loss
static void MinusNbOfProcesses() {NbOfProcesses-- ;};
// Decreases number of processes giving contribution to the energy loss
static G4int GetNbOfProcesses() {return NbOfProcesses;};
// Gets number of processes giving contribution to the energy loss
// ( default value = 2)
static void SetRndmStep (G4bool value) {rndmStepFlag = value;}
// use / do not use randomisation in energy loss steplimit
// ( default = no randomisation)
static void SetEnlossFluc (G4bool value) {EnlossFlucFlag = value;}
// compute energy loss with/without fluctuation
// ( default : with fluctuation)
static void SetStepFunction (G4double c1, G4double c2)
{dRoverRange = c1; finalRange = c2;
c1lim=dRoverRange ;
c2lim=2.*(1-dRoverRange)*finalRange;
c3lim=-(1.-dRoverRange)*finalRange*finalRange;
}
// sets values for data members used to compute the step limit:
// dRoverRange : max. relative range change in one step,
// finalRange : if range <= finalRange --> last step for the particle.
static void SetMinDeltaCutInRange(G4double value)
{MinDeltaCutInRange = value;}
{MinDeltaCutInRange = value;
setMinDeltaCutInRange = true ;}
// sets minimal cut value for the subcutoff secondaries
// (i.e. the kinetic energy of these secondaries can not be
// smaller than the energy corresponds to MinDeltaCutInRange).
};
#include "G4eEnergyLossPlus.icc"
#include "G4VeEnergyLoss.icc"
#endif
@@ -5,10 +5,9 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4eEnergyLossPlus.icc,v 1.3.8.1 1999/12/07 20:50:53 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4VeEnergyLoss.icc,v 1.2 2000/05/23 14:39:26 urban Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// $Id:
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
//
@@ -16,20 +15,20 @@
// CERN, IT Division, ASD group
// History: based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4eEnergyLossPlus physics process ------------
// ------------ G4VeEnergyLoss physics process ------------
// by Laszlo Urban, 20 March 1997
// ***************************************************************
// It is the first implementation of the NEW UNIFIED ENERGY LOSS PROCESS.
// It calculates the energy loss of e+/e-.
// -------------------------------------------------------------
// 18/11/98 , L. Urban
// It is a modified version of G4eEnergyLoss:
// It is a modified version of G4VeEnergyLoss:
// continuous energy loss with generation of subcutoff delta rays
// ---------------------------------------------------------------
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4eEnergyLossPlus::GetConstraints(
inline G4double G4VeEnergyLoss::GetConstraints(
const G4DynamicParticle* aParticle,
G4Material* aMaterial)
{
@@ -71,7 +70,7 @@ inline G4double G4eEnergyLossPlus::GetConstraints(
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4eEnergyLossPlus::GetContinuousStepLimit(
inline G4double G4VeEnergyLoss::GetContinuousStepLimit(
const G4Track& track,
G4double,
G4double currentMinimumStep,
@@ -88,7 +87,7 @@ inline G4double G4eEnergyLossPlus::GetContinuousStepLimit(
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4bool G4eEnergyLossPlus::IsApplicable(const G4ParticleDefinition&
inline G4bool G4VeEnergyLoss::IsApplicable(const G4ParticleDefinition&
particle)
{
return( (&particle == G4Electron::Electron())
@@ -5,10 +5,9 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4hEnergyLossPlus.hh,v 1.3.8.1 1999/12/07 20:50:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4VhEnergyLoss.hh,v 1.3 2000/06/07 17:00:49 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// $Id:
// ------------------------------------------------------------
// GEANT 4 class header file
//
@@ -16,7 +15,7 @@
// CERN, IT Division, ASD group
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ---------- G4hEnergyLossPlus physics process -----------
// ---------- G4VhEnergyLoss physics process -----------
// by Laszlo Urban, 30 May 1997
//
// ************************************************************
@@ -37,15 +36,16 @@
// 7/10/98 some bugs fixed + some cleanup , L.Urban
// 22/10/98 cleanup , L.Urban
// 02/02/99 several bugs fixed, L.Urban
// 10/02/00 modifications , new e.m. structure, L.Urban
//
#ifndef G4hEnergyLossPlus_h
#define G4hEnergyLossPlus_h 1
#ifndef G4VhEnergyLoss_h
#define G4VhEnergyLoss_h 1
#include "G4ios.hh"
#include "globals.hh"
#include "Randomize.hh"
#include "G4VContinuousDiscreteProcess.hh"
#include "G4VEnergyLoss.hh"
#include "G4Material.hh"
#include "G4Element.hh"
#include "G4Proton.hh"
@@ -59,14 +59,14 @@
class G4EnergyLossMessenger;
class G4hEnergyLossPlus : public G4VContinuousDiscreteProcess
class G4VhEnergyLoss : public G4VEnergyLoss
{
public:
G4hEnergyLossPlus(const G4String& );
G4VhEnergyLoss(const G4String& );
~G4hEnergyLossPlus();
virtual ~G4VhEnergyLoss();
G4bool IsApplicable(const G4ParticleDefinition&);
@@ -95,15 +95,12 @@ class G4hEnergyLossPlus : public G4VContinuousDiscreteProcess
// hide assignment operator
G4hEnergyLossPlus(G4hEnergyLossPlus &);
G4hEnergyLossPlus & operator=(const G4hEnergyLossPlus &right);
G4VhEnergyLoss(G4VhEnergyLoss &);
G4VhEnergyLoss & operator=(const G4VhEnergyLoss &right);
G4double GetConstraints(const G4DynamicParticle *aParticle,
G4Material *aMaterial);
G4double GetLossWithFluct(const G4DynamicParticle *aParticle,
G4Material *aMaterial,
G4double MeanLoss) ;
// =====================================================================
@@ -118,99 +115,51 @@ class G4hEnergyLossPlus : public G4VContinuousDiscreteProcess
private:
static G4PhysicsTable* theDEDXTable ;
G4double fdEdx; // computed in GetContraints
G4double fRangeNow ; // computed in GetContraints
G4double linLossLimit ;
// variables for the integration routines
static G4double Mass,taulow,tauhigh,ltaulow,ltauhigh;
// data members to speed up the fluctuation calculation
G4Material *lastMaterial ;
G4int imat ;
G4double f1Fluct,f2Fluct,e1Fluct,e2Fluct,rateFluct,ipotFluct;
G4double e1LogFluct,e2LogFluct,ipotLogFluct;
const G4double MaxExcitationNumber ;
const G4double probLimFluct ;
const long nmaxDirectFluct,nmaxCont1,nmaxCont2 ;
// ====================================================================
// static part of the class
// static part of the cc: // With description
public:
// get the number of processes contributing to the cont.energy loss
static G4int GetNumberOfProcesses() { return NumberOfProcesses; };
static void SetNbOfProcesses(G4int nb) {NbOfProcesses=nb;};
// Sets number of processes giving contribution to the energy loss
// set the number of processes contributing to the cont.energy loss
static void SetNumberOfProcesses(G4int number)
{NumberOfProcesses=number ; };
static void PlusNbOfProcesses() {NbOfProcesses++ ;};
// Increases number of processes giving contribution to the energy loss
// Increment the number of processes contributing to the cont.energy loss
static void PlusNumberOfProcesses()
{ NumberOfProcesses++ ; };
static void MinusNbOfProcesses() {NbOfProcesses-- ;};
// Decreases number of processes giving contribution to the energy loss
// decrement the number of processes contributing to the cont.energy loss
static void MinusNumberOfProcesses()
{ NumberOfProcesses-- ; };
static void SetdRoverRange(G4double value) {dRoverRange = value;}
static void SetRndmStep (G4bool value) {rndmStepFlag = value;}
static void SetEnlossFluc (G4bool value) {EnlossFlucFlag = value;}
static void SetStepFunction (G4double c1, G4double c2)
{dRoverRange = c1; finalRange = c2;
c1lim=dRoverRange ;
c2lim=2.*(1-dRoverRange)*finalRange;
c3lim=-(1.-dRoverRange)*finalRange*finalRange;
}
static G4int GetNbOfProcesses() {return NbOfProcesses;};
// Gets number of processes giving contribution to the energy loss
// ( default value = 1)
static void SetMinDeltaCutInRange(G4double value)
{MinDeltaCutInRange = value;}
{MinDeltaCutInRange = value;
setMinDeltaCutInRange = true ;}
static void SetLowerBoundEloss(G4double val) {LowerBoundEloss=val;};
static void SetUpperBoundEloss(G4double val) {UpperBoundEloss=val;};
static void SetNbinEloss(G4int nb) {NbinEloss=nb;};
static G4double GetLowerBoundEloss() {return LowerBoundEloss;};
static G4double GetUpperBoundEloss() {return UpperBoundEloss;};
static G4int GetNbinEloss() {return NbinEloss;};
protected:
static void BuildDEDXTable(const G4ParticleDefinition& aParticleType);
private:
static void BuildRangeTable(const G4ParticleDefinition& aParticleType);
static void BuildInverseRangeTable(
const G4ParticleDefinition& aParticleType);
static void BuildTimeTables(const G4ParticleDefinition& aParticleType);
static void BuildLabTimeVector(G4int materialIndex,
G4PhysicsLogVector* rangeVector);
static void BuildProperTimeVector(G4int materialIndex,
G4PhysicsLogVector* rangeVector);
static void InvertRangeVector(G4int materialIndex,
G4PhysicsLogVector* rangeVector);
static void BuildRangeVector(G4int materialIndex,
G4PhysicsLogVector* rangeVector);
static G4double LabTimeIntLog(G4PhysicsVector* physicsVector
,G4int nbin);
static G4double ProperTimeIntLog(G4PhysicsVector* physicsVector,
G4int nbin);
static G4double RangeIntLin(G4PhysicsVector* physicsVector
,G4int nbin);
static G4double RangeIntLog(G4PhysicsVector* physicsVector
,G4int nbin);
static void BuildRangeCoeffATable(
const G4ParticleDefinition& aParticleType);
static void BuildRangeCoeffBTable(
const G4ParticleDefinition& aParticleType);
static void BuildRangeCoeffCTable(
const G4ParticleDefinition& aParticleType);
static const G4Proton* theProton ;
static const G4AntiProton* theAntiProton ;
@@ -236,42 +185,35 @@ class G4hEnergyLossPlus : public G4VContinuousDiscreteProcess
static G4PhysicsTable* theProperTimepTable ;
static G4PhysicsTable* theProperTimepbarTable ;
// processes inherited from G4hEnergyLossPlus
// processes inherited from G4VhEnergyLoss
// register themselves in the static array Recorder
static G4int NbOfProcesses ;
static G4PhysicsTable** RecorderOfpProcess;
static G4PhysicsTable** RecorderOfpbarProcess;
static G4int CounterOfpProcess ;
static G4int CounterOfpbarProcess ;
// particle mass
static G4double ParticleMass ;
// cut in range
static G4double ptableElectronCutInRange;
static G4double pbartableElectronCutInRange;
static G4double MinDeltaCutInRange; // minimum cut for delta rays
static G4double* MinDeltaEnergy ;
static G4bool setMinDeltaCutInRange ;
static G4double LowestKineticEnergy;
static G4double HighestKineticEnergy;
static G4int TotBin; // number of bins in table,
// calculated in BuildPhysicsTable
static G4double RTable,LOGRTable; // LOGRTable=log(HighestKineticEnergy
// /LowestKineticEnergy)/TotBin
// RTable = exp(LOGRTable)
static G4double Charge ;
static G4EnergyLossMessenger* hLossMessenger;
private:
static G4PhysicsTable* theDEDXTable;
static G4PhysicsTable* theRangeTable;
static G4PhysicsTable* theInverseRangeTable;
static G4PhysicsTable* theLabTimeTable;
static G4PhysicsTable* theProperTimeTable;
static G4int NbinEloss; // number of bins in table,
// calculated in BuildPhysicTable
static G4double LowerBoundEloss;
static G4double UpperBoundEloss;
static G4double RTable,LOGRTable; // LOGRTable=log(UpperBoundEloss-
// LowerBoundEloss)/NbinEloss
// RTable = exp(LOGRTable)
static G4PhysicsTable** RecorderOfProcess;
static G4int CounterOfProcess;
@@ -284,21 +226,6 @@ class G4hEnergyLossPlus : public G4VContinuousDiscreteProcess
static G4PhysicsTable* thepbarRangeCoeffBTable;
static G4PhysicsTable* thepbarRangeCoeffCTable;
static G4PhysicsTable* theRangeCoeffATable;
static G4PhysicsTable* theRangeCoeffBTable;
static G4PhysicsTable* theRangeCoeffCTable;
static G4double dRoverRange ; // maximum allowed deltarange/range
// in one step
static G4double finalRange ; // last step before stop
static G4double c1lim,c2lim,c3lim ; // coeffs for computing steplimit
static G4bool rndmStepFlag ;
static G4bool EnlossFlucFlag ;
static G4int NumberOfProcesses ;
static G4double c0N,c1N,c2N,c3N ; // coeffs to compute nb of deltas
static G4int Ndeltamax ; // upper limit for nb of subcutoff
// delta rays in one step
@@ -306,7 +233,7 @@ class G4hEnergyLossPlus : public G4VContinuousDiscreteProcess
};
#include "G4hEnergyLossPlus.icc"
#include "G4VhEnergyLoss.icc"
#endif
@@ -5,10 +5,9 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4hEnergyLoss.icc,v 1.2.8.1 1999/12/07 20:50:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4VhEnergyLoss.icc,v 1.2 2000/05/23 14:39:27 urban Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// $Id:
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
//
@@ -16,7 +15,7 @@
// CERN, IT Division, ASD group
// History: based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4hEnergyLoss physics process ------------
// ------------ G4VhEnergyLoss physics process ------------
// by Laszlo Urban, 30 May 1997
// ***************************************************************
// It is the first implementation of the NEW UNIFIED ENERGY LOSS PROCESS.
@@ -25,13 +24,13 @@
// 22/10/98: cleanup , L.Urban
// ---------------------------------------------------------------
inline G4bool G4hEnergyLoss::IsApplicable(const G4ParticleDefinition&
inline G4bool G4VhEnergyLoss::IsApplicable(const G4ParticleDefinition&
particle)
{
return(particle.GetPDGCharge()!= 0.);
}
inline G4double G4hEnergyLoss::GetContinuousStepLimit(
inline G4double G4VhEnergyLoss::GetContinuousStepLimit(
const G4Track& track,
G4double,
G4double currentMinimumStep,
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4eBremsstrahlung.hh,v 1.1.10.1 1999/12/07 20:50:52 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4eBremsstrahlung.hh,v 1.6 2000/05/23 15:44:01 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,8 @@
// ************************************************************
// 1-10-96 : new type G4OrderedTable; ComputePartialSumSigma()
// 20/03/97: new energy loss+ionisation+brems scheme, L.Urban
// 01-09-98, new methods SetBining() and PrintInfo()
// 01-09-98, new method PrintInfo()
// 10/02/00 modifications , new e.m. structure, L.Urban
// ------------------------------------------------------------
#ifndef G4eBremsstrahlung_h
@@ -31,7 +32,7 @@
#include "G4ios.hh"
#include "globals.hh"
#include "Randomize.hh"
#include "G4eEnergyLoss.hh"
#include "G4VeEnergyLoss.hh"
#include "G4Track.hh"
#include "G4Step.hh"
#include "G4Gamma.hh"
@@ -41,7 +42,7 @@
#include "G4PhysicsTable.hh"
#include "G4PhysicsLogVector.hh"
class G4eBremsstrahlung : public G4eEnergyLoss
class G4eBremsstrahlung : public G4VeEnergyLoss
{
public:
@@ -52,8 +53,6 @@ class G4eBremsstrahlung : public G4eEnergyLoss
G4bool IsApplicable(const G4ParticleDefinition&);
void SetPhysicsTableBining(G4double lowE, G4double highE, G4int nBins);
void PrintInfoDefinition();
void BuildPhysicsTable(const G4ParticleDefinition& ParticleType);
@@ -119,11 +118,26 @@ class G4eBremsstrahlung : public G4eEnergyLoss
G4PhysicsTable* theMeanFreePathTable ;
G4OrderedTable PartialSumSigma; // partial sum of total crosssection
G4OrderedTable PartialSumSigma; // partial sum of total crosssection
static G4double LowerBoundLambda; // low energy limit of the crossection formula
static G4double UpperBoundLambda; // high energy limit of the crossection formula
static G4int NbinLambda; // number of bins in the tables
G4double MinThreshold; // minimun value for the production threshold
G4double LowestKineticEnergy,HighestKineticEnergy; // bining of the Eloss table
G4int TotBin; // (from G4VeEnergyLoss)
public:
static void SetLowerBoundLambda(G4double val) {LowerBoundLambda = val;};
static void SetUpperBoundLambda(G4double val) {UpperBoundLambda = val;};
static void SetNbinLambda(G4int n) {NbinLambda = n;};
static G4double GetLowerBoundLambda() { return LowerBoundLambda;};
static G4double GetUpperBoundLambda() { return UpperBoundLambda;};
static G4int GetNbinLambda() {return NbinLambda;};
G4double LowestKineticEnergy; // low energy limit of the crossection formula
G4double HighestKineticEnergy; // high energy limit of the crossection formula
G4int TotBin; // number of bins in the tables
};
#include "G4eBremsstrahlung.icc"
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4eBremsstrahlung.icc,v 1.1.10.1 1999/12/07 20:50:52 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4eBremsstrahlung.icc,v 1.3 2000/05/23 15:44:07 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// ---------------------------------------------------------------
@@ -95,29 +95,6 @@ inline G4double G4eBremsstrahlung::ScreenFunction2(G4double ScreenVariable)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4eBremsstrahlung::ComputeMeanFreePath(
const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
const G4Material* aMaterial)
{
const G4ElementVector* theElementVector = aMaterial->GetElementVector() ;
const G4double* theAtomNumDensityVector = aMaterial->GetAtomicNumDensityVector();
G4double GammaEnergyCut = (G4Gamma::GetCutsInEnergy())[aMaterial->GetIndex()];
G4double SIGMA = 0 ;
for ( G4int i=0 ; i < aMaterial->GetNumberOfElements() ; i++ )
{
SIGMA += theAtomNumDensityVector[i] *
ComputeMicroscopicCrossSection( ParticleType, KineticEnergy,
(*theElementVector)(i)->GetZ(),
GammaEnergyCut );
}
return SIGMA > DBL_MIN ? 1./SIGMA : DBL_MAX;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4eBremsstrahlung::GetLambda(
G4double KineticEnergy,
G4Material* material)
@@ -1,132 +0,0 @@
// This code implementation is the intellectual property of
// 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: G4eBremsstrahlungPlus.hh,v 1.1.10.1 1999/12/07 20:50:52 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
// CERN Geneva Switzerland
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4eBremsstrahlungPlus physics process ------
// by Michel Maire, 24 July 1996
// ************************************************************
// 1-10-96 : new type G4OrderedTable; ComputePartialSumSigma()
// 20/03/97: new energy loss+ionisation+brems scheme, L.Urban
// 01-09-98, new methods SetBining() and PrintInfo()
// ------------------------------------------------------------
#ifndef G4eBremsstrahlungPlus_h
#define G4eBremsstrahlungPlus_h 1
#include "G4ios.hh"
#include "globals.hh"
#include "Randomize.hh"
#include "G4eEnergyLossPlus.hh"
#include "G4Track.hh"
#include "G4Step.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4OrderedTable.hh"
#include "G4PhysicsTable.hh"
#include "G4PhysicsLogVector.hh"
class G4eBremsstrahlungPlus : public G4eEnergyLossPlus
{
public:
G4eBremsstrahlungPlus(const G4String& processName = "eBrem+");
~G4eBremsstrahlungPlus();
G4bool IsApplicable(const G4ParticleDefinition&);
void SetPhysicsTableBining(G4double lowE, G4double highE, G4int nBins);
void PrintInfoDefinition();
void BuildPhysicsTable(const G4ParticleDefinition& ParticleType);
void BuildLossTable(const G4ParticleDefinition& ParticleType);
void BuildLambdaTable(const G4ParticleDefinition& ParticleType);
G4double GetMeanFreePath(const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition );
G4VParticleChange *PostStepDoIt(const G4Track& track,
const G4Step& step);
G4double GetLambda(
G4double KineticEnergy,G4Material* material);
protected:
G4double ComputeMeanFreePath( const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
const G4Material* aMaterial);
void ComputePartialSumSigma( const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
const G4Material* aMaterial);
virtual G4double ComputeMicroscopicCrossSection(
const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
G4double AtomicNumber,
G4double GammaEnergyCut);
private:
G4double ComputeBremLoss(G4double Z,G4double natom,G4double T,
G4double Cut,G4double x);
G4double ComputeXYPolynomial(G4double x,G4double y,G4int xSize,
G4int ySize,const G4double coeff[]);
G4double ComputePositronCorrFactorLoss(G4double AtomicNumber,
G4double KineticEnergy,
G4double GammaEnergyCut);
G4double ComputePositronCorrFactorSigma(G4double AtomicNumber,
G4double KineticEnergy,
G4double GammaEnergyCut);
G4Element* SelectRandomAtom(G4Material* aMaterial) const;
G4double ScreenFunction1(G4double ScreenVariable);
G4double ScreenFunction2(G4double ScreenVariable);
G4eBremsstrahlungPlus & operator=(const G4eBremsstrahlungPlus &right);
G4eBremsstrahlungPlus(const G4eBremsstrahlungPlus&);
private:
G4PhysicsTable* theMeanFreePathTable ;
G4OrderedTable PartialSumSigma; // partial sum of total crosssection
G4double LowestKineticEnergy; // low energy limit of the crossection formula
G4double HighestKineticEnergy; // high energy limit of the crossection formula
G4int TotBin; // number of bins in the tables
};
#include "G4eBremsstrahlungPlus.icc"
#endif
@@ -1,135 +0,0 @@
// This code implementation is the intellectual property of
// 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: G4eBremsstrahlungPlus.icc,v 1.1.10.1 1999/12/07 20:50:52 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4eBremsstrahlungPlus physics process ---------
// by Michel Maire, 27 July 1996
// ***************************************************************
// 13-12-96 : Sign corrected in the ScreenFunctions, L.Urban
// 20/03/97 : new energy loss+ionisation+brems scheme, L.Urban
// ***************************************************************
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4bool G4eBremsstrahlungPlus::IsApplicable(
const G4ParticleDefinition& particle)
{
return( (&particle == G4Electron::Electron())
||(&particle == G4Positron::Positron()) );
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4eBremsstrahlungPlus::GetMeanFreePath(const G4Track& track,
G4double,
G4ForceCondition*)
// gives the MeanFreePath in GEANT4 internal units
{
const G4DynamicParticle* aDynamicParticle = track.GetDynamicParticle();
G4double KineticEnergy = aDynamicParticle->GetKineticEnergy();
G4Material* aMaterial = track.GetMaterial();
G4double MeanFreePath;
G4bool isOutRange ;
if (KineticEnergy < LowestKineticEnergy)
MeanFreePath = DBL_MAX;
else {
if (KineticEnergy > HighestKineticEnergy) KineticEnergy = 0.99*HighestKineticEnergy ;
MeanFreePath = (*theMeanFreePathTable)(aMaterial->GetIndex())->
GetValue( KineticEnergy, isOutRange );
}
return MeanFreePath;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4eBremsstrahlungPlus::ScreenFunction1(G4double ScreenVariable)
// compute the value of the screening function 3*PHI1 - PHI2
{
G4double screenVal;
if (ScreenVariable > 1.)
screenVal = 42.24 - 8.368*log(ScreenVariable+0.952);
else
screenVal = 42.392 - ScreenVariable* (7.796 - 1.961*ScreenVariable);
return screenVal;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4eBremsstrahlungPlus::ScreenFunction2(G4double ScreenVariable)
// compute the value of the screening function 1.5*PHI1 - 0.5*PHI2
{
G4double screenVal;
if (ScreenVariable > 1.)
screenVal = 42.24 - 8.368*log(ScreenVariable+0.952);
else
screenVal = 41.734 - ScreenVariable* (6.484 - 1.250*ScreenVariable);
return screenVal;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4eBremsstrahlungPlus::ComputeMeanFreePath(
const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
const G4Material* aMaterial)
{
const G4ElementVector* theElementVector = aMaterial->GetElementVector() ;
const G4double* theAtomNumDensityVector = aMaterial->GetAtomicNumDensityVector();
G4double GammaEnergyCut = (G4Gamma::GetCutsInEnergy())[aMaterial->GetIndex()];
G4double SIGMA = 0 ;
for ( G4int i=0 ; i < aMaterial->GetNumberOfElements() ; i++ )
{
SIGMA += theAtomNumDensityVector[i] *
ComputeMicroscopicCrossSection( ParticleType, KineticEnergy,
(*theElementVector)(i)->GetZ(),
GammaEnergyCut );
}
return SIGMA > DBL_MIN ? 1./SIGMA : DBL_MAX;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4eBremsstrahlungPlus::GetLambda(
G4double KineticEnergy,
G4Material* material)
{
G4bool isOut;
const G4MaterialTable* theMaterialTable =
G4Material::GetMaterialTable() ;
G4double lambda = (*theMeanFreePathTable)
[material->GetIndex()]->
GetValue(KineticEnergy,isOut);
return lambda;
}
@@ -1,292 +0,0 @@
// This code implementation is the intellectual property of
// 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: G4eEnergyLoss.hh,v 1.4.4.1 1999/12/07 20:50:53 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// $Id:
// ------------------------------------------------------------
// GEANT 4 class header file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ---------- G4eEnergyLoss physics process -----------
// by Laszlo Urban, 20 March 1997
//
// 27.05.98 OldGetRange removed + other corrs , L.Urban
// 10.09.98 cleanup
// 16.10.98 public method SetStepFunction() + messenger class
// 20.01.99 new data members , L.Urban
// ------------------------------------------------------------
#ifndef G4eEnergyLoss_h
#define G4eEnergyLoss_h 1
#include "G4ios.hh"
#include "globals.hh"
#include "Randomize.hh"
#include "G4VContinuousDiscreteProcess.hh"
#include "G4Material.hh"
#include "G4Element.hh"
#include "G4ParticleChangeForLoss.hh"
#include "globals.hh"
#include "G4Track.hh"
#include "G4Step.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4PhysicsLogVector.hh"
#include "G4PhysicsLinearVector.hh"
#include "G4EnergyLossTables.hh"
// Class description:
// This class is the implementation of the unified Energy Loss process.
// It calculates the continuous energy loss for e+/e-.
// The following processes give contributions to the continuous
// energy loss (by default) :
// --- ionisation (= cont.ion.loss + delta ray production)
// --- bremsstrahlung (= cont.loss due to soft brems+discrete bremsstrahlung)
// more can be added ..........
// This class creates static dE/dx and range tables for e+ and e-,
// which tables can be used by other processes , too.
// G4eEnergyLoss is the base class for the processes giving contribution
// to the (continuous) energy loss of e+/e- .
// Class description - end
class G4EnergyLossMessenger;
class G4eEnergyLoss : public G4VContinuousDiscreteProcess
{
public:
G4eEnergyLoss(const G4String& );
~G4eEnergyLoss();
public: // With description
G4bool IsApplicable(const G4ParticleDefinition&);
// true for e+/e- , false otherwise
void BuildDEDXTable(const G4ParticleDefinition& aParticleType);
// It builds dE/dx and range tables for aParticleType and
// for every material contained in the materialtable.
G4double GetContinuousStepLimit(const G4Track& track,
G4double previousStepSize,
G4double currentMinimumStep,
G4double& currentSafety);
// Computes the steplimit due to the energy loss process.
G4VParticleChange* AlongStepDoIt(const G4Track& track,
const G4Step& Step) ;
// Performs the computation of the (continuous) energy loss
// after the step (with fluctuation).
virtual G4double GetMeanFreePath(const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition) = 0;
// Virtual function to be overridden in the derived classes
// ( ionisation and bremsstrahlung) .
virtual G4VParticleChange* PostStepDoIt(const G4Track& track,
const G4Step& Step) = 0;
// Virtual function to be overridden in the derived classes
// ( ionisation and bremsstrahlung) .
private:
void BuildRangeTable(const G4ParticleDefinition& aParticleType);
void BuildInverseRangeTable(const G4ParticleDefinition& aParticleType);
void BuildTimeTables(const G4ParticleDefinition& aParticleType);
void BuildRangeVector(G4int materialIndex,
G4PhysicsLogVector* rangeVector);
void BuildLabTimeVector(G4int materialIndex,
G4PhysicsLogVector* rangeVector);
void BuildProperTimeVector(G4int materialIndex,
G4PhysicsLogVector* rangeVector);
void InvertRangeVector(G4int materialIndex,
G4PhysicsLogVector* rangeVector);
G4double RangeIntLin(G4PhysicsVector* physicsVector,G4int nbin);
G4double RangeIntLog(G4PhysicsVector* physicsVector,G4int nbin);
G4double LabTimeIntLog(G4PhysicsVector* physicsVector,G4int nbin);
G4double ProperTimeIntLog(G4PhysicsVector* physicsVector,G4int nbin);
void BuildRangeCoeffATable(const G4ParticleDefinition& aParticleType);
void BuildRangeCoeffBTable(const G4ParticleDefinition& aParticleType);
void BuildRangeCoeffCTable(const G4ParticleDefinition& aParticleType);
G4double GetConstraints(const G4DynamicParticle* aParticle,
G4Material* aMaterial);
G4double GetLossWithFluct(const G4DynamicParticle* aParticle,
G4Material* aMaterial,
G4double threshold);
// hide assignment operator
G4eEnergyLoss (G4eEnergyLoss &);
G4eEnergyLoss & operator=(const G4eEnergyLoss &right);
protected:
G4PhysicsTable* theLossTable;
G4double ParticleMass; // heavily used
G4double MinKineticEnergy ; // particle with kinetic energy
// smaller than MinKineticEnergy
// is stopped in AlongStepDoIt
G4double Charge,lastCharge ;
G4PhysicsTable* theDEDXTable;
G4PhysicsTable* theRangeTable;
G4PhysicsTable* theRangeCoeffATable;
G4PhysicsTable* theRangeCoeffBTable;
G4PhysicsTable* theRangeCoeffCTable;
private:
G4PhysicsTable* theInverseRangeTable;
G4PhysicsTable* theLabTimeTable ;
G4PhysicsTable* theProperTimeTable ;
G4int CounterOfProcess;
G4PhysicsTable** RecorderOfProcess;
G4double fdEdx; // computed in GetConstraints
G4double fRangeNow; // computed in GetConstraints
G4double linLossLimit ; // used in AlongStepDoIt
G4int TotBin; // number of bins in table,
// calculated in BuildPhysicTable
G4double LowestKineticEnergy;
G4double HighestKineticEnergy;
G4double RTable,LOGRTable; // LOGRTable=log(HighestKineticEnergy-
// LowestKineticEnergy)/TotBin
// RTable = exp(LOGRTable)
// variables for the integration routines
G4double taulow,tauhigh,ltaulow,ltauhigh;
// data members to speed up the fluctuation calculation
G4Material* lastMaterial;
G4int imat;
G4double f1Fluct,f2Fluct,e1Fluct,e2Fluct,rateFluct,ipotFluct;
G4double e1LogFluct,e2LogFluct,ipotLogFluct;
const G4double MaxExcitationNumber ;
const G4double probLimFluct ;
const long nmaxDirectFluct,nmaxCont1,nmaxCont2 ;
//New ParticleChange
G4ParticleChangeForLoss fParticleChange ;
//
// static part of the class
//
protected:
//basic DEDX and Range tables
static G4PhysicsTable* theDEDXElectronTable ;
static G4PhysicsTable* theDEDXPositronTable ;
static G4PhysicsTable* theRangeElectronTable ;
static G4PhysicsTable* theRangePositronTable ;
//inverse tables of the range tables
static G4PhysicsTable* theInverseRangeElectronTable;
static G4PhysicsTable* theInverseRangePositronTable;
// lab and proper time tables
static G4PhysicsTable* theLabTimeElectronTable ;
static G4PhysicsTable* theLabTimePositronTable ;
static G4PhysicsTable* theProperTimeElectronTable ;
static G4PhysicsTable* theProperTimePositronTable ;
//processes inherited from G4eEnergyLoss
//register themselves in the static array Recorder
//for electrons/positrons separately
//nb of contributing processes = NbOfProcesses
static G4int NbOfProcesses;
static G4int CounterOfElectronProcess;
static G4int CounterOfPositronProcess ;
static G4PhysicsTable** RecorderOfElectronProcess;
static G4PhysicsTable** RecorderOfPositronProcess;
private:
//for interpolation within the tables
static G4PhysicsTable* theeRangeCoeffATable;
static G4PhysicsTable* theeRangeCoeffBTable;
static G4PhysicsTable* theeRangeCoeffCTable;
static G4PhysicsTable* thepRangeCoeffATable;
static G4PhysicsTable* thepRangeCoeffBTable;
static G4PhysicsTable* thepRangeCoeffCTable;
static G4double dRoverRange; // dRoverRange is the maximum allowed
// deltarange/range in one Step
static G4double finalRange; // final step before stopping
static G4double c1lim,c2lim,c3lim ; // coeffs for computing steplimit
static G4bool rndmStepFlag; // control the randomization of the step
static G4bool EnlossFlucFlag; // control the energy loss fluctuation
static G4EnergyLossMessenger* eLossMessenger;
public: // With description
static void SetNbOfProcesses(G4int nb) {NbOfProcesses=nb;};
// Sets number of processes giving contribution to the energy loss
static void PlusNbOfProcesses() {NbOfProcesses++ ;};
// Increases number of processes giving contribution to the energy loss
static void MinusNbOfProcesses() {NbOfProcesses-- ;};
// Decreases number of processes giving contribution to the energy loss
static G4int GetNbOfProcesses() {return NbOfProcesses;};
// Gets number of processes giving contribution to the energy loss
// ( default value = 2)
static void SetRndmStep (G4bool value) {rndmStepFlag = value;}
// use / do not use randomisation in energy loss steplimit
// ( default = no randomisation)
static void SetEnlossFluc (G4bool value) {EnlossFlucFlag = value;}
// compute energy loss with/without fluctuation
// ( default : with fluctuation)
static void SetStepFunction (G4double c1, G4double c2)
{dRoverRange = c1; finalRange = c2;
c1lim=dRoverRange ;
c2lim=2.*(1-dRoverRange)*finalRange;
c3lim=-(1.-dRoverRange)*finalRange*finalRange;
}
// sets values for data members used to compute the step limit:
// dRoverRange : max. relative range change in one step,
// finalRange : if range <= finalRange --> last step for the particle.
};
#include "G4eEnergyLoss.icc"
#endif
@@ -1,94 +0,0 @@
// This code implementation is the intellectual property of
// 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: G4eEnergyLoss.icc,v 1.4.8.1 1999/12/07 20:50:53 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// $Id:
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// History: based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4eEnergyLoss physics process ------------
// by Laszlo Urban, 20 March 1997
// ***************************************************************
// It is the first implementation of the NEW UNIFIED ENERGY LOSS PROCESS.
// It calculates the energy loss of e+/e-.
// -------------------------------------------------------------
//
// 08-09-98: cleanup
//
// ---------------------------------------------------------------
inline G4double G4eEnergyLoss::GetConstraints(
const G4DynamicParticle* aParticle,
G4Material* aMaterial)
{
G4double StepLimit;
// returns the Step limit
// dRoverRange is the max. allowed relative range loss in one Step
// it calculates dEdx and the range as well....
const G4ParticleDefinition* ParticleType=aParticle->GetDefinition();
Charge = aParticle->GetDefinition()->GetPDGCharge();
if(Charge != lastCharge)
{
lastCharge = Charge ;
}
G4double KineticEnergy = aParticle->GetKineticEnergy();
fdEdx = G4EnergyLossTables::GetDEDX(ParticleType,KineticEnergy,aMaterial);
fRangeNow =
G4EnergyLossTables::GetRange(ParticleType,KineticEnergy,aMaterial);
// compute the (random) Step limit
if (fRangeNow>finalRange)
{
StepLimit = c1lim*fRangeNow+c2lim+c3lim/fRangeNow;
//randomise this value
if (rndmStepFlag) StepLimit = finalRange +
(StepLimit-finalRange)*G4UniformRand();
if (StepLimit > fRangeNow) StepLimit = fRangeNow;
}
else StepLimit = fRangeNow;
return StepLimit;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4eEnergyLoss::GetContinuousStepLimit(
const G4Track& track,
G4double,
G4double currentMinimumStep,
G4double&)
{
G4double Step =
GetConstraints(track.GetDynamicParticle(),track.GetMaterial());
if ((Step>0.0)&&(Step<currentMinimumStep)) currentMinimumStep = Step;
return Step ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4bool G4eEnergyLoss::IsApplicable(const G4ParticleDefinition&
particle)
{
return( (&particle == G4Electron::Electron())
||(&particle == G4Positron::Positron()) );
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4eIonisation.hh,v 1.2.8.1 1999/12/07 20:50:53 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4eIonisation.hh,v 1.6 2000/04/25 14:33:05 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// ------------------------------------------------------------
@@ -24,7 +24,7 @@
// It calculates the ionisation for e+/e-.
// ************************************************************
//
// 04-09-98: new methods SetBining() PrintInfo(), MMa
// 10/02/00 modifications , new e.m. structure, L.Urban
// ------------------------------------------------------------
#ifndef G4eIonisation_h
@@ -33,7 +33,7 @@
#include "G4ios.hh"
#include "globals.hh"
#include "Randomize.hh"
#include "G4eEnergyLoss.hh"
#include "G4VeEnergyLoss.hh"
#include "globals.hh"
#include "G4Track.hh"
#include "G4Step.hh"
@@ -44,7 +44,7 @@
#include "G4PhysicsLinearVector.hh"
class G4eIonisation : public G4eEnergyLoss
class G4eIonisation : public G4VeEnergyLoss
{
public:
@@ -55,8 +55,6 @@ class G4eIonisation : public G4eEnergyLoss
G4bool IsApplicable(const G4ParticleDefinition&);
void SetPhysicsTableBining(G4double lowE, G4double highE, G4int nBins);
void BuildPhysicsTable(const G4ParticleDefinition& aParticleType);
void BuildLossTable(const G4ParticleDefinition& aParticleType);
@@ -92,10 +90,21 @@ class G4eIonisation : public G4eEnergyLoss
private:
G4PhysicsTable* theMeanFreePathTable;
G4double LowestKineticEnergy;
G4double HighestKineticEnergy;
G4int TotBin;
static G4double LowerBoundLambda ; // bining for lambda table
static G4double UpperBoundLambda ;
static G4int NbinLambda ;
G4double LowestKineticEnergy,HighestKineticEnergy ;
G4int TotBin ;
public:
static void SetLowerBoundLambda(G4double val) {LowerBoundLambda = val;};
static void SetUpperBoundLambda(G4double val) {UpperBoundLambda = val;};
static void SetNbinLambda(G4int n) {NbinLambda = n;};
static G4double GetLowerBoundLambda() { return LowerBoundLambda;};
static G4double GetUpperBoundLambda() { return UpperBoundLambda;};
static G4int GetNbinLambda() {return NbinLambda;};
};
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4eIonisation.icc,v 1.2.8.1 1999/12/07 20:50:53 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4eIonisation.icc,v 1.3 1999/12/15 14:51:49 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// ---------------------------------------------------------------
@@ -1,105 +0,0 @@
// This code implementation is the intellectual property of
// 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: G4eIonisationPlus.hh,v 1.1.10.1 1999/12/07 20:50:53 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// History: based on object model of
// 2nd December 1995, G.Cosmo
// ---------- G4eIonisationPlus physics process -----------
// by Laszlo Urban, 20 March 1997
// ************************************************************
// It is the first implementation of the NEW IONISATION
// PROCESS. ( delta rays + continuous energy loss)
// It calculates the ionisation for e+/e-.
// ************************************************************
//
// 04-09-98: new methods SetBining() PrintInfo(), MMa
// ------------------------------------------------------------
#ifndef G4eIonisationPlus_h
#define G4eIonisationPlus_h 1
#include "G4ios.hh"
#include "globals.hh"
#include "Randomize.hh"
#include "G4eEnergyLossPlus.hh"
#include "globals.hh"
#include "G4Track.hh"
#include "G4Step.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4Gamma.hh"
#include "G4PhysicsLogVector.hh"
#include "G4PhysicsLinearVector.hh"
class G4eIonisationPlus : public G4eEnergyLossPlus
{
public:
G4eIonisationPlus(const G4String& processName = "eIoni+");
~G4eIonisationPlus();
G4bool IsApplicable(const G4ParticleDefinition&);
void SetPhysicsTableBining(G4double lowE, G4double highE, G4int nBins);
void BuildPhysicsTable(const G4ParticleDefinition& aParticleType);
void BuildLossTable(const G4ParticleDefinition& aParticleType);
void BuildLambdaTable(const G4ParticleDefinition& aParticleType);
void PrintInfoDefinition();
G4double GetMeanFreePath(const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition ) ;
G4VParticleChange *PostStepDoIt(const G4Track& track,
const G4Step& Step ) ;
G4double GetLambda(
G4double KineticEnergy,G4Material* material);
protected:
virtual G4double ComputeMicroscopicCrossSection(
const G4ParticleDefinition& aParticleType,
G4double KineticEnergy,
G4double AtomicNumber,
G4double DeltaThreshold);
private:
// hide assignment operator
G4eIonisationPlus & operator=(const G4eIonisationPlus &right);
G4eIonisationPlus(const G4eIonisationPlus&);
private:
G4PhysicsTable* theMeanFreePathTable;
G4double LowestKineticEnergy;
G4double HighestKineticEnergy;
G4int TotBin;
};
#include "G4eIonisationPlus.icc"
#endif
@@ -1,78 +0,0 @@
// This code implementation is the intellectual property of
// 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: G4eIonisationPlus.icc,v 1.1.10.1 1999/12/07 20:50:53 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// ------------ G4eIonisationPlus physics process ------------
// by Laszlo Urban, 20 March 1997
// ***************************************************************
// It is the first implementation of the NEW IONISATION PROCESS.
// It calculates the ionisation of e+/e-.
// ***************************************************************
//
// 24-11-97: correction on MeanFreePath for KinEnergy > HighestLimit
//
// ---------------------------------------------------------------
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4bool G4eIonisationPlus::IsApplicable(
const G4ParticleDefinition& particle)
{
return( (&particle == G4Electron::Electron())
||(&particle == G4Positron::Positron()) );
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4eIonisationPlus::GetMeanFreePath(
const G4Track& track,
G4double,
G4ForceCondition*)
{
const G4DynamicParticle* aParticle = track.GetDynamicParticle();
G4double KineticEnergy = aParticle->GetKineticEnergy();
G4Material* aMaterial = track.GetMaterial();
G4double MeanFreePath;
G4bool isOutRange ;
if( KineticEnergy < LowestKineticEnergy )
MeanFreePath = DBL_MAX;
else {
if (KineticEnergy > HighestKineticEnergy) KineticEnergy = HighestKineticEnergy;
MeanFreePath = ((*theMeanFreePathTable)(aMaterial->GetIndex()))->
GetValue( KineticEnergy, isOutRange);
}
return MeanFreePath ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4eIonisationPlus::GetLambda(
G4double KineticEnergy,
G4Material* material)
{
G4bool isOut;
const G4MaterialTable* theMaterialTable =
G4Material::GetMaterialTable() ;
G4double lambda = (*theMeanFreePathTable)
[material->GetIndex()]->
GetValue(KineticEnergy,isOut);
return lambda;
}
@@ -5,26 +5,26 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4eplusAnnihilation.hh,v 1.1.10.1 1999/12/07 20:50:53 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4eplusAnnihilation.hh,v 1.3 1999/12/17 18:26:12 maire Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
// CERN Geneva Switzerland
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4eplusAnnihilation process ------
// by Michel Maire, 7 july 1996
// ************************************************************
//
// 10-01-97, crossection table + meanfreepath table, M.Maire
// 17-03-97, merge 'in fly' and 'at rest', M.Maire
// 31-08-98, new methods SetBining() and PrintInfo()
// ------------------------------------------------------------
// class description
//
// e+ e- ---> gamma gamma
// inherit from G4VRestDiscreteProcess
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef G4eplusAnnihilation_h
#define G4eplusAnnihilation_h 1
@@ -39,38 +39,72 @@
#include "G4Positron.hh"
#include "G4Step.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4eplusAnnihilation : public G4VRestDiscreteProcess
{
public:
public: // with description
G4eplusAnnihilation(const G4String& processName ="annihil");
~G4eplusAnnihilation();
G4bool IsApplicable(const G4ParticleDefinition&);
// true for positron only.
void SetPhysicsTableBining(G4double lowE, G4double highE, G4int nBins);
// Allows to define the binning of the PhysicsTables,
// before to build them.
void BuildPhysicsTable(const G4ParticleDefinition& PositronType);
// It builds the total CrossSectionPerAtom table, for e+,
// and for every element contained in the elementTable.
// It builds the MeanFreePath table, for e+,
// and for every material contained in the materialTable.
// This function overloads a virtual function of the base class.
// It is invoked by the G4ParticleWithCuts::SetCut() method.
void PrintInfoDefinition();
// Print few lines of informations about the process: validity range,
// origine ..etc..
// Invoked by BuildPhysicsTable().
G4double GetMeanFreePath(const G4Track& aTrack,
G4double previousStepSize,
G4ForceCondition* condition);
// It returns the MeanFreePath of the process for the current track :
// (energy, material)
// The previousStepSize and G4ForceCondition* are not used.
// This function overloads a virtual function of the base class.
// It is invoked by the ProcessManager of the Particle.
G4double GetCrossSectionPerAtom(G4DynamicParticle* aDynamicPositron,
G4Element* anElement);
G4Element* anElement);
// It returns the total CrossSectionPerAtom of the process,
// for the current DynamicPositron (energy), in anElement.
G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
const G4Step& aStep);
// It computes the final state of the process (at end of step),
// returned as a ParticleChange object.
// This function overloads a virtual function of the base class.
// It is invoked by the ProcessManager of the Particle.
G4double GetMeanLifeTime(const G4Track& aTrack,
G4ForceCondition* condition);
// It is invoked by the ProcessManager of the Positron if this
// e+ has a kinetic energy null. Then it return 0 to force the
// call of AtRestDoIt.
// This function overloads a virtual function of the base class.
G4VParticleChange* AtRestDoIt(const G4Track& aTrack,
const G4Step& aStep);
const G4Step& aStep);
// It computes the final state of the process:
// e+ (at rest) e- (at rest) ---> gamma gamma,
// returned as a ParticleChange object.
// This function overloads a virtual function of the base class.
// It is invoked by the ProcessManager of the Particle.
protected:
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4eplusAnnihilation.icc,v 1.1.10.1 1999/12/07 20:50:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4eplusAnnihilation.icc,v 1.2 1999/12/15 14:51:49 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// ---------------------------------------------------------------
@@ -1,303 +0,0 @@
// This code implementation is the intellectual property of
// 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: G4hEnergyLoss.hh,v 1.5.6.1 1999/12/07 20:50:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// $Id:
// ------------------------------------------------------------
// GEANT 4 class header file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ---------- G4hEnergyLoss physics process -----------
// by Laszlo Urban, 30 May 1997
//
// ************************************************************
// It is the first implementation of the NEW UNIFIED ENERGY LOSS PROCESS.
// It calculates the continuous energy loss for charged hadrons.
// Processes giving contribution to the continuous loss :
// ionisation (= cont.ion.loss + delta ray production)
// can be added more easily ..........
// This class creates static proton/antiproton dE/dx and range tables ,
// which tables can be used by other processes.
// The energy loss for other charged hadrons is calculated from the p/pbar
// tables with scaled kinetic energy.
//
// ****************************************************************************
// It is assumed that the cut in range is the same for all the charged hadrons!
// ****************************************************************************
//
// 7/10/98 some bugs fixed + some cleanup , L.Urban
// 22/10/98 cleanup , L.Urban
// 02/02/99 several bugs fixed, L.Urban
//
#ifndef G4hEnergyLoss_h
#define G4hEnergyLoss_h 1
#include "G4ios.hh"
#include "globals.hh"
#include "Randomize.hh"
#include "G4VContinuousDiscreteProcess.hh"
#include "G4Material.hh"
#include "G4Element.hh"
#include "G4Proton.hh"
#include "G4AntiProton.hh"
#include "G4Electron.hh"
#include "G4VParticleChange.hh"
#include "G4Track.hh"
#include "G4Step.hh"
#include "G4PhysicsLogVector.hh"
#include "G4PhysicsLinearVector.hh"
class G4EnergyLossMessenger;
class G4hEnergyLoss : public G4VContinuousDiscreteProcess
{
public:
G4hEnergyLoss(const G4String& );
~G4hEnergyLoss();
G4bool IsApplicable(const G4ParticleDefinition&);
G4double GetContinuousStepLimit(
const G4Track& track,
G4double previousStepSize,
G4double currentMinimumStep,
G4double& currentSafety) ;
G4VParticleChange* AlongStepDoIt(const G4Track& track ,const G4Step& Step) ;
virtual G4double GetMeanFreePath(
const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition
) = 0 ;
virtual G4VParticleChange* PostStepDoIt(const G4Track& track,
const G4Step& Step) = 0 ;
protected:
virtual G4double GetConstraints(const G4DynamicParticle *aParticle,
G4Material *aMaterial);
virtual G4double GetLossWithFluct(const G4DynamicParticle *aParticle,
G4Material *aMaterial,
G4double MeanLoss) ;
private:
// hide assignment operator
G4hEnergyLoss(G4hEnergyLoss &);
G4hEnergyLoss & operator=(const G4hEnergyLoss &right);
// =====================================================================
public:
private:
// variables for the integration routines
static G4double Mass,taulow,tauhigh,ltaulow,ltauhigh;
protected:
// data members to speed up the fluctuation calculation
G4Material *lastMaterial ;
G4int imat ;
G4double f1Fluct,f2Fluct,e1Fluct,e2Fluct,rateFluct,ipotFluct;
G4double e1LogFluct,e2LogFluct,ipotLogFluct;
const G4double MaxExcitationNumber ;
const G4double probLimFluct ;
const long nmaxDirectFluct,nmaxCont1,nmaxCont2 ;
// ====================================================================
// static part of the class
public:
// get the number of processes contributing to the cont.energy loss
static G4int GetNumberOfProcesses() { return NumberOfProcesses; };
// set the number of processes contributing to the cont.energy loss
static void SetNumberOfProcesses(G4int number)
{NumberOfProcesses=number ; };
// Increment the number of processes contributing to the cont.energy loss
static void PlusNumberOfProcesses()
{ NumberOfProcesses++ ; };
// decrement the number of processes contributing to the cont.energy loss
static void MinusNumberOfProcesses()
{ NumberOfProcesses-- ; };
static void SetdRoverRange(G4double value) {dRoverRange = value;}
static void SetRndmStep (G4bool value) {rndmStepFlag = value;}
static void SetEnlossFluc (G4bool value) {EnlossFlucFlag = value;}
static void SetStepFunction (G4double c1, G4double c2)
{dRoverRange = c1; finalRange = c2;
c1lim=dRoverRange ;
c2lim=2.*(1-dRoverRange)*finalRange;
c3lim=-(1.-dRoverRange)*finalRange*finalRange;
}
protected:
static void BuildDEDXTable(const G4ParticleDefinition& aParticleType);
private:
static void BuildRangeTable(const G4ParticleDefinition& aParticleType);
static void BuildInverseRangeTable(
const G4ParticleDefinition& aParticleType);
static void BuildTimeTables(const G4ParticleDefinition& aParticleType);
static void BuildLabTimeVector(G4int materialIndex,
G4PhysicsLogVector* rangeVector);
static void BuildProperTimeVector(G4int materialIndex,
G4PhysicsLogVector* rangeVector);
static void InvertRangeVector(G4int materialIndex,
G4PhysicsLogVector* rangeVector);
static void BuildRangeVector(G4int materialIndex,
G4PhysicsLogVector* rangeVector);
static G4double LabTimeIntLog(G4PhysicsVector* physicsVector
,G4int nbin);
static G4double ProperTimeIntLog(G4PhysicsVector* physicsVector,
G4int nbin);
static G4double RangeIntLin(G4PhysicsVector* physicsVector
,G4int nbin);
static G4double RangeIntLog(G4PhysicsVector* physicsVector
,G4int nbin);
static void BuildRangeCoeffATable(
const G4ParticleDefinition& aParticleType);
static void BuildRangeCoeffBTable(
const G4ParticleDefinition& aParticleType);
static void BuildRangeCoeffCTable(
const G4ParticleDefinition& aParticleType);
static const G4Proton* theProton ;
static const G4AntiProton* theAntiProton ;
// ====================================================================
public:
protected:
static G4PhysicsTable* theDEDXpTable ;
static G4PhysicsTable* theDEDXpbarTable ;
static G4PhysicsTable* theRangepTable ;
static G4PhysicsTable* theRangepbarTable ;
//inverse of the range tables
static G4PhysicsTable* theInverseRangepTable ;
static G4PhysicsTable* theInverseRangepbarTable ;
//lab and proper time tables
static G4PhysicsTable* theLabTimepTable ;
static G4PhysicsTable* theLabTimepbarTable ;
static G4PhysicsTable* theProperTimepTable ;
static G4PhysicsTable* theProperTimepbarTable ;
// processes inherited from G4hEnergyLoss
// register themselves in the static array Recorder
static G4PhysicsTable** RecorderOfpProcess;
static G4PhysicsTable** RecorderOfpbarProcess;
static G4int CounterOfpProcess ;
static G4int CounterOfpbarProcess ;
// particle mass
static G4double ParticleMass ;
// cut in range
static G4double ptableElectronCutInRange;
static G4double pbartableElectronCutInRange;
static G4double Charge ;
static G4double LowestKineticEnergy;
static G4double HighestKineticEnergy;
static G4int TotBin; // number of bins in table,
// calculated in BuildPhysicsTable
static G4double RTable,LOGRTable; // LOGRTable=log(HighestKineticEnergy
// /LowestKineticEnergy)/TotBin
// RTable = exp(LOGRTable)
private:
static G4PhysicsTable* theDEDXTable;
static G4PhysicsTable* theRangeTable;
static G4PhysicsTable* theInverseRangeTable;
static G4PhysicsTable* theLabTimeTable;
static G4PhysicsTable* theProperTimeTable;
static G4PhysicsTable** RecorderOfProcess;
static G4int CounterOfProcess;
static G4PhysicsTable* thepRangeCoeffATable;
static G4PhysicsTable* thepRangeCoeffBTable;
static G4PhysicsTable* thepRangeCoeffCTable;
static G4PhysicsTable* thepbarRangeCoeffATable;
static G4PhysicsTable* thepbarRangeCoeffBTable;
static G4PhysicsTable* thepbarRangeCoeffCTable;
static G4PhysicsTable* theRangeCoeffATable;
static G4PhysicsTable* theRangeCoeffBTable;
static G4PhysicsTable* theRangeCoeffCTable;
static G4int NumberOfProcesses ;
static G4double dRoverRange ; // maximum allowed deltarange/range
// in one step
protected:
G4PhysicsTable* theLossTable ;
G4double linLossLimit ;
G4double MinKineticEnergy ;
G4double fdEdx; // computed in GetContraints
G4double fRangeNow ; // computed in GetContraints
static G4double finalRange ; // last step before stop
static G4double c1lim,c2lim,c3lim ; // coeffs for computing steplimit
static G4bool rndmStepFlag ;
static G4bool EnlossFlucFlag ;
};
#include "G4hEnergyLoss.icc"
#endif
@@ -1,49 +0,0 @@
// This code implementation is the intellectual property of
// 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: G4hEnergyLossPlus.icc,v 1.1.8.1 1999/12/07 20:50:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// $Id:
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// History: based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4hEnergyLoss physics process ------------
// by Laszlo Urban, 30 May 1997
// ***************************************************************
// It is the first implementation of the NEW UNIFIED ENERGY LOSS PROCESS.
// It calculates the energy loss of charged hadrons.
// ***************************************************************
// 22/10/98: cleanup , L.Urban
// ---------------------------------------------------------------
inline G4bool G4hEnergyLossPlus::IsApplicable(const G4ParticleDefinition&
particle)
{
return(particle.GetPDGCharge()!= 0.);
}
inline G4double G4hEnergyLossPlus::GetContinuousStepLimit(
const G4Track& track,
G4double,
G4double currentMinimumStep,
G4double&)
{
G4double Step =
GetConstraints(track.GetDynamicParticle(),track.GetMaterial()) ;
if((Step>0.0)&&(Step<currentMinimumStep))
currentMinimumStep = Step ;
return Step ;
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4hIonisation.hh,v 1.4.8.1 1999/12/07 20:50:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4hIonisation.hh,v 1.9 2000/05/23 14:46:35 urban Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// ------------------------------------------------------------
@@ -26,6 +26,7 @@
// corrected by L.Urban on 24/09/97
// corrected by L.Urban on 13/01/98
// bugs fixed by L.Urban on 02/02/99
// 10/02/00 modifications , new e.m. structure, L.Urban
// ------------------------------------------------------------
#ifndef G4hIonisation_h
@@ -34,7 +35,7 @@
#include "G4ios.hh"
#include "globals.hh"
#include "Randomize.hh"
#include "G4hEnergyLoss.hh"
#include "G4VhEnergyLoss.hh"
#include "globals.hh"
#include "G4Track.hh"
#include "G4Step.hh"
@@ -43,7 +44,7 @@
#include "G4PhysicsLinearVector.hh"
class G4hIonisation : public G4hEnergyLoss
class G4hIonisation : public G4VhEnergyLoss
{
public:
@@ -54,8 +55,6 @@ class G4hIonisation : public G4hEnergyLoss
G4bool IsApplicable(const G4ParticleDefinition&);
void SetPhysicsTableBining(G4double lowE, G4double highE, G4int nBins);
void BuildPhysicsTable(const G4ParticleDefinition& aParticleType);
virtual void BuildLossTable(const G4ParticleDefinition& aParticleType);
@@ -98,6 +97,23 @@ class G4hIonisation : public G4hEnergyLoss
const G4double* DeltaCutInKineticEnergy ;
G4double DeltaCutInKineticEnergyNow ;
static G4double Tmincut ;
static G4double LowerBoundLambda ; // bining for lambda table
static G4double UpperBoundLambda ;
static G4int NbinLambda ;
G4double LowestKineticEnergy,HighestKineticEnergy ;
G4int TotBin ;
public:
static void SetLowerBoundLambda(G4double val) {LowerBoundLambda = val;};
static void SetUpperBoundLambda(G4double val) {UpperBoundLambda = val;};
static void SetNbinLambda(G4int n) {NbinLambda = n;};
static G4double GetLowerBoundLambda() { return LowerBoundLambda;};
static G4double GetUpperBoundLambda() { return UpperBoundLambda;};
static G4int GetNbinLambda() {return NbinLambda;};
};
#include "G4hIonisation.icc"
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4hIonisation.icc,v 1.2.8.1 1999/12/07 20:50:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4hIonisation.icc,v 1.3 1999/12/15 14:51:49 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// ---------------------------------------------------------------
@@ -1,113 +0,0 @@
// This code implementation is the intellectual property of
// 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: G4hIonisationPlus.hh,v 1.2.8.1 1999/12/07 20:50:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// History: based on object model of
// 2nd December 1995, G.Cosmo
// ---------- G4hIonisationPlus physics process -----------
// by Laszlo Urban, 30 May 1997
// ************************************************************
// It is the first implementation of the NEW IONISATION
// PROCESS. ( delta rays + continuous energy loss)
// It calculates the ionisation for charged hadrons.
// ************************************************************
// corrected by L.Urban on 24/09/97
// corrected by L.Urban on 13/01/98
// bugs fixed by L.Urban on 02/02/99
// ------------------------------------------------------------
#ifndef G4hIonisationPlus_h
#define G4hIonisationPlus_h 1
#include "G4ios.hh"
#include "globals.hh"
#include "Randomize.hh"
#include "G4hEnergyLossPlus.hh"
#include "globals.hh"
#include "G4Track.hh"
#include "G4Step.hh"
#include "G4Electron.hh"
#include "G4PhysicsLogVector.hh"
#include "G4PhysicsLinearVector.hh"
class G4hIonisationPlus : public G4hEnergyLossPlus
{
public:
G4hIonisationPlus(const G4String& processName = "hIoni+");
~G4hIonisationPlus();
G4bool IsApplicable(const G4ParticleDefinition&);
void SetPhysicsTableBining(G4double lowE, G4double highE, G4int nBins);
void BuildPhysicsTable(const G4ParticleDefinition& aParticleType);
void BuildLossTable(const G4ParticleDefinition& aParticleType);
void BuildLambdaTable(const G4ParticleDefinition& aParticleType);
void PrintInfoDefinition();
G4double GetMeanFreePath(
const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition ) ;
G4VParticleChange *PostStepDoIt(const G4Track& track,
const G4Step& Step ) ;
protected:
virtual G4double ComputeMicroscopicCrossSection(
const G4ParticleDefinition& aParticleType,
G4double KineticEnergy,
G4double AtomicNumber);
private:
// hide assignment operator
G4hIonisationPlus & operator=(const G4hIonisationPlus &right);
G4hIonisationPlus(const G4hIonisationPlus&);
private:
// private data members ...............................
G4PhysicsTable* theMeanFreePathTable;
// particles , cuts in kinetic energy ........
const G4Electron* theElectron;
const G4Proton* theProton;
const G4AntiProton* theAntiProton;
const G4double* DeltaCutInKineticEnergy ;
G4double DeltaCutInKineticEnergyNow ;
};
#include "G4hIonisationPlus.icc"
#endif
@@ -1,61 +0,0 @@
// This code implementation is the intellectual property of
// 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: G4hIonisationPlus.icc,v 1.1.8.1 1999/12/07 20:50:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// ------------ G4hIonisationPlus physics process ------------
// by Laszlo Urban, 30 May 1997
// ***************************************************************
// It is the first implementation of the NEW IONISATION PROCESS.
// It calculates the ionisation of charged hadrons.
// ***************************************************************
// 24/09/97: corrected by L.Urban
// 20/11/97: correction on MeanFreePath for KineticEnergy > HighestLimit
// ---------------------------------------------------------------
inline G4double G4hIonisationPlus::GetMeanFreePath(
const G4Track& trackData,
G4double previousStepSize,
G4ForceCondition* condition)
{
const G4DynamicParticle* aParticle ;
G4Material* aMaterial ;
G4double MeanFreePath;
G4bool isOutRange ;
*condition = NotForced ;
aParticle = trackData.GetDynamicParticle() ;
aMaterial = trackData.GetMaterial() ;
G4double KineticEnergy = aParticle->GetKineticEnergy() ;
if(KineticEnergy < LowestKineticEnergy)
MeanFreePath = DBL_MAX;
else {
if(KineticEnergy > HighestKineticEnergy)
KineticEnergy = HighestKineticEnergy;
MeanFreePath = ((*theMeanFreePathTable)(aMaterial->GetIndex()))->
GetValue(KineticEnergy,isOutRange) ;
}
return MeanFreePath ;
}
inline G4bool G4hIonisationPlus::IsApplicable(
const G4ParticleDefinition& particle)
{
return(particle.GetPDGCharge() != 0.);
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ionIonisation.hh,v 1.2.8.1 1999/12/07 20:50:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4ionIonisation.hh,v 1.3 1999/12/15 14:51:49 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// ------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ionIonisation.icc,v 1.2.8.1 1999/12/07 20:50:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4ionIonisation.icc,v 1.3 1999/12/15 14:51:49 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
//
// ---------------------------------------------------------------