15 jetsInput_ = iConfig.template getParameter<edm::InputTag>(
"jetsInput");
16 L1Jets_ = iConfig.template getParameter<edm::InputTag>(
"L1Jets");
17 DeltaR_ = iConfig.template getParameter<double>(
"DeltaR");
19 typedef std::vector<T> TCollection;
20 m_theJetToken = consumes<TCollection>(jetsInput_);
21 m_theL1JetToken = consumes<l1t::JetBxCollection>(L1Jets_);
22 produces<TCollection>();
36 desc.add<
double>(
"DeltaR", 0.5);
42 typedef std::vector<T> TCollection;
47 std::unique_ptr<TCollection>
result(
new TCollection);
50 iEvent.getByToken(m_theL1JetToken, l1Jets);
51 bool trigger_bx_only =
true;
54 typename TCollection::const_iterator jet_iter;
55 for (jet_iter =
jets->begin(); jet_iter !=
jets->end(); ++jet_iter) {
58 if (trigger_bx_only && (ibx != 0))
60 for (
auto it = l1Jets->
begin(ibx); it != l1Jets->
end(ibx); it++) {
63 const double deltaeta = jet_iter->eta() - it->eta();
64 const double deltaphi =
deltaPhi(jet_iter->phi(), it->phi());
65 if (
sqrt(deltaeta * deltaeta + deltaphi * deltaphi) < DeltaR_)
71 result->push_back(*jet_iter);
74 edm::LogWarning(
"MissingProduct") <<
"L1Upgrade l1Jets bx collection not found." << std::endl;
std::string defaultModuleLabel()
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const_iterator begin(int bx) const
bool isMatched(TrackingRecHit const &hit)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const_iterator end(int bx) const
void produce(edm::Event &, const edm::EventSetup &) override
~HLTJetL1TMatchProducer() override
HLTJetL1TMatchProducer(const edm::ParameterSet &)
Log< level::Warning, false > LogWarning