Geant4 10.7.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) override=0
 
virtual void PrintInfo ()
 
virtual void ProcessDescription (std::ostream &outFile) const override
 
virtual void PreparePhysicsTable (const G4ParticleDefinition &) override
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &) override
 
virtual void StartTracking (G4Track *) override
 
virtual G4double PostStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
 
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
 
virtual G4VEmProcessGetEmProcess (const G4String &name)
 
G4double CrossSectionPerVolume (G4double kineticEnergy, const G4MaterialCutsCouple *couple, G4double logKinEnergy=DBL_MAX)
 
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)
 
G4double GetLambda (G4double kinEnergy, const G4MaterialCutsCouple *couple, G4double logKinEnergy)
 
void SetLambdaBinning (G4int nbins)
 
void SetMinKinEnergy (G4double e)
 
void SetMinKinEnergyPrim (G4double e)
 
void SetMaxKinEnergy (G4double e)
 
G4PhysicsTableLambdaTable () const
 
G4PhysicsTableLambdaTablePrim () const
 
const G4ParticleDefinitionParticle () const
 
const G4ParticleDefinitionSecondaryParticle () const
 
G4VEmModelSelectModelForMaterial (G4double kinEnergy, size_t idxRegion) const
 
void AddEmModel (G4int, G4VEmModel *, const G4Region *region=nullptr)
 
void SetEmModel (G4VEmModel *, G4int index=0)
 
G4VEmModelEmModel (size_t index=0) const
 
void UpdateEmModel (const G4String &, G4double, G4double)
 
G4int GetNumberOfModels () const
 
G4int GetNumberOfRegionModels (size_t couple_index) const
 
G4VEmModelGetRegionModel (G4int idx, size_t couple_index) const
 
G4VEmModelGetModelByIndex (G4int idx=0, G4bool ver=false) const
 
const G4VEmModelGetCurrentModel () const
 
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 SetEmMasterProcess (const G4VEmProcess *)
 
void SetIntegral (G4bool val)
 
void SetBuildTableFlag (G4bool val)
 
void CurrentSetup (const G4MaterialCutsCouple *, G4double energy)
 
- Public Member Functions inherited from G4VDiscreteProcess
 G4VDiscreteProcess (const G4String &aName, G4ProcessType aType=fNotDefined)
 
 G4VDiscreteProcess (G4VDiscreteProcess &)
 
virtual ~G4VDiscreteProcess ()
 
G4VDiscreteProcessoperator= (const G4VDiscreteProcess &)=delete
 
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 ()
 
G4VProcessoperator= (const G4VProcess &)=delete
 
G4bool operator== (const G4VProcess &right) const
 
G4bool 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
 
virtual void ProcessDescription (std::ostream &outfile) 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 StreamProcessInfo (std::ostream &) const
 
virtual void InitialiseProcess (const G4ParticleDefinition *)=0
 
virtual G4double MinPrimaryEnergy (const G4ParticleDefinition *, const G4Material *)
 
G4VEmModelSelectModel (G4double kinEnergy, size_t index)
 
