30 template <
class T,
class C = T>
51 produces<JetValueMap>();
65 <<
"The number of value labels does not match the number of values. Values will not be evaluated.";
78 std::vector<float>
values(h_jets1->size(), -99999);
79 std::map<std::string, std::vector<float> > valuesMap;
82 valuesMap.insert(std::make_pair(
valueLabels_[
i], std::vector<float>(h_jets1->size(), -99999)));
84 std::vector<bool> jets1_locks(h_jets1->size(),
false);
89 float matched_dR2 = 1e9;
90 int matched_index = -1;
95 int index = jjet - jbegin;
97 if (jets1_locks.at(
index))
100 float temp_dR2 =
reco::deltaR2(ijet->eta(), ijet->phi(), jjet->eta(), jjet->phi());
101 if (temp_dR2 < matched_dR2) {
102 matched_dR2 = temp_dR2;
103 matched_index =
index;
107 if (matched_index >= 0) {
109 edm::LogInfo(
"MatchedJetsFarApart") <<
"Matched jets separated by dR greater than distMax=" <<
distMax_;
111 jets1_locks.at(matched_index) =
true;
123 std::unique_ptr<JetValueMap> jetValueMap(
new JetValueMap());
134 std::unique_ptr<JetValueMap> jetValueMap(
new JetValueMap());
154 std::map<std::string, std::unique_ptr<const StringObjectFunction<C> > >
evaluationMap_;
edm::ValueMap< float > JetValueMap
JetDeltaRValueMapProducer(edm::ParameterSet const ¶ms)
const std::vector< std::string > valueLabels_
#define DEFINE_FWK_MODULE(type)
const edm::EDGetTokenT< typename edm::View< T > > srcToken_
std::map< std::string, std::unique_ptr< const StringObjectFunction< C > > > evaluationMap_
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
JetDeltaRValueMapProducer< pat::Jet > PatJetDeltaRValueMapProducer
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
const edm::EDGetTokenT< typename edm::View< C > > matchedToken_
~JetDeltaRValueMapProducer() override
Log< level::Info, false > LogInfo
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
JetDeltaRValueMapProducer< reco::Jet, pat::Jet > RecoJetToPatJetDeltaRValueMapProducer
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
JetDeltaRValueMapProducer< reco::Jet > RecoJetDeltaRValueMapProducer
Log< level::Warning, false > LogWarning
const std::vector< std::string > values_