Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Configuration/Eras/python/Era_Run3_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from Configuration.Eras.Modifier_ctpps_2018_cff import ctpps_2018
from Configuration.Eras.Modifier_ctpps_2021_cff import ctpps_2021
from Configuration.ProcessModifiers.dd4hep_cff import dd4hep
from Configuration.Eras.Modifier_run3_nanoAOD_devel_cff import run3_nanoAOD_devel

Run3 = cms.ModifierChain(Run2_2018.copyAndExclude([run2_GEM_2017, ctpps_2018]), run3_common, run3_GEM, run3_HB, run3_HFSL, stage2L1Trigger_2021, ctpps_2021, dd4hep)
Run3 = cms.ModifierChain(Run2_2018.copyAndExclude([run2_GEM_2017, ctpps_2018]), run3_common, run3_GEM, run3_HB, run3_HFSL, stage2L1Trigger_2021, ctpps_2021, dd4hep, run3_nanoAOD_devel)

Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ def setup_(self, step, stepName, stepDict, k, properties):
if cust is not None: stepDict[stepName][k]['--customise']=cust
if era is not None:
stepDict[stepName][k]['--era']=era
if 'RecoNano' in stepName: stepDict[stepName][k]['--era'] += ',run3_nanoAOD_devel'
if modifier is not None: stepDict[stepName][k]['--procModifier']=modifier
def condition(self, fragment, stepList, key, hasHarvest):
return True
Expand Down Expand Up @@ -200,19 +199,27 @@ def condition(self, fragment, stepList, key, hasHarvest):

# some commonalities among tracking WFs
class UpgradeWorkflowTracking(UpgradeWorkflow):
# skip the PU argument since PU workflows never used here
def __init__(self, steps, suffix, offset):
# always include some steps that will be skipped
steps = steps + ["ALCA","Nano"]
super().__init__(steps, [], suffix, offset)
def condition(self, fragment, stepList, key, hasHarvest):
result = (fragment=="TTbar_13" or fragment=="TTbar_14TeV") and not 'PU' in key and hasHarvest and self.condition_(fragment, stepList, key, hasHarvest)
if result:
# skip ALCA and Nano
skipList = [s for s in stepList if (("ALCA" in s) or ("Nano" in s))]
for skip in skipList:
stepList.remove(skip)
return result
def condition_(self, fragment, stepList, key, hasHarvest):
return True
def setup_(self, step, stepName, stepDict, k, properties):
# skip ALCA and Nano steps (but not RecoNano or HARVESTNano for Run3)
if 'ALCA' in step or 'Nano'==step:
stepDict[stepName][k] = None
self.setup__(step, stepName, stepDict, k, properties)
# subordinate function for inherited classes
def setup__(self, step, stepName, stepDict, k, properties):
pass

class UpgradeWorkflow_trackingOnly(UpgradeWorkflowTracking):
def setup_(self, step, stepName, stepDict, k, properties):
def setup__(self, step, stepName, stepDict, k, properties):
if 'Reco' in step: stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
elif 'HARVEST' in step: stepDict[stepName][k] = merge([{'-s': 'HARVESTING:@trackingOnlyValidation+@trackingOnlyDQM'}, stepDict[step][k]])
upgradeWFs['trackingOnly'] = UpgradeWorkflow_trackingOnly(
Expand All @@ -224,7 +231,6 @@ def setup_(self, step, stepName, stepDict, k, properties):
'RecoNano',
'HARVESTNano',
],
PU = [],
suffix = '_trackingOnly',
offset = 0.1,
)
Expand All @@ -237,7 +243,7 @@ def setup_(self, step, stepName, stepDict, k, properties):
step3_trackingOnly = upgradeWFs['trackingOnly'].step3

class UpgradeWorkflow_trackingRun2(UpgradeWorkflowTracking):
def setup_(self, step, stepName, stepDict, k, properties):
def setup__(self, step, stepName, stepDict, k, properties):
if 'Reco' in step and stepDict[step][k]['--era']=='Run2_2017':
stepDict[stepName][k] = merge([{'--era': 'Run2_2017_trackingRun2'}, stepDict[step][k]])
def condition_(self, fragment, stepList, key, hasHarvest):
Expand All @@ -246,13 +252,12 @@ def condition_(self, fragment, stepList, key, hasHarvest):
steps = [
'Reco',
],
PU = [],
suffix = '_trackingRun2',
offset = 0.2,
)

class UpgradeWorkflow_trackingOnlyRun2(UpgradeWorkflowTracking):
def setup_(self, step, stepName, stepDict, k, properties):
def setup__(self, step, stepName, stepDict, k, properties):
if 'Reco' in step and stepDict[step][k]['--era']=='Run2_2017':
stepDict[stepName][k] = merge([{'--era': 'Run2_2017_trackingRun2'}, self.step3, stepDict[step][k]])
elif 'HARVEST' in step: stepDict[stepName][k] = merge([{'-s': 'HARVESTING:@trackingOnlyValidation+@trackingOnlyDQM'}, stepDict[step][k]])
Expand All @@ -263,14 +268,13 @@ def condition_(self, fragment, stepList, key, hasHarvest):
'Reco',
'HARVEST',
],
PU = [],
suffix = '_trackingOnlyRun2',
offset = 0.3,
)
upgradeWFs['trackingOnlyRun2'].step3 = upgradeWFs['trackingOnly'].step3

