]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDcluster.h
Next round of effc++ changes
[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 //                                                                           //
10 //  TRD cluster                                                              //
11 //                                                                           //
12 ///////////////////////////////////////////////////////////////////////////////
13
14 #include "AliCluster.h"  
15
16 class AliTRDrecPoint;
17
18 class AliTRDcluster : public AliCluster {
19
20  public:
21
22   AliTRDcluster();
23   AliTRDcluster(const AliTRDcluster &c);
24   AliTRDcluster(const AliTRDrecPoint &p);
25
26   virtual void     AddTrackIndex(Int_t *i); 
27
28           Int_t    IsUsed() const               { return (fQ < 0) ? 1 : 0;    }
29           void     Use(Int_t = 0)               { fQ = -fQ;                   }
30   
31           Bool_t   From2pad() const             { return TestBit(k2pad);      }
32           Bool_t   From3pad() const             { return TestBit(k3pad);      }
33           Bool_t   From4pad() const             { return TestBit(k4pad);      }
34           Bool_t   From5pad() const             { return TestBit(k5pad);      }
35           Bool_t   FromLarge() const            { return TestBit(kLarge);     }
36           Bool_t   Isolated() const             { return (TestBit(k2pad) || TestBit(k3pad)); }
37  
38   virtual void     SetDetector(Int_t d)         { fDetector = d;    } 
39           void     SetLocalTimeBin(Int_t t)     { fTimeBin  = t;    }
40           void     SetQ(Float_t q)              { fQ        = q;    }
41   virtual void     SetX(Float_t x)              { fX        = x;    }
42           void     SetCenter(Float_t c)         { fCenter   = c;    }
43           void     SetSignals(Short_t *signals);
44           void     Set2pad()                    { SetBit(k2pad);  fNPads = 2; }
45           void     Set3pad()                    { SetBit(k3pad);  fNPads = 3; }
46           void     Set4pad()                    { SetBit(k4pad);  fNPads = 4; }
47           void     Set5pad()                    { SetBit(k5pad);  fNPads = 5; }
48           void     SetLarge()                   { SetBit(kLarge); fNPads = 6; }
49   
50   virtual Int_t    GetDetector() const          { return fDetector; }
51           Int_t    GetLocalTimeBin() const      { return fTimeBin;  }
52           Float_t  GetQ() const                 { return fQ;        }
53   virtual Float_t  GetX() const                 { return fX;        }
54           Int_t    GetNPads() const             { return fNPads;    }
55           Float_t  GetCenter() const            { return fCenter;   }
56           Float_t  GetSumS() const;
57
58  protected:
59
60           enum {
61             k2pad  = 0x00000001,   //  2 pad cluster
62             k3pad  = 0x00000002,   //  3 pad cluster
63             k4pad  = 0x00000004,   //  4 pad cluster
64             k5pad  = 0x00000008,   //  5 pad cluster
65             kLarge = 0x00000016    //  Large cluster
66           };
67   
68           Int_t   fDetector;       //  TRD detector number
69           Float_t fX;              //  Local x position (first order proportional to time bin)
70           Char_t  fTimeBin;        //  Time bin number within the detector
71           Float_t fQ;              //  Amplitude 
72           Char_t  fNPads;          //  Number of pads in cluster
73           Float_t fCenter;         //  Center of the cluster relative to the pad 
74           Short_t fSignals[7];     //  Signals in the cluster
75   
76   ClassDef(AliTRDcluster,3)        //  Cluster for the TRD
77  
78 };
79
80
81 #endif