00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012 #include <Stiostream.h>
00013 #include <stdlib.h>
00014 #include "StFlowSelection.h"
00015 #include "StFlowEvent.h"
00016 #include "StFlowTrack.h"
00017 #define PR(x) cout << "##### FlowSelection: " << (#x) << " = " << (x) << endl;
00018
00019 ClassImp(StFlowSelection)
00020
00021
00022
00023
00024 StFlowSelection::StFlowSelection() : mSubevent(-1) {
00025
00026 mPidPart[0] = '\0';
00027 mPtPart[0] = 0.;
00028 mPtPart[1] = 0.;
00029 mPtBinsPart = 0;
00030 mPPart[0] = 0.;
00031 mPPart[1] = 0.;
00032 mEtaPart[0] = 0.;
00033 mEtaPart[1] = 0.;
00034 mFitPtsPart[0] = 0;
00035 mFitPtsPart[1] = 0;
00036 mDedxPtsPart[0] = 0;
00037 mDedxPtsPart[1] = 0;
00038 mFitOverMaxPtsPart[0] = 0.;
00039 mFitOverMaxPtsPart[1] = 0.;
00040 mChiSqPart[0] = 0.;
00041 mChiSqPart[1] = 0.;
00042 mDcaGlobalPart[0] = 0.;
00043 mDcaGlobalPart[1] = 2.;
00044 mYPart[0] = 0.;
00045 mYPart[1] = 0.;
00046 }
00047
00048
00049
00050 StFlowSelection::~StFlowSelection() {
00051 }
00052
00053
00054
00055 Bool_t StFlowSelection::Select(StFlowEvent* pFlowEvent) {
00056
00057
00058 return kTRUE;
00059 }
00060
00061
00062
00063 Bool_t StFlowSelection::Select(StFlowTrack* pFlowTrack) {
00064
00065
00066
00067
00068 if (!pFlowTrack->Select(mHarmonic, mSelection, mSubevent)) return kFALSE;
00069
00070 return kTRUE;
00071 }
00072
00073
00074
00075 Bool_t StFlowSelection::SelectPart(StFlowTrack* pFlowTrack) {
00076
00077
00078
00079
00080 if (mPidPart[0] != '\0') {
00081 if (strstr(mPidPart, "h")!=0) {
00082 int charge = pFlowTrack->Charge();
00083 if (strcmp("h+", mPidPart)==0 && charge != 1) return kFALSE;
00084 if (strcmp("h-", mPidPart)==0 && charge != -1) return kFALSE;
00085 } else {
00086 const Char_t* pid = pFlowTrack->Pid();
00087 if (strstr(pid, mPidPart)==0) return kFALSE;
00088 }
00089 }
00090
00091
00092 float pt = pFlowTrack->Pt();
00093 if (mPtPart[1] > mPtPart[0] &&
00094 (pt < mPtPart[0] || pt >= mPtPart[1])) return kFALSE;
00095
00096
00097 float totalp = pFlowTrack->P();
00098 if (mPPart[1] > mPPart[0] &&
00099 (totalp < mPPart[0] || totalp >= mPPart[1])) return kFALSE;
00100
00101
00102 float eta = pFlowTrack->Eta();
00103 if (mEtaPart[1] > mEtaPart[0] &&
00104 (eta < mEtaPart[0] || eta >= mEtaPart[1])) return kFALSE;
00105
00106
00107 int fitPts = pFlowTrack->FitPts();
00108 if (mFitPtsPart[1] > mFitPtsPart[0] &&
00109 (fitPts < mFitPtsPart[0] || fitPts >= mFitPtsPart[1])) return kFALSE;
00110
00111
00112 int dedxPts = pFlowTrack->NdedxPts();
00113 if (mDedxPtsPart[1] > mDedxPtsPart[0] &&
00114 (dedxPts < mDedxPtsPart[0] || dedxPts >= mDedxPtsPart[1])) return kFALSE;
00115
00116
00117
00118 int maxPts = pFlowTrack->MaxPts();
00119 float fitOverMaxPts = (float)fitPts/(float)maxPts;
00120 if (mFitOverMaxPtsPart[1] > mFitOverMaxPtsPart[0] &&
00121 (fitOverMaxPts < mFitOverMaxPtsPart[0] ||
00122 fitOverMaxPts >= mFitOverMaxPtsPart[1])) return kFALSE;
00123
00124
00125 float chiSq = pFlowTrack->Chi2();
00126 if (mChiSqPart[1] > mChiSqPart[0] &&
00127 (chiSq < mChiSqPart[0] ||
00128 chiSq >= mChiSqPart[1])) return kFALSE;
00129
00130
00131 float globdca = pFlowTrack->DcaGlobal();
00132 if (mDcaGlobalPart[1] > mDcaGlobalPart[0] &&
00133 (globdca < mDcaGlobalPart[0] ||
00134 globdca >= mDcaGlobalPart[1])) return kFALSE;
00135
00136
00137 float Y = pFlowTrack->Y();
00138 if (mYPart[1] > mYPart[0] &&
00139 (Y < mYPart[0] || Y >= mYPart[1])) return kFALSE;
00140
00141 return kTRUE;
00142 }
00143
00144
00145
00146 void StFlowSelection::PrintList() const {
00147
00148 cout << "#################################################################"
00149 << endl;
00150 cout << "# Selection List:" << endl;
00151 cout << "# Particles correlated with the event plane: " << mPidPart << endl;
00152 cout << "# Pt for particles correlated with the event plane: " <<
00153 mPtPart[0] << " to " << mPtPart[1] << " GeV/c" <<endl;
00154 cout << "# P for particles correlated with the event plane: " <<
00155 mPPart[0] << " to " << mPPart[1] << " GeV/c" <<endl;
00156 cout << "# Eta for particles correlated with the event plane: " <<
00157 mEtaPart[0] << " to " << mEtaPart[1] <<endl;
00158 cout << "# Y for particles correlated with the event plane: " <<
00159 mYPart[0] << " to " << mYPart[1] <<endl;
00160 cout << "# Fit Points for particles correlated with the event plane: " <<
00161 mFitPtsPart[0] << " to " << mFitPtsPart[1] <<endl;
00162 cout << "# Dedx Points for particles correlated with the event plane: " <<
00163 mDedxPtsPart[0] << " to " << mDedxPtsPart[1] <<endl;
00164 cout << "# Fit/Max Points for particles correlated with the event plane: "
00165 << mFitOverMaxPtsPart[0] << " to " << mFitOverMaxPtsPart[1] <<endl;
00166 cout << "# Chi2 for particles correlated with the event plane: " <<
00167 mChiSqPart[0] << " to " << mChiSqPart[1] <<endl;
00168 cout << "# Global Dca for particles correlated with the event plane: " <<
00169 mDcaGlobalPart[0] << " to " << mDcaGlobalPart[1] <<endl;
00170 cout << "#################################################################"
00171 << endl;
00172
00173 }
00174
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271