virtual G4double GetMeanFreePath (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
 
G4PhysicsVectorLambdaPhysicsVector (const G4MaterialCutsCouple *)
 
void DefineMaterial (const G4MaterialCutsCouple *couple)
 
G4int LambdaBinning () const
 
G4double MinKinEnergy () const
 
G4double MaxKinEnergy () const
 
G4double PolarAngleLimit () const
 
G4bool IsIntegral () const
 
G4double RecalculateLambda (G4double kinEnergy, const G4MaterialCutsCouple *couple)
 
G4ParticleChangeForGammaGetParticleChange ()
 
void SetParticle (const G4ParticleDefinition *p)
 
void SetSecondaryParticle (const G4ParticleDefinition *p)
 
size_t CurrentMaterialCutsCoupleIndex () const
 
const G4MaterialCutsCoupleMaterialCutsCouple () const
 
G4bool ApplyCuts () const
 
G4double GetGammaEnergyCut ()
 
G4double GetElectronEnergyCut ()
 
void SetStartFromNullFlag (G4bool val)
 
void SetSplineFlag (G4bool val)
 
const G4ElementGetTargetElement () const
 
const G4IsotopeGetTargetIsotope () const
 
virtual G4double GetMeanFreePath (const G4Track &aTrack, G4double previousStepSize, G4ForceCondition *condition)=0
 
- Protected Member Functions inherited from G4VProcess
void SubtractNumberOfInteractionLengthLeft (G4double prevStepSize)
 
void ClearNumberOfInteractionLengthLeft ()
 

Protected Attributes

G4LossTableManagerlManager
 
G4EmParameterstheParameters
 
G4EmBiasingManagerbiasManager
 
const G4ParticleDefinitiontheGamma
 
const G4ParticleDefinitiontheElectron
 
G4ParticleChangeForGamma fParticleChange
 
std::vector< G4DynamicParticle * > secParticles
 
const G4MaterialCutsCouplecurrentCouple
 
const G4MaterialcurrentMaterial
 
const std::vector< G4double > * theDensityFactor
 
const std::vector< G4int > * theDensityIdx
 
size_t currentCoupleIndex
 
size_t basedCoupleIndex
 
G4int mainSecondaries
 
G4int secID
 
G4int fluoID
 
G4int augerID
 
G4int biasID
 
G4bool isTheMaster
 
G4double mfpKinEnergy
 
G4double preStepKinEnergy
 
G4double preStepLogKinEnergy
 
G4double preStepLambda
 
- Protected Attributes inherited from G4VProcess
const G4ProcessManageraProcessManager = nullptr
 
G4VParticleChangepParticleChange = nullptr
 
G4ParticleChange aParticleChange
 
G4double theNumberOfInteractionLengthLeft = -1.0
 
G4double currentInteractionLength = -1.0
 
G4double theInitialNumberOfInteractionLength = -1.0
 
G4String theProcessName
 
G4String thePhysicsTableFileName
 
G4ProcessType theProcessType = fNotDefined
 
G4int theProcessSubType = -1
 
G4double thePILfactor = 1.0
 
G4int verboseLevel = 0
 
G4bool enableAtRestDoIt = true
 
G4bool enableAlongStepDoIt = true
 
G4bool enablePostStepDoIt = true
 

Additional Inherited Members

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

Detailed Description

Definition at line 74 of file G4VEmProcess.hh.

Constructor & Destructor Documentation

◆ G4VEmProcess()

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

Definition at line 74 of file G4VEmProcess.cc.

74 :
75 G4VDiscreteProcess(name, type),
76 secondaryParticle(nullptr),
77 buildLambdaTable(true),
78 numberOfModels(0),
79 theLambdaTable(nullptr),
80 theLambdaTablePrim(nullptr),
81 integral(false),
82 applyCuts(false),
83 startFromNull(false),
84 splineFlag(true),
85 isIon(false),
86 currentCouple(nullptr),
87 isTheMaster(true),
88 masterProc(nullptr),
89 theData(nullptr),
90 currentModel(nullptr),
91 particle(nullptr),
92 currentParticle(nullptr)
93{
96
97 // Size of tables assuming spline
98 minKinEnergy = 0.1*keV;
99 maxKinEnergy = 100.0*TeV;
100 nLambdaBins = 84;
101 minKinEnergyPrim = DBL_MAX;
102 actBinning = actSpline = actMinKinEnergy = actMaxKinEnergy = false;
103
104 // default lambda factor
105 lambdaFactor = 0.8;
106 logLambdaFactor = G4Log(lambdaFactor);
107
108 // default limit on polar angle
109 biasFactor = fFactor = 1.0;
110
111 // particle types
114 thePositron = G4Positron::Positron();
115
116 theCuts = theCutsGamma = theCutsElectron = theCutsPositron = nullptr;
117
120 secParticles.reserve(5);
121
122 baseMaterial = currentMaterial = nullptr;
123
127 massRatio = 1.0;
128
130
131 modelManager = new G4EmModelManager();
132 biasManager = nullptr;
133 biasFlag = false;
134 weightFlag = false;
136 lManager->Register(this);
140
141 secID = fluoID = augerID = biasID = -1;
142 mainSecondaries = 100;
143 if("phot" == GetProcessName() || "compt" == GetProcessName()
144 || "e-_G4DNAIonisation" == GetProcessName()
145 || "hydrogen_G4DNAIonisation" == GetProcessName()
146 || "helium_G4DNAIonisation" == GetProcessName()
147 || "alpha_G4DNAIonisation" == GetProcessName()
148 || "alpha+_G4DNAIonisation" == GetProcessName()
149 || "proton_G4DNAIonisation" == GetProcessName()
150 || "GenericIon_G4DNAIonisation" == GetProcessName() )
151 {
152 mainSecondaries = 1;
153 }
154}
G4double G4Log(G4double x)
Definition: G4Log.hh:226
static G4Electron * Electron()
Definition: G4Electron.cc:93
static G4EmParameters * Instance()
static G4Gamma * Gamma()
Definition: G4Gamma.cc:85
const std::vector< G4double > * GetDensityFactors() const
const std::vector< G4int > * GetCoupleIndexes() const
static G4LossTableManager * Instance()
G4LossTableBuilder * GetTableBuilder()
void Register(G4VEnergyLossProcess *p)
static G4Positron * Positron()
Definition: G4Positron.cc:93
G4int mainSecondaries
G4LossTableManager * lManager
G4EmBiasingManager * biasManager
G4double preStepLambda
G4double preStepLogKinEnergy
size_t basedCoupleIndex
G4double mfpKinEnergy
const std::vector< G4double > * theDensityFactor
G4bool isTheMaster
std::vector< G4DynamicParticle * > secParticles
const G4ParticleDefinition * theElectron
G4EmParameters * theParameters
const G4MaterialCutsCouple * currentCouple
const G4ParticleDefinition * theGamma
G4double preStepKinEnergy
size_t currentCoupleIndex
G4ParticleChangeForGamma fParticleChange
const std::vector< G4int > * theDensityIdx
const G4Material * currentMaterial
void SetSecondaryWeightByProcess(G4bool)
void SetVerboseLevel(G4int value)
Definition: G4VProcess.hh:412
G4VParticleChange * pParticleChange
Definition: G4VProcess.hh:321
const G4String & GetProcessName() const
Definition: G4VProcess.hh:382
#define LOG_EKIN_MIN
Definition: templates.hh:98
#define DBL_MAX
Definition: templates.hh:62

◆ ~G4VEmProcess()

G4VEmProcess::~G4VEmProcess ( )
virtual

Definition at line 158 of file G4VEmProcess.cc.

159{
160 /*
161 if(1 < verboseLevel) {
162 G4cout << "G4VEmProcess destruct " << GetProcessName()
163 << " " << this << " " << theLambdaTable <<G4endl;
164 }
165 */
166 if(isTheMaster) {
167 delete theData;
168 theData = nullptr;
169 }
170 delete modelManager;
171 delete biasManager;
172 lManager->DeRegister(this);
173}
void DeRegister(G4VEnergyLossProcess *p)

Member Function Documentation

◆ ActivateForcedInteraction()

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

Definition at line 1160 of file G4VEmProcess.cc.

1162{
1164 if(1 < verboseLevel) {
1165 G4cout << "### ActivateForcedInteraction: for "
1166 << particle->GetParticleName()
1167 << " and process " << GetProcessName()
1168 << " length(mm)= " << length/mm
1169 << " in G4Region <" << r
1170 << "> weightFlag= " << flag
1171 << G4endl;
1172 }
1173 weightFlag = flag;
1175}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
void ActivateForcedInteraction(G4double length=0.0, const G4String &r="")
const G4String & GetParticleName() const
G4int verboseLevel
Definition: G4VProcess.hh:356

Referenced by G4EmExtraParameters::DefineRegParamForEM().

◆ ActivateSecondaryBiasing()

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

Definition at line 1180 of file G4VEmProcess.cc.

1183{
1184 if (0.0 <= factor) {
1185
1186 // Range cut can be applied only for e-
1187 if(0.0 == factor && secondaryParticle != G4Electron::Electron())
1188 { return; }
1189
1191 biasManager->ActivateSecondaryBiasing(region, factor, energyLimit);
1192 if(1 < verboseLevel) {
1193 G4cout << "### ActivateSecondaryBiasing: for "
1194 << " process " << GetProcessName()
1195 << " factor= " << factor
1196 << " in G4Region <" << region
1197 << "> energyLimit(MeV)= " << energyLimit/MeV
1198 << G4endl;
1199 }
1200 }
1201}
void ActivateSecondaryBiasing(const G4String &region, G4double factor, G4double energyLimit)

Referenced by G4EmExtraParameters::DefineRegParamForEM().

◆ AddEmModel()

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

Definition at line 193 of file G4VEmProcess.cc.

195{
196 G4VEmFluctuationModel* fm = nullptr;
197 modelManager->AddEmModel(order, p, fm, region);
199}
void AddEmModel(G4int, G4VEmModel *, G4VEmFluctuationModel *, const G4Region *)
void SetParticleChange(G4VParticleChange *, G4VEmFluctuationModel *f=nullptr)
Definition: G4VEmModel.cc:456

Referenced by LBE::ConstructEM(), G4EmDNAPhysics_option7::ConstructProcess(), G4EmDNAPhysics_option8::ConstructProcess(), G4EmLEPTSPhysics::ConstructProcess(), G4EmLivermorePhysics::ConstructProcess(), G4EmLowEPPhysics::ConstructProcess(), G4EmPenelopePhysics::ConstructProcess(), G4EmStandardPhysics_option4::ConstructProcess(), G4EmStandardPhysicsSS::ConstructProcess(), G4DNAAttachment::InitialiseProcess(), G4DNAChargeDecrease::InitialiseProcess(), G4DNAChargeIncrease::InitialiseProcess(), G4DNADissociation::InitialiseProcess(), G4DNAElastic::InitialiseProcess(), G4DNAElectronSolvation::InitialiseProcess(), G4DNAExcitation::InitialiseProcess(), G4DNAIonisation::InitialiseProcess(), G4DNAPositronium::InitialiseProcess(), G4DNARotExcitation::InitialiseProcess(), G4DNAVibExcitation::InitialiseProcess(), G4JAEAElasticScattering::InitialiseProcess(), G4MicroElecElastic::InitialiseProcess(), G4MicroElecInelastic::InitialiseProcess(), G4NuclearStopping::InitialiseProcess(), G4eeToHadrons::InitialiseProcess(), G4MicroElecInelastic_new::InitialiseProcess(), G4MicroElecLOPhononScattering::InitialiseProcess(), G4RayleighScattering::InitialiseProcess(), G4PolarizedCompton::InitialiseProcess(), G4PolarizedGammaConversion::InitialiseProcess(), G4PolarizedPhotoElectricEffect::InitialiseProcess(), G4ComptonScattering::InitialiseProcess(), G4CoulombScattering::InitialiseProcess(), G4eplusAnnihilation::InitialiseProcess(), G4GammaConversion::InitialiseProcess(), G4PhotoElectricEffect::InitialiseProcess(), and G4EmConfigurator::PrepareModels().

◆ ApplyCuts()

G4bool G4VEmProcess::ApplyCuts ( ) const
inlineprotected

Definition at line 438 of file G4VEmProcess.hh.

439{
440 return applyCuts;
441}

Referenced by G4eplusAnnihilation::AtRestDoIt().

◆ BuildPhysicsTable()

void G4VEmProcess::BuildPhysicsTable ( const G4ParticleDefinition part)
overridevirtual

Reimplemented from G4VProcess.

Reimplemented in G4GammaGeneralProcess, G4eplusPolarizedAnnihilation, and G4PolarizedCompton.

Definition at line 364 of file G4VEmProcess.cc.

365{
366 if(!masterProc) {
367 if(isTheMaster) { masterProc = this; }
368 else { masterProc = static_cast<const G4VEmProcess*>(GetMasterProcess());}
369 }
370
371 G4String num = part.GetParticleName();
372 if(1 < verboseLevel) {
373 G4cout << "### G4VEmProcess::BuildPhysicsTable() for "
374 << GetProcessName()
375 << " and particle " << num
376 << " buildLambdaTable= " << buildLambdaTable
377 << " isTheMaster= " << isTheMaster
378 << " " << masterProc
379 << G4endl;
380 }
381
382 if(particle == &part) {
383
384 // worker initialisation
385 if(!isTheMaster) {
386 theLambdaTable = masterProc->LambdaTable();
387 theLambdaTablePrim = masterProc->LambdaTablePrim();
388
389 if(theLambdaTable) { FindLambdaMax(); }
390
391 // local initialisation of models
392 G4bool printing = true;
393 numberOfModels = modelManager->NumberOfModels();
394 for(G4int i=0; i<numberOfModels; ++i) {
395 G4VEmModel* mod = GetModelByIndex(i, printing);
396 G4VEmModel* mod0= masterProc->GetModelByIndex(i, printing);
397 //G4cout << i << ". " << mod << " " << mod0 << " "
398 // << particle->GetParticleName() << G4endl;
399 mod->InitialiseLocal(particle, mod0);
400 }
401 // master thread
402 } else {
403 if(buildLambdaTable || minKinEnergyPrim < maxKinEnergy) {
404 BuildLambdaTable();
405 }
406 }
407 }
408
409 // explicitly defined printout by particle name
410 if(1 < verboseLevel ||
411 (0 < verboseLevel && (num == "gamma" || num == "e-" ||
412 num == "e+" || num == "mu+" ||
413 num == "mu-" || num == "proton"||
414 num == "pi+" || num == "pi-" ||
415 num == "kaon+" || num == "kaon-" ||
416 num == "alpha" || num == "anti_proton" ||
417 num == "GenericIon"|| num == "alpha++" ||
418 num == "alpha+" || num == "helium" ||
419 num == "hydrogen")))
420 {
421 StreamInfo(G4cout, part);
422 }
423
424 if(1 < verboseLevel) {
425 G4cout << "### G4VEmProcess::BuildPhysicsTable() done for "
426 << GetProcessName()
427 << " and particle " << num
428 << G4endl;
429 }
430}
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
G4int NumberOfModels() const
virtual void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel)
Definition: G4VEmModel.cc:220
G4VEmModel * GetModelByIndex(G4int idx=0, G4bool ver=false) const
G4PhysicsTable * LambdaTable() const
G4PhysicsTable * LambdaTablePrim() const
const G4VProcess * GetMasterProcess() const
Definition: G4VProcess.hh:518

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

