CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 ]
65 
66 # pre-generation of WF numbers
67 numWFStart={
68  2017: 10000,
69  2026: 20000,
70 }
71 numWFSkip=200
72 # temporary measure to keep other WF numbers the same
73 numWFConflict = [[20000,23200],[23600,28200],[28600,31400],[31800,32200],[32600,34600],[50000,51000]]
74 numWFAll={
75  2017: [],
76  2026: []
77 }
78 
79 for year in upgradeKeys:
80  for i in range(0,len(upgradeKeys[year])):
81  numWFtmp = numWFStart[year] if i==0 else (numWFAll[year][i-1] + numWFSkip)
82  for conflict in numWFConflict:
83  if numWFtmp>=conflict[0] and numWFtmp<conflict[1]:
84  numWFtmp = conflict[1]
85  break
86  numWFAll[year].append(numWFtmp)
87 
88 # workflows for baseline and for variations
89 # setup() automatically loops over all steps and applies any customizations specified in setup_() -> called in relval_steps.py
90 # setupPU() and setupPU_() operate similarly -> called in relval_steps.py *after* merging PUDataSets w/ regular steps
91 # workflow() adds a concrete workflow to the list based on condition() -> called in relval_upgrade.py
92 # every special workflow gets its own derived class, which must then be added to the global dict upgradeWFs
93 preventReuseKeyword = 'NOREUSE'
94 class UpgradeWorkflow(object):
95  def __init__(self,steps,PU,suffix,offset):
96  self.steps = steps
97  self.PU = PU
98  self.allowReuse = True
99 
100  # ensure all PU steps are in normal step list
101  for step in self.PU:
102  if not step in self.steps:
103  self.steps.append(step)
104 
105  self.suffix = suffix
106  if len(self.suffix)>0 and self.suffix[0]!='_': self.suffix = '_'+self.suffix
107  self.offset = offset
108  if self.offset < 0.0 or self.offset > 1.0:
109  raise ValueError("Special workflow offset must be between 0.0 and 1.0")
110  def getStepName(self, step, extra=""):
111  stepName = step + self.suffix + extra
112  return stepName
113  def getStepNamePU(self, step, extra=""):
114  stepNamePU = step + 'PU' + self.suffix + extra
115  return stepNamePU
116  def init(self, stepDict):
117  for step in self.steps:
118  stepDict[self.getStepName(step)] = {}
119  if not self.allowReuse: stepDict[self.getStepName(step,preventReuseKeyword)] = {}
120  for step in self.PU:
121  stepDict[self.getStepNamePU(step)] = {}
122  if not self.allowReuse: stepDict[self.getStepNamePU(step,preventReuseKeyword)] = {}
123  def setup(self, stepDict, k, properties):
124  for step in self.steps:
125  self.setup_(step, self.getStepName(step), stepDict, k, properties)
126  if not self.allowReuse: self.preventReuse(self.getStepName(step,preventReuseKeyword), stepDict, k)
127  def setupPU(self, stepDict, k, properties):
128  for step in self.PU:
129  self.setupPU_(step, self.getStepNamePU(step), stepDict, k, properties)
130  if not self.allowReuse: self.preventReuse(self.getStepNamePU(step,preventReuseKeyword), stepDict, k)
131  def setup_(self, step, stepName, stepDict, k, properties):
132  pass
133  def setupPU_(self, step, stepName, stepDict, k, properties):
134  pass
135  def workflow(self, workflows, num, fragment, stepList, key, hasHarvest):
136  if self.condition(fragment, stepList, key, hasHarvest):
137  self.workflow_(workflows, num, fragment, stepList, key)
138  def workflow_(self, workflows, num, fragment, stepList, key):
139  fragmentTmp = [fragment, key]
140  if len(self.suffix)>0: fragmentTmp.append(self.suffix)
141  workflows[num+self.offset] = [ fragmentTmp, stepList ]
142  def condition(self, fragment, stepList, key, hasHarvest):
143  return False
144  def preventReuse(self, stepName, stepDict, k):
145  if "Sim" in stepName:
146  stepDict[stepName][k] = None
147 upgradeWFs = OrderedDict()
148 
150  def setup_(self, step, stepName, stepDict, k, properties):
151  cust=properties.get('Custom', None)
152  era=properties.get('Era', None)
153  modifier=properties.get('ProcessModifier',None)
154  if cust is not None: stepDict[stepName][k]['--customise']=cust
155  if era is not None:
156  stepDict[stepName][k]['--era']=era
157  if modifier is not None: stepDict[stepName][k]['--procModifier']=modifier
158  def condition(self, fragment, stepList, key, hasHarvest):
159  return True
160 upgradeWFs['baseline'] = UpgradeWorkflow_baseline(
161  steps = [
162  'GenSim',
163  'GenSimHLBeamSpot',
164  'GenSimHLBeamSpot14',
165  'GenSimHLBeamSpotHGCALCloseBy',
166  'Digi',
167  'DigiTrigger',
168  'RecoLocal',
169  'Reco',
170  'RecoFakeHLT',
171  'RecoGlobal',
172  'RecoNano',
173  'HARVEST',
174  'HARVESTFakeHLT',
175  'HARVESTNano',
176  'FastSim',
177  'HARVESTFast',
178  'HARVESTGlobal',
179  'ALCA',
180  'Nano',
181  'MiniAOD',
182  ],
183  PU = [
184  'DigiTrigger',
185  'RecoLocal',
186  'RecoGlobal',
187  'Digi',
188  'Reco',
189  'RecoFakeHLT',
190  'RecoNano',
191  'HARVEST',
192  'HARVESTFakeHLT',
193  'HARVESTNano',
194  'HARVESTGlobal',
195  'MiniAOD',
196  'Nano',
197  ],
198  suffix = '',
199  offset = 0.0,
200 )
201 
202 # some commonalities among tracking WFs
204  # skip the PU argument since PU workflows never used here
205  def __init__(self, steps, suffix, offset):
206  # always include some steps that will be skipped
207  steps = steps + ["ALCA","Nano"]
208  super().__init__(steps, [], suffix, offset)
209  def condition(self, fragment, stepList, key, hasHarvest):
210  result = (fragment=="TTbar_13" or fragment=="TTbar_14TeV") and not 'PU' in key and hasHarvest and self.condition_(fragment, stepList, key, hasHarvest)
211  return result
212  def condition_(self, fragment, stepList, key, hasHarvest):
213  return True
214  def setup_(self, step, stepName, stepDict, k, properties):
215  # skip ALCA and Nano steps (but not RecoNano or HARVESTNano for Run3)
216  if 'ALCA' in step or 'Nano'==step:
217  stepDict[stepName][k] = None
218  self.setup__(step, stepName, stepDict, k, properties)
219  # subordinate function for inherited classes
220  def setup__(self, step, stepName, stepDict, k, properties):
221  pass
222 
223 class UpgradeWorkflow_trackingOnly(UpgradeWorkflowTracking):
224  def setup__(self, step, stepName, stepDict, k, properties):
225  if 'Reco' in step: stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
226  elif 'HARVEST' in step: stepDict[stepName][k] = merge([{'-s': 'HARVESTING:@trackingOnlyValidation+@trackingOnlyDQM'}, stepDict[step][k]])
227 upgradeWFs['trackingOnly'] = UpgradeWorkflow_trackingOnly(
228  steps = [
229  'Reco',
230  'HARVEST',
231  'RecoGlobal',
232  'HARVESTGlobal',
233  'RecoNano',
234  'HARVESTNano',
235  ],
236  suffix = '_trackingOnly',
237  offset = 0.1,
238 )
239 upgradeWFs['trackingOnly'].step3 = {
240  '-s': 'RAW2DIGI,RECO:reconstruction_trackingOnly,VALIDATION:@trackingOnlyValidation,DQM:@trackingOnlyDQM',
241  '--datatier':'GEN-SIM-RECO,DQMIO',
242  '--eventcontent':'RECOSIM,DQM',
243 }
244 # used outside of upgrade WFs
245 step3_trackingOnly = upgradeWFs['trackingOnly'].step3
246 
248  def setup__(self, step, stepName, stepDict, k, properties):
249  if 'Reco' in step and stepDict[step][k]['--era']=='Run2_2017':
250  stepDict[stepName][k] = merge([{'--era': 'Run2_2017_trackingRun2'}, stepDict[step][k]])
251  def condition_(self, fragment, stepList, key, hasHarvest):
252  return '2017' in key
253 upgradeWFs['trackingRun2'] = UpgradeWorkflow_trackingRun2(
254  steps = [
255  'Reco',
256  ],
257  suffix = '_trackingRun2',
258  offset = 0.2,
259 )
260 
262  def setup__(self, step, stepName, stepDict, k, properties):
263  if 'Reco' in step and stepDict[step][k]['--era']=='Run2_2017':
264  stepDict[stepName][k] = merge([{'--era': 'Run2_2017_trackingRun2'}, self.step3, stepDict[step][k]])
265  elif 'HARVEST' in step: stepDict[stepName][k] = merge([{'-s': 'HARVESTING:@trackingOnlyValidation+@trackingOnlyDQM'}, stepDict[step][k]])
266  def condition_(self, fragment, stepList, key, hasHarvest):
267  return '2017' in key
268 upgradeWFs['trackingOnlyRun2'] = UpgradeWorkflow_trackingOnlyRun2(
269  steps = [
270  'Reco',
271  'HARVEST',
272  ],
273  suffix = '_trackingOnlyRun2',
274  offset = 0.3,
275 )
276 upgradeWFs['trackingOnlyRun2'].step3 = upgradeWFs['trackingOnly'].step3
277 
279  def setup__(self, step, stepName, stepDict, k, properties):
280  if 'Reco' in step and stepDict[step][k]['--era']=='Run2_2017':
281  stepDict[stepName][k] = merge([{'--era': 'Run2_2017_trackingLowPU'}, stepDict[step][k]])
282  def condition_(self, fragment, stepList, key, hasHarvest):
283  return '2017' in key
284 upgradeWFs['trackingLowPU'] = UpgradeWorkflow_trackingLowPU(
285  steps = [
286  'Reco',
287  ],
288  suffix = '_trackingLowPU',
289  offset = 0.4,
290 )
291 
293  def setup__(self, step, stepName, stepDict, k, properties):
294  if 'Reco' in step: stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
295  elif 'HARVEST' in step: stepDict[stepName][k] = merge([{'-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'}, stepDict[step][k]])
296  def condition_(self, fragment, stepList, key, hasHarvest):
297  return '2017' in key or '2018' in key or '2021' in key
298 upgradeWFs['pixelTrackingOnly'] = UpgradeWorkflow_pixelTrackingOnly(
299  steps = [
300  'Reco',
301  'HARVEST',
302  'RecoGlobal',
303  'HARVESTGlobal',
304  'RecoNano',
305  'HARVESTNano',
306  ],
307  suffix = '_pixelTrackingOnly',
308  offset = 0.5,
309 )
310 upgradeWFs['pixelTrackingOnly'].step3 = {
311  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
312  '--datatier': 'GEN-SIM-RECO,DQMIO',
313  '--eventcontent': 'RECOSIM,DQM',
314 }
315 
317  def setup__(self, step, stepName, stepDict, k, properties):
318  if 'Digi' in step: stepDict[stepName][k] = merge([self.step2, stepDict[step][k]])
319  if 'Reco' in step: stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
320  def condition_(self, fragment, stepList, key, hasHarvest):
321  return '2017' in key or '2021' in key
322 upgradeWFs['trackingMkFit'] = UpgradeWorkflow_trackingMkFit(
323  steps = [
324  'Digi',
325  'DigiTrigger',
326  'Reco',
327  'RecoGlobal',
328  'RecoNano',
329  ],
330  suffix = '_trackingMkFit',
331  offset = 0.7,
332 )
333 upgradeWFs['trackingMkFit'].step2 = {
334  '--customise': 'RecoTracker/MkFit/customizeHLTIter0ToMkFit.customizeHLTIter0ToMkFit'
335 }
336 upgradeWFs['trackingMkFit'].step3 = {
337  '--procModifiers': 'trackingMkFit'
338 }
339 
340 #DeepCore seeding for JetCore iteration workflow
342  def setup_(self, step, stepName, stepDict, k, properties):
343  # skip ALCA and Nano steps (but not RecoNano or HARVESTNano for Run3)
344  if 'ALCA' in step or 'Nano'==step:
345  stepDict[stepName][k] = None
346  elif 'Reco' in step or 'HARVEST' in step: stepDict[stepName][k] = merge([{'--procModifiers': 'seedingDeepCore'}, stepDict[step][k]])
347  def condition(self, fragment, stepList, key, hasHarvest):
348  result = (fragment=="QCD_Pt_1800_2400_14" or fragment=="TTbar_14TeV" ) and ('2021' in key or '2024' in key) and hasHarvest
349  return result
350 upgradeWFs['seedingDeepCore'] = UpgradeWorkflow_seedingDeepCore(
351  steps = [
352  'Reco',
353  'HARVEST',
354  'RecoGlobal',
355  'HARVESTGlobal',
356  'RecoNano',
357  'HARVESTNano',
358  'Nano',
359  'ALCA',
360  ],
361  PU = [],
362  suffix = '_seedingDeepCore',
363  offset = 0.17,
364 )
365 
366 # Vector Hits workflows
368  def setup_(self, step, stepName, stepDict, k, properties):
369  stepDict[stepName][k] = merge([{'--procModifiers': 'vectorHits'}, stepDict[step][k]])
370  def condition(self, fragment, stepList, key, hasHarvest):
371  return fragment=="TTbar_14TeV" and '2026' in key
372 upgradeWFs['vectorHits'] = UpgradeWorkflow_vectorHits(
373  steps = [
374  'RecoGlobal',
375  'HARVESTGlobal'
376  ],
377  PU = [
378  'RecoGlobal',
379  ],
380  suffix = '_vectorHits',
381  offset = 0.9,
382 )
383 
384 
385 # Track DNN workflows
387  def setup_(self, step, stepName, stepDict, k, properties):
388  stepDict[stepName][k] = merge([{'--procModifiers': 'trackdnn'}, stepDict[step][k]])
389 
390  def condition(self, fragment, stepList, key, hasHarvest):
391  return fragment=="TTbar_14TeV" and '2021' in key
392 upgradeWFs['trackdnn'] = UpgradeWorkflow_trackdnn(
393  steps = [
394  'Reco',
395  'RecoNano',
396  ],
397  PU = [
398  'Reco',
399  'RecoNano',
400  ],
401  suffix = '_trackdnn',
402  offset = 0.91,
403 )
404 
405 
406 # MLPF workflows
408  def setup_(self, step, stepName, stepDict, k, properties):
409  if 'Reco' in step:
410  stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
411  def condition(self, fragment, stepList, key, hasHarvest):
412  return fragment=="TTbar_14TeV" and '2021' in key
413 
414 upgradeWFs['mlpf'] = UpgradeWorkflow_mlpf(
415  steps = [
416  'Reco',
417  'RecoNano',
418  ],
419  PU = [
420  'Reco',
421  'RecoNano',
422  ],
423  suffix = '_mlpf',
424  offset = 0.13,
425 )
426 upgradeWFs['mlpf'].step3 = {
427  '--datatier': 'GEN-SIM-RECO,RECOSIM,MINIAODSIM,NANOAODSIM,DQMIO',
428  '--eventcontent': 'FEVTDEBUGHLT,RECOSIM,MINIAODSIM,NANOEDMAODSIM,DQM',
429  '--procModifiers': 'mlpf'
430 }
431 
432 # Patatrack workflows:
433 # - 2018 conditions, TTbar
434 # - 2018 conditions, Z->mumu,
435 # - 2021 conditions, TTbar
436 # - 2021 conditions, Z->mumu,
438  def __init__(self, digi = {}, reco = {}, harvest = {}, **kwargs):
439  # adapt the parameters for the UpgradeWorkflow init method
440  super(PatatrackWorkflow, self).__init__(
441  steps = [
442  'Digi',
443  'DigiTrigger',
444  'Reco',
445  'HARVEST',
446  'RecoFakeHLT',
447  'HARVESTFakeHLT',
448  'RecoGlobal',
449  'HARVESTGlobal',
450  'RecoNano',
451  'HARVESTNano',
452  'Nano',
453  'ALCA',
454  ],
455  PU = [],
456  **kwargs)
457  self.__digi = digi
458  self.__reco = reco
459  self.__reco.update({
460  '--datatier': 'GEN-SIM-RECO,DQMIO',
461  '--eventcontent': 'RECOSIM,DQM'
462  })
463  self.__harvest = harvest
464 
465  def condition(self, fragment, stepList, key, hasHarvest):
466  # select only a subset of the workflows
467  selected = [
468  ('2018' in key and fragment == "TTbar_13"),
469  ('2021' in key and fragment == "TTbar_14TeV"),
470  ('2018' in key and fragment == "ZMM_13"),
471  ('2021' in key and fragment == "ZMM_14"),
472  ]
473  result = any(selected) and hasHarvest
474 
475  return result
476 
477  def setup_(self, step, stepName, stepDict, k, properties):
478  # skip ALCA and Nano steps (but not RecoNano or HARVESTNano for Run3)
479  if 'ALCA' in step or 'Nano'==step:
480  stepDict[stepName][k] = None
481  elif 'Digi' in step:
482  if self.__digi is None:
483  stepDict[stepName][k] = None
484  else:
485  stepDict[stepName][k] = merge([self.__digi, stepDict[step][k]])
486  elif 'Reco' in step:
487  if self.__reco is None:
488  stepDict[stepName][k] = None
489  else:
490  stepDict[stepName][k] = merge([self.__reco, stepDict[step][k]])
491  elif 'HARVEST' in step:
492  if self.__harvest is None:
493  stepDict[stepName][k] = None
494  else:
495  stepDict[stepName][k] = merge([self.__harvest, stepDict[step][k]])
496 
497 
498 upgradeWFs['PatatrackPixelOnlyCPU'] = PatatrackWorkflow(
499  digi = {
500  # there is no customisation for enabling the Patatrack pixel quadruplets running only on the CPU
501  },
502  reco = {
503  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
504  '--procModifiers': 'pixelNtupletFit'
505  },
506  harvest = {
507  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'
508  },
509  suffix = 'Patatrack_PixelOnlyCPU',
510  offset = 0.501,
511 )
512 
513 upgradeWFs['PatatrackPixelOnlyGPU'] = PatatrackWorkflow(
514  digi = {
515  '--procModifiers': 'gpu'
516  },
517  reco = {
518  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
519  '--procModifiers': 'pixelNtupletFit,gpu'
520  },
521  harvest = {
522  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'
523  },
524  suffix = 'Patatrack_PixelOnlyGPU',
525  offset = 0.502,
526 )
527 
528 # add here a .503 workflow for GPU vs CPU validation
529 
530 upgradeWFs['PatatrackPixelOnlyGPUProfiling'] = PatatrackWorkflow(
531  digi = {
532  '--procModifiers': 'gpu'
533  },
534  reco = {
535  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly',
536  '--procModifiers': 'pixelNtupletFit,gpu',
537  '--customise' : 'RecoTracker/Configuration/customizePixelOnlyForProfiling.customizePixelOnlyForProfilingGPUOnly'
538  },
539  harvest = None,
540  suffix = 'Patatrack_PixelOnlyGPU_Profiling',
541  offset = 0.504,
542 )
543 
544 upgradeWFs['PatatrackPixelOnlyTripletsCPU'] = PatatrackWorkflow(
545  digi = {
546  # there is no customisation for enabling the Patatrack pixel triplets running only on the CPU
547  },
548  reco = {
549  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
550  '--procModifiers': 'pixelNtupletFit',
551  '--customise' : 'RecoPixelVertexing/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets'
552  },
553  harvest = {
554  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'
555  },
556  suffix = 'Patatrack_PixelOnlyTripletsCPU',
557  offset = 0.505,
558 )
559 
560 upgradeWFs['PatatrackPixelOnlyTripletsGPU'] = PatatrackWorkflow(
561  digi = {
562  '--procModifiers': 'gpu',
563  '--customise': 'HLTrigger/Configuration/customizeHLTforPatatrack.enablePatatrackPixelTriplets'
564  },
565  reco = {
566  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
567  '--procModifiers': 'pixelNtupletFit,gpu',
568  '--customise': 'RecoPixelVertexing/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets'
569  },
570  harvest = {
571  '-s': 'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'
572  },
573  suffix = 'Patatrack_PixelOnlyTripletsGPU',
574  offset = 0.506,
575 )
576 
577 # add here a .507 workflow for GPU vs CPU validation
578 
579 upgradeWFs['PatatrackPixelOnlyTripletsGPUProfiling'] = PatatrackWorkflow(
580  digi = {
581  '--procModifiers': 'gpu',
582  '--customise': 'HLTrigger/Configuration/customizeHLTforPatatrack.enablePatatrackPixelTriplets'
583  },
584  reco = {
585  '-s': 'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly',
586  '--procModifiers': 'pixelNtupletFit,gpu',
587  '--customise': 'RecoPixelVertexing/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets,RecoTracker/Configuration/customizePixelOnlyForProfiling.customizePixelOnlyForProfilingGPUOnly'
588  },
589  harvest = None,
590  suffix = 'Patatrack_PixelOnlyTripletsGPU_Profiling',
591  offset = 0.508,
592 )
593 
594 upgradeWFs['PatatrackECALOnlyCPU'] = PatatrackWorkflow(
595  reco = {
596  '-s': 'RAW2DIGI:RawToDigi_ecalOnly,RECO:reconstruction_ecalOnly,VALIDATION:@ecalOnlyValidation,DQM:@ecalOnly',
597  },
598  harvest = {
599  '-s': 'HARVESTING:@ecalOnlyValidation+@ecal'
600  },
601  suffix = 'Patatrack_ECALOnlyCPU',
602  offset = 0.511,
603 )
604 
605 upgradeWFs['PatatrackECALOnlyGPU'] = PatatrackWorkflow(
606  digi = {
607  '--procModifiers': 'gpu'
608  },
609  reco = {
610  '-s': 'RAW2DIGI:RawToDigi_ecalOnly,RECO:reconstruction_ecalOnly,VALIDATION:@ecalOnlyValidation,DQM:@ecalOnly',
611  '--procModifiers': 'gpu'
612  },
613  harvest = {
614  '-s': 'HARVESTING:@ecalOnlyValidation+@ecal'
615  },
616  suffix = 'Patatrack_ECALOnlyGPU',
617  offset = 0.512,
618 )
619 
620 # add here a .513 workflow for GPU vs CPU validation
621 
622 upgradeWFs['PatatrackECALOnlyGPUProfiling'] = PatatrackWorkflow(
623  digi = {
624  '--procModifiers': 'gpu'
625  },
626  reco = {
627  '-s': 'RAW2DIGI:RawToDigi_ecalOnly,RECO:reconstruction_ecalOnly',
628  '--procModifiers': 'gpu',
629  '--customise' : 'RecoLocalCalo/Configuration/customizeEcalOnlyForProfiling.customizeEcalOnlyForProfilingGPUOnly'
630  },
631  harvest = None,
632  suffix = 'Patatrack_ECALOnlyGPU_Profiling',
633  offset = 0.514,
634 )
635 
636 upgradeWFs['PatatrackHCALOnlyCPU'] = PatatrackWorkflow(
637  reco = {
638  '-s': 'RAW2DIGI:RawToDigi_hcalOnly,RECO:reconstruction_hcalOnly,VALIDATION:@hcalOnlyValidation,DQM:@hcalOnly+@hcal2Only',
639  },
640  harvest = {
641  '-s': 'HARVESTING:@hcalOnlyValidation+@hcalOnly+@hcal2Only'
642  },
643  suffix = 'Patatrack_HCALOnlyCPU',
644  offset = 0.521,
645 )
646 
647 upgradeWFs['PatatrackHCALOnlyGPU'] = PatatrackWorkflow(
648  digi = {
649  '--procModifiers': 'gpu'
650  },
651  reco = {
652  '-s': 'RAW2DIGI:RawToDigi_hcalOnly,RECO:reconstruction_hcalOnly,VALIDATION:@hcalOnlyValidation,DQM:@hcalOnly+@hcal2Only',
653  '--procModifiers': 'gpu'
654  },
655  harvest = {
656  '-s': 'HARVESTING:@hcalOnlyValidation+@hcalOnly+@hcal2Only'
657  },
658  suffix = 'Patatrack_HCALOnlyGPU',
659  offset = 0.522,
660 )
661 
662 # add here a .523 workflow for GPU vs CPU validation
663 
664 upgradeWFs['PatatrackHCALOnlyGPUProfiling'] = PatatrackWorkflow(
665  digi = {
666  '--procModifiers': 'gpu'
667  },
668  reco = {
669  '-s': 'RAW2DIGI:RawToDigi_hcalOnly,RECO:reconstruction_hcalOnly',
670  '--procModifiers': 'gpu',
671  '--customise' : 'RecoLocalCalo/Configuration/customizeHcalOnlyForProfiling.customizeHcalOnlyForProfilingGPUOnly'
672  },
673  harvest = None,
674  suffix = 'Patatrack_HCALOnlyGPU_Profiling',
675  offset = 0.524,
676 )
677 
678 upgradeWFs['PatatrackCPU'] = PatatrackWorkflow(
679  digi = {
680  # there is no customisation for enabling the Patatrack pixel quadruplets running only on the CPU
681  },
682  reco = {
683  # skip the @pixelTrackingOnlyValidation which cannot run together with the full reconstruction
684  '-s': 'RAW2DIGI:RawToDigi+RawToDigi_pixelOnly,L1Reco,RECO:reconstruction+reconstruction_pixelTrackingOnly,RECOSIM,EI,PAT,VALIDATION:@standardValidation+@miniAODValidation,DQM:@standardDQM+@ExtraHLT+@miniAODDQM+@pixelTrackingOnlyDQM',
685  '--procModifiers': 'pixelNtupletFit'
686  },
687  harvest = {
688  },
689  suffix = 'Patatrack_CPU',
690  offset = 0.591,
691 )
692 
693 upgradeWFs['PatatrackGPU'] = PatatrackWorkflow(
694  digi = {
695  '--procModifiers': 'gpu'
696  },
697  reco = {
698  # skip the @pixelTrackingOnlyValidation which cannot run together with the full reconstruction
699  '-s': 'RAW2DIGI:RawToDigi+RawToDigi_pixelOnly,L1Reco,RECO:reconstruction+reconstruction_pixelTrackingOnly,RECOSIM,EI,PAT,VALIDATION:@standardValidation+@miniAODValidation,DQM:@standardDQM+@ExtraHLT+@miniAODDQM+@pixelTrackingOnlyDQM',
700  '--procModifiers': 'pixelNtupletFit,gpu'
701  },
702  harvest = {
703  },
704  suffix = 'Patatrack_GPU',
705  offset = 0.592,
706 )
707 
708 upgradeWFs['PatatrackTripletsCPU'] = PatatrackWorkflow(
709  digi = {
710  # there is no customisation for enabling the Patatrack pixel triplets running only on the CPU
711  },
712  reco = {
713  # skip the @pixelTrackingOnlyValidation which cannot run together with the full reconstruction
714  '-s': 'RAW2DIGI:RawToDigi+RawToDigi_pixelOnly,L1Reco,RECO:reconstruction+reconstruction_pixelTrackingOnly,RECOSIM,EI,PAT,VALIDATION:@standardValidation+@miniAODValidation,DQM:@standardDQM+@ExtraHLT+@miniAODDQM+@pixelTrackingOnlyDQM',
715  '--procModifiers': 'pixelNtupletFit',
716  '--customise' : 'RecoPixelVertexing/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets'
717  },
718  harvest = {
719  },
720  suffix = 'Patatrack_TripletsCPU',
721  offset = 0.595,
722 )
723 
724 upgradeWFs['PatatrackTripletsGPU'] = PatatrackWorkflow(
725  digi = {
726  '--procModifiers': 'gpu',
727  '--customise': 'HLTrigger/Configuration/customizeHLTforPatatrack.enablePatatrackPixelTriplets'
728  },
729  reco = {
730  # skip the @pixelTrackingOnlyValidation which cannot run together with the full reconstruction
731  '-s': 'RAW2DIGI:RawToDigi+RawToDigi_pixelOnly,L1Reco,RECO:reconstruction+reconstruction_pixelTrackingOnly,RECOSIM,EI,PAT,VALIDATION:@standardValidation+@miniAODValidation,DQM:@standardDQM+@ExtraHLT+@miniAODDQM+@pixelTrackingOnlyDQM',
732  '--procModifiers': 'pixelNtupletFit,gpu',
733  '--customise': 'RecoPixelVertexing/Configuration/customizePixelTracksForTriplets.customizePixelTracksForTriplets'
734  },
735  harvest = {
736  },
737  suffix = 'Patatrack_TripletsGPU',
738  offset = 0.596,
739 )
740 
741 # end of Patatrack workflows
742 
744  def setup_(self, step, stepName, stepDict, k, properties):
745  if 'GenSimHLBeamSpot14' in step:
746  stepDict[stepName][k] = merge([{'--eventcontent': 'RAWSIM', '--datatier': 'GEN-SIM'},stepDict[step][k]])
747  elif 'Digi' in step and 'Trigger' not in step:
748  stepDict[stepName][k] = merge([{'-s': 'DIGI,L1,DIGI2RAW,HLT:@relval2021', '--datatier':'GEN-SIM-RAW', '--eventcontent':'RAWSIM'}, stepDict[step][k]])
749  elif 'DigiTrigger' in step: # for Phase-2
750  stepDict[stepName][k] = merge([{'-s': 'DIGI,L1TrackTrigger,L1,DIGI2RAW,HLT:@fake2', '--datatier':'GEN-SIM-RAW', '--eventcontent':'RAWSIM'}, stepDict[step][k]])
751  elif 'Reco' in step:
752  stepDict[stepName][k] = merge([{'-s': 'RAW2DIGI,L1Reco,RECO,RECOSIM', '--datatier':'AODSIM', '--eventcontent':'AODSIM'}, stepDict[step][k]])
753  elif 'MiniAOD' in step:
754  # the separate miniAOD step is used here
755  stepDict[stepName][k] = deepcopy(stepDict[step][k])
756  elif 'ALCA' in step or 'HARVEST' in step:
757  # remove step
758  stepDict[stepName][k] = None
759  elif 'Nano'==step:
760  stepDict[stepName][k] = merge([{'--filein':'file:step4.root','-s':'NANO','--datatier':'NANOAODSIM','--eventcontent':'NANOEDMAODSIM'}, stepDict[step][k]])
761  def condition(self, fragment, stepList, key, hasHarvest):
762  return fragment=="TTbar_14TeV" and ('2026' in key or '2021' in key)
763 upgradeWFs['ProdLike'] = UpgradeWorkflow_ProdLike(
764  steps = [
765  'GenSimHLBeamSpot14',
766  'Digi',
767  'DigiTrigger',
768  'Reco',
769  'RecoGlobal',
770  'RecoNano',
771  'HARVEST',
772  'HARVESTGlobal',
773  'HARVESTNano',
774  'MiniAOD',
775  'ALCA',
776  'Nano',
777  ],
778  PU = [
779  'GenSimHLBeamSpot14',
780  'Digi',
781  'DigiTrigger',
782  'Reco',
783  'RecoGlobal',
784  'RecoNano',
785  'HARVEST',
786  'HARVESTGlobal',
787  'HARVESTNano',
788  'MiniAOD',
789  'ALCA',
790  'Nano',
791  ],
792  suffix = '_ProdLike',
793  offset = 0.21,
794 )
795 
797  def setup_(self, step, stepName, stepDict, k, properties):
798  if 'GenSim' in step:
799  custNew = "SimG4Core/Application/NeutronBGforMuonsXS_cff.customise"
800  else:
801  custNew = "SLHCUpgradeSimulations/Configuration/customise_mixing.customise_Mix_LongLived_Neutrons"
802  stepDict[stepName][k] = deepcopy(stepDict[step][k])
803  if '--customise' in stepDict[stepName][k].keys():
804  stepDict[stepName][k]['--customise'] += ","+custNew
805  else:
806  stepDict[stepName][k]['--customise'] = custNew
807  def condition(self, fragment, stepList, key, hasHarvest):
808  return any(fragment==nfrag for nfrag in self.neutronFrags) and any(nkey in key for nkey in self.neutronKeys)
809 upgradeWFs['Neutron'] = UpgradeWorkflow_Neutron(
810  steps = [
811  'GenSim',
812  'GenSimHLBeamSpot',
813  'GenSimHLBeamSpot14',
814  'Digi',
815  'DigiTrigger',
816  ],
817  PU = [
818  'Digi',
819  'DigiTrigger',
820  ],
821  suffix = '_Neutron',
822  offset = 0.12,
823 )
824 # add some extra info
825 upgradeWFs['Neutron'].neutronKeys = [x for x in upgradeKeys[2026] if 'PU' not in x]
826 upgradeWFs['Neutron'].neutronFrags = ['ZMM_14','MinBias_14TeV']
827 
829  def setup_(self, step, stepName, stepDict, k, properties):
830  stepDict[stepName][k] = merge([{'--procModifiers': 'run2_HECollapse_2018'}, stepDict[step][k]])
831  def condition(self, fragment, stepList, key, hasHarvest):
832  return fragment=="TTbar_13" and '2018' in key
833 upgradeWFs['heCollapse'] = UpgradeWorkflow_heCollapse(
834  steps = [
835  'GenSim',
836  'Digi',
837  'Reco',
838  'HARVEST',
839  'ALCA',
840  ],
841  PU = [
842  'Digi',
843  'Reco',
844  'HARVEST',
845  ],
846  suffix = '_heCollapse',
847  offset = 0.6,
848 )
849 
851  def setup_(self, step, stepName, stepDict, k, properties):
852  # temporarily remove trigger & downstream steps
853  mods = {'--era': stepDict[step][k]['--era']+',phase2_ecal_devel'}
854  if 'Digi' in step:
855  mods['-s'] = 'DIGI:pdigi_valid'
856  stepDict[stepName][k] = merge([mods, stepDict[step][k]])
857  def condition(self, fragment, stepList, key, hasHarvest):
858  return fragment=="TTbar_14TeV" and '2026' in key
859 upgradeWFs['ecalDevel'] = UpgradeWorkflow_ecalDevel(
860  steps = [
861  'DigiTrigger',
862  'RecoGlobal',
863  'HARVESTGlobal',
864  ],
865  PU = [
866  'DigiTrigger',
867  'RecoGlobal',
868  'HARVESTGlobal',
869  ],
870  suffix = '_ecalDevel',
871  offset = 0.61,
872 )
873 
875  def setup_(self, step, stepName, stepDict, k, properties):
876  myGT=stepDict[step][k]['--conditions']
877  myGT+="_0T"
878  stepDict[stepName][k] = merge([{'-n':'1','--magField':'0T','--conditions':myGT}, stepDict[step][k]])
879  def condition(self, fragment, stepList, key, hasHarvest):
880  return (fragment=="TTbar_13" or fragment=="TTbar_14TeV") and ('2017' in key or '2018' in key or '2021' in key)
881 upgradeWFs['0T'] = UpgradeWorkflow_0T(
882  steps = [
883  'GenSim',
884  'Digi',
885  'Reco',
886  'HARVEST',
887  'RecoNano',
888  'HARVESTNano',
889  'ALCA',
890  ],
891  PU = [
892  'Digi',
893  'Reco',
894  'HARVEST',
895  'RecoNano',
896  'HARVESTNano',
897  ],
898  suffix = '_0T',
899  offset = 0.24,
900 )
901 
903  def setup_(self, step, stepName, stepDict, k, properties):
904  if 'Reco' in step and 'Run2_2018' in stepDict[step][k]['--era']:
905  stepDict[stepName][k] = merge([{'--era': 'Run2_2018,bParking'}, stepDict[step][k]])
906  def condition(self, fragment, stepList, key, hasHarvest):
907  return fragment=="TTbar_13" and '2018' in key
908 upgradeWFs['ParkingBPH'] = UpgradeWorkflow_ParkingBPH(
909  steps = [
910  'Reco',
911  ],
912  PU = [],
913  suffix = '_ParkingBPH',
914  offset = 0.8,
915 )
916 
918  def setup_(self, step, stepName, stepDict, k, properties):
919  if 'Nano' in step:
920  stepDict[stepName][k] = merge([{'--customise': 'PhysicsTools/NanoAOD/custom_jme_cff.PrepJMECustomNanoAOD_MC'}, stepDict[step][k]])
921  def condition(self, fragment, stepList, key, hasHarvest):
922  return fragment=="TTbar_13" and ('2017' in key or '2018' in key)
923 upgradeWFs['JMENano'] = UpgradeWorkflow_JMENano(
924  steps = [
925  'Nano',
926  ],
927  PU = [],
928  suffix = '_JMENano',
929  offset = 0.15,
930 )
931 
932 
933 # common operations for aging workflows
935  def setup_(self, step, stepName, stepDict, k, properties):
936  if 'Digi' in step or 'Reco' in step:
937  stepDict[stepName][k] = merge([{'--customise': 'SLHCUpgradeSimulations/Configuration/aging.customise_aging_'+self.lumi}, stepDict[step][k]])
938  def condition(self, fragment, stepList, key, hasHarvest):
939  return fragment=="TTbar_14TeV" and '2026' in key
940 # define several of them
941 upgradeWFs['Aging1000'] = UpgradeWorkflowAging(
942  steps = [
943  'Digi',
944  'DigiTrigger',
945  'RecoLocal',
946  'Reco',
947  'RecoGlobal',
948  ],
949  PU = [
950  'Digi',
951  'DigiTrigger',
952  'RecoLocal',
953  'Reco',
954  'RecoGlobal',
955  ],
956  suffix = 'Aging1000',
957  offset = 0.101,
958 )
959 upgradeWFs['Aging1000'].lumi = '1000'
960 upgradeWFs['Aging3000'] = deepcopy(upgradeWFs['Aging1000'])
961 upgradeWFs['Aging3000'].suffix = 'Aging3000'
962 upgradeWFs['Aging3000'].offset = 0.103
963 upgradeWFs['Aging3000'].lumi = '3000'
964 
965 # Specifying explicitly the --filein is not nice but that was the
966 # easiest way to "skip" the output of step2 (=premixing stage1) for
967 # filein (as it goes to pileup_input). It works (a bit accidentally
968 # though) also for "-i all" because in that case the --filein for DAS
969 # input is after this one in the list of command line arguments to
970 # cmsDriver, and gets then used in practice.
971 digiPremixLocalPileup = {
972  "--filein": "file:step1.root",
973  "--pileup_input": "file:step2.root"
974 }
975 
976 # for premix
978  def setup_(self, step, stepName, stepDict, k, properties):
979  # just copy steps
980  stepDict[stepName][k] = merge([stepDict[step][k]])
981  def setupPU_(self, step, stepName, stepDict, k, properties):
982  # setup for stage 1
983  if "GenSim" in stepName:
984  stepNamePmx = stepName.replace('GenSim','Premix')
985  if not stepNamePmx in stepDict: stepDict[stepNamePmx] = {}
986  stepDict[stepNamePmx][k] = merge([
987  {
988  '-s': 'GEN,SIM,DIGI:pdigi_valid',
989  '--datatier': 'PREMIX',
990  '--eventcontent': 'PREMIX',
991  '--procModifiers': 'premix_stage1'
992  },
993  stepDict[stepName][k]
994  ])
995  if "ProdLike" in self.suffix:
996  stepDict[stepNamePmx][k] = merge([{'-s': 'GEN,SIM,DIGI'},stepDict[stepNamePmx][k]])
997  # setup for stage 2
998  elif "Digi" in step or "Reco" in step:
999  # go back to non-PU step version
1000  d = merge([stepDict[self.getStepName(step)][k]])
1001  if d is None: return
1002  if "Digi" in step:
1003  tmpsteps = []
1004  for s in d["-s"].split(","):
1005  if s == "DIGI" or "DIGI:" in s:
1006  tmpsteps.extend([s, "DATAMIX"])
1007  else:
1008  tmpsteps.append(s)
1009  d = merge([{"-s" : ",".join(tmpsteps),
1010  "--datamix" : "PreMix",
1011  "--procModifiers": "premix_stage2"},
1012  d])
1013  # for combined stage1+stage2
1014  if "_PMXS1S2" in self.suffix:
1015  d = merge([digiPremixLocalPileup, d])
1016  elif "Reco" in step:
1017  if "--procModifiers" in d:
1018  d["--procModifiers"] += ",premix_stage2"
1019  else:
1020  d["--procModifiers"] = "premix_stage2"
1021  stepDict[stepName][k] = d
1022  # Increase the input file step number by one for Nano in combined stage1+stage2
1023  elif "Nano"==step:
1024  # go back to non-PU step version
1025  d = merge([stepDict[self.getStepName(step)][k]])
1026  if "--filein" in d:
1027  filein = d["--filein"]
1028  m = re.search("step(?P<ind>\d+)_", filein)
1029  if m:
1030  d["--filein"] = filein.replace(m.group(), "step%d_"%(int(m.group("ind"))+1))
1031  stepDict[stepName][k] = d
1032  # run2/3 WFs use Nano (not NanoPU) in PU WF
1033  stepDict[self.getStepName(step)][k] = merge([d])
1034  def condition(self, fragment, stepList, key, hasHarvest):
1035  if not 'PU' in key:
1036  return False
1037  if not any(y in key for y in ['2021', '2023', '2024', '2026']):
1038  return False
1039  if self.suffix.endswith("S1"):
1040  return "NuGun" in fragment
1041  return True
1042  def workflow_(self, workflows, num, fragment, stepList, key):
1043  fragmentTmp = fragment
1044  if self.suffix.endswith("S1"):
1045  fragmentTmp = 'PREMIXUP' + key[2:].replace("PU", "").replace("Design", "") + '_PU25'
1046  super(UpgradeWorkflowPremix,self).workflow_(workflows, num, fragmentTmp, stepList, key)
1047 # Premix stage1
1048 upgradeWFs['PMXS1'] = UpgradeWorkflowPremix(
1049  steps = [
1050  ],
1051  PU = [
1052  'GenSim',
1053  'GenSimHLBeamSpot',
1054  'GenSimHLBeamSpot14',
1055  ],
1056  suffix = '_PMXS1',
1057  offset = 0.97,
1058 )
1059 # Premix stage2
1060 upgradeWFs['PMXS2'] = UpgradeWorkflowPremix(
1061  steps = [],
1062  PU = [
1063  'Digi',
1064  'DigiTrigger',
1065  'RecoLocal',
1066  'Reco',
1067  'RecoGlobal',
1068  'RecoNano',
1069  'Nano',
1070  ],
1071  suffix = '_PMXS2',
1072  offset = 0.98,
1073 )
1074 # Premix combined stage1+stage2
1075 upgradeWFs['PMXS1S2'] = UpgradeWorkflowPremix(
1076  steps = [],
1077  PU = [
1078  'GenSim',
1079  'GenSimHLBeamSpot',
1080  'GenSimHLBeamSpot14',
1081  'Digi',
1082  'DigiTrigger',
1083  'RecoLocal',
1084  'Reco',
1085  'RecoGlobal',
1086  'RecoNano',
1087  'Nano',
1088  ],
1089  suffix = '_PMXS1S2',
1090  offset = 0.99,
1091 )
1092 # Alternative version of above w/ less PU for PR tests
1094  def setupPU_(self, step, stepName, stepDict, k, properties):
1095  # adjust first, so it gets copied into new Premix step
1096  if '--pileup' in stepDict[stepName][k]:
1097  stepDict[stepName][k]['--pileup'] = 'AVE_50_BX_25ns_m3p3'
1098  super(UpgradeWorkflowAdjustPU,self).setupPU_(step, stepName, stepDict, k, properties)
1099  def condition(self, fragment, stepList, key, hasHarvest):
1100  # restrict to phase2
1101  return super(UpgradeWorkflowAdjustPU,self).condition(fragment, stepList, key, hasHarvest) and '2026' in key
1102 upgradeWFs['PMXS1S2PR'] = UpgradeWorkflowAdjustPU(
1103  steps = [],
1104  PU = [
1105  'GenSim',
1106  'GenSimHLBeamSpot',
1107  'GenSimHLBeamSpot14',
1108  'Digi',
1109  'DigiTrigger',
1110  'RecoLocal',
1111  'Reco',
1112  'RecoGlobal',
1113  'Nano',
1114  'HARVEST',
1115  'HARVESTGlobal',
1116  ],
1117  suffix = '_PMXS1S2PR',
1118  offset = 0.999,
1119 )
1120 
1122  def setup_(self, step, stepName, stepDict, k, properties):
1123  # copy steps, then apply specializations
1124  UpgradeWorkflowPremix.setup_(self, step, stepName, stepDict, k, properties)
1125  UpgradeWorkflow_ProdLike.setup_(self, step, stepName, stepDict, k, properties)
1126  #
1127  if 'Digi' in step:
1128  d = merge([stepDict[self.getStepName(step)][k]])
1129  tmpsteps = []
1130  for s in d["-s"].split(","):
1131  if "DIGI:pdigi_valid" in s:
1132  tmpsteps.append("DIGI")
1133  else:
1134  tmpsteps.append(s)
1135  d = merge([{"-s" : ",".join(tmpsteps),
1136  "--eventcontent": "PREMIXRAW"},
1137  d])
1138  stepDict[stepName][k] = d
1139  if 'Nano'==step:
1140  stepDict[stepName][k] = merge([{'--filein':'file:step5.root','-s':'NANO','--datatier':'NANOAODSIM','--eventcontent':'NANOEDMAODSIM'}, stepDict[step][k]])
1141  def condition(self, fragment, stepList, key, hasHarvest):
1142  # use both conditions
1143  return UpgradeWorkflowPremix.condition(self, fragment, stepList, key, hasHarvest) and UpgradeWorkflow_ProdLike.condition(self, fragment, stepList, key, hasHarvest)
1144 # premix stage2
1145 upgradeWFs['PMXS2ProdLike'] = UpgradeWorkflowPremixProdLike(
1146  steps = [],
1147  PU = [
1148  'Digi',
1149  'DigiTrigger',
1150  'RecoLocal',
1151  'Reco',
1152  'RecoGlobal',
1153  'RecoNano',
1154  'Nano',
1155  'HARVEST',
1156  'HARVESTGlobal',
1157  'HARVESTNano',
1158  'MiniAOD',
1159  'ALCA',
1160  ],
1161  suffix = '_PMXS2ProdLike',
1162  offset = 0.9821,
1163 )
1164 # premix combined stage1+stage2
1165 upgradeWFs['PMXS1S2ProdLike'] = UpgradeWorkflowPremixProdLike(
1166  steps = [],
1167  PU = [
1168  'GenSim',
1169  'GenSimHLBeamSpot',
1170  'GenSimHLBeamSpot14',
1171  'Digi',
1172  'DigiTrigger',
1173  'RecoLocal',
1174  'Reco',
1175  'RecoGlobal',
1176  'RecoNano',
1177  'Nano',
1178  'HARVEST',
1179  'HARVESTGlobal',
1180  'HARVESTNano',
1181  'MiniAOD',
1182  'ALCA',
1183  ],
1184  suffix = '_PMXS1S2ProdLike',
1185  offset = 0.9921,
1186 )
1187 
1189  def setup_(self, step, stepName, stepDict, k, properties):
1190  if 'Run3' in stepDict[step][k]['--era']:
1191  stepDict[stepName][k] = merge([{'--geometry': 'DD4hepExtended2021'}, stepDict[step][k]])
1192  elif 'Phase2' in stepDict[step][k]['--era']:
1193  dd4hepGeom="DD4hep"
1194  dd4hepGeom+=stepDict[step][k]['--geometry']
1195  stepDict[stepName][k] = merge([{'--geometry' : dd4hepGeom, '--procModifiers': 'dd4hep'}, stepDict[step][k]])
1196  def condition(self, fragment, stepList, key, hasHarvest):
1197  return '2021' in key or '2026' in key
1198 upgradeWFs['DD4hep'] = UpgradeWorkflow_DD4hep(
1199  steps = [
1200  'GenSim',
1201  'GenSimHLBeamSpot',
1202  'GenSimHLBeamSpot14',
1203  'Digi',
1204  'DigiTrigger',
1205  'Reco',
1206  'RecoGlobal',
1207  'RecoNano',
1208  'HARVEST',
1209  'HARVESTGlobal',
1210  'HARVESTNano',
1211  'ALCA',
1212  ],
1213  PU = [],
1214  suffix = '_DD4hep',
1215  offset = 0.911,
1216 )
1217 upgradeWFs['DD4hep'].allowReuse = False
1218 
1219 #This workflow is now obsolete, it becomes default for Run-3.
1220 #Keep it for future use in Phase-2, then delete
1222  def setup_(self, step, stepName, stepDict, k, properties):
1223  if 'Run3' in stepDict[step][k]['--era']:
1224  stepDict[stepName][k] = merge([{'--conditions': 'auto:phase1_2021_realistic', '--geometry': 'DB:Extended'}, stepDict[step][k]])
1225  def condition(self, fragment, stepList, key, hasHarvest):
1226  return '2021' in key
1227 upgradeWFs['DD4hepDB'] = UpgradeWorkflow_DD4hepDB(
1228  steps = [
1229  'GenSim',
1230  'GenSimHLBeamSpot',
1231  'GenSimHLBeamSpot14',
1232  'Digi',
1233  'DigiTrigger',
1234  'Reco',
1235  'RecoGlobal',
1236  'RecoNano',
1237  'HARVEST',
1238  'HARVESTGlobal',
1239  'HARVESTNano',
1240  'ALCA',
1241  ],
1242  PU = [],
1243  suffix = '_DD4hepDB',
1244  offset = 0.912,
1245 )
1246 upgradeWFs['DD4hepDB'].allowReuse = False
1247 
1249  def setup_(self, step, stepName, stepDict, k, properties):
1250  if 'Run3' in stepDict[step][k]['--era']:
1251  # retain any other eras
1252  tmp_eras = stepDict[step][k]['--era'].split(',')
1253  tmp_eras[tmp_eras.index("Run3")] = 'Run3_DDD'
1254  tmp_eras = ','.join(tmp_eras)
1255  stepDict[stepName][k] = merge([{'--conditions': 'auto:phase1_2021_realistic_ddd', '--geometry': 'DB:Extended', '--era': tmp_eras}, stepDict[step][k]])
1256  def condition(self, fragment, stepList, key, hasHarvest):
1257  return '2021' in key
1258 upgradeWFs['DDDDB'] = UpgradeWorkflow_DDDDB(
1259  steps = [
1260  'GenSim',
1261  'GenSimHLBeamSpot',
1262  'GenSimHLBeamSpot14',
1263  'Digi',
1264  'DigiTrigger',
1265  'Reco',
1266  'RecoGlobal',
1267  'RecoNano',
1268  'HARVEST',
1269  'HARVESTGlobal',
1270  'HARVESTNano',
1271  'ALCA',
1272  ],
1273  PU = [],
1274  suffix = '_DDDDB',
1275  offset = 0.914,
1276 )
1277 upgradeWFs['DDDDB'].allowReuse = False
1278 
1280  def setup_(self, step, stepName, stepDict, k, properties):
1281  stepDict[stepName][k] = merge([{'--procModifiers': 'allSonicTriton'}, stepDict[step][k]])
1282  def condition(self, fragment, stepList, key, hasHarvest):
1283  return (fragment=='TTbar_13' and '2021' in key) \
1284  or (fragment=='TTbar_14TeV' and '2026' in key)
1285 upgradeWFs['SonicTriton'] = UpgradeWorkflow_SonicTriton(
1286  steps = [
1287  'GenSim',
1288  'GenSimHLBeamSpot',
1289  'GenSimHLBeamSpot14',
1290  'Digi',
1291  'DigiTrigger',
1292  'Reco',
1293  'RecoGlobal',
1294  'RecoNano',
1295  'HARVEST',
1296  'HARVESTGlobal',
1297  'HARVESTNano',
1298  'ALCA',
1299  ],
1300  PU = [
1301  'GenSim',
1302  'GenSimHLBeamSpot',
1303  'GenSimHLBeamSpot14',
1304  'Digi',
1305  'DigiTrigger',
1306  'Reco',
1307  'RecoGlobal',
1308  'RecoNano',
1309  'HARVEST',
1310  'HARVESTGlobal',
1311  'HARVESTNano',
1312  'ALCA',
1313  ],
1314  suffix = '_SonicTriton',
1315  offset = 0.9001,
1316 )
1317 
1318 # check for duplicate offsets
1319 offsets = [specialWF.offset for specialType,specialWF in upgradeWFs.items()]
1320 seen = set()
1321 dups = set(x for x in offsets if x in seen or seen.add(x))
1322 if len(dups)>0:
1323  raise ValueError("Duplicate special workflow offsets not allowed: "+','.join([str(x) for x in dups]))
1324 
1325 upgradeProperties = {}
1326 
1327 upgradeProperties[2017] = {
1328  '2017' : {
1329  'Geom' : 'DB:Extended',
1330  'GT' : 'auto:phase1_2017_realistic',
1331  'HLTmenu': '@relval2017',
1332  'Era' : 'Run2_2017',
1333  'ScenToRun' : ['GenSim','Digi','RecoFakeHLT','HARVESTFakeHLT','ALCA','Nano'],
1334  },
1335  '2017Design' : {
1336  'Geom' : 'DB:Extended',
1337  'GT' : 'auto:phase1_2017_design',
1338  'HLTmenu': '@relval2017',
1339  'Era' : 'Run2_2017',
1340  'BeamSpot': 'GaussSigmaZ4cm',
1341  'ScenToRun' : ['GenSim','Digi','RecoFakeHLT','HARVESTFakeHLT'],
1342  },
1343  '2018' : {
1344  'Geom' : 'DB:Extended',
1345  'GT' : 'auto:phase1_2018_realistic',
1346  'HLTmenu': '@relval2018',
1347  'Era' : 'Run2_2018',
1348  'BeamSpot': 'Realistic25ns13TeVEarly2018Collision',
1349  'ScenToRun' : ['GenSim','Digi','RecoFakeHLT','HARVESTFakeHLT','ALCA','Nano'],
1350  },
1351  '2018Design' : {
1352  'Geom' : 'DB:Extended',
1353  'GT' : 'auto:phase1_2018_design',
1354  'HLTmenu': '@relval2018',
1355  'Era' : 'Run2_2018',
1356  'BeamSpot': 'GaussSigmaZ4cm',
1357  'ScenToRun' : ['GenSim','Digi','RecoFakeHLT','HARVESTFakeHLT'],
1358  },
1359  '2021' : {
1360  'Geom' : 'DB:Extended',
1361  'GT' : 'auto:phase1_2021_realistic',
1362  'HLTmenu': '@relval2021',
1363  'Era' : 'Run3',
1364  'BeamSpot': 'Run3RoundOptics25ns13TeVLowSigmaZ',
1365  'ScenToRun' : ['GenSim','Digi','RecoNano','HARVESTNano','ALCA'],
1366  },
1367  '2021Design' : {
1368  'Geom' : 'DB:Extended',
1369  'GT' : 'auto:phase1_2021_design',
1370  'HLTmenu': '@relval2021',
1371  'Era' : 'Run3',
1372  'BeamSpot': 'GaussSigmaZ4cm',
1373  'ScenToRun' : ['GenSim','Digi','RecoNano','HARVESTNano'],
1374  },
1375  '2023' : {
1376  'Geom' : 'DB:Extended',
1377  'GT' : 'auto:phase1_2023_realistic',
1378  'HLTmenu': '@relval2021',
1379  'Era' : 'Run3',
1380  'BeamSpot': 'Run3RoundOptics25ns13TeVLowSigmaZ',
1381  'ScenToRun' : ['GenSim','Digi','RecoNano','HARVESTNano','ALCA'],
1382  },
1383  '2024' : {
1384  'Geom' : 'DB:Extended',
1385  'GT' : 'auto:phase1_2024_realistic',
1386  'HLTmenu': '@relval2021',
1387  'Era' : 'Run3',
1388  'BeamSpot': 'Run3RoundOptics25ns13TeVLowSigmaZ',
1389  'ScenToRun' : ['GenSim','Digi','RecoNano','HARVESTNano','ALCA'],
1390  },
1391 }
1392 
1393 # standard PU sequences
1394 for key in list(upgradeProperties[2017].keys()):
1395  upgradeProperties[2017][key+'PU'] = deepcopy(upgradeProperties[2017][key])
1396  upgradeProperties[2017][key+'PU']['ScenToRun'] = ['GenSim','DigiPU'] + \
1397  (['RecoNanoPU','HARVESTNanoPU'] if '202' in key else ['RecoFakeHLTPU','HARVESTFakeHLTPU']) + \
1398  (['Nano'] if 'Nano' in upgradeProperties[2017][key]['ScenToRun'] else [])
1399 
1400 upgradeProperties[2026] = {
1401  '2026D49' : {
1402  'Geom' : 'Extended2026D49',
1403  'HLTmenu': '@fake2',
1404  'GT' : 'auto:phase2_realistic_T15',
1405  'Era' : 'Phase2C9',
1406  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1407  },
1408  '2026D60' : {
1409  'Geom' : 'Extended2026D60',
1410  'HLTmenu': '@fake2',
1411  'GT' : 'auto:phase2_realistic_T15',
1412  'Era' : 'Phase2C10',
1413  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1414  },
1415  '2026D68' : {
1416  'Geom' : 'Extended2026D68',
1417  'HLTmenu': '@fake2',
1418  'GT' : 'auto:phase2_realistic_T21',
1419  'Era' : 'Phase2C11',
1420  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1421  },
1422  '2026D70' : {
1423  'Geom' : 'Extended2026D70',
1424  'HLTmenu': '@fake2',
1425  'GT' : 'auto:phase2_realistic_T21',
1426  'Era' : 'Phase2C11',
1427  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1428  },
1429  '2026D76' : {
1430  'Geom' : 'Extended2026D76',
1431  'HLTmenu': '@fake2',
1432  'GT' : 'auto:phase2_realistic_T21',
1433  'Era' : 'Phase2C11I13M9',
1434  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1435  },
1436  '2026D77' : {
1437  'Geom' : 'Extended2026D77',
1438  'HLTmenu': '@fake2',
1439  'GT' : 'auto:phase2_realistic_T21',
1440  'Era' : 'Phase2C11I13M9',
1441  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1442  },
1443  '2026D78' : {
1444  'Geom' : 'Extended2026D78', # N.B.: Geometry with square 50x50 um2 pixels in the Inner Tracker.
1445  'HLTmenu': '@fake2',
1446  'GT' : 'auto:phase2_realistic_T22',
1447  'ProcessModifier': 'PixelCPEGeneric', # This swaps template reco CPE for generic reco CPE
1448  'Era' : 'Phase2C11I13T22M9', # customized for square pixels and Muon M9
1449  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1450  },
1451  '2026D79' : {
1452  'Geom' : 'Extended2026D79', # N.B.: Geometry with 3D pixels in the Inner Tracker.
1453  'HLTmenu': '@fake2',
1454  'GT' : 'auto:phase2_realistic_T23',
1455  'Era' : 'Phase2C11I13T23M9', # customizes for 3D Pixels and Muon M9
1456  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1457  },
1458  '2026D80' : {
1459  'Geom' : 'Extended2026D80', # N.B.: Geometry with 3D pixels in the Inner Tracker L1.
1460  'HLTmenu': '@fake2',
1461  'GT' : 'auto:phase2_realistic_T25',
1462  'Era' : 'Phase2C11I13T25M9', # customized for 3D pixels and Muon M9
1463  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1464  },
1465  '2026D81' : {
1466  'Geom' : 'Extended2026D81', # N.B.: Geometry with 3D pixels (TBPX,L1) and square 50x50 um2 pixels (TFPX+TEPX) in the Inner Tracker.
1467  'HLTmenu': '@fake2',
1468  'GT' : 'auto:phase2_realistic_T26',
1469  'Era' : 'Phase2C11I13T26M9', # customized for square pixels and Muon M9
1470  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1471  },
1472  '2026D82' : {
1473  'Geom' : 'Extended2026D82',
1474  'HLTmenu': '@fake2',
1475  'GT' : 'auto:phase2_realistic_T21',
1476  'Era' : 'Phase2C11I13M9',
1477  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1478  },
1479  '2026D83' : {
1480  'Geom' : 'Extended2026D83',
1481  'HLTmenu': '@fake2',
1482  'GT' : 'auto:phase2_realistic_T21',
1483  'Era' : 'Phase2C11I13M9',
1484  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1485  },
1486  '2026D84' : {
1487  'Geom' : 'Extended2026D84',
1488  'HLTmenu': '@fake2',
1489  'GT' : 'auto:phase2_realistic_T21',
1490  'Era' : 'Phase2C11',
1491  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1492  },
1493  '2026D85' : {
1494  'Geom' : 'Extended2026D85',
1495  'HLTmenu': '@fake2',
1496  'GT' : 'auto:phase2_realistic_T21',
1497  'Era' : 'Phase2C11I13M9',
1498  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1499  },
1500  '2026D86' : {
1501  'Geom' : 'Extended2026D86',
1502  'HLTmenu': '@fake2',
1503  'GT' : 'auto:phase2_realistic_T21',
1504  'Era' : 'Phase2C11I13M9',
1505  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1506  },
1507  '2026D87' : {
1508  'Geom' : 'Extended2026D87', # N.B.: Geometry with bricked pixels in the Inner Tracker (+others)
1509  'HLTmenu': '@fake2',
1510  'GT' : 'auto:phase2_realistic_T27',
1511  'Era' : 'Phase2C11I13T27M9', # customized for bricked pixels and Muon M9
1512  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1513  },
1514  '2026D88' : {
1515  'Geom' : 'Extended2026D88',
1516  'HLTmenu': '@fake2',
1517  'GT' : 'auto:phase2_realistic_T21',
1518  'Era' : 'Phase2C11I13M9',
1519  'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'],
1520  },
1521 }
1522 
1523 # standard PU sequences
1524 for key in list(upgradeProperties[2026].keys()):
1525  upgradeProperties[2026][key+'PU'] = deepcopy(upgradeProperties[2026][key])
1526  upgradeProperties[2026][key+'PU']['ScenToRun'] = ['GenSimHLBeamSpot','DigiTriggerPU','RecoGlobalPU', 'HARVESTGlobalPU']
1527 
1528 # for relvals
1529 defaultDataSets = {}
1530 for year in upgradeKeys:
1531  for key in upgradeKeys[year]:
1532  if 'PU' in key: continue
1533  defaultDataSets[key] = ''
1534 
1535 
1536 class UpgradeFragment(object):
1537  def __init__(self, howMuch, dataset):
1538  self.howMuch = howMuch
1539  self.dataset = dataset
1540 
1541 upgradeFragments = OrderedDict([
1542  ('FourMuPt_1_200_pythia8_cfi', UpgradeFragment(Kby(10,100),'FourMuPt1_200')),
1543  ('SingleElectronPt10_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleElectronPt10')),
1544  ('SingleElectronPt35_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleElectronPt35')),
1545  ('SingleElectronPt1000_pythia8_cfi', UpgradeFragment(Kby(9,50),'SingleElectronPt1000')),
1546  ('SingleGammaPt10_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleGammaPt10')),
1547  ('SingleGammaPt35_pythia8_cfi', UpgradeFragment(Kby(9,50),'SingleGammaPt35')),
1548  ('SingleMuPt1_pythia8_cfi', UpgradeFragment(Kby(25,100),'SingleMuPt1')),
1549  ('SingleMuPt10_Eta2p85_cfi', UpgradeFragment(Kby(9,100),'SingleMuPt10')),
1550  ('SingleMuPt100_Eta2p85_cfi', UpgradeFragment(Kby(9,100),'SingleMuPt100')),
1551  ('SingleMuPt1000_Eta2p85_cfi', UpgradeFragment(Kby(9,100),'SingleMuPt1000')),
1552  ('FourMuExtendedPt_1_200_pythia8_cfi', UpgradeFragment(Kby(10,100),'FourMuExtendedPt1_200')),
1553  ('TenMuExtendedE_0_200_pythia8_cfi', UpgradeFragment(Kby(10,100),'TenMuExtendedE_0_200')),
1554  ('DoubleElectronPt10Extended_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleElPt10Extended')),
1555  ('DoubleElectronPt35Extended_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleElPt35Extended')),
1556  ('DoubleElectronPt1000Extended_pythia8_cfi', UpgradeFragment(Kby(9,50),'SingleElPt1000Extended')),
1557  ('DoubleGammaPt10Extended_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleGammaPt10Extended')),
1558  ('DoubleGammaPt35Extended_pythia8_cfi', UpgradeFragment(Kby(9,50),'SingleGammaPt35Extended')),
1559  ('DoubleMuPt1Extended_pythia8_cfi', UpgradeFragment(Kby(25,100),'SingleMuPt1Extended')),
1560  ('DoubleMuPt10Extended_pythia8_cfi', UpgradeFragment(Kby(25,100),'SingleMuPt10Extended')),
1561  ('DoubleMuPt100Extended_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleMuPt100Extended')),
1562  ('DoubleMuPt1000Extended_pythia8_cfi', UpgradeFragment(Kby(9,100),'SingleMuPt1000Extended')),
1563  ('TenMuE_0_200_pythia8_cfi', UpgradeFragment(Kby(10,100),'TenMuE_0_200')),
1564  ('SinglePiE50HCAL_pythia8_cfi', UpgradeFragment(Kby(50,500),'SinglePiE50HCAL')),
1565  ('MinBias_13TeV_pythia8_TuneCUETP8M1_cfi', UpgradeFragment(Kby(90,100),'MinBias_13')),
1566  ('TTbar_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'TTbar_13')),
1567  ('ZEE_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'ZEE_13')),
1568  ('QCD_Pt_600_800_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'QCD_Pt_600_800_13')),
1569  ('Wjet_Pt_80_120_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'Wjet_Pt_80_120_14TeV')),
1570  ('Wjet_Pt_3000_3500_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'Wjet_Pt_3000_3500_14TeV')),
1571  ('LM1_sfts_14TeV_cfi', UpgradeFragment(Kby(9,100),'LM1_sfts_14TeV')),
1572  ('QCD_Pt_3000_3500_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'QCD_Pt_3000_3500_14TeV')),
1573  ('QCD_Pt_80_120_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'QCD_Pt_80_120_14TeV')),
1574  ('H200ChargedTaus_Tauola_14TeV_cfi', UpgradeFragment(Kby(9,100),'Higgs200ChargedTaus_14TeV')),
1575  ('JpsiMM_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(66,100),'JpsiMM_14TeV')),
1576  ('TTbar_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,100),'TTbar_14TeV')),
1577  ('WE_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'WE_14TeV')),
1578  ('ZTT_Tauola_All_hadronic_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,100),'ZTT_14TeV')),
1579  ('H130GGgluonfusion_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'H130GGgluonfusion_14TeV')),
1580  ('PhotonJet_Pt_10_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'PhotonJets_Pt_10_14TeV')),
1581  ('QQH1352T_Tauola_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'QQH1352T_Tauola_14TeV')),
1582  ('MinBias_14TeV_pythia8_TuneCP5_cfi', UpgradeFragment(Kby(90,100),'MinBias_14TeV')),
1583  ('WToMuNu_14TeV_TuneCP5_pythia8_cfi', UpgradeFragment(Kby(9,100),'WToMuNu_14TeV')),
1584  ('ZMM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(18,100),'ZMM_13')),
1585  ('QCDForPF_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(50,100),'QCD_FlatPt_15_3000HS_14')),
1586  ('DYToLL_M-50_14TeV_pythia8_cff', UpgradeFragment(Kby(9,100),'DYToLL_M_50_14TeV')),
1587  ('DYToTauTau_M-50_14TeV_pythia8_tauola_cff', UpgradeFragment(Kby(9,100),'DYtoTauTau_M_50_14TeV')),
1588  ('ZEE_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,100),'ZEE_14')),
1589  ('QCD_Pt_80_120_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,100),'QCD_Pt_80_120_13')),
1590  ('H125GGgluonfusion_13TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,50),'H125GGgluonfusion_13')),
1591  ('QCD_Pt20toInf_MuEnrichedPt15_14TeV_TuneCP5_cff', UpgradeFragment(Kby(19565, 217391),'QCD_Pt20toInfMuEnrichPt15_14')), # effi = 4.6e-4, local=8.000e-04
1592  ('ZMM_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(18,100),'ZMM_14')),
1593  ('QCD_Pt15To7000_Flat_14TeV_TuneCP5_cff', UpgradeFragment(Kby(9,50),'QCD_Pt15To7000_Flat_14')),
1594  ('H125GGgluonfusion_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,50),'H125GGgluonfusion_14')),
1595  ('QCD_Pt_600_800_14TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'QCD_Pt_600_800_14')),
1596  ('UndergroundCosmicSPLooseMu_cfi', UpgradeFragment(Kby(9,50),'CosmicsSPLoose')),
1597  ('BeamHalo_13TeV_cfi', UpgradeFragment(Kby(9,50),'BeamHalo_13')),
1598  ('H200ChargedTaus_Tauola_13TeV_cfi', UpgradeFragment(Kby(9,50),'Higgs200ChargedTaus_13')),
1599  ('ADDMonoJet_13TeV_d3MD3_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'ADDMonoJet_d3MD3_13')),
1600  ('ZpMM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'ZpMM_13')),
1601  ('QCD_Pt_3000_3500_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'QCD_Pt_3000_3500_13')),
1602  ('WpM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'WpM_13')),
1603  ('SingleNuE10_cfi', UpgradeFragment(Kby(9,50),'NuGun')),
1604  ('TTbarLepton_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'TTbarLepton_13')),
1605  ('WE_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'WE_13')),
1606  ('WM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'WM_13')),
1607  ('ZTT_All_hadronic_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'ZTT_13')),
1608  ('PhotonJet_Pt_10_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'PhotonJets_Pt_10_13')),
1609  ('QQH1352T_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'QQH1352T_13')),
1610  ('Wjet_Pt_80_120_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'Wjet_Pt_80_120_13')),
1611  ('Wjet_Pt_3000_3500_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'Wjet_Pt_3000_3500_13')),
1612  ('SMS-T1tttt_mGl-1500_mLSP-100_13TeV-pythia8_cfi', UpgradeFragment(Kby(9,50),'SMS-T1tttt_mGl-1500_mLSP-100_13')),
1613  ('QCDForPF_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(50,100),'QCD_FlatPt_15_3000HS_13')),
1614  ('PYTHIA8_PhiToMuMu_TuneCUETP8M1_13TeV_cff', UpgradeFragment(Kby(9,50),'PhiToMuMu_13')),
1615  ('RSKKGluon_m3000GeV_13TeV_TuneCUETP8M1_cff', UpgradeFragment(Kby(9,50),'RSKKGluon_m3000GeV_13')),
1616  ('ZpMM_2250_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'ZpMM_2250_13')),
1617  ('ZpEE_2250_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'ZpEE_2250_13')),
1618  ('ZpTT_1500_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'ZpTT_1500_13')),
1619  ('Upsilon1SToMuMu_forSTEAM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(9,50),'Upsilon1SToMuMu_13')),
1620  ('EtaBToJpsiJpsi_forSTEAM_TuneCUEP8M1_13TeV_cfi', UpgradeFragment(Kby(9,50),'EtaBToJpsiJpsi_13')),
1621  ('JpsiMuMu_Pt-8_forSTEAM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(3100,100000),'JpsiMuMu_Pt-8')),
1622  ('BuMixing_BMuonFilter_forSTEAM_13TeV_TuneCUETP8M1_cfi', UpgradeFragment(Kby(900,10000),'BuMixing_13')),
1623  ('HSCPstop_M_200_TuneCUETP8M1_13TeV_pythia8_cff', UpgradeFragment(Kby(9,50),'HSCPstop_M_200_13')),
1624  ('RSGravitonToGammaGamma_kMpl01_M_3000_TuneCUETP8M1_13TeV_pythia8_cfi', UpgradeFragment(Kby(9,50),'RSGravitonToGaGa_13')),
1625  ('WprimeToENu_M-2000_TuneCUETP8M1_13TeV-pythia8_cff', UpgradeFragment(Kby(9,50),'WpToENu_M-2000_13')),
1626  ('DisplacedSUSY_stopToBottom_M_800_500mm_TuneCP5_13TeV_pythia8_cff', UpgradeFragment(Kby(9,50),'DisplacedSUSY_stopToB_M_800_500mm_13')),
1627  ('TenE_E_0_200_pythia8_cfi', UpgradeFragment(Kby(9,100),'TenE_0_200')),
1628  ('FlatRandomPtAndDxyGunProducer_cfi', UpgradeFragment(Kby(9,100),'DisplacedMuonsDxy_0_500')),
1629  ('TenTau_E_15_500_pythia8_cfi', UpgradeFragment(Kby(9,100),'TenTau_15_500')),
1630  ('SinglePiPt25Eta1p7_2p7_cfi', UpgradeFragment(Kby(9,100),'SinglePiPt25Eta1p7_2p7')),
1631  ('SingleMuPt15Eta1p7_2p7_cfi', UpgradeFragment(Kby(9,100),'SingleMuPt15Eta1p7_2p7')),
1632  ('SingleGammaPt25Eta1p7_2p7_cfi', UpgradeFragment(Kby(9,100),'SingleGammaPt25Eta1p7_2p7')),
1633  ('SingleElectronPt15Eta1p7_2p7_cfi', UpgradeFragment(Kby(9,100),'SingleElectronPt15Eta1p7_2p7')),
1634  ('ZTT_All_hadronic_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,50),'ZTT_14')),
1635  ('CloseByParticle_Photon_ERZRanges_cfi', UpgradeFragment(Kby(9,100),'CloseByParticleGun')),
1636  ('CE_E_Front_300um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_E_Front_300um')),
1637  ('CE_E_Front_200um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_E_Front_200um')),
1638  ('CE_E_Front_120um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_E_Front_120um')),
1639  ('CE_H_Fine_300um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_H_Fine_300um')),
1640  ('CE_H_Fine_200um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_H_Fine_200um')),
1641  ('CE_H_Fine_120um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_H_Fine_120um')),
1642  ('CE_H_Coarse_Scint_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_H_Coarse_Scint')),
1643  ('CE_H_Coarse_300um_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_CE_H_Coarse_300um')),
1644  ('SingleElectronFlatPt2To100_cfi', UpgradeFragment(Kby(9,100),'SingleEFlatPt2To100')),
1645  ('SingleMuFlatPt0p7To10_cfi', UpgradeFragment(Kby(9,100),'SingleMuFlatPt0p7To10')),
1646  ('SingleMuFlatPt2To100_cfi', UpgradeFragment(Kby(9,100),'SingleMuFlatPt2To100')),
1647  ('SingleGammaFlatPt8To150_cfi', UpgradeFragment(Kby(9,100),'SingleGammaFlatPt8To150')),
1648  ('SinglePiFlatPt0p7To10_cfi', UpgradeFragment(Kby(9,100),'SinglePiFlatPt0p7To10')),
1649  ('SingleTauFlatPt2To150_cfi', UpgradeFragment(Kby(9,100),'SingleTauFlatPt2To150')),
1650  ('FlatRandomPtAndDxyGunProducer_MuPt2To10_cfi', UpgradeFragment(Kby(9,100),'DisplacedMuPt2To10')),
1651  ('FlatRandomPtAndDxyGunProducer_MuPt10To30_cfi', UpgradeFragment(Kby(9,100),'DisplacedMuPt10To30')),
1652  ('FlatRandomPtAndDxyGunProducer_MuPt30To100_cfi', UpgradeFragment(Kby(9,100),'DisplacedMuPt30To100')),
1653  ('B0ToKstarMuMu_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(304,3030),'B0ToKstarMuMu_14TeV')), # 3.3%
1654  ('BsToEleEle_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(223,2222),'BsToEleEle_14TeV')), # 4.5%
1655  ('BsToJpsiGamma_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(2500,25000),'BsToJpsiGamma_14TeV')), # 0.4%
1656  ('BsToJpsiPhi_mumuKK_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(910,9090),'BsToJpsiPhi_mumuKK_14TeV')), # 1.1%
1657  ('BsToMuMu_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(313,3125),'BsToMuMu_14TeV')), # 3.2%
1658  ('BsToPhiPhi_KKKK_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(556,5555),'BsToPhiPhi_KKKK_14TeV')), # 1.8%
1659  ('TauToMuMuMu_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(18939,189393),'TauToMuMuMu_14TeV')), # effi = 5.280e-04
1660  ('BdToKstarEleEle_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(206,2061),'BdToKstarEleEle_14TeV')), #effi = 4.850e-02
1661  ('ZpTT_1500_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,50),'ZpTT_1500_14')),
1662  ('BuMixing_BMuonFilter_forSTEAM_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(900,10000),'BuMixing_14')),
1663  ('Upsilon1SToMuMu_forSTEAM_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,50),'Upsilon1SToMuMu_14')),
1664  ('TenTau_E_15_500_Eta3p1_pythia8_cfi', UpgradeFragment(Kby(9,100),'TenTau_15_500_Eta3p1')),
1665  ('QCD_Pt_1800_2400_14TeV_TuneCP5_cfi', UpgradeFragment(Kby(9,50), 'QCD_Pt_1800_2400_14')),
1666  ('DisplacedSUSY_stopToBottom_M_800_500mm_TuneCP5_14TeV_pythia8_cff', UpgradeFragment(Kby(9,50),'DisplacedSUSY_14TeV')),
1667  ('GluGluTo2Jets_M_300_2000_14TeV_Exhume_cff',UpgradeFragment(Kby(9,100),'GluGluTo2Jets_14TeV')),
1668  ('TTbarToDilepton_mt172p5_TuneCP5_14TeV_pythia8_cfi',UpgradeFragment(Kby(9,50),'TTbarToDilepton_14TeV')),
1669  ('QQToHToTauTau_mh125_TuneCP5_14TeV_pythia8_cfi',UpgradeFragment(Kby(9,50),'QQToHToTauTau_14TeV')),
1670  ('ZpToEE_m6000_TuneCP5_14TeV_pythia8_cfi',UpgradeFragment(Kby(9,50),'ZpToEE_m6000_14TeV')),
1671  ('ZpToMM_m6000_TuneCP5_14TeV_pythia8_cfi',UpgradeFragment(Kby(9,50),'ZpToMM_m6000_14TeV')),
1672  ('SMS-T1tttt_mGl-1500_mLSP-100_TuneCP5_14TeV_pythia8_cfi',UpgradeFragment(Kby(9,50),'SMS-T1tttt_14TeV')),
1673  ('VBFHZZ4Nu_TuneCP5_14TeV_pythia8_cfi',UpgradeFragment(Kby(9,50),'VBFHZZ4Nu_14TeV')),
1674  ('EtaBToJpsiJpsi_14TeV_TuneCP5_pythia8_cfi',UpgradeFragment(Kby(9,50),'EtaBToJpsiJpsi_14TeV')),
1675  ('WToLNu_14TeV_TuneCP5_pythia8_cfi',UpgradeFragment(Kby(21,50),'WToLNu_14TeV')),
1676  ('WprimeToLNu_M2000_14TeV_TuneCP5_pythia8_cfi',UpgradeFragment(Kby(21,50),'WprimeToLNu_M2000_14TeV')),
1677  ('DoubleMuFlatPt1p5To8_cfi', UpgradeFragment(Kby(9,100),'SingleMuFlatPt1p5To8')),
1678  ('DoubleElectronFlatPt1p5To8_cfi', UpgradeFragment(Kby(9,100),'SingleElectronFlatPt1p5To8')),
1679  ('DoubleMuFlatPt1p5To8Dxy100GunProducer_cfi', UpgradeFragment(Kby(9,100),'DisplacedMuPt1p5To8Dxy100')),
1680  ('DoubleMuFlatPt2To100Dxy100GunProducer_cfi', UpgradeFragment(Kby(9,100),'DisplacedMuPt2To100Dxy100')),
1681 ])
Definition: merge.py:1
bool any(const std::vector< T > &v, const T &what)
Definition: ECalSD.cc:37
boost::dynamic_bitset append(const boost::dynamic_bitset<> &bs1, const boost::dynamic_bitset<> &bs2)
this method takes two bitsets bs1 and bs2 and returns result of bs2 appended to the end of bs1 ...
const uint16_t range(const Frame &aFrame)
static std::string join(char **cmd)
Definition: RemoteFile.cc:19
#define str(s)