Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4hIonisation Class Reference

#include <G4hIonisation.hh>

Inheritance diagram for G4hIonisation:
Collaboration diagram for G4hIonisation:

Public Member Functions

 G4hIonisation (const G4String &name="hIoni")
 
virtual ~G4hIonisation ()
 
virtual G4bool IsApplicable (const G4ParticleDefinition &p) override
 
virtual G4double MinPrimaryEnergy (const G4ParticleDefinition *p, const G4Material *, G4double cut) final
 
virtual void PrintInfo () final
 
- Public Member Functions inherited from G4VEnergyLossProcess
 G4VEnergyLossProcess (const G4String &name="EnergyLoss", G4ProcessType type=fElectromagnetic)
 
virtual ~G4VEnergyLossProcess ()
 
virtual void ProcessDescription (std::ostream &outFile) const
 
virtual void PreparePhysicsTable (const G4ParticleDefinition &) override
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &) override
 
G4PhysicsTableBuildDEDXTable (G4EmTableType tType=fRestricted)
 
G4PhysicsTableBuildLambdaTable (G4EmTableType tType=fRestricted)
 
void PrintInfoDefinition (const G4ParticleDefinition &part)
 
virtual void StartTracking (G4Track *) override
 
virtual G4double AlongStepGetPhysicalInteractionLength (const G4Track &, G4double previousStepSize, G4double currentMinimumStep, G4double &currentSafety, G4GPILSelection *selection) override
 
virtual G4double PostStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
 
virtual G4VParticleChangeAlongStepDoIt (const G4Track &, const G4Step &) override
 
G4double SampleSubCutSecondaries (std::vector< G4Track * > &, const G4Step &, G4VEmModel *model, G4int matIdx)
 
virtual G4VParticleChangePostStepDoIt (const G4Track &, const G4Step &) override
 
virtual G4bool StorePhysicsTable (const G4ParticleDefinition *, const G4String &directory, G4bool ascii=false) override
 
virtual G4bool RetrievePhysicsTable (const G4ParticleDefinition *, const G4String &directory, G4bool ascii) override
 
G4double GetDEDXDispersion (const G4MaterialCutsCouple *couple, const G4DynamicParticle *dp, G4double length)
 
G4double CrossSectionPerVolume (G4double kineticEnergy, const G4MaterialCutsCouple *couple)
 
G4double MeanFreePath (const G4Track &track)
 
G4double ContinuousStepLimit (const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &currentSafety)
 
G4VEmModelSelectModelForMaterial (G4double kinEnergy, size_t &idx) const
 
void AddEmModel (G4int, G4VEmModel *, G4VEmFluctuationModel *fluc=0, const G4Region *region=nullptr)
 
void UpdateEmModel (const G4String &, G4double, G4double)
 
void SetEmModel (G4VEmModel *, G4int index=1)
 
G4VEmModelEmModel (G4int index=1) const
 
G4VEmModelGetModelByIndex (G4int idx=0, G4bool ver=false) const
 
G4int NumberOfModels () const
 
void SetFluctModel (G4VEmFluctuationModel *)
 
G4VEmFluctuationModelFluctModel ()
 
void SetBaseParticle (const G4ParticleDefinition *p)
 
const G4ParticleDefinitionParticle () const
 
const G4ParticleDefinitionBaseParticle () const
 
const G4ParticleDefinitionSecondaryParticle () const
 
void ActivateSubCutoff (G4bool val, const G4Region *region=nullptr)
 
void SetCrossSectionBiasingFactor (G4double f, G4bool flag=true)
 
void ActivateForcedInteraction (G4double length, const G4String &region, G4bool flag=true)
 
void ActivateSecondaryBiasing (const G4String &region, G4double factor, G4double energyLimit)
 
void AddCollaborativeProcess (G4VEnergyLossProcess *)
 
void SetLossFluctuations (G4bool val)
 
void SetIntegral (G4bool val)
 
G4bool IsIntegral () const
 
void SetIonisation (G4bool val)
 
G4bool IsIonisationProcess () const
 
void SetLinearLossLimit (G4double val)
 
void SetStepFunction (G4double v1, G4double v2, G4bool lock=true)
 
void SetLowestEnergyLimit (G4double)
 
G4int NumberOfSubCutoffRegions () const
 
void SetDEDXTable (G4PhysicsTable *p, G4EmTableType tType)
 
void SetCSDARangeTable (G4PhysicsTable *pRange)
 
void SetRangeTableForLoss (G4PhysicsTable *p)
 
