20 #include "StHbtMaker/CorrFctn/AverageSepCorrFctn.h"
29 AverageSepCorrFctn::AverageSepCorrFctn(
char* title,
const int& nbinsQ,
const float& QLo,
const float& QHi,
30 const int& nbinsExSep,
const float& ExSepLo,
const float& ExSepHi){
35 mNumerator2D =
new StHbt2DHisto(Tit,title,nbinsQ,QLo,QHi,nbinsExSep,ExSepLo,ExSepHi);
40 mDenominator2D =
new StHbt2DHisto(Tit,title,nbinsQ,QLo,QHi,nbinsExSep,ExSepLo,ExSepHi);
45 mRatio2D =
new StHbt2DHisto(Tit,title,nbinsQ,QLo,QHi,nbinsExSep,ExSepLo,ExSepHi);
48 mNumerator2D->Sumw2();
49 mDenominator2D->Sumw2();
55 AverageSepCorrFctn::~AverageSepCorrFctn(){
57 delete mDenominator2D;
61 void AverageSepCorrFctn::Finish(){
62 mRatio2D->Divide(mNumerator2D,mDenominator2D,1.0,1.0);
66 StHbtString AverageSepCorrFctn::Report(){
67 string stemp =
"Average Seperation Correlation Function Report:\n";
69 sprintf(ctemp,
"Number of entries in numerator:\t%E\n",
70 mNumerator2D->GetEntries());
72 sprintf(ctemp,
"Number of entries in denominator:\t%E\n",
73 mDenominator2D->GetEntries());
75 StHbtString returnThis = stemp;
79 void AverageSepCorrFctn::AddRealPair(
const StHbtPair* pair){
88 double aveSep = pair->NominalTpcAverageSeparation();
89 double Qinv = fabs(pair->qInv());
91 mNumerator2D->Fill(Qinv,aveSep,1.0);
94 void AverageSepCorrFctn::AddMixedPair(
const StHbtPair* pair){
96 double aveSep = pair->NominalTpcAverageSeparation();
97 double Qinv = fabs(pair->qInv());
99 mDenominator2D->Fill(Qinv,aveSep,1.0);