Geant4-11
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Static Private Attributes
G4LowEPPolarizedComptonModel Class Reference

#include <G4LowEPPolarizedComptonModel.hh>

Inheritance diagram for G4LowEPPolarizedComptonModel:
G4VEmModel

Public Member Functions

virtual G4double ChargeSquareRatio (const G4Track &)
 
G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, const G4Element *, G4double kinEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0, G4double cut=0, G4double emax=DBL_MAX) override
 
virtual G4double ComputeCrossSectionPerShell (const G4ParticleDefinition *, G4int Z, G4int shellIdx, G4double kinEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4double ComputeDEDX (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
 
virtual G4double ComputeDEDXPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
 
G4double ComputeMeanFreePath (const G4ParticleDefinition *, G4double kineticEnergy, const G4Material *, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
virtual void CorrectionsAlongStep (const G4MaterialCutsCouple *, const G4DynamicParticle *, const G4double &length, G4double &eloss)
 
G4double CrossSection (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
virtual G4double CrossSectionPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4bool DeexcitationFlag () const
 
virtual void DefineForRegion (const G4Region *)
 
virtual void FillNumberOfSecondaries (G4int &numberOfTriplets, G4int &numberOfRecoil)
 
G4bool ForceBuildTableFlag () const
 
 G4LowEPPolarizedComptonModel (const G4LowEPPolarizedComptonModel &)=delete
 
 G4LowEPPolarizedComptonModel (const G4ParticleDefinition *p=nullptr, const G4String &nam="LowEPComptonModel")
 
G4VEmAngularDistributionGetAngularDistribution ()
 
virtual G4double GetChargeSquareRatio (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
G4PhysicsTableGetCrossSectionTable ()
 
const G4ElementGetCurrentElement () const
 
const G4IsotopeGetCurrentIsotope () const
 
G4ElementDataGetElementData ()
 
std::vector< G4EmElementSelector * > * GetElementSelectors ()
 
G4VEmFluctuationModelGetModelOfFluctuations ()
 
const G4StringGetName () const
 
virtual G4double GetPartialCrossSection (const G4Material *, G4int level, const G4ParticleDefinition *, G4double kineticEnergy)
 
virtual G4double GetParticleCharge (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
G4VEmModelGetTripletModel ()
 
G4double HighEnergyActivationLimit () const
 
G4double HighEnergyLimit () const
 
void Initialise (const G4ParticleDefinition *, const G4DataVector &) override
 
void InitialiseElementSelectors (const G4ParticleDefinition *, const G4DataVector &)
 
void InitialiseForElement (const G4ParticleDefinition *, G4int Z) override
 
virtual void InitialiseForMaterial (const G4ParticleDefinition *, const G4Material *)
 
void InitialiseLocal (const G4ParticleDefinition *, G4VEmModel *masterModel) override
 
G4bool IsActive (G4double kinEnergy) const
 
G4bool IsLocked () const
 
G4bool IsMaster () const
 
G4double LowEnergyActivationLimit () const
 
G4double LowEnergyLimit () const
 
G4bool LPMFlag () const
 
G4double MaxSecondaryKinEnergy (const G4DynamicParticle *dynParticle)
 
virtual G4double MinEnergyCut (const G4ParticleDefinition *, const G4MaterialCutsCouple *)
 
virtual G4double MinPrimaryEnergy (const G4Material *, const G4ParticleDefinition *, G4double cut=0.0)
 
virtual void ModelDescription (std::ostream &outFile) const
 
G4LowEPPolarizedComptonModeloperator= (const G4LowEPPolarizedComptonModel &right)=delete
 
G4double PolarAngleLimit () const
 
void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
 
G4double SecondaryThreshold () const
 
G4int SelectIsotopeNumber (const G4Element *)
 
const G4ElementSelectRandomAtom (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
const G4ElementSelectRandomAtom (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4int SelectRandomAtomNumber (const G4Material *)
 
const G4ElementSelectTargetAtom (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double logKineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
void SetActivationHighEnergyLimit (G4double)
 
void SetActivationLowEnergyLimit (G4double)
 
void SetAngularDistribution (G4VEmAngularDistribution *)
 
void SetAngularGeneratorFlag (G4bool)
 
void SetCrossSectionTable (G4PhysicsTable *, G4bool isLocal)
 
void SetCurrentCouple (const G4MaterialCutsCouple *)
 
void SetDeexcitationFlag (G4bool val)
 
void SetElementSelectors (std::vector< G4EmElementSelector * > *)
 
void SetFluctuationFlag (G4bool val)
 
void SetForceBuildTable (G4bool val)
 
void SetHighEnergyLimit (G4double)
 
void SetLocked (G4bool)
 
void SetLowEnergyLimit (G4double)
 
void SetLPMFlag (G4bool val)
 
void SetMasterThread (G4bool val)
 
void SetParticleChange (G4VParticleChange *, G4VEmFluctuationModel *f=nullptr)
 
void SetPolarAngleLimit (G4double)
 
void SetSecondaryThreshold (G4double)
 
void SetTripletModel (G4VEmModel *)
 
virtual void SetupForMaterial (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
void SetUseBaseMaterials (G4bool val)
 
virtual void StartTracking (G4Track *)
 
G4bool UseAngularGeneratorFlag () const
 
G4bool UseBaseMaterials () const
 
virtual G4double Value (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy)
 
virtual ~G4LowEPPolarizedComptonModel ()
 

Protected Member Functions

const G4MaterialCutsCoupleCurrentCouple () const
 
G4ParticleChangeForGammaGetParticleChangeForGamma ()
 
G4ParticleChangeForLossGetParticleChangeForLoss ()
 
virtual G4double MaxSecondaryEnergy (const G4ParticleDefinition *, G4double kineticEnergy)
 
void SetCurrentElement (const G4Element *)
 

Protected Attributes

size_t basedCoupleIndex = 0
 
size_t currentCoupleIndex = 0
 
G4ElementDatafElementData = nullptr
 
G4double inveplus
 
G4bool lossFlucFlag = true
 
const G4MaterialpBaseMaterial = nullptr
 
G4double pFactor = 1.0
 
G4VParticleChangepParticleChange = nullptr
 
const std::vector< G4double > * theDensityFactor = nullptr
 
const std::vector< G4int > * theDensityIdx = nullptr
 
G4PhysicsTablexSectionTable = nullptr
 

Private Member Functions

G4double ComputeScatteringFunction (G4double x, G4int Z)
 
G4ThreeVector GetPerpendicularPolarization (const G4ThreeVector &direction0, const G4ThreeVector &polarization0) const
 
G4ThreeVector GetRandomPolarization (G4ThreeVector &direction0)
 
void ReadData (size_t Z, const char *path=0)
 
G4ThreeVector SetNewPolarization (G4double LowEPPCepsilon, G4double sinT2, G4double phi, G4double cosTheta)
 
G4ThreeVector SetPerpendicularVector (G4ThreeVector &a)
 
G4double SetPhi (G4double, G4double)
 
void SystemOfRefChange (G4ThreeVector &direction0, G4ThreeVector &direction1, G4ThreeVector &polarization0, G4ThreeVector &polarization1)
 
void SystemOfRefChangeElect (G4ThreeVector &pdirection, G4ThreeVector &edirection, G4ThreeVector &ppolarization)
 

Private Attributes

G4VEmAngularDistributionanglModel = nullptr
 
std::vector< G4EmElementSelector * > * elmSelectors = nullptr
 
G4double eMaxActive = DBL_MAX
 
G4double eMinActive = 0.0
 
G4VAtomDeexcitationfAtomDeexcitation
 
const G4MaterialCutsCouplefCurrentCouple = nullptr
 
const G4ElementfCurrentElement = nullptr
 
const G4IsotopefCurrentIsotope = nullptr
 
G4LossTableManagerfEmManager
 
G4bool flagDeexcitation = false
 
G4bool flagForceBuildTable = false
 
G4VEmFluctuationModelflucModel = nullptr
 
G4ParticleChangeForGammafParticleChange
 
G4VEmModelfTripletModel = nullptr
 
G4double highLimit
 
G4bool isInitialised
 
G4bool isLocked = false
 
G4bool isMaster = true
 
G4bool localElmSelectors = true
 
G4bool localTable = true
 
G4double lowLimit
 
const G4String name
 
G4int nsec = 5
 
G4int nSelectors = 0
 
G4double polarAngleLimit
 
G4double secondaryThreshold = DBL_MAX
 
G4bool theLPMflag = false
 
G4bool useAngularGenerator = false
 
G4bool useBaseMaterials = false
 
G4int verboseLevel
 
std::vector< G4doublexsec
 

Static Private Attributes

static G4PhysicsFreeVectordata [100] = {nullptr}
 
static const G4int maxZ = 99
 
static G4DopplerProfileprofileData = nullptr
 
static const G4double ScatFuncFitParam [101][9]
 
static G4ShellDatashellData = nullptr
 

Detailed Description

Definition at line 91 of file G4LowEPPolarizedComptonModel.hh.

Constructor & Destructor Documentation

◆ G4LowEPPolarizedComptonModel() [1/2]

G4LowEPPolarizedComptonModel::G4LowEPPolarizedComptonModel ( const G4ParticleDefinition p = nullptr,
const G4String nam = "LowEPComptonModel" 
)
explicit

Definition at line 85 of file G4LowEPPolarizedComptonModel.cc.

87 : G4VEmModel(nam),isInitialised(false)
88{
89 verboseLevel=1 ;
90 // Verbosity scale:
91 // 0 = nothing
92 // 1 = warning for energy non-conservation
93 // 2 = details of energy budget
94 // 3 = calculation of cross sections, file openings, sampling of atoms
95 // 4 = entering in methods
96
97 if( verboseLevel>1 ) {
98 G4cout << "Low energy photon Compton model is constructed " << G4endl;
99 }
100
101 //Mark this model as "applicable" for atomic deexcitation
103
104 fParticleChange = nullptr;
105 fAtomDeexcitation = nullptr;
106}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
G4ParticleChangeForGamma * fParticleChange
void SetDeexcitationFlag(G4bool val)
Definition: G4VEmModel.hh:823
G4VEmModel(const G4String &nam)
Definition: G4VEmModel.cc:66

References fAtomDeexcitation, fParticleChange, G4cout, G4endl, G4VEmModel::SetDeexcitationFlag(), and verboseLevel.

◆ ~G4LowEPPolarizedComptonModel()

G4LowEPPolarizedComptonModel::~G4LowEPPolarizedComptonModel ( )
virtual

Definition at line 110 of file G4LowEPPolarizedComptonModel.cc.

111{
112 if(IsMaster()) {
113 delete shellData;
114 shellData = nullptr;
115 delete profileData;
116 profileData = nullptr;
117 }
118}
G4bool IsMaster() const
Definition: G4VEmModel.hh:746

References G4VEmModel::IsMaster(), profileData, and shellData.

◆ G4LowEPPolarizedComptonModel() [2/2]

G4LowEPPolarizedComptonModel::G4LowEPPolarizedComptonModel ( const G4LowEPPolarizedComptonModel )
delete

Member Function Documentation

◆ ChargeSquareRatio()

G4double G4VEmModel::ChargeSquareRatio ( const G4Track track)
virtualinherited

Reimplemented in G4BraggIonGasModel, and G4BetheBlochIonGasModel.

Definition at line 374 of file G4VEmModel.cc.

375{
377 track.GetMaterial(), track.GetKineticEnergy());
378}
const G4ParticleDefinition * GetParticleDefinition() const
G4Material * GetMaterial() const
G4double GetKineticEnergy() const
virtual G4double GetChargeSquareRatio(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
Definition: G4VEmModel.cc:382

References G4VEmModel::GetChargeSquareRatio(), G4Track::GetKineticEnergy(), G4Track::GetMaterial(), and G4Track::GetParticleDefinition().

Referenced by G4VEnergyLossProcess::PostStepGetPhysicalInteractionLength().

◆ ComputeCrossSectionPerAtom() [1/2]

G4double G4VEmModel::ComputeCrossSectionPerAtom ( const G4ParticleDefinition part,
const G4Element elm,
G4double  kinEnergy,
G4double  cutEnergy = 0.0,
G4double  maxEnergy = DBL_MAX 
)
inlineinherited

Definition at line 566 of file G4VEmModel.hh.

571{
573 return ComputeCrossSectionPerAtom(part,kinEnergy,elm->GetZ(),elm->GetN(),
574 cutEnergy,maxEnergy);
575}
G4double GetZ() const
Definition: G4Element.hh:131
G4double GetN() const
Definition: G4Element.hh:135
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0., G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
Definition: G4VEmModel.cc:341
void SetCurrentElement(const G4Element *)
Definition: G4VEmModel.hh:497

References G4VEmModel::ComputeCrossSectionPerAtom(), G4Element::GetN(), G4Element::GetZ(), and G4VEmModel::SetCurrentElement().

◆ ComputeCrossSectionPerAtom() [2/2]

G4double G4LowEPPolarizedComptonModel::ComputeCrossSectionPerAtom ( const G4ParticleDefinition ,
G4double  kinEnergy,
G4double  Z,
G4double  A = 0,
G4double  cut = 0,
G4double  emax = DBL_MAX 
)
overridevirtual

Reimplemented from G4VEmModel.

Definition at line 244 of file G4LowEPPolarizedComptonModel.cc.

248{
249 if (verboseLevel > 3) {
250 G4cout << "G4LowEPPolarizedComptonModel::ComputeCrossSectionPerAtom()"
251 << G4endl;
252 }
253 G4double cs = 0.0;
254
255 if (GammaEnergy < LowEnergyLimit()) { return 0.0; }
256
257 G4int intZ = G4lrint(Z);
258 if(intZ < 1 || intZ > maxZ) { return cs; }
259
260 G4PhysicsFreeVector* pv = data[intZ];
261
262 // if element was not initialised
263 // do initialisation safely for MT mode
264 if(!pv)
265 {
266 InitialiseForElement(0, intZ);
267 pv = data[intZ];
268 if(!pv) { return cs; }
269 }
270
271 G4int n = pv->GetVectorLength() - 1;
272 G4double e1 = pv->Energy(0);
273 G4double e2 = pv->Energy(n);
274
275 if(GammaEnergy <= e1) { cs = GammaEnergy/(e1*e1)*pv->Value(e1); }
276 else if(GammaEnergy <= e2) { cs = pv->Value(GammaEnergy)/GammaEnergy; }
277 else if(GammaEnergy > e2) { cs = pv->Value(e2)/GammaEnergy; }
278
279 return cs;
280}
static const G4double e1[44]
static const G4double e2[44]
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
const G4int Z[17]
static G4PhysicsFreeVector * data[100]
void InitialiseForElement(const G4ParticleDefinition *, G4int Z) override
G4double Energy(const std::size_t index) const
G4double Value(const G4double energy, std::size_t &lastidx) const
std::size_t GetVectorLength() const
G4double LowEnergyLimit() const
Definition: G4VEmModel.hh:662
int G4lrint(double ad)
Definition: templates.hh:134

References data, e1, e2, G4PhysicsVector::Energy(), G4cout, G4endl, G4lrint(), G4PhysicsVector::GetVectorLength(), InitialiseForElement(), G4VEmModel::LowEnergyLimit(), maxZ, CLHEP::detail::n, G4PhysicsVector::Value(), verboseLevel, and Z.

◆ ComputeCrossSectionPerShell()

G4double G4VEmModel::ComputeCrossSectionPerShell ( const G4ParticleDefinition ,
G4int  Z,
G4int  shellIdx,
G4double  kinEnergy,
G4double  cutEnergy = 0.0,
G4double  maxEnergy = DBL_MAX 
)
virtualinherited

Definition at line 351 of file G4VEmModel.cc.

354{
355 return 0.0;
356}

Referenced by G4EmCalculator::ComputeCrossSectionPerShell().

◆ ComputeDEDX()

G4double G4VEmModel::ComputeDEDX ( const G4MaterialCutsCouple couple,
const G4ParticleDefinition part,
G4double  kineticEnergy,
G4double  cutEnergy = DBL_MAX 
)
inlineinherited

Definition at line 528 of file G4VEmModel.hh.

532{
533 SetCurrentCouple(couple);
534 return pFactor*ComputeDEDXPerVolume(pBaseMaterial,part,kinEnergy,cutEnergy);
535}
void SetCurrentCouple(const G4MaterialCutsCouple *)
Definition: G4VEmModel.hh:472
const G4Material * pBaseMaterial
Definition: G4VEmModel.hh:427
G4double pFactor
Definition: G4VEmModel.hh:432
virtual G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
Definition: G4VEmModel.cc:228

References G4VEmModel::ComputeDEDXPerVolume(), G4VEmModel::pBaseMaterial, G4VEmModel::pFactor, and G4VEmModel::SetCurrentCouple().

◆ ComputeDEDXPerVolume()

G4double G4VEmModel::ComputeDEDXPerVolume ( const G4Material ,
const G4ParticleDefinition ,
G4double  kineticEnergy,
G4double  cutEnergy = DBL_MAX 
)
virtualinherited

◆ ComputeMeanFreePath()

G4double G4VEmModel::ComputeMeanFreePath ( const G4ParticleDefinition part,
G4double  kineticEnergy,
const G4Material material,
G4double  cutEnergy = 0.0,
G4double  maxEnergy = DBL_MAX 
)
inlineinherited

Definition at line 553 of file G4VEmModel.hh.

558{
559 G4double cross = CrossSectionPerVolume(material,part,ekin,emin,emax);
560 return (cross > 0.0) ? 1./cross : DBL_MAX;
561}
static const G4double emax
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
Definition: G4VEmModel.cc:237
string material
Definition: eplot.py:19
#define DBL_MAX
Definition: templates.hh:62

References G4VEmModel::CrossSectionPerVolume(), DBL_MAX, emax, and eplot::material.

◆ ComputeScatteringFunction()

G4double G4LowEPPolarizedComptonModel::ComputeScatteringFunction ( G4double  x,
G4int  Z 
)
private

Definition at line 662 of file G4LowEPPolarizedComptonModel.cc.

663{
664 G4double value = Z;
665 if (x <= ScatFuncFitParam[Z][2]) {
666
667 G4double lgq = G4Log(x)/ln10;
668
669 if (lgq < ScatFuncFitParam[Z][1]) {
670 value = ScatFuncFitParam[Z][3] + lgq*ScatFuncFitParam[Z][4];
671 } else {
672 value = ScatFuncFitParam[Z][5] + lgq*ScatFuncFitParam[Z][6] +
673 lgq*lgq*ScatFuncFitParam[Z][7] + lgq*lgq*lgq*ScatFuncFitParam[Z][8];
674 }
675 value = G4Exp(value*ln10);
676 }
677 return value;
678}
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:179
G4double G4Log(G4double x)
Definition: G4Log.hh:226
static const G4double ln10
static const G4double ScatFuncFitParam[101][9]

References G4Exp(), G4Log(), ln10, ScatFuncFitParam, and Z.

Referenced by SampleSecondaries().

◆ CorrectionsAlongStep()

void G4VEmModel::CorrectionsAlongStep ( const G4MaterialCutsCouple ,
const G4DynamicParticle ,
const G4double length,
G4double eloss 
)
virtualinherited

◆ CrossSection()

G4double G4VEmModel::CrossSection ( const G4MaterialCutsCouple couple,
const G4ParticleDefinition part,
G4double  kineticEnergy,
G4double  cutEnergy = 0.0,
G4double  maxEnergy = DBL_MAX 
)
inlineinherited

◆ CrossSectionPerVolume()

G4double G4VEmModel::CrossSectionPerVolume ( const G4Material mat,
const G4ParticleDefinition p,
G4double  kineticEnergy,
G4double  cutEnergy = 0.0,
G4double  maxEnergy = DBL_MAX 
)
virtualinherited

Reimplemented in G4LivermorePhotoElectricModel, G4PAIModel, G4PAIPhotModel, G4BetheBlochNoDeltaModel, G4BraggNoDeltaModel, G4eeToHadronsModel, G4eeToHadronsMultiModel, G4ICRU73NoDeltaModel, G4MuBetheBlochModel, G4AtimaEnergyLossModel, G4BetheBlochModel, G4BraggIonModel, G4BraggModel, G4ICRU73QOModel, G4LindhardSorensenIonModel, G4MollerBhabhaModel, G4PEEffectFluoModel, G4PenelopeRayleighModelMI, G4LEPTSAttachmentModel, G4LEPTSDissociationModel, G4LEPTSElasticModel, G4LEPTSExcitationModel, G4LEPTSIonisationModel, G4LEPTSPositroniumModel, G4LEPTSRotExcitationModel, G4LEPTSVibExcitationModel, G4eplusTo2GammaOKVIModel, G4eplusTo3GammaOKVIModel, G4PenelopeComptonModel, G4eeToTwoGammaModel, G4GoudsmitSaundersonMscModel, G4IonParametrisedLossModel, G4DNABornExcitationModel1, G4DNABornExcitationModel2, G4DNABornIonisationModel1, G4DNABornIonisationModel2, G4DNAChampionElasticModel, G4DNACPA100ElasticModel, G4DNACPA100ExcitationModel, G4DNACPA100IonisationModel, G4DNADingfelderChargeDecreaseModel, G4DNADingfelderChargeIncreaseModel, G4DNADiracRMatrixExcitationModel, G4DNAEmfietzoglouExcitationModel, G4DNAEmfietzoglouIonisationModel, G4DNAIonElasticModel, G4DNAMeltonAttachmentModel, G4DNAMillerGreenExcitationModel, G4DNAModelInterface, G4TDNAOneStepThermalizationModel< MODEL >, G4DNAQuinnPlasmonExcitationModel, G4DNARelativisticIonisationModel, G4DNARuddIonisationExtendedModel, G4DNARuddIonisationModel, G4DNASancheExcitationModel, G4DNAScreenedRutherfordElasticModel, G4DNATransformElectronModel, G4DNAUeharaScreenedRutherfordElasticModel, G4MicroElecElasticModel, G4MicroElecElasticModel_new, G4MicroElecInelasticModel, G4MicroElecInelasticModel_new, G4MicroElecLOPhononModel, G4DNAELSEPAElasticModel, G4PenelopeBremsstrahlungModel, and G4PenelopeIonisationModel.

Definition at line 237 of file G4VEmModel.cc.

242{
243 SetupForMaterial(p, mat, ekin);
244 const G4double* theAtomNumDensityVector = mat->GetVecNbOfAtomsPerVolume();
245 G4int nelm = mat->GetNumberOfElements();
246 if(nelm > nsec) {
247 xsec.resize(nelm);
248 nsec = nelm;
249 }
250 G4double cross = 0.0;
251 for (G4int i=0; i<nelm; ++i) {
252 cross += theAtomNumDensityVector[i]*
253 ComputeCrossSectionPerAtom(p,mat->GetElement(i),ekin,emin,emax);
254 xsec[i] = cross;
255 }
256 return cross;
257}
const G4Element * GetElement(G4int iel) const
Definition: G4Material.hh:198
size_t GetNumberOfElements() const
Definition: G4Material.hh:182
const G4double * GetVecNbOfAtomsPerVolume() const
Definition: G4Material.hh:202
std::vector< G4double > xsec
Definition: G4VEmModel.hh:466
G4int nsec
Definition: G4VEmModel.hh:444
virtual void SetupForMaterial(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
Definition: G4VEmModel.cc:440

References G4VEmModel::ComputeCrossSectionPerAtom(), emax, G4Material::GetElement(), G4Material::GetNumberOfElements(), G4Material::GetVecNbOfAtomsPerVolume(), G4VEmModel::nsec, G4VEmModel::SetupForMaterial(), and G4VEmModel::xsec.

Referenced by G4AdjointBremsstrahlungModel::AdjointCrossSection(), G4EmCalculator::ComputeCrossSectionPerVolume(), G4VEmProcess::ComputeCurrentLambda(), G4VEmModel::ComputeMeanFreePath(), G4TablesForExtrapolator::ComputeTrasportXS(), G4VEmModel::CrossSection(), G4LivermorePhotoElectricModel::CrossSectionPerVolume(), G4PenelopeRayleighModelMI::CrossSectionPerVolume(), G4DNADummyModel::CrossSectionPerVolume(), G4VEnergyLossProcess::CrossSectionPerVolume(), G4VEmAdjointModel::DiffCrossSectionPerVolumePrimToSecond(), G4VMscModel::GetTransportMeanFreePath(), G4VEmModel::SelectRandomAtom(), and G4VEmModel::Value().

◆ CurrentCouple()

const G4MaterialCutsCouple * G4VEmModel::CurrentCouple ( ) const
inlineprotectedinherited

◆ DeexcitationFlag()

G4bool G4VEmModel::DeexcitationFlag ( ) const
inlineinherited

Definition at line 704 of file G4VEmModel.hh.

705{
706 return flagDeexcitation;
707}
G4bool flagDeexcitation
Definition: G4VEmModel.hh:455

References G4VEmModel::flagDeexcitation.

Referenced by G4EmModelManager::DumpModelList().

◆ DefineForRegion()

void G4VEmModel::DefineForRegion ( const G4Region )
virtualinherited

Reimplemented in G4PAIModel, and G4PAIPhotModel.

Definition at line 360 of file G4VEmModel.cc.

361{}

Referenced by G4EmModelManager::AddEmModel().

◆ FillNumberOfSecondaries()

void G4VEmModel::FillNumberOfSecondaries ( G4int numberOfTriplets,
G4int numberOfRecoil 
)
virtualinherited

Definition at line 365 of file G4VEmModel.cc.

367{
368 numberOfTriplets = 0;
369 numberOfRecoil = 0;
370}

Referenced by G4VEmProcess::PostStepDoIt(), and G4VEnergyLossProcess::PostStepDoIt().

◆ ForceBuildTableFlag()

G4bool G4VEmModel::ForceBuildTableFlag ( ) const
inlineinherited

Definition at line 711 of file G4VEmModel.hh.

712{
713 return flagForceBuildTable;
714}
G4bool flagForceBuildTable
Definition: G4VEmModel.hh:456

References G4VEmModel::flagForceBuildTable.

Referenced by G4VMscModel::GetParticleChangeForMSC().

◆ GetAngularDistribution()

G4VEmAngularDistribution * G4VEmModel::GetAngularDistribution ( )
inlineinherited

Definition at line 621 of file G4VEmModel.hh.

622{
623 return anglModel;
624}
G4VEmAngularDistribution * anglModel
Definition: G4VEmModel.hh:414

References G4VEmModel::anglModel.

Referenced by G4EmModelManager::DumpModelList(), G4AtimaEnergyLossModel::Initialise(), G4BetheBlochModel::Initialise(), G4BraggIonModel::Initialise(), G4BraggModel::Initialise(), G4ICRU73QOModel::Initialise(), G4LindhardSorensenIonModel::Initialise(), G4MollerBhabhaModel::Initialise(), G4AdjointBremsstrahlungModel::RapidSampleSecondaries(), G4LivermoreBremsstrahlungModel::SampleSecondaries(), G4eBremParametrizedModel::SampleSecondaries(), G4eBremsstrahlungRelModel::SampleSecondaries(), G4SeltzerBergerModel::SampleSecondaries(), G4DNABornIonisationModel1::SampleSecondaries(), G4DNABornIonisationModel2::SampleSecondaries(), G4DNAEmfietzoglouIonisationModel::SampleSecondaries(), G4DNARuddIonisationExtendedModel::SampleSecondaries(), G4DNARuddIonisationModel::SampleSecondaries(), G4PAIModel::SampleSecondaries(), G4PAIPhotModel::SampleSecondaries(), G4LivermoreIonisationModel::SampleSecondaries(), G4LivermorePhotoElectricModel::SampleSecondaries(), G4LivermoreRayleighModel::SampleSecondaries(), G4MicroElecInelasticModel::SampleSecondaries(), G4MicroElecInelasticModel_new::SampleSecondaries(), G4MuBremsstrahlungModel::SampleSecondaries(), G4MuPairProductionModel::SampleSecondaries(), G4AtimaEnergyLossModel::SampleSecondaries(), G4BetheBlochModel::SampleSecondaries(), G4BetheHeitlerModel::SampleSecondaries(), G4BraggIonModel::SampleSecondaries(), G4BraggModel::SampleSecondaries(), G4ICRU73QOModel::SampleSecondaries(), G4LindhardSorensenIonModel::SampleSecondaries(), G4MollerBhabhaModel::SampleSecondaries(), G4PairProductionRelModel::SampleSecondaries(), G4PEEffectFluoModel::SampleSecondaries(), and G4IonParametrisedLossModel::SampleSecondaries().

◆ GetChargeSquareRatio()

G4double G4VEmModel::GetChargeSquareRatio ( const G4ParticleDefinition p,
const G4Material ,
G4double  kineticEnergy 
)
virtualinherited

◆ GetCrossSectionTable()

G4PhysicsTable * G4VEmModel::GetCrossSectionTable ( )
inlineinherited

◆ GetCurrentElement()

const G4Element * G4VEmModel::GetCurrentElement ( ) const
inlineinherited

◆ GetCurrentIsotope()

const G4Isotope * G4VEmModel::GetCurrentIsotope ( ) const
inlineinherited

Definition at line 512 of file G4VEmModel.hh.

513{
514 return fCurrentIsotope;
515}
const G4Isotope * fCurrentIsotope
Definition: G4VEmModel.hh:418

References G4VEmModel::fCurrentIsotope.

Referenced by G4VEmProcess::GetTargetIsotope().

◆ GetElementData()

G4ElementData * G4VEmModel::GetElementData ( )
inlineinherited

◆ GetElementSelectors()

std::vector< G4EmElementSelector * > * G4VEmModel::GetElementSelectors ( )
inlineinherited

◆ GetModelOfFluctuations()

G4VEmFluctuationModel * G4VEmModel::GetModelOfFluctuations ( )
inlineinherited

◆ GetName()

const G4String & G4VEmModel::GetName ( ) const
inlineinherited

◆ GetPartialCrossSection()

G4double G4VEmModel::GetPartialCrossSection ( const G4Material ,
G4int  level,
const G4ParticleDefinition ,
G4double  kineticEnergy 
)
virtualinherited

◆ GetParticleChangeForGamma()

G4ParticleChangeForGamma * G4VEmModel::GetParticleChangeForGamma ( )
protectedinherited

Definition at line 123 of file G4VEmModel.cc.

124{
125 G4ParticleChangeForGamma* p = nullptr;
126 if (pParticleChange != nullptr) {
127 p = static_cast<G4ParticleChangeForGamma*>(pParticleChange);
128 } else {
129 p = new G4ParticleChangeForGamma();
130 pParticleChange = p;
131 }
132 if(fTripletModel != nullptr) { fTripletModel->SetParticleChange(p); }
133 return p;
134}
void SetParticleChange(G4VParticleChange *, G4VEmFluctuationModel *f=nullptr)
Definition: G4VEmModel.cc:447
G4VParticleChange * pParticleChange
Definition: G4VEmModel.hh:425
G4VEmModel * fTripletModel
Definition: G4VEmModel.hh:415

References G4VEmModel::fTripletModel, G4VEmModel::pParticleChange, and G4VEmModel::SetParticleChange().

Referenced by G4MicroElecLOPhononModel::G4MicroElecLOPhononModel(), G4DNAChampionElasticModel::Initialise(), G4DNACPA100ElasticModel::Initialise(), G4DNADingfelderChargeDecreaseModel::Initialise(), G4DNADingfelderChargeIncreaseModel::Initialise(), G4DNAMeltonAttachmentModel::Initialise(), G4DNAMillerGreenExcitationModel::Initialise(), G4DNARuddIonisationExtendedModel::Initialise(), G4DNARuddIonisationModel::Initialise(), G4DNASancheExcitationModel::Initialise(), G4DNAScreenedRutherfordElasticModel::Initialise(), G4DNATransformElectronModel::Initialise(), G4DNAUeharaScreenedRutherfordElasticModel::Initialise(), G4LEPTSAttachmentModel::Initialise(), G4LEPTSDissociationModel::Initialise(), G4LEPTSElasticModel::Initialise(), G4LEPTSExcitationModel::Initialise(), G4LEPTSIonisationModel::Initialise(), G4LEPTSPositroniumModel::Initialise(), G4LEPTSRotExcitationModel::Initialise(), G4LEPTSVibExcitationModel::Initialise(), G4BoldyshevTripletModel::Initialise(), G4eplusTo3GammaOKVIModel::Initialise(), G4eSingleCoulombScatteringModel::Initialise(), G4IonCoulombScatteringModel::Initialise(), G4eeToHadronsMultiModel::Initialise(), G4JAEAElasticScatteringModel::Initialise(), G4JAEAPolarizedElasticScatteringModel::Initialise(), G4LivermoreComptonModel::Initialise(), G4LivermoreGammaConversion5DModel::Initialise(), G4LivermoreGammaConversionModel::Initialise(), G4LivermoreNuclearGammaConversionModel::Initialise(), G4LivermorePhotoElectricModel::Initialise(), G4LivermorePolarizedComptonModel::Initialise(), G4LivermorePolarizedGammaConversionModel::Initialise(), G4LivermorePolarizedRayleighModel::Initialise(), G4LivermoreRayleighModel::Initialise(), G4LowEPComptonModel::Initialise(), Initialise(), G4MicroElecElasticModel::Initialise(), G4MicroElecElasticModel_new::Initialise(), G4MicroElecInelasticModel::Initialise(), G4MicroElecInelasticModel_new::Initialise(), G4MicroElecLOPhononModel::Initialise(), G4PenelopeAnnihilationModel::Initialise(), G4PenelopeComptonModel::Initialise(), G4PenelopeGammaConversionModel::Initialise(), G4PenelopePhotoElectricModel::Initialise(), G4PenelopeRayleighModel::Initialise(), G4PenelopeRayleighModelMI::Initialise(), G4PolarizedAnnihilationModel::Initialise(), G4BetheHeitlerModel::Initialise(), G4eCoulombScatteringModel::Initialise(), G4eDPWACoulombScatteringModel::Initialise(), G4eeToTwoGammaModel::Initialise(), G4eplusTo2GammaOKVIModel::Initialise(), G4hCoulombScatteringModel::Initialise(), G4KleinNishinaCompton::Initialise(), G4KleinNishinaModel::Initialise(), G4PairProductionRelModel::Initialise(), G4PEEffectFluoModel::Initialise(), G4XrayRayleighModel::Initialise(), G4DNABornExcitationModel1::Initialise(), G4DNABornExcitationModel2::Initialise(), G4DNABornIonisationModel1::Initialise(), G4DNABornIonisationModel2::Initialise(), G4DNACPA100ExcitationModel::Initialise(), G4DNACPA100IonisationModel::Initialise(), G4DNADiracRMatrixExcitationModel::Initialise(), G4DNAEmfietzoglouExcitationModel::Initialise(), G4DNAEmfietzoglouIonisationModel::Initialise(), G4DNAQuinnPlasmonExcitationModel::Initialise(), G4DNARelativisticIonisationModel::Initialise(), G4DNAELSEPAElasticModel::Initialise(), G4DNAModelInterface::Initialise(), and G4DNAIonElasticModel::Initialise().

◆ GetParticleChangeForLoss()

G4ParticleChangeForLoss * G4VEmModel::GetParticleChangeForLoss ( )
protectedinherited

◆ GetParticleCharge()

G4double G4VEmModel::GetParticleCharge ( const G4ParticleDefinition p,
const G4Material ,
G4double  kineticEnergy 
)
virtualinherited

◆ GetPerpendicularPolarization()

G4ThreeVector G4LowEPPolarizedComptonModel::GetPerpendicularPolarization ( const G4ThreeVector direction0,
const G4ThreeVector polarization0 
) const
private

Definition at line 870 of file G4LowEPPolarizedComptonModel.cc.

872{
873 //
874 // The polarization of a photon is always perpendicular to its momentum direction.
875 // Therefore this function removes those vector component of photonPolarization, which
876 // points in direction of photonDirection
877 //
878 // Mathematically we search the projection of the vector a on the plane E, where n is the
879 // plains normal vector.
880 // The basic equation can be found in each geometry book (e.g. Bronstein):
881 // p = a - (a o n)/(n o n)*n
882
883 return photonPolarization - photonPolarization.dot(photonDirection)/photonDirection.dot(photonDirection) * photonDirection;
884}

References CLHEP::Hep3Vector::dot().

Referenced by SampleSecondaries().

◆ GetRandomPolarization()

G4ThreeVector G4LowEPPolarizedComptonModel::GetRandomPolarization ( G4ThreeVector direction0)
private

Definition at line 846 of file G4LowEPPolarizedComptonModel.cc.

847{
848 G4ThreeVector d0 = direction0.unit();
849 G4ThreeVector a1 = SetPerpendicularVector(d0); //different orthogonal
850 G4ThreeVector a0 = a1.unit(); // unit vector
851
852 G4double rand1 = G4UniformRand();
853
854 G4double angle = twopi*rand1; // random polar angle
855 G4ThreeVector b0 = d0.cross(a0); // cross product
856
858
859 c.setX(std::cos(angle)*(a0.x())+std::sin(angle)*b0.x());
860 c.setY(std::cos(angle)*(a0.y())+std::sin(angle)*b0.y());
861 c.setZ(std::cos(angle)*(a0.z())+std::sin(angle)*b0.z());
862
863 G4ThreeVector c0 = c.unit();
864
865 return c0;
866}
const G4double a0
static constexpr double twopi
Definition: G4SIunits.hh:56
static const G4double angle[DIMMOTT]
#define G4UniformRand()
Definition: Randomize.hh:52
double z() const
Hep3Vector unit() const
double x() const
void setY(double)
double y() const
Hep3Vector cross(const Hep3Vector &) const
void setZ(double)
void setX(double)
G4ThreeVector SetPerpendicularVector(G4ThreeVector &a)

References a0, angle, CLHEP::Hep3Vector::cross(), G4UniformRand, SetPerpendicularVector(), CLHEP::Hep3Vector::setX(), CLHEP::Hep3Vector::setY(), CLHEP::Hep3Vector::setZ(), twopi, CLHEP::Hep3Vector::unit(), CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

Referenced by SampleSecondaries().

◆ GetTripletModel()

G4VEmModel * G4VEmModel::GetTripletModel ( )
inlineinherited

◆ HighEnergyActivationLimit()

G4double G4VEmModel::HighEnergyActivationLimit ( ) const
inlineinherited

◆ HighEnergyLimit()

G4double G4VEmModel::HighEnergyLimit ( ) const
inlineinherited

Definition at line 655 of file G4VEmModel.hh.

656{
657 return highLimit;
658}
G4double highLimit
Definition: G4VEmModel.hh:437

References G4VEmModel::highLimit.

Referenced by G4DNAChampionElasticModel::CrossSectionPerVolume(), G4DNACPA100ElasticModel::CrossSectionPerVolume(), G4DNACPA100ExcitationModel::CrossSectionPerVolume(), G4DNACPA100IonisationModel::CrossSectionPerVolume(), G4DNAEmfietzoglouExcitationModel::CrossSectionPerVolume(), G4DNAEmfietzoglouIonisationModel::CrossSectionPerVolume(), G4DNAMeltonAttachmentModel::CrossSectionPerVolume(), G4DNASancheExcitationModel::CrossSectionPerVolume(), G4DNAScreenedRutherfordElasticModel::CrossSectionPerVolume(), G4DNATransformElectronModel::CrossSectionPerVolume(), G4DNAELSEPAElasticModel::CrossSectionPerVolume(), G4DNAChampionElasticModel::G4DNAChampionElasticModel(), G4DNACPA100ElasticModel::G4DNACPA100ElasticModel(), G4DNAMeltonAttachmentModel::G4DNAMeltonAttachmentModel(), G4DNASancheExcitationModel::G4DNASancheExcitationModel(), G4DNAUeharaScreenedRutherfordElasticModel::G4DNAUeharaScreenedRutherfordElasticModel(), G4eeToHadronsModel::G4eeToHadronsModel(), G4IonParametrisedLossModel::G4IonParametrisedLossModel(), G4LivermorePolarizedRayleighModel::G4LivermorePolarizedRayleighModel(), G4ContinuousGainOfEnergy::GetContinuousStepLimit(), G4PenelopeBremsstrahlungModel::GetCrossSectionTableForCouple(), G4VMscModel::GetParticleChangeForMSC(), G4DNAChampionElasticModel::Initialise(), G4DNACPA100ElasticModel::Initialise(), G4DNADingfelderChargeDecreaseModel::Initialise(), G4DNADingfelderChargeIncreaseModel::Initialise(), G4DNAMeltonAttachmentModel::Initialise(), G4DNAMillerGreenExcitationModel::Initialise(), G4DNARuddIonisationExtendedModel::Initialise(), G4DNARuddIonisationModel::Initialise(), G4DNASancheExcitationModel::Initialise(), G4DNAScreenedRutherfordElasticModel::Initialise(), G4DNAUeharaScreenedRutherfordElasticModel::Initialise(), G4BoldyshevTripletModel::Initialise(), G4PAIModel::Initialise(), G4PAIPhotModel::Initialise(), G4JAEAElasticScatteringModel::Initialise(), G4JAEAPolarizedElasticScatteringModel::Initialise(), G4LivermoreComptonModel::Initialise(), G4LivermoreGammaConversion5DModel::Initialise(), G4LivermoreGammaConversionModel::Initialise(), G4LivermoreIonisationModel::Initialise(), G4LivermoreNuclearGammaConversionModel::Initialise(), G4LivermorePolarizedComptonModel::Initialise(), G4LivermorePolarizedGammaConversionModel::Initialise(), G4LivermoreRayleighModel::Initialise(), G4LowEPComptonModel::Initialise(), Initialise(), G4MicroElecElasticModel::Initialise(), G4MicroElecElasticModel_new::Initialise(), G4MicroElecInelasticModel::Initialise(), G4MicroElecInelasticModel_new::Initialise(), G4PenelopeAnnihilationModel::Initialise(), G4PenelopeBremsstrahlungModel::Initialise(), G4PenelopeComptonModel::Initialise(), G4PenelopeGammaConversionModel::Initialise(), G4PenelopeIonisationModel::Initialise(), G4PenelopePhotoElectricModel::Initialise(), G4PenelopeRayleighModel::Initialise(), G4PenelopeRayleighModelMI::Initialise(), G4MuBremsstrahlungModel::Initialise(), G4MuPairProductionModel::Initialise(), G4eBremsstrahlungRelModel::Initialise(), G4eDPWACoulombScatteringModel::Initialise(), G4GoudsmitSaundersonMscModel::Initialise(), G4PairProductionRelModel::Initialise(), G4SeltzerBergerModel::Initialise(), G4WentzelVIModel::Initialise(), G4DNABornExcitationModel1::Initialise(), G4DNABornExcitationModel2::Initialise(), G4DNABornIonisationModel1::Initialise(), G4DNABornIonisationModel2::Initialise(), G4DNACPA100ExcitationModel::Initialise(), G4DNACPA100IonisationModel::Initialise(), G4DNADiracRMatrixExcitationModel::Initialise(), G4DNAEmfietzoglouExcitationModel::Initialise(), G4DNAEmfietzoglouIonisationModel::Initialise(), G4DNAQuinnPlasmonExcitationModel::Initialise(), G4DNARelativisticIonisationModel::Initialise(), G4EmModelManager::Initialise(), G4DNAELSEPAElasticModel::Initialise(), G4DNADummyModel::Initialise(), G4DNAIonElasticModel::Initialise(), G4mplIonisation::InitialiseEnergyLossProcess(), G4ionIonisation::InitialiseEnergyLossProcess(), G4MuBremsstrahlungModel::InitialiseLocal(), G4MuPairProductionModel::InitialiseLocal(), G4eBremsstrahlungRelModel::InitialiseLocal(), G4PairProductionRelModel::InitialiseLocal(), G4CoulombScattering::InitialiseProcess(), G4VEmProcess::PostStepDoIt(), G4VEmProcess::PreparePhysicsTable(), G4VEnergyLossProcess::PreparePhysicsTable(), G4VMultipleScattering::PreparePhysicsTable(), G4DNACPA100IonisationModel::SampleSecondaries(), G4DNAEmfietzoglouIonisationModel::SampleSecondaries(), G4DNASancheExcitationModel::SampleSecondaries(), G4EmConfigurator::SetExtraEmModel(), G4mplIonisationModel::SetParticle(), G4mplIonisationWithDeltaModel::SetParticle(), G4eBremsstrahlung::StreamProcessInfo(), and G4EmConfigurator::UpdateModelEnergyRange().

◆ Initialise()

void G4LowEPPolarizedComptonModel::Initialise ( const G4ParticleDefinition particle,
const G4DataVector cuts 
)
overridevirtual

Implements G4VEmModel.

Definition at line 122 of file G4LowEPPolarizedComptonModel.cc.

124{
125 if (verboseLevel > 1) {
126 G4cout << "Calling G4LowEPPolarizedComptonModel::Initialise()" << G4endl;
127 }
128
129 // Initialise element selector
130 if(IsMaster()) {
131 // Access to elements
132 char* path = std::getenv("G4LEDATA");
133
134 G4ProductionCutsTable* theCoupleTable =
136 G4int numOfCouples = theCoupleTable->GetTableSize();
137
138 for(G4int i=0; i<numOfCouples; ++i) {
139 const G4Material* material =
140 theCoupleTable->GetMaterialCutsCouple(i)->GetMaterial();
141 const G4ElementVector* theElementVector = material->GetElementVector();
142 G4int nelm = material->GetNumberOfElements();
143
144 for (G4int j=0; j<nelm; ++j) {
145 G4int Z = G4lrint((*theElementVector)[j]->GetZ());
146 if(Z < 1) { Z = 1; }
147 else if(Z > maxZ){ Z = maxZ; }
148
149 if( (!data[Z]) ) { ReadData(Z, path); }
150 }
151 }
152
153 // For Doppler broadening
154 if(!shellData) {
155 shellData = new G4ShellData();
157 G4String file = "/doppler/shell-doppler";
159 }
161
162 InitialiseElementSelectors(particle, cuts);
163 }
164
165 if (verboseLevel > 2) {
166 G4cout << "Loaded cross section files" << G4endl;
167 }
168
169 if( verboseLevel>1 ) {
170 G4cout << "G4LowEPPolarizedComptonModel is initialized " << G4endl
171 << "Energy range: "
172 << LowEnergyLimit() / eV << " eV - "
173 << HighEnergyLimit() / GeV << " GeV"
174 << G4endl;
175 }
176
177 if(isInitialised) { return; }
178
181 isInitialised = true;
182}
std::vector< const G4Element * > G4ElementVector
static constexpr double eV
Definition: G4SIunits.hh:201
static constexpr double GeV
Definition: G4SIunits.hh:203
static G4LossTableManager * Instance()
G4VAtomDeexcitation * AtomDeexcitation()
void ReadData(size_t Z, const char *path=0)
const G4Material * GetMaterial() const
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
std::size_t GetTableSize() const
static G4ProductionCutsTable * GetProductionCutsTable()
void SetOccupancyData()
Definition: G4ShellData.hh:62
void LoadData(const G4String &fileName)
Definition: G4ShellData.cc:228
G4ParticleChangeForGamma * GetParticleChangeForGamma()
Definition: G4VEmModel.cc:123
G4double HighEnergyLimit() const
Definition: G4VEmModel.hh:655
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)
Definition: G4VEmModel.cc:138

References G4LossTableManager::AtomDeexcitation(), data, eV, fAtomDeexcitation, geant4_check_module_cycles::file, fParticleChange, G4cout, G4endl, G4lrint(), G4MaterialCutsCouple::GetMaterial(), G4ProductionCutsTable::GetMaterialCutsCouple(), G4VEmModel::GetParticleChangeForGamma(), G4ProductionCutsTable::GetProductionCutsTable(), G4ProductionCutsTable::GetTableSize(), GeV, G4VEmModel::HighEnergyLimit(), G4VEmModel::InitialiseElementSelectors(), G4LossTableManager::Instance(), isInitialised, G4VEmModel::IsMaster(), G4ShellData::LoadData(), G4VEmModel::LowEnergyLimit(), eplot::material, maxZ, profileData, ReadData(), G4ShellData::SetOccupancyData(), shellData, verboseLevel, and Z.

◆ InitialiseElementSelectors()

void G4VEmModel::InitialiseElementSelectors ( const G4ParticleDefinition part,
const G4DataVector cuts 
)
inherited

Definition at line 138 of file G4VEmModel.cc.

140{
141 // using spline for element selectors should be investigated in details
142 // because small number of points may provide biased results
143 // large number of points requires significant increase of memory
144 G4bool spline = false;
145
146 //G4cout << "IES: for " << GetName() << " Emin(MeV)= " << lowLimit/MeV
147 // << " Emax(MeV)= " << highLimit/MeV << G4endl;
148
149 // two times less bins because probability functon is normalized
150 // so correspondingly is more smooth
151 if(highLimit <= lowLimit) { return; }
152
154
155 G4ProductionCutsTable* theCoupleTable=
157 G4int numOfCouples = theCoupleTable->GetTableSize();
158
159 // prepare vector
160 if(!elmSelectors) {
161 elmSelectors = new std::vector<G4EmElementSelector*>;
162 }
163 if(numOfCouples > nSelectors) {
164 for(G4int i=nSelectors; i<numOfCouples; ++i) {
165 elmSelectors->push_back(nullptr);
166 }
167 nSelectors = numOfCouples;
168 }
169
170 // initialise vector
171 for(G4int i=0; i<numOfCouples; ++i) {
172
173 // no need in element selectors for infinite cuts
174 if(cuts[i] == DBL_MAX) { continue; }
175
176 auto couple = theCoupleTable->GetMaterialCutsCouple(i);
177 auto material = couple->GetMaterial();
178 SetCurrentCouple(couple);
179
180 // selector already exist then delete
181 delete (*elmSelectors)[i];
182
183 G4double emin = std::max(lowLimit, MinPrimaryEnergy(material, part, cuts[i]));
184 G4double emax = std::max(highLimit, 10*emin);
185 static const G4double invlog106 = 1.0/(6*G4Log(10.));
186 G4int nbins = (G4int)(nbinsPerDec*G4Log(emax/emin)*invlog106);
187 nbins = std::max(nbins, 3);
188
189 (*elmSelectors)[i] = new G4EmElementSelector(this,material,nbins,
190 emin,emax,spline);
191 ((*elmSelectors)[i])->Initialise(part, cuts[i]);
192 /*
193 G4cout << "G4VEmModel::InitialiseElmSelectors i= " << i
194 << " " << part->GetParticleName()
195 << " for " << GetName() << " cut= " << cuts[i]
196 << " " << (*elmSelectors)[i] << G4endl;
197 ((*elmSelectors)[i])->Dump(part);
198 */
199 }
200}
bool G4bool
Definition: G4Types.hh:86
static G4EmParameters * Instance()
G4int NumberOfBinsPerDecade() const
virtual G4double MinPrimaryEnergy(const G4Material *, const G4ParticleDefinition *, G4double cut=0.0)
Definition: G4VEmModel.cc:415
G4double lowLimit
Definition: G4VEmModel.hh:436
G4int nSelectors
Definition: G4VEmModel.hh:443
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)=0
T max(const T t1, const T t2)
brief Return the largest of the two arguments

References DBL_MAX, G4VEmModel::elmSelectors, emax, G4Log(), G4ProductionCutsTable::GetMaterialCutsCouple(), G4ProductionCutsTable::GetProductionCutsTable(), G4ProductionCutsTable::GetTableSize(), G4VEmModel::highLimit, G4VEmModel::Initialise(), G4EmParameters::Instance(), G4VEmModel::lowLimit, eplot::material, G4INCL::Math::max(), G4VEmModel::MinPrimaryEnergy(), G4VEmModel::nSelectors, G4EmParameters::NumberOfBinsPerDecade(), and G4VEmModel::SetCurrentCouple().

Referenced by G4eSingleCoulombScatteringModel::Initialise(), G4PAIModel::Initialise(), G4PAIPhotModel::Initialise(), G4JAEAElasticScatteringModel::Initialise(), G4JAEAPolarizedElasticScatteringModel::Initialise(), G4LivermoreComptonModel::Initialise(), G4LivermoreGammaConversion5DModel::Initialise(), G4LivermoreGammaConversionModel::Initialise(), G4LivermoreNuclearGammaConversionModel::Initialise(), G4LivermorePolarizedComptonModel::Initialise(), G4LivermorePolarizedGammaConversionModel::Initialise(), G4LivermorePolarizedRayleighModel::Initialise(), G4LivermoreRayleighModel::Initialise(), G4LowEPComptonModel::Initialise(), Initialise(), G4PenelopePhotoElectricModel::Initialise(), G4MuBremsstrahlungModel::Initialise(), G4MuPairProductionModel::Initialise(), G4BetheHeitlerModel::Initialise(), G4eBremParametrizedModel::Initialise(), G4eBremsstrahlungRelModel::Initialise(), G4eCoulombScatteringModel::Initialise(), G4eDPWACoulombScatteringModel::Initialise(), G4hCoulombScatteringModel::Initialise(), G4KleinNishinaCompton::Initialise(), G4KleinNishinaModel::Initialise(), G4PairProductionRelModel::Initialise(), G4SeltzerBergerModel::Initialise(), and G4XrayRayleighModel::Initialise().

◆ InitialiseForElement()

void G4LowEPPolarizedComptonModel::InitialiseForElement ( const G4ParticleDefinition ,
G4int  Z 
)
overridevirtual

◆ InitialiseForMaterial()

void G4VEmModel::InitialiseForMaterial ( const G4ParticleDefinition part,
const G4Material material 
)
virtualinherited

Definition at line 209 of file G4VEmModel.cc.

211{
212 if(material != nullptr) {
213 size_t n = material->GetNumberOfElements();
214 for(size_t i=0; i<n; ++i) {
215 G4int Z = material->GetElement(i)->GetZasInt();
216 InitialiseForElement(part, Z);
217 }
218 }
219}
virtual void InitialiseForElement(const G4ParticleDefinition *, G4int Z)
Definition: G4VEmModel.cc:223

References G4VEmModel::InitialiseForElement(), eplot::material, CLHEP::detail::n, and Z.

Referenced by G4EmCalculator::FindEmModel().

◆ InitialiseLocal()

void G4LowEPPolarizedComptonModel::InitialiseLocal ( const G4ParticleDefinition ,
G4VEmModel masterModel 
)
overridevirtual

Reimplemented from G4VEmModel.

Definition at line 186 of file G4LowEPPolarizedComptonModel.cc.

188{
190}
void SetElementSelectors(std::vector< G4EmElementSelector * > *)
Definition: G4VEmModel.hh:852
std::vector< G4EmElementSelector * > * GetElementSelectors()
Definition: G4VEmModel.hh:844

References G4VEmModel::GetElementSelectors(), and G4VEmModel::SetElementSelectors().

◆ IsActive()

G4bool G4VEmModel::IsActive ( G4double  kinEnergy) const
inlineinherited

◆ IsLocked()

G4bool G4VEmModel::IsLocked ( ) const
inlineinherited

◆ IsMaster()

G4bool G4VEmModel::IsMaster ( ) const
inlineinherited

Definition at line 746 of file G4VEmModel.hh.

747{
748 return isMaster;
749}
G4bool isMaster
Definition: G4VEmModel.hh:457

References G4VEmModel::isMaster.

Referenced by G4PenelopeBremsstrahlungModel::BuildXSTable(), G4PenelopeBremsstrahlungModel::ClearTables(), G4MuPairProductionModel::DataCorrupted(), G4PenelopePhotoElectricModel::GetNumberOfShellXS(), G4VMscModel::GetParticleChangeForMSC(), G4BoldyshevTripletModel::Initialise(), G4eSingleCoulombScatteringModel::Initialise(), G4PAIModel::Initialise(), G4PAIPhotModel::Initialise(), G4EmMultiModel::Initialise(), G4mplIonisationModel::Initialise(), G4mplIonisationWithDeltaModel::Initialise(), G4JAEAElasticScatteringModel::Initialise(), G4JAEAPolarizedElasticScatteringModel::Initialise(), G4LivermoreBremsstrahlungModel::Initialise(), G4LivermoreComptonModel::Initialise(), G4LivermoreGammaConversion5DModel::Initialise(), G4LivermoreGammaConversionModel::Initialise(), G4LivermoreNuclearGammaConversionModel::Initialise(), G4LivermorePhotoElectricModel::Initialise(), G4LivermorePolarizedComptonModel::Initialise(), G4LivermorePolarizedGammaConversionModel::Initialise(), G4LivermorePolarizedRayleighModel::Initialise(), G4LivermoreRayleighModel::Initialise(), G4LowEPComptonModel::Initialise(), Initialise(), G4PenelopeAnnihilationModel::Initialise(), G4PenelopeBremsstrahlungModel::Initialise(), G4PenelopeComptonModel::Initialise(), G4PenelopeGammaConversionModel::Initialise(), G4PenelopeIonisationModel::Initialise(), G4PenelopePhotoElectricModel::Initialise(), G4PenelopeRayleighModel::Initialise(), G4PenelopeRayleighModelMI::Initialise(), G4MuBremsstrahlungModel::Initialise(), G4MuPairProductionModel::Initialise(), G4BetheBlochModel::Initialise(), G4BetheHeitlerModel::Initialise(), G4BraggIonModel::Initialise(), G4BraggModel::Initialise(), G4eBremParametrizedModel::Initialise(), G4eBremsstrahlungRelModel::Initialise(), G4eCoulombScatteringModel::Initialise(), G4eDPWACoulombScatteringModel::Initialise(), G4eeToTwoGammaModel::Initialise(), G4eplusTo2GammaOKVIModel::Initialise(), G4GoudsmitSaundersonMscModel::Initialise(), G4hCoulombScatteringModel::Initialise(), G4KleinNishinaCompton::Initialise(), G4KleinNishinaModel::Initialise(), G4LindhardSorensenIonModel::Initialise(), G4PairProductionRelModel::Initialise(), G4SeltzerBergerModel::Initialise(), G4WentzelVIModel::Initialise(), G4PenelopeBremsstrahlungModel::InitialiseLocal(), G4PenelopeGammaConversionModel::ReadDataFile(), G4PenelopePhotoElectricModel::ReadDataFile(), G4BetheHeitlerModel::~G4BetheHeitlerModel(), G4BoldyshevTripletModel::~G4BoldyshevTripletModel(), G4BraggIonModel::~G4BraggIonModel(), G4BraggModel::~G4BraggModel(), G4eBremsstrahlungRelModel::~G4eBremsstrahlungRelModel(), G4eDPWACoulombScatteringModel::~G4eDPWACoulombScatteringModel(), G4GoudsmitSaundersonMscModel::~G4GoudsmitSaundersonMscModel(), G4JAEAElasticScatteringModel::~G4JAEAElasticScatteringModel(), G4JAEAPolarizedElasticScatteringModel::~G4JAEAPolarizedElasticScatteringModel(), G4LivermoreBremsstrahlungModel::~G4LivermoreBremsstrahlungModel(), G4LivermoreComptonModel::~G4LivermoreComptonModel(), G4LivermoreGammaConversion5DModel::~G4LivermoreGammaConversion5DModel(), G4LivermoreGammaConversionModel::~G4LivermoreGammaConversionModel(), G4LivermoreNuclearGammaConversionModel::~G4LivermoreNuclearGammaConversionModel(), G4LivermorePhotoElectricModel::~G4LivermorePhotoElectricModel(), G4LivermorePolarizedComptonModel::~G4LivermorePolarizedComptonModel(), G4LivermorePolarizedGammaConversionModel::~G4LivermorePolarizedGammaConversionModel(), G4LivermorePolarizedRayleighModel::~G4LivermorePolarizedRayleighModel(), G4LivermoreRayleighModel::~G4LivermoreRayleighModel(), G4LowEPComptonModel::~G4LowEPComptonModel(), ~G4LowEPPolarizedComptonModel(), G4mplIonisationModel::~G4mplIonisationModel(), G4mplIonisationWithDeltaModel::~G4mplIonisationWithDeltaModel(), G4PAIModel::~G4PAIModel(), G4PAIPhotModel::~G4PAIPhotModel(), G4PairProductionRelModel::~G4PairProductionRelModel(), G4PenelopeBremsstrahlungModel::~G4PenelopeBremsstrahlungModel(), G4PenelopeGammaConversionModel::~G4PenelopeGammaConversionModel(), G4PenelopeIonisationModel::~G4PenelopeIonisationModel(), G4PenelopePhotoElectricModel::~G4PenelopePhotoElectricModel(), G4PenelopeRayleighModel::~G4PenelopeRayleighModel(), G4PenelopeRayleighModelMI::~G4PenelopeRayleighModelMI(), G4SeltzerBergerModel::~G4SeltzerBergerModel(), and G4WentzelVIModel::~G4WentzelVIModel().

◆ LowEnergyActivationLimit()

G4double G4VEmModel::LowEnergyActivationLimit ( ) const
inlineinherited

◆ LowEnergyLimit()

G4double G4VEmModel::LowEnergyLimit ( ) const
inlineinherited

Definition at line 662 of file G4VEmModel.hh.

663{
664 return lowLimit;
665}

References G4VEmModel::lowLimit.

Referenced by G4eBremsstrahlungRelModel::ComputeCrossSectionPerAtom(), G4KleinNishinaCompton::ComputeCrossSectionPerAtom(), G4KleinNishinaModel::ComputeCrossSectionPerAtom(), G4LivermoreComptonModel::ComputeCrossSectionPerAtom(), G4LivermorePolarizedComptonModel::ComputeCrossSectionPerAtom(), G4LowEPComptonModel::ComputeCrossSectionPerAtom(), ComputeCrossSectionPerAtom(), G4mplIonisationWithDeltaModel::ComputeCrossSectionPerElectron(), G4EmCalculator::ComputeDEDX(), G4eBremsstrahlungRelModel::ComputeDEDXPerVolume(), G4mplIonisationWithDeltaModel::ComputeDEDXPerVolume(), G4IonParametrisedLossModel::ComputeDEDXPerVolume(), G4IonParametrisedLossModel::CorrectionsAlongStep(), G4PenelopeRayleighModelMI::CrossSectionPerVolume(), G4PenelopeComptonModel::CrossSectionPerVolume(), G4DNAChampionElasticModel::CrossSectionPerVolume(), G4DNACPA100ElasticModel::CrossSectionPerVolume(), G4DNACPA100ExcitationModel::CrossSectionPerVolume(), G4DNACPA100IonisationModel::CrossSectionPerVolume(), G4DNAEmfietzoglouExcitationModel::CrossSectionPerVolume(), G4DNAEmfietzoglouIonisationModel::CrossSectionPerVolume(), G4DNAMeltonAttachmentModel::CrossSectionPerVolume(), G4DNASancheExcitationModel::CrossSectionPerVolume(), G4DNAScreenedRutherfordElasticModel::CrossSectionPerVolume(), G4DNAELSEPAElasticModel::CrossSectionPerVolume(), G4EmCalculator::FindEmModel(), G4DNAChampionElasticModel::G4DNAChampionElasticModel(), G4DNACPA100ElasticModel::G4DNACPA100ElasticModel(), G4DNAMeltonAttachmentModel::G4DNAMeltonAttachmentModel(), G4DNASancheExcitationModel::G4DNASancheExcitationModel(), G4DNAUeharaScreenedRutherfordElasticModel::G4DNAUeharaScreenedRutherfordElasticModel(), G4eeToHadronsModel::G4eeToHadronsModel(), G4LivermorePolarizedRayleighModel::G4LivermorePolarizedRayleighModel(), G4PenelopeBremsstrahlungModel::GetCrossSectionTableForCouple(), G4VMscModel::GetParticleChangeForMSC(), G4DNAChampionElasticModel::Initialise(), G4DNACPA100ElasticModel::Initialise(), G4DNADingfelderChargeDecreaseModel::Initialise(), G4DNADingfelderChargeIncreaseModel::Initialise(), G4DNAMeltonAttachmentModel::Initialise(), G4DNAMillerGreenExcitationModel::Initialise(), G4DNARuddIonisationExtendedModel::Initialise(), G4DNARuddIonisationModel::Initialise(), G4DNASancheExcitationModel::Initialise(), G4DNAScreenedRutherfordElasticModel::Initialise(), G4DNAUeharaScreenedRutherfordElasticModel::Initialise(), G4BoldyshevTripletModel::Initialise(), G4PAIModel::Initialise(), G4PAIPhotModel::Initialise(), G4JAEAElasticScatteringModel::Initialise(), G4JAEAPolarizedElasticScatteringModel::Initialise(), G4LivermoreComptonModel::Initialise(), G4LivermoreGammaConversion5DModel::Initialise(), G4LivermoreGammaConversionModel::Initialise(), G4LivermoreIonisationModel::Initialise(), G4LivermoreNuclearGammaConversionModel::Initialise(), G4LivermorePolarizedComptonModel::Initialise(), G4LivermorePolarizedGammaConversionModel::Initialise(), G4LivermoreRayleighModel::Initialise(), G4LowEPComptonModel::Initialise(), Initialise(), G4MicroElecElasticModel::Initialise(), G4MicroElecElasticModel_new::Initialise(), G4MicroElecInelasticModel::Initialise(), G4MicroElecInelasticModel_new::Initialise(), G4PenelopeAnnihilationModel::Initialise(), G4PenelopeBremsstrahlungModel::Initialise(), G4PenelopeComptonModel::Initialise(), G4PenelopeGammaConversionModel::Initialise(), G4PenelopeIonisationModel::Initialise(), G4PenelopePhotoElectricModel::Initialise(), G4PenelopeRayleighModel::Initialise(), G4PenelopeRayleighModelMI::Initialise(), G4MuPairProductionModel::Initialise(), G4eBremParametrizedModel::Initialise(), G4eBremsstrahlungRelModel::Initialise(), G4eDPWACoulombScatteringModel::Initialise(), G4GoudsmitSaundersonMscModel::Initialise(), G4PairProductionRelModel::Initialise(), G4SeltzerBergerModel::Initialise(), G4WentzelVIModel::Initialise(), G4DNABornExcitationModel1::Initialise(), G4DNABornExcitationModel2::Initialise(), G4DNABornIonisationModel1::Initialise(), G4DNABornIonisationModel2::Initialise(), G4DNACPA100ExcitationModel::Initialise(), G4DNACPA100IonisationModel::Initialise(), G4DNADiracRMatrixExcitationModel::Initialise(), G4DNAEmfietzoglouExcitationModel::Initialise(), G4DNAEmfietzoglouIonisationModel::Initialise(), G4DNAQuinnPlasmonExcitationModel::Initialise(), G4DNARelativisticIonisationModel::Initialise(), G4EmModelManager::Initialise(), G4DNAELSEPAElasticModel::Initialise(), G4DNADummyModel::Initialise(), G4DNAIonElasticModel::Initialise(), G4mplIonisation::InitialiseEnergyLossProcess(), G4eBremsstrahlungRelModel::InitialiseLocal(), G4PairProductionRelModel::InitialiseLocal(), G4CoulombScattering::InitialiseProcess(), G4VEmProcess::PostStepDoIt(), G4eBremsstrahlungRelModel::SampleSecondaries(), G4DNACPA100IonisationModel::SampleSecondaries(), G4DNAEmfietzoglouIonisationModel::SampleSecondaries(), G4LivermoreComptonModel::SampleSecondaries(), G4LivermorePolarizedComptonModel::SampleSecondaries(), G4LowEPComptonModel::SampleSecondaries(), SampleSecondaries(), G4PenelopeComptonModel::SampleSecondaries(), G4PolarizedComptonModel::SampleSecondaries(), G4KleinNishinaCompton::SampleSecondaries(), G4KleinNishinaModel::SampleSecondaries(), G4EmConfigurator::SetExtraEmModel(), G4mplIonisationModel::SetParticle(), G4mplIonisationWithDeltaModel::SetParticle(), and G4EmConfigurator::UpdateModelEnergyRange().

◆ LPMFlag()

G4bool G4VEmModel::LPMFlag ( ) const
inlineinherited

◆ MaxSecondaryEnergy()

G4double G4VEmModel::MaxSecondaryEnergy ( const G4ParticleDefinition ,
G4double  kineticEnergy 
)
protectedvirtualinherited

◆ MaxSecondaryKinEnergy()

G4double G4VEmModel::MaxSecondaryKinEnergy ( const G4DynamicParticle dynParticle)
inlineinherited

◆ MinEnergyCut()

G4double G4VEmModel::MinEnergyCut ( const G4ParticleDefinition ,
const G4MaterialCutsCouple  
)
virtualinherited

◆ MinPrimaryEnergy()

G4double G4VEmModel::MinPrimaryEnergy ( const G4Material ,
const G4ParticleDefinition ,
G4double  cut = 0.0 
)
virtualinherited

◆ ModelDescription()

void G4VEmModel::ModelDescription ( std::ostream &  outFile) const
virtualinherited

Reimplemented in G4eeToHadronsMultiModel.

Definition at line 469 of file G4VEmModel.cc.

470{
471 outFile << "The description for this model has not been written yet.\n";
472}

◆ operator=()

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

◆ PolarAngleLimit()

G4double G4VEmModel::PolarAngleLimit ( ) const
inlineinherited

◆ ReadData()

void G4LowEPPolarizedComptonModel::ReadData ( size_t  Z,
const char *  path = 0 
)
private

Definition at line 194 of file G4LowEPPolarizedComptonModel.cc.

195{
196 if (verboseLevel > 1)
197 {
198 G4cout << "G4LowEPPolarizedComptonModel::ReadData()"
199 << G4endl;
200 }
201 if(data[Z]) { return; }
202 const char* datadir = path;
203 if(!datadir)
204 {
205 datadir = std::getenv("G4LEDATA");
206 if(!datadir)
207 {
208 G4Exception("G4LowEPPolarizedComptonModel::ReadData()",
209 "em0006",FatalException,
210 "Environment variable G4LEDATA not defined");
211 return;
212 }
213 }
214
215 data[Z] = new G4PhysicsFreeVector();
216
217 std::ostringstream ost;
218 ost << datadir << "/livermore/comp/ce-cs-" << Z <<".dat";
219 std::ifstream fin(ost.str().c_str());
220
221 if( !fin.is_open())
222 {
224 ed << "G4LowEPPolarizedComptonModel data file <" << ost.str().c_str()
225 << "> is not opened!" << G4endl;
226 G4Exception("G4LowEPPolarizedComptonModel::ReadData()",
227 "em0003",FatalException,
228 ed,"G4LEDATA version should be G4EMLOW6.34 or later");
229 return;
230 } else {
231 if(verboseLevel > 3) {
232 G4cout << "File " << ost.str()
233 << " is opened by G4LowEPPolarizedComptonModel" << G4endl;
234 }
235 data[Z]->Retrieve(fin, true);
237 }
238 fin.close();
239}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
static constexpr double barn
Definition: G4SIunits.hh:85
static constexpr double MeV
Definition: G4SIunits.hh:200
void ScaleVector(const G4double factorE, const G4double factorV)
G4bool Retrieve(std::ifstream &fIn, G4bool ascii=false)

References barn, data, FatalException, G4cout, G4endl, G4Exception(), MeV, G4PhysicsVector::Retrieve(), G4PhysicsVector::ScaleVector(), verboseLevel, and Z.

Referenced by Initialise(), and InitialiseForElement().

◆ SampleSecondaries()

void G4LowEPPolarizedComptonModel::SampleSecondaries ( std::vector< G4DynamicParticle * > *  fvect,
const G4MaterialCutsCouple couple,
const G4DynamicParticle aDynamicGamma,
G4double  tmin,
G4double  maxEnergy 
)
overridevirtual

Implements G4VEmModel.

Definition at line 284 of file G4LowEPPolarizedComptonModel.cc.

288{
289
290 //Determine number of digits (in decimal base) that G4double can accurately represent
291 G4double g4d_order = G4double(numeric_limits<G4double>::digits10);
292 G4double g4d_limit = std::pow(10.,-g4d_order);
293
294 // The scattered gamma energy is sampled according to Klein - Nishina formula.
295 // then accepted or rejected depending on the Scattering Function multiplied
296 // by factor from Klein - Nishina formula.
297 // Expression of the angular distribution as Klein Nishina
298 // angular and energy distribution and Scattering fuctions is taken from
299 // D. E. Cullen "A simple model of photon transport" Nucl. Instr. Meth.
300 // Phys. Res. B 101 (1995). Method of sampling with form factors is different
301 // data are interpolated while in the article they are fitted.
302 // Reference to the article is from J. Stepanek New Photon, Positron
303 // and Electron Interaction Data for GEANT in Energy Range from 1 eV to 10
304 // TeV (draft).
305 // The random number techniques of Butcher & Messel are used
306 // (Nucl Phys 20(1960),15).
307
308 G4double photonEnergy0 = aDynamicGamma->GetKineticEnergy()/MeV;
309
310 if (verboseLevel > 3) {
311 G4cout << "G4LowEPPolarizedComptonModel::SampleSecondaries() E(MeV)= "
312 << photonEnergy0/MeV << " in " << couple->GetMaterial()->GetName()
313 << G4endl;
314 }
315 // do nothing below the threshold
316 // should never get here because the XS is zero below the limit
317 if (photonEnergy0 < LowEnergyLimit())
318 return ;
319
320 G4double e0m = photonEnergy0 / electron_mass_c2 ;
321 G4ParticleMomentum photonDirection0 = aDynamicGamma->GetMomentumDirection();
322
323 // Polarisation: check orientation of photon propagation direction and polarisation
324 // Fix if needed
325
326 G4ThreeVector photonPolarization0 = aDynamicGamma->GetPolarization();
327 // Check if polarisation vector is perpendicular and fix if not
328
329 if (!(photonPolarization0.isOrthogonal(photonDirection0, 1e-6))||(photonPolarization0.mag()==0))
330 {
331 photonPolarization0 = GetRandomPolarization(photonDirection0);
332 }
333 else
334 {
335 if ((photonPolarization0.howOrthogonal(photonDirection0) !=0) && (photonPolarization0.howOrthogonal(photonDirection0) > g4d_limit))
336 {
337 photonPolarization0 = GetPerpendicularPolarization(photonDirection0,photonPolarization0);
338 }
339 }
340
341 // Select randomly one element in the current material
342 const G4ParticleDefinition* particle = aDynamicGamma->GetDefinition();
343 const G4Element* elm = SelectRandomAtom(couple,particle,photonEnergy0);
344 G4int Z = (G4int)elm->GetZ();
345
346 G4double LowEPPCepsilon0 = 1. / (1. + 2. * e0m);
347 G4double LowEPPCepsilon0Sq = LowEPPCepsilon0 * LowEPPCepsilon0;
348 G4double alpha1 = -std::log(LowEPPCepsilon0);
349 G4double alpha2 = 0.5 * (1. - LowEPPCepsilon0Sq);
350
351 G4double wlPhoton = h_Planck*c_light/photonEnergy0;
352
353 // Sample the energy of the scattered photon
354 G4double LowEPPCepsilon;
355 G4double LowEPPCepsilonSq;
356 G4double oneCosT;
357 G4double sinT2;
358 G4double gReject;
359
360 if (verboseLevel > 3) {
361 G4cout << "Started loop to sample gamma energy" << G4endl;
362 }
363
364 do
365 {
366 if ( alpha1/(alpha1+alpha2) > G4UniformRand())
367 {
368 LowEPPCepsilon = G4Exp(-alpha1 * G4UniformRand());
369 LowEPPCepsilonSq = LowEPPCepsilon * LowEPPCepsilon;
370 }
371 else
372 {
373 LowEPPCepsilonSq = LowEPPCepsilon0Sq + (1. - LowEPPCepsilon0Sq) * G4UniformRand();
374 LowEPPCepsilon = std::sqrt(LowEPPCepsilonSq);
375 }
376
377 oneCosT = (1. - LowEPPCepsilon) / ( LowEPPCepsilon * e0m);
378 sinT2 = oneCosT * (2. - oneCosT);
379 G4double x = std::sqrt(oneCosT/2.) / (wlPhoton/cm);
380 G4double scatteringFunction = ComputeScatteringFunction(x, Z);
381 gReject = (1. - LowEPPCepsilon * sinT2 / (1. + LowEPPCepsilonSq)) * scatteringFunction;
382
383 } while(gReject < G4UniformRand()*Z);
384
385 G4double cosTheta = 1. - oneCosT;
386 G4double sinTheta = std::sqrt(sinT2);
387 G4double phi = SetPhi(LowEPPCepsilon,sinT2);
388 G4double dirx = sinTheta * std::cos(phi);
389 G4double diry = sinTheta * std::sin(phi);
390 G4double dirz = cosTheta ;
391
392 // Set outgoing photon polarization
393
394 G4ThreeVector photonPolarization1 = SetNewPolarization(LowEPPCepsilon,
395 sinT2,
396 phi,
397 cosTheta);
398
399 // Scatter photon energy and Compton electron direction - Method based on:
400 // J. M. C. Brown, M. R. Dimmock, J. E. Gillam and D. M. Paganin'
401 // "A low energy bound atomic electron Compton scattering model for Geant4"
402 // NIMB, Vol. 338, 77-88, 2014.
403
404 // Set constants and initialize scattering parameters
405 const G4double vel_c = c_light / (m/s);
406 const G4double momentum_au_to_nat = halfpi* hbar_Planck / Bohr_radius / (kg*m/s);
407 const G4double e_mass_kg = electron_mass_c2 / c_squared / kg ;
408
409 const G4int maxDopplerIterations = 1000;
410 G4double bindingE = 0.;
411 G4double pEIncident = photonEnergy0 ;
412 G4double pERecoil = -1.;
413 G4double eERecoil = -1.;
414 G4double e_alpha =0.;
415 G4double e_beta = 0.;
416
417 G4double CE_emission_flag = 0.;
418 G4double ePAU = -1;
419 G4int shellIdx = 0;
420 G4double u_temp = 0;
421 G4double cosPhiE =0;
422 G4double sinThetaE =0;
423 G4double cosThetaE =0;
424 G4int iteration = 0;
425
426 if (verboseLevel > 3) {
427 G4cout << "Started loop to sample photon energy and electron direction" << G4endl;
428 }
429
430 do{
431 // ******************************************
432 // | Determine scatter photon energy |
433 // ******************************************
434 do
435 {
436 iteration++;
437
438 // ********************************************
439 // | Sample bound electron information |
440 // ********************************************
441
442 // Select shell based on shell occupancy
443 shellIdx = shellData->SelectRandomShell(Z);
444 bindingE = shellData->BindingEnergy(Z,shellIdx)/MeV;
445
446 // Randomly sample bound electron momentum (memento: the data set is in Atomic Units)
447 ePAU = profileData->RandomSelectMomentum(Z,shellIdx);
448
449 // Convert to SI units
450 G4double ePSI = ePAU * momentum_au_to_nat;
451
452 //Calculate bound electron velocity and normalise to natural units
453 u_temp = sqrt( ((ePSI*ePSI)*(vel_c*vel_c)) / ((e_mass_kg*e_mass_kg)*(vel_c*vel_c)+(ePSI*ePSI)) )/vel_c;
454
455 // Sample incident electron direction, amorphous material, to scattering photon scattering plane
456 e_alpha = pi*G4UniformRand();
457 e_beta = twopi*G4UniformRand();
458
459 // Total energy of system
460 G4double eEIncident = electron_mass_c2 / sqrt( 1 - (u_temp*u_temp));
461 G4double systemE = eEIncident + pEIncident;
462
463 G4double gamma_temp = 1.0 / sqrt( 1 - (u_temp*u_temp));
464 G4double numerator = gamma_temp*electron_mass_c2*(1 - u_temp * std::cos(e_alpha));
465 G4double subdenom1 = u_temp*cosTheta*std::cos(e_alpha);
466 G4double subdenom2 = u_temp*sinTheta*std::sin(e_alpha)*std::cos(e_beta);
467 G4double denominator = (1.0 - cosTheta) + (gamma_temp*electron_mass_c2*(1 - subdenom1 - subdenom2) / pEIncident);
468 pERecoil = (numerator/denominator);
469 eERecoil = systemE - pERecoil;
470 CE_emission_flag = pEIncident - pERecoil;
471 } while ( (iteration <= maxDopplerIterations) && (CE_emission_flag < bindingE));
472
473 // End of recalculation of photon energy with Doppler broadening
474 // *******************************************************
475 // | Determine ejected Compton electron direction |
476 // *******************************************************
477
478 // Calculate velocity of ejected Compton electron
479
480 G4double a_temp = eERecoil / electron_mass_c2;
481 G4double u_p_temp = sqrt(1 - (1 / (a_temp*a_temp)));
482
483 // Coefficients and terms from simulatenous equations
484 G4double sinAlpha = std::sin(e_alpha);
485 G4double cosAlpha = std::cos(e_alpha);
486 G4double sinBeta = std::sin(e_beta);
487 G4double cosBeta = std::cos(e_beta);
488
489 G4double gamma = 1.0 / sqrt(1 - (u_temp*u_temp));
490 G4double gamma_p = 1.0 / sqrt(1 - (u_p_temp*u_p_temp));
491
492 G4double var_A = pERecoil*u_p_temp*sinTheta;
493 G4double var_B = u_p_temp* (pERecoil*cosTheta-pEIncident);
494 G4double var_C = (pERecoil-pEIncident) - ( (pERecoil*pEIncident) / (gamma_p*electron_mass_c2))*(1 - cosTheta);
495
496 G4double var_D1 = gamma*electron_mass_c2*pERecoil;
497 G4double var_D2 = (1 - (u_temp*cosTheta*cosAlpha) - (u_temp*sinTheta*cosBeta*sinAlpha));
498 G4double var_D3 = ((electron_mass_c2*electron_mass_c2)*(gamma*gamma_p - 1)) - (gamma_p*electron_mass_c2*pERecoil);
499 G4double var_D = var_D1*var_D2 + var_D3;
500
501 G4double var_E1 = ((gamma*gamma_p)*(electron_mass_c2*electron_mass_c2)*(u_temp*u_p_temp)*cosAlpha);
502 G4double var_E2 = gamma_p*electron_mass_c2*pERecoil*u_p_temp*cosTheta;
503 G4double var_E = var_E1 - var_E2;
504
505 G4double var_F1 = ((gamma*gamma_p)*(electron_mass_c2*electron_mass_c2)*(u_temp*u_p_temp)*cosBeta*sinAlpha);
506 G4double var_F2 = (gamma_p*electron_mass_c2*pERecoil*u_p_temp*sinTheta);
507 G4double var_F = var_F1 - var_F2;
508
509 G4double var_G = (gamma*gamma_p)*(electron_mass_c2*electron_mass_c2)*(u_temp*u_p_temp)*sinBeta*sinAlpha;
510
511 // Two equations form a quadratic form of Wx^2 + Yx + Z = 0
512 // Coefficents and solution to quadratic
513 G4double var_W1 = (var_F*var_B - var_E*var_A)*(var_F*var_B - var_E*var_A);
514 G4double var_W2 = (var_G*var_G)*(var_A*var_A) + (var_G*var_G)*(var_B*var_B);
515 G4double var_W = var_W1 + var_W2;
516
517 G4double var_Y = 2.0*(((var_A*var_D-var_F*var_C)*(var_F*var_B-var_E*var_A)) - ((var_G*var_G)*var_B*var_C));
518
519 G4double var_Z1 = (var_A*var_D - var_F*var_C)*(var_A*var_D - var_F*var_C);
520 G4double var_Z2 = (var_G*var_G)*(var_C*var_C) - (var_G*var_G)*(var_A*var_A);
521 G4double var_Z = var_Z1 + var_Z2;
522 G4double diff1 = var_Y*var_Y;
523 G4double diff2 = 4*var_W*var_Z;
524 G4double diff = diff1 - diff2;
525
526 // Check if diff is less than zero, if so ensure it is due to FPE
527 //Confirm that diff less than zero is due FPE, i.e if abs of diff / diff1 and diff/ diff2 is less
528 //than 10^(-g4d_order), then set diff to zero
529
530 if ((diff < 0.0) && (abs(diff / diff1) < g4d_limit) && (abs(diff / diff2) < g4d_limit) )
531 {
532 diff = 0.0;
533 }
534
535 // Plus and minus of quadratic
536 G4double X_p = (-var_Y + sqrt (diff))/(2*var_W);
537 G4double X_m = (-var_Y - sqrt (diff))/(2*var_W);
538
539 // Floating point precision protection
540 // Check if X_p and X_m are greater than or less than 1 or -1, if so clean up FPE
541 // Issue due to propagation of FPE and only impacts 8th sig fig onwards
542 if(X_p >1){X_p=1;} if(X_p<-1){X_p=-1;}
543 if(X_m >1){X_m=1;} if(X_m<-1){X_m=-1;}
544 // End of FP protection
545
546 G4double ThetaE = 0.;
547
548 // Randomly sample one of the two possible solutions and determin theta angle of ejected Compton electron
549 G4double sol_select = G4UniformRand();
550
551 if (sol_select < 0.5)
552 {
553 ThetaE = std::acos(X_p);
554 }
555 if (sol_select > 0.5)
556 {
557 ThetaE = std::acos(X_m);
558 }
559
560 cosThetaE = std::cos(ThetaE);
561 sinThetaE = std::sin(ThetaE);
562 G4double Theta = std::acos(cosTheta);
563
564 //Calculate electron Phi
565 G4double iSinThetaE = std::sqrt(1+std::tan((pi/2.0)-ThetaE)*std::tan((pi/2.0)-ThetaE));
566 G4double iSinTheta = std::sqrt(1+std::tan((pi/2.0)-Theta)*std::tan((pi/2.0)-Theta));
567 G4double ivar_A = iSinTheta/ (pERecoil*u_p_temp);
568 // Trigs
569 cosPhiE = (var_C - var_B*cosThetaE)*(ivar_A*iSinThetaE);
570 // End of calculation of ejection Compton electron direction
571 //Fix for floating point errors
572 } while ( (iteration <= maxDopplerIterations) && (abs(cosPhiE) > 1));
573
574 // Revert to original if maximum number of iterations threshold has been reached
575 if (iteration >= maxDopplerIterations)
576 {
577 pERecoil = photonEnergy0 ;
578 bindingE = 0.;
579 dirx=0.0;
580 diry=0.0;
581 dirz=1.0;
582 }
583
584 // Set "scattered" photon direction and energy
585 G4ThreeVector photonDirection1(dirx,diry,dirz);
586 SystemOfRefChange(photonDirection0,photonDirection1,
587 photonPolarization0,photonPolarization1);
588
589 if (pERecoil > 0.)
590 {
592 fParticleChange->ProposeMomentumDirection(photonDirection1) ;
593 fParticleChange->ProposePolarization(photonPolarization1);
594
595 // Set ejected Compton electron direction and energy
596 G4double PhiE = std::acos(cosPhiE);
597 G4double eDirX = sinThetaE * std::cos(phi+PhiE);
598 G4double eDirY = sinThetaE * std::sin(phi+PhiE);
599 G4double eDirZ = cosThetaE;
600
601 G4double eKineticEnergy = pEIncident - pERecoil - bindingE;
602
603 G4ThreeVector eDirection(eDirX,eDirY,eDirZ);
604 SystemOfRefChangeElect(photonDirection0,eDirection,
605 photonPolarization0);
606
608 eDirection,eKineticEnergy) ;
609 fvect->push_back(dp);
610 }
611 else
612 {
615 }
616
617 // sample deexcitation
618 //
619 if (verboseLevel > 3) {
620 G4cout << "Started atomic de-excitation " << fAtomDeexcitation << G4endl;
621 }
622
623 if(fAtomDeexcitation && iteration < maxDopplerIterations) {
624 G4int index = couple->GetIndex();
626 size_t nbefore = fvect->size();
628 const G4AtomicShell* shell = fAtomDeexcitation->GetAtomicShell(Z, as);
629 fAtomDeexcitation->GenerateParticles(fvect, shell, Z, index);
630 size_t nafter = fvect->size();
631 if(nafter > nbefore) {
632 for (size_t i=nbefore; i<nafter; ++i) {
633 //Check if there is enough residual energy
634 if (bindingE >= ((*fvect)[i])->GetKineticEnergy())
635 {
636 //Ok, this is a valid secondary: keep it
637 bindingE -= ((*fvect)[i])->GetKineticEnergy();
638 }
639 else
640 {
641 //Invalid secondary: not enough energy to create it!
642 //Keep its energy in the local deposit
643 delete (*fvect)[i];
644 (*fvect)[i]=nullptr;
645 }
646 }
647 }
648 }
649 }
650
651 //This should never happen
652 if(bindingE < 0.0)
653 G4Exception("G4LowEPPolarizedComptonModel::SampleSecondaries()",
654 "em2051",FatalException,"Negative local energy deposit");
655
657}
G4AtomicShellEnumerator
static constexpr double kg
Definition: G4SIunits.hh:167
static constexpr double m
Definition: G4SIunits.hh:109
static constexpr double s
Definition: G4SIunits.hh:154
static constexpr double pi
Definition: G4SIunits.hh:55
static constexpr double halfpi
Definition: G4SIunits.hh:57
static constexpr double cm
Definition: G4SIunits.hh:99
@ fStopAndKill
const G4double alpha2
bool isOrthogonal(const Hep3Vector &v, double epsilon=tolerance) const
Definition: SpaceVector.cc:233
double mag() const
double howOrthogonal(const Hep3Vector &v) const
Definition: SpaceVector.cc:215
G4double RandomSelectMomentum(G4int Z, G4int shellIndex) const
const G4ThreeVector & GetMomentumDirection() const
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4ThreeVector & GetPolarization() const
static G4Electron * Electron()
Definition: G4Electron.cc:93
G4ThreeVector GetRandomPolarization(G4ThreeVector &direction0)
void SystemOfRefChangeElect(G4ThreeVector &pdirection, G4ThreeVector &edirection, G4ThreeVector &ppolarization)
void SystemOfRefChange(G4ThreeVector &direction0, G4ThreeVector &direction1, G4ThreeVector &polarization0, G4ThreeVector &polarization1)
G4double ComputeScatteringFunction(G4double x, G4int Z)
G4ThreeVector GetPerpendicularPolarization(const G4ThreeVector &direction0, const G4ThreeVector &polarization0) const
G4ThreeVector SetNewPolarization(G4double LowEPPCepsilon, G4double sinT2, G4double phi, G4double cosTheta)
const G4String & GetName() const
Definition: G4Material.hh:173
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void ProposePolarization(const G4ThreeVector &dir)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
G4double BindingEnergy(G4int Z, G4int shellIndex) const
Definition: G4ShellData.cc:161
G4int SelectRandomShell(G4int Z) const
Definition: G4ShellData.cc:345
G4bool CheckDeexcitationActiveRegion(G4int coupleIndex)
virtual const G4AtomicShell * GetAtomicShell(G4int Z, G4AtomicShellEnumerator shell)=0
void GenerateParticles(std::vector< G4DynamicParticle * > *secVect, const G4AtomicShell *, G4int Z, G4int coupleIndex)
const G4Element * SelectRandomAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
Definition: G4VEmModel.hh:580
void ProposeTrackStatus(G4TrackStatus status)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
float electron_mass_c2
Definition: hepunit.py:273
float Bohr_radius
Definition: hepunit.py:289
float c_light
Definition: hepunit.py:256
float hbar_Planck
Definition: hepunit.py:263
float c_squared
Definition: hepunit.py:257
float h_Planck
Definition: hepunit.py:262

References alpha2, G4ShellData::BindingEnergy(), source.hepunit::Bohr_radius, source.hepunit::c_light, source.hepunit::c_squared, G4VAtomDeexcitation::CheckDeexcitationActiveRegion(), cm, ComputeScatteringFunction(), G4Electron::Electron(), source.hepunit::electron_mass_c2, FatalException, fAtomDeexcitation, fParticleChange, fStopAndKill, G4cout, G4endl, G4Exception(), G4Exp(), G4UniformRand, G4VAtomDeexcitation::GenerateParticles(), G4VAtomDeexcitation::GetAtomicShell(), G4DynamicParticle::GetDefinition(), G4MaterialCutsCouple::GetIndex(), G4DynamicParticle::GetKineticEnergy(), G4MaterialCutsCouple::GetMaterial(), G4DynamicParticle::GetMomentumDirection(), G4Material::GetName(), GetPerpendicularPolarization(), G4DynamicParticle::GetPolarization(), GetRandomPolarization(), G4Element::GetZ(), source.hepunit::h_Planck, halfpi, source.hepunit::hbar_Planck, CLHEP::Hep3Vector::howOrthogonal(), CLHEP::Hep3Vector::isOrthogonal(), kg, G4VEmModel::LowEnergyLimit(), m, CLHEP::Hep3Vector::mag(), MeV, pi, profileData, G4VParticleChange::ProposeLocalEnergyDeposit(), G4ParticleChangeForGamma::ProposeMomentumDirection(), G4ParticleChangeForGamma::ProposePolarization(), G4VParticleChange::ProposeTrackStatus(), G4DopplerProfile::RandomSelectMomentum(), s, G4VEmModel::SelectRandomAtom(), G4ShellData::SelectRandomShell(), SetNewPolarization(), SetPhi(), G4ParticleChangeForGamma::SetProposedKineticEnergy(), shellData, SystemOfRefChange(), SystemOfRefChangeElect(), twopi, verboseLevel, and Z.

◆ SecondaryThreshold()

G4double G4VEmModel::SecondaryThreshold ( ) const
inlineinherited

◆ SelectIsotopeNumber()

G4int G4VEmModel::SelectIsotopeNumber ( const G4Element elm)
inherited

Definition at line 319 of file G4VEmModel.cc.

320{
322 const size_t ni = elm->GetNumberOfIsotopes();
323 fCurrentIsotope = elm->GetIsotope(0);
324 size_t idx = 0;
325 if(ni > 1) {
326 const G4double* ab = elm->GetRelativeAbundanceVector();
328 for(; idx<ni; ++idx) {
329 x -= ab[idx];
330 if (x <= 0.0) {
331 fCurrentIsotope = elm->GetIsotope(idx);
332 break;
333 }
334 }
335 }
336 return fCurrentIsotope->GetN();
337}
static const G4double ab
G4double * GetRelativeAbundanceVector() const
Definition: G4Element.hh:167
const G4Isotope * GetIsotope(G4int iso) const
Definition: G4Element.hh:170
size_t GetNumberOfIsotopes() const
Definition: G4Element.hh:159
G4int GetN() const
Definition: G4Isotope.hh:93

References ab, G4VEmModel::fCurrentIsotope, G4UniformRand, G4Element::GetIsotope(), G4Isotope::GetN(), G4Element::GetNumberOfIsotopes(), G4Element::GetRelativeAbundanceVector(), and G4VEmModel::SetCurrentElement().

Referenced by G4eSingleCoulombScatteringModel::SampleSecondaries(), G4IonCoulombScatteringModel::SampleSecondaries(), G4eCoulombScatteringModel::SampleSecondaries(), G4hCoulombScatteringModel::SampleSecondaries(), and G4BetheHeitler5DModel::SampleSecondaries().

◆ SelectRandomAtom() [1/2]

const G4Element * G4VEmModel::SelectRandomAtom ( const G4Material mat,
const G4ParticleDefinition pd,
G4double  kineticEnergy,
G4double  cutEnergy = 0.0,
G4double  maxEnergy = DBL_MAX 
)
inherited

Definition at line 275 of file G4VEmModel.cc.

280{
281 size_t n = mat->GetNumberOfElements();
282 fCurrentElement = mat->GetElement(0);
283 if (n > 1) {
284 const G4double x = G4UniformRand()*
285 G4VEmModel::CrossSectionPerVolume(mat,pd,kinEnergy,tcut,tmax);
286 for(size_t i=0; i<n; ++i) {
287 if (x <= xsec[i]) {
288 fCurrentElement = mat->GetElement(i);
289 break;
290 }
291 }
292 }
293 return fCurrentElement;
294}

References G4VEmModel::CrossSectionPerVolume(), G4VEmModel::fCurrentElement, G4UniformRand, G4Material::GetElement(), G4Material::GetNumberOfElements(), CLHEP::detail::n, and G4VEmModel::xsec.

◆ SelectRandomAtom() [2/2]

const G4Element * G4VEmModel::SelectRandomAtom ( const G4MaterialCutsCouple couple,
const G4ParticleDefinition part,
G4double  kineticEnergy,
G4double  cutEnergy = 0.0,
G4double  maxEnergy = DBL_MAX 
)
inlineinherited

Definition at line 580 of file G4VEmModel.hh.

585{
586 SetCurrentCouple(couple);
588 ((*elmSelectors)[couple->GetIndex()])->SelectRandomAtom(kinEnergy) :
589 SelectRandomAtom(pBaseMaterial,part,kinEnergy,cutEnergy,maxEnergy);
590 fCurrentIsotope = nullptr;
591 return fCurrentElement;
592}

References G4VEmModel::elmSelectors, G4VEmModel::fCurrentElement, G4VEmModel::fCurrentIsotope, G4MaterialCutsCouple::GetIndex(), G4VEmModel::nSelectors, G4VEmModel::pBaseMaterial, G4VEmModel::SelectRandomAtom(), and G4VEmModel::SetCurrentCouple().

Referenced by G4AdjointBremsstrahlungModel::RapidSampleSecondaries(), G4LivermoreBremsstrahlungModel::SampleSecondaries(), G4JAEAElasticScatteringModel::SampleSecondaries(), G4JAEAPolarizedElasticScatteringModel::SampleSecondaries(), G4LivermoreComptonModel::SampleSecondaries(), G4LivermoreNuclearGammaConversionModel::SampleSecondaries(), G4LivermorePhotoElectricModel::SampleSecondaries(), G4LivermorePolarizedComptonModel::SampleSecondaries(), G4LivermorePolarizedGammaConversionModel::SampleSecondaries(), G4LivermorePolarizedRayleighModel::SampleSecondaries(), G4LivermoreRayleighModel::SampleSecondaries(), G4LowEPComptonModel::SampleSecondaries(), SampleSecondaries(), G4PenelopePhotoElectricModel::SampleSecondaries(), G4MuBremsstrahlungModel::SampleSecondaries(), G4MuPairProductionModel::SampleSecondaries(), G4hCoulombScatteringModel::SampleSecondaries(), G4KleinNishinaModel::SampleSecondaries(), G4PEEffectFluoModel::SampleSecondaries(), G4VEmModel::SelectRandomAtom(), and G4VEmModel::SelectTargetAtom().

◆ SelectRandomAtomNumber()

G4int G4VEmModel::SelectRandomAtomNumber ( const G4Material mat)
inherited

◆ SelectTargetAtom()

const G4Element * G4VEmModel::SelectTargetAtom ( const G4MaterialCutsCouple couple,
const G4ParticleDefinition part,
G4double  kineticEnergy,
G4double  logKineticEnergy,
G4double  cutEnergy = 0.0,
G4double  maxEnergy = DBL_MAX 
)
inlineinherited

◆ SetActivationHighEnergyLimit()

void G4VEmModel::SetActivationHighEnergyLimit ( G4double  val)
inlineinherited

◆ SetActivationLowEnergyLimit()

void G4VEmModel::SetActivationLowEnergyLimit ( G4double  val)
inlineinherited

◆ SetAngularDistribution()

void G4VEmModel::SetAngularDistribution ( G4VEmAngularDistribution p)
inlineinherited

Definition at line 628 of file G4VEmModel.hh.

629{
630 if(p != anglModel) {
631 delete anglModel;
632 anglModel = p;
633 }
634}

References G4VEmModel::anglModel.

Referenced by G4EmLivermorePhysics::ConstructProcess(), G4EmLowEPPhysics::ConstructProcess(), G4EmStandardPhysics::ConstructProcess(), G4EmStandardPhysics_option3::ConstructProcess(), G4EmStandardPhysics_option4::ConstructProcess(), G4EmStandardPhysicsSS::ConstructProcess(), G4BetheHeitlerModel::G4BetheHeitlerModel(), G4DNABornIonisationModel1::G4DNABornIonisationModel1(), G4DNABornIonisationModel2::G4DNABornIonisationModel2(), G4DNAEmfietzoglouIonisationModel::G4DNAEmfietzoglouIonisationModel(), G4DNARuddIonisationExtendedModel::G4DNARuddIonisationExtendedModel(), G4DNARuddIonisationModel::G4DNARuddIonisationModel(), G4eBremParametrizedModel::G4eBremParametrizedModel(), G4eBremsstrahlungRelModel::G4eBremsstrahlungRelModel(), G4IonParametrisedLossModel::G4IonParametrisedLossModel(), G4LivermoreBremsstrahlungModel::G4LivermoreBremsstrahlungModel(), G4LivermoreIonisationModel::G4LivermoreIonisationModel(), G4LivermorePhotoElectricModel::G4LivermorePhotoElectricModel(), G4LivermoreRayleighModel::G4LivermoreRayleighModel(), G4MicroElecInelasticModel::G4MicroElecInelasticModel(), G4MicroElecInelasticModel_new::G4MicroElecInelasticModel_new(), G4MuBremsstrahlungModel::G4MuBremsstrahlungModel(), G4MuPairProductionModel::G4MuPairProductionModel(), G4PAIModel::G4PAIModel(), G4PAIPhotModel::G4PAIPhotModel(), G4PairProductionRelModel::G4PairProductionRelModel(), G4PEEffectFluoModel::G4PEEffectFluoModel(), G4SeltzerBergerModel::G4SeltzerBergerModel(), G4AtimaEnergyLossModel::Initialise(), G4BetheBlochModel::Initialise(), G4BraggIonModel::Initialise(), G4BraggModel::Initialise(), G4ICRU73QOModel::Initialise(), G4LindhardSorensenIonModel::Initialise(), and G4MollerBhabhaModel::Initialise().

◆ SetAngularGeneratorFlag()

void G4VEmModel::SetAngularGeneratorFlag ( G4bool  val)
inlineinherited

Definition at line 725 of file G4VEmModel.hh.

726{
728}
G4bool useAngularGenerator
Definition: G4VEmModel.hh:461

References G4VEmModel::useAngularGenerator.

Referenced by G4VEnergyLossProcess::PreparePhysicsTable().

◆ SetCrossSectionTable()

void G4VEmModel::SetCrossSectionTable ( G4PhysicsTable p,
G4bool  isLocal 
)
inherited

Definition at line 455 of file G4VEmModel.cc.

456{
457 if(p != xSectionTable) {
458 if(xSectionTable != nullptr && localTable) {
460 delete xSectionTable;
461 }
462 xSectionTable = p;
463 }
464 localTable = isLocal;
465}
void clearAndDestroy()
G4bool localTable
Definition: G4VEmModel.hh:459

References G4PhysicsTable::clearAndDestroy(), G4VEmModel::localTable, and G4VEmModel::xSectionTable.

Referenced by G4VMultipleScattering::BuildPhysicsTable().

◆ SetCurrentCouple()

void G4VEmModel::SetCurrentCouple ( const G4MaterialCutsCouple ptr)
inlineinherited

Definition at line 472 of file G4VEmModel.hh.

473{
474 if(fCurrentCouple != ptr) {
475 fCurrentCouple = ptr;
477 pBaseMaterial = ptr->GetMaterial();
478 pFactor = 1.0;
479 if(useBaseMaterials) {
480 basedCoupleIndex = (*theDensityIdx)[currentCoupleIndex];
481 if(nullptr != pBaseMaterial->GetBaseMaterial())
483 pFactor = (*theDensityFactor)[currentCoupleIndex];
484 }
485 }
486}
const G4Material * GetBaseMaterial() const
Definition: G4Material.hh:229
G4bool useBaseMaterials
Definition: G4VEmModel.hh:462
size_t currentCoupleIndex
Definition: G4VEmModel.hh:448
size_t basedCoupleIndex
Definition: G4VEmModel.hh:449

References G4VEmModel::basedCoupleIndex, G4VEmModel::currentCoupleIndex, G4VEmModel::fCurrentCouple, G4Material::GetBaseMaterial(), G4MaterialCutsCouple::GetIndex(), G4MaterialCutsCouple::GetMaterial(), G4VEmModel::pBaseMaterial, G4VEmModel::pFactor, and G4VEmModel::useBaseMaterials.

Referenced by G4VMultipleScattering::AlongStepGetPhysicalInteractionLength(), G4EmMultiModel::ComputeCrossSectionPerAtom(), G4VEmModel::ComputeDEDX(), G4TablesForExtrapolator::ComputeTrasportXS(), G4UrbanAdjointMscModel::ComputeTruePathLengthLimit(), G4GoudsmitSaundersonMscModel::ComputeTruePathLengthLimit(), G4UrbanMscModel::ComputeTruePathLengthLimit(), G4VEmModel::CrossSection(), G4AdjointPhotoElectricModel::DefineCurrentMaterialAndElectronEnergy(), G4WentzelVIModel::DefineMaterial(), G4WentzelVIRelModel::DefineMaterial(), G4EmCalculator::GetCrossSectionPerVolume(), G4LivermoreGammaConversion5DModel::Initialise(), G4VEmModel::InitialiseElementSelectors(), G4PEEffectFluoModel::SampleSecondaries(), G4EmMultiModel::SampleSecondaries(), G4VEnergyLossProcess::SelectModel(), G4VEmProcess::SelectModel(), G4VEmModel::SelectRandomAtom(), G4VEmModel::SelectTargetAtom(), and G4VEmModel::Value().

◆ SetCurrentElement()

void G4VEmModel::SetCurrentElement ( const G4Element elm)
inlineprotectedinherited

◆ SetDeexcitationFlag()

void G4VEmModel::SetDeexcitationFlag ( G4bool  val)
inlineinherited

Definition at line 823 of file G4VEmModel.hh.

824{
825 flagDeexcitation = val;
826}

References G4VEmModel::flagDeexcitation.

Referenced by G4DNABornIonisationModel1::G4DNABornIonisationModel1(), G4DNABornIonisationModel2::G4DNABornIonisationModel2(), G4DNACPA100IonisationModel::G4DNACPA100IonisationModel(), G4DNAEmfietzoglouIonisationModel::G4DNAEmfietzoglouIonisationModel(), G4DNARelativisticIonisationModel::G4DNARelativisticIonisationModel(), G4DNARuddIonisationExtendedModel::G4DNARuddIonisationExtendedModel(), G4DNARuddIonisationModel::G4DNARuddIonisationModel(), G4KleinNishinaModel::G4KleinNishinaModel(), G4LEPTSIonisationModel::G4LEPTSIonisationModel(), G4LivermoreComptonModel::G4LivermoreComptonModel(), G4LivermorePhotoElectricModel::G4LivermorePhotoElectricModel(), G4LivermorePolarizedComptonModel::G4LivermorePolarizedComptonModel(), G4LowEPComptonModel::G4LowEPComptonModel(), G4LowEPPolarizedComptonModel(), G4MicroElecInelasticModel::G4MicroElecInelasticModel(), G4MicroElecInelasticModel_new::G4MicroElecInelasticModel_new(), G4PEEffectFluoModel::G4PEEffectFluoModel(), G4PenelopeBremsstrahlungModel::G4PenelopeBremsstrahlungModel(), G4PenelopeComptonModel::G4PenelopeComptonModel(), G4PenelopeIonisationModel::G4PenelopeIonisationModel(), G4PenelopePhotoElectricModel::G4PenelopePhotoElectricModel(), G4AtimaEnergyLossModel::Initialise(), G4BetheBlochModel::Initialise(), G4BraggIonModel::Initialise(), G4BraggModel::Initialise(), G4ICRU73QOModel::Initialise(), and G4LindhardSorensenIonModel::Initialise().

◆ SetElementSelectors()

void G4VEmModel::SetElementSelectors ( std::vector< G4EmElementSelector * > *  p)
inlineinherited

Definition at line 852 of file G4VEmModel.hh.

853{
854 if(p != elmSelectors) {
855 elmSelectors = p;
856 nSelectors = (nullptr != elmSelectors) ? G4int(elmSelectors->size()) : 0;
857 localElmSelectors = false;
858 }
859}
G4bool localElmSelectors
Definition: G4VEmModel.hh:460

References G4VEmModel::elmSelectors, G4VEmModel::localElmSelectors, and G4VEmModel::nSelectors.

Referenced by G4eDPWACoulombScatteringModel::InitialiseLocal(), G4eSingleCoulombScatteringModel::InitialiseLocal(), G4PAIModel::InitialiseLocal(), G4PAIPhotModel::InitialiseLocal(), G4JAEAElasticScatteringModel::InitialiseLocal(), G4JAEAPolarizedElasticScatteringModel::InitialiseLocal(), G4LivermoreComptonModel::InitialiseLocal(), G4LivermoreNuclearGammaConversionModel::InitialiseLocal(), G4LivermorePolarizedComptonModel::InitialiseLocal(), G4LivermorePolarizedGammaConversionModel::InitialiseLocal(), G4LivermorePolarizedRayleighModel::InitialiseLocal(), G4LivermoreRayleighModel::InitialiseLocal(), G4LowEPComptonModel::InitialiseLocal(), InitialiseLocal(), G4PenelopePhotoElectricModel::InitialiseLocal(), G4MuBremsstrahlungModel::InitialiseLocal(), G4MuPairProductionModel::InitialiseLocal(), G4BetheHeitlerModel::InitialiseLocal(), G4eBremParametrizedModel::InitialiseLocal(), G4eBremsstrahlungRelModel::InitialiseLocal(), G4eCoulombScatteringModel::InitialiseLocal(), G4hCoulombScatteringModel::InitialiseLocal(), G4KleinNishinaCompton::InitialiseLocal(), G4KleinNishinaModel::InitialiseLocal(), and G4PairProductionRelModel::InitialiseLocal().

◆ SetFluctuationFlag()

void G4VEmModel::SetFluctuationFlag ( G4bool  val)
inlineinherited

Definition at line 732 of file G4VEmModel.hh.

733{
734 lossFlucFlag = val;
735}
G4bool lossFlucFlag
Definition: G4VEmModel.hh:450

References G4VEmModel::lossFlucFlag.

Referenced by G4EmCalculator::ComputeNuclearDEDX().

◆ SetForceBuildTable()

void G4VEmModel::SetForceBuildTable ( G4bool  val)
inlineinherited

Definition at line 830 of file G4VEmModel.hh.

831{
833}

References G4VEmModel::flagForceBuildTable.

◆ SetHighEnergyLimit()

void G4VEmModel::SetHighEnergyLimit ( G4double  val)
inlineinherited

Definition at line 767 of file G4VEmModel.hh.

768{
769 highLimit = val;
770}

References G4VEmModel::highLimit.

Referenced by G4EmModelActivator::ActivateEmOptions(), G4EmModelActivator::ActivatePAI(), LBE::ConstructEM(), G4EmDNAPhysics_option2::ConstructProcess(), G4EmDNAPhysics_option5::ConstructProcess(), G4EmDNAPhysics_option7::ConstructProcess(), G4EmDNAPhysics_stationary::ConstructProcess(), G4EmLivermorePhysics::ConstructProcess(), G4EmLowEPPhysics::ConstructProcess(), G4EmPenelopePhysics::ConstructProcess(), G4EmStandardPhysics::ConstructProcess(), G4EmStandardPhysics_option1::ConstructProcess(), G4EmStandardPhysics_option2::ConstructProcess(), G4EmStandardPhysics_option4::ConstructProcess(), G4EmStandardPhysicsGS::ConstructProcess(), G4EmStandardPhysicsWVI::ConstructProcess(), G4BraggIonModel::G4BraggIonModel(), G4BraggModel::G4BraggModel(), G4DNAChampionElasticModel::G4DNAChampionElasticModel(), G4DNACPA100ElasticModel::G4DNACPA100ElasticModel(), G4DNACPA100ExcitationModel::G4DNACPA100ExcitationModel(), G4DNACPA100IonisationModel::G4DNACPA100IonisationModel(), G4DNAELSEPAElasticModel::G4DNAELSEPAElasticModel(), G4DNAEmfietzoglouExcitationModel::G4DNAEmfietzoglouExcitationModel(), G4DNAEmfietzoglouIonisationModel::G4DNAEmfietzoglouIonisationModel(), G4DNAIonElasticModel::G4DNAIonElasticModel(), G4DNAMeltonAttachmentModel::G4DNAMeltonAttachmentModel(), G4DNASancheExcitationModel::G4DNASancheExcitationModel(), G4DNAScreenedRutherfordElasticModel::G4DNAScreenedRutherfordElasticModel(), G4DNATransformElectronModel::G4DNATransformElectronModel(), G4DNAUeharaScreenedRutherfordElasticModel::G4DNAUeharaScreenedRutherfordElasticModel(), G4eDPWACoulombScatteringModel::G4eDPWACoulombScatteringModel(), G4ICRU73QOModel::G4ICRU73QOModel(), G4MicroElecElasticModel::G4MicroElecElasticModel(), G4MicroElecElasticModel_new::G4MicroElecElasticModel_new(), G4PenelopeAnnihilationModel::G4PenelopeAnnihilationModel(), G4PenelopeBremsstrahlungModel::G4PenelopeBremsstrahlungModel(), G4PenelopeComptonModel::G4PenelopeComptonModel(), G4PenelopeGammaConversionModel::G4PenelopeGammaConversionModel(), G4PenelopeIonisationModel::G4PenelopeIonisationModel(), G4PenelopePhotoElectricModel::G4PenelopePhotoElectricModel(), G4PenelopeRayleighModel::G4PenelopeRayleighModel(), G4PenelopeRayleighModelMI::G4PenelopeRayleighModelMI(), G4TDNAOneStepThermalizationModel< MODEL >::G4TDNAOneStepThermalizationModel(), G4XrayRayleighModel::G4XrayRayleighModel(), G4VLEPTSModel::Init(), G4DNAChampionElasticModel::Initialise(), G4DNACPA100ElasticModel::Initialise(), G4DNADingfelderChargeDecreaseModel::Initialise(), G4DNADingfelderChargeIncreaseModel::Initialise(), G4DNAMeltonAttachmentModel::Initialise(), G4DNAMillerGreenExcitationModel::Initialise(), G4DNARuddIonisationExtendedModel::Initialise(), G4DNARuddIonisationModel::Initialise(), G4DNASancheExcitationModel::Initialise(), G4MicroElecElasticModel::Initialise(), G4MicroElecInelasticModel::Initialise(), G4MicroElecInelasticModel_new::Initialise(), G4DNABornExcitationModel1::Initialise(), G4DNABornExcitationModel2::Initialise(), G4DNABornIonisationModel1::Initialise(), G4DNABornIonisationModel2::Initialise(), G4DNAELSEPAElasticModel::Initialise(), G4DNAModelInterface::Initialise(), G4DNAIonElasticModel::Initialise(), G4hhIonisation::InitialiseEnergyLossProcess(), G4mplIonisation::InitialiseEnergyLossProcess(), G4ePairProduction::InitialiseEnergyLossProcess(), G4MuBremsstrahlung::InitialiseEnergyLossProcess(), G4MuIonisation::InitialiseEnergyLossProcess(), G4MuPairProduction::InitialiseEnergyLossProcess(), G4PolarizedBremsstrahlung::InitialiseEnergyLossProcess(), G4PolarizedIonisation::InitialiseEnergyLossProcess(), G4eBremsstrahlung::InitialiseEnergyLossProcess(), G4eIonisation::InitialiseEnergyLossProcess(), G4hIonisation::InitialiseEnergyLossProcess(), G4ionIonisation::InitialiseEnergyLossProcess(), G4DNAAttachment::InitialiseProcess(), G4DNAChargeDecrease::InitialiseProcess(), G4DNAChargeIncrease::InitialiseProcess(), G4DNADissociation::InitialiseProcess(), G4DNAElastic::InitialiseProcess(), G4DNAExcitation::InitialiseProcess(), G4DNAIonisation::InitialiseProcess(), G4DNAPlasmonExcitation::InitialiseProcess(), G4DNAPositronium::InitialiseProcess(), G4DNARotExcitation::InitialiseProcess(), G4DNAVibExcitation::InitialiseProcess(), G4PolarizedCompton::InitialiseProcess(), G4PolarizedGammaConversion::InitialiseProcess(), G4PolarizedPhotoElectric::InitialiseProcess(), G4ComptonScattering::InitialiseProcess(), G4CoulombScattering::InitialiseProcess(), G4eplusAnnihilation::InitialiseProcess(), G4GammaConversion::InitialiseProcess(), G4PhotoElectricEffect::InitialiseProcess(), G4VEmProcess::PreparePhysicsTable(), G4VEnergyLossProcess::PreparePhysicsTable(), G4VMultipleScattering::PreparePhysicsTable(), G4DNAUeharaScreenedRutherfordElasticModel::SelectHighEnergyLimit(), G4VEmAdjointModel::SetHighEnergyLimit(), G4DNAELSEPAElasticModel::SetMaximumEnergy(), G4mplIonisationModel::SetParticle(), G4mplIonisationWithDeltaModel::SetParticle(), and G4EmConfigurator::UpdateModelEnergyRange().

◆ SetLocked()

void G4VEmModel::SetLocked ( G4bool  val)
inlineinherited

◆ SetLowEnergyLimit()

void G4VEmModel::SetLowEnergyLimit ( G4double  val)
inlineinherited

Definition at line 774 of file G4VEmModel.hh.

775{
776 lowLimit = val;
777}

References G4VEmModel::lowLimit.

Referenced by G4EmModelActivator::ActivatePAI(), G4EmDNAPhysics_option2::ConstructProcess(), G4EmDNAPhysics_option5::ConstructProcess(), G4EmDNAPhysics_stationary::ConstructProcess(), G4EmLivermorePhysics::ConstructProcess(), G4EmLowEPPhysics::ConstructProcess(), G4EmPenelopePhysics::ConstructProcess(), G4EmStandardPhysics::ConstructProcess(), G4EmStandardPhysics_option1::ConstructProcess(), G4EmStandardPhysics_option2::ConstructProcess(), G4EmStandardPhysics_option3::ConstructProcess(), G4EmStandardPhysics_option4::ConstructProcess(), G4EmStandardPhysicsGS::ConstructProcess(), G4EmStandardPhysicsWVI::ConstructProcess(), G4DNASancheExcitationModel::ExtendLowEnergyLimit(), G4AtimaEnergyLossModel::G4AtimaEnergyLossModel(), G4BetheBlochModel::G4BetheBlochModel(), G4BetheHeitler5DModel::G4BetheHeitler5DModel(), G4DNAChampionElasticModel::G4DNAChampionElasticModel(), G4DNACPA100ElasticModel::G4DNACPA100ElasticModel(), G4DNACPA100ExcitationModel::G4DNACPA100ExcitationModel(), G4DNACPA100IonisationModel::G4DNACPA100IonisationModel(), G4DNAELSEPAElasticModel::G4DNAELSEPAElasticModel(), G4DNAEmfietzoglouExcitationModel::G4DNAEmfietzoglouExcitationModel(), G4DNAEmfietzoglouIonisationModel::G4DNAEmfietzoglouIonisationModel(), G4DNAIonElasticModel::G4DNAIonElasticModel(), G4DNAMeltonAttachmentModel::G4DNAMeltonAttachmentModel(), G4DNASancheExcitationModel::G4DNASancheExcitationModel(), G4DNAScreenedRutherfordElasticModel::G4DNAScreenedRutherfordElasticModel(), G4DNATransformElectronModel::G4DNATransformElectronModel(), G4DNAUeharaScreenedRutherfordElasticModel::G4DNAUeharaScreenedRutherfordElasticModel(), G4DummyModel::G4DummyModel(), G4eBremParametrizedModel::G4eBremParametrizedModel(), G4eBremsstrahlungRelModel::G4eBremsstrahlungRelModel(), G4eDPWACoulombScatteringModel::G4eDPWACoulombScatteringModel(), G4LivermoreBremsstrahlungModel::G4LivermoreBremsstrahlungModel(), G4MicroElecElasticModel::G4MicroElecElasticModel(), G4MicroElecElasticModel_new::G4MicroElecElasticModel_new(), G4SeltzerBergerModel::G4SeltzerBergerModel(), G4TDNAOneStepThermalizationModel< MODEL >::G4TDNAOneStepThermalizationModel(), G4VLEPTSModel::Init(), G4DNAChampionElasticModel::Initialise(), G4DNACPA100ElasticModel::Initialise(), G4DNADingfelderChargeDecreaseModel::Initialise(), G4DNADingfelderChargeIncreaseModel::Initialise(), G4DNAMeltonAttachmentModel::Initialise(), G4DNAMillerGreenExcitationModel::Initialise(), G4DNARuddIonisationExtendedModel::Initialise(), G4DNARuddIonisationModel::Initialise(), G4MicroElecElasticModel::Initialise(), G4MicroElecInelasticModel::Initialise(), G4MicroElecInelasticModel_new::Initialise(), G4BetheHeitler5DModel::Initialise(), G4DNABornExcitationModel1::Initialise(), G4DNABornExcitationModel2::Initialise(), G4DNABornIonisationModel1::Initialise(), G4DNABornIonisationModel2::Initialise(), G4DNAELSEPAElasticModel::Initialise(), G4DNAModelInterface::Initialise(), G4DNAIonElasticModel::Initialise(), G4hhIonisation::InitialiseEnergyLossProcess(), G4mplIonisation::InitialiseEnergyLossProcess(), G4ePairProduction::InitialiseEnergyLossProcess(), G4MuBremsstrahlung::InitialiseEnergyLossProcess(), G4MuIonisation::InitialiseEnergyLossProcess(), G4MuPairProduction::InitialiseEnergyLossProcess(), G4PolarizedBremsstrahlung::InitialiseEnergyLossProcess(), G4PolarizedIonisation::InitialiseEnergyLossProcess(), G4eBremsstrahlung::InitialiseEnergyLossProcess(), G4eIonisation::InitialiseEnergyLossProcess(), G4hIonisation::InitialiseEnergyLossProcess(), G4ionIonisation::InitialiseEnergyLossProcess(), G4DNAAttachment::InitialiseProcess(), G4DNAChargeDecrease::InitialiseProcess(), G4DNAChargeIncrease::InitialiseProcess(), G4DNADissociation::InitialiseProcess(), G4DNAElastic::InitialiseProcess(), G4DNAExcitation::InitialiseProcess(), G4DNAIonisation::InitialiseProcess(), G4DNAPlasmonExcitation::InitialiseProcess(), G4DNAPositronium::InitialiseProcess(), G4DNARotExcitation::InitialiseProcess(), G4DNAVibExcitation::InitialiseProcess(), G4PolarizedCompton::InitialiseProcess(), G4PolarizedGammaConversion::InitialiseProcess(), G4PolarizedPhotoElectric::InitialiseProcess(), G4ComptonScattering::InitialiseProcess(), G4CoulombScattering::InitialiseProcess(), G4eplusAnnihilation::InitialiseProcess(), G4GammaConversion::InitialiseProcess(), G4PhotoElectricEffect::InitialiseProcess(), G4VEmAdjointModel::SetLowEnergyLimit(), G4mplIonisationModel::SetParticle(), G4mplIonisationWithDeltaModel::SetParticle(), and G4EmConfigurator::UpdateModelEnergyRange().

◆ SetLPMFlag()

void G4VEmModel::SetLPMFlag ( G4bool  val)
inlineinherited

◆ SetMasterThread()

void G4VEmModel::SetMasterThread ( G4bool  val)
inlineinherited

◆ SetNewPolarization()

G4ThreeVector G4LowEPPolarizedComptonModel::SetNewPolarization ( G4double  LowEPPCepsilon,
G4double  sinT2,
G4double  phi,
G4double  cosTheta 
)
private

Definition at line 888 of file G4LowEPPolarizedComptonModel.cc.

892{
893 G4double rand1;
894 G4double rand2;
895 G4double cosPhi = std::cos(phi);
896 G4double sinPhi = std::sin(phi);
897 G4double sinTheta = std::sqrt(sinT2);
898 G4double cosP2 = cosPhi*cosPhi;
899 G4double normalisation = std::sqrt(1. - cosP2*sinT2);
900
901 // Method based on:
902 // D. Xu, Z. He and F. Zhang
903 // "Detection of Gamma Ray Polarization Using a 3-D Position Sensitive CdZnTe Detector"
904 // IEEE TNS, Vol. 52(4), 1160-1164, 2005.
905
906 // Determination of Theta
907
908 G4double theta;
909 rand1 = G4UniformRand();
910 rand2 = G4UniformRand();
911
912 if (rand1<(LowEPPCepsilon+1.0/LowEPPCepsilon-2)/(2.0*(LowEPPCepsilon+1.0/LowEPPCepsilon)-4.0*sinT2*cosP2))
913 {
914 if (rand2<0.5)
915 theta = pi/2.0;
916 else
917 theta = 3.0*pi/2.0;
918 }
919 else
920 {
921 if (rand2<0.5)
922 theta = 0;
923 else
924 theta = pi;
925 }
926 G4double cosBeta = std::cos(theta);
927 G4double sinBeta = std::sqrt(1-cosBeta*cosBeta);
928
929 G4ThreeVector photonPolarization1;
930
931 G4double xParallel = normalisation*cosBeta;
932 G4double yParallel = -(sinT2*cosPhi*sinPhi)*cosBeta/normalisation;
933 G4double zParallel = -(costheta*sinTheta*cosPhi)*cosBeta/normalisation;
934 G4double xPerpendicular = 0.;
935 G4double yPerpendicular = (costheta)*sinBeta/normalisation;
936 G4double zPerpendicular = -(sinTheta*sinPhi)*sinBeta/normalisation;
937
938 G4double xTotal = (xParallel + xPerpendicular);
939 G4double yTotal = (yParallel + yPerpendicular);
940 G4double zTotal = (zParallel + zPerpendicular);
941
942 photonPolarization1.setX(xTotal);
943 photonPolarization1.setY(yTotal);
944 photonPolarization1.setZ(zTotal);
945
946 return photonPolarization1;
947
948}

References G4UniformRand, pi, CLHEP::Hep3Vector::setX(), CLHEP::Hep3Vector::setY(), and CLHEP::Hep3Vector::setZ().

Referenced by SampleSecondaries().

◆ SetParticleChange()

void G4VEmModel::SetParticleChange ( G4VParticleChange p,
G4VEmFluctuationModel f = nullptr 
)
inherited

◆ SetPerpendicularVector()

G4ThreeVector G4LowEPPolarizedComptonModel::SetPerpendicularVector ( G4ThreeVector a)
private

Definition at line 829 of file G4LowEPPolarizedComptonModel.cc.

830{
831 G4double dx = a.x();
832 G4double dy = a.y();
833 G4double dz = a.z();
834 G4double x = dx < 0.0 ? -dx : dx;
835 G4double y = dy < 0.0 ? -dy : dy;
836 G4double z = dz < 0.0 ? -dz : dz;
837 if (x < y) {
838 return x < z ? G4ThreeVector(-dy,dx,0) : G4ThreeVector(0,-dz,dy);
839 }else{
840 return y < z ? G4ThreeVector(dz,0,-dx) : G4ThreeVector(-dy,dx,0);
841 }
842}
CLHEP::Hep3Vector G4ThreeVector

References CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

Referenced by GetRandomPolarization().

◆ SetPhi()

G4double G4LowEPPolarizedComptonModel::SetPhi ( G4double  energyRate,
G4double  sinT2 
)
private

Definition at line 802 of file G4LowEPPolarizedComptonModel.cc.

804{
805 G4double rand1;
806 G4double rand2;
807 G4double phiProbability;
808 G4double phi;
809 G4double a, b;
810
811 do
812 {
813 rand1 = G4UniformRand();
814 rand2 = G4UniformRand();
815 phiProbability=0.;
816 phi = twopi*rand1;
817
818 a = 2*sinT2;
819 b = energyRate + 1/energyRate;
820
821 phiProbability = 1 - (a/b)*(std::cos(phi)*std::cos(phi));
822 }
823 while ( rand2 > phiProbability );
824 return phi;
825}

References G4UniformRand, and twopi.

Referenced by SampleSecondaries().

◆ SetPolarAngleLimit()

void G4VEmModel::SetPolarAngleLimit ( G4double  val)
inlineinherited

◆ SetSecondaryThreshold()

void G4VEmModel::SetSecondaryThreshold ( G4double  val)
inlineinherited

◆ SetTripletModel()

void G4VEmModel::SetTripletModel ( G4VEmModel p)
inlineinherited

Definition at line 645 of file G4VEmModel.hh.

646{
647 if(p != fTripletModel) {
648 delete fTripletModel;
649 fTripletModel = p;
650 }
651}

References G4VEmModel::fTripletModel.

Referenced by G4eplusTo2GammaOKVIModel::G4eplusTo2GammaOKVIModel().

◆ SetupForMaterial()

void G4VEmModel::SetupForMaterial ( const G4ParticleDefinition ,
const G4Material ,
G4double  kineticEnergy 
)
virtualinherited

◆ SetUseBaseMaterials()

void G4VEmModel::SetUseBaseMaterials ( G4bool  val)
inlineinherited

◆ StartTracking()

void G4VEmModel::StartTracking ( G4Track )
virtualinherited

◆ SystemOfRefChange()

void G4LowEPPolarizedComptonModel::SystemOfRefChange ( G4ThreeVector direction0,
G4ThreeVector direction1,
G4ThreeVector polarization0,
G4ThreeVector polarization1 
)
private

Definition at line 951 of file G4LowEPPolarizedComptonModel.cc.

955{
956 // direction0 is the original photon direction ---> z
957 // polarization0 is the original photon polarization ---> x
958 // need to specify y axis in the real reference frame ---> y
959 G4ThreeVector Axis_Z0 = direction0.unit();
960 G4ThreeVector Axis_X0 = polarization0.unit();
961 G4ThreeVector Axis_Y0 = (Axis_Z0.cross(Axis_X0)).unit(); // to be confirmed;
962
963 G4double direction_x = direction1.getX();
964 G4double direction_y = direction1.getY();
965 G4double direction_z = direction1.getZ();
966
967 direction1 = (direction_x*Axis_X0 + direction_y*Axis_Y0 + direction_z*Axis_Z0).unit();
968 G4double polarization_x = polarization1.getX();
969 G4double polarization_y = polarization1.getY();
970 G4double polarization_z = polarization1.getZ();
971
972 polarization1 = (polarization_x*Axis_X0 + polarization_y*Axis_Y0 + polarization_z*Axis_Z0).unit();
973
974}
double getZ() const
double getX() const
double getY() const

References CLHEP::Hep3Vector::cross(), CLHEP::Hep3Vector::getX(), CLHEP::Hep3Vector::getY(), CLHEP::Hep3Vector::getZ(), and CLHEP::Hep3Vector::unit().

Referenced by SampleSecondaries().

◆ SystemOfRefChangeElect()

void G4LowEPPolarizedComptonModel::SystemOfRefChangeElect ( G4ThreeVector pdirection,
G4ThreeVector edirection,
G4ThreeVector ppolarization 
)
private

Definition at line 977 of file G4LowEPPolarizedComptonModel.cc.

980{
981 // direction0 is the original photon direction ---> z
982 // polarization0 is the original photon polarization ---> x
983 // need to specify y axis in the real reference frame ---> y
984 G4ThreeVector Axis_Z0 = pdirection.unit();
985 G4ThreeVector Axis_X0 = ppolarization.unit();
986 G4ThreeVector Axis_Y0 = (Axis_Z0.cross(Axis_X0)).unit(); // to be confirmed;
987
988 G4double direction_x = edirection.getX();
989 G4double direction_y = edirection.getY();
990 G4double direction_z = edirection.getZ();
991
992 edirection = (direction_x*Axis_X0 + direction_y*Axis_Y0 + direction_z*Axis_Z0).unit();
993}

References CLHEP::Hep3Vector::cross(), CLHEP::Hep3Vector::getX(), CLHEP::Hep3Vector::getY(), CLHEP::Hep3Vector::getZ(), and CLHEP::Hep3Vector::unit().

Referenced by SampleSecondaries().

◆ UseAngularGeneratorFlag()

G4bool G4VEmModel::UseAngularGeneratorFlag ( ) const
inlineinherited

◆ UseBaseMaterials()

G4bool G4VEmModel::UseBaseMaterials ( ) const
inlineinherited

Definition at line 760 of file G4VEmModel.hh.

761{
762 return useBaseMaterials;
763}

References G4VEmModel::useBaseMaterials.

◆ Value()

G4double G4VEmModel::Value ( const G4MaterialCutsCouple couple,
const G4ParticleDefinition p,
G4double  kineticEnergy 
)
virtualinherited

Field Documentation

◆ anglModel

G4VEmAngularDistribution* G4VEmModel::anglModel = nullptr
privateinherited

◆ basedCoupleIndex

size_t G4VEmModel::basedCoupleIndex = 0
protectedinherited

◆ currentCoupleIndex

size_t G4VEmModel::currentCoupleIndex = 0
protectedinherited

Definition at line 448 of file G4VEmModel.hh.

Referenced by G4VEmModel::SetCurrentCouple().

◆ data

G4PhysicsFreeVector * G4LowEPPolarizedComptonModel::data = {nullptr}
staticprivate

◆ elmSelectors

std::vector<G4EmElementSelector*>* G4VEmModel::elmSelectors = nullptr
privateinherited

◆ eMaxActive

G4double G4VEmModel::eMaxActive = DBL_MAX
privateinherited

◆ eMinActive

G4double G4VEmModel::eMinActive = 0.0
privateinherited

◆ fAtomDeexcitation

G4VAtomDeexcitation* G4LowEPPolarizedComptonModel::fAtomDeexcitation
private

◆ fCurrentCouple

const G4MaterialCutsCouple* G4VEmModel::fCurrentCouple = nullptr
privateinherited

Definition at line 416 of file G4VEmModel.hh.

Referenced by G4VEmModel::CurrentCouple(), and G4VEmModel::SetCurrentCouple().

◆ fCurrentElement

const G4Element* G4VEmModel::fCurrentElement = nullptr
privateinherited

◆ fCurrentIsotope

const G4Isotope* G4VEmModel::fCurrentIsotope = nullptr
privateinherited

◆ fElementData

G4ElementData* G4VEmModel::fElementData = nullptr
protectedinherited

◆ fEmManager

G4LossTableManager* G4VEmModel::fEmManager
privateinherited

Definition at line 420 of file G4VEmModel.hh.

Referenced by G4VEmModel::G4VEmModel(), and G4VEmModel::~G4VEmModel().

◆ flagDeexcitation

G4bool G4VEmModel::flagDeexcitation = false
privateinherited

Definition at line 455 of file G4VEmModel.hh.

Referenced by G4VEmModel::DeexcitationFlag(), and G4VEmModel::SetDeexcitationFlag().

◆ flagForceBuildTable

G4bool G4VEmModel::flagForceBuildTable = false
privateinherited

◆ flucModel

G4VEmFluctuationModel* G4VEmModel::flucModel = nullptr
privateinherited

◆ fParticleChange

G4ParticleChangeForGamma* G4LowEPPolarizedComptonModel::fParticleChange
private

◆ fTripletModel

G4VEmModel* G4VEmModel::fTripletModel = nullptr
privateinherited

◆ highLimit

G4double G4VEmModel::highLimit
privateinherited

◆ inveplus

G4double G4VEmModel::inveplus
protectedinherited

◆ isInitialised

G4bool G4LowEPPolarizedComptonModel::isInitialised
private

Definition at line 150 of file G4LowEPPolarizedComptonModel.hh.

Referenced by Initialise().

◆ isLocked

G4bool G4VEmModel::isLocked = false
privateinherited

◆ isMaster

G4bool G4VEmModel::isMaster = true
privateinherited

◆ localElmSelectors

G4bool G4VEmModel::localElmSelectors = true
privateinherited

Definition at line 460 of file G4VEmModel.hh.

Referenced by G4VEmModel::SetElementSelectors(), and G4VEmModel::~G4VEmModel().

◆ localTable

G4bool G4VEmModel::localTable = true
privateinherited

Definition at line 459 of file G4VEmModel.hh.

Referenced by G4VEmModel::SetCrossSectionTable(), and G4VEmModel::~G4VEmModel().

◆ lossFlucFlag

G4bool G4VEmModel::lossFlucFlag = true
protectedinherited

◆ lowLimit

G4double G4VEmModel::lowLimit
privateinherited

◆ maxZ

const G4int G4LowEPPolarizedComptonModel::maxZ = 99
staticprivate

Definition at line 145 of file G4LowEPPolarizedComptonModel.hh.

Referenced by ComputeCrossSectionPerAtom(), and Initialise().

◆ name

const G4String G4VEmModel::name
privateinherited

◆ nsec

G4int G4VEmModel::nsec = 5
privateinherited

Definition at line 444 of file G4VEmModel.hh.

Referenced by G4VEmModel::CrossSectionPerVolume(), and G4VEmModel::G4VEmModel().

◆ nSelectors

G4int G4VEmModel::nSelectors = 0
privateinherited

◆ pBaseMaterial

const G4Material* G4VEmModel::pBaseMaterial = nullptr
protectedinherited

◆ pFactor

G4double G4VEmModel::pFactor = 1.0
protectedinherited

◆ polarAngleLimit

G4double G4VEmModel::polarAngleLimit
privateinherited

Definition at line 441 of file G4VEmModel.hh.

Referenced by G4VEmModel::PolarAngleLimit(), and G4VEmModel::SetPolarAngleLimit().

◆ pParticleChange

G4VParticleChange* G4VEmModel::pParticleChange = nullptr
protectedinherited

◆ profileData

G4DopplerProfile * G4LowEPPolarizedComptonModel::profileData = nullptr
staticprivate

◆ ScatFuncFitParam

const G4double G4LowEPPolarizedComptonModel::ScatFuncFitParam
staticprivate

Definition at line 147 of file G4LowEPPolarizedComptonModel.hh.

Referenced by ComputeScatteringFunction().

◆ secondaryThreshold

G4double G4VEmModel::secondaryThreshold = DBL_MAX
privateinherited

◆ shellData

G4ShellData * G4LowEPPolarizedComptonModel::shellData = nullptr
staticprivate

◆ theDensityFactor

const std::vector<G4double>* G4VEmModel::theDensityFactor = nullptr
protectedinherited

Definition at line 428 of file G4VEmModel.hh.

Referenced by G4VEmModel::G4VEmModel().

◆ theDensityIdx

const std::vector<G4int>* G4VEmModel::theDensityIdx = nullptr
protectedinherited

Definition at line 429 of file G4VEmModel.hh.

Referenced by G4VEmModel::G4VEmModel().

◆ theLPMflag

G4bool G4VEmModel::theLPMflag = false
privateinherited

Definition at line 454 of file G4VEmModel.hh.

Referenced by G4VEmModel::LPMFlag(), and G4VEmModel::SetLPMFlag().

◆ useAngularGenerator

G4bool G4VEmModel::useAngularGenerator = false
privateinherited

◆ useBaseMaterials

G4bool G4VEmModel::useBaseMaterials = false
privateinherited

◆ verboseLevel

G4int G4LowEPPolarizedComptonModel::verboseLevel
private

◆ xsec

std::vector<G4double> G4VEmModel::xsec
privateinherited

◆ xSectionTable

G4PhysicsTable* G4VEmModel::xSectionTable = nullptr
protectedinherited

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