21 #include "StHbtMaker/CorrFctn/MinvCorrFctnM_vs_Phi.h"
30 MinvCorrFctnM_vs_Phi::MinvCorrFctnM_vs_Phi(
char* title,
31 const int& nbins1,
const float& MinvLo1,
const float& MinvHi1,
32 const int& nbins2,
const float& MinvLo2,
const float& MinvHi2){
35 const char* TitNum =
"MinvCorrFctnM_vs_Phi_Num";
36 sprintf(theTitle,
"Num %s",title);
37 mNumerator =
new StHbt2DHisto(TitNum,theTitle,nbins1,MinvLo1,MinvHi1,nbins2,MinvLo2,MinvHi2);
39 const char* TitDen =
"MinvCorrFctnM_vs_Phi_Den";
40 sprintf(theTitle,
"Den %s",title);
41 mDenominator =
new StHbt2DHisto(TitDen,theTitle,nbins1,MinvLo1,MinvHi1,nbins2,MinvLo2,MinvHi2);
43 const char* TitDif =
"MinvCorrFctnM_vs_Phi_Dif";
44 sprintf(theTitle,
"Dif %s",title);
45 mDifference =
new StHbt2DHisto(TitDif,theTitle,nbins1,MinvLo1,MinvHi1,nbins2,MinvLo2,MinvHi2);
50 mDenominator->Sumw2();
53 mNumerator->SetDirectory(0);
54 mDenominator->SetDirectory(0);
55 mDifference->SetDirectory(0);
60 MinvCorrFctnM_vs_Phi::~MinvCorrFctnM_vs_Phi(){
66 void MinvCorrFctnM_vs_Phi::Finish(){
74 double NumeratorInt = mNumerator->Integral();
75 double DenominatorInt = mDenominator->Integral();
76 mDifference->Add(mNumerator,mDenominator,1.0,-1*NumeratorInt/DenominatorInt);
81 StHbtString MinvCorrFctnM_vs_Phi::Report(){
82 string stemp =
"Minv Correlation Function Report:\n";
84 sprintf(ctemp,
"Number of entries in numerator:\t%E\n",mNumerator->GetEntries());
86 sprintf(ctemp,
"Number of entries in denominator:\t%E\n",mDenominator->GetEntries());
88 sprintf(ctemp,
"Number of entries in difference:\t%E\n",mDifference->GetEntries());
90 StHbtString returnThis = stemp;
94 void MinvCorrFctnM_vs_Phi::AddRealPair(
const StHbtPair* pair){
95 mNumerator->Fill( pair->mInv(), pair->fourMomentumSum().vect().phi(), 1.);
98 void MinvCorrFctnM_vs_Phi::AddMixedPair(
const StHbtPair* pair){
99 mDenominator->Fill( pair->mInv(), pair->fourMomentumSum().vect().phi(), 1.);