Skip to content

Commit 10c5256

Browse files
authored
Merge pull request #45005 from AdrianoDee/genonly_simongen
Introducing `SimOnGen` and `GenOnly` wfs for 2024 and 2026D110
2 parents c2c7655 + 1250f1d commit 10c5256

File tree

4 files changed

+78
-10
lines changed

4 files changed

+78
-10
lines changed

Configuration/PyReleaseValidation/python/WorkFlowRunner.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def __init__(self, wf, noRun=False,dryRun=False,cafVeto=True,dasOptions="",jobRe
2525
self.nStreams=nStreams
2626
self.maxSteps=maxSteps
2727
self.nEvents=nEvents
28+
self.recoOutput=''
2829

2930
self.wfDir=str(self.wf.numId)+'_'+self.wf.nameId
3031
return
@@ -158,9 +159,17 @@ def closeCmd(i,ID):
158159
# Disable input for premix stage2 in FastSim to allow combined stage1+stage2 workflow (in FS, stage2 does also GEN)
159160
# Ugly hack but works
160161
if istep!=1 and not '--filein' in cmd and not 'premix_stage1' in cmd and not ("--fast" in cmd and "premix_stage2" in cmd):
161-
cmd+=' --filein file:step%s.root '%(istep-1,)
162+
steps = cmd.split("-s ")[1].split(" ")[0] ## relying on the syntax: cmsDriver -s STEPS --otherFlags
163+
if "ALCA" not in steps:
164+
cmd+=' --filein file:step%s.root '%(istep-1,)
165+
elif "ALCA" in steps and "RECO" in steps:
166+
cmd+=' --filein file:step%s.root '%(istep-1,)
167+
else:
168+
cmd+=' --filein %s'%(self.recoOutput)
162169
if not '--fileout' in com:
163170
cmd+=' --fileout file:step%s.root '%(istep,)
171+
if "RECO" in cmd:
172+
self.recoOutput = "file:step%d.root"%(istep)
164173
if self.jobReport:
165174
cmd += ' --suffix "-j JobReport%s.xml " ' % istep
166175
if (self.nThreads > 1) and ('HARVESTING' not in cmd) and ('ALCAHARVEST' not in cmd):

Configuration/PyReleaseValidation/python/relval_steps.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4222,6 +4222,7 @@ def gen2023HiMix(fragment,howMuch):
42224222
defaultDataSets['2023FS']='CMSSW_13_0_11-130X_mcRun3_2023_realistic_withEarly2023BS_v1_FastSim-v'
42234223
defaultDataSets['2024']='CMSSW_14_0_0_pre3-140X_mcRun3_2024_realistic_v1_STD_2024_noPU-v'
42244224
defaultDataSets['2024HLTOnDigi']='CMSSW_14_0_0_pre3-140X_mcRun3_2024_realistic_v1_STD_2024_noPU-v'
4225+
defaultDataSets["2024SimOnGen"] = 'CMSSW_14_0_0_pre3-140X_mcRun3_2024_realistic_v1_STD_2024_noPU-v'
42254226
defaultDataSets['2026D49']='CMSSW_12_0_0_pre4-113X_mcRun4_realistic_v7_2026D49noPU-v'
42264227
defaultDataSets['2026D76']='CMSSW_12_0_0_pre4-113X_mcRun4_realistic_v7_2026D76noPU-v'
42274228
defaultDataSets['2026D77']='CMSSW_12_1_0_pre2-113X_mcRun4_realistic_v7_2026D77noPU-v'
@@ -4303,6 +4304,7 @@ def gen2023HiMix(fragment,howMuch):
43034304
'--eventcontent': 'FEVTDEBUG',
43044305
'--geometry' : geom
43054306
}
4307+
43064308
if beamspot is not None: upgradeStepDict['GenSim'][k]['--beamspot']=beamspot
43074309

43084310
upgradeStepDict['GenSimHLBeamSpot'][k]= {'-s' : 'GEN,SIM',
@@ -4332,6 +4334,18 @@ def gen2023HiMix(fragment,howMuch):
43324334
'--geometry' : geom
43334335
}
43344336

