21 Particle.particle().setMomentum(0., 0., 0., 0.);
34 unsigned int nPhotons =
poisson(bremProba, random);
41 double chi =
Particle.particle().theta();
47 for (
unsigned int i = 0;
i < nPhotons; ++
i) {
68 double emass = 0.0005109990615;
74 weight = 1. - xp + 3. / 4. * xp * xp;
75 }
while (weight < random->flatShoot());
83 const double theta =
gbteth(
pp.particle().e(), emass, xp, random) * emass /
pp.particle().e();
91 return xp *
pp.particle().e() *
XYZTLorentzVector(stheta * cphi, stheta * sphi, ctheta, 1.);
98 const double alfa = 0.625;
100 const double d = 0.13 * (0.8 + 1.3 /
theZ()) * (100.0 + (1.0 / ener)) * (1.0 + efrac);
101 const double w1 = 9.0 / (9.0 +
d);
102 const double umax = ener *
M_PI / partm;
120 prob *= ymu / double(++
n);
void compute(ParticlePropagator &Particle, RandomEngineAndDistribution const *) override
Generate Bremsstrahlung photons.
Sin< T >::type sin(const T &t)
const XYZTLorentzVector & momentum() const
the momentum fourvector
std::map< std::string, int, std::less< std::string > > psi
ROOT::Math::RotationZ RotationZ
RawParticle makeParticle(HepPDT::ParticleDataTable const *, int id, const math::XYZTLorentzVector &p)
unsigned int poisson(double ymu, RandomEngineAndDistribution const *)
Generate numbers according to a Poisson distribution of mean ymu.
Cos< T >::type cos(const T &t)
double gbteth(const double ener, const double partm, const double efrac, RandomEngineAndDistribution const *) const
A universal angular distribution - still from GEANT.
ROOT::Math::RotationY RotationY
BremsstrahlungSimulator(double photonEnergyCut, double photonFractECut)
Constructor.
void rotate(double rphi, const XYZVector &raxis)
XYZTLorentzVector brem(ParticlePropagator &p, RandomEngineAndDistribution const *) const
Compute Brem photon energy and angles, if any.
weight_default_t w1[2000]
double xmin
The fractional photon energy cut (determined from the above two)
std::vector< RawParticle > _theUpdatedState
double flatShoot(double xmin=0.0, double xmax=1.0) const
double photonEnergy
The minimum photon energy to be radiated, in GeV.
Geom::Theta< T > theta() const
double photonFractE
The minimum photon fractional energy (wrt that of the electron)
math::XYZTLorentzVector XYZTLorentzVector