diff --git a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py index ab8a766fd070d..f9588e0f76b26 100644 --- a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py +++ b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py @@ -1830,7 +1830,13 @@ def setup_(self, step, stepName, stepDict, k, properties): if ('ALCA' in step) or ('Reco' in step) or ('HLT' in step): stepDict[stepName][k] = None elif 'DigiTrigger' in step: - stepDict[stepName][k] = merge([self.step2, stepDict[step][k]]) + # Add the aging customization + mergedStep = merge([self.step2, stepDict[step][k]]) + if '--customise' in mergedStep: + mergedStep['--customise'] += ',SLHCUpgradeSimulations/Configuration/aging.customise_aging_1000' + else: + mergedStep['--customise'] = 'SLHCUpgradeSimulations/Configuration/aging.customise_aging_1000' + stepDict[stepName][k] = mergedStep elif 'HARVEST' in step: stepDict[stepName][k] = merge([self.step3, stepDict[step][k]]) else: @@ -2004,13 +2010,19 @@ def setup_(self, step, stepName, stepDict, k, properties): if ('ALCA' in step) or ('Reco' in step) or ('HLT' in step) or ('HARVEST' in step): stepDict[stepName][k] = None elif 'DigiTrigger' in step: - stepDict[stepName][k] = merge([self.step2, stepDict[step][k]]) + # Add the aging customization + mergedStep = merge([self.step2, stepDict[step][k]]) + if '--customise' in mergedStep: + mergedStep['--customise'] += ',SLHCUpgradeSimulations/Configuration/aging.customise_aging_1000' + else: + mergedStep['--customise'] = 'SLHCUpgradeSimulations/Configuration/aging.customise_aging_1000' + stepDict[stepName][k] = mergedStep else: stepDict[stepName][k] = merge([stepDict[step][k]]) def condition(self, fragment, stepList, key, hasHarvest): return fragment=="TTbar_14TeV" and 'Run4' in key -upgradeWFs['HLTPhaseWithNano'] = UpgradeWorkflow_HLTPhase2_WithNano( +upgradeWFs['HLTPhase2WithNano'] = UpgradeWorkflow_HLTPhase2_WithNano( steps = [ 'Reco', 'RecoGlobal', @@ -2035,16 +2047,16 @@ def condition(self, fragment, stepList, key, hasHarvest): 'HARVESTGlobal', 'HARVESTGlobalFakeHLT', ], - suffix = '_HLTPhaseWithNano', + suffix = '_HLTPhase2WithNano', offset = 0.759, ) -upgradeWFs['HLTPhaseWithNano'].step2 = { +upgradeWFs['HLTPhase2WithNano'].step2 = { '-s':'DIGI:pdigi_valid,L1TrackTrigger,L1,L1P2GT,DIGI2RAW,HLT:75e33,NANO:@Phase2HLT', '--datatier':'GEN-SIM-DIGI-RAW,NANOAODSIM', '--eventcontent':'FEVTDEBUGHLT,NANOAODSIM' } -upgradeWFs['NGTScoutingWithNano'] = deepcopy(upgradeWFs['HLTPhaseWithNano']) +upgradeWFs['NGTScoutingWithNano'] = deepcopy(upgradeWFs['HLTPhase2WithNano']) upgradeWFs['NGTScoutingWithNano'].suffix = '_NGTScoutingWithNano' upgradeWFs['NGTScoutingWithNano'].offset = 0.771 upgradeWFs['NGTScoutingWithNano'].step2 = { @@ -2054,7 +2066,7 @@ def condition(self, fragment, stepList, key, hasHarvest): '--eventcontent':'FEVTDEBUGHLT,NANOAODSIM' } -upgradeWFs['NGTScoutingWithNanoValid'] = deepcopy(upgradeWFs['HLTPhaseWithNano']) +upgradeWFs['NGTScoutingWithNanoValid'] = deepcopy(upgradeWFs['HLTPhase2WithNano']) upgradeWFs['NGTScoutingWithNanoValid'].suffix = '_NGTScoutingWithNanoVal' upgradeWFs['NGTScoutingWithNanoValid'].offset = 0.772 upgradeWFs['NGTScoutingWithNanoValid'].step2 = { @@ -2087,7 +2099,13 @@ def setup_(self, step, stepName, stepDict, k, properties): if ('ALCA' in step) or ('Reco' in step) or ('HLT' in step): stepDict[stepName][k] = None elif 'DigiTrigger' in step: - stepDict[stepName][k] = merge([self.step2, stepDict[step][k]]) + # Add the aging customization + mergedStep = merge([self.step2, stepDict[step][k]]) + if '--customise' in mergedStep: + mergedStep['--customise'] += ',SLHCUpgradeSimulations/Configuration/aging.customise_aging_1000' + else: + mergedStep['--customise'] = 'SLHCUpgradeSimulations/Configuration/aging.customise_aging_1000' + stepDict[stepName][k] = mergedStep elif 'HARVEST' in step: stepDict[stepName][k] = merge([self.step3, stepDict[step][k]]) else: diff --git a/SLHCUpgradeSimulations/Configuration/python/aging.py b/SLHCUpgradeSimulations/Configuration/python/aging.py index 868dd7b75196b..0fd10abc3a3c4 100644 --- a/SLHCUpgradeSimulations/Configuration/python/aging.py +++ b/SLHCUpgradeSimulations/Configuration/python/aging.py @@ -104,19 +104,25 @@ def ageSiPM(process,turnon,lumi): "rec": [1.25, 2.5, 2.5, 2.5], }, } - ctmodules = ['calotowermaker','caloTowerForTrk','caloTowerForTrkPreSplitting','towerMaker','towerMakerWithHO'] + ctmodules = ['calotowermaker','caloTowerForTrk','caloTowerForTrkPreSplitting','towerMaker','towerMakerWithHO','hltPhase2TowerMakerForAll',' hltTowerMaker'] for ilumi, hcal_lumi in enumerate(hcal_lumis[:-1]): if lumi >= hcal_lumi and lumi < hcal_lumis[ilumi+1]: - if hasattr(process,'particleFlowClusterHBHE'): - process.particleFlowClusterHBHE.seedFinder.thresholdsByDetector[0].seedingThreshold = hcal_thresholds[hcal_lumi]["seed"] - process.particleFlowClusterHBHE.initialClusteringStep.thresholdsByDetector[0].gatheringThreshold = hcal_thresholds[hcal_lumi]["rec"] - process.particleFlowClusterHBHE.pfClusterBuilder.recHitEnergyNorms[0].recHitEnergyNorm = hcal_thresholds[hcal_lumi]["rec"] - process.particleFlowClusterHBHE.pfClusterBuilder.positionCalc.logWeightDenominatorByDetector[0].logWeightDenominator = hcal_thresholds[hcal_lumi]["rec"] - process.particleFlowClusterHBHE.pfClusterBuilder.allCellsPositionCalc.logWeightDenominatorByDetector[0].logWeightDenominator = hcal_thresholds[hcal_lumi]["rec"] - if hasattr(process,'particleFlowClusterHCAL'): - process.particleFlowClusterHCAL.pfClusterBuilder.allCellsPositionCalc.logWeightDenominatorByDetector[0].logWeightDenominator = hcal_thresholds[hcal_lumi]["rec"] - if hasattr(process,'particleFlowRecHitHBHE'): - process.particleFlowRecHitHBHE.producers[0].qualityTests[0].cuts[0].threshold = hcal_thresholds[hcal_lumi]["rec"] + pfclushbhemodules = ['particleFlowClusterHBHE','hltParticleFlowClusterHBHE'] + for pfhbhemod in pfclushbhemodules: + if hasattr(process,pfhbhemod): + getattr(process,pfhbhemod).seedFinder.thresholdsByDetector[0].seedingThreshold = hcal_thresholds[hcal_lumi]["seed"] + getattr(process,pfhbhemod).initialClusteringStep.thresholdsByDetector[0].gatheringThreshold = hcal_thresholds[hcal_lumi]["rec"] + getattr(process,pfhbhemod).pfClusterBuilder.recHitEnergyNorms[0].recHitEnergyNorm = hcal_thresholds[hcal_lumi]["rec"] + getattr(process,pfhbhemod).pfClusterBuilder.positionCalc.logWeightDenominatorByDetector[0].logWeightDenominator = hcal_thresholds[hcal_lumi]["rec"] + getattr(process,pfhbhemod).pfClusterBuilder.allCellsPositionCalc.logWeightDenominatorByDetector[0].logWeightDenominator = hcal_thresholds[hcal_lumi]["rec"] + pfclushcalmodules = ['particleFlowClusterHCAL','hltParticleFlowClusterHCAL'] + for pfhcalmod in pfclushcalmodules: + if hasattr(process,pfhcalmod): + getattr(process,pfhcalmod).pfClusterBuilder.allCellsPositionCalc.logWeightDenominatorByDetector[0].logWeightDenominator = hcal_thresholds[hcal_lumi]["rec"] + pfrechithbhemodules = ['particleFlowRecHitHBHE', 'hltParticleFlowRecHitHBHE'] + for pfrechitmod in pfrechithbhemodules: + if hasattr(process,pfrechitmod): + getattr(process,pfrechitmod).producers[0].qualityTests[0].cuts[0].threshold = hcal_thresholds[hcal_lumi]["rec"] for ctmod in ctmodules: if hasattr(process,ctmod): getattr(process,ctmod).HBThreshold1 = hcal_thresholds[hcal_lumi]["rec"][0] @@ -218,15 +224,17 @@ def ageEcal(process,lumi,instLumi): connect = cms.string("frontier://FrontierProd/CMS_CONDITIONS") ) ) - if hasattr(process,"particleFlowClusterECALUncorrected"): - _seeds = process.particleFlowClusterECALUncorrected.seedFinder.thresholdsByDetector - for iseed in range(0,len(_seeds)): - if _seeds[iseed].detector.value()=="ECAL_BARREL": - _seeds[iseed].seedingThreshold = cms.double(ecal_thresholds[int(lumi)]*ecal_seed_multiplier) - _clusters = process.particleFlowClusterECALUncorrected.initialClusteringStep.thresholdsByDetector - for icluster in range(0,len(_clusters)): - if _clusters[icluster].detector.value()=="ECAL_BARREL": - _clusters[icluster].gatheringThreshold = cms.double(ecal_thresholds[int(lumi)]) + pfclusecaluncorrmodules = ['particleFlowClusterECALUncorrected','hltParticleFlowClusterECALUncorrected','hltParticleFlowClusterECALUncorrectedL1Seeded',' hltParticleFlowClusterECALUncorrectedUnseeded'] + for pfclusecaluncorrmod in pfclusecaluncorrmodules: + if hasattr(process,pfclusecaluncorrmod): + _seeds = getattr(process,pfclusecaluncorrmod).seedFinder.thresholdsByDetector + for iseed in range(0,len(_seeds)): + if _seeds[iseed].detector.value()=="ECAL_BARREL": + _seeds[iseed].seedingThreshold = cms.double(ecal_thresholds[int(lumi)]*ecal_seed_multiplier) + _clusters = getattr(process,pfclusecaluncorrmod).initialClusteringStep.thresholdsByDetector + for icluster in range(0,len(_clusters)): + if _clusters[icluster].detector.value()=="ECAL_BARREL": + _clusters[icluster].gatheringThreshold = cms.double(ecal_thresholds[int(lumi)]) return process