44 std::vector<std::vector<reco::PFCandidateRef>> refs(handle->size());
45 for (
unsigned int i = 0,
n = handle->size();
i <
n; ++
i) {
48 refs[
i].push_back(pf2pf[pfRef]);
52 std::unique_ptr<edm::ValueMap<std::vector<reco::PFCandidateRef>>>
out(
new edm::ValueMap<std::vector<reco::PFCandidateRef>>());
54 filler.insert(handle, refs.begin(), refs.end());
62 photons_(consumes<std::vector<
reco::
Photon>>(iConfig.getParameter<edm::
InputTag>(
"photons"))),
63 electrons_(consumes<std::vector<
reco::GsfElectron>>(iConfig.getParameter<edm::
InputTag>(
"electrons"))),
68 produces<edm::ValueMap<std::vector<reco::PFCandidateRef>>>(
"photons");
69 produces<edm::ValueMap<std::vector<reco::PFCandidateRef>>>(
"electrons");
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup)
edm::EDGetTokenT< std::vector< reco::GsfElectron > > electrons_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< edm::ValueMap< reco::PFCandidateRef > > pf2pf_
PFEGammaToCandidateRemapper(const edm::ParameterSet &iConfig)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::Ref< PFCandidateCollection > PFCandidateRef
persistent reference to a PFCandidate
void run(edm::Event &iEvent, const edm::EDGetTokenT< std::vector< T >> &colltoken, const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef >>> &oldmaptoken, const edm::ValueMap< reco::PFCandidateRef > &pf2pf, const std::string &name)
edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > electron2pf_
edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > photon2pf_
virtual ~PFEGammaToCandidateRemapper()
edm::EDGetTokenT< std::vector< reco::Photon > > photons_