Skip to content

Commit

Permalink
Merge pull request #27753 from makortel/premixRun3
Browse files Browse the repository at this point in the history
Add combined premixing workflows for Run 3
  • Loading branch information
cmsbuild committed Aug 23, 2019
2 parents ef142d9 + 60038c7 commit dc71c16
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 15 deletions.
12 changes: 6 additions & 6 deletions Configuration/PyReleaseValidation/python/relval_2017.py
Expand Up @@ -22,9 +22,9 @@
# (TTbar trackingOnly, pixelTrackingOnly)
# he collapse: TTbar, TTbar PU, TTbar design
# ParkingBPH: TTbar
# 2021 (ZMM, TTbar, ZEE, MinBias, TTbar PU, ZEE PU, TTbar design)
# 2023 (TTbar, TTbar PU)
# 2024 (TTbar, TTbar PU)
# 2021 (ZMM, TTbar, ZEE, MinBias, TTbar PU, TTbar PU premix, ZEE PU, TTbar design)
# 2023 (TTbar, TTbar PU, TTbar PU premix)
# 2024 (TTbar, TTbar PU, TTbar PU premix)
numWFIB = [10001.0,10002.0,10003.0,10004.0,10005.0,10006.0,10007.0,10008.0,10009.0,10059.0,10071.0,
10042.0,10024.0,10025.0,10026.0,10023.0,10224.0,10225.0,10424.0,
10024.1,10024.2,10024.3,10024.4,10024.5,
Expand All @@ -33,9 +33,9 @@
10824.1,10824.5,
10824.6,11024.6,11224.6,
10824.8,
11650.0,11634.0,11646.0,11640.0,11834.0,11846.0,12024.0,
12434.0,12634.0,
12834.0,13034.0]
11650.0,11634.0,11646.0,11640.0,11834.0,11834.99,11846.0,12024.0,
12434.0,12634.0,12634.99,
12834.0,13034.0,13034.99]
for numWF in numWFIB:
if not numWF in _upgrade_workflows: continue
workflows[numWF] = _upgrade_workflows[numWF]
12 changes: 10 additions & 2 deletions Configuration/PyReleaseValidation/python/relval_steps.py
Expand Up @@ -3337,7 +3337,16 @@ def gen2018HiMix(fragment,howMuch):
# For combined stage1+stage2
if "Digi" in step:
upgradeStepDict[stepNamePUpmx+"Combined"][k] = merge([digiPremixLocalPileup, d])

# Increase the input file step number by one for Nano in combined stage1+stage2
if "Nano" in step:
d = merge([upgradeStepDict[stepName][k]])
if "--filein" in d:
filein = d["--filein"]
m = re.search("step(?P<ind>\d+)_", filein)
if m:
d["--filein"] = filein.replace(m.group(), "step%d_"%(int(m.group("ind"))+1))
stepNamePUpmx = step + 'PUPRMX' + upgradeSteps[stepType]['suffix']
upgradeStepDict[stepNamePUpmx+"Combined"][k] = d
for step in upgradeStepDict.keys():
# we need to do this for each fragment
if 'Sim' in step or 'Premix' in step:
Expand All @@ -3361,4 +3370,3 @@ def gen2018HiMix(fragment,howMuch):
steps[k]=None
else:
steps[k]=merge([upgradeStepDict[step][key]])

27 changes: 20 additions & 7 deletions Configuration/PyReleaseValidation/python/relval_upgrade.py
Expand Up @@ -105,12 +105,19 @@ def makeStepName(key,frag,step,suffix):
if upgradeDatasetFromFragment[frag]=="TTbar_13" and '2018' in key:
workflows[numWF+upgradeSteps['ParkingBPH']['offset']] = [ upgradeDatasetFromFragment[frag], stepList['ParkingBPH']]

# premixing stage1, only for NuGun
if upgradeDatasetFromFragment[frag]=="NuGun" and 'PU' in key and '2026' in key:
workflows[numWF+upgradeSteps['Premix']['offset']] = [upgradeDatasetFromFragment[frag], stepList['Premix']]

# premixing stage2, only for ttbar for time being
if 'PU' in key and '2026' in key and upgradeDatasetFromFragment[frag]=="TTbar_14TeV":
inclPremix = 'PU' in key
if inclPremix:
inclPremix = False
for y in ['2021', '2023', '2024', '2026']:
if y in key:
inclPremix = True
continue
if inclPremix:
# premixing stage1, only for NuGun
if upgradeDatasetFromFragment[frag]=="NuGun":
workflows[numWF+upgradeSteps['Premix']['offset']] = [upgradeDatasetFromFragment[frag], stepList['Premix']]

# premixing stage2
slist = []
for step in stepList['baseline']:
s = step
Expand All @@ -120,10 +127,16 @@ def makeStepName(key,frag,step,suffix):
workflows[numWF+premixS2_offset] = [upgradeDatasetFromFragment[frag], slist]

# Combined stage1+stage2
def nano(s):
if "Nano" in s:
if "_" in s:
return s.replace("_", "PUPRMXCombined_")
return s+"PUPRMXCombined"
return s
workflows[numWF+premixS1S2_offset] = [upgradeDatasetFromFragment[frag], # Signal fragment
[slist[0]] + # Start with signal generation
stepList['Premix'] + # Premixing stage1
[slist[1].replace("PUPRMX", "PUPRMXCombined")] + # Premixing stage2, customized for the combined (defined in relval_steps.py)
slist[2:]] # Remaining standard steps
map(nano, slist[2:])] # Remaining standard steps

numWF+=1
Expand Up @@ -89,6 +89,7 @@
'HARVESTFull',
'HARVESTFullGlobal',
'MiniAODFullGlobal',
'NanoFull',
],
'suffix' : '',
'offset' : 0.0,
Expand Down

0 comments on commit dc71c16

Please sign in to comment.