17 #include "StHbtMaker/Cut/adamsPairCut.h"
28 mNPairsPassed = mNPairsFailed = 0;
42 bool adamsPairCut::Pass(
const StHbtPair* pair){
43 bool isElPair, isPiPair, isKPair;
45 if (pair->track1()->Track()->P().mag() < mPIDPThreshold)
47 bool is1El = (TMath::Abs(pair->track1()->Track()->NSigmaElectron()) < mElSigma);
48 bool is1Pi = (TMath::Abs(pair->track1()->Track()->NSigmaPion()) < mPiSigma);
49 bool is1K = (TMath::Abs(pair->track1()->Track()->NSigmaKaon()) < mKSigma);
50 if (pair->track2()->Track()->P().mag() < mPIDPThreshold)
52 isElPair = is1El && (TMath::Abs(pair->track2()->Track()->NSigmaElectron()) < mElSigma);
53 isPiPair = is1Pi && (TMath::Abs(pair->track2()->Track()->NSigmaPion()) < mPiSigma);
54 isKPair = is1K && (TMath::Abs(pair->track2()->Track()->NSigmaKaon()) < mKSigma);
58 isElPair = is1El && (pair->track2()->Track()->PidProbElectron() <= mElPIDMax);
59 isPiPair = is1Pi && (pair->track2()->Track()->PidProbPion() <= mPiPIDMax);
60 isKPair = is1K && (pair->track2()->Track()->PidProbKaon() <= mKPIDMax);
65 if (pair->track2()->Track()->P().mag() < mPIDPThreshold)
67 bool is2El = (TMath::Abs(pair->track2()->Track()->NSigmaElectron()) < mElSigma);
68 bool is2Pi = (TMath::Abs(pair->track2()->Track()->NSigmaPion()) < mPiSigma);
69 bool is2K = (TMath::Abs(pair->track2()->Track()->NSigmaKaon()) < mKSigma);
70 isElPair = is2El && (pair->track1()->Track()->PidProbElectron() <= mElPIDMax);
71 isPiPair = is2Pi && (pair->track1()->Track()->PidProbPion() <= mPiPIDMax);
72 isKPair = is2K && (pair->track1()->Track()->PidProbKaon() <= mKPIDMax);
76 isElPair = (pair->track1()->Track()->PidProbElectron() * pair->track2()->Track()->PidProbElectron()) < mElPIDMax;
77 isPiPair = (pair->track1()->Track()->PidProbPion() * pair->track2()->Track()->PidProbPion()) < mPiPIDMax;
78 isKPair = (pair->track1()->Track()->PidProbKaon() * pair->track2()->Track()->PidProbKaon()) < mKPIDMax;
81 bool temp = ( pair->track1()->TrackId()!=pair->track2()->TrackId() &&
85 pair->getFracOfMergedRow()<mMaxFracPair
87 temp ? mNPairsPassed++ : mNPairsFailed++;
91 StHbtString adamsPairCut::Report(){
92 string Stemp =
"Adams Pair Cut - cut on e+e- pi+pi+ K+K- using NSigma\n";
94 sprintf(Ctemp,
"Number of pairs which passed:\t%ld Number which failed:\t%ld\n",mNPairsPassed,mNPairsFailed);
96 StHbtString returnThis = Stemp;
100 std::ostringstream* adamsPairCut::finalReport()
const{
101 std::ostringstream* tFinalReport =
new std::ostringstream;
102 (*tFinalReport) <<
"_____ Adams pair Cut _____ " << endl
103 <<
" N pairs passed : " << mNPairsPassed << endl
104 <<
" N pairs failed : " << mNPairsFailed << endl