12 return frag+
'_'+key+
'_'+step+suffix
15 return step+suffix+
'_'+key
19 for year
in upgradeKeys:
20 for i,key
in enumerate(upgradeKeys[year]):
21 numWF=numWFAll[year][i]
22 for frag,info
in upgradeFragments.items():
24 if (
"CE_E" in frag
or "CE_H" in frag)
and year==2017:
28 for specialType
in upgradeWFs.keys():
29 stepList[specialType] = []
31 for step
in upgradeProperties[year][key][
'ScenToRun']:
32 stepMaker = makeStepName
34 if 'HLBeamSpot' in step
and '14TeV' in frag:
35 step =
'GenSimHLBeamSpot14'
36 stepMaker = makeStepNameSim
38 if 'HARVEST' in step: hasHarvest =
True
40 for specialType,specialWF
in upgradeWFs.items():
41 if (specialType !=
'baseline')
and ( (
'PU' in step
and step.replace(
'PU',
'')
in specialWF.PU)
or (step
in specialWF.steps) ):
42 stepList[specialType].
append(stepMaker(key,frag[:-4],step,specialWF.suffix))
44 if 'ProdLike' in specialType:
46 stepList[specialType].
append(stepMaker(key,frag[:-4],step.replace(
'RecoGlobal',
'MiniAOD').
replace(
'Reco',
'MiniAOD'),specialWF.suffix))
48 if 'PMX' in specialType:
50 s = step.replace(
'GenSim',
'Premix')+
'PU'
51 if step
in specialWF.PU:
52 stepMade = stepMaker(key,
'PREMIX',s,specialWF.suffix)
54 if 'S2' in specialType: stepList[specialType].
append(stepMade)
56 else: stepList[specialType][-1] = stepMade
58 stepList[specialType].
append(stepMaker(key,frag[:-4],step,
''))
60 for specialType,specialWF
in upgradeWFs.items():
62 if specialType==
"PMXS1":
63 stepList[specialType] = stepList[specialType][:1]
64 specialWF.workflow(workflows, numWF, info.dataset, stepList[specialType], key, hasHarvest)