10 #include <Math/RotationY.h>
11 #include <Math/RotationZ.h>
56 std::vector<std::unique_ptr<Particle> > &secondaries,
77 double gbteth(
const double ener,
109 std::vector<std::unique_ptr<fastsim::Particle> > &secondaries,
120 if (radLengths < 1E-10) {
127 if (radLengths > 4.) {
128 particle.
momentum().SetXYZT(0., 0., 0., 0.);
133 if (particle.
momentum().E() - particle.
momentum().mass() < minPhotonEnergy_) {
140 if (xmin >= 1. || xmin <= 0.) {
148 Petrfunc =
new TF1(
"Petrfunc",
PetrukhinFunc, xmin, xmax, 3);
150 Petrfunc->SetParameters(particle.
momentum().E(), A_, Z_);
154 double distance = radLengths * radLenInCm_;
158 double bremProba = density_ * distance * (
fastsim::Constants::NA / A_) * (Petrfunc->Integral(xmin, xmax));
159 if (bremProba < 1E-10) {
171 double phi = particle.
momentum().Phi();
174 for (
unsigned int i = 0;
i < nPhotons; ++
i) {
183 photonMom = ROOT::Math::RotationZ(phi) * (ROOT::Math::RotationY(theta) * photonMom);
198 double xp = Petrfunc->GetRandom();
226 const double alfa = 0.625;
228 const double d = 0.13 * (0.8 + 1.3 / Z_) * (100.0 + (1.0 / ener)) * (1.0 + efrac);
229 const double w1 = 9.0 / (9.0 +
d);
230 const double umax = ener *
M_PI / partm;
234 double beta = (random.
flatShoot() <= w1) ? alfa : 3.0 * alfa;
288 double Z13 =
pow(Z, -1. / 3.);
289 double Z23 =
pow(Z, -2. / 3.);
292 double emass = 0.0005109990615;
293 double mumass = 0.105658367;
295 double alpha = 0.00729735;
296 double constant = 1.85736e-30;
299 if (nu * E >= E - mumass)
302 double Dn = 1.54 * (
pow(A, 0.27));
303 double Dnl =
pow(Dn, (1. - 1. / Z));
305 double delta = (mumass * mumass * nu) / (2. * E * (1. - nu));
307 double Phi_n = TMath::Log(B * Z13 * (mumass + delta * (Dnl * ee - 2)) / (Dnl * (emass + delta * ee * B * Z13)));
312 TMath::Log((Bl * Z23 * mumass) / (1. + delta * mumass / (emass * emass * ee)) / (emass + delta * ee * Bl * Z23));
313 if (Phi_e < 0 || nu * E >= E / (1. + (mumass * mumass / (2. * emass * E))))
317 double f = 16. / 3. * alpha * constant * Z * (Z * Phi_n + Phi_e) * (1. / nu) * (1. - nu + 0.75 * nu * nu);
static double constexpr NA
Avogadro's number.
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 PetrukhinFunc(double *x, double *p)
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
double minPhotonEnergyFraction_
Cut on minimum fraction of particle's energy which has to be carried by photon.
static double constexpr muMass
Muon mass [GeV].
int pdgId() const
Return pdgId of the particle.
double radLenInCm_
Radiation length of material (usually silicon X0=9.360)
constexpr std::array< uint8_t, layerIndexSize > layer
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Base class for any interaction model between a particle and a tracker layer.
double density_
Density of material (usually silicon rho=2.329)
Cos< T >::type cos(const T &t)
double minPhotonEnergy_
Cut on minimum energy of bremsstrahlung photons.
Implementation of Bremsstrahlung from mu+/mu- in the tracker layers based on a Petrukhin Model (nucle...
Abs< T >::type abs(const T &t)
static const std::string B
~MuonBremsstrahlung() override
Default destructor.
TF1 * Petrfunc
The Petrukhin Function.
static double PetrukhinFunc(double *x, double *p)
Petrukhin Function: Returns cross section using nuclear-electron screening correction from G4 style...
T getParameter(std::string const &) const
MuonBremsstrahlung(const std::string &name, const edm::ParameterSet &cfg)
Constructor.
double gbteth(const double ener, const double partm, const double efrac, const RandomEngineAndDistribution &random) const
A universal angular distribution.
unsigned int poissonShoot(double mean) const
const math::XYZTLorentzVector & momentum() const
Return momentum of the particle.
void interact(Particle &particle, const SimplifiedGeometry &layer, std::vector< std::unique_ptr< Particle > > &secondaries, const RandomEngineAndDistribution &random) override
Perform the interaction.
#define DEFINE_EDM_PLUGIN(factory, type, name)
double A_
Atomic weight of material (usually silicon A=28.0855)
double Z_
Atomic number of material (usually silicon Z=14)
Definition of a generic FastSim Particle which can be propagated through the detector (formerly Parti...
math::XYZTLorentzVector brem(Particle &particle, double xmin, const RandomEngineAndDistribution &random) const
Compute Brem photon energy and angles, if any.
Power< A, B >::type pow(const A &a, const B &b)