35 putToken_{produces<reco::GsfElectronCollection>()} {
38 tokenElectronIsoVals_ = {consumes<ValueMap<float> >(pfIsoVals.getParameter<
InputTag>(
"pfSumChargedHadronPt")),
39 consumes<ValueMap<float> >(pfIsoVals.getParameter<
InputTag>(
"pfSumPhotonEt")),
40 consumes<ValueMap<float> >(pfIsoVals.getParameter<
InputTag>(
"pfSumNeutralHadronEt")),
41 consumes<ValueMap<float> >(pfIsoVals.getParameter<
InputTag>(
"pfSumPUPt")),
42 consumes<ValueMap<float> >(pfIsoVals.getParameter<
InputTag>(
"pfSumEcalClusterEt")),
43 consumes<ValueMap<float> >(pfIsoVals.getParameter<
InputTag>(
"pfSumHcalClusterEt"))};
46 auto const& iconf =
cfg.getParameterSet(
"regressionConfig");
47 auto const& mname = iconf.getParameter<
std::string>(
"modifierName");
48 auto cc = consumesCollector();
76 std::map<reco::GsfTrackRef, const reco::PFCandidate*> gsfPFMap;
77 for (
auto const& pfCand : *pfCandidateHandle) {
79 if (pfCand.gsfTrackRef().isNonnull()) {
80 if (
abs(pfCand.pdgId()) == 11)
81 gsfPFMap[pfCand.gsfTrackRef()] = &pfCand;
86 unsigned nele = gedElectronHandle->size();
87 for (
unsigned iele = 0; iele < nele; ++iele) {
93 isoVariables.
sumPhotonEt = (*(isolationValueMaps)[1])[myElectronRef];
95 isoVariables.
sumPUPt = (*(isolationValueMaps)[3])[myElectronRef];
105 if (gsfPFMap.find(newElectron.
gsfTrack()) != gsfPFMap.end()) {
111 myMvaOutput.status = 4;
121 outputElectrons.push_back(newElectron);
std::unique_ptr< ModifyObjectValueBase > gedRegression_
#define DEFINE_FWK_MODULE(type)
std::vector< l1t::PFCandidate > PFCandidateCollection
float sumPUPt
sum pt of charged Particles not from PV (for Pu corrections)
const MvaOutput & mvaOutput() const
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > tokenElectronIsoVals_
void setPfIsolationVariables(const PflowIsolationVariables &iso)
void setMvaOutput(const MvaOutput &mo)
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
const edm::EDGetTokenT< reco::GsfElectronCollection > previousGsfElectrons_
float sumPhotonEt
sum pt of PF photons // old float photonIso ;
GEDGsfElectronFinalizer(const edm::ParameterSet &)
Abs< T >::type abs(const T &t)
float sumNeutralHadronEt
sum pt of neutral hadrons // old float neutralHadronIso ;
const edm::EDPutTokenT< reco::GsfElectronCollection > putToken_
const edm::EDGetTokenT< reco::PFCandidateCollection > pfCandidates_
void setPassPflowPreselection(bool flag)
void produce(edm::Event &, const edm::EventSetup &) override
float sumChargedHadronPt
sum-pt of charged Hadron // old float chargedHadronIso ;