52#ifndef G4UrbanMscModel_h
53#define G4UrbanMscModel_h 1
95 G4double& currentMinimalStep)
override;
119 void InitialiseModelCache();
148 G4double tlimitminfix,tlimitminfix2;
184 G4double coeffc1, coeffc2, coeffc3, coeffc4;
187 G4double posa, posb, posc, posd, pose;
189 static std::vector<mscData*> msc;
195 G4bool insideskin =
false;
197 G4bool latDisplasmentbackup =
false;
199 G4bool fPosiCorrection =
true;
200 G4bool isFirstInstance =
false;
213 chargeSquare = charge*charge;
219inline G4double G4UrbanMscModel::Randomizetlimit()
222 if(tlimit > tlimitmin)
224 res = G4RandGauss::shoot(rndmEngineMod,tlimit,0.1*(tlimit-tlimitmin));
225 res = std::max(res, tlimitmin);
232inline G4double G4UrbanMscModel::SimpleScattering()
236 const G4double a = (2.*xmeanth+9.*x2meanth-3.)/(2.*xmeanth-3.*x2meanth+1.);
237 const G4double prob = (a+2.)*xmeanth/a;
241 return (rndmarray[1] < prob) ?
242 -1.+2.*
G4Exp(
G4Log(rndmarray[0])/(a+1.)) : -1.+2.*rndmarray[0];
247inline G4double G4UrbanMscModel::ComputeStepmin()
251 const G4double rat = currentKinEnergy*invmev;
252 return lambda0*msc[idx]->factmin/
253 (0.002 + rat*(msc[idx]->stepmina + msc[idx]->stepminb*rat));
258inline G4double G4UrbanMscModel::ComputeTlimitmin()
260 G4double x = (particle == positron) ?
261 0.7*msc[idx]->sqrtZ*stepmin : 0.87*msc[idx]->Z23*stepmin;
262 if(currentKinEnergy < tlow) { x *= 0.5*(1.+currentKinEnergy/tlow); }
263 return std::max(x, tlimitminfix);
277 fPosiCorrection = val;
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
virtual void flatArray(const int size, double *vect)=0
G4double GetPDGMass() const
G4double GetPDGCharge() const
G4ThreeVector & SampleScattering(const G4ThreeVector &, G4double safety) override
G4double ComputeTrueStepLength(G4double geomStepLength) override
void SetDisplacementAlgorithm96(const G4bool val)
G4double ComputeTheta0(G4double truePathLength, G4double KineticEnergy)
void StartTracking(G4Track *) override
~G4UrbanMscModel() override
G4UrbanMscModel(const G4String &nam="UrbanMsc")
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
G4double ComputeGeomPathLength(G4double truePathLength) override
void SetPositronCorrection(const G4bool val)
G4UrbanMscModel & operator=(const G4UrbanMscModel &right)=delete
G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *particle, G4double KineticEnergy, G4double AtomicNumber, G4double AtomicWeight=0., G4double cut=0., G4double emax=DBL_MAX) override
G4double ComputeTruePathLengthLimit(const G4Track &track, G4double ¤tMinimalStep) override
G4UrbanMscModel(const G4UrbanMscModel &)=delete