From f59a3375346098d21df6f50bdbfe0150019200c1 Mon Sep 17 00:00:00 2001 From: Jean Yves Beaucamp <jean.yves.beaucamp@cern.ch> Date: Sat, 28 Dec 2024 07:11:34 +0100 Subject: [PATCH] Remove step number from getEmptyStep --- .../HLT/CalibCosmicMon/CalibChainConfiguration.py | 2 +- .../python/HLT/Config/ChainConfigurationBase.py | 7 +++---- .../HLT/Electron/ElectronChainConfiguration.py | 6 +++--- .../python/HLT/Jet/JetChainConfiguration.py | 6 +++--- .../python/HLT/MinBias/MinBiasChainConfiguration.py | 2 +- .../python/HLT/Muon/MuonChainConfiguration.py | 10 +++------- .../python/HLT/Tau/TauChainConfiguration.py | 8 ++++---- .../python/HLT/Test/TestChainConfiguration.py | 4 ++-- .../UnconventionalTrackingChainConfiguration.py | 12 ++++++------ 9 files changed, 26 insertions(+), 31 deletions(-) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/CalibCosmicMon/CalibChainConfiguration.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/CalibCosmicMon/CalibChainConfiguration.py index fe810d25c627..b288d6da5421 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/CalibCosmicMon/CalibChainConfiguration.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/CalibCosmicMon/CalibChainConfiguration.py @@ -141,7 +141,7 @@ class CalibChainConfiguration(ChainConfigurationBase): return self.getStep(flags, 'LArPSALL', [getCaloAllEMLayersPSSequenceGenCfg], doAllorAllEM=True) def getIDCalibEmpty(self, flags, i): - return self.getEmptyStep(1, 'IDCalibEmptyStep') + return self.getEmptyStep('IDCalibEmptyStep') def getIDCalibFTFReco(self, flags, i): return self.getStep(flags, 'IDCalibFTFCfg',[IDCalibFTFSequenceGenCfg]) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Config/ChainConfigurationBase.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Config/ChainConfigurationBase.py index 91b83c717469..cd99942e7825 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Config/ChainConfigurationBase.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Config/ChainConfigurationBase.py @@ -62,10 +62,9 @@ class ChainConfigurationBase(metaclass=abc.ABCMeta): # if not returned any step raise RuntimeError("[getStep] No sequences generated for step %s!", stepName) - def getEmptyStep(self, stepID, stepPartName): - stepName = 'Step%s'%str(stepID) + '_' + stepPartName - log.debug("Configuring empty step %s", stepName) - return ChainStep(stepName, chainDicts=[self.dict], isEmpty = True) + def getEmptyStep(self, stepName): + log.debug('Configuring empty step %s', stepName) + return ChainStep(stepName, chainDicts=[self.dict], isEmpty=True) def buildChain(self, chainSteps): diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Electron/ElectronChainConfiguration.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Electron/ElectronChainConfiguration.py index 7495b2c44fee..34a1e38e29f3 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Electron/ElectronChainConfiguration.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Electron/ElectronChainConfiguration.py @@ -230,7 +230,7 @@ class ElectronChainConfiguration(ChainConfigurationBase): def getFastElectron(self, flags, is_probe_leg=False): if self.chainPart['idperfInfo']: stepName = "fast_electron_empty" - return self.getEmptyStep(3,stepName) + return self.getEmptyStep(stepName) else: stepName = "fast_electron" return self.getStep(flags, stepName,[fastElectronSequenceGenCfg],is_probe_leg=is_probe_leg) @@ -238,7 +238,7 @@ class ElectronChainConfiguration(ChainConfigurationBase): def getFastElectron_lrt(self, flags, is_probe_leg=False): if self.chainPart['idperfInfo']: stepName = "fast_electron_lrt_empty" - return self.getEmptyStep(3,stepName) + return self.getEmptyStep(stepName) else: stepName = "fast_electron_lrt" return self.getStep(flags, stepName,[fastElectron_LRTSequenceGenCfg],is_probe_leg=is_probe_leg) @@ -338,6 +338,6 @@ class ElectronChainConfiguration(ChainConfigurationBase): return self.getStep(flags, stepName, [fastCalo_FWDSequenceGenCfg], name='Electron', is_probe_leg=is_probe_leg) def getEmptyRefitStep(self, flags, is_probe_leg=False): - return self.getEmptyStep(6,'nonGSFEmptyRefit') + return self.getEmptyStep('nonGSFEmptyRefit') diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetChainConfiguration.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetChainConfiguration.py index a63e61ca0ff8..29973a18015b 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetChainConfiguration.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetChainConfiguration.py @@ -135,7 +135,7 @@ class JetChainConfiguration(ChainConfigurationBase): caloRecoStep = self.getJetCaloRecoChainStep(flags) chainSteps.append( caloRecoStep ) #Add empty step to align with preselection step - roitrkPreselStep = self.getEmptyStep(2, 'RoIFTFEmptyStep') + roitrkPreselStep = self.getEmptyStep('RoIFTFEmptyStep') else: # Add calo preselection step preselJetDef, jetPreselStep = self.getJetCaloPreselChainStep(flags) @@ -146,7 +146,7 @@ class JetChainConfiguration(ChainConfigurationBase): roitrkPreselStep = self.getJetRoITrackJetTagPreselChainStep(flags, preselJetDef) else: # Empty step for alignment if no roiftf preselection defined - roitrkPreselStep=self.getEmptyStep(2, 'RoIFTFEmptyStep') + roitrkPreselStep=self.getEmptyStep('RoIFTFEmptyStep') chainSteps.append(roitrkPreselStep) # Final selection with FS tracking @@ -166,7 +166,7 @@ class JetChainConfiguration(ChainConfigurationBase): chainSteps+= [ CRVARStep] elif self.exotHypo != '' and ("calratio" in self.exotHypo): CRStep = self.getJetCRChainStep(flags, self.jetName, self.exotHypo) - chainSteps+= [self.getEmptyStep(2, 'RoIFTFEmptyStep'), CRStep] + chainSteps+= [self.getEmptyStep('RoIFTFEmptyStep'), CRStep] myChain = self.buildChain(chainSteps) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/MinBias/MinBiasChainConfiguration.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/MinBias/MinBiasChainConfiguration.py index b1d651209bcf..b30b6fed08aa 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/MinBias/MinBiasChainConfiguration.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/MinBias/MinBiasChainConfiguration.py @@ -55,7 +55,7 @@ class MinBiasChainConfig(ChainConfigurationBase): return self.getStep(flags, 'Mbts', [MinBiasMbtsSequenceGenCfg]) def getMinBiasEmptyMbtsStep(self, flags): - return self.getEmptyStep(1,'EmptyMbts') + return self.getEmptyStep('EmptyMbts') def getMinBiasSpStep(self, flags): return self.getStep(flags, 'SPCount', [MinBiasSPSequenceGenCfg]) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Muon/MuonChainConfiguration.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Muon/MuonChainConfiguration.py index 2230e977a541..90023aac1c84 100755 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Muon/MuonChainConfiguration.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Muon/MuonChainConfiguration.py @@ -174,21 +174,17 @@ class MuonChainConfiguration(ChainConfigurationBase): def getmuEFMSIso(self, flags, is_probe_leg=False): return self.getStep(flags, 'muEFMSIso',[ muEFMSIsoSequenceGenCfg], is_probe_leg=is_probe_leg) - #-------------------- - def getmuMSEmptyAll(self, flags, stepID): # No T&P info needed for empty step? - return self.getEmptyStep(stepID,'muMS_empty') - #-------------------- def getmuMSEmpty(self, flags, is_probe_leg=False): # No T&P info needed for empty step? - return self.getmuMSEmptyAll(flags, 2) + return self.getEmptyStep('muMS_empty') #-------------------- def getmuFastEmpty(self, flags, is_probe_leg=False): # No T&P info needed for empty step? - return self.getEmptyStep(1,'muFast_empty') + return self.getEmptyStep('muFast_empty') #-------------------- def getEFCBEmpty(self, flags, is_probe_leg=False): # No T&P info needed for empty step? - return self.getEmptyStep(4,'muefCB_Empty') + return self.getEmptyStep('muefCB_Empty') #-------------------- def getLateMuRoI(self, flags, is_probe_leg=False): # No T&P support, add if needed diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Tau/TauChainConfiguration.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Tau/TauChainConfiguration.py index 3fe7a0ad631a..9b19fb9ef397 100755 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Tau/TauChainConfiguration.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Tau/TauChainConfiguration.py @@ -84,7 +84,7 @@ class TauChainConfiguration(ChainConfigurationBase): def getFTFCoreEmpty(self, flags): stepName = 'FTFCoreEmpty_tau' - return self.getEmptyStep(2, stepName) + return self.getEmptyStep(stepName) #-------------------------------------------------- @@ -96,7 +96,7 @@ class TauChainConfiguration(ChainConfigurationBase): def getFTFIsoEmpty(self, flags): stepName = 'FTFIsoEmpty_tau' - return self.getEmptyStep(3, stepName) + return self.getEmptyStep(stepName) #-------------------------------------------------- @@ -112,7 +112,7 @@ class TauChainConfiguration(ChainConfigurationBase): def getPrecTrackEmpty(self, flags): stepName = 'PrecTrkEmpty_tau' - return self.getEmptyStep(4, stepName) + return self.getEmptyStep(stepName) #-------------------------------------------------- @@ -142,4 +142,4 @@ class TauChainConfiguration(ChainConfigurationBase): def getPrecisionEmpty(self, flags): stepName = 'PrecisionEmpty_tau' - return self.getEmptyStep(5, stepName) + return self.getEmptyStep(stepName) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Test/TestChainConfiguration.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Test/TestChainConfiguration.py index 854acadd5b7e..7dc33f48cf09 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Test/TestChainConfiguration.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Test/TestChainConfiguration.py @@ -149,10 +149,10 @@ class TestChainConfiguration(ChainConfigurationBase): return self.getStep(flags, "mu41",[ muCfg411 ]) def Step_empty1(self, flags): - return self.getEmptyStep(1,'empty') + return self.getEmptyStep('empty') def Step_empty2(self, flags): - return self.getEmptyStep(2,'empty') + return self.getEmptyStep('empty') def Step_empty3(self, flags): return self.getStep(flags,'emptySeq', [EmptyMenuSequenceCfg], name="EmptySequence") diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/UnconventionalTracking/UnconventionalTrackingChainConfiguration.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/UnconventionalTracking/UnconventionalTrackingChainConfiguration.py index 26465420b945..7bfa360672e7 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/UnconventionalTracking/UnconventionalTrackingChainConfiguration.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/UnconventionalTracking/UnconventionalTrackingChainConfiguration.py @@ -71,22 +71,22 @@ class UnconventionalTrackingChainConfiguration(ChainConfigurationBase): return self.getStep(flags, 'JetRecoOnlyCfg',[UTTJetRecoSequenceGenCfg]) # Empty for alignment def getIsoHPtTrackEmpty(self, flags): - return self.getEmptyStep(1,'EmptyUncTrk') + return self.getEmptyStep('EmptyUncTrk') def getFSLRTEmpty(self, flags): - return self.getEmptyStep(1, 'FSLRTEmptyStep') + return self.getEmptyStep('FSLRTEmptyStep') def getDisTrkEmpty(self, flags): - return self.getEmptyStep(1, 'DisTrkEmptyStep') + return self.getEmptyStep('DisTrkEmptyStep') def getVSIEmpty(self, flags): - return self.getEmptyStep(1, 'VSIEmptyStep') + return self.getEmptyStep('VSIEmptyStep') def getdEdxEmpty(self, flags): - return self.getEmptyStep(1, 'dEdxEmptyStep') + return self.getEmptyStep('dEdxEmptyStep') # Step 2 def getFSLRTTrigger(self, flags): return self.getStep(flags, 'FSLRT',[FullScanLRTMenuSequenceGenCfg]) # Empty for alignment with jets def getRoITrkEmpty(self, flags): - return self.getEmptyStep(2, 'RoITrkEmptyStep') + return self.getEmptyStep('RoITrkEmptyStep') # Step 3 -- all FTF tracking here def getFTFTrackReco(self, flags): -- GitLab