Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4XrayRayleighModel Class Reference

#include <G4XrayRayleighModel.hh>

+ Inheritance diagram for G4XrayRayleighModel:

Public Member Functions

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

Additional Inherited Members

- Protected Member Functions inherited from G4VEmModel
G4ParticleChangeForLossGetParticleChangeForLoss ()
 
G4ParticleChangeForGammaGetParticleChangeForGamma ()
 
virtual G4double MaxSecondaryEnergy (const G4ParticleDefinition *, G4double kineticEnergy)
 
const G4MaterialCutsCoupleCurrentCouple () const
 
void SetCurrentElement (const G4Element *)
 
- Protected Attributes inherited from G4VEmModel
G4ElementDatafElementData = nullptr
 
G4VParticleChangepParticleChange = nullptr
 
G4PhysicsTablexSectionTable = nullptr
 
const G4MaterialpBaseMaterial = nullptr
 
const std::vector< G4double > * theDensityFactor = nullptr
 
const std::vector< G4int > * theDensityIdx = nullptr
 
G4double inveplus
 
G4double pFactor = 1.0
 
std::size_t currentCoupleIndex = 0
 
std::size_t basedCoupleIndex = 0
 
G4bool lossFlucFlag = true
 

Detailed Description

Definition at line 42 of file G4XrayRayleighModel.hh.

Constructor & Destructor Documentation

◆ G4XrayRayleighModel() [1/2]

G4XrayRayleighModel::G4XrayRayleighModel ( const G4ParticleDefinition * p = nullptr,
const G4String & nam = "XrayRayleigh" )
explicit

Definition at line 47 of file G4XrayRayleighModel.cc.

49 :G4VEmModel(nam),isInitialised(false)
50{
51 fParticleChange = nullptr;
52 lowEnergyLimit = 250*eV;
53 highEnergyLimit = 10.*MeV;
54 fFormFactor = 0.0;
55
56 // SetLowEnergyLimit(lowEnergyLimit);
57 SetHighEnergyLimit(highEnergyLimit);
58 //
59 verboseLevel= 0;
60 // Verbosity scale:
61 // 0 = nothing
62 // 1 = warning for energy non-conservation
63 // 2 = details of energy budget
64 // 3 = calculation of cross sections, file openings, sampling of atoms
65 // 4 = entering in methods
66
67 if(verboseLevel > 0)
68 {
69 G4cout << "Xray Rayleigh is constructed " << G4endl
70 << "Energy range: "
71 << lowEnergyLimit / eV << " eV - "
72 << highEnergyLimit / MeV << " MeV"
73 << G4endl;
74 }
75}
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout
void SetHighEnergyLimit(G4double)
G4VEmModel(const G4String &nam)
Definition G4VEmModel.cc:67

◆ ~G4XrayRayleighModel()

G4XrayRayleighModel::~G4XrayRayleighModel ( )
overridedefault

◆ G4XrayRayleighModel() [2/2]

G4XrayRayleighModel::G4XrayRayleighModel ( const G4XrayRayleighModel & )
delete

Member Function Documentation

◆ ComputeCrossSectionPerAtom()

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

Reimplemented from G4VEmModel.

Definition at line 102 of file G4XrayRayleighModel.cc.

107{
108 if (verboseLevel > 3)
109 {
110 G4cout << "Calling CrossSectionPerAtom() of G4XrayRayleighModel" << G4endl;
111 }
112 if (gammaEnergy < lowEnergyLimit || gammaEnergy > highEnergyLimit)
113 {
114 return 0.0;
115 }
116 G4double k = gammaEnergy/hbarc;
117 k *= Bohr_radius;
118 G4double p0 = 0.680654;
119 G4double p1 = -0.0224188;
120 G4double lnZ = std::log(Z);
121
122 G4double lna = p0 + p1*lnZ;
123
124 G4double alpha = std::exp(lna);
125
126 G4double fo = std::pow(k, alpha);
127
128 p0 = 3.68455;
129 p1 = -0.464806;
130 lna = p0 + p1*lnZ;
131
132 fo *= 0.01*std::exp(lna);
133
134 fFormFactor = fo;
135
136 G4double b = 1. + 2.*fo;
137 G4double b2 = b*b;
138 G4double b3 = b*b2;
139
140 G4double xsc = fCofR*Z*Z/b3;
141 xsc *= fo*fo + (1. + fo)*(1. + fo);
142
143
144 return xsc;
145
146}
double G4double
Definition G4Types.hh:83

