CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MuonSelectors.h
Go to the documentation of this file.
1 #ifndef MuonReco_MuonSelectors_h
2 #define MuonReco_MuonSelectors_h
3 //
4 // Package: MuonReco
5 //
6 //
7 // Original Author: Jake Ribnik, Dmytro Kovalskyi
8 // $Id: MuonSelectors.h,v 1.17 2012/08/21 21:28:00 mskim Exp $
9 
11 #include "TMath.h"
12 #include <string>
13 
14 namespace reco{class Vertex;}
15 
16 namespace muon {
19  All = 0, // dummy options - always true
20  AllGlobalMuons = 1, // checks isGlobalMuon flag
21  AllStandAloneMuons = 2, // checks isStandAloneMuon flag
22  AllTrackerMuons = 3, // checks isTrackerMuon flag
23  TrackerMuonArbitrated = 4, // resolve ambiguity of sharing segments
24  AllArbitrated = 5, // all muons with the tracker muon arbitrated
25  GlobalMuonPromptTight = 6, // global muons with tighter fit requirements
26  TMLastStationLoose = 7, // penetration depth loose selector
27  TMLastStationTight = 8, // penetration depth tight selector
28  TM2DCompatibilityLoose = 9, // likelihood based loose selector
29  TM2DCompatibilityTight = 10, // likelihood based tight selector
30  TMOneStationLoose = 11, // require one well matched segment
31  TMOneStationTight = 12, // require one well matched segment
32  TMLastStationOptimizedLowPtLoose = 13, // combination of TMLastStation and TMOneStation
33  TMLastStationOptimizedLowPtTight = 14, // combination of TMLastStation and TMOneStation
34  GMTkChiCompatibility = 15, // require tk stub have good chi2 relative to glb track
35  GMStaChiCompatibility = 16, // require sta stub have good chi2 compatibility relative to glb track
36  GMTkKinkTight = 17, // require a small kink value in the tracker stub
37  TMLastStationAngLoose = 18, // TMLastStationLoose with additional angular cuts
38  TMLastStationAngTight = 19, // TMLastStationTight with additional angular cuts
39  TMOneStationAngLoose = 20, // TMOneStationLoose with additional angular cuts
40  TMOneStationAngTight = 21, // TMOneStationTight with additional angular cuts
41  // The two algorithms that follow are identical to what were known as
42  // TMLastStationOptimizedLowPt* (sans the Barrel) as late as revision
43  // 1.7 of this file. The names were changed because indeed the low pt
44  // optimization applies only to the barrel region, whereas the sel-
45  // ectors above are more efficient at low pt in the endcaps, which is
46  // what we feel is more suggestive of the algorithm name. This will be
47  // less confusing for future generations of CMS members, I hope...
48  TMLastStationOptimizedBarrelLowPtLoose = 22, // combination of TMLastStation and TMOneStation but with low pT optimization in barrel only
49  TMLastStationOptimizedBarrelLowPtTight = 23, // combination of TMLastStation and TMOneStation but with low pT optimization in barrel only
50  RPCMuLoose = 24 // checks isRPCMuon flag (require two well matched hits in different RPC layers)
51  };
52 
56 
60 
61  // ===========================================================================
62  // Support functions
63  //
65 
66  // specialized GoodMuon functions called from main wrapper
67  bool isGoodMuon( const reco::Muon& muon,
69  double minCompatibility,
70  reco::Muon::ArbitrationType arbitrationType );
71 
72  bool isGoodMuon( const reco::Muon& muon,
74  int minNumberOfMatches,
75  double maxAbsDx,
76  double maxAbsPullX,
77  double maxAbsDy,
78  double maxAbsPullY,
79  double maxChamberDist,
80  double maxChamberDistPull,
81  reco::Muon::ArbitrationType arbitrationType,
82  bool syncMinNMatchesNRequiredStationsInBarrelOnly = true,//this is what we had originally
83  bool applyAlsoAngularCuts = false);
84 
85  bool isTightMuon(const reco::Muon&, const reco::Vertex&);
86  bool isLooseMuon(const reco::Muon&);
87  bool isSoftMuon(const reco::Muon&, const reco::Vertex&);
88  bool isHighPtMuon(const reco::Muon&, const reco::Vertex&);
89 
90  // determine if station was crossed well withing active volume
91  unsigned int RequiredStationMask( const reco::Muon& muon,
92  double maxChamberDist,
93  double maxChamberDistPull,
94  reco::Muon::ArbitrationType arbitrationType );
95 
96  // ------------ method to return the calo compatibility for a track with matched muon info ------------
97  float caloCompatibility(const reco::Muon& muon);
98 
99  // ------------ method to calculate the segment compatibility for a track with matched muon info ------------
101 
102  // Check if two muon trajectory overlap
103  // The overlap is performed by comparing distance between two muon
104  // trajectories if they cross the same muon chamber. Trajectories
105  // overlap if distance/uncertainty is smaller than allowed pullX
106  // and pullY
107  bool overlap( const reco::Muon& muon1, const reco::Muon& muon2,
108  double pullX = 1.0, double pullY = 1.0, bool checkAdjacentChambers = false);
109 
112  int sharedSegments( const reco::Muon& muon1, const reco::Muon& muon2,
113  unsigned int segmentArbitrationMask = reco::MuonSegmentMatch::BestInChamberByDR ) ;
114 
115 }
116 #endif
type
Definition: HCALResponse.h:21
AlgorithmType
Definition: MuonSelectors.h:64
float caloCompatibility(const reco::Muon &muon)
bool isLooseMuon(const reco::Muon &)
SelectionType
Selector type.
Definition: MuonSelectors.h:18
bool overlap(const reco::Muon &muon1, const reco::Muon &muon2, double pullX=1.0, double pullY=1.0, bool checkAdjacentChambers=false)
bool isSoftMuon(const reco::Muon &, const reco::Vertex &)
ArbitrationType
define arbitration schemes
Definition: Muon.h:179
float segmentCompatibility(const reco::Muon &muon, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
static const unsigned int BestInChamberByDR
bool isGoodMuon(const reco::Muon &muon, SelectionType type, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
main GoodMuon wrapper call
int sharedSegments(const reco::Muon &muon1, const reco::Muon &muon2, unsigned int segmentArbitrationMask=reco::MuonSegmentMatch::BestInChamberByDR)
bool isHighPtMuon(const reco::Muon &, const reco::Vertex &)
SelectionType selectionTypeFromString(const std::string &label)
Definition: MuonSelectors.cc:9
a lightweight &quot;map&quot; for selection type string label and enum value
Definition: MuonSelectors.h:54
unsigned int RequiredStationMask(const reco::Muon &muon, double maxChamberDist, double maxChamberDistPull, reco::Muon::ArbitrationType arbitrationType)
bool isTightMuon(const reco::Muon &, const reco::Vertex &)