Geant4 11.2.2
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)
 
 ~G4VEmProcess () override
 
virtual G4bool IsApplicable (const G4ParticleDefinition &p) override=0
 
void ProcessDescription (std::ostream &outFile) const override
 
void PreparePhysicsTable (const G4ParticleDefinition &) override
 
void BuildPhysicsTable (const G4ParticleDefinition &) override
 
void StartTracking (G4Track *) override
 
G4double PostStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
 
G4VParticleChangePostStepDoIt (const G4Track &, const G4Step &) override
 
G4bool StorePhysicsTable (const G4ParticleDefinition *, const G4String &directory, G4bool ascii=false) override
 
G4bool RetrievePhysicsTable (const G4ParticleDefinition *, const G4String &directory, G4bool ascii) override
 
virtual G4VEmProcessGetEmProcess (const G4String &name)
 
G4double GetLambda (G4double kinEnergy, const G4MaterialCutsCouple *couple, G4double logKinEnergy)
 
G4double GetCrossSection (const G4double kinEnergy, const G4MaterialCutsCouple *couple) override
 
G4double ComputeCrossSectionPerAtom (G4double kineticEnergy, G4double Z, G4double A=0., G4double cut=0.0)
 
G4double MeanFreePath (const G4Track &track)
 
void SetLambdaBinning (G4int nbins)
 
void SetMinKinEnergy (G4double e)
 
void SetMinKinEnergyPrim (G4double e)
 
void SetMaxKinEnergy (G4double e)
 
G4PhysicsTableLambdaTable () const
 
G4PhysicsTableLambdaTablePrim () const
 
void SetLambdaTable (G4PhysicsTable *)
 
void SetLambdaTablePrim (G4PhysicsTable *)
 
std::vector< G4double > * EnergyOfCrossSectionMax () const
 
void SetEnergyOfCrossSectionMax (std::vector< G4double > *)
 
G4CrossSectionType CrossSectionType () const
 
void SetCrossSectionType (G4CrossSectionType val)
 
const G4ParticleDefinitionParticle () const
 
const G4ParticleDefinitionSecondaryParticle () const
 
G4VEmModelSelectModelForMaterial (G4double kinEnergy, size_t idxCouple) const
 
void AddEmModel (G4int, G4VEmModel *, const G4Region *region=nullptr)
 
void SetEmModel (G4VEmModel *, G4int index=0)
 
G4int NumberOfModels () const
 
G4VEmModelEmModel (size_t index=0) const
 
const G4VEmModelGetCurrentModel () const
 
G4VEmModelGetModelByIndex (G4int idx=0, G4bool ver=false) 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 SetBuildTableFlag (G4bool val)
 
void CurrentSetup (const G4MaterialCutsCouple *, G4double energy)
 
G4bool UseBaseMaterial () const
 
void BuildLambdaTable ()
 
void StreamInfo (std::ostream &outFile, const G4ParticleDefinition &, G4bool rst=false) const
 
 G4VEmProcess (G4VEmProcess &)=delete
 
G4VEmProcessoperator= (const G4VEmProcess &right)=delete
 
- Public Member Functions inherited from G4VDiscreteProcess
 G4VDiscreteProcess (const G4String &aName, G4ProcessType aType=fNotDefined)
 
 G4VDiscreteProcess (G4VDiscreteProcess &)
 
virtual ~G4VDiscreteProcess ()
 
G4VDiscreteProcessoperator= (const G4VDiscreteProcess &)=delete
 
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 &)
 
virtual G4double MinPrimaryEnergy (const G4ParticleDefinition *, const G4Material *)
 
- 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
 
G4double GetCurrentInteractionLength () const
 
void SetPILfactor (G4double value)
 
G4double GetPILfactor () const
 
G4double AlongStepGPIL (const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)
 
G4double AtRestGPIL (const G4Track &track, G4ForceCondition *condition)
 