◆ ComputeCrossSectionPerAtom()

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

Definition at line 1059 of file G4VEmProcess.cc.

1061{
1062 SelectModel(kinEnergy, currentCoupleIndex);
1063 return (currentModel) ?
1064 currentModel->ComputeCrossSectionPerAtom(currentParticle, kinEnergy,
1065 Z, A, cut) : 0.0;
1066}
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0., G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
Definition: G4VEmModel.cc:359
G4VEmModel * SelectModel(G4double kinEnergy, size_t index)

◆ CrossSectionBiasingFactor()

G4double G4VEmProcess::CrossSectionBiasingFactor ( ) const
inline

Definition at line 598 of file G4VEmProcess.hh.

599{
600 return biasFactor;
601}

◆ CrossSectionPerVolume()

G4double G4VEmProcess::CrossSectionPerVolume ( G4double  kineticEnergy,
const G4MaterialCutsCouple couple,
G4double  logKinEnergy = DBL_MAX 
)

Definition at line 1014 of file G4VEmProcess.cc.

1017{
1018 // Cross section per atom is calculated
1019 DefineMaterial(couple);
1020 G4double cross = 0.0;
1021 if(buildLambdaTable) {
1022 cross = GetCurrentLambda(kineticEnergy,
1023 (logKinEnergy < DBL_MAX) ? logKinEnergy : G4Log(kineticEnergy));
1024 } else {
1025 SelectModel(kineticEnergy, currentCoupleIndex);
1026 if(currentModel) {
1027 cross = fFactor*currentModel->CrossSectionPerVolume(currentMaterial,
1028 currentParticle,
1029 kineticEnergy);
1030 }
1031 }
1032 return std::max(cross, 0.0);
1033}
double G4double
Definition: G4Types.hh:83
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
Definition: G4VEmModel.cc:254
void DefineMaterial(const G4MaterialCutsCouple *couple)

Referenced by G4EmCalculator::GetCrossSectionPerVolume().

◆ CurrentMaterialCutsCoupleIndex()

size_t G4VEmProcess::CurrentMaterialCutsCoupleIndex ( ) const
inlineprotected

Definition at line 445 of file G4VEmProcess.hh.

446{
447 return currentCoupleIndex;
448}

Referenced by G4eplusAnnihilation::AtRestDoIt().

◆ CurrentSetup()

void G4VEmProcess::CurrentSetup ( const G4MaterialCutsCouple couple,
G4double  energy 
)
inline

Definition at line 543 of file G4VEmProcess.hh.

544{
545 DefineMaterial(couple);
546 SelectModel(energy*massRatio, currentCoupleIndex);
547}

Referenced by GetLambda(), MeanFreePath(), RecalculateLambda(), and G4GammaGeneralProcess::SampleEmSecondaries().

◆ DefineMaterial()

void G4VEmProcess::DefineMaterial ( const G4MaterialCutsCouple couple)
inlineprotected

Definition at line 473 of file G4VEmProcess.hh.

474{
475 if(couple != currentCouple) {
476 currentCouple = couple;
477 currentMaterial = couple->GetMaterial();
478 baseMaterial = (currentMaterial->GetBaseMaterial())
480 currentCoupleIndex = couple->GetIndex();
481 basedCoupleIndex = (*theDensityIdx)[currentCoupleIndex];
482 fFactor = biasFactor*(*theDensityFactor)[currentCoupleIndex];
484 }
485}
const G4Material * GetMaterial() const
const G4Material * GetBaseMaterial() const
Definition: G4Material.hh:231

Referenced by G4eplusAnnihilation::AtRestDoIt(), CrossSectionPerVolume(), CurrentSetup(), and PostStepGetPhysicalInteractionLength().

◆ EmModel()

G4VEmModel * G4VEmProcess::EmModel ( size_t  index = 0) const

Definition at line 211 of file G4VEmProcess.cc.

212{
213 return (index < emModels.size()) ? emModels[index] : nullptr;
214}

Referenced by G4EmDNAChemistry::ConstructProcess(), G4EmDNAChemistry_option1::ConstructProcess(), G4EmDNAChemistry_option3::ConstructProcess(), G4EmDNAPhysics_stationary::ConstructProcess(), G4EmDNAPhysics_stationary_option2::ConstructProcess(), G4EmDNAPhysics_stationary_option4::ConstructProcess(), G4EmDNAPhysics_stationary_option6::ConstructProcess(), G4EmDNAChemistry_option2::ConstructProcess(), G4DNAAttachment::InitialiseProcess(), G4DNAChargeDecrease::InitialiseProcess(), G4DNAChargeIncrease::InitialiseProcess(), G4DNADissociation::InitialiseProcess(), G4DNAElastic::InitialiseProcess(), G4DNAElectronSolvation::InitialiseProcess(), G4DNAExcitation::InitialiseProcess(), G4DNAIonisation::InitialiseProcess(), G4DNAPositronium::InitialiseProcess(), G4DNARotExcitation::InitialiseProcess(), G4DNAVibExcitation::InitialiseProcess(), G4JAEAElasticScattering::InitialiseProcess(), G4MicroElecElastic::InitialiseProcess(), G4MicroElecInelastic::InitialiseProcess(), G4NuclearStopping::InitialiseProcess(), G4MicroElecInelastic_new::InitialiseProcess(), G4MicroElecLOPhononScattering::InitialiseProcess(), G4RayleighScattering::InitialiseProcess(), G4PolarizedCompton::InitialiseProcess(), G4PolarizedGammaConversion::InitialiseProcess(), G4PolarizedPhotoElectricEffect::InitialiseProcess(), G4ComptonScattering::InitialiseProcess(), G4CoulombScattering::InitialiseProcess(), G4eplusAnnihilation::InitialiseProcess(), G4GammaConversion::InitialiseProcess(), G4PhotoElectricEffect::InitialiseProcess(), G4DNAAttachment::PrintInfo(), G4DNAChargeDecrease::PrintInfo(), G4DNAChargeIncrease::PrintInfo(), G4DNADissociation::PrintInfo(), G4DNAElastic::PrintInfo(), G4DNAExcitation::PrintInfo(), G4DNAIonisation::PrintInfo(), G4DNAPositronium::PrintInfo(), G4DNARotExcitation::PrintInfo(), G4DNAVibExcitation::PrintInfo(), and G4PolarizedCompton::PrintInfo().

