CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
upgradeWorkflowComponents.py
Go to the documentation of this file.
1 from copy import copy, deepcopy
2 from collections import OrderedDict
3 from .MatrixUtil import merge, Kby, Mby, check_dups
4 import re
5 
6 U2000by1={'--relval': '2000,1'}
7 
8 # DON'T CHANGE THE ORDER, only append new keys. Otherwise the numbering for the runTheMatrix tests will change.
9 
10 upgradeKeys = {}
11 
12 upgradeKeys[2017] = [
13  '2017',
14  '2017PU',
15  '2017Design',
16  '2017DesignPU',
17  '2018',
18  '2018PU',
19  '2018Design',
20  '2018DesignPU',
21  '2021',
22  '2021PU',
23  '2021Design',
24  '2021DesignPU',
25  '2023',
26  '2023PU',
27  '2024',
28  '2024PU',
29  '2021FS',
30  '2021FSPU',
31  '2021postEE',
32  '2021postEEPU',
33  '2023FS',
34  '2023FSPU',
35  '2022HI',
36  '2022HIRP', #RawPrime
37  '2023HI',
38  '2023HIRP', #RawPrime
39  '2024HLTOnDigi',
40  '2024HLTOnDigiPU',
41  '2024GenOnly',
42  '2024SimOnGen',
43 ]
44 
45 upgradeKeys[2026] = [
46  '2026D95',
47  '2026D95PU',
48  '2026D96',
49  '2026D96PU',
50  '2026D98',
51  '2026D98PU',
52  '2026D99',
53  '2026D99PU',
54  '2026D100',
55  '2026D100PU',
56  '2026D101',
57  '2026D101PU',
58  '2026D102',
59  '2026D102PU',
60  '2026D103',
61  '2026D103PU',
62  '2026D104',
63  '2026D104PU',
64  '2026D105',
65  '2026D105PU',
66  '2026D106',
67  '2026D106PU',
68  '2026D107',
69  '2026D107PU',
70  '2026D108',
71  '2026D108PU',
72  '2026D109',
73  '2026D109PU',
74  '2026D110',
75  '2026D110PU',
76  '2026D111',
77  '2026D111PU',
78  '2026D112',
79  '2026D112PU',
80  '2026D113',
81  '2026D113PU',
82  '2026D114',
83  '2026D114PU',
84  '2026D110GenOnly',
85  '2026D110SimOnGen',
86  '2026D115',
87  '2026D115PU',
88 ]
89 
90 # pre-generation of WF numbers
91 numWFStart={
92  2017: 10000,
93  2026: 23600,
94 }
95 numWFSkip=200
96 # temporary measure to keep other WF numbers the same
97 numWFConflict = [[14400,14800], #2022ReReco, 2022ReRecoPU (in 12_4)
98  [24400,24800], #D97
99  [50000,51000]]
100 numWFAll={
101  2017: [],
102  2026: []
103 }
104 
105 for year in upgradeKeys:
106  for i in range(0,len(upgradeKeys[year])):
107  numWFtmp = numWFStart[year] if i==0 else (numWFAll[year][i-1] + numWFSkip)
108  for conflict in numWFConflict:
109  if numWFtmp>=conflict[0] and numWFtmp<conflict[1]:
110  numWFtmp = conflict[1]
111  break
112  numWFAll[year].append(numWFtmp)
113 
114 # workflows for baseline and for variations
115 # setup() automatically loops over all steps and applies any customizations specified in setup_() -> called in relval_steps.py
116 # setupPU() and setupPU_() operate similarly -> called in relval_steps.py *after* merging PUDataSets w/ regular steps
117 # workflow() adds a concrete workflow to the list based on condition() -> called in relval_upgrade.py
118 # every special workflow gets its own derived class, which must then be added to the global dict upgradeWFs
119 preventReuseKeyword = 'NOREUSE'
121  def __init__(self,steps,PU,suffix,offset):
122  self.steps = steps
123  self.PU = PU
124  self.allowReuse = True
125 
126  # ensure all PU steps are in normal step list
127  for step in self.PU:
128  if not step in self.steps:
129  self.steps.append(step)
130 
131  self.suffix = suffix
132  if len(self.suffix)>0 and self.suffix[0]!='_': self.suffix = '_'+self.suffix
133  self.offset = offset
134  if self.offset < 0.0 or self.offset > 1.0:
135  raise ValueError("Special workflow offset must be between 0.0 and 1.0")
136  def getStepName(self, step, extra=""):
137  stepName = step + self.suffix + extra
138  return stepName
139  def getStepNamePU(self, step, extra=""):
140  stepNamePU = step + 'PU' + self.suffix + extra
141  return stepNamePU
142  def init(self, stepDict):
143  for step in self.steps:
144  stepDict[self.getStepName(step)] = {}
145  if not self.allowReuse: stepDict[self.getStepName(step,preventReuseKeyword)] = {}
146  for step in self.PU:
147  stepDict[self.getStepNamePU(step)] = {}
148  if not self.allowReuse: stepDict[self.getStepNamePU(step,preventReuseKeyword)] = {}
149  def setup(self, stepDict, k, properties):
150  for step in self.steps:
151  self.setup_(step, self.getStepName(step), stepDict, k, properties)
152  if not self.allowReuse: self.preventReuse(self.getStepName(step,preventReuseKeyword), stepDict, k)
153  def setupPU(self, stepDict, k, properties):
154  for step in self.PU:
155  self.setupPU_(step, self.getStepNamePU(step), stepDict, k, properties)
156  if not self.allowReuse: self.preventReuse(self.getStepNamePU(step,preventReuseKeyword), stepDict, k)
157  def setup_(self, step, stepName, stepDict, k, properties):
158  pass
159  def setupPU_(self, step, stepName, stepDict, k, properties):
160  pass
161  def workflow(self, workflows, num, fragment, stepList, key, hasHarvest):
162  if self.condition(fragment, stepList, key, hasHarvest):
163  self.workflow_(workflows, num, fragment, stepList, key)
164  def workflow_(self, workflows, num, fragment, stepList, key):
165  fragmentTmp = [fragment, key]
166  if len(self.suffix)>0: fragmentTmp.append(self.suffix)
167  workflows[num+self.offset] = [ fragmentTmp, stepList ]
168  def condition(self, fragment, stepList, key, hasHarvest):
169  return False
170  def preventReuse(self, stepName, stepDict, k):
171  if "Sim" in stepName and stepName != "Sim":
172  stepDict[stepName][k] = None
173  if "Gen" in stepName:
174  stepDict[stepName][k] = None
175 upgradeWFs = OrderedDict()
176 
178  def setup_(self, step, stepName, stepDict, k, properties):
179  cust=properties.get('Custom', None)
180  era=properties.get('Era', None)
181  modifier=properties.get('ProcessModifier',None)
182  if cust is not None: stepDict[stepName][k]['--customise']=cust
183  if era is not None:
184  stepDict[stepName][k]['--era']=era
185  if modifier is not None: stepDict[stepName][k]['--procModifier']=modifier
186  def condition(self, fragment, stepList, key, hasHarvest):
187  return True
188 upgradeWFs['baseline'] = UpgradeWorkflow_baseline(
189  steps = [
190  'Gen',
191  'GenHLBeamSpot',
192  'GenHLBeamSpot14',
193  'Sim',
194  'GenSim',
195  'GenSimHLBeamSpot',
196  'GenSimHLBeamSpot14',
197  'GenSimHLBeamSpotHGCALCloseBy',
198  'Digi',
199  'DigiNoHLT',
200  'DigiTrigger',
201  'HLTRun3',
202  'HLTOnly',
203  'RecoLocal',
204  'Reco',
205  'RecoFakeHLT',
206  'RecoGlobal',
207  'RecoNano',
208  'RecoNanoFakeHLT',
209  'HARVEST',
210  'HARVESTFakeHLT',
211  'HARVESTNano',
212  'HARVESTNanoFakeHLT',
213  'FastSim',
214  'HARVESTFast',
215  'HARVESTGlobal',
216  'ALCA',
217  'ALCAPhase2',
218  'Nano',
219  'MiniAOD',
220  'HLT75e33',
221  'FastSimRun3',
222  'HARVESTFastRun3',
223  ],
224  PU = [
225  'DigiTrigger',
226  'RecoLocal',
227  'RecoGlobal',
228  'Digi',
229  'DigiNoHLT',
230  'HLTOnly',
231  'Reco',
232  'RecoFakeHLT',
233  'RecoNano',
234  'RecoNanoFakeHLT',
235  'HARVEST',
236  'HARVESTFakeHLT',
237  'HARVESTNano',
238  'HARVESTNanoFakeHLT',
239  'HARVESTGlobal',
240  'MiniAOD',
241  'Nano',
242  'HLT75e33',
243  'FastSimRun3',
244  'HARVESTFastRun3',
245  ],
246  suffix = '',
247  offset = 0.0,
248 )
249 
250 
252  def setup_(self, step, stepName, stepDict, k, properties):
253  if stepDict[step][k] != None:
254  if 'ALCA' in step:
255  stepDict[stepName][k] = None
256  if 'RecoNano' in step:
257  stepDict[stepName][k] = merge([{'--filein': 'file:step3.root', '--secondfilein': 'file:step2.root'}, stepDict[step][k]])
258  if 'Digi' in step and 'NoHLT' not in step:
259  stepDict[stepName][k] = merge([{'-s': re.sub(',HLT.*', '', stepDict[step][k]['-s'])}, stepDict[step][k]])
260  def condition(self, fragment, stepList, key, hasHarvest):
261  if ('TTbar_14TeV' in fragment and '2021' == key):
262  stepList.insert(stepList.index('Digi_DigiNoHLT_2021')+1, 'HLTRun3_2021')
263  return ('TTbar_14TeV' in fragment and '2021' == key)
264 upgradeWFs['DigiNoHLT'] = UpgradeWorkflow_DigiNoHLT(
265  steps = [
266  'Digi',
267  'RecoNano',
268  'RecoNanoFakeHLT',
269  'ALCA'
270  ],
271  PU = [],
272  suffix = '_DigiNoHLT',
273  offset = 0.601,
274 )
275 
276 # some commonalities among tracking WFs
278 
279  def __init__(self, steps, PU, suffix, offset):
280  # always include some steps that will be skipped
281  steps = steps + ["ALCA","Nano"]
282  super().__init__(steps, PU, suffix, offset)
283  def condition(self, fragment, stepList, key, hasHarvest):
284  result = (fragment=="TTbar_13" or fragment=="TTbar_14TeV" or 'Hydjet' in fragment) and not 'PU' in key and hasHarvest and self.condition_(fragment, stepList, key, hasHarvest)
285  return result
286  def condition_(self, fragment, stepList, key, hasHarvest):
287  return True
288  def setup_(self, step, stepName, stepDict, k, properties):
289  # skip ALCA and Nano steps (but not RecoNano or HARVESTNano for Run3)
290  if 'ALCA' in step or 'Nano'==step:
291  stepDict[stepName][k] = None
292  self.setup__(step, stepName, stepDict, k, properties)
293  # subordinate function for inherited classes
294  def setup__(self, step, stepName, stepDict, k, properties):
295  pass
296 
297 class UpgradeWorkflow_trackingOnly(UpgradeWorkflowTracking):
298  def setup__(self, step, stepName, stepDict, k, properties):
299  if 'Reco' in step: stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
300  elif 'HARVEST' in step: stepDict[stepName][k] = merge([{'-s': 'HARVESTING:@trackingOnlyValidation+@trackingOnlyDQM'}, stepDict[step][k]])
301 
302  def condition(self, fragment, stepList, key, hasHarvest):
303  result = (fragment=="TTbar_13" or fragment=="TTbar_14TeV") and hasHarvest and self.condition_(fragment, stepList, key, hasHarvest)
304  return result
305 
306 
307 
308 upgradeWFs['trackingOnly'] = UpgradeWorkflow_trackingOnly(
309  steps = [
310  'Reco',
311  'RecoFakeHLT',
312  'HARVEST',
313  'HARVESTFakeHLT',
314  'RecoGlobal',
315  'HARVESTGlobal',
316  'RecoNano',
317  'RecoNanoFakeHLT',
318  'HARVESTNano',
319  'HARVESTNanoFakeHLT',
320  ],
321  PU = [
322  'Reco',
323  'RecoFakeHLT',
324  'HARVEST',
325  'HARVESTFakeHLT',
326  'RecoGlobal',
327  'HARVESTGlobal',
328  'RecoNano',
329  'RecoNanoFakeHLT',
330  'HARVESTNano',
331  'HARVESTNanoFakeHLT',
332  ],
333 
334 
335  suffix = '_trackingOnly',
336  offset = 0.1,
337 )
338 upgradeWFs['trackingOnly'].step3 = {
339  '-s': 'RAW2DIGI,RECO:reconstruction_trackingOnly,VALIDATION:@trackingOnlyValidation,DQM:@trackingOnlyDQM',
340  '--datatier':'GEN-SIM-RECO,DQMIO',
341  '--eventcontent':'RECOSIM,DQM',
342 }
343 # used outside of upgrade WFs
344 step3_trackingOnly = upgradeWFs['trackingOnly'].step3
345 
347  def setup__(self, step, stepName, stepDict, k, properties):
348  if 'Reco' in step and stepDict[step][k]['--era']=='Run2_2017':
349  stepDict[stepName][k] = merge([{'--era': 'Run2_2017_trackingRun2'}, stepDict[step][k]])
350  def condition_(self, fragment, stepList, key, hasHarvest):
351  return '2017' in key
352 upgradeWFs['trackingRun2'] = UpgradeWorkflow_trackingRun2(
353  steps = [
354  'Reco',
355  'RecoFakeHLT',
356  ],
357  PU = [],
358  suffix = '_trackingRun2',
359  offset = 0.2,
360 )
361 
363  def setup__(self, step, stepName, stepDict, k, properties):
364  if 'Reco' in step and stepDict[step][k]['--era']=='Run2_2017':
365  stepDict[stepName][k] = merge([{'--era': 'Run2_2017_trackingRun2'}, self.step3, stepDict[step][k]])
366  elif 'HARVEST' in step: stepDict[stepName][k] = merge([{'-s': 'HARVESTING:@trackingOnlyValidation+@trackingOnlyDQM'}, stepDict[step][k]])
367  def condition_(self, fragment, stepList, key, hasHarvest):
368  return '2017' in key
369 upgradeWFs['trackingOnlyRun2'] = UpgradeWorkflow_trackingOnlyRun2(
370  steps = [
371  'Reco',
372  'RecoFakeHLT',
373  'HARVEST',
374  'HARVESTFakeHLT',
375  ],
376  PU = [],
377  suffix = '_trackingOnlyRun2',
378  offset = 0.3,
379 )
380 upgradeWFs['trackingOnlyRun2'].step3 = upgradeWFs['trackingOnly'].step3
381 
383  def setup__(self, step, stepName, stepDict, k, properties):
384  if 'Reco' in step and stepDict[step][k]['--era']=='Run2_2017':
385  stepDict[stepName][k] = merge([{'--era': 'Run2_2017_trackingLowPU'}, stepDict[step][k]])
386  def condition_(self, fragment, stepList, key, hasHarvest):
387  return '2017' in key
388 upgradeWFs['trackingLowPU'] = UpgradeWorkflow_trackingLowPU(
389  steps = [
390  'Reco',
391  'RecoFakeHLT',
392  ],
393  PU = [],
394  suffix = '_trackingLowPU',
395  offset = 0.4,
396 )
397 
399  def setup__(self, step, stepName, stepDict, k, properties):
400  if 'Reco' in step: stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
401  # skip ALCA step as products might not be available
402  elif 'ALCA' in step: stepDict[stepName][k] = None
403  elif 'HARVEST' in step: stepDict[stepName][k] = merge([{'-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'}, stepDict[step][k]])
404  def condition_(self, fragment, stepList, key, hasHarvest):
405  return ('2022' in key or '2023' in key or '2024' in key or '2026' in key or 'HI' in key) and ('FS' not in key)
406 upgradeWFs['pixelTrackingOnly'] = UpgradeWorkflow_pixelTrackingOnly(
407  steps = [
408  'Reco',
409  'RecoFakeHLT',
410  'HARVEST',
411  'HARVESTFakeHLT',
412  'RecoGlobal',
413  'HARVESTGlobal',
414  'RecoNano',
415  'RecoNanoFakeHLT',
416  'HARVESTNano',
417  'HARVESTNanoFakeHLT',
418  'ALCA',
419  'ALCAPhase2'
420  ],
421  PU = [],
422  suffix = '_pixelTrackingOnly',
423  offset = 0.5,
424 )
425 upgradeWFs['pixelTrackingOnly'].step3 = {
426  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
427  '--datatier': 'GEN-SIM-RECO,DQMIO',
428  '--eventcontent': 'RECOSIM,DQM',
429 }
430 
432  def setup__(self, step, stepName, stepDict, k, properties):
433  if ('Digi' in step and 'NoHLT' not in step) or ('HLTOnly' in step): stepDict[stepName][k] = merge([self.step2, stepDict[step][k]])
434  if 'Reco' in step: stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
435  def condition_(self, fragment, stepList, key, hasHarvest):
436  return ('2017' in key or '2021' in key or '2023' in key or '2024' in key) and ('FS' not in key)
437 upgradeWFs['trackingMkFit'] = UpgradeWorkflow_trackingMkFit(
438  steps = [
439  'Digi',
440  'HLTOnly',
441  'DigiTrigger',
442  'Reco',
443  'RecoFakeHLT',
444  'RecoGlobal',
445  'RecoNano',
446  'RecoNanoFakeHLT',
447  ],
448  PU = [],
449  suffix = '_trackingMkFit',
450  offset = 0.7,
451 )
452 upgradeWFs['trackingMkFit'].step2 = {
453  '--customise': 'RecoTracker/MkFit/customizeHLTIter0ToMkFit.customizeHLTIter0ToMkFit'
454 }
455 upgradeWFs['trackingMkFit'].step3 = {
456  '--procModifiers': 'trackingMkFitDevel'
457 }
458 
459 # mkFit for phase-2 initialStep tracking
461  def setup__(self, step, stepName, stepDict, k, properties):
462  if 'Reco' in step: stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
463  def condition_(self, fragment, stepList, key, hasHarvest):
464  return ('2026' in key)
465 upgradeWFs['trackingMkFitPhase2'] = UpgradeWorkflow_trackingMkFitPhase2(
466  steps = [
467  'Reco',
468  'RecoFakeHLT',
469  'RecoGlobal',
470  'RecoNano',
471  'RecoNanoFakeHLT',
472  ],
473  PU = [],
474  suffix = '_trackingMkFitPhase2',
475  offset = 0.702,
476 )
477 upgradeWFs['trackingMkFitPhase2'].step3 = {
478  '--procModifiers': 'trackingMkFitCommon,trackingMkFitInitialStep'
479 }
480 
481 #DeepCore seeding for JetCore iteration workflow
483  def setup_(self, step, stepName, stepDict, k, properties):
484  # skip ALCA and Nano steps (but not RecoNano or HARVESTNano for Run3)
485  if 'ALCA' in step or 'Nano'==step:
486  stepDict[stepName][k] = None
487  elif 'Reco' in step or 'HARVEST' in step: stepDict[stepName][k] = merge([{'--procModifiers': 'seedingDeepCore'}, stepDict[step][k]])
488  def condition(self, fragment, stepList, key, hasHarvest):
489  result = (fragment=="QCD_Pt_1800_2400_14" or fragment=="TTbar_14TeV" ) and ('2021' in key or '2024' in key) and hasHarvest
490  return result
491 upgradeWFs['seedingDeepCore'] = UpgradeWorkflow_seedingDeepCore(
492  steps = [
493  'Reco',
494  'RecoFakeHLT',
495  'HARVEST',
496  'HARVESTFakeHLT',
497  'RecoGlobal',
498  'HARVESTGlobal',
499  'RecoNano',
500  'RecoNanoFakeHLT',
501  'HARVESTNano',
502  'HARVESTNanoFakeHLT',
503  'Nano',
504  'ALCA',
505  ],
506  PU = [
507  'Reco',
508  'RecoFakeHLT',
509  'RecoGlobal',
510  'HARVESTGlobal',
511  'RecoNano',
512  'RecoNanoFakeHLT',
513  'HARVESTNano',
514  'HARVESTNanoFakeHLT',
515  ],
516  suffix = '_seedingDeepCore',
517  offset = 0.17,
518 )
519 
520 #Workflow to enable displacedRegionalStep tracking iteration
522  def setup__(self, step, stepName, stepDict, k, properties):
523  if 'Reco' in step: stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
524  def condition_(self, fragment, stepList, key, hasHarvest):
525  return ('2021' in key or '2023' in key or '2024' in key)
526 upgradeWFs['displacedRegional'] = UpgradeWorkflow_displacedRegional(
527  steps = [
528  'Reco',
529  'RecoFakeHLT',
530  'RecoGlobal',
531  'RecoNano',
532  'RecoNanoFakeHLT',
533  ],
534  PU = [],
535  suffix = '_displacedRegional',
536  offset = 0.701,
537 )
538 upgradeWFs['displacedRegional'].step3 = {
539  '--procModifiers': 'displacedRegionalTracking'
540 }
541 
542 # Vector Hits workflows
544  def setup_(self, step, stepName, stepDict, k, properties):
545  stepDict[stepName][k] = merge([{'--procModifiers': 'vectorHits'}, stepDict[step][k]])
546  def condition(self, fragment, stepList, key, hasHarvest):
547  return (fragment=="TTbar_14TeV" or fragment=="SingleMuPt10Extended") and '2026' in key
548 upgradeWFs['vectorHits'] = UpgradeWorkflow_vectorHits(
549  steps = [
550  'RecoGlobal',
551  'HARVESTGlobal'
552  ],
553  PU = [
554  'RecoGlobal',
555  'HARVESTGlobal'
556  ],
557  suffix = '_vectorHits',
558  offset = 0.9,
559 )
560 
561 # WeightedMeanFitter vertexing workflows
563  def __init__(self, reco = {}, harvest = {}, **kwargs):
564  # adapt the parameters for the UpgradeWorkflow init method
565  super(UpgradeWorkflow_weightedVertex, self).__init__(
566  steps = [
567  'Reco',
568  'RecoFakeHLT',
569  'HARVEST',
570  'HARVESTFakeHLT',
571  'RecoGlobal',
572  'HARVESTGlobal',
573  'RecoNano',
574  'RecoNanoFakeHLT',
575  'HARVESTNano',
576  'HARVESTNanoFakeHLT',
577  ],
578  PU = [
579  'Reco',
580  'RecoFakeHLT',
581  'HARVEST',
582  'HARVESTFakeHLT',
583  'RecoGlobal',
584  'HARVESTGlobal',
585  'RecoNano',
586  'RecoNanoFakeHLT',
587  'HARVESTNano',
588  'HARVESTNanoFakeHLT',
589  ],
590  **kwargs)
591  self.__reco = reco
592  self.__harvest = harvest
593 
594  def setup_(self, step, stepName, stepDict, k, properties):
595  # temporarily remove trigger & downstream steps
596  if 'Reco' in step:
597  mod = {'--procModifiers': 'weightedVertexing,vertexInBlocks', '--datatier':'GEN-SIM-RECO,DQMIO',
598  '--eventcontent':'RECOSIM,DQM'}
599  stepDict[stepName][k] = merge([mod,self.step3, stepDict[step][k]])
600  if 'HARVEST' in step:
601  stepDict[stepName][k] = merge([self.step4,stepDict[step][k]])
602 
603  def condition(self, fragment, stepList, key, hasHarvest):
604  # select only a subset of the workflows
605  selected = [
606  ('2021' in key and fragment == "TTbar_14TeV" and 'FS' not in key),
607  ('2024' in key and fragment == "TTbar_14TeV"),
608  ('2026' in key and fragment == "TTbar_14TeV")
609  ]
610  result = any(selected) and hasHarvest
611 
612  return result
613 
614 
615 upgradeWFs['weightedVertex'] = UpgradeWorkflow_weightedVertex(
616  suffix = '_weightedVertex',
617  offset = 0.278,
618 )
619 
620 upgradeWFs['weightedVertex'].step3 = {}
621 upgradeWFs['weightedVertex'].step4 = {}
622 
623 upgradeWFs['weightedVertexTrackingOnly'] = UpgradeWorkflow_weightedVertex(
624  suffix = '_weightedVertexTrackingOnly',
625  offset = 0.279,
626 )
627 
628 upgradeWFs['weightedVertexTrackingOnly'].step3 = {
629  '-s': 'RAW2DIGI,RECO:reconstruction_trackingOnly,VALIDATION:@trackingOnlyValidation,DQM:@trackingOnlyDQM',
630  '--datatier':'GEN-SIM-RECO,DQMIO',
631  '--eventcontent':'RECOSIM,DQM',
632 }
633 
634 upgradeWFs['weightedVertexTrackingOnly'].step4 = {
635  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'
636 }
637 
638 # Special TICL Pattern recognition Workflows
640  def setup_(self, step, stepName, stepDict, k, properties):
641  if 'RecoGlobal' in step:
642  stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
643  if 'HARVESTGlobal' in step:
644  stepDict[stepName][k] = merge([self.step4, stepDict[step][k]])
645  def condition(self, fragment, stepList, key, hasHarvest):
646  return (fragment=="TTbar_14TeV" or 'CloseByPGun_CE' in fragment) and '2026' in key
647 upgradeWFs['ticl_clue3D'] = UpgradeWorkflow_ticl_clue3D(
648  steps = [
649  'RecoGlobal',
650  'HARVESTGlobal'
651  ],
652  PU = [
653  'RecoGlobal',
654  'HARVESTGlobal'
655  ],
656  suffix = '_ticl_clue3D',
657  offset = 0.201,
658 )
659 upgradeWFs['ticl_clue3D'].step3 = {'--procModifiers': 'clue3D'}
660 upgradeWFs['ticl_clue3D'].step4 = {'--procModifiers': 'clue3D'}
661 
663  def setup_(self, step, stepName, stepDict, k, properties):
664  if 'RecoGlobal' in step:
665  stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
666  if 'HARVESTGlobal' in step:
667  stepDict[stepName][k] = merge([self.step4, stepDict[step][k]])
668  def condition(self, fragment, stepList, key, hasHarvest):
669  return (fragment=="TTbar_14TeV" or 'CloseByPGun_CE' in fragment) and '2026' in key
670 upgradeWFs['ticl_FastJet'] = UpgradeWorkflow_ticl_FastJet(
671  steps = [
672  'RecoGlobal',
673  'HARVESTGlobal'
674  ],
675  PU = [
676  'RecoGlobal',
677  'HARVESTGlobal'
678  ],
679  suffix = '_ticl_FastJet',
680  offset = 0.202,
681 )
682 upgradeWFs['ticl_FastJet'].step3 = {'--procModifiers': 'fastJetTICL'}
683 upgradeWFs['ticl_FastJet'].step4 = {'--procModifiers': 'fastJetTICL'}
684 
686  def setup_(self, step, stepName, stepDict, k, properties):
687  if ('Digi' in step and 'NoHLT' not in step) or ('HLTOnly' in step):
688  stepDict[stepName][k] = merge([self.step2, stepDict[step][k]])
689  if 'RecoGlobal' in step:
690  stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
691  if 'HARVESTGlobal' in step:
692  stepDict[stepName][k] = merge([self.step4, stepDict[step][k]])
693  def condition(self, fragment, stepList, key, hasHarvest):
694  return (fragment=="TTbar_14TeV" or 'CloseByP' in fragment or 'Eta1p7_2p7' in fragment) and '2026' in key
695 
696 upgradeWFs['ticl_v5'] = UpgradeWorkflow_ticl_v5(
697  steps = [
698  'HLTOnly',
699  'DigiTrigger',
700  'RecoGlobal',
701  'HARVESTGlobal'
702  ],
703  PU = [
704  'HLTOnly',
705  'DigiTrigger',
706  'RecoGlobal',
707  'HARVESTGlobal'
708  ],
709  suffix = '_ticl_v5',
710  offset = 0.203,
711 )
712 upgradeWFs['ticl_v5'].step2 = {'--procModifiers': 'ticl_v5'}
713 upgradeWFs['ticl_v5'].step3 = {'--procModifiers': 'ticl_v5'}
714 upgradeWFs['ticl_v5'].step4 = {'--procModifiers': 'ticl_v5'}
715 
717  def setup_(self, step, stepName, stepDict, k, properties):
718  if 'RecoGlobal' in step:
719  stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
720  if 'HARVESTGlobal' in step:
721  stepDict[stepName][k] = merge([self.step4, stepDict[step][k]])
722  def condition(self, fragment, stepList, key, hasHarvest):
723  return (fragment=="ZEE_14" or 'Eta1p7_2p7' in fragment) and '2026' in key
724 upgradeWFs['ticl_v5_superclustering_mustache_ticl'] = UpgradeWorkflow_ticl_v5_superclustering(
725  steps = [
726  'RecoGlobal',
727  'HARVESTGlobal'
728  ],
729  PU = [
730  'RecoGlobal',
731  'HARVESTGlobal'
732  ],
733  suffix = '_ticl_v5_mustache',
734  offset = 0.204,
735 )
736 upgradeWFs['ticl_v5_superclustering_mustache_ticl'].step3 = {'--procModifiers': 'ticl_v5,ticl_superclustering_mustache_ticl'}
737 upgradeWFs['ticl_v5_superclustering_mustache_ticl'].step4 = {'--procModifiers': 'ticl_v5,ticl_superclustering_mustache_ticl'}
738 
739 upgradeWFs['ticl_v5_superclustering_mustache_pf'] = UpgradeWorkflow_ticl_v5_superclustering(
740  steps = [
741  'RecoGlobal',
742  'HARVESTGlobal'
743  ],
744  PU = [
745  'RecoGlobal',
746  'HARVESTGlobal'
747  ],
748  suffix = '_ticl_v5_mustache_pf',
749  offset = 0.205,
750 )
751 upgradeWFs['ticl_v5_superclustering_mustache_pf'].step3 = {'--procModifiers': 'ticl_v5,ticl_superclustering_mustache_pf'}
752 upgradeWFs['ticl_v5_superclustering_mustache_pf'].step4 = {'--procModifiers': 'ticl_v5,ticl_superclustering_mustache_pf'}
753 
754 # Track DNN workflows
756  def setup_(self, step, stepName, stepDict, k, properties):
757  stepDict[stepName][k] = merge([{'--procModifiers': 'trackdnn'}, stepDict[step][k]])
758 
759  def condition(self, fragment, stepList, key, hasHarvest):
760  return fragment=="TTbar_14TeV" and '2021' in key
761 upgradeWFs['trackdnn'] = UpgradeWorkflow_trackdnn(
762  steps = [
763  'Reco',
764  'RecoFakeHLT',
765  'RecoNano',
766  'RecoNanoFakeHLT',
767  ],
768  PU = [
769  'Reco',
770  'RecoFakeHLT',
771  'RecoNano',
772  'RecoNanoFakeHLT',
773  ],
774  suffix = '_trackdnn',
775  offset = 0.91,
776 )
777 
778 
779 # MLPF workflows
781  def setup_(self, step, stepName, stepDict, k, properties):
782  if 'Reco' in step:
783  stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
784  def condition(self, fragment, stepList, key, hasHarvest):
785  return (fragment=="TTbar_14TeV" or fragment=="QCD_FlatPt_15_3000HS_14") and '2021PU' in key
786 
787 upgradeWFs['mlpf'] = UpgradeWorkflow_mlpf(
788  steps = [
789  'Reco',
790  'RecoFakeHLT',
791  'RecoNano',
792  'RecoNanoFakeHLT',
793  ],
794  PU = [
795  'Reco',
796  'RecoFakeHLT',
797  'RecoNano',
798  'RecoNanoFakeHLT',
799  ],
800  suffix = '_mlpf',
801  offset = 0.13,
802 )
803 upgradeWFs['mlpf'].step3 = {
804  '--datatier': 'GEN-SIM-RECO,RECOSIM,MINIAODSIM,NANOAODSIM,DQMIO',
805  '--eventcontent': 'FEVTDEBUGHLT,RECOSIM,MINIAODSIM,NANOEDMAODSIM,DQM',
806  '--procModifiers': 'mlpf'
807 }
808 
809 
810 # ECAL DeepSC clustering studies workflow
812  def setup_(self, step, stepName, stepDict, k, properties):
813  if 'Reco' in step:
814  stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
815  def condition(self, fragment, stepList, key, hasHarvest):
816  return (fragment=="ZEE_14" or fragment=="TTbar_14TeV" or fragment=="WprimeTolNu_M3000_13TeV_pythia8"
817  or fragment=="DisplacedSUSY_stopToBottom_M_300_1000mm_13" or fragment=="RunEGamma2018D" )
818 
819 upgradeWFs['ecalDeepSC'] = UpgradeWorkflow_ecalclustering(
820  steps = [
821  'Reco',
822  'RecoFakeHLT',
823  'RecoNano',
824  'RecoNanoFakeHLT',
825  ],
826  PU = [
827  'Reco',
828  'RecoFakeHLT',
829  'RecoNano',
830  'RecoNanoFakeHLT',
831  ],
832  suffix = '_ecalDeepSC',
833  offset = 0.19,
834 )
835 upgradeWFs['ecalDeepSC'].step3 = {
836  '--datatier': 'RECOSIM,MINIAODSIM,NANOAODSIM,DQMIO',
837  '--eventcontent': 'RECOSIM,MINIAODSIM,NANOEDMAODSIM,DQM',
838  '--procModifiers': 'ecal_deepsc'
839 }
840 
841 
842 # photonDRN workflows
844  def setup_(self, step, stepName, stepDict, k, properties):
845  if 'Reco' in step:
846  stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
847  def condition(self, fragment, stepList, key, hasHarvest):
848  return '2018' in key and "SingleGamma" in fragment
849 
850 upgradeWFs['photonDRN'] = UpgradeWorkflow_photonDRN(
851  steps = [
852  'RecoFakeHLT',
853  'RecoNanoFakeHLT',
854  ],
855  PU = [
856  'RecoFakeHLT',
857  'RecoNanoFakeHLT',
858  ],
859  suffix = '_photonDRN',
860  offset = 0.31,
861 )
862 upgradeWFs['photonDRN'].step3 = {
863  '--procModifiers': 'enableSonicTriton,photonDRN'
864 }
865 
866 
867 # Patatrack workflows (NoPU and PU):
868 # - TTbar_14, ZMM_14", ZEE_14, ZTT_14, NuGun, SingleMu, QCD_Pt15To7000_Flat for
869 # > 2021, 2022, 2023, 2024 and 2026 conditions, TTbar
870 # - Hydjet for HI conditions
872  def __init__(self, digi = {}, reco = {}, mini = {}, harvest = {}, **kwargs):
873  # adapt the parameters for the UpgradeWorkflow init method
874  super(PatatrackWorkflow, self).__init__(
875  steps = [
876  'Digi',
877  'HLTOnly',
878  'DigiTrigger',
879  'Reco',
880  'RecoFakeHLT',
881  'HARVEST',
882  'HARVESTFakeHLT',
883  'RecoGlobal',
884  'HARVESTGlobal',
885  'RecoNano',
886  'RecoNanoFakeHLT',
887  'HARVESTNano',
888  'HARVESTNanoFakeHLT',
889  'MiniAOD',
890  'Nano',
891  'ALCA',
892  'ALCAPhase2'
893  ],
894  PU = [
895  'Digi',
896  'HLTOnly',
897  'DigiTrigger',
898  'Reco',
899  'RecoFakeHLT',
900  'HARVEST',
901  'HARVESTFakeHLT',
902  'RecoGlobal',
903  'HARVESTGlobal',
904  'RecoNano',
905  'RecoNanoFakeHLT',
906  'HARVESTNano',
907  'HARVESTNanoFakeHLT',
908  'MiniAOD',
909  'Nano',
910  'ALCA',
911  'ALCAPhase2'
912  ],
913  **kwargs)
914  self.__digi = digi
915  self.__reco = reco
916  if 'DQM' in self.__reco:
917  self.__reco.update({
918  '--datatier': 'GEN-SIM-RECO,DQMIO',
919  '--eventcontent': 'RECOSIM,DQM'
920  })
921  self.__mini = mini
922  self.__harvest = harvest
923 
924  def condition(self, fragment, stepList, key, hasHarvest):
925  # select only a subset of the workflows
926  years = ['2021','2023','2024','2026']
927  fragments = ["TTbar_14","ZMM_14","ZEE_14","ZTT_14","NuGun","SingleMu","QCD_Pt15To7000_Flat"]
928  selected = [
929  (any(y in key for y in years) and ('FS' not in key) and any( f in fragment for f in fragments)),
930  (('HI' in key) and ('Hydjet' in fragment) and ("PixelOnly" in self.suffix) )
931  ]
932  result = any(selected) and hasHarvest
933 
934  return result
935 
936  def setup_(self, step, stepName, stepDict, k, properties):
937  # skip ALCA and Nano steps (but not RecoNano or HARVESTNano for Run3)
938  if 'ALCA' in step or 'Nano'==step:
939  stepDict[stepName][k] = None
940  elif ('Digi' in step and "NoHLT" not in step) or 'HLTOnly' in step:
941  if self.__digi is None:
942  stepDict[stepName][k] = None
943  else:
944  stepDict[stepName][k] = merge([self.__digi, stepDict[step][k]])
945  elif 'Reco' in step:
946  if self.__reco is None:
947  stepDict[stepName][k] = None
948  else:
949  stepDict[stepName][k] = merge([self.__reco, stepDict[step][k]])
950  if 'Phase2' in stepDict[stepName][k]['--era']:
951  if 'DQM:@standardDQM+@ExtraHLT' in stepDict[stepName][k]['-s']:
952  stepDict[stepName][k]['-s'] = stepDict[stepName][k]['-s'].replace('DQM:@standardDQM+@ExtraHLT','DQM:@phase2')
953  if 'VALIDATION:@standardValidation' in stepDict[stepName][k]['-s']:
954  stepDict[stepName][k]['-s'] = stepDict[stepName][k]['-s'].replace('VALIDATION:@standardValidation','VALIDATION:@phase2Validation')
955 
956 
957  elif 'MiniAOD' in step:
958  if self.__mini is None:
959  stepDict[stepName][k] = None
960  else:
961  stepDict[stepName][k] = merge([self.__mini, stepDict[step][k]])
962  elif 'HARVEST' in step:
963  if self.__harvest is None:
964  stepDict[stepName][k] = None
965  else:
966  stepDict[stepName][k] = merge([self.__harvest, stepDict[step][k]])
967 
968 # Pixel-only quadruplets workflow running on CPU
969 # - HLT on CPU
970 # - Pixel-only reconstruction on CPU, with DQM and validation
971 # - harvesting
972 
973 upgradeWFs['PatatrackPixelOnlyCPU'] = PatatrackWorkflow(
974  digi = {
975  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
976  },
977  reco = {
978  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
979  '--procModifiers': 'pixelNtupletFit'
980  },
981  harvest = {
982  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'
983  },
984  suffix = 'Patatrack_PixelOnlyCPU',
985  offset = 0.501,
986 )
987 
988 # Pixel-only quadruplets workflow running on CPU or GPU
989 # - HLT on GPU (optional)
990 # - Pixel-only reconstruction on GPU (optional), with DQM and validation
991 # - harvesting
992 upgradeWFs['PatatrackPixelOnlyGPU'] = PatatrackWorkflow(
993  digi = {
994  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
995  '--procModifiers': 'gpu'
996  },
997  reco = {
998  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
999  '--procModifiers': 'pixelNtupletFit,gpu'
1000  },
1001  harvest = {
1002  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'
1003  },
1004  suffix = 'Patatrack_PixelOnlyGPU',
1005  offset = 0.502,
1006 )
1007 
1008 # Pixel-only quadruplets workflow running on CPU and GPU
1009 # - HLT on GPU (required)
1010 # - Pixel-only reconstruction on both CPU and GPU, with DQM and validation for GPU-vs-CPU comparisons
1011 # - harvesting
1012 upgradeWFs['PatatrackPixelOnlyGPUValidation'] = PatatrackWorkflow(
1013  digi = {
1014  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1015  '--accelerators': 'gpu-nvidia',
1016  '--procModifiers': 'gpu'
1017  },
1018  reco = {
1019  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
1020  '--accelerators': 'gpu-nvidia',
1021  '--procModifiers': 'pixelNtupletFit,gpuValidation'
1022  },
1023  harvest = {
1024  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM',
1025  '--procModifiers': 'gpuValidation'
1026  },
1027  suffix = 'Patatrack_PixelOnlyGPU_Validation',
1028  offset = 0.503,
1029 )
1030 
1031 # Pixel-only quadruplets workflow running on CPU or GPU, trimmed down for benchmarking
1032 # - HLT on GPU (optional)
1033 # - Pixel-only reconstruction on GPU (optional)
1034 upgradeWFs['PatatrackPixelOnlyGPUProfiling'] = PatatrackWorkflow(
1035  digi = {
1036  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1037  '--procModifiers': 'gpu'
1038  },
1039  reco = {
1040  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly',
1041  '--procModifiers': 'pixelNtupletFit,gpu',
1042  '--customise' : 'RecoTracker/Configuration/customizePixelOnlyForProfiling.customizePixelOnlyForProfilingGPUOnly'
1043  },
1044  harvest = None,
1045  suffix = 'Patatrack_PixelOnlyGPU_Profiling',
1046  offset = 0.504,
1047 )
1048 
1049 # Pixel-only triplets workflow running on CPU
1050 # - HLT on CPU
1051 # - Pixel-only reconstruction on CPU, with DQM and validation
1052 # - harvesting
1053 upgradeWFs['PatatrackPixelOnlyTripletsCPU'] = PatatrackWorkflow(
1054  digi = {
1055  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1056  },
1057  reco = {
1058  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
1059  '--procModifiers': 'pixelNtupletFit',
1060  '--customise' : 'RecoTracker/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets'
1061  },
1062  harvest = {
1063  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'
1064  },
1065  suffix = 'Patatrack_PixelOnlyTripletsCPU',
1066  offset = 0.505,
1067 )
1068 
1069 # Pixel-only triplets workflow running on CPU or GPU
1070 # - HLT on GPU (optional)
1071 # - Pixel-only reconstruction on GPU (optional), with DQM and validation
1072 # - harvesting
1073 upgradeWFs['PatatrackPixelOnlyTripletsGPU'] = PatatrackWorkflow(
1074  digi = {
1075  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1076  '--procModifiers': 'gpu'
1077  },
1078  reco = {
1079  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
1080  '--procModifiers': 'pixelNtupletFit,gpu',
1081  '--customise': 'RecoTracker/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets'
1082  },
1083  harvest = {
1084  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'
1085  },
1086  suffix = 'Patatrack_PixelOnlyTripletsGPU',
1087  offset = 0.506,
1088 )
1089 
1090 # Pixel-only triplets workflow running on CPU and GPU
1091 # - HLT on GPU (required)
1092 # - Pixel-only reconstruction on both CPU and GPU, with DQM and validation for GPU-vs-CPU comparisons
1093 # - harvesting
1094 upgradeWFs['PatatrackPixelOnlyTripletsGPUValidation'] = PatatrackWorkflow(
1095  digi = {
1096  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1097  '--accelerators': 'gpu-nvidia',
1098  '--procModifiers': 'gpu'
1099  },
1100  reco = {
1101  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
1102  '--accelerators': 'gpu-nvidia',
1103  '--procModifiers': 'pixelNtupletFit,gpuValidation',
1104  '--customise': 'RecoTracker/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets'
1105  },
1106  harvest = {
1107  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM',
1108  '--procModifiers': 'gpuValidation',
1109  },
1110  suffix = 'Patatrack_PixelOnlyTripletsGPU_Validation',
1111  offset = 0.507,
1112 )
1113 
1114 # Pixel-only triplets workflow running on CPU or GPU, trimmed down for benchmarking
1115 # - HLT on GPU (optional)
1116 # - Pixel-only reconstruction on GPU (optional)
1117 upgradeWFs['PatatrackPixelOnlyTripletsGPUProfiling'] = PatatrackWorkflow(
1118  digi = {
1119  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1120  '--procModifiers': 'gpu'
1121  },
1122  reco = {
1123  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly',
1124  '--procModifiers': 'pixelNtupletFit,gpu',
1125  '--customise': 'RecoTracker/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets,RecoTracker/Configuration/customizePixelOnlyForProfiling.customizePixelOnlyForProfilingGPUOnly'
1126  },
1127  harvest = None,
1128  suffix = 'Patatrack_PixelOnlyTripletsGPU_Profiling',
1129  offset = 0.508,
1130 )
1131 
1132 # ECAL-only workflow running on CPU or GPU with Alpaka code
1133 # - HLT with Alpaka
1134 # - ECAL-only reconstruction with Alpaka, with DQM and validation
1135 # - harvesting
1136 upgradeWFs['PatatrackECALOnlyAlpaka'] = PatatrackWorkflow(
1137  digi = {
1138  # customize the ECAL Local Reco part of the HLT menu for Alpaka
1139  '--procModifiers': 'alpaka',
1140  '--customise' : 'HeterogeneousCore/AlpakaServices/customiseAlpakaServiceMemoryFilling.customiseAlpakaServiceMemoryFilling',
1141  },
1142  reco = {
1143  '-s': 'RAW2DIGI:RawToDigi_ecalOnly,RECO:reconstruction_ecalOnly,VALIDATION:@ecalOnlyValidation,DQM:@ecalOnly',
1144  '--procModifiers': 'alpaka',
1145  '--customise' : 'HeterogeneousCore/AlpakaServices/customiseAlpakaServiceMemoryFilling.customiseAlpakaServiceMemoryFilling',
1146  },
1147  harvest = {
1148  '-s': 'HARVESTING:@ecalOnlyValidation+@ecal'
1149  },
1150  suffix = 'Patatrack_ECALOnlyAlpaka',
1151  offset = 0.412,
1152 )
1153 
1154 # ECAL-only workflow running on CPU
1155 # - HLT on CPU
1156 # - ECAL-only reconstruction on CPU, with DQM and validation
1157 # - harvesting
1158 upgradeWFs['PatatrackECALOnlyCPU'] = PatatrackWorkflow(
1159  digi = {
1160  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1161  },
1162  reco = {
1163  '-s': 'RAW2DIGI:RawToDigi_ecalOnly,RECO:reconstruction_ecalOnly,VALIDATION:@ecalOnlyValidation,DQM:@ecalOnly',
1164  },
1165  harvest = {
1166  '-s': 'HARVESTING:@ecalOnlyValidation+@ecal'
1167  },
1168  suffix = 'Patatrack_ECALOnlyCPU',
1169  offset = 0.511,
1170 )
1171 
1172 # ECAL-only workflow running on CPU or GPU
1173 # - HLT on GPU (optional)
1174 # - ECAL-only reconstruction on GPU (optional), with DQM and validation
1175 # - harvesting
1176 upgradeWFs['PatatrackECALOnlyGPU'] = PatatrackWorkflow(
1177  digi = {
1178  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1179  '--procModifiers': 'gpu'
1180  },
1181  reco = {
1182  '-s': 'RAW2DIGI:RawToDigi_ecalOnly,RECO:reconstruction_ecalOnly,VALIDATION:@ecalOnlyValidation,DQM:@ecalOnly',
1183  '--procModifiers': 'gpu'
1184  },
1185  harvest = {
1186  '-s': 'HARVESTING:@ecalOnlyValidation+@ecal'
1187  },
1188  suffix = 'Patatrack_ECALOnlyGPU',
1189  offset = 0.512,
1190 )
1191 
1192 # ECAL-only workflow running on CPU and GPU
1193 # - HLT on GPU (required)
1194 # - ECAL-only reconstruction on both CPU and GPU, with DQM and validation for GPU-vs-CPU comparisons
1195 # - harvesting
1196 upgradeWFs['PatatrackECALOnlyGPUValidation'] = PatatrackWorkflow(
1197  digi = {
1198  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1199  '--accelerators': 'gpu-nvidia',
1200  '--procModifiers': 'gpu'
1201  },
1202  reco = {
1203  '-s': 'RAW2DIGI:RawToDigi_ecalOnly,RECO:reconstruction_ecalOnly,VALIDATION:@ecalOnlyValidation,DQM:@ecalOnly',
1204  '--accelerators': 'gpu-nvidia',
1205  '--procModifiers': 'gpuValidation'
1206  },
1207  harvest = {
1208  '-s': 'HARVESTING:@ecalOnlyValidation+@ecal'
1209  },
1210  suffix = 'Patatrack_ECALOnlyGPU_Validation',
1211  offset = 0.513,
1212 )
1213 
1214 # ECAL-only workflow running on CPU or GPU, trimmed down for benchmarking
1215 # - HLT on GPU (optional)
1216 # - ECAL-only reconstruction on GPU (optional)
1217 upgradeWFs['PatatrackECALOnlyGPUProfiling'] = PatatrackWorkflow(
1218  digi = {
1219  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1220  '--procModifiers': 'gpu'
1221  },
1222  reco = {
1223  '-s': 'RAW2DIGI:RawToDigi_ecalOnly,RECO:reconstruction_ecalOnly',
1224  '--procModifiers': 'gpu',
1225  '--customise' : 'RecoLocalCalo/Configuration/customizeEcalOnlyForProfiling.customizeEcalOnlyForProfilingGPUOnly'
1226  },
1227  harvest = None,
1228  suffix = 'Patatrack_ECALOnlyGPU_Profiling',
1229  offset = 0.514,
1230 )
1231 
1232 # HCAL-only workflow running on CPU
1233 # - HLT on CPU
1234 # - HCAL-only reconstruction on CPU, with DQM and validation
1235 # - harvesting
1236 upgradeWFs['PatatrackHCALOnlyCPU'] = PatatrackWorkflow(
1237  digi = {
1238  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1239  },
1240  reco = {
1241  '-s': 'RAW2DIGI:RawToDigi_hcalOnly,RECO:reconstruction_hcalOnly,VALIDATION:@hcalOnlyValidation,DQM:@hcalOnly+@hcal2Only',
1242  },
1243  harvest = {
1244  '-s': 'HARVESTING:@hcalOnlyValidation+@hcalOnly+@hcal2Only'
1245  },
1246  suffix = 'Patatrack_HCALOnlyCPU',
1247  offset = 0.521,
1248 )
1249 
1250 # HCAL-only workflow running on CPU or GPU
1251 # - HLT on GPU (optional)
1252 # - HCAL-only reconstruction on GPU (optional), with DQM and validation
1253 # - harvesting
1254 upgradeWFs['PatatrackHCALOnlyGPU'] = PatatrackWorkflow(
1255  digi = {
1256  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1257  '--procModifiers': 'gpu'
1258  },
1259  reco = {
1260  '-s': 'RAW2DIGI:RawToDigi_hcalOnly,RECO:reconstruction_hcalOnly,VALIDATION:@hcalOnlyValidation,DQM:@hcalOnly+@hcal2Only',
1261  '--procModifiers': 'gpu'
1262  },
1263  harvest = {
1264  '-s': 'HARVESTING:@hcalOnlyValidation+@hcalOnly+@hcal2Only'
1265  },
1266  suffix = 'Patatrack_HCALOnlyGPU',
1267  offset = 0.522,
1268 )
1269 
1270 # HCAL-only workflow running on CPU and GPU
1271 # - HLT on GPU (required)
1272 # - HCAL-only reconstruction on both CPU and GPU, with DQM and validation for GPU-vs-CPU comparisons
1273 # - harvesting
1274 upgradeWFs['PatatrackHCALOnlyGPUValidation'] = PatatrackWorkflow(
1275  digi = {
1276  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1277  '--accelerators': 'gpu-nvidia',
1278  '--procModifiers': 'gpu'
1279  },
1280  reco = {
1281  '-s': 'RAW2DIGI:RawToDigi_hcalOnly,RECO:reconstruction_hcalOnly,VALIDATION:@hcalOnlyValidation,DQM:@hcalOnly+@hcal2Only',
1282  '--accelerators': 'gpu-nvidia',
1283  '--procModifiers': 'gpuValidation'
1284  },
1285  harvest = {
1286  '-s': 'HARVESTING:@hcalOnlyValidation+@hcal'
1287  },
1288  suffix = 'Patatrack_HCALOnlyGPU_Validation',
1289  offset = 0.523,
1290 )
1291 
1292 # HCAL-only workflow running on CPU or GPU, trimmed down for benchmarking
1293 # - HLT on GPU (optional)
1294 # - HCAL-only reconstruction on GPU (optional)
1295 upgradeWFs['PatatrackHCALOnlyGPUProfiling'] = PatatrackWorkflow(
1296  digi = {
1297  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1298  '--procModifiers': 'gpu'
1299  },
1300  reco = {
1301  '-s': 'RAW2DIGI:RawToDigi_hcalOnly,RECO:reconstruction_hcalOnly',
1302  '--procModifiers': 'gpu',
1303  '--customise' : 'RecoLocalCalo/Configuration/customizeHcalOnlyForProfiling.customizeHcalOnlyForProfilingGPUOnly'
1304  },
1305  harvest = None,
1306  suffix = 'Patatrack_HCALOnlyGPU_Profiling',
1307  offset = 0.524,
1308 )
1309 
1310 # HCAL-PF Only workflow running HCAL local reco on GPU and PF with Alpaka with DQM and Validation
1311 # - HLT-alpaka
1312 # - HCAL-only reconstruction using Alpaka with DQM and Validation
1313 upgradeWFs['PatatrackHCALOnlyAlpakaValidation'] = PatatrackWorkflow(
1314  digi = {
1315  '--procModifiers': 'alpaka',
1316  '--customise' : 'HeterogeneousCore/AlpakaServices/customiseAlpakaServiceMemoryFilling.customiseAlpakaServiceMemoryFilling',
1317  },
1318  reco = {
1319  '-s': 'RAW2DIGI:RawToDigi_hcalOnly,RECO:reconstruction_hcalOnly,VALIDATION:@hcalOnlyValidation,DQM:@hcalOnly+@hcal2Only',
1320  '--procModifiers': 'alpaka',
1321  '--customise' : 'HeterogeneousCore/AlpakaServices/customiseAlpakaServiceMemoryFilling.customiseAlpakaServiceMemoryFilling',
1322  },
1323  harvest = {
1324  '-s': 'HARVESTING:@hcalOnlyValidation'
1325  },
1326  suffix = 'Patatrack_HCALOnlyAlpaka_Validation',
1327  offset = 0.422,
1328 )
1329 
1330 # HCAL-PF Only workflow running HCAL local reco and PF with Alpaka with cluster level-validation
1331 # - HLT-alpaka
1332 # - HCAL-only reconstruction using GPU and Alpaka with DQM and Validation for PF Alpaka vs CPU comparisons
1333 upgradeWFs['PatatrackHCALOnlyGPUandAlpakaValidation'] = PatatrackWorkflow(
1334  digi = {
1335  '--procModifiers': 'alpaka',
1336  '--customise' : 'HeterogeneousCore/AlpakaServices/customiseAlpakaServiceMemoryFilling.customiseAlpakaServiceMemoryFilling',
1337  },
1338  reco = {
1339  '-s': 'RAW2DIGI:RawToDigi_hcalOnly,RECO:reconstruction_hcalOnlyLegacy+reconstruction_hcalOnly,VALIDATION:@hcalOnlyValidation+pfClusterHBHEOnlyAlpakaComparisonSequence,DQM:@hcalOnly+@hcal2Only+hcalOnlyOfflineSourceSequenceAlpaka',
1340  '--procModifiers': 'alpaka',
1341  '--customise' : 'HeterogeneousCore/AlpakaServices/customiseAlpakaServiceMemoryFilling.customiseAlpakaServiceMemoryFilling',
1342  },
1343  harvest = {
1344  '-s': 'HARVESTING:@hcalOnlyValidation'
1345  },
1346  suffix = 'Patatrack_HCALOnlyGPUandAlpaka_Validation',
1347  offset = 0.423,
1348 )
1349 
1350 # HCAL-PF Only workflow running HCAL local reco on CPU and PF with Alpaka slimmed for benchmarking
1351 # - HLT-alpaka
1352 # - HCAL-only reconstruction using Alpaka
1353 upgradeWFs['PatatrackHCALOnlyAlpakaProfiling'] = PatatrackWorkflow(
1354  digi = {
1355  '--procModifiers': 'alpaka',
1356  },
1357  reco = {
1358  '-s': 'RAW2DIGI:RawToDigi_hcalOnly,RECO:reconstruction_hcalOnly',
1359  '--procModifiers': 'alpaka'
1360  },
1361  harvest = None,
1362  suffix = 'Patatrack_HCALOnlyAlpaka_Profiling',
1363  offset = 0.424,
1364 )
1365 
1366 # Workflow running the Pixel quadruplets, ECAL and HCAL reconstruction on GPU (optional), PF using Alpaka, together with the full offline reconstruction on CPU
1367 # - HLT on GPU (optional)
1368 # - reconstruction on Alpaka, with DQM and validation
1369 # - harvesting
1370 upgradeWFs['PatatrackFullRecoAlpaka'] = PatatrackWorkflow(
1371  digi = {
1372  '--procModifiers': 'alpaka',
1373  '--customise' : 'HeterogeneousCore/AlpakaServices/customiseAlpakaServiceMemoryFilling.customiseAlpakaServiceMemoryFilling',
1374  },
1375  reco = {
1376  # skip the @pixelTrackingOnlyValidation which cannot run together with the full reconstruction
1377  '-s': 'RAW2DIGI:RawToDigi+RawToDigi_pixelOnly,L1Reco,RECO:reconstruction+reconstruction_pixelTrackingOnly,RECOSIM,PAT,VALIDATION:@standardValidation+@miniAODValidation,DQM:@standardDQM+@ExtraHLT+@miniAODDQM+@pixelTrackingOnlyDQM',
1378  '--procModifiers': 'alpaka',
1379  '--customise' : 'HeterogeneousCore/AlpakaServices/customiseAlpakaServiceMemoryFilling.customiseAlpakaServiceMemoryFilling',
1380  },
1381  harvest = {
1382  # skip the @pixelTrackingOnlyDQM harvesting
1383  },
1384  suffix = 'Patatrack_FullRecoAlpaka',
1385  offset = 0.492,
1386 )
1387 
1388 # Workflow running the Pixel triplets, ECAL and HCAL reconstruction on GPU (optional), PF using Alpaka, together with the full offline reconstruction on CPU
1389 # - HLT on GPU (optional)
1390 # - reconstruction on Alpaka, with DQM and validation
1391 # - harvesting
1392 upgradeWFs['PatatrackFullRecoAlpaka'] = PatatrackWorkflow(
1393  digi = {
1394  '--procModifiers': 'alpaka',
1395  '--customise' : 'HeterogeneousCore/AlpakaServices/customiseAlpakaServiceMemoryFilling.customiseAlpakaServiceMemoryFilling',
1396  },
1397  reco = {
1398  # skip the @pixelTrackingOnlyValidation which cannot run together with the full reconstruction
1399  '-s': 'RAW2DIGI:RawToDigi+RawToDigi_pixelOnly,L1Reco,RECO:reconstruction+reconstruction_pixelTrackingOnly,RECOSIM,PAT,VALIDATION:@standardValidation+@miniAODValidation,DQM:@standardDQM+@ExtraHLT+@miniAODDQM+@pixelTrackingOnlyDQM',
1400  '--procModifiers': 'alpaka',
1401  '--customise' : 'RecoTracker/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets,HeterogeneousCore/AlpakaServices/customiseAlpakaServiceMemoryFilling.customiseAlpakaServiceMemoryFilling',
1402  },
1403  harvest = {
1404  # skip the @pixelTrackingOnlyDQM harvesting
1405  },
1406  suffix = 'Patatrack_FullRecoAlpakaTriplets',
1407  offset = 0.496,
1408 )
1409 
1410 # Workflow running the Pixel quadruplets, ECAL and HCAL reconstruction on CPU
1411 # - HLT on CPU
1412 # - reconstruction on CPU, with DQM and validation
1413 # - harvesting
1414 upgradeWFs['PatatrackAllCPU'] = PatatrackWorkflow(
1415  digi = {
1416  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1417  },
1418  reco = {
1419  '-s': 'RAW2DIGI:RawToDigi_pixelOnly+RawToDigi_ecalOnly+RawToDigi_hcalOnly,RECO:reconstruction_pixelTrackingOnly+reconstruction_ecalOnly+reconstruction_hcalOnly,VALIDATION:@pixelTrackingOnlyValidation+@ecalOnlyValidation+@hcalOnlyValidation,DQM:@pixelTrackingOnlyDQM+@ecalOnly+@hcalOnly+@hcal2Only',
1420  '--procModifiers': 'pixelNtupletFit'
1421  },
1422  harvest = {
1423  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM+@ecalOnlyValidation+@ecal+@hcalOnlyValidation+@hcalOnly+@hcal2Only'
1424  },
1425  suffix = 'Patatrack_AllCPU',
1426  offset = 0.581,
1427 )
1428 
1429 # Workflow running the Pixel quadruplets, ECAL and HCAL reconstruction on CPU or GPU
1430 # - HLT on GPU (optional)
1431 # - reconstruction on GPU (optional), with DQM and validation
1432 # - harvesting
1433 upgradeWFs['PatatrackAllGPU'] = PatatrackWorkflow(
1434  digi = {
1435  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1436  '--procModifiers': 'gpu'
1437  },
1438  reco = {
1439  '-s': 'RAW2DIGI:RawToDigi_pixelOnly+RawToDigi_ecalOnly+RawToDigi_hcalOnly,RECO:reconstruction_pixelTrackingOnly+reconstruction_ecalOnly+reconstruction_hcalOnly,VALIDATION:@pixelTrackingOnlyValidation+@ecalOnlyValidation+@hcalOnlyValidation,DQM:@pixelTrackingOnlyDQM+@ecalOnly+@hcalOnly+@hcal2Only',
1440  '--procModifiers': 'pixelNtupletFit,gpu'
1441  },
1442  harvest = {
1443  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM+@ecalOnlyValidation+@ecal+@hcalOnlyValidation+@hcalOnly+@hcal2Only'
1444  },
1445  suffix = 'Patatrack_AllGPU',
1446  offset = 0.582,
1447 )
1448 
1449 # Workflow running the Pixel quadruplets, ECAL and HCAL reconstruction on CPU and GPU
1450 # - HLT on GPU (required)
1451 # - reconstruction on CPU and GPU, with DQM and validation for GPU-vs-CPU comparisons
1452 # - harvesting
1453 upgradeWFs['PatatrackAllGPUValidation'] = PatatrackWorkflow(
1454  digi = {
1455  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1456  '--accelerators': 'gpu-nvidia',
1457  '--procModifiers': 'gpu'
1458  },
1459  reco = {
1460  '-s': 'RAW2DIGI:RawToDigi_pixelOnly+RawToDigi_ecalOnly+RawToDigi_hcalOnly,RECO:reconstruction_pixelTrackingOnly+reconstruction_ecalOnly+reconstruction_hcalOnly,VALIDATION:@pixelTrackingOnlyValidation+@ecalOnlyValidation+@hcalOnlyValidation,DQM:@pixelTrackingOnlyDQM+@ecalOnly+@hcalOnly+@hcal2Only',
1461  '--accelerators': 'gpu-nvidia',
1462  '--procModifiers': 'pixelNtupletFit,gpuValidation'
1463  },
1464  harvest = {
1465  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM+@ecalOnlyValidation+@ecal+@hcalOnlyValidation+@hcalOnly+@hcal2Only',
1466  '--procModifiers': 'gpuValidation'
1467  },
1468  suffix = 'Patatrack_AllGPU_Validation',
1469  offset = 0.583,
1470 )
1471 
1472 # Workflow running the Pixel quadruplets, ECAL and HCAL reconstruction on CPU or GPU, trimmed down for benchmarking
1473 # - HLT on GPU (optional)
1474 # - minimal reconstruction on GPU (optional)
1475 # FIXME workflow 0.584 to be implemented
1476 
1477 # Workflow running the Pixel triplets, ECAL and HCAL reconstruction on CPU
1478 # - HLT on CPU
1479 # - reconstruction on CPU, with DQM and validation
1480 # - harvesting
1481 upgradeWFs['PatatrackAllTripletsCPU'] = PatatrackWorkflow(
1482  digi = {
1483  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1484  },
1485  reco = {
1486  '-s': 'RAW2DIGI:RawToDigi_pixelOnly+RawToDigi_ecalOnly+RawToDigi_hcalOnly,RECO:reconstruction_pixelTrackingOnly+reconstruction_ecalOnly+reconstruction_hcalOnly,VALIDATION:@pixelTrackingOnlyValidation+@ecalOnlyValidation+@hcalOnlyValidation,DQM:@pixelTrackingOnlyDQM+@ecalOnly+@hcalOnly+@hcal2Only',
1487  '--procModifiers': 'pixelNtupletFit'
1488  },
1489  harvest = {
1490  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM+@ecalOnlyValidation+@ecal+@hcalOnlyValidation+@hcalOnly+@hcal2Only'
1491  },
1492  suffix = 'Patatrack_AllTripletsCPU',
1493  offset = 0.585,
1494 )
1495 
1496 # Workflow running the Pixel triplets, ECAL and HCAL reconstruction on CPU or GPU
1497 # - HLT on GPU (optional)
1498 # - reconstruction on GPU (optional), with DQM and validation
1499 # - harvesting
1500 upgradeWFs['PatatrackAllTripletsGPU'] = PatatrackWorkflow(
1501  digi = {
1502  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1503  '--procModifiers': 'gpu'
1504  },
1505  reco = {
1506  '-s': 'RAW2DIGI:RawToDigi_pixelOnly+RawToDigi_ecalOnly+RawToDigi_hcalOnly,RECO:reconstruction_pixelTrackingOnly+reconstruction_ecalOnly+reconstruction_hcalOnly,VALIDATION:@pixelTrackingOnlyValidation+@ecalOnlyValidation+@hcalOnlyValidation,DQM:@pixelTrackingOnlyDQM+@ecalOnly+@hcalOnly+@hcal2Only',
1507  '--procModifiers': 'pixelNtupletFit,gpu'
1508  },
1509  harvest = {
1510  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM+@ecalOnlyValidation+@ecal+@hcalOnlyValidation+@hcalOnly+@hcal2Only'
1511  },
1512  suffix = 'Patatrack_AllTripletsGPU',
1513  offset = 0.586,
1514 )
1515 
1516 # Workflow running the Pixel triplets, ECAL and HCAL reconstruction on CPU and GPU
1517 # - HLT on GPU (required)
1518 # - reconstruction on CPU and GPU, with DQM and validation for GPU-vs-CPU comparisons
1519 # - harvesting
1520 upgradeWFs['PatatrackAllTripletsGPUValidation'] = PatatrackWorkflow(
1521  digi = {
1522  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1523  '--accelerators': 'gpu-nvidia',
1524  '--procModifiers': 'gpu'
1525  },
1526  reco = {
1527  '-s': 'RAW2DIGI:RawToDigi_pixelOnly+RawToDigi_ecalOnly+RawToDigi_hcalOnly,RECO:reconstruction_pixelTrackingOnly+reconstruction_ecalOnly+reconstruction_hcalOnly,VALIDATION:@pixelTrackingOnlyValidation+@ecalOnlyValidation+@hcalOnlyValidation,DQM:@pixelTrackingOnlyDQM+@ecalOnly+@hcalOnly+@hcal2Only',
1528  '--accelerators': 'gpu-nvidia',
1529  '--procModifiers': 'pixelNtupletFit,gpuValidation'
1530  },
1531  harvest = {
1532  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM+@ecalOnlyValidation+@ecal+@hcalOnlyValidation+@hcalOnly+@hcal2Only',
1533  '--procModifiers': 'gpuValidation'
1534  },
1535  suffix = 'Patatrack_AllTripletsGPU_Validation',
1536  offset = 0.587,
1537 )
1538 
1539 # Workflow running the Pixel triplets, ECAL and HCAL reconstruction on CPU or GPU, trimmed down for benchmarking
1540 # - HLT on GPU (optional)
1541 # - minimal reconstruction on GPU (optional)
1542 # FIXME workflow 0.588 to be implemented
1543 
1544 # Workflow running the Pixel quadruplets, ECAL and HCAL reconstruction on CPU, together with the full offline reconstruction
1545 # - HLT on CPU
1546 # - reconstruction on CPU, with DQM and validation
1547 # - harvesting
1548 upgradeWFs['PatatrackFullRecoCPU'] = PatatrackWorkflow(
1549  digi = {
1550  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1551  },
1552  reco = {
1553  # skip the @pixelTrackingOnlyValidation which cannot run together with the full reconstruction
1554  '-s': 'RAW2DIGI:RawToDigi+RawToDigi_pixelOnly,L1Reco,RECO:reconstruction+reconstruction_pixelTrackingOnly,RECOSIM,PAT,VALIDATION:@standardValidation+@miniAODValidation,DQM:@standardDQM+@ExtraHLT+@miniAODDQM+@pixelTrackingOnlyDQM',
1555  '--procModifiers': 'pixelNtupletFit'
1556  },
1557  harvest = {
1558  # skip the @pixelTrackingOnlyDQM harvesting
1559  },
1560  suffix = 'Patatrack_FullRecoCPU',
1561  offset = 0.591,
1562 )
1563 
1564 # Workflow running the Pixel quadruplets, ECAL and HCAL reconstruction on GPU (optional), together with the full offline reconstruction on CPU
1565 # - HLT on GPU (optional)
1566 # - reconstruction on GPU (optional), with DQM and validation
1567 # - harvesting
1568 upgradeWFs['PatatrackFullRecoGPU'] = PatatrackWorkflow(
1569  digi = {
1570  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1571  '--procModifiers': 'gpu'
1572  },
1573  reco = {
1574  # skip the @pixelTrackingOnlyValidation which cannot run together with the full reconstruction
1575  '-s': 'RAW2DIGI:RawToDigi+RawToDigi_pixelOnly,L1Reco,RECO:reconstruction+reconstruction_pixelTrackingOnly,RECOSIM,PAT,VALIDATION:@standardValidation+@miniAODValidation,DQM:@standardDQM+@ExtraHLT+@miniAODDQM+@pixelTrackingOnlyDQM',
1576  '--procModifiers': 'pixelNtupletFit,gpu'
1577  },
1578  harvest = {
1579  # skip the @pixelTrackingOnlyDQM harvesting
1580  },
1581  suffix = 'Patatrack_FullRecoGPU',
1582  offset = 0.592,
1583 )
1584 
1585 # Workflow running the Pixel quadruplets, ECAL and HCAL reconstruction on CPU and GPU, together with the full offline reconstruction on CPU
1586 # - HLT on GPU (required)
1587 # - reconstruction on CPU and GPU, with DQM and validation for GPU-vs-CPU comparisons
1588 # - harvesting
1589 upgradeWFs['PatatrackFullRecoGPUValidation'] = PatatrackWorkflow(
1590  digi = {
1591  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1592  '--accelerators': 'gpu-nvidia',
1593  '--procModifiers': 'gpu'
1594  },
1595  reco = {
1596  # skip the @pixelTrackingOnlyValidation which cannot run together with the full reconstruction
1597  '-s': 'RAW2DIGI:RawToDigi+RawToDigi_pixelOnly,L1Reco,RECO:reconstruction+reconstruction_pixelTrackingOnly,RECOSIM,PAT,VALIDATION:@standardValidation+@miniAODValidation,DQM:@standardDQM+@ExtraHLT+@miniAODDQM+@pixelTrackingOnlyDQM',
1598  '--accelerators': 'gpu-nvidia',
1599  '--procModifiers': 'pixelNtupletFit,gpuValidation'
1600  },
1601  harvest = {
1602  # skip the @pixelTrackingOnlyDQM harvesting
1603  },
1604  suffix = 'Patatrack_FullRecoGPU_Validation',
1605  offset = 0.593,
1606 )
1607 
1608 # Workflow running the Pixel triplets, ECAL and HCAL reconstruction on CPU, together with the full offline reconstruction
1609 # - HLT on CPU
1610 # - reconstruction on CPU, with DQM and validation
1611 # - harvesting
1612 upgradeWFs['PatatrackFullRecoTripletsCPU'] = PatatrackWorkflow(
1613  digi = {
1614  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1615  },
1616  reco = {
1617  # skip the @pixelTrackingOnlyValidation which cannot run together with the full reconstruction
1618  '-s': 'RAW2DIGI:RawToDigi+RawToDigi_pixelOnly,L1Reco,RECO:reconstruction+reconstruction_pixelTrackingOnly,RECOSIM,PAT,VALIDATION:@standardValidation+@miniAODValidation,DQM:@standardDQM+@ExtraHLT+@miniAODDQM+@pixelTrackingOnlyDQM',
1619  '--procModifiers': 'pixelNtupletFit',
1620  '--customise' : 'RecoTracker/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets'
1621  },
1622  harvest = {
1623  # skip the @pixelTrackingOnlyDQM harvesting
1624  },
1625  suffix = 'Patatrack_FullRecoTripletsCPU',
1626  offset = 0.595,
1627 )
1628 # - ProdLike
1629 upgradeWFs['PatatrackFullRecoTripletsCPUProdLike'] = PatatrackWorkflow(
1630  digi = {
1631  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1632  '--datatier':'GEN-SIM-RAW',
1633  '--eventcontent':'RAWSIM',
1634  },
1635  reco = {
1636  # skip the @pixelTrackingOnlyValidation which cannot run together with the full reconstruction
1637  '-s': 'RAW2DIGI:RawToDigi+RawToDigi_pixelOnly,L1Reco,RECO:reconstruction+reconstruction_pixelTrackingOnly,RECOSIM',
1638  '--procModifiers': 'pixelNtupletFit',
1639  '--customise' : 'RecoTracker/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets',
1640  '--datatier':'AODSIM',
1641  '--eventcontent':'AODSIM',
1642  },
1643  harvest = None,
1644  suffix = 'Patatrack_FullRecoTripletsCPUProdLike',
1645  offset = 0.59521,
1646 )
1647 
1648 # Workflow running the Pixel triplets, ECAL and HCAL reconstruction on GPU (optional), together with the full offline reconstruction on CPU
1649 # - HLT on GPU (optional)
1650 # - reconstruction on GPU (optional), with DQM and validation
1651 # - harvesting
1652 upgradeWFs['PatatrackFullRecoTripletsGPU'] = PatatrackWorkflow(
1653  digi = {
1654  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1655  '--procModifiers': 'gpu'
1656  },
1657  reco = {
1658  # skip the @pixelTrackingOnlyValidation which cannot run together with the full reconstruction
1659  '-s': 'RAW2DIGI:RawToDigi+RawToDigi_pixelOnly,L1Reco,RECO:reconstruction+reconstruction_pixelTrackingOnly,RECOSIM,PAT,VALIDATION:@standardValidation+@miniAODValidation,DQM:@standardDQM+@ExtraHLT+@miniAODDQM+@pixelTrackingOnlyDQM',
1660  '--procModifiers': 'pixelNtupletFit,gpu',
1661  '--customise': 'RecoTracker/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets'
1662  },
1663  harvest = {
1664  # skip the @pixelTrackingOnlyDQM harvesting
1665  },
1666  suffix = 'Patatrack_FullRecoTripletsGPU',
1667  offset = 0.596,
1668 )
1669 # - ProdLike
1670 upgradeWFs['PatatrackFullRecoTripletsGPUProdLike'] = PatatrackWorkflow(
1671  digi = {
1672  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1673  '--procModifiers': 'gpu',
1674  '--datatier':'GEN-SIM-RAW',
1675  '--eventcontent':'RAWSIM',
1676  },
1677  reco = {
1678  # skip the @pixelTrackingOnlyValidation which cannot run together with the full reconstruction
1679  '-s': 'RAW2DIGI:RawToDigi+RawToDigi_pixelOnly,L1Reco,RECO:reconstruction+reconstruction_pixelTrackingOnly,RECOSIM',
1680  '--procModifiers': 'pixelNtupletFit,gpu',
1681  '--customise': 'RecoTracker/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets',
1682  '--datatier':'AODSIM',
1683  '--eventcontent':'AODSIM',
1684  },
1685  harvest = None,
1686  suffix = 'Patatrack_FullRecoTripletsGPUProdLike',
1687  offset = 0.59621,
1688 )
1689 
1690 # Workflow running the Pixel triplets, ECAL and HCAL reconstruction on CPU and GPU, together with the full offline reconstruction on CPU
1691 # - HLT on GPU (required)
1692 # - reconstruction on CPU and GPU, with DQM and validation for GPU-vs-CPU comparisons
1693 # - harvesting
1694 upgradeWFs['PatatrackFullRecoTripletsGPUValidation'] = PatatrackWorkflow(
1695  digi = {
1696  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1697  '--accelerators': 'gpu-nvidia',
1698  '--procModifiers': 'gpu'
1699  },
1700  reco = {
1701  # skip the @pixelTrackingOnlyValidation which cannot run together with the full reconstruction
1702  '-s': 'RAW2DIGI:RawToDigi+RawToDigi_pixelOnly,L1Reco,RECO:reconstruction+reconstruction_pixelTrackingOnly,RECOSIM,PAT,VALIDATION:@standardValidation+@miniAODValidation,DQM:@standardDQM+@ExtraHLT+@miniAODDQM+@pixelTrackingOnlyDQM',
1703  '--accelerators': 'gpu-nvidia',
1704  '--procModifiers': 'pixelNtupletFit,gpuValidation',
1705  '--customise' : 'RecoTracker/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets'
1706  },
1707  harvest = {
1708  # skip the @pixelTrackingOnlyDQM harvesting
1709  },
1710  suffix = 'Patatrack_FullRecoTripletsGPU_Validation',
1711  offset = 0.597,
1712 )
1713 
1714 upgradeWFs['PatatrackPixelOnlyAlpaka'] = PatatrackWorkflow(
1715  digi = {
1716  '--procModifiers': 'alpaka',
1717  '--customise' : 'HeterogeneousCore/AlpakaServices/customiseAlpakaServiceMemoryFilling.customiseAlpakaServiceMemoryFilling',
1718  },
1719  reco = {
1720  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
1721  '--procModifiers': 'alpaka',
1722  '--customise' : 'HeterogeneousCore/AlpakaServices/customiseAlpakaServiceMemoryFilling.customiseAlpakaServiceMemoryFilling',
1723  },
1724  harvest = {
1725  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'
1726  },
1727  suffix = 'Patatrack_PixelOnlyAlpaka',
1728  offset = 0.402,
1729 )
1730 
1731 upgradeWFs['PatatrackPixelOnlyAlpakaValidation'] = PatatrackWorkflow(
1732  digi = {
1733  '--procModifiers': 'alpaka',
1734  '--customise' : 'HeterogeneousCore/AlpakaServices/customiseAlpakaServiceMemoryFilling.customiseAlpakaServiceMemoryFilling',
1735  },
1736  reco = {
1737  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
1738  '--procModifiers': 'alpakaValidation',
1739  '--customise' : 'HeterogeneousCore/AlpakaServices/customiseAlpakaServiceMemoryFilling.customiseAlpakaServiceMemoryFilling',
1740  },
1741  harvest = {
1742  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM',
1743  '--procModifiers': 'alpakaValidation',
1744  },
1745  suffix = 'Patatrack_PixelOnlyAlpaka_Validation',
1746  offset = 0.403,
1747 )
1748 
1749 upgradeWFs['PatatrackPixelOnlyAlpakaProfiling'] = PatatrackWorkflow(
1750  digi = {
1751  '--procModifiers': 'alpaka',
1752  },
1753  reco = {
1754  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly',
1755  '--procModifiers': 'alpaka',
1756  '--customise' : 'RecoTracker/Configuration/customizePixelOnlyForProfiling.customizePixelOnlyForProfilingGPUOnly'
1757  },
1758  harvest = None,
1759  suffix = 'Patatrack_PixelOnlyAlpaka_Profiling',
1760  offset = 0.404,
1761 )
1762 
1763 upgradeWFs['PatatrackPixelOnlyTripletsAlpaka'] = PatatrackWorkflow(
1764  digi = {
1765  '--procModifiers': 'alpaka',
1766  '--customise' : 'HeterogeneousCore/AlpakaServices/customiseAlpakaServiceMemoryFilling.customiseAlpakaServiceMemoryFilling',
1767  },
1768  reco = {
1769  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
1770  '--procModifiers': 'alpaka',
1771  '--customise' : 'RecoTracker/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets,HeterogeneousCore/AlpakaServices/customiseAlpakaServiceMemoryFilling.customiseAlpakaServiceMemoryFilling'
1772  },
1773  harvest = {
1774  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'
1775  },
1776  suffix = 'Patatrack_PixelOnlyTripletsAlpaka',
1777  offset = 0.406,
1778 )
1779 
1780 upgradeWFs['PatatrackPixelOnlyTripletsAlpakaValidation'] = PatatrackWorkflow(
1781  digi = {
1782  '--procModifiers': 'alpaka',
1783  '--customise' : 'HeterogeneousCore/AlpakaServices/customiseAlpakaServiceMemoryFilling.customiseAlpakaServiceMemoryFilling',
1784  },
1785  reco = {
1786  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
1787  '--procModifiers': 'alpakaValidation',
1788  '--customise' : 'RecoTracker/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets,HeterogeneousCore/AlpakaServices/customiseAlpakaServiceMemoryFilling.customiseAlpakaServiceMemoryFilling'
1789  },
1790  harvest = {
1791  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'
1792  },
1793  suffix = 'Patatrack_PixelOnlyTripletsAlpaka_Validation',
1794  offset = 0.407,
1795 )
1796 
1797 upgradeWFs['PatatrackPixelOnlyTripletsAlpakaProfiling'] = PatatrackWorkflow(
1798  digi = {
1799  '--procModifiers': 'alpaka',
1800  },
1801  reco = {
1802  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly',
1803  '--procModifiers': 'alpaka',
1804  '--customise' : 'RecoTracker/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets,RecoTracker/Configuration/customizePixelOnlyForProfiling.customizePixelOnlyForProfilingGPUOnly'
1805  },
1806  harvest = None,
1807  suffix = 'Patatrack_PixelOnlyTripletsAlpaka_Profiling',
1808  offset = 0.408,
1809 )
1810 
1811 # end of Patatrack workflows
1812 
1814  def setup_(self, step, stepName, stepDict, k, properties):
1815  thisStep = stepDict[step][k]["-s"]
1816  if 'GenSimHLBeamSpot14' in step:
1817  stepDict[stepName][k] = merge([{'--eventcontent': 'RAWSIM', '--datatier': 'GEN-SIM'},stepDict[step][k]])
1818  elif 'Digi' in step and 'Trigger' not in step:
1819  stepDict[stepName][k] = merge([{'-s': thisStep.replace("DIGI:pdigi_valid","DIGI"),'--datatier':'GEN-SIM-RAW', '--eventcontent':'RAWSIM'}, stepDict[step][k]])
1820  elif 'DigiTrigger' in step: # for Phase-2
1821  stepDict[stepName][k] = merge([{'-s': thisStep.replace("DIGI:pdigi_valid","DIGI"), '--datatier':'GEN-SIM-RAW', '--eventcontent':'RAWSIM'}, stepDict[step][k]])
1822  elif 'Reco' in step:
1823  stepDict[stepName][k] = merge([{'-s': 'RAW2DIGI,L1Reco,RECO,RECOSIM', '--datatier':'AODSIM', '--eventcontent':'AODSIM'}, stepDict[step][k]])
1824  elif 'MiniAOD' in step:
1825  # the separate miniAOD step is used here
1826  stepDict[stepName][k] = deepcopy(stepDict[step][k])
1827  elif 'ALCA' in step or 'HARVEST' in step:
1828  # remove step
1829  stepDict[stepName][k] = None
1830  elif 'Nano'==step:
1831  stepDict[stepName][k] = merge([{'--filein':'file:step4.root','-s':'NANO','--datatier':'NANOAODSIM','--eventcontent':'NANOEDMAODSIM'}, stepDict[step][k]])
1832  def condition(self, fragment, stepList, key, hasHarvest):
1833  return fragment=="TTbar_14TeV" and ('2026' in key or '2021' in key or '2023' in key or '2024' in key)
1834 upgradeWFs['ProdLike'] = UpgradeWorkflow_ProdLike(
1835  steps = [
1836  'GenSimHLBeamSpot14',
1837  'Digi',
1838  'DigiTrigger',
1839  'Reco',
1840  'RecoFakeHLT',
1841  'RecoGlobal',
1842  'RecoNano',
1843  'RecoNanoFakeHLT',
1844  'HARVEST',
1845  'HARVESTFakeHLT',
1846  'HARVESTGlobal',
1847  'HARVESTNano',
1848  'HARVESTNanoFakeHLT',
1849  'MiniAOD',
1850  'ALCA',
1851  'ALCAPhase2',
1852  'Nano',
1853  ],
1854  PU = [
1855  'GenSimHLBeamSpot14',
1856  'Digi',
1857  'DigiTrigger',
1858  'Reco',
1859  'RecoFakeHLT',
1860  'RecoGlobal',
1861  'RecoNano',
1862  'RecoNanoFakeHLT',
1863  'HARVEST',
1864  'HARVESTFakeHLT',
1865  'HARVESTGlobal',
1866  'HARVESTNano',
1867  'HARVESTNanoFakeHLT',
1868  'MiniAOD',
1869  'ALCA',
1870  'ALCAPhase2',
1871  'Nano',
1872  ],
1873  suffix = '_ProdLike',
1874  offset = 0.21,
1875 )
1876 
1878  def __init__(self, suffix, offset, fixedPU,
1879  steps = [],
1880  PU = [
1881  'GenSimHLBeamSpot14',
1882  'Digi',
1883  'DigiTrigger',
1884  'Reco',
1885  'RecoFakeHLT',
1886  'RecoGlobal',
1887  'RecoNano',
1888  'RecoNanoFakeHLT',
1889  'HARVEST',
1890  'HARVESTFakeHLT',
1891  'HARVESTGlobal',
1892  'HARVESTNano',
1893  'HARVESTNanoFakeHLT',
1894  'MiniAOD',
1895  'ALCA',
1896  'ALCAPhase2',
1897  'Nano',
1898  ]):
1899  super(UpgradeWorkflow_ProdLikeRunningPU, self).__init__(steps, PU, suffix, offset)
1900  self.__fixedPU = fixedPU
1901  def setupPU_(self, step, stepName, stepDict, k, properties):
1902  # change PU skipping ALCA and HARVEST
1903  if stepDict[stepName][k] is not None and '--pileup' in stepDict[stepName][k]:
1904  stepDict[stepName][k]['--pileup'] = 'AVE_' + str(self.__fixedPU) + '_BX_25ns'
1905  def condition(self, fragment, stepList, key, hasHarvest):
1906  # lower PUs for Run3
1907  return (fragment=="TTbar_14TeV") and (('2026' in key) or ('2021' in key and self.__fixedPU<=100))
1908 
1909 # The numbering below is following the 0.21 for ProdLike wfs
1910 # 0.21N would have been a more natural choice but the
1911 # trailing zeros are ignored. Thus 0.21N1 is used
1912 
1913 upgradeWFs['ProdLikePU10'] = UpgradeWorkflow_ProdLikeRunningPU(
1914  suffix = '_ProdLikePU10',
1915  offset = 0.21101,
1916  fixedPU = 10,
1917 )
1918 
1919 upgradeWFs['ProdLikePU20'] = UpgradeWorkflow_ProdLikeRunningPU(
1920  suffix = '_ProdLikePU20',
1921  offset = 0.21201,
1922  fixedPU = 20,
1923 )
1924 
1925 upgradeWFs['ProdLikePU30'] = UpgradeWorkflow_ProdLikeRunningPU(
1926  suffix = '_ProdLikePU30',
1927  offset = 0.21301,
1928  fixedPU = 30,
1929 )
1930 
1931 upgradeWFs['ProdLikePU40'] = UpgradeWorkflow_ProdLikeRunningPU(
1932  suffix = '_ProdLikePU40',
1933  offset = 0.21401,
1934  fixedPU = 40,
1935 )
1936 
1937 upgradeWFs['ProdLikePU50'] = UpgradeWorkflow_ProdLikeRunningPU(
1938  suffix = '_ProdLikePU50',
1939  offset = 0.21501,
1940  fixedPU = 50,
1941 )
1942 
1943 upgradeWFs['ProdLikePU55'] = UpgradeWorkflow_ProdLikeRunningPU(
1944  suffix = '_ProdLikePU55',
1945  offset = 0.21551,
1946  fixedPU = 55,
1947 )
1948 
1949 upgradeWFs['ProdLikePU60'] = UpgradeWorkflow_ProdLikeRunningPU(
1950  suffix = '_ProdLikePU60',
1951  offset = 0.21601,
1952  fixedPU = 60,
1953 )
1954 
1955 upgradeWFs['ProdLikePU65'] = UpgradeWorkflow_ProdLikeRunningPU(
1956  suffix = '_ProdLikePU65',
1957  offset = 0.21651,
1958  fixedPU = 65,
1959 )
1960 
1961 upgradeWFs['ProdLikePU70'] = UpgradeWorkflow_ProdLikeRunningPU(
1962  suffix = '_ProdLikePU70',
1963  offset = 0.21701,
1964  fixedPU = 70,
1965 )
1966 
1967 upgradeWFs['ProdLikePU80'] = UpgradeWorkflow_ProdLikeRunningPU(
1968  suffix = '_ProdLikePU80',
1969  offset = 0.21801,
1970  fixedPU = 80,
1971 )
1972 
1973 upgradeWFs['ProdLikePU90'] = UpgradeWorkflow_ProdLikeRunningPU(
1974  suffix = '_ProdLikePU90',
1975  offset = 0.21901,
1976  fixedPU = 90,
1977 )
1978 
1979 upgradeWFs['ProdLikePU100'] = UpgradeWorkflow_ProdLikeRunningPU(
1980  suffix = '_ProdLikePU100',
1981  offset = 0.211001,
1982  fixedPU = 100,
1983 )
1984 
1985 upgradeWFs['ProdLikePU120'] = UpgradeWorkflow_ProdLikeRunningPU(
1986  suffix = '_ProdLikePU120',
1987  offset = 0.211201,
1988  fixedPU = 120,
1989 )
1990 
1991 upgradeWFs['ProdLikePU140'] = UpgradeWorkflow_ProdLikeRunningPU(
1992  suffix = '_ProdLikePU140',
1993  offset = 0.211401,
1994  fixedPU = 140,
1995 )
1996 
1997 upgradeWFs['ProdLikePU160'] = UpgradeWorkflow_ProdLikeRunningPU(
1998  suffix = '_ProdLikePU160',
1999  offset = 0.211601,
2000  fixedPU = 160,
2001 )
2002 
2003 upgradeWFs['ProdLikePU180'] = UpgradeWorkflow_ProdLikeRunningPU(
2004  suffix = '_ProdLikePU180',
2005  offset = 0.211801,
2006  fixedPU = 180,
2007 )
2008 
2010  def setup_(self, step, stepName, stepDict, k, properties):
2011  if 'HARVEST' in step:
2012  stepDict[stepName][k] = merge([{'--filein':'file:step3_inDQM.root'}, stepDict[step][k]])
2013  else:
2014  stepDict[stepName][k] = merge([stepDict[step][k]])
2015  def condition(self, fragment, stepList, key, hasHarvest):
2016  return fragment=="TTbar_14TeV" and '2026' in key
2017 upgradeWFs['HLT75e33'] = UpgradeWorkflow_HLT75e33(
2018  steps = [
2019  'GenSimHLBeamSpot14',
2020  'DigiTrigger',
2021  'RecoGlobal',
2022  'HLT75e33',
2023  'HARVESTGlobal',
2024  ],
2025  PU = [
2026  'GenSimHLBeamSpot14',
2027  'DigiTrigger',
2028  'RecoGlobal',
2029  'HLT75e33',
2030  'HARVESTGlobal',
2031  ],
2032  suffix = '_HLT75e33',
2033  offset = 0.75,
2034 )
2035 
2037  def setup_(self, step, stepName, stepDict, k, properties):
2038  if 'DigiTrigger' in step:
2039  stepDict[stepName][k] = merge([{'-s':'DIGI:pdigi_valid,L1TrackTrigger,L1,DIGI2RAW,HLT:@relval2026'}, stepDict[step][k]])
2040  def condition(self, fragment, stepList, key, hasHarvest):
2041  return fragment=="TTbar_14TeV" and '2026' in key
2042 upgradeWFs['HLTwDIGI75e33'] = UpgradeWorkflow_HLTwDIGI75e33(
2043  steps = [
2044  'DigiTrigger',
2045  ],
2046  PU = [
2047  'DigiTrigger',
2048  ],
2049  suffix = '_HLTwDIGI75e33',
2050  offset = 0.76,
2051 )
2052 
2054  def setup_(self, step, stepName, stepDict, k, properties):
2055  if 'Digi' in step and 'NoHLT' not in step:
2056  stepDict[stepName][k] = merge([{'-s': 'DIGI:pdigi_valid,L1,L1TrackTrigger,L1P2GT,DIGI2RAW,HLT:@relval2026'}, stepDict[step][k]])
2057  def condition(self, fragment, stepList, key, hasHarvest):
2058  return '2026' in key
2059 
2060 upgradeWFs['L1Complete'] = UpgradeWorkflow_L1Complete(
2061  steps = [
2062  'DigiTrigger',
2063  ],
2064  PU = [
2065  'DigiTrigger',
2066  ],
2067  suffix = '_L1Complete',
2068  offset = 0.78
2069 )
2070 
2072  def setup_(self, step, stepName, stepDict, k, properties):
2073  if 'GenSim' in step:
2074  custNew = "SimG4Core/Application/NeutronBGforMuonsXS_cff.customise"
2075  else:
2076  custNew = "SLHCUpgradeSimulations/Configuration/customise_mixing.customise_Mix_LongLived_Neutrons"
2077  stepDict[stepName][k] = deepcopy(stepDict[step][k])
2078  if '--customise' in stepDict[stepName][k].keys():
2079  stepDict[stepName][k]['--customise'] += ","+custNew
2080  else:
2081  stepDict[stepName][k]['--customise'] = custNew
2082  def condition(self, fragment, stepList, key, hasHarvest):
2083  return any(fragment==nfrag for nfrag in self.neutronFrags) and any(nkey in key for nkey in self.neutronKeys)
2084 upgradeWFs['Neutron'] = UpgradeWorkflow_Neutron(
2085  steps = [
2086  'GenSim',
2087  'GenSimHLBeamSpot',
2088  'GenSimHLBeamSpot14',
2089  'Digi',
2090  'DigiTrigger',
2091  ],
2092  PU = [
2093  'Digi',
2094  'DigiTrigger',
2095  ],
2096  suffix = '_Neutron',
2097  offset = 0.12,
2098 )
2099 # add some extra info
2100 upgradeWFs['Neutron'].neutronKeys = [x for x in upgradeKeys[2026] if 'PU' not in x]
2101 upgradeWFs['Neutron'].neutronFrags = ['ZMM_14','MinBias_14TeV']
2102 
2104  def setup_(self, step, stepName, stepDict, k, properties):
2105  stepDict[stepName][k] = merge([{'--procModifiers': 'run2_HECollapse_2018'}, stepDict[step][k]])
2106  def condition(self, fragment, stepList, key, hasHarvest):
2107  return fragment=="TTbar_13" and '2018' in key
2108 upgradeWFs['heCollapse'] = UpgradeWorkflow_heCollapse(
2109  steps = [
2110  'GenSim',
2111  'Digi',
2112  'Reco',
2113 # 'RecoFakeHLT',
2114  'HARVEST',
2115  'HARVESTFakeHLT',
2116  'ALCA',
2117  ],
2118  PU = [
2119  'Digi',
2120  'Reco',
2121 # 'RecoFakeHLT',
2122  'HARVEST',
2123  'HARVESTFakeHLT',
2124  ],
2125  suffix = '_heCollapse',
2126  offset = 0.6,
2127 )
2128 
2129 # ECAL Phase 2 development WF
2131  def __init__(self, digi = {}, reco = {}, harvest = {}, **kwargs):
2132  # adapt the parameters for the UpgradeWorkflow init method
2133  super(UpgradeWorkflow_ecalDevel, self).__init__(
2134  steps = [
2135  'DigiTrigger',
2136  'RecoGlobal',
2137  'HARVESTGlobal',
2138  'ALCAPhase2',
2139  ],
2140  PU = [
2141  'DigiTrigger',
2142  'RecoGlobal',
2143  'HARVESTGlobal',
2144  'ALCAPhase2',
2145  ],
2146  **kwargs)
2147  self.__digi = digi
2148  self.__reco = reco
2149  self.__harvest = harvest
2150 
2151  def setup_(self, step, stepName, stepDict, k, properties):
2152  # temporarily remove trigger & downstream steps
2153  mods = {'--era': stepDict[step][k]['--era']+',phase2_ecal_devel'}
2154  if 'Digi' in step:
2155  mods['-s'] = 'DIGI:pdigi_valid,DIGI2RAW'
2156  mods |= self.__digi
2157  elif 'Reco' in step:
2158  mods['-s'] = 'RAW2DIGI,RECO:reconstruction_ecalOnly,VALIDATION:@ecalOnlyValidation,DQM:@ecalOnly'
2159  mods['--datatier'] = 'GEN-SIM-RECO,DQMIO'
2160  mods['--eventcontent'] = 'FEVTDEBUGHLT,DQM'
2161  mods |= self.__reco
2162  elif 'HARVEST' in step:
2163  mods['-s'] = 'HARVESTING:@ecalOnlyValidation+@ecal'
2164  mods |= self.__harvest
2165  stepDict[stepName][k] = merge([mods, stepDict[step][k]])
2166  # skip ALCA step
2167  if 'ALCA' in step:
2168  stepDict[stepName][k] = None
2169 
2170  def condition(self, fragment, stepList, key, hasHarvest):
2171  return fragment=="TTbar_14TeV" and '2026' in key
2172 
2173 # ECAL Phase 2 workflow running on CPU
2174 upgradeWFs['ecalDevel'] = UpgradeWorkflow_ecalDevel(
2175  suffix = '_ecalDevel',
2176  offset = 0.61,
2177 )
2178 
2179 # ECAL Phase 2 workflow running on CPU or GPU (if available)
2180 upgradeWFs['ecalDevelGPU'] = UpgradeWorkflow_ecalDevel(
2181  reco = {'--procModifiers': 'gpu'},
2182  suffix = '_ecalDevelGPU',
2183  offset = 0.612,
2184 )
2185 
2186 # ECAL component
2188  def __init__(self, suffix, offset, ecalTPPh2, ecalMod,
2189  steps = [
2190  'GenSim',
2191  'GenSimHLBeamSpot',
2192  'GenSimHLBeamSpot14',
2193  'GenSimHLBeamSpotHGCALCloseBy',
2194  'Digi',
2195  'DigiTrigger',
2196  'RecoGlobal',
2197  'HARVESTGlobal',
2198  'ALCAPhase2',
2199  ],
2200  PU = [
2201  'GenSim',
2202  'GenSimHLBeamSpot',
2203  'GenSimHLBeamSpot14',
2204  'GenSimHLBeamSpotHGCALCloseBy',
2205  'Digi',
2206  'DigiTrigger',
2207  'RecoGlobal',
2208  'HARVESTGlobal',
2209  'ALCAPhase2',
2210  ]):
2211  super(UpgradeWorkflow_ECalComponent, self).__init__(steps, PU, suffix, offset)
2212  self.__ecalTPPh2 = ecalTPPh2
2213  self.__ecalMod = ecalMod
2214 
2215  def setup_(self, step, stepName, stepDict, k, properties):
2216  stepDict[stepName][k] = deepcopy(stepDict[step][k])
2217  if 'Sim' in step:
2218  if self.__ecalMod is not None:
2219  stepDict[stepName][k] = merge([{'--procModifiers':self.__ecalMod},stepDict[step][k]])
2220  if 'Digi' in step and 'NoHLT' not in step:
2221  if self.__ecalMod is not None:
2222  stepDict[stepName][k] = merge([{'--procModifiers':self.__ecalMod},stepDict[step][k]])
2223  if self.__ecalTPPh2 is not None:
2224  mods = {'--era': stepDict[step][k]['--era']+',phase2_ecal_devel,phase2_ecalTP_devel'}
2225  mods['-s'] = 'DIGI:pdigi_valid,DIGI2RAW,HLT:@fake2'
2226  stepDict[stepName][k] = merge([mods, stepDict[step][k]])
2227  if 'RecoGlobal' in step:
2228  stepDict[stepName][k] = merge([{'-s': 'RAW2DIGI,RECO,RECOSIM,PAT',
2229  '--datatier':'GEN-SIM-RECO',
2230  '--eventcontent':'FEVTDEBUGHLT',
2231  }, stepDict[step][k]])
2232  if 'HARVESTGlobal' in step:
2233  stepDict[stepName][k] = None
2234  if 'ALCAPhase2' in step:
2235  stepDict[stepName][k] = None
2236 
2237  def condition(self, fragment, stepList, key, hasHarvest):
2238  return ('2021' in key or '2023' in key or '2026' in key)
2239 
2240 upgradeWFs['ECALComponent'] = UpgradeWorkflow_ECalComponent(
2241  suffix = '_ecalComponent',
2242  offset = 0.631,
2243  ecalTPPh2 = None,
2244  ecalMod = 'ecal_component',
2245 )
2246 
2247 upgradeWFs['ECALComponentFSW'] = UpgradeWorkflow_ECalComponent(
2248  suffix = '_ecalComponentFSW',
2249  offset = 0.632,
2250  ecalTPPh2 = None,
2251  ecalMod = 'ecal_component_finely_sampled_waveforms',
2252 )
2253 
2254 upgradeWFs['ECALTPPh2'] = UpgradeWorkflow_ECalComponent(
2255  suffix = '_ecalTPPh2',
2256  offset = 0.633,
2257  ecalTPPh2 = 'phase2_ecal_devel,phase2_ecalTP_devel',
2258  ecalMod = None,
2259 )
2260 
2261 upgradeWFs['ECALTPPh2Component'] = UpgradeWorkflow_ECalComponent(
2262  suffix = '_ecalTPPh2Component',
2263  offset = 0.634,
2264  ecalTPPh2 = 'phase2_ecal_devel,phase2_ecalTP_devel',
2265  ecalMod = 'ecal_component',
2266 )
2267 
2268 upgradeWFs['ECALTPPh2ComponentFSW'] = UpgradeWorkflow_ECalComponent(
2269  suffix = '_ecalTPPh2ComponentFSW',
2270  offset = 0.635,
2271  ecalTPPh2 = 'phase2_ecal_devel,phase2_ecalTP_devel',
2272  ecalMod = 'ecal_component_finely_sampled_waveforms',
2273 )
2274 
2276  def setup_(self, step, stepName, stepDict, k, properties):
2277  myGT=stepDict[step][k]['--conditions']
2278  myGT+="_0T"
2279  stepDict[stepName][k] = merge([{'-n':'1','--magField':'0T','--conditions':myGT}, stepDict[step][k]])
2280  def setupPU_(self, step, stepName, stepDict, k, properties):
2281  # override '-n' setting from PUDataSets in relval_steps.py
2282  stepDict[stepName][k] = merge([{'-n':'1'}, stepDict[step][k]])
2283  def condition(self, fragment, stepList, key, hasHarvest):
2284  return (fragment=="TTbar_13" or fragment=="TTbar_14TeV") and ('2017' in key or '2018' in key or '2021' in key or '2024' in key) and ('FS' not in key)
2285 upgradeWFs['0T'] = UpgradeWorkflow_0T(
2286  steps = [
2287  'GenSim',
2288  'Digi',
2289  'Reco',
2290  'RecoFakeHLT',
2291  'HARVEST',
2292  'HARVESTFakeHLT',
2293  'RecoNano',
2294  'RecoNanoFakeHLT',
2295  'HARVESTNano',
2296  'HARVESTNanoFakeHLT',
2297  'ALCA',
2298  ],
2299  PU = [
2300  'Digi',
2301  'Reco',
2302  'RecoFakeHLT',
2303  'HARVEST',
2304  'HARVESTFakeHLT',
2305  'RecoNano',
2306  'RecoNanoFakeHLT',
2307  'HARVESTNano',
2308  'HARVESTNanoFakeHLT',
2309  ],
2310  suffix = '_0T',
2311  offset = 0.24,
2312 )
2313 
2315  def setup_(self, step, stepName, stepDict, k, properties):
2316  if 'Reco' in step and 'Run2_2018' in stepDict[step][k]['--era']:
2317  stepDict[stepName][k] = merge([{'--era': 'Run2_2018,bParking'}, stepDict[step][k]])
2318  def condition(self, fragment, stepList, key, hasHarvest):
2319  return fragment=="TTbar_13" and '2018' in key
2320 upgradeWFs['ParkingBPH'] = UpgradeWorkflow_ParkingBPH(
2321  steps = [
2322  'Reco',
2323  'RecoFakeHLT',
2324  ],
2325  PU = [],
2326  suffix = '_ParkingBPH',
2327  offset = 0.8,
2328 )
2329 
2330 
2332  def setup_(self, step, stepName, stepDict, k, properties):
2333  self.__frags = ["B0","Psi2S","Bu","Bd","Xi","Bs"]
2334  thisStep = stepDict[step][k]["-s"]
2335  if "Reco" in step:
2336  if "DQM:" in thisStep:
2337  stepDict[stepName][k] = merge([{'-s': thisStep.replace("DQM:","DQM:@heavyFlavor+")}, stepDict[step][k]])
2338  elif "DQM" in thisStep:
2339  stepDict[stepName][k] = merge([{'-s': thisStep.replace("DQM","DQM:@heavyFlavor")}, stepDict[step][k]])
2340  else:
2341  stepDict[stepName][k] = merge([{'-s': thisStep + ",DQM:@heavyFlavor"}, stepDict[step][k]])
2342 
2343  def condition(self, fragment, stepList, key, hasHarvest):
2344  return any(frag in fragment for frag in self.__frags)
2345 
2346 upgradeWFs['HeavyFlavor'] = UpgradeWorkflow_HeavyFlavor(
2347  steps = [
2348  'Reco',
2349  'RecoFakeHLT',
2350  'RecoNano',
2351  'RecoNanoFakeHLT',
2352  ],
2353  PU = [],
2354  suffix = '_HeavyFlavor',
2355  offset = 0.81,
2356 )
2357 
2358 
2360  def setup_(self, step, stepName, stepDict, k, properties):
2361  if 'Nano' in step:
2362  stepDict[stepName][k] = merge([{'--customise': 'PhysicsTools/NanoAOD/custom_jme_cff.PrepJMECustomNanoAOD'}, stepDict[step][k]])
2363  def condition(self, fragment, stepList, key, hasHarvest):
2364  return (fragment=="TTbar_13" or fragment=="TTbar_14TeV") and ('2017' in key or '2018' in key or '2021' in key) and ('FS' not in key)
2365 upgradeWFs['JMENano'] = UpgradeWorkflow_JMENano(
2366  steps = [
2367  'Nano',
2368  'RecoNano',
2369  'RecoNanoFakeHLT',
2370  ],
2371  PU = [],
2372  suffix = '_JMENano',
2373  offset = 0.15,
2374 )
2375 
2376 
2377 # common operations for aging workflows
2379  def setup_(self, step, stepName, stepDict, k, properties):
2380  if 'Digi' in step or 'Reco' in step:
2381  stepDict[stepName][k] = merge([{'--customise': 'SLHCUpgradeSimulations/Configuration/aging.customise_aging_'+self.lumi}, stepDict[step][k]])
2382  def condition(self, fragment, stepList, key, hasHarvest):
2383  return '2026' in key
2384 # define several of them
2385 upgradeWFs['Aging1000'] = UpgradeWorkflowAging(
2386  steps = [
2387  'Digi',
2388  'DigiTrigger',
2389  'RecoLocal',
2390  'Reco',
2391  'RecoFakeHLT',
2392  'RecoGlobal',
2393  ],
2394  PU = [
2395  'Digi',
2396  'DigiTrigger',
2397  'RecoLocal',
2398  'Reco',
2399  'RecoFakeHLT',
2400  'RecoGlobal',
2401  ],
2402  suffix = 'Aging1000',
2403  offset = 0.101,
2404 )
2405 upgradeWFs['Aging1000'].lumi = '1000'
2406 upgradeWFs['Aging3000'] = deepcopy(upgradeWFs['Aging1000'])
2407 upgradeWFs['Aging3000'].suffix = 'Aging3000'
2408 upgradeWFs['Aging3000'].offset = 0.103
2409 upgradeWFs['Aging3000'].lumi = '3000'
2410 
2411 #
2412 # Simulates Bias Rail in Phase-2 OT PS modules and X% random bad Strips
2413 # in PS-s and SS sensors
2414 #
2416  def setup_(self, step, stepName, stepDict, k, properties):
2417  if 'Digi' in step:
2418  stepDict[stepName][k] = merge([{'--customise': 'SimTracker/SiPhase2Digitizer/customizeForOTInefficiency.customizeSiPhase2OTInefficiency'+self.percent+'Percent'}, stepDict[step][k]])
2419  def condition(self, fragment, stepList, key, hasHarvest):
2420  return fragment=="TTbar_14TeV" and '2026' in key
2421 # define several of them
2422 upgradeWFs['OTInefficiency'] = UpgradeWorkflow_OTInefficiency(
2423  steps = [
2424  'Digi',
2425  'DigiTrigger',
2426  ],
2427  PU = [
2428  'Digi',
2429  'DigiTrigger',
2430  ],
2431  suffix = '_OTInefficiency',
2432  offset = 0.111,
2433 )
2434 upgradeWFs['OTInefficiency'].percent = 'Zero'
2435 
2436 # 1% bad strips
2437 upgradeWFs['OTInefficiency1PC'] = deepcopy(upgradeWFs['OTInefficiency'])
2438 upgradeWFs['OTInefficiency1PC'].suffix = '_OTInefficiency1PC'
2439 upgradeWFs['OTInefficiency1PC'].offset = 0.112
2440 upgradeWFs['OTInefficiency1PC'].percent = 'One'
2441 
2442 # 5% bad strips
2443 upgradeWFs['OTInefficiency5PC'] = deepcopy(upgradeWFs['OTInefficiency'])
2444 upgradeWFs['OTInefficiency5PC'].suffix = '_OTInefficiency5PC'
2445 upgradeWFs['OTInefficiency5PC'].offset = 0.113
2446 upgradeWFs['OTInefficiency5PC'].percent = 'Five'
2447 
2448 # 10% bad strips
2449 upgradeWFs['OTInefficiency10PC'] = deepcopy(upgradeWFs['OTInefficiency'])
2450 upgradeWFs['OTInefficiency10PC'].suffix = '_OTInefficiency10PC'
2451 upgradeWFs['OTInefficiency10PC'].offset = 0.114
2452 upgradeWFs['OTInefficiency10PC'].percent = 'Ten'
2453 
2454 #
2455 # Simulates CROC signal shape in IT modules
2456 #
2458  def setup_(self, step, stepName, stepDict, k, properties):
2459  if 'Digi' in step:
2460  stepDict[stepName][k] = merge([{'--customise': 'SimTracker/SiPhase2Digitizer/customizeForPhase2TrackerSignalShape.customizeSiPhase2ITSignalShape'}, stepDict[step][k]])
2461  def condition(self, fragment, stepList, key, hasHarvest):
2462  return '2026' in key
2463 # define several of them
2464 upgradeWFs['ITSignalShape'] = UpgradeWorkflow_ITSignalShape(
2465  steps = [
2466  'Digi',
2467  'DigiTrigger',
2468  ],
2469  PU = [
2470  'Digi',
2471  'DigiTrigger',
2472  ],
2473  suffix = '_ITSignalShape',
2474  offset = 0.141
2475 )
2476 
2477 # Specifying explicitly the --filein is not nice but that was the
2478 # easiest way to "skip" the output of step2 (=premixing stage1) for
2479 # filein (as it goes to pileup_input). It works (a bit accidentally
2480 # though) also for "-i all" because in that case the --filein for DAS
2481 # input is after this one in the list of command line arguments to
2482 # cmsDriver, and gets then used in practice.
2483 digiPremixLocalPileup = {
2484  "--filein": "file:step1.root",
2485  "--pileup_input": "file:step2.root"
2486 }
2487 
2488 # for premix
2490  def setup_(self, step, stepName, stepDict, k, properties):
2491  # just copy steps
2492  stepDict[stepName][k] = merge([stepDict[step][k]])
2493  def setupPU_(self, step, stepName, stepDict, k, properties):
2494  # setup for stage 1
2495  if "GenSim" in stepName:
2496  stepNamePmx = stepName.replace('GenSim','Premix')
2497  if not stepNamePmx in stepDict: stepDict[stepNamePmx] = {}
2498  stepDict[stepNamePmx][k] = merge([
2499  {
2500  '-s': 'GEN,SIM,DIGI:pdigi_valid',
2501  '--datatier': 'PREMIX',
2502  '--eventcontent': 'PREMIX',
2503  '--procModifiers': 'premix_stage1'
2504  },
2505  stepDict[stepName][k]
2506  ])
2507  if "ProdLike" in self.suffix:
2508  stepDict[stepNamePmx][k] = merge([{'-s': 'GEN,SIM,DIGI'},stepDict[stepNamePmx][k]])
2509  # setup for stage 2
2510  elif "Digi" in step or "Reco" in step:
2511  # go back to non-PU step version
2512  d = merge([stepDict[self.getStepName(step)][k]])
2513  if d is None: return
2514  if "Digi" in step:
2515  tmpsteps = []
2516  for s in d["-s"].split(","):
2517  if s == "DIGI" or "DIGI:" in s:
2518  tmpsteps.extend([s, "DATAMIX"])
2519  else:
2520  tmpsteps.append(s)
2521  d = merge([{"-s" : ",".join(tmpsteps),
2522  "--datamix" : "PreMix",
2523  "--procModifiers": "premix_stage2"},
2524  d])
2525  # for combined stage1+stage2
2526  if "_PMXS1S2" in self.suffix:
2527  d = merge([digiPremixLocalPileup, d])
2528  elif "Reco" in step:
2529  if "--procModifiers" in d:
2530  d["--procModifiers"] += ",premix_stage2"
2531  else:
2532  d["--procModifiers"] = "premix_stage2"
2533  stepDict[stepName][k] = d
2534  # Increase the input file step number by one for Nano in combined stage1+stage2
2535  elif "Nano"==step:
2536  # go back to non-PU step version
2537  d = merge([stepDict[self.getStepName(step)][k]])
2538  if "--filein" in d:
2539  filein = d["--filein"]
2540  m = re.search("step(?P<ind>\d+)_", filein)
2541  if m:
2542  d["--filein"] = filein.replace(m.group(), "step%d_"%(int(m.group("ind"))+1))
2543  stepDict[stepName][k] = d
2544  # run2/3 WFs use Nano (not NanoPU) in PU WF
2545  stepDict[self.getStepName(step)][k] = merge([d])
2546  def condition(self, fragment, stepList, key, hasHarvest):
2547  if not 'PU' in key:
2548  return False
2549  if not any(y in key for y in ['2021', '2023', '2024', '2026']):
2550  return False
2551  if self.suffix.endswith("S1"):
2552  return "NuGun" in fragment
2553  return True
2554  def workflow_(self, workflows, num, fragment, stepList, key):
2555  fragmentTmp = fragment
2556  if self.suffix.endswith("S1"):
2557  fragmentTmp = 'PREMIXUP' + key[2:].replace("PU", "").replace("Design", "") + '_PU25'
2558  super(UpgradeWorkflowPremix,self).workflow_(workflows, num, fragmentTmp, stepList, key)
2559 # Premix stage1
2560 upgradeWFs['PMXS1'] = UpgradeWorkflowPremix(
2561  steps = [
2562  ],
2563  PU = [
2564  'GenSim',
2565  'GenSimHLBeamSpot',
2566  'GenSimHLBeamSpot14',
2567  ],
2568  suffix = '_PMXS1',
2569  offset = 0.97,
2570 )
2571 # Premix stage2
2572 upgradeWFs['PMXS2'] = UpgradeWorkflowPremix(
2573  steps = [],
2574  PU = [
2575  'Digi',
2576  'DigiTrigger',
2577  'RecoLocal',
2578  'Reco',
2579  'RecoFakeHLT',
2580  'RecoGlobal',
2581  'RecoNano',
2582  'RecoNanoFakeHLT',
2583  'Nano',
2584  ],
2585  suffix = '_PMXS2',
2586  offset = 0.98,
2587 )
2588 # Premix combined stage1+stage2
2589 upgradeWFs['PMXS1S2'] = UpgradeWorkflowPremix(
2590  steps = [],
2591  PU = [
2592  'GenSim',
2593  'GenSimHLBeamSpot',
2594  'GenSimHLBeamSpot14',
2595  'Digi',
2596  'DigiTrigger',
2597  'RecoLocal',
2598  'Reco',
2599  'RecoFakeHLT',
2600  'RecoGlobal',
2601  'RecoNano',
2602  'RecoNanoFakeHLT',
2603  'Nano',
2604  ],
2605  suffix = '_PMXS1S2',
2606  offset = 0.99,
2607 )
2608 # Alternative version of above w/ less PU for PR tests
2610  def setupPU_(self, step, stepName, stepDict, k, properties):
2611  # adjust first, so it gets copied into new Premix step
2612  if '--pileup' in stepDict[stepName][k]:
2613  stepDict[stepName][k]['--pileup'] = 'AVE_50_BX_25ns_m3p3'
2614  super(UpgradeWorkflowAdjustPU,self).setupPU_(step, stepName, stepDict, k, properties)
2615  def condition(self, fragment, stepList, key, hasHarvest):
2616  # restrict to phase2
2617  return super(UpgradeWorkflowAdjustPU,self).condition(fragment, stepList, key, hasHarvest) and '2026' in key
2618 upgradeWFs['PMXS1S2PR'] = UpgradeWorkflowAdjustPU(
2619  steps = [],
2620  PU = [
2621  'GenSim',
2622  'GenSimHLBeamSpot',
2623  'GenSimHLBeamSpot14',
2624  'Digi',
2625  'DigiTrigger',
2626  'RecoLocal',
2627  'Reco',
2628  'RecoFakeHLT',
2629  'RecoGlobal',
2630  'Nano',
2631  'HARVEST',
2632  'HARVESTFakeHLT',
2633  'HARVESTGlobal',
2634  ],
2635  suffix = '_PMXS1S2PR',
2636  offset = 0.999,
2637 )
2638 
2640  def setup_(self, step, stepName, stepDict, k, properties):
2641  # copy steps, then apply specializations
2642  UpgradeWorkflowPremix.setup_(self, step, stepName, stepDict, k, properties)
2643  UpgradeWorkflow_ProdLike.setup_(self, step, stepName, stepDict, k, properties)
2644  #
2645  if 'Digi' in step:
2646  d = merge([stepDict[self.getStepName(step)][k]])
2647  tmpsteps = []
2648  for s in d["-s"].split(","):
2649  if "DIGI:pdigi_valid" in s:
2650  tmpsteps.append("DIGI")
2651  else:
2652  tmpsteps.append(s)
2653  d = merge([{"-s" : ",".join(tmpsteps),
2654  "--eventcontent": "PREMIXRAW"},
2655  d])
2656  stepDict[stepName][k] = d
2657  if 'Nano'==step:
2658  stepDict[stepName][k] = merge([{'--filein':'file:step5.root','-s':'NANO','--datatier':'NANOAODSIM','--eventcontent':'NANOEDMAODSIM'}, stepDict[step][k]])
2659  def condition(self, fragment, stepList, key, hasHarvest):
2660  # use both conditions
2661  return UpgradeWorkflowPremix.condition(self, fragment, stepList, key, hasHarvest) and UpgradeWorkflow_ProdLike.condition(self, fragment, stepList, key, hasHarvest)
2662 # premix stage2
2663 upgradeWFs['PMXS2ProdLike'] = UpgradeWorkflowPremixProdLike(
2664  steps = [],
2665  PU = [
2666  'Digi',
2667  'DigiTrigger',
2668  'RecoLocal',
2669  'Reco',
2670  'RecoFakeHLT',
2671  'RecoGlobal',
2672  'RecoNano',
2673  'RecoNanoFakeHLT',
2674  'Nano',
2675  'HARVEST',
2676  'HARVESTFakeHLT',
2677  'HARVESTGlobal',
2678  'HARVESTNano',
2679  'HARVESTNanoFakeHLT',
2680  'MiniAOD',
2681  'ALCA',
2682  ],
2683  suffix = '_PMXS2ProdLike',
2684  offset = 0.9821,
2685 )
2686 # premix combined stage1+stage2
2687 upgradeWFs['PMXS1S2ProdLike'] = UpgradeWorkflowPremixProdLike(
2688  steps = [],
2689  PU = [
2690  'GenSim',
2691  'GenSimHLBeamSpot',
2692  'GenSimHLBeamSpot14',
2693  'Digi',
2694  'DigiTrigger',
2695  'RecoLocal',
2696  'Reco',
2697  'RecoFakeHLT',
2698  'RecoGlobal',
2699  'RecoNano',
2700  'RecoNanoFakeHLT',
2701  'Nano',
2702  'HARVEST',
2703  'HARVESTFakeHLT',
2704  'HARVESTGlobal',
2705  'HARVESTNano',
2706  'HARVESTNanoFakeHLT',
2707  'MiniAOD',
2708  'ALCA',
2709  ],
2710  suffix = '_PMXS1S2ProdLike',
2711  offset = 0.9921,
2712 )
2713 
2715  def setup_(self, step, stepName, stepDict, k, properties):
2716  if 'HARVESTFastRun3' in step:
2717  stepDict[stepName][k] = merge([{'-s':'HARVESTING:@trackingOnlyValidation+@trackingOnlyDQM',
2718  '--fast':'',
2719  '--era':'Run3_FastSim',
2720  '--filein':'file:step1_inDQM.root'}, stepDict[step][k]])
2721  else:
2722  stepDict[stepName][k] = merge([stepDict[step][k]])
2723  def condition(self, fragment, stepList, key, hasHarvest):
2724  return ('2021FS' in key or '2023FS' in key)
2725 upgradeWFs['Run3FStrackingOnly'] = UpgradeWorkflow_Run3FStrackingOnly(
2726  steps = [
2727  'Gen',
2728  'FastSimRun3',
2729  'HARVESTFastRun3'
2730  ],
2731  PU = [
2732  'FastSimRun3',
2733  'HARVESTFastRun3'
2734  ],
2735  suffix = '_Run3FSTrackingOnly',
2736  offset = 0.302,
2737 )
2738 
2740  def setup_(self, step, stepName, stepDict, k, properties):
2741  if 'Gen' in step and 'GenOnly' not in step:
2742  stepDict[stepName][k] = merge([{'-s':'GEN,SIM,RECOBEFMIX',
2743  '--fast':'',
2744  '--era':'Run3_FastSim',
2745  '--eventcontent':'FASTPU',
2746  '--datatier':'GEN-SIM-RECO',
2747  '--relval':'27000,3000'}, stepDict[step][k]])
2748  else:
2749  stepDict[stepName][k] = None
2750  def condition(self, fragment, stepList, key, hasHarvest):
2751  return ('2021FS' in key or '2023FS' in key) and fragment=="MinBias_14TeV"
2752 upgradeWFs['Run3FSMBMixing'] = UpgradeWorkflow_Run3FSMBMixing(
2753  steps = [
2754  'Gen',
2755  'FastSimRun3',
2756  'HARVESTFastRun3'
2757  ],
2758  PU = [],
2759  suffix = '_Run3FSMBMixing',
2760  offset = 0.303,
2761 )
2762 
2763 
2765  def setup_(self, step, stepName, stepDict, k, properties):
2766  if 'Run3' in stepDict[step][k]['--era'] and 'Fast' not in stepDict[step][k]['--era']:
2767  if '2023' in stepDict[step][k]['--conditions']:
2768  stepDict[stepName][k] = merge([{'--geometry': 'DD4hepExtended2023'}, stepDict[step][k]])
2769  else:
2770  stepDict[stepName][k] = merge([{'--geometry': 'DD4hepExtended2021'}, stepDict[step][k]])
2771  elif 'Phase2' in stepDict[step][k]['--era']:
2772  dd4hepGeom="DD4hep"
2773  dd4hepGeom+=stepDict[step][k]['--geometry']
2774  stepDict[stepName][k] = merge([{'--geometry' : dd4hepGeom, '--procModifiers': 'dd4hep'}, stepDict[step][k]])
2775  def condition(self, fragment, stepList, key, hasHarvest):
2776  return ('2021' in key or '2023' in key or '2026' in key) and ('FS' not in key)
2777 upgradeWFs['DD4hep'] = UpgradeWorkflow_DD4hep(
2778  steps = [
2779  'GenSim',
2780  'GenSimHLBeamSpot',
2781  'GenSimHLBeamSpot14',
2782  'Digi',
2783  'DigiTrigger',
2784  'Reco',
2785  'RecoFakeHLT',
2786  'RecoGlobal',
2787  'RecoNano',
2788  'RecoNanoFakeHLT',
2789  'HARVEST',
2790  'HARVESTFakeHLT',
2791  'HARVESTGlobal',
2792  'HARVESTNano',
2793  'HARVESTNanoFakeHLT',
2794  'ALCA',
2795  ],
2796  PU = [],
2797  suffix = '_DD4hep',
2798  offset = 0.911,
2799 )
2800 upgradeWFs['DD4hep'].allowReuse = False
2801 
2802 #This workflow is now obsolete, it becomes default for Run-3.
2803 #Keep it for future use in Phase-2, then delete
2805  def setup_(self, step, stepName, stepDict, k, properties):
2806  if 'Run3' in stepDict[step][k]['--era'] and 'Fast' not in stepDict[step][k]['--era']:
2807  stepDict[stepName][k] = merge([{'--conditions': 'auto:phase1_2022_realistic', '--geometry': 'DB:Extended'}, stepDict[step][k]])
2808  def condition(self, fragment, stepList, key, hasHarvest):
2809  return '2021' in key and 'FS' not in key
2810 upgradeWFs['DD4hepDB'] = UpgradeWorkflow_DD4hepDB(
2811  steps = [
2812  'GenSim',
2813  'GenSimHLBeamSpot',
2814  'GenSimHLBeamSpot14',
2815  'Digi',
2816  'DigiTrigger',
2817  'Reco',
2818  'RecoFakeHLT',
2819  'RecoGlobal',
2820  'RecoNano',
2821  'RecoNanoFakeHLT',
2822  'HARVEST',
2823  'HARVESTFakeHLT',
2824  'HARVESTGlobal',
2825  'HARVESTNano',
2826  'HARVESTNanoFakeHLT',
2827  'ALCA',
2828  ],
2829  PU = [],
2830  suffix = '_DD4hepDB',
2831  offset = 0.912,
2832 )
2833 upgradeWFs['DD4hepDB'].allowReuse = False
2834 
2836  def setup_(self, step, stepName, stepDict, k, properties):
2837  the_era = stepDict[step][k]['--era']
2838  if 'Run3' in the_era and '2023' not in the_era and '2024' not in the_era and 'Fast' not in the_era and "Pb" not in the_era:
2839  # retain any other eras
2840  tmp_eras = the_era.split(',')
2841  tmp_eras[tmp_eras.index("Run3")] = 'Run3_DDD'
2842  tmp_eras = ','.join(tmp_eras)
2843  stepDict[stepName][k] = merge([{'--conditions': 'auto:phase1_2022_realistic_ddd', '--geometry': 'DB:Extended', '--era': tmp_eras}, stepDict[step][k]])
2844  def condition(self, fragment, stepList, key, hasHarvest):
2845  return '2021' in key and 'FS' not in key
2846 upgradeWFs['DDDDB'] = UpgradeWorkflow_DDDDB(
2847  steps = [
2848  'GenSim',
2849  'GenSimHLBeamSpot',
2850  'GenSimHLBeamSpot14',
2851  'Digi',
2852  'DigiTrigger',
2853  'Reco',
2854  'RecoFakeHLT',
2855  'RecoGlobal',
2856  'RecoNano',
2857  'RecoNanoFakeHLT',
2858  'HARVEST',
2859  'HARVESTFakeHLT',
2860  'HARVESTGlobal',
2861  'HARVESTNano',
2862  'HARVESTNanoFakeHLT',
2863  'ALCA',
2864  ],
2865  PU = [],
2866  suffix = '_DDDDB',
2867  offset = 0.914,
2868 )
2869 upgradeWFs['DDDDB'].allowReuse = False
2870 
2872  def setup_(self, step, stepName, stepDict, k, properties):
2873  stepDict[stepName][k] = merge([{'--procModifiers': 'allSonicTriton'}, stepDict[step][k]])
2874  def condition(self, fragment, stepList, key, hasHarvest):
2875  return ((fragment=='TTbar_13' or fragment=='TTbar_14TeV') and '2021' in key) \
2876  or (fragment=='TTbar_14TeV' and '2026' in key)
2877 upgradeWFs['SonicTriton'] = UpgradeWorkflow_SonicTriton(
2878  steps = [
2879  'GenSim',
2880  'GenSimHLBeamSpot',
2881  'GenSimHLBeamSpot14',
2882  'Digi',
2883  'DigiTrigger',
2884  'Reco',
2885  'RecoFakeHLT',
2886  'RecoGlobal',
2887  'RecoNano',
2888  'RecoNanoFakeHLT',
2889  'HARVEST',
2890  'HARVESTFakeHLT',
2891  'HARVESTGlobal',
2892  'HARVESTNano',
2893  'HARVESTNanoFakeHLT',
2894  'ALCA',
2895  ],
2896  PU = [
2897  'GenSim',
2898  'GenSimHLBeamSpot',
2899  'GenSimHLBeamSpot14',
2900  'Digi',
2901  'DigiTrigger',
2902  'Reco',
2903  'RecoFakeHLT',
2904  'RecoGlobal',
2905  'RecoNano',
2906  'RecoNanoFakeHLT',
2907  'HARVEST',
2908  'HARVESTFakeHLT',
2909  'HARVESTGlobal',
2910  'HARVESTNano',
2911  'HARVESTNanoFakeHLT',
2912  'ALCA',
2913  ],
2914  suffix = '_SonicTriton',
2915  offset = 0.9001,
2916 )
2917 
2919  def setup_(self, step, stepName, stepDict, k, properties):
2920  stepDict[stepName][k] = merge([{'--procModifiers': 'phase2_pp_on_AA'}, stepDict[step][k]])
2921  if 'GenSim' in step:
2922  stepDict[stepName][k] = merge([{'--conditions': stepDict[step][k]["--conditions"].replace('_13TeV',''), '-n': 1}, stepDict[stepName][k]])
2923  elif 'Digi' in step:
2924  stepDict[stepName][k] = merge([{'-s': stepDict[step][k]["-s"].replace("DIGI:pdigi_valid","DIGI:pdigi_hi"), '--pileup': 'HiMixNoPU'}, stepDict[stepName][k]])
2925  def condition(self, fragment, stepList, key, hasHarvest):
2926  return fragment=='HydjetQMinBias_5519GeV' and '2026' in key and 'PU' not in key
2927 
2928 upgradeWFs['Phase2_HeavyIon'] = UpgradeWorkflow_Phase2_HeavyIon(
2929  steps = [
2930  'GenSimHLBeamSpot',
2931  'DigiTrigger',
2932  'RecoGlobal',
2933  'HARVESTGlobal',
2934  'ALCAPhase2'
2935  ],
2936  PU = [],
2937  suffix = '_hi',
2938  offset = 0.85,
2939 )
2940 
2941 # check for duplicates in offsets or suffixes
2942 offsets = [specialWF.offset for specialType,specialWF in upgradeWFs.items()]
2943 suffixes = [specialWF.suffix for specialType,specialWF in upgradeWFs.items()]
2944 
2945 dups = check_dups(offsets)
2946 if len(dups)>0:
2947  raise ValueError("Duplicate special workflow offsets not allowed: "+','.join([str(x) for x in dups]))
2948 
2949 dups = check_dups(suffixes)
2950 if len(dups)>0:
2951  raise ValueError("Duplicate special workflow suffixes not allowed: "+','.join([str(x) for x in dups]))
2952 
2953 upgradeProperties = {}
2954 
2955 upgradeProperties[2017] = {
2956  '2017' : {
2957  'Geom' : 'DB:Extended',
2958  'GT' : 'auto:phase1_2017_realistic',
2959  'HLTmenu': '@relval2017',
2960  'Era' : 'Run2_2017',
2961  'ScenToRun' : ['GenSim','Digi','RecoFakeHLT','HARVESTFakeHLT','ALCA','Nano'],
2962  },
2963  '2017Design' : {
2964  'Geom' : 'DB:Extended',
2965  'GT' : 'auto:phase1_2017_design',
2966  'HLTmenu': '@relval2017',
2967  'Era' : 'Run2_2017',
2968  'BeamSpot': 'DBdesign',
2969  'ScenToRun' : ['GenSim','Digi','RecoFakeHLT','HARVESTFakeHLT'],
2970  },
2971  '2018' : {
2972  'Geom' : 'DB:Extended',
2973  'GT' : 'auto:phase1_2018_realistic',
2974  'HLTmenu': '@relval2018',
2975  'Era' : 'Run2_2018',
2976  'BeamSpot': 'DBrealistic',
2977  'ScenToRun' : ['GenSim','Digi','RecoFakeHLT','HARVESTFakeHLT','ALCA','Nano'],
2978  },
2979  '2018Design' : {
2980  'Geom' : 'DB:Extended',
2981  'GT' : 'auto:phase1_2018_design',
2982  'HLTmenu': '@relval2018',
2983  'Era' : 'Run2_2018',
2984  'BeamSpot': 'DBdesign',
2985  'ScenToRun' : ['GenSim','Digi','RecoFakeHLT','HARVESTFakeHLT'],
2986  },
2987  '2021' : {
2988  'Geom' : 'DB:Extended',
2989  'GT' : 'auto:phase1_2022_realistic',
2990  'HLTmenu': '@relval2022',
2991  'Era' : 'Run3',
2992  'BeamSpot': 'DBrealistic',
2993  'ScenToRun' : ['GenSim','Digi','RecoNanoFakeHLT','HARVESTNanoFakeHLT','ALCA'],
2994  },
2995  '2021Design' : {
2996  'Geom' : 'DB:Extended',
2997  'GT' : 'auto:phase1_2022_design',
2998  'HLTmenu': '@relval2022',
2999  'Era' : 'Run3',
3000  'BeamSpot': 'DBdesign',
3001  'ScenToRun' : ['GenSim','Digi','RecoNanoFakeHLT','HARVESTNanoFakeHLT'],
3002  },
3003  '2023' : {
3004  'Geom' : 'DB:Extended',
3005  'GT' : 'auto:phase1_2023_realistic',
3006  'HLTmenu': '@relval2023',
3007  'Era' : 'Run3_2023',
3008  'BeamSpot': 'DBrealistic',
3009  'ScenToRun' : ['GenSim','Digi','RecoNanoFakeHLT','HARVESTNanoFakeHLT','ALCA'],
3010  },
3011  '2024' : {
3012  'Geom' : 'DB:Extended',
3013  'GT' : 'auto:phase1_2024_realistic',
3014  'HLTmenu': '@relval2024',
3015  'Era' : 'Run3_2024',
3016  'BeamSpot': 'DBrealistic',
3017  'ScenToRun' : ['GenSim','Digi','RecoNano','HARVESTNano','ALCA'],
3018  },
3019  '2024HLTOnDigi' : {
3020  'Geom' : 'DB:Extended',
3021  'GT' : 'auto:phase1_2024_realistic',
3022  'HLTmenu': '@relval2024',
3023  'Era' : 'Run3',
3024  'BeamSpot': 'DBrealistic',
3025  'ScenToRun' : ['GenSim','DigiNoHLT','HLTOnly','RecoNano','HARVESTNano','ALCA'],
3026  },
3027  '2021FS' : {
3028  'Geom' : 'DB:Extended',
3029  'GT' : 'auto:phase1_2022_realistic',
3030  'HLTmenu': '@relval2022',
3031  'Era' : 'Run3_FastSim',
3032  'BeamSpot': 'DBrealistic',
3033  'ScenToRun' : ['Gen','FastSimRun3','HARVESTFastRun3'],
3034  },
3035  '2021postEE' : {
3036  'Geom' : 'DB:Extended',
3037  'GT' : 'auto:phase1_2022_realistic_postEE',
3038  'HLTmenu': '@relval2022',
3039  'Era' : 'Run3',
3040  'BeamSpot': 'DBrealistic',
3041  'ScenToRun' : ['GenSim','Digi','RecoNanoFakeHLT','HARVESTNanoFakeHLT','ALCA'],
3042  },
3043  '2023FS' : {
3044  'Geom' : 'DB:Extended',
3045  'GT' : 'auto:phase1_2023_realistic',
3046  'HLTmenu': '@relval2023',
3047  'Era' : 'Run3_2023_FastSim',
3048  'BeamSpot': 'DBrealistic',
3049  'ScenToRun' : ['Gen','FastSimRun3','HARVESTFastRun3'],
3050  },
3051  '2022HI' : {
3052  'Geom' : 'DB:Extended',
3053  'GT':'auto:phase1_2022_realistic_hi',
3054  'HLTmenu': '@fake2',
3055  'Era':'Run3_pp_on_PbPb',
3056  'BeamSpot': 'DBrealistic',
3057  'ScenToRun' : ['GenSim','Digi','RecoNano','HARVESTNano','ALCA'],
3058  },
3059  '2022HIRP' : {
3060  'Geom' : 'DB:Extended',
3061  'GT':'auto:phase1_2022_realistic_hi',
3062  'HLTmenu': '@fake2',
3063  'Era':'Run3_pp_on_PbPb_approxSiStripClusters',
3064  'BeamSpot': 'DBrealistic',
3065  'ScenToRun' : ['GenSim','Digi','RecoNano','HARVESTNano','ALCA'],
3066  },
3067  '2023HI' : {
3068  'Geom' : 'DB:Extended',
3069  'GT':'auto:phase1_2023_realistic_hi',
3070  'HLTmenu': '@fake2',
3071  'Era':'Run3_pp_on_PbPb',
3072  'BeamSpot': 'DBrealistic',
3073  'ScenToRun' : ['GenSim','Digi','RecoNano','HARVESTNano','ALCA'],
3074  },
3075  '2023HIRP' : {
3076  'Geom' : 'DB:Extended',
3077  'GT':'auto:phase1_2023_realistic_hi',
3078  'HLTmenu': '@fake2',
3079  'Era':'Run3_pp_on_PbPb_approxSiStripClusters',
3080  'BeamSpot': 'DBrealistic',
3081  'ScenToRun' : ['GenSim','Digi','RecoNano','HARVESTNano','ALCA'],
3082  },
3083  '2024GenOnly' : {
3084  'Geom' : 'DB:Extended',
3085  'GT' : 'auto:phase1_2024_realistic',
3086  'Era' : 'Run3',
3087  'BeamSpot': 'DBrealistic',
3088  'ScenToRun' : ['Gen'],
3089  },
3090  '2024SimOnGen' : {
3091  'Geom' : 'DB:Extended',
3092  'GT' : 'auto:phase1_2024_realistic',
3093  'HLTmenu': '@relval2024',
3094  'Era' : 'Run3',
3095  'BeamSpot': 'DBrealistic',
3096  'ScenToRun' : ['Gen','Sim','Digi','RecoNano','HARVESTNano','ALCA'],
3097  },
3098 }
3099 
3100 # standard PU sequences
3101 for key in list(upgradeProperties[2017].keys()):
3102  upgradeProperties[2017][key+'PU'] = deepcopy(upgradeProperties[2017][key])
3103  if 'FS' not in key:
3104  # update ScenToRun list
3105  scenToRun = upgradeProperties[2017][key+'PU']['ScenToRun']
3106  for idx,val in enumerate(scenToRun):
3107  # Digi -> DigiPU, Reco* -> Reco*PU, HARVEST* -> HARVEST*PU
3108  scenToRun[idx] += 'PU'*(val.startswith('Digi') or val.startswith('Reco') or val.startswith('HARVEST'))
3109  # remove ALCA
3110  upgradeProperties[2017][key+'PU']['ScenToRun'] = [foo for foo in scenToRun if foo != 'ALCA']
3111  else:
3112  upgradeProperties[2017][key+'PU']['ScenToRun'] = ['Gen','FastSimRun3PU','HARVESTFastRun3PU']
3113 
3114 upgradeProperties[2026] = {
3115  '2026D86' : {
3116  'Geom' : 'Extended2026D86',
3117  'HLTmenu': '@fake2',
3118  'GT' : 'auto:phase2_realistic_T21',
3119  'Era' : 'Phase2C17I13M9',
3120  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3121  },
3122  '2026D88' : {
3123  'Geom' : 'Extended2026D88',
3124  'HLTmenu': '@relval2026',
3125  'GT' : 'auto:phase2_realistic_T21',
3126  'Era' : 'Phase2C17I13M9',
3127  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3128  },
3129  '2026D91' : {
3130  'Geom' : 'Extended2026D91',
3131  'HLTmenu': '@fake2',
3132  'GT' : 'auto:phase2_realistic_T30',
3133  'Era' : 'Phase2C17I13M9',
3134  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3135  },
3136  '2026D92' : {
3137  'Geom' : 'Extended2026D92',
3138  'HLTmenu': '@fake2',
3139  'GT' : 'auto:phase2_realistic_T21',
3140  'Era' : 'Phase2C17I13M9',
3141  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3142  },
3143  '2026D93' : {
3144  'Geom' : 'Extended2026D93',
3145  'HLTmenu': '@fake2',
3146  'GT' : 'auto:phase2_realistic_T21',
3147  'Era' : 'Phase2C17I13M9',
3148  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3149  },
3150  '2026D94' : {
3151  'Geom' : 'Extended2026D94',
3152  'HLTmenu': '@fake2',
3153  'GT' : 'auto:phase2_realistic_T21',
3154  'Era' : 'Phase2C20I13M9',
3155  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3156  },
3157  '2026D95' : {
3158  'Geom' : 'Extended2026D95',
3159  'HLTmenu': '@relval2026',
3160  'GT' : 'auto:phase2_realistic_T21',
3161  'Era' : 'Phase2C17I13M9',
3162  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3163  },
3164  '2026D96' : {
3165  'Geom' : 'Extended2026D96',
3166  'HLTmenu': '@fake2',
3167  'GT' : 'auto:phase2_realistic_T21',
3168  'Era' : 'Phase2C17I13M9',
3169  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3170  },
3171  '2026D97' : {
3172  'Geom' : 'Extended2026D97',
3173  'HLTmenu': '@fake2',
3174  'GT' : 'auto:phase2_realistic_T25',
3175  'Era' : 'Phase2C17I13M9',
3176  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3177  },
3178  '2026D98' : {
3179  'Geom' : 'Extended2026D98',
3180  'HLTmenu': '@relval2026',
3181  'GT' : 'auto:phase2_realistic_T25',
3182  'Era' : 'Phase2C17I13M9',
3183  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3184  },
3185  '2026D99' : {
3186  'Geom' : 'Extended2026D99',
3187  'HLTmenu': '@relval2026',
3188  'GT' : 'auto:phase2_realistic_T25',
3189  'Era' : 'Phase2C17I13M9',
3190  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3191  },
3192  '2026D100' : {
3193  'Geom' : 'Extended2026D100',
3194  'HLTmenu': '@relval2026',
3195  'GT' : 'auto:phase2_realistic_T25',
3196  'Era' : 'Phase2C17I13M9',
3197  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3198  },
3199  '2026D101' : {
3200  'Geom' : 'Extended2026D101',
3201  'HLTmenu': '@relval2026',
3202  'GT' : 'auto:phase2_realistic_T25',
3203  'Era' : 'Phase2C17I13M9',
3204  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3205  },
3206  '2026D102' : {
3207  'Geom' : 'Extended2026D102',
3208  'HLTmenu': '@relval2026',
3209  'GT' : 'auto:phase2_realistic_T33',
3210  'Era' : 'Phase2C17I13M9',
3211  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3212  },
3213  '2026D103' : {
3214  'Geom' : 'Extended2026D103',
3215  'HLTmenu': '@relval2026',
3216  'GT' : 'auto:phase2_realistic_T25',
3217  'Era' : 'Phase2C17I13M9',
3218  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3219  },
3220  '2026D104' : {
3221  'Geom' : 'Extended2026D104',
3222  'HLTmenu': '@relval2026',
3223  'GT' : 'auto:phase2_realistic_T33',
3224  'Era' : 'Phase2C22I13M9',
3225  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3226  },
3227  '2026D105' : {
3228  'Geom' : 'Extended2026D105',
3229  'HLTmenu': '@relval2026',
3230  'GT' : 'auto:phase2_realistic_T33',
3231  'Era' : 'Phase2C17I13M9',
3232  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3233  },
3234  '2026D106' : {
3235  'Geom' : 'Extended2026D106',
3236  'HLTmenu': '@relval2026',
3237  'GT' : 'auto:phase2_realistic_T33',
3238  'Era' : 'Phase2C22I13M9',
3239  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3240  },
3241  '2026D107' : {
3242  'Geom' : 'Extended2026D107',
3243  'HLTmenu': '@relval2026',
3244  'GT' : 'auto:phase2_realistic_T25',
3245  'Era' : 'Phase2C17I13M9',
3246  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3247  },
3248  '2026D108' : {
3249  'Geom' : 'Extended2026D108',
3250  'HLTmenu': '@relval2026',
3251  'GT' : 'auto:phase2_realistic_T33',
3252  'Era' : 'Phase2C17I13M9',
3253  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3254  },
3255  '2026D109' : {
3256  'Geom' : 'Extended2026D109',
3257  'HLTmenu': '@relval2026',
3258  'GT' : 'auto:phase2_realistic_T33',
3259  'Era' : 'Phase2C22I13M9',
3260  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3261  },
3262  '2026D110' : {
3263  'Geom' : 'Extended2026D110',
3264  'HLTmenu': '@relval2026',
3265  'GT' : 'auto:phase2_realistic_T33',
3266  'Era' : 'Phase2C17I13M9',
3267  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3268  },
3269  '2026D111' : {
3270  'Geom' : 'Extended2026D111',
3271  'HLTmenu': '@relval2026',
3272  'GT' : 'auto:phase2_realistic_T36',
3273  'Era' : 'Phase2C22I13M9',
3274  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3275  },
3276  '2026D112' : {
3277  'Geom' : 'Extended2026D112',
3278  'HLTmenu': '@relval2026',
3279  'GT' : 'auto:phase2_realistic_T37',
3280  'Era' : 'Phase2C22I13M9',
3281  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3282  },
3283  '2026D113' : {
3284  'Geom' : 'Extended2026D113',
3285  'HLTmenu': '@relval2026',
3286  'GT' : 'auto:phase2_realistic_T38',
3287  'Era' : 'Phase2C22I13M9',
3288  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3289  },
3290  '2026D114' : {
3291  'Geom' : 'Extended2026D114',
3292  'HLTmenu': '@relval2026',
3293  'GT' : 'auto:phase2_realistic_T33',
3294  'Era' : 'Phase2C17I13M9',
3295  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3296  },
3297  '2026D110GenOnly' : {
3298  'Geom' : 'Extended2026D110',
3299  'BeamSpot' : 'DBrealisticHLLHC',
3300  'GT' : 'auto:phase2_realistic_T33',
3301  'Era' : 'Phase2C17I13M9',
3302  'ScenToRun' : ['GenHLBeamSpot'],
3303  },
3304  '2026D110SimOnGen' : {
3305  'Geom' : 'Extended2026D110',
3306  'HLTmenu': '@relval2026',
3307  'BeamSpot' : 'DBrealisticHLLHC',
3308  'GT' : 'auto:phase2_realistic_T33',
3309  'Era' : 'Phase2C17I13M9',
3310  'ScenToRun' : ['GenHLBeamSpot','Sim','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3311  },
3312  '2026D115' : {
3313  'Geom' : 'Extended2026D115',
3314  'HLTmenu': '@relval2026',
3315  'GT' : 'auto:phase2_realistic_T33',
3316  'Era' : 'Phase2C20I13M9',
3317  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3318  },
3319 }
3320 
3321 # standard PU sequences
3322 for key in list(upgradeProperties[2026].keys()):
3323  upgradeProperties[2026][key+'PU'] = deepcopy(upgradeProperties[2026][key])
3324  upgradeProperties[2026][key+'PU']['ScenToRun'] = ['GenSimHLBeamSpot','DigiTriggerPU','RecoGlobalPU', 'HARVESTGlobalPU']
3325 
3326 # for relvals
3327 defaultDataSets = {}
3328 for year in upgradeKeys:
3329  for key in upgradeKeys[year]:
3330  if 'PU' in key: continue
3331  defaultDataSets[key] = ''
3332 
3333 
3335  def __init__(self, howMuch, dataset):
3336  self.howMuch = howMuch
3337  self.dataset = dataset
3338 
3339 upgradeFragments = OrderedDict([
3340  ('FourMuPt_1_200_pythia8_cfi', UpgradeFragment(Kby(10,100),'FourMuPt1_200')),
3341  ('SingleElectronPt10_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleElectronPt10')),
3342  ('SingleElectronPt35_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleElectronPt35')),
3343  ('SingleElectronPt1000_pythia8_cfi', UpgradeFragment(Kby(9,50),'SingleElectronPt1000')),
3344  ('SingleGammaPt10_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleGammaPt10')),
3345  ('SingleGammaPt35_pythia8_cfi', UpgradeFragment(Kby(9,50),'SingleGammaPt35')),
3346  ('SingleMuPt1_pythia8_cfi', UpgradeFragment(Kby(25,100),'SingleMuPt1')),
3347  ('SingleMuPt10_Eta2p85_cfi', UpgradeFragment(Kby(9,100),'SingleMuPt10')),
3348  ('SingleMuPt100_Eta2p85_cfi', UpgradeFragment(Kby(9,100),'SingleMuPt100')),
3349  ('SingleMuPt1000_Eta2p85_cfi', UpgradeFragment(Kby(9,100),'SingleMuPt1000')),
3350  ('FourMuExtendedPt_1_200_pythia8_cfi', UpgradeFragment(Kby(10,100),'FourMuExtendedPt1_200')),
3351  ('TenMuExtendedE_0_200_pythia8_cfi', UpgradeFragment(Kby(10,100),'TenMuExtendedE_0_200')),
3352  ('DoubleElectronPt10Extended_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleElPt10Extended')),
3353  ('DoubleElectronPt35Extended_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleElPt35Extended')),
3354  ('DoubleElectronPt1000Extended_pythia8_cfi', UpgradeFragment(Kby(9,50),'SingleElPt1000Extended')),
3355  ('DoubleGammaPt10Extended_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleGammaPt10Extended')),
3356  ('DoubleGammaPt35Extended_pythia8_cfi', UpgradeFragment(Kby(9,50),'SingleGammaPt35Extended')),
3357  ('DoubleMuPt1Extended_pythia8_cfi', UpgradeFragment(Kby(25,100),'SingleMuPt1Extended')),
3358  ('DoubleMuPt10Extended_pythia8_cfi', UpgradeFragment(Kby(25,100),'SingleMuPt10Extended')),
3359  ('DoubleMuPt100Extended_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleMuPt100Extended')),
3360  ('DoubleMuPt1000Extended_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleMuPt1000Extended')),
3361  ('TenMuE_0_200_pythia8_cfi', UpgradeFragment(Kby(10,100),'TenMuE_0_200')),
3362  ('SinglePiE50HCAL_pythia8_cfi', UpgradeFragment(Kby(50,500),'SinglePiE50HCAL')),
3363  ('MinBias_13TeV_pythia8_TuneCUETP8M1_cfi', UpgradeFragment(Kby(90,100),'MinBias_13')),
3364  ('TTbar_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'TTbar_13')),
3365  ('ZEE_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'ZEE_13')),
3366  ('QCD_Pt_600_800_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'QCD_Pt_600_800_13')),
3367  ('Wjet_Pt_80_120_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'Wjet_Pt_80_120_14TeV')),
3368  ('Wjet_Pt_3000_3500_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'Wjet_Pt_3000_3500_14TeV')),
3369  ('LM1_sfts_14TeV_cfi', UpgradeFragment(Kby(9,100),'LM1_sfts_14TeV')),
3370  ('QCD_Pt_3000_3500_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'QCD_Pt_3000_3500_14TeV')),
3371  ('QCD_Pt_80_120_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'QCD_Pt_80_120_14TeV')),
3372  ('H200ChargedTaus_Tauola_14TeV_cfi', UpgradeFragment(Kby(9,100),'Higgs200ChargedTaus_14TeV')),
3373  ('JpsiMM_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(66,100),'JpsiMM_14TeV')),
3374  ('TTbar_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,100),'TTbar_14TeV')),
3375  ('WE_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'WE_14TeV')),
3376  ('ZTT_Tauola_All_hadronic_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,100),'ZTT_14TeV')),
3377  ('H130GGgluonfusion_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'H130GGgluonfusion_14TeV')),
3378  ('PhotonJet_Pt_10_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'PhotonJets_Pt_10_14TeV')),
3379  ('QQH1352T_Tauola_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'QQH1352T_Tauola_14TeV')),
3380  ('MinBias_14TeV_pythia8_TuneCP5_cfi', UpgradeFragment(Kby(90,100),'MinBias_14TeV')),
3381  ('WToMuNu_14TeV_TuneCP5_pythia8_cfi', UpgradeFragment(Kby(9,100),'WToMuNu_14TeV')),
3382  ('ZMM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(18,100),'ZMM_13')),
3383  ('QCDForPF_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(50,100),'QCD_FlatPt_15_3000HS_14')),
3384  ('DYToLL_M-50_14TeV_pythia8_cff', UpgradeFragment(Kby(9,100),'DYToLL_M_50_14TeV')),
3385  ('DYToTauTau_M-50_14TeV_pythia8_tauola_cff', UpgradeFragment(Kby(9,100),'DYtoTauTau_M_50_14TeV')),
3386  ('ZEE_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,100),'ZEE_14')),
3387  ('QCD_Pt_80_120_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'QCD_Pt_80_120_13')),
3388  ('H125GGgluonfusion_13TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,50),'H125GGgluonfusion_13')),
3389  ('QCD_Pt20toInf_MuEnrichedPt15_14TeV_TuneCP5_cff', UpgradeFragment(Kby(19565, 217391),'QCD_Pt20toInfMuEnrichPt15_14')), # effi = 4.6e-4, local=8.000e-04
3390  ('ZMM_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(18,100),'ZMM_14')),
3391  ('QCD_Pt15To7000_Flat_14TeV_TuneCP5_cff', UpgradeFragment(Kby(9,50),'QCD_Pt15To7000_Flat_14')),
3392  ('H125GGgluonfusion_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,50),'H125GGgluonfusion_14')),
3393  ('QCD_Pt_600_800_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'QCD_Pt_600_800_14')),
3394  ('UndergroundCosmicSPLooseMu_cfi', UpgradeFragment(Kby(9,50),'CosmicsSPLoose')),
3395  ('BeamHalo_13TeV_cfi', UpgradeFragment(Kby(9,50),'BeamHalo_13')),
3396  ('H200ChargedTaus_Tauola_13TeV_cfi', UpgradeFragment(Kby(9,50),'Higgs200ChargedTaus_13')),
3397  ('ADDMonoJet_13TeV_d3MD3_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'ADDMonoJet_d3MD3_13')),
3398  ('ZpMM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'ZpMM_13')),
3399  ('QCD_Pt_3000_3500_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'QCD_Pt_3000_3500_13')),
3400  ('WpM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'WpM_13')),
3401  ('SingleNuE10_cfi', UpgradeFragment(Kby(9,50),'NuGun')),
3402  ('TTbarLepton_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'TTbarLepton_13')),
3403  ('WE_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'WE_13')),
3404  ('WM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'WM_13')),
3405  ('ZTT_All_hadronic_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'ZTT_13')),
3406  ('PhotonJet_Pt_10_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'PhotonJets_Pt_10_13')),
3407  ('QQH1352T_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'QQH1352T_13')),
3408  ('Wjet_Pt_80_120_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'Wjet_Pt_80_120_13')),
3409  ('Wjet_Pt_3000_3500_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'Wjet_Pt_3000_3500_13')),
3410  ('SMS-T1tttt_mGl-1500_mLSP-100_13TeV-pythia8_cfi', UpgradeFragment(Kby(9,50),'SMS-T1tttt_mGl-1500_mLSP-100_13')),
3411  ('QCDForPF_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(50,100),'QCD_FlatPt_15_3000HS_13')),
3412  ('PYTHIA8_PhiToMuMu_TuneCUETP8M1_13TeV_cff', UpgradeFragment(Kby(9,50),'PhiToMuMu_13')),
3413  ('RSKKGluon_m3000GeV_13TeV_TuneCUETP8M1_cff', UpgradeFragment(Kby(9,50),'RSKKGluon_m3000GeV_13')),
3414  ('ZpMM_2250_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'ZpMM_2250_13')),
3415  ('ZpEE_2250_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'ZpEE_2250_13')),
3416  ('ZpTT_1500_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'ZpTT_1500_13')),
3417  ('Upsilon1SToMuMu_forSTEAM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'Upsilon1SToMuMu_13')),
3418  ('EtaBToJpsiJpsi_forSTEAM_TuneCUEP8M1_13TeV_cfi', UpgradeFragment(Kby(9,50),'EtaBToJpsiJpsi_13')),
3419  ('JpsiMuMu_Pt-8_forSTEAM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(3100,100000),'JpsiMuMu_Pt-8')),
3420  ('BuMixing_BMuonFilter_forSTEAM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(900,10000),'BuMixing_13')),
3421  ('HSCPstop_M_200_TuneCUETP8M1_13TeV_pythia8_cff', UpgradeFragment(Kby(9,50),'HSCPstop_M_200_13')),
3422  ('RSGravitonToGammaGamma_kMpl01_M_3000_TuneCUETP8M1_13TeV_pythia8_cfi', UpgradeFragment(Kby(9,50),'RSGravitonToGaGa_13')),
3423  ('WprimeToENu_M-2000_TuneCUETP8M1_13TeV-pythia8_cff', UpgradeFragment(Kby(9,50),'WpToENu_M-2000_13')),
3424  ('DisplacedSUSY_stopToBottom_M_800_500mm_TuneCP5_13TeV_pythia8_cff', UpgradeFragment(Kby(9,50),'DisplacedSUSY_stopToB_M_800_500mm_13')),
3425  ('TenE_E_0_200_pythia8_cfi', UpgradeFragment(Kby(9,100),'TenE_0_200')),
3426  ('FlatRandomPtAndDxyGunProducer_cfi', UpgradeFragment(Kby(9,100),'DisplacedMuonsDxy_0_500')),
3427  ('TenTau_E_15_500_pythia8_cfi', UpgradeFragment(Kby(9,100),'TenTau_15_500')),
3428  ('SinglePiPt25Eta1p7_2p7_cfi', UpgradeFragment(Kby(9,100),'SinglePiPt25Eta1p7_2p7')),
3429  ('SingleMuPt15Eta1p7_2p7_cfi', UpgradeFragment(Kby(9,100),'SingleMuPt15Eta1p7_2p7')),
3430  ('SingleGammaPt25Eta1p7_2p7_cfi', UpgradeFragment(Kby(9,100),'SingleGammaPt25Eta1p7_2p7')),
3431  ('SingleElectronPt15Eta1p7_2p7_cfi', UpgradeFragment(Kby(9,100),'SingleElectronPt15Eta1p7_2p7')),
3432  ('ZTT_All_hadronic_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,50),'ZTT_14')),
3433  ('CloseByParticle_Photon_ERZRanges_cfi', UpgradeFragment(Kby(9,100),'CloseByParticleGun')),
3434  ('CE_E_Front_300um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_E_Front_300um')),
3435  ('CE_E_Front_200um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_E_Front_200um')),
3436  ('CE_E_Front_120um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_E_Front_120um')),
3437  ('CE_H_Fine_300um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_H_Fine_300um')),
3438  ('CE_H_Fine_200um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_H_Fine_200um')),
3439  ('CE_H_Fine_120um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_H_Fine_120um')),
3440  ('CE_H_Coarse_Scint_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_H_Coarse_Scint')),
3441  ('CE_H_Coarse_300um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_H_Coarse_300um')),
3442  ('SingleElectronFlatPt2To100_cfi', UpgradeFragment(Kby(9,100),'SingleEFlatPt2To100')),
3443  ('SingleMuFlatPt0p7To10_cfi', UpgradeFragment(Kby(9,100),'SingleMuFlatPt0p7To10')),
3444  ('SingleMuFlatPt2To100_cfi', UpgradeFragment(Kby(9,100),'SingleMuFlatPt2To100')),
3445  ('SingleGammaFlatPt8To150_cfi', UpgradeFragment(Kby(9,100),'SingleGammaFlatPt8To150')),
3446  ('SinglePiFlatPt0p7To10_cfi', UpgradeFragment(Kby(9,100),'SinglePiFlatPt0p7To10')),
3447  ('SingleTauFlatPt2To150_cfi', UpgradeFragment(Kby(9,100),'SingleTauFlatPt2To150')),
3448  ('FlatRandomPtAndDxyGunProducer_MuPt2To10_cfi', UpgradeFragment(Kby(9,100),'DisplacedMuPt2To10')),
3449  ('FlatRandomPtAndDxyGunProducer_MuPt10To30_cfi', UpgradeFragment(Kby(9,100),'DisplacedMuPt10To30')),
3450  ('FlatRandomPtAndDxyGunProducer_MuPt30To100_cfi', UpgradeFragment(Kby(9,100),'DisplacedMuPt30To100')),
3451  ('B0ToKstarMuMu_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(304,3030),'B0ToKstarMuMu_14TeV')), # 3.3%
3452  ('BsToEleEle_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(223,2222),'BsToEleEle_14TeV')), # 4.5%
3453  ('BsToJpsiGamma_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(2500,25000),'BsToJpsiGamma_14TeV')), # 0.4%
3454  ('BsToJpsiPhi_mumuKK_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(910,9090),'BsToJpsiPhi_mumuKK_14TeV')), # 1.1%
3455  ('BsToMuMu_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(313,3125),'BsToMuMu_14TeV')), # 3.2%
3456  ('BsToPhiPhi_KKKK_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(556,5555),'BsToPhiPhi_KKKK_14TeV')), # 1.8%
3457  ('TauToMuMuMu_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(18939,189393),'TauToMuMuMu_14TeV')), # effi = 5.280e-04
3458  ('BdToKstarEleEle_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(206,2061),'BdToKstarEleEle_14TeV')), #effi = 4.850e-02
3459  ('ZpTT_1500_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,50),'ZpTT_1500_14')),
3460  ('BuMixing_BMuonFilter_forSTEAM_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(900,10000),'BuMixing_14')),
3461  ('Upsilon1SToMuMu_forSTEAM_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,50),'Upsilon1SToMuMu_14')),
3462  ('TenTau_E_15_500_Eta3p1_pythia8_cfi', UpgradeFragment(Kby(9,100),'TenTau_15_500_Eta3p1')),
3463  ('QCD_Pt_1800_2400_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,50), 'QCD_Pt_1800_2400_14')),
3464  ('DisplacedSUSY_stopToBottom_M_800_500mm_TuneCP5_14TeV_pythia8_cff', UpgradeFragment(Kby(9,50),'DisplacedSUSY_14TeV')),
3465  ('GluGluTo2Jets_M_300_2000_14TeV_Exhume_cff',UpgradeFragment(Kby(9,100),'GluGluTo2Jets_14TeV')),
3466  ('TTbarToDilepton_mt172p5_TuneCP5_14TeV_pythia8_cfi',UpgradeFragment(Kby(9,50),'TTbarToDilepton_14TeV')),
3467  ('QQToHToTauTau_mh125_TuneCP5_14TeV_pythia8_cfi',UpgradeFragment(Kby(9,50),'QQToHToTauTau_14TeV')),
3468  ('ZpToEE_m6000_TuneCP5_14TeV_pythia8_cfi',UpgradeFragment(Kby(9,50),'ZpToEE_m6000_14TeV')),
3469  ('ZpToMM_m6000_TuneCP5_14TeV_pythia8_cfi',UpgradeFragment(Kby(9,50),'ZpToMM_m6000_14TeV')),
3470  ('SMS-T1tttt_mGl-1500_mLSP-100_TuneCP5_14TeV_pythia8_cfi',UpgradeFragment(Kby(9,50),'SMS-T1tttt_14TeV')),
3471  ('VBFHZZ4Nu_TuneCP5_14TeV_pythia8_cfi',UpgradeFragment(Kby(9,50),'VBFHZZ4Nu_14TeV')),
3472  ('EtaBToJpsiJpsi_14TeV_TuneCP5_pythia8_cfi',UpgradeFragment(Kby(9,50),'EtaBToJpsiJpsi_14TeV')),
3473  ('WToLNu_14TeV_TuneCP5_pythia8_cfi',UpgradeFragment(Kby(21,50),'WToLNu_14TeV')),
3474  ('WprimeToLNu_M2000_14TeV_TuneCP5_pythia8_cfi',UpgradeFragment(Kby(21,50),'WprimeToLNu_M2000_14TeV')),
3475  ('DoubleMuFlatPt1p5To8_cfi', UpgradeFragment(Kby(9,100),'SingleMuFlatPt1p5To8')),
3476  ('DoubleElectronFlatPt1p5To8_cfi', UpgradeFragment(Kby(9,100),'SingleElectronFlatPt1p5To8')),
3477  ('DoubleMuFlatPt1p5To8Dxy100GunProducer_cfi', UpgradeFragment(Kby(9,100),'DisplacedMuPt1p5To8Dxy100')),
3478  ('DoubleMuFlatPt2To100Dxy100GunProducer_cfi', UpgradeFragment(Kby(9,100),'DisplacedMuPt2To100Dxy100')),
3479  ('BuToJPsiPrimeKToJPsiPiPiK_14TeV_TuneCP5_pythia8_cfi', UpgradeFragment(Kby(223,2222),'BuToJPsiPrimeKToJPsiPiPiK_14TeV')), # 5.7%
3480  ('Psi2SToJPsiPiPi_14TeV_TuneCP5_pythia8_cfi', UpgradeFragment(Kby(45,500),'Psi2SToJPsiPiPi_14TeV')), # 24.6%
3481  ('XiMinus_13p6TeV_SoftQCDInel_TuneCP5_cfi', UpgradeFragment(Kby(8000,90000),'XiMinus_13p6TeV')), #2.8%
3482  ('Chib1PToUpsilon1SGamma_MuFilter_TuneCP5_14TeV-pythia8_evtgen_cfi', UpgradeFragment(Kby(3600,36000),'Chib1PToUpsilon1SGamma_14TeV')), #2.8%
3483  ('ChicToJpsiGamma_MuFilter_TuneCP5_14TeV_pythia8_evtgen_cfi', UpgradeFragment(Kby(2000,20000),'ChicToJpsiGamma_14TeV')), #5%
3484  ('B0ToJpsiK0s_JMM_Filter_DGamma0_TuneCP5_13p6TeV-pythia8-evtgen_cfi',UpgradeFragment(Kby(38000,38000),'B0ToJpsiK0s_DGamma0_13p6TeV')), #2.7%
3485  ('DStarToD0Pi_D0ToKsPiPi_inclusive_SoftQCD_TuneCP5_13p6TeV-pythia8-evtgen',UpgradeFragment(Kby(38000,38000),'DStarToD0Pi_D0ToKsPiPi_13p6TeV')), #1.3%
3486  ('LbToJpsiLambda_JMM_Filter_DGamma0_TuneCP5_13p6TeV-pythia8-evtgen_cfi',UpgradeFragment(Mby(66,660000),'LbToJpsiLambda_DGamma0_13p6TeV')), #0.3%
3487  ('LbToJpsiXiK0sPi_JMM_Filter_DGamma0_TuneCP5_13p6TeV-pythia8-evtgen_cfi',UpgradeFragment(Mby(50,500000),'LbToJpsiXiK0sPr_DGamma0_13p6TeV')), #0.6%
3488  ('OmegaMinus_13p6TeV_SoftQCDInel_TuneCP5_cfi',UpgradeFragment(Mby(100,1000000),'OmegaMinus_13p6TeV')), #0.1%
3489  ('Hydjet_Quenched_MinBias_5020GeV_cfi', UpgradeFragment(U2000by1,'HydjetQMinBias_5020GeV')),
3490  ('Hydjet_Quenched_MinBias_5362GeV_cfi', UpgradeFragment(U2000by1,'HydjetQMinBias_5362GeV')),
3491  ('Hydjet_Quenched_MinBias_5519GeV_cfi', UpgradeFragment(U2000by1,'HydjetQMinBias_5519GeV')),
3492 ])
def condition(self, fragment, stepList, key, hasHarvest)
def setup_(self, step, stepName, stepDict, k, properties)
def condition(self, fragment, stepList, key, hasHarvest)
def setupPU_(self, step, stepName, stepDict, k, properties)
Definition: merge.py:1
def condition(self, fragment, stepList, key, hasHarvest)
def setup_(self, step, stepName, stepDict, k, properties)
def condition(self, fragment, stepList, key, hasHarvest)
def setup_(self, step, stepName, stepDict, k, properties)
def setup_(self, step, stepName, stepDict, k, properties)
def setup_(self, step, stepName, stepDict, k, properties)
def setupPU_(self, step, stepName, stepDict, k, properties)
def setup_(self, step, stepName, stepDict, k, properties)
def setup_(self, step, stepName, stepDict, k, properties)
def condition(self, fragment, stepList, key, hasHarvest)
def condition(self, fragment, stepList, key, hasHarvest)
Wf to add Heavy Flavor DQM to whichever DQM is already there.
def setup_(self, step, stepName, stepDict, k, properties)
def setup_(self, step, stepName, stepDict, k, properties)
def setup_(self, step, stepName, stepDict, k, properties)
def condition(self, fragment, stepList, key, hasHarvest)
bool any(const std::vector< T > &v, const T &what)
Definition: ECalSD.cc:37
def setupPU(self, stepDict, k, properties)
def condition(self, fragment, stepList, key, hasHarvest)
def condition(self, fragment, stepList, key, hasHarvest)
def condition_(self, fragment, stepList, key, hasHarvest)
def condition(self, fragment, stepList, key, hasHarvest)
def condition(self, fragment, stepList, key, hasHarvest)
def condition(self, fragment, stepList, key, hasHarvest)
def setup_(self, step, stepName, stepDict, k, properties)
def setupPU_(self, step, stepName, stepDict, k, properties)
def replace(string, replacements)
def setup_(self, step, stepName, stepDict, k, properties)
def condition(self, fragment, stepList, key, hasHarvest)
def condition(self, fragment, stepList, key, hasHarvest)
def condition(self, fragment, stepList, key, hasHarvest)
def setup_(self, step, stepName, stepDict, k, properties)
def workflow_(self, workflows, num, fragment, stepList, key)
def condition(self, fragment, stepList, key, hasHarvest)
def workflow_(self, workflows, num, fragment, stepList, key)
def setup_(self, step, stepName, stepDict, k, properties)
def setup_(self, step, stepName, stepDict, k, properties)
def condition(self, fragment, stepList, key, hasHarvest)
def condition(self, fragment, stepList, key, hasHarvest)
def condition_(self, fragment, stepList, key, hasHarvest)
def setup_(self, step, stepName, stepDict, k, properties)
def setup__(self, step, stepName, stepDict, k, properties)
def setup_(self, step, stepName, stepDict, k, properties)
def condition(self, fragment, stepList, key, hasHarvest)
def condition(self, fragment, stepList, key, hasHarvest)
def condition(self, fragment, stepList, key, hasHarvest)
def setupPU_(self, step, stepName, stepDict, k, properties)
def __init__(self, digi={}, reco={}, harvest={}, kwargs)
def condition(self, fragment, stepList, key, hasHarvest)
def setup_(self, step, stepName, stepDict, k, properties)
def workflow(self, workflows, num, fragment, stepList, key, hasHarvest)
def setup_(self, step, stepName, stepDict, k, properties)
def setup_(self, step, stepName, stepDict, k, properties)
def condition(self, fragment, stepList, key, hasHarvest)
def __init__(self, suffix, offset, ecalTPPh2, ecalMod, steps=['GenSim', GenSimHLBeamSpot, GenSimHLBeamSpot14, GenSimHLBeamSpotHGCALCloseBy, Digi, DigiTrigger, RecoGlobal, HARVESTGlobal, ALCAPhase2, PU=['GenSim', GenSimHLBeamSpot, GenSimHLBeamSpot14, GenSimHLBeamSpotHGCALCloseBy, Digi, DigiTrigger, RecoGlobal, HARVESTGlobal, ALCAPhase2)
def setup_(self, step, stepName, stepDict, k, properties)
def condition(self, fragment, stepList, key, hasHarvest)
def setup_(self, step, stepName, stepDict, k, properties)
def setup_(self, step, stepName, stepDict, k, properties)
def setup_(self, step, stepName, stepDict, k, properties)
def condition(self, fragment, stepList, key, hasHarvest)
def condition(self, fragment, stepList, key, hasHarvest)
def setup__(self, step, stepName, stepDict, k, properties)
def condition(self, fragment, stepList, key, hasHarvest)
def setupPU_(self, step, stepName, stepDict, k, properties)
def setup_(self, step, stepName, stepDict, k, properties)
def __init__(self, digi={}, reco={}, mini={}, harvest={}, kwargs)
def setup_(self, step, stepName, stepDict, k, properties)
def setup__(self, step, stepName, stepDict, k, properties)
def condition(self, fragment, stepList, key, hasHarvest)
def condition_(self, fragment, stepList, key, hasHarvest)
def setup_(self, step, stepName, stepDict, k, properties)
def setup__(self, step, stepName, stepDict, k, properties)
def condition_(self, fragment, stepList, key, hasHarvest)
def setup_(self, step, stepName, stepDict, k, properties)
def setup_(self, step, stepName, stepDict, k, properties)
def check_dups(input)
Definition: MatrixUtil.py:279
static std::string join(char **cmd)
Definition: RemoteFile.cc:21
def condition(self, fragment, stepList, key, hasHarvest)
def setup_(self, step, stepName, stepDict, k, properties)
def setup_(self, step, stepName, stepDict, k, properties)
def setup_(self, step, stepName, stepDict, k, properties)
def condition(self, fragment, stepList, key, hasHarvest)
def condition(self, fragment, stepList, key, hasHarvest)
def condition_(self, fragment, stepList, key, hasHarvest)
def setup__(self, step, stepName, stepDict, k, properties)
def setup__(self, step, stepName, stepDict, k, properties)
#define update(a, b)
def Mby(N, s)
Definition: MatrixUtil.py:247
def setup_(self, step, stepName, stepDict, k, properties)
def setup_(self, step, stepName, stepDict, k, properties)
def condition(self, fragment, stepList, key, hasHarvest)
def condition(self, fragment, stepList, key, hasHarvest)
def setup_(self, step, stepName, stepDict, k, properties)
def setup__(self, step, stepName, stepDict, k, properties)
def condition_(self, fragment, stepList, key, hasHarvest)
def setup_(self, step, stepName, stepDict, k, properties)
def setup_(self, step, stepName, stepDict, k, properties)
def Kby(N, s)
Standard release validation samples ####.
Definition: MatrixUtil.py:245
def __init__(self, steps, PU, suffix, offset)
def setup_(self, step, stepName, stepDict, k, properties)
def condition(self, fragment, stepList, key, hasHarvest)
def setup__(self, step, stepName, stepDict, k, properties)
def setup_(self, step, stepName, stepDict, k, properties)
#define str(s)
def condition(self, fragment, stepList, key, hasHarvest)
def condition(self, fragment, stepList, key, hasHarvest)
def __init__(self, suffix, offset, fixedPU, steps=[], PU=['GenSimHLBeamSpot14', Digi, DigiTrigger, Reco, RecoFakeHLT, RecoGlobal, RecoNano, RecoNanoFakeHLT, HARVEST, HARVESTFakeHLT, HARVESTGlobal, HARVESTNano, HARVESTNanoFakeHLT, MiniAOD, ALCA, ALCAPhase2, Nano)
def condition(self, fragment, stepList, key, hasHarvest)
def condition(self, fragment, stepList, key, hasHarvest)
def condition(self, fragment, stepList, key, hasHarvest)
def condition(self, fragment, stepList, key, hasHarvest)
def setup__(self, step, stepName, stepDict, k, properties)
def condition_(self, fragment, stepList, key, hasHarvest)
def condition(self, fragment, stepList, key, hasHarvest)