Import Geant4 4.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:18:25 +02:00
parent 36c080dca6
commit 921d3b1cda
3990 changed files with 185376 additions and 82884 deletions
@@ -21,23 +21,22 @@
// ********************************************************************
//
//
// $Id: G4MuBremsstrahlung.hh,v 1.8.4.2 2001/06/28 20:19:44 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4MuBremsstrahlung.hh,v 1.12 2001/10/29 13:53:18 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// -------- G4MuBremsstrahlung physics process ---------
//--------------- G4MuBremsstrahlung physics process ------------------
// by Laszlo Urban, September 1997
// ************************************************************
//------------------------------------------------------------------------------
// 10/02/00 modifications , new e.m. structure, L.Urban
//
// 10-08-01: new methods Store/Retrieve PhysicsTable (mma)
// 29-10-01 all static functions no more inlined (mma)
//------------------------------------------------------------------------------
#ifndef G4MuBremsstrahlung_h
#define G4MuBremsstrahlung_h 1
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4ios.hh"
#include "globals.hh"
#include "Randomize.hh"
@@ -47,6 +46,8 @@
#include "G4OrderedTable.hh"
#include "G4PhysicsTable.hh"
#include "G4PhysicsLogVector.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4MuBremsstrahlung : public G4VMuEnergyLoss
@@ -64,15 +65,15 @@ class G4MuBremsstrahlung : public G4VMuEnergyLoss
void BuildLossTable(const G4ParticleDefinition& ParticleType);
void BuildLambdaTable(const G4ParticleDefinition& ParticleType);
void PrintInfoDefinition() ;
void PrintInfoDefinition();
G4double GetMeanFreePath(const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition ) ;
G4ForceCondition* condition );
G4VParticleChange *PostStepDoIt(const G4Track& track,
const G4Step& Step ) ;
const G4Step& Step );
G4double GetDMicroscopicCrossSection(
const G4ParticleDefinition* ParticleType,
@@ -80,6 +81,16 @@ class G4MuBremsstrahlung : public G4VMuEnergyLoss
G4double AtomicNumber,
G4double AtomicMass,
G4double GammaEnergy);
G4bool StorePhysicsTable(G4ParticleDefinition* ,
const G4String& directory, G4bool);
// store eLoss and MeanFreePath tables into an external file
// specified by 'directory' (must exist before invokation)
G4bool RetrievePhysicsTable(G4ParticleDefinition* ,
const G4String& directory, G4bool);
// retrieve eLoss and MeanFreePath tables from an external file
// specified by 'directory'
protected:
@@ -120,37 +131,39 @@ class G4MuBremsstrahlung : public G4VMuEnergyLoss
private:
G4PhysicsTable* theMeanFreePathTable ;
G4PhysicsTable* theMeanFreePathTable;
G4OrderedTable PartialSumSigma;
static G4double LowerBoundLambda ; // bining for lambda table
static G4double UpperBoundLambda ;
static G4int NbinLambda ;
G4double LowestKineticEnergy,HighestKineticEnergy ;
G4int TotBin ;
static G4double LowerBoundLambda; // bining for lambda table
static G4double UpperBoundLambda;
static G4int NbinLambda;
G4double LowestKineticEnergy,HighestKineticEnergy;
G4int TotBin;
const G4double* GammaCutInKineticEnergy;
G4double GammaCutInKineticEnergyNow;
// tables for sampling ..............
static G4int nzdat,ntdat,NBIN ;
static G4double zdat[5],adat[5],tdat[8] ;
static G4double ya[1001],proba[5][8][1001] ;
static G4double CutFixed ;
// tables for sampling
static G4int nzdat,ntdat,NBIN;
static G4double zdat[5],adat[5],tdat[8];
static G4double ya[1001],proba[5][8][1001];
static G4double CutFixed;
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;};
static void SetLowerBoundLambda(G4double val);
static void SetUpperBoundLambda(G4double val);
static void SetNbinLambda(G4int n);
static G4double GetLowerBoundLambda();
static G4double GetUpperBoundLambda();
static G4int GetNbinLambda();
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4MuBremsstrahlung.icc"
#endif
@@ -21,25 +21,23 @@
// ********************************************************************
//
//
// $Id: G4MuBremsstrahlung.icc,v 1.4.2.2 2001/06/28 20:19:44 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4MuBremsstrahlung.icc,v 1.8 2001/10/24 16:36:40 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
//
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// -------- G4MuBremsstrahlung physics process ---------
//--------------- G4MuBremsstrahlung physics process ------------------
// by Laszlo Urban, September 1997
// ***************************************************************
//------------------------------------------------------------------------------
//
// Modified:
//
// 29.05.01 V.Ivanchenko minor changes to provide ANSI -wall compilation
//
// ---------------------------------------------------------------
// 17-09-01 migration of Materials to pure STL (mma)
// 29.05.01 V.Ivanchenko minor changes to provide ANSI -wall compilation
// 28-09-01 suppression of theMuonPlus ..etc..data members (mma)
//
//------------------------------------------------------------------------------
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4MuBremsstrahlung::GetMeanFreePath(const G4Track& trackData,
G4double previousStepSize,
G4ForceCondition* condition)
@@ -66,7 +64,8 @@ inline G4double G4MuBremsstrahlung::GetMeanFreePath(const G4Track& trackData,
return MeanFreePath;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4MuBremsstrahlung::ComputeMeanFreePath(
const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
@@ -75,26 +74,29 @@ inline G4double G4MuBremsstrahlung::ComputeMeanFreePath(
const G4ElementVector* theElementVector = aMaterial->GetElementVector() ;
const G4double* theAtomNumDensityVector =
aMaterial->GetAtomicNumDensityVector();
G4double GammaEnergyCut = (G4Gamma::GetCutsInEnergy())[aMaterial->GetIndex()];
G4double GammaEnergyCut = (G4Gamma::Gamma())->GetEnergyThreshold(aMaterial);
G4double SIGMA = 0 ;
for ( size_t i=0 ; i < aMaterial->GetNumberOfElements() ; i++ )
{
SIGMA += theAtomNumDensityVector[i] *
ComputeMicroscopicCrossSection(
ParticleType, KineticEnergy,
(*theElementVector)(i)->GetZ(),
(*theElementVector)(i)->GetA(),
(*theElementVector)[i]->GetZ(),
(*theElementVector)[i]->GetA(),
GammaEnergyCut );
}
return SIGMA<=0.0 ? DBL_MAX : 1./SIGMA ;
return SIGMA > 0. ? 1./SIGMA : DBL_MAX;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4bool G4MuBremsstrahlung::IsApplicable(
const G4ParticleDefinition& particle)
{
return( (&particle == (const G4ParticleDefinition *)theMuonMinus)
||(&particle == (const G4ParticleDefinition *)theMuonPlus)
) ;
return ((&particle == G4MuonPlus::MuonPlus() ) ||
(&particle == G4MuonMinus::MuonMinus()) );
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,111 +21,161 @@
// ********************************************************************
//
//
// $Id: G4MuIonisation.hh,v 1.8.4.2 2001/06/28 20:19:44 gunter Exp $
// GEANT4 tag $Name: $
// ------------------------------------------------------------
// GEANT 4 class header file
// $Id: G4MuIonisation.hh,v 1.13 2001/10/29 13:53:18 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4MuIonisation physics process ------------
// by Laszlo Urban, September 1997
// ------------------------------------------------------------
// It is the implementation of the NEW IONISATION
// PROCESS. ( delta rays + continuous energy loss)
// It calculates the ionisation for muons.
// ************************************************************
//
// 10/02/00 modifications , new e.m. structure, L.Urban
// ------------------------------------------------------------
// --------------- G4MuIonisation physics process ------------------------------
// by Laszlo Urban, September 1997
// -----------------------------------------------------------------------------
//
// 10-02-00 modifications , new e.m. structure, L.Urban
// 10-08-01 new methods Store/Retrieve PhysicsTable (mma)
// 29-08-01 new function ComputeRestrictedMeandEdx() + 'cleanup' (mma)
// 19-09-01 come back to the old process name 'MuIoni'
// 29-10-01 all static functions no more inlined (mma)
//
// -----------------------------------------------------------------------------
// Class description
//
// This class manages the ionisation process for muons.
// it inherites from G4VContinuousDiscreteProcess via G4VMuEnergyLoss.
//
// Class description - end
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef G4MuIonisation_h
#define G4MuIonisation_h 1
#include "G4ios.hh"
#include "globals.hh"
#include "Randomize.hh"
#include "G4VMuEnergyLoss.hh"
#include "globals.hh"
#include "G4Track.hh"
#include "G4Step.hh"
#include "G4PhysicsLogVector.hh"
#include "G4PhysicsLinearVector.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4MuIonisation : public G4VMuEnergyLoss
{
public:
public: // with description
G4MuIonisation(const G4String& processName = "MuIoni");
G4MuIonisation(const G4String& processName = "MuIoni");
~G4MuIonisation();
~G4MuIonisation();
G4bool IsApplicable(const G4ParticleDefinition&);
G4bool IsApplicable(const G4ParticleDefinition&);
// return true for charged particles, false otherwise
void BuildPhysicsTable(const G4ParticleDefinition& aParticleType);
// this function overloads a virtual function of the base class.
// It is invoked by the G4ParticleWithCuts::SetCut() method.
// It invokes BuildLambdaTable(), BuildLossTable(), BuildDEDXTable()
void BuildLossTable(const G4ParticleDefinition& aParticleType);
// build the dE/dx tables due to the ionisation, for every materials.
// (restricted stopping power, Bethe-Bloch formula)
void BuildLambdaTable(const G4ParticleDefinition& aParticleType);
// build mean free path tables for the delta rays production.
// the tables are built for every materials.
G4bool StorePhysicsTable(G4ParticleDefinition* ,
const G4String& directory, G4bool);
// store eLoss and MeanFreePath tables into an external file
// specified by 'directory' (must exist before invokation)
G4bool RetrievePhysicsTable(G4ParticleDefinition* ,
const G4String& directory, G4bool);
// retrieve eLoss and MeanFreePath tables from an external file
// specified by 'directory'
virtual void PrintInfoDefinition();
// Print few lines of informations about the process: validity range,
// origine ..etc..
// Invoked by BuildPhysicsTable().
G4double GetMeanFreePath(const G4Track& track,
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.
G4VParticleChange* PostStepDoIt(const G4Track& track,
const G4Step& Step );
// 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.
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(
protected: // with description
virtual G4double ComputeRestrictedMeandEdx(
const G4ParticleDefinition& aParticleType,
G4double KineticEnergy,
G4double AtomicNumber);
G4double ComputeDMicroscopicCrossSection(
const G4ParticleDefinition& ParticleType,
G4double KineticEnergy, G4double AtomicNumber,
G4double KnockonEnergy);
private:
// hide assignment operator
G4MuIonisation & operator=(const G4MuIonisation &right);
G4MuIonisation(const G4MuIonisation&);
private:
// private data members ...............................
const G4Material* material,
G4double DeltaThreshold);
// computes restricted mean dE/dx in Geant4 internal units.
virtual G4double ComputeCrossSectionPerAtom(
const G4ParticleDefinition& aParticleType,
G4double KineticEnergy,
G4double AtomicNumber,
G4double DeltaThreshold);
// computes total cross section per atom in Geant4 internal units.
virtual G4double ComputeDifCrossSectionPerAtom(
const G4ParticleDefinition& aParticleType,
G4double KineticEnergy,
G4double AtomicNumber,
G4double KnockonEnergy);
// computes differential cross section per atom.
protected:
G4PhysicsTable* theMeanFreePathTable;
static G4double LowerBoundLambda ; // bining for lambda table
static G4double UpperBoundLambda ;
static G4int NbinLambda ;
G4double LowestKineticEnergy,HighestKineticEnergy ;
G4int TotBin ;
private:
const G4double* DeltaCutInKineticEnergy ;
G4double DeltaCutInKineticEnergyNow ;
// hide assignment operator
G4MuIonisation & operator=(const G4MuIonisation &right);
G4MuIonisation(const G4MuIonisation&);
private:
public:
static G4double LowerBoundLambda; // bining for lambda table
static G4double UpperBoundLambda;
static G4int NbinLambda;
G4double LowestKineticEnergy; // binning for dE/dx table
G4double HighestKineticEnergy;
G4int TotBin;
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;};
public: // with description
static void SetLowerBoundLambda(G4double val);
static void SetUpperBoundLambda(G4double val);
static void SetNbinLambda(G4int n);
// set the parameters of the mean free path table.
static G4double GetLowerBoundLambda();
static G4double GetUpperBoundLambda();
static G4int GetNbinLambda();
// get the parameters of the mean free path table.
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4MuIonisation.icc"
#endif
@@ -21,56 +21,49 @@
// ********************************************************************
//
//
// $Id: G4MuIonisation.icc,v 1.2.4.2 2001/06/28 20:19:44 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4MuIonisation.icc,v 1.4 2001/08/29 16:38:05 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// GEANT 4 class inlined methods file
//
// ------------ G4MuIonisation physics process ------------
// by Laszlo Urban, September 1997
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
//
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4MuIonisation physics process -------------
// by Laszlo Urban, September 1997
// ---------------------------------------------------------------
// It is the implementation of the NEW IONISATION PROCESS.
// It calculates the ionisation of muons.
// ***************************************************************
// 24/11/97: correction on MeanFreePath for KinEnergy > HighestLimit
// 20/11/97: correction on MeanFreePath for KineticEnergy > HighestLimit
// 14-08-01: 'cleanup' of GetMeanFreePath (mma)
//
// ---------------------------------------------------------------
inline G4double G4MuIonisation::GetMeanFreePath(const G4Track& trackData,
G4double previousStepSize,
G4ForceCondition* condition)
{
const G4DynamicParticle* aParticle ;
G4Material* aMaterial ;
G4double KineticEnergy,MeanFreePath;
G4bool isOutRange ;
*condition = NotForced ;
aParticle = trackData.GetDynamicParticle() ;
aMaterial = trackData.GetMaterial() ;
KineticEnergy = aParticle->GetKineticEnergy() ;
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....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4bool G4MuIonisation::IsApplicable(
const G4ParticleDefinition& particle)
{
return ( (&particle == (const G4ParticleDefinition *)theMuonPlus)
||(&particle == (const G4ParticleDefinition *)theMuonMinus)
);
const G4ParticleDefinition& particle)
{
return ((&particle == G4MuonPlus::MuonPlus() ) ||
(&particle == G4MuonMinus::MuonMinus()) );
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4MuIonisation::GetMeanFreePath(const G4Track& track, G4double,
G4ForceCondition*)
{
G4double KineticEnergy = track.GetDynamicParticle()->GetKineticEnergy();
G4Material* aMaterial = track.GetMaterial();
G4double MeanFreePath;
G4bool isOut;
if (KineticEnergy > HighestKineticEnergy) KineticEnergy = HighestKineticEnergy;
if (KineticEnergy > LowestKineticEnergy)
MeanFreePath = ((*theMeanFreePathTable)(aMaterial->GetIndex()))->
GetValue(KineticEnergy, isOut);
else MeanFreePath = DBL_MAX;
return MeanFreePath;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -21,23 +21,22 @@
// ********************************************************************
//
//
// $Id: G4MuPairProduction.hh,v 1.8.4.2 2001/06/28 20:19:44 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4MuPairProduction.hh,v 1.12 2001/10/29 13:53:18 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// -------- G4MuPairProduction physics process ---------
//--------------- G4MuPairProduction physics process ------------------
// by Laszlo Urban, May 1998
// ************************************************************
// 10/02/00 modifications , new e.m. structure, L.Urban
//
//------------------------------------------------------------------------------
// 10-02-00 modifications , new e.m. structure, L.Urban
// 10-08-01 new methods Store/Retrieve PhysicsTable (mma)
// 29-10-01 all static functions no more inlined (mma)
//------------------------------------------------------------------------------
#ifndef G4MuPairproduction_h
#define G4MuPairproduction_h 1
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4ios.hh"
#include "globals.hh"
#include "Randomize.hh"
@@ -47,7 +46,9 @@
#include "G4OrderedTable.hh"
#include "G4PhysicsTable.hh"
#include "G4PhysicsLogVector.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4MuPairProduction : public G4VMuEnergyLoss
{
@@ -69,16 +70,26 @@ class G4MuPairProduction : public G4VMuEnergyLoss
G4double GetMeanFreePath( const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition ) ;
G4ForceCondition* condition );
G4VParticleChange *PostStepDoIt(const G4Track& track,
const G4Step& Step ) ;
const G4Step& Step );
G4double GetDMicroscopicCrossSection(
const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
G4double AtomicNumber,
G4double PairEnergy);
G4bool StorePhysicsTable(G4ParticleDefinition* ,
const G4String& directory, G4bool);
// store eLoss and MeanFreePath tables into an external file
// specified by 'directory' (must exist before invokation)
G4bool RetrievePhysicsTable(G4ParticleDefinition* ,
const G4String& directory, G4bool);
// retrieve eLoss and MeanFreePath tables from an external file
// specified by 'directory'
protected:
@@ -125,15 +136,15 @@ class G4MuPairProduction : public G4VMuEnergyLoss
private:
G4PhysicsTable* theMeanFreePathTable ;
G4PhysicsTable* theMeanFreePathTable;
G4OrderedTable PartialSumSigma;
static G4double LowerBoundLambda ; // bining for lambda table
static G4double UpperBoundLambda ;
static G4int NbinLambda ;
G4double LowestKineticEnergy,HighestKineticEnergy ;
G4int TotBin ;
static G4double LowerBoundLambda; // bining for lambda table
static G4double UpperBoundLambda;
static G4int NbinLambda;
G4double LowestKineticEnergy,HighestKineticEnergy;
G4int TotBin;
const G4double* ElectronCutInKineticEnergy;
const G4double* PositronCutInKineticEnergy;
@@ -141,23 +152,25 @@ class G4MuPairProduction : public G4VMuEnergyLoss
G4double ElectronCutInKineticEnergyNow;
G4double PositronCutInKineticEnergyNow;
// tables for sampling ..............
static G4int nzdat,ntdat,NBIN ;
static G4double zdat[5],tdat[8] ;
static G4double ya[1001],proba[5][8][1001] ;
static G4double MinPairEnergy ;
// tables for sampling
static G4int nzdat,ntdat,NBIN;
static G4double zdat[5],tdat[8];
static G4double ya[1001],proba[5][8][1001];
static G4double MinPairEnergy;
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;};
static void SetLowerBoundLambda(G4double val);
static void SetUpperBoundLambda(G4double val);
static void SetNbinLambda(G4int n);
static G4double GetLowerBoundLambda();
static G4double GetUpperBoundLambda();
static G4int GetNbinLambda();
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4MuPairProduction.icc"
#endif
@@ -21,25 +21,23 @@
// ********************************************************************
//
//
// $Id: G4MuPairProduction.icc,v 1.4.2.2 2001/06/28 20:19:44 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4MuPairProduction.icc,v 1.8 2001/10/24 16:36:40 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
//
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// -------- G4MuPairProduction physics process ---------
//--------------- G4MuPairProduction physics process ------------------
// by Laszlo Urban, May 1998
// ***************************************************************
//------------------------------------------------------------------------------
//
// Modified:
//
// 29.05.01 V.Ivanchenko minor changes to provide ANSI -wall compilation
//
// ---------------------------------------------------------------
// 17-09-01 migration of Materials to pure STL (mma)
// 29.05.01 V.Ivanchenko minor changes to provide ANSI -wall compilation
// 28-09-01 suppression of theMuonPlus ..etc..data members (mma)
//
//------------------------------------------------------------------------------
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4MuPairProduction::GetMeanFreePath(const G4Track& trackData,
G4double previousStepSize,
G4ForceCondition* condition)
@@ -66,35 +64,40 @@ inline G4double G4MuPairProduction::GetMeanFreePath(const G4Track& trackData,
return MeanFreePath;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4MuPairProduction::ComputeMeanFreePath(
const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
const G4Material* aMaterial)
{
const G4ElementVector* theElementVector = aMaterial->GetElementVector() ;
const G4ElementVector* theElementVector = aMaterial->GetElementVector();
const G4double* theAtomNumDensityVector =
aMaterial->GetAtomicNumDensityVector();
G4double ElectronEnergyCut =
(G4Electron::GetCutsInEnergy())[aMaterial->GetIndex()];
G4Electron::Electron()->GetEnergyThreshold(aMaterial);
G4double PositronEnergyCut =
(G4Positron::GetCutsInEnergy())[aMaterial->GetIndex()];
G4Positron::Positron()->GetEnergyThreshold(aMaterial);
G4double SIGMA = 0 ;
G4double SIGMA = 0;
for ( size_t i=0 ; i < aMaterial->GetNumberOfElements() ; i++ )
{
SIGMA += theAtomNumDensityVector[i] *
ComputeMicroscopicCrossSection( ParticleType, KineticEnergy,
(*theElementVector)(i)->GetZ(),
(*theElementVector)[i]->GetZ(),
ElectronEnergyCut,PositronEnergyCut );
}
return SIGMA<=0.0 ? DBL_MAX : 1./SIGMA ;
return SIGMA > 0. ? 1./SIGMA : DBL_MAX;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4bool G4MuPairProduction::IsApplicable(
const G4ParticleDefinition& particle)
{
return( (&particle == (const G4ParticleDefinition *)theMuonMinus)
||(&particle == (const G4ParticleDefinition *)theMuonPlus)
) ;
return ((&particle == G4MuonPlus::MuonPlus() ) ||
(&particle == G4MuonMinus::MuonMinus()) );
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VMuEnergyLoss.hh,v 1.2.4.2 2001/06/28 20:19:44 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VMuEnergyLoss.hh,v 1.7 2001/10/29 13:53:18 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
// -------------------------------------------------------------------
// GEANT 4 class header file
//
@@ -41,9 +41,12 @@
// This class creates static muplus/muminus dE/dx and range tables ,
// which tables can be used by other processes.
// ************************************************************
// some corrections by L.Urban on 27/05/98 , (but other corrections come soon!)
// cleanup L.Urban on 23/10/98
// corrections due to new e.m. structure L.Urban 10/02/00
// 27-05-98 some corrections by L.Urban
// 23-10-98 cleanup L.Urban
// 10-02-00 corrections due to new e.m. structure L.Urban
// 10-09-01 loss+ mechanism has been implemented (subcutoff delta rays), L.Urban
// 28-09-01 suppression of theMuonPlus ..etc..data members (mma)
// 29-10-01 all static functions no more inlined (mma)
// ------------------------------------------------------------
#ifndef G4VMuEnergyLoss_h
@@ -113,20 +116,13 @@ class G4VMuEnergyLoss : public G4VEnergyLoss
G4double GetConstraints(const G4DynamicParticle *aParticle,
G4Material *aMaterial);
// =====================================================================
public:
protected:
G4PhysicsTable* theLossTable ;
G4double lastgammaCutInRange ;
G4double lastelectronCutInRange ;
const G4Electron* theElectron;
const G4Positron* thePositron;
const G4MuonPlus* theMuonPlus;
const G4MuonMinus* theMuonMinus;
G4double* lastgammaCutInRange ;
G4double* lastelectronCutInRange ;
private:
@@ -156,51 +152,51 @@ class G4VMuEnergyLoss : public G4VEnergyLoss
// static part of the class
public: // With description
static void SetNbOfProcesses(G4int nb) {NbOfProcesses=nb;};
static void SetNbOfProcesses(G4int nb);
// Sets number of processes giving contribution to the energy loss
static void PlusNbOfProcesses() {NbOfProcesses++ ;};
static void PlusNbOfProcesses();
// Increases number of processes giving contribution to the energy loss
static void MinusNbOfProcesses() {NbOfProcesses-- ;};
static void MinusNbOfProcesses();
// Decreases number of processes giving contribution to the energy loss
static G4int GetNbOfProcesses() {return NbOfProcesses;};
static G4int GetNbOfProcesses();
// Gets number of processes giving contribution to the energy loss
// ( default value = 3)
static void SetLowerBoundEloss(G4double val) {LowerBoundEloss=val;};
static void SetUpperBoundEloss(G4double val) {UpperBoundEloss=val;};
static void SetNbinEloss(G4int nb) {NbinEloss=nb;};
static void SetLowerBoundEloss(G4double val);
static void SetUpperBoundEloss(G4double val);
static void SetNbinEloss(G4int nb);
static G4double GetLowerBoundEloss() {return LowerBoundEloss;};
static G4double GetUpperBoundEloss() {return UpperBoundEloss;};
static G4int GetNbinEloss() {return NbinEloss;};
static G4double GetLowerBoundEloss();
static G4double GetUpperBoundEloss();
static G4int GetNbinEloss();
protected:
static G4PhysicsTable* theDEDXmuplusTable ;
static G4PhysicsTable* theDEDXmuminusTable ;
static G4PhysicsTable* theRangemuplusTable ;
static G4PhysicsTable* theRangemuminusTable ;
static G4PhysicsTable* theDEDXmuplusTable;
static G4PhysicsTable* theDEDXmuminusTable;
static G4PhysicsTable* theRangemuplusTable;
static G4PhysicsTable* theRangemuminusTable;
static G4PhysicsTable* theInverseRangemuplusTable ;
static G4PhysicsTable* theInverseRangemuminusTable ;
static G4PhysicsTable* theInverseRangemuplusTable;
static G4PhysicsTable* theInverseRangemuminusTable;
static G4PhysicsTable* theLabTimemuplusTable ;
static G4PhysicsTable* theLabTimemuminusTable ;
static G4PhysicsTable* theLabTimemuplusTable;
static G4PhysicsTable* theLabTimemuminusTable;
static G4PhysicsTable* theProperTimemuplusTable ;
static G4PhysicsTable* theProperTimemuminusTable ;
static G4PhysicsTable* theProperTimemuplusTable;
static G4PhysicsTable* theProperTimemuminusTable;
// processes inherited from G4muEnergyLoss
// register themselves in the static array Recorder
static G4int NbOfProcesses ;
static G4int NbOfProcesses;
static G4PhysicsTable** RecorderOfmuplusProcess;
static G4PhysicsTable** RecorderOfmuminusProcess;
static G4int CounterOfmuplusProcess ;
static G4int CounterOfmuminusProcess ;
static G4int CounterOfmuplusProcess;
static G4int CounterOfmuminusProcess;
private:
@@ -220,6 +216,10 @@ class G4VMuEnergyLoss : public G4VEnergyLoss
static G4EnergyLossMessenger* eLossMessenger;
static G4double cN; // coeff to compute nb of deltas
static G4int Ndeltamax; // upper limit for nb of subcutoff
// delta rays in one step
};
#include "G4VMuEnergyLoss.icc"
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VMuEnergyLoss.icc,v 1.1.4.2 2001/06/28 20:19:44 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VMuEnergyLoss.icc,v 1.3 2001/09/28 15:44:20 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
//
@@ -34,11 +34,14 @@
// It is the implementation of the NEW UNIFIED ENERGY LOSS PROCESS.
// It calculates the energy loss of muons.
// ***************************************************************
// correction for KineticEnergy< LowerBoundEloss by L.Urban on 27/11/97
// corrections by L. Urban on 27/05/98 ( other corrs come soon!)
// cleanup L.Urban on 23/10/98
// 27-11-97 correction for KineticEnergy< LowerBoundEloss by L.Urban
// 27-05-98 corrections by L. Urban
// 23-10-98 cleanup L.Urban
// 28-09-01 suppression of theMuonPlus ..etc..data members (mma)
// ---------------------------------------------------------------
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4VMuEnergyLoss::GetContinuousStepLimit(
const G4Track& track,
G4double,
@@ -55,10 +58,14 @@ inline G4double G4VMuEnergyLoss::GetContinuousStepLimit(
return Step ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4bool G4VMuEnergyLoss::IsApplicable(const G4ParticleDefinition&
particle)
{
return ( (&particle == (const G4ParticleDefinition *)theMuonPlus)
||(&particle == (const G4ParticleDefinition *)theMuonMinus)
);
return ((&particle == G4MuonPlus::MuonPlus() ) ||
(&particle == G4MuonMinus::MuonMinus()) );
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......