Geant4 11.1.1
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 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 &)
 
virtual G4double GetCrossSection (const G4double, const G4MaterialCutsCouple *)
 
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
 
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 const G4VProcessGetCreatorProcess () const
 
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
 
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
 
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

const G4MaterialCutsCouplecurrentCouple = nullptr
 
const G4MaterialcurrentMaterial = nullptr
 
G4EmBiasingManagerbiasManager = nullptr
 
std::vector< G4double > * theEnergyOfCrossSectionMax = nullptr
 
G4double mfpKinEnergy = DBL_MAX
 
G4double preStepKinEnergy = 0.0
 
G4double preStepLogKinEnergy = LOG_EKIN_MIN
 
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: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
G4bool isTheMaster
std::vector< G4DynamicParticle * > secParticles
G4ParticleChangeForGamma fParticleChange
void SetSecondaryWeightByProcess(G4bool)
void SetVerboseLevel(G4int value)
Definition: G4VProcess.hh:416
G4VParticleChange * pParticleChange
Definition: G4VProcess.hh:325

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

764{
765 if(nullptr == biasManager) { biasManager = new G4EmBiasingManager(); }
766 if(1 < verboseLevel) {
767 G4cout << "### ActivateForcedInteraction: for "
768 << particle->GetParticleName()
769 << " and process " << GetProcessName()
770 << " length(mm)= " << length/mm
771 << " in G4Region <" << r
772 << "> weightFlag= " << flag
773 << G4endl;
774 }
775 weightFlag = flag;
777}
#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:360
const G4String & GetProcessName() const
Definition: G4VProcess.hh:386

Referenced by G4EmExtraParameters::DefineRegParamForEM().

◆ ActivateSecondaryBiasing()

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

Definition at line 782 of file G4VEmProcess.cc.

785{
786 if (0.0 <= factor) {
787
788 // Range cut can be applied only for e-
789 if(0.0 == factor && secondaryParticle != G4Electron::Electron())
790 { return; }
791
793 biasManager->ActivateSecondaryBiasing(region, factor, energyLimit);
794 if(1 < verboseLevel) {
795 G4cout << "### ActivateSecondaryBiasing: for "
796 << " process " << GetProcessName()
797 << " factor= " << factor
798 << " in G4Region <" << region
799 << "> energyLimit(MeV)= " << energyLimit/MeV
800 << G4endl;
801 }
802 }
803}
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)
Definition: G4VEmModel.cc:390

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

◆ ApplyCuts()

G4bool G4VEmProcess::ApplyCuts ( ) const
inlineprotected

Definition at line 607 of file G4VEmProcess.hh.

608{
609 return applyCuts;
610}

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
Definition: G4VProcess.hh:522

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

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

◆ CrossSectionBiasingFactor()

G4double G4VEmProcess::CrossSectionBiasingFactor ( ) const
inline

Definition at line 635 of file G4VEmProcess.hh.

636{
637 return biasFactor;
638}

◆ CrossSectionType()

G4CrossSectionType G4VEmProcess::CrossSectionType ( ) const
inline

Definition at line 706 of file G4VEmProcess.hh.

707{
708 return fXSType;
709}

Referenced by G4EmTableUtil::BuildEmProcess().

◆ CurrentMaterialCutsCoupleIndex()

size_t G4VEmProcess::CurrentMaterialCutsCoupleIndex ( ) const
inlineprotected

Definition at line 444 of file G4VEmProcess.hh.

445{
446 return currentCoupleIndex;
447}

Referenced by G4eplusAnnihilation::AtRestDoIt().

◆ CurrentSetup()

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

Definition at line 578 of file G4VEmProcess.hh.

579{
580 DefineMaterial(couple);
581 SelectModel(energy*massRatio, currentCoupleIndex);
582}
void DefineMaterial(const G4MaterialCutsCouple *couple)

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

◆ DefineMaterial()

void G4VEmProcess::DefineMaterial ( const G4MaterialCutsCouple couple)
inlineprotected

Definition at line 472 of file G4VEmProcess.hh.

473{
474 if(couple != currentCouple) {
475 currentCouple = couple;
476 baseMaterial = currentMaterial = couple->GetMaterial();
478 fFactor = biasFactor;
480 if(baseMat) {
481 basedCoupleIndex = (*theDensityIdx)[currentCoupleIndex];
482 if(nullptr != currentMaterial->GetBaseMaterial())
483 baseMaterial = currentMaterial->GetBaseMaterial();
484 fFactor *= (*theDensityFactor)[currentCoupleIndex];
485 }
486 }
487}
const G4Material * GetMaterial() const
const G4Material * GetBaseMaterial() const
Definition: G4Material.hh:228
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 763 of file G4VEmProcess.hh.

