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