34 double p2 = Particle.Vect().Mag2();
35 double verySmallP2 = 0.0001;
36 if (p2<=verySmallP2) {
37 deltaP.SetXYZT(0.,0.,0.,0.);
40 double m2 = Particle.
mass() * Particle.
mass();
49 double eSpread = 0.1536E-3*charge2*(
theZ()/
theA())*
rho()*thick/beta2;
63 double aBitAboveMass = Particle.
mass()*1.0001;
64 double newE =
std::max(aBitAboveMass,Particle.e()-dedx);
66 double fac =
std::sqrt((newE*newE-m2)/p2);
70 deltaP.SetXYZT(Particle.Px()*(1.-fac),Particle.Py()*(1.-fac),
71 Particle.Pz()*(1.-fac),Particle.E()-newE);
72 Particle.SetXYZT(Particle.Px()*fac,Particle.Py()*fac,
73 Particle.Pz()*fac,newE);
double rho() const
Density in g/cm3.
double mass() const
get the MEASURED mass
double mostProbableLoss
The most probable enery loss.
void compute(ParticlePropagator &Particle, RandomEngineAndDistribution const *)
The real dE/dx generation and particle update.
double eMass() const
Electron mass in GeV/c2.
double charge() const
get the MEASURED charge
~EnergyLossSimulator()
Default Destructor.
LandauFluctuationGenerator * theGenerator
The Landau Fluctuation generator.
double landau(RandomEngineAndDistribution const *random) const
Random generator of the dE/dX spread (Landau function)
EnergyLossSimulator(double A, double Z, double density, double radLen)
Constructor.
double excitE() const
Mean excitation energy (in GeV)
double radLenIncm() const
One radiation length in cm.
XYZTLorentzVector deltaP
The actual energy loss.