1 #ifndef ALIMUONRAWCLUSTERV2_H
2 #define ALIMUONRAWCLUSTERV2_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
8 // Revision of includes 07/05/2004
11 /// \class AliMUONRawClusterV2
12 /// \brief MUON raw cluster
14 // Author Philippe Pillot, Subatech
16 #include "AliMUONVCluster.h"
19 class AliESDMuonCluster;
21 class AliMUONRawClusterV2 : public AliMUONVCluster {
24 AliMUONRawClusterV2();
25 AliMUONRawClusterV2(Int_t chamberId, Int_t detElemId, Int_t clusterIndex);
26 AliMUONRawClusterV2(const AliESDMuonCluster& cluster);
27 virtual ~AliMUONRawClusterV2();
28 AliMUONRawClusterV2(const AliMUONRawClusterV2& cluster);
29 AliMUONRawClusterV2 & operator=(const AliMUONRawClusterV2& cluster);
31 virtual void Clear(Option_t* = "");
33 /// Create a copy of the current cluster
34 virtual AliMUONRawClusterV2* Clone(const char* = "") const {return new AliMUONRawClusterV2(*this);}
36 /// Set coordinates (cm)
37 virtual void SetXYZ(Double_t x, Double_t y, Double_t z) {fX = x; fY = y; fZ = z;}
38 /// Return coordinate X (cm)
39 virtual Double_t GetX() const {return fX;}
40 /// Return coordinate Y (cm)
41 virtual Double_t GetY() const {return fY;}
42 /// Return coordinate Z (cm)
43 virtual Double_t GetZ() const {return fZ;}
45 /// Set resolution (cm) on coordinates (X,Y)
46 virtual void SetErrXY(Double_t errX, Double_t errY) {fErrX2 = errX * errX; fErrY2 = errY * errY;}
47 /// Return resolution (cm) on coordinate X
48 virtual Double_t GetErrX() const {return TMath::Sqrt(fErrX2);}
49 /// Return resolution**2 (cm**2) on coordinate X
50 virtual Double_t GetErrX2() const {return fErrX2;}
51 /// Return resolution (cm) on coordinate Y
52 virtual Double_t GetErrY() const {return TMath::Sqrt(fErrY2);}
53 /// Return resolution**2 (cm**2) on coordinate Y
54 virtual Double_t GetErrY2() const {return fErrY2;}
56 /// Set the cluster charge
57 virtual void SetCharge(Double_t q) {fQ = q;}
58 /// Set the cluster charge
59 virtual Double_t GetCharge() const {return fQ;}
62 virtual Int_t GetChamberId() const {return AliMUONVCluster::GetChamberId(GetUniqueID());}
63 /// Return detection element id
64 virtual Int_t GetDetElemId() const {return AliMUONVCluster::GetDetElemId(GetUniqueID());}
66 virtual void SetDigitsId(Int_t nDigits, const UInt_t *digitsId);
67 /// Add a digit Id to the array of associated digits
68 virtual void AddDigitId(UInt_t id);
69 /// Return number of associated digits
70 virtual Int_t GetNDigits() const {return fNDigits;}
71 /// Return Id of digits i
72 virtual UInt_t GetDigitId(Int_t i) const {return (i < fNDigits && fDigitsId) ? fDigitsId[i] : 0;}
74 /// Set chi2 of cluster
75 virtual void SetChi2( Double_t chi2) {fChi2 = chi2;}
76 /// Return chi2 of cluster
77 virtual Double_t GetChi2() const {return fChi2;}
79 /// Return true as the function Compare() is implemented
80 Bool_t IsSortable() const {return kTRUE;}
81 Int_t Compare(const TObject *obj) const;
86 Double32_t fX; ///< X of cluster
87 Double32_t fY; ///< Y of cluster
88 Double32_t fZ; ///< Z of cluster
90 Double32_t fErrX2; ///< X coordinate error square
91 Double32_t fErrY2; ///< Y coordinate error square
93 Double32_t fQ; ///< Q of cluster (in ADC counts)
95 Double32_t fChi2; ///< Chi2 of cluster
97 Int_t fNDigits; ///< Number of digits attached to the cluster
98 /// Indices of digits attached to the cluster
99 UInt_t *fDigitsId; //[fNDigits] Indices of digits attached to the cluster
102 ClassDef(AliMUONRawClusterV2,1) //Cluster class for MUON