Skip to content

Commit 924b11b

Browse files
committed
apply PF and calotower customizations to hlt modules as well
1 parent 5150908 commit 924b11b

File tree

1 file changed

+28
-20
lines changed
  • SLHCUpgradeSimulations/Configuration/python

1 file changed

+28
-20
lines changed

SLHCUpgradeSimulations/Configuration/python/aging.py

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -104,19 +104,25 @@ def ageSiPM(process,turnon,lumi):
104104
"rec": [1.25, 2.5, 2.5, 2.5],
105105
},
106106
}
107-
ctmodules = ['calotowermaker','caloTowerForTrk','caloTowerForTrkPreSplitting','towerMaker','towerMakerWithHO']
107+
ctmodules = ['calotowermaker','caloTowerForTrk','caloTowerForTrkPreSplitting','towerMaker','towerMakerWithHO','hltPhase2TowerMakerForAll',' hltTowerMaker']
108108
for ilumi, hcal_lumi in enumerate(hcal_lumis[:-1]):
109109
if lumi >= hcal_lumi and lumi < hcal_lumis[ilumi+1]:
110-
if hasattr(process,'particleFlowClusterHBHE'):
111-
process.particleFlowClusterHBHE.seedFinder.thresholdsByDetector[0].seedingThreshold = hcal_thresholds[hcal_lumi]["seed"]
112-
process.particleFlowClusterHBHE.initialClusteringStep.thresholdsByDetector[0].gatheringThreshold = hcal_thresholds[hcal_lumi]["rec"]
113-
process.particleFlowClusterHBHE.pfClusterBuilder.recHitEnergyNorms[0].recHitEnergyNorm = hcal_thresholds[hcal_lumi]["rec"]
114-
process.particleFlowClusterHBHE.pfClusterBuilder.positionCalc.logWeightDenominatorByDetector[0].logWeightDenominator = hcal_thresholds[hcal_lumi]["rec"]
115-
process.particleFlowClusterHBHE.pfClusterBuilder.allCellsPositionCalc.logWeightDenominatorByDetector[0].logWeightDenominator = hcal_thresholds[hcal_lumi]["rec"]
116-
if hasattr(process,'particleFlowClusterHCAL'):
117-
process.particleFlowClusterHCAL.pfClusterBuilder.allCellsPositionCalc.logWeightDenominatorByDetector[0].logWeightDenominator = hcal_thresholds[hcal_lumi]["rec"]
118-
if hasattr(process,'particleFlowRecHitHBHE'):
119-
process.particleFlowRecHitHBHE.producers[0].qualityTests[0].cuts[0].threshold = hcal_thresholds[hcal_lumi]["rec"]
110+
pfclushbhemodules = ['particleFlowClusterHBHE','hltParticleFlowClusterHBHE']
111+
for pfhbhemod in pfclushbhemodules:
112+
if hasattr(process,pfhbhemod):
113+
getattr(process,pfhbhemod).seedFinder.thresholdsByDetector[0].seedingThreshold = hcal_thresholds[hcal_lumi]["seed"]
114+
getattr(process,pfhbhemod).initialClusteringStep.thresholdsByDetector[0].gatheringThreshold = hcal_thresholds[hcal_lumi]["rec"]
115+
getattr(process,pfhbhemod).pfClusterBuilder.recHitEnergyNorms[0].recHitEnergyNorm = hcal_thresholds[hcal_lumi]["rec"]
116+
getattr(process,pfhbhemod).pfClusterBuilder.positionCalc.logWeightDenominatorByDetector[0].logWeightDenominator = hcal_thresholds[hcal_lumi]["rec"]
117+
getattr(process,pfhbhemod).pfClusterBuilder.allCellsPositionCalc.logWeightDenominatorByDetector[0].logWeightDenominator = hcal_thresholds[hcal_lumi]["rec"]
118+
pfclushcalmodules = ['particleFlowClusterHCAL','hltParticleFlowClusterHCAL']
119+
for pfhcalmod in pfclushcalmodules:
120+
if hasattr(process,pfhcalmod):
121+
getattr(process,pfhcalmod).pfClusterBuilder.allCellsPositionCalc.logWeightDenominatorByDetector[0].logWeightDenominator = hcal_thresholds[hcal_lumi]["rec"]
122+
pfrechithbhemodules = ['particleFlowRecHitHBHE', 'hltParticleFlowRecHitHBHE']
123+
for pfrechitmod in pfrechithbhemodules:
124+
if hasattr(process,pfrechitmod):
125+
getattr(process,pfrechitmod).producers[0].qualityTests[0].cuts[0].threshold = hcal_thresholds[hcal_lumi]["rec"]
120126
for ctmod in ctmodules:
121127
if hasattr(process,ctmod):
122128
getattr(process,ctmod).HBThreshold1 = hcal_thresholds[hcal_lumi]["rec"][0]
@@ -218,15 +224,17 @@ def ageEcal(process,lumi,instLumi):
218224
connect = cms.string("frontier://FrontierProd/CMS_CONDITIONS")
219225
)
220226
)
221-
if hasattr(process,"particleFlowClusterECALUncorrected"):
222-
_seeds = process.particleFlowClusterECALUncorrected.seedFinder.thresholdsByDetector
223-
for iseed in range(0,len(_seeds)):
224-
if _seeds[iseed].detector.value()=="ECAL_BARREL":
225-
_seeds[iseed].seedingThreshold = cms.double(ecal_thresholds[int(lumi)]*ecal_seed_multiplier)
226-
_clusters = process.particleFlowClusterECALUncorrected.initialClusteringStep.thresholdsByDetector
227-
for icluster in range(0,len(_clusters)):
228-
if _clusters[icluster].detector.value()=="ECAL_BARREL":
229-
_clusters[icluster].gatheringThreshold = cms.double(ecal_thresholds[int(lumi)])
227+
pfclusecaluncorrmodules = ['particleFlowClusterECALUncorrected','hltParticleFlowClusterECALUncorrected','hltParticleFlowClusterECALUncorrectedL1Seeded',' hltParticleFlowClusterECALUncorrectedUnseeded']
228+
for pfclusecaluncorrmod in pfclusecaluncorrmodules:
229+
if hasattr(process,pfclusecaluncorrmod):
230+
_seeds = getattr(process,pfclusecaluncorrmod).seedFinder.thresholdsByDetector
231+
for iseed in range(0,len(_seeds)):
232+
if _seeds[iseed].detector.value()=="ECAL_BARREL":
233+
_seeds[iseed].seedingThreshold = cms.double(ecal_thresholds[int(lumi)]*ecal_seed_multiplier)
234+
_clusters = getattr(process,pfclusecaluncorrmod).initialClusteringStep.thresholdsByDetector
235+
for icluster in range(0,len(_clusters)):
236+
if _clusters[icluster].detector.value()=="ECAL_BARREL":
237+
_clusters[icluster].gatheringThreshold = cms.double(ecal_thresholds[int(lumi)])
230238

231239
return process
232240

0 commit comments

Comments
 (0)