diff --git a/Configuration/PyReleaseValidation/python/relval_upgrade.py b/Configuration/PyReleaseValidation/python/relval_upgrade.py index e6adaab29c36f..3949d4573dea4 100644 --- a/Configuration/PyReleaseValidation/python/relval_upgrade.py +++ b/Configuration/PyReleaseValidation/python/relval_upgrade.py @@ -58,8 +58,8 @@ def makeStepName(key,frag,step,suffix): stepList[specialType].append(stepMaker(key,frag[:-4],step.replace('RecoGlobal','HLT75e33'),specialWF.suffix)) # similar hacks for premixing if 'PMX' in specialType: - if 'GenSim' in step: - s = step.replace('GenSim','Premix')+'PU' # later processing requires to have PU here + if 'GenSim' in step or 'Gen' in step: + s = step.replace('GenSim','Premix').replace('Gen','Premix')+'PU' # later processing requires to have PU here if step in specialWF.PU: stepMade = stepMaker(key,'PREMIX',s,specialWF.suffix) # append for combined diff --git a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py index af10124b517b4..8b4139b59045d 100644 --- a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py +++ b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py @@ -2346,17 +2346,38 @@ def setupPU_(self, step, stepName, stepDict, k, properties): if "GenSim" in stepName: stepNamePmx = stepName.replace('GenSim','Premix') if not stepNamePmx in stepDict: stepDict[stepNamePmx] = {} - stepDict[stepNamePmx][k] = merge([ - { - '-s': 'GEN,SIM,DIGI:pdigi_valid', - '--datatier': 'PREMIX', - '--eventcontent': 'PREMIX', - '--procModifiers': 'premix_stage1' - }, - stepDict[stepName][k] - ]) - if "ProdLike" in self.suffix: - stepDict[stepNamePmx][k] = merge([{'-s': 'GEN,SIM,DIGI'},stepDict[stepNamePmx][k]]) + # avoid overwriting fastsim alternative + if not k in stepDict[stepNamePmx]: + stepDict[stepNamePmx][k] = merge([ + { + '-s': 'GEN,SIM,DIGI:pdigi_valid', + '--datatier': 'PREMIX', + '--eventcontent': 'PREMIX', + '--procModifiers': 'premix_stage1' + }, + stepDict[stepName][k] + ]) + if "ProdLike" in self.suffix: + stepDict[stepNamePmx][k] = merge([{'-s': 'GEN,SIM,DIGI'},stepDict[stepNamePmx][k]]) + # setup for stage 1 fastsim + elif "Gen" in stepName: + stepNamePmx = stepName.replace('Gen','Premix') + if not stepNamePmx in stepDict: stepDict[stepNamePmx] = {} + # avoid overwriting fullsim alternative + if not k in stepDict[stepNamePmx]: + stepDict[stepNamePmx][k] = merge([ + { + '-s': 'GEN,SIM,RECOBEFMIX,DIGI:pdigi_valid', + '--fast':'', + '--datatier': 'PREMIX', + '--eventcontent': 'PREMIX', + '--procModifiers': 'premix_stage1' + }, + stepDict[stepName][k] + ]) + if "ProdLike" in self.suffix: + # todo + pass # setup for stage 2 elif "Digi" in step or "Reco" in step: # go back to non-PU step version @@ -2382,18 +2403,28 @@ def setupPU_(self, step, stepName, stepDict, k, properties): else: d["--procModifiers"] = "premix_stage2" stepDict[stepName][k] = d - # Increase the input file step number by one for Nano in combined stage1+stage2 - elif "Nano"==step: + # setup for stage 2 fastsim + elif "FastSimRun3" in step: # go back to non-PU step version d = merge([stepDict[self.getStepName(step)][k]]) - if "--filein" in d: - filein = d["--filein"] - m = re.search("step(?P\d+)_", filein) - if m: - d["--filein"] = filein.replace(m.group(), "step%d_"%(int(m.group("ind"))+1)) + if d is None: return + tmpsteps = [] + for s in d["-s"].split(","): + if s == "DIGI" or "DIGI:" in s: + tmpsteps.extend([s, "DATAMIX"]) + else: + tmpsteps.append(s) + d = merge([{"-s" : ",".join(tmpsteps), + "--datamix" : "PreMix"}, + d]) + if "--procModifiers" in d: + d["--procModifiers"] += ",premix_stage2" + else: + d["--procModifiers"] = "premix_stage2" + # for combined stage1+stage2 + if "_PMXS1S2" in self.suffix: + d = merge([digiPremixLocalPileup, d]) stepDict[stepName][k] = d - # run2/3 WFs use Nano (not NanoPU) in PU WF - stepDict[self.getStepName(step)][k] = merge([d]) def condition(self, fragment, stepList, key, hasHarvest): if not 'PU' in key: return False @@ -2412,6 +2443,7 @@ def workflow_(self, workflows, num, fragment, stepList, key): steps = [ ], PU = [ + 'Gen', 'GenSim', 'GenSimHLBeamSpot', 'GenSimHLBeamSpot14', @@ -2432,6 +2464,7 @@ def workflow_(self, workflows, num, fragment, stepList, key): 'RecoNano', 'RecoNanoFakeHLT', 'Nano', + 'FastSimRun3', ], suffix = '_PMXS2', offset = 0.98, @@ -2440,6 +2473,7 @@ def workflow_(self, workflows, num, fragment, stepList, key): upgradeWFs['PMXS1S2'] = UpgradeWorkflowPremix( steps = [], PU = [ + 'Gen', 'GenSim', 'GenSimHLBeamSpot', 'GenSimHLBeamSpot14', @@ -2452,6 +2486,7 @@ def workflow_(self, workflows, num, fragment, stepList, key): 'RecoNano', 'RecoNanoFakeHLT', 'Nano', + 'FastSimRun3', ], suffix = '_PMXS1S2', offset = 0.99,