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