Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add combined premixing workflows for Run 3 #27753

Merged
merged 4 commits into from
Aug 23, 2019
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
12 changes: 6 additions & 6 deletions Configuration/PyReleaseValidation/python/relval_2017.py
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -3336,7 +3336,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 @@ -3360,4 +3369,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
Original file line number Diff line number Diff line change
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
makortel marked this conversation as resolved.
Show resolved Hide resolved
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
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
'HARVESTFull',
'HARVESTFullGlobal',
'MiniAODFullGlobal',
'NanoFull',
Copy link
Contributor Author

@makortel makortel Aug 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I needed this in order to get NanoFull for the loop

for step in upgradeSteps[stepType]['PU']:

but I don't remember anymore if it could have any ill side effects.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be fine.

],
'suffix' : '',
'offset' : 0.0,
Expand Down