13 return frag+
'_'+key+
'_'+step+suffix
16 return step+suffix+
'_'+key
20 for year
in upgradeKeys:
21 for i,key
in enumerate(upgradeKeys[year]):
22 numWF=numWFAll[year][i]
23 for frag,info
in six.iteritems(upgradeFragments):
25 if (
"CE_E" in frag
or "CE_H" in frag)
and year==2017:
29 for specialType
in upgradeWFs.keys():
30 stepList[specialType] = []
32 for step
in upgradeProperties[year][key][
'ScenToRun']:
33 stepMaker = makeStepName
35 if 'HLBeamSpot' in step
and '14TeV' in frag:
36 step =
'GenSimHLBeamSpot14'
37 stepMaker = makeStepNameSim
39 if 'HARVEST' in step: hasHarvest =
True
41 for specialType,specialWF
in six.iteritems(upgradeWFs):
42 if (specialType !=
'baseline')
and ( (
'PU' in step
and step.replace(
'PU',
'')
in specialWF.PU)
or (step
in specialWF.steps) ):
43 stepList[specialType].
append(stepMaker(key,frag[:-4],step,specialWF.suffix))
45 if 'ProdLike' in specialType:
47 stepList[specialType].
append(stepMaker(key,frag[:-4],step.replace(
'RecoGlobal',
'MiniAOD').
replace(
'Reco',
'MiniAOD'),specialWF.suffix))
49 if 'PMX' in specialType:
51 s = step.replace(
'GenSim',
'Premix')+
'PU'
52 if step
in specialWF.PU:
53 stepMade = stepMaker(key,
'PREMIX',s,specialWF.suffix)
55 if 'S2' in specialType: stepList[specialType].
append(stepMade)
57 else: stepList[specialType][-1] = stepMade
59 stepList[specialType].
append(stepMaker(key,frag[:-4],step,
''))
61 for specialType,specialWF
in six.iteritems(upgradeWFs):
63 if specialType==
"PMXS1":
64 stepList[specialType] = stepList[specialType][:1]
65 specialWF.workflow(workflows, numWF, info.dataset, stepList[specialType], key, hasHarvest)