39 #include "StHbtMaker/CorrFctn/BPLCMSFrame3DCorrFctn_SIM.h"
40 #include "StHbtMaker/Infrastructure/StHbtSmearPair.h"
49 BPLCMSFrame3DCorrFctn_SIM::BPLCMSFrame3DCorrFctn_SIM(
char* title,
const int& nbins,
const float& QLo,
const float& QHi){
67 mRout_alpha = mRside_alpha = mRlong_alpha = 0;
70 char TitNum[100] =
"Num";
72 mNumerator =
new StHbt3DHisto(TitNum,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi);
74 char TitDen[100] =
"Den";
76 mDenominator =
new StHbt3DHisto(TitDen,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi);
78 char TitRat[100] =
"Rat";
80 mRatio =
new StHbt3DHisto(TitRat,title,nbins,QLo,QHi,nbins,QLo,QHi,nbins,QLo,QHi);
84 mDenominator->Sumw2();
90 char titInv[100] =
"QinvRes";
92 mResolutionHistos[0] =
new StHbt2DHisto(titInv,title,10,0.0,0.1,50,-0.025,0.025);
94 char titOut[100] =
"QoutRes";
96 mResolutionHistos[1] =
new StHbt2DHisto(titOut,title,10,0.0,0.1,50,-0.025,0.025);
98 char titSid[100] =
"QsidRes";
100 mResolutionHistos[2] =
new StHbt2DHisto(titSid,title,10,0.0,0.1,50,-0.025,0.025);
102 char titLon[100] =
"QlonRes";
103 strcat(titLon,title);
104 mResolutionHistos[3] =
new StHbt2DHisto(titLon,title,10,0.0,0.1,50,-0.025,0.025);
109 BPLCMSFrame3DCorrFctn_SIM::~BPLCMSFrame3DCorrFctn_SIM(){
115 void BPLCMSFrame3DCorrFctn_SIM::Finish(){
117 mRatio->Divide(mNumerator,mDenominator);
121 StHbtString BPLCMSFrame3DCorrFctn_SIM::Report(){
122 string stemp =
"LCMS Frame Bertsch-Pratt 3D Correlation Function Report:\n";
124 sprintf(ctemp,
" THIS IS A SIMULATION CORRELATION FUNCTION CLASS!!!\n");
126 sprintf(ctemp,
"Number of entries in numerator:\t%E\n",mNumerator->GetEntries());
128 sprintf(ctemp,
"Number of entries in denominator:\t%E\n",mDenominator->GetEntries());
130 sprintf(ctemp,
"Number of entries in ratio:\t%E\n",mRatio->GetEntries());
132 sprintf(ctemp,
"Normalization region in Qinv was:\t%E\t%E\n",mQinvNormLo,mQinvNormHi);
134 sprintf(ctemp,
"Number of pairs in Normalization region was:\n");
136 sprintf(ctemp,
"In numerator:\t%lu\t In denominator:\t%lu\n",mNumRealsNorm,mNumMixedNorm);
140 float radius = mCorrection->GetRadius();
141 sprintf(ctemp,
"Coulomb correction used radius of\t%E\n",radius);
145 sprintf(ctemp,
"No Coulomb Correction applied to this CorrFctn\n");
150 sprintf(ctemp,
"Here is the PairCut specific to this CorrFctn\n");
152 stemp += mPairCut->Report();
155 sprintf(ctemp,
"No PairCut specific to this CorrFctn\n");
160 StHbtString returnThis = stemp;
164 void BPLCMSFrame3DCorrFctn_SIM::AddRealPair(
const StHbtPair* pair){
178 void BPLCMSFrame3DCorrFctn_SIM::AddMixedPair(
const StHbtPair* pair){
180 mToggleNumDen = !mToggleNumDen;
185 if (!(mPairCut->Pass(pair))){
208 double qOut = fabs(pair->qOutCMS());
209 double qSide = fabs(pair->qSideCMS());
210 double qLong = fabs(pair->qLongCMS());
213 double qOut_bin,qSide_bin,qLong_bin;
215 mSmearPair->SetUnsmearedPair(pair);
216 qOut_bin = fabs(mSmearPair->SmearedPair().qOutCMS());
217 qSide_bin = fabs(mSmearPair->SmearedPair().qSideCMS());
218 qLong_bin = fabs(mSmearPair->SmearedPair().qLongCMS());
220 double Qinv = fabs(pair->qInv());
222 double Qinv_smear = fabs(mSmearPair->SmearedPair().qInv());
223 mResolutionHistos[0]->Fill(Qinv,Qinv_smear-Qinv);
224 mResolutionHistos[1]->Fill(qOut,qOut_bin-qOut);
225 mResolutionHistos[2]->Fill(qSide,qSide_bin-qSide);
226 mResolutionHistos[3]->Fill(qLong,qLong_bin-qLong);
243 weight = mCorrection->CoulombCorrect(&(mSmearPair->SmearedPair()));
246 weight = mCorrection->CoulombCorrect(pair);
249 mDenominator->Fill(qOut_bin,qSide_bin,qLong_bin,weight);
253 if (mCorrection) weight = mCorrection->CoulombCorrect(pair);
257 float mT2 = (pair->fourMomentumSum().mt2())/4.0;
260 float Rout2,Rside2,Rlong2;
262 if (mRout_alpha!=0){Rout2 = mRout2*::pow(mT2,mRout_alpha);}
263 else{Rout2 = mRout2;}
265 if (mRside_alpha!=0){Rside2 = mRside2*::pow(mT2,mRside_alpha);}
266 else{Rside2 = mRside2;}
268 if (mRlong_alpha!=0){Rlong2 = mRlong2*::pow(mT2,mRlong_alpha);}
269 else{Rlong2 = mRlong2;}
271 double CorrWeight = 1.0 +
272 mLambda*exp((-qOut*qOut*Rout2 -qSide*qSide*Rside2 -qLong*qLong*Rlong2)/0.038936366329);
273 CorrWeight *= weight;
274 mNumerator->Fill(qOut_bin,qSide_bin,qLong_bin,CorrWeight);