49 std::vector<std::unique_ptr<fastsim::Particle> >& secondaries,
75 std::vector<std::unique_ptr<fastsim::Particle> >& secondaries,
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.);
static std::vector< std::string > checklist log
Implementation of a generic detector layer (base class for forward/barrel layers).
const math::XYZTLorentzVector & position() const
Return position of the particle.
virtual const double getThickness(const math::XYZTLorentzVector &position) const =0
Return thickness of the layer at a given position.
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.
constexpr std::array< uint8_t, layerIndexSize > layer
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 charge() const
Return charge of the particle.
T getParameter(std::string const &) const
double density_
Density of material (usually silicon rho=2.329)
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).