00001
00002
00003
00004
00005
00006
00007
00008
00010
00011 #ifndef _StFlowSelection_INCLUDED_
00012 #define _StFlowSelection_INCLUDED_
00013 #include <Stiostream.h>
00014 #include <string.h>
00015 #include <stdlib.h>
00016 #include "Rtypes.h"
00017 #include "StObject.h"
00018 #include "StFlowConstants.h"
00019 class StFlowTrack;
00020 class StFlowEvent;
00021
00022 class StFlowSelection : public StObject {
00023
00024 public:
00025
00026 StFlowSelection();
00027 virtual ~StFlowSelection();
00028
00029 Char_t* PidPart();
00030 Int_t Sel() const;
00031 Int_t Har() const;
00032 Int_t Sub() const;
00033 Bool_t Select(StFlowEvent*);
00034 Bool_t Select(StFlowTrack*);
00035 Bool_t SelectPart(StFlowTrack*);
00036 Float_t PtMaxPart() const;
00037 Int_t PtBinsPart() const;
00038 void PrintList() const;
00039 void SetPidPart(const Char_t*);
00040 void SetPtPart(const Float_t, const Float_t);
00041 void SetPtBinsPart(const Int_t);
00042 void SetPPart(const Float_t, const Float_t);
00043 void SetEtaPart(const Float_t, const Float_t);
00044 void SetYPart(const Float_t, const Float_t);
00045 void SetFitPtsPart(const Int_t, const Int_t);
00046 void SetDedxPtsPart(const Int_t, const Int_t);
00047 void SetFitOverMaxPtsPart(const Float_t, const Float_t);
00048 void SetChiSqPart(const Float_t, const Float_t);
00049 void SetDcaGlobalPart(const Float_t, const Float_t);
00050 void SetHarmonic(const Int_t&);
00051 void SetSelection(const Int_t&);
00052 void SetSubevent(const Int_t&);
00053
00054 private:
00055
00056
00057 Char_t mPidPart[10];
00058 Float_t mPtPart[2];
00059 Int_t mPtBinsPart;
00060 Float_t mPPart[2];
00061 Float_t mEtaPart[2];
00062 Float_t mYPart[2];
00063 Int_t mFitPtsPart[2];
00064 Int_t mDedxPtsPart[2];
00065 Float_t mFitOverMaxPtsPart[2];
00066 Float_t mChiSqPart[2];
00067 Float_t mDcaGlobalPart[2];
00068
00069 Int_t mHarmonic;
00070 Int_t mSelection;
00071 Int_t mSubevent;
00072
00073 ClassDef(StFlowSelection,1)
00074 };
00075
00076 inline Char_t* StFlowSelection::PidPart() { return mPidPart; }
00077
00078 inline Float_t StFlowSelection::PtMaxPart() const { return mPtPart[1]; }
00079
00080 inline Int_t StFlowSelection::PtBinsPart() const { return mPtBinsPart; }
00081
00082 inline Int_t StFlowSelection::Sel() const { return mSelection; }
00083
00084 inline Int_t StFlowSelection::Har() const { return mHarmonic; }
00085
00086 inline Int_t StFlowSelection::Sub() const { return mSubevent; }
00087
00088 inline void StFlowSelection::SetPidPart(const Char_t* pid) {
00089 strncpy(mPidPart, pid, 9); mPidPart[9] = '\0'; }
00090
00091 inline void StFlowSelection::SetPtPart(const Float_t lo, const Float_t hi) {
00092 mPtPart[0] = lo; mPtPart[1] = hi; }
00093
00094 inline void StFlowSelection::SetPtBinsPart(const Int_t bins) {
00095 mPtBinsPart = bins; }
00096
00097 inline void StFlowSelection::SetPPart(const Float_t lo, const Float_t hi) {
00098 mPPart[0] = lo; mPPart[1] = hi; }
00099
00100 inline void StFlowSelection::SetEtaPart(const Float_t lo, const Float_t hi) {
00101 mEtaPart[0] = lo; mEtaPart[1] = hi; }
00102
00103 inline void StFlowSelection::SetYPart(const Float_t lo, const Float_t hi) {
00104 mYPart[0] = lo; mYPart[1] = hi; }
00105
00106 inline void StFlowSelection::SetFitPtsPart(const Int_t lo, const Int_t hi) {
00107 mFitPtsPart[0] = lo; mFitPtsPart[1] = hi; }
00108
00109 inline void StFlowSelection::SetDedxPtsPart(const Int_t lo, const Int_t hi) {
00110 mDedxPtsPart[0] = lo; mDedxPtsPart[1] = hi; }
00111
00112 inline void StFlowSelection::SetFitOverMaxPtsPart(const Float_t lo, const Float_t hi) {
00113 mFitOverMaxPtsPart[0] = lo; mFitOverMaxPtsPart[1] = hi; }
00114
00115 inline void StFlowSelection::SetChiSqPart(const Float_t lo, const Float_t hi) {
00116 mChiSqPart[0] = lo; mChiSqPart[1] = hi; }
00117
00118 inline void StFlowSelection::SetDcaGlobalPart(const Float_t lo, const Float_t hi) {
00119 mDcaGlobalPart[0] = lo; mDcaGlobalPart[1] = hi; }
00120
00121 inline void StFlowSelection::SetHarmonic(const Int_t& harN) {
00122 if (harN < 0 || harN >= Flow::nHars) {
00123 cout << "### Harmonic " << harN << " not valid" << endl;
00124 mHarmonic = 0;
00125 } else { mHarmonic = harN; } }
00126
00127 inline void StFlowSelection::SetSelection(const Int_t& selN) {
00128 if (selN < 0 || selN >= Flow::nSels) {
00129 cout << "### Selection " << selN << " not valid" << endl;
00130 mSelection = 0;
00131 } else { mSelection = selN; } }
00132
00133 inline void StFlowSelection::SetSubevent(const Int_t& subN) {
00134 if (subN < -1 || subN > Flow::nSubs) {
00135 cout << "### Subevent " << subN << " not valid" << endl;
00136 mSubevent = -1;
00137 } else { mSubevent = subN; } }
00138
00139 #endif
00140
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
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