5 #include "StHbtMaker/ThCorrFctn/StHbtShiftedHiddenInfo.h"
7 #define DEGTORAD 0.017453293
9 StHbtShiftedHiddenInfo::StHbtShiftedHiddenInfo() {};
14 const double momShift,
15 const ShiftType aShiftType)
17 mPid(aPid), mMomShift(momShift), mShiftType(aShiftType)
19 setInitialMom(&aInitialMom, aRand, aMomRes);
24 mShiftedMom(aHiddenInfo.getShiftedMom()),
25 mPid(aHiddenInfo.getPid())
30 mShiftedMom(aShiftedMom),
34 StHbtShiftedHiddenInfo::~StHbtShiftedHiddenInfo()
42 inline int StHbtShiftedHiddenInfo::getPid()
const
46 Double_t px = aP->x();
47 Double_t py = aP->y();
48 Double_t pz = aP->z();
54 shift = (mPid > 0) ? 1.0 + mMomShift : shift = 1.0 - mMomShift;
60 shift = (mPid > 0) ? 1.0 + mMomShift : shift = 1.0 - mMomShift;
65 Double_t thephi = atan(py/px);
66 Double_t pt = hypot(px, py);
74 px = pt * cos(thephi);
75 py = pt * sin(thephi);
79 Double_t ptmom = hypot(px, py);
80 Double_t pter = aMomRes->getPtError(ptmom);
81 Double_t totmom = sqrt ((px * px) + (py * py) + (pz * pz));
82 Double_t phier = aMomRes->getPhiError(totmom);
83 Double_t thetaer = aMomRes->getThetaError(totmom);
84 Double_t Deltapx = px * pter - py * phier * DEGTORAD;
85 Double_t Deltapy = py * pter + px * phier * DEGTORAD;
86 Double_t Deltapz = pz * pter + ptmom * thetaer * DEGTORAD / (::pow((ptmom/pz),2));
87 mShiftedMom.setX(px + aRand->Gaus(0,fabs(Deltapx)));
88 mShiftedMom.setY(py + aRand->Gaus(0,fabs(Deltapy)));
89 mShiftedMom.setZ(pz + aRand->Gaus(0,fabs(Deltapz)));
92 mShiftedMom.setT(::sqrt((0.139*0.139 + mShiftedMom.x() * mShiftedMom.x() + mShiftedMom.y() * mShiftedMom.y() + mShiftedMom.z() * mShiftedMom.z())));
95 mShiftedMom.setT(::sqrt((0.493*0.493 + mShiftedMom.x() * mShiftedMom.x() + mShiftedMom.y() * mShiftedMom.y() + mShiftedMom.z() * mShiftedMom.z())));
98 mShiftedMom.setT(::sqrt((0.938*0.938 + mShiftedMom.x() * mShiftedMom.x() + mShiftedMom.y() * mShiftedMom.y() + mShiftedMom.z() * mShiftedMom.z())));
104 inline void StHbtShiftedHiddenInfo:: setPid(
int aPid)
107 inline void StHbtShiftedHiddenInfo::setShiftType(ShiftType aShiftType)
108 { mShiftType = aShiftType; }
110 inline StHbtHiddenInfo* StHbtShiftedHiddenInfo::getParticleHiddenInfo()
119 inline void StHbtShiftedHiddenInfo::setShift(
double momShift)
121 mMomShift = momShift;