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