◆ GetCurrentElement()

const G4Element * G4VEmProcess::GetCurrentElement ( ) const

Definition at line 1133 of file G4VEmProcess.cc.

1134{
1135 const G4Element* elm =
1136 (currentModel) ? currentModel->GetCurrentElement() : nullptr;
1137 return elm;
1138}
const G4Element * GetCurrentElement() const
Definition: G4VEmModel.hh:495

◆ GetCurrentModel()

const G4VEmModel * G4VEmProcess::GetCurrentModel ( ) const
inline

Definition at line 705 of file G4VEmProcess.hh.

706{
707 return currentModel;
708}

◆ GetElectronEnergyCut()

G4double G4VEmProcess::GetElectronEnergyCut ( )
inlineprotected

Definition at line 466 of file G4VEmProcess.hh.

467{
468 return (*theCutsElectron)[currentCoupleIndex];
469}

Referenced by G4eplusAnnihilation::AtRestDoIt().

◆ GetEmProcess()

G4VEmProcess * G4VEmProcess::GetEmProcess ( const G4String name)
virtual

Reimplemented in G4GammaGeneralProcess.

Definition at line 1251 of file G4VEmProcess.cc.

1252{
1253 return (nam == GetProcessName()) ? this : nullptr;
1254}

◆ GetGammaEnergyCut()

G4double G4VEmProcess::GetGammaEnergyCut ( )
inlineprotected

Definition at line 459 of file G4VEmProcess.hh.

460{
461 return (*theCutsGamma)[currentCoupleIndex];
462}

Referenced by G4eplusAnnihilation::AtRestDoIt().

◆ GetLambda() [1/2]

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

Definition at line 1259 of file G4VEmProcess.cc.

1260{
1261 CurrentSetup(couple, kinEnergy);
1262 return GetCurrentLambda(kinEnergy, G4Log(kinEnergy));
1263}
void CurrentSetup(const G4MaterialCutsCouple *, G4double energy)

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

◆ GetLambda() [2/2]

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

Definition at line 550 of file G4VEmProcess.hh.

552{
553 CurrentSetup(couple, kinEnergy);
554 return GetCurrentLambda(kinEnergy, logKinEnergy);
555}

◆ GetMeanFreePath()

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

Implements G4VDiscreteProcess.

Reimplemented in G4PolarizedCompton, G4GammaGeneralProcess, and G4eplusPolarizedAnnihilation.

Definition at line 1037 of file G4VEmProcess.cc.

1040{
1042 return G4VEmProcess::MeanFreePath(track);
1043}
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 
) const

Definition at line 247 of file G4VEmProcess.cc.

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

Referenced by BuildPhysicsTable(), and G4EmCalculator::ComputeNuclearDEDX().

◆ GetNumberOfModels()

G4int G4VEmProcess::GetNumberOfModels ( ) const

Definition at line 226 of file G4VEmProcess.cc.

227{
228 return modelManager->NumberOfModels();
229}

◆ GetNumberOfRegionModels()

G4int G4VEmProcess::GetNumberOfRegionModels ( size_t  couple_index) const

Definition at line 233 of file G4VEmProcess.cc.

234{
235 return modelManager->NumberOfRegionModels(couple_index);
236}
G4int NumberOfRegionModels(size_t index_couple) const

◆ GetParticleChange()

G4ParticleChangeForGamma * G4VEmProcess::GetParticleChange ( )
inlineprotected

Definition at line 654 of file G4VEmProcess.hh.

655{
656 return &fParticleChange;
657}

◆ GetRegionModel()

G4VEmModel * G4VEmProcess::GetRegionModel ( G4int  idx,
size_t  couple_index 
) const

Definition at line 240 of file G4VEmProcess.cc.

241{
242 return modelManager->GetRegionModel(idx, couple_index);
243}
G4VEmModel * GetRegionModel(G4int idx, size_t index_couple)

◆ GetTargetElement()

const G4Element * G4VEmProcess::GetTargetElement ( ) const
inlineprotected

Definition at line 691 of file G4VEmProcess.hh.

692{
693 return currentModel->GetCurrentElement();
694}

◆ GetTargetIsotope()

const G4Isotope * G4VEmProcess::GetTargetIsotope ( ) const
inlineprotected

Definition at line 698 of file G4VEmProcess.hh.

699{
700 return currentModel->GetCurrentIsotope();
701}
const G4Isotope * GetCurrentIsotope() const
Definition: G4VEmModel.hh:502

◆ InitialiseProcess()

◆ IsApplicable()

◆ IsIntegral()

G4bool G4VEmProcess::IsIntegral ( ) const
inlineprotected

Definition at line 640 of file G4VEmProcess.hh.

641{
642 return integral;
643}

◆ LambdaBinning()

G4int G4VEmProcess::LambdaBinning ( ) const
inlineprotected

Definition at line 570 of file G4VEmProcess.hh.

571{
572 return nLambdaBins;
573}

◆ LambdaPhysicsVector()

G4PhysicsVector * G4VEmProcess::LambdaPhysicsVector ( const G4MaterialCutsCouple )
protected

Definition at line 1123 of file G4VEmProcess.cc.

1124{
1125 G4PhysicsVector* v =
1126 new G4PhysicsLogVector(minKinEnergy, maxKinEnergy, nLambdaBins);
1128 return v;
1129}
G4bool Spline() const
void SetSpline(G4bool)

◆ LambdaTable()

G4PhysicsTable * G4VEmProcess::LambdaTable ( ) const
inline

Definition at line 605 of file G4VEmProcess.hh.

606{
607 return theLambdaTable;
608}

Referenced by BuildPhysicsTable().

◆ LambdaTablePrim()

G4PhysicsTable * G4VEmProcess::LambdaTablePrim ( ) const
inline

Definition at line 612 of file G4VEmProcess.hh.

613{
614 return theLambdaTablePrim;
615}

Referenced by BuildPhysicsTable().

◆ MaterialCutsCouple()

const G4MaterialCutsCouple * G4VEmProcess::MaterialCutsCouple ( ) const
inlineprotected

Definition at line 452 of file G4VEmProcess.hh.

453{
454 return currentCouple;
455}

Referenced by G4eplusAnnihilation::AtRestDoIt().

◆ MaxKinEnergy()

G4double G4VEmProcess::MaxKinEnergy ( ) const
inlineprotected

Definition at line 584 of file G4VEmProcess.hh.

585{
586 return maxKinEnergy;
587}

Referenced by G4eplusAnnihilation::InitialiseProcess(), and SetMinKinEnergyPrim().

◆ MeanFreePath()

G4double G4VEmProcess::MeanFreePath ( const G4Track track)

Definition at line 1047 of file G4VEmProcess.cc.

