Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VEmProcess Class Referenceabstract

#include <G4VEmProcess.hh>

+ Inheritance diagram for G4VEmProcess:

Public Member Functions

 G4VEmProcess (const G4String &name, G4ProcessType type=fElectromagnetic)
 
virtual ~G4VEmProcess ()
 
virtual G4bool IsApplicable (const G4ParticleDefinition &p)=0
 
virtual void PrintInfo ()=0
 
void PreparePhysicsTable (const G4ParticleDefinition &)
 
void BuildPhysicsTable (const G4ParticleDefinition &)
 
void PrintInfoDefinition ()
 
void StartTracking (G4Track *)
 
G4double PostStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
 
G4VParticleChangePostStepDoIt (const G4Track &, const G4Step &)
 
G4bool StorePhysicsTable (const G4ParticleDefinition *, const G4String &directory, G4bool ascii=false)
 
G4bool RetrievePhysicsTable (const G4ParticleDefinition *, const G4String &directory, G4bool ascii)
 
G4double CrossSectionPerVolume (G4double kineticEnergy, const G4MaterialCutsCouple *couple)
 
G4double ComputeCrossSectionPerAtom (G4double kineticEnergy, G4double Z, G4double A=0., G4double cut=0.0)
 
G4double MeanFreePath (const G4Track &track)
 
G4double GetLambda (G4double &kinEnergy, const G4MaterialCutsCouple *couple)
 
void SetLambdaBinning (G4int nbins)
 
G4int LambdaBinning () const
 
void SetMinKinEnergy (G4double e)
 
G4double MinKinEnergy () const
 
void SetMaxKinEnergy (G4double e)
 
G4double MaxKinEnergy () const
 
void SetMinKinEnergyPrim (G4double e)
 
const G4PhysicsTableLambdaTable () const
 
const G4ParticleDefinitionParticle () const
 
const G4ParticleDefinitionSecondaryParticle () const
 
G4VEmModelSelectModelForMaterial (G4double kinEnergy, size_t &idxRegion) const
 
void AddEmModel (G4int, G4VEmModel *, const G4Region *region=0)
 
void SetModel (G4VEmModel *, G4int index=1)
 
G4VEmModelModel (G4int index=1)
 
G4VEmModelEmModel (G4int index=1)
 
void SetEmModel (G4VEmModel *, G4int index=1)
 
void UpdateEmModel (const G4String &, G4double, G4double)
 
G4VEmModelGetModelByIndex (G4int idx=0, G4bool ver=false)
 
const G4ElementGetCurrentElement () const
 
void SetCrossSectionBiasingFactor (G4double f, G4bool flag=true)
 
G4double CrossSectionBiasingFactor () const
 
void ActivateForcedInteraction (G4double length=0.0, const G4String &r="", G4bool flag=true)
 
void ActivateSecondaryBiasing (const G4String &region, G4double factor, G4double energyLimit)
 
void SetPolarAngleLimit (G4double a)
 
G4double PolarAngleLimit () const
 
void SetLambdaFactor (G4double val)
 
void SetIntegral (G4bool val)
 
G4bool IsIntegral () const
 
void SetApplyCuts (G4bool val)
 
void SetBuildTableFlag (G4bool val)
 
- Public Member Functions inherited from G4VDiscreteProcess
 G4VDiscreteProcess (const G4String &, G4ProcessType aType=fNotDefined)
 
 G4VDiscreteProcess (G4VDiscreteProcess &)
 
virtual ~G4VDiscreteProcess ()
 
virtual G4double PostStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
 
virtual G4VParticleChangePostStepDoIt (const G4Track &, const G4Step &)
 
virtual G4double AlongStepGetPhysicalInteractionLength (const G4Track &, G4double, G4double, G4double &, G4GPILSelection *)
 
virtual G4double AtRestGetPhysicalInteractionLength (const G4Track &, G4ForceCondition *)
 
virtual G4VParticleChangeAtRestDoIt (const G4Track &, const G4Step &)
 
virtual G4VParticleChangeAlongStepDoIt (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
 
virtual G4VParticleChangePostStepDoIt (const G4Track &track, const G4Step &stepData)=0
 
virtual G4VParticleChangeAlongStepDoIt (const G4Track &track, const G4Step &stepData)=0
 
virtual G4VParticleChangeAtRestDoIt (const G4Track &track, const G4Step &stepData)=0
 
virtual G4double AlongStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)=0
 
virtual G4double AtRestGetPhysicalInteractionLength (const G4Track &track, G4ForceCondition *condition)=0
 
virtual G4double PostStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)=0
 
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)
 
virtual G4bool IsApplicable (const G4ParticleDefinition &)
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
virtual void PreparePhysicsTable (const G4ParticleDefinition &)
 
virtual G4bool StorePhysicsTable (const G4ParticleDefinition *, const G4String &, G4bool)
 
virtual G4bool RetrievePhysicsTable (const G4ParticleDefinition *, const G4String &, G4bool)
 
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 StartTracking (G4Track *)
 
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
 

Protected Member Functions

virtual void InitialiseProcess (const G4ParticleDefinition *)=0
 
virtual G4double MinPrimaryEnergy (const G4ParticleDefinition *, const G4Material *)
 
G4VEmModelSelectModel (G4double &kinEnergy, size_t index)
 
