Skip to content

Commit

Permalink
adding a none option to disable muon selection
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam-Harper committed Aug 15, 2017
1 parent 5d107df commit 655882a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions DQMOffline/Trigger/plugins/HLTDQMMuonSelector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class HLTDQMMuonSelector : public edm::stream::EDProducer<> {
private:

enum class MuonSelectionType {
Tight,Medium,Loose,Soft,HighPt
Tight,Medium,Loose,Soft,HighPt,None
};

static MuonSelectionType convertToEnum(const std::string& val);
Expand Down Expand Up @@ -92,7 +92,8 @@ HLTDQMMuonSelector::MuonSelectionType HLTDQMMuonSelector::convertToEnum(const st
{"medium",MuonSelectionType::Medium},
{"loose",MuonSelectionType::Loose},
{"soft",MuonSelectionType::Soft},
{"highpt",MuonSelectionType::HighPt}
{"highpt",MuonSelectionType::HighPt},
{"none",MuonSelectionType::None}
};
for(const auto& strEnumPair : strsToEnums){
if(val==strEnumPair.first) return strEnumPair.second;
Expand All @@ -115,6 +116,8 @@ bool HLTDQMMuonSelector::passMuonSel(const reco::Muon& muon,const reco::Vertex&
return muon::isSoftMuon(muon,vertex);
case MuonSelectionType::HighPt:
return muon::isHighPtMuon(muon,vertex);
case MuonSelectionType::None:
return true;
default:
edm::LogError("HLTDQMMuonSelector")<<" inconsistent code, an option has been added to MuonSelectionType without updating HLTDQMMuonSelector::passMuonSel";
return false;
Expand Down

0 comments on commit 655882a

Please sign in to comment.