764{
765 return (*theDensityFactor)[idx];
766}

Referenced by G4GammaGeneralProcess::PostStepGetPhysicalInteractionLength().

◆ DensityIndex()

G4int G4VEmProcess::DensityIndex ( G4int  idx) const
inlineprotected

Definition at line 756 of file G4VEmProcess.hh.

757{
758 return (*theDensityIdx)[idx];
759}

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

◆ EmModel()

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

Definition at line 798 of file G4VEmProcess.hh.

799{
800 return (index < emModels.size()) ? emModels[index] : nullptr;
801}

Referenced by G4EmCalculator::ComputeNuclearDEDX(), G4EmDNAChemistry::ConstructProcess(), G4EmDNAChemistry_option1::ConstructProcess(), G4EmDNAChemistry_option3::ConstructProcess(), G4EmDNAChemistry_option2::ConstructProcess(), G4DNAAttachment::InitialiseProcess(), G4DNAChargeDecrease::InitialiseProcess(), G4DNAChargeIncrease::InitialiseProcess(), G4DNADissociation::InitialiseProcess(), G4DNAElastic::InitialiseProcess(), G4DNAElectronSolvation::InitialiseProcess(), G4DNAIonisation::InitialiseProcess(), G4DNAPlasmonExcitation::InitialiseProcess(), G4DNAPositronium::InitialiseProcess(), G4NuclearStopping::InitialiseProcess(), G4DNAExcitation::InitialiseProcess(), G4DNARotExcitation::InitialiseProcess(), G4DNAVibExcitation::InitialiseProcess(), G4JAEAElasticScattering::InitialiseProcess(), G4MicroElecElastic::InitialiseProcess(), G4MicroElecInelastic::InitialiseProcess(), G4MicroElecLOPhononScattering::InitialiseProcess(), G4RayleighScattering::InitialiseProcess(), G4PolarizedCompton::InitialiseProcess(), G4PolarizedGammaConversion::InitialiseProcess(), G4PolarizedPhotoElectric::InitialiseProcess(), G4ComptonScattering::InitialiseProcess(), G4CoulombScattering::InitialiseProcess(), G4eplusAnnihilation::InitialiseProcess(), G4GammaConversion::InitialiseProcess(), G4PhotoElectricEffect::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 670 of file G4VEmProcess.hh.

671{
673}

Referenced by G4EmTableUtil::BuildEmProcess().

◆ GetCrossSection()

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

Reimplemented from G4VDiscreteProcess.

Definition at line 678 of file G4VEmProcess.cc.

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

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

◆ GetCurrentElement()

const G4Element * G4VEmProcess::GetCurrentElement ( ) const

Definition at line 720 of file G4VEmProcess.cc.

721{
722 return (nullptr != currentModel) ?
723 currentModel->GetCurrentElement(currentMaterial) : nullptr;
724}
const G4Element * GetCurrentElement(const G4Material *mat=nullptr) const
Definition: G4VEmModel.cc:242

Referenced by GetTargetIsotope().

◆ GetCurrentModel()

const G4VEmModel * G4VEmProcess::GetCurrentModel ( ) const
inline

Definition at line 777 of file G4VEmProcess.hh.

778{
779 return currentModel;
780}

◆ GetElectronEnergyCut()

G4double G4VEmProcess::GetElectronEnergyCut ( )
inlineprotected

Definition at line 465 of file G4VEmProcess.hh.

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

Referenced by G4eplusAnnihilation::AtRestDoIt().

◆ GetEmProcess()

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

Reimplemented in G4GammaGeneralProcess.

Definition at line 853 of file G4VEmProcess.cc.

854{
855 return (nam == GetProcessName()) ? this : nullptr;
856}

◆ GetGammaEnergyCut()

G4double G4VEmProcess::GetGammaEnergyCut ( )
inlineprotected

Definition at line 458 of file G4VEmProcess.hh.

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

Referenced by G4eplusAnnihilation::AtRestDoIt().

◆ GetLambda()

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

Definition at line 587 of file G4VEmProcess.hh.

589{
590 CurrentSetup(couple, kinEnergy);
591 return GetCurrentLambda(kinEnergy, logKinEnergy);
592}

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

