2 #include "SimpleSmear.h"
4 #include "PythiaJetGun.hh"
11 const unsigned nParts = m_event.size();
12 smearEvent.resize(nParts);
14 for (
unsigned i=0; i != nParts; i++ ) {
15 const PseudoJet & part = m_event[i];
16 const double m = part.m();
18 const double mass = m==m ? m : 0.;
19 const double p2 = part.modp2();
20 const double etmp = sqrt(p2+mass*mass);
22 const double eta = part.eta()+PythiaJetGun::gaussRandom(0.,m_sigmaEtaPhi);
23 const double phi = part.phi()+PythiaJetGun::gaussRandom(0.,m_sigmaEtaPhi);
25 while ( eShift <= mass ) {
26 eShift = etmp+PythiaJetGun::gaussRandom(0.,m_sigmaE);
28 const double e = eShift;
30 const double mom = e > mass ? sqrt(e*e-mass*mass) : 0.;
31 const double pt = mom/cosh(eta);
32 const double px = pt*cos(phi);
33 const double py = pt*sin(phi);
34 const double pz = pt*sinh(eta);
36 smearEvent[i] = PseudoJet(px,py,pz,e);
virtual void smear(Event &smearEvent)
smear the event