G4double PostStepGPIL (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
 
const G4StringGetPhysicsTableFileName (const G4ParticleDefinition *, const G4String &directory, const G4String &tableName, G4bool ascii=false)
 
const G4StringGetProcessName () const
 
G4ProcessType GetProcessType () const
 
void SetProcessType (G4ProcessType)
 
G4int GetProcessSubType () const
 
void SetProcessSubType (G4int)
 
virtual const G4VProcessGetCreatorProcess () const
 
virtual void EndTracking ()
 
virtual void SetProcessManager (const G4ProcessManager *)
 
virtual const G4ProcessManagerGetProcessManager ()
 
virtual void ResetNumberOfInteractionLengthLeft ()
 
G4double GetNumberOfInteractionLengthLeft () const
 
G4double GetTotalNumberOfInteractionLengthTraversed () const
 
G4bool isAtRestDoItIsEnabled () const
 
G4bool isAlongStepDoItIsEnabled () const
 
G4bool isPostStepDoItIsEnabled () const
 
virtual void DumpInfo () const
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 
virtual void SetMasterProcess (G4VProcess *masterP)
 
const G4VProcessGetMasterProcess () const
 
virtual void BuildWorkerPhysicsTable (const G4ParticleDefinition &part)
 
virtual void PrepareWorkerPhysicsTable (const G4ParticleDefinition &)
 

Protected Member Functions

virtual void StreamProcessInfo (std::ostream &) const
 
virtual void InitialiseProcess (const G4ParticleDefinition *)=0
 
G4VEmModelSelectModel (G4double kinEnergy, size_t)
 
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
 
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
 
G4int DensityIndex (G4int idx) const
 
G4double DensityFactor (G4int idx) const
 
- Protected Member Functions inherited from G4VDiscreteProcess
- Protected Member Functions inherited from G4VProcess
void SubtractNumberOfInteractionLengthLeft (G4double prevStepSize)
 
void ClearNumberOfInteractionLengthLeft ()
 

Protected Attributes

const G4MaterialCutsCouplecurrentCouple = nullptr
 
const G4MaterialcurrentMaterial = nullptr
 
G4EmBiasingManagerbiasManager = nullptr
 
std::vector< G4double > * theEnergyOfCrossSectionMax = nullptr
 
G4double mfpKinEnergy = DBL_MAX
 
G4double preStepKinEnergy = 0.0
 
G4double preStepLambda = 0.0
 
G4int mainSecondaries = 1
 
G4int secID = _EM
 
G4int fluoID = _Fluorescence
 
G4int augerID = _AugerElectron
 
G4int biasID = _EM
 
G4int tripletID = _TripletElectron
 
size_t currentCoupleIndex = 0
 
size_t basedCoupleIndex = 0
 
size_t coupleIdxLambda = 0
 
size_t idxLambda = 0
 
G4bool isTheMaster = true
 
G4bool baseMat = false
 
std::vector< G4DynamicParticle * > secParticles
 
G4ParticleChangeForGamma fParticleChange
 
- 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 76 of file G4VEmProcess.hh.

Constructor & Destructor Documentation

◆ G4VEmProcess() [1/2]

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

Definition at line 79 of file G4VEmProcess.cc.

79 :
80 G4VDiscreteProcess(name, type)
81{
82 theParameters = G4EmParameters::Instance();
84
85 // Size of tables
86 minKinEnergy = 0.1*CLHEP::keV;
87 maxKinEnergy = 100.0*CLHEP::TeV;
88
89 // default lambda factor
90 invLambdaFactor = 1.0/lambdaFactor;
91
92 // particle types
93 theGamma = G4Gamma::Gamma();
94 theElectron = G4Electron::Electron();
95 thePositron = G4Positron::Positron();
96
99 secParticles.reserve(5);
100
101 modelManager = new G4EmModelManager();
102 lManager = G4LossTableManager::Instance();
103 lManager->Register(this);
104 isTheMaster = lManager->IsMaster();
105 G4LossTableBuilder* bld = lManager->GetTableBuilder();
106 theDensityFactor = bld->GetDensityFactors();
107 theDensityIdx = bld->GetCoupleIndexes();
108}
static G4Electron * Electron()
Definition G4Electron.cc:91
static G4EmParameters * Instance()
static G4Gamma * Gamma()
Definition G4Gamma.cc:81
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:90
std::vector< G4DynamicParticle * > secParticles
G4ParticleChangeForGamma fParticleChange
void SetSecondaryWeightByProcess(G4bool)
void SetVerboseLevel(G4int value)
G4VParticleChange * pParticleChange

◆ ~G4VEmProcess()

G4VEmProcess::~G4VEmProcess ( )
override

Definition at line 112 of file G4VEmProcess.cc.

113{
114 if(isTheMaster) {
115 delete theData;
117 }
118 delete modelManager;
119 delete biasManager;
120 lManager->DeRegister(this);
121}
void DeRegister(G4VEnergyLossProcess *p)
G4EmBiasingManager * biasManager
std::vector< G4double > * theEnergyOfCrossSectionMax

◆ G4VEmProcess() [2/2]

G4VEmProcess::G4VEmProcess ( G4VEmProcess & )
delete

Member Function Documentation

◆ ActivateForcedInteraction()

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

Definition at line 764 of file G4VEmProcess.cc.

766{
767 if(nullptr == biasManager) { biasManager = new G4EmBiasingManager(); }
768 if(1 < verboseLevel) {
769 G4cout << "### ActivateForcedInteraction: for "
770 << particle->GetParticleName()
771 << " and process " << GetProcessName()
772 << " length(mm)= " << length/mm
773 << " in G4Region <" << r
774 << "> weightFlag= " << flag
775 << G4endl;
776 }
777 weightFlag = flag;
779}
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout
void ActivateForcedInteraction(G4double length=0.0, const G4String &r="")
const G4String & GetParticleName() const
G4int verboseLevel
const G4String & GetProcessName() const

Referenced by G4EmExtraParameters::DefineRegParamForEM().

◆ ActivateSecondaryBiasing()

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

Definition at line 784 of file G4VEmProcess.cc.

787{
788 if (0.0 <= factor) {
789
790 // Range cut can be applied only for e-
791 if(0.0 == factor && secondaryParticle != G4Electron::Electron())
792 { return; }
793
795 biasManager->ActivateSecondaryBiasing(region, factor, energyLimit);
796 if(1 < verboseLevel) {
797 G4cout << "### ActivateSecondaryBiasing: for "
798 << " process " << GetProcessName()
799 << " factor= " << factor
800 << " in G4Region <" << region
801 << "> energyLimit(MeV)= " << energyLimit/MeV
802 << G4endl;
803 }
804 }
805}
void ActivateSecondaryBiasing(const G4String &region, G4double factor, G4double energyLimit)

Referenced by G4EmExtraParameters::DefineRegParamForEM().

◆ AddEmModel()

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

Definition at line 125 of file G4VEmProcess.cc.

127{
128 if(nullptr == ptr) { return; }
129 G4VEmFluctuationModel* fm = nullptr;
130 modelManager->AddEmModel(order, ptr, fm, region);
132}
void AddEmModel(G4int, G4VEmModel *, G4VEmFluctuationModel *fm, const G4Region *r)
void SetParticleChange(G4VParticleChange *, G4VEmFluctuationModel *f=nullptr)

Referenced by G4EmDNABuilder::ConstructDNAElectronPhysics(), LBE::ConstructEM(), G4EmLivermorePhysics::ConstructProcess(), G4EmPenelopePhysics::ConstructProcess(), G4EmStandardPhysics_option4::ConstructProcess(), G4ComptonScattering::InitialiseProcess(), G4CoulombScattering::InitialiseProcess(), G4DNAAttachment::InitialiseProcess(), G4DNAChargeDecrease::InitialiseProcess(), G4DNAChargeIncrease::InitialiseProcess(), G4DNADissociation::InitialiseProcess(), G4DNAElastic::InitialiseProcess(), G4DNAElectronSolvation::InitialiseProcess(), G4DNAExcitation::InitialiseProcess(), G4DNAIonisation::InitialiseProcess(), G4DNAPlasmonExcitation::InitialiseProcess(), G4DNAPositronium::InitialiseProcess(), G4DNARotExcitation::InitialiseProcess(), G4DNAVibExcitation::InitialiseProcess(), G4eeToHadrons::InitialiseProcess(), G4eplusAnnihilation::InitialiseProcess(), G4GammaConversion::InitialiseProcess(), G4JAEAElasticScattering::InitialiseProcess(), G4MicroElecElastic::InitialiseProcess(), G4MicroElecInelastic::InitialiseProcess(), G4MicroElecLOPhononScattering::InitialiseProcess(), G4NuclearStopping::InitialiseProcess(), G4PhotoElectricEffect::InitialiseProcess(), G4PolarizedCompton::InitialiseProcess(), G4PolarizedGammaConversion::InitialiseProcess(), G4PolarizedPhotoElectric::InitialiseProcess(), G4RayleighScattering::InitialiseProcess(), and G4EmConfigurator::PrepareModels().

◆ ApplyCuts()

G4bool G4VEmProcess::ApplyCuts ( ) const
inlineprotected

Definition at line 615 of file G4VEmProcess.hh.

616{
617 return applyCuts;
618}

Referenced by G4eplusAnnihilation::AtRestDoIt().

◆ BuildLambdaTable()

void G4VEmProcess::BuildLambdaTable ( )

Definition at line 246 of file G4VEmProcess.cc.

247{
248 G4double scale = theParameters->MaxKinEnergy()/theParameters->MinKinEnergy();
249 G4int nbin =
250 theParameters->NumberOfBinsPerDecade()*G4lrint(std::log10(scale));
251 if(actBinning) { nbin = std::max(nbin, nLambdaBins); }
252 scale = nbin/G4Log(scale);
253
254 G4LossTableBuilder* bld = lManager->GetTableBuilder();
255 G4EmTableUtil::BuildLambdaTable(this, particle, modelManager,
256 bld, theLambdaTable, theLambdaTablePrim,
257 minKinEnergy, minKinEnergyPrim,
258 maxKinEnergy, scale, verboseLevel,
259 startFromNull, splineFlag);
260}
G4double G4Log(G4double x)
Definition G4Log.hh:227
double G4double
Definition G4Types.hh:83
int G4int
Definition G4Types.hh:85
G4double MinKinEnergy() const
G4int NumberOfBinsPerDecade() const
G4double MaxKinEnergy() const
static void BuildLambdaTable(G4VEmProcess *proc, const G4ParticleDefinition *part, G4EmModelManager *modelManager, G4LossTableBuilder *bld, G4PhysicsTable *theLambdaTable, G4PhysicsTable *theLambdaTablePrim, const G4double minKinEnergy, const G4double minKinEnergyPrim, const G4double maxKinEnergy, const G4double scale, const G4int verbose, const G4bool startFromNull, const G4bool splineFlag)
int G4lrint(double ad)
Definition templates.hh:134

Referenced by G4EmTableUtil::BuildEmProcess().

◆ BuildPhysicsTable()

void G4VEmProcess::BuildPhysicsTable ( const G4ParticleDefinition & part)
overridevirtual

Reimplemented from G4VProcess.

Definition at line 229 of file G4VEmProcess.cc.

230{
231 if(nullptr == masterProc) {
232 if(isTheMaster) { masterProc = this; }
233 else { masterProc = static_cast<const G4VEmProcess*>(GetMasterProcess());}
234 }
235 G4int nModels = modelManager->NumberOfModels();
236 G4bool isLocked = theParameters->IsPrintLocked();
237 G4bool toBuild = (buildLambdaTable || minKinEnergyPrim < maxKinEnergy);
238
239 G4EmTableUtil::BuildEmProcess(this, masterProc, particle, &part,
240 nModels, verboseLevel, isTheMaster,
241 isLocked, toBuild, baseMat);
242}
bool G4bool
Definition G4Types.hh:86
G4int NumberOfModels() const
G4bool IsPrintLocked() const
static void BuildEmProcess(G4VEmProcess *proc, const G4VEmProcess *masterProc, const G4ParticleDefinition *firstPart, const G4ParticleDefinition *part, const G4int nModels, const G4int verb, const G4bool master, const G4bool isLocked, const G4bool toBuild, G4bool &baseMat)
const G4VProcess * GetMasterProcess() const

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

◆ ComputeCrossSectionPerAtom()

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

Definition at line 700 of file G4VEmProcess.cc.

702{
704 return (currentModel) ?
705 currentModel->ComputeCrossSectionPerAtom(currentParticle, kinEnergy,
706 Z, A, cut) : 0.0;
707}
const G4double A[17]
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0., G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
G4VEmModel * SelectModel(G4double kinEnergy, size_t)
size_t currentCoupleIndex

◆ CrossSectionBiasingFactor()

G4double G4VEmProcess::CrossSectionBiasingFactor ( ) const
inline

Definition at line 643 of file G4VEmProcess.hh.

644{
645 return biasFactor;
646}

◆ CrossSectionType()

G4CrossSectionType G4VEmProcess::CrossSectionType ( ) const
inline

Definition at line 714 of file G4VEmProcess.hh.

715{
716 return fXSType;
717}

Referenced by G4EmTableUtil::BuildEmProcess().

◆ 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 586 of file G4VEmProcess.hh.

587{
588 DefineMaterial(couple);
589 SelectModel(energy*massRatio, currentCoupleIndex);
590}
void DefineMaterial(const G4MaterialCutsCouple *couple)

Referenced by GetCrossSection(), GetLambda(), MeanFreePath(), and G4GammaGeneralProcess::SelectEmProcess().

◆ 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 baseMaterial = currentMaterial = couple->GetMaterial();
479 fFactor = biasFactor;
481 if(baseMat) {
482 basedCoupleIndex = (*theDensityIdx)[currentCoupleIndex];
483 if(nullptr != currentMaterial->GetBaseMaterial())
484 baseMaterial = currentMaterial->GetBaseMaterial();
485 fFactor *= (*theDensityFactor)[currentCoupleIndex];
486 }
487 }
488}
const G4Material * GetMaterial() const
const G4Material * GetBaseMaterial() const
size_t basedCoupleIndex
G4double mfpKinEnergy
const G4MaterialCutsCouple * currentCouple
const G4Material * currentMaterial
#define DBL_MAX
Definition templates.hh:62

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

