23 double A,
double Z,
double density,
double radLen,
24 double photonEnergyCut,
double photonFractECut) :
31 LogDebug(
"MuonBremsstrahlungSimulator")<<
"Starting the MuonBremsstrahlungSimulator"<< std::endl;
41 double NA = 6.022e+23;
44 Particle.SetXYZT(0.,0.,0.,0.);
51 double EMuon = Particle.e();
56 if (
xmin >=1. ||
xmin <=0. )
return;
64 f1->SetParameters(EMuon,
A,
Z);
79 if ( !nPhotons )
return;
82 double chi = Particle.theta();
83 double psi = Particle.phi();
90 for (
unsigned int i=0;
i<nPhotons; ++
i ) {
94 LogDebug(
"MuonBremsstrahlungSimulator")<<
"MuonBremsstrahlungSimulator parameters:"<< std::endl;
95 LogDebug(
"MuonBremsstrahlungSimulator")<<
"xmin-> " <<
xmin << std::endl;
96 LogDebug(
"MuonBremsstrahlungSimulator")<<
"Atomic Weight-> " <<
A << std::endl;
97 LogDebug(
"MuonBremsstrahlungSimulator")<<
"Density-> " <<
density << std::endl;
98 LogDebug(
"MuonBremsstrahlungSimulator")<<
"Distance-> " <<
d << std::endl;
99 LogDebug(
"MuonBremsstrahlungSimulator")<<
"bremProba->" <<
bremProba << std::endl;
100 LogDebug(
"MuonBremsstrahlungSimulator")<<
"nPhotons->" << nPhotons << std::endl;
101 LogDebug(
"MuonBremsstrahlungSimulator")<<
" Muon_Energy-> " << EMuon << std::endl;
102 LogDebug(
"MuonBremsstrahlungSimulator")<<
"X0-> "<< radLen << std::endl;
103 LogDebug(
"MuonBremsstrahlungSimulator")<<
" radLengths-> " <<
radLengths << std::endl;
107 if (thePhoton.E()>0.){
117 brem_photon.SetXYZT(thePhoton.Px(),thePhoton.Py(),thePhoton.Pz(),thePhoton.E());
119 LogDebug(
"MuonBremsstrahlungSimulator")<<
" Muon Bremsstrahlung: photon_energy-> " << thePhoton.E() << std::endl;
120 LogDebug(
"MuonBremsstrahlungSimulator")<<
"photon_px->" << thePhoton.Px() << std::endl;
121 LogDebug(
"MuonBremsstrahlungSimulator")<<
"photon_py->" << thePhoton.Py() << std::endl;
122 LogDebug(
"MuonBremsstrahlungSimulator")<<
"photon_pz->" << thePhoton.Pz() << std::endl;
135 double mumass = 0.105658367;
136 double xp =
f1->GetRandom();
137 LogDebug(
"MuonBremsstrahlungSimulator")<<
"MuonBremsstrahlungSimulator: xp->" << xp << std::endl;
138 std::cout <<
"MuonBremsstrahlungSimulator: xp->" << xp << std::endl;
147 const double theta =
gbteth(pp.e(),mumass,xp)*mumass/pp.e();
162 const double efrac)
const {
163 const double alfa = 0.625;
165 const double d = 0.13*(0.8+1.3/
theZ())*(100.0+(1.0/ener))*(1.0+efrac);
166 const double w1 = 9.0/(9.0+
d);
167 const double umax = ener*
M_PI/partm;
const double Z[kNumberCalorimeter]
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)
Geom::Theta< T > theta() const
MuonBremsstrahlungSimulator(const RandomEngine *engine, double A, double Z, double density, double radLen, double photonEnergyCut, double photonFractECut)
Constructor.
XYZTLorentzVector brem(ParticlePropagator &p) const
Compute Brem photon energy and angles, if any.
ROOT::Math::RotationZ RotationZ
std::map< std::string, int, std::less< std::string > > psi
XYZTLorentzVector deltaPMuon
const XYZTLorentzVector & momentum() const
the momentum fourvector
const T & max(const T &a, const T &b)
XYZTLorentzVector brem_photon
unsigned int poissonShoot(double mean) const
Cos< T >::type cos(const T &t)
ROOT::Math::RotationY RotationY
const RandomEngine * random
void rotate(double rphi, const XYZVector &raxis)
double gbteth(const double ener, const double partm, const double efrac) const
A universal angular distribution - still from GEANT.
double flatShoot(double xmin=0.0, double xmax=1.0) const
double photonFractE
The minimum photon fractional energy (wrt that of the electron)
std::vector< RawParticle > _theUpdatedState
void compute(ParticlePropagator &Particle)
Generate Bremsstrahlung photons.
double photonEnergy
The minimum photon energy to be radiated, in GeV.
math::XYZTLorentzVector XYZTLorentzVector