26 , mTraversed(traversed)
27 , mRadLength(radLength)
34 :
Device(other), mParticle(NULL), mKMin(other.mKMin), mKMax(other.mKMax),
35 mEpsilon(other.mEpsilon), mTraversed(other.mTraversed),
36 mRadLength(other.mRadLength), mPdf(NULL) {
54 double lower = mEpsilon;
56 if (upper < lower || isnan(upper) || isnan(lower)) {
61 mPdf->SetRange(mKMin, mKMax);
66 double ret = 4. * log(mKMax / mKMin) / 3.;
67 ret += -4. * (mKMax - mKMin) / (3. *
mParticle->E);
68 ret += 0.5* pow((mKMax - mKMin) /
mParticle->E, 2.);
69 ret *= mTraversed / mRadLength;
70 int n =
static_cast<int>(ret);
71 if (fabs(ret - n) < fabs(ret - n - 1)) {
79 mParticle.reset(static_cast<erhic::ParticleMC*>(prt.Clone()));
81 mPdf =
new TF1(
"Smear_Bremsstrahlung_PDF",
89 void Bremsstrahlung::FixParticleKinematics(
ParticleMCS& prt) {
91 if (prt.
p < 0. || isnan(prt.
p)) prt.
p = 0.;
103 const int nGamma =
NGamma();
104 for (
int i = 0; i < nGamma; i++) {
106 double loss =
mPdf->GetRandom();
110 FixParticleKinematics(prtOut);
111 HandleBogusValues(prtOut);
TF1 * mPdf
dSigma/dK function
Bremsstrahlung(double epsilon=0.01, double traversed=10., double radLength=47.1)
A specialized Device class for modelling radiative losses.
virtual Double_t GetM() const
Double32_t E
Energy of particle.
double dSigmadK(double *x, double *)
void SetParticle(const erhic::VirtualParticle &)
virtual Bremsstrahlung * Clone(Option_t *option="not used") const
Double32_t p
Total momentum of particle.
void AddParticle(int particle)
Double32_t pt
Transverse momentum of particle.
virtual Double_t GetE() const
std::auto_ptr< erhic::ParticleMC > mParticle
Copy of the current particle.
Double32_t pz
z component of particle momentum
Abstract base class for a general particle.
Double32_t theta
Polar angle.
virtual void Smear(const erhic::VirtualParticle &, ParticleMCS &)