15 #include "StHbtMaker/CorrFctn/QinvQualAvSepCorrFctn.h"
22 QinvQualAvSepCorrFctn::QinvQualAvSepCorrFctn(
char* title,
const int& nbinsQ,
const float& QLo,
const float& QHi,
23 const int& nbinsQual,
const float& QualLo,
const float& QualHi,
24 const int& nbinsSep,
const float& SepLo,
const float& SepHi) {
29 mNumerator3D =
new StHbt3DHisto(Tit,title,nbinsQ,QLo,QHi,nbinsQual,QualLo,QualHi,nbinsSep,SepLo,SepHi);
34 mDenominator3D =
new StHbt3DHisto(Tit,title,nbinsQ,QLo,QHi,nbinsQual,QualLo,QualHi,nbinsSep,SepLo,SepHi);
39 mRatio3D =
new StHbt3DHisto(Tit,title,nbinsQ,QLo,QHi,nbinsQual,QualLo,QualHi,nbinsSep,SepLo,SepHi);
42 mNumerator3D->Sumw2();
43 mDenominator3D->Sumw2();
49 QinvQualAvSepCorrFctn::~QinvQualAvSepCorrFctn(){
51 delete mDenominator3D;
55 void QinvQualAvSepCorrFctn::Finish(){
60 mRatio3D->Divide(mNumerator3D,mDenominator3D,1.0,1.0);
64 StHbtString QinvQualAvSepCorrFctn::Report(){
65 string stemp =
"Qinv-QualityFactor Correlation Function Report:\n";
67 sprintf(ctemp,
"Number of entries in numerator:\t%E\n",
68 mNumerator3D->GetEntries());
70 sprintf(ctemp,
"Number of entries in denominator:\t%E\n",
71 mDenominator3D->GetEntries());
73 StHbtString returnThis = stemp;
77 void QinvQualAvSepCorrFctn::AddRealPair(
const StHbtPair* pair){
79 double Qual = pair->quality();
80 double AvSep = pair->NominalTpcAverageSeparation();
81 double Q = fabs(pair->qInv());
83 mNumerator3D->Fill(Q,Qual,AvSep,1.0);
86 void QinvQualAvSepCorrFctn::AddMixedPair(
const StHbtPair* pair){
88 double Qual = pair->quality();
89 double AvSep = pair->NominalTpcAverageSeparation();
90 double Q = fabs(pair->qInv());
92 mDenominator3D->Fill(Q,Qual,AvSep,1.0);