30 template <
class T,
class C = T,
typename TN =
float>
55 produces<JetValueMap>();
69 <<
"The number of value labels does not match the number of values. Values will not be evaluated.";
84 std::map<std::string, std::vector<float> > valuesMap;
87 valuesMap.insert(std::make_pair(
valueLabels_[
i], std::vector<float>(h_jets1->size(), -99999)));
89 std::vector<bool> jets1_locks(h_jets1->size(),
false);
94 float matched_dR2 = 1e9;
95 int matched_index = -1;
96 int iindex = ijet - ibegin;
101 int jindex = jjet - jbegin;
103 if (jets1_locks.at(jindex))
106 float temp_dR2 =
reco::deltaR2(ijet->eta(), ijet->phi(), jjet->eta(), jjet->phi());
107 if (temp_dR2 < matched_dR2) {
108 matched_dR2 = temp_dR2;
109 matched_index = jindex;
113 if (matched_index >= 0) {
115 edm::LogInfo(
"MatchedJetsFarApart") <<
"Matched jets separated by dR greater than distMax=" <<
distMax_;
117 jets1_locks.at(matched_index) =
true;
120 values.at(matched_index) = iindex;
134 std::unique_ptr<JetValueMap> jetValueMap(
new JetValueMap());
145 std::unique_ptr<JetValueMap> jetValueMap(
new JetValueMap());
165 std::map<std::string, std::unique_ptr<const StringObjectFunction<C> > >
evaluationMap_;
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
const edm::EDGetTokenT< typename edm::View< T > > srcToken_
const std::vector< std::string > valueLabels_
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
JetDeltaRValueMapProducer< pat::Jet > PatJetDeltaRValueMapProducer
edm::ValueMap< value_type > JetValueMap
std::vector< value_type > ValueVector
#define DEFINE_FWK_MODULE(type)
~JetDeltaRValueMapProducer() override
JetDeltaRValueMapProducer(edm::ParameterSet const ¶ms)
Log< level::Info, false > LogInfo
JetDeltaRValueMapProducer< reco::Jet, reco::GenJet, int > RecoJetToGenJetDeltaRValueMapProducer
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
JetDeltaRValueMapProducer< reco::Jet, pat::Jet > RecoJetToPatJetDeltaRValueMapProducer
std::map< std::string, std::unique_ptr< const StringObjectFunction< C > > > evaluationMap_
const edm::EDGetTokenT< typename edm::View< C > > matchedToken_
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_