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

#include <G4AtimaFluctuations.hh>

+ Inheritance diagram for G4AtimaFluctuations:

Public Member Functions

 G4AtimaFluctuations (const G4String &nam="IonFlucAtima")
 
virtual ~G4AtimaFluctuations ()
 
virtual G4double SampleFluctuations (const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmax, G4double length, G4double meanLoss) override
 
virtual G4double Dispersion (const G4Material *, const G4DynamicParticle *, G4double tmax, G4double length) override
 
virtual void InitialiseMe (const G4ParticleDefinition *) override
 
virtual void SetParticleAndCharge (const G4ParticleDefinition *, G4double q2) override
 
- Public Member Functions inherited from G4VEmFluctuationModel
 G4VEmFluctuationModel (const G4String &nam)
 
virtual ~G4VEmFluctuationModel ()
 
virtual G4double SampleFluctuations (const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmax, G4double length, G4double meanLoss)=0
 
virtual G4double Dispersion (const G4Material *, const G4DynamicParticle *, G4double tmax, G4double length)=0
 
virtual void InitialiseMe (const G4ParticleDefinition *)
 
virtual void SetParticleAndCharge (const G4ParticleDefinition *, G4double q2)
 
const G4StringGetName () const
 
G4VEmFluctuationModeloperator= (const G4VEmFluctuationModel &right)=delete
 
 G4VEmFluctuationModel (const G4VEmFluctuationModel &)=delete
 

Detailed Description

Definition at line 58 of file G4AtimaFluctuations.hh.

Constructor & Destructor Documentation

◆ G4AtimaFluctuations()

G4AtimaFluctuations::G4AtimaFluctuations ( const G4String nam = "IonFlucAtima")
explicit

Definition at line 74 of file G4AtimaFluctuations.cc.

76 particle(0),
77 particleMass(CLHEP::proton_mass_c2),
78 charge(1.0),
79 chargeSquare(1.0),
80 effChargeSquare(1.0),
81 minLoss(0.001*CLHEP::eV)
82{
83 g4calc = G4Pow::GetInstance();
84 kineticEnergy = 0.0;
85 beta2 = 0.0;
86 MLN10 = 2.30258509299;
87 atomic_mass_unit = 931.4940954; // MeV/c^2
88 dedx_constant = 0.3070749187; //4*pi*Na*me*c^2*r_e^2 //MeV cm^2
89 electron_mass = 0.510998928; // MeV/c^2
90 fine_structure = 1.0/137.035999139;
91 domega2dx_constant = dedx_constant*electron_mass; //4*pi*Na*me*c^2*r_e^2 //MeV^2 cm^2
92 if(tableE[0] == 0.0) {
93 G4double logmin = 0.;
94 G4double logmax = 5.;
95 stepE = (logmax-logmin)/(G4double)(199);
96 for(G4int i=0; i<200; ++i){
97 tableE[i] = G4Exp(MLN10*(logmin + ((G4double)i)*stepE));
98 }
99 }
100}
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:179
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
static G4Pow * GetInstance()
Definition: G4Pow.cc:41

◆ ~G4AtimaFluctuations()

G4AtimaFluctuations::~G4AtimaFluctuations ( )
virtual

Definition at line 104 of file G4AtimaFluctuations.cc.

105{}

Member Function Documentation

◆ Dispersion()

G4double G4AtimaFluctuations::Dispersion ( const G4Material mat,
const G4DynamicParticle dp,
G4double  tmax,
G4double  length 
)
overridevirtual

Implements G4VEmFluctuationModel.

Definition at line 146 of file G4AtimaFluctuations.cc.