◆ DensityFactor()

G4double G4VEmProcess::DensityFactor ( G4int idx) const
inlineprotected

Definition at line 771 of file G4VEmProcess.hh.

772{
773 return (*theDensityFactor)[idx];
774}

Referenced by G4GammaGeneralProcess::PostStepGetPhysicalInteractionLength().

◆ DensityIndex()

G4int G4VEmProcess::DensityIndex ( G4int idx) const
inlineprotected

Definition at line 764 of file G4VEmProcess.hh.

765{
766 return (*theDensityIdx)[idx];
767}

Referenced by G4GammaGeneralProcess::BuildPhysicsTable(), and G4GammaGeneralProcess::PostStepGetPhysicalInteractionLength().

◆ EmModel()

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

Definition at line 806 of file G4VEmProcess.hh.

807{
808 return (index < emModels.size()) ? emModels[index] : nullptr;
809}

Referenced by G4EmCalculator::ComputeNuclearDEDX(), G4EmDNAChemistry::ConstructProcess(), G4EmDNAChemistry_option1::ConstructProcess(), G4EmDNAChemistry_option2::ConstructProcess(), G4EmDNAChemistry_option3::ConstructProcess(), G4ComptonScattering::InitialiseProcess(), G4CoulombScattering::InitialiseProcess(), G4DNAAttachment::InitialiseProcess(), G4DNAChargeDecrease::InitialiseProcess(), G4DNAChargeIncrease::InitialiseProcess(), G4DNADissociation::InitialiseProcess(), G4DNAElastic::InitialiseProcess(), G4DNAElectronSolvation::InitialiseProcess(), G4DNAExcitation::InitialiseProcess(), G4DNAIonisation::InitialiseProcess(), G4DNAPlasmonExcitation::InitialiseProcess(), G4DNAPositronium::InitialiseProcess(), G4DNARotExcitation::InitialiseProcess(), G4DNAVibExcitation::InitialiseProcess(), G4eplusAnnihilation::InitialiseProcess(), G4GammaConversion::InitialiseProcess(), G4JAEAElasticScattering::InitialiseProcess(), G4MicroElecElastic::InitialiseProcess(), G4MicroElecInelastic::InitialiseProcess(), G4MicroElecLOPhononScattering::InitialiseProcess(), G4NuclearStopping::InitialiseProcess(), G4PhotoElectricEffect::InitialiseProcess(), G4PolarizedCompton::InitialiseProcess(), G4PolarizedGammaConversion::InitialiseProcess(), G4PolarizedPhotoElectric::InitialiseProcess(), G4RayleighScattering::InitialiseProcess(), G4DNAAttachment::PrintInfo(), G4DNAChargeDecrease::PrintInfo(), G4DNAChargeIncrease::PrintInfo(), G4DNADissociation::PrintInfo(), G4DNAElastic::PrintInfo(), G4DNAIonisation::PrintInfo(), G4DNAPlasmonExcitation::PrintInfo(), and G4DNAPositronium::PrintInfo().

