1 #ifndef ALIMUONVCLUSTER_H
2 #define ALIMUONVCLUSTER_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 /// \class AliMUONVCluster
11 /// \brief abstract base class for clusters
13 // Author Philippe Pillot, Subatech
18 class AliMUONVCluster : public TObject {
20 AliMUONVCluster(); // Constructor
21 AliMUONVCluster(Int_t chamberId, Int_t detElemId, Int_t clusterIndex);
22 virtual ~AliMUONVCluster(); // Destructor
24 /// Clear method (used by TClonesArray)
25 virtual void Clear(Option_t*) = 0;
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;
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;
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;
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);}
62 virtual Int_t GetChamberId() const = 0;
63 /// Return detection element Id
64 virtual Int_t GetDetElemId() const = 0;
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 /// Return the array of digits'id
75 virtual const UInt_t* GetDigitsId() const {return 0x0;}
77 /// Set chi2 of cluster
78 virtual void SetChi2(Double_t chi2) = 0;
79 /// Return chi2 of cluster
80 virtual Double_t GetChi2() const = 0;
82 /// Set the corresponding MC track number
83 virtual void SetMCLabel(Int_t label) = 0;
84 /// Return the corresponding MC track number
85 virtual Int_t GetMCLabel() const = 0;
87 virtual void Print(Option_t *option = "") const;
90 ClassDef(AliMUONVCluster, 1) // abstract base class for cluster