78 currentCouple(nullptr),
81 fSecondMoments(nullptr),
84 singleScatteringMode(false),
86 useSecondMoment(false)
170 *
G4lrint(std::log10(emax/emin));
173 for(
size_t i=0; i<numOfCouples; ++i) {
180 delete (*fSecondMoments)[i];
187 for(
size_t j=0; j<
n; ++j) {
192 (*fSecondMoments)[i] = bVector;
233 G4Exception(
"G4WentzelVIModel::ComputeCrossSectionPerAtom",
"em0011",
271 G4double tlimit = currentMinimalStep;
338 if(rcut > rlimit) { rlimit =
std::min(rlimit, rcut*sqrt(rlimit/rcut)); }
437 tPathLength = geomStepLength*(1.0 + 0.5*tau + tau*tau/3.0);
476 }
else if(
xtsec > 0.0) {
482 }
else if(tau < 0.999999) {
543 prob2 = (z2 - z1)/(1.5*z1 - z2);
554 zzz =
G4Exp(-1.0/z0);
558 prob2 /= (1 + prob2);
623 for (; i<nelm; ++i) {
if(
xsecn[i] >= qsec) {
break; } }
648 if(prob2 > 0.0 && rndmEngine->
flat() < prob2) { isFirst =
false; }
651 if(isFirst) { z = -
G4Log(rndmEngine->
flat()); }
658 if(cost > 1.0) { cost = 1.0; }
659 else if(cost < -1.0) { cost =-1.0; }
660 sint = sqrt((1.0 - cost)*(1.0 + cost));
675 temp.
set(dx,dy,sqrt(d) - r);
681 temp.
set(vx1,vy1,cost);
686 }
while (0 < nMscSteps);
719 const G4double* theAtomNumDensityVector =
737 for (
G4int i=0; i<nelm; ++i) {
740 G4double density = theAtomNumDensityVector[i];
743 if(costm < cosTheta) {
753 if(nucsec > 0.0) { esec /= nucsec; }
754 xtsec += nucsec*density;
781 const G4double* theAtomNumDensityVector =
789 for (
G4int i=0; i<nelm; ++i) {
792 xs += theAtomNumDensityVector[i]
G4double Energy(size_t index) const
void set(double x, double y, double z)
G4double ComputeSecondTransportMoment(G4double CosThetaMax)
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
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double KineticEnergy, G4double AtomicNumber, G4double AtomicWeight=0., G4double cut=DBL_MAX, G4double emax=DBL_MAX) override
G4ThreeVector & SampleSingleScattering(G4double CosThetaMin, G4double CosThetaMax, G4double elecRatio)
G4int NumberOfBinsPerDecade() const
void DefineMaterial(const G4MaterialCutsCouple *)
virtual ~G4WentzelVIModel()
G4ThreeVector fDisplacement
static G4PhysicsTable * PreparePhysicsTable(G4PhysicsTable *physTable)
G4WentzelVIModel(G4bool comb=true, const G4String &nam="WentzelVIUni")
G4double ConvertTrueToGeom(G4double &tLength, G4double &gLength)
G4StepPoint * GetPreStepPoint() const
static constexpr double mm
G4double ComputeGeomLimit(const G4Track &, G4double &presafety, G4double limit)
G4PhysicsTable * GetSecondMomentTable()
G4double ComputeSafety(const G4ThreeVector &position, G4double limit=DBL_MAX)
Float_t x1[n_points_granero]
virtual G4double ComputeTruePathLengthLimit(const G4Track &track, G4double ¤tMinimalStep) override
virtual G4ThreeVector & SampleScattering(const G4ThreeVector &, G4double safety) override
G4double GetRadlen() const
G4ParticleChangeForMSC * fParticleChange
const G4ElementVector * GetElementVector() const
std::vector< G4double > prob
Hep3Vector & rotateUz(const Hep3Vector &)
const G4double * GetVecNbOfAtomsPerVolume() const
void SetSingleScatteringFactor(G4double)
static const G4double emax
const G4ParticleDefinition * GetParticleDefinition() const
G4double SecondMoment(const G4ParticleDefinition *, const G4MaterialCutsCouple *, G4double kineticEnergy)
G4bool singleScatteringMode
void SetCurrentCouple(const G4MaterialCutsCouple *)
G4double LowEnergyActivationLimit() const
G4double G4Log(G4double x)
G4double GetProductionCut(G4int index) const
G4double LowEnergyLimit() const
G4double ComputeTransportXSectionPerVolume(G4double cosTheta)
G4StepStatus GetStepStatus() const
G4PhysicsTable * GetCrossSectionTable()
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
G4double PolarAngleLimit() const
virtual void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel) override
G4double GetRange(const G4ParticleDefinition *part, G4double kineticEnergy, const G4MaterialCutsCouple *couple)
G4int currentMaterialIndex
const G4ThreeVector & GetPosition() const
virtual G4double ComputeTrueStepLength(G4double geomStepLength) override
static constexpr double twopi
G4double ComputeNuclearCrossSection(G4double CosThetaMin, G4double CosThetaMax)
virtual G4double ComputeGeomPathLength(G4double truePathLength) override
void FillSecondDerivatives()
G4WentzelOKandVIxSection * wokvi
static constexpr double eV
const G4Step * GetStep() const
const G4MaterialCutsCouple * currentCouple
size_t GetTableSize() const
ThreeVector shoot(const G4int Ap, const G4int Af)
G4double ComputeSecondMoment(const G4ParticleDefinition *, G4double kineticEnergy)
const G4MaterialCutsCouple * CurrentCouple() const
G4double SetupTarget(G4int Z, G4double cut)
static G4ProductionCutsTable * GetProductionCutsTable()
const G4ParticleDefinition * particle
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4double GetTransportMeanFreePath(const G4ParticleDefinition *part, G4double kinEnergy)
void Initialise(const G4ParticleDefinition *, G4double CosThetaLim)
std::vector< G4Element * > G4ElementVector
G4ParticleChangeForMSC * GetParticleChangeForMSC(const G4ParticleDefinition *p=nullptr)
virtual void StartTracking(G4Track *) override
G4MscStepLimitType steppingAlgorithm
G4double GetSafety() const
void ProposeMomentumDirection(const G4ThreeVector &Pfinal)
G4double GetKineticEnergy() const
void SetupParticle(const G4ParticleDefinition *)
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
G4ProductionCuts * GetProductionCuts() const
G4double HighEnergyActivationLimit() const
G4PhysicsTable * fSecondMoments
const G4Material * GetMaterial() const
const G4DataVector * currentCuts
G4bool GetFlag(size_t i) const
G4double ComputeTransportCrossSectionPerAtom(G4double CosThetaMax)
G4double GetEnergy(const G4ParticleDefinition *part, G4double range, const G4MaterialCutsCouple *couple)
const G4Material * currentMaterial
Float_t x2[n_points_geant4]
G4double HighEnergyLimit() const
const G4DynamicParticle * GetDynamicParticle() const
static G4EmParameters * Instance()
void PutValue(size_t index, G4double theValue)
static constexpr double pi
size_t GetNumberOfElements() const
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4double ComputeElectronCrossSection(G4double CosThetaMin, G4double CosThetaMax)
G4double SetupKinematic(G4double kinEnergy, const G4Material *mat)
std::vector< G4double > xsecn