◆ GetMeanFreePath()

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

Implements G4VDiscreteProcess.

Definition at line 687 of file G4VEmProcess.cc.

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

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

◆ GetModelByIndex()

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

Definition at line 805 of file G4VEmProcess.hh.

806{
807 return modelManager->GetModel(idx, ver);
808}
G4VEmModel * GetModel(G4int idx, G4bool ver=false) const

Referenced by G4EmTableUtil::BuildEmProcess().

◆ GetParticleChange()

G4ParticleChangeForGamma * G4VEmProcess::GetParticleChange ( )
inlineprotected

Definition at line 720 of file G4VEmProcess.hh.

721{
722 return &fParticleChange;
723}

◆ GetTargetElement()

const G4Element * G4VEmProcess::GetTargetElement ( ) const
protected

Definition at line 728 of file G4VEmProcess.cc.

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

◆ GetTargetIsotope()

const G4Isotope * G4VEmProcess::GetTargetIsotope ( ) const
protected

Definition at line 736 of file G4VEmProcess.cc.

737{
738 return (nullptr != currentModel) ?
739 currentModel->GetCurrentIsotope(GetCurrentElement()) : nullptr;
740}
const G4Isotope * GetCurrentIsotope(const G4Element *elm=nullptr) const
Definition: G4VEmModel.cc:261
const G4Element * GetCurrentElement() const

◆ InitialiseProcess()

◆ IsApplicable()

◆ LambdaBinning()

G4int G4VEmProcess::LambdaBinning ( ) const
inlineprotected

Definition at line 614 of file G4VEmProcess.hh.

615{
616 return nLambdaBins;
617}

◆ LambdaPhysicsVector()

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

Definition at line 710 of file G4VEmProcess.cc.

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

◆ LambdaTable()

G4PhysicsTable * G4VEmProcess::LambdaTable ( ) const
inline

Definition at line 642 of file G4VEmProcess.hh.

643{
644 return theLambdaTable;
645}

Referenced by G4EmTableUtil::BuildEmProcess().

◆ LambdaTablePrim()

G4PhysicsTable * G4VEmProcess::LambdaTablePrim ( ) const
inline

Definition at line 649 of file G4VEmProcess.hh.

650{
651 return theLambdaTablePrim;
652}

Referenced by G4EmTableUtil::BuildEmProcess().

◆ MaterialCutsCouple()

const G4MaterialCutsCouple * G4VEmProcess::MaterialCutsCouple ( ) const
inlineprotected

Definition at line 451 of file G4VEmProcess.hh.

452{
453 return currentCouple;
454}

Referenced by G4eplusAnnihilation::AtRestDoIt().

◆ MaxKinEnergy()

G4double G4VEmProcess::MaxKinEnergy ( ) const
inlineprotected

Definition at line 628 of file G4VEmProcess.hh.

629{
630 return maxKinEnergy;
631}

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

◆ MeanFreePath()

G4double G4VEmProcess::MeanFreePath ( const G4Track track)
inline

Definition at line 596 of file G4VEmProcess.hh.

