457 lambda0 = beta2*(1.+scrA)*mctoScrA/bc/scpCor;
458 g1 = 2.0*scrA*((1.0+scrA)*
G4Log(1.0/scrA+1.0)-1.0);
459 lambda1 = lambda0/g1;
514 distance *= (1.20-
fZeff*(1.62e-2-9.22e-5*
fZeff));
765 if (cost<-1.) cost = -1.;
766 if (cost> 1.) cost = 1.;
769 G4double sint = std::sqrt(dum*(2.-dum));
871 tlength = geomStepLength;
950 kineticEnergy -= 0.5*eloss;
954 eps0 = eloss/kineticEnergy0;
957 efEnergy = kineticEnergy * (1.-epsm*epsm*(6.+10.*tau+5.*tau2)/(24.*tau2+48.*tau+72.));
958 G4double dum = 0.166666*(4.+tau*(6.+tau*(7.+tau*(4.+tau))))*(epsm/((tau+1.)*(tau+2.)))*(epsm/((tau+1.)*(tau+2.)));
961 kineticEnergy -= 0.5*eloss;
964 eps0 = eloss/kineticEnergy0;
965 epsm = eps0/(1.-0.5*eps0);
966 G4double temp = 0.3*(1 -factor*(1.-0.333333*factor))*eps0*eps0;
978 if (lambdan<=1.0
e-12) {
989 G4double cosTheta1 = 1.0, sinTheta1 = 0.0, cosTheta2 = 1.0, sinTheta2 = 0.0;
990 G4double cosPhi1 = 1.0, sinPhi1 = 0.0, cosPhi2 = 1.0, sinPhi2 = 0.0;
991 G4double uss = 0.0, vss = 0.0, wss = 1.0;
992 G4double x_coord = 0.0, y_coord = 0.0, z_coord = 1.0;
998 sinTheta1 = std::sqrt((1.-cosTheta1)*(1.+cosTheta1));
1000 sinTheta2 = std::sqrt((1.-cosTheta2)*(1.+cosTheta2));
1009 G4int mcEkinIdx = -1;
1010 G4int mcDeltIdx = -1;
1017 if (cosTheta1+cosTheta2==2.) {
1026 sinPhi1 = std::sin(phi1);
1027 cosPhi1 = std::cos(phi1);
1029 sinPhi2 = std::sin(phi2);
1030 cosPhi2 = std::cos(phi2);
1033 u2 = sinTheta2*cosPhi2;
1034 v2 = sinTheta2*sinPhi2;
1035 G4double u2p = cosTheta1*u2 + sinTheta1*cosTheta2;
1036 uss = u2p*cosPhi1 - v2*sinPhi1;
1037 vss = u2p*sinPhi1 + v2*cosPhi1;
1038 wss = cosTheta1*cosTheta2 - sinTheta1*u2;
1058 if(Qn1<0.7) par = 1.;
1059 else if (Qn1<7.0) par = -0.031376*Qn1+1.01356;
1075 G4double delta = 0.9082483-(0.1020621-0.0263747*gamma)*Qn1;
1079 G4double temp = (2.0+tau*temp1)/((tau+1.0)*temp1);
1081 temp = temp - (tau+1.0)/((tau+2.0)*(loga*(1.0+
fScrA)-1.0));
1084 delta = delta + 0.40824829*(eps0*(tau+1.0)/((tau+2.0)*
1085 (loga*(1.0+
fScrA)-1.0)*(loga*(1.0+2.0*
fScrA)-2.0)) - 0.25*temp*temp);
1092 G4double ut = b*sinTheta1*cosPhi1 + c*(cosPhi1*u2 - sinPhi1*w1v2) + eta1*uss*temp1;
1093 G4double vt = b*sinTheta1*sinPhi1 + c*(sinPhi1*u2 + cosPhi1*w1v2) + eta1*vss*temp1;
1094 G4double wt = eta1*(1+temp) + b*cosTheta1 + c*cosTheta2 + eta1*wss*temp1;
1111 G4double transportDistance = std::sqrt(x_coord*x_coord+y_coord*y_coord+z_coord*z_coord);
1113 if(transportDistance>fTheTrueStepLenght)
1130 zz = 1.0 - Qn1*(0.5 - Qn1*(0.166666667 - 0.041666667*Qn1));
1132 zz = (1.-
G4Exp(-Qn1))/Qn1;
1141 if(rr >= 0.25) rr = 0.25;
1143 x_coord = rperp*uss;
1144 y_coord = rperp*vss;
1148 G4double transportDistance = std::sqrt(x_coord*x_coord + y_coord*y_coord + z_coord*z_coord);
void set(double x, double y, double z)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
T max(const T t1, const T t2)
brief Return the largest of the two arguments
const G4ParticleDefinition * particle
G4double fTheTrueStepLenght
void GetMottCorrectionFactors(G4double logekin, G4double beta2, G4int matindx, G4double &mcToScr, G4double &mcToQ1, G4double &mcToG2PerG1)
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)
G4double GetTransportMeanFreePath(const G4ParticleDefinition *, G4double)
static G4bool gIsOptimizationOn
G4GoudsmitSaundersonTable * fGSTable
G4bool fIsUsePWACorrection
G4double ConvertTrueToGeom(G4double &tLength, G4double &gLength)
G4StepPoint * GetPreStepPoint() const
static constexpr double nm
static constexpr double mm
G4double SingleScattering(G4double lambdaval, G4double scra, G4double lekin, G4double beta2, G4int matindx)
G4double ComputeGeomLimit(const G4Track &, G4double &presafety, G4double limit)
G4double ComputeSafety(const G4ThreeVector &position, G4double limit=DBL_MAX)
virtual void InitialiseLocal(const G4ParticleDefinition *p, G4VEmModel *masterModel)
void SetOptionPWACorrection(G4bool val)
G4bool Sampling(G4double lambdaval, G4double qval, G4double scra, G4double &cost, G4double &sint, G4double lekin, G4double beta2, G4int matindx, GSMSCAngularDtr **gsDtr, G4int &mcekini, G4int &mcdelti, G4double &transfPar, G4bool isfirst)
G4GSPWACorrections * GetPWACorrection()
static G4bool gIsUseAccurate
void StartTracking(G4Track *)
G4ThreeVector fTheDisplacementVector
G4bool fIsNoScatteringInMSC
G4double GetPDGCharge() const
virtual G4double ComputeTrueStepLength(G4double geomStepLength)
virtual G4double ComputeTruePathLengthLimit(const G4Track &track, G4double ¤tMinimalStep)
Hep3Vector & rotateUz(const Hep3Vector &)
G4bool fIsEndedUpOnBoundary
const G4MaterialCutsCouple * currentCouple
void Initialise(G4double lownergylimit, G4double highenergylimit)
G4double GetMoliereBc(G4int matindx)
G4bool fIsMultipleSacettring
void GetPWACorrectionFactors(G4double logekin, G4double beta2, G4int matindx, G4double &corToScr, G4double &corToQ1, G4double &corToG2PerG1)
void SetCurrentCouple(const G4MaterialCutsCouple *)
void SetOptionMottCorrection(G4bool val)
G4double G4Log(G4double x)
G4double LowEnergyLimit() const
G4LossTableManager * theManager
G4ThreeVector fTheNewDirection
G4double fTheTransportDistance
G4StepStatus GetStepStatus() const
static G4Pow * GetInstance()
G4ParticleDefinition * GetDefinition() const
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
G4double powA(G4double A, G4double y) const
G4double GetMoliereXc2(G4int matindx)
G4double GetRange(const G4ParticleDefinition *part, G4double kineticEnergy, const G4MaterialCutsCouple *couple)
static constexpr double electron_mass_c2
const G4ThreeVector & GetPosition() const
G4GSPWACorrections * fPWACorrection
G4double GetTransportMeanFreePathOnly(const G4ParticleDefinition *, G4double)
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
G4bool GetOptionMottCorrection() const
G4bool fIsSingleScattering
static constexpr double eV
const G4Step * GetStep() const
virtual ~G4GoudsmitSaundersonMscModel()
CLHEP::HepRandomEngine * rndmEngineMod
virtual G4double ComputeGeomPathLength(G4double truePathLength)
G4int currentMaterialIndex
G4double ComputeScatteringPowerCorrection(const G4MaterialCutsCouple *matcut, G4double ekin)
static constexpr double twopi
G4bool GetOptionPWACorrection() const
G4GoudsmitSaundersonTable * GetGSTable()
G4double currentKinEnergy
G4GoudsmitSaundersonMscModel(const G4String &nam="GoudsmitSaunderson")
G4ParticleChangeForMSC * GetParticleChangeForMSC(const G4ParticleDefinition *p=nullptr)
void SetParticle(const G4ParticleDefinition *p)
G4ParticleChangeForMSC * fParticleChange
virtual G4ThreeVector & SampleScattering(const G4ThreeVector &, G4double safety)
G4MscStepLimitType steppingAlgorithm
G4IonisParamMat * GetIonisation() const
G4double GetSafety() const
G4double GetZeffective() const
void ProposeMomentumDirection(const G4ThreeVector &Pfinal)
G4double GetKineticEnergy() const
G4double Randomizetlimit()
static G4LossTableManager * Instance()
const G4Material * GetMaterial() const
G4bool fIsEverythingWasDone
G4double GetEnergy(const G4ParticleDefinition *part, G4double range, const G4MaterialCutsCouple *couple)
G4bool isElectron(G4int ityp)
G4double HighEnergyLimit() const
const G4DynamicParticle * GetDynamicParticle() const
static G4EmParameters * Instance()
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4bool fIsUseMottCorrection