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);