2 |
|
// $Id$ |
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 |
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 Muons exist and can be determined by checking |
12 |
< |
// whether a fit track exists for such a Muon (eg TrackerTrk() == 0). 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: |
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 |
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 |
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 RecHits CaloTowers Default |
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 Correspnod to segments in 4 CSC chambers in->out |
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 Segements in Muon using Segment + Track Arbitration |
45 |
< |
// NChambers : Number of Muon Chambers Traverresed in Propagated Track |
46 |
< |
// LastHit : Returns farthest (from Center) station with a recorded Segment |
47 |
< |
// LastStation : Returns farhtest station using Segment+Track Arbitration |
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 Segements Matched to Muon |
53 |
< |
// TMLastStation : Returns bool whether Muon pass LastStation Id criteria |
54 |
< |
// -Matching criteria for Last most Segement |
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 |
|
//-------------------------------------------------------------------------------------------------- |
77 |
|
kAny //any "best" of the above |
78 |
|
}; |
79 |
|
|
80 |
< |
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 IsoR03SumPt() const { return fIsoR03SumPt; } |
86 |
< |
Double_t IsoR03EmEt() const { return fIsoR03EmEt; } |
84 |
< |
Double_t IsoR03HadEt() const { return fIsoR03HadEt; } |
85 |
< |
Double_t IsoR03HoEt() const { return fIsoR03HoEt; } |
86 |
< |
Int_t IsoR03NTracks() const { return fIsoR03NTracks; } |
87 |
< |
Int_t IsoR03NJets() const { return fIsoR03NJets; } |
88 |
< |
Double_t IsoR05SumPt() const { return fIsoR05SumPt; } |
89 |
< |
Double_t IsoR05EmEt() const { return fIsoR05EmEt; } |
90 |
< |
Double_t IsoR05HadEt() const { return fIsoR05HadEt; } |
91 |
< |
Double_t IsoR05HoEt() const { return fIsoR05HoEt; } |
92 |
< |
Int_t IsoR05NTracks() const { return fIsoR05NTracks; } |
93 |
< |
Int_t IsoR05NJets() const { return fIsoR05NJets; } |
94 |
< |
Double_t EmEnergy() const { return fEmEnergy; } |
95 |
< |
Double_t HadEnergy() const { return fHadEnergy; } |
96 |
< |
Double_t HoEnergy() const { return fHoEnergy; } |
97 |
< |
Double_t EmS9Energy() const { return fEmS9Energy; } |
98 |
< |
Double_t HadS9Energy() const { return fHadS9Energy; } |
99 |
< |
Double_t HoS9Energy() const { return fHoS9Energy; } |
100 |
< |
Double_t Mass() const { return 105.658369e-3; } |
101 |
< |
Int_t NChambers() const { return fNTraversedChambers; } |
102 |
< |
Int_t NSegments() const { return fStationMask.NBitsSet(); } |
103 |
< |
Bool_t StationBit(Int_t bit) const { return fStationMask.TestBit(bit); } |
80 |
> |
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 |
|
Double_t GetDX(Int_t iStation) const; |
88 |
|
Double_t GetDY(Int_t iStation) const; |
89 |
|
Double_t GetPullX(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; |
111 |
– |
Bool_t HasGlobalTrk() const { return fGlobalTrackRef.IsValid(); } |
112 |
– |
Bool_t HasStandaloneTrk() const { return fStandaloneTrackRef.IsValid(); } |
113 |
– |
Bool_t HasTrackerTrk() const { return fTrackerTrackRef.IsValid(); } |
94 |
|
Bool_t Has(EClassType type) const; |
95 |
+ |
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 |
|
EClassType Is() const; |
105 |
+ |
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 |
|
Int_t LastHit() const; |
121 |
|
Int_t LastStation(Double_t iMaxD, Double_t iMaxP) const; |
122 |
|
Int_t LastStation(Int_t iMax=8) const; |
123 |
+ |
EObjType ObjType() const { return kMuon; } |
124 |
|
Bool_t PromptTight(EClassType type) const; |
125 |
+ |
Bool_t StationBit(Int_t bit) const { return fStationMask.TestBit(bit); } |
126 |
|
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 |
< |
void SetGlobalTrk(const Track *t) { fGlobalTrackRef = const_cast<Track*>(t); } |
131 |
< |
void SetStandaloneTrk(const Track *t) { fStandaloneTrackRef = const_cast<Track*>(t); } |
132 |
< |
void SetTrackerTrk(const Track *t) { fTrackerTrackRef = const_cast<Track*>(t); } |
130 |
> |
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 |
|
void SetIsoR03SumPt(Double_t isoR03SumPt) { fIsoR03SumPt = isoR03SumPt; } |
145 |
|
void SetIsoR03EmEt(Double_t isoR03EmEt) { fIsoR03EmEt = isoR03EmEt; } |
146 |
|
void SetIsoR03HadEt(Double_t isoR03HadEt) { fIsoR03HadEt = isoR03HadEt; } |
153 |
|
void SetIsoR05HoEt(Double_t isoR05HoEt) { fIsoR05HoEt = isoR05HoEt; } |
154 |
|
void SetIsoR05NTracks(Int_t isoR05NTracks) { fIsoR05NTracks = isoR05NTracks; } |
155 |
|
void SetIsoR05NJets(Int_t isoR05NJets) { fIsoR05NJets = isoR05NJets; } |
139 |
– |
void SetEmEnergy(Double_t EmEnergy) { fEmEnergy = EmEnergy; } |
140 |
– |
void SetHadEnergy(Double_t HadEnergy) { fHadEnergy = HadEnergy; } |
141 |
– |
void SetHoEnergy(Double_t HoEnergy) { fHoEnergy = HoEnergy; } |
142 |
– |
void SetEmS9Energy(Double_t EmS9Energy) { fEmS9Energy = EmS9Energy; } |
143 |
– |
void SetHadS9Energy(Double_t HadS9Energy) { fHadS9Energy = HadS9Energy; } |
144 |
– |
void SetHoS9Energy(Double_t HoS9Energy) { fHoS9Energy = HoS9Energy; } |
156 |
|
void SetNChambers(Int_t iNTraCh) { fNTraversedChambers = iNTraCh; } |
157 |
< |
void SetStationMask(UInt_t iStMask) { fStationMask.SetBits(iStMask); } |
147 |
< |
void SetDX(Int_t iStation, Double_t iDX); |
148 |
< |
void SetDY(Int_t iStation, Double_t iDY); |
157 |
> |
void SetNSegments(Int_t iStation, Int_t NSegments); |
158 |
|
void SetPullX(Int_t iStation, Double_t iPullX); |
159 |
|
void SetPullY(Int_t iStation, Double_t iPullY); |
160 |
+ |
void SetStationMask(UInt_t iStMask) { fStationMask.SetBits(iStMask); } |
161 |
|
void SetTrackDist(Int_t iStation, Double_t iDist); |
162 |
|
void SetTrackDistErr(Int_t iStation, Double_t iDistErr); |
153 |
– |
void SetNSegments(Int_t iStation, Int_t NSegments); |
163 |
|
|
164 |
|
protected: |
165 |
|
TRef fGlobalTrackRef; //global combined track reference |
180 |
|
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 |
< |
Double32_t fEmS9Energy; //? |
184 |
< |
Double32_t fHadS9Energy; //? |
185 |
< |
Double32_t fHoS9Energy; //? |
183 |
> |
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 |
|
Int_t fNTraversedChambers; //number of tranversed chambers |
187 |
|
BitMask8 fStationMask; //bitmap of station with tracks, 0-3 DT, 4-7 CSCs |
188 |
|
Double32_t fDX[8]; //uncertainty in x in given muon chamber |
202 |
|
{ |
203 |
|
// Return "best" track. |
204 |
|
|
205 |
< |
if (GlobalTrk()) |
205 |
> |
if (HasGlobalTrk()) |
206 |
|
return GlobalTrk(); |
207 |
< |
else if (TrackerTrk()) |
207 |
> |
else if (HasTrackerTrk()) |
208 |
|
return TrackerTrk(); |
209 |
< |
else if (StandaloneTrk()) |
209 |
> |
else if (HasStandaloneTrk()) |
210 |
|
return StandaloneTrk(); |
211 |
|
|
212 |
|
Error("BestTrk", "No track reference found, returning NULL pointer."); |
307 |
|
|
308 |
|
switch (type) { |
309 |
|
case kAny: |
310 |
< |
if (BestTrk()) |
310 |
> |
if (HasTrk()) |
311 |
|
return kTRUE; |
312 |
|
break; |
313 |
|
case kGlobal: |
314 |
< |
if (GlobalTrk()) |
314 |
> |
if (HasGlobalTrk()) |
315 |
|
return kTRUE; |
316 |
|
break; |
317 |
|
case kTrackerOnly: |
318 |
< |
if (TrackerTrk()) |
318 |
> |
if (HasTrackerTrk()) |
319 |
|
return kTRUE; |
320 |
|
break; |
321 |
|
case kSta: |
322 |
< |
if (StandaloneTrk()) |
322 |
> |
if (HasStandaloneTrk()) |
323 |
|
return kTRUE; |
324 |
|
break; |
325 |
|
case kNone: |
326 |
< |
if (!BestTrk()) |
326 |
> |
if (!HasTrk()) |
327 |
|
return kTRUE; |
328 |
|
break; |
329 |
|
default: |
334 |
|
} |
335 |
|
|
336 |
|
//-------------------------------------------------------------------------------------------------- |
337 |
+ |
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 |
|
inline mithep::Muon::EClassType mithep::Muon::Is() const |
346 |
|
{ |
347 |
|
// Return the "best" classification of the muon according to the assigned tracks. |
348 |
|
|
349 |
< |
if (GlobalTrk()) |
349 |
> |
if (HasGlobalTrk()) |
350 |
|
return kGlobal; |
351 |
< |
else if (TrackerTrk()) |
351 |
> |
else if (HasTrackerTrk()) |
352 |
|
return kTrackerOnly; |
353 |
< |
else if (StandaloneTrk()) |
353 |
> |
else if (HasStandaloneTrk()) |
354 |
|
return kSta; |
355 |
|
|
356 |
|
return kNone; |
531 |
|
|
532 |
|
//-------------------------------------------------------------------------------------------------- |
533 |
|
inline void mithep::Muon::SetTrackDist(Int_t iStation, Double_t iDist) |
534 |
+ |
|
535 |
|
{ |
536 |
|
// Set track distance in given chamber. |
537 |
|
|