40 muonSelType_(convertToEnum(
config.getParameter<
std::
string>(
"muonSelectionType"))) {
41 produces<edm::ValueMap<bool> >();
50 descriptions.
add(
"hltDQMMuonSelector",
desc);
63 std::vector<bool> selResults;
64 for (
auto&
muon : *muonHandle) {
65 if (vtxHandle.
isValid() && !vtxHandle->empty()) {
68 selResults.push_back(
false);
71 auto valMap = std::make_unique<edm::ValueMap<bool> >();
73 filler.insert(muonHandle, selResults.begin(), selResults.end());
85 for (
const auto& strEnumPair : strsToEnums) {
86 if (
val == strEnumPair.first)
87 return strEnumPair.second;
89 std::ostringstream validEnums;
90 for (
const auto& strEnumPair : strsToEnums)
91 validEnums << strEnumPair.first <<
" ";
92 throw cms::Exception(
"InvalidConfig") <<
"invalid muonSelectionType " <<
val <<
", allowed values are " 111 edm::LogError(
"HLTDQMMuonSelector") <<
" inconsistent code, an option has been added to MuonSelectionType " 112 "without updating HLTDQMMuonSelector::passMuonSel";
static MuonSelectionType convertToEnum(const std::string &val)
bool isMediumMuon(const reco::Muon &, bool run2016_hip_mitigation=false)
MuonSelectionType muonSelType_
HLTDQMMuonSelector(const edm::ParameterSet &config)
void produce(edm::Event &, edm::EventSetup const &) override
Log< level::Error, false > LogError
std::vector< Vertex > VertexCollection
std::vector< Muon > MuonCollection
collection of Muon objects
bool isLooseMuon(const reco::Muon &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define DEFINE_FWK_MODULE(type)
bool isSoftMuon(const reco::Muon &, const reco::Vertex &, bool run2016_hip_mitigation=false)
bool isHighPtMuon(const reco::Muon &, const reco::Vertex &)
StringCutObjectSelector< reco::Muon, true > selection_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::EDGetTokenT< reco::MuonCollection > muonToken_
bool passMuonSel(const reco::Muon &muon, const reco::Vertex &vertex) const
bool isTightMuon(const reco::Muon &, const reco::Vertex &)
edm::EDGetTokenT< reco::VertexCollection > vtxToken_