150{
151 kineticEnergy = dp->GetKineticEnergy();
152 const G4ParticleDefinition* p = dp->GetDefinition();
153
154 G4double ap = p->GetPDGMass()/atomic_mass_unit;
155 G4double zp = p->GetPDGCharge();
156 G4double ep = kineticEnergy/ap;// ep in MeV/u
157 G4double zt = mat->GetIonisation()->GetZeffective();
159
160 G4int z = G4lrint(zp);
161 if(z > 109) { z = 109; }
162
163 G4double gamma=1.0 + ep/atomic_mass_unit;
164 beta2=1.0-1.0/(gamma*gamma);
165 G4double beta = std::sqrt(beta2);
166 //z_eff_Pierce_Blann(Z, beta);
167 G4double zp_eff = zp*(1.0-G4Exp(-0.95*137.035999139*beta/g4calc->Z23(z)));
168 //
169 G4double f = domega2dx_constant*zp_eff*zp_eff*zt/at;
170 //
171 G4double cor =
172 24.89 * g4calc->powA(zt,1.2324)/(electron_mass*1e6 * beta2)*
173 G4Log( 2.0*electron_mass*1e6*beta2/(33.05*g4calc->powA(zt,1.6364)));
174 cor = std::max(cor, 0.0 );
175
176 //Lindhard corrections
177 if(ep<tableE[0])ep = tableE[0];
178 G4double da = (ap - element_atomic_weights[z])/element_atomic_weights[z];
179
180 G4double v3 = EnergyTable_interpolate(tableE,ep,ls_X_coefficients_a[z-1]);
181 G4double v4 = EnergyTable_interpolate(tableE,ep,ls_X_coefficients_ahi[z-1]);
182 G4double dif = v4 - v3;
183 G4double X = v3+(dif*da/0.05);
184 X *= gamma*gamma;
185 //
186 G4double sse = 0.;
187 if(ep<30.0){
188 //Energy straggling Firsov
189 G4double factor = 4.8184e-3*g4calc->powA(zp+zt,8.0/3.0)/at;
190 sse = std::min(f*(X+cor), factor*beta2/fine_structure/fine_structure);
191 }else{
192 // sse = f*(X+cor);
193 sse = f*X;//09/10/2018
194 }
195 //
196 return sse*length/(cm)*mat->GetDensity()/(g/cm3);
197}
G4double G4Log(G4double x)
Definition: G4Log.hh:226
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
G4double GetZeffective() const
G4double GetDensity() const
Definition: G4Material.hh:178
G4IonisParamMat * GetIonisation() const
Definition: G4Material.hh:224
static G4NistManager * Instance()
G4double GetAtomicMassAmu(const G4String &symb) const
G4double GetPDGCharge() const
G4double powA(G4double A, G4double y) const
Definition: G4Pow.hh:230
G4double Z23(G4int Z) const
Definition: G4Pow.hh:125
int G4lrint(double ad)
Definition: templates.hh:134

Referenced by SampleFluctuations().

◆ InitialiseMe()

void G4AtimaFluctuations::InitialiseMe ( const G4ParticleDefinition part)
overridevirtual

Reimplemented from G4VEmFluctuationModel.

Definition at line 109 of file G4AtimaFluctuations.cc.

110{
111 particle = part;
112 particleMass = part->GetPDGMass();
113 charge = part->GetPDGCharge()/eplus;
114 chargeSquare = charge*charge;
115 effChargeSquare= chargeSquare;
116 uniFluct.InitialiseMe(part);
117}
virtual void InitialiseMe(const G4ParticleDefinition *) final

◆ SampleFluctuations()

G4double G4AtimaFluctuations::SampleFluctuations ( const G4MaterialCutsCouple couple,
const G4DynamicParticle dp,
G4double  tmax,
G4double  length,
G4double  meanLoss 
)
overridevirtual

Implements G4VEmFluctuationModel.

Definition at line 122 of file G4AtimaFluctuations.cc.

127{
128 // G4cout << "### meanLoss= " << meanLoss << G4endl;
129 if(meanLoss <= minLoss) return meanLoss;
130
131 // G4cout << "G4AtimaFluctuations::SampleFluctuations E(MeV)= "
132 // << dp->GetKineticEnergy()
133 // << " Elim(MeV)= " << parameter*charge*particleMass
134 // << " " << parameter << " " << charge << " " << particleMass << G4endl;
135
136 const G4Material* material = couple->GetMaterial();
137 G4double siga = Dispersion(material,dp,tmax,length);
138
139 CLHEP::HepRandomEngine* rndmEngine = G4Random::getTheEngine();
140 //G4cout << "meanLoss= " << meanLoss << " loss= " << siga << G4endl;
141 return G4RandGauss::shoot(rndmEngine,meanLoss,std::sqrt(siga));
142}
virtual G4double Dispersion(const G4Material *, const G4DynamicParticle *, G4double tmax, G4double length) override
const G4Material * GetMaterial() const

◆ SetParticleAndCharge()

void G4AtimaFluctuations::SetParticleAndCharge ( const G4ParticleDefinition part,
G4double  q2 
)
overridevirtual

Reimplemented from G4VEmFluctuationModel.

Definition at line 201 of file G4AtimaFluctuations.cc.

203{
204 if(part != particle) {
205 particle = part;
206 particleMass = part->GetPDGMass();
207 charge = part->GetPDGCharge()/eplus;
208 chargeSquare = charge*charge;
209 }
210 effChargeSquare = q2;
211 uniFluct.SetParticleAndCharge(part, q2);
212}
virtual void SetParticleAndCharge(const G4ParticleDefinition *, G4double q2) final

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