25 putToken_{produces<edm::ValueMap<reco::GsfElectronRef>>()} {}
36 std::vector<reco::GsfElectronRef>
values;
38 for (
auto const& pfCandidate : *pfCandidatesHandle) {
41 if (pfCandidate.gsfTrackRef().isNonnull()) {
43 const auto itcheck = std::find_if(
electrons->begin(),
electrons->end(), [&pfCandidate](
const auto& ele) {
44 return (ele.gsfTrack() == pfCandidate.gsfTrackRef());
51 values.push_back(myRef);
53 valMapFiller.
insert(pfCandidatesHandle, values.begin(), values.end());
63 descriptions.
add(
"gedGsfElectronValueMapsTmp", desc);
#define DEFINE_FWK_MODULE(type)
std::vector< l1t::PFCandidate > PFCandidateCollection
void insert(const H &h, I begin, I end)
const edm::EDPutTokenT< edm::ValueMap< reco::GsfElectronRef > > putToken_
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
GEDGsfElectronValueMapProducer(const edm::ParameterSet &)
const edm::EDGetTokenT< reco::GsfElectronCollection > electronsToken_
const edm::EDGetTokenT< reco::PFCandidateCollection > pfCandsToken_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::Ref< GsfElectronCollection > GsfElectronRef
reference to an object in a collection of GsfElectron objects
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void add(std::string const &label, ParameterSetDescription const &psetDescription)