void SetSecondaryRangeTable (G4PhysicsTable *p)
 
void SetInverseRangeTable (G4PhysicsTable *p)
 
void SetLambdaTable (G4PhysicsTable *p)
 
void SetSubLambdaTable (G4PhysicsTable *p)
 
void SetDEDXBinning (G4int nbins)
 
void SetMinKinEnergy (G4double e)
 
G4double MinKinEnergy () const
 
void SetMaxKinEnergy (G4double e)
 
G4double MaxKinEnergy () const
 
G4double CrossSectionBiasingFactor () const
 
G4double GetDEDX (G4double &kineticEnergy, const G4MaterialCutsCouple *)
 
G4double GetDEDXForSubsec (G4double &kineticEnergy, const G4MaterialCutsCouple *)
 
G4double GetRange (G4double &kineticEnergy, const G4MaterialCutsCouple *)
 
G4double GetCSDARange (G4double &kineticEnergy, const G4MaterialCutsCouple *)
 
G4double GetRangeForLoss (G4double &kineticEnergy, const G4MaterialCutsCouple *)
 
G4double GetKineticEnergy (G4double &range, const G4MaterialCutsCouple *)
 
G4double GetLambda (G4double &kineticEnergy, const G4MaterialCutsCouple *)
 
G4bool TablesAreBuilt () const
 
G4PhysicsTableDEDXTable () const
 
G4PhysicsTableDEDXTableForSubsec () const
 
G4PhysicsTableDEDXunRestrictedTable () const
 
G4PhysicsTableIonisationTable () const
 
G4PhysicsTableIonisationTableForSubsec () const
 
G4PhysicsTableCSDARangeTable () const
 
G4PhysicsTableSecondaryRangeTable () const
 
G4PhysicsTableRangeTableForLoss () const
 
G4PhysicsTableInverseRangeTable () const
 
G4PhysicsTableLambdaTable () const
 
G4PhysicsTableSubLambdaTable () const
 
const G4ElementGetCurrentElement () const
 
void SetDynamicMassCharge (G4double massratio, G4double charge2ratio)
 
- Public Member Functions inherited from G4VContinuousDiscreteProcess
 G4VContinuousDiscreteProcess (const G4String &, G4ProcessType aType=fNotDefined)
 
 G4VContinuousDiscreteProcess (G4VContinuousDiscreteProcess &)
 
virtual ~G4VContinuousDiscreteProcess ()
 
virtual G4double AtRestGetPhysicalInteractionLength (const G4Track &, G4ForceCondition *)
 
virtual G4VParticleChangeAtRestDoIt (const G4Track &, const G4Step &)
 
- Public Member Functions inherited from G4VProcess
 G4VProcess (const G4String &aName="NoName", G4ProcessType aType=fNotDefined)
 
 G4VProcess (const G4VProcess &right)
 
virtual ~G4VProcess ()
 
G4int operator== (const G4VProcess &right) const
 
G4int operator!= (const G4VProcess &right) const
 
G4double GetCurrentInteractionLength () const
 
void SetPILfactor (G4double value)
 
G4double GetPILfactor () const
 
G4double AlongStepGPIL (const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)
 
G4double AtRestGPIL (const G4Track &track, G4ForceCondition *condition)
 
