13 #include "StHbtMaker/CorrFctn/EntranceSepCorrFctn.h"
22 EntranceSepCorrFctn::EntranceSepCorrFctn(
char* title,
const int& nbinsQ,
const float& QLo,
const float& QHi,
23 const int& nbinsExSep,
const float& ExSepLo,
const float& ExSepHi){
26 sprintf(Tit,
"2D Num");
28 mNumerator2D =
new StHbt2DHisto(Tit,title,nbinsQ,QLo,QHi,nbinsExSep,ExSepLo,ExSepHi);
31 sprintf(Tit,
"2D Den");
33 mDenominator2D =
new StHbt2DHisto(Tit,title,nbinsQ,QLo,QHi,nbinsExSep,ExSepLo,ExSepHi);
36 sprintf(Tit,
"2D Rat");
38 mRatio2D =
new StHbt2DHisto(Tit,title,nbinsQ,QLo,QHi,nbinsExSep,ExSepLo,ExSepHi);
41 mNumerator2D->Sumw2();
42 mDenominator2D->Sumw2();
48 EntranceSepCorrFctn::~EntranceSepCorrFctn(){
50 delete mDenominator2D;
54 void EntranceSepCorrFctn::Finish(){
55 mRatio2D->Divide(mNumerator2D,mDenominator2D,1.0,1.0);
59 StHbtString EntranceSepCorrFctn::Report(){
60 string stemp =
"Entrance Seperation Correlation Function Report:\n";
62 sprintf(ctemp,
"Number of entries in numerator:\t%E\n",
63 mNumerator2D->GetEntries());
65 sprintf(ctemp,
"Number of entries in denominator:\t%E\n",
66 mDenominator2D->GetEntries());
68 StHbtString returnThis = stemp;
72 void EntranceSepCorrFctn::AddRealPair(
const StHbtPair* pair){
81 double entSep = pair->NominalTpcEntranceSeparation();
82 double Qinv = fabs(pair->qInv());
84 mNumerator2D->Fill(Qinv,entSep,1.0);
87 void EntranceSepCorrFctn::AddMixedPair(
const StHbtPair* pair){
89 double entSep = pair->NominalTpcEntranceSeparation();
90 double Qinv = fabs(pair->qInv());
92 mDenominator2D->Fill(Qinv,entSep,1.0);