◆ EnergyOfCrossSectionMax()

std::vector< G4double > * G4VEmProcess::EnergyOfCrossSectionMax ( ) const
inline

Definition at line 678 of file G4VEmProcess.hh.

679{
681}

Referenced by G4EmTableUtil::BuildEmProcess().

◆ GetCrossSection()

G4double G4VEmProcess::GetCrossSection ( const G4double kinEnergy,
const G4MaterialCutsCouple * couple )
overridevirtual

Reimplemented from G4VDiscreteProcess.

Definition at line 680 of file G4VEmProcess.cc.

682{
683 CurrentSetup(couple, kinEnergy);
684 return GetCurrentLambda(kinEnergy, G4Log(kinEnergy));
685}
void CurrentSetup(const G4MaterialCutsCouple *, G4double energy)

Referenced by G4EmCalculator::GetCrossSectionPerVolume(), and G4AdjointComptonModel::RapidSampleSecondaries().

◆ GetCurrentElement()

const G4Element * G4VEmProcess::GetCurrentElement ( ) const

Definition at line 722 of file G4VEmProcess.cc.

723{
724 return (nullptr != currentModel) ?
725 currentModel->GetCurrentElement(currentMaterial) : nullptr;
726}
const G4Element * GetCurrentElement(const G4Material *mat=nullptr) const

Referenced by GetTargetIsotope().

◆ GetCurrentModel()

const G4VEmModel * G4VEmProcess::GetCurrentModel ( ) const
inline

Definition at line 785 of file G4VEmProcess.hh.

786{
787 return currentModel;
788}

◆ 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 855 of file G4VEmProcess.cc.

856{
857 return (nam == GetProcessName()) ? this : nullptr;
858}

◆ GetGammaEnergyCut()

G4double G4VEmProcess::GetGammaEnergyCut ( )
inlineprotected

Definition at line 459 of file G4VEmProcess.hh.

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

Referenced by G4eplusAnnihilation::AtRestDoIt().

◆ GetLambda()

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

Definition at line 595 of file G4VEmProcess.hh.

597{
598 CurrentSetup(couple, kinEnergy);
599 return GetCurrentLambda(kinEnergy, logKinEnergy);
600}

Referenced by G4GammaGeneralProcess::BuildPhysicsTable(), and G4GammaGeneralProcess::TotalCrossSectionPerVolume().

◆ GetMeanFreePath()

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

Implements G4VDiscreteProcess.

Definition at line 689 of file G4VEmProcess.cc.

692{
694 return G4VEmProcess::MeanFreePath(track);
695}
G4double condition(const G4ErrorSymMatrix &m)
@ NotForced
G4double MeanFreePath(const G4Track &track)

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

◆ GetModelByIndex()

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

Definition at line 813 of file G4VEmProcess.hh.

814{
815 return modelManager->GetModel(idx, ver);
816}
G4VEmModel * GetModel(G4int idx, G4bool ver=false) const

Referenced by G4EmTableUtil::BuildEmProcess().

◆ GetParticleChange()

G4ParticleChangeForGamma * G4VEmProcess::GetParticleChange ( )
inlineprotected

Definition at line 728 of file G4VEmProcess.hh.

729{
730 return &fParticleChange;
731}

◆ GetTargetElement()

const G4Element * G4VEmProcess::GetTargetElement ( ) const
protected

Definition at line 730 of file G4VEmProcess.cc.

731{
732 return (nullptr != currentModel) ?
733 currentModel->GetCurrentElement(currentMaterial) : nullptr;
734}

◆ GetTargetIsotope()

const G4Isotope * G4VEmProcess::GetTargetIsotope ( ) const
protected

Definition at line 738 of file G4VEmProcess.cc.

739{
740 return (nullptr != currentModel) ?
741 currentModel->GetCurrentIsotope(GetCurrentElement()) : nullptr;
742}
const G4Isotope * GetCurrentIsotope(const G4Element *elm=nullptr) const
const G4Element * GetCurrentElement() const

◆ InitialiseProcess()

◆ IsApplicable()

◆ LambdaBinning()

G4int G4VEmProcess::LambdaBinning ( ) const
inlineprotected

Definition at line 622 of file G4VEmProcess.hh.

623{
624 return nLambdaBins;
625}

◆ LambdaPhysicsVector()

G4PhysicsVector * G4VEmProcess::LambdaPhysicsVector ( const G4MaterialCutsCouple * couple)
protected

Definition at line 712 of file G4VEmProcess.cc.

713{
714 DefineMaterial(couple);
715 G4PhysicsVector* newv = new G4PhysicsLogVector(minKinEnergy, maxKinEnergy,
716 nLambdaBins, splineFlag);
717 return newv;
718}

◆ LambdaTable()

G4PhysicsTable * G4VEmProcess::LambdaTable ( ) const
inline

Definition at line 650 of file G4VEmProcess.hh.

651{
652 return theLambdaTable;
653}

Referenced by G4EmTableUtil::BuildEmProcess().

◆ LambdaTablePrim()

G4PhysicsTable * G4VEmProcess::LambdaTablePrim ( ) const
inline

Definition at line 657 of file G4VEmProcess.hh.

658{
659 return theLambdaTablePrim;
660}

Referenced by G4EmTableUtil::BuildEmProcess().

◆ 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 636 of file G4VEmProcess.hh.

637{
638 return maxKinEnergy;
639}

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

◆ MeanFreePath()

G4double G4VEmProcess::MeanFreePath ( const G4Track & track)
inline

Definition at line 604 of file G4VEmProcess.hh.

