ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Muon.h
Revision: 1.34
Committed: Fri Mar 26 21:40:11 2010 UTC (15 years, 1 month ago) by sixie
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_013d, Mit_013c, Mit_013b, Mit_013a
Changes since 1.33: +8 -4 lines
Log Message:
Add Muon Quality variables

File Contents

# Content
1 //--------------------------------------------------------------------------------------------------
2 // $Id: Muon.h,v 1.33 2010/03/22 18:54:19 bendavid Exp $
3 //
4 // Muon
5 //
6 // Classified into 3 Types
7 // Standalone : Muon fit from hits in the muon chambers
8 // Tracker : Tracker matched track to muon chambers with segments
9 // Global : Combined track and muon chambers fit
10 //
11 // In the muon class all three muon classes exist and can be determined by checking
12 // whether a fit track exists for such a Muon (eg HasTrackerTrk() == kTRUE). When
13 // BestTrk function is called the global fit is returned, if that does not
14 // exist the tracker fit is returned upon that failure the standalone muon
15 // is subsequently returned. To consult more see:
16 // http://cmsdoc.cern.ch/cms/Physics/muon/MPOG/Notes/MuonReco.pdf
17 //
18 // Quality Varaibles for Selection
19 // Isolation : decomposed to IsoRNNXXXXX
20 // NN = 03,05 to denote R =0.3,0.5 in Isolation Cone
21 // XXXXX = SumPt - Sum of Pt of Tracks in Cone (using all Pt Tracks)
22 // XXXXX = EmEt - Sum of Et of Em component of Calo Towers (Veto=0.08)
23 // XXXXX = HadEt - Sum of Et of Had component of Calo Towers (Veto=0.1)
24 // XXXXX = HoEt - Sum of Pt of Ho component of Calo Towers (Veto=0.1)
25 // XXXXX = NTrk - Number of Tracks within Cone (using all Pt Tracks)
26 // XXXXX = NJet - Sum of Jets inside Cone
27 //
28 // Muon Quality Variables
29 // Extracted from the Muon Tracking Associator
30 // For more se https://twiki.cern.ch/twiki/bin/view/CMS/TrackAssociator
31 // Energy Variables : Energy within (5x5 Ecal Crystal/Hcal/Ho) along Track
32 // using calo towers
33 // S9 Energy Variables : Energy using reconstructed hits calo towers default
34 // Segment Variables :
35 // Segment variables are stored in array of 8:
36 // 0-3: Correspond to segments in 4 DT chambers in->outward(3 has no Y res)
37 // 4-7: Correspond to segments in 4 CSC chambers in->out
38 // If value undetermined 999999 is returned.
39 // Variables:
40 // DX,DY,PullX,PullY: Uncertainties/Pulls of propagated track
41 // with respect to local muon segment
42 // TrackDist,TrackDistErr: Summed Dist/Err (in X,Y) of segment with respect
43 // to propagated track
44 // NSegments : Number of segments in muon using Segment+Track Arbitration
45 // NChambers : Number of muon chambers traversed in propagated track
46 // LastHit : Returns farest (from center) station with a recorded segment
47 // LastStation : Returns farest station using Segment+Track Arbitration
48 //
49 // Muon Id Methods: Please see Muon Id Note(as of now unpublished):
50 // https://www.cmsaf.mit.edu/twiki/pub/CmsHep/HepWAnalysis/MuonID-ingo.pdf
51 // TMOneStation : Returns bool whether muon passes "Tracker Muon One StationId"
52 // -Matching criteria for one of all segments matched to muon
53 // TMLastStation : Returns bool whether muon passes "LastStation Id" criteria
54 // -Matching criteria for last most segment
55 //
56 // Authors: J.Bendavid, C.Loizides, C.Paus, P.Harris
57 //--------------------------------------------------------------------------------------------------
58
59 #ifndef MITANA_DATATREE_MUON_H
60 #define MITANA_DATATREE_MUON_H
61
62 #include "MitAna/DataTree/interface/Track.h"
63 #include "MitAna/DataTree/interface/ChargedParticle.h"
64 #include "MitAna/DataTree/interface/MuonQuality.h"
65
66 namespace mithep {
67 class Muon : public ChargedParticle {
68 public:
69 Muon();
70
71 enum EClassType {
72 kNone, //no track assigned
73 kGlobal, //"Global"
74 kTracker, //"Tracker"
75 kSta, //"Standalone"
76 kAny //any "best" of the above
77 };
78
79 const Track *BestTrk() const;
80 const Track *GlobalTrk() const { return fGlobalTrkRef.Obj(); }
81 const Track *StandaloneTrk() const { return fStaTrkRef.Obj(); }
82 const Track *TrackerTrk() const { return fTrkTrkRef.Obj(); }
83 const Track *Trk() const { return BestTrk(); }
84 Double_t EmEnergy() const { return fEmEnergy; }
85 Double_t EmS9Energy() const { return fEmS9Energy; }
86 Double_t GetDX(Int_t iStation) const;
87 Double_t GetDY(Int_t iStation) const;
88 Double_t GetPullX(Int_t iStation) const;
89 Double_t GetPullY(Int_t iStation) const;
90 Double_t GetTrackDist(Int_t iStation) const;
91 Double_t GetTrackDistErr(Int_t iStation) const;
92 Int_t GetNSegments(Int_t iStation) const;
93 Bool_t Has(EClassType type) const;
94 Bool_t HasTrk() const;
95 Bool_t HasGlobalTrk() const { return fGlobalTrkRef.IsValid(); }
96 Bool_t HasStandaloneTrk() const { return fStaTrkRef.IsValid(); }
97 Bool_t HasTrackerTrk() const { return fTrkTrkRef.IsValid(); }
98 Double_t HadEnergy() const { return fHadEnergy; }
99 Double_t HadS9Energy() const { return fHadS9Energy; }
100 Double_t HoEnergy() const { return fHoEnergy; }
101 Double_t HoS9Energy() const { return fHoS9Energy; }
102 EClassType Is() const;
103 Bool_t IsGlobalMuon() const { return fIsGlobalMuon; }
104 Bool_t IsTrackerMuon() const { return fIsTrackerMuon; }
105 Bool_t IsStandaloneMuon() const { return fIsStandaloneMuon; }
106 Bool_t IsCaloMuon() const { return fIsCaloMuon; }
107 Double_t IsoR03SumPt() const { return fIsoR03SumPt; }
108 Double_t IsoR03EmEt() const { return fIsoR03EmEt; }
109 Double_t IsoR03HadEt() const { return fIsoR03HadEt; }
110 Double_t IsoR03HoEt() const { return fIsoR03HoEt; }
111 UShort_t IsoR03NTracks() const { return fIsoR03NTracks; }
112 UShort_t IsoR03NJets() const { return fIsoR03NJets; }
113 Double_t IsoR05SumPt() const { return fIsoR05SumPt; }
114 Double_t IsoR05EmEt() const { return fIsoR05EmEt; }
115 Double_t IsoR05HadEt() const { return fIsoR05HadEt; }
116 Double_t IsoR05HoEt() const { return fIsoR05HoEt; }
117 UShort_t IsoR05NTracks() const { return fIsoR05NTracks; }
118 UShort_t IsoR05NJets() const { return fIsoR05NJets; }
119 UInt_t NChambers() const { return fNTraversedChambers; }
120 UInt_t NSegments() const { return fStationMask.NBitsSet(); }
121 Int_t LastHit() const;
122 Int_t LastStation(Double_t iMaxD, Double_t iMaxP) const;
123 Int_t LastStation(Int_t iMax=8) const;
124 Int_t ObjId() const { return ObjType()*1000+Is(); }
125 EObjType ObjType() const { return kMuon; }
126 void Print(Option_t *opt="") const;
127 Bool_t PromptTight(EClassType type) const;
128 const MuonQuality &Quality() const { return fQuality; }
129 MuonQuality &Quality() { return fQuality; }
130 Bool_t StationBit(Int_t bit) const { return fStationMask.TestBit(bit); }
131 Bool_t TMLastStation(Double_t iDYMin = 3, Double_t iPYMin = 3,
132 Double_t iDXMin = 3, Double_t iPXMin = 3,UInt_t iN = 2) const;
133 Bool_t TMOneStation(Double_t iDYMin = 3, Double_t iPYMin = 3,
134 Double_t iDXMin = 3, Double_t iPXMin = 3,UInt_t iN = 1) const;
135 void SetCharge(Char_t x) { fCharge = x; ClearCharge(); }
136 void SetGlobalTrk(const Track *t)
137 { fGlobalTrkRef = t; ClearMom(); ClearCharge(); }
138 void SetStandaloneTrk(const Track *t)
139 { fStaTrkRef = t; ClearMom(); ClearCharge(); }
140 void SetTrackerTrk(const Track *t)
141 { fTrkTrkRef = t; ClearMom(); ClearCharge(); }
142 void SetDX(Int_t iStation, Double_t iDX);
143 void SetDY(Int_t iStation, Double_t iDY);
144 void SetEmEnergy(Double_t EmEnergy) { fEmEnergy = EmEnergy; }
145 void SetEmS9Energy(Double_t EmS9Energy) { fEmS9Energy = EmS9Energy; }
146 void SetHadEnergy(Double_t HadEnergy) { fHadEnergy = HadEnergy; }
147 void SetHadS9Energy(Double_t HadS9Energy) { fHadS9Energy = HadS9Energy; }
148 void SetHoEnergy(Double_t HoEnergy) { fHoEnergy = HoEnergy; }
149 void SetHoS9Energy(Double_t HoS9Energy) { fHoS9Energy = HoS9Energy; }
150 void SetIsGlobalMuon(Bool_t b) { fIsGlobalMuon = b; }
151 void SetIsTrackerMuon(Bool_t b) { fIsTrackerMuon = b; }
152 void SetIsStandaloneMuon(Bool_t b) { fIsStandaloneMuon = b; }
153 void SetIsCaloMuon(Bool_t b) { fIsCaloMuon = b; }
154 void SetIsoR03SumPt(Double_t isoR03SumPt) { fIsoR03SumPt = isoR03SumPt; }
155 void SetIsoR03EmEt(Double_t isoR03EmEt) { fIsoR03EmEt = isoR03EmEt; }
156 void SetIsoR03HadEt(Double_t isoR03HadEt) { fIsoR03HadEt = isoR03HadEt; }
157 void SetIsoR03HoEt(Double_t isoR03HoEt) { fIsoR03HoEt = isoR03HoEt; }
158 void SetIsoR03NTracks(UShort_t isoR03NTrk) { fIsoR03NTracks = isoR03NTrk; }
159 void SetIsoR03NJets(UShort_t isoR03NJets) { fIsoR03NJets = isoR03NJets; }
160 void SetIsoR05SumPt(Double_t isoR05SumPt) { fIsoR05SumPt = isoR05SumPt; }
161 void SetIsoR05EmEt(Double_t isoR05EmEt) { fIsoR05EmEt = isoR05EmEt; }
162 void SetIsoR05HadEt(Double_t isoR05HadEt) { fIsoR05HadEt = isoR05HadEt; }
163 void SetIsoR05HoEt(Double_t isoR05HoEt) { fIsoR05HoEt = isoR05HoEt; }
164 void SetIsoR05NTracks(UShort_t isoR05NTrk) { fIsoR05NTracks = isoR05NTrk; }
165 void SetIsoR05NJets(UShort_t isoR05NJets) { fIsoR05NJets = isoR05NJets; }
166 void SetNChambers(UShort_t iNTraCh) { fNTraversedChambers = iNTraCh; }
167 void SetNSegments(Int_t iStation, Int_t NSegments);
168 void SetPtEtaPhi(Double_t pt, Double_t eta, Double_t phi);
169 void SetPullX(Int_t iStation, Double_t iPullX);
170 void SetPullY(Int_t iStation, Double_t iPullY);
171 void SetStationMask(UInt_t iStMask) { fStationMask.SetBits(iStMask); }
172 void SetTrackDist(Int_t iStation, Double_t iDist);
173 void SetTrackDistErr(Int_t iStation, Double_t iDistErr);
174
175 protected:
176 Double_t GetCharge() const;
177 Double_t GetMass() const { return 105.658369e-3; }
178 void GetMom() const;
179
180 Vect3C fMom; //stored three-momentum
181 Char_t fCharge; //stored charge - filled with -99 when reading old files
182 Ref<Track> fGlobalTrkRef; //global combined track reference
183 Ref<Track> fStaTrkRef; //standalone muon track reference
184 Ref<Track> fTrkTrkRef; //tracker track reference
185 Double32_t fIsoR03SumPt; //[0,0,14]isolation size R=0.3 sum pt
186 Double32_t fIsoR03EmEt; //[0,0,14]isolation size R=0.3 em trans energy
187 Double32_t fIsoR03HadEt; //[0,0,14]isolation size R=0.3 had trans energy
188 Double32_t fIsoR03HoEt; //[0,0,14]isolation size R=0.3 ho trans energy
189 UShort_t fIsoR03NTracks; //isolation size R=0.3 number of tracks
190 UShort_t fIsoR03NJets; //isolation size R=0.3 number of jets
191 Double32_t fIsoR05SumPt; //[0,0,14]isolation size R=0.5 sum pt
192 Double32_t fIsoR05EmEt; //[0,0,14]isolation size R=0.5 em trans energy
193 Double32_t fIsoR05HadEt; //[0,0,14]isolation size R=0.5 had trans energy
194 Double32_t fIsoR05HoEt; //[0,0,14]isolation size R=0.5 ho trans energy
195 UShort_t fIsoR05NTracks; //isolation size R=0.5 number of tracks
196 UShort_t fIsoR05NJets; //isolation size R=0.5 number of jets
197 Double32_t fEmEnergy; //[0,0,14]energy deposit in ecal
198 Double32_t fHadEnergy; //[0,0,14]energy deposit in hcal
199 Double32_t fHoEnergy; //[0,0,14]energy deposit in outer hcal
200 Double32_t fEmS9Energy; //[0,0,14]energy deposit in 3x3 ecal
201 Double32_t fHadS9Energy; //[0,0,14]energy deposit in 3x3 hcal
202 Double32_t fHoS9Energy; //[0,0,14]energy deposit in 3x3 outer hcal
203 UShort_t fNTraversedChambers; //number of traversed chambers
204 MuonQuality fQuality; //muon quality
205 BitMask8 fStationMask; //bitmap of station with tracks, 0-3 DT, 4-7 CSCs
206 Double32_t fDX[8]; //[0,0,14]uncertainty in x in given muon chamber
207 Double32_t fDY[8]; //[0,0,14]uncertainty in y in given muon chamber
208 Double32_t fPullX[8]; //[0,0,14]pull in x in given muon chamber
209 Double32_t fPullY[8]; //[0,0,14]pull in y in given muon chamber
210 Double32_t fTrackDist[8]; //[0,0,14]dist. to track in trans. plane in muon chamber
211 Double32_t fTrackDistErr[8]; //[0,0,14]error of dist. to track in trans. plane
212 Int_t fNSegments[8]; //number of segments in given muon chamber
213 Bool_t fIsGlobalMuon; //GlobalMuon algo flag
214 Bool_t fIsTrackerMuon; //TrackerMuon algo flag
215 Bool_t fIsStandaloneMuon; //StandaloneMuon algo flag
216 Bool_t fIsCaloMuon; //CaloMuon algo flag
217
218 ClassDef(Muon, 3) // Muon class
219 };
220 }
221
222 //--------------------------------------------------------------------------------------------------
223 inline const mithep::Track *mithep::Muon::BestTrk() const
224 {
225 // Return "best" track.
226
227 if (HasGlobalTrk())
228 return GlobalTrk();
229 else if (HasTrackerTrk())
230 return TrackerTrk();
231 else if (HasStandaloneTrk())
232 return StandaloneTrk();
233
234 Error("BestTrk", "No track reference found, returning NULL pointer.");
235 return 0;
236 }
237
238 //--------------------------------------------------------------------------------------------------
239 inline Double_t mithep::Muon::GetCharge() const
240 {
241 // Return stored charge, unless it is set to invalid (-99),
242 // in that case get charge from track as before
243
244 if (fCharge==-99)
245 return mithep::ChargedParticle::GetCharge();
246 else
247 return fCharge;
248
249 }
250
251 //--------------------------------------------------------------------------------------------------
252 inline void mithep::Muon::GetMom() const
253 {
254 // Get momentum of the muon. We use an explicitly stored three vector, with the pdg mass,
255 // since the momentum vector may be computed non-trivially in cmssw (since the tracker
256 // information has better resolution apparently in some cases than the global fit.)
257 // If momentum is unfilled, fall back to old method of getting momentum from best track
258 // (for backwards compatibility.)
259
260 if (fMom.Rho()>0.0) {
261 fCachedMom.SetCoordinates(fMom.Rho(),fMom.Eta(),fMom.Phi(),GetMass());
262 }
263 else {
264 mithep::ChargedParticle::GetMom();
265 }
266
267 }
268
269 //--------------------------------------------------------------------------------------------------
270 inline Double_t mithep::Muon::GetDX(Int_t iStation) const
271 {
272 // Return uncertainty in x in given chamber.
273
274 assert(iStation >= 0 && iStation < 8);
275 return fDX[iStation];
276 }
277
278 //--------------------------------------------------------------------------------------------------
279 inline Double_t mithep::Muon::GetDY(Int_t iStation) const
280 {
281 // Return uncertainty in y in given chamber.
282
283 assert(iStation >= 0 && iStation < 8);
284 return fDY[iStation];
285 }
286
287 //--------------------------------------------------------------------------------------------------
288 inline Double_t mithep::Muon::GetPullX(Int_t iStation) const
289 {
290 // Return pull in x in given chamber.
291
292 assert(iStation >= 0 && iStation < 8);
293 return fPullX[iStation];
294 }
295
296 //--------------------------------------------------------------------------------------------------
297 inline Double_t mithep::Muon::GetPullY(Int_t iStation) const
298 {
299 // Return pull in y in given chamber.
300
301 assert(iStation >= 0 && iStation < 8);
302 return fPullY[iStation];
303 }
304
305 //--------------------------------------------------------------------------------------------------
306 inline Double_t mithep::Muon::GetTrackDist(Int_t iStation) const
307 {
308 // Return track distance in given chamber.
309
310 assert(iStation >= 0 && iStation < 8);
311 return fTrackDist[iStation];
312 }
313
314 //--------------------------------------------------------------------------------------------------
315 inline Double_t mithep::Muon::GetTrackDistErr(Int_t iStation) const
316 {
317 // Return error of track distance in given chamber.
318
319 assert(iStation >= 0 && iStation < 8);
320 return fTrackDistErr[iStation];
321 }
322
323 //--------------------------------------------------------------------------------------------------
324 inline Int_t mithep::Muon::GetNSegments(Int_t iStation) const
325 {
326 // Return number of segments in chamber.
327
328 assert(iStation >= 0 && iStation < 8);
329 return fNSegments[iStation];
330 }
331
332 //--------------------------------------------------------------------------------------------------
333 inline Bool_t mithep::Muon::Has(EClassType type) const
334 {
335 // Return true if the muon has a track of given class.
336
337 switch (type) {
338 case kAny:
339 if (HasTrk())
340 return kTRUE;
341 break;
342 case kGlobal:
343 if (HasGlobalTrk())
344 return kTRUE;
345 break;
346 case kTracker:
347 if (HasTrackerTrk())
348 return kTRUE;
349 break;
350 case kSta:
351 if (HasStandaloneTrk())
352 return kTRUE;
353 break;
354 case kNone:
355 if (!HasTrk())
356 return kTRUE;
357 break;
358 default:
359 break;
360 }
361
362 return kFALSE;
363 }
364
365 //--------------------------------------------------------------------------------------------------
366 inline Bool_t mithep::Muon::HasTrk() const
367 {
368 // Return true if the muon has assigned any kind of track.
369
370 return (HasGlobalTrk() || HasTrackerTrk() || HasStandaloneTrk());
371 }
372
373 //--------------------------------------------------------------------------------------------------
374 inline mithep::Muon::EClassType mithep::Muon::Is() const
375 {
376 // Return the "best" classification of the muon according to the assigned tracks.
377
378 if (HasGlobalTrk())
379 return kGlobal;
380 else if (HasTrackerTrk())
381 return kTracker;
382 else if (HasStandaloneTrk())
383 return kSta;
384
385 return kNone;
386 }
387
388 //--------------------------------------------------------------------------------------------------
389 inline Int_t mithep::Muon::LastHit() const
390 {
391 // Return the last hit, or -1 if no one found.
392
393 Int_t lId = -1;
394 for (Int_t i0 = 0; i0 < 8; ++i0) {
395 if (GetDX(i0) < 99999 || GetDY(i0) < 99999)
396 lId = i0;
397 }
398 return lId;
399 }
400
401 //--------------------------------------------------------------------------------------------------
402 inline Int_t mithep::Muon::LastStation(Int_t iMax) const
403 {
404 // Return the last station, or -1 of no one found.
405
406 Int_t lId = -1;
407 if(TMath::Abs(iMax) > 8)
408 iMax = 8;
409 for (Int_t i0 = 0; i0 < iMax; ++i0) {
410 if (StationBit(i0) && ((lId % 4) < (i0 % 4)))
411 lId = i0;
412 }
413 return lId;
414 }
415
416 //--------------------------------------------------------------------------------------------------
417 inline Int_t mithep::Muon::LastStation(Double_t iMaxD, Double_t iMaxP) const
418 {
419 // Return the last station for given deviation and relative error, or -1 if no one found.
420
421 Int_t lId = -1;
422 for (Int_t i0 = 0; i0 < 8; ++i0) {
423 if ((lId % 4) > (i0 % 4))
424 continue;
425 if (GetTrackDist(i0) < iMaxD &&
426 GetTrackDist(i0)/GetTrackDistErr(i0) < iMaxP)
427 lId = i0;
428 }
429 return lId;
430 }
431
432 //--------------------------------------------------------------------------------------------------
433 inline Bool_t mithep::Muon::PromptTight(EClassType type) const
434 {
435 // Return whether track for given class matches tight quality criteria.
436
437 const mithep::Track *lTrack = 0;
438 switch (type) {
439 case kAny:
440 lTrack = BestTrk();
441 break;
442 case kGlobal:
443 lTrack = GlobalTrk();
444 break;
445 case kTracker:
446 lTrack = TrackerTrk();
447 break;
448 case kSta:
449 lTrack = StandaloneTrk();
450 break;
451 default:
452 break;
453 }
454
455 if (lTrack == 0)
456 return kFALSE;
457 if (lTrack->NHits() < 11)
458 return kFALSE;
459 if (lTrack->Chi2()/lTrack->Ndof() > 10.)
460 return kFALSE;
461 if (lTrack->D0() > 0.2)
462 return kFALSE;
463 if ((LastHit() % 4) == 0)
464 return kFALSE;
465 return kTRUE;
466 }
467
468 //--------------------------------------------------------------------------------------------------
469 inline Bool_t mithep::Muon::TMOneStation(Double_t iDYMin, Double_t iPYMin,
470 Double_t iDXMin, Double_t iPXMin, UInt_t iN) const
471 {
472 // Check if the muon is matched to at least one station (chamber).
473
474 if (NSegments() < iN)
475 return kFALSE; //second last one
476
477 Bool_t pGoodX = kFALSE;
478 Bool_t pBadY = kFALSE;
479 for (Int_t i0 = 0; i0 < 8; ++i0) {
480 if ((TMath::Abs(GetDX(i0)) < iDXMin ||
481 TMath::Abs(GetPullX(i0)) < iPXMin))
482 pGoodX = kTRUE;
483 if (pGoodX &&
484 (TMath::Abs(GetDY(i0)) < iDYMin ||
485 TMath::Abs(GetPullY(i0)) < iPYMin))
486 return kTRUE;
487 if (TMath::Abs(GetDY(i0)) < 999999)
488 pBadY = kTRUE;
489 if (i0 == 3 && pGoodX && !pBadY)
490 return kTRUE;
491 }
492 return kFALSE;
493 }
494
495 //--------------------------------------------------------------------------------------------------
496 inline Bool_t mithep::Muon::TMLastStation(Double_t iDYMin, Double_t iPYMin,
497 Double_t iDXMin, Double_t iPXMin, UInt_t iN) const
498 {
499 // Check if the muon is matched to its last station (chamber).
500
501 if (NSegments() < iN)
502 return kFALSE; //second last one
503
504 Int_t lLast = LastStation(-3.,-3.); // last required station
505 if (lLast < 0)
506 return kFALSE;
507 if (GetDX(lLast) > 9999.)
508 return kFALSE;
509 lLast = LastStation(); //no requirements
510 if (lLast < 0)
511 return kFALSE;
512 if (!(TMath::Abs(GetDX(lLast)) < iDXMin ||
513 TMath::Abs(GetPullX(lLast)) < iPXMin))
514 return kFALSE;
515 if (lLast == 3)
516 lLast = LastStation(3);
517 if (lLast < 0)
518 return kFALSE;
519 if (!(TMath::Abs(GetDY(lLast)) < iDYMin ||
520 TMath::Abs(GetPullY(lLast)) < iPYMin))
521 return kFALSE;
522 return kTRUE;
523 }
524
525 //--------------------------------------------------------------------------------------------------
526 inline void mithep::Muon::SetDX(Int_t iStation, Double_t iDX)
527 {
528 // Return uncertainty in x in given chamber.
529
530 assert(iStation >= 0 && iStation < 8);
531 fDX[iStation] = iDX;
532 }
533
534 //--------------------------------------------------------------------------------------------------
535 inline void mithep::Muon::SetDY(Int_t iStation, Double_t iDY)
536 {
537 // Return uncertainty in y in given chamber.
538
539 assert(iStation >= 0 && iStation < 8);
540 fDY[iStation] = iDY;
541 }
542
543 //--------------------------------------------------------------------------------------------------
544 inline void mithep::Muon::SetPullX(Int_t iStation, Double_t iPullX)
545 {
546 // Set pull in x in given chamber.
547
548 assert(iStation >= 0 && iStation < 8);
549 fPullX[iStation] = iPullX;
550 }
551
552 //--------------------------------------------------------------------------------------------------
553 inline void mithep::Muon::SetPullY(Int_t iStation, Double_t iPullY)
554 {
555 // Set pull in y in given chamber.
556
557 assert(iStation >= 0 && iStation < 8);
558 fPullY[iStation] = iPullY;
559 }
560
561 //--------------------------------------------------------------------------------------------------
562 inline void mithep::Muon::SetTrackDist(Int_t iStation, Double_t iDist)
563
564 {
565 // Set track distance in given chamber.
566
567 assert(iStation >= 0 && iStation < 8);
568 fTrackDist[iStation] = iDist;
569 }
570
571 //--------------------------------------------------------------------------------------------------
572 inline void mithep::Muon::SetTrackDistErr(Int_t iStation, Double_t iDistErr)
573 {
574 // Set error of track distance in given chamber.
575
576 assert(iStation >= 0 && iStation < 8);
577 fTrackDistErr[iStation] = iDistErr;
578 }
579
580 //--------------------------------------------------------------------------------------------------
581 inline void mithep::Muon::SetNSegments(Int_t iStation, Int_t NSegments)
582 {
583 // Set number of segments in chamber.
584
585 assert(iStation >= 0 && iStation < 8);
586 fNSegments[iStation] = NSegments;
587 }
588
589 //-------------------------------------------------------------------------------------------------
590 inline void mithep::Muon::SetPtEtaPhi(Double_t pt, Double_t eta, Double_t phi)
591 {
592 // Set three-vector
593
594 fMom.Set(pt,eta,phi);
595 ClearMom();
596 }
597 #endif
598
599
600
601
602