Skip to content

Commit 19ec6d9

Browse files
committed
add procModifier to enable caloparticles from pileup
1 parent 23751da commit 19ec6d9

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import FWCore.ParameterSet.Config as cms
2+
3+
# This modifier enables the CaloParticles from pileup in the HGCAL associators and simulated objects.
4+
enableCPfromPU = cms.Modifier()

Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py

+32
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,38 @@ def condition(self, fragment, stepList, key, hasHarvest):
852852
upgradeWFs['ticl_v5_superclustering_mustache_pf'].step3 = {'--procModifiers': 'ticl_v5,ticl_superclustering_mustache_pf'}
853853
upgradeWFs['ticl_v5_superclustering_mustache_pf'].step4 = {'--procModifiers': 'ticl_v5,ticl_superclustering_mustache_pf'}
854854

855+
class UpgradeWorkflow_CPfromPU(UpgradeWorkflow):
856+
def setup_(self, step, stepName, stepDict, k, properties):
857+
if ('Digi' in step and 'NoHLT' not in step) or ('HLTOnly' in step):
858+
stepDict[stepName][k] = merge([self.step2, stepDict[step][k]])
859+
if 'RecoGlobal' in step:
860+
stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
861+
if 'HARVESTGlobal' in step:
862+
stepDict[stepName][k] = merge([self.step4, stepDict[step][k]])
863+
def condition(self, fragment, stepList, key, hasHarvest):
864+
return (fragment=="TTbar_14TeV" or 'CloseByP' in fragment or 'Eta1p7_2p7' in fragment) and 'Run4' in key
865+
866+
upgradeWFs['CPfromPU'] = UpgradeWorkflow_CPfromPU(
867+
steps = [
868+
'HLTOnly',
869+
'DigiTrigger',
870+
'RecoGlobal',
871+
'HARVESTGlobal'
872+
],
873+
PU = [
874+
'HLTOnly',
875+
'DigiTrigger',
876+
'RecoGlobal',
877+
'HARVESTGlobal'
878+
],
879+
suffix = '_withCPfromPU',
880+
offset = 0.208,
881+
)
882+
883+
upgradeWFs['CPfromPU'].step2 = {'--procModifiers': 'enableCPfromPU'}
884+
upgradeWFs['CPfromPU'].step3 = {'--procModifiers': 'enableCPfromPU'}
885+
upgradeWFs['CPfromPU'].step4 = {'--procModifiers': 'enableCPfromPU'}
886+
855887
# Improved L2 seeding from L1Tk Muons and L3 Tracker Muon Inside-Out reconstruction first (Phase-2 Muon default)
856888
class UpgradeWorkflow_phase2L2AndL3Muons(UpgradeWorkflow):
857889
def setup_(self, step, stepName, stepDict, k, properties):

SimCalorimetry/HGCalSimProducers/python/hgcHitAssociation_cfi.py

+5
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@
44

55
lcAssocByEnergyScoreProducer = _lcAssocByEnergyScoreProducer.clone(hardScatterOnly = cms.bool(True))
66
scAssocByEnergyScoreProducer = _scAssocByEnergyScoreProducer.clone(hardScatterOnly = cms.bool(True))
7+
8+
from Configuration.ProcessModifiers.enableCPfromPU_cff import enableCPfromPU
9+
10+
enableCPfromPU.toModify(lcAssocByEnergyScoreProducer, hardScatterOnly = cms.bool(False))
11+
enableCPfromPU.toModify(scAssocByEnergyScoreProducer, hardScatterOnly = cms.bool(False))

0 commit comments

Comments
 (0)