CMS 3D CMS Logo

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  # avoid spurious workflows (no steps modified)
168  if self.offset==0 or workflows[num][1]!=stepList:
169  workflows[num+self.offset] = [ fragmentTmp, stepList ]
170  def condition(self, fragment, stepList, key, hasHarvest):
171  return False
172  def preventReuse(self, stepName, stepDict, k):
173  if "Sim" in stepName and stepName != "Sim":
174  stepDict[stepName][k] = None
175  if "Gen" in stepName:
176  stepDict[stepName][k] = None
177 upgradeWFs = OrderedDict()
178 
180  def setup_(self, step, stepName, stepDict, k, properties):
181  cust=properties.get('Custom', None)
182  era=properties.get('Era', None)
183  modifier=properties.get('ProcessModifier',None)
184  if cust is not None: stepDict[stepName][k]['--customise']=cust
185  if era is not None:
186  stepDict[stepName][k]['--era']=era
187  if modifier is not None: stepDict[stepName][k]['--procModifier']=modifier
188  def condition(self, fragment, stepList, key, hasHarvest):
189  return True
190 upgradeWFs['baseline'] = UpgradeWorkflow_baseline(
191  steps = [
192  'Gen',
193  'GenHLBeamSpot',
194  'GenHLBeamSpot14',
195  'Sim',
196  'GenSim',
197  'GenSimHLBeamSpot',
198  'GenSimHLBeamSpot14',
199  'GenSimHLBeamSpotHGCALCloseBy',
200  'Digi',
201  'DigiNoHLT',
202  'DigiTrigger',
203  'HLTRun3',
204  'HLTOnly',
205  'RecoLocal',
206  'Reco',
207  'RecoFakeHLT',
208  'RecoGlobal',
209  'RecoNano',
210  'RecoNanoFakeHLT',
211  'HARVEST',
212  'HARVESTFakeHLT',
213  'HARVESTNano',
214  'HARVESTNanoFakeHLT',
215  'FastSim',
216  'HARVESTFast',
217  'HARVESTGlobal',
218  'ALCA',
219  'ALCAPhase2',
220  'Nano',
221  'MiniAOD',
222  'HLT75e33',
223  'FastSimRun3',
224  'HARVESTFastRun3',
225  ],
226  PU = [
227  'DigiTrigger',
228  'RecoLocal',
229  'RecoGlobal',
230  'Digi',
231  'DigiNoHLT',
232  'HLTOnly',
233  'Reco',
234  'RecoFakeHLT',
235  'RecoNano',
236  'RecoNanoFakeHLT',
237  'HARVEST',
238  'HARVESTFakeHLT',
239  'HARVESTNano',
240  'HARVESTNanoFakeHLT',
241  'HARVESTGlobal',
242  'MiniAOD',
243  'Nano',
244  'HLT75e33',
245  'FastSimRun3',
246  'HARVESTFastRun3',
247  ],
248  suffix = '',
249  offset = 0.0,
250 )
251 
252 
254  def setup_(self, step, stepName, stepDict, k, properties):
255  if stepDict[step][k] != None:
256  if 'ALCA' in step:
257  stepDict[stepName][k] = None
258  if 'RecoNano' in step:
259  stepDict[stepName][k] = merge([{'--filein': 'file:step3.root', '--secondfilein': 'file:step2.root'}, stepDict[step][k]])
260  if 'Digi' in step and 'NoHLT' not in step:
261  stepDict[stepName][k] = merge([{'-s': re.sub(',HLT.*', '', stepDict[step][k]['-s'])}, stepDict[step][k]])
262  def condition(self, fragment, stepList, key, hasHarvest):
263  if ('TTbar_14TeV' in fragment and '2021' == key):
264  stepList.insert(stepList.index('Digi_DigiNoHLT_2021')+1, 'HLTRun3_2021')
265  return ('TTbar_14TeV' in fragment and '2021' == key)
266 upgradeWFs['DigiNoHLT'] = UpgradeWorkflow_DigiNoHLT(
267  steps = [
268  'Digi',
269  'RecoNano',
270  'RecoNanoFakeHLT',
271  'ALCA'
272  ],
273  PU = [],
274  suffix = '_DigiNoHLT',
275  offset = 0.601,
276 )
277 
278 # some commonalities among tracking WFs
280 
281  def __init__(self, steps, PU, suffix, offset):
282  # always include some steps that will be skipped
283  steps = steps + ["ALCA","Nano"]
284  super().__init__(steps, PU, suffix, offset)
285  def condition(self, fragment, stepList, key, hasHarvest):
286  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)
287  return result
288  def condition_(self, fragment, stepList, key, hasHarvest):
289  return True
290  def setup_(self, step, stepName, stepDict, k, properties):
291  # skip ALCA and Nano steps (but not RecoNano or HARVESTNano for Run3)
292  if 'ALCA' in step or 'Nano'==step:
293  stepDict[stepName][k] = None
294  self.setup__(step, stepName, stepDict, k, properties)
295  # subordinate function for inherited classes
296  def setup__(self, step, stepName, stepDict, k, properties):
297  pass
298 
299 class UpgradeWorkflow_trackingOnly(UpgradeWorkflowTracking):
300  def setup__(self, step, stepName, stepDict, k, properties):
301  if 'Reco' in step: stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
302  elif 'HARVEST' in step: stepDict[stepName][k] = merge([{'-s': 'HARVESTING:@trackingOnlyValidation+@trackingOnlyDQM'}, stepDict[step][k]])
303 
304  def condition(self, fragment, stepList, key, hasHarvest):
305  result = (fragment=="TTbar_13" or fragment=="TTbar_14TeV") and hasHarvest and self.condition_(fragment, stepList, key, hasHarvest)
306  return result
307 
308 
309 
310 upgradeWFs['trackingOnly'] = UpgradeWorkflow_trackingOnly(
311  steps = [
312  'Reco',
313  'RecoFakeHLT',
314  'HARVEST',
315  'HARVESTFakeHLT',
316  'RecoGlobal',
317  'HARVESTGlobal',
318  'RecoNano',
319  'RecoNanoFakeHLT',
320  'HARVESTNano',
321  'HARVESTNanoFakeHLT',
322  ],
323  PU = [
324  'Reco',
325  'RecoFakeHLT',
326  'HARVEST',
327  'HARVESTFakeHLT',
328  'RecoGlobal',
329  'HARVESTGlobal',
330  'RecoNano',
331  'RecoNanoFakeHLT',
332  'HARVESTNano',
333  'HARVESTNanoFakeHLT',
334  ],
335 
336 
337  suffix = '_trackingOnly',
338  offset = 0.1,
339 )
340 upgradeWFs['trackingOnly'].step3 = {
341  '-s': 'RAW2DIGI,RECO:reconstruction_trackingOnly,VALIDATION:@trackingOnlyValidation,DQM:@trackingOnlyDQM',
342  '--datatier':'GEN-SIM-RECO,DQMIO',
343  '--eventcontent':'RECOSIM,DQM',
344 }
345 # used outside of upgrade WFs
346 step3_trackingOnly = upgradeWFs['trackingOnly'].step3
347 
349  def setup__(self, step, stepName, stepDict, k, properties):
350  if 'Reco' in step and stepDict[step][k]['--era']=='Run2_2017':
351  stepDict[stepName][k] = merge([{'--era': 'Run2_2017_trackingRun2'}, stepDict[step][k]])
352  def condition_(self, fragment, stepList, key, hasHarvest):
353  return '2017' in key
354 upgradeWFs['trackingRun2'] = UpgradeWorkflow_trackingRun2(
355  steps = [
356  'Reco',
357  'RecoFakeHLT',
358  ],
359  PU = [],
360  suffix = '_trackingRun2',
361  offset = 0.2,
362 )
363 
365  def setup__(self, step, stepName, stepDict, k, properties):
366  if 'Reco' in step and stepDict[step][k]['--era']=='Run2_2017':
367  stepDict[stepName][k] = merge([{'--era': 'Run2_2017_trackingRun2'}, self.step3, stepDict[step][k]])
368  elif 'HARVEST' in step: stepDict[stepName][k] = merge([{'-s': 'HARVESTING:@trackingOnlyValidation+@trackingOnlyDQM'}, stepDict[step][k]])
369  def condition_(self, fragment, stepList, key, hasHarvest):
370  return '2017' in key
371 upgradeWFs['trackingOnlyRun2'] = UpgradeWorkflow_trackingOnlyRun2(
372  steps = [
373  'Reco',
374  'RecoFakeHLT',
375  'HARVEST',
376  'HARVESTFakeHLT',
377  ],
378  PU = [],
379  suffix = '_trackingOnlyRun2',
380  offset = 0.3,
381 )
382 upgradeWFs['trackingOnlyRun2'].step3 = upgradeWFs['trackingOnly'].step3
383 
385  def setup__(self, step, stepName, stepDict, k, properties):
386  if 'Reco' in step and stepDict[step][k]['--era']=='Run2_2017':
387  stepDict[stepName][k] = merge([{'--era': 'Run2_2017_trackingLowPU'}, stepDict[step][k]])
388  def condition_(self, fragment, stepList, key, hasHarvest):
389  return '2017' in key
390 upgradeWFs['trackingLowPU'] = UpgradeWorkflow_trackingLowPU(
391  steps = [
392  'Reco',
393  'RecoFakeHLT',
394  ],
395  PU = [],
396  suffix = '_trackingLowPU',
397  offset = 0.4,
398 )
399 
401  def setup__(self, step, stepName, stepDict, k, properties):
402  if 'Reco' in step: stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
403  # skip ALCA step as products might not be available
404  elif 'ALCA' in step: stepDict[stepName][k] = None
405  elif 'HARVEST' in step: stepDict[stepName][k] = merge([{'-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'}, stepDict[step][k]])
406  def condition_(self, fragment, stepList, key, hasHarvest):
407  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)
408 upgradeWFs['pixelTrackingOnly'] = UpgradeWorkflow_pixelTrackingOnly(
409  steps = [
410  'Reco',
411  'RecoFakeHLT',
412  'HARVEST',
413  'HARVESTFakeHLT',
414  'RecoGlobal',
415  'HARVESTGlobal',
416  'RecoNano',
417  'RecoNanoFakeHLT',
418  'HARVESTNano',
419  'HARVESTNanoFakeHLT',
420  'ALCA',
421  'ALCAPhase2'
422  ],
423  PU = [],
424  suffix = '_pixelTrackingOnly',
425  offset = 0.5,
426 )
427 upgradeWFs['pixelTrackingOnly'].step3 = {
428  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
429  '--datatier': 'GEN-SIM-RECO,DQMIO',
430  '--eventcontent': 'RECOSIM,DQM',
431 }
432 
434  def setup__(self, step, stepName, stepDict, k, properties):
435  if ('Digi' in step and 'NoHLT' not in step) or ('HLTOnly' in step): stepDict[stepName][k] = merge([self.step2, stepDict[step][k]])
436  if 'Reco' in step: stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
437  def condition_(self, fragment, stepList, key, hasHarvest):
438  return ('2017' in key or '2021' in key or '2023' in key or '2024' in key) and ('FS' not in key)
439 upgradeWFs['trackingMkFit'] = UpgradeWorkflow_trackingMkFit(
440  steps = [
441  'Digi',
442  'HLTOnly',
443  'DigiTrigger',
444  'Reco',
445  'RecoFakeHLT',
446  'RecoGlobal',
447  'RecoNano',
448  'RecoNanoFakeHLT',
449  ],
450  PU = [],
451  suffix = '_trackingMkFit',
452  offset = 0.7,
453 )
454 upgradeWFs['trackingMkFit'].step2 = {
455  '--customise': 'RecoTracker/MkFit/customizeHLTIter0ToMkFit.customizeHLTIter0ToMkFit'
456 }
457 upgradeWFs['trackingMkFit'].step3 = {
458  '--procModifiers': 'trackingMkFitDevel'
459 }
460 
461 # mkFit for phase-2 initialStep tracking
463  def setup__(self, step, stepName, stepDict, k, properties):
464  if 'Reco' in step: stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
465  def condition_(self, fragment, stepList, key, hasHarvest):
466  return ('2026' in key)
467 upgradeWFs['trackingMkFitPhase2'] = UpgradeWorkflow_trackingMkFitPhase2(
468  steps = [
469  'Reco',
470  'RecoFakeHLT',
471  'RecoGlobal',
472  'RecoNano',
473  'RecoNanoFakeHLT',
474  ],
475  PU = [],
476  suffix = '_trackingMkFitPhase2',
477  offset = 0.702,
478 )
479 upgradeWFs['trackingMkFitPhase2'].step3 = {
480  '--procModifiers': 'trackingMkFitCommon,trackingMkFitInitialStep'
481 }
482 
483 #DeepCore seeding for JetCore iteration workflow
485  def setup_(self, step, stepName, stepDict, k, properties):
486  # skip ALCA and Nano steps (but not RecoNano or HARVESTNano for Run3)
487  if 'ALCA' in step or 'Nano'==step:
488  stepDict[stepName][k] = None
489  elif 'Reco' in step or 'HARVEST' in step: stepDict[stepName][k] = merge([{'--procModifiers': 'seedingDeepCore'}, stepDict[step][k]])
490  def condition(self, fragment, stepList, key, hasHarvest):
491  result = (fragment=="QCD_Pt_1800_2400_14" or fragment=="TTbar_14TeV" ) and ('2021' in key or '2024' in key) and hasHarvest
492  return result
493 upgradeWFs['seedingDeepCore'] = UpgradeWorkflow_seedingDeepCore(
494  steps = [
495  'Reco',
496  'RecoFakeHLT',
497  'HARVEST',
498  'HARVESTFakeHLT',
499  'RecoGlobal',
500  'HARVESTGlobal',
501  'RecoNano',
502  'RecoNanoFakeHLT',
503  'HARVESTNano',
504  'HARVESTNanoFakeHLT',
505  'Nano',
506  'ALCA',
507  ],
508  PU = [
509  'Reco',
510  'RecoFakeHLT',
511  'RecoGlobal',
512  'HARVESTGlobal',
513  'RecoNano',
514  'RecoNanoFakeHLT',
515  'HARVESTNano',
516  'HARVESTNanoFakeHLT',
517  ],
518  suffix = '_seedingDeepCore',
519  offset = 0.17,
520 )
521 
522 #Workflow to enable displacedRegionalStep tracking iteration
524  def setup__(self, step, stepName, stepDict, k, properties):
525  if 'Reco' in step: stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
526  def condition_(self, fragment, stepList, key, hasHarvest):
527  return ('2021' in key or '2023' in key or '2024' in key)
528 upgradeWFs['displacedRegional'] = UpgradeWorkflow_displacedRegional(
529  steps = [
530  'Reco',
531  'RecoFakeHLT',
532  'RecoGlobal',
533  'RecoNano',
534  'RecoNanoFakeHLT',
535  ],
536  PU = [],
537  suffix = '_displacedRegional',
538  offset = 0.701,
539 )
540 upgradeWFs['displacedRegional'].step3 = {
541  '--procModifiers': 'displacedRegionalTracking'
542 }
543 
544 # Vector Hits workflows
546  def setup_(self, step, stepName, stepDict, k, properties):
547  stepDict[stepName][k] = merge([{'--procModifiers': 'vectorHits'}, stepDict[step][k]])
548  def condition(self, fragment, stepList, key, hasHarvest):
549  return (fragment=="TTbar_14TeV" or fragment=="SingleMuPt10Extended") and '2026' in key
550 upgradeWFs['vectorHits'] = UpgradeWorkflow_vectorHits(
551  steps = [
552  'RecoGlobal',
553  'HARVESTGlobal'
554  ],
555  PU = [
556  'RecoGlobal',
557  'HARVESTGlobal'
558  ],
559  suffix = '_vectorHits',
560  offset = 0.9,
561 )
562 
563 # WeightedMeanFitter vertexing workflows
565  def __init__(self, **kwargs):
566  # adapt the parameters for the UpgradeWorkflow init method
567  super(UpgradeWorkflow_weightedVertex, self).__init__(
568  steps = [
569  'Reco',
570  'RecoFakeHLT',
571  'HARVEST',
572  'HARVESTFakeHLT',
573  'RecoGlobal',
574  'HARVESTGlobal',
575  'RecoNano',
576  'RecoNanoFakeHLT',
577  'HARVESTNano',
578  'HARVESTNanoFakeHLT',
579  ],
580  PU = [
581  'Reco',
582  'RecoFakeHLT',
583  'HARVEST',
584  'HARVESTFakeHLT',
585  'RecoGlobal',
586  'HARVESTGlobal',
587  'RecoNano',
588  'RecoNanoFakeHLT',
589  'HARVESTNano',
590  'HARVESTNanoFakeHLT',
591  ],
592  **kwargs)
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 fragment=="TTbar_14TeV" and ('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  # fastsim version
2495  if 'FS' in k:
2496  # setup for stage 1 fastsim
2497  if "Gen" in stepName:
2498  stepNamePmx = stepName.replace('Gen','Premix')
2499  if not stepNamePmx in stepDict: stepDict[stepNamePmx] = {}
2500  stepDict[stepNamePmx][k] = merge([
2501  {
2502  '-s': 'GEN,SIM,RECOBEFMIX,DIGI:pdigi_valid',
2503  '--fast':'',
2504  '--datatier': 'PREMIX',
2505  '--eventcontent': 'PREMIX',
2506  '--procModifiers': 'premix_stage1'
2507  },
2508  stepDict[stepName][k]
2509  ])
2510  if "ProdLike" in self.suffix:
2511  # todo
2512  pass
2513  # setup for stage 2 fastsim
2514  elif "FastSimRun3" in step:
2515  # go back to non-PU step version
2516  d = merge([stepDict[self.getStepName(step)][k]])
2517  if d is None: return
2518  tmpsteps = []
2519  for s in d["-s"].split(","):
2520  if s == "DIGI" or "DIGI:" in s:
2521  tmpsteps.extend([s, "DATAMIX"])
2522  else:
2523  tmpsteps.append(s)
2524  d = merge([{"-s" : ",".join(tmpsteps),
2525  "--datamix" : "PreMix"},
2526  d])
2527  if "--procModifiers" in d:
2528  d["--procModifiers"] += ",premix_stage2"
2529  else:
2530  d["--procModifiers"] = "premix_stage2"
2531  # for combined stage1+stage2
2532  if "_PMXS1S2" in self.suffix:
2533  d = merge([digiPremixLocalPileup, d])
2534  stepDict[stepName][k] = d
2535  elif "HARVESTFastRun3" in step:
2536  # increment input step number
2537  stepDict[stepName][k] = merge([{'--filein':'file:step3_inDQM.root'},stepDict[stepName][k]])
2538  else:
2539  # setup for stage 1
2540  if "GenSim" in stepName:
2541  stepNamePmx = stepName.replace('GenSim','Premix')
2542  if not stepNamePmx in stepDict: stepDict[stepNamePmx] = {}
2543  stepDict[stepNamePmx][k] = merge([
2544  {
2545  '-s': 'GEN,SIM,DIGI:pdigi_valid',
2546  '--datatier': 'PREMIX',
2547  '--eventcontent': 'PREMIX',
2548  '--procModifiers': 'premix_stage1'
2549  },
2550  stepDict[stepName][k]
2551  ])
2552  if "ProdLike" in self.suffix:
2553  stepDict[stepNamePmx][k] = merge([{'-s': 'GEN,SIM,DIGI'},stepDict[stepNamePmx][k]])
2554  # setup for stage 2
2555  elif "Digi" in step or "Reco" in step:
2556  # go back to non-PU step version
2557  d = merge([stepDict[self.getStepName(step)][k]])
2558  if d is None: return
2559  if "Digi" in step:
2560  tmpsteps = []
2561  for s in d["-s"].split(","):
2562  if s == "DIGI" or "DIGI:" in s:
2563  tmpsteps.extend([s, "DATAMIX"])
2564  else:
2565  tmpsteps.append(s)
2566  d = merge([{"-s" : ",".join(tmpsteps),
2567  "--datamix" : "PreMix",
2568  "--procModifiers": "premix_stage2"},
2569  d])
2570  # for combined stage1+stage2
2571  if "_PMXS1S2" in self.suffix:
2572  d = merge([digiPremixLocalPileup, d])
2573  elif "Reco" in step:
2574  if "--procModifiers" in d:
2575  d["--procModifiers"] += ",premix_stage2"
2576  else:
2577  d["--procModifiers"] = "premix_stage2"
2578  stepDict[stepName][k] = d
2579  # separate nano step now only used in ProdLike workflows for Run3/Phase2
2580  elif "Nano"==step:
2581  # go back to non-PU step version
2582  d = merge([stepDict[self.getStepName(step)][k]])
2583  if "_PMXS1S2" in self.suffix and "--filein" in d:
2584  filein = d["--filein"]
2585  m = re.search("step(?P<ind>\\d+)", filein)
2586  if m:
2587  d["--filein"] = filein.replace(m.group(), "step%d"%(int(m.group("ind"))+1))
2588  stepDict[stepName][k] = d
2589  # run2/3 WFs use Nano (not NanoPU) in PU WF
2590  stepDict[self.getStepName(step)][k] = merge([d])
2591  def condition(self, fragment, stepList, key, hasHarvest):
2592  if not 'PU' in key:
2593  return False
2594  if not any(y in key for y in ['2021', '2023', '2024', '2026']):
2595  return False
2596  if self.suffix.endswith("S1"):
2597  return "NuGun" in fragment
2598  return True
2599  def workflow_(self, workflows, num, fragment, stepList, key):
2600  fragmentTmp = fragment
2601  if self.suffix.endswith("S1"):
2602  fragmentTmp = 'PREMIXUP' + key[2:].replace("PU", "").replace("Design", "") + '_PU25'
2603  super(UpgradeWorkflowPremix,self).workflow_(workflows, num, fragmentTmp, stepList, key)
2604 # Premix stage1
2605 upgradeWFs['PMXS1'] = UpgradeWorkflowPremix(
2606  steps = [
2607  ],
2608  PU = [
2609  'Gen',
2610  'GenSim',
2611  'GenSimHLBeamSpot',
2612  'GenSimHLBeamSpot14',
2613  ],
2614  suffix = '_PMXS1',
2615  offset = 0.97,
2616 )
2617 # Premix stage2
2618 upgradeWFs['PMXS2'] = UpgradeWorkflowPremix(
2619  steps = [],
2620  PU = [
2621  'Digi',
2622  'DigiTrigger',
2623  'RecoLocal',
2624  'Reco',
2625  'RecoFakeHLT',
2626  'RecoGlobal',
2627  'RecoNano',
2628  'RecoNanoFakeHLT',
2629  'Nano',
2630  'FastSimRun3',
2631  'HARVESTFastRun3',
2632  ],
2633  suffix = '_PMXS2',
2634  offset = 0.98,
2635 )
2636 # Premix combined stage1+stage2
2637 upgradeWFs['PMXS1S2'] = UpgradeWorkflowPremix(
2638  steps = [],
2639  PU = [
2640  'Gen',
2641  'GenSim',
2642  'GenSimHLBeamSpot',
2643  'GenSimHLBeamSpot14',
2644  'Digi',
2645  'DigiTrigger',
2646  'RecoLocal',
2647  'Reco',
2648  'RecoFakeHLT',
2649  'RecoGlobal',
2650  'RecoNano',
2651  'RecoNanoFakeHLT',
2652  'Nano',
2653  'FastSimRun3',
2654  'HARVESTFastRun3',
2655  ],
2656  suffix = '_PMXS1S2',
2657  offset = 0.99,
2658 )
2659 # Alternative version of above w/ less PU for PR tests
2661  def setupPU_(self, step, stepName, stepDict, k, properties):
2662  # adjust first, so it gets copied into new Premix step
2663  if '--pileup' in stepDict[stepName][k]:
2664  stepDict[stepName][k]['--pileup'] = 'AVE_50_BX_25ns_m3p3'
2665  super(UpgradeWorkflowAdjustPU,self).setupPU_(step, stepName, stepDict, k, properties)
2666  def condition(self, fragment, stepList, key, hasHarvest):
2667  # restrict to phase2
2668  return super(UpgradeWorkflowAdjustPU,self).condition(fragment, stepList, key, hasHarvest) and '2026' in key
2669 upgradeWFs['PMXS1S2PR'] = UpgradeWorkflowAdjustPU(
2670  steps = [],
2671  PU = [
2672  'GenSim',
2673  'GenSimHLBeamSpot',
2674  'GenSimHLBeamSpot14',
2675  'Digi',
2676  'DigiTrigger',
2677  'RecoLocal',
2678  'Reco',
2679  'RecoFakeHLT',
2680  'RecoGlobal',
2681  'Nano',
2682  'HARVEST',
2683  'HARVESTFakeHLT',
2684  'HARVESTGlobal',
2685  ],
2686  suffix = '_PMXS1S2PR',
2687  offset = 0.999,
2688 )
2689 
2691  def setup_(self, step, stepName, stepDict, k, properties):
2692  # copy steps, then apply specializations
2693  UpgradeWorkflowPremix.setup_(self, step, stepName, stepDict, k, properties)
2694  UpgradeWorkflow_ProdLike.setup_(self, step, stepName, stepDict, k, properties)
2695  #
2696  if 'Digi' in step:
2697  d = merge([stepDict[self.getStepName(step)][k]])
2698  tmpsteps = []
2699  for s in d["-s"].split(","):
2700  if "DIGI:pdigi_valid" in s:
2701  tmpsteps.append("DIGI")
2702  else:
2703  tmpsteps.append(s)
2704  d = merge([{"-s" : ",".join(tmpsteps),
2705  "--eventcontent": "PREMIXRAW"},
2706  d])
2707  stepDict[stepName][k] = d
2708  def condition(self, fragment, stepList, key, hasHarvest):
2709  # use both conditions
2710  return UpgradeWorkflowPremix.condition(self, fragment, stepList, key, hasHarvest) and UpgradeWorkflow_ProdLike.condition(self, fragment, stepList, key, hasHarvest)
2711 # premix stage2
2712 upgradeWFs['PMXS2ProdLike'] = UpgradeWorkflowPremixProdLike(
2713  steps = [],
2714  PU = [
2715  'Digi',
2716  'DigiTrigger',
2717  'RecoLocal',
2718  'Reco',
2719  'RecoFakeHLT',
2720  'RecoGlobal',
2721  'RecoNano',
2722  'RecoNanoFakeHLT',
2723  'Nano',
2724  'HARVEST',
2725  'HARVESTFakeHLT',
2726  'HARVESTGlobal',
2727  'HARVESTNano',
2728  'HARVESTNanoFakeHLT',
2729  'MiniAOD',
2730  'ALCA',
2731  ],
2732  suffix = '_PMXS2ProdLike',
2733  offset = 0.9821,
2734 )
2735 # premix combined stage1+stage2
2736 upgradeWFs['PMXS1S2ProdLike'] = UpgradeWorkflowPremixProdLike(
2737  steps = [],
2738  PU = [
2739  'GenSim',
2740  'GenSimHLBeamSpot',
2741  'GenSimHLBeamSpot14',
2742  'Digi',
2743  'DigiTrigger',
2744  'RecoLocal',
2745  'Reco',
2746  'RecoFakeHLT',
2747  'RecoGlobal',
2748  'RecoNano',
2749  'RecoNanoFakeHLT',
2750  'Nano',
2751  'HARVEST',
2752  'HARVESTFakeHLT',
2753  'HARVESTGlobal',
2754  'HARVESTNano',
2755  'HARVESTNanoFakeHLT',
2756  'MiniAOD',
2757  'ALCA',
2758  ],
2759  suffix = '_PMXS1S2ProdLike',
2760  offset = 0.9921,
2761 )
2762 
2764  def setup_(self, step, stepName, stepDict, k, properties):
2765  if 'HARVESTFastRun3' in step:
2766  stepDict[stepName][k] = merge([{'-s':'HARVESTING:@trackingOnlyValidation+@trackingOnlyDQM',
2767  '--fast':'',
2768  '--era':'Run3_FastSim',
2769  '--filein':'file:step1_inDQM.root'}, stepDict[step][k]])
2770  else:
2771  stepDict[stepName][k] = merge([stepDict[step][k]])
2772  def condition(self, fragment, stepList, key, hasHarvest):
2773  return fragment=="TTbar_14TeV" and ('2021FS' in key or '2023FS' in key)
2774 upgradeWFs['Run3FStrackingOnly'] = UpgradeWorkflow_Run3FStrackingOnly(
2775  steps = [
2776  'Gen',
2777  'FastSimRun3',
2778  'HARVESTFastRun3'
2779  ],
2780  PU = [
2781  'FastSimRun3',
2782  'HARVESTFastRun3'
2783  ],
2784  suffix = '_Run3FSTrackingOnly',
2785  offset = 0.302,
2786 )
2787 
2789  def setup_(self, step, stepName, stepDict, k, properties):
2790  if 'Gen' in step and 'GenOnly' not in step:
2791  stepDict[stepName][k] = merge([{'-s':'GEN,SIM,RECOBEFMIX',
2792  '--fast':'',
2793  '--era':'Run3_FastSim',
2794  '--eventcontent':'FASTPU',
2795  '--datatier':'GEN-SIM-RECO',
2796  '--relval':'27000,3000'}, stepDict[step][k]])
2797  else:
2798  stepDict[stepName][k] = None
2799  def condition(self, fragment, stepList, key, hasHarvest):
2800  return ('2021FS' in key or '2023FS' in key) and fragment=="MinBias_14TeV"
2801 upgradeWFs['Run3FSMBMixing'] = UpgradeWorkflow_Run3FSMBMixing(
2802  steps = [
2803  'Gen',
2804  'FastSimRun3',
2805  'HARVESTFastRun3'
2806  ],
2807  PU = [],
2808  suffix = '_Run3FSMBMixing',
2809  offset = 0.303,
2810 )
2811 
2812 
2814  def setup_(self, step, stepName, stepDict, k, properties):
2815  if 'Phase2' in stepDict[step][k]['--era']:
2816  dd4hepGeom="DD4hep"
2817  dd4hepGeom+=stepDict[step][k]['--geometry']
2818  stepDict[stepName][k] = merge([{'--geometry' : dd4hepGeom, '--procModifiers': 'dd4hep'}, stepDict[step][k]])
2819  def condition(self, fragment, stepList, key, hasHarvest):
2820  return ('2026' in key) and ('FS' not in key)
2821 upgradeWFs['DD4hep'] = UpgradeWorkflow_DD4hep(
2822  steps = [
2823  'GenSim',
2824  'GenSimHLBeamSpot',
2825  'GenSimHLBeamSpot14',
2826  'Digi',
2827  'DigiTrigger',
2828  'Reco',
2829  'RecoFakeHLT',
2830  'RecoGlobal',
2831  'RecoNano',
2832  'RecoNanoFakeHLT',
2833  'HARVEST',
2834  'HARVESTFakeHLT',
2835  'HARVESTGlobal',
2836  'HARVESTNano',
2837  'HARVESTNanoFakeHLT',
2838  'ALCA',
2839  ],
2840  PU = [],
2841  suffix = '_DD4hep',
2842  offset = 0.911,
2843 )
2844 upgradeWFs['DD4hep'].allowReuse = False
2845 
2846 #This workflow is now obsolete, it becomes default for Run-3.
2847 #Keep it for future use in Phase-2, then delete
2849  def setup_(self, step, stepName, stepDict, k, properties):
2850  if 'Run3' in stepDict[step][k]['--era'] and 'Fast' not in stepDict[step][k]['--era']:
2851  stepDict[stepName][k] = merge([{'--conditions': 'auto:phase1_2022_realistic', '--geometry': 'DB:Extended'}, stepDict[step][k]])
2852  def condition(self, fragment, stepList, key, hasHarvest):
2853  return fragment=="TTbar_14TeV" and '2021' in key and 'FS' not in key
2854 upgradeWFs['DD4hepDB'] = UpgradeWorkflow_DD4hepDB(
2855  steps = [
2856  'GenSim',
2857  'GenSimHLBeamSpot',
2858  'GenSimHLBeamSpot14',
2859  'Digi',
2860  'DigiTrigger',
2861  'Reco',
2862  'RecoFakeHLT',
2863  'RecoGlobal',
2864  'RecoNano',
2865  'RecoNanoFakeHLT',
2866  'HARVEST',
2867  'HARVESTFakeHLT',
2868  'HARVESTGlobal',
2869  'HARVESTNano',
2870  'HARVESTNanoFakeHLT',
2871  'ALCA',
2872  ],
2873  PU = [],
2874  suffix = '_DD4hepDB',
2875  offset = 0.912,
2876 )
2877 upgradeWFs['DD4hepDB'].allowReuse = False
2878 
2880  def setup_(self, step, stepName, stepDict, k, properties):
2881  the_era = stepDict[step][k]['--era']
2882  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:
2883  # retain any other eras
2884  tmp_eras = the_era.split(',')
2885  tmp_eras[tmp_eras.index("Run3")] = 'Run3_DDD'
2886  tmp_eras = ','.join(tmp_eras)
2887  stepDict[stepName][k] = merge([{'--conditions': 'auto:phase1_2022_realistic_ddd', '--geometry': 'DB:Extended', '--era': tmp_eras}, stepDict[step][k]])
2888  def condition(self, fragment, stepList, key, hasHarvest):
2889  return fragment=="TTbar_14TeV" and '2021' in key and 'FS' not in key
2890 upgradeWFs['DDDDB'] = UpgradeWorkflow_DDDDB(
2891  steps = [
2892  'GenSim',
2893  'GenSimHLBeamSpot',
2894  'GenSimHLBeamSpot14',
2895  'Digi',
2896  'DigiTrigger',
2897  'Reco',
2898  'RecoFakeHLT',
2899  'RecoGlobal',
2900  'RecoNano',
2901  'RecoNanoFakeHLT',
2902  'HARVEST',
2903  'HARVESTFakeHLT',
2904  'HARVESTGlobal',
2905  'HARVESTNano',
2906  'HARVESTNanoFakeHLT',
2907  'ALCA',
2908  ],
2909  PU = [],
2910  suffix = '_DDDDB',
2911  offset = 0.914,
2912 )
2913 upgradeWFs['DDDDB'].allowReuse = False
2914 
2916  def setup_(self, step, stepName, stepDict, k, properties):
2917  stepDict[stepName][k] = merge([{'--procModifiers': 'allSonicTriton'}, stepDict[step][k]])
2918  def condition(self, fragment, stepList, key, hasHarvest):
2919  return ((fragment=='TTbar_13' or fragment=='TTbar_14TeV') and '2021' in key) \
2920  or (fragment=='TTbar_14TeV' and '2026' in key)
2921 upgradeWFs['SonicTriton'] = UpgradeWorkflow_SonicTriton(
2922  steps = [
2923  'GenSim',
2924  'GenSimHLBeamSpot',
2925  'GenSimHLBeamSpot14',
2926  'Digi',
2927  'DigiTrigger',
2928  'Reco',
2929  'RecoFakeHLT',
2930  'RecoGlobal',
2931  'RecoNano',
2932  'RecoNanoFakeHLT',
2933  'HARVEST',
2934  'HARVESTFakeHLT',
2935  'HARVESTGlobal',
2936  'HARVESTNano',
2937  'HARVESTNanoFakeHLT',
2938  'ALCA',
2939  ],
2940  PU = [
2941  'GenSim',
2942  'GenSimHLBeamSpot',
2943  'GenSimHLBeamSpot14',
2944  'Digi',
2945  'DigiTrigger',
2946  'Reco',
2947  'RecoFakeHLT',
2948  'RecoGlobal',
2949  'RecoNano',
2950  'RecoNanoFakeHLT',
2951  'HARVEST',
2952  'HARVESTFakeHLT',
2953  'HARVESTGlobal',
2954  'HARVESTNano',
2955  'HARVESTNanoFakeHLT',
2956  'ALCA',
2957  ],
2958  suffix = '_SonicTriton',
2959  offset = 0.9001,
2960 )
2961 
2963  def setup_(self, step, stepName, stepDict, k, properties):
2964  stepDict[stepName][k] = merge([{'--procModifiers': 'phase2_pp_on_AA'}, stepDict[step][k]])
2965  if 'GenSim' in step:
2966  stepDict[stepName][k] = merge([{'--conditions': stepDict[step][k]["--conditions"].replace('_13TeV',''), '-n': 1}, stepDict[stepName][k]])
2967  elif 'Digi' in step:
2968  stepDict[stepName][k] = merge([{'-s': stepDict[step][k]["-s"].replace("DIGI:pdigi_valid","DIGI:pdigi_hi"), '--pileup': 'HiMixNoPU'}, stepDict[stepName][k]])
2969  def condition(self, fragment, stepList, key, hasHarvest):
2970  return fragment=='HydjetQMinBias_5519GeV' and '2026' in key and 'PU' not in key
2971 
2972 upgradeWFs['Phase2_HeavyIon'] = UpgradeWorkflow_Phase2_HeavyIon(
2973  steps = [
2974  'GenSimHLBeamSpot',
2975  'DigiTrigger',
2976  'RecoGlobal',
2977  'HARVESTGlobal',
2978  'ALCAPhase2'
2979  ],
2980  PU = [],
2981  suffix = '_hi',
2982  offset = 0.85,
2983 )
2984 
2985 # check for duplicates in offsets or suffixes
2986 offsets = [specialWF.offset for specialType,specialWF in upgradeWFs.items()]
2987 suffixes = [specialWF.suffix for specialType,specialWF in upgradeWFs.items()]
2988 
2989 dups = check_dups(offsets)
2990 if len(dups)>0:
2991  raise ValueError("Duplicate special workflow offsets not allowed: "+','.join([str(x) for x in dups]))
2992 
2993 dups = check_dups(suffixes)
2994 if len(dups)>0:
2995  raise ValueError("Duplicate special workflow suffixes not allowed: "+','.join([str(x) for x in dups]))
2996 
2997 upgradeProperties = {}
2998 
2999 upgradeProperties[2017] = {
3000  '2017' : {
3001  'Geom' : 'DB:Extended',
3002  'GT' : 'auto:phase1_2017_realistic',
3003  'HLTmenu': '@relval2017',
3004  'Era' : 'Run2_2017',
3005  'ScenToRun' : ['GenSim','Digi','RecoFakeHLT','HARVESTFakeHLT','ALCA','Nano'],
3006  },
3007  '2017Design' : {
3008  'Geom' : 'DB:Extended',
3009  'GT' : 'auto:phase1_2017_design',
3010  'HLTmenu': '@relval2017',
3011  'Era' : 'Run2_2017',
3012  'BeamSpot': 'DBdesign',
3013  'ScenToRun' : ['GenSim','Digi','RecoFakeHLT','HARVESTFakeHLT'],
3014  },
3015  '2018' : {
3016  'Geom' : 'DB:Extended',
3017  'GT' : 'auto:phase1_2018_realistic',
3018  'HLTmenu': '@relval2018',
3019  'Era' : 'Run2_2018',
3020  'BeamSpot': 'DBrealistic',
3021  'ScenToRun' : ['GenSim','Digi','RecoFakeHLT','HARVESTFakeHLT','ALCA','Nano'],
3022  },
3023  '2018Design' : {
3024  'Geom' : 'DB:Extended',
3025  'GT' : 'auto:phase1_2018_design',
3026  'HLTmenu': '@relval2018',
3027  'Era' : 'Run2_2018',
3028  'BeamSpot': 'DBdesign',
3029  'ScenToRun' : ['GenSim','Digi','RecoFakeHLT','HARVESTFakeHLT'],
3030  },
3031  '2021' : {
3032  'Geom' : 'DB:Extended',
3033  'GT' : 'auto:phase1_2022_realistic',
3034  'HLTmenu': '@relval2022',
3035  'Era' : 'Run3',
3036  'BeamSpot': 'DBrealistic',
3037  'ScenToRun' : ['GenSim','Digi','RecoNanoFakeHLT','HARVESTNanoFakeHLT','ALCA'],
3038  },
3039  '2021Design' : {
3040  'Geom' : 'DB:Extended',
3041  'GT' : 'auto:phase1_2022_design',
3042  'HLTmenu': '@relval2022',
3043  'Era' : 'Run3',
3044  'BeamSpot': 'DBdesign',
3045  'ScenToRun' : ['GenSim','Digi','RecoNanoFakeHLT','HARVESTNanoFakeHLT'],
3046  },
3047  '2023' : {
3048  'Geom' : 'DB:Extended',
3049  'GT' : 'auto:phase1_2023_realistic',
3050  'HLTmenu': '@relval2023',
3051  'Era' : 'Run3_2023',
3052  'BeamSpot': 'DBrealistic',
3053  'ScenToRun' : ['GenSim','Digi','RecoNanoFakeHLT','HARVESTNanoFakeHLT','ALCA'],
3054  },
3055  '2024' : {
3056  'Geom' : 'DB:Extended',
3057  'GT' : 'auto:phase1_2024_realistic',
3058  'HLTmenu': '@relval2024',
3059  'Era' : 'Run3_2024',
3060  'BeamSpot': 'DBrealistic',
3061  'ScenToRun' : ['GenSim','Digi','RecoNano','HARVESTNano','ALCA'],
3062  },
3063  '2024HLTOnDigi' : {
3064  'Geom' : 'DB:Extended',
3065  'GT' : 'auto:phase1_2024_realistic',
3066  'HLTmenu': '@relval2024',
3067  'Era' : 'Run3',
3068  'BeamSpot': 'DBrealistic',
3069  'ScenToRun' : ['GenSim','DigiNoHLT','HLTOnly','RecoNano','HARVESTNano','ALCA'],
3070  },
3071  '2021FS' : {
3072  'Geom' : 'DB:Extended',
3073  'GT' : 'auto:phase1_2022_realistic',
3074  'HLTmenu': '@relval2022',
3075  'Era' : 'Run3_FastSim',
3076  'BeamSpot': 'DBrealistic',
3077  'ScenToRun' : ['Gen','FastSimRun3','HARVESTFastRun3'],
3078  },
3079  '2021postEE' : {
3080  'Geom' : 'DB:Extended',
3081  'GT' : 'auto:phase1_2022_realistic_postEE',
3082  'HLTmenu': '@relval2022',
3083  'Era' : 'Run3',
3084  'BeamSpot': 'DBrealistic',
3085  'ScenToRun' : ['GenSim','Digi','RecoNanoFakeHLT','HARVESTNanoFakeHLT','ALCA'],
3086  },
3087  '2023FS' : {
3088  'Geom' : 'DB:Extended',
3089  'GT' : 'auto:phase1_2023_realistic',
3090  'HLTmenu': '@relval2023',
3091  'Era' : 'Run3_2023_FastSim',
3092  'BeamSpot': 'DBrealistic',
3093  'ScenToRun' : ['Gen','FastSimRun3','HARVESTFastRun3'],
3094  },
3095  '2022HI' : {
3096  'Geom' : 'DB:Extended',
3097  'GT':'auto:phase1_2022_realistic_hi',
3098  'HLTmenu': '@fake2',
3099  'Era':'Run3_pp_on_PbPb',
3100  'BeamSpot': 'DBrealistic',
3101  'ScenToRun' : ['GenSim','Digi','RecoNano','HARVESTNano','ALCA'],
3102  },
3103  '2022HIRP' : {
3104  'Geom' : 'DB:Extended',
3105  'GT':'auto:phase1_2022_realistic_hi',
3106  'HLTmenu': '@fake2',
3107  'Era':'Run3_pp_on_PbPb_approxSiStripClusters',
3108  'BeamSpot': 'DBrealistic',
3109  'ScenToRun' : ['GenSim','Digi','RecoNano','HARVESTNano','ALCA'],
3110  },
3111  '2023HI' : {
3112  'Geom' : 'DB:Extended',
3113  'GT':'auto:phase1_2023_realistic_hi',
3114  'HLTmenu': '@fake2',
3115  'Era':'Run3_pp_on_PbPb',
3116  'BeamSpot': 'DBrealistic',
3117  'ScenToRun' : ['GenSim','Digi','RecoNano','HARVESTNano','ALCA'],
3118  },
3119  '2023HIRP' : {
3120  'Geom' : 'DB:Extended',
3121  'GT':'auto:phase1_2023_realistic_hi',
3122  'HLTmenu': '@fake2',
3123  'Era':'Run3_pp_on_PbPb_approxSiStripClusters',
3124  'BeamSpot': 'DBrealistic',
3125  'ScenToRun' : ['GenSim','Digi','RecoNano','HARVESTNano','ALCA'],
3126  },
3127  '2024GenOnly' : {
3128  'Geom' : 'DB:Extended',
3129  'GT' : 'auto:phase1_2024_realistic',
3130  'Era' : 'Run3',
3131  'BeamSpot': 'DBrealistic',
3132  'ScenToRun' : ['Gen'],
3133  },
3134  '2024SimOnGen' : {
3135  'Geom' : 'DB:Extended',
3136  'GT' : 'auto:phase1_2024_realistic',
3137  'HLTmenu': '@relval2024',
3138  'Era' : 'Run3',
3139  'BeamSpot': 'DBrealistic',
3140  'ScenToRun' : ['Gen','Sim','Digi','RecoNano','HARVESTNano','ALCA'],
3141  },
3142 }
3143 
3144 # standard PU sequences
3145 for key in list(upgradeProperties[2017].keys()):
3146  upgradeProperties[2017][key+'PU'] = deepcopy(upgradeProperties[2017][key])
3147  if 'FS' not in key:
3148  # update ScenToRun list
3149  scenToRun = upgradeProperties[2017][key+'PU']['ScenToRun']
3150  for idx,val in enumerate(scenToRun):
3151  # Digi -> DigiPU, Reco* -> Reco*PU, HARVEST* -> HARVEST*PU
3152  scenToRun[idx] += 'PU'*(val.startswith('Digi') or val.startswith('Reco') or val.startswith('HARVEST'))
3153  # remove ALCA
3154  upgradeProperties[2017][key+'PU']['ScenToRun'] = [foo for foo in scenToRun if foo != 'ALCA']
3155  else:
3156  upgradeProperties[2017][key+'PU']['ScenToRun'] = ['Gen','FastSimRun3PU','HARVESTFastRun3PU']
3157 
3158 upgradeProperties[2026] = {
3159  '2026D86' : {
3160  'Geom' : 'Extended2026D86',
3161  'HLTmenu': '@fake2',
3162  'GT' : 'auto:phase2_realistic_T21',
3163  'Era' : 'Phase2C17I13M9',
3164  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3165  },
3166  '2026D88' : {
3167  'Geom' : 'Extended2026D88',
3168  'HLTmenu': '@relval2026',
3169  'GT' : 'auto:phase2_realistic_T21',
3170  'Era' : 'Phase2C17I13M9',
3171  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3172  },
3173  '2026D91' : {
3174  'Geom' : 'Extended2026D91',
3175  'HLTmenu': '@fake2',
3176  'GT' : 'auto:phase2_realistic_T30',
3177  'Era' : 'Phase2C17I13M9',
3178  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3179  },
3180  '2026D92' : {
3181  'Geom' : 'Extended2026D92',
3182  'HLTmenu': '@fake2',
3183  'GT' : 'auto:phase2_realistic_T21',
3184  'Era' : 'Phase2C17I13M9',
3185  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3186  },
3187  '2026D93' : {
3188  'Geom' : 'Extended2026D93',
3189  'HLTmenu': '@fake2',
3190  'GT' : 'auto:phase2_realistic_T21',
3191  'Era' : 'Phase2C17I13M9',
3192  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3193  },
3194  '2026D94' : {
3195  'Geom' : 'Extended2026D94',
3196  'HLTmenu': '@fake2',
3197  'GT' : 'auto:phase2_realistic_T21',
3198  'Era' : 'Phase2C20I13M9',
3199  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3200  },
3201  '2026D95' : {
3202  'Geom' : 'Extended2026D95',
3203  'HLTmenu': '@relval2026',
3204  'GT' : 'auto:phase2_realistic_T21',
3205  'Era' : 'Phase2C17I13M9',
3206  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3207  },
3208  '2026D96' : {
3209  'Geom' : 'Extended2026D96',
3210  'HLTmenu': '@fake2',
3211  'GT' : 'auto:phase2_realistic_T21',
3212  'Era' : 'Phase2C17I13M9',
3213  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3214  },
3215  '2026D97' : {
3216  'Geom' : 'Extended2026D97',
3217  'HLTmenu': '@fake2',
3218  'GT' : 'auto:phase2_realistic_T25',
3219  'Era' : 'Phase2C17I13M9',
3220  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3221  },
3222  '2026D98' : {
3223  'Geom' : 'Extended2026D98',
3224  'HLTmenu': '@relval2026',
3225  'GT' : 'auto:phase2_realistic_T25',
3226  'Era' : 'Phase2C17I13M9',
3227  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3228  },
3229  '2026D99' : {
3230  'Geom' : 'Extended2026D99',
3231  'HLTmenu': '@relval2026',
3232  'GT' : 'auto:phase2_realistic_T25',
3233  'Era' : 'Phase2C17I13M9',
3234  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3235  },
3236  '2026D100' : {
3237  'Geom' : 'Extended2026D100',
3238  'HLTmenu': '@relval2026',
3239  'GT' : 'auto:phase2_realistic_T25',
3240  'Era' : 'Phase2C17I13M9',
3241  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3242  },
3243  '2026D101' : {
3244  'Geom' : 'Extended2026D101',
3245  'HLTmenu': '@relval2026',
3246  'GT' : 'auto:phase2_realistic_T25',
3247  'Era' : 'Phase2C17I13M9',
3248  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3249  },
3250  '2026D102' : {
3251  'Geom' : 'Extended2026D102',
3252  'HLTmenu': '@relval2026',
3253  'GT' : 'auto:phase2_realistic_T33',
3254  'Era' : 'Phase2C17I13M9',
3255  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3256  },
3257  '2026D103' : {
3258  'Geom' : 'Extended2026D103',
3259  'HLTmenu': '@relval2026',
3260  'GT' : 'auto:phase2_realistic_T25',
3261  'Era' : 'Phase2C17I13M9',
3262  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3263  },
3264  '2026D104' : {
3265  'Geom' : 'Extended2026D104',
3266  'HLTmenu': '@relval2026',
3267  'GT' : 'auto:phase2_realistic_T33',
3268  'Era' : 'Phase2C22I13M9',
3269  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3270  },
3271  '2026D105' : {
3272  'Geom' : 'Extended2026D105',
3273  'HLTmenu': '@relval2026',
3274  'GT' : 'auto:phase2_realistic_T33',
3275  'Era' : 'Phase2C17I13M9',
3276  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3277  },
3278  '2026D106' : {
3279  'Geom' : 'Extended2026D106',
3280  'HLTmenu': '@relval2026',
3281  'GT' : 'auto:phase2_realistic_T33',
3282  'Era' : 'Phase2C22I13M9',
3283  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3284  },
3285  '2026D107' : {
3286  'Geom' : 'Extended2026D107',
3287  'HLTmenu': '@relval2026',
3288  'GT' : 'auto:phase2_realistic_T25',
3289  'Era' : 'Phase2C17I13M9',
3290  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3291  },
3292  '2026D108' : {
3293  'Geom' : 'Extended2026D108',
3294  'HLTmenu': '@relval2026',
3295  'GT' : 'auto:phase2_realistic_T33',
3296  'Era' : 'Phase2C17I13M9',
3297  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3298  },
3299  '2026D109' : {
3300  'Geom' : 'Extended2026D109',
3301  'HLTmenu': '@relval2026',
3302  'GT' : 'auto:phase2_realistic_T33',
3303  'Era' : 'Phase2C22I13M9',
3304  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3305  },
3306  '2026D110' : {
3307  'Geom' : 'Extended2026D110',
3308  'HLTmenu': '@relval2026',
3309  'GT' : 'auto:phase2_realistic_T33',
3310  'Era' : 'Phase2C17I13M9',
3311  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3312  },
3313  '2026D111' : {
3314  'Geom' : 'Extended2026D111',
3315  'HLTmenu': '@relval2026',
3316  'GT' : 'auto:phase2_realistic_T36',
3317  'Era' : 'Phase2C22I13M9',
3318  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3319  },
3320  '2026D112' : {
3321  'Geom' : 'Extended2026D112',
3322  'HLTmenu': '@relval2026',
3323  'GT' : 'auto:phase2_realistic_T37',
3324  'Era' : 'Phase2C22I13M9',
3325  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3326  },
3327  '2026D113' : {
3328  'Geom' : 'Extended2026D113',
3329  'HLTmenu': '@relval2026',
3330  'GT' : 'auto:phase2_realistic_T38',
3331  'Era' : 'Phase2C22I13M9',
3332  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3333  },
3334  '2026D114' : {
3335  'Geom' : 'Extended2026D114',
3336  'HLTmenu': '@relval2026',
3337  'GT' : 'auto:phase2_realistic_T33',
3338  'Era' : 'Phase2C17I13M9',
3339  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3340  },
3341  '2026D110GenOnly' : {
3342  'Geom' : 'Extended2026D110',
3343  'BeamSpot' : 'DBrealisticHLLHC',
3344  'GT' : 'auto:phase2_realistic_T33',
3345  'Era' : 'Phase2C17I13M9',
3346  'ScenToRun' : ['GenHLBeamSpot'],
3347  },
3348  '2026D110SimOnGen' : {
3349  'Geom' : 'Extended2026D110',
3350  'HLTmenu': '@relval2026',
3351  'BeamSpot' : 'DBrealisticHLLHC',
3352  'GT' : 'auto:phase2_realistic_T33',
3353  'Era' : 'Phase2C17I13M9',
3354  'ScenToRun' : ['GenHLBeamSpot','Sim','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3355  },
3356  '2026D115' : {
3357  'Geom' : 'Extended2026D115',
3358  'HLTmenu': '@relval2026',
3359  'GT' : 'auto:phase2_realistic_T33',
3360  'Era' : 'Phase2C20I13M9',
3361  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3362  },
3363 }
3364 
3365 # standard PU sequences
3366 for key in list(upgradeProperties[2026].keys()):
3367  upgradeProperties[2026][key+'PU'] = deepcopy(upgradeProperties[2026][key])
3368  upgradeProperties[2026][key+'PU']['ScenToRun'] = ['GenSimHLBeamSpot','DigiTriggerPU','RecoGlobalPU', 'HARVESTGlobalPU']
3369 
3370 # for relvals
3371 defaultDataSets = {}
3372 for year in upgradeKeys:
3373  for key in upgradeKeys[year]:
3374  if 'PU' in key: continue
3375  defaultDataSets[key] = ''
3376 
3377 
3379  def __init__(self, howMuch, dataset):
3380  self.howMuch = howMuch
3381  self.dataset = dataset
3382 
3383 upgradeFragments = OrderedDict([
3384  ('FourMuPt_1_200_pythia8_cfi', UpgradeFragment(Kby(10,100),'FourMuPt1_200')),
3385  ('SingleElectronPt10_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleElectronPt10')),
3386  ('SingleElectronPt35_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleElectronPt35')),
3387  ('SingleElectronPt1000_pythia8_cfi', UpgradeFragment(Kby(9,50),'SingleElectronPt1000')),
3388  ('SingleGammaPt10_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleGammaPt10')),
3389  ('SingleGammaPt35_pythia8_cfi', UpgradeFragment(Kby(9,50),'SingleGammaPt35')),
3390  ('SingleMuPt1_pythia8_cfi', UpgradeFragment(Kby(25,100),'SingleMuPt1')),
3391  ('SingleMuPt10_Eta2p85_cfi', UpgradeFragment(Kby(9,100),'SingleMuPt10')),
3392  ('SingleMuPt100_Eta2p85_cfi', UpgradeFragment(Kby(9,100),'SingleMuPt100')),
3393  ('SingleMuPt1000_Eta2p85_cfi', UpgradeFragment(Kby(9,100),'SingleMuPt1000')),
3394  ('FourMuExtendedPt_1_200_pythia8_cfi', UpgradeFragment(Kby(10,100),'FourMuExtendedPt1_200')),
3395  ('TenMuExtendedE_0_200_pythia8_cfi', UpgradeFragment(Kby(10,100),'TenMuExtendedE_0_200')),
3396  ('DoubleElectronPt10Extended_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleElPt10Extended')),
3397  ('DoubleElectronPt35Extended_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleElPt35Extended')),
3398  ('DoubleElectronPt1000Extended_pythia8_cfi', UpgradeFragment(Kby(9,50),'SingleElPt1000Extended')),
3399  ('DoubleGammaPt10Extended_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleGammaPt10Extended')),
3400  ('DoubleGammaPt35Extended_pythia8_cfi', UpgradeFragment(Kby(9,50),'SingleGammaPt35Extended')),
3401  ('DoubleMuPt1Extended_pythia8_cfi', UpgradeFragment(Kby(25,100),'SingleMuPt1Extended')),
3402  ('DoubleMuPt10Extended_pythia8_cfi', UpgradeFragment(Kby(25,100),'SingleMuPt10Extended')),
3403  ('DoubleMuPt100Extended_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleMuPt100Extended')),
3404  ('DoubleMuPt1000Extended_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleMuPt1000Extended')),
3405  ('TenMuE_0_200_pythia8_cfi', UpgradeFragment(Kby(10,100),'TenMuE_0_200')),
3406  ('SinglePiE50HCAL_pythia8_cfi', UpgradeFragment(Kby(50,500),'SinglePiE50HCAL')),
3407  ('MinBias_13TeV_pythia8_TuneCUETP8M1_cfi', UpgradeFragment(Kby(90,100),'MinBias_13')),
3408  ('TTbar_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'TTbar_13')),
3409  ('ZEE_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'ZEE_13')),
3410  ('QCD_Pt_600_800_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'QCD_Pt_600_800_13')),
3411  ('Wjet_Pt_80_120_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'Wjet_Pt_80_120_14TeV')),
3412  ('Wjet_Pt_3000_3500_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'Wjet_Pt_3000_3500_14TeV')),
3413  ('LM1_sfts_14TeV_cfi', UpgradeFragment(Kby(9,100),'LM1_sfts_14TeV')),
3414  ('QCD_Pt_3000_3500_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'QCD_Pt_3000_3500_14TeV')),
3415  ('QCD_Pt_80_120_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'QCD_Pt_80_120_14TeV')),
3416  ('H200ChargedTaus_Tauola_14TeV_cfi', UpgradeFragment(Kby(9,100),'Higgs200ChargedTaus_14TeV')),
3417  ('JpsiMM_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(66,100),'JpsiMM_14TeV')),
3418  ('TTbar_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,100),'TTbar_14TeV')),
3419  ('WE_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'WE_14TeV')),
3420  ('ZTT_Tauola_All_hadronic_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,100),'ZTT_14TeV')),
3421  ('H130GGgluonfusion_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'H130GGgluonfusion_14TeV')),
3422  ('PhotonJet_Pt_10_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'PhotonJets_Pt_10_14TeV')),
3423  ('QQH1352T_Tauola_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'QQH1352T_Tauola_14TeV')),
3424  ('MinBias_14TeV_pythia8_TuneCP5_cfi', UpgradeFragment(Kby(90,100),'MinBias_14TeV')),
3425  ('WToMuNu_14TeV_TuneCP5_pythia8_cfi', UpgradeFragment(Kby(9,100),'WToMuNu_14TeV')),
3426  ('ZMM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(18,100),'ZMM_13')),
3427  ('QCDForPF_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(50,100),'QCD_FlatPt_15_3000HS_14')),
3428  ('DYToLL_M-50_14TeV_pythia8_cff', UpgradeFragment(Kby(9,100),'DYToLL_M_50_14TeV')),
3429  ('DYToTauTau_M-50_14TeV_pythia8_tauola_cff', UpgradeFragment(Kby(9,100),'DYtoTauTau_M_50_14TeV')),
3430  ('ZEE_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,100),'ZEE_14')),
3431  ('QCD_Pt_80_120_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'QCD_Pt_80_120_13')),
3432  ('H125GGgluonfusion_13TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,50),'H125GGgluonfusion_13')),
3433  ('QCD_Pt20toInf_MuEnrichedPt15_14TeV_TuneCP5_cff', UpgradeFragment(Kby(19565, 217391),'QCD_Pt20toInfMuEnrichPt15_14')), # effi = 4.6e-4, local=8.000e-04
3434  ('ZMM_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(18,100),'ZMM_14')),
3435  ('QCD_Pt15To7000_Flat_14TeV_TuneCP5_cff', UpgradeFragment(Kby(9,50),'QCD_Pt15To7000_Flat_14')),
3436  ('H125GGgluonfusion_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,50),'H125GGgluonfusion_14')),
3437  ('QCD_Pt_600_800_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'QCD_Pt_600_800_14')),
3438  ('UndergroundCosmicSPLooseMu_cfi', UpgradeFragment(Kby(9,50),'CosmicsSPLoose')),
3439  ('BeamHalo_13TeV_cfi', UpgradeFragment(Kby(9,50),'BeamHalo_13')),
3440  ('H200ChargedTaus_Tauola_13TeV_cfi', UpgradeFragment(Kby(9,50),'Higgs200ChargedTaus_13')),
3441  ('ADDMonoJet_13TeV_d3MD3_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'ADDMonoJet_d3MD3_13')),
3442  ('ZpMM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'ZpMM_13')),
3443  ('QCD_Pt_3000_3500_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'QCD_Pt_3000_3500_13')),
3444  ('WpM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'WpM_13')),
3445  ('SingleNuE10_cfi', UpgradeFragment(Kby(9,50),'NuGun')),
3446  ('TTbarLepton_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'TTbarLepton_13')),
3447  ('WE_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'WE_13')),
3448  ('WM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'WM_13')),
3449  ('ZTT_All_hadronic_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'ZTT_13')),
3450  ('PhotonJet_Pt_10_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'PhotonJets_Pt_10_13')),
3451  ('QQH1352T_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'QQH1352T_13')),
3452  ('Wjet_Pt_80_120_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'Wjet_Pt_80_120_13')),
3453  ('Wjet_Pt_3000_3500_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'Wjet_Pt_3000_3500_13')),
3454  ('SMS-T1tttt_mGl-1500_mLSP-100_13TeV-pythia8_cfi', UpgradeFragment(Kby(9,50),'SMS-T1tttt_mGl-1500_mLSP-100_13')),
3455  ('QCDForPF_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(50,100),'QCD_FlatPt_15_3000HS_13')),
3456  ('PYTHIA8_PhiToMuMu_TuneCUETP8M1_13TeV_cff', UpgradeFragment(Kby(9,50),'PhiToMuMu_13')),
3457  ('RSKKGluon_m3000GeV_13TeV_TuneCUETP8M1_cff', UpgradeFragment(Kby(9,50),'RSKKGluon_m3000GeV_13')),
3458  ('ZpMM_2250_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'ZpMM_2250_13')),
3459  ('ZpEE_2250_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'ZpEE_2250_13')),
3460  ('ZpTT_1500_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'ZpTT_1500_13')),
3461  ('Upsilon1SToMuMu_forSTEAM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'Upsilon1SToMuMu_13')),
3462  ('EtaBToJpsiJpsi_forSTEAM_TuneCUEP8M1_13TeV_cfi', UpgradeFragment(Kby(9,50),'EtaBToJpsiJpsi_13')),
3463  ('JpsiMuMu_Pt-8_forSTEAM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(3100,100000),'JpsiMuMu_Pt-8')),
3464  ('BuMixing_BMuonFilter_forSTEAM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(900,10000),'BuMixing_13')),
3465  ('HSCPstop_M_200_TuneCUETP8M1_13TeV_pythia8_cff', UpgradeFragment(Kby(9,50),'HSCPstop_M_200_13')),
3466  ('RSGravitonToGammaGamma_kMpl01_M_3000_TuneCUETP8M1_13TeV_pythia8_cfi', UpgradeFragment(Kby(9,50),'RSGravitonToGaGa_13')),
3467  ('WprimeToENu_M-2000_TuneCUETP8M1_13TeV-pythia8_cff', UpgradeFragment(Kby(9,50),'WpToENu_M-2000_13')),
3468  ('DisplacedSUSY_stopToBottom_M_800_500mm_TuneCP5_13TeV_pythia8_cff', UpgradeFragment(Kby(9,50),'DisplacedSUSY_stopToB_M_800_500mm_13')),
3469  ('TenE_E_0_200_pythia8_cfi', UpgradeFragment(Kby(9,100),'TenE_0_200')),
3470  ('FlatRandomPtAndDxyGunProducer_cfi', UpgradeFragment(Kby(9,100),'DisplacedMuonsDxy_0_500')),
3471  ('TenTau_E_15_500_pythia8_cfi', UpgradeFragment(Kby(9,100),'TenTau_15_500')),
3472  ('SinglePiPt25Eta1p7_2p7_cfi', UpgradeFragment(Kby(9,100),'SinglePiPt25Eta1p7_2p7')),
3473  ('SingleMuPt15Eta1p7_2p7_cfi', UpgradeFragment(Kby(9,100),'SingleMuPt15Eta1p7_2p7')),
3474  ('SingleGammaPt25Eta1p7_2p7_cfi', UpgradeFragment(Kby(9,100),'SingleGammaPt25Eta1p7_2p7')),
3475  ('SingleElectronPt15Eta1p7_2p7_cfi', UpgradeFragment(Kby(9,100),'SingleElectronPt15Eta1p7_2p7')),
3476  ('ZTT_All_hadronic_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,50),'ZTT_14')),
3477  ('CloseByParticle_Photon_ERZRanges_cfi', UpgradeFragment(Kby(9,100),'CloseByParticleGun')),
3478  ('CE_E_Front_300um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_E_Front_300um')),
3479  ('CE_E_Front_200um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_E_Front_200um')),
3480  ('CE_E_Front_120um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_E_Front_120um')),
3481  ('CE_H_Fine_300um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_H_Fine_300um')),
3482  ('CE_H_Fine_200um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_H_Fine_200um')),
3483  ('CE_H_Fine_120um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_H_Fine_120um')),
3484  ('CE_H_Coarse_Scint_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_H_Coarse_Scint')),
3485  ('CE_H_Coarse_300um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_H_Coarse_300um')),
3486  ('SingleElectronFlatPt2To100_cfi', UpgradeFragment(Kby(9,100),'SingleEFlatPt2To100')),
3487  ('SingleMuFlatPt0p7To10_cfi', UpgradeFragment(Kby(9,100),'SingleMuFlatPt0p7To10')),
3488  ('SingleMuFlatPt2To100_cfi', UpgradeFragment(Kby(9,100),'SingleMuFlatPt2To100')),
3489  ('SingleGammaFlatPt8To150_cfi', UpgradeFragment(Kby(9,100),'SingleGammaFlatPt8To150')),
3490  ('SinglePiFlatPt0p7To10_cfi', UpgradeFragment(Kby(9,100),'SinglePiFlatPt0p7To10')),
3491  ('SingleTauFlatPt2To150_cfi', UpgradeFragment(Kby(9,100),'SingleTauFlatPt2To150')),
3492  ('FlatRandomPtAndDxyGunProducer_MuPt2To10_cfi', UpgradeFragment(Kby(9,100),'DisplacedMuPt2To10')),
3493  ('FlatRandomPtAndDxyGunProducer_MuPt10To30_cfi', UpgradeFragment(Kby(9,100),'DisplacedMuPt10To30')),
3494  ('FlatRandomPtAndDxyGunProducer_MuPt30To100_cfi', UpgradeFragment(Kby(9,100),'DisplacedMuPt30To100')),
3495  ('B0ToKstarMuMu_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(304,3030),'B0ToKstarMuMu_14TeV')), # 3.3%
3496  ('BsToEleEle_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(223,2222),'BsToEleEle_14TeV')), # 4.5%
3497  ('BsToJpsiGamma_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(2500,25000),'BsToJpsiGamma_14TeV')), # 0.4%
3498  ('BsToJpsiPhi_mumuKK_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(910,9090),'BsToJpsiPhi_mumuKK_14TeV')), # 1.1%
3499  ('BsToMuMu_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(313,3125),'BsToMuMu_14TeV')), # 3.2%
3500  ('BsToPhiPhi_KKKK_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(556,5555),'BsToPhiPhi_KKKK_14TeV')), # 1.8%
3501  ('TauToMuMuMu_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(18939,189393),'TauToMuMuMu_14TeV')), # effi = 5.280e-04
3502  ('BdToKstarEleEle_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(206,2061),'BdToKstarEleEle_14TeV')), #effi = 4.850e-02
3503  ('ZpTT_1500_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,50),'ZpTT_1500_14')),
3504  ('BuMixing_BMuonFilter_forSTEAM_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(900,10000),'BuMixing_14')),
3505  ('Upsilon1SToMuMu_forSTEAM_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,50),'Upsilon1SToMuMu_14')),
3506  ('TenTau_E_15_500_Eta3p1_pythia8_cfi', UpgradeFragment(Kby(9,100),'TenTau_15_500_Eta3p1')),
3507  ('QCD_Pt_1800_2400_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,50), 'QCD_Pt_1800_2400_14')),
3508  ('DisplacedSUSY_stopToBottom_M_800_500mm_TuneCP5_14TeV_pythia8_cff', UpgradeFragment(Kby(9,50),'DisplacedSUSY_14TeV')),
3509  ('GluGluTo2Jets_M_300_2000_14TeV_Exhume_cff',UpgradeFragment(Kby(9,100),'GluGluTo2Jets_14TeV')),
3510  ('TTbarToDilepton_mt172p5_TuneCP5_14TeV_pythia8_cfi',UpgradeFragment(Kby(9,50),'TTbarToDilepton_14TeV')),
3511  ('QQToHToTauTau_mh125_TuneCP5_14TeV_pythia8_cfi',UpgradeFragment(Kby(9,50),'QQToHToTauTau_14TeV')),
3512  ('ZpToEE_m6000_TuneCP5_14TeV_pythia8_cfi',UpgradeFragment(Kby(9,50),'ZpToEE_m6000_14TeV')),
3513  ('ZpToMM_m6000_TuneCP5_14TeV_pythia8_cfi',UpgradeFragment(Kby(9,50),'ZpToMM_m6000_14TeV')),
3514  ('SMS-T1tttt_mGl-1500_mLSP-100_TuneCP5_14TeV_pythia8_cfi',UpgradeFragment(Kby(9,50),'SMS-T1tttt_14TeV')),
3515  ('VBFHZZ4Nu_TuneCP5_14TeV_pythia8_cfi',UpgradeFragment(Kby(9,50),'VBFHZZ4Nu_14TeV')),
3516  ('EtaBToJpsiJpsi_14TeV_TuneCP5_pythia8_cfi',UpgradeFragment(Kby(9,50),'EtaBToJpsiJpsi_14TeV')),
3517  ('WToLNu_14TeV_TuneCP5_pythia8_cfi',UpgradeFragment(Kby(21,50),'WToLNu_14TeV')),
3518  ('WprimeToLNu_M2000_14TeV_TuneCP5_pythia8_cfi',UpgradeFragment(Kby(21,50),'WprimeToLNu_M2000_14TeV')),
3519  ('DoubleMuFlatPt1p5To8_cfi', UpgradeFragment(Kby(9,100),'SingleMuFlatPt1p5To8')),
3520  ('DoubleElectronFlatPt1p5To8_cfi', UpgradeFragment(Kby(9,100),'SingleElectronFlatPt1p5To8')),
3521  ('DoubleMuFlatPt1p5To8Dxy100GunProducer_cfi', UpgradeFragment(Kby(9,100),'DisplacedMuPt1p5To8Dxy100')),
3522  ('DoubleMuFlatPt2To100Dxy100GunProducer_cfi', UpgradeFragment(Kby(9,100),'DisplacedMuPt2To100Dxy100')),
3523  ('BuToJPsiPrimeKToJPsiPiPiK_14TeV_TuneCP5_pythia8_cfi', UpgradeFragment(Kby(223,2222),'BuToJPsiPrimeKToJPsiPiPiK_14TeV')), # 5.7%
3524  ('Psi2SToJPsiPiPi_14TeV_TuneCP5_pythia8_cfi', UpgradeFragment(Kby(45,500),'Psi2SToJPsiPiPi_14TeV')), # 24.6%
3525  ('XiMinus_13p6TeV_SoftQCDInel_TuneCP5_cfi', UpgradeFragment(Kby(8000,90000),'XiMinus_13p6TeV')), #2.8%
3526  ('Chib1PToUpsilon1SGamma_MuFilter_TuneCP5_14TeV-pythia8_evtgen_cfi', UpgradeFragment(Kby(3600,36000),'Chib1PToUpsilon1SGamma_14TeV')), #2.8%
3527  ('ChicToJpsiGamma_MuFilter_TuneCP5_14TeV_pythia8_evtgen_cfi', UpgradeFragment(Kby(2000,20000),'ChicToJpsiGamma_14TeV')), #5%
3528  ('B0ToJpsiK0s_JMM_Filter_DGamma0_TuneCP5_13p6TeV-pythia8-evtgen_cfi',UpgradeFragment(Kby(38000,38000),'B0ToJpsiK0s_DGamma0_13p6TeV')), #2.7%
3529  ('DStarToD0Pi_D0ToKsPiPi_inclusive_SoftQCD_TuneCP5_13p6TeV-pythia8-evtgen',UpgradeFragment(Kby(38000,38000),'DStarToD0Pi_D0ToKsPiPi_13p6TeV')), #1.3%
3530  ('LbToJpsiLambda_JMM_Filter_DGamma0_TuneCP5_13p6TeV-pythia8-evtgen_cfi',UpgradeFragment(Mby(66,660000),'LbToJpsiLambda_DGamma0_13p6TeV')), #0.3%
3531  ('LbToJpsiXiK0sPi_JMM_Filter_DGamma0_TuneCP5_13p6TeV-pythia8-evtgen_cfi',UpgradeFragment(Mby(50,500000),'LbToJpsiXiK0sPr_DGamma0_13p6TeV')), #0.6%
3532  ('OmegaMinus_13p6TeV_SoftQCDInel_TuneCP5_cfi',UpgradeFragment(Mby(100,1000000),'OmegaMinus_13p6TeV')), #0.1%
3533  ('Hydjet_Quenched_MinBias_5020GeV_cfi', UpgradeFragment(U2000by1,'HydjetQMinBias_5020GeV')),
3534  ('Hydjet_Quenched_MinBias_5362GeV_cfi', UpgradeFragment(U2000by1,'HydjetQMinBias_5362GeV')),
3535  ('Hydjet_Quenched_MinBias_5519GeV_cfi', UpgradeFragment(U2000by1,'HydjetQMinBias_5519GeV')),
3536 ])
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)