1048{
1049 const G4double kinEnergy = track.GetKineticEnergy();
1050 CurrentSetup(track.GetMaterialCutsCouple(), kinEnergy);
1051 const G4double xs = GetCurrentLambda(kinEnergy,
1053 return (0.0 < xs) ? 1.0/xs : DBL_MAX;
1054}
G4double GetLogKineticEnergy() const
const G4DynamicParticle * GetDynamicParticle() const
G4double GetKineticEnergy() const
const G4MaterialCutsCouple * GetMaterialCutsCouple() const

Referenced by G4GammaGeneralProcess::GetMeanFreePath(), and GetMeanFreePath().

◆ MinKinEnergy()

G4double G4VEmProcess::MinKinEnergy ( ) const
inlineprotected

Definition at line 577 of file G4VEmProcess.hh.

578{
579 return minKinEnergy;
580}

Referenced by G4eplusAnnihilation::InitialiseProcess().

◆ MinPrimaryEnergy()

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

Reimplemented in G4CoulombScattering, and G4GammaConversion.

Definition at line 185 of file G4VEmProcess.cc.

187{
188 return 0.0;
189}

◆ Particle()

const G4ParticleDefinition * G4VEmProcess::Particle ( ) const
inline

Definition at line 619 of file G4VEmProcess.hh.

620{
621 return particle;
622}

◆ PolarAngleLimit()

G4double G4VEmProcess::PolarAngleLimit ( ) const
inlineprotected

Definition at line 591 of file G4VEmProcess.hh.

592{
594}
G4double MscThetaLimit() const

◆ PostStepDoIt()

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

Reimplemented from G4VDiscreteProcess.

Reimplemented in G4GammaGeneralProcess.

Definition at line 723 of file G4VEmProcess.cc.

725{
726 // In all cases clear number of interaction lengths
729
731
732 // Do not make anything if particle is stopped, the annihilation then
733 // should be performed by the AtRestDoIt!
734 if (track.GetTrackStatus() == fStopButAlive) { return &fParticleChange; }
735
736 const G4double finalT = track.GetKineticEnergy();
737 const G4double logFinalT = track.GetDynamicParticle()->GetLogKineticEnergy();
738
739 // forced process - should happen only once per track
740 if(biasFlag) {
742 biasFlag = false;
743 }
744 }
745
746 // Integral approach
747 if (integral) {
748 G4double lx = GetLambda(finalT, currentCouple, logFinalT);
749 if(preStepLambda<lx && 1 < verboseLevel) {
750 G4cout << "WARNING: for " << currentParticle->GetParticleName()
751 << " and " << GetProcessName()
752 << " E(MeV)= " << finalT/MeV
753 << " preLambda= " << preStepLambda << " < "
754 << lx << " (postLambda) "
755 << G4endl;
756 }
757
758 if(preStepLambda*G4UniformRand() > lx) {
760 return &fParticleChange;
761 }
762 }
763
764 G4double scaledEnergy = finalT*massRatio;
765 SelectModel(scaledEnergy, currentCoupleIndex);
766 if(!currentModel->IsActive(scaledEnergy)) { return &fParticleChange; }
767
768 // define new weight for primary and secondaries
770 if(weightFlag) {
771 weight /= biasFactor;
773 }
774
775
776 if(1 < verboseLevel) {
777 G4cout << "G4VEmProcess::PostStepDoIt: Sample secondary; E= "
778 << finalT/MeV
779 << " MeV; model= (" << currentModel->LowEnergyLimit()
780 << ", " << currentModel->HighEnergyLimit() << ")"
781 << G4endl;
782 }
783
784
785 // sample secondaries
786 secParticles.clear();
787 currentModel->SampleSecondaries(&secParticles,
789 track.GetDynamicParticle(),
790 (*theCuts)[currentCoupleIndex]);
791
792 G4int num0 = secParticles.size();
793
794 // splitting or Russian roulette
795 if(biasManager) {
797 G4double eloss = 0.0;
799 secParticles, track, currentModel, &fParticleChange, eloss,
801 step.GetPostStepPoint()->GetSafety());
802 if(eloss > 0.0) {
805 }
806 }
807 }
808
809 // save secondaries
810 G4int num = secParticles.size();
811 if(num > 0) {
812
815 G4double time = track.GetGlobalTime();
816
817 for (G4int i=0; i<num; ++i) {
818 if (secParticles[i]) {
821 G4double e = dp->GetKineticEnergy();
822 G4bool good = true;
823 if(applyCuts) {
824 if (p == theGamma) {
825 if (e < (*theCutsGamma)[currentCoupleIndex]) { good = false; }
826
827 } else if (p == theElectron) {
828 if (e < (*theCutsElectron)[currentCoupleIndex]) { good = false; }
829
830 } else if (p == thePositron) {
831 if (electron_mass_c2 < (*theCutsGamma)[currentCoupleIndex] &&
832 e < (*theCutsPositron)[currentCoupleIndex]) {
833 good = false;
834 e += 2.0*electron_mass_c2;
835 }
836 }
837 // added secondary if it is good
838 }
839 if (good) {
840 G4Track* t = new G4Track(dp, time, track.GetPosition());
842 if (biasManager) {
843 t->SetWeight(weight * biasManager->GetWeight(i));
844 } else {
845 t->SetWeight(weight);
846 }
848
849 // define type of secondary
851 else if(i < num0) {
852 if(p == theGamma) {
854 } else {
856 }
857 } else {
859 }
860 /*
861 G4cout << "Secondary(post step) has weight " << t->GetWeight()
862 << ", Ekin= " << t->GetKineticEnergy()/MeV << " MeV "
863 << GetProcessName() << " fluoID= " << fluoID
864 << " augerID= " << augerID <<G4endl;
865 */
866 } else {
867 delete dp;
868 edep += e;
869 }
870 }
871 }
873 }
874
877 if(particle->GetProcessManager()->GetAtRestProcessVector()->size() > 0)
880 }
881
882 return &fParticleChange;
883}
@ fAlive
@ fStopAndKill
@ fStopButAlive
#define G4UniformRand()
Definition: Randomize.hh:52
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)
G4double GetWeight(G4int i)
G4bool SecondaryBiasingRegion(G4int coupleIdx)
void InitializeForPostStep(const G4Track &)
G4ProcessManager * GetProcessManager() const
G4ProcessVector * GetAtRestProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const
std::size_t 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 G4TouchableHandle & GetTouchableHandle() const
void SetCreatorModelIndex(G4int idx)
G4double LowEnergyLimit() const
Definition: G4VEmModel.hh:652
G4double HighEnergyLimit() const
Definition: G4VEmModel.hh:645
G4bool IsActive(G4double kinEnergy) const
Definition: G4VEmModel.hh:785
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:424
G4double theNumberOfInteractionLengthLeft
Definition: G4VProcess.hh:331

Referenced by G4GammaGeneralProcess::SampleEmSecondaries().

◆ PostStepGetPhysicalInteractionLength()

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

Reimplemented from G4VDiscreteProcess.

Reimplemented in G4GammaGeneralProcess, G4eplusPolarizedAnnihilation, and G4PolarizedCompton.

Definition at line 623 of file G4VEmProcess.cc.

627{
629 G4double x = DBL_MAX;
630
634 G4double scaledEnergy = preStepKinEnergy*massRatio;
635 SelectModel(scaledEnergy, currentCoupleIndex);
636
637 if(!currentModel->IsActive(scaledEnergy)) {
640 return x;
641 }
642
643 // forced biasing only for primary particles
644 if(biasManager) {
645 if(0 == track.GetParentID()) {
646 if(biasFlag &&
648 return biasManager->GetStepLimit(currentCoupleIndex, previousStepSize);
649 }
650 }
651 }
652
653 // compute mean free path
655 if (integral) {
656 ComputeIntegralLambda(preStepKinEnergy, preStepLogKinEnergy);
657 } else {
659 }
660
661 // zero cross section
662 if(preStepLambda <= 0.0) {
665 }
666 }
667
668 // non-zero cross section
669 if(preStepLambda > 0.0) {
670
672
673 // beggining of tracking (or just after DoIt of this process)
676
677 } else if(currentInteractionLength < DBL_MAX) {
678
680 previousStepSize/currentInteractionLength;
683 }
684
685 // new mean free path and step limit for the next step
688 }
689 return x;
690}
G4double GetStepLimit(G4int coupleIdx, G4double previousStep)
G4int GetParentID() const
G4double currentInteractionLength
Definition: G4VProcess.hh:335
G4double theInitialNumberOfInteractionLength
Definition: G4VProcess.hh:338

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

