20 #include "StHbtMaker/CorrFctn/EntSep_pTCorrFctn.h"
29 EntSep_pTCorrFctn::EntSep_pTCorrFctn(
char* title,
const int& nbinsQ,
const float& QLo,
const float& QHi,
30 const int& nbinsExSep,
const float& ExSepLo,
const float& ExSepHi){
33 sprintf(Tit,
"2D Num");
35 mNumerator2D =
new StHbt2DHisto(Tit,title,nbinsQ,QLo,QHi,nbinsExSep,ExSepLo,ExSepHi);
38 sprintf(Tit,
"2D Den");
40 mDenominator2D =
new StHbt2DHisto(Tit,title,nbinsQ,QLo,QHi,nbinsExSep,ExSepLo,ExSepHi);
43 sprintf(Tit,
"2D Rat");
45 mRatio2D =
new StHbt2DHisto(Tit,title,nbinsQ,QLo,QHi,nbinsExSep,ExSepLo,ExSepHi);
48 mNumerator2D->Sumw2();
49 mDenominator2D->Sumw2();
55 EntSep_pTCorrFctn::~EntSep_pTCorrFctn(){
57 delete mDenominator2D;
61 void EntSep_pTCorrFctn::Finish(){
62 mRatio2D->Divide(mNumerator2D,mDenominator2D,1.0,1.0);
66 StHbtString EntSep_pTCorrFctn::Report(){
67 string stemp =
"EntSep_pT 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 EntSep_pTCorrFctn::AddRealPair(
const StHbtPair* pair){
82 double entSep = pair->NominalTpcEntranceSeparation();
84 double kT = pair->kT();
86 mNumerator2D->Fill(entSep,kT,1.0);
89 void EntSep_pTCorrFctn::AddMixedPair(
const StHbtPair* pair){
91 double entSep = pair->NominalTpcEntranceSeparation();
93 double kT = pair->kT();
95 mDenominator2D->Fill(entSep,kT,1.0);