1 |
loizides |
1.1 |
//--------------------------------------------------------------------------------------------------
|
2 |
bendavid |
1.17 |
// $Id: Muon.h,v 1.16 2008/09/17 04:16:49 loizides Exp $
|
3 |
loizides |
1.1 |
//
|
4 |
|
|
// Muon
|
5 |
|
|
//
|
6 |
|
|
// Details to be worked out...
|
7 |
|
|
//
|
8 |
loizides |
1.16 |
// Authors: J.Bendavid, C.Loizides, C.Paus, P.Harris
|
9 |
loizides |
1.1 |
//--------------------------------------------------------------------------------------------------
|
10 |
loizides |
1.6 |
|
11 |
loizides |
1.16 |
#ifndef MITANA_DATATREE_MUON_H
|
12 |
|
|
#define MITANA_DATATREE_MUON_H
|
13 |
loizides |
1.8 |
|
14 |
|
|
#include <TRef.h>
|
15 |
loizides |
1.16 |
#include "MitAna/DataTree/interface/Track.h"
|
16 |
bendavid |
1.11 |
#include "MitAna/DataTree/interface/ChargedParticle.h"
|
17 |
pharris |
1.15 |
|
18 |
|
|
namespace mithep {
|
19 |
|
|
class Muon : public ChargedParticle {
|
20 |
loizides |
1.1 |
public:
|
21 |
|
|
Muon() {}
|
22 |
|
|
~Muon() {}
|
23 |
bendavid |
1.2 |
|
24 |
loizides |
1.16 |
const Track *BestTrk() const;
|
25 |
|
|
const Track *GlobalTrk() const;
|
26 |
|
|
const Track *StandaloneTrk() const;
|
27 |
|
|
const Track *TrackerTrk() const;
|
28 |
|
|
const Track *Trk() const { return BestTrk(); }
|
29 |
pharris |
1.15 |
Double_t IsoR03SumPt() const { return fIsoR03SumPt; }
|
30 |
|
|
Double_t IsoR03EmEt() const { return fIsoR03EmEt; }
|
31 |
|
|
Double_t IsoR03HadEt() const { return fIsoR03HadEt; }
|
32 |
|
|
Double_t IsoR03HoEt() const { return fIsoR03HoEt; }
|
33 |
|
|
Int_t IsoR03NTracks() const { return fIsoR03NTracks; }
|
34 |
|
|
Int_t IsoR03NJets() const { return fIsoR03NJets; }
|
35 |
|
|
Double_t IsoR05SumPt() const { return fIsoR05SumPt; }
|
36 |
|
|
Double_t IsoR05EmEt() const { return fIsoR05EmEt; }
|
37 |
|
|
Double_t IsoR05HadEt() const { return fIsoR05HadEt; }
|
38 |
|
|
Double_t IsoR05HoEt() const { return fIsoR05HoEt; }
|
39 |
|
|
Int_t IsoR05NTracks() const { return fIsoR05NTracks; }
|
40 |
|
|
Int_t IsoR05NJets() const { return fIsoR05NJets; }
|
41 |
|
|
Double_t EmEnergy() const { return fEmEnergy; }
|
42 |
|
|
Double_t HadEnergy() const { return fHadEnergy; }
|
43 |
|
|
Double_t HoEnergy() const { return fHoEnergy; }
|
44 |
|
|
Double_t EmS9Energy() const { return fEmS9Energy; }
|
45 |
|
|
Double_t HadS9Energy() const { return fHadS9Energy; }
|
46 |
|
|
Double_t HoS9Energy() const { return fHoS9Energy; }
|
47 |
loizides |
1.16 |
Double_t Mass() const { return 105.658369e-3; }
|
48 |
|
|
Int_t NChambers() const { return fNTraversedChambers; }
|
49 |
|
|
Int_t NSegments() const { return fStationMask.NBitsSet(); }
|
50 |
|
|
Bool_t StationBit(Int_t bit) const { return fStationMask.TestBit(bit); }
|
51 |
|
|
Double_t GetDX(Int_t iStation) const;
|
52 |
|
|
Double_t GetDY(Int_t iStation) const;
|
53 |
|
|
Double_t GetPullX(Int_t iStation) const;
|
54 |
|
|
Double_t GetPullY(Int_t iStation) const;
|
55 |
|
|
Double_t GetTrackDist(Int_t iStation) const;
|
56 |
|
|
Double_t GetTrackDistErr(Int_t iStation) const;
|
57 |
|
|
Int_t GetNSegments(Int_t iStation) const;
|
58 |
sixie |
1.13 |
void SetGlobalTrk(Track* t) { fGlobalTrackRef = t; }
|
59 |
|
|
void SetStandaloneTrk(Track* t) { fStandaloneTrackRef = t; }
|
60 |
|
|
void SetTrackerTrk(Track* t) { fTrackerTrackRef = t; }
|
61 |
|
|
void SetIsoR03SumPt(Double_t isoR03SumPt) { fIsoR03SumPt = isoR03SumPt; }
|
62 |
|
|
void SetIsoR03EmEt(Double_t isoR03EmEt) { fIsoR03EmEt = isoR03EmEt; }
|
63 |
|
|
void SetIsoR03HadEt(Double_t isoR03HadEt) { fIsoR03HadEt = isoR03HadEt; }
|
64 |
|
|
void SetIsoR03HoEt(Double_t isoR03HoEt) { fIsoR03HoEt = isoR03HoEt; }
|
65 |
|
|
void SetIsoR03NTracks(Int_t isoR03NTracks) { fIsoR03NTracks = isoR03NTracks; }
|
66 |
|
|
void SetIsoR03NJets(Int_t isoR03NJets) { fIsoR03NJets = isoR03NJets; }
|
67 |
|
|
void SetIsoR05SumPt(Double_t isoR05SumPt) { fIsoR05SumPt = isoR05SumPt; }
|
68 |
|
|
void SetIsoR05EmEt(Double_t isoR05EmEt) { fIsoR05EmEt = isoR05EmEt; }
|
69 |
|
|
void SetIsoR05HadEt(Double_t isoR05HadEt) { fIsoR05HadEt = isoR05HadEt; }
|
70 |
|
|
void SetIsoR05HoEt(Double_t isoR05HoEt) { fIsoR05HoEt = isoR05HoEt; }
|
71 |
|
|
void SetIsoR05NTracks(Int_t isoR05NTracks) { fIsoR05NTracks = isoR05NTracks; }
|
72 |
|
|
void SetIsoR05NJets(Int_t isoR05NJets) { fIsoR05NJets = isoR05NJets; }
|
73 |
|
|
void SetEmEnergy(Double_t EmEnergy) { fEmEnergy = EmEnergy; }
|
74 |
|
|
void SetHadEnergy(Double_t HadEnergy) { fHadEnergy = HadEnergy; }
|
75 |
|
|
void SetHoEnergy(Double_t HoEnergy) { fHoEnergy = HoEnergy; }
|
76 |
|
|
void SetEmS9Energy(Double_t EmS9Energy) { fEmS9Energy = EmS9Energy; }
|
77 |
|
|
void SetHadS9Energy(Double_t HadS9Energy) { fHadS9Energy = HadS9Energy; }
|
78 |
|
|
void SetHoS9Energy(Double_t HoS9Energy) { fHoS9Energy = HoS9Energy; }
|
79 |
loizides |
1.16 |
void SetNChambers(Int_t iNTraCh) { fNTraversedChambers = iNTraCh; }
|
80 |
|
|
void SetStationMask(UInt_t iStMask) { fStationMask.SetBits(iStMask); }
|
81 |
|
|
void SetDX(Int_t iStation, Double_t iDX);
|
82 |
|
|
void SetDY(Int_t iStation, Double_t iDY);
|
83 |
|
|
void SetPullX(Int_t iStation, Double_t iPullX);
|
84 |
|
|
void SetPullY(Int_t iStation, Double_t iPullY);
|
85 |
|
|
void SetTrackDist(Int_t iStation, Double_t iDist);
|
86 |
|
|
void SetTrackDistErr(Int_t iStation, Double_t iDistErr);
|
87 |
|
|
void SetNSegments(Int_t iStation, Int_t NSegments);
|
88 |
pharris |
1.15 |
|
89 |
loizides |
1.8 |
protected:
|
90 |
loizides |
1.9 |
TRef fGlobalTrackRef; //global combined track reference
|
91 |
|
|
TRef fStandaloneTrackRef; //standalone muon track reference
|
92 |
|
|
TRef fTrackerTrackRef; //tracker track reference
|
93 |
loizides |
1.16 |
Double32_t fIsoR03SumPt; //isolation size R=0.3 sum pt
|
94 |
|
|
Double32_t fIsoR03EmEt; //isolation size R=0.3 em trans energy
|
95 |
|
|
Double32_t fIsoR03HadEt; //isolation size R=0.3 had trans energy
|
96 |
|
|
Double32_t fIsoR03HoEt; //isolation size R=0.3 ho trans energy
|
97 |
|
|
Int_t fIsoR03NTracks; //isolation size R=0.3 number of tracks
|
98 |
|
|
Int_t fIsoR03NJets; //isolation size R=0.3 number of jets
|
99 |
|
|
Double32_t fIsoR05SumPt; //isolation size R=0.5 sum pt
|
100 |
|
|
Double32_t fIsoR05EmEt; //isolation size R=0.5 em trans energy
|
101 |
|
|
Double32_t fIsoR05HadEt; //isolation size R=0.5 had trans energy
|
102 |
|
|
Double32_t fIsoR05HoEt; //isolation size R=0.5 ho trans energy
|
103 |
|
|
Int_t fIsoR05NTracks; //isolation size R=0.5 number of tracks
|
104 |
|
|
Int_t fIsoR05NJets; //isolation size R=0.5 number of jets
|
105 |
|
|
Double32_t fEmEnergy; //?
|
106 |
|
|
Double32_t fHadEnergy; //?
|
107 |
|
|
Double32_t fHoEnergy; //?
|
108 |
|
|
Double32_t fEmS9Energy; //?
|
109 |
|
|
Double32_t fHadS9Energy; //?
|
110 |
|
|
Double32_t fHoS9Energy; //?
|
111 |
|
|
Int_t fNTraversedChambers; //number of tranversed chambers
|
112 |
|
|
BitMask8 fStationMask; //bitmap of station with tracks, 0-3 DT, 4-7 CSCs segment components
|
113 |
|
|
Double32_t fDX[8]; //uncertainty in x in given muon chamber
|
114 |
|
|
Double32_t fDY[8]; //uncertainty in y in given muon chamber
|
115 |
|
|
Double32_t fPullX[8]; //pull in x in given muon chamber
|
116 |
|
|
Double32_t fPullY[8]; //pull in y in given muon chamber
|
117 |
|
|
Double32_t fTrackDist[8]; //distance to track in tranverse plane in given muon chamber
|
118 |
|
|
Double32_t fTrackDistErr[8]; //error of distance to track in transverse plane in given muon chamber
|
119 |
|
|
Int_t fNSegments[8]; //number of segments in chamber in given muon chamber
|
120 |
|
|
|
121 |
loizides |
1.7 |
ClassDef(Muon, 1) // Muon class
|
122 |
loizides |
1.1 |
};
|
123 |
loizides |
1.4 |
}
|
124 |
loizides |
1.8 |
|
125 |
loizides |
1.9 |
//--------------------------------------------------------------------------------------------------
|
126 |
loizides |
1.10 |
inline const mithep::Track *mithep::Muon::BestTrk() const
|
127 |
|
|
{
|
128 |
|
|
// Return "best" track.
|
129 |
|
|
|
130 |
|
|
if (GlobalTrk())
|
131 |
|
|
return GlobalTrk();
|
132 |
bendavid |
1.17 |
else if (TrackerTrk())
|
133 |
|
|
return TrackerTrk();
|
134 |
loizides |
1.10 |
else if (StandaloneTrk())
|
135 |
|
|
return StandaloneTrk();
|
136 |
|
|
|
137 |
|
|
return 0;
|
138 |
|
|
}
|
139 |
|
|
|
140 |
|
|
//--------------------------------------------------------------------------------------------------
|
141 |
|
|
inline const mithep::Track *mithep::Muon::GlobalTrk() const
|
142 |
loizides |
1.9 |
{
|
143 |
|
|
// Return global combined track.
|
144 |
|
|
|
145 |
|
|
return static_cast<const Track*>(fGlobalTrackRef.GetObject());
|
146 |
|
|
}
|
147 |
|
|
|
148 |
|
|
//--------------------------------------------------------------------------------------------------
|
149 |
loizides |
1.10 |
inline const mithep::Track *mithep::Muon::StandaloneTrk() const
|
150 |
loizides |
1.9 |
{
|
151 |
|
|
// Return standalone track.
|
152 |
|
|
|
153 |
|
|
return static_cast<const Track*>(fStandaloneTrackRef.GetObject());
|
154 |
|
|
}
|
155 |
|
|
|
156 |
|
|
//--------------------------------------------------------------------------------------------------
|
157 |
loizides |
1.10 |
inline const mithep::Track *mithep::Muon::TrackerTrk() const
|
158 |
loizides |
1.9 |
{
|
159 |
|
|
// Return tracker track.
|
160 |
|
|
|
161 |
|
|
return static_cast<const Track*>(fTrackerTrackRef.GetObject());
|
162 |
|
|
}
|
163 |
pharris |
1.15 |
|
164 |
loizides |
1.16 |
//--------------------------------------------------------------------------------------------------
|
165 |
|
|
inline Double_t mithep::Muon::GetDX(Int_t iStation) const
|
166 |
|
|
{
|
167 |
|
|
// Return uncertainty in x in given chamber.
|
168 |
|
|
|
169 |
|
|
assert(iStation >= 0 && iStation < 8);
|
170 |
|
|
return fDX[iStation];
|
171 |
|
|
}
|
172 |
|
|
|
173 |
|
|
//--------------------------------------------------------------------------------------------------
|
174 |
|
|
inline Double_t mithep::Muon::GetDY(Int_t iStation) const
|
175 |
|
|
{
|
176 |
|
|
// Return uncertainty in y in given chamber.
|
177 |
|
|
|
178 |
|
|
assert(iStation >= 0 && iStation < 8);
|
179 |
|
|
return fDY[iStation];
|
180 |
|
|
}
|
181 |
|
|
|
182 |
|
|
//--------------------------------------------------------------------------------------------------
|
183 |
|
|
inline Double_t mithep::Muon::GetPullX(Int_t iStation) const
|
184 |
|
|
{
|
185 |
|
|
// Return pull in x in given chamber.
|
186 |
|
|
|
187 |
|
|
assert(iStation >= 0 && iStation < 8);
|
188 |
|
|
return fPullX[iStation];
|
189 |
|
|
}
|
190 |
|
|
|
191 |
|
|
//--------------------------------------------------------------------------------------------------
|
192 |
|
|
inline Double_t mithep::Muon::GetPullY(Int_t iStation) const
|
193 |
|
|
{
|
194 |
|
|
// Return pull in y in given chamber.
|
195 |
|
|
|
196 |
|
|
assert(iStation >= 0 && iStation < 8);
|
197 |
|
|
return fPullY[iStation];
|
198 |
|
|
}
|
199 |
|
|
|
200 |
|
|
//--------------------------------------------------------------------------------------------------
|
201 |
|
|
inline Double_t mithep::Muon::GetTrackDist(Int_t iStation) const
|
202 |
|
|
{
|
203 |
|
|
// Return track distance in given chamber.
|
204 |
|
|
|
205 |
|
|
assert(iStation >= 0 && iStation < 8);
|
206 |
|
|
return fTrackDist[iStation];
|
207 |
|
|
}
|
208 |
|
|
|
209 |
|
|
//--------------------------------------------------------------------------------------------------
|
210 |
|
|
inline Double_t mithep::Muon::GetTrackDistErr(Int_t iStation) const
|
211 |
|
|
{
|
212 |
|
|
// Return error of track distance in given chamber.
|
213 |
|
|
|
214 |
|
|
assert(iStation >= 0 && iStation < 8);
|
215 |
|
|
return fTrackDistErr[iStation];
|
216 |
|
|
}
|
217 |
|
|
|
218 |
|
|
//--------------------------------------------------------------------------------------------------
|
219 |
|
|
inline Int_t mithep::Muon::GetNSegments(Int_t iStation) const
|
220 |
|
|
{
|
221 |
|
|
// Return number of segments in chamber.
|
222 |
|
|
|
223 |
|
|
assert(iStation >= 0 && iStation < 8);
|
224 |
|
|
return fNSegments[iStation];
|
225 |
|
|
}
|
226 |
|
|
|
227 |
|
|
//--------------------------------------------------------------------------------------------------
|
228 |
|
|
inline void mithep::Muon::SetDX(Int_t iStation, Double_t iDX)
|
229 |
|
|
{
|
230 |
|
|
// Return uncertainty in x in given chamber.
|
231 |
|
|
|
232 |
|
|
assert(iStation >= 0 && iStation < 8);
|
233 |
|
|
fDX[iStation] = iDX;
|
234 |
|
|
}
|
235 |
|
|
|
236 |
|
|
//--------------------------------------------------------------------------------------------------
|
237 |
|
|
inline void mithep::Muon::SetDY(Int_t iStation, Double_t iDY)
|
238 |
|
|
{
|
239 |
|
|
// Return uncertainty in y in given chamber.
|
240 |
|
|
|
241 |
|
|
assert(iStation >= 0 && iStation < 8);
|
242 |
|
|
fDY[iStation] = iDY;
|
243 |
|
|
}
|
244 |
|
|
|
245 |
|
|
//--------------------------------------------------------------------------------------------------
|
246 |
|
|
inline void mithep::Muon::SetPullX(Int_t iStation, Double_t iPullX)
|
247 |
|
|
{
|
248 |
|
|
// Set pull in x in given chamber.
|
249 |
|
|
|
250 |
|
|
assert(iStation >= 0 && iStation < 8);
|
251 |
|
|
fPullX[iStation] = iPullX;
|
252 |
|
|
}
|
253 |
|
|
|
254 |
|
|
//--------------------------------------------------------------------------------------------------
|
255 |
|
|
inline void mithep::Muon::SetPullY(Int_t iStation, Double_t iPullY)
|
256 |
|
|
{
|
257 |
|
|
// Set pull in y in given chamber.
|
258 |
|
|
|
259 |
|
|
assert(iStation >= 0 && iStation < 8);
|
260 |
|
|
fPullY[iStation] = iPullY;
|
261 |
|
|
}
|
262 |
|
|
|
263 |
|
|
//--------------------------------------------------------------------------------------------------
|
264 |
|
|
inline void mithep::Muon::SetTrackDist(Int_t iStation, Double_t iDist)
|
265 |
|
|
{
|
266 |
|
|
// Set track distance in given chamber.
|
267 |
|
|
|
268 |
|
|
assert(iStation >= 0 && iStation < 8);
|
269 |
|
|
fTrackDist[iStation] = iDist;
|
270 |
|
|
}
|
271 |
|
|
|
272 |
|
|
//--------------------------------------------------------------------------------------------------
|
273 |
|
|
inline void mithep::Muon::SetTrackDistErr(Int_t iStation, Double_t iDistErr)
|
274 |
|
|
{
|
275 |
|
|
// Set error of track distance in given chamber.
|
276 |
pharris |
1.15 |
|
277 |
loizides |
1.16 |
assert(iStation >= 0 && iStation < 8);
|
278 |
|
|
fTrackDistErr[iStation] = iDistErr;
|
279 |
|
|
}
|
280 |
pharris |
1.15 |
|
281 |
loizides |
1.16 |
//--------------------------------------------------------------------------------------------------
|
282 |
|
|
inline void mithep::Muon::SetNSegments(Int_t iStation, Int_t NSegments)
|
283 |
|
|
{
|
284 |
|
|
// Set number of segments in chamber.
|
285 |
pharris |
1.15 |
|
286 |
loizides |
1.16 |
assert(iStation >= 0 && iStation < 8);
|
287 |
|
|
fNSegments[iStation] = NSegments;
|
288 |
|
|
}
|
289 |
|
|
#endif
|