Skip to content

Commit

Permalink
Merge pull request #45387 from francescobrivio/alca-consume_simBeamSp…
Browse files Browse the repository at this point in the history
…otHLLHC

New SimBeamSpotHLLHC tags in Phase-2 MC GT and make Phase-2 workflows consume it
  • Loading branch information
cmsbuild authored Jul 9, 2024
2 parents 10224b1 + c888742 commit e232a9b
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 5 deletions.
6 changes: 5 additions & 1 deletion Configuration/AlCa/python/autoCond.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
# GlobalTag for MC production with realistic conditions for Phase1 2024 detector for Heavy Ion
'phase1_2024_realistic_hi' : '141X_mcRun3_2024_realistic_HI_v4',
# GlobalTag for MC production with realistic conditions for Phase2
'phase2_realistic' : '140X_mcRun4_realistic_v4'
'phase2_realistic' : '141X_mcRun4_realistic_v1'
}

aliases = {
Expand All @@ -126,6 +126,10 @@
from Configuration.AlCa.autoCondPhase2 import autoCondPhase2
autoCond = autoCondPhase2(autoCond)

# special GTs for phase-2 with BeamSpot at 13 TeV (instead of 14 TeV)
from Configuration.AlCa.autoCondModifiers import autoCondBSHLLHC13TeV
autoCond = autoCondBSHLLHC13TeV(autoCond)

# special cases modifier for autoCond GTs
from Configuration.AlCa.autoCondModifiers import autoCond0T
autoCond = autoCond0T(autoCond)
Expand Down
17 changes: 17 additions & 0 deletions Configuration/AlCa/python/autoCondModifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,20 @@ def autoCondRelValForRun3(autoCond):
autoCond.update(GlobalTagRelValForRun3)
return autoCond

def autoCondBSHLLHC13TeV(autoCond):

GlobalTagBSHLLHC13TeV = {}
SimBeamSpotForHLLHC13TeV = ','.join( ['SimBeamSpotHLLHCObjects_z4p3cm_t193ns_13TeV_nominal_mc_v1', "SimBeamSpotHLLHCObjectsRcd", connectionString, "", "2024-07-04 15:00:00.000"] )

for key,val in autoCond.items():
if 'phase2_realistic' in key:
# If 'phase2_realistic_T' is in key, it means it was already modified
# by autoCondPhase2: simply add to the already existing tuple
if 'phase2_realistic_T' in key:
GlobalTagBSHLLHC13TeV[key+'_13TeV'] = autoCond[key] + (SimBeamSpotForHLLHC13TeV,)
# Else, build the tuple as done in the rest of the autoCondModifiers
else:
GlobalTagBSHLLHC13TeV[key+'_13TeV'] = (autoCond[key], SimBeamSpotForHLLHC13TeV)

autoCond.update(GlobalTagBSHLLHC13TeV)
return autoCond
8 changes: 4 additions & 4 deletions Configuration/PyReleaseValidation/python/relval_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,7 @@ def genS(fragment,howMuch):
'--scenario':'cosmics',
'--era': phase2CosInfo['Era'],
'--geometry': phase2CosInfo['Geom'],
'--beamspot':'HLLHC14TeV'},Kby(666,100000),step1Defaults])
'--beamspot':'DBrealisticHLLHC'},Kby(666,100000),step1Defaults])

steps['BeamHalo']=merge([{'cfg':'BeamHalo_cfi.py','--scenario':'cosmics'},Kby(9,100),step1Defaults])
steps['BeamHalo_13']=merge([{'cfg':'BeamHalo_13TeV_cfi.py','--scenario':'cosmics'},Kby(9,100),step1Up2015Defaults])
Expand Down Expand Up @@ -4311,8 +4311,8 @@ def gen2023HiMix(fragment,howMuch):

upgradeStepDict['GenSimHLBeamSpot'][k]= {'-s' : 'GEN,SIM',
'-n' : 10,
'--conditions' : gt,
'--beamspot' : 'HLLHC',
'--conditions' : gt+'_13TeV',
'--beamspot' : 'DBrealisticHLLHC',
'--datatier' : 'GEN-SIM',
'--eventcontent': 'FEVTDEBUG',
'--geometry' : geom
Expand All @@ -4321,7 +4321,7 @@ def gen2023HiMix(fragment,howMuch):
upgradeStepDict['GenSimHLBeamSpot14'][k]= {'-s' : 'GEN,SIM',
'-n' : 10,
'--conditions' : gt,
'--beamspot' : 'HLLHC14TeV',
'--beamspot' : 'DBrealisticHLLHC',
'--datatier' : 'GEN-SIM',
'--eventcontent': 'FEVTDEBUG',
'--geometry' : geom
Expand Down
1 change: 1 addition & 0 deletions Configuration/StandardSequences/python/VtxSmeared.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
VtxSmeared = {
'DBdesign': 'IOMC.EventVertexGenerators.VtxSmearedDesign_cfi',
'DBrealistic': 'IOMC.EventVertexGenerators.VtxSmearedRealistic_cfi',
'DBrealisticHLLHC': 'IOMC.EventVertexGenerators.VtxSmearedRealisticHLLHC_cfi',
'NoSmear': 'Configuration.StandardSequences.VtxSmearedNoSmear_cff',
'BetafuncEarlyCollision': 'IOMC.EventVertexGenerators.VtxSmearedBetafuncEarlyCollision_cfi',
'BeamProfile': 'IOMC.EventVertexGenerators.VtxSmearedBeamProfile_cfi',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import FWCore.ParameterSet.Config as cms

# Load HLLHCEvtVtxGenerator and read parameters from GT (SimBeamSpotHLLHCObjectsRcd)
from IOMC.EventVertexGenerators.HLLHCEvtVtxGenerator_cfi import HLLHCEvtVtxGenerator
VtxSmeared = HLLHCEvtVtxGenerator.clone(
src = "generator:unsmeared",
readDB = True
)

0 comments on commit e232a9b

Please sign in to comment.