AliRoot Core  a565103 (a565103)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONClusterInfo.h
Go to the documentation of this file.
1 #ifndef ALIMUONCLUSTERINFO_H
2 #define ALIMUONCLUSTERINFO_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 
12 // Author Philippe Pillot, Subatech
13 
14 
15 #include <TObject.h>
16 #include <TClonesArray.h>
17 #include <AliMUONPadInfo.h>
18 
19 class AliMUONClusterInfo : public TObject {
20 public:
21  AliMUONClusterInfo(); // Constructor
22  AliMUONClusterInfo(TRootIOCtor* /*rio*/); // IO constructor
23  virtual ~AliMUONClusterInfo(); //< Destructor
24  AliMUONClusterInfo(const AliMUONClusterInfo& cluster);
26 
27  virtual void Clear(Option_t* opt = "");
28 
29  void Print(Option_t * option = "") const;
30 
31 
32  // ------ general info ------
34  void SetRunId(Int_t runId) {fRunId = runId;}
36  Int_t GetRunId() const {return fRunId;}
37 
39  void SetEventId(Int_t eventId) {fEventId = eventId;}
41  Int_t GetEventId() const {return fEventId;}
42 
43 
45  void SetZ(Double_t z) {fZ = z;}
47  Double_t GetZ() const {return fZ;}
48 
49 
50  // ------ cluster info ------
52  void SetClusterId(UInt_t clusterId) {fClusterId = clusterId; SetUniqueID(clusterId);}
54  UInt_t GetClusterId() const {return fClusterId;}
56  Int_t GetChamberId() const {return (fClusterId & 0xF0000000) >> 28;}
58  Int_t GetDetElemId() const {return (fClusterId & 0x0FFE0000) >> 17;}
60  Int_t GetClusterIndex() const {return (fClusterId & 0x0001FFFF);}
61 
63  void SetClusterXY(Double_t x, Double_t y) {fClusterX = x; fClusterY = y;}
65  Double_t GetClusterX() const {return fClusterX;}
67  Double_t GetClusterY() const {return fClusterY;}
68 
70  void SetClusterXYErr(Double_t xErr, Double_t yErr) {fClusterXErr = xErr; fClusterYErr = yErr;}
72  Double_t GetClusterXErr() const {return fClusterXErr;}
74  Double_t GetClusterYErr() const {return fClusterYErr;}
75 
77  void SetClusterChi2(Double_t clusterChi2) {fClusterChi2 = clusterChi2;}
79  Double_t GetClusterChi2() const {return fClusterChi2;}
80 
82  void SetClusterCharge(Double_t charge) {fClusterCharge = charge;}
84  Double_t GetClusterCharge() const {return fClusterCharge;}
86  Double_t GetClusterCharge(Int_t iC) const ;
88  Double_t GetClusterChargeB() const {return GetClusterCharge(0);}
90  Double_t GetClusterChargeNB() const {return GetClusterCharge(1);}
91 
92 
93  // ------ track info ------
95  void SetTrackId(UInt_t trackId) {fTrackId = trackId;}
97  UInt_t GetTrackId() const {return fTrackId;}
98 
100  void SetTrackXY(Double_t x, Double_t y) {fTrackX = x; fTrackY = y;}
102  Double_t GetTrackX() const {return fTrackX;}
104  Double_t GetTrackY() const {return fTrackY;}
106  void SetTrackThetaXY(Double_t thetaX, Double_t thetaY) {fTrackThetaX = thetaX; fTrackThetaY = thetaY;}
108  Double_t GetTrackThetaX() const {return fTrackThetaX;}
110  Double_t GetTrackThetaY() const {return fTrackThetaY;}
112  void SetTrackP(Double_t p) {fTrackP = p;}
114  Double_t GetTrackP() const {return fTrackP;}
115 
117  void SetTrackXYErr(Double_t xErr, Double_t yErr) {fTrackXErr = xErr; fTrackYErr = yErr;}
119  Double_t GetTrackXErr() const {return fTrackXErr;}
121  Double_t GetTrackYErr() const {return fTrackYErr;}
122 
124  void SetTrackChi2(Double_t trackChi2) {fTrackChi2 = trackChi2;}
126  Double_t GetTrackChi2() const {return fTrackChi2;}
127 
129  void SetTrackCharge(Short_t charge) {fTrackCharge = charge;}
131  Short_t GetTrackCharge() const {return fTrackCharge;}
132 
134  UChar_t GetTrackNHits(void) const {return fTrackNHits;}
136  void SetTrackNHits(UInt_t NHits) {fTrackNHits = NHits;}
137 
141  void SetTrackChamberHitMap(UInt_t trackChamberHitMap) {fTrackChamberHitMap = trackChamberHitMap;}
143  Bool_t IsChamberHit(Int_t chamber) const {return (Bool_t) ((fTrackChamberHitMap & BIT(chamber)) != 0);}
144 
145  // ------ pad info ------
147  Int_t GetNPads() const {return fPads->GetEntriesFast();}
149  Int_t GetNPads(Int_t iC) const ;
151  Int_t GetNPadsB() const {return GetNPads(0);}
153  Int_t GetNPadsNB() const {return GetNPads(1);}
155  Int_t GetNPadsX(Int_t iC) const ;
157  Int_t GetNPadsXB() const {return GetNPadsX(0);}
159  Int_t GetNPadsXNB() const {return GetNPadsX(1);}
161  Int_t GetNPadsY(Int_t iC) const ;
163  Int_t GetNPadsYB() const {return GetNPadsY(0);}
165  Int_t GetNPadsYNB() const {return GetNPadsY(1);}
167  TClonesArray& GetPads() const {return *fPads;}
169  void AddPad(const AliMUONPadInfo &pad) {new ((*fPads)[fNPads++]) AliMUONPadInfo(pad);}
170 
171 
172 protected:
173 
174  // general info
175  Int_t fRunId;
176  Int_t fEventId;
177  Double32_t fZ;
178 
179  // cluster info
180  UInt_t fClusterId;
181  Double32_t fClusterX;
182  Double32_t fClusterY;
183  Double32_t fClusterXErr;
184  Double32_t fClusterYErr;
185  Double32_t fClusterChi2;
186  Double32_t fClusterCharge;
187 
188  // track info
189  UInt_t fTrackId;
190  Double32_t fTrackX;
191  Double32_t fTrackY;
192  Double32_t fTrackThetaX;
193  Double32_t fTrackThetaY;
194  Double32_t fTrackP;
195  Double32_t fTrackXErr;
196  Double32_t fTrackYErr;
197  Double32_t fTrackChi2;
198  Short_t fTrackCharge;
199  UChar_t fTrackNHits;
201 
202  Int_t fNPads;
203  TClonesArray* fPads;
204 
205  ClassDef(AliMUONClusterInfo, 3) //Class to summarize ESD data at cluster
206 };
207 
208 #endif
Int_t GetClusterIndex() const
Return the index of this cluster (0..), part of the cluster ID.
Double_t GetTrackX() const
Return track X-position (cm)
Int_t GetNPadsYB() const
return the number of pads attached to the cluster
Double32_t fTrackChi2
track normalized chi2
Double_t GetTrackYErr() const
Return track Y-resolution (cm)
void SetTrackNHits(UInt_t NHits)
Set the total number of hits associated to the track leaving this cluster.
Int_t GetNPads() const
return the number of pads attached to the cluster
void SetClusterXY(Double_t x, Double_t y)
Set cluster coordinates (cm)
Double_t GetTrackXErr() const
Return track X-resolution (cm)
Short_t fTrackCharge
track charge
Double_t GetClusterChargeNB() const
Return the non bending cluster charge.
Double32_t fTrackThetaX
track Theta_X angle
Double_t GetTrackP() const
Return track momentum (MeV/c)
UInt_t fTrackId
track ID
Double_t GetTrackY() const
Return track Y-position (cm)
Int_t fEventId
event number
Double32_t fClusterCharge
cluster charge
Double_t GetTrackThetaY() const
Return track ThetaY angle (radian)
Double32_t fTrackX
track X position
Double_t GetClusterChargeB() const
Return the bending cluster charge.
void SetClusterCharge(Double_t charge)
Set the total cluster charge.
void SetClusterChi2(Double_t clusterChi2)
set cluster Chi2
void Print(Option_t *option="") const
void SetTrackChi2(Double_t trackChi2)
set track Chi2
Int_t GetDetElemId() const
Return detection element ID, part of the cluster ID.
void SetZ(Double_t z)
Set cluster/track Z-position (cm)
Int_t GetEventId() const
return event ID
Int_t GetNPadsXB() const
return the number of pads attached to the cluster
Int_t fRunId
run number
Double32_t fTrackP
track momentum
Int_t GetRunId() const
return run ID
Int_t GetNPadsB() const
return the number of bending pads attached to the cluster
Double_t GetClusterX() const
Return cluster X-position (cm)
TClonesArray * fPads
Array of pads attached to the cluster.
UInt_t fTrackChamberHitMap
Map of clusters in tracking chambers.
void SetClusterXYErr(Double_t xErr, Double_t yErr)
Set cluster resolution (cm)
virtual void Clear(Option_t *opt="")
Double32_t fClusterChi2
cluster chi2
Int_t GetNPadsXNB() const
return the number of pads attached to the cluster
void SetTrackThetaXY(Double_t thetaX, Double_t thetaY)
Set track angles (radian)
Double32_t fTrackXErr
track X resolution
Int_t GetNPadsY(Int_t iC) const
return the number of pads attached to the cluster
Double32_t fClusterYErr
cluster Y resolution
Short_t GetTrackCharge() const
Return the muon charge.
Double32_t fZ
track/cluster Z position
void SetTrackP(Double_t p)
Set track momentum (MeV/c)
void SetEventId(Int_t eventId)
set event number
TClonesArray & GetPads() const
return the array of pads attached to the cluster
Double_t GetClusterYErr() const
Return cluster Y-resolution (cm)
Double_t GetZ() const
Return cluster/track Z-position (cm)
void SetTrackId(UInt_t trackId)
set track ID
Double32_t fClusterXErr
cluster X resolution
void SetTrackXY(Double_t x, Double_t y)
Set track coordinates (cm)
Double32_t fClusterY
cluster Y position
Double_t GetClusterXErr() const
Return cluster X-resolution (cm)
Double32_t fClusterX
cluster X position
Double_t GetClusterCharge() const
Return the total cluster charge.
void SetTrackXYErr(Double_t xErr, Double_t yErr)
Set track resolution (cm)
void SetRunId(Int_t runId)
set run number
Int_t GetNPadsX(Int_t iC) const
return the number of pads attached to the cluster
UInt_t GetTrackChamberHitMap() const
Get the map of hit chambers.
Int_t GetNPadsYNB() const
return the number of pads attached to the cluster
AliMUONClusterInfo & operator=(const AliMUONClusterInfo &cluster)
Double32_t fTrackY
track Y position
UInt_t fClusterId
cluster ID
Int_t GetNPadsNB() const
return the number of non bending pads attached to the cluster
Double_t GetClusterChi2() const
return cluster Chi2
UChar_t GetTrackNHits(void) const
Get the total number of hits associated to the track leaving this cluster.
Int_t GetChamberId() const
Return chamber ID (0..), part of the cluster ID.
void SetTrackChamberHitMap(UInt_t trackChamberHitMap)
Set the map of hit chambers.
Double32_t fTrackYErr
track Y resolution
Class to summarize ESD data at cluster.
Class to summarize ESD data at pad.
void AddPad(const AliMUONPadInfo &pad)
attach a pad to the cluster
Double32_t fTrackThetaY
track Theta_Y angle
UInt_t GetClusterId() const
return cluster ID
Double_t GetTrackChi2() const
return track Chi2
Double_t GetTrackThetaX() const
Return track ThetaX angle (radian)
void SetTrackCharge(Short_t charge)
Set the muon charge.
UChar_t fTrackNHits
track number of hits
void SetClusterId(UInt_t clusterId)
set cluster ID
Bool_t IsChamberHit(Int_t chamber) const
Is chamber hit by track.
Double_t GetClusterY() const
Return cluster Y-position (cm)
UInt_t GetTrackId() const
return track ID