4337+
upgradeStepDict['Sim'][k]= {'-s' : 'SIM',
4338+
'-n' : 10,
4339+
'--conditions' : gt,
4340+
'--beamspot' : 'Realistic25ns13TeVEarly2017Collision',
4341+
'--datatier' : 'SIM',
4342+
'--eventcontent': 'FEVTDEBUG',
4343+
'--geometry' : geom
4344+
}
4345+
4346+
if beamspot is not None: upgradeStepDict['Sim'][k]['--beamspot']=beamspot
4347+
4348+
43354349
upgradeStepDict['Digi'][k] = {'-s':'DIGI:pdigi_valid,L1,DIGI2RAW,HLT:%s'%(hltversion),
43364350
'--conditions':gt,
43374351
'--datatier':'GEN-SIM-DIGI-RAW',
@@ -4462,7 +4476,6 @@ def gen2023HiMix(fragment,howMuch):
44624476
'-n':'10',
44634477
'--eventcontent':'ALCARECO',
44644478
'--geometry' : geom,
4465-
'--filein':'file:step3.root'
44664479
}
44674480

44684481
upgradeStepDict['ALCAPhase2'][k] = merge([{'-s':'ALCA:SiPixelCalSingleMuonLoose+SiPixelCalSingleMuonTight+TkAlMuonIsolated+TkAlMinBias+MuAlOverlaps+EcalESAlign+TkAlZMuMu+TkAlDiMuonAndVertex+HcalCalHBHEMuonProducerFilter+TkAlUpsilonMuMu+TkAlJpsiMuMu'},upgradeStepDict['ALCA'][k]])
@@ -4546,7 +4559,7 @@ def gen2023HiMix(fragment,howMuch):
45464559

45474560
for step in upgradeStepDict.keys():
45484561
# we need to do this for each fragment
4549-
if ('Sim' in step and 'Fast' not in step) or ('Premix' in step) or ('Sim' not in step and 'Gen' in step):
4562+
if ('Sim' in step and ('Fast' not in step and step != 'Sim')) or ('Premix' in step) or ('Sim' not in step and 'Gen' in step):
45504563
for frag,info in upgradeFragments.items():
45514564
howMuch=info.howMuch
45524565
for key in [key for year in upgradeKeys for key in upgradeKeys[year]]:

Configuration/PyReleaseValidation/python/relval_upgrade.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ def makeStepName(key,frag,step,suffix):
1616

1717
#just define all of them
1818

19+
## ... but we don't need all the flavors for the GenOnly
20+
def notForGenOnly(key,specialType):
21+
return "GenOnly" in key and specialType != 'baseline'
22+
1923
for year in upgradeKeys:
2024
for i,key in enumerate(upgradeKeys[year]):
2125
numWF=numWFAll[year][i]
@@ -26,11 +30,13 @@ def makeStepName(key,frag,step,suffix):
2630
continue
2731
stepList={}
2832
for specialType in upgradeWFs.keys():
33+
if notForGenOnly(key,specialType):
34+
continue
2935
stepList[specialType] = []
3036
hasHarvest = False
3137
for step in upgradeProperties[year][key]['ScenToRun']:
3238
stepMaker = makeStepName
33-
if 'Sim' in step and 'Fast' not in step:
39+
if 'Sim' in step and 'Fast' not in step and step != "Sim":
3440
if 'HLBeamSpot' in step:
3541
if '14TeV' in frag:
3642
step = 'GenSimHLBeamSpot14'
@@ -43,6 +49,10 @@ def makeStepName(key,frag,step,suffix):
4349
if 'HARVEST' in step: hasHarvest = True
4450

4551
for specialType,specialWF in upgradeWFs.items():
52+
53+
if notForGenOnly(key,specialType): ## we don't need all the flavors for the GEN
54+
continue
55+
4656
if (specialType != 'baseline') and ( ('PU' in step and step.replace('PU','') in specialWF.PU) or (step in specialWF.steps) ):
4757
stepList[specialType].append(stepMaker(key,frag[:-4],step,specialWF.suffix))
4858
# hack to add an extra step
@@ -71,6 +81,8 @@ def makeStepName(key,frag,step,suffix):
7181

7282
for specialType,specialWF in upgradeWFs.items():
7383
# remove other steps for premixS1
84+
if notForGenOnly(key,specialType):
85+
continue
7486
if specialType=="PMXS1":
7587
stepList[specialType] = stepList[specialType][:1]
7688
specialWF.workflow(workflows, numWF, info.dataset, stepList[specialType], key, hasHarvest)

Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@
3737
'2023HI',
3838
'2023HIRP', #RawPrime
3939
'2024HLTOnDigi',
40-
'2024HLTOnDigiPU'
41-
40+
'2024HLTOnDigiPU',
41+
'2024GenOnly',
42+
'2024SimOnGen',
4243
]
4344

