41 auto const &coll = iEvent.
get(colltoken);
46 auto result = std::make_unique<std::vector<reco::VertexCompositePtrCandidate>>();
47 for (
auto const &
obj : coll) {
57 : photons_(consumes<edm::
View<pat::
Photon>>(iConfig.getParameter<edm::
InputTag>(
"photons"))),
58 electrons_(consumes<edm::
View<pat::
Electron>>(iConfig.getParameter<edm::
InputTag>(
"electrons"))),
62 iConfig.getParameter<edm::
InputTag>(
"electron2pf"))) {
63 produces<std::vector<reco::VertexCompositePtrCandidate>>(
"photons");
64 produces<std::vector<reco::VertexCompositePtrCandidate>>(
"electrons");
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Ptr< typename C::value_type > refToPtr(Ref< C, typename C::value_type, refhelper::FindUsingAdvance< C, typename C::value_type > > const &ref)
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > photon2pf_
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > electron2pf_
void produce(edm::StreamID iID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
bool get(ProductID const &oid, Handle< PROD > &result) const
ParameterDescriptionBase * add(U const &iLabel, T const &value)
PFEGammaToCandidate(const edm::ParameterSet &iConfig)
void run(edm::Event &iEvent, const edm::EDGetTokenT< edm::View< T >> &colltoken, const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef >>> &oldmaptoken, const std::string &name) const
constexpr char Electron[]
edm::Ref< l1t::PFCandidateCollection > PFCandidateRef
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
~PFEGammaToCandidate() override=default
const edm::EDGetTokenT< edm::View< pat::Photon > > photons_
const edm::EDGetTokenT< edm::View< pat::Electron > > electrons_