26 #include "StHbtMaker/CorrFctn/MinvCorrFctnM_vs_Pt.h"
35 MinvCorrFctnM_vs_Pt::MinvCorrFctnM_vs_Pt(
char* title,
36 const int& nbins1,
const float& MinvLo1,
const float& MinvHi1,
37 const int& nbins2,
const float& MinvLo2,
const float& MinvHi2){
40 const char* TitNum =
"MinvCorrFctnM_vs_Pt_Num";
41 sprintf(theTitle,
"Num %s",title);
42 mNumerator =
new StHbt2DHisto(TitNum,theTitle,nbins1,MinvLo1,MinvHi1,nbins2,MinvLo2,MinvHi2);
44 const char* TitDen =
"MinvCorrFctnM_vs_Pt_Den";
45 sprintf(theTitle,
"Den %s",title);
46 mDenominator =
new StHbt2DHisto(TitDen,theTitle,nbins1,MinvLo1,MinvHi1,nbins2,MinvLo2,MinvHi2);
48 const char* TitDif =
"MinvCorrFctnM_vs_Pt_Dif";
49 sprintf(theTitle,
"Dif %s",title);
50 mDifference =
new StHbt2DHisto(TitDif,theTitle,nbins1,MinvLo1,MinvHi1,nbins2,MinvLo2,MinvHi2);
53 mNumerator->SetDirectory(0);
54 mDenominator->SetDirectory(0);
55 mDifference->SetDirectory(0);
59 MinvCorrFctnM_vs_Pt::~MinvCorrFctnM_vs_Pt(){
65 void MinvCorrFctnM_vs_Pt::Finish(){
73 double NumeratorInt = mNumerator->Integral();
74 double DenominatorInt = mDenominator->Integral();
75 mDifference->Add(mNumerator,mDenominator,1.0,-1*NumeratorInt/DenominatorInt);
80 StHbtString MinvCorrFctnM_vs_Pt::Report(){
81 string stemp =
"Minv Correlation Function Report:\n";
83 sprintf(ctemp,
"Number of entries in numerator:\t%E\n",mNumerator->GetEntries());
85 sprintf(ctemp,
"Number of entries in denominator:\t%E\n",mDenominator->GetEntries());
87 sprintf(ctemp,
"Number of entries in difference:\t%E\n",mDifference->GetEntries());
89 StHbtString returnThis = stemp;
93 void MinvCorrFctnM_vs_Pt::AddRealPair(
const StHbtPair* pair){
94 mNumerator->Fill( pair->mInv(), pair->fourMomentumSum().vect().perp(), 1.);
97 void MinvCorrFctnM_vs_Pt::AddMixedPair(
const StHbtPair* pair){
98 mDenominator->Fill( pair->mInv(), pair->fourMomentumSum().vect().perp(), 1.);