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