1 from copy
import deepcopy
2 from collections
import OrderedDict
4 from .MatrixUtil
import merge, Kby
64 numWFConflict = [[20000,23200],[23600,28200],[28600,31400],[31800,32200],[32600,34600],[50000,51000]]
70 for year
in upgradeKeys:
71 for i
in range(0,len(upgradeKeys[year])):
72 numWFtmp = numWFStart[year]
if i==0
else (numWFAll[year][i-1] + numWFSkip)
73 for conflict
in numWFConflict:
74 if numWFtmp>=conflict[0]
and numWFtmp<conflict[1]:
75 numWFtmp = conflict[1]
77 numWFAll[year].
append(numWFtmp)
84 preventReuseKeyword =
'NOREUSE'
93 if not step
in self.
steps:
100 raise ValueError(
"Special workflow offset must be between 0.0 and 1.0")
102 stepName = step + self.
suffix + extra
105 stepNamePU = step +
'PU' + self.
suffix + extra
108 for step
in self.
steps:
114 def setup(self, stepDict, k, properties):
115 for step
in self.
steps:
122 def setup_(self, step, stepName, stepDict, k, properties):
124 def setupPU_(self, step, stepName, stepDict, k, properties):
126 def workflow(self, workflows, num, fragment, stepList, key, hasHarvest):
127 if self.condition(fragment, stepList, key, hasHarvest):
128 self.workflow_(workflows, num, fragment, stepList, key)
129 def workflow_(self, workflows, num, fragment, stepList, key):
130 fragmentTmp = [fragment, key]
132 workflows[num+self.
offset] = [ fragmentTmp, stepList ]
133 def condition(self, fragment, stepList, key, hasHarvest):
136 if "Sim" in stepName:
137 stepDict[stepName][k] =
None
138 upgradeWFs = OrderedDict()
141 def setup_(self, step, stepName, stepDict, k, properties):
142 cust=properties.get(
'Custom',
None)
143 era=properties.get(
'Era',
None)
144 modifier=properties.get(
'ProcessModifier',
None)
145 if cust
is not None: stepDict[stepName][k][
'--customise']=cust
146 if era
is not None: stepDict[stepName][k][
'--era']=era
147 if modifier
is not None: stepDict[stepName][k][
'--procModifier']=modifier
148 def condition(self, fragment, stepList, key, hasHarvest):
154 'GenSimHLBeamSpot14',
189 def condition(self, fragment, stepList, key, hasHarvest):
190 result = (fragment==
"TTbar_13" or fragment==
"TTbar_14TeV")
and not 'PU' in key
and hasHarvest
and self.
condition_(fragment, stepList, key, hasHarvest)
193 skipList = [s
for s
in stepList
if ((
"ALCA" in s)
or (
"Nano" in s))]
194 for skip
in skipList:
195 stepList.remove(skip)
201 def setup_(self, step, stepName, stepDict, k, properties):
202 if 'Reco' in step: stepDict[stepName][k] =
merge([self.
step3, stepDict[step][k]])
203 elif 'HARVEST' in step: stepDict[stepName][k] =
merge([{
'-s':
'HARVESTING:@trackingOnlyValidation+@trackingOnlyDQM'}, stepDict[step][k]])
212 suffix =
'_trackingOnly',
215 upgradeWFs[
'trackingOnly'].step3 = {
216 '-s':
'RAW2DIGI,RECO:reconstruction_trackingOnly,VALIDATION:@trackingOnlyValidation,DQM:@trackingOnlyDQM',
217 '--datatier':
'GEN-SIM-RECO,DQMIO',
218 '--eventcontent':
'RECOSIM,DQM',
221 step3_trackingOnly = upgradeWFs[
'trackingOnly'].step3
224 def setup_(self, step, stepName, stepDict, k, properties):
225 if 'Reco' in step
and stepDict[step][k][
'--era']==
'Run2_2017':
226 stepDict[stepName][k] =
merge([{
'--era':
'Run2_2017_trackingRun2'}, stepDict[step][k]])
234 suffix =
'_trackingRun2',
239 def setup_(self, step, stepName, stepDict, k, properties):
240 if 'Reco' in step
and stepDict[step][k][
'--era']==
'Run2_2017':
241 stepDict[stepName][k] =
merge([{
'--era':
'Run2_2017_trackingRun2'}, self.
step3, stepDict[step][k]])
242 elif 'HARVEST' in step: stepDict[stepName][k] =
merge([{
'-s':
'HARVESTING:@trackingOnlyValidation+@trackingOnlyDQM'}, stepDict[step][k]])
251 suffix =
'_trackingOnlyRun2',
254 upgradeWFs[
'trackingOnlyRun2'].step3 = upgradeWFs[
'trackingOnly'].step3
257 def setup_(self, step, stepName, stepDict, k, properties):
258 if 'Reco' in step
and stepDict[step][k][
'--era']==
'Run2_2017':
259 stepDict[stepName][k] =
merge([{
'--era':
'Run2_2017_trackingLowPU'}, stepDict[step][k]])
267 suffix =
'_trackingLowPU',
272 def setup_(self, step, stepName, stepDict, k, properties):
273 if 'Reco' in step: stepDict[stepName][k] =
merge([self.
step3, stepDict[step][k]])
274 elif 'HARVEST' in step: stepDict[stepName][k] =
merge([{
'-s':
'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'}, stepDict[step][k]])
276 return '2017' in key
or '2018' in key
or '2021' in key
285 suffix =
'_pixelTrackingOnly',
288 upgradeWFs[
'pixelTrackingOnly'].step3 = {
289 '-s':
'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
290 '--datatier':
'GEN-SIM-RECO,DQMIO',
291 '--eventcontent':
'RECOSIM,DQM',
295 def setup_(self, step, stepName, stepDict, k, properties):
296 if 'Reco' in step: stepDict[stepName][k] =
merge([self.
step3, stepDict[step][k]])
298 return '2017' in key
or '2021' in key
305 suffix =
'_trackingMkFit',
308 upgradeWFs[
'trackingMkFit'].step3 = {
309 '--procModifiers':
'trackingMkFit'
314 def setup_(self, step, stepName, stepDict, k, properties):
315 if 'Reco' in step
or 'HARVEST' in step: stepDict[stepName][k] =
merge([{
'--procModifiers':
'seedingDeepCore'}, stepDict[step][k]])
316 def condition(self, fragment, stepList, key, hasHarvest):
317 result = (fragment==
"QCD_Pt_1800_2400_14" or fragment==
"TTbar_14TeV" )
and (
'2021' in key
or '2024' in key)
and hasHarvest
320 skipList = [s
for s
in stepList
if ((
"ALCA" in s)
or (
"Nano" in s))]
321 for skip
in skipList:
322 stepList.remove(skip)
332 suffix =
'_seedingDeepCore',
338 def setup_(self, step, stepName, stepDict, k, properties):
339 stepDict[stepName][k] =
merge([{
'--procModifiers':
'vectorHits'}, stepDict[step][k]])
340 def condition(self, fragment, stepList, key, hasHarvest):
341 return fragment==
"TTbar_14TeV" and '2026' in key
349 suffix =
'_vectorHits',
356 def setup_(self, step, stepName, stepDict, k, properties):
357 stepDict[stepName][k] =
merge([{
'--procModifiers':
'trackdnn'}, stepDict[step][k]])
359 def condition(self, fragment, stepList, key, hasHarvest):
360 return fragment==
"TTbar_14TeV" and '2021' in key
368 suffix =
'_trackdnn',
375 def setup_(self, step, stepName, stepDict, k, properties):
377 stepDict[stepName][k] =
merge([self.
step3, stepDict[step][k]])
378 def condition(self, fragment, stepList, key, hasHarvest):
379 return fragment==
"TTbar_14TeV" and '2021' in key
391 upgradeWFs[
'mlpf'].step3 = {
392 '--datatier':
'GEN-SIM-RECO,RECOSIM,MINIAODSIM,DQMIO',
393 '--eventcontent':
'FEVTDEBUGHLT,RECOSIM,MINIAODSIM,DQM',
394 '--procModifiers':
'mlpf'
399 def condition(self, fragment, stepList, key, hasHarvest):
400 is_2018_ttbar = (
'2018' in key
and fragment==
"TTbar_13")
401 is_2021_ttbar = (
'2021' in key
and fragment==
"TTbar_14TeV")
402 is_2018_zmumu = (
'2018' in key
and fragment==
"ZMM_13")
403 is_2021_zmumu = (
'2021' in key
and fragment==
"ZMM_14")
404 result =
any((is_2018_ttbar, is_2021_ttbar, is_2018_zmumu, is_2021_zmumu))
and hasHarvest
and self.
condition_(fragment, stepList, key, hasHarvest)
407 skipList = [s
for s
in stepList
if ((
"ALCA" in s)
or (
"Nano" in s))]
408 for skip
in skipList:
409 stepList.remove(skip)
415 def setup_(self, step, stepName, stepDict, k, properties):
417 stepDict[stepName][k] =
merge([self.
step3, stepDict[step][k]])
418 elif 'HARVEST' in step:
419 stepDict[stepName][k] =
merge([{
'-s':
'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'}, stepDict[step][k]])
422 return '2018' in key
or '2021' in key
434 suffix =
'Patatrack_PixelOnlyCPU',
438 upgradeWFs[
'PatatrackPixelOnlyCPU'].step3 = {
439 '-s':
'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
440 '--datatier':
'GEN-SIM-RECO,DQMIO',
441 '--eventcontent':
'RECOSIM,DQM',
442 '--customise' :
'RecoPixelVertexing/Configuration/customizePixelTracksSoAonCPU.customizePixelTracksSoAonCPU'
453 suffix =
'Patatrack_PixelOnlyTripletsCPU',
457 upgradeWFs[
'PatatrackPixelOnlyTripletsCPU'].step3 = {
458 '-s':
'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
459 '--datatier':
'GEN-SIM-RECO,DQMIO',
460 '--eventcontent':
'RECOSIM,DQM',
461 '--customise' :
'RecoPixelVertexing/Configuration/customizePixelTracksSoAonCPU.customizePixelTracksSoAonCPU,RecoPixelVertexing/Configuration/customizePixelTracksSoAonCPU.customizePixelTracksForTriplets'
465 def setup_(self, step, stepName, stepDict, k, properties):
467 stepDict[stepName][k] =
merge([self.
step3, stepDict[step][k]])
468 elif 'HARVEST' in step:
469 stepDict[stepName][k] =
merge([{
'-s':
'HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM'}, stepDict[step][k]])
472 return '2018' in key
or '2021' in key
484 suffix =
'Patatrack_PixelOnlyGPU',
488 upgradeWFs[
'PatatrackPixelOnlyGPU'].step3 = {
489 '-s':
'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
490 '--datatier':
'GEN-SIM-RECO,DQMIO',
491 '--eventcontent':
'RECOSIM,DQM',
492 '--procModifiers':
'gpu'
503 suffix =
'Patatrack_PixelOnlyTripletsGPU',
507 upgradeWFs[
'PatatrackPixelOnlyTripletsGPU'].step3 = {
508 '-s':
'RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM',
509 '--datatier':
'GEN-SIM-RECO,DQMIO',
510 '--eventcontent':
'RECOSIM,DQM',
511 '--procModifiers':
'gpu',
512 '--customise':
'RecoPixelVertexing/Configuration/customizePixelTracksSoAonCPU.customizePixelTracksForTriplets'
516 def setup_(self, step, stepName, stepDict, k, properties):
518 stepDict[stepName][k] =
merge([self.
step3, stepDict[step][k]])
519 elif 'HARVEST' in step:
520 stepDict[stepName][k] =
merge([{
'-s':
'HARVESTING:@ecalOnlyValidation+@ecal'}, stepDict[step][k]])
523 return '2018' in key
or '2021' in key
535 suffix =
'Patatrack_ECALOnlyCPU',
539 upgradeWFs[
'PatatrackECALOnlyCPU'].step3 = {
540 '-s':
'RAW2DIGI:RawToDigi_ecalOnly,RECO:reconstruction_ecalOnly,VALIDATION:@ecalOnlyValidation,DQM:@ecalOnly',
541 '--datatier':
'GEN-SIM-RECO,DQMIO',
542 '--eventcontent':
'RECOSIM,DQM',
546 def setup_(self, step, stepName, stepDict, k, properties):
548 stepDict[stepName][k] =
merge([self.
step3, stepDict[step][k]])
549 elif 'HARVEST' in step:
550 stepDict[stepName][k] =
merge([{
'-s':
'HARVESTING:@ecalOnlyValidation+@ecal'}, stepDict[step][k]])
553 return '2018' in key
or '2021' in key
565 suffix =
'Patatrack_ECALOnlyGPU',
569 upgradeWFs[
'PatatrackECALOnlyGPU'].step3 = {
570 '-s':
'RAW2DIGI:RawToDigi_ecalOnly,RECO:reconstruction_ecalOnly,VALIDATION:@ecalOnlyValidation,DQM:@ecalOnly',
571 '--datatier':
'GEN-SIM-RECO,DQMIO',
572 '--eventcontent':
'RECOSIM,DQM',
573 '--procModifiers':
'gpu'
577 def setup_(self, step, stepName, stepDict, k, properties):
579 stepDict[stepName][k] =
merge([self.
step3, stepDict[step][k]])
580 elif 'HARVEST' in step:
581 stepDict[stepName][k] =
merge([{
'-s':
'HARVESTING:@hcalOnlyValidation+@hcalOnly+@hcal2Only'}, stepDict[step][k]])
584 return '2018' in key
or '2021' in key
596 suffix =
'Patatrack_HCALOnlyCPU',
600 upgradeWFs[
'PatatrackHCALOnlyCPU'].step3 = {
601 '-s':
'RAW2DIGI:RawToDigi_hcalOnly,RECO:reconstruction_hcalOnly,VALIDATION:@hcalOnlyValidation,DQM:@hcalOnly+@hcal2Only',
602 '--datatier':
'GEN-SIM-RECO,DQMIO',
603 '--eventcontent':
'RECOSIM,DQM',
607 def setup_(self, step, stepName, stepDict, k, properties):
609 stepDict[stepName][k] =
merge([self.
step3, stepDict[step][k]])
610 elif 'HARVEST' in step:
611 stepDict[stepName][k] =
merge([{
'-s':
'HARVESTING:@hcalOnlyValidation+@hcalOnly+@hcal2Only'}, stepDict[step][k]])
614 return '2018' in key
or '2021' in key
626 suffix =
'Patatrack_HCALOnlyGPU',
630 upgradeWFs[
'PatatrackHCALOnlyGPU'].step3 = {
631 '-s':
'RAW2DIGI:RawToDigi_hcalOnly,RECO:reconstruction_hcalOnly,VALIDATION:@hcalOnlyValidation,DQM:@hcalOnly+@hcal2Only',
632 '--datatier':
'GEN-SIM-RECO,DQMIO',
633 '--eventcontent':
'RECOSIM,DQM',
634 '--procModifiers':
'gpu'
640 def setup_(self, step, stepName, stepDict, k, properties):
641 if 'Digi' in step
and 'Trigger' not in step:
642 stepDict[stepName][k] =
merge([{
'-s':
'DIGI,L1,DIGI2RAW,HLT:@relval2021',
'--datatier':
'GEN-SIM-DIGI-RAW',
'--eventcontent':
'RAWSIM'}, stepDict[step][k]])
644 stepDict[stepName][k] =
merge([{
'-s':
'RAW2DIGI,L1Reco,RECO,RECOSIM',
'--datatier':
'AODSIM',
'--eventcontent':
'AODSIM'}, stepDict[step][k]])
645 elif 'MiniAOD' in step:
647 stepDict[stepName][k] = deepcopy(stepDict[step][k])
648 if 'ALCA' in step
or 'HARVEST' in step:
650 stepDict[stepName][k] =
None
652 stepDict[stepName][k] =
merge([{
'--filein':
'file:step4.root'}, stepDict[step][k]])
653 def condition(self, fragment, stepList, key, hasHarvest):
654 return fragment==
"TTbar_14TeV" and (
'2026' in key
or '2021' in key)
676 suffix =
'_ProdLike',
681 def setup_(self, step, stepName, stepDict, k, properties):
683 custNew =
"SimG4Core/Application/NeutronBGforMuonsXS_cff.customise"
685 custNew =
"SLHCUpgradeSimulations/Configuration/customise_mixing.customise_Mix_LongLived_Neutrons"
686 stepDict[stepName][k] = deepcopy(stepDict[step][k])
687 if '--customise' in stepDict[stepName][k].
keys():
688 stepDict[stepName][k][
'--customise'] +=
","+custNew
690 stepDict[stepName][k][
'--customise'] = custNew
691 def condition(self, fragment, stepList, key, hasHarvest):
697 'GenSimHLBeamSpot14',
709 upgradeWFs[
'Neutron'].neutronKeys = [x
for x
in upgradeKeys[2026]
if 'PU' not in x]
710 upgradeWFs[
'Neutron'].neutronFrags = [
'ZMM_14',
'MinBias_14TeV']
713 def setup_(self, step, stepName, stepDict, k, properties):
714 stepDict[stepName][k] =
merge([{
'--procModifiers':
'run2_HECollapse_2018'}, stepDict[step][k]])
715 def condition(self, fragment, stepList, key, hasHarvest):
716 return fragment==
"TTbar_13" and '2018' in key
730 suffix =
'_heCollapse',
735 def setup_(self, step, stepName, stepDict, k, properties):
737 mods = {
'--era': stepDict[step][k][
'--era']+
',phase2_ecal_devel'}
739 mods[
'-s'] =
'DIGI:pdigi_valid'
740 stepDict[stepName][k] =
merge([mods, stepDict[step][k]])
741 def condition(self, fragment, stepList, key, hasHarvest):
742 return fragment==
"TTbar_14TeV" and '2026' in key
754 suffix =
'_ecalDevel',
759 def setup_(self, step, stepName, stepDict, k, properties):
760 myGT=stepDict[step][k][
'--conditions']
762 stepDict[stepName][k] =
merge([{
'-n':
'1',
'--magField':
'0T',
'--conditions':myGT}, stepDict[step][k]])
763 def condition(self, fragment, stepList, key, hasHarvest):
764 return (fragment==
"TTbar_13" or fragment==
"TTbar_14TeV")
and (
'2017' in key
or '2018' in key
or '2021' in key)
783 def setup_(self, step, stepName, stepDict, k, properties):
784 if 'Reco' in step
and 'Run2_2018' in stepDict[step][k][
'--era']:
785 stepDict[stepName][k] =
merge([{
'--era':
'Run2_2018,bParking'}, stepDict[step][k]])
786 def condition(self, fragment, stepList, key, hasHarvest):
787 return fragment==
"TTbar_13" and '2018' in key
793 suffix =
'_ParkingBPH',
798 def setup_(self, step, stepName, stepDict, k, properties):
800 stepDict[stepName][k] =
merge([{
'--customise':
'PhysicsTools/NanoAOD/custom_jme_cff.PrepJMECustomNanoAOD_MC'}, stepDict[step][k]])
801 def condition(self, fragment, stepList, key, hasHarvest):
802 return fragment==
"TTbar_13" and (
'2017' in key
or '2018' in key)
815 def setup_(self, step, stepName, stepDict, k, properties):
816 if 'Digi' in step
or 'Reco' in step:
817 stepDict[stepName][k] =
merge([{
'--customise':
'SLHCUpgradeSimulations/Configuration/aging.customise_aging_'+self.
lumi}, stepDict[step][k]])
818 def condition(self, fragment, stepList, key, hasHarvest):
819 return fragment==
"TTbar_14TeV" and '2026' in key
836 suffix =
'Aging1000',
839 upgradeWFs[
'Aging1000'].lumi =
'1000'
840 upgradeWFs[
'Aging3000'] = deepcopy(upgradeWFs[
'Aging1000'])
841 upgradeWFs[
'Aging3000'].suffix =
'Aging3000'
842 upgradeWFs[
'Aging3000'].offset = 0.103
843 upgradeWFs[
'Aging3000'].lumi =
'3000'
851 digiPremixLocalPileup = {
852 "--filein":
"file:step1.root",
853 "--pileup_input":
"file:step2.root"
858 def setup_(self, step, stepName, stepDict, k, properties):
860 stepDict[stepName][k] =
merge([stepDict[step][k]])
861 def setupPU_(self, step, stepName, stepDict, k, properties):
863 if "GenSim" in stepName:
864 stepNamePmx = stepName.replace(
'GenSim',
'Premix')
865 if not stepNamePmx
in stepDict: stepDict[stepNamePmx] = {}
866 stepDict[stepNamePmx][k] =
merge([
868 '-s':
'GEN,SIM,DIGI:pdigi_valid',
869 '--datatier':
'PREMIX',
870 '--eventcontent':
'PREMIX',
871 '--procModifiers':
'premix_stage1'
873 stepDict[stepName][k]
876 elif "Digi" in step
or "Reco" in step:
882 for s
in d[
"-s"].
split(
","):
883 if s ==
"DIGI" or "DIGI:" in s:
884 tmpsteps.extend([s,
"DATAMIX"])
888 "--datamix" :
"PreMix",
889 "--procModifiers":
"premix_stage2"},
892 if "_PMXS1S2" in self.
suffix:
893 d =
merge([digiPremixLocalPileup, d])
895 if "--procModifiers" in d:
896 d[
"--procModifiers"] +=
",premix_stage2"
898 d[
"--procModifiers"] =
"premix_stage2"
899 stepDict[stepName][k] = d
905 filein = d[
"--filein"]
906 m = re.search(
"step(?P<ind>\d+)_", filein)
908 d[
"--filein"] = filein.replace(m.group(),
"step%d_"%(
int(m.group(
"ind"))+1))
909 stepDict[stepName][k] = d
912 def condition(self, fragment, stepList, key, hasHarvest):
915 if not any(y
in key
for y
in [
'2021',
'2023',
'2024',
'2026']):
917 if self.
suffix.endswith(
"S1"):
918 return "NuGun" in fragment
920 def workflow_(self, workflows, num, fragment, stepList, key):
921 fragmentTmp = fragment
922 if self.
suffix.endswith(
"S1"):
923 fragmentTmp =
'PREMIXUP' + key[2:].
replace(
"PU",
"").
replace(
"Design",
"") +
'_PU25'
924 super(UpgradeWorkflowPremix,self).
workflow_(workflows, num, fragmentTmp, stepList, key)
932 'GenSimHLBeamSpot14',
957 'GenSimHLBeamSpot14',
970 def setupPU_(self, step, stepName, stepDict, k, properties):
972 if '--pileup' in stepDict[stepName][k]:
973 stepDict[stepName][k][
'--pileup'] =
'AVE_50_BX_25ns_m3p3'
974 super(UpgradeWorkflowAdjustPU,self).
setupPU_(step, stepName, stepDict, k, properties)
975 def condition(self, fragment, stepList, key, hasHarvest):
977 return super(UpgradeWorkflowAdjustPU,self).
condition(fragment, stepList, key, hasHarvest)
and '2026' in key
983 'GenSimHLBeamSpot14',
993 suffix =
'_PMXS1S2PR',
998 def setup_(self, step, stepName, stepDict, k, properties):
1000 UpgradeWorkflowPremix.setup_(self, step, stepName, stepDict, k, properties)
1001 UpgradeWorkflow_ProdLike.setup_(self, step, stepName, stepDict, k, properties)
1004 return UpgradeWorkflowPremix.condition(self, fragment, stepList, key, hasHarvest)
and UpgradeWorkflow_ProdLike.condition(self, fragment, stepList, key, hasHarvest)
1020 suffix =
'_PMXS2ProdLike',
1029 'GenSimHLBeamSpot14',
1041 suffix =
'_PMXS1S2ProdLike',
1046 def setup_(self, step, stepName, stepDict, k, properties):
1047 if 'Run3' in stepDict[step][k][
'--era']:
1048 stepDict[stepName][k] =
merge([{
'--geometry':
'DD4hepExtended2021',
'--procModifiers':
'dd4hep'}, stepDict[step][k]])
1049 elif 'Phase2' in stepDict[step][k][
'--era']:
1051 dd4hepGeom+=stepDict[step][k][
'--geometry']
1052 stepDict[stepName][k] =
merge([{
'--geometry' : dd4hepGeom,
'--procModifiers':
'dd4hep'}, stepDict[step][k]])
1054 return '2021' in key
or '2026' in key
1059 'GenSimHLBeamSpot14',
1072 upgradeWFs[
'DD4hep'].allowReuse =
False
1075 def setup_(self, step, stepName, stepDict, k, properties):
1076 stepDict[stepName][k] =
merge([{
'--procModifiers':
'allSonicTriton'}, stepDict[step][k]])
1078 return (fragment==
'TTbar_13' and '2021' in key) \
1079 or (fragment==
'TTbar_14TeV' and '2026' in key)
1084 'GenSimHLBeamSpot14',
1096 'GenSimHLBeamSpot14',
1105 suffix =
'_SonicTriton',
1110 offsets = [specialWF.offset
for specialType,specialWF
in six.iteritems(upgradeWFs)]
1112 dups = set(x
for x
in offsets
if x
in seen
or seen.add(x))
1114 raise ValueError(
"Duplicate special workflow offsets not allowed: "+
','.
join([
str(x)
for x
in dups]))
1116 upgradeProperties = {}
1118 upgradeProperties[2017] = {
1120 'Geom' :
'DB:Extended',
1121 'GT' :
'auto:phase1_2017_realistic',
1122 'HLTmenu':
'@relval2017',
1123 'Era' :
'Run2_2017',
1124 'ScenToRun' : [
'GenSim',
'Digi',
'RecoFakeHLT',
'HARVESTFakeHLT',
'ALCA',
'Nano'],
1127 'Geom' :
'DB:Extended',
1128 'GT' :
'auto:phase1_2017_design',
1129 'HLTmenu':
'@relval2017',
1130 'Era' :
'Run2_2017',
1131 'BeamSpot':
'GaussSigmaZ4cm',
1132 'ScenToRun' : [
'GenSim',
'Digi',
'RecoFakeHLT',
'HARVESTFakeHLT'],
1135 'Geom' :
'DB:Extended',
1136 'GT' :
'auto:phase1_2018_realistic',
1137 'HLTmenu':
'@relval2018',
1138 'Era' :
'Run2_2018',
1139 'BeamSpot':
'Realistic25ns13TeVEarly2018Collision',
1140 'ScenToRun' : [
'GenSim',
'Digi',
'RecoFakeHLT',
'HARVESTFakeHLT',
'ALCA',
'Nano'],
1143 'Geom' :
'DB:Extended',
1144 'GT' :
'auto:phase1_2018_design',
1145 'HLTmenu':
'@relval2018',
1146 'Era' :
'Run2_2018',
1147 'BeamSpot':
'GaussSigmaZ4cm',
1148 'ScenToRun' : [
'GenSim',
'Digi',
'RecoFakeHLT',
'HARVESTFakeHLT'],
1151 'Geom' :
'DB:Extended',
1152 'GT' :
'auto:phase1_2021_realistic',
1153 'HLTmenu':
'@relval2021',
1155 'BeamSpot':
'Run3RoundOptics25ns13TeVLowSigmaZ',
1156 'ScenToRun' : [
'GenSim',
'Digi',
'Reco',
'HARVEST',
'ALCA'],
1159 'Geom' :
'DB:Extended',
1160 'GT' :
'auto:phase1_2021_design',
1161 'HLTmenu':
'@relval2021',
1163 'BeamSpot':
'GaussSigmaZ4cm',
1164 'ScenToRun' : [
'GenSim',
'Digi',
'Reco',
'HARVEST'],
1167 'Geom' :
'DB:Extended',
1168 'GT' :
'auto:phase1_2023_realistic',
1169 'HLTmenu':
'@relval2021',
1171 'BeamSpot':
'Run3RoundOptics25ns13TeVLowSigmaZ',
1172 'ScenToRun' : [
'GenSim',
'Digi',
'Reco',
'HARVEST',
'ALCA'],
1175 'Geom' :
'DB:Extended',
1176 'GT' :
'auto:phase1_2024_realistic',
1177 'HLTmenu':
'@relval2021',
1179 'BeamSpot':
'Run3RoundOptics25ns13TeVLowSigmaZ',
1180 'ScenToRun' : [
'GenSim',
'Digi',
'Reco',
'HARVEST',
'ALCA'],
1185 for key
in list(upgradeProperties[2017].
keys()):
1186 upgradeProperties[2017][key+
'PU'] = deepcopy(upgradeProperties[2017][key])
1187 upgradeProperties[2017][key+
'PU'][
'ScenToRun'] = [
'GenSim',
'DigiPU'] + \
1188 ([
'RecoPU',
'HARVESTPU']
if '202' in key
else [
'RecoFakeHLTPU',
'HARVESTFakeHLTPU']) + \
1189 ([
'Nano']
if 'Design' not in key
else [])
1191 upgradeProperties[2026] = {
1193 'Geom' :
'Extended2026D49',
1194 'HLTmenu':
'@fake2',
1195 'GT' :
'auto:phase2_realistic_T15',
1197 'ScenToRun' : [
'GenSimHLBeamSpot',
'DigiTrigger',
'RecoGlobal',
'HARVESTGlobal'],
1200 'Geom' :
'Extended2026D60',
1201 'HLTmenu':
'@fake2',
1202 'GT' :
'auto:phase2_realistic_T15',
1203 'Era' :
'Phase2C10',
1204 'ScenToRun' : [
'GenSimHLBeamSpot',
'DigiTrigger',
'RecoGlobal',
'HARVESTGlobal'],
1207 'Geom' :
'Extended2026D68',
1208 'HLTmenu':
'@fake2',
1209 'GT' :
'auto:phase2_realistic_T21',
1210 'Era' :
'Phase2C11',
1211 'ScenToRun' : [
'GenSimHLBeamSpot',
'DigiTrigger',
'RecoGlobal',
'HARVESTGlobal'],
1214 'Geom' :
'Extended2026D70',
1215 'HLTmenu':
'@fake2',
1216 'GT' :
'auto:phase2_realistic_T21',
1217 'Era' :
'Phase2C11',
1218 'ScenToRun' : [
'GenSimHLBeamSpot',
'DigiTrigger',
'RecoGlobal',
'HARVESTGlobal'],
1221 'Geom' :
'Extended2026D76',
1222 'HLTmenu':
'@fake2',
1223 'GT' :
'auto:phase2_realistic_T21',
1224 'Era' :
'Phase2C11I13M9',
1225 'ScenToRun' : [
'GenSimHLBeamSpot',
'DigiTrigger',
'RecoGlobal',
'HARVESTGlobal'],
1228 'Geom' :
'Extended2026D77',
1229 'HLTmenu':
'@fake2',
1230 'GT' :
'auto:phase2_realistic_T21',
1231 'Era' :
'Phase2C11I13M9',
1232 'ScenToRun' : [
'GenSimHLBeamSpot',
'DigiTrigger',
'RecoGlobal',
'HARVESTGlobal'],
1235 'Geom' :
'Extended2026D78',
1236 'HLTmenu':
'@fake2',
1237 'GT' :
'auto:phase2_realistic_T22',
1238 'ProcessModifier':
'PixelCPEGeneric',
1239 'Era' :
'Phase2C11I13T22M9',
1240 'ScenToRun' : [
'GenSimHLBeamSpot',
'DigiTrigger',
'RecoGlobal',
'HARVESTGlobal'],
1243 'Geom' :
'Extended2026D79',
1244 'HLTmenu':
'@fake2',
1245 'GT' :
'auto:phase2_realistic_T23',
1246 'ProcessModifier':
'PixelCPEGeneric',
1247 'Era' :
'Phase2C11I13T23M9',
1248 'ScenToRun' : [
'GenSimHLBeamSpot',
'DigiTrigger',
'RecoGlobal',
'HARVESTGlobal'],
1251 'Geom' :
'Extended2026D80',
1252 'HLTmenu':
'@fake2',
1253 'GT' :
'auto:phase2_realistic_T25',
1254 'Era' :
'Phase2C11I13T25M9',
1255 'ScenToRun' : [
'GenSimHLBeamSpot',
'DigiTrigger',
'RecoGlobal',
'HARVESTGlobal'],
1258 'Geom' :
'Extended2026D81',
1259 'HLTmenu':
'@fake2',
1260 'GT' :
'auto:phase2_realistic_T26',
1261 'Era' :
'Phase2C11I13T26M9',
1262 'ScenToRun' : [
'GenSimHLBeamSpot',
'DigiTrigger',
'RecoGlobal',
'HARVESTGlobal'],
1265 'Geom' :
'Extended2026D82',
1266 'HLTmenu':
'@fake2',
1267 'GT' :
'auto:phase2_realistic_T21',
1268 'Era' :
'Phase2C11I13M9',
1269 'ScenToRun' : [
'GenSimHLBeamSpot',
'DigiTrigger',
'RecoGlobal',
'HARVESTGlobal'],
1272 'Geom' :
'Extended2026D83',
1273 'HLTmenu':
'@fake2',
1274 'GT' :
'auto:phase2_realistic_T21',
1275 'Era' :
'Phase2C11I13M9',
1276 'ScenToRun' : [
'GenSimHLBeamSpot',
'DigiTrigger',
'RecoGlobal',
'HARVESTGlobal'],
1281 for key
in list(upgradeProperties[2026].
keys()):
1282 upgradeProperties[2026][key+
'PU'] = deepcopy(upgradeProperties[2026][key])
1283 upgradeProperties[2026][key+
'PU'][
'ScenToRun'] = [
'GenSimHLBeamSpot',
'DigiTriggerPU',
'RecoGlobalPU',
'HARVESTGlobalPU']
1286 defaultDataSets = {}
1287 for year
in upgradeKeys:
1288 for key
in upgradeKeys[year]:
1289 if 'PU' in key:
continue
1290 defaultDataSets[key] =
''
1298 upgradeFragments = OrderedDict([
1300 (
'SingleElectronPt10_pythia8_cfi',
UpgradeFragment(
Kby(9,100),
'SingleElectronPt10')),
1301 (
'SingleElectronPt35_pythia8_cfi',
UpgradeFragment(
Kby(9,100),
'SingleElectronPt35')),
1302 (
'SingleElectronPt1000_pythia8_cfi',
UpgradeFragment(
Kby(9,50),
'SingleElectronPt1000')),
1309 (
'FourMuExtendedPt_1_200_pythia8_cfi',
UpgradeFragment(
Kby(10,100),
'FourMuExtendedPt1_200')),
1310 (
'TenMuExtendedE_0_200_pythia8_cfi',
UpgradeFragment(
Kby(10,100),
'TenMuExtendedE_0_200')),
1311 (
'DoubleElectronPt10Extended_pythia8_cfi',
UpgradeFragment(
Kby(9,100),
'SingleElPt10Extended')),
1312 (
'DoubleElectronPt35Extended_pythia8_cfi',
UpgradeFragment(
Kby(9,100),
'SingleElPt35Extended')),
1313 (
'DoubleElectronPt1000Extended_pythia8_cfi',
UpgradeFragment(
Kby(9,50),
'SingleElPt1000Extended')),
1314 (
'DoubleGammaPt10Extended_pythia8_cfi',
UpgradeFragment(
Kby(9,100),
'SingleGammaPt10Extended')),
1315 (
'DoubleGammaPt35Extended_pythia8_cfi',
UpgradeFragment(
Kby(9,50),
'SingleGammaPt35Extended')),
1316 (
'DoubleMuPt1Extended_pythia8_cfi',
UpgradeFragment(
Kby(25,100),
'SingleMuPt1Extended')),
1317 (
'DoubleMuPt10Extended_pythia8_cfi',
UpgradeFragment(
Kby(25,100),
'SingleMuPt10Extended')),
1318 (
'DoubleMuPt100Extended_pythia8_cfi',
UpgradeFragment(
Kby(9,100),
'SingleMuPt100Extended')),
1319 (
'DoubleMuPt1000Extended_pythia8_cfi',
UpgradeFragment(
Kby(9,100),
'SingleMuPt1000Extended')),
1322 (
'MinBias_13TeV_pythia8_TuneCUETP8M1_cfi',
UpgradeFragment(
Kby(90,100),
'MinBias_13')),
1325 (
'QCD_Pt_600_800_13TeV_TuneCUETP8M1_cfi',
UpgradeFragment(
Kby(9,50),
'QCD_Pt_600_800_13')),
1326 (
'Wjet_Pt_80_120_14TeV_TuneCUETP8M1_cfi',
UpgradeFragment(
Kby(9,100),
'Wjet_Pt_80_120_14TeV')),
1327 (
'Wjet_Pt_3000_3500_14TeV_TuneCUETP8M1_cfi',
UpgradeFragment(
Kby(9,50),
'Wjet_Pt_3000_3500_14TeV')),
1329 (
'QCD_Pt_3000_3500_14TeV_TuneCUETP8M1_cfi',
UpgradeFragment(
Kby(9,50),
'QCD_Pt_3000_3500_14TeV')),
1330 (
'QCD_Pt_80_120_14TeV_TuneCUETP8M1_cfi',
UpgradeFragment(
Kby(9,100),
'QCD_Pt_80_120_14TeV')),
1331 (
'H200ChargedTaus_Tauola_14TeV_cfi',
UpgradeFragment(
Kby(9,100),
'Higgs200ChargedTaus_14TeV')),
1335 (
'ZTT_Tauola_All_hadronic_14TeV_TuneCP5_cfi',
UpgradeFragment(
Kby(9,100),
'ZTT_14TeV')),
1336 (
'H130GGgluonfusion_14TeV_TuneCUETP8M1_cfi',
UpgradeFragment(
Kby(9,100),
'H130GGgluonfusion_14TeV')),
1337 (
'PhotonJet_Pt_10_14TeV_TuneCUETP8M1_cfi',
UpgradeFragment(
Kby(9,100),
'PhotonJets_Pt_10_14TeV')),
1338 (
'QQH1352T_Tauola_14TeV_TuneCUETP8M1_cfi',
UpgradeFragment(
Kby(9,100),
'QQH1352T_Tauola_14TeV')),
1342 (
'QCDForPF_14TeV_TuneCP5_cfi',
UpgradeFragment(
Kby(50,100),
'QCD_FlatPt_15_3000HS_14')),
1344 (
'DYToTauTau_M-50_14TeV_pythia8_tauola_cff',
UpgradeFragment(
Kby(9,100),
'DYtoTauTau_M_50_14TeV')),
1346 (
'QCD_Pt_80_120_13TeV_TuneCUETP8M1_cfi',
UpgradeFragment(
Kby(9,100),
'QCD_Pt_80_120_13')),
1347 (
'H125GGgluonfusion_13TeV_TuneCP5_cfi',
UpgradeFragment(
Kby(9,50),
'H125GGgluonfusion_13')),
1348 (
'QCD_Pt20toInf_MuEnrichedPt15_14TeV_TuneCP5_cff',
UpgradeFragment(
Kby(19565, 217391),
'QCD_Pt20toInfMuEnrichPt15_14')),
1350 (
'QCD_Pt15To7000_Flat_14TeV_TuneCP5_cff',
UpgradeFragment(
Kby(9,50),
'QCD_Pt15To7000_Flat_14')),
1351 (
'H125GGgluonfusion_14TeV_TuneCP5_cfi',
UpgradeFragment(
Kby(9,50),
'H125GGgluonfusion_14')),
1352 (
'QCD_Pt_600_800_14TeV_TuneCUETP8M1_cfi',
UpgradeFragment(
Kby(9,50),
'QCD_Pt_600_800_14')),
1355 (
'H200ChargedTaus_Tauola_13TeV_cfi',
UpgradeFragment(
Kby(9,50),
'Higgs200ChargedTaus_13')),
1356 (
'ADDMonoJet_13TeV_d3MD3_TuneCUETP8M1_cfi',
UpgradeFragment(
Kby(9,50),
'ADDMonoJet_d3MD3_13')),
1358 (
'QCD_Pt_3000_3500_13TeV_TuneCUETP8M1_cfi',
UpgradeFragment(
Kby(9,50),
'QCD_Pt_3000_3500_13')),
1365 (
'PhotonJet_Pt_10_13TeV_TuneCUETP8M1_cfi',
UpgradeFragment(
Kby(9,50),
'PhotonJets_Pt_10_13')),
1367 (
'Wjet_Pt_80_120_13TeV_TuneCUETP8M1_cfi',
UpgradeFragment(
Kby(9,50),
'Wjet_Pt_80_120_13')),
1368 (
'Wjet_Pt_3000_3500_13TeV_TuneCUETP8M1_cfi',
UpgradeFragment(
Kby(9,50),
'Wjet_Pt_3000_3500_13')),
1369 (
'SMS-T1tttt_mGl-1500_mLSP-100_13TeV-pythia8_cfi',
UpgradeFragment(
Kby(9,50),
'SMS-T1tttt_mGl-1500_mLSP-100_13')),
1370 (
'QCDForPF_13TeV_TuneCUETP8M1_cfi',
UpgradeFragment(
Kby(50,100),
'QCD_FlatPt_15_3000HS_13')),
1371 (
'PYTHIA8_PhiToMuMu_TuneCUETP8M1_13TeV_cff',
UpgradeFragment(
Kby(9,50),
'PhiToMuMu_13')),
1372 (
'RSKKGluon_m3000GeV_13TeV_TuneCUETP8M1_cff',
UpgradeFragment(
Kby(9,50),
'RSKKGluon_m3000GeV_13')),
1376 (
'Upsilon1SToMuMu_forSTEAM_13TeV_TuneCUETP8M1_cfi',
UpgradeFragment(
Kby(9,50),
'Upsilon1SToMuMu_13')),
1377 (
'EtaBToJpsiJpsi_forSTEAM_TuneCUEP8M1_13TeV_cfi',
UpgradeFragment(
Kby(9,50),
'EtaBToJpsiJpsi_13')),
1378 (
'JpsiMuMu_Pt-8_forSTEAM_13TeV_TuneCUETP8M1_cfi',
UpgradeFragment(
Kby(3100,100000),
'JpsiMuMu_Pt-8')),
1379 (
'BuMixing_BMuonFilter_forSTEAM_13TeV_TuneCUETP8M1_cfi',
UpgradeFragment(
Kby(900,10000),
'BuMixing_13')),
1380 (
'HSCPstop_M_200_TuneCUETP8M1_13TeV_pythia8_cff',
UpgradeFragment(
Kby(9,50),
'HSCPstop_M_200_13')),
1381 (
'RSGravitonToGammaGamma_kMpl01_M_3000_TuneCUETP8M1_13TeV_pythia8_cfi',
UpgradeFragment(
Kby(9,50),
'RSGravitonToGaGa_13')),
1382 (
'WprimeToENu_M-2000_TuneCUETP8M1_13TeV-pythia8_cff',
UpgradeFragment(
Kby(9,50),
'WpToENu_M-2000_13')),
1383 (
'DisplacedSUSY_stopToBottom_M_800_500mm_TuneCP5_13TeV_pythia8_cff',
UpgradeFragment(
Kby(9,50),
'DisplacedSUSY_stopToB_M_800_500mm_13')),
1385 (
'FlatRandomPtAndDxyGunProducer_cfi',
UpgradeFragment(
Kby(9,100),
'DisplacedMuonsDxy_0_500')),
1387 (
'SinglePiPt25Eta1p7_2p7_cfi',
UpgradeFragment(
Kby(9,100),
'SinglePiPt25Eta1p7_2p7')),
1388 (
'SingleMuPt15Eta1p7_2p7_cfi',
UpgradeFragment(
Kby(9,100),
'SingleMuPt15Eta1p7_2p7')),
1389 (
'SingleGammaPt25Eta1p7_2p7_cfi',
UpgradeFragment(
Kby(9,100),
'SingleGammaPt25Eta1p7_2p7')),
1390 (
'SingleElectronPt15Eta1p7_2p7_cfi',
UpgradeFragment(
Kby(9,100),
'SingleElectronPt15Eta1p7_2p7')),
1392 (
'CloseByParticle_Photon_ERZRanges_cfi',
UpgradeFragment(
Kby(9,100),
'CloseByParticleGun')),
1393 (
'CE_E_Front_300um_cfi',
UpgradeFragment(
Kby(9,100),
'CloseByPGun_CE_E_Front_300um')),
1394 (
'CE_E_Front_200um_cfi',
UpgradeFragment(
Kby(9,100),
'CloseByPGun_CE_E_Front_200um')),
1395 (
'CE_E_Front_120um_cfi',
UpgradeFragment(
Kby(9,100),
'CloseByPGun_CE_E_Front_120um')),
1399 (
'CE_H_Coarse_Scint_cfi',
UpgradeFragment(
Kby(9,100),
'CloseByPGun_CE_H_Coarse_Scint')),
1400 (
'CE_H_Coarse_300um_cfi',
UpgradeFragment(
Kby(9,100),
'CloseByPGun_CE_H_Coarse_300um')),
1401 (
'SingleElectronFlatPt2To100_cfi',
UpgradeFragment(
Kby(9,100),
'SingleEFlatPt2To100')),
1404 (
'SingleGammaFlatPt8To150_cfi',
UpgradeFragment(
Kby(9,100),
'SingleGammaFlatPt8To150')),
1407 (
'FlatRandomPtAndDxyGunProducer_MuPt2To10_cfi',
UpgradeFragment(
Kby(9,100),
'DisplacedMuPt2To10')),
1408 (
'FlatRandomPtAndDxyGunProducer_MuPt10To30_cfi',
UpgradeFragment(
Kby(9,100),
'DisplacedMuPt10To30')),
1409 (
'FlatRandomPtAndDxyGunProducer_MuPt30To100_cfi',
UpgradeFragment(
Kby(9,100),
'DisplacedMuPt30To100')),
1410 (
'B0ToKstarMuMu_14TeV_TuneCP5_cfi',
UpgradeFragment(
Kby(304,3030),
'B0ToKstarMuMu_14TeV')),
1412 (
'BsToJpsiGamma_14TeV_TuneCP5_cfi',
UpgradeFragment(
Kby(2500,25000),
'BsToJpsiGamma_14TeV')),
1413 (
'BsToJpsiPhi_mumuKK_14TeV_TuneCP5_cfi',
UpgradeFragment(
Kby(910,9090),
'BsToJpsiPhi_mumuKK_14TeV')),
1415 (
'BsToPhiPhi_KKKK_14TeV_TuneCP5_cfi',
UpgradeFragment(
Kby(556,5555),
'BsToPhiPhi_KKKK_14TeV')),
1416 (
'TauToMuMuMu_14TeV_TuneCP5_cfi',
UpgradeFragment(
Kby(18939,189393),
'TauToMuMuMu_14TeV')),
1417 (
'BdToKstarEleEle_14TeV_TuneCP5_cfi',
UpgradeFragment(
Kby(206,2061),
'BdToKstarEleEle_14TeV')),
1419 (
'BuMixing_BMuonFilter_forSTEAM_14TeV_TuneCP5_cfi',
UpgradeFragment(
Kby(900,10000),
'BuMixing_14')),
1420 (
'Upsilon1SToMuMu_forSTEAM_14TeV_TuneCP5_cfi',
UpgradeFragment(
Kby(9,50),
'Upsilon1SToMuMu_14')),
1421 (
'TenTau_E_15_500_Eta3p1_pythia8_cfi',
UpgradeFragment(
Kby(9,100),
'TenTau_15_500_Eta3p1')),
1422 (
'QCD_Pt_1800_2400_14TeV_TuneCP5_cfi',
UpgradeFragment(
Kby(9,50),
'QCD_Pt_1800_2400_14')),
1423 (
'DisplacedSUSY_stopToBottom_M_800_500mm_TuneCP5_14TeV_pythia8_cff',
UpgradeFragment(
Kby(9,50),
'DisplacedSUSY_14TeV')),
1424 (
'GluGluTo2Jets_M_300_2000_14TeV_Exhume_cff',
UpgradeFragment(
Kby(9,100),
'GluGluTo2Jets_14TeV')),