23 #include "StHbtMaker/CorrFctn/Q3invCorrFctn.h"
30 Q3invCorrFctn::
Q3invCorrFctn(
char* title, const
int& nbinsQ, const
float& QinvLo, const
float& QinvHi, const
int& nbinsMerge, const
float& MergeLo, const
float& MergeHi, const
float& Split){
36 char TitNum[100] =
"Num";
38 mNumerator =
new StHbt2DHisto(TitNum,title,nbinsQ,QinvLo,QinvHi,nbinsMerge,MergeLo,MergeHi);
41 char TitDen[100] =
"Den";
43 mDenominator =
new StHbt2DHisto(TitDen,title,nbinsQ,QinvLo,QinvHi,nbinsMerge,MergeLo,MergeHi);
46 char TitRat[100] =
"Rat";
48 mRatio =
new StHbt2DHisto(TitRat,title,nbinsQ,QinvLo,QinvHi,nbinsMerge,MergeLo,MergeHi);
57 mDenominator->Sumw2();
63 Q3invCorrFctn::~Q3invCorrFctn(){
70 void Q3invCorrFctn::Finish(){
71 mRatio->Divide(mNumerator,mDenominator,1.0,1.0);
75 StHbtString Q3invCorrFctn::Report(){
76 string stemp =
"Q3inv Correlation Function Report:\n";
78 sprintf(ctemp,
"Number of entries in numerator:\t%E\n",mNumerator->GetEntries());
80 sprintf(ctemp,
"Number of entries in denominator:\t%E\n",mDenominator->GetEntries());
82 sprintf(ctemp,
"Number of entries in ratio:\t%E\n",mRatio->GetEntries());
85 StHbtString returnThis = stemp;
89 void Q3invCorrFctn::AddRealTriplet(
const StHbtTriplet* triplet){
91 mPHist->Fill(triplet->track1()->Track()->P().mag());
92 mPHist->Fill(triplet->track2()->Track()->P().mag());
93 mPHist->Fill(triplet->track3()->Track()->P().mag());
95 double Qual = triplet->quality();
96 double entSep = triplet->NominalTpcEntranceSeparation();
97 double Q3inv = fabs(triplet->qInv());
98 if (Qual<mSplit) mNumerator->Fill(Q3inv, entSep, 1.0);
102 void Q3invCorrFctn::AddMixedTriplet(
const StHbtTriplet* triplet){
104 if (mCorrection.GetRadius()!=-1) {
105 StHbtPair pair1(triplet->track1(), triplet->track2());
106 StHbtPair pair2(triplet->track2(), triplet->track3());
107 StHbtPair pair3(triplet->track3(), triplet->track1());
109 double weight1 = mCorrection.CoulombCorrect(&pair1);
110 double weight2 = mCorrection.CoulombCorrect(&pair2);
111 double weight3 = mCorrection.CoulombCorrect(&pair3);
113 weight = weight1*weight2*weight3;
118 double Qual = triplet->quality();
119 double entSep = triplet->NominalTpcEntranceSeparation();
120 double Q3inv = fabs(triplet->qInv());
121 if (Qual<mSplit) mDenominator->Fill(Q3inv, entSep, weight);
124 void Q3invCorrFctn::AddCorrection(
StHbtCoulomb* correction) {
125 mCorrection = *correction;