00001 #ifndef Cut_H
00002 #define Cut_H
00003
00004 #include "TObject.h"
00005
00006 #include "Centrality.h"
00007 #include "TMath.h"
00008
00009 class StMiniMcEvent;
00010 class StTinyRcTrack;
00011 class StTinyMcTrack;
00012 class StMiniMcPair;
00013
00014 class Cut {
00015 public:
00016
00017
00018
00019
00020
00021
00022
00023
00024 static void SetZdcCtbCent(NchCentrality min, NchCentrality max) {
00025 mZdcCtbCent[0] = min; mZdcCtbCent[1] = max;
00026 }
00027
00028 static void SetFlowCent(int min, int max) {
00029 mFlowCent[0] = min; mFlowCent[1] = max;
00030 }
00031
00032 static void SetHMinusCent(int min, int max) {
00033 mHMinusCent[0]= min; mHMinusCent[1]=max;
00034 }
00035
00036 static void SetNchCent(int min, int max) {
00037 mNchCent[0] = min; mNchCent[1] = max;
00038 }
00039
00040 static bool DoZdcCtbCent() { return mDoZdcCtbCent; }
00041 static bool DoFlowCent() { return mDoFlowCent; }
00042 static bool DoHMinusCent() { return mDoHMinusCent; }
00043
00044
00045
00046
00047 static void SetDoSpectraCent(bool a=true) { mDoSpectraCent=a; }
00048 static void SetDoOtherCent(bool a=true) { mDoSpectraCent= !a; }
00049
00050
00051
00052 static void SetVertexZ(Float_t min,Float_t max) {
00053 mVertexZ[0] = min; mVertexZ[1] = max;
00054 }
00055
00056 static void SetVertexZSkip(Float_t val){
00057 mVertexZSkip=fabs(val);
00058 }
00059
00060
00061
00062
00063 static void SetHalf(char half);
00064 static void SetHitHalf(char half);
00065 static void SetGeomHalf(char half);
00066
00067 static char Half() { return mHalf; }
00068 static char HitHalf() { return mHitHalf; }
00069 static char GeomHalf() { return mGeomHalf; }
00070 static bool VertexSkipOn() { return (mVertexZSkip); }
00071
00072
00073 static void SetHitAvoid(Float_t val){
00074 mHitAvoid=val;
00075 }
00076
00077
00078 static void SetEta(Float_t min,Float_t max) {
00079 mEta[0] = min; mEta[1] = max;
00080 }
00081
00082 static void SetFitPts(Int_t min, Int_t max) {
00083 mFitPts[0] = min; mFitPts[1] = max;
00084 }
00085
00086 static void SetSDcaGl(Float_t min, Float_t max) {
00087 mSDcaGl[0] = min; mSDcaGl[1] = max;
00088 }
00089
00090 static void SetDcaPr(Float_t min, Float_t max) {
00091 mDcaPr[0] = min; mDcaPr[1] = max;
00092 }
00093
00094 static void SetDcaXYGl(Float_t min, Float_t max) {
00095 mDcaXYGl[0] = min; mDcaXYGl[1] = max;
00096 }
00097
00098 static void SetMcPts(Int_t min, Int_t max){
00099 mMcPts[0] = min, mMcPts[1] = max;
00100 }
00101
00102 static void SetEtaTight(Float_t min, Float_t max){
00103 mEtaTight[0] = min, mEtaTight[1] = max;
00104 }
00105
00106
00107 static void SetCut(Int_t);
00108
00109
00110
00111
00112
00113
00114
00115 static bool IsSameSide(Float_t vertexZ, Float_t firstZ,Float_t lastZ){
00116 bool isOut = !(mVertexZSkip && !IsOutSide(firstZ,lastZ,mVertexZSkip));
00117 return (vertexZ*lastZ>0 && vertexZ*firstZ>0 && isOut);
00118 }
00119
00120 static bool IsGeomSameSide(Float_t vertexZ,Float_t dipAngle){
00121 float z = vertexZ+192*tan(dipAngle);
00122 bool isSame=false;
00123 switch(mGeomHalf){
00124 case 'e': if(z<0 && vertexZ<0) isSame=true; break;
00125 case 'w' : if(z>0 && vertexZ>0) isSame=true; break;
00126 case 's' : if(z*vertexZ>0) isSame=true; break;
00127 default : exit(-1);
00128 }
00129 return isSame;
00130 }
00131
00132 static bool IsHitSameSide(Float_t firstZ,Float_t lastZ){
00133 bool isSame=false;
00134 switch(mHitHalf){
00135 case 'e': if(firstZ<0 && lastZ<0) isSame=true; break;
00136 case 'w' : if(firstZ>0 && lastZ>0) isSame=true; break;
00137 case 's' : if(firstZ*lastZ>0) isSame=true; break;
00138 default : exit(-1);
00139 }
00140 return isSame;
00141
00142 }
00143
00144 static bool IsOutSide(Float_t firstZ, Float_t lastZ, Float_t val){
00145 return (fabs(firstZ)>fabs(val) && fabs(lastZ)>fabs(val)
00146 && firstZ*lastZ>0);
00147 }
00148
00149
00150 static void ShowCuts();
00151
00152
00153
00154
00155
00156
00157 static NchCentrality mZdcCtbCent[2];
00158 static Int_t mFlowCent[2];
00159 static Int_t mHMinusCent[2];
00160
00161 static Int_t mNchCent[2];
00162
00163 static bool mDoZdcCtbCent;
00164 static bool mDoFlowCent;
00165 static bool mDoHMinusCent;
00166
00167 static bool mDoNchCent;
00168 static bool mDoNchCentKludge;
00169
00170 static bool mDoSpectraCent;
00171
00172
00173 static Float_t mVertexZ[2];
00174 static Float_t mVertexZSkip;
00175
00176 static Float_t mEta[2];
00177 static Int_t mFitPts[2];
00178 static Float_t mSDcaGl[2];
00179 static Float_t mDcaPr[2];
00180 static Float_t mDcaXYGl[2];
00181 static Int_t mMcPts[2];
00182 static Float_t mEtaTight[2];
00183
00184 static char mHalf;
00185 static char mHitHalf;
00186 static char mGeomHalf;
00187 static Float_t mHitAvoid;
00188
00189 static Int_t mCut;
00190
00191 private:
00192
00193 ClassDef(Cut,1)
00194
00195 };
00196
00197
00198
00199
00200
00201
00202 #endif