37 #include "StHbtMaker/CorrFctn/QinvCorrFctn.h"
46 QinvCorrFctn::QinvCorrFctn(
char* title,
const int& nbins,
const float& QinvLo,
const float& QinvHi){
49 char TitNum[100] =
"Num";
51 mNumerator =
new StHbt1DHisto(TitNum,title,nbins,QinvLo,QinvHi);
54 char TitDen[100] =
"Den";
56 mDenominator =
new StHbt1DHisto(TitDen,title,nbins,QinvLo,QinvHi);
59 char TitRat[100] =
"Rat";
61 mRatio =
new StHbt1DHisto(TitRat,title,nbins,QinvLo,QinvHi);
70 mDenominator->Sumw2();
76 QinvCorrFctn::~QinvCorrFctn(){
82 void QinvCorrFctn::Finish(){
90 mRatio->Divide(mNumerator,mDenominator,1.0,1.0);
95 StHbtString QinvCorrFctn::Report(){
96 string stemp =
"Qinv Correlation Function Report:\n";
98 sprintf(ctemp,
"Number of entries in numerator:\t%E\n",mNumerator->GetEntries());
100 sprintf(ctemp,
"Number of entries in denominator:\t%E\n",mDenominator->GetEntries());
102 sprintf(ctemp,
"Number of entries in ratio:\t%E\n",mRatio->GetEntries());
105 StHbtString returnThis = stemp;
109 void QinvCorrFctn::AddRealPair(
const StHbtPair* pair){
110 double Qinv = fabs(pair->qInv());
111 mNumerator->Fill(Qinv);
116 void QinvCorrFctn::AddMixedPair(
const StHbtPair* pair){
118 double Qinv = fabs(pair->qInv());
119 mDenominator->Fill(Qinv,weight);