]>
Commit | Line | Data |
---|---|---|
d5efea33 | 1 | #ifndef ALIESDMUONCLUSTER_H |
2 | #define ALIESDMUONCLUSTER_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 | /// \class AliESDMuonCluster | |
10 | /// \brief Class to describe the MUON clusters in the Event Summary Data | |
11 | // Author Philippe Pillot, Subatech | |
12 | ||
13 | ||
14 | #include <TObject.h> | |
fe0324de | 15 | #include <TArrayI.h> |
d5efea33 | 16 | |
fe0324de | 17 | class AliESDEvent; |
c34d2b8c | 18 | class TClonesArray; |
19 | ||
d5efea33 | 20 | class AliESDMuonCluster : public TObject { |
21 | public: | |
22 | AliESDMuonCluster(); // Constructor | |
c34d2b8c | 23 | virtual ~AliESDMuonCluster(); //< Destructor |
d5efea33 | 24 | AliESDMuonCluster(const AliESDMuonCluster& cluster); |
25 | AliESDMuonCluster& operator=(const AliESDMuonCluster& cluster); | |
26 | ||
c34d2b8c | 27 | virtual void Clear(Option_t* opt = ""); |
d5efea33 | 28 | |
29 | /// Set coordinates (cm) | |
30 | void SetXYZ(Double_t x, Double_t y, Double_t z) {fXYZ[0] = x; fXYZ[1] = y; fXYZ[2] = z;} | |
31 | /// Return X-position (cm) | |
32 | Double_t GetX() const {return fXYZ[0];} | |
33 | /// Return Y-position (cm) | |
34 | Double_t GetY() const {return fXYZ[1];} | |
35 | /// Return Z-position (cm) | |
36 | Double_t GetZ() const {return fXYZ[2];} | |
37 | ||
38 | /// Set (X,Y) resolution (cm) | |
39 | void SetErrXY(Double_t errX, Double_t errY) {fErrXY[0] = errX; fErrXY[1] = errY;} | |
40 | /// Return X-resolution (cm) | |
41 | Double_t GetErrX() const {return fErrXY[0];} | |
42 | /// Return X-resolution**2 (cm**2) | |
43 | Double_t GetErrX2() const {return fErrXY[0]*fErrXY[0];} | |
44 | /// Return Y-resolution (cm) | |
45 | Double_t GetErrY() const {return fErrXY[1];} | |
46 | /// Return Y-resolution**2 (cm**2) | |
47 | Double_t GetErrY2() const {return fErrXY[1]*fErrXY[1];} | |
48 | ||
c34d2b8c | 49 | /// Set the total charge |
50 | void SetCharge(Double_t charge) {fCharge = charge;} | |
51 | /// Return the total charge | |
52 | Double_t GetCharge() const {return fCharge;} | |
53 | ||
54 | /// Set the chi2 value | |
55 | void SetChi2(Double_t chi2) {fChi2 = chi2;} | |
56 | /// Return the chi2 value | |
57 | Double_t GetChi2() const {return fChi2;} | |
58 | ||
d5efea33 | 59 | /// Return chamber id (0..), part of the uniqueID |
60 | Int_t GetChamberId() const {return (GetUniqueID() & 0xF0000000) >> 28;} | |
61 | /// Return detection element id, part of the uniqueID | |
62 | Int_t GetDetElemId() const {return (GetUniqueID() & 0x0FFE0000) >> 17;} | |
c34d2b8c | 63 | /// Return the index of this cluster (0..), part of the uniqueID |
d5efea33 | 64 | Int_t GetClusterIndex() const {return (GetUniqueID() & 0x0001FFFF);} |
65 | ||
fe0324de | 66 | // Add the given pad Id to the list associated to the cluster |
67 | void AddPadId(UInt_t padId); | |
68 | // Fill the list pads'Id associated to the cluster with the given list | |
69 | void SetPadsId(Int_t nPads, const UInt_t *padsId); | |
70 | /// Return the number of pads associated to this cluster | |
71 | Int_t GetNPads() const {return fNPads;} | |
72 | /// Return the Id of pad i | |
73 | UInt_t GetPadId(Int_t i) const {return (fPadsId && i >= 0 && i < fNPads) ? static_cast<UInt_t>(fPadsId->At(i)) : 0;} | |
74 | /// Return the array of pads'Id | |
75 | const UInt_t* GetPadsId() const {return fPadsId ? reinterpret_cast<UInt_t*>(fPadsId->GetArray()) : 0x0;} | |
76 | /// Return kTrue if the pads'Id are stored | |
77 | Bool_t PadsStored() const {return (fNPads > 0);} | |
78 | ||
79 | // Transfer pads to the new ESD structure | |
80 | void MovePadsToESD(AliESDEvent &esd); | |
c34d2b8c | 81 | |
2e2d0c44 | 82 | /// Set the corresponding MC track number |
83 | void SetLabel(Int_t label) {fLabel = label;} | |
84 | /// Return the corresponding MC track number | |
85 | Int_t GetLabel() const {return fLabel;} | |
86 | ||
d5efea33 | 87 | void Print(Option_t */*option*/ = "") const; |
88 | ||
89 | ||
90 | protected: | |
91 | Double32_t fXYZ[3]; ///< cluster position | |
92 | Double32_t fErrXY[2]; ///< transverse position errors | |
c34d2b8c | 93 | Double32_t fCharge; ///< cluster charge |
94 | Double32_t fChi2; ///< cluster chi2 | |
95 | ||
fe0324de | 96 | mutable TClonesArray* fPads; ///< Array of pads attached to the cluster -- deprecated |
97 | ||
98 | Int_t fNPads; ///< number of pads attached to the cluster | |
99 | TArrayI* fPadsId; ///< array of Ids of pads attached to the cluster | |
d5efea33 | 100 | |
2e2d0c44 | 101 | Int_t fLabel; ///< point to the corresponding MC track |
102 | ||
d5efea33 | 103 | |
fe0324de | 104 | ClassDef(AliESDMuonCluster, 4) // MUON ESD cluster class |
d5efea33 | 105 | }; |
106 | ||
107 | #endif |