1 #ifndef PhysicsTools_PatUtils_interface_PFMuonSelector_h 2 #define PhysicsTools_PatUtils_interface_PFMuonSelector_h 35 if (versionStr ==
"TOPPAG12_LJETS") {
38 throw cms::Exception(
"InvalidInput") <<
"Expect version to be one of SPRING11" << std::endl;
43 parameters.getParameter<
int>(
"minTrackerLayers"),
44 parameters.getParameter<
int>(
"minValidMuHits"),
47 parameters.getParameter<
int>(
"minMatchedStations"),
48 parameters.getParameter<
double>(
"maxPfRelIso"));
58 int minValidMuonHits = 1,
62 double pfiso = 0.12) {
69 push_back(
"minValidMuHits", minValidMuonHits);
72 push_back(
"minMatchedStations", minNMatches);
78 set(
"minTrackerLayers");
79 set(
"minValidMuHits");
82 set(
"minMatchedStations");
94 set(
"TrackerMuon",
false);
115 double norm_chi2 = 9999999.0;
117 int minValidMuonHits = 0;
120 if (
muon.globalTrack().isNonnull() &&
muon.globalTrack().isAvailable()) {
121 norm_chi2 =
muon.normChi2();
123 minValidMuonHits =
static_cast<int>(
muon.globalTrack()->hitPattern().numberOfValidMuonHits());
135 double pfIso = (chIso + nhIso + gIso) /
pt;
bool ignoreCut(std::string const &s) const
ignore the cut at index "s"
bool operator()(const pat::Muon &muon, pat::strbitset &ret) override
This provides the interface for base classes to select objects.
PFMuonSelector(edm::ParameterSet const ¶meters, edm::ConsumesCollector &&iC)
ret
prodAgent to be discontinued
pat::strbitset::index_type index_type
void setIgnored(pat::strbitset &ret)
set ignored bits
pat::strbitset retInternal_
internal ret if users don't care about return bits
bool TopPag12LjetsCuts(const pat::Muon &muon, pat::strbitset &ret)
index_type indexStations_
index_type indexminValidMuHits_
pat::strbitset bits_
the bitset indexed by strings
void passCut(pat::strbitset &ret, std::string const &s)
Passing cuts.
void initialize(Version_t version, double chi2=10.0, int minTrackerLayers=6, int minValidMuonHits=1, double maxIp=0.2, int minPixelHits=1, int minNMatches=2, double pfiso=0.12)
PFMuonSelector(edm::ParameterSet const ¶meters)
virtual void push_back(std::string const &s)
This is the registration of an individual cut string.
index_type indexMinTrackerLayers_
Functor that operates on <T>
pat::strbitset getBitTemplate() const
Get an empty bitset with the proper names.
int cut(index_type const &i, int val) const
Access the int cut values at index "s".
index_type indexmaxPfRelIso_
void setIgnoredCuts(std::vector< std::string > const &bitsToIgnore)
set the bits to ignore from a vector
Analysis-level muon class.