605{
606 const G4double kinEnergy = track.GetKineticEnergy();
607 CurrentSetup(track.GetMaterialCutsCouple(), kinEnergy);
608 const G4double xs = GetCurrentLambda(kinEnergy,
610 return (0.0 < xs) ? 1.0/xs : DBL_MAX;
611}
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 629 of file G4VEmProcess.hh.

630{
631 return minKinEnergy;
632}

Referenced by G4eplusAnnihilation::InitialiseProcess().

◆ NumberOfModels()

G4int G4VEmProcess::NumberOfModels ( ) const
inline

Definition at line 799 of file G4VEmProcess.hh.

800{
801 return numberOfModels;
802}

◆ operator=()

G4VEmProcess & G4VEmProcess::operator= ( const G4VEmProcess & right)
delete

◆ Particle()

const G4ParticleDefinition * G4VEmProcess::Particle ( ) const
inline

Definition at line 693 of file G4VEmProcess.hh.

694{
695 return particle;
696}

◆ PolarAngleLimit()

G4double G4VEmProcess::PolarAngleLimit ( ) const
inlineprotected

Definition at line 862 of file G4VEmProcess.cc.

863{
864 return theParameters->MscThetaLimit();
865}
G4double MscThetaLimit() const

◆ PostStepDoIt()

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

Reimplemented from G4VDiscreteProcess.

Definition at line 460 of file G4VEmProcess.cc.

462{
463 // clear number of interaction lengths in any case
466
468
469 // Do not make anything if particle is stopped, the annihilation then
470 // should be performed by the AtRestDoIt!
471 if (track.GetTrackStatus() == fStopButAlive) { return &fParticleChange; }
472
473 const G4double finalT = track.GetKineticEnergy();
474
475 // forced process - should happen only once per track
476 if(biasFlag) {
478 biasFlag = false;
479 }
480 }
481
482 // check active and select model
483 const G4double scaledEnergy = finalT*massRatio;
484 SelectModel(scaledEnergy, currentCoupleIndex);
485 if(!currentModel->IsActive(scaledEnergy)) { return &fParticleChange; }
486
487 // Integral approach
488 if (fXSType != fEmNoIntegral) {
489 const G4double logFinalT =
491 const G4double lx = std::max(GetCurrentLambda(finalT, logFinalT), 0.0);
492#ifdef G4VERBOSE
493 if(preStepLambda < lx && 1 < verboseLevel) {
494 G4cout << "WARNING: for " << currentParticle->GetParticleName()
495 << " and " << GetProcessName() << " E(MeV)= " << finalT/MeV
496 << " preLambda= " << preStepLambda
497 << " < " << lx << " (postLambda) " << G4endl;
498 }
499#endif
500 // if false interaction then use new cross section value
501 // if both values are zero - no interaction
502 if(preStepLambda*G4UniformRand() >= lx) {
503 return &fParticleChange;
504 }
505 }
506
507 // define new weight for primary and secondaries
509 if(weightFlag) {
510 weight /= biasFactor;
512 }
513
514#ifdef G4VERBOSE
515 if(1 < verboseLevel) {
516 G4cout << "G4VEmProcess::PostStepDoIt: Sample secondary; E= "
517 << finalT/MeV
518 << " MeV; model= (" << currentModel->LowEnergyLimit()
519 << ", " << currentModel->HighEnergyLimit() << ")"
520 << G4endl;
521 }
522#endif
523
524 // sample secondaries
525 secParticles.clear();
526 currentModel->SampleSecondaries(&secParticles,
528 track.GetDynamicParticle(),
529 (*theCuts)[currentCoupleIndex]);
530
531 G4int num0 = (G4int)secParticles.size();
532
533 // splitting or Russian roulette
534 if(biasManager) {
536 G4double eloss = 0.0;
538 secParticles, track, currentModel, &fParticleChange, eloss,
540 step.GetPostStepPoint()->GetSafety());
541 if(eloss > 0.0) {
544 }
545 }
546 }
547
548 // save secondaries
549 G4int num = (G4int)secParticles.size();
550 if(num > 0) {
551
554 G4double time = track.GetGlobalTime();
555
556 G4int n1(0), n2(0);
557 if(num > mainSecondaries) {
558 currentModel->FillNumberOfSecondaries(n1, n2);
559 }
560
561 for (G4int i=0; i<num; ++i) {
563 if (nullptr != dp) {
565 G4double e = dp->GetKineticEnergy();
566 G4bool good = true;
567 if(applyCuts) {
568 if (p == theGamma) {
569 if (e < (*theCutsGamma)[currentCoupleIndex]) { good = false; }
570
571 } else if (p == theElectron) {
572 if (e < (*theCutsElectron)[currentCoupleIndex]) { good = false; }
573
574 } else if (p == thePositron) {
575 if (electron_mass_c2 < (*theCutsGamma)[currentCoupleIndex] &&
576 e < (*theCutsPositron)[currentCoupleIndex]) {
577 good = false;
578 e += 2.0*electron_mass_c2;
579 }
580 }
581 // added secondary if it is good
582 }
583 if (good) {
584 G4Track* t = new G4Track(dp, time, track.GetPosition());
586 if (biasManager) {
587 t->SetWeight(weight * biasManager->GetWeight(i));
588 } else {
589 t->SetWeight(weight);
590 }
592
593 // define type of secondary
594 if(i < mainSecondaries) {
596 if(GetProcessSubType() == fComptonScattering && p == theGamma) {
598 }
599 } else if(i < mainSecondaries + n1) {
601 } else if(i < mainSecondaries + n1 + n2) {
603 } else {
604 if(i < num0) {
605 if(p == theGamma) {
607 } else {
609 }
610 } else {
612 }
613 }
614 /*
615 G4cout << "Secondary(post step) has weight " << t->GetWeight()
616 << ", Ekin= " << t->GetKineticEnergy()/MeV << " MeV "
617 << GetProcessName() << " fluoID= " << fluoID
618 << " augerID= " << augerID <<G4endl;
619 */
620 } else {
621 delete dp;
622 edep += e;
623 }
624 }
625 }
627 }
628
631 if(particle->GetProcessManager()->GetAtRestProcessVector()->size() > 0)
634 }
635
636 return &fParticleChange;
637}
@ fComptonScattering
@ fEmNoIntegral
@ 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 SetCreatorModelID(const G4int id)
virtual void FillNumberOfSecondaries(G4int &numberOfTriplets, G4int &numberOfRecoil)
G4double LowEnergyLimit() const
G4double HighEnergyLimit() const
G4bool IsActive(G4double kinEnergy) const
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin=0.0, G4double tmax=DBL_MAX)=0
G4int mainSecondaries
G4double preStepLambda
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
G4double theNumberOfInteractionLengthLeft
G4int GetProcessSubType() const

◆ PostStepGetPhysicalInteractionLength()

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

Reimplemented from G4VDiscreteProcess.

Definition at line 354 of file G4VEmProcess.cc.

