Line data Source code
1 : #ifndef ALIMUONRAWCLUSTERV2_H
2 : #define ALIMUONRAWCLUSTERV2_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 : // Revision of includes 07/05/2004
9 :
10 : /// \ingroup base
11 : /// \class AliMUONRawClusterV2
12 : /// \brief MUON raw cluster
13 : ///
14 : // Author Philippe Pillot, Subatech
15 :
16 : #include "AliMUONVCluster.h"
17 : #include <TMath.h>
18 :
19 : class AliMUONRawClusterV2 : public AliMUONVCluster {
20 :
21 : public:
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);
27 :
28 : virtual void Clear(Option_t* = "");
29 :
30 : /// Create a copy of the current cluster
31 0 : virtual AliMUONRawClusterV2* Clone(const char* = "") const {return new AliMUONRawClusterV2(*this);}
32 :
33 : /// Set coordinates (cm)
34 328 : virtual void SetXYZ(Double_t x, Double_t y, Double_t z) {fX = x; fY = y; fZ = z;}
35 : /// Return coordinate X (cm)
36 4240 : virtual Double_t GetX() const {return fX;}
37 : /// Return coordinate Y (cm)
38 4036 : virtual Double_t GetY() const {return fY;}
39 : /// Return coordinate Z (cm)
40 3680 : virtual Double_t GetZ() const {return fZ;}
41 :
42 : /// Set resolution (cm) on coordinates (X,Y)
43 328 : virtual void SetErrXY(Double_t errX, Double_t errY) {fErrX2 = errX * errX; fErrY2 = errY * errY;}
44 : /// Return resolution (cm) on coordinate X
45 652 : virtual Double_t GetErrX() const {return TMath::Sqrt(fErrX2);}
46 : /// Return resolution**2 (cm**2) on coordinate X
47 3812 : virtual Double_t GetErrX2() const {return fErrX2;}
48 : /// Return resolution (cm) on coordinate Y
49 652 : virtual Double_t GetErrY() const {return TMath::Sqrt(fErrY2);}
50 : /// Return resolution**2 (cm**2) on coordinate Y
51 4304 : virtual Double_t GetErrY2() const {return fErrY2;}
52 :
53 : /// Set the cluster charge
54 328 : virtual void SetCharge(Double_t q) {fQ = q;}
55 : /// Set the cluster charge
56 652 : virtual Double_t GetCharge() const {return fQ;}
57 :
58 : /// Return chamber Id
59 12116 : virtual Int_t GetChamberId() const {return AliMUONVCluster::GetChamberId(GetUniqueID());}
60 : /// Return detection element id
61 1540 : virtual Int_t GetDetElemId() const {return AliMUONVCluster::GetDetElemId(GetUniqueID());}
62 :
63 : virtual void SetDigitsId(Int_t nDigits, const UInt_t *digitsId);
64 : /// Add a digit Id to the array of associated digits
65 : virtual void AddDigitId(UInt_t id);
66 : /// Return number of associated digits
67 328 : virtual Int_t GetNDigits() const {return fNDigits;}
68 : /// Return Id of digits i
69 0 : virtual UInt_t GetDigitId(Int_t i) const {return (i < fNDigits && fDigitsId) ? fDigitsId[i] : 0;}
70 : /// Return the array of digits'id
71 0 : virtual const UInt_t* GetDigitsId() const {return fDigitsId;}
72 :
73 : /// Set chi2 of cluster
74 328 : virtual void SetChi2( Double_t chi2) {fChi2 = chi2;}
75 : /// Return chi2 of cluster
76 652 : virtual Double_t GetChi2() const {return fChi2;}
77 :
78 : /// Set the corresponding MC track number
79 164 : virtual void SetMCLabel(Int_t label) {fMCLabel = label;}
80 : /// Return the corresponding MC track number
81 828 : virtual Int_t GetMCLabel() const {return fMCLabel;}
82 :
83 : /// Return true as the function Compare() is implemented
84 0 : Bool_t IsSortable() const {return kTRUE;}
85 : Int_t Compare(const TObject *obj) const;
86 :
87 :
88 : private:
89 :
90 : Double32_t fX; ///< X of cluster
91 : Double32_t fY; ///< Y of cluster
92 : Double32_t fZ; ///< Z of cluster
93 :
94 : Double32_t fErrX2; ///< X coordinate error square
95 : Double32_t fErrY2; ///< Y coordinate error square
96 :
97 : Double32_t fQ; ///< Q of cluster (in ADC counts)
98 :
99 : Double32_t fChi2; ///< Chi2 of cluster
100 :
101 : Int_t fNDigits; ///< Number of digits attached to the cluster
102 : /// Indices of digits attached to the cluster
103 : UInt_t *fDigitsId; //[fNDigits] Indices of digits attached to the cluster
104 :
105 : Int_t fMCLabel; ///< Point to the corresponding MC track
106 :
107 :
108 354 : ClassDef(AliMUONRawClusterV2,2) //Cluster class for MUON
109 : };
110 :
111 : #endif
|