G4double GetMeanFreePath (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
 
G4PhysicsVectorLambdaPhysicsVector (const G4MaterialCutsCouple *)
 
G4double RecalculateLambda (G4double kinEnergy, const G4MaterialCutsCouple *couple)
 
G4ParticleChangeForGammaGetParticleChange ()
 
void SetParticle (const G4ParticleDefinition *p)
 
void SetSecondaryParticle (const G4ParticleDefinition *p)
 
size_t CurrentMaterialCutsCoupleIndex () const
 
G4double GetGammaEnergyCut ()
 
G4double GetElectronEnergyCut ()
 
void SetStartFromNullFlag (G4bool val)
 
void SetSplineFlag (G4bool val)
 
virtual G4double GetMeanFreePath (const G4Track &aTrack, G4double previousStepSize, G4ForceCondition *condition)=0
 
- Protected Member Functions inherited from G4VProcess
void SubtractNumberOfInteractionLengthLeft (G4double previousStepSize)
 
void ClearNumberOfInteractionLengthLeft ()
 

Protected Attributes

G4ParticleChangeForGamma 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
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VProcess
static const G4StringGetProcessTypeName (G4ProcessType)
 

Detailed Description

Definition at line 91 of file G4VEmProcess.hh.

Constructor & Destructor Documentation

◆ G4VEmProcess()

G4VEmProcess::G4VEmProcess ( const G4String name,
G4ProcessType  type = fElectromagnetic 
)

Definition at line 89 of file G4VEmProcess.cc.

89 :
90 G4VDiscreteProcess(name, type),
91 secondaryParticle(0),
92 buildLambdaTable(true),
93 numberOfModels(0),
94 theLambdaTable(0),
95 theLambdaTablePrim(0),
96 theDensityFactor(0),
97 theDensityIdx(0),
98 integral(false),
99 applyCuts(false),
100 startFromNull(false),
101 splineFlag(true),
102 currentModel(0),
103 particle(0),
104 currentParticle(0),
105 currentCouple(0)
106{
108
109 // Size of tables assuming spline
110 minKinEnergy = 0.1*keV;
111 maxKinEnergy = 10.0*TeV;
112 nLambdaBins = 77;
113 minKinEnergyPrim = DBL_MAX;
114
115 // default lambda factor
116 lambdaFactor = 0.8;
117
118 // default limit on polar angle
119 polarAngleLimit = 0.0;
120 biasFactor = 1.0;
121
122 // particle types
123 theGamma = G4Gamma::Gamma();
124 theElectron = G4Electron::Electron();
125 thePositron = G4Positron::Positron();
126
128 secParticles.reserve(5);
129
130 preStepLambda = 0.0;
131 mfpKinEnergy = DBL_MAX;
132
133 modelManager = new G4EmModelManager();
134 biasManager = 0;
135 biasFlag = false;
136 weightFlag = false;
137 (G4LossTableManager::Instance())->Register(this);
138 warn = 0;
139}
static G4Electron * Electron()
Definition: G4Electron.cc:94
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
static G4LossTableManager * Instance()
static G4Positron * Positron()
Definition: G4Positron.cc:94
G4ParticleChangeForGamma fParticleChange
void SetVerboseLevel(G4int value)
Definition: G4VProcess.hh:408
G4VParticleChange * pParticleChange
Definition: G4VProcess.hh:283
#define DBL_MAX
Definition: templates.hh:83

◆ ~G4VEmProcess()

G4VEmProcess::~G4VEmProcess ( )
virtual

Definition at line 143 of file G4VEmProcess.cc.

144{
145 if(1 < verboseLevel) {
146 G4cout << "G4VEmProcess destruct " << GetProcessName()
147 << " " << this << " " << theLambdaTable <<G4endl;
148 }
149 Clear();
150 if(theLambdaTable) {
151 theLambdaTable->clearAndDestroy();
152 delete theLambdaTable;
153 }
154 if(theLambdaTablePrim) {
155 theLambdaTablePrim->clearAndDestroy();
156 delete theLambdaTablePrim;
157 }
158 delete modelManager;
159 delete biasManager;
160 (G4LossTableManager::Instance())->DeRegister(this);
161}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
void clearAndDestroy()
G4int verboseLevel
Definition: G4VProcess.hh:368
const G4String & GetProcessName() const
Definition: G4VProcess.hh:379

Member Function Documentation

◆ ActivateForcedInteraction()

void G4VEmProcess::ActivateForcedInteraction ( G4double  length = 0.0,
const G4String r = "",
G4bool  flag = true 
)

Definition at line 1046 of file G4VEmProcess.cc.

1048{
1049 if(!biasManager) { biasManager = new G4EmBiasingManager(); }
1050 if(1 < verboseLevel) {
1051 G4cout << "### ActivateForcedInteraction: for "
1052 << particle->GetParticleName()
1053 << " and process " << GetProcessName()
1054 << " length(mm)= " << length/mm
1055 << " in G4Region <" << r
1056 << "> weightFlag= " << flag
1057 << G4endl;
1058 }
1059 weightFlag = flag;
1060 biasManager->ActivateForcedInteraction(length, r);
1061}
void ActivateForcedInteraction(G4double length=0.0, const G4String &r="")
const G4String & GetParticleName() const

Referenced by G4EmProcessOptions::ActivateForcedInteraction().

◆ ActivateSecondaryBiasing()

void G4VEmProcess::ActivateSecondaryBiasing ( const G4String region,
G4double  factor,
G4double  energyLimit 
)

Definition at line 1066 of file G4VEmProcess.cc.

1069{
1070 if (0.0 <= factor) {
1071
1072 // Range cut can be applied only for e-
1073 if(0.0 == factor && secondaryParticle != G4Electron::Electron())
1074 { return; }
1075
1076 if(!biasManager) { biasManager = new G4EmBiasingManager(); }
1077 biasManager->ActivateSecondaryBiasing(region, factor, energyLimit);
1078 if(1 < verboseLevel) {
1079 G4cout << "### ActivateSecondaryBiasing: for "
1080 << " process " << GetProcessName()
1081 << " factor= " << factor
1082 << " in G4Region <" << region
1083 << "> energyLimit(MeV)= " << energyLimit/MeV
1084 << G4endl;
1085 }
1086 }
1087}
void ActivateSecondaryBiasing(const G4String &region, G4double factor, G4double energyLimit)

Referenced by G4EmProcessOptions::ActivateSecondaryBiasingForGamma().

◆ AddEmModel()

void G4VEmProcess::AddEmModel ( G4int  order,
G4VEmModel p,
const G4Region region = 0 
)

Definition at line 182 of file G4VEmProcess.cc.

184{
185 G4VEmFluctuationModel* fm = 0;
186 modelManager->AddEmModel(order, p, fm, region);
188}
void AddEmModel(G4int, G4VEmModel *, G4VEmFluctuationModel *, const G4Region *)
void SetParticleChange(G4VParticleChange *, G4VEmFluctuationModel *f=0)
Definition: G4VEmModel.cc:318

Referenced by G4EmDNAPhysics::ConstructProcess(), G4EmDNAPhysicsChemistry::ConstructProcess(), G4EmLivermorePolarizedPhysics::ConstructProcess(), G4EmLowEPPhysics::ConstructProcess(), G4EmPenelopePhysics::ConstructProcess(), G4EmStandardPhysics_option4::ConstructProcess(), G4DNAAttachment::InitialiseProcess(), G4DNAChargeDecrease::InitialiseProcess(), G4DNAChargeIncrease::InitialiseProcess(), G4DNAElastic::InitialiseProcess(), G4DNAElectronSolvatation::InitialiseProcess(), G4DNAExcitation::InitialiseProcess(), G4DNAIonisation::InitialiseProcess(), G4DNAVibExcitation::InitialiseProcess(), G4eeToHadrons::InitialiseProcess(), G4MuElecElastic::InitialiseProcess(), G4MuElecInelastic::InitialiseProcess(), G4RayleighScattering::InitialiseProcess(), G4eplusPolarizedAnnihilation::InitialiseProcess(), G4PolarizedCompton::InitialiseProcess(), G4PolarizedGammaConversion::InitialiseProcess(), G4PolarizedPhotoElectricEffect::InitialiseProcess(), G4ComptonScattering::InitialiseProcess(), G4CoulombScattering::InitialiseProcess(), G4eplusAnnihilation::InitialiseProcess(), G4GammaConversion::InitialiseProcess(), G4NuclearStopping::InitialiseProcess(), G4PhotoElectricEffect::InitialiseProcess(), and G4EmConfigurator::PrepareModels().

◆ BuildPhysicsTable()

void G4VEmProcess::BuildPhysicsTable ( const G4ParticleDefinition part)
virtual

Reimplemented from G4VProcess.

Definition at line 336 of file G4VEmProcess.cc.

337{
338 G4String num = part.GetParticleName();
339 if(1 < verboseLevel) {
340 G4cout << "G4VEmProcess::BuildPhysicsTable() for "
341 << GetProcessName()
342 << " and particle " << num
343 << " buildLambdaTable= " << buildLambdaTable
344 << G4endl;
345 }
346
348
349 if(buildLambdaTable || minKinEnergyPrim < maxKinEnergy) {
350 BuildLambdaTable();
351 }
352
353 // explicitly defined printout by particle name
354 if(1 < verboseLevel ||
355 (0 < verboseLevel && (num == "gamma" || num == "e-" ||
356 num == "e+" || num == "mu+" ||
357 num == "mu-" || num == "proton"||
358 num == "pi+" || num == "pi-" ||
359 num == "kaon+" || num == "kaon-" ||
360 num == "alpha" || num == "anti_proton" ||
361 num == "GenericIon")))
362 {
363 particle = &part;
365 }
366
367 if(1 < verboseLevel) {
368 G4cout << "G4VEmProcess::BuildPhysicsTable() done for "
369 << GetProcessName()
370 << " and particle " << num
371 << G4endl;
372 }
373}
void PrintInfoDefinition()
void BuildPhysicsTable(const G4ParticleDefinition &)

Referenced by G4eplusPolarizedAnnihilation::BuildPhysicsTable(), G4PolarizedCompton::BuildPhysicsTable(), and BuildPhysicsTable().

◆ ComputeCrossSectionPerAtom()

G4double G4VEmProcess::ComputeCrossSectionPerAtom ( G4double  kineticEnergy,
G4double  Z,
G4double  A = 0.,
G4double  cut = 0.0 
)

Definition at line 942 of file G4VEmProcess.cc.

944{
945 SelectModel(kineticEnergy, currentCoupleIndex);
946 G4double x = 0.0;
947 if(currentModel) {
948 x = currentModel->ComputeCrossSectionPerAtom(currentParticle,kineticEnergy,
949 Z,A,cut);
950 }
951 return x;
952}
double G4double
Definition: G4Types.hh:64
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0., G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
Definition: G4VEmModel.cc:240
G4VEmModel * SelectModel(G4double &kinEnergy, size_t index)

◆ CrossSectionBiasingFactor()

G4double G4VEmProcess::CrossSectionBiasingFactor ( ) const
inline

Definition at line 590 of file G4VEmProcess.hh.

591{
592 return biasFactor;
593}

◆ CrossSectionPerVolume()

G4double G4VEmProcess::CrossSectionPerVolume ( G4double  kineticEnergy,
const G4MaterialCutsCouple couple 
)

Definition at line 899 of file G4VEmProcess.cc.

901{
902 // Cross section per atom is calculated
903 DefineMaterial(couple);
904 G4double cross = 0.0;
905 if(theLambdaTable) {
906 cross = (*theDensityFactor)[currentCoupleIndex]*
907 (((*theLambdaTable)[basedCoupleIndex])->Value(kineticEnergy));
908 } else {
909 SelectModel(kineticEnergy, currentCoupleIndex);
910 cross = currentModel->CrossSectionPerVolume(currentMaterial,
911 currentParticle,kineticEnergy);
912 }
913
914 if(cross < 0.0) { cross = 0.0; }
915 return cross;
916}
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
Definition: G4VEmModel.cc:186

◆ CurrentMaterialCutsCoupleIndex()

size_t G4VEmProcess::CurrentMaterialCutsCoupleIndex ( ) const
inlineprotected

◆ EmModel()

◆ GetCurrentElement()

const G4Element * G4VEmProcess::GetCurrentElement ( ) const

Definition at line 1019 of file G4VEmProcess.cc.

1020{
1021 const G4Element* elm = 0;
1022 if(currentModel) {elm = currentModel->GetCurrentElement(); }
1023 return elm;
1024}
const G4Element * GetCurrentElement() const
Definition: G4VEmModel.hh:391

◆ GetElectronEnergyCut()

G4double G4VEmProcess::GetElectronEnergyCut ( )
inlineprotected

Definition at line 418 of file G4VEmProcess.hh.

419{
420 return (*theCutsElectron)[currentCoupleIndex];
421}

◆ GetGammaEnergyCut()

G4double G4VEmProcess::GetGammaEnergyCut ( )
inlineprotected

Definition at line 411 of file G4VEmProcess.hh.

412{
413 return (*theCutsGamma)[currentCoupleIndex];
414}

◆ GetLambda()

G4double G4VEmProcess::GetLambda ( G4double kinEnergy,
const G4MaterialCutsCouple couple 
)
inline

Definition at line 496 of file G4VEmProcess.hh.

498{
499 DefineMaterial(couple);
500 SelectModel(kinEnergy, currentCoupleIndex);
501 return GetCurrentLambda(kinEnergy);
502}

Referenced by PostStepDoIt(), and G4AdjointComptonModel::RapidSampleSecondaries().

◆ GetMeanFreePath()

G4double G4VEmProcess::GetMeanFreePath ( const G4Track track,
G4double  previousStepSize,
G4ForceCondition condition 
)
protectedvirtual

Implements G4VDiscreteProcess.

Definition at line 920 of file G4VEmProcess.cc.

923{
925 return G4VEmProcess::MeanFreePath(track);
926}
G4double condition(const G4ErrorSymMatrix &m)
@ NotForced
G4double MeanFreePath(const G4Track &track)

Referenced by G4PolarizedCompton::GetMeanFreePath(), and G4eplusPolarizedAnnihilation::GetMeanFreePath().

◆ GetModelByIndex()

G4VEmModel * G4VEmProcess::GetModelByIndex ( G4int  idx = 0,
G4bool  ver = false 
)

Definition at line 247 of file G4VEmProcess.cc.

248{
249 return modelManager->GetModel(idx, ver);
250}
G4VEmModel * GetModel(G4int, G4bool ver=false)

◆ GetParticleChange()

G4ParticleChangeForGamma * G4VEmProcess::GetParticleChange ( )
inlineprotected

Definition at line 653 of file G4VEmProcess.hh.

654{
655 return &fParticleChange;
656}

◆ InitialiseProcess()

◆ IsApplicable()

◆ IsIntegral()

G4bool G4VEmProcess::IsIntegral ( ) const
inline

Definition at line 632 of file G4VEmProcess.hh.

633{
634 return integral;
635}

◆ LambdaBinning()

G4int G4VEmProcess::LambdaBinning ( ) const
inline

Definition at line 546 of file G4VEmProcess.hh.

547{
548 return nLambdaBins;
549}

Referenced by G4eplusPolarizedAnnihilation::BuildAsymmetryTable(), and G4PolarizedCompton::BuildAsymmetryTable().

◆ LambdaPhysicsVector()

G4PhysicsVector * G4VEmProcess::LambdaPhysicsVector ( const G4MaterialCutsCouple )
protected

Definition at line 1009 of file G4VEmProcess.cc.

1010{
1011 G4PhysicsVector* v =
1012 new G4PhysicsLogVector(minKinEnergy, maxKinEnergy, nLambdaBins);
1013 v->SetSpline((G4LossTableManager::Instance())->SplineFlag());
1014 return v;
1015}
void SetSpline(G4bool)

Referenced by G4eplusPolarizedAnnihilation::BuildAsymmetryTable(), and G4PolarizedCompton::BuildAsymmetryTable().

◆ LambdaTable()

const G4PhysicsTable * G4VEmProcess::LambdaTable ( ) const
inline

Definition at line 597 of file G4VEmProcess.hh.

598{
599 return theLambdaTable;
600}

◆ MaxKinEnergy()

◆ MeanFreePath()

G4double G4VEmProcess::MeanFreePath ( const G4Track track)

Definition at line 930 of file G4VEmProcess.cc.

931{
932 DefineMaterial(track.GetMaterialCutsCouple());
933 preStepLambda = GetCurrentLambda(track.GetKineticEnergy());
934 G4double x = DBL_MAX;
935 if(0.0 < preStepLambda) { x = 1.0/preStepLambda; }
936 return x;
937}
G4double GetKineticEnergy() const
const G4MaterialCutsCouple * GetMaterialCutsCouple() const

Referenced by GetMeanFreePath().

◆ MinKinEnergy()

◆ MinPrimaryEnergy()

G4double G4VEmProcess::MinPrimaryEnergy ( const G4ParticleDefinition ,
const G4Material  
)
protectedvirtual

Reimplemented in G4CoulombScattering, and G4GammaConversion.

Definition at line 174 of file G4VEmProcess.cc.

176{
177 return 0.0;
178}

◆ Model()

G4VEmModel * G4VEmProcess::Model ( G4int  index = 1)

Definition at line 207 of file G4VEmProcess.cc.

208{
209 if(warn < 10) {
210 G4cout << "### G4VEmProcess::Model is obsolete method and will be "
211 << "removed for the next release." << G4endl;
212 G4cout << " Please, use EmModel" << G4endl;
213 }
214 G4VEmModel* p = 0;
215 if(index >= 0 && index < G4int(emModels.size())) { p = emModels[index]; }
216 return p;
217}

Referenced by G4MuElecElastic::InitialiseProcess(), G4MuElecInelastic::InitialiseProcess(), G4MuElecElastic::PrintInfo(), and G4MuElecInelastic::PrintInfo().

◆ Particle()

const G4ParticleDefinition * G4VEmProcess::Particle ( ) const
inline

Definition at line 604 of file G4VEmProcess.hh.

605{
606 return particle;
607}

◆ PolarAngleLimit()

G4double G4VEmProcess::PolarAngleLimit ( ) const
inline

Definition at line 583 of file G4VEmProcess.hh.

584{
585 return polarAngleLimit;
586}

Referenced by G4CoulombScattering::InitialiseProcess(), G4CoulombScattering::MinPrimaryEnergy(), and G4CoulombScattering::PrintInfo().

◆ PostStepDoIt()

G4VParticleChange * G4VEmProcess::PostStepDoIt ( const G4Track track,
const G4Step step 
)
virtual

Reimplemented from G4VDiscreteProcess.

Definition at line 632 of file G4VEmProcess.cc.

634{
635 // In all cases clear number of interaction lengths
637 mfpKinEnergy = DBL_MAX;
638
640
641 // Do not make anything if particle is stopped, the annihilation then
642 // should be performed by the AtRestDoIt!
643 if (track.GetTrackStatus() == fStopButAlive) { return &fParticleChange; }
644
645 G4double finalT = track.GetKineticEnergy();
646
647 // forced process - should happen only once per track
648 if(biasFlag) {
649 if(biasManager->ForcedInteractionRegion(currentCoupleIndex)) {
650 biasFlag = false;
651 }
652 }
653
654 // Integral approach
655 if (integral) {
656 G4double lx = GetLambda(finalT, currentCouple);
657 if(preStepLambda<lx && 1 < verboseLevel) {
658 G4cout << "WARNING: for " << currentParticle->GetParticleName()
659 << " and " << GetProcessName()
660 << " E(MeV)= " << finalT/MeV
661 << " preLambda= " << preStepLambda << " < "
662 << lx << " (postLambda) "
663 << G4endl;
664 }
665
666 if(preStepLambda*G4UniformRand() > lx) {
668 return &fParticleChange;
669 }
670 }
671
672 SelectModel(finalT, currentCoupleIndex);
673 if(!currentModel->IsActive(finalT)) { return &fParticleChange; }
674
675 // define new weight for primary and secondaries
677 if(weightFlag) {
678 weight /= biasFactor;
680 }
681
682 /*
683 if(0 < verboseLevel) {
684 G4cout << "G4VEmProcess::PostStepDoIt: Sample secondary; E= "
685 << finalT/MeV
686 << " MeV; model= (" << currentModel->LowEnergyLimit()
687 << ", " << currentModel->HighEnergyLimit() << ")"
688 << G4endl;
689 }
690 */
691
692 // sample secondaries
693 secParticles.clear();
694 currentModel->SampleSecondaries(&secParticles,
695 currentCouple,
696 track.GetDynamicParticle(),
697 (*theCuts)[currentCoupleIndex]);
698
699 // bremsstrahlung splitting or Russian roulette
700 if(biasManager) {
701 if(biasManager->SecondaryBiasingRegion(currentCoupleIndex)) {
702 G4double eloss = 0.0;
703 weight *= biasManager->ApplySecondaryBiasing(secParticles,
704 track, currentModel,
706 eloss, currentCoupleIndex,
707 (*theCuts)[currentCoupleIndex],
708 step.GetPostStepPoint()->GetSafety());
709 if(eloss > 0.0) {
712 }
713 }
714 }
715
716 // save secondaries
717 G4int num = secParticles.size();
718 if(num > 0) {
719
722
723 for (G4int i=0; i<num; ++i) {
724 if (secParticles[i]) {
725 G4DynamicParticle* dp = secParticles[i];
727 G4double e = dp->GetKineticEnergy();
728 G4bool good = true;
729 if(applyCuts) {
730 if (p == theGamma) {
731 if (e < (*theCutsGamma)[currentCoupleIndex]) { good = false; }
732
733 } else if (p == theElectron) {
734 if (e < (*theCutsElectron)[currentCoupleIndex]) { good = false; }
735
736 } else if (p == thePositron) {
737 if (electron_mass_c2 < (*theCutsGamma)[currentCoupleIndex] &&
738 e < (*theCutsPositron)[currentCoupleIndex]) {
739 good = false;
740 e += 2.0*electron_mass_c2;
741 }
742 }
743 // added secondary if it is good
744 }
745 if (good) {
746 G4Track* t = new G4Track(dp, track.GetGlobalTime(), track.GetPosition());
748 t->SetWeight(weight);
750 //G4cout << "Secondary(post step) has weight " << t->GetWeight()
751 // << ", Ekin= " << t->GetKineticEnergy()/MeV << " MeV" <<G4endl;
752 } else {
753 delete dp;
754 edep += e;
755 }
756 }
757 }
759 }
760
763 if(particle->GetProcessManager()->GetAtRestProcessVector()->size() > 0)
766 }
767
768 // ClearNumberOfInteractionLengthLeft();
769 return &fParticleChange;
770}
@ fAlive
@ fStopAndKill
@ fStopButAlive
bool G4bool
Definition: G4Types.hh:67
#define G4UniformRand()
Definition: Randomize.hh:53
const G4ParticleDefinition * GetParticleDefinition() const
G4double GetKineticEnergy() const
G4bool ForcedInteractionRegion(G4int coupleIdx)
G4double ApplySecondaryBiasing(std::vector< G4DynamicParticle * > &, const G4Track &track, G4VEmModel *currentModel, G4ParticleChangeForGamma *pParticleChange, G4double &eloss, G4int coupleIdx, G4double tcut, G4double safety=0.0)
G4bool SecondaryBiasingRegion(G4int coupleIdx)
void InitializeForPostStep(const G4Track &)
G4ProcessManager * GetProcessManager() const
G4ProcessVector * GetAtRestProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const
G4int size() const
G4double GetSafety() const
G4StepPoint * GetPostStepPoint() const
G4TrackStatus GetTrackStatus() const
void SetWeight(G4double aValue)
const G4ThreeVector & GetPosition() const
void SetTouchableHandle(const G4TouchableHandle &apValue)
G4double GetGlobalTime() const
const G4DynamicParticle * GetDynamicParticle() const
const G4TouchableHandle & GetTouchableHandle() const
G4bool IsActive(G4double kinEnergy)
Definition: G4VEmModel.hh:613
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin=0.0, G4double tmax=DBL_MAX)=0
G4double GetLambda(G4double &kinEnergy, const G4MaterialCutsCouple *couple)
G4double GetParentWeight() const
void ProposeTrackStatus(G4TrackStatus status)
void ProposeWeight(G4double finalWeight)
G4double GetLocalEnergyDeposit() const
void AddSecondary(G4Track *aSecondary)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
void SetNumberOfSecondaries(G4int totSecondaries)
G4TrackStatus GetTrackStatus() const
void ClearNumberOfInteractionLengthLeft()
Definition: G4VProcess.hh:418
G4double theNumberOfInteractionLengthLeft
Definition: G4VProcess.hh:293

