13 #include "StHbtMaker/CorrFctn/FracMergRowvsQinv.h"
21 FracMergRowvsQinv::FracMergRowvsQinv(
char* title,
const int& nbinsX,
const float& XLo,
const float& XHi,
22 const int& nbinsY,
const float& YLo,
const float& YHi){
27 mNumerator2D =
new StHbt2DHisto(Tit,title,nbinsX,XLo,XHi,nbinsY,YLo,YHi);
32 mDenominator2D =
new StHbt2DHisto(Tit,title,nbinsX,XLo,XHi,nbinsY,YLo,YHi);
37 mRatio2D =
new StHbt2DHisto(Tit,title,nbinsX,XLo,XHi,nbinsY,YLo,YHi);
39 mNumerator2D->Sumw2();
40 mDenominator2D->Sumw2();
44 FracMergRowvsQinv::~FracMergRowvsQinv(){
46 delete mDenominator2D;
50 void FracMergRowvsQinv::Finish(){
51 mRatio2D->Divide(mNumerator2D,mDenominator2D,1.0,1.0);
56 StHbtString FracMergRowvsQinv::Report(){
57 string stemp =
"Qinv Correlation Function Report:\n";
59 sprintf(ctemp,
"Number of entries in numerator:\t%E\n",mNumerator2D->GetEntries());
61 sprintf(ctemp,
"Number of entries in denominator:\t%E\n",mDenominator2D->GetEntries());
63 sprintf(ctemp,
"Number of entries in ratio:\t%E\n",mRatio2D->GetEntries());
65 StHbtString returnThis = stemp;
69 void FracMergRowvsQinv::AddRealPair(
const StHbtPair* pair){
70 double Qinv = fabs(pair->qInv());
71 mNumerator2D->Fill(Qinv,
72 pair->getFracOfMergedRow(),1.0);
76 void FracMergRowvsQinv::AddMixedPair(
const StHbtPair* pair){
77 double Qinv = fabs(pair->qInv());
78 mDenominator2D->Fill(Qinv,
79 pair->getFracOfMergedRow(),1.0);