G4double PostStepGPIL (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
 
const G4StringGetPhysicsTableFileName (const G4ParticleDefinition *, const G4String &directory, const G4String &tableName, G4bool ascii=false)
 
const G4StringGetProcessName () const
 
G4ProcessType GetProcessType () const
 
void SetProcessType (G4ProcessType)
 
G4int GetProcessSubType () const
 
void SetProcessSubType (G4int)
 
virtual void EndTracking ()
 
virtual void SetProcessManager (const G4ProcessManager *)
 
virtual const G4ProcessManagerGetProcessManager ()
 
virtual void ResetNumberOfInteractionLengthLeft ()
 
G4double GetNumberOfInteractionLengthLeft () const
 
G4double GetTotalNumberOfInteractionLengthTraversed () const
 
G4bool isAtRestDoItIsEnabled () const
 
G4bool isAlongStepDoItIsEnabled () const
 
G4bool isPostStepDoItIsEnabled () const
 
virtual void DumpInfo () const
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 
virtual void SetMasterProcess (G4VProcess *masterP)
 
const G4VProcessGetMasterProcess () const
 
virtual void BuildWorkerPhysicsTable (const G4ParticleDefinition &part)
 
virtual void PrepareWorkerPhysicsTable (const G4ParticleDefinition &)
 

Protected Member Functions

virtual void InitialiseEnergyLossProcess (const G4ParticleDefinition *, const G4ParticleDefinition *) override
 
- Protected Member Functions inherited from G4VEnergyLossProcess
virtual G4double GetMeanFreePath (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
 
virtual G4double GetContinuousStepLimit (const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &currentSafety) override
 
G4PhysicsVectorLambdaPhysicsVector (const G4MaterialCutsCouple *, G4double cut)
 
size_t CurrentMaterialCutsCoupleIndex () const
 
void SelectModel (G4double kinEnergy)
 
void SetParticle (const G4ParticleDefinition *p)
 
void SetSecondaryParticle (const G4ParticleDefinition *p)
 
- Protected Member Functions inherited from G4VContinuousDiscreteProcess
void SetGPILSelection (G4GPILSelection selection)
 
G4GPILSelection GetGPILSelection () const
 
- Protected Member Functions inherited from G4VProcess
void SubtractNumberOfInteractionLengthLeft (G4double previousStepSize)
 
void ClearNumberOfInteractionLengthLeft ()
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VProcess
static const G4StringGetProcessTypeName (G4ProcessType)
 
- Protected Attributes inherited from G4VEnergyLossProcess
G4ParticleChangeForLoss fParticleChange
 
- Protected Attributes inherited from G4VProcess
const G4ProcessManageraProcessManager
 
G4VParticleChangepParticleChange
 
G4ParticleChange aParticleChange
 
G4double theNumberOfInteractionLengthLeft
 
G4double currentInteractionLength
 
G4double theInitialNumberOfInteractionLength
 
G4String theProcessName
 
G4String thePhysicsTableFileName
 
G4ProcessType theProcessType
 
G4int theProcessSubType
 
G4double thePILfactor
 
G4bool enableAtRestDoIt
 
G4bool enableAlongStepDoIt
 
G4bool enablePostStepDoIt
 
G4int verboseLevel
 

Detailed Description

Definition at line 85 of file G4hIonisation.hh.

Constructor & Destructor Documentation

G4hIonisation::G4hIonisation ( const G4String name = "hIoni")
explicit

Definition at line 110 of file G4hIonisation.cc.

111  : G4VEnergyLossProcess(name),
112  isInitialised(false)
113 {
116  mass = 0.0;
117  ratio = 0.0;
118  eth = 2*MeV;
119 }
G4VEnergyLossProcess(const G4String &name="EnergyLoss", G4ProcessType type=fElectromagnetic)
void SetProcessSubType(G4int)
Definition: G4VProcess.hh:432
void SetSecondaryParticle(const G4ParticleDefinition *p)
static G4Electron * Electron()
Definition: G4Electron.cc:94
static constexpr double MeV
Definition: G4SIunits.hh:214

Here is the call graph for this function:

G4hIonisation::~G4hIonisation ( )
virtual

Definition at line 123 of file G4hIonisation.cc.

124 {}

Member Function Documentation

void G4hIonisation::InitialiseEnergyLossProcess ( const G4ParticleDefinition part,
const G4ParticleDefinition bpart 
)
overrideprotectedvirtual

Implements G4VEnergyLossProcess.

Definition at line 147 of file G4hIonisation.cc.

150 {
151  if(!isInitialised) {
152 
153  const G4ParticleDefinition* theBaseParticle = nullptr;
154  G4String pname = part->GetParticleName();
155  G4double q = part->GetPDGCharge();
156 
157  //G4cout << " G4hIonisation::InitialiseEnergyLossProcess " << pname
158  // << " " << bpart << G4endl;
159 
160  // standard base particles
161  if(part == bpart || pname == "proton" ||
162  pname == "anti_proton" ||
163  pname == "pi+" || pname == "pi-" ||
164  pname == "kaon+" || pname == "kaon-" || pname == "GenericIon"
165  || pname == "He3" || pname == "alpha")
166  {
167  theBaseParticle = nullptr;
168  }
169  // select base particle
170  else if(bpart == nullptr) {
171 
172  if(part->GetPDGSpin() == 0.0) {
173  if(q > 0.0) { theBaseParticle = G4KaonPlus::KaonPlus(); }
174  else { theBaseParticle = G4KaonMinus::KaonMinus(); }
175  } else {
176  if(q > 0.0) { theBaseParticle = G4Proton::Proton(); }
177  else { theBaseParticle = G4AntiProton::AntiProton(); }
178  }
179 
180  // base particle defined by interface
181  } else {
182  theBaseParticle = bpart;
183  }
184  SetBaseParticle(theBaseParticle);
185 
186  mass = part->GetPDGMass();
187  ratio = electron_mass_c2/mass;
188  eth = 2.0*MeV*mass/proton_mass_c2;
189 
191  G4double emin = std::min(param->MinKinEnergy(), 0.1*eth);
192  G4double emax = std::max(param->MaxKinEnergy(), 100*eth);
193 
194  if(emin != param->MinKinEnergy() || emax != param->MaxKinEnergy()) {
195  SetMinKinEnergy(emin);
196  SetMaxKinEnergy(emax);
197  G4int bin = G4lrint(param->NumberOfBinsPerDecade()*std::log10(emax/emin));
198  SetDEDXBinning(bin);
199  }
200 
201  if (!EmModel(1)) {
202  if(q > 0.0) { SetEmModel(new G4BraggModel(),1); }
203  else { SetEmModel(new G4ICRU73QOModel(),1); }
204  }
205  EmModel(1)->SetLowEnergyLimit(param->MinKinEnergy());
206  EmModel(1)->SetHighEnergyLimit(eth);
207  AddEmModel(1, EmModel(1), new G4IonFluctuations());
208 
210 
211  if (!EmModel(2)) { SetEmModel(new G4BetheBlochModel(),2); }
212  EmModel(2)->SetLowEnergyLimit(eth);
214  AddEmModel(2, EmModel(2), FluctModel());
215 
216  isInitialised = true;
217  }
218 }
G4int NumberOfBinsPerDecade() const
G4double MaxKinEnergy() const
tuple bin
Definition: plottest35.py:22
void SetFluctModel(G4VEmFluctuationModel *)
int G4int
Definition: G4Types.hh:78
const G4String & GetParticleName() const
static G4KaonMinus * KaonMinus()
Definition: G4KaonMinus.cc:113
void SetHighEnergyLimit(G4double)
Definition: G4VEmModel.hh:732
void AddEmModel(G4int, G4VEmModel *, G4VEmFluctuationModel *fluc=0, const G4Region *region=nullptr)
G4VEmFluctuationModel * FluctModel()
static G4AntiProton * AntiProton()
Definition: G4AntiProton.cc:93
static G4Proton * Proton()
Definition: G4Proton.cc:93
float proton_mass_c2
Definition: hepunit.py:275
void SetMaxKinEnergy(G4double e)
float electron_mass_c2
Definition: hepunit.py:274
G4double MinKinEnergy() const
string pname
Definition: eplot.py:33
static const G4double emax
G4double GetPDGMass() const
int G4lrint(double ad)
Definition: templates.hh:163
T max(const T t1, const T t2)
brief Return the largest of the two arguments
static G4EmParameters * Instance()
void SetEmModel(G4VEmModel *, G4int index=1)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4double GetPDGSpin() const
static constexpr double MeV
Definition: G4SIunits.hh:214
double G4double
Definition: G4Types.hh:76
void SetLowEnergyLimit(G4double)
Definition: G4VEmModel.hh:739
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113
G4double GetPDGCharge() const
void SetBaseParticle(const G4ParticleDefinition *p)
G4VEmModel * EmModel(G4int index=1) const
void SetDEDXBinning(G4int nbins)
void SetMinKinEnergy(G4double e)

Here is the call graph for this function:

G4bool G4hIonisation::IsApplicable ( const G4ParticleDefinition p)
overridevirtual

Implements G4VEnergyLossProcess.

Definition at line 128 of file G4hIonisation.cc.

129 {
130  return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV &&
131  !p.IsShortLived());
132 }
G4double GetPDGMass() const
static constexpr double MeV
Definition: G4SIunits.hh:214
G4double GetPDGCharge() const

Here is the call graph for this function:

G4double G4hIonisation::MinPrimaryEnergy ( const G4ParticleDefinition p,
const G4Material ,
G4double  cut 
)
finalvirtual

Reimplemented from G4VEnergyLossProcess.

Definition at line 136 of file G4hIonisation.cc.

139 {
140  G4double x = 0.5*cut/electron_mass_c2;
141  G4double gam = x*ratio + std::sqrt((1. + x)*(1. + x*ratio*ratio));
142  return mass*(gam - 1.0);
143 }
tuple x
Definition: test.py:50
float electron_mass_c2
Definition: hepunit.py:274
double G4double
Definition: G4Types.hh:76
void G4hIonisation::PrintInfo ( )
finalvirtual

Implements G4VEnergyLossProcess.

Definition at line 222 of file G4hIonisation.cc.

223 {}

The documentation for this class was generated from the following files: