CMS 3D CMS Logo

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