Skip to content

Commit

Permalink
HLTTauDQM: code-format fix
Browse files Browse the repository at this point in the history
  • Loading branch information
slehti committed Apr 10, 2024
1 parent 6dd065c commit aad09ab
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
11 changes: 6 additions & 5 deletions DQMOffline/Trigger/src/HLTTauDQMPath.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ namespace {
continue;
if (iLabel->find('-') == 0) // ignore
continue;
if (type == "L2TauTagFilter") // gives L1taus as output
continue;
if (type == "L2TauTagFilter") // gives L1taus as output
continue;
if (type == "HLT2PhotonPFTau" || type == "HLT2ElectronPFTau" || type == "HLT2MuonPFTau" ||
type == "HLT2PhotonTau" || type == "HLT2ElectronTau" || type == "HLT2MuonTau")
leptonTauFilters.emplace_back(*iLabel);
Expand Down Expand Up @@ -100,7 +100,8 @@ namespace {

bool isL3TauProducer(const HLTConfigProvider& HLTCP, const std::string& producerLabel) const {
const std::string type = HLTCP.moduleType(producerLabel);
if (type == "PFRecoTauProducer" || type == "RecoTauPiZeroUnembedder" || type == "BTagProbabilityToDiscriminator") {
if (type == "PFRecoTauProducer" || type == "RecoTauPiZeroUnembedder" ||
type == "BTagProbabilityToDiscriminator") {
LogDebug("HLTTauDQMOffline") << "Found tau producer " << type << " with label " << producerLabel
<< " from path " << name_;
return true;
Expand Down Expand Up @@ -137,7 +138,7 @@ namespace {
if (pset.exists("inputTag2"))
return isL3TauProducer(HLTCP, pset.getParameter<edm::InputTag>("inputTag2").label());
if (pset.exists("taus"))
return isL3TauProducer(HLTCP, pset.getParameter<edm::InputTag>("taus").label());
return isL3TauProducer(HLTCP, pset.getParameter<edm::InputTag>("taus").label());
return false;
}

Expand Down Expand Up @@ -413,7 +414,7 @@ HLTTauDQMPath::HLTTauDQMPath(std::string pathName,
const std::string& moduleType = HLTCP.moduleType(filterName);

TauLeptonMultiplicity n = inferTauLeptonMultiplicity(HLTCP, filterName, moduleType, pathName_);
if(n.level > 0){
if (n.level > 0) {
filterTauN_.push_back(n.tau);
filterElectronN_.push_back(n.electron);
filterMuonN_.push_back(n.muon);
Expand Down
25 changes: 10 additions & 15 deletions DQMOffline/Trigger/src/HLTTauDQMPathPlotter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ void HLTTauDQMPathPlotter::bookHistograms(HistoWrapper& iWrapper, DQMStore::IBoo
// Book histograms
iBooker.setCurrentFolder(triggerTag());

hCounter_ = iWrapper.book1D(iBooker,"EventCounter","Accepted events;;entries",3,0,3,kEverything);
hCounter_ = iWrapper.book1D(iBooker, "EventCounter", "Accepted events;;entries", 3, 0, 3, kEverything);
hAcceptedEvents_ = iWrapper.book1D(iBooker,
"EventsPerFilter",
"Accepted Events per filter;;entries",
hltPath_.filtersSize(),
0,
hltPath_.filtersSize(),
kEverything);
hCounter_->setBinLabel(1,"all events");
hCounter_->setBinLabel(2,"ref tau found");
hCounter_->setBinLabel(3,"passed trg");
hCounter_->setBinLabel(1, "all events");
hCounter_->setBinLabel(2, "ref tau found");
hCounter_->setBinLabel(3, "passed trg");
for (size_t i = 0; i < hltPath_.filtersSize(); ++i) {
if (hAcceptedEvents_)
hAcceptedEvents_->setBinLabel(i + 1, hltPath_.getFilterName(i));
Expand Down Expand Up @@ -115,13 +115,8 @@ void HLTTauDQMPathPlotter::bookHistograms(HistoWrapper& iWrapper, DQMStore::IBoo
}

if (hltPath_.hasL3Taus()) {
hL3TrigTauEtEffNum_ = iWrapper.book1D(iBooker,
"L3TrigTauEtEffNum",
"L3 #tau p_{T} efficiency;Ref #tau p_{T};entries",
ptbins_,
0,
ptmax_,
kVital);
hL3TrigTauEtEffNum_ = iWrapper.book1D(
iBooker, "L3TrigTauEtEffNum", "L3 #tau p_{T} efficiency;Ref #tau p_{T};entries", ptbins_, 0, ptmax_, kVital);
hL3TrigTauEtEffDenom_ = iWrapper.book1D(iBooker,
"L3TrigTauEtEffDenom",
"L3 #tau p_{T} denominator;Ref #tau p_{T};Efficiency",
Expand Down Expand Up @@ -456,9 +451,10 @@ void HLTTauDQMPathPlotter::analyze(const edm::TriggerResults& triggerResults,
int lastMatchedTauFilter = -1;
int firstMatchedMETFilter = -1;
hCounter_->Fill(0.5);
if(refCollection.taus.size() > 0){
if (refCollection.taus.size() > 0) {
hCounter_->Fill(1.5);
if(hltPath_.fired(triggerResults)) hCounter_->Fill(2.5);
if (hltPath_.fired(triggerResults))
hCounter_->Fill(2.5);
}

if (doRefAnalysis_) {
Expand Down Expand Up @@ -489,8 +485,7 @@ void HLTTauDQMPathPlotter::analyze(const edm::TriggerResults& triggerResults,
hltPath_.getFilterName(i).find("hltHpsPFTau") < hltPath_.getFilterName(i).length() ||
hltPath_.getFilterName(i).find("hltDoublePFTau") < hltPath_.getFilterName(i).length() ||
hltPath_.getFilterName(i).find("hltHpsDoublePFTau") < hltPath_.getFilterName(i).length() ||
hltPath_.getFilterName(i).find("PNetTauhTag") < hltPath_.getFilterName(i).length()
)
hltPath_.getFilterName(i).find("PNetTauhTag") < hltPath_.getFilterName(i).length())
lastMatchedTauFilter = i;
if (firstMatchedMETFilter < 0 && hltPath_.getFilterName(i).find("hltMET") < hltPath_.getFilterName(i).length())
firstMatchedMETFilter = i;
Expand Down

0 comments on commit aad09ab

Please sign in to comment.