4445
upgradeKeys[2026] = [
@@ -93,7 +94,9 @@
9394
'2026D113',
9495
'2026D113PU',
9596
'2026D114',
96-
'2026D114PU'
97+
'2026D114PU',
98+
'2026D110GenOnly',
99+
'2026D110SimOnGen',
97100
]
98101

99102
# pre-generation of WF numbers
@@ -178,7 +181,7 @@ def workflow_(self, workflows, num, fragment, stepList, key):
178181
def condition(self, fragment, stepList, key, hasHarvest):
179182
return False
180183
def preventReuse(self, stepName, stepDict, k):
181-
if "Sim" in stepName:
184+
if "Sim" in stepName and stepName != "Sim":
182185
stepDict[stepName][k] = None
183186
if "Gen" in stepName:
184187
stepDict[stepName][k] = None
@@ -198,6 +201,7 @@ def condition(self, fragment, stepList, key, hasHarvest):
198201
upgradeWFs['baseline'] = UpgradeWorkflow_baseline(
199202
steps = [
200203
'Gen',
204+
'Sim',
201205
'GenSim',
202206
'GenSimHLBeamSpot',
203207
'GenSimHLBeamSpot14',
@@ -2620,7 +2624,7 @@ def condition(self, fragment, stepList, key, hasHarvest):
26202624

26212625
class UpgradeWorkflow_Run3FSMBMixing(UpgradeWorkflow):
26222626
def setup_(self, step, stepName, stepDict, k, properties):
2623-
if 'Gen' in step:
2627+
if 'Gen' in step and 'GenOnly' not in step:
26242628
stepDict[stepName][k] = merge([{'-s':'GEN,SIM,RECOBEFMIX',
26252629
'--fast':'',
26262630
'--era':'Run3_FastSim',
@@ -2933,7 +2937,22 @@ def condition(self, fragment, stepList, key, hasHarvest):
29332937
'Era':'Run3_pp_on_PbPb_approxSiStripClusters',
29342938
'BeamSpot': 'DBrealistic',
29352939
'ScenToRun' : ['GenSim','Digi','RecoNano','HARVESTNano','ALCA'],
2936-
}
2940+
},
2941+
'2024GenOnly' : {
2942+
'Geom' : 'DB:Extended',
2943+
'GT' : 'auto:phase1_2024_realistic',
2944+
'Era' : 'Run3',
2945+
'BeamSpot': 'DBrealistic',
2946+
'ScenToRun' : ['Gen'],
2947+
},
2948+
'2024SimOnGen' : {
2949+
'Geom' : 'DB:Extended',
2950+
'GT' : 'auto:phase1_2024_realistic',
2951+
'HLTmenu': '@relval2024',
2952+
'Era' : 'Run3',
2953+
'BeamSpot': 'DBrealistic',
2954+
'ScenToRun' : ['Gen','Sim','Digi','RecoNano','HARVESTNano','ALCA'],
2955+
},
29372956
}
29382957

29392958
# standard PU sequences
@@ -3133,6 +3152,21 @@ def condition(self, fragment, stepList, key, hasHarvest):
31333152
'Era' : 'Phase2C17I13M9',
31343153
'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
31353154
},
3155+
'2026D110GenOnly' : {
3156+
'Geom' : 'Extended2026D110',
3157+
'Beamspot' : 'HLLHC',
3158+
'GT' : 'auto:phase2_realistic_T33',
3159+
'Era' : 'Phase2C17I13M9',
3160+
'ScenToRun' : ['Gen'],
3161+
},
3162+
'2026D110SimOnGen' : {
3163+
'Geom' : 'Extended2026D110',
3164+
'HLTmenu': '@relval2026',
3165+
'Beamspot' : 'HLLHC',
3166+
'GT' : 'auto:phase2_realistic_T33',
3167+
'Era' : 'Phase2C17I13M9',
3168+
'ScenToRun' : ['Gen','Sim','DigiTrigger','RecoGlobal', 'HARVESTGlobal', 'ALCAPhase2'],
3169+
},
31363170
}
31373171

31383172
# standard PU sequences

0 commit comments

Comments
 (0)