16 #include "StHbtMaker/ThCorrFctn/StHbtThPairGauss.h"
17 #include "StHbtMaker/ThCorrFctn/StHbtEvtGenHiddenInfo.hh"
18 #include "StHbtMaker/Infrastructure/StHbtParticle.hh"
19 #include "StHbtMaker/Base/StHbtFsiWeight.hh"
25 StHbtThPairGauss::StHbtThPairGauss() :
StHbtThPair(){
33 mSizeX=mSizeY=mSizeZ=1.;
39 StHbtThPairGauss::~StHbtThPairGauss()
42 void StHbtThPairGauss::Set(
const StHbtPair* aPair){
43 SetMomentum_PID (aPair);
55 void StHbtThPairGauss::SetMomentum_PID(
const StHbtPair* aPair ){
59 if (mUseHidMom||mUseHidPid) {
61 (aPair->track1()->HiddenInfo());
63 (aPair->track2()->HiddenInfo());
64 if ((tEvtGenHidInf1==0)||(tEvtGenHidInf2==0)) {
65 cout <<
"Fatal Error in StHbtThPairGauss : "<< endl;
66 cout <<
" HiddenInfo does NOT inherit from StHbtEvtGenHiddenInfo , Or it is NULL " << endl;
70 if (mUseHidMom&&mUseHidPid) {
74 mMom1=aPair->track1()->FourMomentum();
75 mMom1.setE(::sqrt(mMassSq1+mMom1.vect().mag2()));
76 mMom2=aPair->track2()->FourMomentum();
77 mMom2.setE(::sqrt(mMassSq2+mMom2.vect().mag2()));
78 if ((!mUseHidMom)&&(mBetaRCMS>0)) {
80 mMom1.setE(mGammaRCMS*(tE-mBetaRCMS*mMom1.pz()));
81 mMom1.setPz(mGammaRCMS*(mMom1.pz()-mBetaRCMS*tE));
83 mMom2.setE(mGammaRCMS*(tE-mBetaRCMS*mMom2.pz()));
84 mMom2.setPz(mGammaRCMS*(mMom2.pz()-mBetaRCMS*tE));
88 mPid1=tEvtGenHidInf1->getPid();
89 mPid2=tEvtGenHidInf2->getPid();
93 void StHbtThPairGauss::SetPosition() {
103 mPos2.setX(x*mSizeX);
104 mPos2.setY(y*mSizeY);
105 mPos2.setZ(z*mSizeZ);
109 void StHbtThPairGauss::BoostPosition(){
116 tBeta=(mMomentum1->pz()+mMomentum2->pz())/(mMomentum1->e()+mMomentum2->e());
117 tGamma=::sqrt(1/1-tBeta*tBeta);
119 mPos1.setT(tGamma*(tT-tBeta*mPos1.z()));
120 mPos1.setZ(tGamma*(tBeta*mPos1.z()-tBeta*tT));
122 mPos2.setT(tGamma*(tT-tBeta*mPos2.z()));
123 mPos2.setZ(tGamma*(mPos2.z()-tBeta*tT));
127 mPos1=mPos1.boost(tBoost);
128 mPos2=mPos2.boost(tBoost);
133 inline void StHbtThPairGauss::SetSize(
double aSize,
double aTime){mSizeX=aSize;mSizeY=aSize;mSizeZ=aSize;mTime=aTime;};
134 inline void StHbtThPairGauss::SetSize(
double aSizeX,
double aSizeY,
double aSizeZ,
double aTime)
135 {mSizeX=aSizeX;mSizeY=aSizeY;mSizeZ=aSizeZ;mTime=aTime;};
137 inline void StHbtThPairGauss::UseHiddenMomentum(){mUseHidMom=1;};
138 inline void StHbtThPairGauss::UseParticleMomentum(){
146 inline void StHbtThPairGauss::UseHiddenPid() {
154 inline void StHbtThPairGauss::UseFixedPid(
int const tPid1,
double const tMass1,
int const tPid2,
double const tMass2) {
155 mUseHidPid=
false;mPid1=tPid1;mPid2=tPid2;mMassSq1=tMass1*tMass1;mMassSq2=tMass2*tMass2;};
156 inline void StHbtThPairGauss::UseFixedPid(
int const tPid1,
double const tMass1) {
157 mUseHidPid=
false;mPid1=tPid1;mPid2=tPid1;mMassSq1=tMass1*tMass1;mMassSq2=tMass1*tMass1;};
159 inline void StHbtThPairGauss::SetRCMS() {mRef=RCMS;};
160 inline void StHbtThPairGauss::SetLCMS(){mRef=LCMS;};
161 inline void StHbtThPairGauss::SetPRF(){mRef=PRF;};
163 inline void StHbtThPairGauss::SetBoostRCMS(
double aPlab,
double aMBeam,
double aMTarget){
164 double tEBeamLab=::sqrt(aPlab*aPlab+aMBeam*aMBeam);
165 mGammaRCMS=(tEBeamLab+aMTarget)/::sqrt(aMBeam*aMBeam+aMTarget*aMTarget+2*tEBeamLab*aMTarget);
166 mBetaRCMS=::sqrt(1.-1/(mGammaRCMS*mGammaRCMS));