◆ PostStepGetPhysicalInteractionLength()

G4double G4VEmProcess::PostStepGetPhysicalInteractionLength ( const G4Track track,
G4double  previousStepSize,
G4ForceCondition condition 
)
virtual

Reimplemented from G4VDiscreteProcess.

Definition at line 557 of file G4VEmProcess.cc.

561{
563 G4double x = DBL_MAX;
564
565 preStepKinEnergy = track.GetKineticEnergy();
566 DefineMaterial(track.GetMaterialCutsCouple());
567 SelectModel(preStepKinEnergy, currentCoupleIndex);
568
569 if(!currentModel->IsActive(preStepKinEnergy)) { return x; }
570
571 // forced biasing only for primary particles
572 if(biasManager) {
573 if(0 == track.GetParentID()) {
574 if(biasFlag && biasManager->ForcedInteractionRegion(currentCoupleIndex)) {
575 return biasManager->GetStepLimit(currentCoupleIndex, previousStepSize);
576 }
577 }
578 }
579
580 // compute mean free path
581 if(preStepKinEnergy < mfpKinEnergy) {
582 if (integral) { ComputeIntegralLambda(preStepKinEnergy); }
583 else { preStepLambda = GetCurrentLambda(preStepKinEnergy); }
584
585 // zero cross section
586 if(preStepLambda <= 0.0) {
589 }
590 }
591
592 // non-zero cross section
593 if(preStepLambda > 0.0) {
594
596
597 // beggining of tracking (or just after DoIt of this process)
599
600 } else if(currentInteractionLength < DBL_MAX) {
601
602 // subtract NumberOfInteractionLengthLeft using previous step
604 //SubtractNumberOfInteractionLengthLeft(previousStepSize);
607 //theNumberOfInteractionLengthLeft = perMillion;
608 }
609 }
610
611 // new mean free path and step limit for the next step
612 currentInteractionLength = 1.0/preStepLambda;
614#ifdef G4VERBOSE
615 if (verboseLevel>2){
616 G4cout << "G4VEmProcess::PostStepGetPhysicalInteractionLength ";
617 G4cout << "[ " << GetProcessName() << "]" << G4endl;
618 G4cout << " for " << currentParticle->GetParticleName()
619 << " in Material " << currentMaterial->GetName()
620 << " Ekin(MeV)= " << preStepKinEnergy/MeV
621 <<G4endl;
622 G4cout << " MeanFreePath = " << currentInteractionLength/cm << "[cm]"
623 << " InteractionLength= " << x/cm <<"[cm] " <<G4endl;
624 }
625#endif
626 }
627 return x;
628}
G4double GetStepLimit(G4int coupleIdx, G4double previousStep)
const G4String & GetName() const
Definition: G4Material.hh:177
G4int GetParentID() const
G4double currentInteractionLength
Definition: G4VProcess.hh:297
virtual void ResetNumberOfInteractionLengthLeft()
Definition: G4VProcess.cc:92

