00001
00002
00003
00004
00005
00006
00007
00010 #ifndef NO_TOFNUCLEI
00011
00012 #ifndef TOFNUCLEIZCUT_H_
00013 #define TOFNUCLEIZCUT_H_
00014
00015 #include "../../PamCutBase/PamCutBase.h"
00016 #include <ToFNuclei.h>
00017
00018 #ifdef DEBUGPAMCUT
00019 #include <TH2F.h>
00020 #endif
00021
00023 enum TofNucleiZ_Return {
00024 TOFNUCLEIZ_OUTOFBOUNDS,
00025 TOFNUCLEIZ_TOOFEWLAYERS,
00026 TOFNUCLEIZ_ILLEGALZ
00028 };
00029
00031 enum TofNucleiZ_Layers {
00032 TOFNUCLEIZ_S11 = 1,
00033 TOFNUCLEIZ_S12 = 2,
00034 TOFNUCLEIZ_S21 = 4,
00035 TOFNUCLEIZ_S22 = 8,
00036 TOFNUCLEIZ_S31 = 16,
00037 TOFNUCLEIZ_S32 = 32
00039 };
00040
00047 class TofNucleiZCut: public PamCut {
00048
00049 public:
00063 TofNucleiZCut(const char *cutName, unsigned int Z, float lowerLimit, float upperLimit, unsigned int minLayers = 6,
00064 unsigned int layersMask = 0);
00065
00067 ~TofNucleiZCut() {
00068 delete _tofNuclei;
00069
00070 #ifdef DEBUGPAMCUT
00071
00072 for (UInt_t j = 0; j < 12; j++) {
00073 h_tof_z_beta[j]->Write();
00074 }
00075
00076 #endif
00077
00078 }
00079
00131 int Check(PamLevel2 *event);
00132
00133 private:
00134
00135 #ifdef DEBUGPAMCUT
00136
00137 TH2F* h_tof_z_beta[12];
00138
00139 #endif
00140
00141 unsigned int _Z;
00142 SimpleMatrix<float> _mean;
00143 SimpleMatrix<float> _sigma;
00144 static const float _sigmaZdefault[8];
00145
00146 float _lowerLimit;
00147 float _upperLimit;
00148 unsigned int _minLayers;
00149 unsigned int _layersMask;
00150
00151 ToFNuclei *_tofNuclei;
00152 static const unsigned int _maskArray[6];
00153
00154 };
00155
00156 #endif
00157
00158 #endif