13 #include "StHbtMaker/CorrFctn/ExitSepCorrFctn.h"
24 ExitSepCorrFctn::ExitSepCorrFctn(
char* title,
const int& nbinsQ,
const float& QLo,
const float& QHi,
25 const int& nbinsExSep,
const float& ExSepLo,
const float& ExSepHi){
28 sprintf(Tit,
"2D Num");
30 mNumerator2D =
new StHbt2DHisto(Tit,title,nbinsQ,QLo,QHi,nbinsExSep,ExSepLo,ExSepHi);
33 sprintf(Tit,
"2D Den");
35 mDenominator2D =
new StHbt2DHisto(Tit,title,nbinsQ,QLo,QHi,nbinsExSep,ExSepLo,ExSepHi);
38 sprintf(Tit,
"2D Rat");
40 mRatio2D =
new StHbt2DHisto(Tit,title,nbinsQ,QLo,QHi,nbinsExSep,ExSepLo,ExSepHi);
43 mNumerator2D->Sumw2();
44 mDenominator2D->Sumw2();
50 ExitSepCorrFctn::~ExitSepCorrFctn(){
52 delete mDenominator2D;
56 void ExitSepCorrFctn::Finish(){
57 mRatio2D->Divide(mNumerator2D,mDenominator2D,1.0,1.0);
61 StHbtString ExitSepCorrFctn::Report(){
62 string stemp =
"Exit Seperation Correlation Function Report:\n";
64 sprintf(ctemp,
"Number of entries in numerator:\t%E\n",
65 mNumerator2D->GetEntries());
67 sprintf(ctemp,
"Number of entries in denominator:\t%E\n",
68 mDenominator2D->GetEntries());
70 StHbtString returnThis = stemp;
74 void ExitSepCorrFctn::AddRealPair(
const StHbtPair* pair){
83 double exitSep = pair->NominalTpcExitSeparation();
84 double Qinv = fabs(pair->qInv());
86 mNumerator2D->Fill(Qinv,exitSep,1.0);
89 void ExitSepCorrFctn::AddMixedPair(
const StHbtPair* pair){
91 double exitSep = pair->NominalTpcExitSeparation();
92 double Qinv = fabs(pair->qInv());
94 mDenominator2D->Fill(Qinv,exitSep,1.0);