49 std::vector<std::unique_ptr<fastsim::Particle> >& secondaries,
67 A_ =
cfg.getParameter<
double>(
"A");
68 Z_ =
cfg.getParameter<
double>(
"Z");
75 std::vector<std::unique_ptr<fastsim::Particle> >& secondaries,
83 double radLengths = layer.getThickness(particle.
position(), particle.
momentum());
84 if (radLengths < 1E-10) {
91 if (particle.
charge() == 0) {
99 if (
p2 < minMomentum_ * minMomentum_) {
104 double excitE = 12.5E-9 * Z_;
107 double thick = radLengths * radLenInCm_;
116 double beta2 =
p2 / e2;
117 double gama2 = e2 /
m2;
122 double eSpread = 0.1536E-3 * charge2 * (Z_ / A_) * density_ * thick / beta2;
125 double mostProbableLoss =
129 double dedx = mostProbableLoss + eSpread * theGenerator.landau(&random);
132 double newE = particle.
momentum().e() - dedx;
135 double eDiff2 = newE * newE -
m2;
137 particle.
momentum().SetXYZT(0., 0., 0., 0.);
Implementation of a generic detector layer (base class for forward/barrel layers).
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.
const math::XYZTLorentzVector & position() const
Return position of the particle.
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 density_
Density of material (usually silicon rho=2.329)
const math::XYZTLorentzVector & momentum() const
Return momentum of the particle.
double charge() const
Return charge 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).