48 void endStream()
override;
80 edm::LogInfo(
"AlCaIsoBunch") <<
"Input tag for trigger results " << theTriggerResultsLabel_ <<
" with " 81 << trigIsoBunchNames_.size() <<
":" <<
trigJetNames_.size() <<
" trigger names and" 82 <<
" process " << processName_ << std::endl;
83 for (
unsigned int k = 0;
k < trigIsoBunchNames_.size(); ++
k)
84 edm::LogInfo(
"AlCaIsoBunch") <<
"Isolated Bunch[" <<
k <<
"] " << trigIsoBunchNames_[
k] << std::endl;
110 if (triggerResults.
isValid()) {
112 const std::vector<std::string>& triggerNames_ = triggerNames.
triggerNames();
113 bool jet(
false), isobunch(
false);
114 for (
unsigned int iHLT = 0; iHLT < triggerResults->
size(); iHLT++) {
124 << triggerNames_[iHLT] <<
" has got HLT flag " << hlt <<
":" <<
jet <<
":" << isobunch << std::endl;
139 << triggerNames_[iHLT] <<
" has got HLT flag " << hlt <<
":" <<
jet <<
":" << isobunch << std::endl;
146 if (
jet && isobunch) {
162 globalCache()->nAll_ +=
nAll_;
163 globalCache()->nGood_ +=
nGood_;
167 edm::LogInfo(
"AlCaIsoBunch") <<
"Selects " << count->
nGood_ <<
" in " << count->
nAll_ <<
" events" << std::endl;
187 std::vector<std::string> isobunch = {
"HLT_ZeroBias_IsolatedBunches"};
188 desc.
add<std::vector<std::string> >(
"triggerIsoBunch", isobunch);
189 std::vector<std::string> triggers = {
"HLT_AK8PFJet",
197 "HLT_DiCentralPFJet",
199 "HLT_L1_TripleJet_VBF",
205 desc.
add<std::vector<std::string> >(
"triggerJet", triggers);
206 descriptions.
add(
"alcaIsolatedBunchFilter", desc);
T getParameter(std::string const &) const
EventNumber_t event() const
std::vector< std::string > trigIsoBunchNames_
void beginRun(edm::Run const &, edm::EventSetup const &) override
static std::unique_ptr< AlCaIsolatedBunch::Counters > initializeGlobalCache(edm::ParameterSet const &iConfig)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool accept() const
Has at least one path accepted the event?
int bunchCrossing() const
edm::LuminosityBlockNumber_t luminosityBlock() const
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Strings const & triggerNames() const
edm::InputTag theTriggerResultsLabel_
#define DEFINE_FWK_MODULE(type)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
unsigned int size() const
Get number of paths stored.
static std::string const triggerResults
std::atomic< unsigned int > nGood_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void globalEndJob(const AlCaIsolatedBunch::Counters *counters)
bool filter(edm::Event &, edm::EventSetup const &) override
~AlCaIsolatedBunchFilter() override
void endStream() override
std::atomic< unsigned int > nAll_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
void add(std::string const &label, ParameterSetDescription const &psetDescription)
HLTConfigProvider hltConfig_
AlCaIsolatedBunchFilter(edm::ParameterSet const &, const AlCaIsolatedBunch::Counters *count)
void endRun(edm::Run const &, edm::EventSetup const &) override
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
std::vector< std::string > trigJetNames_