Referenced by G4eplusPolarizedAnnihilation::PostStepGetPhysicalInteractionLength(), and G4PolarizedCompton::PostStepGetPhysicalInteractionLength().

◆ PreparePhysicsTable()

void G4VEmProcess::PreparePhysicsTable ( const G4ParticleDefinition part)
virtual

Reimplemented from G4VProcess.

Definition at line 254 of file G4VEmProcess.cc.

255{
256 if(!particle) { SetParticle(&part); }
257
258 if(part.GetParticleType() == "nucleus" &&
259 part.GetParticleSubType() == "generic") {
260
261 G4String pname = part.GetParticleName();
262 if(pname != "deuteron" && pname != "triton" &&
263 pname != "alpha" && pname != "He3" &&
264 pname != "alpha+" && pname != "helium" &&
265 pname != "hydrogen") {
266
267 particle = G4GenericIon::GenericIon();
268 }
269 }
270
271 if(1 < verboseLevel) {
272 G4cout << "G4VEmProcess::PreparePhysicsTable() for "
273 << GetProcessName()
274 << " and particle " << part.GetParticleName()
275 << " local particle " << particle->GetParticleName()
276 << G4endl;
277 }
278
281
282 man->PreparePhysicsTable(&part, this);
283
284 if(particle == &part) {
285 Clear();
286 InitialiseProcess(particle);
287
288 const G4ProductionCutsTable* theCoupleTable=
290 size_t n = theCoupleTable->GetTableSize();
291
292 theEnergyOfCrossSectionMax.resize(n, 0.0);
293 theCrossSectionMax.resize(n, DBL_MAX);
294
295 // initialisation of models
296 numberOfModels = modelManager->NumberOfModels();
297 for(G4int i=0; i<numberOfModels; ++i) {
298 G4VEmModel* mod = modelManager->GetModel(i);
299 if(0 == i) { currentModel = mod; }
300 mod->SetPolarAngleLimit(polarAngleLimit);
301 if(mod->HighEnergyLimit() > maxKinEnergy) {
302 mod->SetHighEnergyLimit(maxKinEnergy);
303 }
304 }
305
306 if(man->AtomDeexcitation()) { modelManager->SetFluoFlag(true); }
307 theCuts = modelManager->Initialise(particle,secondaryParticle,
308 2.,verboseLevel);
309 theCutsGamma = theCoupleTable->GetEnergyCutsVector(idxG4GammaCut);
310 theCutsElectron = theCoupleTable->GetEnergyCutsVector(idxG4ElectronCut);
311 theCutsPositron = theCoupleTable->GetEnergyCutsVector(idxG4PositronCut);
312
313 // prepare tables
314 if(buildLambdaTable){
315 theLambdaTable = G4PhysicsTableHelper::PreparePhysicsTable(theLambdaTable);
316 bld->InitialiseBaseMaterials(theLambdaTable);
317 }
318 // high energy table
319 if(minKinEnergyPrim < maxKinEnergy){
320 theLambdaTablePrim =
322 bld->InitialiseBaseMaterials(theLambdaTablePrim);
323 }
324 // forced biasing
325 if(biasManager) {
326 biasManager->Initialise(part,GetProcessName(),verboseLevel);
327 biasFlag = false;
328 }
329 }
330 theDensityFactor = bld->GetDensityFactors();
331 theDensityIdx = bld->GetCoupleIndexes();
332}
@ idxG4ElectronCut
@ idxG4GammaCut
@ idxG4PositronCut
void Initialise(const G4ParticleDefinition &part, const G4String &procName, G4int verbose)
G4int NumberOfModels() const
void SetFluoFlag(G4bool val)
const G4DataVector * Initialise(const G4ParticleDefinition *, const G4ParticleDefinition *, G4double, G4int)
static G4GenericIon * GenericIon()
Definition: G4GenericIon.cc:92
const std::vector< G4double > * GetDensityFactors()
void InitialiseBaseMaterials(G4PhysicsTable *table)
const std::vector< G4int > * GetCoupleIndexes()
G4LossTableBuilder * GetTableBuilder()
G4VAtomDeexcitation * AtomDeexcitation()
void PreparePhysicsTable(const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p)
const G4String & GetParticleType() const
const G4String & GetParticleSubType() const
static G4PhysicsTable * PreparePhysicsTable(G4PhysicsTable *physTable)
const std::vector< G4double > * GetEnergyCutsVector(size_t pcIdx) const
static G4ProductionCutsTable * GetProductionCutsTable()
void SetPolarAngleLimit(G4double)
Definition: G4VEmModel.hh:620
void SetHighEnergyLimit(G4double)
Definition: G4VEmModel.hh:585
G4double HighEnergyLimit() const
Definition: G4VEmModel.hh:522
virtual void InitialiseProcess(const G4ParticleDefinition *)=0
void SetParticle(const G4ParticleDefinition *p)