597{
598 const G4double kinEnergy = track.GetKineticEnergy();
599 CurrentSetup(track.GetMaterialCutsCouple(), kinEnergy);
600 const G4double xs = GetCurrentLambda(kinEnergy,
602 return (0.0 < xs) ? 1.0/xs : DBL_MAX;
603}
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 621 of file G4VEmProcess.hh.

622{
623 return minKinEnergy;
624}

Referenced by G4eplusAnnihilation::InitialiseProcess().

◆ NumberOfModels()

G4int G4VEmProcess::NumberOfModels ( ) const
inline

Definition at line 791 of file G4VEmProcess.hh.

792{
793 return numberOfModels;
794}

◆ operator=()

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

◆ Particle()

const G4ParticleDefinition * G4VEmProcess::Particle ( ) const
inline

Definition at line 685 of file G4VEmProcess.hh.

686{
687 return particle;
688}

◆ PolarAngleLimit()

G4double G4VEmProcess::PolarAngleLimit ( ) const
inlineprotected

Definition at line 860 of file G4VEmProcess.cc.

861{
862 return theParameters->MscThetaLimit();
863}
G4double MscThetaLimit() const

◆ PostStepDoIt()

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

Reimplemented from G4VDiscreteProcess.

Definition at line 458 of file G4VEmProcess.cc.

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

◆ PostStepGetPhysicalInteractionLength()

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

Reimplemented from G4VDiscreteProcess.

Definition at line 353 of file G4VEmProcess.cc.

357{
359 G4double x = DBL_MAX;
360
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)) {
373 return x;
374 }
375
376 // forced biasing only for primary particles
377 if(biasManager) {
378 if(0 == track.GetParentID()) {
379 if(biasFlag &&
381 return biasManager->GetStepLimit((G4int)currentCoupleIndex, previousStepSize);
382 }
383 }
384 }
385
386 // compute mean free path
387 ComputeIntegralLambda(preStepKinEnergy, preStepLogKinEnergy);
388
389 // zero cross section
390 if(preStepLambda <= 0.0) {
393
394 } else {
395
396 // non-zero cross section
398
399 // beggining of tracking (or just after DoIt of this process)
402
403 } else {
404
406 previousStepSize/currentInteractionLength;
409 }
410
411 // new mean free path and step limit for the next step
414 }
415 return x;
416}
G4double GetStepLimit(G4int coupleIdx, G4double previousStep)
G4int GetParentID() const
G4double preStepLogKinEnergy
G4double preStepKinEnergy
G4double currentInteractionLength
Definition: G4VProcess.hh:339
G4double theInitialNumberOfInteractionLength
Definition: G4VProcess.hh:342

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, isTheMaster);
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()
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
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 657 of file G4VEmProcess.cc.

660{
661 if(!isTheMaster || part != particle) { return true; }
662 G4bool yes = true;
663 if(buildLambdaTable) {
664 yes = G4EmTableUtil::RetrieveTable(this, part, theLambdaTable, dir,
665 "Lambda", verboseLevel,
666 ascii, splineFlag);
667 }
668 if(yes && minKinEnergyPrim < maxKinEnergy) {
669 yes = G4EmTableUtil::RetrieveTable(this, part, theLambdaTablePrim, dir,
670 "LambdaPrim", verboseLevel,
671 ascii, splineFlag);
672 }
673 return yes;
674}
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 692 of file G4VEmProcess.hh.

693{
694 return secondaryParticle;
695}

◆ SelectModel()

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

Definition at line 492 of file G4VEmProcess.hh.

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

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

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

◆ SetBuildTableFlag()

◆ SetCrossSectionBiasingFactor()

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

Definition at line 744 of file G4VEmProcess.cc.

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

Referenced by G4EmExtraParameters::DefineRegParamForEM().

◆ SetCrossSectionType()

◆ SetEmMasterProcess()

void G4VEmProcess::SetEmMasterProcess ( const G4VEmProcess ptr)
inline

Definition at line 784 of file G4VEmProcess.hh.

785{
786 masterProc = ptr;
787}

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 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(), G4DNAAttachment::InitialiseProcess(), G4DNAChargeDecrease::InitialiseProcess(), G4DNAChargeIncrease::InitialiseProcess(), G4DNADissociation::InitialiseProcess(), G4DNAElastic::InitialiseProcess(), G4DNAElectronSolvation::InitialiseProcess(), G4DNAIonisation::InitialiseProcess(), G4DNAPlasmonExcitation::InitialiseProcess(), G4DNAPositronium::InitialiseProcess(), G4NuclearStopping::InitialiseProcess(), G4DNAExcitation::InitialiseProcess(), G4DNARotExcitation::InitialiseProcess(), G4DNAVibExcitation::InitialiseProcess(), G4eeToHadrons::InitialiseProcess(), G4JAEAElasticScattering::InitialiseProcess(), G4MicroElecElastic::InitialiseProcess(), G4MicroElecInelastic::InitialiseProcess(), G4MicroElecLOPhononScattering::InitialiseProcess(), G4RayleighScattering::InitialiseProcess(), G4PolarizedCompton::InitialiseProcess(), G4PolarizedGammaConversion::InitialiseProcess(), G4PolarizedPhotoElectric::InitialiseProcess(), G4ComptonScattering::InitialiseProcess(), G4CoulombScattering::InitialiseProcess(), G4eplusAnnihilation::InitialiseProcess(), G4GammaConversion::InitialiseProcess(), G4PhotoElectricEffect::InitialiseProcess(), and G4EmTableUtil::PrepareEmProcess().

◆ SetEnergyOfCrossSectionMax()

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

Definition at line 678 of file G4VEmProcess.hh.

679{
681}

Referenced by G4EmTableUtil::BuildEmProcess().

