145 mass = electron_mass_c2;
262 for(
G4int i=0;i<nelm;i++){
263 int zet =
G4lrint((*theElementVector)[i]->GetZ());
270 fLambda0 += (theAtomNumDensityVector[i]*elxsec);
271 fLambda1 += (theAtomNumDensityVector[i]*t1xsec);
286 if(efEnergy<0.001) efEnergy = 0.001;
288 G4double pt2 = efEnergy*(efEnergy+2.0*electron_mass_c2);
289 G4double beta2 = pt2/(pt2+electron_mass_c2*electron_mass_c2);
327 for(
G4int i=0;i<nelm;i++){
328 int zet =
G4lrint((*theElementVector)[i]->GetZ());
336 lambda1 += (theAtomNumDensityVector[i]*t1xsec);
339 if(lambda1>0.0) { lambda1 =1./lambda1; }
346 if(efEnergy<0.001) efEnergy = 0.001;
348 G4double pt2 = efEnergy*(efEnergy+2.0*electron_mass_c2);
349 G4double beta2 = pt2/(pt2+electron_mass_c2*electron_mass_c2);
354 lambda0 = beta2/bc/(1.+scrA);
355 g1 = 2.0*scrA*((1.0+scrA)*
G4Log(1.0/scrA+1.0)-1.0);
356 lambda1 = lambda0/g1;
376 const G4double almostOne = 1.-almostZero;
425 distance *= (1.20-
fZeff*(1.62e-2-9.22e-5*
fZeff));
633 sinPhi = std::sin(phi);
634 cosPhi = std::cos(phi);
741 if(tlength < geomStepLength) { tlength = geomStepLength; }
788 if(dum0 < 0.0) dum0 = 0.0;
789 else if(dum0 > 2.0 ) dum0 = 2.0;
792 sint = std::sqrt(dum0*(2.0 - dum0));
807 eloss = kineticEnergy -
825 G4double kineticEnergy0 = kineticEnergy;
826 kineticEnergy -= 0.5*eloss;
829 tau = kineticEnergy/electron_mass_c2;
831 eps0 = eloss/kineticEnergy0;
832 epsm = eloss/kineticEnergy;
834 efEnergy = kineticEnergy0 * ( 1.0 - 0.5*eps0 - eps0*eps0/(12.0*(2.0-eps0))* ( (5.*tau2 +10.*tau +6.)/( (tau+1.)*(tau+2.) ) ) );
842 efStep = (1.-eps0*eps0/(3.*(2.-eps0))* (tau2*tau2 + 4.*tau2*tau + 7.*tau2 +6.*tau +4.)/( ((tau+1.)*(tau+2.))*((tau+1.)*(tau+2.)) ) );
845 kineticEnergy -= 0.5*eloss;
846 efEnergy = kineticEnergy;
859 if(lambdan<=1.0e-12) {
871 G4double cosTheta1 =1.0,sinTheta1 =0.0, cosTheta2 =1.0, sinTheta2 =0.0;
872 G4double cosPhi1=1.0,sinPhi1=0.0, cosPhi2 =1.0, sinPhi2 =0.0;
873 G4double us=0.0,vs=0.0,ws=1.0,x_coord=0.0,y_coord=0.0,z_coord=1.0;
880 sinTheta1 = std::sqrt((1.-cosTheta1)*(1.+cosTheta1));
882 sinPhi1 = std::sin(phi1);
883 cosPhi1 = std::cos(phi1);
884 us = sinTheta1*cosPhi1;
885 vs = sinTheta1*sinPhi1;
891 if(cosTheta1 + cosTheta2 == 2.) {
900 sinPhi1 = std::sin(phi1);
901 cosPhi1 = std::cos(phi1);
903 sinPhi2 = std::sin(phi2);
904 cosPhi2 = std::cos(phi2);
907 u2 = sinTheta2*cosPhi2;
908 v2 = sinTheta2*sinPhi2;
909 G4double u2p = cosTheta1*u2 + sinTheta1*cosTheta2;
910 us = u2p*cosPhi1 - v2*sinPhi1;
911 vs = u2p*sinPhi1 + v2*cosPhi1;
912 ws = cosTheta1*cosTheta2 - sinTheta1*u2;
933 if(Qn1<1.0) par = 1.;
934 else if (Qn1<7.8) par = -0.031376*Qn1+1.01356;
956 G4double delta = 0.9082483-(0.1020621-0.0263747*gamma)*Qn1;
960 G4double temp = (2.0+tau*temp1)/((tau+1.0)*temp1);
962 temp = temp - (tau+1.0)/((tau+2.0)*(loga*(1.0+
fScrA)-1.0));
965 delta = delta + 0.40824829*(eps0*(tau+1.0)/((tau+2.0)*
966 (loga*(1.0+
fScrA)-1.0)*(loga*(1.0+2.0*
fScrA)-2.0)) - 0.25*temp*temp);
973 G4double ut = b*sinTheta1*cosPhi1 + c*(cosPhi1*u2 - sinPhi1*w1v2) + eta1*us*temp1;
974 G4double vt = b*sinTheta1*sinPhi1 + c*(sinPhi1*u2 + cosPhi1*w1v2) + eta1*vs*temp1;
975 G4double wt = eta1*(1+temp) + b*cosTheta1 + c*cosTheta2 + eta1*ws*temp1;
992 G4double transportDistance = std::sqrt(x_coord*x_coord+y_coord*y_coord+z_coord*z_coord);
994 if(transportDistance>fTheTrueStepLenght)
1011 zz = 1.0 - Qn1*(0.5 - Qn1*(0.166666667 - 0.041666667*Qn1));
1013 zz = (1.-
G4Exp(-Qn1))/Qn1;
1021 G4double rr = (1.-zz*zz)/(1.-ws*ws);
1022 if(rr >= 0.25) rr = 0.25;
1029 G4double transportDistance = std::sqrt(x_coord*x_coord + y_coord*y_coord + z_coord*z_coord);
static G4Pow * GetInstance()
G4GoudsmitSaundersonMscModel(const G4String &nam="GoudsmitSaunderson")
virtual G4double ComputeTrueStepLength(G4double geomStepLength)
static G4bool fgIsUseAccurate
G4double powA(G4double A, G4double y) const
G4bool fIsUsePWATotalXsecData
static G4LossTableManager * Instance()
G4bool fIsEndedUpOnBoundary
G4double GetTotNbOfElectPerVolume() const
std::vector< G4Element * > G4ElementVector
G4double GetKineticEnergy() const
CLHEP::Hep3Vector G4ThreeVector
G4double GetTransportMeanFreePathOnly(const G4ParticleDefinition *, G4double)
const G4DynamicParticle * GetDynamicParticle() const
G4int currentMaterialIndex
static G4PWATotalXsecTable * fgPWAXsecTable
G4StepStatus GetStepStatus() const
CLHEP::HepRandomEngine * rndmEngineMod
G4double Randomizetlimit()
G4double ConvertTrueToGeom(G4double &tLength, G4double &gLength)
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
const G4ParticleDefinition * particle
G4ParticleDefinition * GetDefinition() const
G4bool fIsMultipleSacettring
G4bool fIsNoScatteringInMSC
G4LossTableManager * theManager
G4ThreeVector fTheDisplacementVector
const G4Step * GetStep() const
G4double ComputeSafety(const G4ThreeVector &position, G4double limit=DBL_MAX)
const G4ElementVector * GetElementVector() const
G4double fTheTransportDistance
G4bool fIsSingleScattering
G4double fTheTrueStepLenght
G4int GetPWATotalXsecEnergyBinIndex(G4double energy) const
static G4bool fgIsOptimizationOn
G4double currentKinEnergy
const G4PWATotalXsecZ * GetPWATotalXsecForZet(G4int Z) const
G4StepPoint * GetPreStepPoint() const
G4double GetEnergy(const G4ParticleDefinition *part, G4double range, const G4MaterialCutsCouple *couple)
void StartTracking(G4Track *)
G4ThreeVector fTheNewDirection
virtual G4double ComputeTruePathLengthLimit(const G4Track &track, G4double ¤tMinimalStep)
const G4double * GetVecNbOfAtomsPerVolume() const
void SingleScattering(G4double &cost, G4double &sint)
G4ParticleChangeForMSC * fParticleChange
const G4ThreeVector & GetPosition() const
G4double GetRange(const G4ParticleDefinition *part, G4double kineticEnergy, const G4MaterialCutsCouple *couple)
G4ParticleChangeForMSC * GetParticleChangeForMSC(const G4ParticleDefinition *p=0)
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)
static const double twopi
void Sampling(G4double, G4double, G4double, G4double &, G4double &)
static G4GoudsmitSaundersonTable * fgGSTable
G4double ComputeGeomLimit(const G4Track &, G4double &presafety, G4double limit)
G4double G4Log(G4double x)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4bool fIsEverythingWasDone
G4double GetTotNbOfAtomsPerVolume() const
void ProposeMomentumDirection(const G4ThreeVector &Pfinal)
G4double GetMoliereXc2(G4int matindx)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
void SetParticle(const G4ParticleDefinition *p)
G4double GetDEDX(const G4ParticleDefinition *part, G4double kineticEnergy, const G4MaterialCutsCouple *couple)
void SetCurrentCouple(const G4MaterialCutsCouple *)
virtual ~G4GoudsmitSaundersonMscModel()
G4double GetMoliereBc(G4int matindx)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4double GetSafety() const
G4MscStepLimitType steppingAlgorithm
size_t GetNumberOfElements() const
G4double GetTransportMeanFreePath(const G4ParticleDefinition *, G4double)
virtual G4ThreeVector & SampleScattering(const G4ThreeVector &, G4double safety)
G4double GetScreeningParam(G4double)
const G4MaterialCutsCouple * currentCouple
const G4Material * GetMaterial() const
virtual G4double ComputeGeomPathLength(G4double truePathLength)