84 if(radLengths < 1E-10)
100 double p2 = particle.
momentum().Vect().Mag2();
106 double excitE = 12.5E-9 *
Z_;
118 double beta2 = p2 / e2;
119 double gama2 = e2 / m2;
124 double eSpread = 0.1536E-3 * charge2 * (
Z_ /
A_) *
density_ * thick / beta2;
127 double mostProbableLoss = eSpread * (
135 double newE = particle.
momentum().e() - dedx;
138 double eDiff2 = newE * newE - m2;
140 particle.
momentum().SetXYZT(0.,0.,0.,0.);
164 "fastsim::EnergyLoss" T getParameter(std::string const &) const
Implementation of a generic detector layer (base class for forward/barrel layers).
const math::XYZTLorentzVector & position() const
Return position of the particle.
double Z_
Atomic number of material (usually silicon Z=14)
double radLenInCm_
Radiation length of material (usually silicon X0=9.360)
void interact(fastsim::Particle &particle, const SimplifiedGeometry &layer, std::vector< std::unique_ptr< fastsim::Particle > > &secondaries, const RandomEngineAndDistribution &random) override
Perform the interaction.
double A_
Atomic weight of material (usually silicon A=28.0855)
static double constexpr eMass
Electron mass[GeV].
~EnergyLoss() override
Default destructor.
EnergyLoss(const std::string &name, const edm::ParameterSet &cfg)
Constructor.
Base class for any interaction model between a particle and a tracker layer.
LandauFluctuationGenerator theGenerator
Generator to do Landau fluctuation.
Implementation of most probable energy loss by ionization in the tracker layers.
double minMomentum_
Minimum momentum of incoming (charged) particle.
double landau(RandomEngineAndDistribution const *random) const
Random generator of the dE/dX spread (Landau function)
double charge() const
Return charge of the particle.
double density_
Density of material (usually silicon rho=2.329)
virtual const double getThickness(const math::XYZTLorentzVector &position) const =0
Return thickness of the layer at a given position.
const math::XYZTLorentzVector & momentum() const
Return momentum of the particle.
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition of a generic FastSim Particle which can be propagated through the detector (formerly Parti...
void setEnergyDeposit(double energyDeposit)
Set the energy the particle deposited in the tracker layer that was last hit (ionization).