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 AliMUONRawClusterV2 : public AliMUONVCluster {
22 AliMUONRawClusterV2();
23 AliMUONRawClusterV2(Int_t chamberId, Int_t detElemId, Int_t clusterIndex);
24 virtual ~AliMUONRawClusterV2();
25 AliMUONRawClusterV2(const AliMUONRawClusterV2& cluster);
26 AliMUONRawClusterV2 & operator=(const AliMUONRawClusterV2& cluster);
28 virtual void Clear(Option_t* = "");
30 /// Set coordinates (cm)
31 virtual void SetXYZ(Double_t x, Double_t y, Double_t z) {fX = x; fY = y; fZ = z;}
32 /// Return coordinate X (cm)
33 virtual Double_t GetX() const {return fX;}
34 /// Return coordinate Y (cm)
35 virtual Double_t GetY() const {return fY;}
36 /// Return coordinate Z (cm)
37 virtual Double_t GetZ() const {return fZ;}
39 /// Set resolution (cm) on coordinates (X,Y)
40 virtual void SetErrXY(Double_t errX, Double_t errY) {fErrX2 = errX * errX; fErrY2 = errY * errY;}
41 /// Return resolution (cm) on coordinate X
42 virtual Double_t GetErrX() const {return TMath::Sqrt(fErrX2);}
43 /// Return resolution**2 (cm**2) on coordinate X
44 virtual Double_t GetErrX2() const {return fErrX2;}
45 /// Return resolution (cm) on coordinate Y
46 virtual Double_t GetErrY() const {return TMath::Sqrt(fErrY2);}
47 /// Return resolution**2 (cm**2) on coordinate Y
48 virtual Double_t GetErrY2() const {return fErrY2;}
50 /// Set the cluster charge
51 virtual void SetCharge(Double_t q) {fQ = q;}
52 /// Set the cluster charge
53 virtual Double_t GetCharge() const {return fQ;}
56 virtual Int_t GetChamberId() const {return AliMUONVCluster::GetChamberId(GetUniqueID());}
57 /// Return detection element id
58 virtual Int_t GetDetElemId() const {return AliMUONVCluster::GetDetElemId(GetUniqueID());}
60 virtual void SetDigitsId(Int_t nDigits, const UInt_t *digitsId);
61 /// Add a digit Id to the array of associated digits
62 virtual void AddDigitId(UInt_t id);
63 /// Return number of associated digits
64 virtual Int_t GetNDigits() const {return fNDigits;}
65 /// Return Id of digits i
66 virtual UInt_t GetDigitId(Int_t i) const {return (i < fNDigits && fDigitsId) ? fDigitsId[i] : 0;}
68 /// Set chi2 of cluster
69 virtual void SetChi2( Double_t chi2) {fChi2 = chi2;}
70 /// Return chi2 of cluster
71 virtual Double_t GetChi2() const {return fChi2;}
73 /// Return true as the function Compare() is implemented
74 Bool_t IsSortable() const {return kTRUE;}
75 Int_t Compare(const TObject *obj) const;
80 Double32_t fX; ///< X of cluster
81 Double32_t fY; ///< Y of cluster
82 Double32_t fZ; ///< Z of cluster
84 Double32_t fErrX2; ///< X coordinate error square
85 Double32_t fErrY2; ///< Y coordinate error square
87 Double32_t fQ; ///< Q of cluster (in ADC counts)
89 Double32_t fChi2; ///< Chi2 of cluster
91 Int_t fNDigits; ///< Number of digits attached to the cluster
92 /// Indices of digits attached to the cluster
93 UInt_t *fDigitsId; //[fNDigits] Indices of digits attached to the cluster
96 ClassDef(AliMUONRawClusterV2,1) //Cluster class for MUON