13 return frag+
'_'+key+
'_'+step+suffix
16 return step+suffix+
'_'+key
18 neutronKeys = [
'2023D17',
'2023D19',
'2023D21',
'2023D22',
'2023D23',
'2023D24',
'2023D25',
'2023D26',
'2023D27',
'2023D28',
'2023D29',
'2023D30']
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']:
58 stepList[stepType].
append(stepMaker(key,
"SingleNuE10_cf",s,upgradeSteps[stepType][
'suffix']))
59 elif (stepType
is not 'baseline')
and ( (
'PU' in step
and step.replace(
'PU',
'')
in upgradeSteps[stepType][
'PU'])
or (step
in upgradeSteps[stepType][
'steps']) ):
60 stepList[stepType].
append(stepMaker(key,frag[:-4],step,upgradeSteps[stepType][
'suffix']))
62 stepList[stepType].
append(stepMaker(key,frag[:-4],step,upgradeSteps[
'baseline'][
'suffix']))
64 workflows[numWF] = [ upgradeDatasetFromFragment[frag], stepList[
'baseline']]
67 if upgradeDatasetFromFragment[frag]==
"TTbar_14TeV" and '2023' in key:
68 workflows[numWF+upgradeSteps[
'Timing'][
'offset']] = [ upgradeDatasetFromFragment[frag]+
"_Timing", stepList[
'Timing']]
71 if any(upgradeDatasetFromFragment[frag]==nfrag
for nfrag
in neutronFrags)
and any(nkey
in key
for nkey
in neutronKeys):
72 workflows[numWF+upgradeSteps[
'Neutron'][
'offset']] = [ upgradeDatasetFromFragment[frag]+
"_Neutron", stepList[
'Neutron']]
75 if (upgradeDatasetFromFragment[frag]==
"TTbar_13" or upgradeDatasetFromFragment[frag]==
"TTbar_14TeV")
and not 'PU' in key
and hasHarvest:
77 trackingVariations = [
'trackingOnly',
'trackingRun2',
'trackingOnlyRun2',
'trackingLowPU',
'pixelTrackingOnly']
78 for tv
in trackingVariations:
79 stepList[tv] = [s
for s
in stepList[tv]
if ((
"ALCA" not in s)
and (
"Nano" not in s))]
80 workflows[numWF+upgradeSteps[
'trackingOnly'][
'offset']] = [ upgradeDatasetFromFragment[frag], stepList[
'trackingOnly']]
82 for tv
in trackingVariations[1:]:
83 workflows[numWF+upgradeSteps[tv][
'offset']] = [ upgradeDatasetFromFragment[frag], stepList[tv]]
85 workflows[numWF+upgradeSteps[
'pixelTrackingOnly'][
'offset']] = [ upgradeDatasetFromFragment[frag], stepList[
'pixelTrackingOnly']]
88 if upgradeDatasetFromFragment[frag]==
"TTbar_13" and '2018' in key:
89 workflows[numWF+upgradeSteps[
'heCollapse'][
'offset']] = [ upgradeDatasetFromFragment[frag], stepList[
'heCollapse']]
92 if upgradeDatasetFromFragment[frag]==
"NuGun" and 'PU' in key
and '2023' in key:
93 workflows[numWF+upgradeSteps[
'Premix'][
'offset']] = [upgradeDatasetFromFragment[frag], stepList[
'Premix']]
96 if 'PU' in key
and '2023' in key
and upgradeDatasetFromFragment[frag]==
"TTbar_14TeV":
98 for step
in stepList[
'baseline']:
100 if "Digi" in step
or "Reco" in step:
101 s = s.replace(
"PU",
"PUPRMX", 1)
103 workflows[numWF+premixS2_offset] = [upgradeDatasetFromFragment[frag], slist]
106 workflows[numWF+premixS1S2_offset] = [upgradeDatasetFromFragment[frag],
109 [slist[1].
replace(
"PUPRMX",
"PUPRMXCombined")] +
def makeStepName(key, frag, step, suffix)
bool any(const std::vector< T > &v, const T &what)
def replace(string, replacements)
def makeStepNameSim(key, frag, step, suffix)