class UpgradeWorkflow_trackingLowPU(UpgradeWorkflowTracking):
def setup_(self, step, stepName, stepDict, k, properties):
def setup__(self, step, stepName, stepDict, k, properties):
if 'Reco' in step and stepDict[step][k]['--era']=='Run2_2017':
stepDict[stepName][k] = merge([{'--era': 'Run2_2017_trackingLowPU'}, stepDict[step][k]])
def condition_(self, fragment, stepList, key, hasHarvest):
Expand All @@ -279,13 +283,12 @@ def condition_(self, fragment, stepList, key, hasHarvest):
steps = [
'Reco',
],
PU = [],
suffix = '_trackingLowPU',
offset = 0.4,
)

class UpgradeWorkflow_pixelTrackingOnly(UpgradeWorkflowTracking):
def setup_(self, step, stepName, stepDict, k, properties):
def setup__(self, step, stepName, stepDict, k, properties):
if 'Reco' in step: stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
elif 'HARVEST' in step: stepDict[stepName][k] = merge([{'-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'}, stepDict[step][k]])
def condition_(self, fragment, stepList, key, hasHarvest):
Expand All @@ -299,7 +302,6 @@ def condition_(self, fragment, stepList, key, hasHarvest):
'RecoNano',
'HARVESTNano',
],
PU = [],
suffix = '_pixelTrackingOnly',
offset = 0.5,
)
Expand All @@ -310,7 +312,7 @@ def condition_(self, fragment, stepList, key, hasHarvest):
}

class UpgradeWorkflow_trackingMkFit(UpgradeWorkflowTracking):
def setup_(self, step, stepName, stepDict, k, properties):
def setup__(self, step, stepName, stepDict, k, properties):
if 'Digi' in step: stepDict[stepName][k] = merge([self.step2, stepDict[step][k]])
if 'Reco' in step: stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
def condition_(self, fragment, stepList, key, hasHarvest):
Expand All @@ -323,7 +325,6 @@ def condition_(self, fragment, stepList, key, hasHarvest):
'RecoGlobal',
'RecoNano',
],
PU = [],
suffix = '_trackingMkFit',
offset = 0.7,
)
Expand All @@ -337,14 +338,12 @@ def condition_(self, fragment, stepList, key, hasHarvest):
#DeepCore seeding for JetCore iteration workflow
class UpgradeWorkflow_seedingDeepCore(UpgradeWorkflow):
def setup_(self, step, stepName, stepDict, k, properties):
if 'Reco' in step or 'HARVEST' in step: stepDict[stepName][k] = merge([{'--procModifiers': 'seedingDeepCore'}, stepDict[step][k]])
# skip ALCA and Nano steps (but not RecoNano or HARVESTNano for Run3)
if 'ALCA' in step or 'Nano'==step:
stepDict[stepName][k] = None
elif 'Reco' in step or 'HARVEST' in step: stepDict[stepName][k] = merge([{'--procModifiers': 'seedingDeepCore'}, stepDict[step][k]])
def condition(self, fragment, stepList, key, hasHarvest):
result = (fragment=="QCD_Pt_1800_2400_14" or fragment=="TTbar_14TeV" ) and ('2021' in key or '2024' in key) and hasHarvest
if result:
# skip ALCA and Nano
skipList = [s for s in stepList if (("ALCA" in s) or ("Nano" in s))]
for skip in skipList:
stepList.remove(skip)
return result
upgradeWFs['seedingDeepCore'] = UpgradeWorkflow_seedingDeepCore(
steps = [
Expand All @@ -354,6 +353,8 @@ def condition(self, fragment, stepList, key, hasHarvest):
'HARVESTGlobal',
'RecoNano',
'HARVESTNano',
'Nano',
'ALCA',
],
PU = [],
suffix = '_seedingDeepCore',
Expand Down Expand Up @@ -753,7 +754,7 @@ def setup_(self, step, stepName, stepDict, k, properties):
elif 'ALCA' in step or 'HARVEST' in step:
# remove step
stepDict[stepName][k] = None
elif 'Nano' in step:
elif 'Nano'==step:
stepDict[stepName][k] = merge([{'--filein':'file:step4.root','-s':'NANO','--datatier':'NANOAODSIM','--eventcontent':'NANOEDMAODSIM'}, stepDict[step][k]])
def condition(self, fragment, stepList, key, hasHarvest):
return fragment=="TTbar_14TeV" and ('2026' in key or '2021' in key)
Expand Down Expand Up @@ -1017,7 +1018,7 @@ def setupPU_(self, step, stepName, stepDict, k, properties):
d["--procModifiers"] = "premix_stage2"
stepDict[stepName][k] = d
# Increase the input file step number by one for Nano in combined stage1+stage2
elif "Nano" in step:
elif "Nano"==step:
# go back to non-PU step version
d = merge([stepDict[self.getStepName(step)][k]])
if "--filein" in d:
Expand Down Expand Up @@ -1133,7 +1134,7 @@ def setup_(self, step, stepName, stepDict, k, properties):
"--eventcontent": "PREMIXRAW"},
d])
stepDict[stepName][k] = d
if 'Nano' in step:
if 'Nano'==step:
stepDict[stepName][k] = merge([{'--filein':'file:step5.root','-s':'NANO','--datatier':'NANOAODSIM','--eventcontent':'NANOEDMAODSIM'}, stepDict[step][k]])
def condition(self, fragment, stepList, key, hasHarvest):
# use both conditions
Expand Down