From 47ae27e7ab370495835788731b234817736f22a3 Mon Sep 17 00:00:00 2001 From: Andre Govinda Stahl Leiton Date: Sun, 18 Aug 2024 04:18:12 +0200 Subject: [PATCH] Add Phase2 PbPb process modifier --- .../Hydjet_Quenched_MinBias_5519GeV_cfi.py | 28 +++++++++++++++++++ .../python/Pyquen2015Settings_cff.py | 4 +++ .../python/phase2_pp_on_AA_cff.py | 3 ++ Configuration/PyReleaseValidation/README.md | 1 + .../PyReleaseValidation/python/relval_2026.py | 1 + .../python/upgradeWorkflowComponents.py | 26 ++++++++++++++++- .../python/Reconstruction_cff.py | 2 ++ .../plugins/CentralityProducer.cc | 5 +++- .../python/HiCentrality_cfi.py | 9 +++++- .../python/RecoJets_EventContent_cff.py | 3 +- 10 files changed, 78 insertions(+), 4 deletions(-) create mode 100644 Configuration/Generator/python/Hydjet_Quenched_MinBias_5519GeV_cfi.py create mode 100644 Configuration/ProcessModifiers/python/phase2_pp_on_AA_cff.py diff --git a/Configuration/Generator/python/Hydjet_Quenched_MinBias_5519GeV_cfi.py b/Configuration/Generator/python/Hydjet_Quenched_MinBias_5519GeV_cfi.py new file mode 100644 index 0000000000000..9df061003cb9d --- /dev/null +++ b/Configuration/Generator/python/Hydjet_Quenched_MinBias_5519GeV_cfi.py @@ -0,0 +1,28 @@ +import FWCore.ParameterSet.Config as cms + +from Configuration.Generator.Pyquen2015Settings_cff import * + +generator = cms.EDFilter("HydjetGeneratorFilter", + collisionParameters5519GeV, + qgpParameters2023, + hydjetParameters2023, + hydjetMode = cms.string('kHydroQJets'), + PythiaParameters = cms.PSet(pyquenPythiaDefaultBlock, + # Quarkonia and Weak Bosons added back upon dilepton group's request. + parameterSets = cms.vstring('pythiaUESettings', + 'hydjetPythiaDefault', + 'myParameters', + 'pythiaJets', + 'pythiaPromptPhotons', + 'pythiaZjets', + 'pythiaBottomoniumNRQCD', + 'pythiaCharmoniumNRQCD', + 'pythiaQuarkoniaSettings', + 'pythiaWeakBosons' + ) + ), + cFlag = cms.int32(1), + bMin = cms.double(0), + bMax = cms.double(30), + bFixed = cms.double(0) + ) diff --git a/Configuration/Generator/python/Pyquen2015Settings_cff.py b/Configuration/Generator/python/Pyquen2015Settings_cff.py index d1430a33fe46d..74e30bda5d5bc 100644 --- a/Configuration/Generator/python/Pyquen2015Settings_cff.py +++ b/Configuration/Generator/python/Pyquen2015Settings_cff.py @@ -20,6 +20,10 @@ comEnergy = cms.double(5362.0) ) +collisionParameters5519GeV = cms.PSet(aBeamTarget = cms.double(208.0), ## beam/target atomic number + comEnergy = cms.double(5519.0) + ) + qgpParameters = cms.PSet(qgpInitialTemperature = cms.double(1.1), ## initial temperature of QGP; allowed range [0.2,2.0]GeV; qgpProperTimeFormation = cms.double(0.1), ## proper time of QGP formation; allowed range [0.01,10.0]fm/c; hadronFreezoutTemperature = cms.double(0.125), diff --git a/Configuration/ProcessModifiers/python/phase2_pp_on_AA_cff.py b/Configuration/ProcessModifiers/python/phase2_pp_on_AA_cff.py new file mode 100644 index 0000000000000..923fc361437c3 --- /dev/null +++ b/Configuration/ProcessModifiers/python/phase2_pp_on_AA_cff.py @@ -0,0 +1,3 @@ +import FWCore.ParameterSet.Config as cms + +phase2_pp_on_AA = cms.Modifier() diff --git a/Configuration/PyReleaseValidation/README.md b/Configuration/PyReleaseValidation/README.md index cb04a44c6764f..425f1c2993774 100644 --- a/Configuration/PyReleaseValidation/README.md +++ b/Configuration/PyReleaseValidation/README.md @@ -64,6 +64,7 @@ The offsets currently in use are: * 0.78: Complete L1 workflow * 0.8: BPH Parking (Run-2) * 0.81: Running also HeavyFlavor DQM +* 0.85: Phase-2 Heavy Ion * 0.9: Vector hits * 0.12: Neutron background * 0.13: MLPF algorithm diff --git a/Configuration/PyReleaseValidation/python/relval_2026.py b/Configuration/PyReleaseValidation/python/relval_2026.py index 63c99bfd1922a..a286144e45546 100644 --- a/Configuration/PyReleaseValidation/python/relval_2026.py +++ b/Configuration/PyReleaseValidation/python/relval_2026.py @@ -55,6 +55,7 @@ numWFIB.extend([prefixDet+96.0]) #CloseByPGun CE_E_Front_120um numWFIB.extend([prefixDet+100.0]) #CloseByPGun CE_H_Coarse_Scint numWFIB.extend([prefixDet+61.0]) #Nu Gun +#numWFIB.extend([prefixDet+151.85]) #Heavy ion reconstruction #Default Phase-2 Det PU numWFIB.extend([prefixDet+261.97]) #premixing stage1 (NuGun+PU) numWFIB.extend([prefixDet+234.99]) #premixing combined stage1+stage2 ttbar+PU200 diff --git a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py index e55ea157ac589..2e1f3eda8be4c 100644 --- a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py +++ b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py @@ -2821,6 +2821,29 @@ def condition(self, fragment, stepList, key, hasHarvest): offset = 0.9001, ) +class UpgradeWorkflow_Phase2_HeavyIon(UpgradeWorkflow): + def setup_(self, step, stepName, stepDict, k, properties): + stepDict[stepName][k] = merge([{'--procModifiers': 'phase2_pp_on_AA'}, stepDict[step][k]]) + if 'GenSim' in step: + stepDict[stepName][k] = merge([{'--conditions': stepDict[step][k]["--conditions"].replace('_13TeV',''), '-n': 1}, stepDict[stepName][k]]) + elif 'Digi' in step: + stepDict[stepName][k] = merge([{'-s': stepDict[step][k]["-s"].replace("DIGI:pdigi_valid","DIGI:pdigi_hi"), '--pileup': 'HiMixNoPU'}, stepDict[stepName][k]]) + def condition(self, fragment, stepList, key, hasHarvest): + return fragment=='HydjetQMinBias_5519GeV' and '2026' in key and 'PU' not in key + +upgradeWFs['Phase2_HeavyIon'] = UpgradeWorkflow_Phase2_HeavyIon( + steps = [ + 'GenSimHLBeamSpot', + 'DigiTrigger', + 'RecoGlobal', + 'HARVESTGlobal', + 'ALCAPhase2' + ], + PU = [], + suffix = '_hi', + offset = 0.85, +) + # check for duplicate offsets offsets = [specialWF.offset for specialType,specialWF in upgradeWFs.items()] seen = set() @@ -3365,5 +3388,6 @@ def __init__(self, howMuch, dataset): ('LbToJpsiXiK0sPi_JMM_Filter_DGamma0_TuneCP5_13p6TeV-pythia8-evtgen_cfi',UpgradeFragment(Mby(50,500000),'LbToJpsiXiK0sPr_DGamma0_13p6TeV')), #0.6% ('OmegaMinus_13p6TeV_SoftQCDInel_TuneCP5_cfi',UpgradeFragment(Mby(100,1000000),'OmegaMinus_13p6TeV')), #0.1% ('Hydjet_Quenched_MinBias_5020GeV_cfi', UpgradeFragment(U2000by1,'HydjetQMinBias_5020GeV')), - ('Hydjet_Quenched_MinBias_5362GeV_cfi', UpgradeFragment(U2000by1,'HydjetQMinBias_5362GeV')) + ('Hydjet_Quenched_MinBias_5362GeV_cfi', UpgradeFragment(U2000by1,'HydjetQMinBias_5362GeV')), + ('Hydjet_Quenched_MinBias_5519GeV_cfi', UpgradeFragment(U2000by1,'HydjetQMinBias_5519GeV')), ]) diff --git a/Configuration/StandardSequences/python/Reconstruction_cff.py b/Configuration/StandardSequences/python/Reconstruction_cff.py index 5c08b6712a2e9..021f5f090cbe1 100644 --- a/Configuration/StandardSequences/python/Reconstruction_cff.py +++ b/Configuration/StandardSequences/python/Reconstruction_cff.py @@ -194,6 +194,8 @@ pp_on_AA.toReplaceWith(highlevelrecoTask,highlevelrecoTask.copyAndExclude([PFTauTask])) from Configuration.Eras.Modifier_ppRef_2024_cff import ppRef_2024 ppRef_2024.toReplaceWith(highlevelrecoTask, cms.Task(highlevelrecoTask.copy(), hiClusterCompatibility)) +from Configuration.ProcessModifiers.phase2_pp_on_AA_cff import phase2_pp_on_AA +phase2_pp_on_AA.toReplaceWith(highlevelrecoTask, cms.Task(highlevelrecoTask.copy(), hiClusterCompatibility, hiCentrality)) # not commisoned and not relevant in FastSim (?): _fastSim_highlevelrecoTask = highlevelrecoTask.copyAndExclude([muoncosmichighlevelrecoTask]) diff --git a/RecoHI/HiCentralityAlgos/plugins/CentralityProducer.cc b/RecoHI/HiCentralityAlgos/plugins/CentralityProducer.cc index ad219224affd4..bbb445c1cfece 100644 --- a/RecoHI/HiCentralityAlgos/plugins/CentralityProducer.cc +++ b/RecoHI/HiCentralityAlgos/plugins/CentralityProducer.cc @@ -80,6 +80,7 @@ namespace reco { const double trackEtaCut_; const double hfEtaCut_; + const bool isPhase2_; const bool reuseAny_; const bool useQuality_; const reco::TrackBase::TrackQuality trackQuality_; @@ -128,6 +129,7 @@ namespace reco { trackPtCut_(iConfig.getParameter("trackPtCut")), trackEtaCut_(iConfig.getParameter("trackEtaCut")), hfEtaCut_(iConfig.getParameter("hfEtaCut")), + isPhase2_(iConfig.getParameter("isPhase2")), reuseAny_(iConfig.getParameter("reUseCentrality")), useQuality_(iConfig.getParameter("useQuality")), trackQuality_(TrackBase::qualityByName(iConfig.getParameter("trackQuality"))), @@ -210,7 +212,7 @@ namespace reco { const CaloTower& tower = (*towers)[i]; double eta = tower.eta(); if (produceHFtowers_) { - bool isHF = tower.ietaAbs() > 29; + bool isHF = tower.ietaAbs() > (isPhase2_ ? 16 : 29); if (isHF && eta > 0) { creco->etHFtowerSumPlus_ += tower.pt(); if (tower.energy() > 1.5) @@ -539,6 +541,7 @@ namespace reco { desc.add("hfEtaCut", 4)->setComment("hf above the absolute value of this cut is used"); desc.add("midRapidityRange", 1); desc.add("lowGainZDC", true); + desc.add("isPhase2", false); descriptions.addDefault(desc); } diff --git a/RecoHI/HiCentralityAlgos/python/HiCentrality_cfi.py b/RecoHI/HiCentralityAlgos/python/HiCentrality_cfi.py index 2b01d0e3706ef..51503a73a0465 100644 --- a/RecoHI/HiCentralityAlgos/python/HiCentrality_cfi.py +++ b/RecoHI/HiCentralityAlgos/python/HiCentrality_cfi.py @@ -33,6 +33,7 @@ hfEtaCut = cms.double(4), #hf above the absolute value of this cut is used midRapidityRange = cms.double(1), lowGainZDC = cms.bool(True), + isPhase2 = cms.bool(False), ) @@ -45,4 +46,10 @@ srcTracks = "generalTracks", srcVertex = "offlinePrimaryVertices" ) - +from Configuration.ProcessModifiers.phase2_pp_on_AA_cff import phase2_pp_on_AA +phase2_pp_on_AA.toModify(hiCentrality, + isPhase2 = True, + producePixelTracks = False, + srcTracks = "generalTracks", + srcVertex = "offlinePrimaryVertices" +) diff --git a/RecoJets/Configuration/python/RecoJets_EventContent_cff.py b/RecoJets/Configuration/python/RecoJets_EventContent_cff.py index 4ed4208dac651..e6a8f65851b49 100644 --- a/RecoJets/Configuration/python/RecoJets_EventContent_cff.py +++ b/RecoJets/Configuration/python/RecoJets_EventContent_cff.py @@ -54,12 +54,13 @@ from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA from Configuration.Eras.Modifier_run3_upc_cff import run3_upc from Configuration.Eras.Modifier_ppRef_2024_cff import ppRef_2024 +from Configuration.ProcessModifiers.phase2_pp_on_AA_cff import phase2_pp_on_AA #products from regular pp which does not fit the normal AOD for e in [pA_2016, peripheralPbPb, pp_on_XeXe_2017, pp_on_AA]: e.toModify( RecoJetsAOD.outputCommands, func=lambda outputCommands: outputCommands.extend(['keep *_towerMaker_*_*']) ) -for e in [pp_on_XeXe_2017, pp_on_AA, run3_upc]: +for e in [pp_on_XeXe_2017, pp_on_AA, run3_upc, phase2_pp_on_AA]: e.toModify( RecoJetsAOD.outputCommands, func=lambda outputCommands: outputCommands.extend(['keep recoCentrality*_hiCentrality_*_*', 'keep recoClusterCompatibility*_hiClusterCompatibility_*_*'