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