CMS 3D CMS Logo

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