45 #include "StHbtMaker/CorrFctn/QinvCorrFctnC.h"
54 QinvCorrFctnC::QinvCorrFctnC(
char* title,
const int& nbins,
const float& QinvLo,
const float& QinvHi){
57 char TitNum[100] =
"Num";
59 mNumerator =
new StHbt1DHisto(TitNum,title,nbins,QinvLo,QinvHi);
62 char TitDen[100] =
"Den";
64 mDenominator =
new StHbt1DHisto(TitDen,title,nbins,QinvLo,QinvHi);
67 char TitRat[100] =
"Rat";
69 mRatio =
new StHbt1DHisto(TitRat,title,nbins,QinvLo,QinvHi);
78 mDenominator->Sumw2();
84 QinvCorrFctnC::~QinvCorrFctnC(){
90 void QinvCorrFctnC::Finish(){
98 double qInvTop = mNumerator->GetBinContent(50);
99 double qInvBottom = mDenominator->GetBinContent(50);
100 mRatio->Divide(mNumerator,mDenominator,qInvBottom,qInvTop);
104 StHbtString QinvCorrFctnC::Report(){
105 string stemp =
"Qinv Coulomb corrected Correlation Function Report:\n";
107 sprintf(ctemp,
"Number of entries in numerator:\t%E\n",mNumerator->GetEntries());
109 sprintf(ctemp,
"Number of entries in denominator:\t%E\n",mDenominator->GetEntries());
111 sprintf(ctemp,
"Number of entries in ratio:\t%E\n",mRatio->GetEntries());
114 StHbtString returnThis = stemp;
118 void QinvCorrFctnC::AddRealPair(
const StHbtPair* pair){
119 double Qinv = fabs(pair->qInv());
120 mNumerator->Fill(Qinv);
125 void QinvCorrFctnC::AddMixedPair(
const StHbtPair* pair){
126 double Qinv = fabs(pair->qInv());
129 double weight = mCorrection.CoulombCorrect(pair);
130 mDenominator->Fill(Qinv,weight);
133 void QinvCorrFctnC::AddCorrection(
const StHbtCoulomb* coulomb) {
134 mCorrection = *coulomb;