358{
360 G4double x = DBL_MAX;
361
364 const G4double scaledEnergy = preStepKinEnergy*massRatio;
365 SelectModel(scaledEnergy, currentCoupleIndex);
366 /*
367 G4cout << "PostStepGetPhysicalInteractionLength: idx= " << currentCoupleIndex
368 << " couple: " << currentCouple << G4endl;
369 */
370 if(!currentModel->IsActive(scaledEnergy)) {
374 preStepLambda = 0.0;
375 return x;
376 }
377
378 // forced biasing only for primary particles
379 if(biasManager) {
380 if(0 == track.GetParentID()) {
381 if(biasFlag &&
383 return biasManager->GetStepLimit((G4int)currentCoupleIndex, previousStepSize);
384 }
385 }
386 }
387
388 // compute mean free path
389
390 ComputeIntegralLambda(preStepKinEnergy, track);
391
392 // zero cross section
393 if(preStepLambda <= 0.0) {
396
397 } else {
398
399 // non-zero cross section
401
402 // beggining of tracking (or just after DoIt of this process)
405
406 } else {
407
409 previousStepSize/currentInteractionLength;
412 }
413
414 // new mean free path and step limit for the next step
417 }
418 return x;
419}
G4double GetStepLimit(G4int coupleIdx, G4double previousStep)
G4int GetParentID() const
G4double preStepKinEnergy
G4double currentInteractionLength
G4double theInitialNumberOfInteractionLength

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

◆ PreparePhysicsTable()

void G4VEmProcess::PreparePhysicsTable ( const G4ParticleDefinition & part)
overridevirtual

Reimplemented from G4VProcess.

Definition at line 147 of file G4VEmProcess.cc.

