10 #include <Math/RotationY.h>
11 #include <Math/RotationZ.h>
50 std::vector<std::unique_ptr<Particle> >& secondaries,
71 double gbteth(
const double ener,
93 std::vector<std::unique_ptr<fastsim::Particle> >& secondaries,
104 if (radLengths < 1E-10) {
111 if (radLengths > 4.) {
112 particle.
momentum().SetXYZT(0., 0., 0., 0.);
117 if (particle.
momentum().E() - particle.
momentum().mass() < minPhotonEnergy_) {
123 if (xmin >= 1. || xmin <= 0.) {
129 radLengths * (4. / 3. *
std::log(1. / xmin) - 4. / 3. * (1. -
xmin) + 1. / 2. * (1. - xmin * xmin));
139 double phi = particle.
momentum().Phi();
142 for (
unsigned int i = 0;
i < nPhotons; ++
i) {
151 photonMom = ROOT::Math::RotationZ(phi) * (ROOT::Math::RotationY(theta) * photonMom);
169 weight = 1. - xp + 3. / 4. * xp * xp;
198 const double alfa = 0.625;
200 const double d = 0.13 * (0.8 + 1.3 / Z_) * (100.0 + (1.0 / ener)) * (1.0 + efrac);
201 const double w1 = 9.0 / (9.0 +
d);
202 const double umax = ener *
M_PI / partm;
206 double beta = (random.
flatShoot() <= w1) ? alfa : 3.0 * alfa;
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 flatShoot(double xmin=0.0, double xmax=1.0) const
double minPhotonEnergy_
Cut on minimum energy of bremsstrahlung photons.
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
void interact(Particle &particle, const SimplifiedGeometry &layer, std::vector< std::unique_ptr< Particle > > &secondaries, const RandomEngineAndDistribution &random) override
Perform the interaction.
double Z_
Atomic number of material (usually silicon Z=14)
Exp< T >::type exp(const T &t)
int pdgId() const
Return pdgId of the particle.
static double constexpr eMass
Electron mass[GeV].
constexpr std::array< uint8_t, layerIndexSize > layer
Bremsstrahlung(const std::string &name, const edm::ParameterSet &cfg)
Constructor.
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Base class for any interaction model between a particle and a tracker layer.
~Bremsstrahlung() override
Default destructor.
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
double gbteth(const double ener, const double partm, const double efrac, const RandomEngineAndDistribution &random) const
A universal angular distribution.
T getParameter(std::string const &) const
Implementation of Bremsstrahlung from e+/e- in the tracker layers.
unsigned int poissonShoot(double mean) const
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...
double minPhotonEnergyFraction_
Cut on minimum fraction of particle's energy which has to be carried by photon.
math::XYZTLorentzVector brem(Particle &particle, double xmin, const RandomEngineAndDistribution &random) const
Compute Brem photon energy and angles, if any.