79 singleScatteringMode(false),
81 useSecondMoment(false)
113 else if(tet < CLHEP::pi) {
cosThetaMax = cos(tet); }
135 for(
G4int i=0; i<numOfCouples; ++i) {
158 *
G4lrint(std::log10(emax/emin));
161 for(
G4int i=0; i<numOfCouples; ++i) {
168 delete (*fSecondMoments)[i];
169 if(
nullptr == aVector) {
175 for(std::size_t j=0; j<n; ++j) {
177 bVector->
PutValue(j, ComputeSecondMoment(p, e)*e*e);
180 (*fSecondMoments)[i] = bVector;
221 G4Exception(
"G4WentzelVIModel::ComputeCrossSectionPerAtom",
"em0011",
259 G4double tlimit = currentMinimalStep;
291 G4double presafety = sp->GetSafety();
319 rlimit = std::min(rlimit,
facsafety*presafety);
327 if(rcut > rlimit) { rlimit = std::min(rlimit, rcut*sqrt(rlimit/rcut)); }
329 tlimit = std::min(tlimit, rlimit);
340 tlimit = std::min(tlimit, geomlimit/
facgeom);
426 tPathLength = geomStepLength*(1.0 + 0.5*tau + tau*tau/3.0);
465 }
else if(
xtsec > 0.0) {
471 }
else if(tau < 0.999999) {
532 prob2 = (z2 - z1)/(1.5*z1 - z2);
543 zzz =
G4Exp(-1.0/z0);
547 prob2 /= (1 + prob2);
612 for (; i<nelm; ++i) {
if(
xsecn[i] >= qsec) {
break; } }
637 if(prob2 > 0.0 && rndmEngine->
flat() < prob2) { isFirst =
false; }
640 if(isFirst) { z = -
G4Log(rndmEngine->
flat()); }
641 else { z = G4RandGamma::shoot(rndmEngine, 2.0, 2.0); }
647 if(cost > 1.0) { cost = 1.0; }
648 else if(cost < -1.0) { cost =-1.0; }
649 sint = sqrt((1.0 - cost)*(1.0 + cost));
650 phi = twopi*rndmEngine->
flat();
658 G4double dx = r*(0.5*vx1 + rms*G4RandGauss::shoot(rndmEngine,0.0,1.0));
659 G4double dy = r*(0.5*vy1 + rms*G4RandGauss::shoot(rndmEngine,0.0,1.0));
664 temp.
set(dx,dy,sqrt(d) - r);
670 temp.
set(vx1,vy1,cost);
675 }
while (0 < nMscSteps);
708 const G4double* theAtomNumDensityVector =
726 for (
G4int i=0; i<nelm; ++i) {
729 G4double density = theAtomNumDensityVector[i];
732 if(costm < cosTheta) {
742 if(nucsec > 0.0) { esec /= nucsec; }
743 xtsec += nucsec*density;
770 const G4double* theAtomNumDensityVector =
778 for (std::size_t i=0; i<nelm; ++i) {
781 xs += theAtomNumDensityVector[i]
std::vector< const G4Element * > G4ElementVector
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
const G4int minNCollisions
void set(double x, double y, double z)
Hep3Vector & rotateUz(const Hep3Vector &)
G4double GetLogKineticEnergy() const
G4double GetKineticEnergy() const
static G4EmParameters * Instance()
G4int NumberOfBinsPerDecade() const
const G4Material * GetMaterial() const
G4ProductionCuts * GetProductionCuts() const
const G4ElementVector * GetElementVector() const
G4double GetRadlen() const
const G4double * GetVecNbOfAtomsPerVolume() const
std::size_t GetNumberOfElements() const
void ProposeMomentumDirection(const G4ThreeVector &Pfinal)
static G4PhysicsTable * PreparePhysicsTable(G4PhysicsTable *physTable)
G4bool GetFlag(std::size_t i) const
void PutValue(const std::size_t index, const G4double value)
G4double Energy(const std::size_t index) const
void FillSecondDerivatives(const G4SplineType=G4SplineType::Base, const G4double dir1=0.0, const G4double dir2=0.0)
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
std::size_t GetTableSize() const
static G4ProductionCutsTable * GetProductionCutsTable()
G4double GetProductionCut(G4int index) const
G4StepPoint * GetPreStepPoint() const
const G4ParticleDefinition * GetParticleDefinition() const
const G4DynamicParticle * GetDynamicParticle() const
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
const G4Step * GetStep() const
G4double PolarAngleLimit() const
G4double LowEnergyLimit() const
void SetCurrentCouple(const G4MaterialCutsCouple *)
G4double HighEnergyLimit() const
G4double HighEnergyActivationLimit() const
const G4MaterialCutsCouple * CurrentCouple() const
G4PhysicsTable * GetCrossSectionTable()
G4double LowEnergyActivationLimit() const
G4double ComputeGeomLimit(const G4Track &, G4double &presafety, G4double limit)
G4double GetTransportMeanFreePath(const G4ParticleDefinition *part, G4double kinEnergy)
G4ParticleChangeForMSC * GetParticleChangeForMSC(const G4ParticleDefinition *p=nullptr)
G4double GetEnergy(const G4ParticleDefinition *part, G4double range, const G4MaterialCutsCouple *couple)
G4double GetRange(const G4ParticleDefinition *part, G4double kineticEnergy, const G4MaterialCutsCouple *couple)
G4MscStepLimitType steppingAlgorithm
G4double ConvertTrueToGeom(G4double &tLength, G4double &gLength)
G4double ComputeSafety(const G4ThreeVector &position, G4double limit=DBL_MAX)
G4ThreeVector fDisplacement
void InitialiseParameters(const G4ParticleDefinition *)
G4double SetupTarget(G4int Z, G4double cut)
G4double ComputeElectronCrossSection(G4double CosThetaMin, G4double CosThetaMax)
G4double ComputeSecondTransportMoment(G4double CosThetaMax)
void Initialise(const G4ParticleDefinition *, G4double CosThetaLim)
G4double ComputeTransportCrossSectionPerAtom(G4double CosThetaMax)
virtual G4double SetupKinematic(G4double kinEnergy, const G4Material *mat)
G4double ComputeNuclearCrossSection(G4double CosThetaMin, G4double CosThetaMax)
G4ThreeVector & SampleSingleScattering(G4double CosThetaMin, G4double CosThetaMax, G4double elecRatio)
G4ThreeVector & SampleScattering(const G4ThreeVector &, G4double safety) override
G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double KineticEnergy, G4double AtomicNumber, G4double AtomicWeight=0., G4double cut=DBL_MAX, G4double emax=DBL_MAX) override
G4double ComputeTransportXSectionPerVolume(G4double cosTheta)
const G4MaterialCutsCouple * currentCouple
G4double ComputeTruePathLengthLimit(const G4Track &track, G4double ¤tMinimalStep) override
G4PhysicsTable * GetSecondMomentTable()
std::vector< G4double > prob
G4bool singleScatteringMode
G4double SecondMoment(const G4ParticleDefinition *, const G4MaterialCutsCouple *, G4double kineticEnergy)
G4int currentMaterialIndex
~G4WentzelVIModel() override
G4WentzelVIModel(G4bool comb=true, const G4String &nam="WentzelVIUni")
void DefineMaterial(const G4MaterialCutsCouple *)
G4double ComputeTrueStepLength(G4double geomStepLength) override
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel) override
G4PhysicsTable * fSecondMoments
std::vector< G4double > xsecn
G4double ComputeGeomPathLength(G4double truePathLength) override
G4ParticleChangeForMSC * fParticleChange
const G4ParticleDefinition * particle
const G4DataVector * currentCuts
const G4Material * currentMaterial
void SetupParticle(const G4ParticleDefinition *)
void StartTracking(G4Track *) override
void SetSingleScatteringFactor(G4double)
G4WentzelOKandVIxSection * wokvi