◆ Initialise()

void G4XrayRayleighModel::Initialise ( const G4ParticleDefinition * particle,
const G4DataVector & cuts )
overridevirtual

Implements G4VEmModel.

Definition at line 83 of file G4XrayRayleighModel.cc.

85{
86 if (verboseLevel > 3)
87 {
88 G4cout << "Calling G4XrayRayleighModel::Initialise()" << G4endl;
89 }
90
91 InitialiseElementSelectors(particle,cuts);
92
93
94 if(isInitialised) return;
95 fParticleChange = GetParticleChangeForGamma();
96 isInitialised = true;
97
98}
G4ParticleChangeForGamma * GetParticleChangeForGamma()
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)

◆ operator=()

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

◆ SampleSecondaries()

void G4XrayRayleighModel::SampleSecondaries ( std::vector< G4DynamicParticle * > * ,
const G4MaterialCutsCouple * couple,
const G4DynamicParticle * aDPGamma,
G4double tmin,
G4double maxEnergy )
overridevirtual

Implements G4VEmModel.

Definition at line 150 of file G4XrayRayleighModel.cc.

155{
156 if ( verboseLevel > 3)
157 {
158 G4cout << "Calling SampleSecondaries() of G4XrayRayleighModel" << G4endl;
159 }
160 G4double photonEnergy0 = aDPGamma->GetKineticEnergy();
161
162 G4ParticleMomentum photonDirection0 = aDPGamma->GetMomentumDirection();
163
164
165 // Sample the angle of the scattered photon
166 // according to 1 + cosTheta*cosTheta distribution
167
168 G4double cosDipole, cosTheta, sinTheta;
169 G4double c, delta, cofA, signc = 1., a, power = 1./3.;
170
171 c = 4. - 8.*G4UniformRand();
172 a = c;
173
174 if( c < 0. )
175 {
176 signc = -1.;
177 a = -c;
178 }
179 delta = std::sqrt(a*a+4.);
180 delta += a;
181 delta *= 0.5;
182 cofA = -signc*std::pow(delta, power);
183 cosDipole = cofA - 1./cofA;
184
185 // select atom
186 const G4Element* elm = SelectTargetAtom(couple, aDPGamma->GetParticleDefinition(),
187 photonEnergy0,aDPGamma->GetLogKineticEnergy());
188 G4double Z = elm->GetZ();
189
190 G4double k = photonEnergy0/hbarc;
191 k *= Bohr_radius;
192 G4double p0 = 0.680654;
193 G4double p1 = -0.0224188;
194 G4double lnZ = std::log(Z);
195
196 G4double lna = p0 + p1*lnZ;
197
198 G4double alpha = std::exp(lna);
199
200 G4double fo = std::pow(k, alpha);
201
202 p0 = 3.68455;
203 p1 = -0.464806;
204 lna = p0 + p1*lnZ;
205
206 fo *= 0.01*pi*std::exp(lna);
207
208
209 G4double beta = fo/(1 + fo);
210
211 cosTheta = (cosDipole + beta)/(1. + cosDipole*beta);
212
213
214 if( cosTheta > 1.) cosTheta = 1.;
215 if( cosTheta < -1.) cosTheta = -1.;
216
217 sinTheta = std::sqrt( (1. - cosTheta)*(1. + cosTheta) );
218
219 // Scattered photon angles. ( Z - axis along the parent photon)
220
221 G4double phi = twopi * G4UniformRand() ;
222 G4double dirX = sinTheta*std::cos(phi);
223 G4double dirY = sinTheta*std::sin(phi);
224 G4double dirZ = cosTheta;
225
226 // Update G4VParticleChange for the scattered photon
227
228 G4ThreeVector photonDirection1(dirX, dirY, dirZ);
229 photonDirection1.rotateUz(photonDirection0);
230 fParticleChange->ProposeMomentumDirection(photonDirection1);
231
232 fParticleChange->SetProposedKineticEnergy(photonEnergy0);
233}
#define G4UniformRand()
Definition Randomize.hh:52
const G4ThreeVector & GetMomentumDirection() const
G4double GetLogKineticEnergy() const
const G4ParticleDefinition * GetParticleDefinition() const
G4double GetKineticEnergy() const
G4double GetZ() const
Definition G4Element.hh:119
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void ProposeMomentumDirection(const G4ThreeVector &Pfinal)
const G4Element * SelectTargetAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double logKineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)

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