Import Geant4 0.0.0 source tree
This commit is contained in:
@@ -0,0 +1,159 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IMuBremsstrahlung.hh,v 2.1 1998/08/23 11:50:49 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// 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
|
||||
// -------- G4IMuBremsstrahlung physics process ---------
|
||||
// by Laszlo Urban, September 1997
|
||||
// ************************************************************
|
||||
|
||||
#ifndef G4IMuBremsstrahlung_h
|
||||
#define G4IMuBremsstrahlung_h 1
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4IMuEnergyLoss.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4OrderedTable.hh"
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
|
||||
class G4IMuBremsstrahlung : public G4IMuEnergyLoss
|
||||
|
||||
{
|
||||
public:
|
||||
|
||||
G4IMuBremsstrahlung(const G4String& processName = "IMuBremsstrahlung");
|
||||
|
||||
~G4IMuBremsstrahlung();
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
private:
|
||||
|
||||
G4IMuBremsstrahlung & operator=(const G4IMuBremsstrahlung &right);
|
||||
G4IMuBremsstrahlung(const G4IMuBremsstrahlung&);
|
||||
|
||||
public:
|
||||
// post Step functions .......................................
|
||||
|
||||
G4double PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
) ;
|
||||
|
||||
G4VParticleChange *PostStepDoIt(
|
||||
const G4Track& track,
|
||||
const G4Step& Step ) ;
|
||||
|
||||
|
||||
void BuildLossTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
void BuildLambdaTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
protected:
|
||||
|
||||
inline 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:
|
||||
void BuildNlambdaTable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildNlambdaVector(const G4ParticleDefinition& aParticleType,
|
||||
G4int materialIndex,
|
||||
G4PhysicsLogVector* nlambdaVector) ;
|
||||
void BuildInverseNlambdaTable(
|
||||
const G4ParticleDefinition& aParticleType) ;
|
||||
void InvertNlambdaVector(const G4ParticleDefinition& aParticleType,
|
||||
G4int materialIndex,
|
||||
G4PhysicsLogVector* nlambdaVector) ;
|
||||
|
||||
void BuildCoeffATable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildCoeffBTable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildCoeffCTable(const G4ParticleDefinition& aParticleType) ;
|
||||
|
||||
void TestOfInversion(const G4ParticleDefinition& aParticleType,
|
||||
G4int printflag) ;
|
||||
|
||||
G4double ComputeBremLoss(G4double Z,G4double T,
|
||||
G4double Cut);
|
||||
|
||||
G4Element* SelectRandomAtom(G4Material* aMaterial) const;
|
||||
|
||||
private:
|
||||
|
||||
G4PhysicsTable* theMeanFreePathTable ;
|
||||
|
||||
G4OrderedTable PartialSumSigma; // partial sum of total crosssection
|
||||
|
||||
G4PhysicsTable* theNlambdaTable;
|
||||
G4PhysicsTable* theInverseNlambdaTable;
|
||||
|
||||
G4PhysicsTable* theCoeffATable;
|
||||
G4PhysicsTable* theCoeffBTable;
|
||||
G4PhysicsTable* theCoeffCTable;
|
||||
|
||||
const G4double LowestKineticEnergy; // low energy limit of the crossection formula
|
||||
const G4double HighestKineticEnergy; // high energy limit of the crossection formula
|
||||
G4int TotBin; // number of bins in the tables
|
||||
|
||||
G4double MinKineticEnergy; //process is ignored if T<MinKineticEnergy
|
||||
G4double MinCutValue; //protection against divergencies
|
||||
|
||||
// 1 = 2/(3.*Z**(1/3)) , 2= exp(-0.128*(1.18*A**(1/3)-0.48)
|
||||
G4int NuclearFormFactor ;
|
||||
|
||||
G4double CutInRange;
|
||||
|
||||
const G4Gamma* theGamma;
|
||||
const G4MuonMinus* theMuonMinus;
|
||||
const G4MuonPlus* theMuonPlus;
|
||||
|
||||
const G4double* GammaCutInKineticEnergy;
|
||||
const G4double* MuonMinusCutInKineticEnergy;
|
||||
const G4double* MuonPlusCutInKineticEnergy;
|
||||
const G4double* ParticleCutInKineticEnergy;
|
||||
|
||||
|
||||
G4double GammaCutInKineticEnergyNow;
|
||||
G4double MuonMinusCutInKineticEnergyNow;
|
||||
G4double MuonPlusCutInKineticEnergyNow;
|
||||
G4double ParticleCutInKineticEnergyNow;
|
||||
|
||||
G4int NumberOfBuildPhysicsTableCalls ;
|
||||
|
||||
};
|
||||
|
||||
#include "G4IMuBremsstrahlung.icc"
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,171 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IMuBremsstrahlung.icc,v 2.1 1998/08/23 11:50:50 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
//
|
||||
// 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
|
||||
// -------- G4IMuBremsstrahlung physics process ---------
|
||||
// by Laszlo Urban, September 1997
|
||||
// ***************************************************************
|
||||
inline G4double G4IMuBremsstrahlung::PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{// get particle,particle type,kin.energy,material,mat.index
|
||||
const G4double eps=1.e-2 ;
|
||||
const G4double Tfac=0.95,Tfac1=1.-Tfac ;
|
||||
G4double nl,nll,nlold,range,rangeold,rangenext,
|
||||
dEdx,KineticEnergyOld,KineticEnergyNext,value;
|
||||
G4bool isOut;
|
||||
const G4DynamicParticle* particle = track.GetDynamicParticle();
|
||||
const G4ParticleDefinition* particletype = particle->GetDefinition() ;
|
||||
G4double KineticEnergy = particle->GetKineticEnergy();
|
||||
G4Material* material = track.GetMaterial();
|
||||
const G4MaterialTable* theMaterialTable =
|
||||
G4Material::GetMaterialTable();
|
||||
G4int materialindex = material->GetIndex();
|
||||
|
||||
nl = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(KineticEnergy,isOut);
|
||||
range = G4EnergyLossTables::GetPreciseRangeFromEnergy(particletype,
|
||||
KineticEnergy,material) ;
|
||||
|
||||
if ( (previousStepSize <=0.0) || (theNumberOfInteractionLengthLeft<=0.0)) {
|
||||
// beggining of tracking (or just after DoIt of this process)
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
} else {
|
||||
// subtract NumberOfInteractionLengthLeft
|
||||
if(previousStepSize/range < eps)
|
||||
{
|
||||
nll = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(Tfac*KineticEnergy,isOut) ;
|
||||
dEdx = G4EnergyLossTables::GetPreciseDEDX(particletype,
|
||||
KineticEnergy,
|
||||
material) ;
|
||||
nlold = nl + dEdx*previousStepSize*(nl-nll)/
|
||||
(Tfac1*KineticEnergy) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
rangeold = range + previousStepSize ;
|
||||
KineticEnergyOld = G4EnergyLossTables::GetPreciseEnergyFromRange(
|
||||
particletype,
|
||||
rangeold,material);
|
||||
nlold = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(KineticEnergyOld,isOut);
|
||||
if(nlold < nl)
|
||||
{
|
||||
if(verboseLevel>2)
|
||||
{
|
||||
G4cout << "G4IMuBremsstrahlung PostStepGPIL : Nlambda has been" <<
|
||||
" increased at update.Nlambda old/new :" << nlold <<
|
||||
" " << nl << endl;
|
||||
G4cout << "(theNumberOfInteractionLengthLeft has been increased!)" << endl
|
||||
;
|
||||
G4cout << " correction : Nlambda old=new ........." << endl;
|
||||
}
|
||||
//corr. of num errror
|
||||
nlold = nl ;
|
||||
}
|
||||
}
|
||||
|
||||
theNumberOfInteractionLengthLeft -= nlold-nl ;
|
||||
|
||||
if(theNumberOfInteractionLengthLeft<perMillion)
|
||||
theNumberOfInteractionLengthLeft=0.;
|
||||
}
|
||||
|
||||
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
if(nl <= theNumberOfInteractionLengthLeft)
|
||||
{
|
||||
value = BIGSTEP ;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(theNumberOfInteractionLengthLeft/nl < eps)
|
||||
{
|
||||
nll = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(Tfac*KineticEnergy,isOut) ;
|
||||
dEdx = G4EnergyLossTables::GetPreciseDEDX(particletype,
|
||||
KineticEnergy,
|
||||
material) ;
|
||||
|
||||
value = theNumberOfInteractionLengthLeft*Tfac1*KineticEnergy/(dEdx*(nl-nll))
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
KineticEnergyNext = (*theInverseNlambdaTable)[materialindex]->
|
||||
GetValue(nl-theNumberOfInteractionLengthLeft,isOut);
|
||||
rangenext = G4EnergyLossTables::GetPreciseRangeFromEnergy(particletype,
|
||||
KineticEnergyNext,material);
|
||||
|
||||
value = range - rangenext ;
|
||||
|
||||
if(range<rangenext)
|
||||
{
|
||||
if(verboseLevel>2)
|
||||
{
|
||||
G4cout << "G4IhIonisation PostStepGPIL: Step < 0.!, Step=" << value << endl
|
||||
;
|
||||
G4cout << "range,rangenext:" << range << " " << rangenext << endl ;
|
||||
G4cout << "correction : rangenext=range ....." << endl;
|
||||
}
|
||||
//corr. of num error
|
||||
rangenext = range ;
|
||||
value = range - rangenext ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
inline G4double G4IMuBremsstrahlung::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()];
|
||||
|
||||
const G4double BigPath= DBL_MAX;
|
||||
|
||||
G4double SIGMA = 0 ;
|
||||
|
||||
for ( G4int i=0 ; i < aMaterial->GetNumberOfElements() ; i++ )
|
||||
{
|
||||
SIGMA += theAtomNumDensityVector[i] *
|
||||
ComputeMicroscopicCrossSection( ParticleType, KineticEnergy,
|
||||
(*theElementVector)(i)->GetZ(),
|
||||
GammaEnergyCut );
|
||||
}
|
||||
|
||||
return SIGMA<=0.0 ? BigPath : 1./SIGMA ;
|
||||
}
|
||||
|
||||
|
||||
inline G4bool G4IMuBremsstrahlung::IsApplicable(
|
||||
const G4ParticleDefinition& particle)
|
||||
{
|
||||
return( (&particle == (const G4ParticleDefinition *)theMuonMinus)
|
||||
||(&particle == (const G4ParticleDefinition *)theMuonPlus)
|
||||
) ;
|
||||
}
|
||||
@@ -0,0 +1,275 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IMuEnergyLoss.hh,v 2.1 1998/08/23 11:50:51 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// $Id:
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// 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
|
||||
// ---------- G4IMuEnergyLoss physics process -----------
|
||||
// by Laszlo Urban, September 1997
|
||||
// ********************************************************************
|
||||
// It is the implementation of the NEW UNIFIED ENERGY LOSS PROCESS.
|
||||
// It calculates the continuous energy loss for muons.
|
||||
// Processes giving contribution to the continuous loss :
|
||||
// ionisation (= cont.ion.loss + delta ray production)
|
||||
// bremsstrahlung
|
||||
// e+e- pair production
|
||||
// can be added more easily ..........
|
||||
// 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!)
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#ifndef G4IMuEnergyLoss_h
|
||||
#define G4IMuEnergyLoss_h 1
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include <fstream.h>
|
||||
#include <iomanip.h>
|
||||
#include "globals.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4IVContinuousDiscreteProcess.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
#include "G4PhysicsLinearVector.hh"
|
||||
|
||||
|
||||
class G4IMuEnergyLoss : public G4IVContinuousDiscreteProcess
|
||||
|
||||
{
|
||||
public:
|
||||
G4IMuEnergyLoss(const G4String& );
|
||||
G4IMuEnergyLoss(G4IMuEnergyLoss &);
|
||||
|
||||
~G4IMuEnergyLoss();
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
private:
|
||||
|
||||
// hide assignment operator
|
||||
G4IMuEnergyLoss & operator=(const G4IMuEnergyLoss &right);
|
||||
|
||||
public:
|
||||
|
||||
G4double GetContinuousStepLimit(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4double currentMinimumStep,
|
||||
G4double& currentSafety) ;
|
||||
|
||||
|
||||
G4VParticleChange* AlongStepDoIt(const G4Track& track ,const G4Step& Step) ;
|
||||
|
||||
|
||||
virtual G4VParticleChange* PostStepDoIt(const G4Track& track,const G4Step& Step) = 0 ;
|
||||
|
||||
// Build energy loss table (total continuous energy loss)
|
||||
|
||||
void BuildDEDXTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
//----------------------------------------------
|
||||
// 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 GetConstraints(const G4DynamicParticle *aParticle,
|
||||
G4Material *aMaterial);
|
||||
|
||||
G4double GetLossWithFluct(const G4DynamicParticle *aParticle,
|
||||
G4Material *aMaterial) ;
|
||||
|
||||
protected:
|
||||
|
||||
G4PhysicsTable* theLossTable ;
|
||||
|
||||
static G4PhysicsTable* theDEDXmuplusTable ;
|
||||
static G4PhysicsTable* theDEDXmuminusTable ;
|
||||
static G4PhysicsTable* theRangemuplusTable ;
|
||||
static G4PhysicsTable* theRangemuminusTable ;
|
||||
static G4PhysicsTable* theInverseRangemuplusTable ;
|
||||
static G4PhysicsTable* theInverseRangemuminusTable ;
|
||||
|
||||
static G4PhysicsTable* theLabTimemuplusTable ;
|
||||
static G4PhysicsTable* theLabTimemuminusTable ;
|
||||
|
||||
static G4PhysicsTable* theProperTimemuplusTable ;
|
||||
static G4PhysicsTable* theProperTimemuminusTable ;
|
||||
|
||||
static G4PhysicsTable* themuplusRangeCoeffATable;
|
||||
static G4PhysicsTable* themuplusRangeCoeffBTable;
|
||||
static G4PhysicsTable* themuplusRangeCoeffCTable;
|
||||
static G4PhysicsTable* themuminusRangeCoeffATable;
|
||||
static G4PhysicsTable* themuminusRangeCoeffBTable;
|
||||
static G4PhysicsTable* themuminusRangeCoeffCTable;
|
||||
|
||||
static G4double CutInmupluslossTable;
|
||||
static G4double CutInmuminuslossTable;
|
||||
|
||||
// processes inherited from G4IMuEnergyLoss
|
||||
// register themselves in the static array Recorder
|
||||
// nb of contributing processes = NUMBEROFPROCESSES
|
||||
static G4int NUMBEROFPROCESSES ;
|
||||
static G4PhysicsTable** RecorderOfmuplusProcess;
|
||||
static G4PhysicsTable** RecorderOfmuminusProcess;
|
||||
static G4int CounterOfmuplusProcess ;
|
||||
static G4int CounterOfmuminusProcess ;
|
||||
|
||||
G4double RTable,LOGRTable; // LOGRTable=log(HighestKineticEnergy
|
||||
// /LowestKineticEnergy)/TotBin
|
||||
// RTable = exp(LOGRTable)
|
||||
|
||||
// cut in range
|
||||
G4double CutInRange ;
|
||||
// last cut in range
|
||||
G4double lastCutInRange ;
|
||||
|
||||
// particle mass
|
||||
G4double ParticleMass;
|
||||
|
||||
G4double BIGSTEP ;
|
||||
|
||||
private:
|
||||
// private functions ..................................
|
||||
|
||||
void BuildRangeTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
void BuildInverseRangeTable(
|
||||
const G4ParticleDefinition& aParticleType);
|
||||
|
||||
void BuildTimeTables(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
void BuildLabTimeVector(G4int materialIndex,
|
||||
G4PhysicsLogVector* rangeVector);
|
||||
|
||||
void BuildProperTimeVector(G4int materialIndex,
|
||||
G4PhysicsLogVector* rangeVector);
|
||||
|
||||
void InvertRangeVector(G4int materialIndex,
|
||||
G4PhysicsLogVector* rangeVector);
|
||||
|
||||
|
||||
void BuildRangeVector(G4int materialIndex,
|
||||
G4PhysicsLogVector* rangeVector);
|
||||
|
||||
G4double LabTimeIntLog(G4PhysicsVector* physicsVector,G4int nbin);
|
||||
G4double ProperTimeIntLog(G4PhysicsVector* physicsVector,G4int nbin);
|
||||
|
||||
G4double RangeIntLin(G4PhysicsVector* physicsVector,G4int nbin);
|
||||
|
||||
G4double RangeIntLog(G4PhysicsVector* physicsVector,G4int nbin);
|
||||
|
||||
void BuildRangeCoeffATable(const G4ParticleDefinition& aParticleType);
|
||||
void BuildRangeCoeffBTable(const G4ParticleDefinition& aParticleType);
|
||||
void BuildRangeCoeffCTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
private:
|
||||
|
||||
G4PhysicsTable* theDEDXTable;
|
||||
|
||||
G4PhysicsTable* theRangeTable;
|
||||
G4PhysicsTable* theInverseRangeTable;
|
||||
|
||||
G4PhysicsTable* theLabTimeTable;
|
||||
G4PhysicsTable* theProperTimeTable;
|
||||
|
||||
G4PhysicsTable** RecorderOfProcess;
|
||||
G4int CounterOfProcess;
|
||||
|
||||
// private data members ...............................
|
||||
|
||||
// fdEdx=(-dE/dx)
|
||||
// computed in GetConstraints at every call;
|
||||
G4double fdEdx;
|
||||
|
||||
// fRangeNow is the actual range of the particle
|
||||
// computed in GetConstraints
|
||||
G4double fRangeNow ;
|
||||
|
||||
// fMeanLoss is the energyloss without fluctuation
|
||||
// computed in AlongStepDoIt ;
|
||||
G4double fMeanLoss ;
|
||||
|
||||
// EnergyBinNumber,RangeCoeffA,... are needed to compute range
|
||||
G4int EnergyBinNumber ;
|
||||
G4double RangeCoeffA,RangeCoeffB,RangeCoeffC ;
|
||||
|
||||
//................................................................
|
||||
G4PhysicsTable* theRangeCoeffATable;
|
||||
G4PhysicsTable* theRangeCoeffBTable;
|
||||
G4PhysicsTable* theRangeCoeffCTable;
|
||||
|
||||
// dToverTini is the maximum allowed deltarange/range 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
|
||||
// ---------in the energy loss/range tables-------------------
|
||||
const G4double LowestKineticEnergy;
|
||||
const G4double HighestKineticEnergy;
|
||||
G4int TotBin;// number of bins in table, calculated in BuildPhysicsTable
|
||||
// from LowestKineticEnergy,HighestKineticEnergy and
|
||||
// dToverTini
|
||||
|
||||
// variables for the integration routines
|
||||
G4double taulow,tauhigh,ltaulow,ltauhigh;
|
||||
|
||||
// cuts in kinetic energy ........
|
||||
G4double* ParticleCutInKineticEnergy ;
|
||||
G4double ParticleCutInKineticEnergyNow ;
|
||||
|
||||
// ...............
|
||||
const G4Electron* theElectron;
|
||||
const G4Positron* thePositron;
|
||||
const G4MuonPlus* theMuonPlus;
|
||||
const G4MuonMinus* theMuonMinus;
|
||||
|
||||
// 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 "G4IMuEnergyLoss.icc"
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,146 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IMuEnergyLoss.icc,v 2.1 1998/08/23 11:50:51 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// $Id:
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
//
|
||||
// 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
|
||||
// ------------ G4IMuEnergyLoss physics process ------------
|
||||
// by Laszlo Urban, September 1997
|
||||
// ***************************************************************
|
||||
// It is the implementation of the NEW UNIFIED ENERGY LOSS PROCESS.
|
||||
// It calculates the energy loss of muons.
|
||||
// ***************************************************************
|
||||
// correction for KineticEnergy< LowestKineticEnergy by L.Urban on 27/11/97
|
||||
// corrections by L. Urban on 27/05/98 ( other corrs come soon!)
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
inline G4double G4IMuEnergyLoss::GetConstraints(const G4DynamicParticle *aParticle,
|
||||
G4Material *aMaterial)
|
||||
{
|
||||
|
||||
// returns the Step limit
|
||||
// dToverTini is the max. allowed relative range loss in one Step
|
||||
// it calculates dEdx and the range as well....
|
||||
|
||||
G4double KineticEnergy,StepLimit;
|
||||
const G4double BigStep = DBL_MAX ;
|
||||
G4bool isOutRange ;
|
||||
G4int index,bin ;
|
||||
|
||||
if(aParticle->GetDefinition()->GetPDGCharge()>0.)
|
||||
{
|
||||
theDEDXTable = theDEDXmuplusTable ;
|
||||
theRangeTable = theRangemuplusTable ;
|
||||
theRangeCoeffATable=themuplusRangeCoeffATable ;
|
||||
theRangeCoeffBTable=themuplusRangeCoeffBTable ;
|
||||
theRangeCoeffCTable=themuplusRangeCoeffCTable ;
|
||||
}
|
||||
else
|
||||
{
|
||||
theDEDXTable = theDEDXmuminusTable ;
|
||||
theRangeTable = theRangemuminusTable ;
|
||||
theRangeCoeffATable=themuminusRangeCoeffATable ;
|
||||
theRangeCoeffBTable=themuminusRangeCoeffBTable ;
|
||||
theRangeCoeffCTable=themuminusRangeCoeffCTable ;
|
||||
}
|
||||
|
||||
|
||||
// min.stepsize = p*CutInRange at energy , where range=p*CutInRange
|
||||
// random steplimit.........................
|
||||
const G4double p=1. , cc=p*CutInRange ;
|
||||
const G4double c1=dToverTini , c2=(1.-2.*dToverTini)*cc ,
|
||||
c3=dToverTini*cc*cc ;
|
||||
const G4double rangelim=1.5*cc ;
|
||||
const G4double Thigh = 0.9*HighestKineticEnergy ;
|
||||
const G4double alfa = 0.05 , alfa1 = 1.-alfa , alfa2 = 2.*alfa ;
|
||||
KineticEnergy = aParticle->GetKineticEnergy();
|
||||
bin = G4int(log(KineticEnergy/LowestKineticEnergy)/LOGRTable) ;
|
||||
EnergyBinNumber = bin ;
|
||||
index = aMaterial->GetIndex() ;
|
||||
|
||||
if( KineticEnergy < LowestKineticEnergy )
|
||||
{
|
||||
fdEdx = sqrt(KineticEnergy/LowestKineticEnergy)*
|
||||
(*theDEDXTable)(index)->GetValue(LowestKineticEnergy,isOutRange) ;
|
||||
fRangeNow = sqrt(KineticEnergy/LowestKineticEnergy)*
|
||||
(*theRangeTable)(index)->GetValue(LowestKineticEnergy,isOutRange) ;
|
||||
StepLimit = fRangeNow ;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( KineticEnergy > HighestKineticEnergy )
|
||||
StepLimit = BigStep ;
|
||||
else
|
||||
{
|
||||
|
||||
fdEdx = (*theDEDXTable)(index)->
|
||||
GetValue(KineticEnergy,isOutRange) ;
|
||||
|
||||
|
||||
RangeCoeffA = (*(*theRangeCoeffATable)(index))(EnergyBinNumber) ;
|
||||
RangeCoeffB = (*(*theRangeCoeffBTable)(index))(EnergyBinNumber) ;
|
||||
RangeCoeffC = (*(*theRangeCoeffCTable)(index))(EnergyBinNumber) ;
|
||||
|
||||
fRangeNow = (RangeCoeffA*KineticEnergy+RangeCoeffB)
|
||||
*KineticEnergy+RangeCoeffC ;
|
||||
|
||||
// vacuum ?
|
||||
if(fRangeNow>=BigStep)
|
||||
StepLimit = BigStep ;
|
||||
else
|
||||
{
|
||||
// new method to compute the (random) Step limit ..............
|
||||
if(fRangeNow>cc)
|
||||
{
|
||||
StepLimit = c1*fRangeNow+c2+c3/fRangeNow ;
|
||||
|
||||
// randomise this value
|
||||
StepLimit = cc + (StepLimit-cc)*G4UniformRand() ;
|
||||
if(StepLimit > fRangeNow) StepLimit = fRangeNow ;
|
||||
}
|
||||
else
|
||||
StepLimit = fRangeNow ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return StepLimit ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
inline G4double G4IMuEnergyLoss::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 ;
|
||||
}
|
||||
|
||||
inline G4bool G4IMuEnergyLoss::IsApplicable(const G4ParticleDefinition&
|
||||
particle)
|
||||
{
|
||||
return ( (&particle == (const G4ParticleDefinition *)theMuonPlus)
|
||||
||(&particle == (const G4ParticleDefinition *)theMuonMinus)
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IMuIonisation.hh,v 2.1 1998/08/23 11:50:52 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// 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
|
||||
// ------------ G4IMuIonisation 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.
|
||||
// ************************************************************
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#ifndef G4IMuIonisation_h
|
||||
#define G4IMuIonisation_h 1
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4IMuEnergyLoss.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
#include "G4PhysicsLinearVector.hh"
|
||||
|
||||
|
||||
class G4IMuIonisation : public G4IMuEnergyLoss
|
||||
|
||||
{
|
||||
public:
|
||||
|
||||
G4IMuIonisation(const G4String& processName = "IMuIonisation");
|
||||
|
||||
~G4IMuIonisation();
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
private:
|
||||
|
||||
// hide assignment operator
|
||||
G4IMuIonisation & operator=(const G4IMuIonisation &right);
|
||||
G4IMuIonisation(const G4IMuIonisation&);
|
||||
|
||||
public:
|
||||
|
||||
// post Step functions .......................................
|
||||
|
||||
G4double PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
) ;
|
||||
|
||||
G4VParticleChange *PostStepDoIt(
|
||||
const G4Track& track,
|
||||
const G4Step& Step ) ;
|
||||
|
||||
|
||||
void BuildLossTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
void BuildLambdaTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
|
||||
virtual G4double ComputeMicroscopicCrossSection(
|
||||
const G4ParticleDefinition& aParticleType,
|
||||
G4double KineticEnergy,
|
||||
G4double AtomicNumber);
|
||||
|
||||
private:
|
||||
void BuildNlambdaTable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildNlambdaVector(const G4ParticleDefinition& aParticleType,
|
||||
G4int materialIndex,
|
||||
G4PhysicsLogVector* nlambdaVector) ;
|
||||
void BuildInverseNlambdaTable(
|
||||
const G4ParticleDefinition& aParticleType) ;
|
||||
void InvertNlambdaVector(const G4ParticleDefinition& aParticleType,
|
||||
G4int materialIndex,
|
||||
G4PhysicsLogVector* nlambdaVector) ;
|
||||
|
||||
void BuildCoeffATable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildCoeffBTable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildCoeffCTable(const G4ParticleDefinition& aParticleType) ;
|
||||
|
||||
void TestOfInversion(const G4ParticleDefinition& aParticleType,
|
||||
G4int printflag) ;
|
||||
|
||||
|
||||
// private data members ...............................
|
||||
|
||||
G4PhysicsTable* theMeanFreePathTable;
|
||||
|
||||
G4PhysicsTable* theNlambdaTable;
|
||||
G4PhysicsTable* theInverseNlambdaTable;
|
||||
|
||||
G4PhysicsTable* theCoeffATable;
|
||||
G4PhysicsTable* theCoeffBTable;
|
||||
G4PhysicsTable* theCoeffCTable;
|
||||
|
||||
|
||||
// LowestKineticEnergy = lower limit of particle kinetic energy
|
||||
// HighestKineticEnergy = upper limit of particle kinetic energy
|
||||
// TotBin = number of bins
|
||||
// ---------in the energy ionisation loss table-------------------
|
||||
const G4double LowestKineticEnergy;
|
||||
const G4double HighestKineticEnergy;
|
||||
G4int TotBin;
|
||||
|
||||
// cut in range
|
||||
G4double CutInRange ;
|
||||
G4double lastCutInRange ;
|
||||
|
||||
// particles , cuts in kinetic energy ........
|
||||
const G4Electron* theElectron;
|
||||
const G4MuonPlus* theMuonPlus;
|
||||
const G4MuonMinus* theMuonMinus;
|
||||
|
||||
const G4double* ParticleCutInKineticEnergy;
|
||||
const G4double* DeltaCutInKineticEnergy ;
|
||||
|
||||
G4double ParticleCutInKineticEnergyNow ;
|
||||
G4double DeltaCutInKineticEnergyNow ;
|
||||
|
||||
G4int NumberOfBuildPhysicsTableCalls ;
|
||||
|
||||
};
|
||||
|
||||
#include "G4IMuIonisation.icc"
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,151 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IMuIonisation.icc,v 2.1 1998/08/23 11:50:52 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
//
|
||||
// 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
|
||||
// ------------ G4IMuIonisation 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
|
||||
// ---------------------------------------------------------------
|
||||
inline G4double G4IMuIonisation::PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{// get particle,particle type,kin.energy,material,mat.index
|
||||
const G4double eps=1.e-2 ;
|
||||
const G4double Tfac=0.95,Tfac1=1.-Tfac ;
|
||||
G4double nl,nll,nlold,range,rangeold,rangenext,
|
||||
dEdx,KineticEnergyOld,KineticEnergyNext,value;
|
||||
G4bool isOut;
|
||||
const G4DynamicParticle* particle = track.GetDynamicParticle();
|
||||
const G4ParticleDefinition* particletype = particle->GetDefinition() ;
|
||||
G4double KineticEnergy = particle->GetKineticEnergy();
|
||||
G4Material* material = track.GetMaterial();
|
||||
const G4MaterialTable* theMaterialTable =
|
||||
G4Material::GetMaterialTable();
|
||||
G4int materialindex = material->GetIndex();
|
||||
|
||||
nl = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(KineticEnergy,isOut);
|
||||
range = G4EnergyLossTables::GetPreciseRangeFromEnergy(particletype,
|
||||
KineticEnergy,material) ;
|
||||
|
||||
if ( (previousStepSize <=0.0) || (theNumberOfInteractionLengthLeft<=0.0)) {
|
||||
// beggining of tracking (or just after DoIt of this process)
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
} else {
|
||||
// subtract NumberOfInteractionLengthLeft
|
||||
if(previousStepSize/range < eps)
|
||||
{
|
||||
nll = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(Tfac*KineticEnergy,isOut) ;
|
||||
dEdx = G4EnergyLossTables::GetPreciseDEDX(particletype,
|
||||
KineticEnergy,
|
||||
material) ;
|
||||
nlold = nl + dEdx*previousStepSize*(nl-nll)/
|
||||
(Tfac1*KineticEnergy) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
rangeold = range + previousStepSize ;
|
||||
KineticEnergyOld = G4EnergyLossTables::GetPreciseEnergyFromRange(
|
||||
particletype,
|
||||
rangeold,material);
|
||||
nlold = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(KineticEnergyOld,isOut);
|
||||
if(nlold < nl)
|
||||
{
|
||||
if(verboseLevel>2)
|
||||
{
|
||||
G4cout << "G4IMuIonisation PostStepGPIL : Nlambda has been" <<
|
||||
" increased at update.Nlambda old/new :" << nlold <<
|
||||
" " << nl << endl;
|
||||
G4cout << "(theNumberOfInteractionLengthLeft has been increased!)" << endl
|
||||
;
|
||||
G4cout << " correction : Nlambda old=new ........." << endl;
|
||||
}
|
||||
//corr. of num errror
|
||||
nlold = nl ;
|
||||
}
|
||||
}
|
||||
|
||||
theNumberOfInteractionLengthLeft -= nlold-nl ;
|
||||
|
||||
if(theNumberOfInteractionLengthLeft<perMillion)
|
||||
theNumberOfInteractionLengthLeft=0.;
|
||||
}
|
||||
|
||||
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
if(nl <= theNumberOfInteractionLengthLeft)
|
||||
{
|
||||
value = BIGSTEP ;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(theNumberOfInteractionLengthLeft/nl < eps)
|
||||
{
|
||||
nll = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(Tfac*KineticEnergy,isOut) ;
|
||||
dEdx = G4EnergyLossTables::GetPreciseDEDX(particletype,
|
||||
KineticEnergy,
|
||||
material) ;
|
||||
|
||||
value = theNumberOfInteractionLengthLeft*Tfac1*KineticEnergy/(dEdx*(nl-nll))
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
KineticEnergyNext = (*theInverseNlambdaTable)[materialindex]->
|
||||
GetValue(nl-theNumberOfInteractionLengthLeft,isOut);
|
||||
rangenext = G4EnergyLossTables::GetPreciseRangeFromEnergy(particletype,
|
||||
KineticEnergyNext,material);
|
||||
|
||||
value = range - rangenext ;
|
||||
|
||||
if(range<rangenext)
|
||||
{
|
||||
if(verboseLevel>2)
|
||||
{
|
||||
G4cout << "G4IMuIonisation PostStepGPIL: Step < 0.!, Step=" << value << endl
|
||||
;
|
||||
G4cout << "range,rangenext:" << range << " " << rangenext << endl ;
|
||||
G4cout << "correction : rangenext=range ....." << endl;
|
||||
}
|
||||
//corr. of num error
|
||||
rangenext = range ;
|
||||
value = range - rangenext ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
inline G4bool G4IMuIonisation::IsApplicable(
|
||||
const G4ParticleDefinition& particle)
|
||||
{
|
||||
return ( (&particle == (const G4ParticleDefinition *)theMuonPlus)
|
||||
||(&particle == (const G4ParticleDefinition *)theMuonMinus)
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,188 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IMuPairProduction.hh,v 2.1 1998/08/23 11:50:52 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// $Id:
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// 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
|
||||
// -------- G4IMuPairProduction physics process ---------
|
||||
// by Laszlo Urban, May 1998
|
||||
// ************************************************************
|
||||
|
||||
#ifndef G4IMuPairproduction_h
|
||||
#define G4IMuPairproduction_h 1
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4IMuEnergyLoss.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4OrderedTable.hh"
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
|
||||
class G4IMuPairProduction : public G4IMuEnergyLoss
|
||||
|
||||
{
|
||||
public:
|
||||
|
||||
G4IMuPairProduction(const G4String& processName = "IMuPairProduction");
|
||||
|
||||
~G4IMuPairProduction();
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
private:
|
||||
|
||||
G4IMuPairProduction & operator=(const G4IMuPairProduction &right);
|
||||
G4IMuPairProduction(const G4IMuPairProduction&);
|
||||
|
||||
public:
|
||||
// post Step functions .......................................
|
||||
|
||||
G4double PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
) ;
|
||||
|
||||
G4VParticleChange *PostStepDoIt(
|
||||
const G4Track& track,
|
||||
const G4Step& Step ) ;
|
||||
|
||||
|
||||
void BuildLossTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
void BuildLambdaTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
protected:
|
||||
|
||||
inline 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 ElectronEnergyCut,
|
||||
G4double PositronEnergyCut);
|
||||
|
||||
G4double ComputeDDMicroscopicCrossSection(
|
||||
const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
G4double AtomicNumber,
|
||||
G4double PairEnergy,
|
||||
G4double asymmetry);
|
||||
|
||||
|
||||
G4double ComputeDMicroscopicCrossSection(
|
||||
const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
G4double AtomicNumber,
|
||||
G4double PairEnergy);
|
||||
|
||||
void MakeSamplingTables( const G4ParticleDefinition* ParticleType );
|
||||
|
||||
private:
|
||||
void BuildNlambdaTable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildNlambdaVector(const G4ParticleDefinition& aParticleType,
|
||||
G4int materialIndex,
|
||||
G4PhysicsLogVector* nlambdaVector) ;
|
||||
void BuildInverseNlambdaTable(
|
||||
const G4ParticleDefinition& aParticleType) ;
|
||||
void InvertNlambdaVector(const G4ParticleDefinition& aParticleType,
|
||||
G4int materialIndex,
|
||||
G4PhysicsLogVector* nlambdaVector) ;
|
||||
|
||||
void BuildCoeffATable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildCoeffBTable(const G4ParticleDefinition& aParticleType) ;
|
||||
void BuildCoeffCTable(const G4ParticleDefinition& aParticleType) ;
|
||||
|
||||
void TestOfInversion(const G4ParticleDefinition& aParticleType,
|
||||
G4int printflag) ;
|
||||
|
||||
G4double ComputePairLoss( const G4ParticleDefinition* ParticleType,
|
||||
G4double Z,G4double T,G4double ElectronCut,
|
||||
G4double PositronCut);
|
||||
|
||||
G4Element* SelectRandomAtom(G4Material* aMaterial) const;
|
||||
|
||||
private:
|
||||
|
||||
G4PhysicsTable* theMeanFreePathTable ;
|
||||
|
||||
static G4PhysicsTable* themuplusLambdaTable ;
|
||||
static G4PhysicsTable* themuminusLambdaTable ;
|
||||
|
||||
G4OrderedTable PartialSumSigma; // partial sum of total crosssection
|
||||
|
||||
G4PhysicsTable* theNlambdaTable;
|
||||
G4PhysicsTable* theInverseNlambdaTable;
|
||||
|
||||
G4PhysicsTable* theCoeffATable;
|
||||
G4PhysicsTable* theCoeffBTable;
|
||||
G4PhysicsTable* theCoeffCTable;
|
||||
|
||||
const G4double LowestKineticEnergy; // low energy limit of the crossection formula
|
||||
const G4double HighestKineticEnergy; // high energy limit of the crossection formula
|
||||
G4int TotBin; // number of bins in the tables
|
||||
|
||||
G4double MinKineticEnergy; //process is ignored if T<MinKineticEnergy
|
||||
G4double MinCutValue; //protection against divergencies
|
||||
|
||||
G4double CutInRange;
|
||||
|
||||
const G4Electron* theElectron;
|
||||
const G4Positron* thePositron;
|
||||
const G4MuonMinus* theMuonMinus;
|
||||
const G4MuonPlus* theMuonPlus;
|
||||
|
||||
const G4double* ElectronCutInKineticEnergy;
|
||||
const G4double* PositronCutInKineticEnergy;
|
||||
const G4double* MuonMinusCutInKineticEnergy;
|
||||
const G4double* MuonPlusCutInKineticEnergy;
|
||||
const G4double* ParticleCutInKineticEnergy;
|
||||
|
||||
|
||||
G4double ElectronCutInKineticEnergyNow;
|
||||
G4double PositronCutInKineticEnergyNow;
|
||||
G4double MuonMinusCutInKineticEnergyNow;
|
||||
G4double MuonPlusCutInKineticEnergyNow;
|
||||
G4double ParticleCutInKineticEnergyNow;
|
||||
|
||||
// tables for sampling ..............
|
||||
static G4int nzdat,ntdat,NBIN ;
|
||||
static G4double zdat[5],tdat[8] ;
|
||||
static G4double ya[1000],proba[5][8][1000] ;
|
||||
|
||||
G4int NumberOfBuildPhysicsTableCalls ;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#include "G4IMuPairProduction.icc"
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,180 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IMuPairProduction.icc,v 2.1 1998/08/23 11:50:53 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// $Id:
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
//
|
||||
// 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
|
||||
// -------- G4IMuPairProduction physics process ---------
|
||||
// by Laszlo Urban, May 1998
|
||||
// ***************************************************************
|
||||
inline G4double G4IMuPairProduction::PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
)
|
||||
{// get particle,particle type,kin.energy,material,mat.index
|
||||
const G4double eps=1.e-2 ;
|
||||
const G4double Tfac=0.95,Tfac1=1.-Tfac ;
|
||||
G4double nl,nll,nlold,range,rangeold,rangenext,
|
||||
dEdx,KineticEnergyOld,KineticEnergyNext,value;
|
||||
G4bool isOut;
|
||||
const G4DynamicParticle* particle = track.GetDynamicParticle();
|
||||
const G4ParticleDefinition* particletype = particle->GetDefinition() ;
|
||||
G4double KineticEnergy = particle->GetKineticEnergy();
|
||||
G4Material* material = track.GetMaterial();
|
||||
const G4MaterialTable* theMaterialTable =
|
||||
G4Material::GetMaterialTable();
|
||||
G4int materialindex = material->GetIndex();
|
||||
|
||||
nl = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(KineticEnergy,isOut);
|
||||
|
||||
// if ( nl == 0.)
|
||||
// {
|
||||
// value = BIGSTEP ;
|
||||
// return value ;
|
||||
// }
|
||||
|
||||
range = G4EnergyLossTables::GetPreciseRangeFromEnergy(particletype,
|
||||
KineticEnergy,material) ;
|
||||
|
||||
if ( (previousStepSize <=0.0) || (theNumberOfInteractionLengthLeft<=0.0)) {
|
||||
// beggining of tracking (or just after DoIt of this process)
|
||||
ResetNumberOfInteractionLengthLeft();
|
||||
} else {
|
||||
// subtract NumberOfInteractionLengthLeft
|
||||
if(previousStepSize/range < eps)
|
||||
{
|
||||
nll = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(Tfac*KineticEnergy,isOut) ;
|
||||
dEdx = G4EnergyLossTables::GetPreciseDEDX(particletype,
|
||||
KineticEnergy,
|
||||
material) ;
|
||||
nlold = nl + dEdx*previousStepSize*(nl-nll)/
|
||||
(Tfac1*KineticEnergy) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
rangeold = range + previousStepSize ;
|
||||
KineticEnergyOld = G4EnergyLossTables::GetPreciseEnergyFromRange(
|
||||
particletype,
|
||||
rangeold,material);
|
||||
nlold = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(KineticEnergyOld,isOut);
|
||||
if(nlold < nl)
|
||||
{
|
||||
if(verboseLevel>2)
|
||||
{
|
||||
G4cout << "G4IMuPairProduction PostStepGPIL : Nlambda has been" <<
|
||||
" increased at update.Nlambda old/new :" << nlold <<
|
||||
" " << nl << endl;
|
||||
G4cout << "(theNumberOfInteractionLengthLeft has been increased!)" << endl
|
||||
;
|
||||
G4cout << " correction : Nlambda old=new ........." << endl;
|
||||
}
|
||||
//corr. of num errror
|
||||
nlold = nl ;
|
||||
}
|
||||
}
|
||||
|
||||
theNumberOfInteractionLengthLeft -= nlold-nl ;
|
||||
|
||||
if(theNumberOfInteractionLengthLeft<perMillion)
|
||||
theNumberOfInteractionLengthLeft=0.;
|
||||
}
|
||||
|
||||
|
||||
// condition is set to "Not Forced"
|
||||
*condition = NotForced;
|
||||
if(nl <= theNumberOfInteractionLengthLeft)
|
||||
{
|
||||
value = BIGSTEP ;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(theNumberOfInteractionLengthLeft/nl < eps)
|
||||
{
|
||||
nll = (*theNlambdaTable)[materialindex]->
|
||||
GetValue(Tfac*KineticEnergy,isOut) ;
|
||||
dEdx = G4EnergyLossTables::GetPreciseDEDX(particletype,
|
||||
KineticEnergy,
|
||||
material) ;
|
||||
|
||||
value = theNumberOfInteractionLengthLeft*Tfac1*KineticEnergy/(dEdx*(nl-nll))
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
KineticEnergyNext = (*theInverseNlambdaTable)[materialindex]->
|
||||
GetValue(nl-theNumberOfInteractionLengthLeft,isOut);
|
||||
rangenext = G4EnergyLossTables::GetPreciseRangeFromEnergy(particletype,
|
||||
KineticEnergyNext,material);
|
||||
|
||||
value = range - rangenext ;
|
||||
|
||||
if(range<rangenext)
|
||||
{
|
||||
if(verboseLevel>2)
|
||||
{
|
||||
G4cout << "G4IMuPairProduction PostStepGPIL: Step < 0.!, Step=" << value << endl
|
||||
;
|
||||
G4cout << "range,rangenext:" << range << " " << rangenext << endl ;
|
||||
G4cout << "correction : rangenext=range ....." << endl;
|
||||
}
|
||||
//corr. of num error
|
||||
rangenext = range ;
|
||||
value = range - rangenext ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
inline G4double G4IMuPairProduction::ComputeMeanFreePath(
|
||||
const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
const G4Material* aMaterial)
|
||||
{
|
||||
const G4ElementVector* theElementVector = aMaterial->GetElementVector() ;
|
||||
const G4double* theAtomNumDensityVector = aMaterial->GetAtomicNumDensityVector();
|
||||
G4double ElectronEnergyCut = (G4Electron::GetCutsInEnergy())[aMaterial->GetIndex()];
|
||||
G4double PositronEnergyCut = (G4Positron::GetCutsInEnergy())[aMaterial->GetIndex()];
|
||||
|
||||
const G4double BigPath= DBL_MAX;
|
||||
|
||||
G4double SIGMA = 0 ;
|
||||
|
||||
for ( G4int i=0 ; i < aMaterial->GetNumberOfElements() ; i++ )
|
||||
{
|
||||
SIGMA += theAtomNumDensityVector[i] *
|
||||
ComputeMicroscopicCrossSection( ParticleType, KineticEnergy,
|
||||
(*theElementVector)(i)->GetZ(),
|
||||
ElectronEnergyCut,PositronEnergyCut );
|
||||
}
|
||||
|
||||
return SIGMA<=0.0 ? BigPath : 1./SIGMA ;
|
||||
}
|
||||
|
||||
|
||||
inline G4bool G4IMuPairProduction::IsApplicable(
|
||||
const G4ParticleDefinition& particle)
|
||||
{
|
||||
return( (&particle == (const G4ParticleDefinition *)theMuonMinus)
|
||||
||(&particle == (const G4ParticleDefinition *)theMuonPlus)
|
||||
) ;
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MuBremsstrahlung.hh,v 2.4 1998/10/27 12:24:39 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// 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
|
||||
// -------- G4MuBremsstrahlung physics process ---------
|
||||
// by Laszlo Urban, September 1997
|
||||
// ************************************************************
|
||||
|
||||
#ifndef G4MuBremsstrahlung_h
|
||||
#define G4MuBremsstrahlung_h 1
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4MuEnergyLoss.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4OrderedTable.hh"
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
|
||||
class G4MuBremsstrahlung : public G4MuEnergyLoss
|
||||
|
||||
{
|
||||
public:
|
||||
|
||||
G4MuBremsstrahlung(const G4String& processName = "MuBrems");
|
||||
|
||||
~G4MuBremsstrahlung();
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
void SetPhysicsTableBining(G4double lowE, G4double highE, G4int nBins);
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
void BuildLossTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
void BuildLambdaTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
void PrintInfoDefinition() ;
|
||||
|
||||
G4double GetMeanFreePath(const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition ) ;
|
||||
|
||||
G4VParticleChange *PostStepDoIt(const G4Track& track,
|
||||
const G4Step& Step ) ;
|
||||
|
||||
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 AtomicMass,
|
||||
G4double GammaEnergyCut);
|
||||
|
||||
virtual G4double ComputeDMicroscopicCrossSection(
|
||||
const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
G4double AtomicNumber,
|
||||
G4double AtomicMass,
|
||||
G4double GammaEnergy);
|
||||
|
||||
private:
|
||||
|
||||
G4MuBremsstrahlung & operator=(const G4MuBremsstrahlung &right);
|
||||
G4MuBremsstrahlung(const G4MuBremsstrahlung&);
|
||||
|
||||
G4double ComputeBremLoss(const G4ParticleDefinition* ParticleType,
|
||||
G4double Z,G4double A,
|
||||
G4double T, G4double Cut);
|
||||
|
||||
G4Element* SelectRandomAtom(G4Material* aMaterial) const;
|
||||
|
||||
void MakeSamplingTables( const G4ParticleDefinition* ParticleType );
|
||||
|
||||
private:
|
||||
|
||||
G4PhysicsTable* theMeanFreePathTable ;
|
||||
|
||||
G4OrderedTable PartialSumSigma;
|
||||
|
||||
G4double LowestKineticEnergy;
|
||||
G4double HighestKineticEnergy;
|
||||
G4int TotBin;
|
||||
|
||||
G4double CutInRange;
|
||||
|
||||
const G4Gamma* theGamma;
|
||||
const G4MuonMinus* theMuonMinus;
|
||||
const G4MuonPlus* theMuonPlus;
|
||||
|
||||
const G4double* GammaCutInKineticEnergy;
|
||||
const G4double* MuonMinusCutInKineticEnergy;
|
||||
const G4double* MuonPlusCutInKineticEnergy;
|
||||
const G4double* ParticleCutInKineticEnergy;
|
||||
|
||||
|
||||
G4double GammaCutInKineticEnergyNow;
|
||||
G4double MuonMinusCutInKineticEnergyNow;
|
||||
G4double MuonPlusCutInKineticEnergyNow;
|
||||
G4double ParticleCutInKineticEnergyNow;
|
||||
|
||||
// tables for sampling ..............
|
||||
static G4int nzdat,ntdat,NBIN ;
|
||||
static G4double zdat[5],adat[5],tdat[8] ;
|
||||
static G4double ya[1000],proba[5][8][1000] ;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#include "G4MuBremsstrahlung.icc"
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,80 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MuBremsstrahlung.icc,v 2.2 1998/10/27 12:24:40 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
//
|
||||
// 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
|
||||
// -------- G4MuBremsstrahlung physics process ---------
|
||||
// by Laszlo Urban, September 1997
|
||||
// ***************************************************************
|
||||
|
||||
inline G4double G4MuBremsstrahlung::GetMeanFreePath(const G4Track& trackData,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition)
|
||||
{
|
||||
const G4DynamicParticle* aDynamicParticle;
|
||||
G4Material* aMaterial;
|
||||
G4double MeanFreePath;
|
||||
G4bool isOutRange ;
|
||||
|
||||
*condition = NotForced ;
|
||||
|
||||
aDynamicParticle = trackData.GetDynamicParticle();
|
||||
aMaterial = trackData.GetMaterial();
|
||||
|
||||
G4double KineticEnergy = aDynamicParticle->GetKineticEnergy();
|
||||
|
||||
if (KineticEnergy < LowestKineticEnergy)
|
||||
MeanFreePath = DBL_MAX ;
|
||||
else {
|
||||
if (KineticEnergy > HighestKineticEnergy)
|
||||
KineticEnergy = 0.99*HighestKineticEnergy ;
|
||||
MeanFreePath = (*theMeanFreePathTable)(aMaterial->GetIndex())->
|
||||
GetValue( KineticEnergy, isOutRange );
|
||||
}
|
||||
return MeanFreePath;
|
||||
}
|
||||
|
||||
|
||||
inline G4double G4MuBremsstrahlung::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(),
|
||||
(*theElementVector)(i)->GetA(),
|
||||
GammaEnergyCut );
|
||||
}
|
||||
|
||||
return SIGMA<=0.0 ? DBL_MAX : 1./SIGMA ;
|
||||
}
|
||||
|
||||
|
||||
inline G4bool G4MuBremsstrahlung::IsApplicable(
|
||||
const G4ParticleDefinition& particle)
|
||||
{
|
||||
return( (&particle == (const G4ParticleDefinition *)theMuonMinus)
|
||||
||(&particle == (const G4ParticleDefinition *)theMuonPlus)
|
||||
) ;
|
||||
}
|
||||
@@ -0,0 +1,278 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MuEnergyLoss.hh,v 2.7 1998/10/27 12:24:38 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// $Id:
|
||||
// -------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// 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
|
||||
// ---------- G4MuEnergyLoss physics process -----------
|
||||
// by Laszlo Urban, September 1997
|
||||
// ********************************************************************
|
||||
// It is the implementation of the NEW UNIFIED ENERGY LOSS PROCESS.
|
||||
// It calculates the continuous energy loss for muons.
|
||||
// Processes giving contribution to the continuous loss :
|
||||
// ionisation (= cont.ion.loss + delta ray production)
|
||||
// bremsstrahlung
|
||||
// e+e- pair production
|
||||
// can be added more easily ..........
|
||||
// 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
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#ifndef G4MuEnergyLoss_h
|
||||
#define G4MuEnergyLoss_h 1
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include <fstream.h>
|
||||
#include <iomanip.h>
|
||||
#include "globals.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4VContinuousDiscreteProcess.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
#include "G4PhysicsLinearVector.hh"
|
||||
|
||||
class G4EnergyLossMessenger ;
|
||||
|
||||
class G4MuEnergyLoss : public G4VContinuousDiscreteProcess
|
||||
|
||||
{
|
||||
public:
|
||||
|
||||
G4MuEnergyLoss(const G4String& );
|
||||
~G4MuEnergyLoss();
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
void BuildDEDXTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
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:
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// hide assignment operator
|
||||
G4MuEnergyLoss(G4MuEnergyLoss &);
|
||||
G4MuEnergyLoss & operator=(const G4MuEnergyLoss &right);
|
||||
|
||||
void BuildRangeTable(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
void BuildInverseRangeTable(
|
||||
const G4ParticleDefinition& aParticleType);
|
||||
|
||||
void BuildTimeTables(const G4ParticleDefinition& aParticleType);
|
||||
|
||||
void BuildLabTimeVector(G4int materialIndex,
|
||||
G4PhysicsLogVector* rangeVector);
|
||||
|
||||
void BuildProperTimeVector(G4int materialIndex,
|
||||
G4PhysicsLogVector* rangeVector);
|
||||
|
||||
void InvertRangeVector(G4int materialIndex,
|
||||
G4PhysicsLogVector* rangeVector);
|
||||
|
||||
|
||||
void BuildRangeVector(G4int materialIndex,
|
||||
G4PhysicsLogVector* rangeVector);
|
||||
|
||||
G4double LabTimeIntLog(G4PhysicsVector* physicsVector,G4int nbin);
|
||||
|
||||
G4double ProperTimeIntLog(G4PhysicsVector* physicsVector,G4int nbin);
|
||||
|
||||
G4double RangeIntLin(G4PhysicsVector* physicsVector,G4int nbin);
|
||||
|
||||
G4double RangeIntLog(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 MeanLoss) ;
|
||||
|
||||
// =====================================================================
|
||||
public:
|
||||
|
||||
protected:
|
||||
|
||||
G4PhysicsTable* theLossTable ;
|
||||
|
||||
// cut in range
|
||||
G4double CutInRange ;
|
||||
// last cut in range
|
||||
G4double lastCutInRange ;
|
||||
|
||||
// particle mass
|
||||
G4double ParticleMass;
|
||||
|
||||
private:
|
||||
|
||||
G4PhysicsTable* theDEDXTable;
|
||||
|
||||
G4PhysicsTable* theRangeTable;
|
||||
G4PhysicsTable* theInverseRangeTable;
|
||||
|
||||
G4PhysicsTable* theLabTimeTable;
|
||||
G4PhysicsTable* theProperTimeTable;
|
||||
|
||||
G4PhysicsTable** RecorderOfProcess;
|
||||
G4int CounterOfProcess;
|
||||
|
||||
G4PhysicsTable* theRangeCoeffATable;
|
||||
G4PhysicsTable* theRangeCoeffBTable;
|
||||
G4PhysicsTable* theRangeCoeffCTable;
|
||||
|
||||
// fdEdx=(-dE/dx)
|
||||
// computed in GetConstraints at every call;
|
||||
G4double fdEdx;
|
||||
|
||||
// fRangeNow is the actual range of the particle
|
||||
// computed in GetConstraints
|
||||
G4double fRangeNow ;
|
||||
|
||||
// EnergyBinNumber,RangeCoeffA,... are needed to compute range
|
||||
G4int EnergyBinNumber ;
|
||||
G4double RangeCoeffA,RangeCoeffB,RangeCoeffC ;
|
||||
|
||||
// LowestKineticEnergy = lower limit of particle kinetic energy
|
||||
// HighestKineticEnergy = upper limit of particle kinetic energy
|
||||
// TotBin = number of bins
|
||||
// ---------in the energy loss/range tables-------------------
|
||||
G4double LowestKineticEnergy;
|
||||
G4double HighestKineticEnergy;
|
||||
G4int TotBin;// number of bins in table, calculated in BuildPhysicsTable
|
||||
// from LowestKineticEnergy,HighestKineticEnergy and
|
||||
// dToverTini
|
||||
G4double RTable,LOGRTable; // LOGRTable=log(HighestKineticEnergy
|
||||
// /LowestKineticEnergy)/TotBin
|
||||
// RTable = exp(LOGRTable)
|
||||
|
||||
|
||||
// variables for the integration routines
|
||||
G4double taulow,tauhigh,ltaulow,ltauhigh;
|
||||
|
||||
// cuts in kinetic energy ........
|
||||
G4double* ParticleCutInKineticEnergy ;
|
||||
G4double ParticleCutInKineticEnergyNow ;
|
||||
|
||||
const G4Electron* theElectron;
|
||||
const G4Positron* thePositron;
|
||||
const G4MuonPlus* theMuonPlus;
|
||||
const G4MuonMinus* theMuonMinus;
|
||||
|
||||
// data members to speed up the fluctuation calculation
|
||||
G4int imat ;
|
||||
G4Material *lastMaterial ;
|
||||
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:
|
||||
|
||||
static G4int GetNbOfProcesses() { return NbOfProcesses; };
|
||||
static void SetNbOfProcesses(G4int number){ NbOfProcesses=number ; };
|
||||
static void PlusNbOfProcesses() { NbOfProcesses++ ; };
|
||||
static void MinusNbOfProcesses() { NbOfProcesses-- ; };
|
||||
|
||||
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;}
|
||||
|
||||
protected:
|
||||
|
||||
static G4PhysicsTable* theDEDXmuplusTable ;
|
||||
static G4PhysicsTable* theDEDXmuminusTable ;
|
||||
static G4PhysicsTable* theRangemuplusTable ;
|
||||
static G4PhysicsTable* theRangemuminusTable ;
|
||||
|
||||
static G4PhysicsTable* theInverseRangemuplusTable ;
|
||||
static G4PhysicsTable* theInverseRangemuminusTable ;
|
||||
|
||||
static G4PhysicsTable* theLabTimemuplusTable ;
|
||||
static G4PhysicsTable* theLabTimemuminusTable ;
|
||||
|
||||
static G4PhysicsTable* theProperTimemuplusTable ;
|
||||
static G4PhysicsTable* theProperTimemuminusTable ;
|
||||
|
||||
static G4double CutInmupluslossTable;
|
||||
static G4double CutInmuminuslossTable;
|
||||
|
||||
// processes inherited from G4muEnergyLoss
|
||||
// register themselves in the static array Recorder
|
||||
// nb of contributing processes = NbOfProcesses
|
||||
static G4int NbOfProcesses ;
|
||||
static G4PhysicsTable** RecorderOfmuplusProcess;
|
||||
static G4PhysicsTable** RecorderOfmuminusProcess;
|
||||
static G4int CounterOfmuplusProcess ;
|
||||
static G4int CounterOfmuminusProcess ;
|
||||
|
||||
private:
|
||||
|
||||
static G4PhysicsTable* themuplusRangeCoeffATable;
|
||||
static G4PhysicsTable* themuplusRangeCoeffBTable;
|
||||
static G4PhysicsTable* themuplusRangeCoeffCTable;
|
||||
static G4PhysicsTable* themuminusRangeCoeffATable;
|
||||
static G4PhysicsTable* themuminusRangeCoeffBTable;
|
||||
static G4PhysicsTable* themuminusRangeCoeffCTable;
|
||||
|
||||
static G4double dRoverRange; // dRoverRange is the maximum allowed
|
||||
// deltarange/range in one Step
|
||||
static G4double finalRange; // final step before stopping
|
||||
|
||||
static G4bool rndmStepFlag; // control the randomization of the step
|
||||
static G4bool EnlossFlucFlag; // control the energy loss fluctuation
|
||||
|
||||
static G4EnergyLossMessenger* eLossMessenger;
|
||||
|
||||
};
|
||||
|
||||
#include "G4MuEnergyLoss.icc"
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,52 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MuEnergyLoss.icc,v 2.2 1998/10/27 12:24:39 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// $Id:
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
//
|
||||
// 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
|
||||
// ------------ G4MuEnergyLoss physics process ------------
|
||||
// by Laszlo Urban, September 1997
|
||||
// ***************************************************************
|
||||
// It is the implementation of the NEW UNIFIED ENERGY LOSS PROCESS.
|
||||
// It calculates the energy loss of muons.
|
||||
// ***************************************************************
|
||||
// correction for KineticEnergy< LowestKineticEnergy 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
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
inline G4double G4MuEnergyLoss::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 ;
|
||||
}
|
||||
|
||||
inline G4bool G4MuEnergyLoss::IsApplicable(const G4ParticleDefinition&
|
||||
particle)
|
||||
{
|
||||
return ( (&particle == (const G4ParticleDefinition *)theMuonPlus)
|
||||
||(&particle == (const G4ParticleDefinition *)theMuonMinus)
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MuIonisation.hh,v 2.4 1998/10/27 12:24:39 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// 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
|
||||
// ------------ 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.
|
||||
// ************************************************************
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#ifndef G4MuIonisation_h
|
||||
#define G4MuIonisation_h 1
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4MuEnergyLoss.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
#include "G4PhysicsLinearVector.hh"
|
||||
|
||||
|
||||
class G4MuIonisation : public G4MuEnergyLoss
|
||||
|
||||
{
|
||||
public:
|
||||
|
||||
G4MuIonisation(const G4String& processName = "MuIoni");
|
||||
|
||||
~G4MuIonisation();
|
||||
|
||||
void SetPhysicsTableBining(G4double lowE, G4double highE, G4int nBins);
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
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);
|
||||
|
||||
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 ...............................
|
||||
|
||||
G4PhysicsTable* theMeanFreePathTable;
|
||||
|
||||
G4double LowestKineticEnergy;
|
||||
G4double HighestKineticEnergy;
|
||||
G4int TotBin;
|
||||
|
||||
// cut in range
|
||||
G4double CutInRange ;
|
||||
G4double lastCutInRange ;
|
||||
|
||||
// particles , cuts in kinetic energy ........
|
||||
const G4Electron* theElectron;
|
||||
const G4MuonPlus* theMuonPlus;
|
||||
const G4MuonMinus* theMuonMinus;
|
||||
|
||||
const G4double* ParticleCutInKineticEnergy;
|
||||
const G4double* DeltaCutInKineticEnergy ;
|
||||
|
||||
G4double ParticleCutInKineticEnergyNow ;
|
||||
G4double DeltaCutInKineticEnergyNow ;
|
||||
};
|
||||
|
||||
#include "G4MuIonisation.icc"
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,62 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MuIonisation.icc,v 2.2 1998/10/27 12:24:39 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
//
|
||||
// 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
|
||||
// ------------ 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
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
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 ;
|
||||
}
|
||||
|
||||
inline G4bool G4MuIonisation::IsApplicable(
|
||||
const G4ParticleDefinition& particle)
|
||||
{
|
||||
return ( (&particle == (const G4ParticleDefinition *)theMuonPlus)
|
||||
||(&particle == (const G4ParticleDefinition *)theMuonMinus)
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4MuNuclearInteraction.hh,v 2.4 1998/10/27 12:24:40 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// $Id:
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// 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
|
||||
// -------- G4MuNuclearInteraction physics process ---------
|
||||
// by Laszlo Urban, May 1998
|
||||
// ************************************************************
|
||||
|
||||
#ifndef G4MuNuclearInteraction_h
|
||||
#define G4MuNuclearInteraction_h 1
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4VDiscreteProcess.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4PionZero.hh"
|
||||
#include "G4OrderedTable.hh"
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4ElementTable.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
|
||||
class G4MuNuclearInteraction : public G4VDiscreteProcess
|
||||
|
||||
{
|
||||
public:
|
||||
|
||||
G4MuNuclearInteraction(const G4String& processName = "MuNucl");
|
||||
|
||||
~G4MuNuclearInteraction();
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
void SetPhysicsTableBining(G4double lowE, G4double highE, G4int nBins);
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
void PrintInfoDefinition() ;
|
||||
|
||||
G4double GetMeanFreePath(const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition ) ;
|
||||
|
||||
G4VParticleChange *PostStepDoIt(const G4Track& track,
|
||||
const G4Step& Step ) ;
|
||||
|
||||
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 AtomicMass);
|
||||
|
||||
virtual G4double ComputeDMicroscopicCrossSection(
|
||||
const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
G4double AtomicNumber,
|
||||
G4double AtomicMass,
|
||||
G4double epsilon);
|
||||
|
||||
private:
|
||||
|
||||
G4MuNuclearInteraction & operator=(const G4MuNuclearInteraction &right);
|
||||
G4MuNuclearInteraction(const G4MuNuclearInteraction&);
|
||||
|
||||
G4Element* SelectRandomAtom(G4Material* aMaterial) const;
|
||||
|
||||
void MakeSamplingTables( const G4ParticleDefinition* ParticleType );
|
||||
|
||||
private:
|
||||
|
||||
G4PhysicsTable* theMeanFreePathTable;
|
||||
G4PhysicsTable* theCrossSectionTable ;
|
||||
|
||||
G4OrderedTable PartialSumSigma;
|
||||
|
||||
G4double LowestKineticEnergy;
|
||||
G4double HighestKineticEnergy;
|
||||
G4int TotBin;
|
||||
|
||||
//cut from R.P. Kokoulin
|
||||
const G4double CutFixed ;
|
||||
// for the atomic weight conversion
|
||||
G4double GramPerMole ;
|
||||
|
||||
const G4MuonMinus* theMuonMinus;
|
||||
const G4MuonPlus* theMuonPlus;
|
||||
const G4PionZero* thePionZero;
|
||||
|
||||
// tables for sampling ..............
|
||||
static G4int nzdat,ntdat,NBIN ;
|
||||
static G4double zdat[5],adat[5],tdat[8] ;
|
||||
static G4double ya[1000],proba[5][8][1000] ;
|
||||
|
||||
};
|
||||
|
||||
#include "G4MuNuclearInteraction.icc"
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,80 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4MuNuclearInteraction.icc,v 2.2 1998/10/27 12:24:41 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// $Id:
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
//
|
||||
// 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
|
||||
// -------- G4MuNuclearInteraction physics process ---------
|
||||
// by Laszlo Urban, May 1998
|
||||
// ***************************************************************
|
||||
|
||||
inline G4double G4MuNuclearInteraction::GetMeanFreePath(
|
||||
const G4Track& trackData,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition)
|
||||
{
|
||||
const G4DynamicParticle* aDynamicParticle;
|
||||
G4Material* aMaterial;
|
||||
G4double MeanFreePath;
|
||||
G4bool isOutRange ;
|
||||
|
||||
*condition = NotForced ;
|
||||
|
||||
aDynamicParticle = trackData.GetDynamicParticle();
|
||||
aMaterial = trackData.GetMaterial();
|
||||
|
||||
G4double KineticEnergy = aDynamicParticle->GetKineticEnergy();
|
||||
|
||||
if (KineticEnergy < LowestKineticEnergy)
|
||||
MeanFreePath = DBL_MAX ;
|
||||
else {
|
||||
if (KineticEnergy > HighestKineticEnergy)
|
||||
KineticEnergy = 0.99*HighestKineticEnergy ;
|
||||
MeanFreePath = (*theMeanFreePathTable)(aMaterial->GetIndex())->
|
||||
GetValue( KineticEnergy, isOutRange );
|
||||
}
|
||||
return MeanFreePath;
|
||||
}
|
||||
|
||||
inline G4double G4MuNuclearInteraction::ComputeMeanFreePath(
|
||||
const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
const G4Material* aMaterial)
|
||||
{
|
||||
const G4ElementVector* theElementVector = aMaterial->GetElementVector() ;
|
||||
const G4double* theAtomNumDensityVector =
|
||||
aMaterial->GetAtomicNumDensityVector();
|
||||
|
||||
G4double SIGMA = 0 ;
|
||||
|
||||
for ( G4int i=0 ; i < aMaterial->GetNumberOfElements() ; i++ )
|
||||
{
|
||||
SIGMA += theAtomNumDensityVector[i] *
|
||||
ComputeMicroscopicCrossSection( ParticleType, KineticEnergy,
|
||||
(*theElementVector)(i)->GetZ(),
|
||||
(*theElementVector)(i)->GetA()) ;
|
||||
}
|
||||
|
||||
return SIGMA<=0.0 ? DBL_MAX : 1./SIGMA ;
|
||||
}
|
||||
|
||||
|
||||
inline G4bool G4MuNuclearInteraction::IsApplicable(
|
||||
const G4ParticleDefinition& particle)
|
||||
{
|
||||
return( (&particle == (const G4ParticleDefinition *)theMuonMinus)
|
||||
||(&particle == (const G4ParticleDefinition *)theMuonPlus)
|
||||
) ;
|
||||
}
|
||||
@@ -0,0 +1,150 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MuPairProduction.hh,v 2.6 1998/10/27 12:24:40 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// $Id:
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// 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
|
||||
// -------- G4MuPairProduction physics process ---------
|
||||
// by Laszlo Urban, May 1998
|
||||
// ************************************************************
|
||||
|
||||
#ifndef G4MuPairproduction_h
|
||||
#define G4MuPairproduction_h 1
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4MuEnergyLoss.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4OrderedTable.hh"
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
|
||||
class G4MuPairProduction : public G4MuEnergyLoss
|
||||
|
||||
{
|
||||
public:
|
||||
|
||||
G4MuPairProduction(const G4String& processName = "MuPairProd");
|
||||
|
||||
~G4MuPairProduction();
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
void SetPhysicsTableBining(G4double lowE,G4double highE,G4int nBins);
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
void BuildLossTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
void BuildLambdaTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
void PrintInfoDefinition();
|
||||
|
||||
G4double GetMeanFreePath( const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition ) ;
|
||||
|
||||
G4VParticleChange *PostStepDoIt(const G4Track& track,
|
||||
const G4Step& Step ) ;
|
||||
|
||||
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 ElectronEnergyCut,
|
||||
G4double PositronEnergyCut);
|
||||
|
||||
G4double ComputeDDMicroscopicCrossSection(
|
||||
const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
G4double AtomicNumber,
|
||||
G4double PairEnergy,
|
||||
G4double asymmetry);
|
||||
|
||||
G4double ComputeDMicroscopicCrossSection(
|
||||
const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
G4double AtomicNumber,
|
||||
G4double PairEnergy);
|
||||
|
||||
private:
|
||||
|
||||
G4MuPairProduction & operator=(const G4MuPairProduction &right);
|
||||
G4MuPairProduction(const G4MuPairProduction&);
|
||||
|
||||
G4double ComputePairLoss( const G4ParticleDefinition* ParticleType,
|
||||
G4double Z,G4double T,G4double ElectronCut,
|
||||
G4double PositronCut);
|
||||
|
||||
G4Element* SelectRandomAtom(G4Material* aMaterial) const;
|
||||
|
||||
void MakeSamplingTables( const G4ParticleDefinition* ParticleType );
|
||||
|
||||
private:
|
||||
|
||||
G4PhysicsTable* theMeanFreePathTable ;
|
||||
|
||||
G4OrderedTable PartialSumSigma;
|
||||
|
||||
G4double LowestKineticEnergy;
|
||||
G4double HighestKineticEnergy;
|
||||
G4int TotBin;
|
||||
|
||||
G4double CutInRange;
|
||||
|
||||
const G4Electron* theElectron;
|
||||
const G4Positron* thePositron;
|
||||
const G4MuonMinus* theMuonMinus;
|
||||
const G4MuonPlus* theMuonPlus;
|
||||
|
||||
const G4double* ElectronCutInKineticEnergy;
|
||||
const G4double* PositronCutInKineticEnergy;
|
||||
const G4double* MuonMinusCutInKineticEnergy;
|
||||
const G4double* MuonPlusCutInKineticEnergy;
|
||||
const G4double* ParticleCutInKineticEnergy;
|
||||
|
||||
|
||||
G4double ElectronCutInKineticEnergyNow;
|
||||
G4double PositronCutInKineticEnergyNow;
|
||||
G4double MuonMinusCutInKineticEnergyNow;
|
||||
G4double MuonPlusCutInKineticEnergyNow;
|
||||
G4double ParticleCutInKineticEnergyNow;
|
||||
|
||||
// tables for sampling ..............
|
||||
static G4int nzdat,ntdat,NBIN ;
|
||||
static G4double zdat[5],tdat[8] ;
|
||||
static G4double ya[1000],proba[5][8][1000] ;
|
||||
|
||||
};
|
||||
|
||||
#include "G4MuPairProduction.icc"
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,80 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MuPairProduction.icc,v 2.2 1998/10/27 12:24:40 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// $Id:
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
//
|
||||
// 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
|
||||
// -------- G4MuPairProduction physics process ---------
|
||||
// by Laszlo Urban, May 1998
|
||||
// ***************************************************************
|
||||
|
||||
inline G4double G4MuPairProduction::GetMeanFreePath(const G4Track& trackData,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition)
|
||||
{
|
||||
const G4DynamicParticle* aDynamicParticle;
|
||||
G4Material* aMaterial;
|
||||
G4double MeanFreePath;
|
||||
G4bool isOutRange ;
|
||||
|
||||
*condition = NotForced ;
|
||||
|
||||
aDynamicParticle = trackData.GetDynamicParticle();
|
||||
aMaterial = trackData.GetMaterial();
|
||||
G4double KineticEnergy = aDynamicParticle->GetKineticEnergy();
|
||||
|
||||
if (KineticEnergy < LowestKineticEnergy)
|
||||
MeanFreePath = DBL_MAX ;
|
||||
else {
|
||||
if (KineticEnergy > HighestKineticEnergy)
|
||||
KineticEnergy = 0.99*HighestKineticEnergy ;
|
||||
MeanFreePath = (*theMeanFreePathTable)(aMaterial->GetIndex())->
|
||||
GetValue( KineticEnergy, isOutRange );
|
||||
}
|
||||
return MeanFreePath;
|
||||
}
|
||||
|
||||
inline G4double G4MuPairProduction::ComputeMeanFreePath(
|
||||
const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
const G4Material* aMaterial)
|
||||
{
|
||||
const G4ElementVector* theElementVector = aMaterial->GetElementVector() ;
|
||||
const G4double* theAtomNumDensityVector =
|
||||
aMaterial->GetAtomicNumDensityVector();
|
||||
G4double ElectronEnergyCut =
|
||||
(G4Electron::GetCutsInEnergy())[aMaterial->GetIndex()];
|
||||
G4double PositronEnergyCut =
|
||||
(G4Positron::GetCutsInEnergy())[aMaterial->GetIndex()];
|
||||
|
||||
G4double SIGMA = 0 ;
|
||||
for ( G4int i=0 ; i < aMaterial->GetNumberOfElements() ; i++ )
|
||||
{
|
||||
SIGMA += theAtomNumDensityVector[i] *
|
||||
ComputeMicroscopicCrossSection( ParticleType, KineticEnergy,
|
||||
(*theElementVector)(i)->GetZ(),
|
||||
ElectronEnergyCut,PositronEnergyCut );
|
||||
}
|
||||
|
||||
return SIGMA<=0.0 ? DBL_MAX : 1./SIGMA ;
|
||||
}
|
||||
|
||||
inline G4bool G4MuPairProduction::IsApplicable(
|
||||
const G4ParticleDefinition& particle)
|
||||
{
|
||||
return( (&particle == (const G4ParticleDefinition *)theMuonMinus)
|
||||
||(&particle == (const G4ParticleDefinition *)theMuonPlus)
|
||||
) ;
|
||||
}
|
||||
Reference in New Issue
Block a user