54 auto valMap_p = std::make_unique<edm::ValueMap<reco::GsfElectronRef>>();
72 <<
" cannot get PFCandidates! ";
76 reco::PFCandidateCollection::const_iterator it = pfCandidates->begin();
77 reco::PFCandidateCollection::const_iterator itend = pfCandidates->end() ;
78 std::vector<reco::GsfElectronRef>
values;
80 for ( ; it != itend ; ++it) {
83 if( it->gsfTrackRef().isNonnull()) {
86 const reco::GsfElectronCollection::const_iterator itcheck=
93 values.push_back(myRef);
95 filler.
insert(pfCandidates,values.begin(),values.end());
113 <<
" cannot get PFCandidates! ";
117 reco::PFCandidateCollection::const_iterator it = pfCandidates->begin();
118 reco::PFCandidateCollection::const_iterator itend = pfCandidates->end() ;
120 for ( ; it != itend ; ++it) {
123 if( it->gsfTrackRef().isNonnull()) {
127 myMvaOutput.
status = it->egammaExtraRef()->electronStatus() ;
134 myMvaInput.
sigmaEtaEta = it->egammaExtraRef()->sigmaEtaEta();
135 myMvaInput.
hadEnergy = it->egammaExtraRef()->hadEnergy();
T getParameter(std::string const &) const
void matchWithPFCandidates(edm::Event &event)
void setMVAOutputs(const gsfAlgoHelpers::HeavyObjectCache *, const std::map< reco::GsfTrackRef, reco::GsfElectron::MvaOutput > &mvaOutputs)
void fillEvent(edm::Event &)
void insert(const H &h, I begin, I end)
def setup(process, global_tag, zero_tesla=False)
void setMVAInputs(const std::map< reco::GsfTrackRef, reco::GsfElectron::MvaInput > &mvaInputs)
void completeElectrons(const gsfAlgoHelpers::HeavyObjectCache *)
virtual void produce(edm::Event &, const edm::EventSetup &)
std::string outputValueMapLabel_
edm::EDGetTokenT< reco::PFCandidateCollection > egmPFCandidateCollection_
edm::Ref< GsfElectronCollection > GsfElectronRef
reference to an object in a collection of GsfElectron objects
void fillGsfElectronValueMap(edm::Event &event, edm::ValueMap< reco::GsfElectronRef >::Filler &filler)
const edm::OrphanHandle< reco::GsfElectronCollection > & orphanHandle() const
GEDGsfElectronProducer(const edm::ParameterSet &, const gsfAlgoHelpers::HeavyObjectCache *)
std::map< reco::GsfTrackRef, reco::GsfElectron::MvaOutput > gsfMVAOutputMap_
void beginEvent(edm::Event &, const edm::EventSetup &)
virtual ~GEDGsfElectronProducer()
std::map< reco::GsfTrackRef, reco::GsfElectron::MvaInput > gsfMVAInputMap_