13 #include "StHbtMaker/CorrFctn/QvecQualCorrFctn.h"
20 QvecQualCorrFctn:: QvecQualCorrFctn(
char* title,
const int& nbinsQ,
const float& QLo,
const float& QHi,
21 const int& nbinsQual,
const float& QualLo,
const float& QualHi){
26 mNumerator2D =
new StHbt2DHisto(Tit,title,nbinsQ,QLo,QHi,nbinsQual,QualLo,QualHi);
31 mDenominator2D =
new StHbt2DHisto(Tit,title,nbinsQ,QLo,QHi,nbinsQual,QualLo,QualHi);
36 mRatio2D =
new StHbt2DHisto(Tit,title,nbinsQ,QLo,QHi,nbinsQual,QualLo,QualHi);
39 mNumerator2D->Sumw2();
40 mDenominator2D->Sumw2();
46 QvecQualCorrFctn::~QvecQualCorrFctn(){
48 delete mDenominator2D;
52 void QvecQualCorrFctn::Finish(){
57 mRatio2D->Divide(mNumerator2D,mDenominator2D,1.0,1.0);
61 StHbtString QvecQualCorrFctn::Report(){
62 string stemp =
"Qvector-QualityFactor 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 QvecQualCorrFctn::AddRealPair(
const StHbtPair* pair){
76 double Qual = pair->quality();
77 double Q = fabs(pair->fourMomentumDiff().vect().mag());
79 mNumerator2D->Fill(Q,Qual,1.0);
82 void QvecQualCorrFctn::AddMixedPair(
const StHbtPair* pair){
84 double Qual = pair->quality();
85 double Q = fabs(pair->fourMomentumDiff().vect().mag());
87 mDenominator2D->Fill(Q,Qual,1.0);