13 return frag+
'_'+key+
'_'+step+suffix
16 return step+suffix+
'_'+key
18 neutronKeys = [
'2023D17',
'2023D19',
'2023D21',
'2023D22',
'2023D23']
19 neutronFrags = [
'ZMM_14',
'MinBias_14TeV']
23 for year
in upgradeKeys:
24 for i,key
in enumerate(upgradeKeys[year]):
25 numWF=numWFAll[year][i]
26 for frag
in upgradeFragments:
28 for stepType
in upgradeSteps.keys():
29 stepList[stepType] = []
31 for step
in upgradeProperties[year][key][
'ScenToRun']:
32 stepMaker = makeStepName
34 if 'HLBeamSpotFull' in step
and '14TeV' in frag:
35 step =
'GenSimHLBeamSpotFull14' 36 stepMaker = makeStepNameSim
38 if 'HARVEST' in step: hasHarvest =
True 40 for stepType
in upgradeSteps.keys():
42 if stepType ==
'Premix':
52 s = step.replace(
'GenSim',
'Premix')
53 if not s
in upgradeSteps[stepType][
'PU']:
56 stepList[stepType].
append(stepMaker(key,frag[:-4],s,upgradeSteps[stepType][
'suffix']))
57 elif (stepType
is not 'baseline')
and ( (
'PU' in step
and step.replace(
'PU',
'')
in upgradeSteps[stepType][
'PU'])
or (step
in upgradeSteps[stepType][
'steps']) ):
58 stepList[stepType].
append(stepMaker(key,frag[:-4],step,upgradeSteps[stepType][
'suffix']))
60 stepList[stepType].
append(stepMaker(key,frag[:-4],step,upgradeSteps[
'baseline'][
'suffix']))
62 workflows[numWF] = [ upgradeDatasetFromFragment[frag], stepList[
'baseline']]
65 if upgradeDatasetFromFragment[frag]==
"TTbar_14TeV" and '2023' in key:
66 workflows[numWF+upgradeSteps[
'Timing'][
'offset']] = [ upgradeDatasetFromFragment[frag]+
"_Timing", stepList[
'Timing']]
69 if any(upgradeDatasetFromFragment[frag]==nfrag
for nfrag
in neutronFrags)
and any(nkey
in key
for nkey
in neutronKeys):
70 workflows[numWF+upgradeSteps[
'Neutron'][
'offset']] = [ upgradeDatasetFromFragment[frag]+
"_Neutron", stepList[
'Neutron']]
73 if (upgradeDatasetFromFragment[frag]==
"TTbar_13" or upgradeDatasetFromFragment[frag]==
"TTbar_14TeV")
and not 'PU' in key
and hasHarvest:
75 trackingVariations = [
'trackingOnly',
'trackingRun2',
'trackingOnlyRun2',
'trackingLowPU',
'pixelTrackingOnly']
76 for tv
in trackingVariations:
77 stepList[tv] =
filter(
lambda s :
"ALCA" not in s, stepList[tv])
78 workflows[numWF+upgradeSteps[
'trackingOnly'][
'offset']] = [ upgradeDatasetFromFragment[frag], stepList[
'trackingOnly']]
80 for tv
in trackingVariations[1:]:
81 workflows[numWF+upgradeSteps[tv][
'offset']] = [ upgradeDatasetFromFragment[frag], stepList[tv]]
83 workflows[numWF+upgradeSteps[
'pixelTrackingOnly'][
'offset']] = [ upgradeDatasetFromFragment[frag], stepList[
'pixelTrackingOnly']]
86 if upgradeDatasetFromFragment[frag]==
"TTbar_13" and '2018' in key:
87 workflows[numWF+upgradeSteps[
'heCollapse'][
'offset']] = [ upgradeDatasetFromFragment[frag], stepList[
'heCollapse']]
90 if upgradeDatasetFromFragment[frag]==
"NuGun" and 'PU' in key
and '2023' in key:
91 workflows[numWF+upgradeSteps[
'Premix'][
'offset']] = [upgradeDatasetFromFragment[frag], stepList[
'Premix']]
94 if 'PU' in key
and '2023' in key
and upgradeDatasetFromFragment[frag]==
"TTbar_14TeV":
96 for step
in stepList[
'baseline']:
98 if "Digi" in step
or "Reco" in step:
99 s = s.replace(
"PU",
"PUPRMX", 1)
101 workflows[numWF+premixS2_offset] = [upgradeDatasetFromFragment[frag], slist]
def makeStepName(key, frag, step, suffix)
bool any(const std::vector< T > &v, const T &what)
def makeStepNameSim(key, frag, step, suffix)