|
|
Go to the documentation of this file. 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;
ret
prodAgent to be discontinued
index_type indexmaxPfRelIso_
void setIgnored(pat::strbitset &ret)
set ignored bits
Functor that operates on <T>
pat::strbitset bits_
the bitset indexed by strings
bool operator()(const pat::Muon &muon, pat::strbitset &ret) override
This provides the interface for base classes to select objects.
pat::strbitset::index_type index_type
pat::strbitset retInternal_
internal ret if users don't care about return bits
bool ignoreCut(std::string const &s) const
ignore the cut at index "s"
Analysis-level muon class.
index_type indexMinTrackerLayers_
index_type indexminValidMuHits_
virtual void push_back(std::string const &s)
This is the registration of an individual cut string.
pat::strbitset getBitTemplate() const
Get an empty bitset with the proper names.
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)
void setIgnoredCuts(std::vector< std::string > const &bitsToIgnore)
set the bits to ignore from a vector
index_type indexStations_
int cut(index_type const &i, int val) const
Access the int cut values at index "s".
void set(std::string const &s, bool val=true)
Set a given selection cut, on or off.
PFMuonSelector(edm::ParameterSet const ¶meters)
bool TopPag12LjetsCuts(const pat::Muon &muon, pat::strbitset &ret)
PFMuonSelector(edm::ParameterSet const ¶meters, edm::ConsumesCollector &&iC)