From 28acbe663fcd6e2ef16043da23496d6d23d50c51 Mon Sep 17 00:00:00 2001 From: bainbrid Date: Mon, 24 Aug 2020 22:26:45 +0200 Subject: [PATCH] Schedule IDProducer if bParking era specified --- .../producersLayer1/lowPtElectronProducer_cff.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/PhysicsTools/PatAlgos/python/producersLayer1/lowPtElectronProducer_cff.py b/PhysicsTools/PatAlgos/python/producersLayer1/lowPtElectronProducer_cff.py index b64a33f7a3e3f..226e274b0c507 100644 --- a/PhysicsTools/PatAlgos/python/producersLayer1/lowPtElectronProducer_cff.py +++ b/PhysicsTools/PatAlgos/python/producersLayer1/lowPtElectronProducer_cff.py @@ -44,13 +44,24 @@ embedTrack = cms.bool(True), ) +# Rerun IDProducer on pat::Electrons if bParking era specified +from RecoEgamma.EgammaElectronProducers.lowPtGsfElectronID_cfi import * +from Configuration.Eras.Modifier_bParking_cff import bParking +bParking.toModify(lowPtGsfElectronID, + electrons='patLowPtElectrons', + rho='fixedGridRhoFastjetAll') + makePatLowPtElectronsTask = cms.Task( lowPtElectronMatch, patLowPtElectrons ) -makePatLowPtElectrons = cms.Sequence(makePatLowPtElectronsTask) +# Schedule IDProducer if bParking era specified +_makePatLowPtElectronsTask = makePatLowPtElectronsTask.copy() +_makePatLowPtElectronsTask.add(lowPtGsfElectronID) +bParking.toReplaceWith(makePatLowPtElectronsTask,_makePatLowPtElectronsTask) +makePatLowPtElectrons = cms.Sequence(makePatLowPtElectronsTask) # Modifiers from Configuration.Eras.Modifier_fastSim_cff import fastSim