25 #include "StHbtSmearPair.h"
26 #include "StRandom.hh"
34 StHbtSmearPair::StHbtSmearPair(){
38 StHbtSmearPair::StHbtSmearPair(
const StHbtPair* unSmearedPair){
40 SetUnsmearedPair(unSmearedPair);
43 void StHbtSmearPair::setup(){
44 mSmearedPair.SetTrack1(&mParticle1);
45 mSmearedPair.SetTrack2(&mParticle2);
48 void StHbtSmearPair::SetUnsmearedPair(
const StHbtPair* unSmearedPair){
49 mParticle1.ResetFourMomentum(SmearedMomentum(unSmearedPair->track1()->FourMomentum()));
50 mParticle2.ResetFourMomentum(SmearedMomentum(unSmearedPair->track2()->FourMomentum()));
63 double pT = fourmom.perp();
64 double mass2 = fourmom.m2();
65 double px = fourmom.x();
66 double py = fourmom.y();
67 double pz = fourmom.z();
68 double sin2theta = sin(fourmom.theta());
69 sin2theta = sin2theta*sin2theta;
71 double DpT_div_pT = StRandom::gauss(0.0,mFracPtRes);
72 double Dphi = StRandom::gauss(0.0,mPhi_a+mPhi_b*::pow(pT,mPhi_alpha));
73 double Dtheta = StRandom::gauss(0.0,mTheta_a+mTheta_b*::pow(pT,mTheta_alpha));
75 fourmom.setX(px*(1.0+DpT_div_pT) - py*Dphi);
76 fourmom.setY(py*(1.0+DpT_div_pT) + px*Dphi);
77 fourmom.setZ(pz*(1.0+DpT_div_pT) - pT*Dtheta/sin2theta);
78 fourmom.setE(::sqrt(mass2 + fourmom.x()*fourmom.x()+fourmom.y()*fourmom.y()+fourmom.z()*fourmom.z()));