10 #include <Math/RotationY.h> 11 #include <Math/RotationZ.h> 81 double eGamma = particle.
momentum().e();
85 if(particle.
pdgId()!=22)
94 if(radLengths < 1E-10)
117 double xm=eMass/eGamma;
123 weight = 1. - 4./3.*xe*(1.-xe);
127 double eElectron = xe * eGamma;
128 double tElectron = eElectron-
eMass;
132 double ePositron = eGamma-eElectron;
133 double tPositron = ePositron-
eMass;
134 double pPositron =
std::sqrt((ePositron+eMass)*tPositron);
141 double stheta1, stheta2, ctheta1, ctheta2;
143 if(eElectron > ePositron){
144 double theta1 =
gbteth(eElectron,eMass,xe,random)*eMass/eElectron;
147 stheta2 = stheta1*pElectron/pPositron;
150 double theta2 =
gbteth(ePositron,eMass,xe,random)*eMass/ePositron;
153 stheta1 = stheta2*pPositron/pElectron;
158 double thetaLab = particle.
momentum().Theta();
159 double phiLab = particle.
momentum().Phi();
164 pElectron*stheta1*sphi,
167 secondaries.back()->momentum() = ROOT::Math::RotationZ(phiLab)*(ROOT::Math::RotationY(thetaLab)*secondaries.back()->momentum());
172 -pPositron*stheta2*sphi,
175 secondaries.back()->momentum() = ROOT::Math::RotationZ(phiLab)*(ROOT::Math::RotationY(thetaLab)*secondaries.back()->momentum());
178 particle.
momentum().SetXYZT(0.,0.,0.,0.);
191 const double alfa = 0.625;
193 const double d = 0.13*(0.8+1.3/
Z_)*(100.0+(1.0/ener))*(1.0+efrac);
194 const double w1 = 9.0/(9.0+
d);
195 const double umax = ener*
M_PI/partm;
211 "fastsim::PairProduction"
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 flatShoot(double xmin=0.0, double xmax=1.0) const
Sin< T >::type sin(const T &t)
double Z_
Atomic number of material (usually silicon Z=14)
int pdgId() const
Return pdgId of the particle.
static double constexpr eMass
Electron mass[GeV].
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Base class for any interaction model between a particle and a tracker layer.
Cos< T >::type cos(const T &t)
Computes the probability for photons to convert into an e+e- pair in the tracker layer.
PairProduction(const std::string &name, const edm::ParameterSet &cfg)
Constructor.
virtual const double getThickness(const math::XYZTLorentzVector &position) const =0
Return thickness of the layer at a given position.
double minPhotonEnergy_
Cut on minimum energy of photons.
const math::XYZTLorentzVector & momentum() const
Return momentum of the particle.
~PairProduction() override
Default destructor.
#define DEFINE_EDM_PLUGIN(factory, type, name)
void interact(fastsim::Particle &particle, const SimplifiedGeometry &layer, std::vector< std::unique_ptr< fastsim::Particle > > &secondaries, const RandomEngineAndDistribution &random) override
Perform the interaction.
Definition of a generic FastSim Particle which can be propagated through the detector (formerly Parti...
double gbteth(double ener, double partm, double efrac, const RandomEngineAndDistribution &random) const
A universal angular distribution.