Referenced by G4eplusPolarizedAnnihilation::PreparePhysicsTable(), and G4PolarizedCompton::PreparePhysicsTable().

◆ PrintInfo()

◆ PrintInfoDefinition()

void G4VEmProcess::PrintInfoDefinition ( )

Definition at line 481 of file G4VEmProcess.cc.

482{
483 if(verboseLevel > 0) {
484 G4cout << G4endl << GetProcessName() << ": for "
485 << particle->GetParticleName();
486 if(integral) { G4cout << ", integral: 1 "; }
487 if(applyCuts) { G4cout << ", applyCuts: 1 "; }
488 G4cout << " SubType= " << GetProcessSubType();;
489 if(biasFactor != 1.0) { G4cout << " BiasingFactor= " << biasFactor; }
490 G4cout << G4endl;
491 if(buildLambdaTable) {
492 size_t length = theLambdaTable->length();
493 for(size_t i=0; i<length; ++i) {
494 G4PhysicsVector* v = (*theLambdaTable)[i];
495 if(v) {
496 G4cout << " Lambda table from "
497 << G4BestUnit(minKinEnergy,"Energy")
498 << " to "
499 << G4BestUnit(v->GetMaxEnergy(),"Energy")
500 << " in " << v->GetVectorLength()-1
501 << " bins, spline: "
502 << splineFlag
503 << G4endl;
504 break;
505 }
506 }
507 }
508 if(minKinEnergyPrim < maxKinEnergy) {
509 size_t length = theLambdaTablePrim->length();
510 for(size_t i=0; i<length; ++i) {
511 G4PhysicsVector* v = (*theLambdaTablePrim)[i];
512 if(v) {
513 G4cout << " LambdaPrime table from "
514 << G4BestUnit(minKinEnergyPrim,"Energy")
515 << " to "
516 << G4BestUnit(maxKinEnergy,"Energy")
517 << " in " << v->GetVectorLength()-1
518 << " bins "
519 << G4endl;
520 break;
521 }
522 }
523 }
524 PrintInfo();
525 modelManager->DumpModelList(verboseLevel);
526 }
527
528 if(verboseLevel > 2 && buildLambdaTable) {
529 G4cout << " LambdaTable address= " << theLambdaTable << G4endl;
530 if(theLambdaTable) { G4cout << (*theLambdaTable) << G4endl; }
531 }
532}
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
void DumpModelList(G4int verb)
size_t length() const
size_t GetVectorLength() const
G4double GetMaxEnergy() const
virtual void PrintInfo()=0
G4int GetProcessSubType() const
Definition: G4VProcess.hh:397

