diff --git a/HLTrigger/Configuration/python/customizeHLTforCMSSW.py b/HLTrigger/Configuration/python/customizeHLTforCMSSW.py index a8f5f294d5470..59bc86e9b0a53 100644 --- a/HLTrigger/Configuration/python/customizeHLTforCMSSW.py +++ b/HLTrigger/Configuration/python/customizeHLTforCMSSW.py @@ -49,6 +49,17 @@ def customiseFor17792(process): producer.produceSeedStopReasons = cms.bool(False) return process +# Add new parameters required by RecoTauBuilderConePlugin +def customiseFor18429(process): + for producer in producers_by_type(process, "RecoTauProducer"): + if hasattr(producer,'builders'): + for pset in producer.builders: + if not hasattr(pset,'minAbsPhotonSumPt_insideSignalCone'): + pset.minAbsPhotonSumPt_insideSignalCone = cms.double(2.5) + if not hasattr(pset,'minRelPhotonSumPt_insideSignalCone'): + pset.minRelPhotonSumPt_insideSignalCone = cms.double(0.10) + return process + # CMSSW version specific customizations def customizeHLTforCMSSW(process, menuType="GRun"): # add call to action function in proper order: newest last! @@ -56,5 +67,6 @@ def customizeHLTforCMSSW(process, menuType="GRun"): process = customiseFor17771(process) process = customiseFor17792(process) process = customiseFor17794(process) + process = customiseFor18429(process) return process diff --git a/RecoTauTag/RecoTau/plugins/RecoTauBuilderConePlugin.cc b/RecoTauTag/RecoTau/plugins/RecoTauBuilderConePlugin.cc index 72e5192a57e87..fcb5486661a1f 100644 --- a/RecoTauTag/RecoTau/plugins/RecoTauBuilderConePlugin.cc +++ b/RecoTauTag/RecoTau/plugins/RecoTauBuilderConePlugin.cc @@ -61,6 +61,8 @@ class RecoTauBuilderConePlugin : public RecoTauBuilderPlugin { JetFunc isoConeNeutralHadrons_; int maxSignalConeChargedHadrons_; + double minAbsPhotonSumPt_insideSignalCone_; + double minRelPhotonSumPt_insideSignalCone_; void setTauQuantities(reco::PFTau& aTau, double minAbsPhotonSumPt_insideSignalCone = 2.5, @@ -93,7 +95,12 @@ RecoTauBuilderConePlugin::RecoTauBuilderConePlugin( isoConeNeutralHadrons_( pset.getParameter("isoConeNeutralHadrons")), maxSignalConeChargedHadrons_( - pset.getParameter("maxSignalConeChargedHadrons")) + pset.getParameter("maxSignalConeChargedHadrons")), + minAbsPhotonSumPt_insideSignalCone_( + pset.getParameter("minAbsPhotonSumPt_insideSignalCone")), + minRelPhotonSumPt_insideSignalCone_( + pset.getParameter("minRelPhotonSumPt_insideSignalCone")) + {} namespace xclean @@ -192,11 +199,10 @@ RecoTauBuilderConePlugin::return_type RecoTauBuilderConePlugin::operator()( // Our tau builder - the true indicates to automatically copy gamma candidates // from the pizeros. - double minAbsPhotonPt_inSignalCone=2.5, minRelPhotonPt_inSignalCone=0.1;//MB: sensible defults to set a DM hypothesis RecoTauConstructor tau(jet, getPFCands(), true, &signalConeSizeToStore_, - minAbsPhotonPt_inSignalCone, - minRelPhotonPt_inSignalCone); + minAbsPhotonSumPt_insideSignalCone_, + minRelPhotonSumPt_insideSignalCone_); // Setup our quality cuts to use the current vertex (supplied by base class) qcuts_.setPV(primaryVertex(jet)); @@ -458,8 +464,8 @@ RecoTauBuilderConePlugin::return_type RecoTauBuilderConePlugin::operator()( // Set missing tau quantities setTauQuantities(*tauPtr, - minAbsPhotonPt_inSignalCone, - minRelPhotonPt_inSignalCone + minAbsPhotonSumPt_insideSignalCone_, + minRelPhotonSumPt_insideSignalCone_ ); output.push_back(tauPtr); diff --git a/RecoTauTag/RecoTau/python/RecoTauFixedConeProducer_cfi.py b/RecoTauTag/RecoTau/python/RecoTauFixedConeProducer_cfi.py index 4f2fbe5532454..a7b79e2e1cf09 100644 --- a/RecoTauTag/RecoTau/python/RecoTauFixedConeProducer_cfi.py +++ b/RecoTauTag/RecoTau/python/RecoTauFixedConeProducer_cfi.py @@ -13,7 +13,6 @@ _fixedConeRecoTausConfig = cms.PSet( name = cms.string("fixedCone"), - useClosestPV = cms.bool(False), qualityCuts = PFTauQualityCuts, # If true, consider PFLeptons (e/mu) as charged hadrons. usePFLeptons = cms.bool(True), @@ -27,7 +26,9 @@ isoConePiZeros = cms.string('0.4'), signalConeNeutralHadrons = cms.string('0.10'), isoConeNeutralHadrons = cms.string('0.4'), - maxSignalConeChargedHadrons = cms.int32(-1) # CV: upper limit on number of signalConeChargedHadrons disabled per default + maxSignalConeChargedHadrons = cms.int32(-1), # CV: upper limit on number of signalConeChargedHadrons disabled per default + minAbsPhotonSumPt_insideSignalCone = cms.double(2.5), + minRelPhotonSumPt_insideSignalCone = cms.double(0.10) ) fixedConeRecoTaus = shrinkingConeRecoTaus.clone( diff --git a/RecoTauTag/RecoTau/python/RecoTauShrinkingConeProducer_cfi.py b/RecoTauTag/RecoTau/python/RecoTauShrinkingConeProducer_cfi.py index 993a5361e05d5..4b277aa215104 100644 --- a/RecoTauTag/RecoTau/python/RecoTauShrinkingConeProducer_cfi.py +++ b/RecoTauTag/RecoTau/python/RecoTauShrinkingConeProducer_cfi.py @@ -25,7 +25,9 @@ isoConePiZeros = cms.string('0.4'), signalConeNeutralHadrons = cms.string('0.15'), isoConeNeutralHadrons = cms.string('0.4'), - maxSignalConeChargedHadrons = cms.int32(-1) # CV: upper limit on number of signalConeChargedHadrons disabled per default + maxSignalConeChargedHadrons = cms.int32(-1), # CV: upper limit on number of signalConeChargedHadrons disabled per default + minAbsPhotonSumPt_insideSignalCone = cms.double(2.5), + minRelPhotonSumPt_insideSignalCone = cms.double(0.10) ) shrinkingConeRecoTaus = combinatoricRecoTaus.clone(