55 auto outputElectrons_p = std::make_unique<reco::GsfElectronCollection>();
71 std::vector< edm::Handle< edm::ValueMap<float> > > isolationValueMaps(
nDeps_);
78 std::map<reco::GsfTrackRef, const reco::PFCandidate* > gsfPFMap;
79 reco::PFCandidateCollection::const_iterator it = pfCandidateHandle->begin();
80 reco::PFCandidateCollection::const_iterator itend = pfCandidateHandle->end() ;
81 for(;it!=itend;++it) {
83 if( it->gsfTrackRef().isNonnull()) {
84 if(
abs(it->pdgId())==11)
85 gsfPFMap[it->gsfTrackRef()]=&(*it);
91 unsigned nele=gedElectronHandle->size();
92 for(
unsigned iele=0; iele<nele;++iele) {
98 isoVariables.
sumPhotonEt = (*(isolationValueMaps)[1])[myElectronRef];
100 isoVariables.
sumPUPt = (*(isolationValueMaps)[3])[myElectronRef];
104 newElectron.setPfIsolationVariables(isoVariables);
108 if(newElectron.mvaOutput().status<=0) {
109 std::map<reco::GsfTrackRef, const reco::PFCandidate * >::const_iterator itcheck=gsfPFMap.find(newElectron.gsfTrack());
111 if(itcheck!=gsfPFMap.end()) {
114 newElectron.setPassPflowPreselection(
true);
117 myMvaOutput.status = 4 ;
118 newElectron.setPassPflowPreselection(
false);
120 newElectron.setMvaOutput(myMvaOutput);
126 outputElectrons_p->push_back(newElectron);
edm::EDGetTokenT< reco::GsfElectronCollection > previousGsfElectrons_
std::unique_ptr< ModifyObjectValueBase > gedRegression_
float sumPUPt
sum pt of charged Particles not from PV (for Pu corrections)
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > tokenElectronIsoVals_
std::string outputCollectionLabel_
float sumPhotonEt
sum pt of PF photons // old float photonIso ;
Abs< T >::type abs(const T &t)
float sumNeutralHadronEt
sum pt of neutral hadrons // old float neutralHadronIso ;
edm::EDGetTokenT< reco::PFCandidateCollection > pfCandidates_
float sumChargedHadronPt
sum-pt of charged Hadron // old float chargedHadronIso ;