16 #include "StHbtMaker/ThCorrFctn/StHbtEvtGenPair.h"
17 #include "StHbtMaker/ThCorrFctn/StHbtEvtGenHiddenInfo.hh"
18 #include "StHbtMaker/Infrastructure/StHbtParticle.hh"
30 mValidPos1 =
new short[mNStoredPos];
32 mValidPos2 =
new short[mNStoredPos];
33 for(
int ti=0; ti< mNStoredPos; ti++){
40 StHbtEvtGenPair::~StHbtEvtGenPair(){
49 void StHbtEvtGenPair::setVariables(
const StHbtPair* aPair){
50 double tTimeShift = 3.75;
51 double SpaceShift = -4.21;
if(SpaceShift){};
54 tEvtGenHiddenInfoV[0] =
56 tEvtGenHiddenInfoV[1] =
59 mMomentum1=tEvtGenHiddenInfoV[0]->getFreezeOutMomEn();
60 mMomentum2=tEvtGenHiddenInfoV[1]->getFreezeOutMomEn();
62 for(
int ti=0; ti<2; ti++){
65 if(tEvtGenHiddenInfo->posHaveNotBeenModified()){
72 double tR = tEmPoint->perp();
73 double tPhi = tRand.Rndm()*2.*TMath::Pi();
74 tEmPoint->setX(tR*cos(tPhi));
75 tEmPoint->setY(tR*sin(tPhi));
82 int tIndex = (int)(tRand.Rndm()*mNStoredPos);
86 tPosArray = mPosArray1;
87 tValidPos = mValidPos1;
90 tPosArray = mPosArray2;
91 tValidPos = mValidPos2;
93 if(tValidPos[tIndex]==0){
94 tPosArray[tIndex]=(*tEmPoint);
99 (*tEmPoint) = tPosArray[tIndex];
100 tPosArray[tIndex] = tVect;
106 if(ti==1) tEmPoint->setT(tEmPoint->t()+tTimeShift/mMomentum2->e()*
112 static TRandom tRand;
113 double tR = tEmPoint->perp();
114 double tPhi = tRand.Rndm()*2.*TMath::Pi();
115 tEmPoint->setX(tR*cos(tPhi));
116 tEmPoint->setY(tR*sin(tPhi));
117 if(ti==1) tEmPoint->setT(tEmPoint->t()+tTimeShift/mMomentum2->e()*
123 static TRandom tRand;
124 static double sigma=9.0;
125 static double mu=3.0;
136 mRandVar[0] = tRand.Gaus(0.,1.);
137 mRandVar[1] = tRand.Gaus(0.,1.);
138 mRandVar[2] = tRand.Gaus(0.,1.);
141 double tPx = mMomentum1->x()+mMomentum2->x();
142 double tPy = mMomentum1->y()+mMomentum2->y();
143 double tPz = mMomentum1->z()+mMomentum2->z();
144 double tE = mMomentum1->e()+mMomentum2->e();
145 double tPt = tPx*tPx + tPy*tPy;
147 double tMt = tE*tE - tPz*tPz;
150 double tM = ::sqrt(tMt - tPt);
154 double tROut = mRandVar[0]*sigma+mu;
155 double tRSide = mRandVar[1]*sigma;
156 double ttz = mRandVar[2]*sigma;
163 double ttDTime = ttt;
166 ttz += (tPz/tE*ttDTime);
172 tEmPoint->setX(tROut*tPx-tRSide*tPy);
173 tEmPoint->setY(tROut*tPy+tRSide*tPx);
188 tEvtGenHiddenInfo->setPosHaveBeenModified();
191 mEmPoint1 = tEvtGenHiddenInfoV[0]->getEmPoint();
192 mEmPoint2 = tEvtGenHiddenInfoV[1]->getEmPoint();
193 mPid1=tEvtGenHiddenInfoV[0]->getPdgPid();
194 mPid2=tEvtGenHiddenInfoV[1]->getPdgPid();