27 LogDebug(
"MuonBremsstrahlungSimulator") <<
"Starting the MuonBremsstrahlungSimulator" << std::endl;
32 double NA = 6.022e+23;
35 Particle.particle().setMomentum(0., 0., 0., 0.);
42 double EMuon =
Particle.particle().e();
57 f1->SetParameters(EMuon,
A,
Z);
74 double chi =
Particle.particle().theta();
80 for (
unsigned int i = 0;
i < nPhotons; ++
i) {
84 LogDebug(
"MuonBremsstrahlungSimulator") <<
"MuonBremsstrahlungSimulator parameters:" << std::endl;
85 LogDebug(
"MuonBremsstrahlungSimulator") <<
"xmin-> " <<
xmin << std::endl;
86 LogDebug(
"MuonBremsstrahlungSimulator") <<
"Atomic Weight-> " <<
A << std::endl;
87 LogDebug(
"MuonBremsstrahlungSimulator") <<
"Density-> " <<
density << std::endl;
88 LogDebug(
"MuonBremsstrahlungSimulator") <<
"Distance-> " <<
d << std::endl;
89 LogDebug(
"MuonBremsstrahlungSimulator") <<
"bremProba->" <<
bremProba << std::endl;
90 LogDebug(
"MuonBremsstrahlungSimulator") <<
"nPhotons->" << nPhotons << std::endl;
91 LogDebug(
"MuonBremsstrahlungSimulator") <<
" Muon_Energy-> " << EMuon << std::endl;
92 LogDebug(
"MuonBremsstrahlungSimulator") <<
"X0-> " <<
radLen << std::endl;
93 LogDebug(
"MuonBremsstrahlungSimulator") <<
" radLengths-> " <<
radLengths << std::endl;
97 if (thePhoton.
E() > 0.) {
108 LogDebug(
"MuonBremsstrahlungSimulator") <<
" Muon Bremsstrahlung: photon_energy-> " << thePhoton.
E() << std::endl;
109 LogDebug(
"MuonBremsstrahlungSimulator") <<
"photon_px->" << thePhoton.
Px() << std::endl;
110 LogDebug(
"MuonBremsstrahlungSimulator") <<
"photon_py->" << thePhoton.
Py() << std::endl;
111 LogDebug(
"MuonBremsstrahlungSimulator") <<
"photon_pz->" << thePhoton.
Pz() << std::endl;
120 double mumass = 0.105658367;
132 double xp =
f1->GetRandom();
133 LogDebug(
"MuonBremsstrahlungSimulator") <<
"MuonBremsstrahlungSimulator: xp->" << xp << std::endl;
134 std::cout <<
"MuonBremsstrahlungSimulator: xp->" << xp << std::endl;
142 const double theta =
gbteth(
pp.particle().e(), mumass, xp, random) * mumass /
pp.particle().e();
150 return xp *
pp.particle().e() *
XYZTLorentzVector(stheta * cphi, stheta * sphi, ctheta, 1.);
157 const double alfa = 0.625;
159 const double d = 0.13 * (0.8 + 1.3 /
theZ()) * (100.0 + (1.0 / ener)) * (1.0 + efrac);
160 const double w1 = 9.0 / (9.0 +
d);
161 const double umax = ener *
M_PI / partm;
165 double beta = (random->
flatShoot() <= w1) ? alfa : 3.0 * alfa;
static double constexpr NA
Avogadro's number.
XYZTLorentzVector brem(ParticlePropagator &p, RandomEngineAndDistribution const *) const
Compute Brem photon energy and angles, if any.
double Pz() const
z of the momentum
double PetrukhinFunc(double *x, double *p)
double xmin
The fractional photon energy cut (determined from the above two)
Sin< T >::type sin(const T &t)
double E() const
energy of the momentum
void compute(ParticlePropagator &Particle, RandomEngineAndDistribution const *) override
Generate Bremsstrahlung photons.
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)
XYZTLorentzVector deltaPMuon
XYZTLorentzVector brem_photon
double Py() const
y of the momentum
Cos< T >::type cos(const T &t)
ROOT::Math::RotationY RotationY
void rotate(double rphi, const XYZVector &raxis)
MuonBremsstrahlungSimulator(double A, double Z, double density, double radLen, double photonEnergyCut, double photonFractECut)
Constructor.
unsigned int poissonShoot(double mean) const
double photonFractE
The minimum photon fractional energy (wrt that of the electron)
std::vector< RawParticle > _theUpdatedState
double photonEnergy
The minimum photon energy to be radiated, in GeV.
double flatShoot(double xmin=0.0, double xmax=1.0) const
double gbteth(const double ener, const double partm, const double efrac, RandomEngineAndDistribution const *) const
A universal angular distribution - still from GEANT.
Geom::Theta< T > theta() const
math::XYZTLorentzVector XYZTLorentzVector
double Px() const
x of the momentum