13 #include "StHbtMaker/CorrFctn/OpeningAngleCorrFctn.h"
20 OpeningAngleCorrFctn:: OpeningAngleCorrFctn(
char* title,
const int& nbinsQ,
const float& QLo,
const float& QHi,
21 const int& nbinsAng,
const float& AngLo,
const float& AngHi){
24 sprintf(Tit,
"2D Num");
26 mNumerator2D =
new StHbt2DHisto(Tit,title,nbinsQ,QLo,QHi,nbinsAng,AngLo,AngHi);
29 sprintf(Tit,
"2D Den");
31 mDenominator2D =
new StHbt2DHisto(Tit,title,nbinsQ,QLo,QHi,nbinsAng,AngLo,AngHi);
34 sprintf(Tit,
"2D Rat");
36 mRatio2D =
new StHbt2DHisto(Tit,title,nbinsQ,QLo,QHi,nbinsAng,AngLo,AngHi);
39 mNumerator2D->Sumw2();
40 mDenominator2D->Sumw2();
46 OpeningAngleCorrFctn::~OpeningAngleCorrFctn(){
48 delete mDenominator2D;
52 void OpeningAngleCorrFctn::Finish(){
57 mRatio2D->Divide(mNumerator2D,mDenominator2D,1.0,1.0);
61 StHbtString OpeningAngleCorrFctn::Report(){
62 string stemp =
"Opening Angle 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 OpeningAngleCorrFctn::AddRealPair(
const StHbtPair* pair){
85 double dAngInv = 57.296*acos((p1.dot(p2))/(p1.mag()*p2.mag()));
87 double Qinv = fabs(pair->qInv());
89 mNumerator2D->Fill(Qinv,dAngInv,1.0);
92 void OpeningAngleCorrFctn::AddMixedPair(
const StHbtPair* pair){
103 double dAngInv = 57.296*acos((p1.dot(p2))/(p1.mag()*p2.mag()));
104 double Qinv = fabs(pair->qInv());
106 mDenominator2D->Fill(Qinv,dAngInv,1.0);