CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
upgradeWorkflowComponents.py
Go to the documentation of this file.
1 from copy import copy, deepcopy
2 from collections import OrderedDict
3 from .MatrixUtil import merge, Kby
4 import re
5 
6 # DON'T CHANGE THE ORDER, only append new keys. Otherwise the numbering for the runTheMatrix tests will change.
7 
8 upgradeKeys = {}
9 
10 upgradeKeys[2017] = [
11  '2017',
12  '2017PU',
13  '2017Design',
14  '2017DesignPU',
15  '2018',
16  '2018PU',
17  '2018Design',
18  '2018DesignPU',
19  '2021',
20  '2021PU',
21  '2021Design',
22  '2021DesignPU',
23  '2023',
24  '2023PU',
25  '2024',
26  '2024PU',
27 ]
28 
29 upgradeKeys[2026] = [
30  '2026D49',
31  '2026D49PU',
32  '2026D60',
33  '2026D60PU',
34  '2026D68',
35  '2026D68PU',
36  '2026D70',
37  '2026D70PU',
38  '2026D76',
39  '2026D76PU',
40  '2026D77',
41  '2026D77PU',
42  '2026D78',
43  '2026D78PU',
44  '2026D79',
45  '2026D79PU',
46  '2026D80',
47  '2026D80PU',
48  '2026D81',
49  '2026D81PU',
50  '2026D82',
51  '2026D82PU',
52  '2026D83',
53  '2026D83PU',
54  '2026D84',
55  '2026D84PU',
56  '2026D85',
57  '2026D85PU',
58  '2026D86',
59  '2026D86PU',
60  '2026D87',
61  '2026D87PU',
62  '2026D88',
63  '2026D88PU',
64  '2026D89',
65  '2026D89PU',
66  '2026D90',
67  '2026D90PU',
68  '2026D91',
69  '2026D91PU',
70 ]
71 
72 # pre-generation of WF numbers
73 numWFStart={
74  2017: 10000,
75  2026: 20000,
76 }
77 numWFSkip=200
78 # temporary measure to keep other WF numbers the same
79 numWFConflict = [[20000,23200],[23600,28200],[28600,31400],[31800,32200],[32600,34600],[50000,51000]]
80 numWFAll={
81  2017: [],
82  2026: []
83 }
84 
85 for year in upgradeKeys:
86  for i in range(0,len(upgradeKeys[year])):
87  numWFtmp = numWFStart[year] if i==0 else (numWFAll[year][i-1] + numWFSkip)
88  for conflict in numWFConflict:
89  if numWFtmp>=conflict[0] and numWFtmp<conflict[1]:
90  numWFtmp = conflict[1]
91  break
92  numWFAll[year].append(numWFtmp)
93 
94 # workflows for baseline and for variations
95 # setup() automatically loops over all steps and applies any customizations specified in setup_() -> called in relval_steps.py
96 # setupPU() and setupPU_() operate similarly -> called in relval_steps.py *after* merging PUDataSets w/ regular steps
97 # workflow() adds a concrete workflow to the list based on condition() -> called in relval_upgrade.py
98 # every special workflow gets its own derived class, which must then be added to the global dict upgradeWFs
99 preventReuseKeyword = 'NOREUSE'
100 class UpgradeWorkflow(object):
101  def __init__(self,steps,PU,suffix,offset):
102  self.steps = steps
103  self.PU = PU
104  self.allowReuse = True
105 
106  # ensure all PU steps are in normal step list
107  for step in self.PU:
108  if not step in self.steps:
109  self.steps.append(step)
110 
111  self.suffix = suffix
112  if len(self.suffix)>0 and self.suffix[0]!='_': self.suffix = '_'+self.suffix
113  self.offset = offset
114  if self.offset < 0.0 or self.offset > 1.0:
115  raise ValueError("Special workflow offset must be between 0.0 and 1.0")
116  def getStepName(self, step, extra=""):
117  stepName = step + self.suffix + extra
118  return stepName
119  def getStepNamePU(self, step, extra=""):
120  stepNamePU = step + 'PU' + self.suffix + extra
121  return stepNamePU
122  def init(self, stepDict):
123  for step in self.steps:
124  stepDict[self.getStepName(step)] = {}
125  if not self.allowReuse: stepDict[self.getStepName(step,preventReuseKeyword)] = {}
126  for step in self.PU:
127  stepDict[self.getStepNamePU(step)] = {}
128  if not self.allowReuse: stepDict[self.getStepNamePU(step,preventReuseKeyword)] = {}
129  def setup(self, stepDict, k, properties):
130  for step in self.steps:
131  self.setup_(step, self.getStepName(step), stepDict, k, properties)
132  if not self.allowReuse: self.preventReuse(self.getStepName(step,preventReuseKeyword), stepDict, k)
133  def setupPU(self, stepDict, k, properties):
134  for step in self.PU:
135  self.setupPU_(step, self.getStepNamePU(step), stepDict, k, properties)
136  if not self.allowReuse: self.preventReuse(self.getStepNamePU(step,preventReuseKeyword), stepDict, k)
137  def setup_(self, step, stepName, stepDict, k, properties):
138  pass
139  def setupPU_(self, step, stepName, stepDict, k, properties):
140  pass
141  def workflow(self, workflows, num, fragment, stepList, key, hasHarvest):
142  if self.condition(fragment, stepList, key, hasHarvest):
143  self.workflow_(workflows, num, fragment, stepList, key)
144  def workflow_(self, workflows, num, fragment, stepList, key):
145  fragmentTmp = [fragment, key]
146  if len(self.suffix)>0: fragmentTmp.append(self.suffix)
147  workflows[num+self.offset] = [ fragmentTmp, stepList ]
148  def condition(self, fragment, stepList, key, hasHarvest):
149  return False
150  def preventReuse(self, stepName, stepDict, k):
151  if "Sim" in stepName:
152  stepDict[stepName][k] = None
153 upgradeWFs = OrderedDict()
154 
156  def setup_(self, step, stepName, stepDict, k, properties):
157  cust=properties.get('Custom', None)
158  era=properties.get('Era', None)
159  modifier=properties.get('ProcessModifier',None)
160  if cust is not None: stepDict[stepName][k]['--customise']=cust
161  if era is not None:
162  stepDict[stepName][k]['--era']=era
163  if modifier is not None: stepDict[stepName][k]['--procModifier']=modifier
164  def condition(self, fragment, stepList, key, hasHarvest):
165  return True
166 upgradeWFs['baseline'] = UpgradeWorkflow_baseline(
167  steps = [
168  'GenSim',
169  'GenSimHLBeamSpot',
170  'GenSimHLBeamSpot14',
171  'GenSimHLBeamSpotHGCALCloseBy',
172  'Digi',
173  'DigiTrigger',
174  'RecoLocal',
175  'Reco',
176  'RecoFakeHLT',
177  'RecoGlobal',
178  'RecoNano',
179  'HARVEST',
180  'HARVESTFakeHLT',
181  'HARVESTNano',
182  'FastSim',
183  'HARVESTFast',
184  'HARVESTGlobal',
185  'ALCA',
186  'Nano',
187  'MiniAOD',
188  ],
189  PU = [
190  'DigiTrigger',
191  'RecoLocal',
192  'RecoGlobal',
193  'Digi',
194  'Reco',
195  'RecoFakeHLT',
196  'RecoNano',
197  'HARVEST',
198  'HARVESTFakeHLT',
199  'HARVESTNano',
200  'HARVESTGlobal',
201  'MiniAOD',
202  'Nano',
203  ],
204  suffix = '',
205  offset = 0.0,
206 )
207 
208 # some commonalities among tracking WFs
210  # skip the PU argument since PU workflows never used here
211  def __init__(self, steps, suffix, offset):
212  # always include some steps that will be skipped
213  steps = steps + ["ALCA","Nano"]
214  super().__init__(steps, [], suffix, offset)
215  def condition(self, fragment, stepList, key, hasHarvest):
216  result = (fragment=="TTbar_13" or fragment=="TTbar_14TeV") and not 'PU' in key and hasHarvest and self.condition_(fragment, stepList, key, hasHarvest)
217  return result
218  def condition_(self, fragment, stepList, key, hasHarvest):
219  return True
220  def setup_(self, step, stepName, stepDict, k, properties):
221  # skip ALCA and Nano steps (but not RecoNano or HARVESTNano for Run3)
222  if 'ALCA' in step or 'Nano'==step:
223  stepDict[stepName][k] = None
224  self.setup__(step, stepName, stepDict, k, properties)
225  # subordinate function for inherited classes
226  def setup__(self, step, stepName, stepDict, k, properties):
227  pass
228 
229 class UpgradeWorkflow_trackingOnly(UpgradeWorkflowTracking):
230  def setup__(self, step, stepName, stepDict, k, properties):
231  if 'Reco' in step: stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
232  elif 'HARVEST' in step: stepDict[stepName][k] = merge([{'-s': 'HARVESTING:@trackingOnlyValidation+@trackingOnlyDQM'}, stepDict[step][k]])
233 upgradeWFs['trackingOnly'] = UpgradeWorkflow_trackingOnly(
234  steps = [
235  'Reco',
236  'HARVEST',
237  'RecoGlobal',
238  'HARVESTGlobal',
239  'RecoNano',
240  'HARVESTNano',
241  'RecoFakeHLT',
242  'HARVESTFakeHLT',
243  ],
244  suffix = '_trackingOnly',
245  offset = 0.1,
246 )
247 upgradeWFs['trackingOnly'].step3 = {
248  '-s': 'RAW2DIGI,RECO:reconstruction_trackingOnly,VALIDATION:@trackingOnlyValidation,DQM:@trackingOnlyDQM',
249  '--datatier':'GEN-SIM-RECO,DQMIO',
250  '--eventcontent':'RECOSIM,DQM',
251 }
252 # used outside of upgrade WFs
253 step3_trackingOnly = upgradeWFs['trackingOnly'].step3
254 
256  def setup__(self, step, stepName, stepDict, k, properties):
257  if 'Reco' in step and stepDict[step][k]['--era']=='Run2_2017':
258  stepDict[stepName][k] = merge([{'--era': 'Run2_2017_trackingRun2'}, stepDict[step][k]])
259  def condition_(self, fragment, stepList, key, hasHarvest):
260  return '2017' in key
261 upgradeWFs['trackingRun2'] = UpgradeWorkflow_trackingRun2(
262  steps = [
263  'Reco',
264  'RecoFakeHLT',
265  ],
266  suffix = '_trackingRun2',
267  offset = 0.2,
268 )
269 
271  def setup__(self, step, stepName, stepDict, k, properties):
272  if 'Reco' in step and stepDict[step][k]['--era']=='Run2_2017':
273  stepDict[stepName][k] = merge([{'--era': 'Run2_2017_trackingRun2'}, self.step3, stepDict[step][k]])
274  elif 'HARVEST' in step: stepDict[stepName][k] = merge([{'-s': 'HARVESTING:@trackingOnlyValidation+@trackingOnlyDQM'}, stepDict[step][k]])
275  def condition_(self, fragment, stepList, key, hasHarvest):
276  return '2017' in key
277 upgradeWFs['trackingOnlyRun2'] = UpgradeWorkflow_trackingOnlyRun2(
278  steps = [
279  'Reco',
280  'HARVEST',
281  'RecoFakeHLT',
282  'HARVESTFakeHLT',
283  ],
284  suffix = '_trackingOnlyRun2',
285  offset = 0.3,
286 )
287 upgradeWFs['trackingOnlyRun2'].step3 = upgradeWFs['trackingOnly'].step3
288 
290  def setup__(self, step, stepName, stepDict, k, properties):
291  if 'Reco' in step and stepDict[step][k]['--era']=='Run2_2017':
292  stepDict[stepName][k] = merge([{'--era': 'Run2_2017_trackingLowPU'}, stepDict[step][k]])
293  def condition_(self, fragment, stepList, key, hasHarvest):
294  return '2017' in key
295 upgradeWFs['trackingLowPU'] = UpgradeWorkflow_trackingLowPU(
296  steps = [
297  'Reco',
298  'RecoFakeHLT',
299  ],
300  suffix = '_trackingLowPU',
301  offset = 0.4,
302 )
303 
305  def setup__(self, step, stepName, stepDict, k, properties):
306  if 'Reco' in step: stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
307  elif 'HARVEST' in step: stepDict[stepName][k] = merge([{'-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'}, stepDict[step][k]])
308  def condition_(self, fragment, stepList, key, hasHarvest):
309  return '2017' in key or '2018' in key or '2021' in key or '2026' in key
310 upgradeWFs['pixelTrackingOnly'] = UpgradeWorkflow_pixelTrackingOnly(
311  steps = [
312  'Reco',
313  'HARVEST',
314  'RecoGlobal',
315  'HARVESTGlobal',
316  'RecoNano',
317  'HARVESTNano',
318  'RecoFakeHLT',
319  'HARVESTFakeHLT',
320  ],
321  suffix = '_pixelTrackingOnly',
322  offset = 0.5,
323 )
324 upgradeWFs['pixelTrackingOnly'].step3 = {
325  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
326  '--datatier': 'GEN-SIM-RECO,DQMIO',
327  '--eventcontent': 'RECOSIM,DQM',
328 }
329 
331  def setup__(self, step, stepName, stepDict, k, properties):
332  if 'Digi' in step: stepDict[stepName][k] = merge([self.step2, stepDict[step][k]])
333  if 'Reco' in step: stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
334  def condition_(self, fragment, stepList, key, hasHarvest):
335  return '2017' in key or '2021' in key
336 upgradeWFs['trackingMkFit'] = UpgradeWorkflow_trackingMkFit(
337  steps = [
338  'Digi',
339  'DigiTrigger',
340  'Reco',
341  'RecoGlobal',
342  'RecoNano',
343  'RecoFakeHLT',
344  ],
345  suffix = '_trackingMkFit',
346  offset = 0.7,
347 )
348 upgradeWFs['trackingMkFit'].step2 = {
349  '--customise': 'RecoTracker/MkFit/customizeHLTIter0ToMkFit.customizeHLTIter0ToMkFit'
350 }
351 upgradeWFs['trackingMkFit'].step3 = {
352  '--procModifiers': 'trackingMkFit'
353 }
354 
355 #DeepCore seeding for JetCore iteration workflow
357  def setup_(self, step, stepName, stepDict, k, properties):
358  # skip ALCA and Nano steps (but not RecoNano or HARVESTNano for Run3)
359  if 'ALCA' in step or 'Nano'==step:
360  stepDict[stepName][k] = None
361  elif 'Reco' in step or 'HARVEST' in step: stepDict[stepName][k] = merge([{'--procModifiers': 'seedingDeepCore'}, stepDict[step][k]])
362  def condition(self, fragment, stepList, key, hasHarvest):
363  result = (fragment=="QCD_Pt_1800_2400_14" or fragment=="TTbar_14TeV" ) and ('2021' in key or '2024' in key) and hasHarvest
364  return result
365 upgradeWFs['seedingDeepCore'] = UpgradeWorkflow_seedingDeepCore(
366  steps = [
367  'Reco',
368  'HARVEST',
369  'RecoGlobal',
370  'HARVESTGlobal',
371  'RecoNano',
372  'HARVESTNano',
373  'Nano',
374  'ALCA',
375  ],
376  PU = [],
377  suffix = '_seedingDeepCore',
378  offset = 0.17,
379 )
380 
381 # Vector Hits workflows
383  def setup_(self, step, stepName, stepDict, k, properties):
384  stepDict[stepName][k] = merge([{'--procModifiers': 'vectorHits'}, stepDict[step][k]])
385  def condition(self, fragment, stepList, key, hasHarvest):
386  return fragment=="TTbar_14TeV" and '2026' in key
387 upgradeWFs['vectorHits'] = UpgradeWorkflow_vectorHits(
388  steps = [
389  'RecoGlobal',
390  'HARVESTGlobal'
391  ],
392  PU = [
393  'RecoGlobal',
394  ],
395  suffix = '_vectorHits',
396  offset = 0.9,
397 )
398 
399 # Special TICL Pattern recognition Workflows
401  def setup_(self, step, stepName, stepDict, k, properties):
402  if 'RecoGlobal' in step:
403  stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
404  if 'HARVESTGlobal' in step:
405  stepDict[stepName][k] = merge([self.step4, stepDict[step][k]])
406  def condition(self, fragment, stepList, key, hasHarvest):
407  return (fragment=="TTbar_14TeV" or 'CloseByPGun_CE' in fragment) and '2026' in key
408 upgradeWFs['ticl_clue3D'] = UpgradeWorkflow_ticl_clue3D(
409  steps = [
410  'RecoGlobal',
411  'HARVESTGlobal'
412  ],
413  PU = [
414  'RecoGlobal',
415  'HARVESTGlobal'
416  ],
417  suffix = '_ticl_clue3D',
418  offset = 0.201,
419 )
420 upgradeWFs['ticl_clue3D'].step3 = {'--procModifiers': 'clue3D'}
421 upgradeWFs['ticl_clue3D'].step4 = {'--procModifiers': 'clue3D'}
422 
424  def setup_(self, step, stepName, stepDict, k, properties):
425  if 'RecoGlobal' in step:
426  stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
427  if 'HARVESTGlobal' in step:
428  stepDict[stepName][k] = merge([self.step4, stepDict[step][k]])
429  def condition(self, fragment, stepList, key, hasHarvest):
430  return (fragment=="TTbar_14TeV" or 'CloseByPGun_CE' in fragment) and '2026' in key
431 upgradeWFs['ticl_FastJet'] = UpgradeWorkflow_ticl_FastJet(
432  steps = [
433  'RecoGlobal',
434  'HARVESTGlobal'
435  ],
436  PU = [
437  'RecoGlobal',
438  'HARVESTGlobal'
439  ],
440  suffix = '_ticl_FastJet',
441  offset = 0.202,
442 )
443 upgradeWFs['ticl_FastJet'].step3 = {'--procModifiers': 'fastJetTICL'}
444 upgradeWFs['ticl_FastJet'].step4 = {'--procModifiers': 'fastJetTICL'}
445 
446 # Track DNN workflows
448  def setup_(self, step, stepName, stepDict, k, properties):
449  stepDict[stepName][k] = merge([{'--procModifiers': 'trackdnn'}, stepDict[step][k]])
450 
451  def condition(self, fragment, stepList, key, hasHarvest):
452  return fragment=="TTbar_14TeV" and '2021' in key
453 upgradeWFs['trackdnn'] = UpgradeWorkflow_trackdnn(
454  steps = [
455  'Reco',
456  'RecoNano',
457  ],
458  PU = [
459  'Reco',
460  'RecoNano',
461  ],
462  suffix = '_trackdnn',
463  offset = 0.91,
464 )
465 
466 
467 # MLPF workflows
469  def setup_(self, step, stepName, stepDict, k, properties):
470  if 'Reco' in step:
471  stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
472  def condition(self, fragment, stepList, key, hasHarvest):
473  return (fragment=="TTbar_14TeV" or fragment=="QCD_FlatPt_15_3000HS_14") and '2021PU' in key
474 
475 upgradeWFs['mlpf'] = UpgradeWorkflow_mlpf(
476  steps = [
477  'Reco',
478  'RecoNano',
479  ],
480  PU = [
481  'Reco',
482  'RecoNano',
483  ],
484  suffix = '_mlpf',
485  offset = 0.13,
486 )
487 upgradeWFs['mlpf'].step3 = {
488  '--datatier': 'GEN-SIM-RECO,RECOSIM,MINIAODSIM,NANOAODSIM,DQMIO',
489  '--eventcontent': 'FEVTDEBUGHLT,RECOSIM,MINIAODSIM,NANOEDMAODSIM,DQM',
490  '--procModifiers': 'mlpf'
491 }
492 
493 # Patatrack workflows:
494 # - 2018 conditions, TTbar
495 # - 2018 conditions, Z->mumu,
496 # - 2021 conditions, TTbar
497 # - 2021 conditions, Z->mumu,
499  def __init__(self, digi = {}, reco = {}, harvest = {}, **kwargs):
500  # adapt the parameters for the UpgradeWorkflow init method
501  super(PatatrackWorkflow, self).__init__(
502  steps = [
503  'Digi',
504  'DigiTrigger',
505  'Reco',
506  'HARVEST',
507  'RecoFakeHLT',
508  'HARVESTFakeHLT',
509  'RecoGlobal',
510  'HARVESTGlobal',
511  'RecoNano',
512  'HARVESTNano',
513  'Nano',
514  'ALCA',
515  ],
516  PU = [],
517  **kwargs)
518  self.__digi = digi
519  self.__reco = reco
520  self.__reco.update({
521  '--datatier': 'GEN-SIM-RECO,DQMIO',
522  '--eventcontent': 'RECOSIM,DQM'
523  })
524  self.__harvest = harvest
525 
526  def condition(self, fragment, stepList, key, hasHarvest):
527  # select only a subset of the workflows
528  selected = [
529  ('2018' in key and fragment == "TTbar_13"),
530  ('2021' in key and fragment == "TTbar_14TeV"),
531  ('2018' in key and fragment == "ZMM_13"),
532  ('2021' in key and fragment == "ZMM_14"),
533  ('2026D88' in key and fragment == "TTbar_14TeV" and "PixelOnly" in self.suffix)
534  ]
535  result = any(selected) and hasHarvest
536 
537  return result
538 
539  def setup_(self, step, stepName, stepDict, k, properties):
540  # skip ALCA and Nano steps (but not RecoNano or HARVESTNano for Run3)
541  if 'ALCA' in step or 'Nano'==step:
542  stepDict[stepName][k] = None
543  elif 'Digi' in step:
544  if self.__digi is None:
545  stepDict[stepName][k] = None
546  else:
547  stepDict[stepName][k] = merge([self.__digi, stepDict[step][k]])
548  elif 'Reco' in step:
549  if self.__reco is None:
550  stepDict[stepName][k] = None
551  else:
552  stepDict[stepName][k] = merge([self.__reco, stepDict[step][k]])
553  elif 'HARVEST' in step:
554  if self.__harvest is None:
555  stepDict[stepName][k] = None
556  else:
557  stepDict[stepName][k] = merge([self.__harvest, stepDict[step][k]])
558 
559 # Pixel-only quadruplets workflow running on CPU
560 # - HLT on CPU
561 # - Pixel-only reconstruction on CPU, with DQM and validation
562 # - harvesting
563 upgradeWFs['PatatrackPixelOnlyCPU'] = PatatrackWorkflow(
564  digi = {
565  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
566  },
567  reco = {
568  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
569  '--procModifiers': 'pixelNtupletFit'
570  },
571  harvest = {
572  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'
573  },
574  suffix = 'Patatrack_PixelOnlyCPU',
575  offset = 0.501,
576 )
577 
578 # Pixel-only quadruplets workflow running on CPU or GPU
579 # - HLT on GPU (optional)
580 # - Pixel-only reconstruction on GPU (optional), with DQM and validation
581 # - harvesting
582 upgradeWFs['PatatrackPixelOnlyGPU'] = PatatrackWorkflow(
583  digi = {
584  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
585  '--procModifiers': 'gpu'
586  },
587  reco = {
588  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
589  '--procModifiers': 'pixelNtupletFit,gpu'
590  },
591  harvest = {
592  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'
593  },
594  suffix = 'Patatrack_PixelOnlyGPU',
595  offset = 0.502,
596 )
597 
598 # Pixel-only quadruplets workflow running on CPU and GPU
599 # - HLT on GPU (required)
600 # - Pixel-only reconstruction on both CPU and GPU, with DQM and validation for GPU-vs-CPU comparisons
601 # - harvesting
602 upgradeWFs['PatatrackPixelOnlyGPUValidation'] = PatatrackWorkflow(
603  digi = {
604  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
605  '--accelerators': 'gpu-nvidia',
606  '--procModifiers': 'gpu'
607  },
608  reco = {
609  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
610  '--accelerators': 'gpu-nvidia',
611  '--procModifiers': 'pixelNtupletFit,gpuValidation'
612  },
613  harvest = {
614  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'
615  },
616  suffix = 'Patatrack_PixelOnlyGPU_Validation',
617  offset = 0.503,
618 )
619 
620 # Pixel-only quadruplets workflow running on CPU or GPU, trimmed down for benchmarking
621 # - HLT on GPU (optional)
622 # - Pixel-only reconstruction on GPU (optional)
623 upgradeWFs['PatatrackPixelOnlyGPUProfiling'] = PatatrackWorkflow(
624  digi = {
625  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
626  '--procModifiers': 'gpu'
627  },
628  reco = {
629  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly',
630  '--procModifiers': 'pixelNtupletFit,gpu',
631  '--customise' : 'RecoTracker/Configuration/customizePixelOnlyForProfiling.customizePixelOnlyForProfilingGPUOnly'
632  },
633  harvest = None,
634  suffix = 'Patatrack_PixelOnlyGPU_Profiling',
635  offset = 0.504,
636 )
637 
638 # Pixel-only triplets workflow running on CPU
639 # - HLT on CPU
640 # - Pixel-only reconstruction on CPU, with DQM and validation
641 # - harvesting
642 upgradeWFs['PatatrackPixelOnlyTripletsCPU'] = PatatrackWorkflow(
643  digi = {
644  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
645  },
646  reco = {
647  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
648  '--procModifiers': 'pixelNtupletFit',
649  '--customise' : 'RecoPixelVertexing/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets'
650  },
651  harvest = {
652  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'
653  },
654  suffix = 'Patatrack_PixelOnlyTripletsCPU',
655  offset = 0.505,
656 )
657 
658 # Pixel-only triplets workflow running on CPU or GPU
659 # - HLT on GPU (optional)
660 # - Pixel-only reconstruction on GPU (optional), with DQM and validation
661 # - harvesting
662 upgradeWFs['PatatrackPixelOnlyTripletsGPU'] = PatatrackWorkflow(
663  digi = {
664  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
665  '--procModifiers': 'gpu'
666  },
667  reco = {
668  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
669  '--procModifiers': 'pixelNtupletFit,gpu',
670  '--customise': 'RecoPixelVertexing/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets'
671  },
672  harvest = {
673  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'
674  },
675  suffix = 'Patatrack_PixelOnlyTripletsGPU',
676  offset = 0.506,
677 )
678 
679 # Pixel-only triplets workflow running on CPU and GPU
680 # - HLT on GPU (required)
681 # - Pixel-only reconstruction on both CPU and GPU, with DQM and validation for GPU-vs-CPU comparisons
682 # - harvesting
683 upgradeWFs['PatatrackPixelOnlyTripletsGPUValidation'] = PatatrackWorkflow(
684  digi = {
685  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
686  '--accelerators': 'gpu-nvidia',
687  '--procModifiers': 'gpu'
688  },
689  reco = {
690  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
691  '--accelerators': 'gpu-nvidia',
692  '--procModifiers': 'pixelNtupletFit,gpuValidation',
693  '--customise': 'RecoPixelVertexing/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets'
694  },
695  harvest = {
696  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'
697  },
698  suffix = 'Patatrack_PixelOnlyTripletsGPU_Validation',
699  offset = 0.507,
700 )
701 
702 # Pixel-only triplets workflow running on CPU or GPU, trimmed down for benchmarking
703 # - HLT on GPU (optional)
704 # - Pixel-only reconstruction on GPU (optional)
705 upgradeWFs['PatatrackPixelOnlyTripletsGPUProfiling'] = PatatrackWorkflow(
706  digi = {
707  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
708  '--procModifiers': 'gpu'
709  },
710  reco = {
711  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly',
712  '--procModifiers': 'pixelNtupletFit,gpu',
713  '--customise': 'RecoPixelVertexing/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets,RecoTracker/Configuration/customizePixelOnlyForProfiling.customizePixelOnlyForProfilingGPUOnly'
714  },
715  harvest = None,
716  suffix = 'Patatrack_PixelOnlyTripletsGPU_Profiling',
717  offset = 0.508,
718 )
719 
720 # ECAL-only workflow running on CPU
721 # - HLT on CPU
722 # - ECAL-only reconstruction on CPU, with DQM and validation
723 # - harvesting
724 upgradeWFs['PatatrackECALOnlyCPU'] = PatatrackWorkflow(
725  digi = {
726  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
727  },
728  reco = {
729  '-s': 'RAW2DIGI:RawToDigi_ecalOnly,RECO:reconstruction_ecalOnly,VALIDATION:@ecalOnlyValidation,DQM:@ecalOnly',
730  },
731  harvest = {
732  '-s': 'HARVESTING:@ecalOnlyValidation+@ecal'
733  },
734  suffix = 'Patatrack_ECALOnlyCPU',
735  offset = 0.511,
736 )
737 
738 # ECAL-only workflow running on CPU or GPU
739 # - HLT on GPU (optional)
740 # - ECAL-only reconstruction on GPU (optional), with DQM and validation
741 # - harvesting
742 upgradeWFs['PatatrackECALOnlyGPU'] = PatatrackWorkflow(
743  digi = {
744  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
745  '--procModifiers': 'gpu'
746  },
747  reco = {
748  '-s': 'RAW2DIGI:RawToDigi_ecalOnly,RECO:reconstruction_ecalOnly,VALIDATION:@ecalOnlyValidation,DQM:@ecalOnly',
749  '--procModifiers': 'gpu'
750  },
751  harvest = {
752  '-s': 'HARVESTING:@ecalOnlyValidation+@ecal'
753  },
754  suffix = 'Patatrack_ECALOnlyGPU',
755  offset = 0.512,
756 )
757 
758 # ECAL-only workflow running on CPU and GPU
759 # - HLT on GPU (required)
760 # - ECAL-only reconstruction on both CPU and GPU, with DQM and validation for GPU-vs-CPU comparisons
761 # - harvesting
762 upgradeWFs['PatatrackECALOnlyGPUValidation'] = PatatrackWorkflow(
763  digi = {
764  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
765  '--accelerators': 'gpu-nvidia',
766  '--procModifiers': 'gpu'
767  },
768  reco = {
769  '-s': 'RAW2DIGI:RawToDigi_ecalOnly,RECO:reconstruction_ecalOnly,VALIDATION:@ecalOnlyValidation,DQM:@ecalOnly',
770  '--accelerators': 'gpu-nvidia',
771  '--procModifiers': 'gpuValidation'
772  },
773  harvest = {
774  '-s': 'HARVESTING:@ecalOnlyValidation+@ecal'
775  },
776  suffix = 'Patatrack_ECALOnlyGPU_Validation',
777  offset = 0.513,
778 )
779 
780 # ECAL-only workflow running on CPU or GPU, trimmed down for benchmarking
781 # - HLT on GPU (optional)
782 # - ECAL-only reconstruction on GPU (optional)
783 upgradeWFs['PatatrackECALOnlyGPUProfiling'] = PatatrackWorkflow(
784  digi = {
785  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
786  '--procModifiers': 'gpu'
787  },
788  reco = {
789  '-s': 'RAW2DIGI:RawToDigi_ecalOnly,RECO:reconstruction_ecalOnly',
790  '--procModifiers': 'gpu',
791  '--customise' : 'RecoLocalCalo/Configuration/customizeEcalOnlyForProfiling.customizeEcalOnlyForProfilingGPUOnly'
792  },
793  harvest = None,
794  suffix = 'Patatrack_ECALOnlyGPU_Profiling',
795  offset = 0.514,
796 )
797 
798 # HCAL-only workflow running on CPU
799 # - HLT on CPU
800 # - HCAL-only reconstruction on CPU, with DQM and validation
801 # - harvesting
802 upgradeWFs['PatatrackHCALOnlyCPU'] = PatatrackWorkflow(
803  digi = {
804  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
805  },
806  reco = {
807  '-s': 'RAW2DIGI:RawToDigi_hcalOnly,RECO:reconstruction_hcalOnly,VALIDATION:@hcalOnlyValidation,DQM:@hcalOnly+@hcal2Only',
808  },
809  harvest = {
810  '-s': 'HARVESTING:@hcalOnlyValidation+@hcalOnly+@hcal2Only'
811  },
812  suffix = 'Patatrack_HCALOnlyCPU',
813  offset = 0.521,
814 )
815 
816 # HCAL-only workflow running on CPU or GPU
817 # - HLT on GPU (optional)
818 # - HCAL-only reconstruction on GPU (optional), with DQM and validation
819 # - harvesting
820 upgradeWFs['PatatrackHCALOnlyGPU'] = PatatrackWorkflow(
821  digi = {
822  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
823  '--procModifiers': 'gpu'
824  },
825  reco = {
826  '-s': 'RAW2DIGI:RawToDigi_hcalOnly,RECO:reconstruction_hcalOnly,VALIDATION:@hcalOnlyValidation,DQM:@hcalOnly+@hcal2Only',
827  '--procModifiers': 'gpu'
828  },
829  harvest = {
830  '-s': 'HARVESTING:@hcalOnlyValidation+@hcalOnly+@hcal2Only'
831  },
832  suffix = 'Patatrack_HCALOnlyGPU',
833  offset = 0.522,
834 )
835 
836 # HCAL-only workflow running on CPU and GPU
837 # - HLT on GPU (required)
838 # - HCAL-only reconstruction on both CPU and GPU, with DQM and validation for GPU-vs-CPU comparisons
839 # - harvesting
840 upgradeWFs['PatatrackHCALOnlyGPUValidation'] = PatatrackWorkflow(
841  digi = {
842  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
843  '--accelerators': 'gpu-nvidia',
844  '--procModifiers': 'gpu'
845  },
846  reco = {
847  '-s': 'RAW2DIGI:RawToDigi_hcalOnly,RECO:reconstruction_hcalOnly,VALIDATION:@hcalOnlyValidation,DQM:@hcalOnly+@hcal2Only',
848  '--accelerators': 'gpu-nvidia',
849  '--procModifiers': 'gpuValidation'
850  },
851  harvest = {
852  '-s': 'HARVESTING:@hcalOnlyValidation+@hcal'
853  },
854  suffix = 'Patatrack_HCALOnlyGPU_Validation',
855  offset = 0.523,
856 )
857 
858 # HCAL-only workflow running on CPU or GPU, trimmed down for benchmarking
859 # - HLT on GPU (optional)
860 # - HCAL-only reconstruction on GPU (optional)
861 upgradeWFs['PatatrackHCALOnlyGPUProfiling'] = PatatrackWorkflow(
862  digi = {
863  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
864  '--procModifiers': 'gpu'
865  },
866  reco = {
867  '-s': 'RAW2DIGI:RawToDigi_hcalOnly,RECO:reconstruction_hcalOnly',
868  '--procModifiers': 'gpu',
869  '--customise' : 'RecoLocalCalo/Configuration/customizeHcalOnlyForProfiling.customizeHcalOnlyForProfilingGPUOnly'
870  },
871  harvest = None,
872  suffix = 'Patatrack_HCALOnlyGPU_Profiling',
873  offset = 0.524,
874 )
875 
876 # Workflow running the Pixel quadruplets, ECAL and HCAL reconstruction on CPU
877 # - HLT on CPU
878 # - reconstruction on CPU, with DQM and validation
879 # - harvesting
880 upgradeWFs['PatatrackAllCPU'] = PatatrackWorkflow(
881  digi = {
882  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
883  },
884  reco = {
885  '-s': 'RAW2DIGI:RawToDigi_pixelOnly+RawToDigi_ecalOnly+RawToDigi_hcalOnly,RECO:reconstruction_pixelTrackingOnly+reconstruction_ecalOnly+reconstruction_hcalOnly,VALIDATION:@pixelTrackingOnlyValidation+@ecalOnlyValidation+@hcalOnlyValidation,DQM:@pixelTrackingOnlyDQM+@ecalOnly+@hcalOnly+@hcal2Only',
886  '--procModifiers': 'pixelNtupletFit'
887  },
888  harvest = {
889  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM+@ecalOnlyValidation+@ecal+@hcalOnlyValidation+@hcalOnly+@hcal2Only'
890  },
891  suffix = 'Patatrack_AllCPU',
892  offset = 0.581,
893 )
894 
895 # Workflow running the Pixel quadruplets, ECAL and HCAL reconstruction on CPU or GPU
896 # - HLT on GPU (optional)
897 # - reconstruction on GPU (optional), with DQM and validation
898 # - harvesting
899 upgradeWFs['PatatrackAllGPU'] = PatatrackWorkflow(
900  digi = {
901  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
902  '--procModifiers': 'gpu'
903  },
904  reco = {
905  '-s': 'RAW2DIGI:RawToDigi_pixelOnly+RawToDigi_ecalOnly+RawToDigi_hcalOnly,RECO:reconstruction_pixelTrackingOnly+reconstruction_ecalOnly+reconstruction_hcalOnly,VALIDATION:@pixelTrackingOnlyValidation+@ecalOnlyValidation+@hcalOnlyValidation,DQM:@pixelTrackingOnlyDQM+@ecalOnly+@hcalOnly+@hcal2Only',
906  '--procModifiers': 'pixelNtupletFit,gpu'
907  },
908  harvest = {
909  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM+@ecalOnlyValidation+@ecal+@hcalOnlyValidation+@hcalOnly+@hcal2Only'
910  },
911  suffix = 'Patatrack_AllGPU',
912  offset = 0.582,
913 )
914 
915 # Workflow running the Pixel quadruplets, ECAL and HCAL reconstruction on CPU and GPU
916 # - HLT on GPU (required)
917 # - reconstruction on CPU and GPU, with DQM and validation for GPU-vs-CPU comparisons
918 # - harvesting
919 upgradeWFs['PatatrackAllGPUValidation'] = PatatrackWorkflow(
920  digi = {
921  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
922  '--accelerators': 'gpu-nvidia',
923  '--procModifiers': 'gpu'
924  },
925  reco = {
926  '-s': 'RAW2DIGI:RawToDigi_pixelOnly+RawToDigi_ecalOnly+RawToDigi_hcalOnly,RECO:reconstruction_pixelTrackingOnly+reconstruction_ecalOnly+reconstruction_hcalOnly,VALIDATION:@pixelTrackingOnlyValidation+@ecalOnlyValidation+@hcalOnlyValidation,DQM:@pixelTrackingOnlyDQM+@ecalOnly+@hcalOnly+@hcal2Only',
927  '--accelerators': 'gpu-nvidia',
928  '--procModifiers': 'pixelNtupletFit,gpuValidation'
929  },
930  harvest = {
931  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM+@ecalOnlyValidation+@ecal+@hcalOnlyValidation+@hcalOnly+@hcal2Only'
932  },
933  suffix = 'Patatrack_AllGPU_Validation',
934  offset = 0.583,
935 )
936 
937 # Workflow running the Pixel quadruplets, ECAL and HCAL reconstruction on CPU or GPU, trimmed down for benchmarking
938 # - HLT on GPU (optional)
939 # - minimal reconstruction on GPU (optional)
940 # FIXME workflow 0.584 to be implemented
941 
942 # Workflow running the Pixel triplets, ECAL and HCAL reconstruction on CPU
943 # - HLT on CPU
944 # - reconstruction on CPU, with DQM and validation
945 # - harvesting
946 upgradeWFs['PatatrackAllTripletsCPU'] = PatatrackWorkflow(
947  digi = {
948  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
949  },
950  reco = {
951  '-s': 'RAW2DIGI:RawToDigi_pixelOnly+RawToDigi_ecalOnly+RawToDigi_hcalOnly,RECO:reconstruction_pixelTrackingOnly+reconstruction_ecalOnly+reconstruction_hcalOnly,VALIDATION:@pixelTrackingOnlyValidation+@ecalOnlyValidation+@hcalOnlyValidation,DQM:@pixelTrackingOnlyDQM+@ecalOnly+@hcalOnly+@hcal2Only',
952  '--procModifiers': 'pixelNtupletFit'
953  },
954  harvest = {
955  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM+@ecalOnlyValidation+@ecal+@hcalOnlyValidation+@hcalOnly+@hcal2Only'
956  },
957  suffix = 'Patatrack_AllTripletsCPU',
958  offset = 0.585,
959 )
960 
961 # Workflow running the Pixel triplets, ECAL and HCAL reconstruction on CPU or GPU
962 # - HLT on GPU (optional)
963 # - reconstruction on GPU (optional), with DQM and validation
964 # - harvesting
965 upgradeWFs['PatatrackAllTripletsGPU'] = PatatrackWorkflow(
966  digi = {
967  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
968  '--procModifiers': 'gpu'
969  },
970  reco = {
971  '-s': 'RAW2DIGI:RawToDigi_pixelOnly+RawToDigi_ecalOnly+RawToDigi_hcalOnly,RECO:reconstruction_pixelTrackingOnly+reconstruction_ecalOnly+reconstruction_hcalOnly,VALIDATION:@pixelTrackingOnlyValidation+@ecalOnlyValidation+@hcalOnlyValidation,DQM:@pixelTrackingOnlyDQM+@ecalOnly+@hcalOnly+@hcal2Only',
972  '--procModifiers': 'pixelNtupletFit,gpu'
973  },
974  harvest = {
975  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM+@ecalOnlyValidation+@ecal+@hcalOnlyValidation+@hcalOnly+@hcal2Only'
976  },
977  suffix = 'Patatrack_AllTripletsGPU',
978  offset = 0.586,
979 )
980 
981 # Workflow running the Pixel triplets, ECAL and HCAL reconstruction on CPU and GPU
982 # - HLT on GPU (required)
983 # - reconstruction on CPU and GPU, with DQM and validation for GPU-vs-CPU comparisons
984 # - harvesting
985 upgradeWFs['PatatrackAllTripletsGPUValidation'] = PatatrackWorkflow(
986  digi = {
987  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
988  '--accelerators': 'gpu-nvidia',
989  '--procModifiers': 'gpu'
990  },
991  reco = {
992  '-s': 'RAW2DIGI:RawToDigi_pixelOnly+RawToDigi_ecalOnly+RawToDigi_hcalOnly,RECO:reconstruction_pixelTrackingOnly+reconstruction_ecalOnly+reconstruction_hcalOnly,VALIDATION:@pixelTrackingOnlyValidation+@ecalOnlyValidation+@hcalOnlyValidation,DQM:@pixelTrackingOnlyDQM+@ecalOnly+@hcalOnly+@hcal2Only',
993  '--accelerators': 'gpu-nvidia',
994  '--procModifiers': 'pixelNtupletFit,gpuValidation'
995  },
996  harvest = {
997  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM+@ecalOnlyValidation+@ecal+@hcalOnlyValidation+@hcalOnly+@hcal2Only'
998  },
999  suffix = 'Patatrack_AllTripletsGPU_Validation',
1000  offset = 0.587,
1001 )
1002 
1003 # Workflow running the Pixel triplets, ECAL and HCAL reconstruction on CPU or GPU, trimmed down for benchmarking
1004 # - HLT on GPU (optional)
1005 # - minimal reconstruction on GPU (optional)
1006 # FIXME workflow 0.588 to be implemented
1007 
1008 # Workflow running the Pixel quadruplets, ECAL and HCAL reconstruction on CPU, together with the full offline reconstruction
1009 # - HLT on CPU
1010 # - reconstruction on CPU, with DQM and validation
1011 # - harvesting
1012 upgradeWFs['PatatrackFullRecoCPU'] = PatatrackWorkflow(
1013  digi = {
1014  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1015  },
1016  reco = {
1017  # skip the @pixelTrackingOnlyValidation which cannot run together with the full reconstruction
1018  '-s': 'RAW2DIGI:RawToDigi+RawToDigi_pixelOnly,L1Reco,RECO:reconstruction+reconstruction_pixelTrackingOnly,RECOSIM,PAT,VALIDATION:@standardValidation+@miniAODValidation,DQM:@standardDQM+@ExtraHLT+@miniAODDQM+@pixelTrackingOnlyDQM',
1019  '--procModifiers': 'pixelNtupletFit'
1020  },
1021  harvest = {
1022  # skip the @pixelTrackingOnlyDQM harvesting
1023  },
1024  suffix = 'Patatrack_FullRecoCPU',
1025  offset = 0.591,
1026 )
1027 
1028 # Workflow running the Pixel quadruplets, ECAL and HCAL reconstruction on GPU (optional), together with the full offline reconstruction on CPU
1029 # - HLT on GPU (optional)
1030 # - reconstruction on GPU (optional), with DQM and validation
1031 # - harvesting
1032 upgradeWFs['PatatrackFullRecoGPU'] = PatatrackWorkflow(
1033  digi = {
1034  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1035  '--procModifiers': 'gpu'
1036  },
1037  reco = {
1038  # skip the @pixelTrackingOnlyValidation which cannot run together with the full reconstruction
1039  '-s': 'RAW2DIGI:RawToDigi+RawToDigi_pixelOnly,L1Reco,RECO:reconstruction+reconstruction_pixelTrackingOnly,RECOSIM,PAT,VALIDATION:@standardValidation+@miniAODValidation,DQM:@standardDQM+@ExtraHLT+@miniAODDQM+@pixelTrackingOnlyDQM',
1040  '--procModifiers': 'pixelNtupletFit,gpu'
1041  },
1042  harvest = {
1043  # skip the @pixelTrackingOnlyDQM harvesting
1044  },
1045  suffix = 'Patatrack_FullRecoGPU',
1046  offset = 0.592,
1047 )
1048 
1049 # Workflow running the Pixel quadruplets, ECAL and HCAL reconstruction on CPU and GPU, together with the full offline reconstruction on CPU
1050 # - HLT on GPU (required)
1051 # - reconstruction on CPU and GPU, with DQM and validation for GPU-vs-CPU comparisons
1052 # - harvesting
1053 upgradeWFs['PatatrackFullRecoGPUValidation'] = PatatrackWorkflow(
1054  digi = {
1055  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1056  '--accelerators': 'gpu-nvidia',
1057  '--procModifiers': 'gpu'
1058  },
1059  reco = {
1060  # skip the @pixelTrackingOnlyValidation which cannot run together with the full reconstruction
1061  '-s': 'RAW2DIGI:RawToDigi+RawToDigi_pixelOnly,L1Reco,RECO:reconstruction+reconstruction_pixelTrackingOnly,RECOSIM,PAT,VALIDATION:@standardValidation+@miniAODValidation,DQM:@standardDQM+@ExtraHLT+@miniAODDQM+@pixelTrackingOnlyDQM',
1062  '--accelerators': 'gpu-nvidia',
1063  '--procModifiers': 'pixelNtupletFit,gpuValidation'
1064  },
1065  harvest = {
1066  # skip the @pixelTrackingOnlyDQM harvesting
1067  },
1068  suffix = 'Patatrack_FullRecoGPU_Validation',
1069  offset = 0.593,
1070 )
1071 
1072 # Workflow running the Pixel triplets, ECAL and HCAL reconstruction on CPU, together with the full offline reconstruction
1073 # - HLT on CPU
1074 # - reconstruction on CPU, with DQM and validation
1075 # - harvesting
1076 upgradeWFs['PatatrackFullRecoTripletsCPU'] = PatatrackWorkflow(
1077  digi = {
1078  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1079  },
1080  reco = {
1081  # skip the @pixelTrackingOnlyValidation which cannot run together with the full reconstruction
1082  '-s': 'RAW2DIGI:RawToDigi+RawToDigi_pixelOnly,L1Reco,RECO:reconstruction+reconstruction_pixelTrackingOnly,RECOSIM,PAT,VALIDATION:@standardValidation+@miniAODValidation,DQM:@standardDQM+@ExtraHLT+@miniAODDQM+@pixelTrackingOnlyDQM',
1083  '--procModifiers': 'pixelNtupletFit',
1084  '--customise' : 'RecoPixelVertexing/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets'
1085  },
1086  harvest = {
1087  # skip the @pixelTrackingOnlyDQM harvesting
1088  },
1089  suffix = 'Patatrack_FullRecoTripletsCPU',
1090  offset = 0.595,
1091 )
1092 
1093 # Workflow running the Pixel triplets, ECAL and HCAL reconstruction on GPU (optional), together with the full offline reconstruction on CPU
1094 # - HLT on GPU (optional)
1095 # - reconstruction on GPU (optional), with DQM and validation
1096 # - harvesting
1097 upgradeWFs['PatatrackFullRecoTripletsGPU'] = PatatrackWorkflow(
1098  digi = {
1099  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1100  '--procModifiers': 'gpu'
1101  },
1102  reco = {
1103  # skip the @pixelTrackingOnlyValidation which cannot run together with the full reconstruction
1104  '-s': 'RAW2DIGI:RawToDigi+RawToDigi_pixelOnly,L1Reco,RECO:reconstruction+reconstruction_pixelTrackingOnly,RECOSIM,PAT,VALIDATION:@standardValidation+@miniAODValidation,DQM:@standardDQM+@ExtraHLT+@miniAODDQM+@pixelTrackingOnlyDQM',
1105  '--procModifiers': 'pixelNtupletFit,gpu',
1106  '--customise': 'RecoPixelVertexing/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets'
1107  },
1108  harvest = {
1109  # skip the @pixelTrackingOnlyDQM harvesting
1110  },
1111  suffix = 'Patatrack_FullRecoTripletsGPU',
1112  offset = 0.596,
1113 )
1114 
1115 # Workflow running the Pixel triplets, ECAL and HCAL reconstruction on CPU and GPU, together with the full offline reconstruction on CPU
1116 # - HLT on GPU (required)
1117 # - reconstruction on CPU and GPU, with DQM and validation for GPU-vs-CPU comparisons
1118 # - harvesting
1119 upgradeWFs['PatatrackFullRecoTripletsGPUValidation'] = PatatrackWorkflow(
1120  digi = {
1121  # the HLT menu is already set up for using GPUs if available and if the "gpu" modifier is enabled
1122  '--accelerators': 'gpu-nvidia',
1123  '--procModifiers': 'gpu'
1124  },
1125  reco = {
1126  # skip the @pixelTrackingOnlyValidation which cannot run together with the full reconstruction
1127  '-s': 'RAW2DIGI:RawToDigi+RawToDigi_pixelOnly,L1Reco,RECO:reconstruction+reconstruction_pixelTrackingOnly,RECOSIM,PAT,VALIDATION:@standardValidation+@miniAODValidation,DQM:@standardDQM+@ExtraHLT+@miniAODDQM+@pixelTrackingOnlyDQM',
1128  '--accelerators': 'gpu-nvidia',
1129  '--procModifiers': 'pixelNtupletFit,gpuValidation',
1130  '--customise' : 'RecoPixelVertexing/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets'
1131  },
1132  harvest = {
1133  # skip the @pixelTrackingOnlyDQM harvesting
1134  },
1135  suffix = 'Patatrack_FullRecoTripletsGPU_Validation',
1136  offset = 0.597,
1137 )
1138 
1139 
1140 # end of Patatrack workflows
1141 
1143  def setup_(self, step, stepName, stepDict, k, properties):
1144  if 'GenSimHLBeamSpot14' in step:
1145  stepDict[stepName][k] = merge([{'--eventcontent': 'RAWSIM', '--datatier': 'GEN-SIM'},stepDict[step][k]])
1146  elif 'Digi' in step and 'Trigger' not in step:
1147  stepDict[stepName][k] = merge([{'-s': 'DIGI,L1,DIGI2RAW,HLT:@relval2021', '--datatier':'GEN-SIM-RAW', '--eventcontent':'RAWSIM'}, stepDict[step][k]])
1148  elif 'DigiTrigger' in step: # for Phase-2
1149  stepDict[stepName][k] = merge([{'-s': 'DIGI,L1TrackTrigger,L1,DIGI2RAW,HLT:@fake2', '--datatier':'GEN-SIM-RAW', '--eventcontent':'RAWSIM'}, stepDict[step][k]])
1150  elif 'Reco' in step:
1151  stepDict[stepName][k] = merge([{'-s': 'RAW2DIGI,L1Reco,RECO,RECOSIM', '--datatier':'AODSIM', '--eventcontent':'AODSIM'}, stepDict[step][k]])
1152  elif 'MiniAOD' in step:
1153  # the separate miniAOD step is used here
1154  stepDict[stepName][k] = deepcopy(stepDict[step][k])
1155  elif 'ALCA' in step or 'HARVEST' in step:
1156  # remove step
1157  stepDict[stepName][k] = None
1158  elif 'Nano'==step:
1159  stepDict[stepName][k] = merge([{'--filein':'file:step4.root','-s':'NANO','--datatier':'NANOAODSIM','--eventcontent':'NANOEDMAODSIM'}, stepDict[step][k]])
1160  def condition(self, fragment, stepList, key, hasHarvest):
1161  return fragment=="TTbar_14TeV" and ('2026' in key or '2021' in key)
1162 upgradeWFs['ProdLike'] = UpgradeWorkflow_ProdLike(
1163  steps = [
1164  'GenSimHLBeamSpot14',
1165  'Digi',
1166  'DigiTrigger',
1167  'Reco',
1168  'RecoGlobal',
1169  'RecoNano',
1170  'HARVEST',
1171  'HARVESTGlobal',
1172  'HARVESTNano',
1173  'MiniAOD',
1174  'ALCA',
1175  'Nano',
1176  ],
1177  PU = [
1178  'GenSimHLBeamSpot14',
1179  'Digi',
1180  'DigiTrigger',
1181  'Reco',
1182  'RecoGlobal',
1183  'RecoNano',
1184  'HARVEST',
1185  'HARVESTGlobal',
1186  'HARVESTNano',
1187  'MiniAOD',
1188  'ALCA',
1189  'Nano',
1190  ],
1191  suffix = '_ProdLike',
1192  offset = 0.21,
1193 )
1194 
1196  def setup_(self, step, stepName, stepDict, k, properties):
1197  if 'GenSim' in step:
1198  custNew = "SimG4Core/Application/NeutronBGforMuonsXS_cff.customise"
1199  else:
1200  custNew = "SLHCUpgradeSimulations/Configuration/customise_mixing.customise_Mix_LongLived_Neutrons"
1201  stepDict[stepName][k] = deepcopy(stepDict[step][k])
1202  if '--customise' in stepDict[stepName][k].keys():
1203  stepDict[stepName][k]['--customise'] += ","+custNew
1204  else:
1205  stepDict[stepName][k]['--customise'] = custNew
1206  def condition(self, fragment, stepList, key, hasHarvest):
1207  return any(fragment==nfrag for nfrag in self.neutronFrags) and any(nkey in key for nkey in self.neutronKeys)
1208 upgradeWFs['Neutron'] = UpgradeWorkflow_Neutron(
1209  steps = [
1210  'GenSim',
1211  'GenSimHLBeamSpot',
1212  'GenSimHLBeamSpot14',
1213  'Digi',
1214  'DigiTrigger',
1215  ],
1216  PU = [
1217  'Digi',
1218  'DigiTrigger',
1219  ],
1220  suffix = '_Neutron',
1221  offset = 0.12,
1222 )
1223 # add some extra info
1224 upgradeWFs['Neutron'].neutronKeys = [x for x in upgradeKeys[2026] if 'PU' not in x]
1225 upgradeWFs['Neutron'].neutronFrags = ['ZMM_14','MinBias_14TeV']
1226 
1228  def setup_(self, step, stepName, stepDict, k, properties):
1229  stepDict[stepName][k] = merge([{'--procModifiers': 'run2_HECollapse_2018'}, stepDict[step][k]])
1230  def condition(self, fragment, stepList, key, hasHarvest):
1231  return fragment=="TTbar_13" and '2018' in key
1232 upgradeWFs['heCollapse'] = UpgradeWorkflow_heCollapse(
1233  steps = [
1234  'GenSim',
1235  'Digi',
1236  'Reco',
1237  'HARVEST',
1238  'ALCA',
1239  ],
1240  PU = [
1241  'Digi',
1242  'Reco',
1243  'HARVEST',
1244  ],
1245  suffix = '_heCollapse',
1246  offset = 0.6,
1247 )
1248 
1250  def setup_(self, step, stepName, stepDict, k, properties):
1251  # temporarily remove trigger & downstream steps
1252  mods = {'--era': stepDict[step][k]['--era']+',phase2_ecal_devel'}
1253  if 'Digi' in step:
1254  mods['-s'] = 'DIGI:pdigi_valid,DIGI2RAW'
1255  elif 'Reco' in step:
1256  mods['-s'] = 'RAW2DIGI,RECO:reconstruction_ecalOnly,VALIDATION:@ecalOnlyValidation,DQM:@ecalOnly'
1257  mods['--datatier'] = 'GEN-SIM-RECO,DQMIO'
1258  mods['--eventcontent'] = 'FEVTDEBUGHLT,DQM'
1259  elif 'HARVEST' in step:
1260  mods['-s'] = 'HARVESTING:@ecalOnlyValidation+@ecal'
1261  stepDict[stepName][k] = merge([mods, stepDict[step][k]])
1262  def condition(self, fragment, stepList, key, hasHarvest):
1263  return fragment=="TTbar_14TeV" and '2026' in key
1264 upgradeWFs['ecalDevel'] = UpgradeWorkflow_ecalDevel(
1265  steps = [
1266  'DigiTrigger',
1267  'RecoGlobal',
1268  'HARVESTGlobal',
1269  ],
1270  PU = [
1271  'DigiTrigger',
1272  'RecoGlobal',
1273  'HARVESTGlobal',
1274  ],
1275  suffix = '_ecalDevel',
1276  offset = 0.61,
1277 )
1278 
1280  def setup_(self, step, stepName, stepDict, k, properties):
1281  myGT=stepDict[step][k]['--conditions']
1282  myGT+="_0T"
1283  stepDict[stepName][k] = merge([{'-n':'1','--magField':'0T','--conditions':myGT}, stepDict[step][k]])
1284  def setupPU_(self, step, stepName, stepDict, k, properties):
1285  # override '-n' setting from PUDataSets in relval_steps.py
1286  stepDict[stepName][k] = merge([{'-n':'1'}, stepDict[step][k]])
1287  def condition(self, fragment, stepList, key, hasHarvest):
1288  return (fragment=="TTbar_13" or fragment=="TTbar_14TeV") and ('2017' in key or '2018' in key or '2021' in key)
1289 upgradeWFs['0T'] = UpgradeWorkflow_0T(
1290  steps = [
1291  'GenSim',
1292  'Digi',
1293  'Reco',
1294  'HARVEST',
1295  'RecoNano',
1296  'HARVESTNano',
1297  'ALCA',
1298  ],
1299  PU = [
1300  'Digi',
1301  'Reco',
1302  'HARVEST',
1303  'RecoNano',
1304  'HARVESTNano',
1305  ],
1306  suffix = '_0T',
1307  offset = 0.24,
1308 )
1309 
1311  def setup_(self, step, stepName, stepDict, k, properties):
1312  if 'Reco' in step and 'Run2_2018' in stepDict[step][k]['--era']:
1313  stepDict[stepName][k] = merge([{'--era': 'Run2_2018,bParking'}, stepDict[step][k]])
1314  def condition(self, fragment, stepList, key, hasHarvest):
1315  return fragment=="TTbar_13" and '2018' in key
1316 upgradeWFs['ParkingBPH'] = UpgradeWorkflow_ParkingBPH(
1317  steps = [
1318  'Reco',
1319  ],
1320  PU = [],
1321  suffix = '_ParkingBPH',
1322  offset = 0.8,
1323 )
1324 
1326  def setup_(self, step, stepName, stepDict, k, properties):
1327  if 'Nano' in step:
1328  stepDict[stepName][k] = merge([{'--customise': 'PhysicsTools/NanoAOD/custom_jme_cff.PrepJMECustomNanoAOD_MC'}, stepDict[step][k]])
1329  def condition(self, fragment, stepList, key, hasHarvest):
1330  return fragment=="TTbar_13" and ('2017' in key or '2018' in key)
1331 upgradeWFs['JMENano'] = UpgradeWorkflow_JMENano(
1332  steps = [
1333  'Nano',
1334  ],
1335  PU = [],
1336  suffix = '_JMENano',
1337  offset = 0.15,
1338 )
1339 
1340 
1341 # common operations for aging workflows
1343  def setup_(self, step, stepName, stepDict, k, properties):
1344  if 'Digi' in step or 'Reco' in step:
1345  stepDict[stepName][k] = merge([{'--customise': 'SLHCUpgradeSimulations/Configuration/aging.customise_aging_'+self.lumi}, stepDict[step][k]])
1346  def condition(self, fragment, stepList, key, hasHarvest):
1347  return fragment=="TTbar_14TeV" and '2026' in key
1348 # define several of them
1349 upgradeWFs['Aging1000'] = UpgradeWorkflowAging(
1350  steps = [
1351  'Digi',
1352  'DigiTrigger',
1353  'RecoLocal',
1354  'Reco',
1355  'RecoGlobal',
1356  ],
1357  PU = [
1358  'Digi',
1359  'DigiTrigger',
1360  'RecoLocal',
1361  'Reco',
1362  'RecoGlobal',
1363  ],
1364  suffix = 'Aging1000',
1365  offset = 0.101,
1366 )
1367 upgradeWFs['Aging1000'].lumi = '1000'
1368 upgradeWFs['Aging3000'] = deepcopy(upgradeWFs['Aging1000'])
1369 upgradeWFs['Aging3000'].suffix = 'Aging3000'
1370 upgradeWFs['Aging3000'].offset = 0.103
1371 upgradeWFs['Aging3000'].lumi = '3000'
1372 
1373 # Specifying explicitly the --filein is not nice but that was the
1374 # easiest way to "skip" the output of step2 (=premixing stage1) for
1375 # filein (as it goes to pileup_input). It works (a bit accidentally
1376 # though) also for "-i all" because in that case the --filein for DAS
1377 # input is after this one in the list of command line arguments to
1378 # cmsDriver, and gets then used in practice.
1379 digiPremixLocalPileup = {
1380  "--filein": "file:step1.root",
1381  "--pileup_input": "file:step2.root"
1382 }
1383 
1384 # for premix
1386  def setup_(self, step, stepName, stepDict, k, properties):
1387  # just copy steps
1388  stepDict[stepName][k] = merge([stepDict[step][k]])
1389  def setupPU_(self, step, stepName, stepDict, k, properties):
1390  # setup for stage 1
1391  if "GenSim" in stepName:
1392  stepNamePmx = stepName.replace('GenSim','Premix')
1393  if not stepNamePmx in stepDict: stepDict[stepNamePmx] = {}
1394  stepDict[stepNamePmx][k] = merge([
1395  {
1396  '-s': 'GEN,SIM,DIGI:pdigi_valid',
1397  '--datatier': 'PREMIX',
1398  '--eventcontent': 'PREMIX',
1399  '--procModifiers': 'premix_stage1'
1400  },
1401  stepDict[stepName][k]
1402  ])
1403  if "ProdLike" in self.suffix:
1404  stepDict[stepNamePmx][k] = merge([{'-s': 'GEN,SIM,DIGI'},stepDict[stepNamePmx][k]])
1405  # setup for stage 2
1406  elif "Digi" in step or "Reco" in step:
1407  # go back to non-PU step version
1408  d = merge([stepDict[self.getStepName(step)][k]])
1409  if d is None: return
1410  if "Digi" in step:
1411  tmpsteps = []
1412  for s in d["-s"].split(","):
1413  if s == "DIGI" or "DIGI:" in s:
1414  tmpsteps.extend([s, "DATAMIX"])
1415  else:
1416  tmpsteps.append(s)
1417  d = merge([{"-s" : ",".join(tmpsteps),
1418  "--datamix" : "PreMix",
1419  "--procModifiers": "premix_stage2"},
1420  d])
1421  # for combined stage1+stage2
1422  if "_PMXS1S2" in self.suffix:
1423  d = merge([digiPremixLocalPileup, d])
1424  elif "Reco" in step:
1425  if "--procModifiers" in d:
1426  d["--procModifiers"] += ",premix_stage2"
1427  else:
1428  d["--procModifiers"] = "premix_stage2"
1429  stepDict[stepName][k] = d
1430  # Increase the input file step number by one for Nano in combined stage1+stage2
1431  elif "Nano"==step:
1432  # go back to non-PU step version
1433  d = merge([stepDict[self.getStepName(step)][k]])
1434  if "--filein" in d:
1435  filein = d["--filein"]
1436  m = re.search("step(?P<ind>\d+)_", filein)
1437  if m:
1438  d["--filein"] = filein.replace(m.group(), "step%d_"%(int(m.group("ind"))+1))
1439  stepDict[stepName][k] = d
1440  # run2/3 WFs use Nano (not NanoPU) in PU WF
1441  stepDict[self.getStepName(step)][k] = merge([d])
1442  def condition(self, fragment, stepList, key, hasHarvest):
1443  if not 'PU' in key:
1444  return False
1445  if not any(y in key for y in ['2021', '2023', '2024', '2026']):
1446  return False
1447  if self.suffix.endswith("S1"):
1448  return "NuGun" in fragment
1449  return True
1450  def workflow_(self, workflows, num, fragment, stepList, key):
1451  fragmentTmp = fragment
1452  if self.suffix.endswith("S1"):
1453  fragmentTmp = 'PREMIXUP' + key[2:].replace("PU", "").replace("Design", "") + '_PU25'
1454  super(UpgradeWorkflowPremix,self).workflow_(workflows, num, fragmentTmp, stepList, key)
1455 # Premix stage1
1456 upgradeWFs['PMXS1'] = UpgradeWorkflowPremix(
1457  steps = [
1458  ],
1459  PU = [
1460  'GenSim',
1461  'GenSimHLBeamSpot',
1462  'GenSimHLBeamSpot14',
1463  ],
1464  suffix = '_PMXS1',
1465  offset = 0.97,
1466 )
1467 # Premix stage2
1468 upgradeWFs['PMXS2'] = UpgradeWorkflowPremix(
1469  steps = [],
1470  PU = [
1471  'Digi',
1472  'DigiTrigger',
1473  'RecoLocal',
1474  'Reco',
1475  'RecoGlobal',
1476  'RecoNano',
1477  'Nano',
1478  ],
1479  suffix = '_PMXS2',
1480  offset = 0.98,
1481 )
1482 # Premix combined stage1+stage2
1483 upgradeWFs['PMXS1S2'] = UpgradeWorkflowPremix(
1484  steps = [],
1485  PU = [
1486  'GenSim',
1487  'GenSimHLBeamSpot',
1488  'GenSimHLBeamSpot14',
1489  'Digi',
1490  'DigiTrigger',
1491  'RecoLocal',
1492  'Reco',
1493  'RecoGlobal',
1494  'RecoNano',
1495  'Nano',
1496  ],
1497  suffix = '_PMXS1S2',
1498  offset = 0.99,
1499 )
1500 # Alternative version of above w/ less PU for PR tests
1502  def setupPU_(self, step, stepName, stepDict, k, properties):
1503  # adjust first, so it gets copied into new Premix step
1504  if '--pileup' in stepDict[stepName][k]:
1505  stepDict[stepName][k]['--pileup'] = 'AVE_50_BX_25ns_m3p3'
1506  super(UpgradeWorkflowAdjustPU,self).setupPU_(step, stepName, stepDict, k, properties)
1507  def condition(self, fragment, stepList, key, hasHarvest):
1508  # restrict to phase2
1509  return super(UpgradeWorkflowAdjustPU,self).condition(fragment, stepList, key, hasHarvest) and '2026' in key
1510 upgradeWFs['PMXS1S2PR'] = UpgradeWorkflowAdjustPU(
1511  steps = [],
1512  PU = [
1513  'GenSim',
1514  'GenSimHLBeamSpot',
1515  'GenSimHLBeamSpot14',
1516  'Digi',
1517  'DigiTrigger',
1518  'RecoLocal',
1519  'Reco',
1520  'RecoGlobal',
1521  'Nano',
1522  'HARVEST',
1523  'HARVESTGlobal',
1524  ],
1525  suffix = '_PMXS1S2PR',
1526  offset = 0.999,
1527 )
1528 
1530  def setup_(self, step, stepName, stepDict, k, properties):
1531  # copy steps, then apply specializations
1532  UpgradeWorkflowPremix.setup_(self, step, stepName, stepDict, k, properties)
1533  UpgradeWorkflow_ProdLike.setup_(self, step, stepName, stepDict, k, properties)
1534  #
1535  if 'Digi' in step:
1536  d = merge([stepDict[self.getStepName(step)][k]])
1537  tmpsteps = []
1538  for s in d["-s"].split(","):
1539  if "DIGI:pdigi_valid" in s:
1540  tmpsteps.append("DIGI")
1541  else:
1542  tmpsteps.append(s)
1543  d = merge([{"-s" : ",".join(tmpsteps),
1544  "--eventcontent": "PREMIXRAW"},
1545  d])
1546  stepDict[stepName][k] = d
1547  if 'Nano'==step:
1548  stepDict[stepName][k] = merge([{'--filein':'file:step5.root','-s':'NANO','--datatier':'NANOAODSIM','--eventcontent':'NANOEDMAODSIM'}, stepDict[step][k]])
1549  def condition(self, fragment, stepList, key, hasHarvest):
1550  # use both conditions
1551  return UpgradeWorkflowPremix.condition(self, fragment, stepList, key, hasHarvest) and UpgradeWorkflow_ProdLike.condition(self, fragment, stepList, key, hasHarvest)
1552 # premix stage2
1553 upgradeWFs['PMXS2ProdLike'] = UpgradeWorkflowPremixProdLike(
1554  steps = [],
1555  PU = [
1556  'Digi',
1557  'DigiTrigger',
1558  'RecoLocal',
1559  'Reco',
1560  'RecoGlobal',
1561  'RecoNano',
1562  'Nano',
1563  'HARVEST',
1564  'HARVESTGlobal',
1565  'HARVESTNano',
1566  'MiniAOD',
1567  'ALCA',
1568  ],
1569  suffix = '_PMXS2ProdLike',
1570  offset = 0.9821,
1571 )
1572 # premix combined stage1+stage2
1573 upgradeWFs['PMXS1S2ProdLike'] = UpgradeWorkflowPremixProdLike(
1574  steps = [],
1575  PU = [
1576  'GenSim',
1577  'GenSimHLBeamSpot',
1578  'GenSimHLBeamSpot14',
1579  'Digi',
1580  'DigiTrigger',
1581  'RecoLocal',
1582  'Reco',
1583  'RecoGlobal',
1584  'RecoNano',
1585  'Nano',
1586  'HARVEST',
1587  'HARVESTGlobal',
1588  'HARVESTNano',
1589  'MiniAOD',
1590  'ALCA',
1591  ],
1592  suffix = '_PMXS1S2ProdLike',
1593  offset = 0.9921,
1594 )
1595 
1597  def setup_(self, step, stepName, stepDict, k, properties):
1598  if 'Run3' in stepDict[step][k]['--era']:
1599  stepDict[stepName][k] = merge([{'--geometry': 'DD4hepExtended2021'}, stepDict[step][k]])
1600  elif 'Phase2' in stepDict[step][k]['--era']:
1601  dd4hepGeom="DD4hep"
1602  dd4hepGeom+=stepDict[step][k]['--geometry']
1603  stepDict[stepName][k] = merge([{'--geometry' : dd4hepGeom, '--procModifiers': 'dd4hep'}, stepDict[step][k]])
1604  def condition(self, fragment, stepList, key, hasHarvest):
1605  return '2021' in key or '2026' in key
1606 upgradeWFs['DD4hep'] = UpgradeWorkflow_DD4hep(
1607  steps = [
1608  'GenSim',
1609  'GenSimHLBeamSpot',
1610  'GenSimHLBeamSpot14',
1611  'Digi',
1612  'DigiTrigger',
1613  'Reco',
1614  'RecoGlobal',
1615  'RecoNano',
1616  'HARVEST',
1617  'HARVESTGlobal',
1618  'HARVESTNano',
1619  'ALCA',
1620  ],
1621  PU = [],
1622  suffix = '_DD4hep',
1623  offset = 0.911,
1624 )
1625 upgradeWFs['DD4hep'].allowReuse = False
1626 
1627 #This workflow is now obsolete, it becomes default for Run-3.
1628 #Keep it for future use in Phase-2, then delete
1630  def setup_(self, step, stepName, stepDict, k, properties):
1631  if 'Run3' in stepDict[step][k]['--era']:
1632  stepDict[stepName][k] = merge([{'--conditions': 'auto:phase1_2021_realistic', '--geometry': 'DB:Extended'}, stepDict[step][k]])
1633  def condition(self, fragment, stepList, key, hasHarvest):
1634  return '2021' in key
1635 upgradeWFs['DD4hepDB'] = UpgradeWorkflow_DD4hepDB(
1636  steps = [
1637  'GenSim',
1638  'GenSimHLBeamSpot',
1639  'GenSimHLBeamSpot14',
1640  'Digi',
1641  'DigiTrigger',
1642  'Reco',
1643  'RecoGlobal',
1644  'RecoNano',
1645  'HARVEST',
1646  'HARVESTGlobal',
1647  'HARVESTNano',
1648  'ALCA',
1649  ],
1650  PU = [],
1651  suffix = '_DD4hepDB',
1652  offset = 0.912,
1653 )
1654 upgradeWFs['DD4hepDB'].allowReuse = False
1655 
1657  def setup_(self, step, stepName, stepDict, k, properties):
1658  if 'Run3' in stepDict[step][k]['--era']:
1659  # retain any other eras
1660  tmp_eras = stepDict[step][k]['--era'].split(',')
1661  tmp_eras[tmp_eras.index("Run3")] = 'Run3_DDD'
1662  tmp_eras = ','.join(tmp_eras)
1663  stepDict[stepName][k] = merge([{'--conditions': 'auto:phase1_2021_realistic_ddd', '--geometry': 'DB:Extended', '--era': tmp_eras}, stepDict[step][k]])
1664  def condition(self, fragment, stepList, key, hasHarvest):
1665  return '2021' in key
1666 upgradeWFs['DDDDB'] = UpgradeWorkflow_DDDDB(
1667  steps = [
1668  'GenSim',
1669  'GenSimHLBeamSpot',
1670  'GenSimHLBeamSpot14',
1671  'Digi',
1672  'DigiTrigger',
1673  'Reco',
1674  'RecoGlobal',
1675  'RecoNano',
1676  'HARVEST',
1677  'HARVESTGlobal',
1678  'HARVESTNano',
1679  'ALCA',
1680  ],
1681  PU = [],
1682  suffix = '_DDDDB',
1683  offset = 0.914,
1684 )
1685 upgradeWFs['DDDDB'].allowReuse = False
1686 
1688  def setup_(self, step, stepName, stepDict, k, properties):
1689  stepDict[stepName][k] = merge([{'--procModifiers': 'allSonicTriton'}, stepDict[step][k]])
1690  def condition(self, fragment, stepList, key, hasHarvest):
1691  return (fragment=='TTbar_13' and '2021' in key) \
1692  or (fragment=='TTbar_14TeV' and '2026' in key)
1693 upgradeWFs['SonicTriton'] = UpgradeWorkflow_SonicTriton(
1694  steps = [
1695  'GenSim',
1696  'GenSimHLBeamSpot',
1697  'GenSimHLBeamSpot14',
1698  'Digi',
1699  'DigiTrigger',
1700  'Reco',
1701  'RecoGlobal',
1702  'RecoNano',
1703  'HARVEST',
1704  'HARVESTGlobal',
1705  'HARVESTNano',
1706  'ALCA',
1707  ],
1708  PU = [
1709  'GenSim',
1710  'GenSimHLBeamSpot',
1711  'GenSimHLBeamSpot14',
1712  'Digi',
1713  'DigiTrigger',
1714  'Reco',
1715  'RecoGlobal',
1716  'RecoNano',
1717  'HARVEST',
1718  'HARVESTGlobal',
1719  'HARVESTNano',
1720  'ALCA',
1721  ],
1722  suffix = '_SonicTriton',
1723  offset = 0.9001,
1724 )
1725 
1726 # check for duplicate offsets
1727 offsets = [specialWF.offset for specialType,specialWF in upgradeWFs.items()]
1728 seen = set()
1729 dups = set(x for x in offsets if x in seen or seen.add(x))
1730 if len(dups)>0:
1731  raise ValueError("Duplicate special workflow offsets not allowed: "+','.join([str(x) for x in dups]))
1732 
1733 upgradeProperties = {}
1734 
1735 upgradeProperties[2017] = {
1736  '2017' : {
1737  'Geom' : 'DB:Extended',
1738  'GT' : 'auto:phase1_2017_realistic',
1739  'HLTmenu': '@relval2017',
1740  'Era' : 'Run2_2017',
1741  'ScenToRun' : ['GenSim','Digi','RecoFakeHLT','HARVESTFakeHLT','ALCA','Nano'],
1742  },
1743  '2017Design' : {
1744  'Geom' : 'DB:Extended',
1745  'GT' : 'auto:phase1_2017_design',
1746  'HLTmenu': '@relval2017',
1747  'Era' : 'Run2_2017',
1748  'BeamSpot': 'GaussSigmaZ4cm',
1749  'ScenToRun' : ['GenSim','Digi','RecoFakeHLT','HARVESTFakeHLT'],
1750  },
1751  '2018' : {
1752  'Geom' : 'DB:Extended',
1753  'GT' : 'auto:phase1_2018_realistic',
1754  'HLTmenu': '@relval2018',
1755  'Era' : 'Run2_2018',
1756  'BeamSpot': 'Realistic25ns13TeVEarly2018Collision',
1757  'ScenToRun' : ['GenSim','Digi','RecoFakeHLT','HARVESTFakeHLT','ALCA','Nano'],
1758  },
1759  '2018Design' : {
1760  'Geom' : 'DB:Extended',
1761  'GT' : 'auto:phase1_2018_design',
1762  'HLTmenu': '@relval2018',
1763  'Era' : 'Run2_2018',
1764  'BeamSpot': 'GaussSigmaZ4cm',
1765  'ScenToRun' : ['GenSim','Digi','RecoFakeHLT','HARVESTFakeHLT'],
1766  },
1767  '2021' : {
1768  'Geom' : 'DB:Extended',
1769  'GT' : 'auto:phase1_2021_realistic',
1770  'HLTmenu': '@relval2021',
1771  'Era' : 'Run3',
1772  'BeamSpot': 'Run3RoundOptics25ns13TeVLowSigmaZ',
1773  'ScenToRun' : ['GenSim','Digi','RecoNano','HARVESTNano','ALCA'],
1774  },
1775  '2021Design' : {
1776  'Geom' : 'DB:Extended',
1777  'GT' : 'auto:phase1_2021_design',
1778  'HLTmenu': '@relval2021',
1779  'Era' : 'Run3',
1780  'BeamSpot': 'GaussSigmaZ4cm',
1781  'ScenToRun' : ['GenSim','Digi','RecoNano','HARVESTNano'],
1782  },
1783  '2023' : {
1784  'Geom' : 'DB:Extended',
1785  'GT' : 'auto:phase1_2023_realistic',
1786  'HLTmenu': '@relval2021',
1787  'Era' : 'Run3',
1788  'BeamSpot': 'Run3RoundOptics25ns13TeVLowSigmaZ',
1789  'ScenToRun' : ['GenSim','Digi','RecoNano','HARVESTNano','ALCA'],
1790  },
1791  '2024' : {
1792  'Geom' : 'DB:Extended',
1793  'GT' : 'auto:phase1_2024_realistic',
1794  'HLTmenu': '@relval2021',
1795  'Era' : 'Run3',
1796  'BeamSpot': 'Run3RoundOptics25ns13TeVLowSigmaZ',
1797  'ScenToRun' : ['GenSim','Digi','RecoNano','HARVESTNano','ALCA'],
1798  },
1799 }
1800 
1801 # standard PU sequences
1802 for key in list(upgradeProperties[2017].keys()):
1803  upgradeProperties[2017][key+'PU'] = deepcopy(upgradeProperties[2017][key])
1804  upgradeProperties[2017][key+'PU']['ScenToRun'] = ['GenSim','DigiPU'] + \
1805  (['RecoNanoPU','HARVESTNanoPU'] if '202' in key else ['RecoFakeHLTPU','HARVESTFakeHLTPU']) + \
1806  (['Nano'] if 'Nano' in upgradeProperties[2017][key]['ScenToRun'] else [])
1807 
1808 upgradeProperties[2026] = {
1809  '2026D49' : {
1810  'Geom' : 'Extended2026D49',
1811  'HLTmenu': '@fake2',
1812  'GT' : 'auto:phase2_realistic_T15',
1813  'Era' : 'Phase2C9',
1814  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1815  },
1816  '2026D60' : {
1817  'Geom' : 'Extended2026D60',
1818  'HLTmenu': '@fake2',
1819  'GT' : 'auto:phase2_realistic_T15',
1820  'Era' : 'Phase2C10',
1821  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1822  },
1823  '2026D68' : {
1824  'Geom' : 'Extended2026D68',
1825  'HLTmenu': '@fake2',
1826  'GT' : 'auto:phase2_realistic_T21',
1827  'Era' : 'Phase2C11',
1828  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1829  },
1830  '2026D70' : {
1831  'Geom' : 'Extended2026D70',
1832  'HLTmenu': '@fake2',
1833  'GT' : 'auto:phase2_realistic_T21',
1834  'Era' : 'Phase2C11',
1835  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1836  },
1837  '2026D76' : {
1838  'Geom' : 'Extended2026D76',
1839  'HLTmenu': '@fake2',
1840  'GT' : 'auto:phase2_realistic_T21',
1841  'Era' : 'Phase2C11I13M9',
1842  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1843  },
1844  '2026D77' : {
1845  'Geom' : 'Extended2026D77',
1846  'HLTmenu': '@fake2',
1847  'GT' : 'auto:phase2_realistic_T21',
1848  'Era' : 'Phase2C11I13M9',
1849  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1850  },
1851  '2026D78' : {
1852  'Geom' : 'Extended2026D78', # N.B.: Geometry with square 50x50 um2 pixels in the Inner Tracker.
1853  'HLTmenu': '@fake2',
1854  'GT' : 'auto:phase2_realistic_T22',
1855  'ProcessModifier': 'PixelCPEGeneric', # This swaps template reco CPE for generic reco CPE
1856  'Era' : 'Phase2C11I13T22M9', # customized for square pixels and Muon M9
1857  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1858  },
1859  '2026D79' : {
1860  'Geom' : 'Extended2026D79', # N.B.: Geometry with 3D pixels in the Inner Tracker.
1861  'HLTmenu': '@fake2',
1862  'GT' : 'auto:phase2_realistic_T23',
1863  'Era' : 'Phase2C11I13T23M9', # customizes for 3D Pixels and Muon M9
1864  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1865  },
1866  '2026D80' : {
1867  'Geom' : 'Extended2026D80', # N.B.: Geometry with 3D pixels in the Inner Tracker L1.
1868  'HLTmenu': '@fake2',
1869  'GT' : 'auto:phase2_realistic_T25',
1870  'Era' : 'Phase2C11I13T25M9', # customized for 3D pixels and Muon M9
1871  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1872  },
1873  '2026D81' : {
1874  'Geom' : 'Extended2026D81', # N.B.: Geometry with 3D pixels (TBPX,L1) and square 50x50 um2 pixels (TFPX+TEPX) in the Inner Tracker.
1875  'HLTmenu': '@fake2',
1876  'GT' : 'auto:phase2_realistic_T26',
1877  'Era' : 'Phase2C11I13T26M9', # customized for square pixels and Muon M9
1878  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1879  },
1880  '2026D82' : {
1881  'Geom' : 'Extended2026D82',
1882  'HLTmenu': '@fake2',
1883  'GT' : 'auto:phase2_realistic_T21',
1884  'Era' : 'Phase2C11I13M9',
1885  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1886  },
1887  '2026D83' : {
1888  'Geom' : 'Extended2026D83',
1889  'HLTmenu': '@fake2',
1890  'GT' : 'auto:phase2_realistic_T21',
1891  'Era' : 'Phase2C11I13M9',
1892  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1893  },
1894  '2026D84' : {
1895  'Geom' : 'Extended2026D84',
1896  'HLTmenu': '@fake2',
1897  'GT' : 'auto:phase2_realistic_T21',
1898  'Era' : 'Phase2C11',
1899  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1900  },
1901  '2026D85' : {
1902  'Geom' : 'Extended2026D85',
1903  'HLTmenu': '@fake2',
1904  'GT' : 'auto:phase2_realistic_T21',
1905  'Era' : 'Phase2C11I13M9',
1906  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1907  },
1908  '2026D86' : {
1909  'Geom' : 'Extended2026D86',
1910  'HLTmenu': '@fake2',
1911  'GT' : 'auto:phase2_realistic_T21',
1912  'Era' : 'Phase2C17I13M9',
1913  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1914  },
1915  '2026D87' : {
1916  'Geom' : 'Extended2026D87', # N.B.: Geometry with bricked pixels in the Inner Tracker (+others)
1917  'HLTmenu': '@fake2',
1918  'GT' : 'auto:phase2_realistic_T27',
1919  'Era' : 'Phase2C11I13T27M9', # customized for bricked pixels and Muon M9
1920  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1921  },
1922  '2026D88' : {
1923  'Geom' : 'Extended2026D88',
1924  'HLTmenu': '@fake2',
1925  'GT' : 'auto:phase2_realistic_T21',
1926  'Era' : 'Phase2C17I13M9',
1927  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1928  },
1929  '2026D89' : {
1930  'Geom' : 'Extended2026D89',
1931  'HLTmenu': '@fake2',
1932  'GT' : 'auto:phase2_realistic_T27',
1933  'Era' : 'Phase2C11I13T27M9',
1934  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1935  },
1936  '2026D90' : {
1937  'Geom' : 'Extended2026D90',
1938  'HLTmenu': '@fake2',
1939  'GT' : 'auto:phase2_realistic_T27',
1940  'Era' : 'Phase2C11I13T27M9',
1941  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1942  },
1943  '2026D91' : {
1944  'Geom' : 'Extended2026D91',
1945  'HLTmenu': '@fake2',
1946  'GT' : 'auto:phase2_realistic_T30',
1947  'Era' : 'Phase2C17I13M9',
1948  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1949  },
1950 }
1951 
1952 # standard PU sequences
1953 for key in list(upgradeProperties[2026].keys()):
1954  upgradeProperties[2026][key+'PU'] = deepcopy(upgradeProperties[2026][key])
1955  upgradeProperties[2026][key+'PU']['ScenToRun'] = ['GenSimHLBeamSpot','DigiTriggerPU','RecoGlobalPU', 'HARVESTGlobalPU']
1956 
1957 # for relvals
1958 defaultDataSets = {}
1959 for year in upgradeKeys:
1960  for key in upgradeKeys[year]:
1961  if 'PU' in key: continue
1962  defaultDataSets[key] = ''
1963 
1964 
1965 class UpgradeFragment(object):
1966  def __init__(self, howMuch, dataset):
1967  self.howMuch = howMuch
1968  self.dataset = dataset
1969 
1970 upgradeFragments = OrderedDict([
1971  ('FourMuPt_1_200_pythia8_cfi', UpgradeFragment(Kby(10,100),'FourMuPt1_200')),
1972  ('SingleElectronPt10_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleElectronPt10')),
1973  ('SingleElectronPt35_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleElectronPt35')),
1974  ('SingleElectronPt1000_pythia8_cfi', UpgradeFragment(Kby(9,50),'SingleElectronPt1000')),
1975  ('SingleGammaPt10_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleGammaPt10')),
1976  ('SingleGammaPt35_pythia8_cfi', UpgradeFragment(Kby(9,50),'SingleGammaPt35')),
1977  ('SingleMuPt1_pythia8_cfi', UpgradeFragment(Kby(25,100),'SingleMuPt1')),
1978  ('SingleMuPt10_Eta2p85_cfi', UpgradeFragment(Kby(9,100),'SingleMuPt10')),
1979  ('SingleMuPt100_Eta2p85_cfi', UpgradeFragment(Kby(9,100),'SingleMuPt100')),
1980  ('SingleMuPt1000_Eta2p85_cfi', UpgradeFragment(Kby(9,100),'SingleMuPt1000')),
1981  ('FourMuExtendedPt_1_200_pythia8_cfi', UpgradeFragment(Kby(10,100),'FourMuExtendedPt1_200')),
1982  ('TenMuExtendedE_0_200_pythia8_cfi', UpgradeFragment(Kby(10,100),'TenMuExtendedE_0_200')),
1983  ('DoubleElectronPt10Extended_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleElPt10Extended')),
1984  ('DoubleElectronPt35Extended_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleElPt35Extended')),
1985  ('DoubleElectronPt1000Extended_pythia8_cfi', UpgradeFragment(Kby(9,50),'SingleElPt1000Extended')),
1986  ('DoubleGammaPt10Extended_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleGammaPt10Extended')),
1987  ('DoubleGammaPt35Extended_pythia8_cfi', UpgradeFragment(Kby(9,50),'SingleGammaPt35Extended')),
1988  ('DoubleMuPt1Extended_pythia8_cfi', UpgradeFragment(Kby(25,100),'SingleMuPt1Extended')),
1989  ('DoubleMuPt10Extended_pythia8_cfi', UpgradeFragment(Kby(25,100),'SingleMuPt10Extended')),
1990  ('DoubleMuPt100Extended_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleMuPt100Extended')),
1991  ('DoubleMuPt1000Extended_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleMuPt1000Extended')),
1992  ('TenMuE_0_200_pythia8_cfi', UpgradeFragment(Kby(10,100),'TenMuE_0_200')),
1993  ('SinglePiE50HCAL_pythia8_cfi', UpgradeFragment(Kby(50,500),'SinglePiE50HCAL')),
1994  ('MinBias_13TeV_pythia8_TuneCUETP8M1_cfi', UpgradeFragment(Kby(90,100),'MinBias_13')),
1995  ('TTbar_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'TTbar_13')),
1996  ('ZEE_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'ZEE_13')),
1997  ('QCD_Pt_600_800_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'QCD_Pt_600_800_13')),
1998  ('Wjet_Pt_80_120_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'Wjet_Pt_80_120_14TeV')),
1999  ('Wjet_Pt_3000_3500_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'Wjet_Pt_3000_3500_14TeV')),
2000  ('LM1_sfts_14TeV_cfi', UpgradeFragment(Kby(9,100),'LM1_sfts_14TeV')),
2001  ('QCD_Pt_3000_3500_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'QCD_Pt_3000_3500_14TeV')),
2002  ('QCD_Pt_80_120_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'QCD_Pt_80_120_14TeV')),
2003  ('H200ChargedTaus_Tauola_14TeV_cfi', UpgradeFragment(Kby(9,100),'Higgs200ChargedTaus_14TeV')),
2004  ('JpsiMM_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(66,100),'JpsiMM_14TeV')),
2005  ('TTbar_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,100),'TTbar_14TeV')),
2006  ('WE_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'WE_14TeV')),
2007  ('ZTT_Tauola_All_hadronic_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,100),'ZTT_14TeV')),
2008  ('H130GGgluonfusion_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'H130GGgluonfusion_14TeV')),
2009  ('PhotonJet_Pt_10_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'PhotonJets_Pt_10_14TeV')),
2010  ('QQH1352T_Tauola_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'QQH1352T_Tauola_14TeV')),
2011  ('MinBias_14TeV_pythia8_TuneCP5_cfi', UpgradeFragment(Kby(90,100),'MinBias_14TeV')),
2012  ('WToMuNu_14TeV_TuneCP5_pythia8_cfi', UpgradeFragment(Kby(9,100),'WToMuNu_14TeV')),
2013  ('ZMM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(18,100),'ZMM_13')),
2014  ('QCDForPF_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(50,100),'QCD_FlatPt_15_3000HS_14')),
2015  ('DYToLL_M-50_14TeV_pythia8_cff', UpgradeFragment(Kby(9,100),'DYToLL_M_50_14TeV')),
2016  ('DYToTauTau_M-50_14TeV_pythia8_tauola_cff', UpgradeFragment(Kby(9,100),'DYtoTauTau_M_50_14TeV')),
2017  ('ZEE_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,100),'ZEE_14')),
2018  ('QCD_Pt_80_120_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'QCD_Pt_80_120_13')),
2019  ('H125GGgluonfusion_13TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,50),'H125GGgluonfusion_13')),
2020  ('QCD_Pt20toInf_MuEnrichedPt15_14TeV_TuneCP5_cff', UpgradeFragment(Kby(19565, 217391),'QCD_Pt20toInfMuEnrichPt15_14')), # effi = 4.6e-4, local=8.000e-04
2021  ('ZMM_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(18,100),'ZMM_14')),
2022  ('QCD_Pt15To7000_Flat_14TeV_TuneCP5_cff', UpgradeFragment(Kby(9,50),'QCD_Pt15To7000_Flat_14')),
2023  ('H125GGgluonfusion_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,50),'H125GGgluonfusion_14')),
2024  ('QCD_Pt_600_800_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'QCD_Pt_600_800_14')),
2025  ('UndergroundCosmicSPLooseMu_cfi', UpgradeFragment(Kby(9,50),'CosmicsSPLoose')),
2026  ('BeamHalo_13TeV_cfi', UpgradeFragment(Kby(9,50),'BeamHalo_13')),
2027  ('H200ChargedTaus_Tauola_13TeV_cfi', UpgradeFragment(Kby(9,50),'Higgs200ChargedTaus_13')),
2028  ('ADDMonoJet_13TeV_d3MD3_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'ADDMonoJet_d3MD3_13')),
2029  ('ZpMM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'ZpMM_13')),
2030  ('QCD_Pt_3000_3500_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'QCD_Pt_3000_3500_13')),
2031  ('WpM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'WpM_13')),
2032  ('SingleNuE10_cfi', UpgradeFragment(Kby(9,50),'NuGun')),
2033  ('TTbarLepton_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'TTbarLepton_13')),
2034  ('WE_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'WE_13')),
2035  ('WM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'WM_13')),
2036  ('ZTT_All_hadronic_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'ZTT_13')),
2037  ('PhotonJet_Pt_10_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'PhotonJets_Pt_10_13')),
2038  ('QQH1352T_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'QQH1352T_13')),
2039  ('Wjet_Pt_80_120_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'Wjet_Pt_80_120_13')),
2040  ('Wjet_Pt_3000_3500_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'Wjet_Pt_3000_3500_13')),
2041  ('SMS-T1tttt_mGl-1500_mLSP-100_13TeV-pythia8_cfi', UpgradeFragment(Kby(9,50),'SMS-T1tttt_mGl-1500_mLSP-100_13')),
2042  ('QCDForPF_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(50,100),'QCD_FlatPt_15_3000HS_13')),
2043  ('PYTHIA8_PhiToMuMu_TuneCUETP8M1_13TeV_cff', UpgradeFragment(Kby(9,50),'PhiToMuMu_13')),
2044  ('RSKKGluon_m3000GeV_13TeV_TuneCUETP8M1_cff', UpgradeFragment(Kby(9,50),'RSKKGluon_m3000GeV_13')),
2045  ('ZpMM_2250_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'ZpMM_2250_13')),
2046  ('ZpEE_2250_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'ZpEE_2250_13')),
2047  ('ZpTT_1500_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'ZpTT_1500_13')),
2048  ('Upsilon1SToMuMu_forSTEAM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'Upsilon1SToMuMu_13')),
2049  ('EtaBToJpsiJpsi_forSTEAM_TuneCUEP8M1_13TeV_cfi', UpgradeFragment(Kby(9,50),'EtaBToJpsiJpsi_13')),
2050  ('JpsiMuMu_Pt-8_forSTEAM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(3100,100000),'JpsiMuMu_Pt-8')),
2051  ('BuMixing_BMuonFilter_forSTEAM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(900,10000),'BuMixing_13')),
2052  ('HSCPstop_M_200_TuneCUETP8M1_13TeV_pythia8_cff', UpgradeFragment(Kby(9,50),'HSCPstop_M_200_13')),
2053  ('RSGravitonToGammaGamma_kMpl01_M_3000_TuneCUETP8M1_13TeV_pythia8_cfi', UpgradeFragment(Kby(9,50),'RSGravitonToGaGa_13')),
2054  ('WprimeToENu_M-2000_TuneCUETP8M1_13TeV-pythia8_cff', UpgradeFragment(Kby(9,50),'WpToENu_M-2000_13')),
2055  ('DisplacedSUSY_stopToBottom_M_800_500mm_TuneCP5_13TeV_pythia8_cff', UpgradeFragment(Kby(9,50),'DisplacedSUSY_stopToB_M_800_500mm_13')),
2056  ('TenE_E_0_200_pythia8_cfi', UpgradeFragment(Kby(9,100),'TenE_0_200')),
2057  ('FlatRandomPtAndDxyGunProducer_cfi', UpgradeFragment(Kby(9,100),'DisplacedMuonsDxy_0_500')),
2058  ('TenTau_E_15_500_pythia8_cfi', UpgradeFragment(Kby(9,100),'TenTau_15_500')),
2059  ('SinglePiPt25Eta1p7_2p7_cfi', UpgradeFragment(Kby(9,100),'SinglePiPt25Eta1p7_2p7')),
2060  ('SingleMuPt15Eta1p7_2p7_cfi', UpgradeFragment(Kby(9,100),'SingleMuPt15Eta1p7_2p7')),
2061  ('SingleGammaPt25Eta1p7_2p7_cfi', UpgradeFragment(Kby(9,100),'SingleGammaPt25Eta1p7_2p7')),
2062  ('SingleElectronPt15Eta1p7_2p7_cfi', UpgradeFragment(Kby(9,100),'SingleElectronPt15Eta1p7_2p7')),
2063  ('ZTT_All_hadronic_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,50),'ZTT_14')),
2064  ('CloseByParticle_Photon_ERZRanges_cfi', UpgradeFragment(Kby(9,100),'CloseByParticleGun')),
2065  ('CE_E_Front_300um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_E_Front_300um')),
2066  ('CE_E_Front_200um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_E_Front_200um')),
2067  ('CE_E_Front_120um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_E_Front_120um')),
2068  ('CE_H_Fine_300um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_H_Fine_300um')),
2069  ('CE_H_Fine_200um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_H_Fine_200um')),
2070  ('CE_H_Fine_120um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_H_Fine_120um')),
2071  ('CE_H_Coarse_Scint_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_H_Coarse_Scint')),
2072  ('CE_H_Coarse_300um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_H_Coarse_300um')),
2073  ('SingleElectronFlatPt2To100_cfi', UpgradeFragment(Kby(9,100),'SingleEFlatPt2To100')),
2074  ('SingleMuFlatPt0p7To10_cfi', UpgradeFragment(Kby(9,100),'SingleMuFlatPt0p7To10')),
2075  ('SingleMuFlatPt2To100_cfi', UpgradeFragment(Kby(9,100),'SingleMuFlatPt2To100')),
2076  ('SingleGammaFlatPt8To150_cfi', UpgradeFragment(Kby(9,100),'SingleGammaFlatPt8To150')),
2077  ('SinglePiFlatPt0p7To10_cfi', UpgradeFragment(Kby(9,100),'SinglePiFlatPt0p7To10')),
2078  ('SingleTauFlatPt2To150_cfi', UpgradeFragment(Kby(9,100),'SingleTauFlatPt2To150')),
2079  ('FlatRandomPtAndDxyGunProducer_MuPt2To10_cfi', UpgradeFragment(Kby(9,100),'DisplacedMuPt2To10')),
2080  ('FlatRandomPtAndDxyGunProducer_MuPt10To30_cfi', UpgradeFragment(Kby(9,100),'DisplacedMuPt10To30')),
2081  ('FlatRandomPtAndDxyGunProducer_MuPt30To100_cfi', UpgradeFragment(Kby(9,100),'DisplacedMuPt30To100')),
2082  ('B0ToKstarMuMu_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(304,3030),'B0ToKstarMuMu_14TeV')), # 3.3%
2083  ('BsToEleEle_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(223,2222),'BsToEleEle_14TeV')), # 4.5%
2084  ('BsToJpsiGamma_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(2500,25000),'BsToJpsiGamma_14TeV')), # 0.4%
2085  ('BsToJpsiPhi_mumuKK_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(910,9090),'BsToJpsiPhi_mumuKK_14TeV')), # 1.1%
2086  ('BsToMuMu_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(313,3125),'BsToMuMu_14TeV')), # 3.2%
2087  ('BsToPhiPhi_KKKK_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(556,5555),'BsToPhiPhi_KKKK_14TeV')), # 1.8%
2088  ('TauToMuMuMu_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(18939,189393),'TauToMuMuMu_14TeV')), # effi = 5.280e-04
2089  ('BdToKstarEleEle_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(206,2061),'BdToKstarEleEle_14TeV')), #effi = 4.850e-02
2090  ('ZpTT_1500_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,50),'ZpTT_1500_14')),
2091  ('BuMixing_BMuonFilter_forSTEAM_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(900,10000),'BuMixing_14')),
2092  ('Upsilon1SToMuMu_forSTEAM_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,50),'Upsilon1SToMuMu_14')),
2093  ('TenTau_E_15_500_Eta3p1_pythia8_cfi', UpgradeFragment(Kby(9,100),'TenTau_15_500_Eta3p1')),
2094  ('QCD_Pt_1800_2400_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,50), 'QCD_Pt_1800_2400_14')),
2095  ('DisplacedSUSY_stopToBottom_M_800_500mm_TuneCP5_14TeV_pythia8_cff', UpgradeFragment(Kby(9,50),'DisplacedSUSY_14TeV')),
2096  ('GluGluTo2Jets_M_300_2000_14TeV_Exhume_cff',UpgradeFragment(Kby(9,100),'GluGluTo2Jets_14TeV')),
2097  ('TTbarToDilepton_mt172p5_TuneCP5_14TeV_pythia8_cfi',UpgradeFragment(Kby(9,50),'TTbarToDilepton_14TeV')),
2098  ('QQToHToTauTau_mh125_TuneCP5_14TeV_pythia8_cfi',UpgradeFragment(Kby(9,50),'QQToHToTauTau_14TeV')),
2099  ('ZpToEE_m6000_TuneCP5_14TeV_pythia8_cfi',UpgradeFragment(Kby(9,50),'ZpToEE_m6000_14TeV')),
2100  ('ZpToMM_m6000_TuneCP5_14TeV_pythia8_cfi',UpgradeFragment(Kby(9,50),'ZpToMM_m6000_14TeV')),
2101  ('SMS-T1tttt_mGl-1500_mLSP-100_TuneCP5_14TeV_pythia8_cfi',UpgradeFragment(Kby(9,50),'SMS-T1tttt_14TeV')),
2102  ('VBFHZZ4Nu_TuneCP5_14TeV_pythia8_cfi',UpgradeFragment(Kby(9,50),'VBFHZZ4Nu_14TeV')),
2103  ('EtaBToJpsiJpsi_14TeV_TuneCP5_pythia8_cfi',UpgradeFragment(Kby(9,50),'EtaBToJpsiJpsi_14TeV')),
2104  ('WToLNu_14TeV_TuneCP5_pythia8_cfi',UpgradeFragment(Kby(21,50),'WToLNu_14TeV')),
2105  ('WprimeToLNu_M2000_14TeV_TuneCP5_pythia8_cfi',UpgradeFragment(Kby(21,50),'WprimeToLNu_M2000_14TeV')),
2106  ('DoubleMuFlatPt1p5To8_cfi', UpgradeFragment(Kby(9,100),'SingleMuFlatPt1p5To8')),
2107  ('DoubleElectronFlatPt1p5To8_cfi', UpgradeFragment(Kby(9,100),'SingleElectronFlatPt1p5To8')),
2108  ('DoubleMuFlatPt1p5To8Dxy100GunProducer_cfi', UpgradeFragment(Kby(9,100),'DisplacedMuPt1p5To8Dxy100')),
2109  ('DoubleMuFlatPt2To100Dxy100GunProducer_cfi', UpgradeFragment(Kby(9,100),'DisplacedMuPt2To100Dxy100')),
2110 ])
Definition: merge.py:1
bool any(const std::vector< T > &v, const T &what)
Definition: ECalSD.cc:37
boost::dynamic_bitset append(const boost::dynamic_bitset<> &bs1, const boost::dynamic_bitset<> &bs2)
this method takes two bitsets bs1 and bs2 and returns result of bs2 appended to the end of bs1 ...
const uint16_t range(const Frame &aFrame)
static std::string join(char **cmd)
Definition: RemoteFile.cc:19
#define str(s)