00001 #ifndef MuonReco_MuonSelectors_h
00002 #define MuonReco_MuonSelectors_h
00003
00004
00005
00006
00007
00008
00009
00010 #include "DataFormats/MuonReco/interface/Muon.h"
00011 #include "TMath.h"
00012 #include <string>
00013
00014 namespace muon {
00016 enum SelectionType {
00017 All = 0,
00018 AllGlobalMuons = 1,
00019 AllStandAloneMuons = 2,
00020 AllTrackerMuons = 3,
00021 TrackerMuonArbitrated = 4,
00022 AllArbitrated = 5,
00023 GlobalMuonPromptTight = 6,
00024 TMLastStationLoose = 7,
00025 TMLastStationTight = 8,
00026 TM2DCompatibilityLoose = 9,
00027 TM2DCompatibilityTight = 10,
00028 TMOneStationLoose = 11,
00029 TMOneStationTight = 12,
00030 TMLastStationOptimizedLowPtLoose = 13,
00031 TMLastStationOptimizedLowPtTight = 14,
00032 GMTkChiCompatibility = 15,
00033 GMStaChiCompatibility = 16,
00034 GMTkKinkTight = 17,
00035 TMLastStationAngLoose = 18,
00036 TMLastStationAngTight = 19,
00037 TMOneStationAngLoose = 20,
00038 TMOneStationAngTight = 21,
00039
00040
00041
00042
00043
00044
00045
00046 TMLastStationOptimizedBarrelLowPtLoose = 22,
00047 TMLastStationOptimizedBarrelLowPtTight = 23
00048 };
00049
00051 struct SelectionTypeStringToEnum { const char *label; SelectionType value; };
00052 SelectionType selectionTypeFromString( const std::string &label );
00053
00055 bool isGoodMuon( const reco::Muon& muon, SelectionType type,
00056 reco::Muon::ArbitrationType arbitrationType = reco::Muon::SegmentAndTrackArbitration);
00057
00058
00059
00060
00061 enum AlgorithmType { TMLastStation, TM2DCompatibility, TMOneStation };
00062
00063
00064 bool isGoodMuon( const reco::Muon& muon,
00065 AlgorithmType type,
00066 double minCompatibility,
00067 reco::Muon::ArbitrationType arbitrationType );
00068
00069 bool isGoodMuon( const reco::Muon& muon,
00070 AlgorithmType type,
00071 int minNumberOfMatches,
00072 double maxAbsDx,
00073 double maxAbsPullX,
00074 double maxAbsDy,
00075 double maxAbsPullY,
00076 double maxChamberDist,
00077 double maxChamberDistPull,
00078 reco::Muon::ArbitrationType arbitrationType,
00079 bool syncMinNMatchesNRequiredStationsInBarrelOnly = true,
00080 bool applyAlsoAngularCuts = false);
00081
00082
00083 unsigned int RequiredStationMask( const reco::Muon& muon,
00084 double maxChamberDist,
00085 double maxChamberDistPull,
00086 reco::Muon::ArbitrationType arbitrationType );
00087
00088
00089 float caloCompatibility(const reco::Muon& muon);
00090
00091
00092 float segmentCompatibility(const reco::Muon& muon,reco::Muon::ArbitrationType arbitrationType = reco::Muon::SegmentAndTrackArbitration);
00093
00094
00095
00096
00097
00098
00099 bool overlap( const reco::Muon& muon1, const reco::Muon& muon2,
00100 double pullX = 1.0, double pullY = 1.0, bool checkAdjacentChambers = false);
00101
00102 }
00103 #endif