16 #include "StHbtMaker/CorrFctn/Trk2CorrFctn.h"
24 Trk2CorrFctn::Trk2CorrFctn(
char* title){
25 mNumFracRowClosestRow =
new StHbt2DHisto(
"NumFC",
"NumFC",45,1.,46.,
27 mDenFracRowClosestRow =
new StHbt2DHisto(
"DenFC",
"DenFC",45,1.,46.,
29 mRatFracRowClosestRow =
new StHbt2DHisto(
"RatFC",
"RatFC",45,1.,46.,
34 Trk2CorrFctn::~Trk2CorrFctn(){
35 delete mNumFracRowClosestRow;
36 delete mDenFracRowClosestRow;
37 delete mRatFracRowClosestRow;
40 void Trk2CorrFctn::Finish(){
41 mRatFracRowClosestRow->Divide(mNumFracRowClosestRow,
42 mDenFracRowClosestRow,
43 mDenFracRowClosestRow->Integral(),
44 mNumFracRowClosestRow->Integral());
47 void Trk2CorrFctn::Write(){
48 mNumFracRowClosestRow->Write();
49 mDenFracRowClosestRow->Write();
50 mRatFracRowClosestRow->Write();
54 StHbtString Trk2CorrFctn::Report(){
55 string stemp =
"Qinv Correlation Function Report:\n";
57 sprintf(ctemp,
"Number of entries in numerator:\t%E\n",mNumFracRowClosestRow->GetEntries());
59 sprintf(ctemp,
"Number of entries in denominator:\t%E\n",mDenFracRowClosestRow->GetEntries());
61 sprintf(ctemp,
"Number of entries in ratio:\t%E\n",mRatFracRowClosestRow->GetEntries());
63 StHbtString returnThis = stemp;
67 void Trk2CorrFctn::AddRealPair(
const StHbtPair* pair){
68 mNumFracRowClosestRow->Fill(pair->getClosestRowAtDCA(),
69 pair->getFracOfMergedRow(),1.);
73 void Trk2CorrFctn::AddMixedPair(
const StHbtPair* pair){
74 mDenFracRowClosestRow->Fill(pair->getClosestRowAtDCA(),
75 pair->getFracOfMergedRow(),1.);