◆ PreparePhysicsTable()

void G4VEmProcess::PreparePhysicsTable ( const G4ParticleDefinition part)
overridevirtual

Reimplemented from G4VProcess.

Reimplemented in G4GammaGeneralProcess.

Definition at line 254 of file G4VEmProcess.cc.

255{
257
258 if(!particle) { SetParticle(&part); }
259
260 if(part.GetParticleType() == "nucleus" &&
261 part.GetParticleSubType() == "generic") {
262
263 G4String pname = part.GetParticleName();
264 if(pname != "deuteron" && pname != "triton" &&
265 pname != "alpha" && pname != "He3" &&
266 pname != "alpha+" && pname != "helium" &&
267 pname != "hydrogen") {
268
269 particle = G4GenericIon::GenericIon();
270 isIon = true;
271 }
272 }
273
274 if(1 < verboseLevel) {
275 G4cout << "G4VEmProcess::PreparePhysicsTable() for "
276 << GetProcessName()
277 << " and particle " << part.GetParticleName()
278 << " local particle " << particle->GetParticleName()
279 << G4endl;
280 }
281
282 if(particle != &part) { return; }
283
285
287
288 Clear();
289 InitialiseProcess(particle);
290
291 const G4ProductionCutsTable* theCoupleTable=
293 size_t n = theCoupleTable->GetTableSize();
294
295 theEnergyOfCrossSectionMax.resize(n, 0.0);
296 theCrossSectionMax.resize(n, DBL_MAX);
297
298 // initialisation of the process
299 if(!actMinKinEnergy) { minKinEnergy = theParameters->MinKinEnergy(); }
300 if(!actMaxKinEnergy) { maxKinEnergy = theParameters->MaxKinEnergy(); }
301 if(!actSpline) { splineFlag = theParameters->Spline(); }
302
303 if(isTheMaster) {
305 if(!theData) { theData = new G4EmDataHandler(2); }
306 } else {
308 }
309 applyCuts = theParameters->ApplyCuts();
310 lambdaFactor = theParameters->LambdaFactor();
311 logLambdaFactor = G4Log(lambdaFactor);
313
314 // initialisation of models
315 numberOfModels = modelManager->NumberOfModels();
316 for(G4int i=0; i<numberOfModels; ++i) {
317 G4VEmModel* mod = modelManager->GetModel(i);
318 if(0 == i) { currentModel = mod; }
321 if(mod->HighEnergyLimit() > maxKinEnergy) {
322 mod->SetHighEnergyLimit(maxKinEnergy);
323 }
324 }
325
326 if(lManager->AtomDeexcitation()) { modelManager->SetFluoFlag(true); }
327 theCuts = modelManager->Initialise(particle,secondaryParticle,
328 2.,verboseLevel);
329 theCutsGamma = theCoupleTable->GetEnergyCutsVector(idxG4GammaCut);
330 theCutsElectron = theCoupleTable->GetEnergyCutsVector(idxG4ElectronCut);
331 theCutsPositron = theCoupleTable->GetEnergyCutsVector(idxG4PositronCut);
332
333 // prepare tables
334 if(buildLambdaTable && isTheMaster){
335 theLambdaTable = theData->MakeTable(0);
336 bld->InitialiseBaseMaterials(theLambdaTable);
337 }
338 // high energy table
339 if(isTheMaster && minKinEnergyPrim < maxKinEnergy){
340 theLambdaTablePrim = theData->MakeTable(1);
341 bld->InitialiseBaseMaterials(theLambdaTablePrim);
342 }
344 // forced biasing
345 if(biasManager) {
347 biasFlag = false;
348 }
349 // defined ID of secondary particles
350 G4String nam1 = GetProcessName();
352 if(100 > mainSecondaries) {
353 G4String nam2 = nam1 + "_fluo" ;
354 G4String nam3 = nam1 + "_auger";
355 G4String nam4 = nam1 + "_split";
359 }
360}
@ idxG4ElectronCut
@ idxG4GammaCut
@ idxG4PositronCut
void Initialise(const G4ParticleDefinition &part, const G4String &procName, G4int verbose)
G4PhysicsTable * MakeTable(size_t idx)
void SetFluoFlag(G4bool val)
const G4DataVector * Initialise(const G4ParticleDefinition *part, const G4ParticleDefinition *secPart, G4double minSubRange, G4int verb)
G4double MinKinEnergy() const
void DefineRegParamForEM(G4VEmProcess *) const
G4int Verbose() const
G4int WorkerVerbose() const
G4bool ApplyCuts() const
G4double MaxKinEnergy() const
G4double LambdaFactor() const
static G4GenericIon * GenericIon()
Definition: G4GenericIon.cc:92
void InitialiseBaseMaterials(const G4PhysicsTable *table=nullptr)
void PreparePhysicsTable(const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p, G4bool theMaster)
G4VAtomDeexcitation * AtomDeexcitation()
const G4String & GetParticleType() const
const G4String & GetParticleSubType() const
static G4int Register(const G4String &)
std::size_t GetTableSize() const
const std::vector< G4double > * GetEnergyCutsVector(std::size_t pcIdx) const
static G4ProductionCutsTable * GetProductionCutsTable()
void SetPolarAngleLimit(G4double)
Definition: G4VEmModel.hh:792
void SetHighEnergyLimit(G4double)
Definition: G4VEmModel.hh:757
void SetMasterThread(G4bool val)
Definition: G4VEmModel.hh:729
virtual void InitialiseProcess(const G4ParticleDefinition *)=0
void SetParticle(const G4ParticleDefinition *p)

Referenced by G4GammaGeneralProcess::PreparePhysicsTable().

◆ PrintInfo()

◆ ProcessDescription()

◆ RecalculateLambda()

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

Definition at line 560 of file G4VEmProcess.hh.

561{
562 CurrentSetup(couple, e);
563 return fFactor*ComputeCurrentLambda(e);
564}

◆ RetrievePhysicsTable()

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

Reimplemented from G4VProcess.

Reimplemented in G4GammaGeneralProcess.

Definition at line 936 of file G4VEmProcess.cc.

939{
940 if(1 < verboseLevel) {
941 G4cout << "G4VEmProcess::RetrievePhysicsTable() for "
942 << part->GetParticleName() << " and process "
943 << GetProcessName() << G4endl;
944 }
945 G4bool yes = true;
946
947 if((!buildLambdaTable && minKinEnergyPrim > maxKinEnergy)
948 || particle != part) { return yes; }
949
950 const G4String particleName = part->GetParticleName();
951
952 if(buildLambdaTable) {
953 const G4String& filename =
954 GetPhysicsTableFileName(part,directory,"Lambda",ascii);
956 filename,ascii);
957 if ( yes ) {
958 if (0 < verboseLevel) {
959 G4cout << "Lambda table for " << particleName
960 << " is Retrieved from <"
961 << filename << ">"
962 << G4endl;
963 }
964 if(theParameters->Spline()) {
965 size_t n = theLambdaTable->length();
966 for(size_t i=0; i<n; ++i) {
967 if((* theLambdaTable)[i]) {
968 (* theLambdaTable)[i]->SetSpline(true);
969 }
970 }
971 }
972 } else {
973 if (1 < verboseLevel) {
974 G4cout << "Lambda table for " << particleName << " in file <"
975 << filename << "> is not exist"
976 << G4endl;
977 }
978 }
979 }
980 if(minKinEnergyPrim < maxKinEnergy) {
981 const G4String& filename =
982 GetPhysicsTableFileName(part,directory,"LambdaPrim",ascii);
983 yes = G4PhysicsTableHelper::RetrievePhysicsTable(theLambdaTablePrim,
984 filename,ascii);
985 if ( yes ) {
986 if (0 < verboseLevel) {
987 G4cout << "Lambda table prim for " << particleName
988 << " is Retrieved from <"
989 << filename << ">"
990 << G4endl;
991 }
992 if(theParameters->Spline()) {
993 size_t n = theLambdaTablePrim->length();
994 for(size_t i=0; i<n; ++i) {
995 if((* theLambdaTablePrim)[i]) {
996 (* theLambdaTablePrim)[i]->SetSpline(true);
997 }
998 }
999 }
1000 } else {
1001 if (1 < verboseLevel) {
1002 G4cout << "Lambda table prim for " << particleName << " in file <"
1003 << filename << "> is not exist"
1004 << G4endl;
1005 }
1006 }
1007 }
1008 return yes;
1009}
static G4bool RetrievePhysicsTable(G4PhysicsTable *physTable, const G4String &fileName, G4bool ascii)
std::size_t length() const
const G4String & GetPhysicsTableFileName(const G4ParticleDefinition *, const G4String &directory, const G4String &tableName, G4bool ascii=false)
Definition: G4VProcess.cc:182

