Adding more bins in QA (Alis)
[u/mrichter/AliRoot.git] / MUON / AliMUONClusterInfo.h
CommitLineData
faa8d921 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
81f1d3ae 9/// \ingroup calign
faa8d921 10/// \class AliMUONClusterInfo
11/// \brief Class to summarize ESD data at cluster
12// Author Philippe Pillot, Subatech
13
14
15#include <TObject.h>
16#include <TClonesArray.h>
17#include <AliMUONPadInfo.h>
18
19class AliMUONClusterInfo : public TObject {
20public:
21 AliMUONClusterInfo(); // Constructor
d5028716 22 AliMUONClusterInfo(TRootIOCtor* /*rio*/); // IO constructor
faa8d921 23 virtual ~AliMUONClusterInfo(); //< Destructor
24 AliMUONClusterInfo(const AliMUONClusterInfo& cluster);
25 AliMUONClusterInfo& operator=(const AliMUONClusterInfo& cluster);
26
27 virtual void Clear(Option_t* opt = "");
28
29 void Print(Option_t * option = "") const;
30
31
32 // ------ general info ------
41c52850 33 /// set run number
34 void SetRunId(Int_t runId) {fRunId = runId;}
35 /// return run ID
36 Int_t GetRunId() const {return fRunId;}
37
faa8d921 38 /// set event number
39 void SetEventId(Int_t eventId) {fEventId = eventId;}
40 /// return event ID
41 Int_t GetEventId() const {return fEventId;}
41c52850 42
faa8d921 43
44 /// Set cluster/track Z-position (cm)
45 void SetZ(Double_t z) {fZ = z;}
46 /// Return cluster/track Z-position (cm)
47 Double_t GetZ() const {return fZ;}
48
49
50 // ------ cluster info ------
51 /// set cluster ID
52 void SetClusterId(UInt_t clusterId) {fClusterId = clusterId; SetUniqueID(clusterId);}
53 /// return cluster ID
54 UInt_t GetClusterId() const {return fClusterId;}
55 /// Return chamber ID (0..), part of the cluster ID
56 Int_t GetChamberId() const {return (fClusterId & 0xF0000000) >> 28;}
57 /// Return detection element ID, part of the cluster ID
58 Int_t GetDetElemId() const {return (fClusterId & 0x0FFE0000) >> 17;}
59 /// Return the index of this cluster (0..), part of the cluster ID
60 Int_t GetClusterIndex() const {return (fClusterId & 0x0001FFFF);}
61
62 /// Set cluster coordinates (cm)
63 void SetClusterXY(Double_t x, Double_t y) {fClusterX = x; fClusterY = y;}
64 /// Return cluster X-position (cm)
65 Double_t GetClusterX() const {return fClusterX;}
66 /// Return cluster Y-position (cm)
67 Double_t GetClusterY() const {return fClusterY;}
68
69 /// Set cluster resolution (cm)
70 void SetClusterXYErr(Double_t xErr, Double_t yErr) {fClusterXErr = xErr; fClusterYErr = yErr;}
71 /// Return cluster X-resolution (cm)
72 Double_t GetClusterXErr() const {return fClusterXErr;}
73 /// Return cluster Y-resolution (cm)
74 Double_t GetClusterYErr() const {return fClusterYErr;}
75
76 /// set cluster Chi2
77 void SetClusterChi2(Double_t clusterChi2) {fClusterChi2 = clusterChi2;}
78 /// return cluster Chi2
79 Double_t GetClusterChi2() const {return fClusterChi2;}
80
81 /// Set the total cluster charge
82 void SetClusterCharge(Double_t charge) {fClusterCharge = charge;}
83 /// Return the total cluster charge
84 Double_t GetClusterCharge() const {return fClusterCharge;}
41c52850 85 /// Return the cluster charge for cathode iC
86 Double_t GetClusterCharge(Int_t iC) const ;
87 /// Return the bending cluster charge
88 Double_t GetClusterChargeB() const {return GetClusterCharge(0);}
89 /// Return the non bending cluster charge
90 Double_t GetClusterChargeNB() const {return GetClusterCharge(1);}
faa8d921 91
92
93 // ------ track info ------
94 /// set track ID
95 void SetTrackId(UInt_t trackId) {fTrackId = trackId;}
96 /// return track ID
97 UInt_t GetTrackId() const {return fTrackId;}
98
99 /// Set track coordinates (cm)
100 void SetTrackXY(Double_t x, Double_t y) {fTrackX = x; fTrackY = y;}
101 /// Return track X-position (cm)
102 Double_t GetTrackX() const {return fTrackX;}
103 /// Return track Y-position (cm)
104 Double_t GetTrackY() const {return fTrackY;}
105 /// Set track angles (radian)
106 void SetTrackThetaXY(Double_t thetaX, Double_t thetaY) {fTrackThetaX = thetaX; fTrackThetaY = thetaY;}
107 /// Return track ThetaX angle (radian)
108 Double_t GetTrackThetaX() const {return fTrackThetaX;}
109 /// Return track ThetaY angle (radian)
110 Double_t GetTrackThetaY() const {return fTrackThetaY;}
111 /// Set track momentum (MeV/c)
112 void SetTrackP(Double_t p) {fTrackP = p;}
113 /// Return track momentum (MeV/c)
114 Double_t GetTrackP() const {return fTrackP;}
115
116 /// Set track resolution (cm)
117 void SetTrackXYErr(Double_t xErr, Double_t yErr) {fTrackXErr = xErr; fTrackYErr = yErr;}
118 /// Return track X-resolution (cm)
119 Double_t GetTrackXErr() const {return fTrackXErr;}
120 /// Return track Y-resolution (cm)
121 Double_t GetTrackYErr() const {return fTrackYErr;}
122
123 /// set track Chi2
124 void SetTrackChi2(Double_t trackChi2) {fTrackChi2 = trackChi2;}
125 /// return track Chi2
126 Double_t GetTrackChi2() const {return fTrackChi2;}
127
128 /// Set the muon charge
129 void SetTrackCharge(Short_t charge) {fTrackCharge = charge;}
130 /// Return the muon charge
131 Short_t GetTrackCharge() const {return fTrackCharge;}
41c52850 132
133 /// Get the total number of hits associated to the track leaving this cluster
134 UChar_t GetTrackNHits(void) const {return fTrackNHits;}
135 /// Set the total number of hits associated to the track leaving this cluster
136 void SetTrackNHits(UInt_t NHits) {fTrackNHits = NHits;}
137
138 /// Get the map of hit chambers
139 UInt_t GetTrackChamberHitMap() const {return fTrackChamberHitMap;}
140 /// Set the map of hit chambers
141 void SetTrackChamberHitMap(UInt_t trackChamberHitMap) {fTrackChamberHitMap = trackChamberHitMap;}
142 /// Is chamber hit by track
143 Bool_t IsChamberHit(Int_t chamber) const {return (Bool_t) ((fTrackChamberHitMap & BIT(chamber)) != 0);}
faa8d921 144
145 // ------ pad info ------
146 /// return the number of pads attached to the cluster
147 Int_t GetNPads() const {return fPads->GetEntriesFast();}
41c52850 148 /// return the number of pads attached to the cluster in cathode iC
149 Int_t GetNPads(Int_t iC) const ;
150 /// return the number of bending pads attached to the cluster
151 Int_t GetNPadsB() const {return GetNPads(0);}
152 /// return the number of non bending pads attached to the cluster
153 Int_t GetNPadsNB() const {return GetNPads(1);}
154 /// return the number of pads attached to the cluster
155 Int_t GetNPadsX(Int_t iC) const ;
156 /// return the number of pads attached to the cluster
157 Int_t GetNPadsXB() const {return GetNPadsX(0);}
158 /// return the number of pads attached to the cluster
159 Int_t GetNPadsXNB() const {return GetNPadsX(1);}
160 /// return the number of pads attached to the cluster
161 Int_t GetNPadsY(Int_t iC) const ;
162 /// return the number of pads attached to the cluster
163 Int_t GetNPadsYB() const {return GetNPadsY(0);}
164 /// return the number of pads attached to the cluster
165 Int_t GetNPadsYNB() const {return GetNPadsY(1);}
faa8d921 166 /// return the array of pads attached to the cluster
167 TClonesArray& GetPads() const {return *fPads;}
168 /// attach a pad to the cluster
169 void AddPad(const AliMUONPadInfo &pad) {new ((*fPads)[fNPads++]) AliMUONPadInfo(pad);}
170
171
172protected:
173
174 // general info
41c52850 175 Int_t fRunId; ///< run number
faa8d921 176 Int_t fEventId; ///< event number
177 Double32_t fZ; ///< track/cluster Z position
178
179 // cluster info
180 UInt_t fClusterId; ///< cluster ID
181 Double32_t fClusterX; ///< cluster X position
182 Double32_t fClusterY; ///< cluster Y position
183 Double32_t fClusterXErr; ///< cluster X resolution
184 Double32_t fClusterYErr; ///< cluster Y resolution
185 Double32_t fClusterChi2; ///< cluster chi2
186 Double32_t fClusterCharge; ///< cluster charge
187
188 // track info
189 UInt_t fTrackId; ///< track ID
190 Double32_t fTrackX; ///< track X position
191 Double32_t fTrackY; ///< track Y position
192 Double32_t fTrackThetaX; ///< track Theta_X angle
193 Double32_t fTrackThetaY; ///< track Theta_Y angle
194 Double32_t fTrackP; ///< track momentum
195 Double32_t fTrackXErr; ///< track X resolution
196 Double32_t fTrackYErr; ///< track Y resolution
197 Double32_t fTrackChi2; ///< track normalized chi2
198 Short_t fTrackCharge; ///< track charge
41c52850 199 UChar_t fTrackNHits; ///< track number of hits
200 UInt_t fTrackChamberHitMap; ///< Map of clusters in tracking chambers
201
faa8d921 202 Int_t fNPads; ///< nPads
203 TClonesArray* fPads; ///< Array of pads attached to the cluster
204
81f1d3ae 205 ClassDef(AliMUONClusterInfo, 3) //Class to summarize ESD data at cluster
faa8d921 206};
207
208#endif