]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONVCluster.h
1. Adding the new histograms TPC z vertex correlation in order
[u/mrichter/AliRoot.git] / MUON / AliMUONVCluster.h
1 #ifndef ALIMUONVCLUSTER_H
2 #define ALIMUONVCLUSTER_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice                               */
6
7 // $Id$
8
9 /// \ingroup base
10 /// \class AliMUONVCluster
11 /// \brief abstract base class for clusters
12 /// 
13 //  Author Philippe Pillot, Subatech
14
15
16 #include <TObject.h>
17
18 class AliMUONVCluster : public TObject {
19  public:
20   AliMUONVCluster(); // Constructor
21   AliMUONVCluster(Int_t chamberId, Int_t detElemId, Int_t clusterIndex);
22   virtual ~AliMUONVCluster(); // Destructor
23   
24            /// Clear method (used by TClonesArray)
25   virtual void Clear(Option_t*) = 0;
26
27            /// Set coordinates (cm)
28   virtual void     SetXYZ(Double_t x, Double_t y, Double_t z) = 0;
29            /// Return coordinate X (cm)
30   virtual Double_t GetX() const = 0;
31            /// Return coordinate Y (cm)
32   virtual Double_t GetY() const = 0;
33            /// Return coordinate Z (cm)
34   virtual Double_t GetZ() const = 0;
35   
36            /// Set resolution (cm) on coordinates (X,Y)
37   virtual void     SetErrXY(Double_t errX, Double_t errY) = 0;
38            /// Return resolution (cm) on coordinate X
39   virtual Double_t GetErrX() const = 0;
40            /// Return resolution**2 (cm**2) on coordinate X
41   virtual Double_t GetErrX2() const = 0;
42            /// Return resolution (cm) on coordinate Y
43   virtual Double_t GetErrY() const = 0;
44            /// Return resolution**2 (cm**2) on coordinate Y
45   virtual Double_t GetErrY2() const = 0;
46   
47            /// Set the cluster charge
48   virtual void     SetCharge(Double_t charge) = 0;
49            /// Set the cluster charge
50   virtual Double_t GetCharge() const = 0;
51   
52            /// Build a single integer with id information
53   static  UInt_t   BuildUniqueID(Int_t chamberId, Int_t detElemId, Int_t clusterIndex)
54                         {return (((chamberId & 0xF) << 28) | ((detElemId & 0x7FF) << 17) | (clusterIndex & 0x1FFFF));}
55            /// Return chamber id (0..), part of the uniqueID
56   static  Int_t    GetChamberId(UInt_t uniqueID)    {return (uniqueID & 0xF0000000) >> 28;}
57            /// Return detection element id, part of the uniqueID
58   static  Int_t    GetDetElemId(UInt_t uniqueID)    {return (uniqueID & 0x0FFE0000) >> 17;}
59            /// The index of this cluster (0..), part of the uniqueID
60   static  Int_t    GetClusterIndex(UInt_t uniqueID) {return (uniqueID & 0x0001FFFF);}
61            /// Return chamber Id
62   virtual Int_t    GetChamberId() const = 0;
63            /// Return detection element Id
64   virtual Int_t    GetDetElemId() const = 0;
65   
66            /// Set Id of associated digits
67   virtual void     SetDigitsId(Int_t nDigits, const UInt_t *digitsId) = 0;
68            /// Add a digit Id to the array of associated digits
69   virtual void     AddDigitId(UInt_t id) = 0;
70            /// Return number of associated digits
71   virtual Int_t    GetNDigits() const = 0;
72            /// Return Id of digits i
73   virtual UInt_t   GetDigitId(Int_t i) const = 0;
74   
75            /// Set chi2 of cluster
76   virtual void     SetChi2(Double_t chi2) = 0;
77            /// Return chi2 of cluster
78   virtual Double_t GetChi2() const = 0;
79   
80            /// Set the corresponding MC track number
81   virtual void     SetMCLabel(Int_t label) = 0;
82            /// Return the corresponding MC track number
83   virtual Int_t    GetMCLabel() const = 0;
84   
85   virtual void     Print(Option_t *option = "") const;
86   
87   
88   ClassDef(AliMUONVCluster, 1) // abstract base class for cluster
89 };
90         
91 #endif