From eb0cb0b8842fd17b390611409d73d89c8f829f0a Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Mon, 8 Sep 2025 14:29:43 +0100 Subject: [PATCH] Configure RICH PID tuple to use options.ntuple_file when option is set --- .../python/RecoConf/rich_data_monitoring.py | 13 ++++++++++--- Hlt/RecoConf/python/RecoConf/rich_mc_checking.py | 13 ++++++++++--- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/Hlt/RecoConf/python/RecoConf/rich_data_monitoring.py b/Hlt/RecoConf/python/RecoConf/rich_data_monitoring.py index 355654a9acf..b528691c993 100644 --- a/Hlt/RecoConf/python/RecoConf/rich_data_monitoring.py +++ b/Hlt/RecoConf/python/RecoConf/rich_data_monitoring.py @@ -11,6 +11,7 @@ from Configurables import NTupleSvc from GaudiKernel.SystemOfUnits import GeV +from Moore import options from PyConf import configurable from PyConf.Algorithms import ( Rich__Future__MC__DummyTrackToMCParticleRelations as DummyTkToMCPRels, @@ -638,9 +639,15 @@ def make_rich_track_monitors( key = "PIDTuple" if key in monitors and moni_opts["EnablePIDTuple"]: # NTupleSvc - lun = "RICHPIDTUPLEDATA" + track_name.upper() - ntuple = track_name + ".Data-PIDTuple.root" - NTupleSvc().Output += [lun + " DATAFILE='" + ntuple + "' TYP='ROOT' OPT='NEW'"] + if len(options.ntuple_file) > 0: + # Use the centrally defined ntuple output file + lun = options.ntuple_lun + else: + lun = "RICHPIDTUPLEDATA" + track_name.upper() + ntuple = track_name + ".Data-PIDTuple.root" + NTupleSvc().Output += [ + lun + " DATAFILE='" + ntuple + "' TYP='ROOT' OPT='NEW'" + ] # Momentum cuts (min,max) pCutsPID = moni_opts["MomCutsForTuple"] # Make a PID monitor for this selection diff --git a/Hlt/RecoConf/python/RecoConf/rich_mc_checking.py b/Hlt/RecoConf/python/RecoConf/rich_mc_checking.py index 63682e88197..9fb2ab2994d 100644 --- a/Hlt/RecoConf/python/RecoConf/rich_mc_checking.py +++ b/Hlt/RecoConf/python/RecoConf/rich_mc_checking.py @@ -11,6 +11,7 @@ from Configurables import NTupleSvc from GaudiKernel.SystemOfUnits import GeV +from Moore import options from PyConf import configurable from PyConf.Algorithms import ( Rich__Future__MC__TrackToMCParticleRelations as TkToMCPRels, @@ -355,9 +356,15 @@ def make_rich_checkers(conf, reco_opts, check_opts, moni_set="Standard"): key = "PIDTuple" if key in checkers and check_opts["EnablePIDTuple"]: # NTupleSvc - lun = "RICHPIDTUPLEMC" + track_name.upper() - ntuple = track_name + ".MC-PIDTuple.root" - NTupleSvc().Output += [lun + " DATAFILE='" + ntuple + "' TYP='ROOT' OPT='NEW'"] + if len(options.ntuple_file) > 0: + # Use the centrally defined ntuple output file + lun = options.ntuple_lun + else: + lun = "RICHPIDTUPLEMC" + track_name.upper() + ntuple = track_name + ".MC-PIDTuple.root" + NTupleSvc().Output += [ + lun + " DATAFILE='" + ntuple + "' TYP='ROOT' OPT='NEW'" + ] # Momentum cuts (min,max) pCutsPID = check_opts["MomCutsForTuple"] # Make a PID monitor for this selection -- GitLab