]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDcluster.h
Allowing coding conventions to be checked
[u/mrichter/AliRoot.git] / TRD / AliTRDcluster.h
1 #ifndef ALITRDCLUSTER_H
2 #define ALITRDCLUSTER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8
9 #include "AliCluster.h"  
10
11 class AliTRDrecPoint;
12
13 class AliTRDcluster : public AliCluster {
14
15  public:
16
17   AliTRDcluster() : AliCluster() { fQ=0; fTimeBin=0; fDetector=0; }
18   AliTRDcluster(const AliTRDcluster &c);
19   AliTRDcluster(const AliTRDrecPoint &p);
20
21   virtual void    AddTrackIndex(Int_t *i); 
22
23
24   Int_t   IsUsed() const      { return (fQ < 0) ? 1 : 0; }
25   void    Use()               { fQ = -fQ; }
26   
27   Bool_t  From2pad() const    { return TestBit(k2pad); }
28   Bool_t  From3pad() const    { return TestBit(k3pad); }
29   Bool_t  From4pad() const    { return TestBit(k4pad); }
30   Bool_t  From5pad() const    { return TestBit(k5pad); }
31   Bool_t  FromLarge() const   { return TestBit(kLarge);}
32   Bool_t  Isolated() const    { return (TestBit(k2pad) || TestBit(k3pad)); }
33  
34   void    SetDetector(Int_t d)         { fDetector  = d; }
35   void    SetLocalTimeBin(Int_t t)     { fTimeBin   = t; }
36   void    SetQ(Float_t q)              { fQ         = q; }
37   
38   Int_t   GetDetector() const          { return fDetector; }
39   Int_t   GetLocalTimeBin() const      { return fTimeBin;  }
40   Float_t GetQ() const                 { return fQ; }
41
42   void    Set2pad()                    { SetBit(k2pad);  }
43   void    Set3pad()                    { SetBit(k3pad);  }
44   void    Set4pad()                    { SetBit(k4pad);  }
45   void    Set5pad()                    { SetBit(k5pad);  }
46   void    SetLarge()                   { SetBit(kLarge); }
47   
48  protected:
49
50   enum {
51     k2pad  = 0x00000001,   // 2 pad cluster
52     k3pad  = 0x00000002,   // 3 pad cluster
53     k4pad  = 0x00000004,   // 4 pad cluster
54     k5pad  = 0x00000008,   // 5 pad cluster
55     kLarge = 0x00000016    // Large cluster
56   };
57   
58   Int_t    fDetector;       // TRD detector number
59   Int_t    fTimeBin;        // Time bin number within the detector
60   Float_t  fQ;              // amplitude 
61                                  
62   ClassDef(AliTRDcluster,1) // Cluster for the TRD
63  
64 };
65
66 #endif