00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "StHbtSmearPair.h"
00026 #include "StRandom.hh"
00027
00028 #ifdef __ROOT__
00029 ClassImp(StHbtSmearPair)
00030 #endif
00031
00032
00033
00034 StHbtSmearPair::StHbtSmearPair(){
00035 setup();
00036 }
00037
00038 StHbtSmearPair::StHbtSmearPair(const StHbtPair* unSmearedPair){
00039 setup();
00040 SetUnsmearedPair(unSmearedPair);
00041 }
00042
00043 void StHbtSmearPair::setup(){
00044 mSmearedPair.SetTrack1(&mParticle1);
00045 mSmearedPair.SetTrack2(&mParticle2);
00046 }
00047
00048 void StHbtSmearPair::SetUnsmearedPair(const StHbtPair* unSmearedPair){
00049 mParticle1.ResetFourMomentum(SmearedMomentum(unSmearedPair->track1()->FourMomentum()));
00050 mParticle2.ResetFourMomentum(SmearedMomentum(unSmearedPair->track2()->FourMomentum()));
00051 }
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062 StHbtLorentzVector StHbtSmearPair::SmearedMomentum(StHbtLorentzVector fourmom){
00063 double pT = fourmom.perp();
00064 double mass2 = fourmom.m2();
00065 double px = fourmom.x();
00066 double py = fourmom.y();
00067 double pz = fourmom.z();
00068 double sin2theta = sin(fourmom.theta());
00069 sin2theta = sin2theta*sin2theta;
00070
00071 double DpT_div_pT = StRandom::gauss(0.0,mFracPtRes);
00072 double Dphi = StRandom::gauss(0.0,mPhi_a+mPhi_b*::pow(pT,mPhi_alpha));
00073 double Dtheta = StRandom::gauss(0.0,mTheta_a+mTheta_b*::pow(pT,mTheta_alpha));
00074
00075 fourmom.setX(px*(1.0+DpT_div_pT) - py*Dphi);
00076 fourmom.setY(py*(1.0+DpT_div_pT) + px*Dphi);
00077 fourmom.setZ(pz*(1.0+DpT_div_pT) - pT*Dtheta/sin2theta);
00078 fourmom.setE(::sqrt(mass2 + fourmom.x()*fourmom.x()+fourmom.y()*fourmom.y()+fourmom.z()*fourmom.z()));
00079
00080 return fourmom;
00081 }
00082