◆ SetLambdaBinning()

void G4VEmProcess::SetLambdaBinning ( G4int  nbins)

Definition at line 807 of file G4VEmProcess.cc.

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

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

◆ SetLambdaTable()

void G4VEmProcess::SetLambdaTable ( G4PhysicsTable ptr)
inline

Definition at line 656 of file G4VEmProcess.hh.

657{
658 theLambdaTable = ptr;
659}

Referenced by G4EmTableUtil::BuildEmProcess().

◆ SetLambdaTablePrim()

void G4VEmProcess::SetLambdaTablePrim ( G4PhysicsTable ptr)
inline

Definition at line 663 of file G4VEmProcess.hh.

664{
665 theLambdaTablePrim = ptr;
666}

Referenced by G4EmTableUtil::BuildEmProcess().

◆ SetMaxKinEnergy()

void G4VEmProcess::SetMaxKinEnergy ( G4double  e)

Definition at line 832 of file G4VEmProcess.cc.

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

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

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

728{
729 particle = p;
730 currentParticle = p;
731}

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
339 if(isIon) { massRatio = proton_mass_c2/currentParticle->GetPDGMass(); }
340
341 // forced biasing only for primary particles
342 if(biasManager) {
343 if(0 == track->GetParentID()) {
344 // primary particle
345 biasFlag = true;
347 }
348 }
349}
const G4ParticleDefinition * GetParticleDefinition() const

◆ StorePhysicsTable()

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

Reimplemented from G4VProcess.

Definition at line 639 of file G4VEmProcess.cc.

642{
643 if(!isTheMaster || part != particle) { return true; }
644 if(G4EmTableUtil::StoreTable(this, part, theLambdaTable,
645 directory, "Lambda",
646 verboseLevel, ascii) &&
647 G4EmTableUtil::StoreTable(this, part, theLambdaTablePrim,
648 directory, "LambdaPrim",
649 verboseLevel, ascii)) {
650 return true;
651 }
652 return false;
653}
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
Definition: G4VEmProcess.hh:94

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

◆ StreamProcessInfo()

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

Reimplemented in G4eeToHadrons, G4CoulombScattering, and G4eplusAnnihilation.

Definition at line 94 of file G4VEmProcess.hh.

94{};

Referenced by StreamInfo().

◆ UseBaseMaterial()

G4bool G4VEmProcess::UseBaseMaterial ( ) const
inline

Definition at line 770 of file G4VEmProcess.hh.

771{
772 return baseMat;
773}

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

Member Data Documentation

◆ augerID

G4int G4VEmProcess::augerID = _AugerElectron
protected

Definition at line 403 of file G4VEmProcess.hh.

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

◆ basedCoupleIndex

◆ baseMat

◆ biasID

G4int G4VEmProcess::biasID = _EM
protected

Definition at line 404 of file G4VEmProcess.hh.

Referenced by G4eplusAnnihilation::AtRestDoIt().

◆ biasManager

◆ coupleIdxLambda

size_t G4VEmProcess::coupleIdxLambda = 0
protected

Definition at line 408 of file G4VEmProcess.hh.

◆ currentCouple

◆ currentCoupleIndex

◆ currentMaterial

◆ fluoID

G4int G4VEmProcess::fluoID = _Fluorescence
protected

Definition at line 402 of file G4VEmProcess.hh.

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

◆ fParticleChange

◆ idxLambda

size_t G4VEmProcess::idxLambda = 0
protected

Definition at line 409 of file G4VEmProcess.hh.

◆ isTheMaster

◆ mainSecondaries

G4int G4VEmProcess::mainSecondaries = 1
protected

◆ mfpKinEnergy

G4double G4VEmProcess::mfpKinEnergy = DBL_MAX
protected

Definition at line 386 of file G4VEmProcess.hh.

Referenced by DefineMaterial(), PostStepDoIt(), and StartTracking().

◆ preStepKinEnergy

◆ preStepLambda

◆ preStepLogKinEnergy

G4double G4VEmProcess::preStepLogKinEnergy = LOG_EKIN_MIN
protected

Definition at line 388 of file G4VEmProcess.hh.

Referenced by PostStepGetPhysicalInteractionLength().

◆ secID

G4int G4VEmProcess::secID = _EM
protected

◆ secParticles

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

Definition at line 430 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 405 of file G4VEmProcess.hh.

Referenced by PostStepDoIt(), and PreparePhysicsTable().


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