Referenced by BuildPhysicsTable().

◆ RecalculateLambda()

G4double G4VEmProcess::RecalculateLambda ( G4double  kinEnergy,
const G4MaterialCutsCouple couple 
)
inlineprotected

Definition at line 507 of file G4VEmProcess.hh.

508{
509 DefineMaterial(couple);
510 SelectModel(e, currentCoupleIndex);
511 return fFactor*ComputeCurrentLambda(e);
512}

◆ RetrievePhysicsTable()

G4bool G4VEmProcess::RetrievePhysicsTable ( const G4ParticleDefinition part,
const G4String directory,
G4bool  ascii 
)
virtual

Reimplemented from G4VProcess.

Definition at line 821 of file G4VEmProcess.cc.

824{
825 if(1 < verboseLevel) {
826 G4cout << "G4VEmProcess::RetrievePhysicsTable() for "
827 << part->GetParticleName() << " and process "
828 << GetProcessName() << G4endl;
829 }
830 G4bool yes = true;
831
832 if((!buildLambdaTable && minKinEnergyPrim > maxKinEnergy)
833 || particle != part) { return yes; }
834
835 const G4String particleName = part->GetParticleName();
836 G4String filename;
837
838 if(buildLambdaTable) {
839 filename = GetPhysicsTableFileName(part,directory,"Lambda",ascii);
841 filename,ascii);
842 if ( yes ) {
843 if (0 < verboseLevel) {
844 G4cout << "Lambda table for " << particleName
845 << " is Retrieved from <"
846 << filename << ">"
847 << G4endl;
848 }
849 if((G4LossTableManager::Instance())->SplineFlag()) {
850 size_t n = theLambdaTable->length();
851 for(size_t i=0; i<n; ++i) {
852 if((* theLambdaTable)[i]) {
853 (* theLambdaTable)[i]->SetSpline(true);
854 }
855 }
856 }
857 } else {
858 if (1 < verboseLevel) {
859 G4cout << "Lambda table for " << particleName << " in file <"
860 << filename << "> is not exist"
861 << G4endl;
862 }
863 }
864 }
865 if(minKinEnergyPrim < maxKinEnergy) {
866 filename = GetPhysicsTableFileName(part,directory,"LambdaPrim",ascii);
867 yes = G4PhysicsTableHelper::RetrievePhysicsTable(theLambdaTablePrim,
868 filename,ascii);
869 if ( yes ) {
870 if (0 < verboseLevel) {
871 G4cout << "Lambda table prim for " << particleName
872 << " is Retrieved from <"
873 << filename << ">"
874 << G4endl;
875 }
876 if((G4LossTableManager::Instance())->SplineFlag()) {
877 size_t n = theLambdaTablePrim->length();
878 for(size_t i=0; i<n; ++i) {
879 if((* theLambdaTablePrim)[i]) {
880 (* theLambdaTablePrim)[i]->SetSpline(true);
881 }
882 }
883 }
884 } else {
885 if (1 < verboseLevel) {
886 G4cout << "Lambda table prim for " << particleName << " in file <"
887 << filename << "> is not exist"
888 << G4endl;
889 }
890 }
891 }
892
893 return yes;
894}
static G4bool RetrievePhysicsTable(G4PhysicsTable *physTable, const G4String &fileName, G4bool ascii)
const G4String & GetPhysicsTableFileName(const G4ParticleDefinition *, const G4String &directory, const G4String &tableName, G4bool ascii=false)
Definition: G4VProcess.cc:214

