Skip to content

Commit

Permalink
Propagate recent changes in #39116
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunanda committed Aug 20, 2022
1 parent 0d9f35a commit 11d247f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,25 @@ bool AlCaIsolatedBunchSelector::filter(edm::Event& iEvent, edm::EventSetup const
edm::LogVerbatim("AlCaIsoBunch") << "Run " << iEvent.id().run() << " Event " << iEvent.id().event() << " Luminosity "
<< iEvent.luminosityBlock() << " Bunch " << iEvent.bunchCrossing() << std::endl;
#endif
//Step1: Find if the event passes the chosen trigger
auto const& triggerResults = iEvent.getHandle(tok_trigRes_);
if (triggerResults.isValid()) {
const edm::TriggerNames& triggerNames = iEvent.triggerNames(*triggerResults);
const std::vector<std::string>& triggerNames_ = triggerNames.triggerNames();
for (unsigned int iHLT = 0; iHLT < triggerResults->size(); iHLT++) {
int hlt = triggerResults->accept(iHLT);
if (triggerNames_[iHLT].find(trigName_) != std::string::npos) {
if (hlt > 0) {
accept = true;
if (trigName_.empty()) {
accept = true;
} else {
//Step1: Find if the event passes the chosen trigger
auto const& triggerResults = iEvent.getHandle(tok_trigRes_);
if (triggerResults.isValid()) {
const edm::TriggerNames& triggerNames = iEvent.triggerNames(*triggerResults);
const std::vector<std::string>& triggerNames_ = triggerNames.triggerNames();
for (unsigned int iHLT = 0; iHLT < triggerResults->size(); iHLT++) {
int hlt = triggerResults->accept(iHLT);
if (triggerNames_[iHLT].find(trigName_) != std::string::npos) {
if (hlt > 0) {
accept = true;
#ifdef EDM_ML_DEBUG
edm::LogVerbatim("AlCaIsoBunch")
<< triggerNames_[iHLT] << " has got HLT flag " << hlt << ":" << accept << std::endl;
edm::LogVerbatim("AlCaIsoBunch")
<< triggerNames_[iHLT] << " has got HLT flag " << hlt << ":" << accept << std::endl;
#endif
break;
break;
}
}
}
}
Expand Down Expand Up @@ -143,7 +147,7 @@ void AlCaIsolatedBunchSelector::fillDescriptions(edm::ConfigurationDescriptions&
edm::ParameterSetDescription desc;
desc.add<edm::InputTag>("triggerResultLabel", edm::InputTag("TriggerResults", "", "HLT"));
desc.add<std::string>("processName", "HLT");
desc.add<std::string>("triggerName", "HLT_ZeroBias_IsolatedBunches");
desc.add<std::string>("triggerName", "");
descriptions.add("alcaIsolatedBunchSelector", desc);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,29 @@

import HLTrigger.HLTfilters.hltHighLevel_cfi
noiseHLT = HLTrigger.HLTfilters.hltHighLevel_cfi.hltHighLevel.clone(
HLTPaths = ['HLT_PFMET130'],
# eventSetupPathsKey='HcalCalNoise',
eventSetupPathsKey='HcalCalNoise',
throw = False #dont throw except on unknown path name
)

prescaler = cms.EDFilter("PrescalerFHN",
TriggerResultsTag = cms.InputTag("TriggerResults", "", "HLT"),

# Will select OR of all specified HLTs
# And increment if HLT is seen, regardless if
# others cause selection

Prescales = cms.VPSet(
cms.PSet(
HLTName = cms.string("HLT_PFMET130"),
PrescaleFactor = cms.uint32(1)
)
# cms.PSet(
# name = cms.string("HLTPath2"),
# factor = cms.uint32(100)
# )
))
TriggerResultsTag = cms.InputTag("TriggerResults", "", "HLT"),

# Will select OR of all specified HLTs
# And increment if HLT is seen, regardless if
# others cause selection

Prescales = cms.VPSet(
cms.PSet(
# HLTName = cms.string("HLT_PFMET130"),
PrescaleFactor = cms.uint32(1)
)
# cms.PSet(
# name = cms.string("HLTPath2"),
# factor = cms.uint32(100)
# )
))

from Calibration.HcalAlCaRecoProducers.alcahcalnoise_cfi import *

seqALCARECOHcalCalNoise = cms.Sequence(noiseHLT*prescaler*HcalNoiseProd)


#seqALCARECOHcalCalNoise = cms.Sequence(noiseHLT*prescaler*HcalNoiseProd)
seqALCARECOHcalCalNoise = cms.Sequence(noiseHLT*HcalNoiseProd)

0 comments on commit 11d247f

Please sign in to comment.