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