ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Muon.h
Revision: 1.23
Committed: Tue Dec 9 17:47:00 2008 UTC (16 years, 4 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_006b, Mit_006a
Changes since 1.22: +107 -89 lines
Log Message:
Added ObjType to retrieve type of object.

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.23 // $Id: Muon.h,v 1.22 2008/12/04 15:34:24 pharris Exp $
3 loizides 1.1 //
4     // Muon
5 loizides 1.23 //
6 pharris 1.22 // Classified into 3 Types
7 loizides 1.23 // 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 loizides 1.1 //
11 loizides 1.23 // 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 pharris 1.22 // 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 loizides 1.23 // 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 pharris 1.22 // Muon Quality Variables
29     // Extracted from the Muon Tracking Associator
30 loizides 1.23 // For more se https://twiki.cern.ch/twiki/bin/view/CMS/TrackAssociator
31 pharris 1.22 // Energy Variables : Energy within (5x5 Ecal Crystal/Hcal/Ho) along Track
32 loizides 1.23 // using calo towers
33     // S9 Energy Variables : Energy using reconstructed hits calo towers default
34 pharris 1.22 // Segment Variables :
35     // Segment variables are stored in array of 8:
36 loizides 1.23 // 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 pharris 1.22 // If value undetermined 999999 is returned.
39     // Variables:
40 loizides 1.23 // 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 pharris 1.22 // 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 loizides 1.23 // 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 loizides 1.1 //
56 loizides 1.16 // Authors: J.Bendavid, C.Loizides, C.Paus, P.Harris
57 loizides 1.1 //--------------------------------------------------------------------------------------------------
58 loizides 1.6
59 loizides 1.16 #ifndef MITANA_DATATREE_MUON_H
60     #define MITANA_DATATREE_MUON_H
61 loizides 1.8
62     #include <TRef.h>
63 loizides 1.16 #include "MitAna/DataTree/interface/Track.h"
64 bendavid 1.11 #include "MitAna/DataTree/interface/ChargedParticle.h"
65 pharris 1.15
66     namespace mithep {
67     class Muon : public ChargedParticle {
68 loizides 1.1 public:
69 loizides 1.20 Muon();
70 loizides 1.1 ~Muon() {}
71 loizides 1.18
72     enum EClassType {
73     kNone, //no track assigned
74     kGlobal, //"Global"
75     kTrackerOnly, //"TrackerOnly"
76     kSta, //"Standalone"
77     kAny //any "best" of the above
78     };
79 bendavid 1.2
80 loizides 1.23 const Track *BestTrk() const;
81     const Track *GlobalTrk() const;
82     const Track *StandaloneTrk() const;
83     const Track *TrackerTrk() const;
84     const Track *Trk() const { return BestTrk(); }
85     Double_t EmEnergy() const { return fEmEnergy; }
86     Double_t EmS9Energy() const { return fEmS9Energy; }
87 loizides 1.20 Double_t GetDX(Int_t iStation) const;
88     Double_t GetDY(Int_t iStation) const;
89     Double_t GetPullX(Int_t iStation) const;
90     Double_t GetPullY(Int_t iStation) const;
91     Double_t GetTrackDist(Int_t iStation) const;
92     Double_t GetTrackDistErr(Int_t iStation) const;
93     Int_t GetNSegments(Int_t iStation) const;
94     Bool_t Has(EClassType type) const;
95 loizides 1.23 Bool_t HasTrk() const;
96     Bool_t HasGlobalTrk() const { return fGlobalTrackRef.IsValid(); }
97     Bool_t HasStandaloneTrk() const
98     { return fStandaloneTrackRef.IsValid(); }
99     Bool_t HasTrackerTrk() const { return fTrackerTrackRef.IsValid(); }
100     Double_t HadEnergy() const { return fHadEnergy; }
101     Double_t HadS9Energy() const { return fHadS9Energy; }
102     Double_t HoEnergy() const { return fHoEnergy; }
103     Double_t HoS9Energy() const { return fHoS9Energy; }
104 loizides 1.20 EClassType Is() const;
105 loizides 1.23 Double_t IsoR03SumPt() const { return fIsoR03SumPt; }
106     Double_t IsoR03EmEt() const { return fIsoR03EmEt; }
107     Double_t IsoR03HadEt() const { return fIsoR03HadEt; }
108     Double_t IsoR03HoEt() const { return fIsoR03HoEt; }
109     Int_t IsoR03NTracks() const { return fIsoR03NTracks; }
110     Int_t IsoR03NJets() const { return fIsoR03NJets; }
111     Double_t IsoR05SumPt() const { return fIsoR05SumPt; }
112     Double_t IsoR05EmEt() const { return fIsoR05EmEt; }
113     Double_t IsoR05HadEt() const { return fIsoR05HadEt; }
114     Double_t IsoR05HoEt() const { return fIsoR05HoEt; }
115     Int_t IsoR05NTracks() const { return fIsoR05NTracks; }
116     Int_t IsoR05NJets() const { return fIsoR05NJets; }
117     Double_t Mass() const { return 105.658369e-3; }
118     Int_t NChambers() const { return fNTraversedChambers; }
119     Int_t NSegments() const { return fStationMask.NBitsSet(); }
120 loizides 1.20 Int_t LastHit() const;
121 loizides 1.18 Int_t LastStation(Double_t iMaxD, Double_t iMaxP) const;
122     Int_t LastStation(Int_t iMax=8) const;
123 loizides 1.23 EObjType ObjType() const { return kMuon; }
124 loizides 1.18 Bool_t PromptTight(EClassType type) const;
125 loizides 1.23 Bool_t StationBit(Int_t bit) const { return fStationMask.TestBit(bit); }
126 loizides 1.18 Bool_t TMLastStation(Double_t iDYMin = 3., Double_t iPYMin = 3.,
127     Double_t iDXMin = 3., Double_t iPXMin = 3.,Int_t iN = 2) const;
128     Bool_t TMOneStation(Double_t iDYMin = 3., Double_t iPYMin = 3.,
129     Double_t iDXMin = 3., Double_t iPXMin = 3.,Int_t iN = 1) const;
130 loizides 1.23 void SetGlobalTrk(const Track *t)
131     { fGlobalTrackRef = const_cast<Track*>(t); }
132     void SetStandaloneTrk(const Track *t)
133     { fStandaloneTrackRef = const_cast<Track*>(t); }
134     void SetTrackerTrk(const Track *t)
135     { fTrackerTrackRef = const_cast<Track*>(t); }
136     void SetDX(Int_t iStation, Double_t iDX);
137     void SetDY(Int_t iStation, Double_t iDY);
138     void SetEmEnergy(Double_t EmEnergy) { fEmEnergy = EmEnergy; }
139     void SetEmS9Energy(Double_t EmS9Energy) { fEmS9Energy = EmS9Energy; }
140     void SetHadEnergy(Double_t HadEnergy) { fHadEnergy = HadEnergy; }
141     void SetHadS9Energy(Double_t HadS9Energy) { fHadS9Energy = HadS9Energy; }
142     void SetHoEnergy(Double_t HoEnergy) { fHoEnergy = HoEnergy; }
143     void SetHoS9Energy(Double_t HoS9Energy) { fHoS9Energy = HoS9Energy; }
144 sixie 1.13 void SetIsoR03SumPt(Double_t isoR03SumPt) { fIsoR03SumPt = isoR03SumPt; }
145     void SetIsoR03EmEt(Double_t isoR03EmEt) { fIsoR03EmEt = isoR03EmEt; }
146     void SetIsoR03HadEt(Double_t isoR03HadEt) { fIsoR03HadEt = isoR03HadEt; }
147     void SetIsoR03HoEt(Double_t isoR03HoEt) { fIsoR03HoEt = isoR03HoEt; }
148     void SetIsoR03NTracks(Int_t isoR03NTracks) { fIsoR03NTracks = isoR03NTracks; }
149     void SetIsoR03NJets(Int_t isoR03NJets) { fIsoR03NJets = isoR03NJets; }
150     void SetIsoR05SumPt(Double_t isoR05SumPt) { fIsoR05SumPt = isoR05SumPt; }
151     void SetIsoR05EmEt(Double_t isoR05EmEt) { fIsoR05EmEt = isoR05EmEt; }
152     void SetIsoR05HadEt(Double_t isoR05HadEt) { fIsoR05HadEt = isoR05HadEt; }
153     void SetIsoR05HoEt(Double_t isoR05HoEt) { fIsoR05HoEt = isoR05HoEt; }
154     void SetIsoR05NTracks(Int_t isoR05NTracks) { fIsoR05NTracks = isoR05NTracks; }
155     void SetIsoR05NJets(Int_t isoR05NJets) { fIsoR05NJets = isoR05NJets; }
156 loizides 1.16 void SetNChambers(Int_t iNTraCh) { fNTraversedChambers = iNTraCh; }
157 loizides 1.23 void SetNSegments(Int_t iStation, Int_t NSegments);
158 loizides 1.16 void SetPullX(Int_t iStation, Double_t iPullX);
159     void SetPullY(Int_t iStation, Double_t iPullY);
160 loizides 1.23 void SetStationMask(UInt_t iStMask) { fStationMask.SetBits(iStMask); }
161 loizides 1.16 void SetTrackDist(Int_t iStation, Double_t iDist);
162     void SetTrackDistErr(Int_t iStation, Double_t iDistErr);
163 pharris 1.15
164 loizides 1.8 protected:
165 loizides 1.9 TRef fGlobalTrackRef; //global combined track reference
166     TRef fStandaloneTrackRef; //standalone muon track reference
167     TRef fTrackerTrackRef; //tracker track reference
168 loizides 1.16 Double32_t fIsoR03SumPt; //isolation size R=0.3 sum pt
169     Double32_t fIsoR03EmEt; //isolation size R=0.3 em trans energy
170     Double32_t fIsoR03HadEt; //isolation size R=0.3 had trans energy
171     Double32_t fIsoR03HoEt; //isolation size R=0.3 ho trans energy
172     Int_t fIsoR03NTracks; //isolation size R=0.3 number of tracks
173     Int_t fIsoR03NJets; //isolation size R=0.3 number of jets
174     Double32_t fIsoR05SumPt; //isolation size R=0.5 sum pt
175     Double32_t fIsoR05EmEt; //isolation size R=0.5 em trans energy
176     Double32_t fIsoR05HadEt; //isolation size R=0.5 had trans energy
177     Double32_t fIsoR05HoEt; //isolation size R=0.5 ho trans energy
178     Int_t fIsoR05NTracks; //isolation size R=0.5 number of tracks
179     Int_t fIsoR05NJets; //isolation size R=0.5 number of jets
180 loizides 1.18 Double32_t fEmEnergy; //energy deposit in ecal
181     Double32_t fHadEnergy; //energy deposit in hcal
182     Double32_t fHoEnergy; //energy deposit in outer hcal
183 loizides 1.23 Double32_t fEmS9Energy; //energy deposit in 3x3 ecal
184     Double32_t fHadS9Energy; //energy deposit in 3x3 hcal
185     Double32_t fHoS9Energy; //energy deposit in 3x3 outer hcal
186 loizides 1.16 Int_t fNTraversedChambers; //number of tranversed chambers
187 loizides 1.18 BitMask8 fStationMask; //bitmap of station with tracks, 0-3 DT, 4-7 CSCs
188 loizides 1.16 Double32_t fDX[8]; //uncertainty in x in given muon chamber
189     Double32_t fDY[8]; //uncertainty in y in given muon chamber
190     Double32_t fPullX[8]; //pull in x in given muon chamber
191     Double32_t fPullY[8]; //pull in y in given muon chamber
192 loizides 1.18 Double32_t fTrackDist[8]; //dist. to track in trans. plane in given muon chamber
193     Double32_t fTrackDistErr[8]; //error of dist. to track in trans. plane in chamber
194     Int_t fNSegments[8]; //number of segments in given muon chamber
195 loizides 1.16
196 loizides 1.7 ClassDef(Muon, 1) // Muon class
197 loizides 1.1 };
198 loizides 1.4 }
199 loizides 1.8
200 loizides 1.9 //--------------------------------------------------------------------------------------------------
201 loizides 1.10 inline const mithep::Track *mithep::Muon::BestTrk() const
202     {
203     // Return "best" track.
204    
205 loizides 1.23 if (HasGlobalTrk())
206 loizides 1.10 return GlobalTrk();
207 loizides 1.23 else if (HasTrackerTrk())
208 bendavid 1.17 return TrackerTrk();
209 loizides 1.23 else if (HasStandaloneTrk())
210 loizides 1.10 return StandaloneTrk();
211    
212 loizides 1.20 Error("BestTrk", "No track reference found, returning NULL pointer.");
213 loizides 1.10 return 0;
214     }
215    
216     //--------------------------------------------------------------------------------------------------
217     inline const mithep::Track *mithep::Muon::GlobalTrk() const
218 loizides 1.9 {
219     // Return global combined track.
220    
221     return static_cast<const Track*>(fGlobalTrackRef.GetObject());
222     }
223    
224     //--------------------------------------------------------------------------------------------------
225 loizides 1.10 inline const mithep::Track *mithep::Muon::StandaloneTrk() const
226 loizides 1.9 {
227     // Return standalone track.
228    
229     return static_cast<const Track*>(fStandaloneTrackRef.GetObject());
230     }
231    
232     //--------------------------------------------------------------------------------------------------
233 loizides 1.10 inline const mithep::Track *mithep::Muon::TrackerTrk() const
234 loizides 1.9 {
235     // Return tracker track.
236    
237     return static_cast<const Track*>(fTrackerTrackRef.GetObject());
238     }
239 pharris 1.15
240 loizides 1.16 //--------------------------------------------------------------------------------------------------
241     inline Double_t mithep::Muon::GetDX(Int_t iStation) const
242     {
243     // Return uncertainty in x in given chamber.
244    
245     assert(iStation >= 0 && iStation < 8);
246     return fDX[iStation];
247     }
248    
249     //--------------------------------------------------------------------------------------------------
250     inline Double_t mithep::Muon::GetDY(Int_t iStation) const
251     {
252     // Return uncertainty in y in given chamber.
253    
254     assert(iStation >= 0 && iStation < 8);
255     return fDY[iStation];
256     }
257    
258     //--------------------------------------------------------------------------------------------------
259     inline Double_t mithep::Muon::GetPullX(Int_t iStation) const
260     {
261     // Return pull in x in given chamber.
262    
263     assert(iStation >= 0 && iStation < 8);
264     return fPullX[iStation];
265     }
266    
267     //--------------------------------------------------------------------------------------------------
268     inline Double_t mithep::Muon::GetPullY(Int_t iStation) const
269     {
270     // Return pull in y in given chamber.
271    
272     assert(iStation >= 0 && iStation < 8);
273     return fPullY[iStation];
274     }
275    
276     //--------------------------------------------------------------------------------------------------
277     inline Double_t mithep::Muon::GetTrackDist(Int_t iStation) const
278     {
279     // Return track distance in given chamber.
280    
281     assert(iStation >= 0 && iStation < 8);
282     return fTrackDist[iStation];
283     }
284    
285     //--------------------------------------------------------------------------------------------------
286     inline Double_t mithep::Muon::GetTrackDistErr(Int_t iStation) const
287     {
288     // Return error of track distance in given chamber.
289    
290     assert(iStation >= 0 && iStation < 8);
291     return fTrackDistErr[iStation];
292     }
293    
294     //--------------------------------------------------------------------------------------------------
295     inline Int_t mithep::Muon::GetNSegments(Int_t iStation) const
296     {
297     // Return number of segments in chamber.
298    
299     assert(iStation >= 0 && iStation < 8);
300     return fNSegments[iStation];
301     }
302    
303     //--------------------------------------------------------------------------------------------------
304 loizides 1.18 inline Bool_t mithep::Muon::Has(EClassType type) const
305     {
306     // Return true if the muon has a track of given class.
307    
308     switch (type) {
309     case kAny:
310 loizides 1.23 if (HasTrk())
311 loizides 1.18 return kTRUE;
312     break;
313     case kGlobal:
314 loizides 1.23 if (HasGlobalTrk())
315 loizides 1.18 return kTRUE;
316     break;
317     case kTrackerOnly:
318 loizides 1.23 if (HasTrackerTrk())
319 loizides 1.18 return kTRUE;
320     break;
321     case kSta:
322 loizides 1.23 if (HasStandaloneTrk())
323 loizides 1.18 return kTRUE;
324     break;
325     case kNone:
326 loizides 1.23 if (!HasTrk())
327 loizides 1.18 return kTRUE;
328     break;
329     default:
330     break;
331     }
332    
333     return kFALSE;
334     }
335    
336     //--------------------------------------------------------------------------------------------------
337 loizides 1.23 inline Bool_t mithep::Muon::HasTrk() const
338     {
339     // Return true if the muon has assigned any kind of track.
340    
341     return (HasGlobalTrk() || HasTrackerTrk() || HasStandaloneTrk());
342     }
343    
344     //--------------------------------------------------------------------------------------------------
345 loizides 1.18 inline mithep::Muon::EClassType mithep::Muon::Is() const
346     {
347     // Return the "best" classification of the muon according to the assigned tracks.
348    
349 loizides 1.23 if (HasGlobalTrk())
350 loizides 1.18 return kGlobal;
351 loizides 1.23 else if (HasTrackerTrk())
352 loizides 1.18 return kTrackerOnly;
353 loizides 1.23 else if (HasStandaloneTrk())
354 loizides 1.18 return kSta;
355    
356     return kNone;
357     }
358    
359     //--------------------------------------------------------------------------------------------------
360     inline Int_t mithep::Muon::LastHit() const
361     {
362     // Return the last hit, or -1 if no one found.
363    
364     Int_t lId = -1;
365     for (Int_t i0 = 0; i0 < 8; ++i0) {
366     if (GetDX(i0) < 99999 || GetDY(i0) < 99999)
367     lId = i0;
368     }
369     return lId;
370     }
371    
372     //--------------------------------------------------------------------------------------------------
373     inline Int_t mithep::Muon::LastStation(Int_t iMax) const
374     {
375     // Return the last station, or -1 of no one found.
376    
377     Int_t lId = -1;
378     if(TMath::Abs(iMax) > 8)
379     iMax = 8;
380     for (Int_t i0 = 0; i0 < iMax; ++i0) {
381     if (StationBit(i0) && ((lId % 4) < (i0 % 4)))
382     lId = i0;
383     }
384     return lId;
385     }
386    
387     //--------------------------------------------------------------------------------------------------
388     inline Int_t mithep::Muon::LastStation(Double_t iMaxD, Double_t iMaxP) const
389     {
390     // Return the last station for given deviation and relative error, or -1 if no one found.
391    
392     Int_t lId = -1;
393     for (Int_t i0 = 0; i0 < 8; ++i0) {
394     if ((lId % 4) > (i0 % 4))
395     continue;
396     if (GetTrackDist(i0) < iMaxD &&
397     GetTrackDist(i0)/GetTrackDistErr(i0) < iMaxP)
398     lId = i0;
399     }
400     return lId;
401     }
402    
403     //--------------------------------------------------------------------------------------------------
404     inline Bool_t mithep::Muon::PromptTight(EClassType type) const
405     {
406     // Return whether track for given class matches tight quality criteria.
407    
408     const mithep::Track *lTrack = 0;
409     switch (type) {
410     case kAny:
411     lTrack = BestTrk();
412     break;
413     case kGlobal:
414     lTrack = GlobalTrk();
415     break;
416     case kTrackerOnly:
417     lTrack = TrackerTrk();
418     break;
419     case kSta:
420     lTrack = StandaloneTrk();
421     break;
422     default:
423     break;
424     }
425    
426     if (lTrack == 0)
427     return kFALSE;
428     if (lTrack->NHits() < 11)
429     return kFALSE;
430     if (lTrack->Chi2()/lTrack->Ndof() > 10.)
431     return kFALSE;
432     if (lTrack->D0() > 0.2)
433     return kFALSE;
434     if ((LastHit() % 4) == 0)
435     return kFALSE;
436     return kTRUE;
437     }
438    
439     //--------------------------------------------------------------------------------------------------
440     inline Bool_t mithep::Muon::TMOneStation(Double_t iDYMin, Double_t iPYMin,
441     Double_t iDXMin, Double_t iPXMin, Int_t iN) const
442     {
443     // Check if the muon is matched to at least one station (chamber).
444    
445     if (NSegments() < iN)
446     return kFALSE; //second last one
447    
448     Bool_t pGoodX = kFALSE;
449 ceballos 1.19 Bool_t pBadY = kFALSE;
450 loizides 1.18 for (Int_t i0 = 0; i0 < 8; ++i0) {
451     if ((TMath::Abs(GetDX(i0)) < iDXMin ||
452     TMath::Abs(GetPullX(i0)) < iPXMin))
453     pGoodX = kTRUE;
454     if (pGoodX &&
455     (TMath::Abs(GetDY(i0)) < iDYMin ||
456     TMath::Abs(GetPullY(i0)) < iPYMin))
457     return kTRUE;
458     if (TMath::Abs(GetDY(i0)) < 999999)
459     pBadY = kTRUE;
460     if (i0 == 3 && pGoodX && !pBadY)
461     return kTRUE;
462     }
463     return kFALSE;
464     }
465    
466     //--------------------------------------------------------------------------------------------------
467     inline Bool_t mithep::Muon::TMLastStation(Double_t iDYMin, Double_t iPYMin,
468     Double_t iDXMin, Double_t iPXMin, Int_t iN) const
469     {
470     // Check if the muon is matched to its last station (chamber).
471    
472     if (NSegments() < iN)
473     return kFALSE; //second last one
474    
475     Int_t lLast = LastStation(-3.,-3.); // last required station
476     if (lLast < 0)
477     return kFALSE;
478     if (GetDX(lLast) > 9999.)
479     return kFALSE;
480     lLast = LastStation(); //no requirements
481     if (lLast < 0)
482     return kFALSE;
483     if (!(TMath::Abs(GetDX(lLast)) < iDXMin ||
484     TMath::Abs(GetPullX(lLast)) < iPXMin))
485     return kFALSE;
486     if (lLast == 3)
487     lLast = LastStation(3);
488     if (lLast < 0)
489     return kFALSE;
490     if (!(TMath::Abs(GetDY(lLast)) < iDYMin ||
491     TMath::Abs(GetPullY(lLast)) < iPYMin))
492     return kFALSE;
493     return kTRUE;
494     }
495    
496     //--------------------------------------------------------------------------------------------------
497 loizides 1.16 inline void mithep::Muon::SetDX(Int_t iStation, Double_t iDX)
498     {
499     // Return uncertainty in x in given chamber.
500    
501     assert(iStation >= 0 && iStation < 8);
502     fDX[iStation] = iDX;
503     }
504    
505     //--------------------------------------------------------------------------------------------------
506     inline void mithep::Muon::SetDY(Int_t iStation, Double_t iDY)
507     {
508     // Return uncertainty in y in given chamber.
509    
510     assert(iStation >= 0 && iStation < 8);
511     fDY[iStation] = iDY;
512     }
513    
514     //--------------------------------------------------------------------------------------------------
515     inline void mithep::Muon::SetPullX(Int_t iStation, Double_t iPullX)
516     {
517     // Set pull in x in given chamber.
518    
519     assert(iStation >= 0 && iStation < 8);
520     fPullX[iStation] = iPullX;
521     }
522    
523     //--------------------------------------------------------------------------------------------------
524     inline void mithep::Muon::SetPullY(Int_t iStation, Double_t iPullY)
525     {
526     // Set pull in y in given chamber.
527    
528     assert(iStation >= 0 && iStation < 8);
529     fPullY[iStation] = iPullY;
530     }
531    
532     //--------------------------------------------------------------------------------------------------
533     inline void mithep::Muon::SetTrackDist(Int_t iStation, Double_t iDist)
534 loizides 1.23
535 loizides 1.16 {
536     // Set track distance in given chamber.
537    
538     assert(iStation >= 0 && iStation < 8);
539     fTrackDist[iStation] = iDist;
540     }
541    
542     //--------------------------------------------------------------------------------------------------
543     inline void mithep::Muon::SetTrackDistErr(Int_t iStation, Double_t iDistErr)
544     {
545     // Set error of track distance in given chamber.
546 pharris 1.15
547 loizides 1.16 assert(iStation >= 0 && iStation < 8);
548     fTrackDistErr[iStation] = iDistErr;
549     }
550 pharris 1.15
551 loizides 1.16 //--------------------------------------------------------------------------------------------------
552     inline void mithep::Muon::SetNSegments(Int_t iStation, Int_t NSegments)
553     {
554     // Set number of segments in chamber.
555 pharris 1.15
556 loizides 1.16 assert(iStation >= 0 && iStation < 8);
557     fNSegments[iStation] = NSegments;
558     }
559     #endif
560 loizides 1.18
561    
562    
563    
564