14 #include "StFlowSelection.h"
15 #include "StFlowEvent.h"
16 #include "StFlowTrack.h"
17 #define PR(x) cout << "##### FlowSelection: " << (#x) << " = " << (x) << endl;
38 mFitOverMaxPtsPart[0] = 0.;
39 mFitOverMaxPtsPart[1] = 0.;
42 mDcaGlobalPart[0] = 0.;
43 mDcaGlobalPart[1] = 2.;
50 StFlowSelection::~StFlowSelection() {
55 Bool_t StFlowSelection::Select(
StFlowEvent* pFlowEvent) {
63 Bool_t StFlowSelection::Select(
StFlowTrack* pFlowTrack) {
68 if (!pFlowTrack->Select(mHarmonic, mSelection, mSubevent))
return kFALSE;
75 Bool_t StFlowSelection::SelectPart(
StFlowTrack* pFlowTrack) {
80 if (mPidPart[0] !=
'\0') {
81 if (strstr(mPidPart,
"h")!=0) {
82 int charge = pFlowTrack->Charge();
83 if (strcmp(
"h+", mPidPart)==0 && charge != 1)
return kFALSE;
84 if (strcmp(
"h-", mPidPart)==0 && charge != -1)
return kFALSE;
86 const Char_t* pid = pFlowTrack->Pid();
87 if (strstr(pid, mPidPart)==0)
return kFALSE;
92 float pt = pFlowTrack->Pt();
93 if (mPtPart[1] > mPtPart[0] &&
94 (pt < mPtPart[0] || pt >= mPtPart[1]))
return kFALSE;
97 float totalp = pFlowTrack->P();
98 if (mPPart[1] > mPPart[0] &&
99 (totalp < mPPart[0] || totalp >= mPPart[1]))
return kFALSE;
102 float eta = pFlowTrack->Eta();
103 if (mEtaPart[1] > mEtaPart[0] &&
104 (eta < mEtaPart[0] || eta >= mEtaPart[1]))
return kFALSE;
107 int fitPts = pFlowTrack->FitPts();
108 if (mFitPtsPart[1] > mFitPtsPart[0] &&
109 (fitPts < mFitPtsPart[0] || fitPts >= mFitPtsPart[1]))
return kFALSE;
112 int dedxPts = pFlowTrack->NdedxPts();
113 if (mDedxPtsPart[1] > mDedxPtsPart[0] &&
114 (dedxPts < mDedxPtsPart[0] || dedxPts >= mDedxPtsPart[1]))
return kFALSE;
118 int maxPts = pFlowTrack->MaxPts();
119 float fitOverMaxPts = (float)fitPts/(
float)maxPts;
120 if (mFitOverMaxPtsPart[1] > mFitOverMaxPtsPart[0] &&
121 (fitOverMaxPts < mFitOverMaxPtsPart[0] ||
122 fitOverMaxPts >= mFitOverMaxPtsPart[1]))
return kFALSE;
125 float chiSq = pFlowTrack->Chi2();
126 if (mChiSqPart[1] > mChiSqPart[0] &&
127 (chiSq < mChiSqPart[0] ||
128 chiSq >= mChiSqPart[1]))
return kFALSE;
131 float globdca = pFlowTrack->DcaGlobal();
132 if (mDcaGlobalPart[1] > mDcaGlobalPart[0] &&
133 (globdca < mDcaGlobalPart[0] ||
134 globdca >= mDcaGlobalPart[1]))
return kFALSE;
137 float Y = pFlowTrack->Y();
138 if (mYPart[1] > mYPart[0] &&
139 (Y < mYPart[0] || Y >= mYPart[1]))
return kFALSE;
146 void StFlowSelection::PrintList()
const {
148 cout <<
"#################################################################"
150 cout <<
"# Selection List:" << endl;
151 cout <<
"# Particles correlated with the event plane: " << mPidPart << endl;
152 cout <<
"# Pt for particles correlated with the event plane: " <<
153 mPtPart[0] <<
" to " << mPtPart[1] <<
" GeV/c" <<endl;
154 cout <<
"# P for particles correlated with the event plane: " <<
155 mPPart[0] <<
" to " << mPPart[1] <<
" GeV/c" <<endl;
156 cout <<
"# Eta for particles correlated with the event plane: " <<
157 mEtaPart[0] <<
" to " << mEtaPart[1] <<endl;
158 cout <<
"# Y for particles correlated with the event plane: " <<
159 mYPart[0] <<
" to " << mYPart[1] <<endl;
160 cout <<
"# Fit Points for particles correlated with the event plane: " <<
161 mFitPtsPart[0] <<
" to " << mFitPtsPart[1] <<endl;
162 cout <<
"# Dedx Points for particles correlated with the event plane: " <<
163 mDedxPtsPart[0] <<
" to " << mDedxPtsPart[1] <<endl;
164 cout <<
"# Fit/Max Points for particles correlated with the event plane: "
165 << mFitOverMaxPtsPart[0] <<
" to " << mFitOverMaxPtsPart[1] <<endl;
166 cout <<
"# Chi2 for particles correlated with the event plane: " <<
167 mChiSqPart[0] <<
" to " << mChiSqPart[1] <<endl;
168 cout <<
"# Global Dca for particles correlated with the event plane: " <<
169 mDcaGlobalPart[0] <<
" to " << mDcaGlobalPart[1] <<endl;
170 cout <<
"#################################################################"