1 |
sixie |
1.1 |
//--------------------------------------------------------------------------------------------------
|
2 |
|
|
// $Id $
|
3 |
|
|
//
|
4 |
|
|
// MuonQuality
|
5 |
|
|
//
|
6 |
|
|
// Wrapper for BitMask storing the Muon Quality flags. We save information on exactly which
|
7 |
|
|
// of the official muon ID cuts are passed.
|
8 |
|
|
//
|
9 |
|
|
// Authors: S.Xie
|
10 |
|
|
//--------------------------------------------------------------------------------------------------
|
11 |
|
|
|
12 |
|
|
#ifndef MITANA_DATATREE_MUONQUALITY_H
|
13 |
|
|
#define MITANA_DATATREE_MUONQUALITY_H
|
14 |
|
|
|
15 |
|
|
#include "MitAna/DataCont/interface/BitMask.h"
|
16 |
|
|
#include "MitAna/DataCont/interface/Types.h"
|
17 |
|
|
|
18 |
|
|
namespace mithep
|
19 |
|
|
{
|
20 |
|
|
class MuonQuality
|
21 |
|
|
{
|
22 |
|
|
public:
|
23 |
|
|
enum MuonSelectionType { //taken from DataFormats/MuonReco/interface/MuonSelectors.h
|
24 |
|
|
All = 0, //dummy options - always true
|
25 |
|
|
AllGlobalMuons = 1, //checks isGlobalMuon flag
|
26 |
|
|
AllStandAloneMuons = 2, //checks isStandAloneMuon flag
|
27 |
|
|
AllTrackerMuons = 3, //checks isTrackerMuon flag
|
28 |
|
|
TrackerMuonArbitrated = 4, //resolve ambiguity of sharing segments
|
29 |
|
|
AllArbitrated = 5, //all muons with the tracker muon arbitrated
|
30 |
|
|
GlobalMuonPromptTight = 6, //global muons with tighter fit requirements
|
31 |
|
|
TMLastStationLoose = 7, //penetration depth loose selector
|
32 |
|
|
TMLastStationTight = 8, //penetration depth tight selector
|
33 |
|
|
TM2DCompatibilityLoose = 9, //likelihood based loose selector
|
34 |
|
|
TM2DCompatibilityTight = 10, //likelihood based tight selector
|
35 |
|
|
TMOneStationLoose = 11, //require one well matched segment
|
36 |
|
|
TMOneStationTight = 12, //require one well matched segment
|
37 |
|
|
TMLastStationOptimizedLowPtLoose = 13, //combination of TMLastStation and TMOneStation
|
38 |
|
|
TMLastStationOptimizedLowPtTight = 14, //combination of TMLastStation and TMOneStation
|
39 |
|
|
GMTkChiCompatibility = 15, //require tk stub have good chi2 relative to glb track
|
40 |
|
|
GMStaChiCompatibility = 16, //require sta stub have good chi2 compatibility
|
41 |
|
|
//relative to glb track
|
42 |
|
|
GMTkKinkTight = 17, //require a small kink value in the tracker stub
|
43 |
|
|
TMLastStationAngLoose = 18, //TMLastStationLoose with additional angular cuts
|
44 |
|
|
TMLastStationAngTight = 19, //TMLastStationTight with additional angular cuts
|
45 |
|
|
TMOneStationAngLoose = 20, //TMOneStationLoose with additional angular cuts
|
46 |
|
|
TMOneStationAngTight = 21, //TMOneStationTight with additional angular cuts
|
47 |
|
|
//The two algorithms that follow are identical to what were known as
|
48 |
|
|
//TMLastStationOptimizedLowPt* (sans the Barrel) as late as revision
|
49 |
|
|
//1.7 of this file. The names were changed because indeed the low pt
|
50 |
|
|
//optimization applies only to the barrel region, whereas the sel-
|
51 |
|
|
//ectors above are more efficient at low pt in the endcaps, which is
|
52 |
|
|
//what we feel is more suggestive of the algorithm name. This will be
|
53 |
|
|
//less confusing for future generations of CMS members, I hope...
|
54 |
|
|
TMLastStationOptimizedBarrelLowPtLoose = 22, //combination of TMLastStation and TMOneStation
|
55 |
|
|
//but with low pT optimization in barrel only
|
56 |
|
|
TMLastStationOptimizedBarrelLowPtTight = 23 //combination of TMLastStation and TMOneStation
|
57 |
|
|
//but with low pT optimization in barrel only
|
58 |
|
|
};
|
59 |
|
|
|
60 |
|
|
MuonQuality() {}
|
61 |
|
|
virtual ~MuonQuality() {}
|
62 |
|
|
|
63 |
|
|
void ClearQuality(MuonSelectionType q) { fQualityMask.ClearBit(q); }
|
64 |
|
|
Bool_t Quality(MuonSelectionType q) const { return fQualityMask.TestBit(q); }
|
65 |
|
|
const BitMask32 &QualityMask() const { return fQualityMask; }
|
66 |
|
|
UInt_t NQuality() const { return fQualityMask.NBitsSet(); }
|
67 |
|
|
void SetQuality(MuonSelectionType q) { fQualityMask.SetBit(q); }
|
68 |
|
|
void SetQualityMask(const BitMask32 &q) { fQualityMask = q; }
|
69 |
|
|
|
70 |
|
|
protected:
|
71 |
|
|
BitMask32 fQualityMask; //track quality bitmask
|
72 |
|
|
|
73 |
|
|
ClassDef(MuonQuality, 1)
|
74 |
|
|
};
|
75 |
|
|
}
|
76 |
|
|
#endif
|