Referenced by G4GammaGeneralProcess::RetrievePhysicsTable().

◆ SecondaryParticle()

const G4ParticleDefinition * G4VEmProcess::SecondaryParticle ( ) const
inline

Definition at line 626 of file G4VEmProcess.hh.

627{
628 return secondaryParticle;
629}

◆ SelectModel()

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

Definition at line 490 of file G4VEmProcess.hh.

491{
492 if(1 < numberOfModels) {
493 currentModel = modelManager->SelectModel(kinEnergy, index);
494 }
495 currentModel->SetCurrentCouple(currentCouple);
496 return currentModel;
497}
G4VEmModel * SelectModel(G4double &energy, size_t &index)
void SetCurrentCouple(const G4MaterialCutsCouple *)
Definition: G4VEmModel.hh:465

Referenced by G4NuclearStopping::AlongStepDoIt(), G4eplusAnnihilation::AtRestDoIt(), ComputeCrossSectionPerAtom(), CrossSectionPerVolume(), CurrentSetup(), PostStepDoIt(), and PostStepGetPhysicalInteractionLength().

◆ SelectModelForMaterial()

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

Definition at line 502 of file G4VEmProcess.hh.

504{
505 return modelManager->SelectModel(kinEnergy, idxRegion);
506}

◆ SetBuildTableFlag()

◆ SetCrossSectionBiasingFactor()

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

Definition at line 1142 of file G4VEmProcess.cc.

1143{
1144 if(f > 0.0) {
1145 biasFactor = f;
1146 weightFlag = flag;
1147 if(1 < verboseLevel) {
1148 G4cout << "### SetCrossSectionBiasingFactor: for "
1149 << particle->GetParticleName()
1150 << " and process " << GetProcessName()
1151 << " biasFactor= " << f << " weightFlag= " << flag
1152 << G4endl;
1153 }
1154 }
1155}

Referenced by G4EmExtraParameters::DefineRegParamForEM().

◆ SetEmMasterProcess()

void G4VEmProcess::SetEmMasterProcess ( const G4VEmProcess ptr)
inline

Definition at line 712 of file G4VEmProcess.hh.

713{
714 masterProc = ptr;
715}

Referenced by G4GammaGeneralProcess::BuildPhysicsTable().

◆ SetEmModel()

void G4VEmProcess::SetEmModel ( G4VEmModel ptr,
G4int  index = 0 
)

Definition at line 203 of file G4VEmProcess.cc.

204{
205 for(auto & em : emModels) { if(em == ptr) { return; } }
206 emModels.push_back(ptr);
207}

Referenced by G4EmDNAPhysics::ConstructProcess(), G4EmDNAPhysics_option1::ConstructProcess(), G4EmDNAPhysics_option2::ConstructProcess(), G4EmDNAPhysics_option3::ConstructProcess(), G4EmDNAPhysics_option4::ConstructProcess(), G4EmDNAPhysics_option5::ConstructProcess(), G4EmDNAPhysics_option6::ConstructProcess(), G4EmDNAPhysics_option7::ConstructProcess(), G4EmDNAPhysics_option8::ConstructProcess(), G4EmDNAPhysics_stationary::ConstructProcess(), G4EmDNAPhysics_stationary_option2::ConstructProcess(), G4EmDNAPhysics_stationary_option4::ConstructProcess(), G4EmDNAPhysics_stationary_option6::ConstructProcess(), G4EmLEPTSPhysics::ConstructProcess(), G4EmDNAPhysicsActivator::ConstructProcess(), G4EmLivermorePhysics::ConstructProcess(), G4EmLowEPPhysics::ConstructProcess(), G4EmPenelopePhysics::ConstructProcess(), G4EmStandardPhysics::ConstructProcess(), G4EmStandardPhysics_option1::ConstructProcess(), G4EmStandardPhysics_option2::ConstructProcess(), G4EmStandardPhysics_option3::ConstructProcess(), G4EmStandardPhysics_option4::ConstructProcess(), G4EmStandardPhysicsGS::ConstructProcess(), G4EmStandardPhysicsSS::ConstructProcess(), G4EmStandardPhysicsWVI::ConstructProcess(), G4eplusPolarizedAnnihilation::G4eplusPolarizedAnnihilation(), G4DNAAttachment::InitialiseProcess(), G4DNAChargeDecrease::InitialiseProcess(), G4DNAChargeIncrease::InitialiseProcess(), G4DNADissociation::InitialiseProcess(), G4DNAElastic::InitialiseProcess(), G4DNAElectronSolvation::InitialiseProcess(), G4DNAExcitation::InitialiseProcess(), G4DNAIonisation::InitialiseProcess(), G4DNAPositronium::InitialiseProcess(), G4DNARotExcitation::InitialiseProcess(), G4DNAVibExcitation::InitialiseProcess(), G4JAEAElasticScattering::InitialiseProcess(), G4MicroElecElastic::InitialiseProcess(), G4MicroElecInelastic::InitialiseProcess(), G4NuclearStopping::InitialiseProcess(), G4eeToHadrons::InitialiseProcess(), G4MicroElecInelastic_new::InitialiseProcess(), G4MicroElecLOPhononScattering::InitialiseProcess(), G4RayleighScattering::InitialiseProcess(), G4PolarizedCompton::InitialiseProcess(), G4PolarizedGammaConversion::InitialiseProcess(), G4PolarizedPhotoElectricEffect::InitialiseProcess(), G4ComptonScattering::InitialiseProcess(), G4CoulombScattering::InitialiseProcess(), G4eplusAnnihilation::InitialiseProcess(), G4GammaConversion::InitialiseProcess(), and G4PhotoElectricEffect::InitialiseProcess().

◆ SetIntegral()

void G4VEmProcess::SetIntegral ( G4bool  val)
inline

◆ SetLambdaBinning()

void G4VEmProcess::SetLambdaBinning ( G4int  nbins)

Definition at line 1205 of file G4VEmProcess.cc.

1206{
1207 if(5 < n && n < 10000000) {
1208 nLambdaBins = n;
1209 actBinning = true;
1210 } else {
1211 G4double e = (G4double)n;
1212 PrintWarning("SetLambdaBinning", e);
1213 }
1214}

Referenced by G4GammaConversion::G4GammaConversion(), and G4PolarizedGammaConversion::G4PolarizedGammaConversion().

◆ SetMaxKinEnergy()

void G4VEmProcess::SetMaxKinEnergy ( G4double  e)

Definition at line 1230 of file G4VEmProcess.cc.

1231{
1232 if(minKinEnergy < e && e < 1.e+6*TeV) {
1233 nLambdaBins = G4lrint(nLambdaBins*G4Log(e/minKinEnergy)
1234 /G4Log(maxKinEnergy/minKinEnergy));
1235 maxKinEnergy = e;
1236 actMaxKinEnergy = true;
1237 } else { PrintWarning("SetMaxKinEnergy", e); }
1238}
int G4lrint(double ad)
Definition: templates.hh:134

