18 produces<edm::ValueMap<reco::PFCandidateRef> > (
nameOutputPF_);
27 std::auto_ptr<reco::PFCandidateCollection>
30 std::auto_ptr<edm::ValueMap<reco::PFCandidateRef> >
44 unsigned ncand=(
status)?pfCandidates->size():0;
46 for(
unsigned i=0;
i<ncand; ++
i ) {
53 pfCandidates_p->push_back(cand);
60 std::vector<reco::GsfElectron>::const_iterator itcheck=find_if(gsfElectrons->begin(),gsfElectrons->end(),myEqual);
61 if(itcheck==gsfElectrons->end()) {
62 std::ostringstream err;
63 err <<
" Problem in GsfElectronLinker: no GsfElectron " << std::endl;
70 pfCandidates_p->push_back(cand);
76 fillValueMap(gsfElectrons,pfCandidateRefProd,pfMapFiller);
88 std::ostringstream err;
89 err<<
" cannot get PFCandidates: "
104 std::ostringstream err;
105 err<<
" cannot get GsfElectrons: "
116 unsigned nElectrons=electrons->size();
117 std::vector<reco::PFCandidateRef>
values;
118 for(
unsigned ielec=0;ielec<nElectrons;++ielec) {
120 std::map<reco::GsfElectronRef,unsigned>::const_iterator itcheck=
electronCandidateMap_.find(gsfElecRef);
127 filler.
insert(electrons,values.begin(),values.end());
edm::InputTag inputTagPFCandidates_
Input PFCandidates.
T getParameter(std::string const &) const
void setGsfElectronRef(const reco::GsfElectronRef &ref)
set GsfElectronRef
void insert(const H &h, I begin, I end)
void setSourceCandidatePtr(const PFCandidatePtr &ptr)
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
void fillValueMap(edm::Handle< reco::GsfElectronCollection > &c, const edm::OrphanHandle< reco::PFCandidateCollection > &pfHandle, edm::ValueMap< reco::PFCandidateRef >::Filler &filler) const
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::map< reco::GsfElectronRef, unsigned > electronCandidateMap_
map GsfElectron PFCandidate (index)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
bool fetchGsfElectronCollection(edm::Handle< reco::GsfElectronCollection > &c, const edm::InputTag &tag, const edm::Event &iEvent) const
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
virtual void produce(edm::Event &, const edm::EventSetup &)
Particle reconstructed by the particle flow algorithm.
virtual void beginRun(edm::Run &run, const edm::EventSetup &es)
GsfElectronLinker(const edm::ParameterSet &)
reco::GsfTrackRef gsfTrackRef() const
bool fetchCandidateCollection(edm::Handle< reco::PFCandidateCollection > &c, const edm::InputTag &tag, const edm::Event &iEvent) const
virtual ParticleType particleId() const
edm::InputTag inputTagGsfElectrons_
Input GsfElectrons.
std::string nameOutputPF_
name of output collection of PFCandidate