20 #include "StHbtMaker/CorrFctn/QinvCorrFctnPidProbWeight.h"
29 QinvCorrFctnPidProbWeight::QinvCorrFctnPidProbWeight(
char* title1,
char* title2,
const int& nbins,
const float& QinvLo,
const float& QinvHi){
32 char TitNum[100] =
"Num";
33 strcat(TitNum,title1);
34 mNumerator =
new StHbt1DHisto(TitNum,title2,nbins,QinvLo,QinvHi);
37 char TitDen[100] =
"Den";
38 strcat(TitDen,title1);
39 mDenominator =
new StHbt1DHisto(TitDen,title2,nbins,QinvLo,QinvHi);
42 char TitRat[100] =
"Rat";
43 strcat(TitRat,title1);
44 mRatio =
new StHbt1DHisto(TitRat,title2,nbins,QinvLo,QinvHi);
53 mDenominator->Sumw2();
59 QinvCorrFctnPidProbWeight::~QinvCorrFctnPidProbWeight(){
65 void QinvCorrFctnPidProbWeight::Finish(){
73 mRatio->Divide(mNumerator,mDenominator,1.0,1.0);
78 StHbtString QinvCorrFctnPidProbWeight::Report(){
79 string stemp =
"Qinv Correlation Function Report:\n";
81 sprintf(ctemp,
"Number of entries in numerator:\t%E\n",mNumerator->GetEntries());
83 sprintf(ctemp,
"Number of entries in denominator:\t%E\n",mDenominator->GetEntries());
85 sprintf(ctemp,
"Number of entries in ratio:\t%E\n",mRatio->GetEntries());
88 StHbtString returnThis = stemp;
92 void QinvCorrFctnPidProbWeight::AddRealPair(
const StHbtPair* pair){
93 mNumerator->Fill(pair->qInv(),pair->track1()->Track()->PidProbKaon()*pair->track2()->Track()->PidProbKaon());
96 void QinvCorrFctnPidProbWeight::AddMixedPair(
const StHbtPair* pair){
97 mDenominator->Fill(pair->qInv(),pair->track1()->Track()->PidProbKaon()*pair->track2()->Track()->PidProbKaon());