00001 #ifndef ScintHitList_h
00002 #define ScintHitList_h
00003
00004 #include <TString.h>
00005 class TH1F;
00006 class TObjArray;
00007
00008 class ScintHitList {
00009 protected:
00010 int *active, *fired, *track;
00011 int nActive, nFired,nTrack,nMatch;
00012 float phi0, dPhi;
00013 float eta0, dEta;
00014 int nEta,nPhi,nBin;
00015 int iPhiEta2bin(int iPhi,int iEta);
00016 void iBin2iPhiEta(int iBin,int &iPhi,int &iEta) ;
00017 void setActive(int iBin);
00018 void setFired(int iBin);
00019 TH1F *h[8];
00020 TString myName;
00021 float Wmatch, Wveto;
00022
00023 public:
00024 ScintHitList(float Xphi0,float XdPhi,int mxPhi,float Xeta0, float XdEta,int mxEta,
00025 char *name, float wm, float wv);
00026 virtual ~ScintHitList();
00027 void clear();
00028 void initRun();
00029 int addTrack(float eta, float phi);
00030 void print(int k=0);
00031 int getActive(int iBin);
00032 int getFired(int iBin);
00033 int getTrack(int iBin);
00034 bool isMatched(int ibin);
00035 bool isVetoed(int ibin);
00036 float getWeight(int ibin);
00037 void doHisto();
00038 void initHisto(TObjArray* );
00039 int getnFired(){ return nFired; }
00040 int phiBin(float phi);
00041 virtual int etaBin(float eta)=0;
00042 virtual float bin2EtaLeft(int iEta)=0;
00043
00044 };
00045
00046
00047 #endif