◆ SecondaryParticle()

const G4ParticleDefinition * G4VEmProcess::SecondaryParticle ( ) const
inline

Definition at line 611 of file G4VEmProcess.hh.

612{
613 return secondaryParticle;
614}

◆ SelectModel()

G4VEmModel * G4VEmProcess::SelectModel ( G4double kinEnergy,
size_t  index 
)
inlineprotected

Definition at line 442 of file G4VEmProcess.hh.

443{
444 if(1 < numberOfModels) {
445 currentModel = modelManager->SelectModel(kinEnergy, index);
446 }
447 currentModel->SetCurrentCouple(currentCouple);
448 return currentModel;
449}
G4VEmModel * SelectModel(G4double &energy, size_t &index)
void SetCurrentCouple(const G4MaterialCutsCouple *)
Definition: G4VEmModel.hh:370

Referenced by G4NuclearStopping::AlongStepDoIt(), ComputeCrossSectionPerAtom(), CrossSectionPerVolume(), GetLambda(), PostStepDoIt(), PostStepGetPhysicalInteractionLength(), and RecalculateLambda().

◆ SelectModelForMaterial()

G4VEmModel * G4VEmProcess::SelectModelForMaterial ( G4double  kinEnergy,
size_t &  idxRegion 
) const
inline

Definition at line 454 of file G4VEmProcess.hh.

456{
457 return modelManager->SelectModel(kinEnergy, idxRegion);
458}

◆ SetApplyCuts()

void G4VEmProcess::SetApplyCuts ( G4bool  val)
inline

Definition at line 639 of file G4VEmProcess.hh.

640{
641 applyCuts = val;
642}