148{
149 if(nullptr == particle) { SetParticle(&part); }
150
151 if(part.GetParticleType() == "nucleus" &&
152 part.GetParticleSubType() == "generic") {
153
154 G4String pname = part.GetParticleName();
155 if(pname != "deuteron" && pname != "triton" &&
156 pname != "alpha" && pname != "alpha+" &&
157 pname != "helium" && pname != "hydrogen") {
158
159 particle = G4GenericIon::GenericIon();
160 isIon = true;
161 }
162 }
163 if(particle != &part) { return; }
164
165 lManager->PreparePhysicsTable(&part, this);
166
167 // for new run
168 currentCouple = nullptr;
169 preStepLambda = 0.0;
170 fLambdaEnergy = 0.0;
171
172 InitialiseProcess(particle);
173
174 G4LossTableBuilder* bld = lManager->GetTableBuilder();
175 const G4ProductionCutsTable* theCoupleTable=
177 theCutsGamma = theCoupleTable->GetEnergyCutsVector(idxG4GammaCut);
178 theCutsElectron = theCoupleTable->GetEnergyCutsVector(idxG4ElectronCut);
179 theCutsPositron = theCoupleTable->GetEnergyCutsVector(idxG4PositronCut);
180
181 // initialisation of the process
182 if(!actMinKinEnergy) { minKinEnergy = theParameters->MinKinEnergy(); }
183 if(!actMaxKinEnergy) { maxKinEnergy = theParameters->MaxKinEnergy(); }
184
185 applyCuts = theParameters->ApplyCuts();
186 lambdaFactor = theParameters->LambdaFactor();
187 invLambdaFactor = 1.0/lambdaFactor;
188 theParameters->DefineRegParamForEM(this);
189
190 // integral option may be disabled
191 if(!theParameters->Integral()) { fXSType = fEmNoIntegral; }
192
193 // prepare tables
194 if(isTheMaster) {
195 if(nullptr == theData) { theData = new G4EmDataHandler(2); }
196
197 if(buildLambdaTable) {
198 theLambdaTable = theData->MakeTable(0);
199 bld->InitialiseBaseMaterials(theLambdaTable);
200 }
201 // high energy table
202 if(minKinEnergyPrim < maxKinEnergy) {
203 theLambdaTablePrim = theData->MakeTable(1);
204 bld->InitialiseBaseMaterials(theLambdaTablePrim);
205 }
206 }
207 // models
209 numberOfModels = modelManager->NumberOfModels();
210 currentModel = modelManager->GetModel(0);
211 if(nullptr != lManager->AtomDeexcitation()) {
212 modelManager->SetFluoFlag(true);
213 }
214 // forced biasing
215 if(nullptr != biasManager) {
217 biasFlag = false;
218 }
219
220 theCuts =
221 G4EmTableUtil::PrepareEmProcess(this, particle, secondaryParticle,
222 modelManager, maxKinEnergy,
225}
@ idxG4ElectronCut
@ idxG4GammaCut
@ idxG4PositronCut
void Initialise(const G4ParticleDefinition &part, const G4String &procName, G4int verbose)
G4PhysicsTable * MakeTable(size_t idx)
void SetFluoFlag(G4bool val)
void DefineRegParamForEM(G4VEmProcess *) const
G4bool ApplyCuts() const
G4bool Integral() const
G4double LambdaFactor() const
static const G4DataVector * PrepareEmProcess(G4VEmProcess *proc, const G4ParticleDefinition *part, const G4ParticleDefinition *secPart, G4EmModelManager *modelManager, const G4double &maxKinEnergy, G4int &secID, G4int &tripletID, G4int &mainSec, const G4int &verb, const G4bool &master)
static G4GenericIon * GenericIon()
void InitialiseBaseMaterials(const G4PhysicsTable *table=nullptr)
G4VAtomDeexcitation * AtomDeexcitation()
void PreparePhysicsTable(const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p)
const G4String & GetParticleType() const
const G4String & GetParticleSubType() const
const std::vector< G4double > * GetEnergyCutsVector(std::size_t pcIdx) const
static G4ProductionCutsTable * GetProductionCutsTable()
virtual void InitialiseProcess(const G4ParticleDefinition *)=0
void SetParticle(const G4ParticleDefinition *p)

Referenced by G4GammaGeneralProcess::PreparePhysicsTable().

◆ ProcessDescription()

◆ RetrievePhysicsTable()

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

Reimplemented from G4VProcess.

Definition at line 659 of file G4VEmProcess.cc.

662{
663 if(!isTheMaster || part != particle) { return true; }
664 G4bool yes = true;
665 if(buildLambdaTable) {
666 yes = G4EmTableUtil::RetrieveTable(this, part, theLambdaTable, dir,
667 "Lambda", verboseLevel,
668 ascii, splineFlag);
669 }
670 if(yes && minKinEnergyPrim < maxKinEnergy) {
671 yes = G4EmTableUtil::RetrieveTable(this, part, theLambdaTablePrim, dir,
672 "LambdaPrim", verboseLevel,
673 ascii, splineFlag);
674 }
675 return yes;
676}
static G4bool RetrieveTable(G4VProcess *ptr, const G4ParticleDefinition *part, G4PhysicsTable *aTable, const G4String &dir, const G4String &tname, const G4int verb, const G4bool ascii, const G4bool spline)

Referenced by G4GammaGeneralProcess::RetrievePhysicsTable().

◆ SecondaryParticle()

const G4ParticleDefinition * G4VEmProcess::SecondaryParticle ( ) const
inline

Definition at line 700 of file G4VEmProcess.hh.

701{
702 return secondaryParticle;
703}

◆ SelectModel()

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

Definition at line 493 of file G4VEmProcess.hh.

494{
495 if(1 < numberOfModels) {
496 currentModel = modelManager->SelectModel(kinEnergy, currentCoupleIndex);
497 }
498 currentModel->SetCurrentCouple(currentCouple);
499 return currentModel;
500}
G4VEmModel * SelectModel(G4double energy, std::size_t index)
void SetCurrentCouple(const G4MaterialCutsCouple *)

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

◆ SelectModelForMaterial()

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

Definition at line 505 of file G4VEmProcess.hh.

507{
508 return modelManager->SelectModel(kinEnergy, idxCouple);
509}

◆ SetBuildTableFlag()

◆ SetCrossSectionBiasingFactor()

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

Definition at line 746 of file G4VEmProcess.cc.

747{
748 if(f > 0.0) {
749 biasFactor = f;
750 weightFlag = flag;
751 if(1 < verboseLevel) {
752 G4cout << "### SetCrossSectionBiasingFactor: for "
753 << particle->GetParticleName()
754 << " and process " << GetProcessName()
755 << " biasFactor= " << f << " weightFlag= " << flag
756 << G4endl;
757 }
758 }
759}

Referenced by G4EmExtraParameters::DefineRegParamForEM().

◆ SetCrossSectionType()

◆ SetEmMasterProcess()

void G4VEmProcess::SetEmMasterProcess ( const G4VEmProcess * ptr)
inline

Definition at line 792 of file G4VEmProcess.hh.

793{
794 masterProc = ptr;
795}

Referenced by G4GammaGeneralProcess::BuildPhysicsTable().

◆ SetEmModel()

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

Definition at line 136 of file G4VEmProcess.cc.

137{
138 if(nullptr == ptr) { return; }
139 if(!emModels.empty()) {
140 for(auto & em : emModels) { if(em == ptr) { return; } }
141 }
142 emModels.push_back(ptr);
143}

Referenced by G4EmBuilder::ConstructElectronSSProcess(), 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(), G4EmDNABuilder::FindOrBuildAttachment(), G4EmDNABuilder::FindOrBuildChargeDecrease(), G4EmDNABuilder::FindOrBuildChargeIncrease(), G4EmDNABuilder::FindOrBuildElastic(), G4EmDNABuilder::FindOrBuildElectronSolvation(), G4EmDNABuilder::FindOrBuildExcitation(), G4EmDNABuilder::FindOrBuildIonisation(), G4EmDNABuilder::FindOrBuildVibExcitation(), G4PolarizedAnnihilation::G4PolarizedAnnihilation(), G4ComptonScattering::InitialiseProcess(), G4CoulombScattering::InitialiseProcess(), G4DNAAttachment::InitialiseProcess(), G4DNAChargeDecrease::InitialiseProcess(), G4DNAChargeIncrease::InitialiseProcess(), G4DNADissociation::InitialiseProcess(), G4DNAElastic::InitialiseProcess(), G4DNAElectronSolvation::InitialiseProcess(), G4DNAExcitation::InitialiseProcess(), G4DNAIonisation::InitialiseProcess(), G4DNAPlasmonExcitation::InitialiseProcess(), G4DNAPositronium::InitialiseProcess(), G4DNARotExcitation::InitialiseProcess(), G4DNAVibExcitation::InitialiseProcess(), G4eeToHadrons::InitialiseProcess(), G4eplusAnnihilation::InitialiseProcess(), G4GammaConversion::InitialiseProcess(), G4JAEAElasticScattering::InitialiseProcess(), G4MicroElecElastic::InitialiseProcess(), G4MicroElecInelastic::InitialiseProcess(), G4MicroElecLOPhononScattering::InitialiseProcess(), G4NuclearStopping::InitialiseProcess(), G4PhotoElectricEffect::InitialiseProcess(), G4PolarizedCompton::InitialiseProcess(), G4PolarizedGammaConversion::InitialiseProcess(), G4PolarizedPhotoElectric::InitialiseProcess(), G4RayleighScattering::InitialiseProcess(), and G4EmTableUtil::PrepareEmProcess().

◆ SetEnergyOfCrossSectionMax()

void G4VEmProcess::SetEnergyOfCrossSectionMax ( std::vector< G4double > * ptr)
inline

Definition at line 686 of file G4VEmProcess.hh.

687{
689}

Referenced by G4EmTableUtil::BuildEmProcess().

◆ SetLambdaBinning()

void G4VEmProcess::SetLambdaBinning ( G4int nbins)

Definition at line 809 of file G4VEmProcess.cc.

810{
811 if(5 < n && n < 10000000) {
812 nLambdaBins = n;
813 actBinning = true;
814 } else {
815 G4double e = (G4double)n;
816 PrintWarning("SetLambdaBinning", e);
817 }
818}

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

◆ SetLambdaTable()

void G4VEmProcess::SetLambdaTable ( G4PhysicsTable * ptr)
inline

Definition at line 664 of file G4VEmProcess.hh.

665{
666 theLambdaTable = ptr;
667}

Referenced by G4EmTableUtil::BuildEmProcess().

◆ SetLambdaTablePrim()

void G4VEmProcess::SetLambdaTablePrim ( G4PhysicsTable * ptr)
inline

Definition at line 671 of file G4VEmProcess.hh.

672{
673 theLambdaTablePrim = ptr;
674}

Referenced by G4EmTableUtil::BuildEmProcess().

◆ SetMaxKinEnergy()

void G4VEmProcess::SetMaxKinEnergy ( G4double e)

Definition at line 834 of file G4VEmProcess.cc.

835{
836 if(minKinEnergy < e && e < 1.e+6*TeV) {
837 nLambdaBins = G4lrint(nLambdaBins*G4Log(e/minKinEnergy)
838 /G4Log(maxKinEnergy/minKinEnergy));
839 maxKinEnergy = e;
840 actMaxKinEnergy = true;
841 } else { PrintWarning("SetMaxKinEnergy", e); }
842}

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

◆ SetMinKinEnergy()

◆ SetMinKinEnergyPrim()

void G4VEmProcess::SetMinKinEnergyPrim ( G4double e)

Definition at line 846 of file G4VEmProcess.cc.

847{
848 if(theParameters->MinKinEnergy() <= e &&
849 e <= theParameters->MaxKinEnergy()) { minKinEnergyPrim = e; }
850 else { PrintWarning("SetMinKinEnergyPrim", e); }
851}
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 735 of file G4VEmProcess.hh.

736{
737 particle = p;
738 currentParticle = p;
739}

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

◆ SetSecondaryParticle()

◆ SetSplineFlag()

◆ SetStartFromNullFlag()

◆ StartTracking()

void G4VEmProcess::StartTracking ( G4Track * track)
overridevirtual

Reimplemented from G4VProcess.

Definition at line 332 of file G4VEmProcess.cc.

333{
334 // reset parameters for the new track
335 currentParticle = track->GetParticleDefinition();
338 preStepLambda = 0.0;
339
340 if(isIon) { massRatio = proton_mass_c2/currentParticle->GetPDGMass(); }
341
342 // forced biasing only for primary particles
343 if(biasManager) {
344 if(0 == track->GetParentID()) {
345 // primary particle
346 biasFlag = true;
348 }
349 }
350}
const G4ParticleDefinition * GetParticleDefinition() const

◆ StorePhysicsTable()

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

Reimplemented from G4VProcess.

Definition at line 641 of file G4VEmProcess.cc.

644{
645 if(!isTheMaster || part != particle) { return true; }
646 if(G4EmTableUtil::StoreTable(this, part, theLambdaTable,
647 directory, "Lambda",
648 verboseLevel, ascii) &&
649 G4EmTableUtil::StoreTable(this, part, theLambdaTablePrim,
650 directory, "LambdaPrim",
651 verboseLevel, ascii)) {
652 return true;
653 }
654 return false;
655}
static G4bool StoreTable(G4VProcess *, const G4ParticleDefinition *, G4PhysicsTable *, const G4String &dir, const G4String &tname, G4int verb, G4bool ascii)

Referenced by G4GammaGeneralProcess::StorePhysicsTable().

◆ StreamInfo()

void G4VEmProcess::StreamInfo ( std::ostream & outFile,
const G4ParticleDefinition & part,
G4bool rst = false ) const

Definition at line 264 of file G4VEmProcess.cc.

266{
267 G4String indent = (rst ? " " : "");
268 out << std::setprecision(6);
269 out << G4endl << indent << GetProcessName() << ": ";
270 if (!rst) {
271 out << " for " << part.GetParticleName();
272 }
273 if(fXSType != fEmNoIntegral) { out << " XStype:" << fXSType; }
274 if(applyCuts) { out << " applyCuts:1 "; }
275 out << " SubType=" << GetProcessSubType();
276 if(biasFactor != 1.0) { out << " BiasingFactor= " << biasFactor; }
277 out << " BuildTable=" << buildLambdaTable << G4endl;
278 if(buildLambdaTable) {
279 if(particle == &part) {
280 for(auto & v : *theLambdaTable) {
281 if(nullptr != v) {
282 out << " Lambda table from ";
283 G4double emin = v->Energy(0);
284 G4double emax = v->GetMaxEnergy();
285 G4int nbin = G4int(v->GetVectorLength() - 1);
286 if(emin > minKinEnergy) { out << "threshold "; }
287 else { out << G4BestUnit(emin,"Energy"); }
288 out << " to "
289 << G4BestUnit(emax,"Energy")
290 << ", " << G4lrint(nbin/std::log10(emax/emin))
291 << " bins/decade, spline: "
292 << splineFlag << G4endl;
293 break;
294 }
295 }
296 } else {
297 out << " Used Lambda table of "
298 << particle->GetParticleName() << G4endl;
299 }
300 }
301 if(minKinEnergyPrim < maxKinEnergy) {
302 if(particle == &part) {
303 for(auto & v : *theLambdaTablePrim) {
304 if(nullptr != v) {
305 out << " LambdaPrime table from "
306 << G4BestUnit(v->Energy(0),"Energy")
307 << " to "
308 << G4BestUnit(v->GetMaxEnergy(),"Energy")
309 << " in " << v->GetVectorLength()-1
310 << " bins " << G4endl;
311 break;
312 }
313 }
314 } else {
315 out << " Used LambdaPrime table of "
316 << particle->GetParticleName() << G4endl;
317 }
318 }
320 modelManager->DumpModelList(out, verboseLevel);
321
322 if(verboseLevel > 2 && buildLambdaTable) {
323 out << " LambdaTable address= " << theLambdaTable << G4endl;
324 if(theLambdaTable && particle == &part) {
325 out << (*theLambdaTable) << G4endl;
326 }
327 }
328}
#define G4BestUnit(a, b)
void DumpModelList(std::ostream &out, G4int verb)
virtual void StreamProcessInfo(std::ostream &) const

Referenced by G4EmTableUtil::BuildEmProcess(), and ProcessDescription().

◆ StreamProcessInfo()

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

Reimplemented in G4CoulombScattering, G4eeToHadrons, and G4eplusAnnihilation.

Definition at line 94 of file G4VEmProcess.hh.

94{};

Referenced by StreamInfo().

◆ UseBaseMaterial()

G4bool G4VEmProcess::UseBaseMaterial ( ) const
inline

Definition at line 778 of file G4VEmProcess.hh.

779{
780 return baseMat;
781}

Referenced by G4EmTableUtil::BuildEmProcess(), and G4GammaGeneralProcess::BuildPhysicsTable().

Member Data Documentation

◆ augerID

G4int G4VEmProcess::augerID = _AugerElectron
protected

Definition at line 404 of file G4VEmProcess.hh.

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

◆ basedCoupleIndex

◆ baseMat

◆ biasID

G4int G4VEmProcess::biasID = _EM
protected

Definition at line 405 of file G4VEmProcess.hh.

Referenced by G4eplusAnnihilation::AtRestDoIt().

◆ biasManager

◆ coupleIdxLambda

size_t G4VEmProcess::coupleIdxLambda = 0
protected

Definition at line 409 of file G4VEmProcess.hh.

◆ currentCouple

◆ currentCoupleIndex

◆ currentMaterial

◆ fluoID

G4int G4VEmProcess::fluoID = _Fluorescence
protected

Definition at line 403 of file G4VEmProcess.hh.

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

◆ fParticleChange

◆ idxLambda

size_t G4VEmProcess::idxLambda = 0
protected

Definition at line 410 of file G4VEmProcess.hh.

◆ isTheMaster

◆ mainSecondaries

G4int G4VEmProcess::mainSecondaries = 1
protected

◆ mfpKinEnergy

G4double G4VEmProcess::mfpKinEnergy = DBL_MAX
protected

◆ preStepKinEnergy

◆ preStepLambda

◆ secID

G4int G4VEmProcess::secID = _EM
protected

◆ secParticles

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

Definition at line 431 of file G4VEmProcess.hh.

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

◆ theEnergyOfCrossSectionMax

std::vector<G4double>* G4VEmProcess::theEnergyOfCrossSectionMax = nullptr
protected

◆ tripletID

G4int G4VEmProcess::tripletID = _TripletElectron
protected

Definition at line 406 of file G4VEmProcess.hh.

Referenced by PostStepDoIt(), and PreparePhysicsTable().


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