]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDcluster.h
Forgot this one last time...
[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 #include <TObject.h>
9  
10 ///////////////////////////////////////////////////////////////////////////////
11 //                                                                           //
12 //  TRD cluster                                                              //
13 //                                                                           //
14 /////////////////////////////////////////////////////////////////////////////// 
15
16 class AliTRDrecPoint;
17
18 class AliTRDcluster : public TObject {
19
20  public:
21
22   AliTRDcluster();
23   AliTRDcluster(const AliTRDcluster &c);
24   AliTRDcluster(const AliTRDrecPoint &p);
25   virtual ~AliTRDcluster();
26   AliTRDcluster &operator=(const AliTRDcluster &c);
27
28   virtual void    Copy(TObject &c);
29   virtual void    AddTrackIndex(Int_t *i);
30    
31           Int_t   GetDetector() const             { return fDetector; }
32           Int_t   GetLocalTimeBin() const         { return fTimeBin;  }
33
34           Float_t GetSigmaY2() const              { return fSigmaY2; }
35           Float_t GetSigmaZ2() const              { return fSigmaZ2; }
36           Float_t GetY() const                    { return fY; }
37           Float_t GetZ() const                    { return fZ; }
38           Float_t GetQ() const                    { return fQ; }
39
40           Int_t   IsUsed() const                  { return (fQ < 0) ? 1 : 0; }
41           void    Use()                           { fQ = -fQ; }
42           Int_t   GetTrackIndex(Int_t i) const    { return fTracks[i]; }
43
44           Bool_t  From2pad() const                { return TestBit(k2pad);  }
45           Bool_t  From3pad() const                { return TestBit(k3pad);  }
46           Bool_t  From4pad() const                { return TestBit(k4pad);  }
47           Bool_t  From5pad() const                { return TestBit(k5pad);  }
48           Bool_t  FromLarge() const               { return TestBit(kLarge); }
49           Bool_t  Isolated() const                { return (TestBit(k2pad) || TestBit(k3pad)); }
50  
51           void    SetDetector(Int_t d)            { fDetector  = d; }
52           void    SetLocalTimeBin(Int_t t)        { fTimeBin   = t; }
53           void    SetQ(Float_t q)                 { fQ         = q; }
54           void    SetY(Float_t y)                 { fY         = y; }
55           void    SetZ(Float_t z)                 { fZ         = z; }
56           void    SetTrackIndex(Int_t i, Int_t t) { fTracks[i] = t; } 
57           void    SetSigmaY2(Float_t s)           { fSigmaY2   = s; }
58           void    SetSigmaZ2(Float_t s)           { fSigmaZ2   = s; }
59
60           void    Set2pad()                       { SetBit(k2pad);  }
61           void    Set3pad()                       { SetBit(k3pad);  }
62           void    Set4pad()                       { SetBit(k4pad);  }
63           void    Set5pad()                       { SetBit(k5pad);  }
64           void    SetLarge()                      { SetBit(kLarge); }
65
66  protected:
67
68   enum {
69     k2pad  = 0x00000001,   // 2 pad cluster
70     k3pad  = 0x00000002,   // 3 pad cluster
71     k4pad  = 0x00000004,   // 4 pad cluster
72     k5pad  = 0x00000008,   // 5 pad cluster
73     kLarge = 0x00000016    // Large cluster
74   };
75
76   Int_t    fDetector;       // TRD detector number
77   Int_t    fTimeBin;        // Time bin number within the detector
78
79   Int_t    fTracks[3];      // labels of overlapped tracks
80   Float_t  fQ;              // amplitude 
81   Float_t  fY;              // local Rphi coordinate (cm) within tracking sector
82   Float_t  fZ;              // local Z coordinate (cm) within tracking sector
83   Float_t  fSigmaY2;        // Y variance (cm)
84   Float_t  fSigmaZ2;        // Z variance (cm)  
85
86   ClassDef(AliTRDcluster,1) // Cluster for the TRD
87  
88 };
89
90 #endif