39 const std::vector<tensorflow::Session*>& tfSessions) {
40 std::vector<GsfElectron::MvaOutput> mva_outputs(
electrons.size());
47 mva_outputs[iele] = mvaOutput;
49 el.setMvaOutput(mvaOutput);
55 LogDebug(
"GsfElectronProducer") <<
"Getting DNN PFId for ele";
59 const auto& [iModel,
values] = dnn_ele_pfid[jele];
61 auto& mvaOutput = mva_outputs[jele];
70 }
else if (iModel == 4) {
78 el.setMvaOutput(mvaOutput);
87 auto matchWithPFCandidates(std::vector<reco::PFCandidate>
const&
pfCandidates) {
88 std::map<reco::GsfTrackRef, reco::GsfElectron::MvaInput> gsfMVAInputs{};
94 if (pfCand.gsfTrackRef().isNonnull()) {
99 input.sigmaEtaEta = pfCand.egammaExtraRef()->sigmaEtaEta();
100 input.hadEnergy = pfCand.egammaExtraRef()->hadEnergy();
101 gsfMVAInputs[pfCand.gsfTrackRef()] =
input;
108 LogTrace(
"GsfElectronAlgo") <<
"========== " <<
title <<
" ==========";
109 LogTrace(
"GsfElectronAlgo") <<
"Event: " <<
event.id();
112 LogTrace(
"GsfElectronAlgo") <<
"Electron with charge, pt, eta, phi: " << ele.charge() <<
" , " << ele.pt()
113 <<
" , " << ele.eta() <<
" , " << ele.phi();
115 LogTrace(
"GsfElectronAlgo") <<
"=================================================";
127 return std::make_unique<GsfElectronAlgo::HeavyObjectCache>(conf);
130 void endStream()
override;
138 std::unique_ptr<GsfElectronAlgo>
algo_;
178 desc.add<
edm::InputTag>(
"barrelRecHitCollectionTag", {
"ecalRecHit",
"EcalRecHitsEB"});
179 desc.add<
edm::InputTag>(
"endcapRecHitCollectionTag", {
"ecalRecHit",
"EcalRecHitsEE"});
185 desc.add<
bool>(
"useDefaultEnergyCorrection",
true);
186 desc.add<
bool>(
"useCombinationRegression",
false);
187 desc.add<
bool>(
"ecalDrivenEcalEnergyFromClassBasedParameterization",
true);
188 desc.add<
bool>(
"ecalDrivenEcalErrorFromClassBasedParameterization",
true);
189 desc.add<
bool>(
"applyPreselection",
false);
190 desc.add<
bool>(
"useEcalRegression",
false);
191 desc.add<
bool>(
"applyAmbResolution",
false);
192 desc.add<
bool>(
"ignoreNotPreselected",
true);
193 desc.add<
bool>(
"useGsfPfRecTracks",
true);
194 desc.add<
bool>(
"pureTrackerDrivenEcalErrorFromSimpleParameterization",
true);
195 desc.add<
unsigned int>(
"ambSortingStrategy", 1);
196 desc.add<
unsigned int>(
"ambClustersOverlapStrategy", 1);
197 desc.add<
bool>(
"fillConvVtxFitProb",
true);
198 desc.add<
bool>(
"resetMvaValuesUsingPFCandidates",
false);
201 desc.add<std::vector<std::string>>(
"recHitFlagsToBeExcludedBarrel");
202 desc.add<std::vector<std::string>>(
"recHitFlagsToBeExcludedEndcaps");
203 desc.add<std::vector<std::string>>(
"recHitSeverityToBeExcludedBarrel");
204 desc.add<std::vector<std::string>>(
"recHitSeverityToBeExcludedEndcaps");
207 desc.add<
bool>(
"checkHcalStatus",
true);
209 desc.add<std::vector<double>>(
"recHitEThresholdHB", {0., 0., 0., 0.});
210 desc.add<std::vector<double>>(
"recHitEThresholdHE", {0., 0., 0., 0., 0., 0., 0.});
211 desc.add<
int>(
"maxHcalRecHitSeverity", 999999);
212 desc.add<
bool>(
"hcalRun2EffDepth",
false);
219 desc.add<
bool>(
"useNumCrystals",
true);
220 desc.add<
double>(
"etMinBarrel", 0.0);
221 desc.add<
double>(
"etMinEndcaps", 0.11);
222 desc.add<
double>(
"etMinHcal", 0.0);
223 desc.add<
double>(
"eMinBarrel", 0.095);
224 desc.add<
double>(
"eMinEndcaps", 0.0);
225 desc.add<
double>(
"intRadiusEcalBarrel", 3.0);
226 desc.add<
double>(
"intRadiusEcalEndcaps", 3.0);
227 desc.add<
double>(
"intRadiusHcal", 0.15);
228 desc.add<
double>(
"jurassicWidth", 1.5);
229 desc.add<
bool>(
"vetoClustered",
false);
232 desc.add<
bool>(
"ctfTracksCheck",
true);
235 desc.add<
double>(
"MaxElePtForOnlyMVA", 50.0);
236 desc.add<
double>(
"PreSelectMVA", -0.1);
240 psd0.
add<
double>(
"minSCEtBarrel", 4.0);
241 psd0.
add<
double>(
"minSCEtEndcaps", 4.0);
242 psd0.
add<
double>(
"minEOverPBarrel", 0.0);
243 psd0.
add<
double>(
"minEOverPEndcaps", 0.0);
244 psd0.
add<
double>(
"maxEOverPBarrel", 999999999.0);
245 psd0.
add<
double>(
"maxEOverPEndcaps", 999999999.0);
246 psd0.
add<
double>(
"maxDeltaEtaBarrel", 0.02);
247 psd0.
add<
double>(
"maxDeltaEtaEndcaps", 0.02);
248 psd0.
add<
double>(
"maxDeltaPhiBarrel", 0.15);
249 psd0.
add<
double>(
"maxDeltaPhiEndcaps", 0.15);
250 psd0.
add<
double>(
"hOverEConeSize", 0.15);
251 psd0.
add<
double>(
"maxHOverEBarrelCone", 0.15);
252 psd0.
add<
double>(
"maxHOverEEndcapsCone", 0.15);
253 psd0.
add<
double>(
"maxHBarrelCone", 0.0);
254 psd0.
add<
double>(
"maxHEndcapsCone", 0.0);
255 psd0.
add<
double>(
"maxHOverEBarrelBc", 0.15);
256 psd0.
add<
double>(
"maxHOverEEndcapsBc", 0.15);
257 psd0.
add<
double>(
"maxHBarrelBc", 0.0);
258 psd0.
add<
double>(
"maxHEndcapsBc", 0.0);
259 psd0.
add<
double>(
"maxSigmaIetaIetaBarrel", 999999999.0);
260 psd0.
add<
double>(
"maxSigmaIetaIetaEndcaps", 999999999.0);
261 psd0.
add<
double>(
"maxFbremBarrel", 999999999.0);
262 psd0.
add<
double>(
"maxFbremEndcaps", 999999999.0);
263 psd0.
add<
bool>(
"isBarrel",
false);
264 psd0.
add<
bool>(
"isEndcaps",
false);
265 psd0.
add<
bool>(
"isFiducial",
false);
266 psd0.
add<
bool>(
"seedFromTEC",
true);
267 psd0.
add<
double>(
"maxTIP", 999999999.0);
275 desc.add<
std::string>(
"crackCorrectionFunction",
"EcalClusterCrackCorrection");
277 desc.add<
bool>(
"ecalWeightsFromDB",
true);
278 desc.add<std::vector<std::string>>(
"ecalRefinedRegressionWeightFiles", {})
279 ->setComment(
"if not from DB. Otherwise, keep empty");
280 desc.add<
bool>(
"combinationWeightsFromDB",
true);
281 desc.add<std::vector<std::string>>(
"combinationRegressionWeightFile", {})
282 ->setComment(
"if not from DB. Otherwise, keep empty");
285 desc.add<std::vector<std::string>>(
"ecalRefinedRegressionWeightLabels", {});
286 desc.add<std::vector<std::string>>(
"combinationRegressionWeightLabels", {});
288 desc.add<std::vector<std::string>>(
289 "ElecMVAFilesString",
291 "RecoEgamma/ElectronIdentification/data/TMVA_Category_BDTSimpleCat_10_17Feb2011.weights.xml",
292 "RecoEgamma/ElectronIdentification/data/TMVA_Category_BDTSimpleCat_12_17Feb2011.weights.xml",
293 "RecoEgamma/ElectronIdentification/data/TMVA_Category_BDTSimpleCat_20_17Feb2011.weights.xml",
294 "RecoEgamma/ElectronIdentification/data/TMVA_Category_BDTSimpleCat_22_17Feb2011.weights.xml",
296 desc.add<std::vector<std::string>>(
297 "SoftElecMVAFilesString",
299 "RecoEgamma/ElectronIdentification/data/TMVA_BDTSoftElectrons_7Feb2014.weights.xml",
304 psd1.
add<
bool>(
"enabled",
false);
305 psd1.
add<
double>(
"extetaboundary", 2.65);
307 psd1.
add<
std::string>(
"outputTensorName",
"sequential/FinalLayer/Softmax");
309 psd1.
add<std::vector<std::string>>(
311 {
"RecoEgamma/ElectronIdentification/data/Ele_PFID_dnn/Run3Summer21_120X/lowpT/lowpT_modelDNN.pb",
312 "RecoEgamma/ElectronIdentification/data/Ele_PFID_dnn/Run3Summer21_120X/highpTEB/highpTEB_modelDNN.pb",
313 "RecoEgamma/ElectronIdentification/data/Ele_PFID_dnn/Run3Summer21_120X/highpTEE/highpTEE_modelDNN.pb",
314 "RecoEgamma/ElectronIdentification/data/Ele_PFID_dnn/Run3Winter22_122X/exteta1/modelDNN.pb",
315 "RecoEgamma/ElectronIdentification/data/Ele_PFID_dnn/Run3Winter22_122X/exteta2/modelDNN.pb"});
316 psd1.
add<std::vector<std::string>>(
318 {
"RecoEgamma/ElectronIdentification/data/Ele_PFID_dnn/Run3Summer21_120X/lowpT/lowpT_scaler.txt",
319 "RecoEgamma/ElectronIdentification/data/Ele_PFID_dnn/Run3Summer21_120X/highpTEB/highpTEB_scaler.txt",
320 "RecoEgamma/ElectronIdentification/data/Ele_PFID_dnn/Run3Summer21_120X/highpTEE/highpTEE_scaler.txt",
321 "RecoEgamma/ElectronIdentification/data/Ele_PFID_dnn/Run3Winter22_122X/exteta1/scaler.txt",
322 "RecoEgamma/ElectronIdentification/data/Ele_PFID_dnn/Run3Winter22_122X/exteta2/scaler.txt"});
323 psd1.
add<std::vector<unsigned int>>(
"outputDim",
326 psd1.
add<
bool>(
"useEBModelInGap",
true);
336 psd0.
add<
double>(
"drMax", 0.3);
337 psd0.
add<
double>(
"drVetoBarrel", 0.0);
338 psd0.
add<
double>(
"drVetoEndcap", 0.0);
339 psd0.
add<
double>(
"etaStripBarrel", 0.0);
340 psd0.
add<
double>(
"etaStripEndcap", 0.0);
341 psd0.
add<
double>(
"energyBarrel", 0.0);
342 psd0.
add<
double>(
"energyEndcap", 0.0);
352 psd0.
add<
bool>(
"useHF",
false);
353 psd0.
add<
double>(
"drMax", 0.3);
354 psd0.
add<
double>(
"drVetoBarrel", 0.0);
355 psd0.
add<
double>(
"drVetoEndcap", 0.0);
356 psd0.
add<
double>(
"etaStripBarrel", 0.0);
357 psd0.
add<
double>(
"etaStripEndcap", 0.0);
358 psd0.
add<
double>(
"energyBarrel", 0.0);
359 psd0.
add<
double>(
"energyEndcap", 0.0);
360 psd0.
add<
bool>(
"useEt",
true);
364 descriptions.
add(
"gsfElectronProducerDefault",
desc);
372 .maxEOverPBarrel =
pset.getParameter<
double>(
"maxEOverPBarrel"),
374 .minEOverPBarrel =
pset.getParameter<
double>(
"minEOverPBarrel"),
375 .minEOverPEndcaps =
pset.getParameter<
double>(
"minEOverPEndcaps"),
376 .maxHOverEBarrelCone =
pset.getParameter<
double>(
"maxHOverEBarrelCone"),
378 .maxHBarrelCone =
pset.getParameter<
double>(
"maxHBarrelCone"),
379 .maxHEndcapsCone =
pset.getParameter<
double>(
"maxHEndcapsCone"),
380 .maxHOverEBarrelBc =
pset.getParameter<
double>(
"maxHOverEBarrelBc"),
382 .maxHBarrelBc =
pset.getParameter<
double>(
"maxHBarrelBc"),
383 .maxHEndcapsBc =
pset.getParameter<
double>(
"maxHEndcapsBc"),
384 .maxDeltaEtaBarrel =
pset.getParameter<
double>(
"maxDeltaEtaBarrel"),
385 .maxDeltaEtaEndcaps =
pset.getParameter<
double>(
"maxDeltaEtaEndcaps"),
386 .maxDeltaPhiBarrel =
pset.getParameter<
double>(
"maxDeltaPhiBarrel"),
387 .maxDeltaPhiEndcaps =
pset.getParameter<
double>(
"maxDeltaPhiEndcaps"),
388 .maxSigmaIetaIetaBarrel =
pset.getParameter<
double>(
"maxSigmaIetaIetaBarrel"),
389 .maxSigmaIetaIetaEndcaps =
pset.getParameter<
double>(
"maxSigmaIetaIetaEndcaps"),
390 .maxFbremBarrel =
pset.getParameter<
double>(
"maxFbremBarrel"),
391 .maxFbremEndcaps =
pset.getParameter<
double>(
"maxFbremEndcaps"),
392 .isBarrel =
pset.getParameter<
bool>(
"isBarrel"),
393 .isEndcaps =
pset.getParameter<
bool>(
"isEndcaps"),
394 .isFiducial =
pset.getParameter<
bool>(
"isFiducial"),
395 .maxTIP =
pset.getParameter<
double>(
"maxTIP"),
396 .seedFromTEC =
pset.getParameter<
bool>(
"seedFromTEC"),
398 .multThresEE =
pset.getParameter<
double>(
"multThresEE"),
405 ecalSeedingParametersChecked_(
false),
406 electronPutToken_(produces<GsfElectronCollection>()),
407 gsfPfRecTracksTag_(consumes(
cfg.getParameter<
edm::InputTag>(
"gsfPfRecTracksTag"))),
408 useGsfPfRecTracks_(
cfg.getParameter<
bool>(
"useGsfPfRecTracks")),
409 resetMvaValuesUsingPFCandidates_(
cfg.getParameter<
bool>(
"resetMvaValuesUsingPFCandidates")) {
410 if (resetMvaValuesUsingPFCandidates_) {
411 egmPFCandidateCollection_ = consumes(
cfg.getParameter<
edm::InputTag>(
"egmPFCandidatesTag"));
414 inputCfg_.gsfElectronCores = consumes(
cfg.getParameter<
edm::InputTag>(
"gsfElectronCoresTag"));
415 inputCfg_.hbheRecHitsTag = consumes(
cfg.getParameter<
edm::InputTag>(
"hbheRecHits"));
416 inputCfg_.barrelRecHitCollection = consumes(
cfg.getParameter<
edm::InputTag>(
"barrelRecHitCollectionTag"));
417 inputCfg_.endcapRecHitCollection = consumes(
cfg.getParameter<
edm::InputTag>(
"endcapRecHitCollectionTag"));
418 inputCfg_.ctfTracks = consumes(
cfg.getParameter<
edm::InputTag>(
"ctfTracksTag"));
421 inputCfg_.beamSpotTag = consumes(
cfg.getParameter<
edm::InputTag>(
"beamSpotTag"));
422 inputCfg_.vtxCollectionTag = consumes(
cfg.getParameter<
edm::InputTag>(
"vtxTag"));
423 if (
cfg.getParameter<
bool>(
"fillConvVtxFitProb"))
424 inputCfg_.conversions = consumes(
cfg.getParameter<
edm::InputTag>(
"conversionsTag"));
429 inputCfg_.pfClusterProducer =
437 dnnPFidEnabled_ = pset_dnn.
getParameter<
bool>(
"enabled");
438 extetaboundary_ = pset_dnn.getParameter<
double>(
"extetaboundary");
440 strategyCfg_.useDefaultEnergyCorrection =
cfg.getParameter<
bool>(
"useDefaultEnergyCorrection");
442 strategyCfg_.applyPreselection =
cfg.getParameter<
bool>(
"applyPreselection");
443 strategyCfg_.ecalDrivenEcalEnergyFromClassBasedParameterization =
444 cfg.getParameter<
bool>(
"ecalDrivenEcalEnergyFromClassBasedParameterization");
445 strategyCfg_.ecalDrivenEcalErrorFromClassBasedParameterization =
446 cfg.getParameter<
bool>(
"ecalDrivenEcalErrorFromClassBasedParameterization");
447 strategyCfg_.pureTrackerDrivenEcalErrorFromSimpleParameterization =
448 cfg.getParameter<
bool>(
"pureTrackerDrivenEcalErrorFromSimpleParameterization");
449 strategyCfg_.applyAmbResolution =
cfg.getParameter<
bool>(
"applyAmbResolution");
450 strategyCfg_.ignoreNotPreselected =
cfg.getParameter<
bool>(
"ignoreNotPreselected");
451 strategyCfg_.ambSortingStrategy =
cfg.getParameter<
unsigned>(
"ambSortingStrategy");
452 strategyCfg_.ambClustersOverlapStrategy =
cfg.getParameter<
unsigned>(
"ambClustersOverlapStrategy");
453 strategyCfg_.ctfTracksCheck =
cfg.getParameter<
bool>(
"ctfTracksCheck");
454 strategyCfg_.PreSelectMVA =
cfg.getParameter<
double>(
"PreSelectMVA");
455 strategyCfg_.MaxElePtForOnlyMVA =
cfg.getParameter<
double>(
"MaxElePtForOnlyMVA");
456 strategyCfg_.useEcalRegression =
cfg.getParameter<
bool>(
"useEcalRegression");
457 strategyCfg_.useCombinationRegression =
cfg.getParameter<
bool>(
"useCombinationRegression");
458 strategyCfg_.fillConvVtxFitProb =
cfg.getParameter<
bool>(
"fillConvVtxFitProb");
459 strategyCfg_.computePfClusterIso = dnnPFidEnabled_;
463 hcalCfg_.hOverEConeSize = psetPreselection.
getParameter<
double>(
"hOverEConeSize");
464 if (hcalCfg_.hOverEConeSize > 0) {
465 hcalCfg_.onlyBehindCluster =
false;
466 hcalCfg_.checkHcalStatus =
cfg.getParameter<
bool>(
"checkHcalStatus");
469 hcalCfg_.hbheRecHits = consumes<HBHERecHitCollection>(
cfg.getParameter<
edm::InputTag>(
"hbheRecHits"));
472 hcalCfg_.maxSeverityHB =
cfg.getParameter<
int>(
"maxHcalRecHitSeverity");
474 hcalCfg_.maxSeverityHE = hcalCfg_.maxSeverityHB;
477 hcalCfgBc_.hOverEConeSize = 0.;
478 hcalCfgBc_.onlyBehindCluster =
true;
479 hcalCfgBc_.checkHcalStatus =
cfg.getParameter<
bool>(
"checkHcalStatus");
482 hcalCfgBc_.hbheRecHits = consumes<HBHERecHitCollection>(
cfg.getParameter<
edm::InputTag>(
"hbheRecHits"));
485 hcalCfgBc_.maxSeverityHB =
cfg.getParameter<
int>(
"maxHcalRecHitSeverity");
487 hcalCfgBc_.maxSeverityHE = hcalCfgBc_.maxSeverityHB;
489 hcalRun2EffDepth_ =
cfg.getParameter<
bool>(
"hcalRun2EffDepth");
493 auto const& flagnamesbarrel =
cfg.getParameter<std::vector<std::string>>(
"recHitFlagsToBeExcludedBarrel");
494 recHitsCfg.recHitFlagsToBeExcludedBarrel = StringToEnumValue<EcalRecHit::Flags>(flagnamesbarrel);
495 auto const& flagnamesendcaps =
cfg.getParameter<std::vector<std::string>>(
"recHitFlagsToBeExcludedEndcaps");
496 recHitsCfg.recHitFlagsToBeExcludedEndcaps = StringToEnumValue<EcalRecHit::Flags>(flagnamesendcaps);
497 auto const& severitynamesbarrel =
cfg.getParameter<std::vector<std::string>>(
"recHitSeverityToBeExcludedBarrel");
498 recHitsCfg.recHitSeverityToBeExcludedBarrel =
499 StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesbarrel);
500 auto const& severitynamesendcaps =
cfg.getParameter<std::vector<std::string>>(
"recHitSeverityToBeExcludedEndcaps");
501 recHitsCfg.recHitSeverityToBeExcludedEndcaps =
502 StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesendcaps);
507 .etMinHcal =
cfg.getParameter<
double>(
"etMinHcal"),
508 .intRadiusEcalBarrel =
cfg.getParameter<
double>(
"intRadiusEcalBarrel"),
509 .intRadiusEcalEndcaps =
cfg.getParameter<
double>(
"intRadiusEcalEndcaps"),
510 .jurassicWidth =
cfg.getParameter<
double>(
"jurassicWidth"),
512 .eMinBarrel =
cfg.getParameter<
double>(
"eMinBarrel"),
513 .etMinEndcaps =
cfg.getParameter<
double>(
"etMinEndcaps"),
514 .eMinEndcaps =
cfg.getParameter<
double>(
"eMinEndcaps"),
516 .useNumCrystals =
cfg.getParameter<
bool>(
"useNumCrystals")};
539 .ecalWeightsFromDB =
cfg.getParameter<
bool>(
"ecalWeightsFromDB"),
540 .ecalRegressionWeightFiles =
cfg.getParameter<std::vector<std::string>>(
"ecalRefinedRegressionWeightFiles"),
542 cfg.getParameter<std::vector<std::string>>(
"combinationRegressionWeightLabels"),
543 .combinationWeightsFromDB =
cfg.getParameter<
bool>(
"combinationWeightsFromDB"),
544 .combinationRegressionWeightFiles =
545 cfg.getParameter<std::vector<std::string>>(
"combinationRegressionWeightFile")};
548 algo_ = std::make_unique<GsfElectronAlgo>(
558 cfg.getParameter<
std::string>(
"crackCorrectionFunction"),
cfg, consumesCollector()),
564 consumesCollector());
566 if (dnnPFidEnabled_) {
567 tfSessions_ = gcache->iElectronDNNEstimator->getSessions();
578 if (!
pset.exists(
"SeedConfiguration")) {
583 if (seedConfiguration.
getParameter<
bool>(
"applyHOverECut")) {
588 << seedConfiguration.
getParameter<
double>(
"hOverEConeSize") <<
").";
592 <<
"The max barrel cone H/E is lower than during ecal seeding.";
596 <<
"The max endcaps cone H/E is lower than during ecal seeding.";
602 <<
"The minimum super-cluster Et in barrel is lower than during ecal seeding.";
606 <<
"The minimum super-cluster Et in endcaps is lower than during ecal seeding.";
629 throw cms::Exception(
"GsfElectronAlgo|UnknownAmbiguitySortingStrategy")
644 if (gsfPfRecTrack.gsfTrackRef() ==
e1.gsfTrack()) {
646 edm::LogWarning(
"GsfElectronAlgo") <<
"associated gsfPfRecTrack already found";
649 for (
auto const& duplicate : gsfPfRecTrack.convBremGsfPFRecTrackRef()) {
650 e1.addAmbiguousGsfTrack(duplicate->gsfTrackRef());
667 LogDebug(
"GsfElectronAlgo") <<
"Blessing electron with E/P " <<
e1->eSuperClusterOverP() <<
", cluster " 668 << scRef1.
get() <<
" & track " <<
e1->gsfTrack().get();
670 for (
auto e2 =
e1 + 1; e2 !=
electrons.end(); ++e2) {
680 bool sameCluster =
false;
682 sameCluster = (scRef1 == scRef2);
692 throw cms::Exception(
"GsfElectronAlgo|UnknownAmbiguityClustersOverlapStrategy")
698 LogDebug(
"GsfElectronAlgo") <<
"Discarding electron with E/P " << e2->eSuperClusterOverP() <<
", cluster " 699 << scRef2.
get() <<
" and track " << e2->gsfTrack().get();
700 e1->addAmbiguousGsfTrack(e2->gsfTrack());
701 e2->setAmbiguous(
true);
702 }
else if (
e1->gsfTrack() == e2->gsfTrack()) {
703 edm::LogWarning(
"GsfElectronAlgo") <<
"Forgetting electron with E/P " << e2->eSuperClusterOverP()
704 <<
", cluster " << scRef2.
get() <<
" and track " << e2->gsfTrack().get();
705 e2->setAmbiguous(
true);
720 return passmva && passCutBased;
724 return passCutBased || passPF || passmva;
734 if (!
seeds.isValid()) {
736 <<
"Cannot check consistency of parameters with ecal seeding ones," 737 <<
" because the original collection of seeds is not any more available.";
747 el.setMvaInput(gsfMVAInputMap.find(el.gsfTrack())->
second);
754 logElectrons(
electrons,
event,
"GsfElectronAlgo Info (before preselection)");
760 logElectrons(
electrons,
event,
"GsfElectronAlgo Info (after preselection)");
767 logElectrons(
electrons,
event,
"GsfElectronAlgo Info (after amb. solving)");
772 ele.hcalToRun2EffDepth();
void checkEcalSeedingParameters(edm::ParameterSet const &)
static constexpr float kMultThresEE
T getParameter(std::string const &) const
bool ignoreNotPreselected
const edm::EDGetTokenT< reco::GsfPFRecTrackCollection > gsfPfRecTracksTag_
unsigned ambClustersOverlapStrategy
GsfElectronAlgo::Tokens inputCfg_
double pt() const final
transverse momentum
bool ecalDrivenSeed() const
edm::EDGetTokenT< reco::PFCandidateCollection > egmPFCandidateCollection_
std::vector< std::string > ecalRegressionWeightLabels
unsigned ambSortingStrategy
static void fillDescriptions(edm::ConfigurationDescriptions &)
const bool resetMvaValuesUsingPFCandidates_
bool passingPflowPreselection() const
std::vector< Vertex > VertexCollection
collection of Vertex objects
edm::EDGetTokenT< reco::VertexCollection > vtxCollectionTag
const bool useGsfPfRecTracks_
edm::EDGetTokenT< EcalRecHitCollection > endcapRecHitCollection
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
bool ecalSeedingParametersChecked_
ElectronHcalHelper::Configuration hcalCfg_
static std::string const input
std::unique_ptr< const ElectronMVAEstimator > iElectronMVAEstimator
U second(std::pair< T, U > const &p)
bool isBetterElectron(reco::GsfElectron const &, reco::GsfElectron const &)
bool isInnermostElectron(reco::GsfElectron const &, reco::GsfElectron const &)
void endStream() override
GsfElectronProducer(const edm::ParameterSet &, const GsfElectronAlgo::HeavyObjectCache *)
static std::unique_ptr< GsfElectronAlgo::HeavyObjectCache > initializeGlobalCache(const edm::ParameterSet &conf)
double maxHOverEBarrelCone
float dnn_e_sigNonIsolated
const edm::EDPutTokenT< reco::GsfElectronCollection > electronPutToken_
combinationRegressionWeightLabels
edm::EDGetTokenT< reco::BeamSpot > beamSpotTag
bool closeSession(Session *&session)
std::vector< tensorflow::Session * > tfSessions_
#define DEFINE_FWK_MODULE(type)
static edm::ParameterSetDescription pSetDescript()
edm::EDGetTokenT< reco::ElectronSeedCollection > seedsTag
std::unique_ptr< const ElectronDNNEstimator > iElectronDNNEstimator
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool isPreselected(reco::GsfElectron const &ele) const
static constexpr float kMultThresEB
void setAmbiguityData(reco::GsfElectronCollection &electrons, edm::Event const &event, bool ignoreNotPreselected=true) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const GsfElectronAlgo::CutsConfiguration cutsCfg_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
float sharedEnergy(reco::CaloCluster const &clu1, reco::CaloCluster const &clu2, EcalRecHitCollection const &barrelRecHits, EcalRecHitCollection const &endcapRecHits)
bool passingMvaPreselection() const
T const * get() const
Returns C++ pointer to the item.
edm::EDGetTokenT< EcalRecHitCollection > barrelRecHitCollection
float dnn_e_bkgNonIsolated
std::unique_ptr< GsfElectronAlgo > algo_
ElectronHcalHelper::Configuration hcalCfgBc_
double maxHOverEEndcapsCone
std::unique_ptr< const SoftElectronMVAEstimator > sElectronMVAEstimator
Log< level::Warning, false > LogWarning
std::array< double, 4 > arrayHB
static void globalEndJob(GsfElectronAlgo::HeavyObjectCache const *)
void produce(edm::Event &event, const edm::EventSetup &setup) override
bool passingCutBasedPreselection() const
GsfElectronAlgo::StrategyConfiguration strategyCfg_
std::array< double, 7 > arrayHE