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