]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliEMCALFixedWindowClusterInfo.h
added fixed windows clusterizer (S.Aiola). Will need to work on coding conventions.
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALFixedWindowClusterInfo.h
1 #ifndef ALIEMCALFIXEDWINDOWCLUSTERINFO_H
2 #define ALIEMCALFIXEDWINDOWCLUSTERINFO_H
3
4 // $Id$
5
6 #include <TNamed.h>
7
8 class TArrayI;
9
10 class AliEMCALFixedWindowClusterInfo : public TNamed {
11   
12 public:
13   AliEMCALFixedWindowClusterInfo();
14   AliEMCALFixedWindowClusterInfo(const char* name, Int_t size = 1000);
15   AliEMCALFixedWindowClusterInfo(const TString& name, Int_t size = 1000);
16   virtual ~AliEMCALFixedWindowClusterInfo();
17   
18   Bool_t GetInfoFromId(Int_t idclus, Int_t &index, Int_t &eta, Int_t &phi);
19   Bool_t GetInfoFromIndex(Int_t index, Int_t &idclus, Int_t &eta, Int_t &phi);
20   
21   void Add(Int_t idclus, Int_t index, Int_t eta, Int_t phi);
22   Bool_t SetIndexFromId(Int_t idclus, Int_t index);
23   Bool_t RemoveId(Int_t idclus);
24   Bool_t RemoveIndex(Int_t index);
25   void Expand(Int_t size);
26   Int_t GetSize();
27   Bool_t ContainsId(Int_t idclus);
28   Bool_t ContainsIndex(Int_t index);
29   Int_t GetLastElementId();
30   
31   virtual void Clear(Option_t* option = "");
32   
33 protected:
34   Int_t GetPositionFromId(Int_t idclus);
35   Int_t GetPositionFromIndex(Int_t index);
36   
37 private:
38   Int_t     fSize;
39   Int_t     lastElement;
40   TArrayI  *fIds;
41   TArrayI  *fIndexes;
42   TArrayI  *fPhi;
43   TArrayI  *fEta;
44   
45   ClassDef(AliEMCALFixedWindowClusterInfo, 1);
46 };
47 #endif //ALIEMCALFIXEDWINDOWCLUSTERINFO_H