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