Referenced by G4EmLivermorePhysics::ConstructProcess(), G4EmLowEPPhysics::ConstructProcess(), G4EmPenelopePhysics::ConstructProcess(), G4EmStandardPhysics_option3::ConstructProcess(), and G4EmStandardPhysics_option4::ConstructProcess().

◆ SetMinKinEnergy()

void G4VEmProcess::SetMinKinEnergy ( G4double  e)

Definition at line 1218 of file G4VEmProcess.cc.

1219{
1220 if(1.e-3*eV < e && e < maxKinEnergy) {
1221 nLambdaBins = G4lrint(nLambdaBins*G4Log(maxKinEnergy/e)
1222 /G4Log(maxKinEnergy/minKinEnergy));
1223 minKinEnergy = e;
1224 actMinKinEnergy = true;
1225 } else { PrintWarning("SetMinKinEnergy", e); }
1226}

Referenced by G4EmLivermorePhysics::ConstructProcess(), G4EmPenelopePhysics::ConstructProcess(), G4EmStandardPhysics::ConstructProcess(), G4EmStandardPhysics_option1::ConstructProcess(), G4EmStandardPhysics_option2::ConstructProcess(), G4EmStandardPhysics_option4::ConstructProcess(), G4EmStandardPhysicsGS::ConstructProcess(), G4GammaConversion::G4GammaConversion(), G4PolarizedGammaConversion::G4PolarizedGammaConversion(), and G4GammaConversion::InitialiseProcess().

◆ SetMinKinEnergyPrim()

void G4VEmProcess::SetMinKinEnergyPrim ( G4double  e)

Definition at line 1242 of file G4VEmProcess.cc.

1243{
1244 if(theParameters->MinKinEnergy() <= e &&
1245 e <= theParameters->MaxKinEnergy()) { minKinEnergyPrim = e; }
1246 else { PrintWarning("SetMinKinEnergyPrim", e); }
1247}
G4double MaxKinEnergy() const

Referenced by G4ComptonScattering::G4ComptonScattering(), G4JAEAElasticScattering::G4JAEAElasticScattering(), G4PhotoElectricEffect::G4PhotoElectricEffect(), G4PolarizedCompton::G4PolarizedCompton(), and G4RayleighScattering::G4RayleighScattering().

◆ SetParticle()

void G4VEmProcess::SetParticle ( const G4ParticleDefinition p)
inlineprotected

Definition at line 661 of file G4VEmProcess.hh.

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

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

◆ SetSecondaryParticle()

◆ SetSplineFlag()

void G4VEmProcess::SetSplineFlag ( G4bool  val)
inlineprotected

◆ SetStartFromNullFlag()

◆ StartTracking()

void G4VEmProcess::StartTracking ( G4Track track)
overridevirtual

Reimplemented from G4VProcess.

Reimplemented in G4GammaGeneralProcess.

Definition at line 602 of file G4VEmProcess.cc.

603{
604 // reset parameters for the new track
605 currentParticle = track->GetParticleDefinition();
608
609 if(isIon) { massRatio = proton_mass_c2/currentParticle->GetPDGMass(); }
610
611 // forced biasing only for primary particles
612 if(biasManager) {
613 if(0 == track->GetParentID()) {
614 // primary particle
615 biasFlag = true;
617 }
618 }
619}
const G4ParticleDefinition * GetParticleDefinition() const

◆ StorePhysicsTable()

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

Reimplemented from G4VProcess.

Reimplemented in G4GammaGeneralProcess.

Definition at line 887 of file G4VEmProcess.cc.

890{
891 G4bool yes = true;
892 if(!isTheMaster) { return yes; }
893
894 if ( theLambdaTable && part == particle) {
895 const G4String& nam =
896 GetPhysicsTableFileName(part,directory,"Lambda",ascii);
897 yes = theLambdaTable->StorePhysicsTable(nam,ascii);
898
899 if ( yes ) {
900 G4cout << "Physics table is stored for " << particle->GetParticleName()
901 << " and process " << GetProcessName()
902 << " in the directory <" << directory
903 << "> " << G4endl;
904 } else {
905 G4cout << "Fail to store Physics Table for "
906 << particle->GetParticleName()
907 << " and process " << GetProcessName()
908 << " in the directory <" << directory
909 << "> " << G4endl;
910 }
911 }
912 if ( theLambdaTablePrim && part == particle) {
913 const G4String& name =
914 GetPhysicsTableFileName(part,directory,"LambdaPrim",ascii);
915 yes = theLambdaTablePrim->StorePhysicsTable(name,ascii);
916
917 if ( yes ) {
918 G4cout << "Physics table prim is stored for "
919 << particle->GetParticleName()
920 << " and process " << GetProcessName()
921 << " in the directory <" << directory
922 << "> " << G4endl;
923 } else {
924 G4cout << "Fail to store Physics Table Prim for "
925 << particle->GetParticleName()
926 << " and process " << GetProcessName()
927 << " in the directory <" << directory
928 << "> " << G4endl;
929 }
930 }
931 return yes;
932}
G4bool StorePhysicsTable(const G4String &filename, G4bool ascii=false)
const char * name(G4int ptype)

Referenced by G4GammaGeneralProcess::StorePhysicsTable().

◆ StreamProcessInfo()

virtual void G4VEmProcess::StreamProcessInfo ( std::ostream &  ) const
inlineprotectedvirtual

Reimplemented in G4eeToHadrons, G4CoulombScattering, and G4eplusAnnihilation.

Definition at line 95 of file G4VEmProcess.hh.

95{};

◆ UpdateEmModel()

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

Definition at line 218 of file G4VEmProcess.cc.

220{
221 modelManager->UpdateEmModel(nam, emin, emax);
222}
void UpdateEmModel(const G4String &model_name, G4double emin, G4double emax)

Member Data Documentation

◆ augerID

G4int G4VEmProcess::augerID
protected

◆ basedCoupleIndex

◆ biasID

G4int G4VEmProcess::biasID
protected

◆ biasManager

◆ currentCouple

◆ currentCoupleIndex

◆ currentMaterial

◆ fluoID

G4int G4VEmProcess::fluoID
protected

◆ fParticleChange

◆ isTheMaster

◆ lManager

◆ mainSecondaries

G4int G4VEmProcess::mainSecondaries
protected

◆ mfpKinEnergy

G4double G4VEmProcess::mfpKinEnergy
protected

◆ preStepKinEnergy

◆ preStepLambda

◆ preStepLogKinEnergy

G4double G4VEmProcess::preStepLogKinEnergy
protected

Definition at line 416 of file G4VEmProcess.hh.

Referenced by G4VEmProcess(), and PostStepGetPhysicalInteractionLength().

◆ secID

G4int G4VEmProcess::secID
protected

◆ secParticles

std::vector<G4DynamicParticle*> G4VEmProcess::secParticles
protected

Definition at line 397 of file G4VEmProcess.hh.

Referenced by G4eplusAnnihilation::AtRestDoIt(), G4VEmProcess(), and PostStepDoIt().

◆ theDensityFactor

const std::vector<G4double>* G4VEmProcess::theDensityFactor
protected

Definition at line 400 of file G4VEmProcess.hh.

Referenced by G4VEmProcess().

◆ theDensityIdx

const std::vector<G4int>* G4VEmProcess::theDensityIdx
protected

Definition at line 401 of file G4VEmProcess.hh.

Referenced by G4VEmProcess().

◆ theElectron

const G4ParticleDefinition* G4VEmProcess::theElectron
protected

Definition at line 395 of file G4VEmProcess.hh.

Referenced by G4eplusAnnihilation::AtRestDoIt(), G4VEmProcess(), and PostStepDoIt().

◆ theGamma

const G4ParticleDefinition* G4VEmProcess::theGamma
protected

◆ theParameters


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