13 #include "StHbtMaker/CorrFctn/mTmTCorrFctn.h"
20 mTmTCorrFctn:: mTmTCorrFctn(
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 mTmTCorrFctn::~mTmTCorrFctn(){
48 delete mDenominator2D;
52 void mTmTCorrFctn::Finish(){
57 mRatio2D->Divide(mNumerator2D,mDenominator2D,1.0,1.0);
61 StHbtString mTmTCorrFctn::Report(){
62 string stemp =
"This is the mT-mT 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 mTmTCorrFctn::AddRealPair(
const StHbtPair* pair){
76 double mT1 = pair->track1()->FourMomentum().mt() - pair->track1()->FourMomentum().m();
77 double mT2 = pair->track2()->FourMomentum().mt() - pair->track2()->FourMomentum().m();
79 mNumerator2D->Fill(mT1,mT2,1.0);
82 void mTmTCorrFctn::AddMixedPair(
const StHbtPair* pair){
84 double mT1 = pair->track1()->FourMomentum().mt() - pair->track1()->FourMomentum().m();
85 double mT2 = pair->track2()->FourMomentum().mt() - pair->track2()->FourMomentum().m();
87 mDenominator2D->Fill(mT1,mT2,1.0);