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