From 9760d10488aa44cd277b7fdfa7cbbad15bc0be62 Mon Sep 17 00:00:00 2001 From: Patrick Spradlin Date: Thu, 15 May 2025 15:10:32 +0200 Subject: [PATCH 1/5] Update BeamSpotMon to use monitoring rb --- MooreOnlineConf/options/beamspot.py | 35 +++++++++++++---------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/MooreOnlineConf/options/beamspot.py b/MooreOnlineConf/options/beamspot.py index 14b1a5c13..439fa7f44 100644 --- a/MooreOnlineConf/options/beamspot.py +++ b/MooreOnlineConf/options/beamspot.py @@ -15,8 +15,8 @@ from RecoConf.standalone import reco_prefilters from RecoConf.legacy_rec_hlt1_tracking import (make_all_pvs, make_reco_pvs, make_PatPV3DFuture_pvs, make_VeloClusterTrackingSIMD) -from MooreOnlineConf.utils import update_and_reset, is_testbench -from DDDB.CheckDD4Hep import UseDD4Hep +from MooreOnlineConf.utils import (update_and_reset, is_testbench, passes_rb, + RoutingBit, common_monitors_node) from PyConf.Algorithms import BeamSpotMonitor from PyConf.application import make_odin from GaudiKernel.SystemOfUnits import mm, mm2 @@ -86,22 +86,22 @@ def run_hlt1_pvs_with_beamspotmoni(): def with_update_and_reset(): reco = run_hlt1_pvs_with_beamspotmoni() + ev_filters = [] + if options.input_type.lower() == 'online': - from PyConf.Algorithms import LHCb__IOVReset as IOVReset, OdinTypesFilter, HltRoutingBitsFilter + from PyConf.Algorithms import LHCb__IOVReset as IOVReset, OdinTypesFilter from PyConf.application import make_odin, default_raw_banks - odin_bb_filter = OdinTypesFilter( - ODIN=make_odin(), BXTypes=['BeamCrossing']) + ev_filters.extend([ + IOVReset(ODIN=make_odin()), + update_and_reset(), + common_monitors_node(), + OdinTypesFilter(ODIN=make_odin(), BXTypes=['BeamCrossing']), + ]) + + ev_filters.append(passes_rb(RoutingBit.LUMI)) - rb_filter = HltRoutingBitsFilter( - RawBanks=default_raw_banks('HltRoutingBits'), - RequireMask=(1 << 14, 0, 0), # Phys events - PassOnError=False) - return Reconstruction( - "with_update_and_reset", - [IOVReset(ODIN=make_odin()), - update_and_reset(), reco.node], - filters=[odin_bb_filter, rb_filter]) - return reco + return Reconstruction( + "with_update_and_reset", [reco.node], filters=ev_filters) # NOTE the switch to retina clusters is done in vp_retina_clusters.py @@ -110,8 +110,3 @@ with make_VeloClusterTrackingSIMD.bind(SkipForward=4),\ make_PatPV3DFuture_pvs.bind(velo_open=True, use_3D_seeding=True, use_beam_spot_cut=False),\ make_reco_pvs.bind(make_pvs_from_velo_tracks=make_PatPV3DFuture_pvs): run_reconstruction(options, with_update_and_reset) - -if UseDD4Hep: - from Configurables import LHCb__Det__LbDD4hep__DD4hepSvc - dd4hep_svc = LHCb__Det__LbDD4hep__DD4hepSvc() - dd4hep_svc.DetectorList = ['/world', 'VP'] -- GitLab From 671b4cf602a104f6b491faf95df37bda91818051 Mon Sep 17 00:00:00 2001 From: Patrick Spradlin Date: Thu, 15 May 2025 15:28:34 +0200 Subject: [PATCH 2/5] Removed unused import --- MooreOnlineConf/options/beamspot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MooreOnlineConf/options/beamspot.py b/MooreOnlineConf/options/beamspot.py index 439fa7f44..064e42973 100644 --- a/MooreOnlineConf/options/beamspot.py +++ b/MooreOnlineConf/options/beamspot.py @@ -90,7 +90,7 @@ def with_update_and_reset(): if options.input_type.lower() == 'online': from PyConf.Algorithms import LHCb__IOVReset as IOVReset, OdinTypesFilter - from PyConf.application import make_odin, default_raw_banks + from PyConf.application import make_odin ev_filters.extend([ IOVReset(ODIN=make_odin()), update_and_reset(), -- GitLab From 0945cbd18b700a924cfc8ef6b381ba9ea44c14e4 Mon Sep 17 00:00:00 2001 From: Patrick Spradlin Date: Thu, 26 Jun 2025 15:16:43 +0200 Subject: [PATCH 3/5] Reorganization of configuration python. --- MooreOnlineConf/options/beamspot.py | 31 +++++++++++++++++++---------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/MooreOnlineConf/options/beamspot.py b/MooreOnlineConf/options/beamspot.py index 064e42973..8915e005b 100644 --- a/MooreOnlineConf/options/beamspot.py +++ b/MooreOnlineConf/options/beamspot.py @@ -16,7 +16,8 @@ from RecoConf.legacy_rec_hlt1_tracking import (make_all_pvs, make_reco_pvs, make_PatPV3DFuture_pvs, make_VeloClusterTrackingSIMD) from MooreOnlineConf.utils import (update_and_reset, is_testbench, passes_rb, - RoutingBit, common_monitors_node) + if_then, and_, run_all, RoutingBit, + common_monitors_node) from PyConf.Algorithms import BeamSpotMonitor from PyConf.application import make_odin from GaudiKernel.SystemOfUnits import mm, mm2 @@ -85,23 +86,31 @@ def run_hlt1_pvs_with_beamspotmoni(): def with_update_and_reset(): reco = run_hlt1_pvs_with_beamspotmoni() + rb_filt = passes_rb(RoutingBit.LUMI) - ev_filters = [] + # Default configuration for running offline + top_node = reco.node + ev_filters = [rb_filt] - if options.input_type.lower() == 'online': - from PyConf.Algorithms import LHCb__IOVReset as IOVReset, OdinTypesFilter + if options.input_type.lower() == 'online': # Online config + from PyConf.Algorithms import (LHCb__IOVReset as IOVReset, + OdinTypesFilter) from PyConf.application import make_odin - ev_filters.extend([ - IOVReset(ODIN=make_odin()), - update_and_reset(), + + odin_bx_filt = OdinTypesFilter( + ODIN=make_odin(), BXTypes=['BeamCrossing']) + top_node = run_all("top", [ common_monitors_node(), - OdinTypesFilter(ODIN=make_odin(), BXTypes=['BeamCrossing']), + if_then("IfBXRb", and_("BXRb", [odin_bx_filt, rb_filt]), + reco.node), ]) - - ev_filters.append(passes_rb(RoutingBit.LUMI)) + ev_filters = [ + IOVReset(ODIN=make_odin()), + update_and_reset(), + ] return Reconstruction( - "with_update_and_reset", [reco.node], filters=ev_filters) + "with_update_and_reset", [top_node], filters=ev_filters) # NOTE the switch to retina clusters is done in vp_retina_clusters.py -- GitLab From a5dc5b67df37c18be90a98b77a3db8966e70fe27 Mon Sep 17 00:00:00 2001 From: Patrick Spradlin Date: Mon, 30 Jun 2025 16:24:49 +0200 Subject: [PATCH 4/5] Revert to using PHYSICS RB --- MooreOnlineConf/options/beamspot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MooreOnlineConf/options/beamspot.py b/MooreOnlineConf/options/beamspot.py index 8915e005b..c1567e5ca 100644 --- a/MooreOnlineConf/options/beamspot.py +++ b/MooreOnlineConf/options/beamspot.py @@ -86,7 +86,7 @@ def run_hlt1_pvs_with_beamspotmoni(): def with_update_and_reset(): reco = run_hlt1_pvs_with_beamspotmoni() - rb_filt = passes_rb(RoutingBit.LUMI) + rb_filt = passes_rb(RoutingBit.PHYSICS) # Default configuration for running offline top_node = reco.node -- GitLab From e6336d73f31c16d14e8f7fb05ab49198d04fe554 Mon Sep 17 00:00:00 2001 From: Patrick Spradlin Date: Wed, 20 Aug 2025 14:08:26 +0000 Subject: [PATCH 5/5] Apply 1 suggestion(s) to 1 file(s) Co-authored-by: Rosen Matev --- MooreOnlineConf/options/beamspot.py | 1 - 1 file changed, 1 deletion(-) diff --git a/MooreOnlineConf/options/beamspot.py b/MooreOnlineConf/options/beamspot.py index c1567e5ca..c68f16853 100644 --- a/MooreOnlineConf/options/beamspot.py +++ b/MooreOnlineConf/options/beamspot.py @@ -106,7 +106,6 @@ def with_update_and_reset(): ]) ev_filters = [ IOVReset(ODIN=make_odin()), - update_and_reset(), ] return Reconstruction( -- GitLab