]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDcluster.h
Update of TRD code
[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  FromUnfolding() const           { return TestBit(kUnfold); }
39
40           void    SetDetector(Int_t d)            { fDetector  = d; }
41           void    SetLocalTimeBin(Int_t t)        { fTimeBin   = t; }
42           void    SetQ(Float_t q)                 { fQ         = q; }
43           void    SetY(Float_t y)                 { fY         = y; }
44           void    SetZ(Float_t z)                 { fZ         = z; }
45           void    SetTrackIndex(Int_t i, Int_t t) { fTracks[i] = t; } 
46           void    SetSigmaY2(Float_t s)           { fSigmaY2   = s; }
47           void    SetSigmaZ2(Float_t s)           { fSigmaZ2   = s; }
48
49           void    SetUnfolding()                  { SetBit(kUnfold); }
50
51  protected:
52
53   enum {
54     kUnfold = 0x00000001    // Cluster results from unfolding procedure
55   };
56
57   Int_t    fDetector;       // TRD detector number
58   Int_t    fTimeBin;        // Time bin number within the detector
59
60   Int_t    fTracks[3];      // labels of overlapped tracks
61   Float_t  fQ;              // amplitude 
62   Float_t  fY;              // local Rphi coordinate (cm) within tracking sector
63   Float_t  fZ;              // local Z coordinate (cm) within tracking sector
64   Float_t  fSigmaY2;        // Y variance (cm)
65   Float_t  fSigmaZ2;        // Z variance (cm)  
66
67   ClassDef(AliTRDcluster,1) // Cluster for the TRD
68  
69 };
70
71 #endif