40 #include "StHbtMaker/CorrFctn/QvecCorrFctn.h"
52 QvecCorrFctn::QvecCorrFctn(
char* title,
const int& nbins,
const float& QinvLo,
const float& QinvHi){
55 char TitNum[100] =
"Num";
57 mNumerator =
new StHbt1DHisto(TitNum,title,nbins,QinvLo,QinvHi);
60 char TitDen[100] =
"Den";
62 mDenominator =
new StHbt1DHisto(TitDen,title,nbins,QinvLo,QinvHi);
65 char TitRat[100] =
"Rat";
67 mRatio =
new StHbt1DHisto(TitRat,title,nbins,QinvLo,QinvHi);
76 mDenominator->Sumw2();
83 QvecCorrFctn::~QvecCorrFctn(){
89 void QvecCorrFctn::Finish(){
96 int mTop = (int)mNumerator->GetBinContent(52);
97 int mBottom = (int)mDenominator->GetBinContent(52);
98 mRatio->Divide(mNumerator,mDenominator,mBottom,mTop,
"PE");
103 StHbtString QvecCorrFctn::Report(){
104 string stemp =
"Qvec Correlation Function Report:\n";
106 sprintf(ctemp,
"Number of entries in numerator:\t%E\n",mNumerator->GetEntries());
108 sprintf(ctemp,
"Number of entries in denominator:\t%E\n",mDenominator->GetEntries());
110 sprintf(ctemp,
"Number of entries in ratio:\t%E\n",mRatio->GetEntries());
113 StHbtString returnThis = stemp;
117 void QvecCorrFctn::AddRealPair(
const StHbtPair* pair){
118 double Q = fabs(pair->fourMomentumDiff().vect().mag());
122 void QvecCorrFctn::AddMixedPair(
const StHbtPair* pair){
124 double Q = fabs(pair->fourMomentumDiff().vect().mag());
125 mDenominator->Fill(Q,weight);