Referenced by G4EmProcessOptions::SetApplyCuts().

◆ SetBuildTableFlag()

◆ SetCrossSectionBiasingFactor()

void G4VEmProcess::SetCrossSectionBiasingFactor ( G4double  f,
G4bool  flag = true 
)

Definition at line 1028 of file G4VEmProcess.cc.

1029{
1030 if(f > 0.0) {
1031 biasFactor = f;
1032 weightFlag = flag;
1033 if(1 < verboseLevel) {
1034 G4cout << "### SetCrossSectionBiasingFactor: for "
1035 << particle->GetParticleName()
1036 << " and process " << GetProcessName()
1037 << " biasFactor= " << f << " weightFlag= " << flag
1038 << G4endl;
1039 }
1040 }
1041}

Referenced by G4EmProcessOptions::SetProcessBiasingFactor().

◆ SetEmModel()

◆ SetIntegral()

void G4VEmProcess::SetIntegral ( G4bool  val)
inline

Definition at line 625 of file G4VEmProcess.hh.

626{
627 if(particle && particle != theGamma) { integral = val; }
628}

Referenced by G4CoulombScattering::G4CoulombScattering(), G4eplusAnnihilation::G4eplusAnnihilation(), and G4eeToHadrons::InitialiseProcess().

◆ SetLambdaBinning()

void G4VEmProcess::SetLambdaBinning ( G4int  nbins)
inline

◆ SetLambdaFactor()

void G4VEmProcess::SetLambdaFactor ( G4double  val)
inline

Definition at line 618 of file G4VEmProcess.hh.

619{
620 if(val > 0.0 && val <= 1.0) { lambdaFactor = val; }
621}

◆ SetMaxKinEnergy()

◆ SetMinKinEnergy()

◆ SetMinKinEnergyPrim()

void G4VEmProcess::SetMinKinEnergyPrim ( G4double  e)
inline

◆ SetModel()

void G4VEmProcess::SetModel ( G4VEmModel p,
G4int  index = 1 
)

Definition at line 192 of file G4VEmProcess.cc.

193{
194 ++warn;
195 if(warn < 10) {
196 G4cout << "### G4VEmProcess::SetModel is obsolete method and will be "
197 << "removed for the next release." << G4endl;
198 G4cout << " Please, use SetEmModel" << G4endl;
199 }
200 G4int n = emModels.size();
201 if(index >= n) { for(G4int i=n; i<=index; ++i) {emModels.push_back(0);} }
202 emModels[index] = p;
203}

Referenced by G4EmDNAPhysicsChemistry::ConstructProcess(), G4MuElecElastic::InitialiseProcess(), and G4MuElecInelastic::InitialiseProcess().

◆ SetParticle()

void G4VEmProcess::SetParticle ( const G4ParticleDefinition p)
inlineprotected

Definition at line 660 of file G4VEmProcess.hh.

661{
662 particle = p;
663 currentParticle = p;
664}

Referenced by G4eeToHadrons::InitialiseProcess(), and PreparePhysicsTable().

◆ SetPolarAngleLimit()

void G4VEmProcess::SetPolarAngleLimit ( G4double  a)
inline

Definition at line 574 of file G4VEmProcess.hh.

575{
576 if(val < 0.0) { polarAngleLimit = 0.0; }
577 else if(val > CLHEP::pi) { polarAngleLimit = CLHEP::pi; }
578 else { polarAngleLimit = val; }
579}

Referenced by G4EmProcessOptions::SetPolarAngleLimit().

◆ SetSecondaryParticle()

◆ SetSplineFlag()

void G4VEmProcess::SetSplineFlag ( G4bool  val)
inlineprotected

◆ SetStartFromNullFlag()

◆ StartTracking()

void G4VEmProcess::StartTracking ( G4Track track)
virtual

Reimplemented from G4VProcess.

Definition at line 536 of file G4VEmProcess.cc.

537{
538 // reset parameters for the new track
539 currentParticle = track->GetParticleDefinition();
541 //currentInteractionLength = -1.0;
542 // theInitialNumberOfInteractionLength=-1.0;
543 mfpKinEnergy = DBL_MAX;
544
545 // forced biasing only for primary particles
546 if(biasManager) {
547 if(0 == track->GetParentID()) {
548 // primary particle
549 biasFlag = true;
550 biasManager->ResetForcedInteraction();
551 }
552 }
553}
const G4ParticleDefinition * GetParticleDefinition() const

◆ StorePhysicsTable()

G4bool G4VEmProcess::StorePhysicsTable ( const G4ParticleDefinition part,
const G4String directory,
G4bool  ascii = false 
)
virtual

Reimplemented from G4VProcess.

Definition at line 774 of file G4VEmProcess.cc.

777{
778 G4bool yes = true;
779
780 if ( theLambdaTable && part == particle) {
781 const G4String name =
782 GetPhysicsTableFileName(part,directory,"Lambda",ascii);
783 yes = theLambdaTable->StorePhysicsTable(name,ascii);
784
785 if ( yes ) {
786 G4cout << "Physics table is stored for " << particle->GetParticleName()
787 << " and process " << GetProcessName()
788 << " in the directory <" << directory
789 << "> " << G4endl;
790 } else {
791 G4cout << "Fail to store Physics Table for "
792 << particle->GetParticleName()
793 << " and process " << GetProcessName()
794 << " in the directory <" << directory
795 << "> " << G4endl;
796 }
797 }
798 if ( theLambdaTablePrim && part == particle) {
799 const G4String name =
800 GetPhysicsTableFileName(part,directory,"LambdaPrim",ascii);
801 yes = theLambdaTablePrim->StorePhysicsTable(name,ascii);
802
803 if ( yes ) {
804 G4cout << "Physics table prim is stored for " << particle->GetParticleName()
805 << " and process " << GetProcessName()
806 << " in the directory <" << directory
807 << "> " << G4endl;
808 } else {
809 G4cout << "Fail to store Physics Table Prim for "
810 << particle->GetParticleName()
811 << " and process " << GetProcessName()
812 << " in the directory <" << directory
813 << "> " << G4endl;
814 }
815 }
816 return yes;
817}
G4bool StorePhysicsTable(const G4String &filename, G4bool ascii=false)

◆ UpdateEmModel()

void G4VEmProcess::UpdateEmModel ( const G4String nam,
G4double  emin,
G4double  emax 
)

Definition at line 239 of file G4VEmProcess.cc.

241{
242 modelManager->UpdateEmModel(nam, emin, emax);
243}
void UpdateEmModel(const G4String &, G4double, G4double)

Member Data Documentation

◆ fParticleChange


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