diff --git a/AllenOnline/options/AllenConfig.py b/AllenOnline/options/AllenConfig.py
index 6f10d1041070dbf1fb2055a4c07b11f23d4ed496..262ca6f589ddd7b12b04d05bf4b0876bcdc520ef 100755
--- a/AllenOnline/options/AllenConfig.py
+++ b/AllenOnline/options/AllenConfig.py
@@ -10,6 +10,7 @@
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
 import os
+import sys
 import socket
 from itertools import chain
 from pathlib import Path
@@ -98,7 +99,7 @@ if initial_tck != 0:
     else:
         # Otherwise allow the repository to be set in an special
         # environment variable, but use the file content metadata repo
-        repo = "/group/hlt/commissioning/tck.git"
+        repo = os.getenv('TCK_REPO', '/cvmfs/lhcb.cern.ch/lib/lhcb/tcks.git')
     if not _is_repo(repo):
         raise RuntimeError(
             "Failed to find filecontent metadata repo for TCKs at {}".format(
@@ -211,21 +212,33 @@ if run_online:
     # which is set by the SMI controller to the total number of Allen instances in the architecture,
     # *minus one*.
     n_instances = int(os.getenv("NBOFSLAVES")) + 1
+    # The UTGID is set to {PARTITION}_{HOSTNAME}_Allen_{INSTANCE}, where {INSTANCE} is the instance
+    # number, starting from zero.
+    instance = int(os.getenv("UTGID").split("_")[3])
+
+    # Unsupported configuration
+    if n_instances > 3:
+        print(
+            f"ERROR: Unsupported HLT1 DAQ configuration with {n_instances} instances"
+        )
+        sys.exit(1)
+
     # The MBM options have a variable named Allen_Input{N} for each input buffer.
     input_buffers = [
         getattr(mbm_setup, a) for a in sorted(dir(mbm_setup))
         if a.startswith('Allen_Input')
     ]
-    # Only one Allen instance --> connect it to all BU buffers
-    # On sodin01 there is always just one BU (and one Allen)  which only writes to Events_0,
-    # so make sure Allen does not subscribe to Events_1 and does not hang waiting for events
-    if n_instances == 1 and socket.gethostname() != 'sodin01':
+    # Special case for sodin01, where there is a single BU and all Allen instances must read only
+    # from that BU's output buffer
+    if socket.gethostname() == 'sodin01':
+        mep_provider.Connections = [input_buffers[0]]
+    # Two cases to connect to all BU output buffers:
+    # - There is only one Allen instance
+    # - This is the third Allen instance
+    elif (n_instances == 1 or instance == 2):
         mep_provider.Connections = input_buffers
-    # Multiple Allen instances --> connect this instance to only one BU buffer
+    # There are multiple Allen instances and this the first or second instance
     else:
-        # The UTGID is set to {PARTITION}_{HOSTNAME}_Allen_{INSTANCE}, where {INSTANCE} is the
-        # instance number, starting from zero.
-        instance = int(os.getenv("UTGID").split("_")[3])
         mep_provider.Connections = [input_buffers[instance]]
     mep_provider.Requests = [
         'EvType=1;TriggerMask=0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF;VetoMask=0,0,0,0;MaskType=ANY;UserType=ONE;Frequency=PERC;Perc=100.0'
@@ -259,18 +272,7 @@ messageSvc.OutputLevel = 3
 
 # Add the services that will produce the non-event-data
 monSink = OnlMonitorSink(
-    CountersToPublish=[("Bursts", ".*"), ("Events", ".*"), ("MBMOutput", ".*"),
-                       ("EventLoop", ".*"), ("gather_selections",
-                                             "Hlt1.*Pass"),
-                       ("gather_selections", "Hlt1.*Rate"),
-                       ("velo_consolidate_tracks_ca09ac3f", "n_velo_tracks"),
-                       ("scifi_consolidate_seeds_7b68a248", "n_seed_tracks"),
-                       ("scifi_consolidate_tracks_85f4cc16", "n_long_tracks"),
-                       ("matching_consolidate_tracks_ie8943489",
-                        "n_long_tracks"),
-                       ("filter_clusters_ae8dd84a", "n_calo_clusters"),
-                       ("pv_beamline_cleanup_d0beb1db", "total_pvs")],
-    HistogramsToPublish=[(".*", ".*")])
+    CountersToPublish=[(".*", ".*")], HistogramsToPublish=[(".*", ".*")])
 appMgr.ExtSvc = [monSvc, monSink] + appMgr.ExtSvc
 
 appMgr.EvtSel = "NONE"
diff --git a/AllenOnline/src/MBMOutput.cpp b/AllenOnline/src/MBMOutput.cpp
index 661efba2d3339894934434a8f723dd5cf7fd51a5..7049014a4eade50357aa77bcb4b14536b2ef0ab1 100755
--- a/AllenOnline/src/MBMOutput.cpp
+++ b/AllenOnline/src/MBMOutput.cpp
@@ -161,7 +161,7 @@ StatusCode Allen::MBMOutput::initialize() {
   }
 
   m_burstsOutput = std::make_unique<Gaudi::Accumulators::Counter<>>( burstsSvc, "OUT" );
-  m_eventsOutput = std::make_unique<Gaudi::Accumulators::Counter<>>( eventsSvc, "STORED" );
+  m_eventsOutput = std::make_unique<Gaudi::Accumulators::Counter<>>( eventsSvc, "OUT" );
   m_mbOutput     = std::make_unique<Gaudi::Accumulators::Counter<>>( eventsSvc, "MB_OUT" );
 
   m_buffers.reserve( m_nThreads.value() );
diff --git a/AllenOnline/src/MEPProvider.cpp b/AllenOnline/src/MEPProvider.cpp
index 8363da58018ec2b794e0da52aa9dc56240cdeef2..7becf4073728f19a17dfeb8029e0ffab6baeae82 100755
--- a/AllenOnline/src/MEPProvider.cpp
+++ b/AllenOnline/src/MEPProvider.cpp
@@ -328,7 +328,7 @@ StatusCode MEPProvider::initialize() {
 
   m_mepsInput       = std::make_unique<Gaudi::Accumulators::Counter<>>( burstsSvc, "IN" );
   m_eventsInput     = std::make_unique<Gaudi::Accumulators::Counter<>>( eventsSvc, "IN" );
-  m_eventsToBatches = std::make_unique<Gaudi::Accumulators::Counter<>>( eventsSvc, "OUT" );
+  m_eventsToBatches = std::make_unique<Gaudi::Accumulators::Counter<>>( eventsSvc, "SLICED" );
   m_mbInput         = std::make_unique<Gaudi::Accumulators::Counter<>>( eventsSvc, "MB_IN" );
 
 #ifdef HAVE_MPI
@@ -1634,7 +1634,13 @@ void MEPProvider::transpose( int thread_id ) {
     // Update the interval to "cut off" the part at the end of the
     // interval with consecutive ODIN errors. If ODINs with invalid
     // bank types have been detected, cut off an extra event.
-    auto   last_valid = std::find_if( event_mask.rbegin(), event_mask.rend(), []( auto e ) { return e != 0; } );
+
+    // Note that the event mask size is not guaranteed to be the same
+    // as the interval size, because intervals may be smaller if the
+    // number of events per size is not an integer divider of the
+    // packing factor. Correct for that if necessary.
+    auto   rbegin     = event_mask.rbegin() + ( event_mask.size() - ( interval_end - interval_start ) );
+    auto   last_valid = std::find_if( rbegin, event_mask.rend(), []( auto e ) { return e != 0; } );
     size_t n_good     = std::distance( event_mask.begin(), last_valid.base() );
     if ( n_good > 0 ) n_good -= have_invalid_odin;
     std::get<1>( interval ) = interval_end = interval_start + n_good;
diff --git a/AllenOnline/tests/qmtest/test_lumi.qmt b/AllenOnline/tests/qmtest/test_lumi.qmt
index 5c508b7ddb7a15b6ee192e604f6373d3c47bc328..5595597f8ffdb4ebe77a96c017812d44c2ec0d1f 100644
--- a/AllenOnline/tests/qmtest/test_lumi.qmt
+++ b/AllenOnline/tests/qmtest/test_lumi.qmt
@@ -23,7 +23,7 @@ Run lumi decoding and encoding on Allen MDF output created from MEP input
   <argument name="unsupported_platforms"><set>
     <text>detdesc</text>
   </set></argument>
-  <argument name="reference"><text>${ALLENONLINEROOT}/tests/refs/test_lumi.ref</text></argument>
+  <argument name="reference"><text>../refs/test_lumi.ref</text></argument>
   <argument name="use_temp_dir"><enumeral>true</enumeral></argument>
   <argument name="validator"><text>
 
diff --git a/AllenOnline/tests/qmtest/test_mep_banks.qmt b/AllenOnline/tests/qmtest/test_mep_banks.qmt
index 46061228cdf2988951040a25f43d0e49549dc96f..fa7b9e116387fd1e37033df6b1f70e4dc373a5ae 100644
--- a/AllenOnline/tests/qmtest/test_mep_banks.qmt
+++ b/AllenOnline/tests/qmtest/test_mep_banks.qmt
@@ -24,7 +24,7 @@
   <argument name="prerequisites"><set>
     <tuple><text>mep_passthrough_no_ut</text><enumeral>PASS</enumeral></tuple>
   </set></argument>
-  <argument name="reference"><text>${ALLENONLINEROOT}/tests/refs/test_mep_banks.ref</text></argument>
+  <argument name="reference"><text>../refs/test_mep_banks.ref</text></argument>
   <argument name="timeout"><integer>600</integer></argument>
   <argument name="validator"><text>
 
diff --git a/AllenOnline/tests/qmtest/test_mep_banks_transpose.qmt b/AllenOnline/tests/qmtest/test_mep_banks_transpose.qmt
index 703501e72af53f139caf4eeb18ccd500467b3818..06badf12d80f25a3d5b5098191fddcc01b391b73 100644
--- a/AllenOnline/tests/qmtest/test_mep_banks_transpose.qmt
+++ b/AllenOnline/tests/qmtest/test_mep_banks_transpose.qmt
@@ -25,7 +25,7 @@
   <argument name="prerequisites"><set>
     <tuple><text>mep_passthrough_no_ut</text><enumeral>PASS</enumeral></tuple>
   </set></argument>
-  <argument name="reference"><text>${ALLENONLINEROOT}/tests/refs/test_mep_banks_transpose-SYMLINK-DO_NOT_UPDATE_WITH_NEW.ref</text></argument>
+  <argument name="reference"><text>../refs/test_mep_banks_transpose-SYMLINK-DO_NOT_UPDATE_WITH_NEW.ref</text></argument>
   <argument name="timeout"><integer>600</integer></argument>
   <argument name="validator"><text>
 
diff --git a/AllenOnline/tests/refs/mep_lumi.ref b/AllenOnline/tests/refs/mep_lumi.ref
index 5feec6c9177fc48f0ee5f0e8d110afecbae6ac44..cbc9dfe4e6d1d8a72c279b1adc31b46df3f105a9 100644
--- a/AllenOnline/tests/refs/mep_lumi.ref
+++ b/AllenOnline/tests/refs/mep_lumi.ref
@@ -8,6 +8,7 @@ ApplicationMgr                         INFO Application Manager Started successf
 HLTControlFlowMgr                      INFO Will measure time between events 0 and 0 (stop might be some events later)
 HLTControlFlowMgr                      INFO Starting loop on events
 DeviceFTGeometry                       INFO Conditions DB is compatible with FT bank version 7 and 8.
+DeviceFTGeometry                       INFO Deactivated 4 links.
 Starting timer for throughput measurement
 Input complete
 ApplicationMgr                         INFO Application Manager Stopped successfully
@@ -30,7 +31,7 @@ Events                                 INFO Number of counters : 3
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "IN"                                            |     30000 |
  | "MB_IN"                                         |      1186 |
- | "OUT"                                           |     30000 |
+ | "SLICED"                                        |     30000 |
 HLTControlFlowMgr                      INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "Processed events"                              |         1 |
@@ -48,7 +49,7 @@ gather_selections                      INFO Number of counters : 10
  | "Hlt1TAEPassthroughRate"                        |         6 |
 pv_beamline_cleanup                    INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
- | "n_PVs"                                         |     30000 |      39595 |     1.3198 |
+ | "n_PVs"                                         |     30000 |      59289 |     1.9763 |
 scifi_calculate_cluster_count_76...    INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "n_misordered_cluster"                          |      2772 |
@@ -57,4 +58,4 @@ scifi_raw_bank_decoder_aef54905        INFO Number of counters : 1
  | "n_invalid_chanid"                              |       828 |
 velo_consolidate_tracks                INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
- | "n_velo_tracks"                                 |     30000 |    5092912 |     169.76 |
+ | "n_velo_tracks"                                 |     30000 |    5096106 |     169.87 |
diff --git a/AllenOnline/tests/refs/mep_lumi.ref.x86_64_v3-opt b/AllenOnline/tests/refs/mep_lumi.ref.x86_64_v3-opt
index b42139bc80518aa6e46633b003b8a67ceb814498..8b8d56f16b33b9d0efda0028cf3825615f696775 100644
--- a/AllenOnline/tests/refs/mep_lumi.ref.x86_64_v3-opt
+++ b/AllenOnline/tests/refs/mep_lumi.ref.x86_64_v3-opt
@@ -6,6 +6,7 @@ HLTControlFlowMgr                      INFO  o TBB thread pool size:  'ThreadPoo
 ApplicationMgr                         INFO Application Manager Initialized successfully
 ApplicationMgr                         INFO Application Manager Started successfully
 DeviceFTGeometry                       INFO Conditions DB is compatible with FT bank version 7 and 8.
+DeviceFTGeometry                       INFO Deactivated 4 links.
 Starting timer for throughput measurement
 Input complete
 ApplicationMgr                         INFO Application Manager Stopped successfully
@@ -28,7 +29,7 @@ Events                                 INFO Number of counters : 3
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "IN"                                            |     30000 |
  | "MB_IN"                                         |      1186 |
- | "OUT"                                           |     30000 |
+ | "SLICED"                                        |     30000 |
 HLTControlFlowMgr                      INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "Processed events"                              |         1 |
@@ -46,7 +47,7 @@ gather_selections                      INFO Number of counters : 10
  | "Hlt1TAEPassthroughRate"                        |         6 |
 pv_beamline_cleanup                    INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
- | "n_PVs"                                         |     30000 |      39607 |     1.3202 |
+ | "n_PVs"                                         |     30000 |      59306 |     1.9769 |
 scifi_calculate_cluster_count_76...    INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "n_misordered_cluster"                          |      2772 |
@@ -55,4 +56,4 @@ scifi_raw_bank_decoder_aef54905        INFO Number of counters : 1
  | "n_invalid_chanid"                              |       828 |
 velo_consolidate_tracks                INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
- | "n_velo_tracks"                                 |     30000 |    5092937 |     169.76 |
+ | "n_velo_tracks"                                 |     30000 |    5096105 |     169.87 |
diff --git a/AllenOnline/tests/refs/mep_multiple_tae.ref b/AllenOnline/tests/refs/mep_multiple_tae.ref
index e7cd113fdf1bbccb85296610ecdcc707a03b6b1a..243b8bb2f2945998628420452acc8c1b6382e15a 100644
--- a/AllenOnline/tests/refs/mep_multiple_tae.ref
+++ b/AllenOnline/tests/refs/mep_multiple_tae.ref
@@ -4,7 +4,6 @@ HLTControlFlowMgr                      INFO Concurrency level information:
 HLTControlFlowMgr                      INFO  o Number of events slots: 1
 HLTControlFlowMgr                      INFO  o TBB thread pool size:  'ThreadPoolSize':1
 ApplicationMgr                         INFO Application Manager Initialized successfully
-Setting number of slices to 4
 Bursts                                 INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "IN"                                            |         1 |
@@ -12,7 +11,7 @@ Events                                 INFO Number of counters : 3
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "IN"                                            |     30000 |
  | "MB_IN"                                         |        55 |
- | "OUT"                                           |     30000 |
+ | "SLICED"                                        |     30000 |
 HLTControlFlowMgr                      INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "Processed events"                              |         1 |
diff --git a/AllenOnline/tests/refs/mep_no_ut.ref b/AllenOnline/tests/refs/mep_no_ut.ref
index 1b3fa212d23ff12f039365862b4f20aa7dbcd29d..2ffa2ba1e2ef9c9fae2ece024a813a8eca1975c8 100644
--- a/AllenOnline/tests/refs/mep_no_ut.ref
+++ b/AllenOnline/tests/refs/mep_no_ut.ref
@@ -4,12 +4,12 @@ HLTControlFlowMgr                      INFO Concurrency level information:
 HLTControlFlowMgr                      INFO  o Number of events slots: 1
 HLTControlFlowMgr                      INFO  o TBB thread pool size:  'ThreadPoolSize':1
 ApplicationMgr                         INFO Application Manager Initialized successfully
+  rate_validator
   global_decision
-  host_routingbits_writer
   make_selected_object_lists
   make_subbanks
   make_selreps
-  rate_validator
+  host_routingbits_writer
 ApplicationMgr                         INFO Application Manager Started successfully
 HLTControlFlowMgr                      INFO Will measure time between events 0 and 0 (stop might be some events later)
 HLTControlFlowMgr                      INFO Starting loop on events
@@ -38,14 +38,14 @@ Events                                 INFO Number of counters : 3
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "IN"                                            |      2000 |
  | "MB_IN"                                         |      1055 |
- | "OUT"                                           |      2000 |
+ | "SLICED"                                        |      2000 |
 HLTControlFlowMgr                      INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "Processed events"                              |         1 |
 calo_filter_clusters_5af2e675          INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "n_calo_clusters"                               |     41231 |
-gather_selections                      INFO Number of counters : 15
+gather_selections                      INFO Number of counters : 17
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "Hlt1DiPhotonHighMassPass"                      |         4 |
  | "Hlt1DiPhotonHighMassRate"                      |         4 |
@@ -60,6 +60,8 @@ gather_selections                      INFO Number of counters : 15
  | "Hlt1SMOG2PassThroughLowMult5Rate"              |         2 |
  | "Hlt1TAEPassthroughPass"                        |         1 |
  | "Hlt1TAEPassthroughRate"                        |         1 |
+ | "Hlt1TwoTrackMVAPass"                           |         6 |
+ | "Hlt1TwoTrackMVARate"                           |         6 |
  | "Hlt1VeloMicroBiasPass"                         |      1580 |
  | "Hlt1VeloMicroBiasRate"                         |         2 |
 pv_beamline_cleanup                    INFO Number of counters : 1
@@ -67,7 +69,7 @@ pv_beamline_cleanup                    INFO Number of counters : 1
  | "n_PVs"                                         |      2000 |        176 |   0.088000 |
 scifi_consolidate_tracks_forward       INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
- | "n_long_tracks_forward"                         |      1643 |        271 |    0.16494 |
+ | "n_long_tracks_forward"                         |      1643 |       1467 |    0.89288 |
 velo_consolidate_tracks                INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "n_velo_tracks"                                 |      2000 |     177852 |     88.926 |
diff --git a/AllenOnline/tests/refs/mep_no_ut.ref.detdesc b/AllenOnline/tests/refs/mep_no_ut.ref.detdesc
index 66c63b93d65e26fa7ec263ad6b6d1ad3ecd91fb0..c95a06680488de19f288e643cf3c5f365a6dd68e 100644
--- a/AllenOnline/tests/refs/mep_no_ut.ref.detdesc
+++ b/AllenOnline/tests/refs/mep_no_ut.ref.detdesc
@@ -4,12 +4,12 @@ HLTControlFlowMgr                      INFO Concurrency level information:
 HLTControlFlowMgr                      INFO  o Number of events slots: 1
 HLTControlFlowMgr                      INFO  o TBB thread pool size:  'ThreadPoolSize':1
 ApplicationMgr                         INFO Application Manager Initialized successfully
+  rate_validator
   global_decision
-  host_routingbits_writer
   make_selected_object_lists
   make_subbanks
   make_selreps
-  rate_validator
+  host_routingbits_writer
 ApplicationMgr                         INFO Application Manager Started successfully
 DeviceFTGeometry                       INFO Conditions DB is compatible with FT bank version 7 and 8.
 Starting timer for throughput measurement
@@ -36,15 +36,17 @@ Events                                 INFO Number of counters : 3
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "IN"                                            |      2000 |
  | "MB_IN"                                         |      1055 |
- | "OUT"                                           |      2000 |
+ | "SLICED"                                        |      2000 |
 HLTControlFlowMgr                      INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "Processed events"                              |         1 |
 calo_filter_clusters_5af2e675          INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "n_calo_clusters"                               |     41231 |
-gather_selections                      INFO Number of counters : 15
+gather_selections                      INFO Number of counters : 19
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
+ | "Hlt1DiMuonDisplacedPass"                       |         1 |
+ | "Hlt1DiMuonDisplacedRate"                       |         1 |
  | "Hlt1DiPhotonHighMassPass"                      |         4 |
  | "Hlt1DiPhotonHighMassRate"                      |         4 |
  | "Hlt1ODINCalibPass"                             |         2 |
@@ -58,6 +60,8 @@ gather_selections                      INFO Number of counters : 15
  | "Hlt1SMOG2PassThroughLowMult5Rate"              |         3 |
  | "Hlt1TAEPassthroughPass"                        |         1 |
  | "Hlt1TAEPassthroughRate"                        |         1 |
+ | "Hlt1TwoTrackMVAPass"                           |         2 |
+ | "Hlt1TwoTrackMVARate"                           |         2 |
  | "Hlt1VeloMicroBiasPass"                         |      1581 |
  | "Hlt1VeloMicroBiasRate"                         |         2 |
 pv_beamline_cleanup                    INFO Number of counters : 1
@@ -65,7 +69,7 @@ pv_beamline_cleanup                    INFO Number of counters : 1
  | "n_PVs"                                         |      2000 |       3764 |     1.8820 |
 scifi_consolidate_tracks_forward       INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
- | "n_long_tracks_forward"                         |      1643 |        110 |   0.066951 |
+ | "n_long_tracks_forward"                         |      1643 |        845 |    0.51430 |
 velo_consolidate_tracks                INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "n_velo_tracks"                                 |      2000 |     173884 |     86.942 |
diff --git a/AllenOnline/tests/refs/mep_no_ut.ref.x86_64_v3-detdesc-opt b/AllenOnline/tests/refs/mep_no_ut.ref.x86_64_v3-detdesc-opt
index 57768e6a4f1ec0e77217aa84151ef3fcfafbc4e1..a2b55b5d0983eb807e9e8e21f5c6223b80eaf4b3 100644
--- a/AllenOnline/tests/refs/mep_no_ut.ref.x86_64_v3-detdesc-opt
+++ b/AllenOnline/tests/refs/mep_no_ut.ref.x86_64_v3-detdesc-opt
@@ -4,12 +4,12 @@ HLTControlFlowMgr                      INFO Concurrency level information:
 HLTControlFlowMgr                      INFO  o Number of events slots: 1
 HLTControlFlowMgr                      INFO  o TBB thread pool size:  'ThreadPoolSize':1
 ApplicationMgr                         INFO Application Manager Initialized successfully
+  rate_validator
   global_decision
-  host_routingbits_writer
   make_selected_object_lists
   make_subbanks
   make_selreps
-  rate_validator
+  host_routingbits_writer
 ApplicationMgr                         INFO Application Manager Started successfully
 DeviceFTGeometry                       INFO Conditions DB is compatible with FT bank version 7 and 8.
 Starting timer for throughput measurement
@@ -36,15 +36,17 @@ Events                                 INFO Number of counters : 3
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "IN"                                            |      2000 |
  | "MB_IN"                                         |      1055 |
- | "OUT"                                           |      2000 |
+ | "SLICED"                                        |      2000 |
 HLTControlFlowMgr                      INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "Processed events"                              |         1 |
 calo_filter_clusters_5af2e675          INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "n_calo_clusters"                               |     41231 |
-gather_selections                      INFO Number of counters : 15
+gather_selections                      INFO Number of counters : 19
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
+ | "Hlt1DiMuonDisplacedPass"                       |         1 |
+ | "Hlt1DiMuonDisplacedRate"                       |         1 |
  | "Hlt1DiPhotonHighMassPass"                      |         4 |
  | "Hlt1DiPhotonHighMassRate"                      |         4 |
  | "Hlt1ODINCalibPass"                             |         2 |
@@ -58,6 +60,8 @@ gather_selections                      INFO Number of counters : 15
  | "Hlt1SMOG2PassThroughLowMult5Rate"              |         3 |
  | "Hlt1TAEPassthroughPass"                        |         1 |
  | "Hlt1TAEPassthroughRate"                        |         1 |
+ | "Hlt1TwoTrackMVAPass"                           |         3 |
+ | "Hlt1TwoTrackMVARate"                           |         3 |
  | "Hlt1VeloMicroBiasPass"                         |      1581 |
  | "Hlt1VeloMicroBiasRate"                         |         2 |
 pv_beamline_cleanup                    INFO Number of counters : 1
@@ -65,7 +69,7 @@ pv_beamline_cleanup                    INFO Number of counters : 1
  | "n_PVs"                                         |      2000 |       3771 |     1.8855 |
 scifi_consolidate_tracks_forward       INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
- | "n_long_tracks_forward"                         |      1643 |        111 |   0.067559 |
+ | "n_long_tracks_forward"                         |      1643 |        845 |    0.51430 |
 velo_consolidate_tracks                INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "n_velo_tracks"                                 |      2000 |     173884 |     86.942 |
diff --git a/AllenOnline/tests/refs/mep_no_ut.ref.x86_64_v3-opt b/AllenOnline/tests/refs/mep_no_ut.ref.x86_64_v3-opt
index b741cacc4eb62962f57118d73c1528854eecca1a..5804ea567351789aba10b587d885bd53ffd3bc5b 100644
--- a/AllenOnline/tests/refs/mep_no_ut.ref.x86_64_v3-opt
+++ b/AllenOnline/tests/refs/mep_no_ut.ref.x86_64_v3-opt
@@ -4,12 +4,12 @@ HLTControlFlowMgr                      INFO Concurrency level information:
 HLTControlFlowMgr                      INFO  o Number of events slots: 1
 HLTControlFlowMgr                      INFO  o TBB thread pool size:  'ThreadPoolSize':1
 ApplicationMgr                         INFO Application Manager Initialized successfully
+  rate_validator
   global_decision
-  host_routingbits_writer
   make_selected_object_lists
   make_subbanks
   make_selreps
-  rate_validator
+  host_routingbits_writer
 ApplicationMgr                         INFO Application Manager Started successfully
 DeviceFTGeometry                       INFO Conditions DB is compatible with FT bank version 7 and 8.
 Starting timer for throughput measurement
@@ -36,14 +36,14 @@ Events                                 INFO Number of counters : 3
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "IN"                                            |      2000 |
  | "MB_IN"                                         |      1055 |
- | "OUT"                                           |      2000 |
+ | "SLICED"                                        |      2000 |
 HLTControlFlowMgr                      INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "Processed events"                              |         1 |
 calo_filter_clusters_5af2e675          INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "n_calo_clusters"                               |     41231 |
-gather_selections                      INFO Number of counters : 15
+gather_selections                      INFO Number of counters : 17
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "Hlt1DiPhotonHighMassPass"                      |         4 |
  | "Hlt1DiPhotonHighMassRate"                      |         4 |
@@ -58,6 +58,8 @@ gather_selections                      INFO Number of counters : 15
  | "Hlt1SMOG2PassThroughLowMult5Rate"              |         2 |
  | "Hlt1TAEPassthroughPass"                        |         1 |
  | "Hlt1TAEPassthroughRate"                        |         1 |
+ | "Hlt1TwoTrackMVAPass"                           |         6 |
+ | "Hlt1TwoTrackMVARate"                           |         6 |
  | "Hlt1VeloMicroBiasPass"                         |      1580 |
  | "Hlt1VeloMicroBiasRate"                         |         2 |
 pv_beamline_cleanup                    INFO Number of counters : 1
@@ -65,7 +67,7 @@ pv_beamline_cleanup                    INFO Number of counters : 1
  | "n_PVs"                                         |      2000 |        172 |   0.086000 |
 scifi_consolidate_tracks_forward       INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
- | "n_long_tracks_forward"                         |      1643 |        273 |    0.16616 |
+ | "n_long_tracks_forward"                         |      1643 |       1467 |    0.89288 |
 velo_consolidate_tracks                INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "n_velo_tracks"                                 |      2000 |     177861 |     88.930 |
diff --git a/AllenOnline/tests/refs/mep_real_data.ref b/AllenOnline/tests/refs/mep_real_data.ref
index 01d6a5430a4eba4f3f9b9868061162416ecfe9fc..75cc22688dc892a846a217f6426cbeb523fc288b 100644
--- a/AllenOnline/tests/refs/mep_real_data.ref
+++ b/AllenOnline/tests/refs/mep_real_data.ref
@@ -4,12 +4,12 @@ HLTControlFlowMgr                      INFO Concurrency level information:
 HLTControlFlowMgr                      INFO  o Number of events slots: 1
 HLTControlFlowMgr                      INFO  o TBB thread pool size:  'ThreadPoolSize':1
 ApplicationMgr                         INFO Application Manager Initialized successfully
+  rate_validator
   global_decision
-  host_routingbits_writer
   make_selected_object_lists
   make_subbanks
   make_selreps
-  rate_validator
+  host_routingbits_writer
 ApplicationMgr                         INFO Application Manager Started successfully
 HLTControlFlowMgr                      INFO Will measure time between events 0 and 0 (stop might be some events later)
 HLTControlFlowMgr                      INFO Starting loop on events
@@ -36,7 +36,7 @@ Events                                 INFO Number of counters : 3
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "IN"                                            |     30000 |
  | "MB_IN"                                         |       818 |
- | "OUT"                                           |     30000 |
+ | "SLICED"                                        |     30000 |
 HLTControlFlowMgr                      INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "Processed events"                              |         1 |
diff --git a/AllenOnline/tests/refs/mep_real_data.ref.x86_64_v3-opt b/AllenOnline/tests/refs/mep_real_data.ref.x86_64_v3-opt
index 3b4c63c32d852fbe14aedf92cd84ffba92b8ac66..5fd56e0bbdf2b03cedc2e6e1ab26e68ab9a81dc0 100644
--- a/AllenOnline/tests/refs/mep_real_data.ref.x86_64_v3-opt
+++ b/AllenOnline/tests/refs/mep_real_data.ref.x86_64_v3-opt
@@ -4,12 +4,12 @@ HLTControlFlowMgr                      INFO Concurrency level information:
 HLTControlFlowMgr                      INFO  o Number of events slots: 1
 HLTControlFlowMgr                      INFO  o TBB thread pool size:  'ThreadPoolSize':1
 ApplicationMgr                         INFO Application Manager Initialized successfully
+  rate_validator
   global_decision
-  host_routingbits_writer
   make_selected_object_lists
   make_subbanks
   make_selreps
-  rate_validator
+  host_routingbits_writer
 ApplicationMgr                         INFO Application Manager Started successfully
 DeviceFTGeometry                       INFO Conditions DB is compatible with FT bank version 7 and 8.
 Starting timer for throughput measurement
@@ -34,7 +34,7 @@ Events                                 INFO Number of counters : 3
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "IN"                                            |     30000 |
  | "MB_IN"                                         |       818 |
- | "OUT"                                           |     30000 |
+ | "SLICED"                                        |     30000 |
 HLTControlFlowMgr                      INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "Processed events"                              |         1 |
diff --git a/AllenOnline/tests/refs/mep_tae.ref b/AllenOnline/tests/refs/mep_tae.ref
index cfd1b5ac72e3f653cf43973e313423e773c2337b..2fdb0ec57423d2bc1d890000475aedcfa35c34b7 100644
--- a/AllenOnline/tests/refs/mep_tae.ref
+++ b/AllenOnline/tests/refs/mep_tae.ref
@@ -4,7 +4,6 @@ HLTControlFlowMgr                      INFO Concurrency level information:
 HLTControlFlowMgr                      INFO  o Number of events slots: 1
 HLTControlFlowMgr                      INFO  o TBB thread pool size:  'ThreadPoolSize':1
 ApplicationMgr                         INFO Application Manager Initialized successfully
-Setting number of slices to 4
 ApplicationMgr                         INFO Application Manager Started successfully
 HLTControlFlowMgr                      INFO Will measure time between events 0 and 0 (stop might be some events later)
 HLTControlFlowMgr                      INFO Starting loop on events
@@ -33,18 +32,18 @@ Events                                 INFO Number of counters : 3
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "IN"                                            |     60000 |
  | "MB_IN"                                         |      2108 |
- | "OUT"                                           |     60000 |
+ | "SLICED"                                        |     60000 |
 HLTControlFlowMgr                      INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "Processed events"                              |         1 |
 gather_selections                      INFO Number of counters : 6
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
- | "Hlt1ActivityPassthroughPass"                   |      6454 |
- | "Hlt1ActivityPassthroughRate"                   |      6454 |
+ | "Hlt1ActivityPassthroughPass"                   |     22715 |
+ | "Hlt1ActivityPassthroughRate"                   |     22715 |
  | "Hlt1ODINLumiPass"                              |       119 |
  | "Hlt1ODINLumiRate"                              |       119 |
- | "Hlt1TAEPassthroughPass"                        |         4 |
- | "Hlt1TAEPassthroughRate"                        |         4 |
+ | "Hlt1TAEPassthroughPass"                        |        14 |
+ | "Hlt1TAEPassthroughRate"                        |        14 |
 pv_beamline_cleanup                    INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "n_PVs"                                         |     60000 |       5810 |   0.096833 |
@@ -53,7 +52,7 @@ scifi_calculate_cluster_count_76...    INFO Number of counters : 1
  | "n_misordered_cluster"                          |         2 |
 scifi_consolidate_tracks_forward       INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
- | "n_long_tracks_forward"                         |     60000 |       7571 |    0.12618 |
+ | "n_long_tracks_forward"                         |     60000 |      43305 |    0.72175 |
 velo_consolidate_tracks                INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "n_velo_tracks"                                 |     60000 |    5431268 |     90.521 |
diff --git a/AllenOnline/tests/refs/mep_tae.ref.detdesc b/AllenOnline/tests/refs/mep_tae.ref.detdesc
index ad7eaf02692497a40f8485c680af0459a83b4cee..8395f22507fc62a49cd28681d25fb77d405736de 100644
--- a/AllenOnline/tests/refs/mep_tae.ref.detdesc
+++ b/AllenOnline/tests/refs/mep_tae.ref.detdesc
@@ -4,7 +4,6 @@ HLTControlFlowMgr                      INFO Concurrency level information:
 HLTControlFlowMgr                      INFO  o Number of events slots: 1
 HLTControlFlowMgr                      INFO  o TBB thread pool size:  'ThreadPoolSize':1
 ApplicationMgr                         INFO Application Manager Initialized successfully
-Setting number of slices to 4
 ApplicationMgr                         INFO Application Manager Started successfully
 HLTControlFlowMgr                      INFO Will measure time between events 0 and 0 (stop might be some events later)
 HLTControlFlowMgr                      INFO Starting loop on events
@@ -33,18 +32,18 @@ Events                                 INFO Number of counters : 3
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "IN"                                            |     60000 |
  | "MB_IN"                                         |      2108 |
- | "OUT"                                           |     60000 |
+ | "SLICED"                                        |     60000 |
 HLTControlFlowMgr                      INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "Processed events"                              |         1 |
 gather_selections                      INFO Number of counters : 6
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
- | "Hlt1ActivityPassthroughPass"                   |      2751 |
- | "Hlt1ActivityPassthroughRate"                   |      2751 |
+ | "Hlt1ActivityPassthroughPass"                   |     16005 |
+ | "Hlt1ActivityPassthroughRate"                   |     16005 |
  | "Hlt1ODINLumiPass"                              |       119 |
  | "Hlt1ODINLumiRate"                              |       119 |
- | "Hlt1TAEPassthroughPass"                        |         1 |
- | "Hlt1TAEPassthroughRate"                        |         1 |
+ | "Hlt1TAEPassthroughPass"                        |         8 |
+ | "Hlt1TAEPassthroughRate"                        |         8 |
 pv_beamline_cleanup                    INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "n_PVs"                                         |     60000 |     113607 |     1.8935 |
@@ -53,7 +52,7 @@ scifi_calculate_cluster_count_76...    INFO Number of counters : 1
  | "n_misordered_cluster"                          |         2 |
 scifi_consolidate_tracks_forward       INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
- | "n_long_tracks_forward"                         |     60000 |       2979 |   0.049650 |
+ | "n_long_tracks_forward"                         |     60000 |      24675 |    0.41125 |
 velo_consolidate_tracks                INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "n_velo_tracks"                                 |     60000 |    5309446 |     88.491 |
diff --git a/AllenOnline/tests/refs/mep_tae.ref.x86_64_v3-detdesc-opt b/AllenOnline/tests/refs/mep_tae.ref.x86_64_v3-detdesc-opt
index 8bd169771f63f60a30c68ab9c2ca023b7b0e6152..55e8c980bff83e52283af7a18a4346db90b368f4 100644
--- a/AllenOnline/tests/refs/mep_tae.ref.x86_64_v3-detdesc-opt
+++ b/AllenOnline/tests/refs/mep_tae.ref.x86_64_v3-detdesc-opt
@@ -32,18 +32,18 @@ Events                                 INFO Number of counters : 3
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "IN"                                            |     60000 |
  | "MB_IN"                                         |      2108 |
- | "OUT"                                           |     60000 |
+ | "SLICED"                                        |     60000 |
 HLTControlFlowMgr                      INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "Processed events"                              |         1 |
 gather_selections                      INFO Number of counters : 6
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
- | "Hlt1ActivityPassthroughPass"                   |      2758 |
- | "Hlt1ActivityPassthroughRate"                   |      2758 |
+ | "Hlt1ActivityPassthroughPass"                   |     16007 |
+ | "Hlt1ActivityPassthroughRate"                   |     16007 |
  | "Hlt1ODINLumiPass"                              |       119 |
  | "Hlt1ODINLumiRate"                              |       119 |
- | "Hlt1TAEPassthroughPass"                        |         1 |
- | "Hlt1TAEPassthroughRate"                        |         1 |
+ | "Hlt1TAEPassthroughPass"                        |         8 |
+ | "Hlt1TAEPassthroughRate"                        |         8 |
 pv_beamline_cleanup                    INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "n_PVs"                                         |     60000 |     113588 |     1.8931 |
@@ -52,7 +52,7 @@ scifi_calculate_cluster_count_76...    INFO Number of counters : 1
  | "n_misordered_cluster"                          |         2 |
 scifi_consolidate_tracks_forward       INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
- | "n_long_tracks_forward"                         |     60000 |       2984 |   0.049733 |
+ | "n_long_tracks_forward"                         |     60000 |      24677 |    0.41128 |
 velo_consolidate_tracks                INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "n_velo_tracks"                                 |     60000 |    5309443 |     88.491 |
diff --git a/AllenOnline/tests/refs/mep_tae.ref.x86_64_v3-opt b/AllenOnline/tests/refs/mep_tae.ref.x86_64_v3-opt
index 356a578301e42e30c93fd05061ce817d237e448b..79439c1b9cb43d8eca91dd533d536e001d08db39 100644
--- a/AllenOnline/tests/refs/mep_tae.ref.x86_64_v3-opt
+++ b/AllenOnline/tests/refs/mep_tae.ref.x86_64_v3-opt
@@ -32,18 +32,18 @@ Events                                 INFO Number of counters : 3
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "IN"                                            |     60000 |
  | "MB_IN"                                         |      2108 |
- | "OUT"                                           |     60000 |
+ | "SLICED"                                        |     60000 |
 HLTControlFlowMgr                      INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "Processed events"                              |         1 |
 gather_selections                      INFO Number of counters : 6
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
- | "Hlt1ActivityPassthroughPass"                   |      6456 |
- | "Hlt1ActivityPassthroughRate"                   |      6456 |
+ | "Hlt1ActivityPassthroughPass"                   |     22725 |
+ | "Hlt1ActivityPassthroughRate"                   |     22725 |
  | "Hlt1ODINLumiPass"                              |       119 |
  | "Hlt1ODINLumiRate"                              |       119 |
- | "Hlt1TAEPassthroughPass"                        |         4 |
- | "Hlt1TAEPassthroughRate"                        |         4 |
+ | "Hlt1TAEPassthroughPass"                        |        14 |
+ | "Hlt1TAEPassthroughRate"                        |        14 |
 pv_beamline_cleanup                    INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "n_PVs"                                         |     60000 |       5794 |   0.096567 |
@@ -52,7 +52,7 @@ scifi_calculate_cluster_count_76...    INFO Number of counters : 1
  | "n_misordered_cluster"                          |         2 |
 scifi_consolidate_tracks_forward       INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
- | "n_long_tracks_forward"                         |     60000 |       7581 |    0.12635 |
+ | "n_long_tracks_forward"                         |     60000 |      43340 |    0.72233 |
 velo_consolidate_tracks                INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "n_velo_tracks"                                 |     60000 |    5431281 |     90.521 |
diff --git a/AllenOnline/tests/refs/test_lumi.ref b/AllenOnline/tests/refs/test_lumi.ref
index 92e5125f6d6e777b7e0ef9d0a4cb404839b39537..bc703e03be0338fdad16c350bf84ae3e4ad00b3e 100644
--- a/AllenOnline/tests/refs/test_lumi.ref
+++ b/AllenOnline/tests/refs/test_lumi.ref
@@ -13,7 +13,7 @@ ECalETMiddleTop: 6839.999898
 ECalETOuterBottom: 12069.999820
 ECalETOuterTop: 10009.999851
 ECalEtot: 579400.329466
-FiducialVeloVertices: 3.000000
+FiducialVeloVertices: 6.000000
 GEC: 1.000000
 MuonHitsM2R1: 1023.000000
 MuonHitsM2R2: 1023.000000
@@ -47,20 +47,20 @@ VeloClustersOuterBin00: 101.000000
 VeloClustersOuterBin01: 339.000000
 VeloClustersOuterBin02: 140.000000
 VeloClustersOuterBin03: 79.000000
-VeloFiducialTracks: 231.000000
-VeloTracks: 240.000000
-VeloTracksEtaBin0: 7.000000
-VeloTracksEtaBin1: 45.000000
-VeloTracksEtaBin2: 35.000000
-VeloTracksEtaBin3: 24.000000
-VeloTracksEtaBin4: 53.000000
-VeloTracksEtaBin5: 34.000000
-VeloTracksEtaBin6: 29.000000
-VeloTracksEtaBin7: 13.000000
-VeloVertexX: -0.012207
-VeloVertexY: 0.018311
-VeloVertexZ: 0.061035
-VeloVertices: 3.000000
+VeloFiducialTracks: 238.000000
+VeloTracks: 247.000000
+VeloTracksEtaBin0: 9.000000
+VeloTracksEtaBin1: 46.000000
+VeloTracksEtaBin2: 39.000000
+VeloTracksEtaBin3: 32.000000
+VeloTracksEtaBin4: 52.000000
+VeloTracksEtaBin5: 30.000000
+VeloTracksEtaBin6: 27.000000
+VeloTracksEtaBin7: 12.000000
+VeloVertexX: 1.179810
+VeloVertexY: 0.183716
+VeloVertexZ: -1.159668
+VeloVertices: 6.000000
 encodingKey: 3104473477.000000
 -------------- Event 2579 --------------
 BCIDHigh: 0.000000
@@ -108,19 +108,19 @@ VeloClustersOuterBin00: 110.000000
 VeloClustersOuterBin01: 213.000000
 VeloClustersOuterBin02: 167.000000
 VeloClustersOuterBin03: 202.000000
-VeloFiducialTracks: 313.000000
-VeloTracks: 343.000000
-VeloTracksEtaBin0: 4.000000
-VeloTracksEtaBin1: 42.000000
-VeloTracksEtaBin2: 34.000000
-VeloTracksEtaBin3: 39.000000
-VeloTracksEtaBin4: 51.000000
-VeloTracksEtaBin5: 100.000000
-VeloTracksEtaBin6: 53.000000
-VeloTracksEtaBin7: 20.000000
-VeloVertexX: 0.223999
-VeloVertexY: -0.017090
-VeloVertexZ: -19.470214
+VeloFiducialTracks: 297.000000
+VeloTracks: 328.000000
+VeloTracksEtaBin0: 7.000000
+VeloTracksEtaBin1: 40.000000
+VeloTracksEtaBin2: 36.000000
+VeloTracksEtaBin3: 43.000000
+VeloTracksEtaBin4: 47.000000
+VeloTracksEtaBin5: 90.000000
+VeloTracksEtaBin6: 46.000000
+VeloTracksEtaBin7: 19.000000
+VeloVertexX: 1.187744
+VeloVertexY: 0.166016
+VeloVertexZ: -19.348144
 VeloVertices: 3.000000
 encodingKey: 3104473477.000000
 -------------- Event 3572 --------------
@@ -135,7 +135,7 @@ ECalETMiddleTop: 7824.999883
 ECalETOuterBottom: 15739.999765
 ECalETOuterTop: 12274.999817
 ECalEtot: 813958.062595
-FiducialVeloVertices: 1.000000
+FiducialVeloVertices: 4.000000
 GEC: 1.000000
 MuonHitsM2R1: 1023.000000
 MuonHitsM2R2: 1023.000000
@@ -169,20 +169,20 @@ VeloClustersOuterBin00: 75.000000
 VeloClustersOuterBin01: 146.000000
 VeloClustersOuterBin02: 141.000000
 VeloClustersOuterBin03: 200.000000
-VeloFiducialTracks: 283.000000
-VeloTracks: 292.000000
-VeloTracksEtaBin0: 6.000000
-VeloTracksEtaBin1: 24.000000
-VeloTracksEtaBin2: 22.000000
-VeloTracksEtaBin3: 24.000000
-VeloTracksEtaBin4: 49.000000
-VeloTracksEtaBin5: 81.000000
-VeloTracksEtaBin6: 72.000000
-VeloTracksEtaBin7: 14.000000
-VeloVertexX: -0.208740
-VeloVertexY: 0.007935
-VeloVertexZ: 27.404784
-VeloVertices: 1.000000
+VeloFiducialTracks: 256.000000
+VeloTracks: 269.000000
+VeloTracksEtaBin0: 8.000000
+VeloTracksEtaBin1: 23.000000
+VeloTracksEtaBin2: 23.000000
+VeloTracksEtaBin3: 26.000000
+VeloTracksEtaBin4: 47.000000
+VeloTracksEtaBin5: 72.000000
+VeloTracksEtaBin6: 57.000000
+VeloTracksEtaBin7: 13.000000
+VeloVertexX: 1.099243
+VeloVertexY: 0.222778
+VeloVertexZ: -18.493651
+VeloVertices: 4.000000
 encodingKey: 3104473477.000000
 -------------- Event 5410 --------------
 BCIDHigh: 0.000000
@@ -196,7 +196,7 @@ ECalETMiddleTop: 3519.999948
 ECalETOuterBottom: 12609.999812
 ECalETOuterTop: 6049.999910
 ECalEtot: 520584.734256
-FiducialVeloVertices: 0.000000
+FiducialVeloVertices: 3.000000
 GEC: 1.000000
 MuonHitsM2R1: 1023.000000
 MuonHitsM2R2: 1023.000000
@@ -230,20 +230,20 @@ VeloClustersOuterBin00: 62.000000
 VeloClustersOuterBin01: 143.000000
 VeloClustersOuterBin02: 96.000000
 VeloClustersOuterBin03: 88.000000
-VeloFiducialTracks: 165.000000
-VeloTracks: 172.000000
-VeloTracksEtaBin0: 4.000000
-VeloTracksEtaBin1: 25.000000
-VeloTracksEtaBin2: 18.000000
-VeloTracksEtaBin3: 14.000000
-VeloTracksEtaBin4: 31.000000
-VeloTracksEtaBin5: 34.000000
-VeloTracksEtaBin6: 40.000000
+VeloFiducialTracks: 168.000000
+VeloTracks: 177.000000
+VeloTracksEtaBin0: 7.000000
+VeloTracksEtaBin1: 27.000000
+VeloTracksEtaBin2: 19.000000
+VeloTracksEtaBin3: 20.000000
+VeloTracksEtaBin4: 33.000000
+VeloTracksEtaBin5: 30.000000
+VeloTracksEtaBin6: 35.000000
 VeloTracksEtaBin7: 6.000000
-VeloVertexX: 0.000000
-VeloVertexY: 0.000000
-VeloVertexZ: 0.000000
-VeloVertices: 0.000000
+VeloVertexX: 1.239014
+VeloVertexY: 0.122681
+VeloVertexZ: -16.052245
+VeloVertices: 3.000000
 encodingKey: 3104473477.000000
 -------------- Event 6541 --------------
 BCIDHigh: 0.000000
@@ -257,7 +257,7 @@ ECalETMiddleTop: 8564.999872
 ECalETOuterBottom: 16634.999752
 ECalETOuterTop: 16179.999759
 ECalEtot: 721529.272263
-FiducialVeloVertices: 2.000000
+FiducialVeloVertices: 3.000000
 GEC: 1.000000
 MuonHitsM2R1: 1023.000000
 MuonHitsM2R2: 1023.000000
@@ -441,20 +441,20 @@ VeloClustersOuterS22: 20.000000
 VeloClustersOuterS23: 25.000000
 VeloClustersOuterS24: 20.000000
 VeloClustersOuterS25: 25.000000
-VeloFiducialTracks: 218.000000
-VeloTracks: 225.000000
+VeloFiducialTracks: 201.000000
+VeloTracks: 207.000000
 VeloTracksEtaBin0: 5.000000
-VeloTracksEtaBin1: 12.000000
-VeloTracksEtaBin2: 16.000000
-VeloTracksEtaBin3: 13.000000
-VeloTracksEtaBin4: 52.000000
-VeloTracksEtaBin5: 48.000000
-VeloTracksEtaBin6: 67.000000
+VeloTracksEtaBin1: 13.000000
+VeloTracksEtaBin2: 17.000000
+VeloTracksEtaBin3: 17.000000
+VeloTracksEtaBin4: 55.000000
+VeloTracksEtaBin5: 40.000000
+VeloTracksEtaBin6: 48.000000
 VeloTracksEtaBin7: 12.000000
-VeloVertexX: 0.007324
-VeloVertexY: 0.095825
-VeloVertexZ: -33.508299
-VeloVertices: 2.000000
+VeloVertexX: 0.964355
+VeloVertexY: 0.166016
+VeloVertexZ: -11.962890
+VeloVertices: 3.000000
 encodingKey: 492876054.000000
 -------------- Event 9516 --------------
 BCIDHigh: 0.000000
@@ -590,7 +590,7 @@ ECalETMiddleTop: 5349.999920
 ECalETOuterBottom: 9369.999860
 ECalETOuterTop: 13969.999792
 ECalEtot: 546746.654634
-FiducialVeloVertices: 2.000000
+FiducialVeloVertices: 3.000000
 GEC: 1.000000
 MuonHitsM2R1: 1023.000000
 MuonHitsM2R2: 1023.000000
@@ -624,20 +624,20 @@ VeloClustersOuterBin00: 90.000000
 VeloClustersOuterBin01: 151.000000
 VeloClustersOuterBin02: 116.000000
 VeloClustersOuterBin03: 133.000000
-VeloFiducialTracks: 211.000000
-VeloTracks: 228.000000
-VeloTracksEtaBin0: 9.000000
-VeloTracksEtaBin1: 34.000000
-VeloTracksEtaBin2: 22.000000
-VeloTracksEtaBin3: 25.000000
+VeloFiducialTracks: 202.000000
+VeloTracks: 225.000000
+VeloTracksEtaBin0: 10.000000
+VeloTracksEtaBin1: 36.000000
+VeloTracksEtaBin2: 21.000000
+VeloTracksEtaBin3: 39.000000
 VeloTracksEtaBin4: 41.000000
-VeloTracksEtaBin5: 45.000000
-VeloTracksEtaBin6: 46.000000
+VeloTracksEtaBin5: 38.000000
+VeloTracksEtaBin6: 34.000000
 VeloTracksEtaBin7: 6.000000
-VeloVertexX: -0.039673
-VeloVertexY: -0.032959
-VeloVertexZ: 40.893553
-VeloVertices: 2.000000
+VeloVertexX: 1.309204
+VeloVertexY: 0.125122
+VeloVertexZ: 10.925292
+VeloVertices: 3.000000
 encodingKey: 3104473477.000000
 -------------- Event 13890 --------------
 BCIDHigh: 0.000000
@@ -651,7 +651,7 @@ ECalETMiddleTop: 11224.999833
 ECalETOuterBottom: 15934.999763
 ECalETOuterTop: 15349.999771
 ECalEtot: 795532.274547
-FiducialVeloVertices: 4.000000
+FiducialVeloVertices: 2.000000
 GEC: 1.000000
 MuonHitsM2R1: 1023.000000
 MuonHitsM2R2: 1023.000000
@@ -685,20 +685,20 @@ VeloClustersOuterBin00: 77.000000
 VeloClustersOuterBin01: 173.000000
 VeloClustersOuterBin02: 197.000000
 VeloClustersOuterBin03: 127.000000
-VeloFiducialTracks: 263.000000
-VeloTracks: 275.000000
+VeloFiducialTracks: 259.000000
+VeloTracks: 271.000000
 VeloTracksEtaBin0: 5.000000
-VeloTracksEtaBin1: 37.000000
-VeloTracksEtaBin2: 35.000000
-VeloTracksEtaBin3: 18.000000
-VeloTracksEtaBin4: 63.000000
-VeloTracksEtaBin5: 59.000000
-VeloTracksEtaBin6: 48.000000
-VeloTracksEtaBin7: 10.000000
-VeloVertexX: 0.024414
-VeloVertexY: -0.050049
-VeloVertexZ: -36.865233
-VeloVertices: 4.000000
+VeloTracksEtaBin1: 41.000000
+VeloTracksEtaBin2: 37.000000
+VeloTracksEtaBin3: 27.000000
+VeloTracksEtaBin4: 59.000000
+VeloTracksEtaBin5: 54.000000
+VeloTracksEtaBin6: 37.000000
+VeloTracksEtaBin7: 11.000000
+VeloVertexX: 1.113281
+VeloVertexY: 0.112915
+VeloVertexZ: -60.974118
+VeloVertices: 2.000000
 encodingKey: 3104473477.000000
 -------------- Event 15450 --------------
 BCIDHigh: 0.000000
@@ -773,7 +773,7 @@ ECalETMiddleTop: 9054.999865
 ECalETOuterBottom: 12889.999808
 ECalETOuterTop: 25864.999615
 ECalEtot: 778860.609527
-FiducialVeloVertices: 3.000000
+FiducialVeloVertices: 5.000000
 GEC: 1.000000
 MuonHitsM2R1: 1023.000000
 MuonHitsM2R2: 1023.000000
@@ -807,20 +807,20 @@ VeloClustersOuterBin00: 98.000000
 VeloClustersOuterBin01: 272.000000
 VeloClustersOuterBin02: 233.000000
 VeloClustersOuterBin03: 145.000000
-VeloFiducialTracks: 313.000000
-VeloTracks: 330.000000
-VeloTracksEtaBin0: 15.000000
-VeloTracksEtaBin1: 39.000000
-VeloTracksEtaBin2: 38.000000
-VeloTracksEtaBin3: 40.000000
-VeloTracksEtaBin4: 73.000000
-VeloTracksEtaBin5: 69.000000
-VeloTracksEtaBin6: 52.000000
+VeloFiducialTracks: 321.000000
+VeloTracks: 339.000000
+VeloTracksEtaBin0: 17.000000
+VeloTracksEtaBin1: 38.000000
+VeloTracksEtaBin2: 44.000000
+VeloTracksEtaBin3: 53.000000
+VeloTracksEtaBin4: 74.000000
+VeloTracksEtaBin5: 66.000000
+VeloTracksEtaBin6: 43.000000
 VeloTracksEtaBin7: 4.000000
-VeloVertexX: 0.004272
-VeloVertexY: 0.064697
-VeloVertexZ: 32.165526
-VeloVertices: 3.000000
+VeloVertexX: 1.207886
+VeloVertexY: 0.264893
+VeloVertexZ: 30.700682
+VeloVertices: 5.000000
 encodingKey: 3104473477.000000
 -------------- Event 18514 --------------
 BCIDHigh: 0.000000
@@ -834,7 +834,7 @@ ECalETMiddleTop: 3104.999954
 ECalETOuterBottom: 9309.999861
 ECalETOuterTop: 9649.999856
 ECalEtot: 353973.031587
-FiducialVeloVertices: 1.000000
+FiducialVeloVertices: 4.000000
 GEC: 1.000000
 MuonHitsM2R1: 1023.000000
 MuonHitsM2R2: 1023.000000
@@ -868,20 +868,20 @@ VeloClustersOuterBin00: 59.000000
 VeloClustersOuterBin01: 111.000000
 VeloClustersOuterBin02: 95.000000
 VeloClustersOuterBin03: 99.000000
-VeloFiducialTracks: 146.000000
-VeloTracks: 155.000000
-VeloTracksEtaBin0: 9.000000
-VeloTracksEtaBin1: 23.000000
+VeloFiducialTracks: 152.000000
+VeloTracks: 166.000000
+VeloTracksEtaBin0: 10.000000
+VeloTracksEtaBin1: 25.000000
 VeloTracksEtaBin2: 22.000000
-VeloTracksEtaBin3: 16.000000
-VeloTracksEtaBin4: 30.000000
-VeloTracksEtaBin5: 35.000000
-VeloTracksEtaBin6: 16.000000
+VeloTracksEtaBin3: 24.000000
+VeloTracksEtaBin4: 37.000000
+VeloTracksEtaBin5: 27.000000
+VeloTracksEtaBin6: 17.000000
 VeloTracksEtaBin7: 4.000000
-VeloVertexX: -0.039673
-VeloVertexY: 0.023804
-VeloVertexZ: 71.716305
-VeloVertices: 1.000000
+VeloVertexX: 1.179810
+VeloVertexY: 0.062866
+VeloVertexZ: 58.349607
+VeloVertices: 4.000000
 encodingKey: 3104473477.000000
 -------------- Event 20355 --------------
 BCIDHigh: 0.000000
@@ -1228,7 +1228,7 @@ ECalETMiddleTop: 20054.999701
 ECalETOuterBottom: 32239.999520
 ECalETOuterTop: 41504.999382
 ECalEtot: 1832368.909254
-FiducialVeloVertices: 2.000000
+FiducialVeloVertices: 6.000000
 GEC: 1.000000
 MuonHitsM2R1: 1023.000000
 MuonHitsM2R2: 1023.000000
@@ -1262,20 +1262,20 @@ VeloClustersOuterBin00: 139.000000
 VeloClustersOuterBin01: 297.000000
 VeloClustersOuterBin02: 289.000000
 VeloClustersOuterBin03: 301.000000
-VeloFiducialTracks: 476.000000
-VeloTracks: 505.000000
-VeloTracksEtaBin0: 10.000000
-VeloTracksEtaBin1: 46.000000
-VeloTracksEtaBin2: 53.000000
-VeloTracksEtaBin3: 37.000000
-VeloTracksEtaBin4: 106.000000
-VeloTracksEtaBin5: 127.000000
-VeloTracksEtaBin6: 105.000000
-VeloTracksEtaBin7: 21.000000
-VeloVertexX: 0.103149
-VeloVertexY: 0.038452
-VeloVertexZ: -30.090331
-VeloVertices: 2.000000
+VeloFiducialTracks: 467.000000
+VeloTracks: 496.000000
+VeloTracksEtaBin0: 11.000000
+VeloTracksEtaBin1: 50.000000
+VeloTracksEtaBin2: 56.000000
+VeloTracksEtaBin3: 48.000000
+VeloTracksEtaBin4: 104.000000
+VeloTracksEtaBin5: 117.000000
+VeloTracksEtaBin6: 88.000000
+VeloTracksEtaBin7: 22.000000
+VeloVertexX: 1.076660
+VeloVertexY: 0.236816
+VeloVertexZ: -52.307126
+VeloVertices: 6.000000
 encodingKey: 3104473477.000000
 -------------- Event 28880 --------------
 BCIDHigh: 0.000000
@@ -1289,7 +1289,7 @@ ECalETMiddleTop: 2164.999968
 ECalETOuterBottom: 1814.999973
 ECalETOuterTop: 3459.999948
 ECalEtot: 130524.744303
-FiducialVeloVertices: 0.000000
+FiducialVeloVertices: 1.000000
 GEC: 1.000000
 MuonHitsM2R1: 1023.000000
 MuonHitsM2R2: 1023.000000
@@ -1323,24 +1323,24 @@ VeloClustersOuterBin00: 24.000000
 VeloClustersOuterBin01: 56.000000
 VeloClustersOuterBin02: 43.000000
 VeloClustersOuterBin03: 58.000000
-VeloFiducialTracks: 81.000000
-VeloTracks: 84.000000
+VeloFiducialTracks: 80.000000
+VeloTracks: 83.000000
 VeloTracksEtaBin0: 2.000000
 VeloTracksEtaBin1: 10.000000
 VeloTracksEtaBin2: 5.000000
-VeloTracksEtaBin3: 9.000000
-VeloTracksEtaBin4: 23.000000
-VeloTracksEtaBin5: 16.000000
-VeloTracksEtaBin6: 14.000000
-VeloTracksEtaBin7: 5.000000
-VeloVertexX: 0.000000
-VeloVertexY: 0.000000
-VeloVertexZ: 0.000000
-VeloVertices: 0.000000
+VeloTracksEtaBin3: 11.000000
+VeloTracksEtaBin4: 24.000000
+VeloTracksEtaBin5: 14.000000
+VeloTracksEtaBin6: 13.000000
+VeloTracksEtaBin7: 4.000000
+VeloVertexX: 1.198120
+VeloVertexY: 0.275269
+VeloVertexZ: 3.356933
+VeloVertices: 1.000000
 encodingKey: 3104473477.000000
 HltLumiWriter        INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "Average event size / 32-bit words"             |       328 |       9208 |     28.073 |
-VoidFilter_2e3c...   INFO Number of counters : 1
+VoidFilter_2537...   INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  |*"Cut selection efficiency"                      |       385 |        328 |( 85.19481 +- 1.810020)% |
diff --git a/AllenOnline/tests/refs/test_lumi.ref.x86_64_v3-opt b/AllenOnline/tests/refs/test_lumi.ref.x86_64_v3-opt
index 25dea1d495999066090b4be5330525ff5634e121..a354eae75e2eff3fccc46b5f02f758f163b4370a 100644
--- a/AllenOnline/tests/refs/test_lumi.ref.x86_64_v3-opt
+++ b/AllenOnline/tests/refs/test_lumi.ref.x86_64_v3-opt
@@ -13,7 +13,7 @@ ECalETMiddleTop: 6839.999898
 ECalETOuterBottom: 12069.999820
 ECalETOuterTop: 10009.999851
 ECalEtot: 579400.329466
-FiducialVeloVertices: 3.000000
+FiducialVeloVertices: 6.000000
 GEC: 1.000000
 MuonHitsM2R1: 1023.000000
 MuonHitsM2R2: 1023.000000
@@ -47,20 +47,20 @@ VeloClustersOuterBin00: 101.000000
 VeloClustersOuterBin01: 339.000000
 VeloClustersOuterBin02: 140.000000
 VeloClustersOuterBin03: 79.000000
-VeloFiducialTracks: 231.000000
-VeloTracks: 240.000000
-VeloTracksEtaBin0: 7.000000
-VeloTracksEtaBin1: 45.000000
-VeloTracksEtaBin2: 35.000000
-VeloTracksEtaBin3: 24.000000
-VeloTracksEtaBin4: 53.000000
-VeloTracksEtaBin5: 34.000000
-VeloTracksEtaBin6: 29.000000
-VeloTracksEtaBin7: 13.000000
-VeloVertexX: -0.012817
-VeloVertexY: 0.018311
-VeloVertexZ: 0.061035
-VeloVertices: 3.000000
+VeloFiducialTracks: 238.000000
+VeloTracks: 247.000000
+VeloTracksEtaBin0: 9.000000
+VeloTracksEtaBin1: 46.000000
+VeloTracksEtaBin2: 39.000000
+VeloTracksEtaBin3: 32.000000
+VeloTracksEtaBin4: 52.000000
+VeloTracksEtaBin5: 30.000000
+VeloTracksEtaBin6: 27.000000
+VeloTracksEtaBin7: 12.000000
+VeloVertexX: 1.179810
+VeloVertexY: 0.183716
+VeloVertexZ: -1.159668
+VeloVertices: 6.000000
 encodingKey: 3104473477.000000
 -------------- Event 2579 --------------
 BCIDHigh: 0.000000
@@ -108,19 +108,19 @@ VeloClustersOuterBin00: 110.000000
 VeloClustersOuterBin01: 213.000000
 VeloClustersOuterBin02: 167.000000
 VeloClustersOuterBin03: 202.000000
-VeloFiducialTracks: 313.000000
-VeloTracks: 343.000000
-VeloTracksEtaBin0: 4.000000
-VeloTracksEtaBin1: 42.000000
-VeloTracksEtaBin2: 34.000000
-VeloTracksEtaBin3: 39.000000
-VeloTracksEtaBin4: 51.000000
-VeloTracksEtaBin5: 100.000000
-VeloTracksEtaBin6: 53.000000
-VeloTracksEtaBin7: 20.000000
-VeloVertexX: 0.223999
-VeloVertexY: -0.017090
-VeloVertexZ: -19.470214
+VeloFiducialTracks: 297.000000
+VeloTracks: 328.000000
+VeloTracksEtaBin0: 7.000000
+VeloTracksEtaBin1: 40.000000
+VeloTracksEtaBin2: 36.000000
+VeloTracksEtaBin3: 43.000000
+VeloTracksEtaBin4: 47.000000
+VeloTracksEtaBin5: 90.000000
+VeloTracksEtaBin6: 46.000000
+VeloTracksEtaBin7: 19.000000
+VeloVertexX: 1.187134
+VeloVertexY: 0.166016
+VeloVertexZ: -19.348144
 VeloVertices: 3.000000
 encodingKey: 3104473477.000000
 -------------- Event 3572 --------------
@@ -135,7 +135,7 @@ ECalETMiddleTop: 7824.999883
 ECalETOuterBottom: 15739.999765
 ECalETOuterTop: 12274.999817
 ECalEtot: 813958.062595
-FiducialVeloVertices: 1.000000
+FiducialVeloVertices: 4.000000
 GEC: 1.000000
 MuonHitsM2R1: 1023.000000
 MuonHitsM2R2: 1023.000000
@@ -169,20 +169,20 @@ VeloClustersOuterBin00: 75.000000
 VeloClustersOuterBin01: 146.000000
 VeloClustersOuterBin02: 141.000000
 VeloClustersOuterBin03: 200.000000
-VeloFiducialTracks: 283.000000
-VeloTracks: 292.000000
-VeloTracksEtaBin0: 6.000000
-VeloTracksEtaBin1: 24.000000
-VeloTracksEtaBin2: 22.000000
-VeloTracksEtaBin3: 24.000000
-VeloTracksEtaBin4: 49.000000
-VeloTracksEtaBin5: 81.000000
-VeloTracksEtaBin6: 72.000000
-VeloTracksEtaBin7: 14.000000
-VeloVertexX: -0.208740
-VeloVertexY: 0.007935
-VeloVertexZ: 27.404784
-VeloVertices: 1.000000
+VeloFiducialTracks: 256.000000
+VeloTracks: 269.000000
+VeloTracksEtaBin0: 8.000000
+VeloTracksEtaBin1: 23.000000
+VeloTracksEtaBin2: 23.000000
+VeloTracksEtaBin3: 26.000000
+VeloTracksEtaBin4: 47.000000
+VeloTracksEtaBin5: 72.000000
+VeloTracksEtaBin6: 57.000000
+VeloTracksEtaBin7: 13.000000
+VeloVertexX: 1.098633
+VeloVertexY: 0.222778
+VeloVertexZ: -18.493651
+VeloVertices: 4.000000
 encodingKey: 3104473477.000000
 -------------- Event 5410 --------------
 BCIDHigh: 0.000000
@@ -196,7 +196,7 @@ ECalETMiddleTop: 3519.999948
 ECalETOuterBottom: 12609.999812
 ECalETOuterTop: 6049.999910
 ECalEtot: 520584.734256
-FiducialVeloVertices: 0.000000
+FiducialVeloVertices: 3.000000
 GEC: 1.000000
 MuonHitsM2R1: 1023.000000
 MuonHitsM2R2: 1023.000000
@@ -230,20 +230,20 @@ VeloClustersOuterBin00: 62.000000
 VeloClustersOuterBin01: 143.000000
 VeloClustersOuterBin02: 96.000000
 VeloClustersOuterBin03: 88.000000
-VeloFiducialTracks: 165.000000
-VeloTracks: 172.000000
-VeloTracksEtaBin0: 4.000000
-VeloTracksEtaBin1: 25.000000
-VeloTracksEtaBin2: 18.000000
-VeloTracksEtaBin3: 14.000000
-VeloTracksEtaBin4: 31.000000
-VeloTracksEtaBin5: 34.000000
-VeloTracksEtaBin6: 40.000000
+VeloFiducialTracks: 168.000000
+VeloTracks: 177.000000
+VeloTracksEtaBin0: 7.000000
+VeloTracksEtaBin1: 27.000000
+VeloTracksEtaBin2: 19.000000
+VeloTracksEtaBin3: 20.000000
+VeloTracksEtaBin4: 33.000000
+VeloTracksEtaBin5: 30.000000
+VeloTracksEtaBin6: 35.000000
 VeloTracksEtaBin7: 6.000000
-VeloVertexX: 0.000000
-VeloVertexY: 0.000000
-VeloVertexZ: 0.000000
-VeloVertices: 0.000000
+VeloVertexX: 1.239624
+VeloVertexY: 0.122681
+VeloVertexZ: -16.052245
+VeloVertices: 3.000000
 encodingKey: 3104473477.000000
 -------------- Event 6541 --------------
 BCIDHigh: 0.000000
@@ -257,7 +257,7 @@ ECalETMiddleTop: 8564.999872
 ECalETOuterBottom: 16634.999752
 ECalETOuterTop: 16179.999759
 ECalEtot: 721529.272263
-FiducialVeloVertices: 2.000000
+FiducialVeloVertices: 3.000000
 GEC: 1.000000
 MuonHitsM2R1: 1023.000000
 MuonHitsM2R2: 1023.000000
@@ -441,20 +441,20 @@ VeloClustersOuterS22: 20.000000
 VeloClustersOuterS23: 25.000000
 VeloClustersOuterS24: 20.000000
 VeloClustersOuterS25: 25.000000
-VeloFiducialTracks: 218.000000
-VeloTracks: 225.000000
+VeloFiducialTracks: 201.000000
+VeloTracks: 207.000000
 VeloTracksEtaBin0: 5.000000
-VeloTracksEtaBin1: 12.000000
-VeloTracksEtaBin2: 16.000000
-VeloTracksEtaBin3: 13.000000
-VeloTracksEtaBin4: 52.000000
-VeloTracksEtaBin5: 48.000000
-VeloTracksEtaBin6: 67.000000
+VeloTracksEtaBin1: 13.000000
+VeloTracksEtaBin2: 17.000000
+VeloTracksEtaBin3: 17.000000
+VeloTracksEtaBin4: 55.000000
+VeloTracksEtaBin5: 40.000000
+VeloTracksEtaBin6: 48.000000
 VeloTracksEtaBin7: 12.000000
-VeloVertexX: 0.007324
-VeloVertexY: 0.096436
-VeloVertexZ: -33.508299
-VeloVertices: 2.000000
+VeloVertexX: 0.961304
+VeloVertexY: 0.169678
+VeloVertexZ: -11.962890
+VeloVertices: 3.000000
 encodingKey: 492876054.000000
 -------------- Event 9516 --------------
 BCIDHigh: 0.000000
@@ -590,7 +590,7 @@ ECalETMiddleTop: 5349.999920
 ECalETOuterBottom: 9369.999860
 ECalETOuterTop: 13969.999792
 ECalEtot: 546746.654634
-FiducialVeloVertices: 2.000000
+FiducialVeloVertices: 3.000000
 GEC: 1.000000
 MuonHitsM2R1: 1023.000000
 MuonHitsM2R2: 1023.000000
@@ -624,20 +624,20 @@ VeloClustersOuterBin00: 90.000000
 VeloClustersOuterBin01: 151.000000
 VeloClustersOuterBin02: 116.000000
 VeloClustersOuterBin03: 133.000000
-VeloFiducialTracks: 211.000000
-VeloTracks: 228.000000
-VeloTracksEtaBin0: 9.000000
-VeloTracksEtaBin1: 34.000000
-VeloTracksEtaBin2: 22.000000
-VeloTracksEtaBin3: 25.000000
+VeloFiducialTracks: 202.000000
+VeloTracks: 225.000000
+VeloTracksEtaBin0: 10.000000
+VeloTracksEtaBin1: 36.000000
+VeloTracksEtaBin2: 21.000000
+VeloTracksEtaBin3: 39.000000
 VeloTracksEtaBin4: 41.000000
-VeloTracksEtaBin5: 45.000000
-VeloTracksEtaBin6: 46.000000
+VeloTracksEtaBin5: 38.000000
+VeloTracksEtaBin6: 34.000000
 VeloTracksEtaBin7: 6.000000
-VeloVertexX: -0.040894
-VeloVertexY: -0.032959
-VeloVertexZ: 40.893553
-VeloVertices: 2.000000
+VeloVertexX: 1.308594
+VeloVertexY: 0.125122
+VeloVertexZ: 10.925292
+VeloVertices: 3.000000
 encodingKey: 3104473477.000000
 -------------- Event 13890 --------------
 BCIDHigh: 0.000000
@@ -651,7 +651,7 @@ ECalETMiddleTop: 11224.999833
 ECalETOuterBottom: 15934.999763
 ECalETOuterTop: 15349.999771
 ECalEtot: 795532.274547
-FiducialVeloVertices: 4.000000
+FiducialVeloVertices: 2.000000
 GEC: 1.000000
 MuonHitsM2R1: 1023.000000
 MuonHitsM2R2: 1023.000000
@@ -685,20 +685,20 @@ VeloClustersOuterBin00: 77.000000
 VeloClustersOuterBin01: 173.000000
 VeloClustersOuterBin02: 197.000000
 VeloClustersOuterBin03: 127.000000
-VeloFiducialTracks: 263.000000
-VeloTracks: 275.000000
+VeloFiducialTracks: 259.000000
+VeloTracks: 271.000000
 VeloTracksEtaBin0: 5.000000
-VeloTracksEtaBin1: 37.000000
-VeloTracksEtaBin2: 35.000000
-VeloTracksEtaBin3: 18.000000
-VeloTracksEtaBin4: 63.000000
-VeloTracksEtaBin5: 59.000000
-VeloTracksEtaBin6: 47.000000
+VeloTracksEtaBin1: 41.000000
+VeloTracksEtaBin2: 37.000000
+VeloTracksEtaBin3: 27.000000
+VeloTracksEtaBin4: 59.000000
+VeloTracksEtaBin5: 54.000000
+VeloTracksEtaBin6: 37.000000
 VeloTracksEtaBin7: 11.000000
-VeloVertexX: 0.024414
-VeloVertexY: -0.050659
-VeloVertexZ: -36.865233
-VeloVertices: 4.000000
+VeloVertexX: 1.112061
+VeloVertexY: 0.112305
+VeloVertexZ: -60.974118
+VeloVertices: 2.000000
 encodingKey: 3104473477.000000
 -------------- Event 15450 --------------
 BCIDHigh: 0.000000
@@ -773,7 +773,7 @@ ECalETMiddleTop: 9054.999865
 ECalETOuterBottom: 12889.999808
 ECalETOuterTop: 25864.999615
 ECalEtot: 778860.609527
-FiducialVeloVertices: 3.000000
+FiducialVeloVertices: 5.000000
 GEC: 1.000000
 MuonHitsM2R1: 1023.000000
 MuonHitsM2R2: 1023.000000
@@ -807,20 +807,20 @@ VeloClustersOuterBin00: 98.000000
 VeloClustersOuterBin01: 272.000000
 VeloClustersOuterBin02: 233.000000
 VeloClustersOuterBin03: 145.000000
-VeloFiducialTracks: 313.000000
-VeloTracks: 330.000000
-VeloTracksEtaBin0: 15.000000
-VeloTracksEtaBin1: 39.000000
-VeloTracksEtaBin2: 38.000000
-VeloTracksEtaBin3: 40.000000
-VeloTracksEtaBin4: 73.000000
-VeloTracksEtaBin5: 69.000000
-VeloTracksEtaBin6: 52.000000
+VeloFiducialTracks: 321.000000
+VeloTracks: 339.000000
+VeloTracksEtaBin0: 17.000000
+VeloTracksEtaBin1: 38.000000
+VeloTracksEtaBin2: 44.000000
+VeloTracksEtaBin3: 53.000000
+VeloTracksEtaBin4: 74.000000
+VeloTracksEtaBin5: 66.000000
+VeloTracksEtaBin6: 43.000000
 VeloTracksEtaBin7: 4.000000
-VeloVertexX: 0.004272
-VeloVertexY: 0.064697
-VeloVertexZ: 32.165526
-VeloVertices: 3.000000
+VeloVertexX: 1.207886
+VeloVertexY: 0.264282
+VeloVertexZ: 30.700682
+VeloVertices: 5.000000
 encodingKey: 3104473477.000000
 -------------- Event 18514 --------------
 BCIDHigh: 0.000000
@@ -834,7 +834,7 @@ ECalETMiddleTop: 3104.999954
 ECalETOuterBottom: 9309.999861
 ECalETOuterTop: 9649.999856
 ECalEtot: 353973.031587
-FiducialVeloVertices: 1.000000
+FiducialVeloVertices: 4.000000
 GEC: 1.000000
 MuonHitsM2R1: 1023.000000
 MuonHitsM2R2: 1023.000000
@@ -868,20 +868,20 @@ VeloClustersOuterBin00: 59.000000
 VeloClustersOuterBin01: 111.000000
 VeloClustersOuterBin02: 95.000000
 VeloClustersOuterBin03: 99.000000
-VeloFiducialTracks: 146.000000
-VeloTracks: 155.000000
-VeloTracksEtaBin0: 9.000000
-VeloTracksEtaBin1: 23.000000
+VeloFiducialTracks: 152.000000
+VeloTracks: 166.000000
+VeloTracksEtaBin0: 10.000000
+VeloTracksEtaBin1: 25.000000
 VeloTracksEtaBin2: 22.000000
-VeloTracksEtaBin3: 16.000000
-VeloTracksEtaBin4: 30.000000
-VeloTracksEtaBin5: 35.000000
-VeloTracksEtaBin6: 16.000000
+VeloTracksEtaBin3: 24.000000
+VeloTracksEtaBin4: 37.000000
+VeloTracksEtaBin5: 27.000000
+VeloTracksEtaBin6: 17.000000
 VeloTracksEtaBin7: 4.000000
-VeloVertexX: -0.039673
-VeloVertexY: 0.023193
-VeloVertexZ: 71.716305
-VeloVertices: 1.000000
+VeloVertexX: 1.179810
+VeloVertexY: 0.062866
+VeloVertexZ: 58.349607
+VeloVertices: 4.000000
 encodingKey: 3104473477.000000
 -------------- Event 20355 --------------
 BCIDHigh: 0.000000
@@ -1228,7 +1228,7 @@ ECalETMiddleTop: 20054.999701
 ECalETOuterBottom: 32239.999520
 ECalETOuterTop: 41504.999382
 ECalEtot: 1832368.909254
-FiducialVeloVertices: 2.000000
+FiducialVeloVertices: 6.000000
 GEC: 1.000000
 MuonHitsM2R1: 1023.000000
 MuonHitsM2R2: 1023.000000
@@ -1262,20 +1262,20 @@ VeloClustersOuterBin00: 139.000000
 VeloClustersOuterBin01: 297.000000
 VeloClustersOuterBin02: 289.000000
 VeloClustersOuterBin03: 301.000000
-VeloFiducialTracks: 475.000000
-VeloTracks: 504.000000
-VeloTracksEtaBin0: 10.000000
-VeloTracksEtaBin1: 46.000000
-VeloTracksEtaBin2: 53.000000
-VeloTracksEtaBin3: 37.000000
-VeloTracksEtaBin4: 106.000000
-VeloTracksEtaBin5: 126.000000
-VeloTracksEtaBin6: 105.000000
-VeloTracksEtaBin7: 21.000000
-VeloVertexX: 0.103149
-VeloVertexY: 0.038452
-VeloVertexZ: -30.090331
-VeloVertices: 2.000000
+VeloFiducialTracks: 467.000000
+VeloTracks: 496.000000
+VeloTracksEtaBin0: 11.000000
+VeloTracksEtaBin1: 50.000000
+VeloTracksEtaBin2: 56.000000
+VeloTracksEtaBin3: 48.000000
+VeloTracksEtaBin4: 104.000000
+VeloTracksEtaBin5: 117.000000
+VeloTracksEtaBin6: 88.000000
+VeloTracksEtaBin7: 22.000000
+VeloVertexX: 1.080322
+VeloVertexY: 0.236816
+VeloVertexZ: -52.307126
+VeloVertices: 6.000000
 encodingKey: 3104473477.000000
 -------------- Event 28880 --------------
 BCIDHigh: 0.000000
@@ -1289,7 +1289,7 @@ ECalETMiddleTop: 2164.999968
 ECalETOuterBottom: 1814.999973
 ECalETOuterTop: 3459.999948
 ECalEtot: 130524.744303
-FiducialVeloVertices: 0.000000
+FiducialVeloVertices: 1.000000
 GEC: 1.000000
 MuonHitsM2R1: 1023.000000
 MuonHitsM2R2: 1023.000000
@@ -1323,24 +1323,24 @@ VeloClustersOuterBin00: 24.000000
 VeloClustersOuterBin01: 56.000000
 VeloClustersOuterBin02: 43.000000
 VeloClustersOuterBin03: 58.000000
-VeloFiducialTracks: 81.000000
-VeloTracks: 84.000000
+VeloFiducialTracks: 80.000000
+VeloTracks: 83.000000
 VeloTracksEtaBin0: 2.000000
 VeloTracksEtaBin1: 10.000000
 VeloTracksEtaBin2: 5.000000
-VeloTracksEtaBin3: 9.000000
-VeloTracksEtaBin4: 23.000000
-VeloTracksEtaBin5: 16.000000
-VeloTracksEtaBin6: 14.000000
-VeloTracksEtaBin7: 5.000000
-VeloVertexX: 0.000000
-VeloVertexY: 0.000000
-VeloVertexZ: 0.000000
-VeloVertices: 0.000000
+VeloTracksEtaBin3: 11.000000
+VeloTracksEtaBin4: 24.000000
+VeloTracksEtaBin5: 14.000000
+VeloTracksEtaBin6: 13.000000
+VeloTracksEtaBin7: 4.000000
+VeloVertexX: 1.198730
+VeloVertexY: 0.277710
+VeloVertexZ: 3.295898
+VeloVertices: 1.000000
 encodingKey: 3104473477.000000
 HltLumiWriter        INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  | "Average event size / 32-bit words"             |       328 |       9208 |     28.073 |
-VoidFilter_2e3c...   INFO Number of counters : 1
+VoidFilter_2537...   INFO Number of counters : 1
  |    Counter                                      |     #     |    sum     | mean/eff^* | rms/err^*  |     min     |     max     |
  |*"Cut selection efficiency"                      |       385 |        328 |( 85.19481 +- 1.810020)% |
diff --git a/MooreOnlineConf/options/CaloPi0/Pi0_Run3_KaliPackage/Kali_Analyzer.py b/MooreOnlineConf/options/CaloPi0/Pi0_Run3_KaliPackage/Kali_Analyzer.py
new file mode 100755
index 0000000000000000000000000000000000000000..6a0864cbf8e5471e9d2ddb4d6d584b94e03d9403
--- /dev/null
+++ b/MooreOnlineConf/options/CaloPi0/Pi0_Run3_KaliPackage/Kali_Analyzer.py
@@ -0,0 +1,133 @@
+###############################################################################
+# (c) Copyright 2024 CERN for the benefit of the LHCb Collaboration           #
+#                                                                             #
+# This software is distributed under the terms of the GNU General Public      #
+# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
+#                                                                             #
+# In applying this licence, CERN does not waive the privileges and immunities #
+# granted to it by virtue of its status as an Intergovernmental Organization  #
+# or submit itself to any jurisdiction.                                       #
+###############################################################################
+from ruamel.yaml import YAML
+import multiprocessing
+import os
+
+
+def MDFprodOption(inputfiles, outputfile, n_instances):
+    filename = outputfile
+    option_file_name = filename.replace(".mdf", ".yaml")
+    output_manifest_file = filename.replace(".mdf", ".tck.json")
+
+    threads_per_instance = int((multiprocessing.cpu_count() - 1) / n_instances)
+    if threads_per_instance == 0:
+        print(
+            "### WARNING: More instances than cpu_threads. Setting threads_per_instance = 1. \n"
+        )
+        threads_per_instance = 1
+    print(f"### threads_per_instance: {threads_per_instance}")
+
+    f = open(option_file_name, "w")
+    write_lines = [
+        "input_files:\n",
+    ] + ["- '%s'\n" % inputfile for inputfile in inputfiles] + [
+        "input_type: 'RAW'\n", "evt_max: 100000 \n",
+        "output_file: '%s'\n" % outputfile,
+        "output_manifest_file: '%s' \n" % output_manifest_file,
+        "input_process: 'Hlt2'\n", "input_raw_format: 0.5\n",
+        "data_type: Upgrade\n", "simulation: False\n",
+        f"n_threads: {threads_per_instance} \n",
+        "scheduler_legacy_mode: False\n", "output_type: 'RAW' \n",
+        "geometry_version : run3/2024.Q1.2-v00.00 \n",
+        "conditions_version : 'master' \n", "print_freq: 1000 \n",
+        "write_decoding_keys_to_git: False \n"
+    ]
+    f.writelines(write_lines)
+    f.close()
+
+    return option_file_name
+
+
+def NtupleprodOption(inputfiles, outputfile):
+    filename = inputfiles
+    option_file_name = filename.replace(".mdf", ".yaml")
+    json_file = filename.replace(".mdf", ".tck.json")
+
+    f = open(option_file_name, "w")
+    write_lines = [
+        "input_files:\n",
+    ] + [
+        "- '%s'\n" % os.path.abspath(inputfile) for inputfile in [inputfiles]
+    ] + [
+        "input_manifest_file: '%s' \n" % os.path.abspath(json_file),
+        "input_type: 'RAW'\n",
+        "evt_max: -1\n",
+        f"ntuple_file: '{os.path.join(os.getcwd(), outputfile)}'\n",
+        #"ntuple_file: '%s'\n" % outputfile,
+        "input_process: Hlt2\n",
+        "input_stream: default"
+        " \n",
+        "n_threads: 1 \n",
+        "input_raw_format: 0.5\n",
+        "lumi: False\n",
+        "data_type: Upgrade\n",
+        "simulation: False\n",
+        "conddb_tag: 'upgrade/master'\n",
+        "dddb_tag: 'upgrade/master'\n",
+        "geometry_version : run3/2024.Q1.2-v00.00 \n",
+        "conditions_version : 'master' \n",
+    ]
+    f.writelines(write_lines)
+    f.close()
+
+    return option_file_name
+
+
+def merge_lambda_yaml_files(FirstPass_lambda: str, SecondPass_lambda: str,
+                            output_file_path: str):
+
+    yaml = YAML()
+
+    with open(FirstPass_lambda, 'r') as stream:
+        calibFirst = yaml.load(stream)
+
+    with open(SecondPass_lambda, 'r') as stream2:
+        calibSecond = yaml.load(stream2)
+
+    Lines_1 = calibFirst['data']
+    Lines_2 = calibSecond['data']
+
+    Num_of_hist = 11384  #number of histograms
+
+    corr = 32768
+    #Correction over the cell index
+
+    Lambda_1 = [None] * Num_of_hist
+    Lambda_2 = [None] * Num_of_hist
+    Lambda_3 = [None] * Num_of_hist
+    Merged_lambda = [[None, None]] * Num_of_hist
+
+    output_merged_file = open(
+        os.path.join(output_file_path, "merged_lambda.yml"), 'w')
+    output_merged_file.write('data: [\n')
+
+    for line1 in Lines_1:
+        Lambda_1[line1[0] - corr] = float(line1[1])
+
+    for line2 in Lines_2:
+        Lambda_2[line2[0] - corr] = float(line2[1])
+
+    for i in range(0, len(Lambda_1)):
+
+        if (not Lambda_1[i] is None or not Lambda_2[i] is None):
+            Lambda_3[i] = Lambda_1[i] * Lambda_2[i]
+        else:
+            continue
+
+        if (Lambda_3[i] < 1.4 or Lambda_3[i] > 0.6):
+            Merged_lambda.insert(i, [i + 32768, Lambda_3[i]])
+        else:
+            Merged_lambda.insert(i, [i + 32768, 1.0])
+
+        output_merged_file.write(f"{Merged_lambda[i]}, \n")
+
+    output_merged_file.write(']')
diff --git a/MooreOnlineConf/options/CaloPi0/Pi0_Run3_KaliPackage/Kali_doCalibration.py b/MooreOnlineConf/options/CaloPi0/Pi0_Run3_KaliPackage/Kali_doCalibration.py
new file mode 100644
index 0000000000000000000000000000000000000000..ea96afe15b3aa74be4c450f0f674b9d5c1597789
--- /dev/null
+++ b/MooreOnlineConf/options/CaloPi0/Pi0_Run3_KaliPackage/Kali_doCalibration.py
@@ -0,0 +1,94 @@
+###############################################################################
+# (c) Copyright 2018 CERN for the benefit of the LHCb Collaboration           #
+#                                                                             #
+# This software is distributed under the terms of the GNU General Public      #
+# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
+#                                                                             #
+# In applying this licence, CERN does not waive the privileges and immunities #
+# granted to it by virtue of its status as an Intergovernmental Organization  #
+# or submit itself to any jurisdiction.                                       #
+###############################################################################
+#--> perform an iteration of the pi0 calibration: fill the histogram, perform the fit and extract the calibration constants.
+#--> in default, only bad fits and cells with low statistics are saved; if VERBOSE invoked, all the fits are saved on disk.
+#--> three types of input files are allowed: ROOT (TTree), MMap, ROOT (TH2D: names hists & hists_bg)
+#--> any further questions, please contact Zhirui at zhirui@cern.ch
+
+import os
+import argparse
+from Configurables import LHCbApp
+from Configurables import LHCb__Det__LbDD4hep__IOVProducer as IOVProducer, LHCb__Tests__FakeRunNumberProducer as FakeRunNumberProducer
+from GaudiPython import AppMgr
+from Gaudi.Configuration import ApplicationMgr, INFO
+
+parser = argparse.ArgumentParser(description="do_calibration")
+parser.add_argument("--nIt", type=str, dest="nIt", default=None)
+parser.add_argument("--passname", type=str, dest="passname", default=None)
+parser.add_argument("--inputfile", type=str, dest="inputfile", default=None)
+parser.add_argument("--outputfile", type=str, dest="outputfile", default=None)
+parser.add_argument(
+    "--output_lambda_name", type=str, dest="output_lambda_name", default=None)
+
+args = parser.parse_args()
+inputfile = args.inputfile
+outputfile = args.outputfile
+output_lambda_name = args.output_lambda_name
+nIt = args.nIt
+passname = args.passname
+
+args = parser.parse_args()
+tuplename = "Tuple/DecayTree"
+year = 'Upgrade'
+filetype = 'TH2D'
+
+LHCbApp().DataType = 'Upgrade'
+LHCbApp().CondDBtag = 'master'
+LHCbApp().DDDBtag = 'master'
+LHCbApp().Simulation = False
+LHCbApp().GeometryVersion = 'run3/2024.Q1.2-v00.00'
+
+from Configurables import Pi0CalibrationAlg
+pi0Calib = Pi0CalibrationAlg("Pi0Calibration")
+pi0Calib.OutputLevel = 1
+pi0Calib.tupleFileName = inputfile
+pi0Calib.tupleName = tuplename
+pi0Calib.filetype = filetype
+pi0Calib.outputDir = os.path.dirname(outputfile)
+pi0Calib.lambdaFileName = output_lambda_name
+pi0Calib.saveLambdaFile = output_lambda_name
+pi0Calib.saveLambdaYMLFile = outputfile
+pi0Calib.nIt = nIt
+pi0Calib.passname = passname
+
+from Configurables import Pi0CalibrationMonitor
+pi0Moni = Pi0CalibrationMonitor("Pi0CalibrationMonitor")
+pi0Moni.tupleFileName = inputfile
+pi0Moni.tupleName = tuplename
+pi0Moni.outputDir = os.path.dirname(outputfile)
+pi0Moni.inputDir = os.path.dirname(outputfile)
+pi0Moni.OutputLevel = 1
+pi0Moni.nIt = nIt
+pi0Moni.passname = passname
+
+from Configurables import GaudiSequencer
+
+mainSeq = GaudiSequencer("MainSeq")
+
+pi0Moni.outputDir = pi0Moni.outputDir + f"/Iter{nIt}Mon_{passname}"
+os.mkdir(pi0Moni.outputDir)
+mainSeq.Members = [
+    FakeRunNumberProducer(Start=256126, Step=0),
+    IOVProducer(), pi0Calib, pi0Moni
+]
+
+ApplicationMgr(
+    OutputLevel=INFO, AppName="Pi0Calibration", EvtMax=-1, EvtSel='NONE')
+ApplicationMgr().TopAlg.append(mainSeq)
+AppMgr().run(1)
+
+import shutil
+
+for file in os.listdir(pi0Calib.outputDir):
+    if not "txt" in file: continue
+    shutil.copyfile(
+        os.path.join(pi0Calib.outputDir, file),
+        os.path.join(pi0Moni.outputDir, file))
diff --git a/MooreOnlineConf/options/CaloPi0/Pi0_Run3_KaliPackage/Kali_produceHist.py b/MooreOnlineConf/options/CaloPi0/Pi0_Run3_KaliPackage/Kali_produceHist.py
new file mode 100644
index 0000000000000000000000000000000000000000..d54900dcfbdc5811c191650af6b5fac918600442
--- /dev/null
+++ b/MooreOnlineConf/options/CaloPi0/Pi0_Run3_KaliPackage/Kali_produceHist.py
@@ -0,0 +1,71 @@
+#!/bin/python
+###############################################################################
+# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration      #
+#                                                                             #
+# This software is distributed under the terms of the GNU General Public      #
+# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
+#                                                                             #
+# In applying this licence, CERN does not waive the privileges and immunities #
+# granted to it by virtue of its status as an Intergovernmental Organization  #
+# or submit itself to any jurisdiction.                                       #
+###############################################################################
+## ============= the basic import ====================
+#from Gaudi.Configuration import *
+from Gaudi.Configuration import INFO
+from Configurables import LHCb__Det__LbDD4hep__IOVProducer as IOVProducer, LHCb__Tests__FakeRunNumberProducer as FakeRunNumberProducer
+from GaudiPython.Bindings import AppMgr
+from Gaudi.Configuration import ApplicationMgr
+from Configurables import Pi0MMap2Histo
+from Configurables import GaudiSequencer
+from Configurables import LHCbApp
+
+import os
+
+MSG_VERBOSE = 3
+MSG_DEBUG = 3
+MSG_INFO = 3
+MSG_WARNING = 4
+MSG_ERROR = 5
+MSG_FATAL = 6
+MSG_ALWAYS = 7
+
+import argparse
+parser = argparse.ArgumentParser(description="Input file delivery")
+parser.add_argument("--inputfile", type=str, dest="inputfile", default=None)
+parser.add_argument("--outputfile", type=str, dest="outputfile", default=None)
+parser.add_argument(
+    "--input_lambda_name", type=str, dest="input_lambda_name", default=None)
+args = parser.parse_args()
+
+inputfile = args.inputfile
+outputfile = args.outputfile
+input_lambda_name = args.input_lambda_name
+tuplename = "Tuple/DecayTree"
+year = 'Upgrade'
+
+if '__main__' == __name__:
+
+    LHCbApp().DataType = 'Upgrade'
+    LHCbApp().CondDBtag = 'master'
+    LHCbApp().DDDBtag = 'master'
+    LHCbApp().Simulation = False
+    LHCbApp().GeometryVersion = 'run3/trunk'
+    # LHCbApp().OnlineMode = True
+
+    pi02Histo = Pi0MMap2Histo("Pi0MMap2Histo")
+    pi02Histo.nworker = 1
+    pi02Histo.filenames = [inputfile]
+    pi02Histo.outputDir = os.path.dirname(outputfile)
+    pi02Histo.outputName = os.path.basename(outputfile)
+    pi02Histo.OutputLevel = MSG_INFO
+    pi02Histo.lambdaFileName = input_lambda_name
+
+    mainSeq = GaudiSequencer("MainSeq")
+    mainSeq.Members = [
+        FakeRunNumberProducer(Start=268295, Step=0),
+        IOVProducer(), pi02Histo
+    ]
+    ApplicationMgr(
+        OutputLevel=INFO, AppName="Pi0MMap2Histo", EvtMax=1, EvtSel='NONE')
+    ApplicationMgr().TopAlg.append(mainSeq)
+    AppMgr().run(1)
diff --git a/MooreOnlineConf/options/CaloPi0/Pi0_Run3_KaliPackage/Kali_produceHist2D.py b/MooreOnlineConf/options/CaloPi0/Pi0_Run3_KaliPackage/Kali_produceHist2D.py
new file mode 100644
index 0000000000000000000000000000000000000000..b6179d7c417df397fc9ddc346fd56297356fb2ab
--- /dev/null
+++ b/MooreOnlineConf/options/CaloPi0/Pi0_Run3_KaliPackage/Kali_produceHist2D.py
@@ -0,0 +1,136 @@
+#!/bin/python
+###############################################################################
+# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration      #
+#                                                                             #
+# This software is distributed under the terms of the GNU General Public      #
+# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
+#                                                                             #
+# In applying this licence, CERN does not waive the privileges and immunities #
+# granted to it by virtue of its status as an Intergovernmental Organization  #
+# or submit itself to any jurisdiction.                                       #
+###############################################################################
+## ============= the basic import ====================
+#from Gaudi.Configuration import *
+from Gaudi.Configuration import INFO
+from Configurables import LHCb__Det__LbDD4hep__IOVProducer as IOVProducer, LHCb__Tests__FakeRunNumberProducer as FakeRunNumberProducer
+from GaudiPython.Bindings import AppMgr
+from Gaudi.Configuration import ApplicationMgr
+from Configurables import Pi0MMap2Histo
+from Configurables import GaudiSequencer
+from Configurables import LHCbApp
+from ROOT import RDataFrame, TChain, TFile, TF1, ROOT, TH2D, gROOT, TH1D, gPad, kRed, kGreen, kBlack
+import ROOT as ROOT26, math
+#from funcs import cellid2COLROW
+from multiprocessing import Pool
+import os
+
+MSG_VERBOSE = 3
+MSG_DEBUG = 3
+MSG_INFO = 3
+MSG_WARNING = 4
+MSG_ERROR = 5
+MSG_FATAL = 6
+MSG_ALWAYS = 7
+from tqdm import trange, tqdm
+import argparse
+parser = argparse.ArgumentParser(description="Input file delivery")
+parser.add_argument("--inputfile", nargs='+', dest="inputfile", default=None)
+parser.add_argument("--outputfile", type=str, dest="outputfile", default=None)
+parser.add_argument(
+    "--input_lambda_name", type=str, dest="input_lambda_name", default=None)
+parser.add_argument("--nworker", type=int, dest="nworker", default=None)
+args = parser.parse_args()
+
+inputfile = args.inputfile
+outputfile = args.outputfile
+input_lambda_name = args.input_lambda_name
+nworker = args.nworker
+tuplename = "Tuple/DecayTree"
+
+if '__main__' == __name__:
+    import ROOT
+    ROOT.ROOT.EnableImplicitMT(nworker)
+    ch = ROOT.TChain(tuplename)
+    for f in inputfile:
+        ch.Add(f)
+
+    df = ROOT.RDataFrame(ch)
+
+    # fill histograme with the different cuts for the different areas
+    ROOT.gInterpreter.Declare('''
+    bool in_tight_cut_region(int cellid){
+      int col  = ( (cellid &    63) >>  0 );
+      int row  = ( (cellid &  4032) >>  6 );
+      int area = ( (cellid & 12288) >> 12 );
+
+      double ds;
+      if (area == 0) ds = 121.2;
+      if (area == 1) ds = 121.2 / 2;
+      if (area == 2) return false;
+
+      double x = ds * ( col -  32 + .5 );
+      double y = ds * (  32 - row + .5 );
+
+      if (abs(y / x) < 0.3) return true;
+      else return false;
+    }
+    ''')
+
+    df = df.Define(
+        "in_tight_cut_regions",
+        "in_tight_cut_region(g1_CellID)||in_tight_cut_region(g2_CellID)")
+    df = df.Filter(
+        "nPVs <= 1 && (in_tight_cut_regions&&pi0_PT>1700)||(!(in_tight_cut_regions))"
+    )
+
+    # scale candidate's mass. The func can be used in RDataFrame
+    m = "pi0_m12"
+    if os.path.exists(input_lambda_name):
+        lambdas = []
+        with open(input_lambda_name, "r") as f:
+            for line in f.readlines():
+                line = line.strip('\n').split('  ')
+                lambdas.append((int(line[0]), float(line[1])))
+        lambdas = f"{lambdas}".replace('(', '{').replace(')', '}').replace(
+            '[', '{').replace(']', '}')
+
+        ROOT.gInterpreter.Declare(f'''
+          std::map <int, float> lambdas = {lambdas};
+
+          float m_scale(int g1_cellid, int g2_cellid, float pi0_m){{
+            float g1_lambda = 1;
+            float g2_lambda = 1;
+            if (lambdas.count(g1_cellid)) g1_lambda = lambdas[g1_cellid];
+            if (lambdas.count(g2_cellid)) g2_lambda = lambdas[g2_cellid];
+            return pi0_m * sqrt( g1_lambda * g2_lambda );
+          }}
+        ''')
+        m = "pi0_m12_scaled"
+        df = df.Define("pi0_m12_scaled",
+                       "m_scale(g1_CellID, g2_CellID, pi0_m12)")
+    else:
+        print("Lambda file not found. Create one to start")
+        with open(input_lambda_name, "w") as f:
+            f.write("")
+        print(f"File {input_lambda_name} created !")
+    h = TH2D("hists", ";cell id;#pi^{0} mass [MeV]", 11384, 1, 11385, 100, 0,
+             250)
+    h1 = df.Histo2D(
+        ("h1", ";cell id;#pi^{0} mass [MeV]", 11384, 1, 11385, 100, 0, 250),
+        "g1_CellID", m)
+
+    h2 = df.Histo2D(
+        ("h2", ";cell id;#pi^{0} mass [MeV]", 11384, 1, 11385, 100, 0, 250),
+        "g2_CellID", m)
+
+    h.Add(h1.GetValue())
+    h.Add(h2.GetValue())
+    print(f"number of entries {h.GetEntries()}")
+    outf = ROOT.TFile(
+        os.path.join(
+            os.path.dirname(outputfile), os.path.basename(outputfile)),
+        "recreate")
+    h.Write("hists")
+    outf.Close()
+
+os.path.join(os.path.dirname(outputfile), os.path.basename(input_lambda_name))
diff --git a/MooreOnlineConf/options/CaloPi0/Pi0_Run3_KaliPackage/Kali_produceMDF.py b/MooreOnlineConf/options/CaloPi0/Pi0_Run3_KaliPackage/Kali_produceMDF.py
new file mode 100755
index 0000000000000000000000000000000000000000..e2b5bcfd788a7387234e77fccb981bbbe1db2571
--- /dev/null
+++ b/MooreOnlineConf/options/CaloPi0/Pi0_Run3_KaliPackage/Kali_produceMDF.py
@@ -0,0 +1,117 @@
+###############################################################################
+# (c) Copyright 2024 CERN for the benefit of the LHCb Collaboration           #
+#                                                                             #
+# This software is distributed under the terms of the GNU General Public      #
+# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
+#                                                                             #
+# In applying this licence, CERN does not waive the privileges and immunities #
+# granted to it by virtue of its status as an Intergovernmental Organization  #
+# or submit itself to any jurisdiction.                                       #
+###############################################################################
+from Gaudi.Configuration import INFO
+from PyConf.Algorithms import CaloFutureRawToDigits
+from RecoConf.muonid import make_muon_hits
+from GaudiPython.Bindings import AppMgr
+from PyConf.application import metainfo_repos
+from Configurables import LHCb__Det__LbDD4hep__DD4hepSvc as DD4hepSvc
+from RecoConf.calorimeter_reconstruction import make_digits
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.global_tools import stateProvider_with_simplified_geom
+
+from RecoConf.decoders import default_ft_decoding_version, default_VeloCluster_source
+from Hlt2Conf.algorithms_thor import ParticleFilter
+import Functors as F
+from Functors.math import in_range
+from GaudiKernel.SystemOfUnits import MeV
+from Hlt2Conf.standard_particles import make_photons
+from Hlt2Conf.algorithms_thor import ParticleCombiner
+from Moore.lines import Hlt2Line
+from Moore.config import register_line_builder
+from RecoConf.reconstruction_objects import make_pvs, upfront_reconstruction
+from PyConf import configurable
+
+from Moore import Options, run_moore
+from Configurables import LHCb__Det__LbDD4hep__DD4hepSvc as DD4hepSvc
+
+all_lines = {}
+
+
+@configurable
+def pi0_filter(particles):
+    cut = F.require_all(F.PT > 200 * (7 - F.ETA) * MeV)
+    return ParticleFilter(particles, F.FILTER(cut))
+
+
+@configurable
+def photons_filter(particles):
+    cut = F.require_all(F.CALO_NEUTRAL_1TO9_ENERGY_RATIO > 0.7,
+                        F.IS_NOT_H > .7)
+    return ParticleFilter(particles, F.FILTER(cut))
+
+
+@configurable
+def make_own_resolved_pi0s(particles=make_photons(),
+                           MaxMass=350 * MeV,
+                           PtCut=0. * MeV,
+                           **kwargs):
+
+    comb_code = F.require_all(in_range(0., F.MASS, MaxMass))
+    mother_code = F.require_all(F.PT > PtCut)
+
+    return ParticleCombiner(
+        Inputs=[particles, particles],
+        DecayDescriptor="pi0 -> gamma gamma",
+        CombinationCut=comb_code,
+        CompositeCut=mother_code,
+        ParticleCombiner="ParticleAdder")
+
+
+@register_line_builder(all_lines)
+def All_pi0_line(name="Hlt2Allpi0", prescale=1.0):
+    photons = photons_filter(make_photons(PtCut=300 * MeV, pv_maker=make_pvs))
+    resolved_pi0 = make_own_resolved_pi0s(particles=photons, MaxMass=300 * MeV)
+    pi0 = pi0_filter(resolved_pi0)
+
+    return Hlt2Line(
+        name=name, algs=upfront_reconstruction() + [pi0], prescale=prescale)
+
+
+def main(options: Options, pass_name: str, overlay_path: str):
+
+    metainfo_repos.global_bind(extra_central_tags=['commissioning'])
+    dd4hepSvc = DD4hepSvc()
+
+    if pass_name == "SecondPass":
+        dd4hepSvc.UseConditionsOverlay = True
+        dd4hepSvc.ConditionsOverlayInitPath = overlay_path
+
+    dd4hepSvc.DetectorList = [
+        '/world', 'VP', 'FT', 'Magnet', 'Rich1', 'Rich2', 'Ecal', 'Hcal',
+        'Muon'
+    ]
+
+    def resolved_pi0():
+        return [builder() for builder in all_lines.values()]
+
+    from RecoConf.global_tools import (
+        trackMasterExtrapolator_with_simplified_geom, )
+
+    from RecoConf.hlt2_global_reco import (
+        make_light_reco_pr_kf_without_UT, )
+
+    from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction
+
+    from RecoConf.ttrack_selections_reco import make_ttrack_reco
+
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+
+    with reconstruction.bind(from_file=False), default_VeloCluster_source.bind(
+            bank_type="VPRetinaCluster"), make_digits.bind(
+                calo_raw_bank=True), make_muon_hits.bind(
+                    geometry_version=3), hlt2_reconstruction.bind(
+                        make_reconstruction=make_light_reco_pr_kf_without_UT):
+        return run_moore(
+            options, resolved_pi0, public_tools, exclude_incompatible=False)
diff --git a/MooreOnlineConf/options/CaloPi0/Pi0_Run3_KaliPackage/Kali_produceMap.py b/MooreOnlineConf/options/CaloPi0/Pi0_Run3_KaliPackage/Kali_produceMap.py
new file mode 100644
index 0000000000000000000000000000000000000000..449c867ff0db8db42d10552ed8d87a6ba0882ac9
--- /dev/null
+++ b/MooreOnlineConf/options/CaloPi0/Pi0_Run3_KaliPackage/Kali_produceMap.py
@@ -0,0 +1,27 @@
+#!/bin/python
+###############################################################################
+# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration      #
+#                                                                             #
+# This software is distributed under the terms of the GNU General Public      #
+# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
+#                                                                             #
+# In applying this licence, CERN does not waive the privileges and immunities #
+# granted to it by virtue of its status as an Intergovernmental Organization  #
+# or submit itself to any jurisdiction.                                       #
+###############################################################################
+#--> convert the ROOT (TTree) to MMap file
+
+from GaudiPython import gbl
+pi0Calib = gbl.Calibration.Pi0Calibration
+import argparse
+
+parser = argparse.ArgumentParser(description="Input file delivery")
+parser.add_argument("--inputfile", type=str, dest="inputfile", default=None)
+parser.add_argument("--outputfile", type=str, dest="outputfile", default=None)
+args = parser.parse_args()
+
+inputfile = args.inputfile
+outputfile = args.outputfile
+tuplename = "Tuple/DecayTree"
+if '__main__' == __name__:
+    pi0Calib.Pi0CalibrationFile(inputfile, tuplename, outputfile)
diff --git a/MooreOnlineConf/options/CaloPi0/Pi0_Run3_KaliPackage/Kali_produceNtuple.py b/MooreOnlineConf/options/CaloPi0/Pi0_Run3_KaliPackage/Kali_produceNtuple.py
new file mode 100755
index 0000000000000000000000000000000000000000..3fac25e05777116b253903efb328a5e5087de228
--- /dev/null
+++ b/MooreOnlineConf/options/CaloPi0/Pi0_Run3_KaliPackage/Kali_produceNtuple.py
@@ -0,0 +1,105 @@
+###############################################################################
+# (c) Copyright 2024 CERN for the benefit of the LHCb Collaboration           #
+#                                                                             #
+# This software is distributed under the terms of the GNU General Public      #
+# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
+#                                                                             #
+# In applying this licence, CERN does not waive the privileges and immunities #
+# granted to it by virtue of its status as an Intergovernmental Organization  #
+# or submit itself to any jurisdiction.                                       #
+###############################################################################
+import Functors as F
+from FunTuple import FunctorCollection
+from FunTuple import FunTuple_Particles as Funtuple
+from PyConf.reading import get_particles, get_pvs, get_odin
+from DaVinci.algorithms import create_lines_filter
+from DaVinci import make_config, Options
+import FunTuple.functorcollections as FCs
+from PyConf.reading import get_rec_summary
+
+from Configurables import LHCb__Det__LbDD4hep__DD4hepSvc as DD4hepSvc
+
+
+def main(options: Options, pass_name: str, overlay_path: str):
+
+    dd4hepSvc = DD4hepSvc()
+
+    if pass_name == "SecondPass":
+        dd4hepSvc.UseConditionsOverlay = True
+        dd4hepSvc.ConditionsOverlayInitPath = overlay_path
+
+    dd4hepSvc.DetectorList = [
+        '/world', 'VP', 'FT', 'Magnet', 'Rich1', 'Rich2', 'Ecal', 'Hcal',
+        'Muon'
+    ]
+
+    fields = {
+        'pi0': 'pi0 -> gamma gamma',
+        'g1': 'pi0 -> ^gamma gamma',
+        'g2': 'pi0 -> gamma ^gamma',
+    }
+
+    pi0_variables = FunctorCollection({
+        "ID": F.PARTICLE_ID,
+        "m12": F.MASS,
+        "PT": F.PT,
+        "Eta": F.ETA
+    })
+
+    dau_variables = FunctorCollection({
+        "ID":
+        F.PARTICLE_ID,
+        "PT":
+        F.PT,
+        "PE":
+        F.ENERGY,
+        "CellID":
+        F.CALO_NEUTRAL_ID - 32768,
+        "CaloNeutralE19":
+        F.CALO_NEUTRAL_1TO9_ENERGY_RATIO,
+        "Is_NotH":
+        F.IS_NOT_H,
+    })
+
+    variables = {
+        "pi0": pi0_variables,
+        "g1": dau_variables,
+        "g2": dau_variables,
+    }
+
+    pi02ggLine = "Hlt2Allpi0"
+    pi02gg_data = get_particles(f"/Event/HLT2/{pi02ggLine}/Particles")
+    my_filter = create_lines_filter(
+        name="HDRFilter_pi02gg", lines=[pi02ggLine])
+
+    odin = get_odin()
+
+    # HLT1 decision
+    Hlt1_dec = [
+        "Hlt1Pi02GammaGammaDecision",
+        "Hlt1TrackMVADecision",
+    ]
+
+    sel_info = FCs.SelectionInfo(selection_type="Hlt1", trigger_lines=Hlt1_dec)
+
+    rec_summary = get_rec_summary()
+
+    evt_variables = FunctorCollection({
+        "nPVs":
+        F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nPVs")
+    })
+
+    evt_variables += FCs.EventInfo()
+
+    my_tuple = Funtuple(
+        name="Tuple",
+        tuple_name='DecayTree',
+        fields=fields,
+        variables=variables,
+        event_variables=evt_variables,
+        inputs=pi02gg_data,
+    )
+
+    config = make_config(options, [my_filter, my_tuple])
+
+    return config
diff --git a/MooreOnlineConf/options/CaloPi0/analyzer.py b/MooreOnlineConf/options/CaloPi0/analyzer.py
new file mode 100644
index 0000000000000000000000000000000000000000..8028bdf2284875af137bc1734f4b582bc0b867c5
--- /dev/null
+++ b/MooreOnlineConf/options/CaloPi0/analyzer.py
@@ -0,0 +1,235 @@
+###############################################################################
+# (c) Copyright 2000-2023 CERN for the benefit of the LHCb Collaboration      #
+#                                                                             #
+# This software is distributed under the terms of the GNU General Public      #
+# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
+#                                                                             #
+# In applying this licence, CERN does not waive the privileges and immunities #
+# granted to it by virtue of its status as an Intergovernmental Organization  #
+# or submit itself to any jurisdiction.                                       #
+###############################################################################
+from MooreOnlineConf.Communicator import Communicator, State
+import os, time, random, sys
+import shlex
+import subprocess
+import shutil
+
+sys.path.append("Pi0_Run3_KaliPackage")  # FIXME remove
+
+from MooreOnlineConf.utils import (
+    alignment_options,
+    ensure_output_dir,
+    distribute_files,
+)
+
+from Pi0_Run3_KaliPackage.Kali_Analyzer import NtupleprodOption, MDFprodOption
+from pathlib import Path
+
+NIteration = 7
+
+
+def subprocess_run(*args, **kwargs):
+    print(f"subprocess.run(): {args} {kwargs}")
+    return subprocess.run(*args, **kwargs)
+
+
+def MDFprod(input_files: list, output_file: str, secondPass: str,
+            overlay_path: str, n_instances: int):
+    print(f"MDFprod: {input_files} -> {output_file}")
+
+    options_file = MDFprodOption(input_files, str(output_file),
+                                 int(n_instances))
+    print(options_file)
+    kali_path = os.path.dirname(
+        __file__) + "/Pi0_Run3_KaliPackage/Kali_produceMDF.py:main"
+    subprocess_run(
+        ["lbexec", kali_path, options_file, secondPass, overlay_path],
+        check=True)
+
+
+def Ntupleprod(input_file: str, output_file: str, secondPass: str,
+               work_dir: str, overlay_path: str):
+    print(f"Ntupleprod: {input_file}, {overlay_path} -> {output_file}")
+
+    options_file = os.path.abspath(
+        NtupleprodOption(str(input_file), str(output_file)))
+    print(options_file)
+    kali_path = os.path.dirname(
+        __file__) + "/Pi0_Run3_KaliPackage/Kali_produceNtuple.py:main"
+    if not os.path.exists(work_dir): os.mkdir(work_dir)
+    #subprocess_run(
+    #    #["lb-run", "DaVinci/v64r4", "lbexec", kali_path, options_file, secondPass, overlay_path],
+    #    [
+    #        "/swdev/calo/stack/DaVinci/run", "lbexec", kali_path, options_file,
+    #        #"/scratch/lesantor/stack/DaVinci/run", "lbexec", kali_path, options_file,
+    #        secondPass, overlay_path
+    #    ],
+    #    check=True)
+    subprocess_run(
+        f"cd {work_dir};\
+          env -i /cvmfs/lhcb.cern.ch/lib/var/lib/LbEnv/3149/stable/linux-64/bin/lb-run -c x86_64_v3-el9-gcc13-opt+g DaVinci/v64r5 lbexec {kali_path} {options_file} {secondPass} {overlay_path};\
+          ",
+        shell=True,
+        check=True)
+    shutil.rmtree(work_dir)
+
+
+def MMapprod(input_file: str, output_file: str):
+    print(f"MMapprod: {input_file} -> {output_file}")
+    cmd = "python " + os.path.dirname(
+        __file__
+    ) + f"/Pi0_Run3_KaliPackage/Kali_produceMap.py --inputfile {input_file} --outputfile {output_file}"
+    subprocess_run(shlex.split(cmd))
+
+
+def Histoprod(input_file: str, output_file: str, input_lambda_name: str):
+    print(f"Histoprod: {input_file} -> {output_file}")
+    cmd = "python " + os.path.dirname(
+        __file__
+    ) + f"/Pi0_Run3_KaliPackage/Kali_produceHist.py --inputfile {input_file} --outputfile {output_file} --input_lambda_name {input_lambda_name}"
+    subprocess_run(shlex.split(cmd))
+
+
+def Hist2Doprod(input_file: str, output_file: str, input_lambda_name: str,
+                nworker: int):
+    print(f"Histoprod: {input_file} -> {output_file}")
+    #for input_file in input_file:
+    cmd = "python " + os.path.dirname(
+        __file__
+    ) + f"/Pi0_Run3_KaliPackage/Kali_produceHist2D.py --inputfile {input_file} --outputfile {output_file} --input_lambda_name {input_lambda_name} --nworker {nworker}"
+    subprocess_run(shlex.split(cmd))
+
+
+def run(node, input_files, work_directory, iterator_output_path, n_instances):
+    com = Communicator(f"AligWrk_{node}")
+
+    # FSM loop
+    state = State.NOT_READY
+    com.set_status(state)
+    n_it = 0
+    p_it = 1
+
+    while True:
+
+        command = com.get_command()
+        if command.startswith('configure') and state == State.NOT_READY:
+            state = State.READY
+        elif command.startswith('start') and state == State.READY:
+            state = State.RUNNING
+            com.set_status(state)
+            n_it += 1
+            pass_name = "FirstPass" if p_it == 1 else "SecondPass"
+            print(f"Analyzer: {pass_name},  iteration: {n_it}")
+
+            if p_it >= 3:
+                break
+
+            if n_it == 1:
+                # First pass: Produces ntuples with default DB (lambdas == 1)
+                print("## Running MDFprod! \n")
+
+                MDFprod(
+                    input_files=input_files,
+                    output_file=work_directory /
+                    f"{pass_name}_selected_{node}.mdf",
+                    secondPass=pass_name,
+                    overlay_path=os.path.abspath(
+                        os.path.join(iterator_output_path,
+                                     "new-constants-FirstPass"))
+                    if p_it == 2 else
+                    "git:/cvmfs/lhcb.cern.ch/lib/lhcb/git-conddb/lhcb-conditions-database.git",
+                    n_instances=n_instances)
+
+                print("## Running Ntupleprod! \n")
+                Ntupleprod(
+                    input_file=work_directory /
+                    f"{pass_name}_selected_{node}.mdf",
+                    output_file=work_directory / f"{node}_{pass_name}.root",
+                    work_dir=work_directory / f"{node}_{pass_name}",
+                    secondPass=pass_name,
+                    overlay_path=os.path.abspath(
+                        os.path.join(iterator_output_path,
+                                     "new-constants-FirstPass"))
+                    if p_it == 2 else
+                    "git:/cvmfs/lhcb.cern.ch/lib/lhcb/git-conddb/lhcb-conditions-database.git"
+                )
+
+            print(f"## Running Histo2Dprod {n_it}! \n")
+            Hist2Doprod(
+                input_file=work_directory / f"{node}_{pass_name}.root",
+                #input_file=
+                #"/scratch/lesantor/stack/backup80M/output/CaloPi0/analyzer/0000290068/TEST_N8190604_AlignWrk_1_SecondPass.root",
+                output_file=work_directory /
+                f"{node}_{pass_name}_{n_it}_histos.root",
+                input_lambda_name=os.path.join(iterator_output_path,
+                                               f"{pass_name}_lambda.txt"),
+                nworker=n_instances
+            )  #nworker is number of threads that RDataFrame used
+
+            print(
+                f"## The lambda file in the interation {n_it} from {pass_name} comes from {pass_name}_lambda \n"
+            )
+
+            if n_it == NIteration:
+                n_it = 0
+                p_it += 1
+
+            state = State.PAUSED
+        elif command.startswith('stop') and state == State.PAUSED:
+            state = State.READY
+        elif command.startswith('reset'):
+            state = State.NOT_READY
+        elif command.startswith('unload'):
+            state = State.OFFLINE
+            com.set_status(state)
+            break
+        else:
+            print('analyzer: bad transition from %s to %s' % (state, command))
+            state = State.ERROR
+            com.set_status(state)
+            break
+
+        time.sleep(random.uniform(0.5, 1.5))
+        # Set the status
+        com.set_status(state)
+
+
+if __name__ == '__main__':
+    import OnlineEnvBase as OnlineEnv
+    online_options = alignment_options(OnlineEnv)
+
+    ensure_output_dir(online_options.analyzer_output_path, online_options.tag)
+    print()
+    ensure_output_dir(online_options.iterator_output_path, online_options.tag)
+    print(
+        f"Will write analyzer output to {online_options.analyzer_output_path}")
+
+    if OnlineEnv.PartitionName == "LHCbA" or online_options.runs:
+        INPUT_DATA_PATH = Path("/calib/align/LHCb/Calo")
+
+        files = [
+            sorted((INPUT_DATA_PATH / run).iterdir())
+            for run in online_options.runs
+        ]
+    else:
+        INPUT_DATA_PATH = Path("input_data")
+
+    files_per_node = distribute_files(online_options.nodes, files)
+
+    utgid = os.environ["UTGID"]
+    worker_id = utgid.split("_")[1]
+
+    try:
+        input_files = files_per_node[worker_id]
+    except KeyError:
+        # When testing we run multiple instances on the same node
+        # TODO this should probably be done based on the partition name
+        #      and also "nodes" should be renamed to workers everywhere.
+        worker_id = utgid
+        input_files = files_per_node[worker_id]
+
+    run(worker_id,
+        input_files=input_files,
+        work_directory=online_options.analyzer_output_path,
+        iterator_output_path=online_options.iterator_output_path,
+        n_instances=len(online_options.nodes))
diff --git a/MooreOnlineConf/options/CaloPi0/iterator.py b/MooreOnlineConf/options/CaloPi0/iterator.py
new file mode 100644
index 0000000000000000000000000000000000000000..454120dd5587c34b76b2f4fb070295542c838661
--- /dev/null
+++ b/MooreOnlineConf/options/CaloPi0/iterator.py
@@ -0,0 +1,173 @@
+###############################################################################
+# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration      #
+#                                                                             #
+# This software is distributed under the terms of the GNU General Public      #
+# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
+#                                                                             #
+# In applying this licence, CERN does not waive the privileges and immunities #
+# granted to it by virtue of its status as an Intergovernmental Organization  #
+# or submit itself to any jurisdiction.                                       #
+###############################################################################
+from MooreOnlineConf.Communicator import Communicator, State
+from MooreOnlineConf.utils import (
+    alignment_options,
+    ensure_output_dir,
+)
+import subprocess
+import shlex
+import os
+import shutil
+from ruamel.yaml import YAML
+from Pi0_Run3_KaliPackage.Kali_Analyzer import merge_lambda_yaml_files
+
+# TODO this will not work in nightly tests....
+ONLINE_CONDDB_PATH = "/group/online/hlt/conditions.run3/lhcb-conditions-database"
+CONDITION_PATH = "Conditions/Ecal/Calibration.yml"
+
+NIteration = 7
+
+
+def MergeHistograms(input_files: list, output_file: str):
+    print(f"MergeHistograms: {input_files} -> {output_file}")
+    cmd = f"hadd -f {output_file} {' '.join(input_files)}"
+    subprocess.run(shlex.split(cmd))
+
+
+def DoCalibration(nIt: int, passname: str, input_file: str, output_file: str,
+                  output_lambda_name: str):
+    print(f"DoCalibration: {input_file} -> {output_file}")
+    cmd = "python " + os.path.dirname(
+        __file__
+    ) + f"/Pi0_Run3_KaliPackage/Kali_doCalibration.py --nIt {nIt}  --passname {passname} --passname {passname} --inputfile {input_file} --outputfile {output_file} --output_lambda_name {output_lambda_name} "
+    subprocess.run(shlex.split(cmd))
+
+
+def WriteOverlay(input_file: str, output_dir: str, initial_dir: str):
+    initial_cond_file = os.path.join(initial_dir, CONDITION_PATH)
+    output_cond_file = os.path.join(output_dir, CONDITION_PATH)
+    print(
+        f"WriteOverlay: {initial_cond_file} + {input_file} -> {output_cond_file}"
+    )
+
+    yaml = YAML()
+
+    with open(initial_cond_file) as f:
+        cond = yaml.load(f)
+    with open(input_file) as f:
+        calib = yaml.load(f)
+
+    cond['Calibration']['data'] = calib['data']
+
+    os.makedirs(os.path.dirname(output_cond_file))
+    with open(output_cond_file, 'w', encoding='utf8') as outfile:
+        yaml.dump(cond, outfile)
+
+    print(f"calibration constants written to {output_dir}")
+
+
+def run(online_options, work_directory):
+    # Start the communicator:
+    com = Communicator('AligDrv_0')
+    # FSM loop
+    state = State.NOT_READY
+    com.set_status(state)
+    n_it = 0
+    p_it = 1
+
+    while True:
+        command = com.get_command()
+        if command == 'configure' and state == State.NOT_READY:
+            initial_constants_src = os.path.join(
+                ONLINE_CONDDB_PATH, CONDITION_PATH,
+                "0")  # FIXME the "0" needs to be determined dynamically
+            initial_constants_dst = work_directory / "initial-constants" / CONDITION_PATH
+            initial_constants_dst.parent.mkdir(parents=True)
+            shutil.copy(initial_constants_src, initial_constants_dst)
+
+            state = State.READY
+        elif command == 'start' and state == State.READY:
+            state = State.RUNNING
+        elif command == 'pause' and state == State.RUNNING:
+            state = State.PAUSED
+            com.set_status(state)
+            n_it += 1
+            pass_name = "FirstPass" if p_it == 1 else "SecondPass"
+            print(f"Itertator: {pass_name},  iteration: {n_it}")
+
+            if p_it >= 3:
+                print("ERROR iterator should not be running a third pass")
+                raise RuntimeError()
+
+            hist_files = [
+                str(online_options.analyzer_output_path /
+                    f"{node}_{pass_name}_{n_it}_histos.root")
+                for node in online_options.nodes
+            ]
+
+            print(f"## Running MergeHistograms {n_it}! \n")
+            MergeHistograms(
+                input_files=hist_files,
+                output_file=work_directory / f"{pass_name}_{n_it}_histos.root")
+            #Do fits and produce new lambdas
+            print(f"## Running DoCalibration {n_it}! \n")
+            DoCalibration(
+                nIt=str(n_it),
+                passname=pass_name,
+                input_file=work_directory / f"{pass_name}_{n_it}_histos.root",
+                output_file=work_directory / f"{pass_name}_{n_it}.yml",
+                output_lambda_name=work_directory / f"{pass_name}_lambda.txt")
+
+            if p_it == 1 and n_it == NIteration:
+                print(f"## Running WriteOverlay {pass_name}/{n_it}\n")
+                WriteOverlay(
+                    input_file=work_directory / f"{pass_name}_{n_it}.yml",
+                    output_dir=work_directory / f"new-constants-{pass_name}",
+                    initial_dir=work_directory / "initial-constants")
+                if p_it == 1:
+                    n_it = 0
+                    p_it += 1
+                state = State.RUNNING
+            elif p_it == 2 and n_it == NIteration:
+                print("## Merge the first and the second pass lambdas ! \n")
+                merge_lambda_yaml_files(
+                    os.path.join(work_directory, "FirstPass_7.yml"),
+                    os.path.join(work_directory, "SecondPass_7.yml"),
+                    work_directory)
+                print("## Running WriteOverlay over merged files! \n")
+                WriteOverlay(
+                    input_file=work_directory / "merged_lambda.yml",
+                    output_dir=work_directory / f"new-constants-{pass_name}",
+                    initial_dir=work_directory / "initial-constants")
+
+                print('iterator done')
+                state = State.READY
+            else:
+                state = State.RUNNING
+
+        elif command == 'stop' and state in (State.RUNNING, State.READY):
+            state = State.READY
+        elif command == 'reset':
+            state = State.NOT_READY
+        elif command == 'unload':
+            state = State.OFFLINE
+            com.set_status(state)
+            break
+        else:
+            print('iterator: bad transition from %s to %s' % (state, command))
+            state = State.ERROR
+            com.set_status(state)
+            break
+        # Set the status
+        com.set_status(state)
+
+
+if __name__ == '__main__':
+    import OnlineEnvBase as OnlineEnv
+    online_options = alignment_options(OnlineEnv)
+
+    ensure_output_dir(online_options.iterator_output_path, online_options.tag)
+
+    print(
+        f"Will write iterator output to {online_options.iterator_output_path}")
+
+    run(online_options, work_directory=online_options.iterator_output_path)
diff --git a/MooreOnlineConf/options/ft.py b/MooreOnlineConf/options/ft.py
index a98afdabecda0794cdd063d3dcee0118ec0aebcd..dd756ca7d0d9e8370ebb356a018707f652814e00 100644
--- a/MooreOnlineConf/options/ft.py
+++ b/MooreOnlineConf/options/ft.py
@@ -1,5 +1,5 @@
 ###############################################################################
-# (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration           #
+# (c) Copyright 2000-2024 CERN for the benefit of the LHCb Collaboration      #
 #                                                                             #
 # This software is distributed under the terms of the GNU General Public      #
 # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
@@ -7,46 +7,94 @@
 # In applying this licence, CERN does not waive the privileges and immunities #
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
-#############################################################################
+###############################################################################
+from PyConf.application import (
+    configure_input,
+    configure,
+    default_raw_banks,
+    make_odin,
+)
+from PyConf.Algorithms import (
+    FTRawBankDecoder,
+    FTLiteClusterMonitor,
+    FTLiteClusterTAEMonitor,
+)
+from MooreOnlineConf.utils import (
+    common_monitors_node,
+    passes_rb,
+    RoutingBit,
+    decode_tae,
+    if_then,
+    run_all,
+)
+from Moore import options
+import os
 
-from PyConf.application import default_raw_event, default_raw_banks, make_odin
-from Moore import options, run_reconstruction
-from PyConf.Algorithms import FTDigitMonitor, FTNZSRawBankDecoder
-from PyConf.Algorithms import FTClusterMonitor, FTRawBankDecoder
-from Moore.config import Reconstruction
-from RecoConf.standalone import reco_prefilters
+try:
+    import OnlineEnvBase as OnlineEnv
+    TAE_HALF_WINDOW = OnlineEnv.TAE
+except ImportError:
+    TAE_HALF_WINDOW = 3
 
-options.dddb_tag = 'upgrade/master'
-options.conddb_tag = 'upgrade/master'
+partition = os.environ.get("PARTITION", "LHCb")
+isLocalFlag = bool(partition == "LHCb")
 
 
-def ft_mon():
-    raw_event = default_raw_event("FTNZS")
-    raw_banks = default_raw_banks("FTGeneric")
+def main():
     odin = make_odin()
 
-    algs = []
-    if options.input_type.lower() == 'online':
-        from MooreOnlineConf.utils import update_and_reset
-        algs.append(update_and_reset())
+    def make_ft_clusters(name=""):
+        raw_banks = default_raw_banks("FTCluster")
+        ZS_decoder = FTRawBankDecoder(
+            name=f"FTRawBankDecoder{name}", Odin=odin, RawBanks=raw_banks)
+        return ZS_decoder.OutputLocation
+
+    # the standard monitor
+    zs_monitor_lumi = FTLiteClusterMonitor(
+        name="FTLiteClusterMonitorLumi",
+        allow_duplicate_instances_with_distinct_names=True,
+        InputODIN=odin,
+        ClusterLocation=make_ft_clusters())
+
+    zs_monitor_physics = FTLiteClusterMonitor(
+        name="FTLiteClusterMonitor",
+        allow_duplicate_instances_with_distinct_names=True,
+        InputODIN=odin,
+        ClusterLocation=make_ft_clusters())
 
-    ZS_decoder = FTRawBankDecoder(RawBanks=raw_banks)
-    ZS_monitor = FTClusterMonitor(
-        InputODIN=odin, ClusterLocation=ZS_decoder.OutputLocation)
-    algs += [
-        ZS_decoder,
-        ZS_monitor,
-    ]
+    # the TAE monitor
+    is_tae, tae_decoding, tae_odins, tae_data = decode_tae(
+        make_ft_clusters, TAE_HALF_WINDOW)
+    tae_monitor = FTLiteClusterTAEMonitor(
+        name="FTLiteClusterTAEMonitor",
+        ODINVector=list(tae_odins.values()),
+        InputVector=list(tae_data.values()),
+        SuperTAEHalfWindow=TAE_HALF_WINDOW)
 
-    NZS_decoder = FTNZSRawBankDecoder(RawEventLocations=raw_event)
-    NZS_monitor = FTDigitMonitor(
-        InputODIN=odin, DigitLocation=NZS_decoder.OutputLocation)
-    algs += [
-        NZS_decoder,
-        NZS_monitor,
-    ]
+    # assemble the control flow
+    if isLocalFlag:
+        top_node = run_all(
+            "top",
+            [
+                common_monitors_node(),  # common monitoring to all tasks
+                if_then("IfPHYSICS", passes_rb(RoutingBit.PHYSICS),
+                        zs_monitor_physics),
+                if_then("IfLUMI", passes_rb(RoutingBit.LUMI), zs_monitor_lumi),
+                if_then("IfTAE", is_tae,
+                        run_all("TAE", [tae_decoding, tae_monitor])),
+            ])
+    else:
+        top_node = run_all(
+            "top",
+            [
+                common_monitors_node(),  # common monitoring to all tasks
+                zs_monitor_physics,
+                if_then("IfTAE", is_tae,
+                        run_all("TAE", [tae_decoding, tae_monitor])),
+            ])
 
-    return Reconstruction('ft_mon', algs, reco_prefilters(gec=False))
+    return top_node
 
 
-run_reconstruction(options, ft_mon)
+configure_input(options)
+configure(options, main())
diff --git a/MooreOnlineConf/options/hlt2_VdM2022.py b/MooreOnlineConf/options/hlt2_VdM2022.py
deleted file mode 100644
index a43ffe3530d71b749f21434dfd09a1bc6a285405..0000000000000000000000000000000000000000
--- a/MooreOnlineConf/options/hlt2_VdM2022.py
+++ /dev/null
@@ -1,32 +0,0 @@
-###############################################################################
-# (c) Copyright 2022 CERN for the benefit of the LHCb Collaboration           #
-#                                                                             #
-# This software is distributed under the terms of the GNU General Public      #
-# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
-#                                                                             #
-# In applying this licence, CERN does not waive the privileges and immunities #
-# granted to it by virtue of its status as an Intergovernmental Organization  #
-# or submit itself to any jurisdiction.                                       #
-###############################################################################
-"""Options for the van der Meer scan in Nov. 2022
-"""
-from Moore import options, run_moore
-from Hlt2Conf.settings.hlt2_VdM import make_streams
-from Moore.monitoring import run_default_monitoring
-from PyConf.application import (metainfo_repos, retrieve_encoding_dictionary)
-
-options.lines_maker = make_streams
-
-# add the commissioning branch of https://gitlab.cern.ch/lhcb-conddb/file-content-metadata
-# to be able to decode online Hlt1 locations (by default GitANNSvc will only look into 'master')
-metainfo_repos.global_bind(extra_central_tags=['commissioning'])
-# for running online, we need to make sure that the keys already exist on cvmfs
-options.write_decoding_keys_to_git = False
-metainfo_repos.global_bind(repos=[])  # only use repos on cvmfs
-retrieve_encoding_dictionary.global_bind(
-    require_key_present=True)  # require key is in repo
-# optional
-# options.require_specific_decoding_keys = ["b80bb34f", "cf39d86c"]
-
-with run_default_monitoring.bind(run=False):
-    run_moore(options)
diff --git a/MooreOnlineConf/options/online.py b/MooreOnlineConf/options/online.py
index a424eafc0fff1a1135ede770bf93694ea773bf69..057933345cf31ae260bcf15dafda1ef0194f8598 100644
--- a/MooreOnlineConf/options/online.py
+++ b/MooreOnlineConf/options/online.py
@@ -83,29 +83,18 @@ if OnlineEnv.PartitionName.startswith("TEST"):
     application.updateAndReset.saveSetDir = "Savesets"
     # application.updateAndReset.saverCycle = 20
 
+n_instances = int(os.getenv("NBOFSLAVES", "0")) + 1
+
 try:
     n_threads = int(os.environ["NBOFTHREADS"])
     # NBOFTHREADS is populated from the "-numthreads" argument in Arch.xml
 except (KeyError, ValueError):
     n_threads = 1
     if task_type == "HLT2":
-        from multiprocessing import cpu_count
-        n_threads = cpu_count()
-
-if task_type == "HLT2":
-    # TODO this should probably be moved to runHLT2.sh
-    # TODO this should account for the baseline process memory usage
-    import subprocess
-    out = subprocess.check_output(["free", "-g"], encoding='utf8')
-    # 6 GiB are taken by reader + MBM
-    mem_avail_gb = int(out.splitlines()[1].split()[1]) - 6
-    mem_per_thread = 1
-    n_instances = int(os.getenv("NBOFSLAVES", 0)) + 1
-    n_threads_limit = int(mem_avail_gb / n_instances / mem_per_thread)
-    if n_threads > n_threads_limit:
-        n_threads = n_threads_limit
-        print(f"+++ Limiting number of threads to {n_threads_limit} "
-              f"to have {mem_per_thread} GiB/thread")
+        # run as many threads as we have cores available to this process
+        # (In case of binding to a numa domain, we have
+        # len(os.sched_getaffinity(0)) < multiprocessing.cpu_count() )
+        n_threads = len(os.sched_getaffinity(0))
 
 # Use execMode = 1 for multi-threaded (async_queued) mode and
 # use 0 (default) for single-threaded (sync) mode, i.e. debugging.
@@ -140,12 +129,19 @@ else:
 if task_type == "HLT2":
     application.config.events_LowMark = 1000
     application.config.events_HighMark = 1200
-    application.config.MBM_numConnections = 2
-    # When processing PbPb data some events take a very long time to process.
-    # Until all events for a given batch are processed, we cannot reuse the
-    # corresponding connection. Therefore, we increase the number of connections
-    # to a high value that is still less than the max allowed by the MBM config.
-    # application.config.MBM_numConnections = 24
+    # There are relatively frequent, relatively slow events which block
+    # the corresponding MBM connections. Until all events for a given
+    # burst are processed, we cannot reuse a connection, so if we don't
+    # have enough connections (relative to the CPU power available),
+    # this can stall processing.
+    # On the fastest Intel 2630-v4 we need 5 connections, and on the new
+    # Xeon 8592 we need 20. We cannot increase beyond what the MBM config
+    # allows (accounting for reader connections).
+    # The connections are distributed equally among all instances and we
+    # limit them to the number of threads (useful for e.g. HLT2Slim).
+    application.config.MBM_numConnections = min(20 // n_instances, n_threads)
+    # When processing PbPb data, we may need to tune this further
+    # (in 2023 we needed 24), since some events take a very long time to process.
 else:
     application.config.MBM_numConnections = 1
 
diff --git a/MooreOnlineConf/options/reco.py b/MooreOnlineConf/options/reco.py
index dcfc04c8b548bd2bbbfef6a6b04ecde2b228327a..872d86bb13a0724d30201f92d8dac4ed40a2d68f 100644
--- a/MooreOnlineConf/options/reco.py
+++ b/MooreOnlineConf/options/reco.py
@@ -9,12 +9,66 @@
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
 import os
-from Moore import options, run_reconstruction
+from Moore import options
+from Moore.config import run_allen_reconstruction
 from Moore.config import Reconstruction
 from RecoConf.standalone import reco_prefilters, standalone_hlt2_global_reco
 from Hlt2Conf.settings.hlt2_binds import config_pp_2024_with_monitoring
+from RecoConf.hlt1_allen import allen_gaudi_config
+from RecoConf.legacy_rec_hlt1_tracking import make_RetinaCluster_raw_bank, make_velo_full_clusters, make_RetinaClusters
+from PyConf.Algorithms import VertexCompare
+
+from RecoConf.legacy_rec_hlt1_tracking import (
+    make_reco_pvs,
+    make_PatPV3DFuture_pvs,
+    make_VeloClusterTrackingSIMD,
+)
+from RecoConf.hlt2_tracking import (
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_TrackBestTrackCreator_tracks,
+)
 from MooreOnlineConf.utils import update_and_reset
 
+from Moore import options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.protoparticles import make_charged_protoparticles
+from RecoConf.event_filters import require_gec
+from Hlt2Conf.settings.defaults import get_default_hlt1_filter_code_for_hlt2
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+from DDDB.CheckDD4Hep import UseDD4Hep
+
+from Moore import options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.protoparticles import make_charged_protoparticles
+from RecoConf.event_filters import require_gec
+from Hlt2Conf.settings.defaults import get_default_hlt1_filter_code_for_hlt2
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+from DDDB.CheckDD4Hep import UseDD4Hep
+
 task_type = os.getenv("TASK_TYPE", "GenericTask")
 
 ## Global event cut specifications:
@@ -70,6 +124,7 @@ def with_update_and_reset():
                     IOVReset(ODIN=make_odin()),
                     update_and_reset(), odin_bb_filter, rb_filter
                 ])
+
     return reco
 
 
@@ -78,5 +133,6 @@ def with_update_and_reset():
 with config_pp_2024_with_monitoring(), reco_prefilters.bind(
         gec=False,
         gec_cut=GEC_cut,
-):
-    run_reconstruction(options, with_update_and_reset)
+),\
+    VertexCompare.bind(produceNtuple=False,produceHistogram=False,monitoring=True):
+    run_allen_reconstruction(options, with_update_and_reset)
diff --git a/MooreOnlineConf/options/vp_veloSP.py b/MooreOnlineConf/options/vp_veloSP.py
new file mode 100644
index 0000000000000000000000000000000000000000..12676520553920a34d5bf4cb047a0e93d80e91a2
--- /dev/null
+++ b/MooreOnlineConf/options/vp_veloSP.py
@@ -0,0 +1,15 @@
+###############################################################################
+# (c) Copyright 2024 CERN for the benefit of the LHCb Collaboration           #
+#                                                                             #
+# This software is distributed under the terms of the GNU General Public      #
+# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
+#                                                                             #
+# In applying this licence, CERN does not waive the privileges and immunities #
+# granted to it by virtue of its status as an Intergovernmental Organization  #
+# or submit itself to any jurisdiction.                                       #
+###############################################################################
+from RecoConf.decoders import default_VeloCluster_source
+from AllenConf.velo_reconstruction import decode_velo
+
+default_VeloCluster_source.global_bind(bank_type="VP")
+decode_velo.global_bind(retina_decoding=False)
diff --git a/MooreOnlineConf/python/MooreOnlineConf/Communicator.py b/MooreOnlineConf/python/MooreOnlineConf/Communicator.py
new file mode 100644
index 0000000000000000000000000000000000000000..12450335a52aaa307895e3c467fac3b3adbaf76c
--- /dev/null
+++ b/MooreOnlineConf/python/MooreOnlineConf/Communicator.py
@@ -0,0 +1,89 @@
+###############################################################################
+# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration      #
+#                                                                             #
+# This software is distributed under the terms of the GNU General Public      #
+# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
+#                                                                             #
+# In applying this licence, CERN does not waive the privileges and immunities #
+# granted to it by virtue of its status as an Intergovernmental Organization  #
+# or submit itself to any jurisdiction.                                       #
+###############################################################################
+import os, pydim
+
+
+class State(object):
+    UNKNOWN = "UNKNOWN"
+    ERROR = "ERROR"
+    NOT_READY = "NOT_READY"
+    READY = "READY"
+    RUNNING = "RUNNING"
+    PAUSED = "PAUSED"
+    OFFLINE = "OFFLINE"
+
+
+class Communicator(object):
+    def __init__(self, utgid_suffix):
+        self.__status = State.UNKNOWN
+        from multiprocessing import Pipe, Condition, Lock
+        self.__master_end, self.__process_end = Pipe()
+        self.__callback_lock = Lock()
+        utgid = self.utgid(utgid_suffix)
+
+        pydim.dis_add_cmnd(utgid, "C", self.__command_callback, 1)
+        self.__info_svc = pydim.dis_add_service(utgid + "/status", "C",
+                                                self.__status_callback, 0)
+        pydim.dis_start_serving(utgid)
+
+        pydim.dis_update_service(self.__info_svc)
+
+    def partition(self):
+        return os.environ.get('PARTITION_NAME', 'TEST')
+
+    def hostname(self):
+        import socket
+        return socket.gethostname().split('.')[0]
+
+    def utgid(self, suffix):
+        utgid = os.environ.get('UTGID', '')
+        if utgid:
+            return utgid
+        else:
+            return '_'.join((self.partition(), self.hostname().upper(),
+                             suffix))
+
+    def has_command(self, *args):
+        if len(args) == 0:
+            return self.__process_end.poll()
+        elif len(args) == 1:
+            return self.__process_end.poll(args[0])
+        else:
+            raise ValueError("wrong number of arguments, must be 0 or 1.")
+
+    def status(self):
+        return self.__status
+
+    def get_command(self):
+        return self.__process_end.recv()
+
+    def set_status(self, status):
+        self.__status = status
+        pydim.dis_update_service(self.__info_svc)
+
+    def __put_command(self, data):
+        self.__master_end.send(data)
+
+    def __close_command(self):
+        self.__master_end.close()
+
+    def __close_status(self):
+        self.__process_end.close()
+
+    def __command_callback(self, args, tag):
+        self.__callback_lock.acquire()
+        command = args[0].rstrip("\0")
+        if command != "!state":
+            self.__put_command(command)
+        self.__callback_lock.release()
+
+    def __status_callback(self, *args):
+        return (self.__status, )
diff --git a/MooreOnlineConf/python/MooreOnlineConf/utils.py b/MooreOnlineConf/python/MooreOnlineConf/utils.py
index bba9557c508397f0d5e375522bfb96a9cabaabc6..606c05134de3a1a06bdc186881be66c87bd1ff56 100644
--- a/MooreOnlineConf/python/MooreOnlineConf/utils.py
+++ b/MooreOnlineConf/python/MooreOnlineConf/utils.py
@@ -189,7 +189,6 @@ def distribute_files(nodes, files):
             chunks(files_per_run, n_files_per_run_per_node)
             for files_per_run in files
         ]))
-    print(x)
     files_per_node = [sum(lists, []) for lists in x]
     return dict(
         zip(nodes, files_per_node + [[]] * (len(nodes) - len(files_per_node))))
@@ -227,7 +226,8 @@ def alignment_options(OnlineEnv) -> OnlineAlignmentOpts:
     if not nodes:
         raise ValueError("NodeList is empty")
 
-    activity = OnlineEnv.Activity.removeprefix("Alignment|")
+    activity = OnlineEnv.Activity.removeprefix("Alignment|").removeprefix(
+        "Calibration|")
     #make sure leading zeroes are in run numbers
     runs = [f'{int(run):010d}' for run in runs]
     data_id = runs[0] if len(runs) == 1 else f"{runs[0]}-{runs[-1]}"
@@ -239,10 +239,6 @@ def alignment_options(OnlineEnv) -> OnlineAlignmentOpts:
     analyzer_output_path = prefix / activity / "analyzer" / data_id
     iterator_output_path = prefix / activity / "iterator" / data_id
 
-    # overwrite some options for CI test
-    if OnlineEnv.PartitionName.startswith("TEST"):
-        runs = [253597]
-
     return OnlineAlignmentOpts(tag, runs, nodes, analyzer_output_path,
                                iterator_output_path)
 
@@ -265,7 +261,8 @@ def ensure_output_dir(output_path, tag):
         import errno
         if e.errno == errno.ENOTEMPTY:
             pass  # another worker already renamed the directory
-        raise
+        else:
+            raise
     output_path.mkdir(parents=True, exist_ok=True)
 
     utgid = os.environ["UTGID"]
diff --git a/MooreScripts/CMakeLists.txt b/MooreScripts/CMakeLists.txt
index db82a5e1628613e07c4216e3558d17f9856c549e..5537a4e859937d839f652fe6eb605349445527b9 100644
--- a/MooreScripts/CMakeLists.txt
+++ b/MooreScripts/CMakeLists.txt
@@ -26,6 +26,20 @@ if(BUILD_TESTING AND NOT USE_DD4HEP)
     )
 endif()
 
+if(BUILD_TESTING AND BINARY_TAG MATCHES ".*cuda.*")
+    # When compiling for GPU, vertex resolution monitoring call the device algorithms
+    # since these are incompatible with calling from Moore / Gaudi, disable the monitoring tests
+    set_property(
+        TEST
+           MooreScripts.beamspotmon
+           MooreScripts.calomon
+           MooreScripts.recomon
+           MooreScripts.velomon
+        PROPERTY
+            DISABLED TRUE
+    )
+endif()
+
 # FIXME the following does not work as I don't know how to run cmsetup.py as part of the install
 # because xenv is not in available. Maybe find_package(xenv) would work?
 
diff --git a/MooreScripts/job/runHLT2VdM.sh b/MooreScripts/job/CaloPi0/runAnalyzer.sh
similarity index 78%
rename from MooreScripts/job/runHLT2VdM.sh
rename to MooreScripts/job/CaloPi0/runAnalyzer.sh
index 722d4aa040de9dbc91bd37ca89c8133561a0559b..8ba8041a688fc2fede94f16e0f334775aada2e0b 100755
--- a/MooreScripts/job/runHLT2VdM.sh
+++ b/MooreScripts/job/CaloPi0/runAnalyzer.sh
@@ -11,11 +11,8 @@
 ###############################################################################
 set -euo pipefail
 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-source "$DIR/setupTask.sh"
+source "$DIR/../setupTask.sh"
 
-setup_options_path
-exec_gaudirun \
-    $MOOREONLINECONFROOT/options/verbosity.py \
-    $MOOREONLINECONFROOT/options/tags-master.py \
-    $MOOREONLINECONFROOT/options/hlt2_VdM2022.py \
-    $MOOREONLINECONFROOT/options/online.py
+setup_options_path MONITORING
+
+exec_python $MOOREONLINECONFROOT/options/CaloPi0/analyzer.py
diff --git a/MooreScripts/job/CaloPi0/runIterator.sh b/MooreScripts/job/CaloPi0/runIterator.sh
new file mode 100755
index 0000000000000000000000000000000000000000..a6448e8274a27b33d395efa3ac87be050ab834d1
--- /dev/null
+++ b/MooreScripts/job/CaloPi0/runIterator.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+###############################################################################
+# (c) Copyright 2000-2021 CERN for the benefit of the LHCb Collaboration      #
+#                                                                             #
+# This software is distributed under the terms of the GNU General Public      #
+# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
+#                                                                             #
+# In applying this licence, CERN does not waive the privileges and immunities #
+# granted to it by virtue of its status as an Intergovernmental Organization  #
+# or submit itself to any jurisdiction.                                       #
+###############################################################################
+set -euo pipefail
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+source "$DIR/../setupTask.sh"
+
+setup_options_path MONITORING
+
+exec_python $MOOREONLINECONFROOT/options/CaloPi0/iterator.py
diff --git a/MooreScripts/job/runHLT1.sh b/MooreScripts/job/runHLT1.sh
index eb854338cf5db8e7090661e36447c29945c15cf8..e00ac44e278931505a4d0a11a91b1b56d039bf3a 100755
--- a/MooreScripts/job/runHLT1.sh
+++ b/MooreScripts/job/runHLT1.sh
@@ -15,7 +15,10 @@ source "$DIR/setupTask.sh"
 
 setup_options_path
 
-MBM_SETUP_OPTIONS=${MOORESCRIPTSROOT}/tests/options/HLT1/MBM_setup.opts
+unset CUDA_VISIBLE_DEVICES
+if test -n "${BIND_NUMA-}"; then
+    export BIND_NUMA_GPU=1
+fi
 
 application=AllenApplication
 exec_gaudirun ${ALLENONLINEROOT}/options/AllenConfig.py
diff --git a/MooreScripts/job/runRecoMon.sh b/MooreScripts/job/runRecoMon.sh
index 96a323050e3a2f969e6ba36d592a9ebd2ecef726..4b2cca1ab3561addfae3c9d10878b2c66b60f270 100755
--- a/MooreScripts/job/runRecoMon.sh
+++ b/MooreScripts/job/runRecoMon.sh
@@ -19,7 +19,7 @@ settings=$(python -c 'import OnlineEnvBase; print(OnlineEnvBase.HLTType)')
 vp_options=$MOOREONLINECONFROOT/options/vp_retina_clusters.py
 if [[ $settings == *"veloSP" ]]; then
     echo "RecoMon: configuring VELO SP algorithms based on current trigger config $settings"
-    vp_options=
+    vp_options=$MOOREONLINECONFROOT/options/vp_veloSP.py
 fi
 
 exec_gaudirun \
diff --git a/MooreScripts/job/setupTask.sh b/MooreScripts/job/setupTask.sh
index 8a70b2598a66d145264803796c5f200c17df354c..e3a180c4a555787393bb8a3cd45d1cdd7a425d02 100755
--- a/MooreScripts/job/setupTask.sh
+++ b/MooreScripts/job/setupTask.sh
@@ -139,9 +139,26 @@ dump_environment() {
     fi
 }
 
+exec_python() {
+    cd_working_dir
+    export PYTHONUNBUFFERED=1  # immediate python output
+    export ENABLE_BACKTRACE=1  # print stack traces for GaudiException-s
+    dump_environment
+    executable=genPython.exe
+    if [[ ${PARTITION} == "TEST"* || ! -z ${PRELOAD_SANITIZER_LIB-} ]]; then
+        # FIXME does the following still hold, i.e. can we debug fine when using genPython.exe?
+        # For some reason when we use genPython.exe gdb does not load the symbols from the shared libraries.
+        # Instead, use python directly, which works except that messages in the log viewer are not properly
+        # tagged by the process name.
+        executable=python
+    fi
+    exec -a ${UTGID} ${executable} "$@"
+}
+
 exec_gaudirun() {
     application=${application:-Online::OnlineEventApp}
     cd_working_dir
+    export PYTHONUNBUFFERED=1  # immediate python output
     export ENABLE_BACKTRACE=1  # print stack traces for GaudiException-s
     LD_PRELOAD=
     if [[ ! -z ${PRELOAD_SANITIZER_LIB-} ]]; then
@@ -153,7 +170,12 @@ exec_gaudirun() {
     fi
     dump_environment
     cmd=()
-    if test -n "${BIND_NUMA-}"; then
+    if  test -n "${BIND_NUMA_GPU-}"; then
+        gpu_num=$(echo $UTGID | grep -oP '[0-9]+$' )
+        numa_domain=$(nvidia-smi topo -i ${gpu_num} -C | grep -oP "[0-9]+$")
+        cmd+=(numactl -N $numa_domain -m $numa_domain)
+        export CUDA_VISIBLE_DEVICES=${gpu_num}
+    elif test -n "${BIND_NUMA-}"; then
         numa_domains_num=$(lscpu -p=NODE | grep -oP '^[0-9]+$' | sort | uniq | wc -l)
         numa_domain=$(( $(echo $UTGID | grep -oP '[0-9]+$') % $numa_domains_num ))
         cmd+=(numactl -N $numa_domain -m $numa_domain)
diff --git a/MooreScripts/options/HLT1MEPProd.opts b/MooreScripts/options/HLT1MEPProd.opts
index cd08db0125792b9b639fad8eb843017934114f04..961b42c8c0e57be60ac44d2e468650ac3cc6bda4 100644
--- a/MooreScripts/options/HLT1MEPProd.opts
+++ b/MooreScripts/options/HLT1MEPProd.opts
@@ -14,7 +14,7 @@ Manager.Runable             = "Wrap";
 Wrap.Callable               = "Reader";
 Task.HavePause              = true;
 
-Reader.Buffer               = "Events";
+Reader.Buffer               = "$EVENTS_INSTANCE_BUFFER";
 Reader.BrokenHosts          = "";
 Reader.Directories          = @OnlineEnv.Reader_Directories;
 Reader.FilePrefix           = @OnlineEnv.Reader_FilePrefix;
@@ -34,4 +34,4 @@ Reader.ReuseFile            = @OnlineEnv.Reader_Preload;
 MEPManager.PartitionBuffers = true;
 MEPManager.PartitionName    = @OnlineEnv.PartitionName;
 MEPManager.PartitionID      = @OnlineEnv.PartitionID;
-MEPManager.Buffers          = {"Events"};
+MEPManager.Buffers          = {"$EVENTS_INSTANCE_BUFFER"};
diff --git a/MooreScripts/options/HLT2MBM.opts b/MooreScripts/options/HLT2MBM.opts
index 37855bc5b35e49f0aae33ffd66932cb8d28fcc33..2a73f1edf32ff2dc57a67ef8330a23f8d57649ff 100644
--- a/MooreScripts/options/HLT2MBM.opts
+++ b/MooreScripts/options/HLT2MBM.opts
@@ -3,7 +3,7 @@
 #pragma print off
 #include "$INFO_OPTIONS"
 #include "$FARMCONFIGROOT/options/Logging.opts"
-OnlineEnv.MBM_setup = "-s=3000000 -e=50 -u=30 -b=18 -t=1 -y -i=Events -f -c -s=100000 -e=50 -u=15 -b=12 -t=1 -y -i=Output -f -c -s=100000 -e=50 -u=15 -b=12 -t=1 -y -i=Monitor -f -c";
+OnlineEnv.MBM_setup = "-s=1000000 -e=50 -u=30 -b=18 -t=1 -y -i=Events -f -c -s=100000 -e=50 -u=15 -b=12 -t=1 -y -i=Output -f -c";
 //
 Manager.Setup               = {"Dataflow_MBMServer/MEPManager"};
 //
diff --git a/MooreScripts/options/HLT2MDFProd.opts b/MooreScripts/options/HLT2MDFProd.opts
index e28b15137880db190fa6143cb989e171abb2f501..d1830341ca038ae3a44b8698f481851ac9669cfb 100644
--- a/MooreScripts/options/HLT2MDFProd.opts
+++ b/MooreScripts/options/HLT2MDFProd.opts
@@ -13,12 +13,17 @@ Manager.Services            = {"Dataflow_MBMClient/MEPManager",
 Manager.Runable             = "Wrap";
 Wrap.Callable               = "Reader";
 Task.HavePause              = true;
+//
+MEPManager.PartitionBuffers = true;
+MEPManager.PartitionName    = @OnlineEnv.PartitionName;
+MEPManager.PartitionID      = @OnlineEnv.PartitionID;
+MEPManager.Buffers          = {"Events"};
+MEPManager.InhibitCancel    = true;
+
 //
 Reader.Buffer               = "Events";
 Reader.BrokenHosts          = "";
-Reader.Directories          = @OnlineEnv.Reader_Directories;
-Reader.FilePrefix           = @OnlineEnv.Reader_FilePrefix;
-Reader.AllowedRuns          = {"*"};
+//
 Reader.MuDelay              = 0;
 Reader.DeleteFiles          = false;
 Reader.SaveRest             = false;
@@ -26,15 +31,20 @@ Reader.PauseSleep           = 2;  // Optional wait time until 'Output' event que
 Reader.InitialSleep         = 0;
 Reader.MaxPauseWait         = 1;
 Reader.GoService            = "";
-Reader.Rescan               = @OnlineEnv.Reader_Rescan;
 Reader.RequireConsumers     = 0;
+Reader.ConsumerWait         = 400; // Needs to be at least the config time!
+
 Reader.MMapFiles            = 0;
 Reader.ReuseFile            = 0;
-Reader.PackingFactor        = 6000;
-Reader.AllocationSizekB     = 600000;
-Reader.PatchOdin            = 5000000;
+Reader.PackingFactor        = 200;
+Reader.AllocationSizekB     = 20000;
+Reader.PatchOdin            = 0; // 0 = no patching
 //
-MEPManager.PartitionBuffers = true;
-MEPManager.PartitionName    = @OnlineEnv.PartitionName;
-MEPManager.PartitionID      = @OnlineEnv.PartitionID;
-MEPManager.Buffers          = {"Events"};
+Reader.Rescan               = @OnlineEnv.Reader_Rescan;
+Reader.Directories          = @OnlineEnv.Reader_Directories;
+Reader.FilePrefix           = @OnlineEnv.Reader_FilePrefix;
+Reader.AllowedRuns          = {"*"};
+// Only the StorageReader has the following properties and here
+// we use BurstReader
+//Reader.NumThreads           = 2;
+//Reader.NumBuffers           = 2;
diff --git a/MooreScripts/python/MooreScripts/testbench/architecture.py b/MooreScripts/python/MooreScripts/testbench/architecture.py
index adde57d0ec46eaa3d2d8c96c3c077c8f8b73e940..3952e64040e9a48184a3e782daa922f68b3a7602 100644
--- a/MooreScripts/python/MooreScripts/testbench/architecture.py
+++ b/MooreScripts/python/MooreScripts/testbench/architecture.py
@@ -9,6 +9,7 @@
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
 import os
+import re
 import platform
 import xml.etree.ElementTree as ET
 from string import Template
@@ -39,14 +40,28 @@ def _rinterp(obj, mapping):
         return obj
 
 
-def parse_task_tree(task):
+def parse_task_tree(task, instances):
     """Parse task tree into name, n_instances, subprocess.Popen arguments."""
 
     name = task.attrib["name"]
-    try:
-        n_instances = int(task.attrib.get("instances", 1))
-    except ValueError:  # instances = "NUMBER_OF_INSTANCES"
-        n_instances = 1
+
+    instance_match = re.match(R"(\d+|(NUMBER_OF_INSTANCES)(?::(\d+))?)",
+                              task.attrib.get("instances", "1"))
+    if instance_match.group(2) is None:
+        # Default number of instances or specified number
+        n_instances = int(instance_match.group(1))
+    elif instance_match.groups()[1:] == ('NUMBER_OF_INSTANCES', None):
+        # NUMBER_OF_INSTANCES
+        n_instances = 1 if instances is None else instances
+    elif instances is not None and instances < int(instance_match.group(3)):
+        # NUMBER_OF_INSTANCES:N with instances != None
+        raise ValueError(
+            f"This architecture requires at least {int(instance_match.groups(3))} instances to run"
+        )
+    else:
+        # NUMBER_OF_INSTANCES:N
+        n_instances = int(
+            instance_match.group(3)) if instances is None else instances
 
     params = {"args": [], "env": {}, "cwd": "/"}
     # The controller passes populates `-instances`` as the instances argument
@@ -73,11 +88,11 @@ def parse_task_tree(task):
     return name, n_instances, params
 
 
-def read_xml(path):
+def read_xml(path, main_instances):
     """"Parse architecture file into a list of task specs."""
     tree = ET.parse(path)
     tasks_inventory = tree.getroot()
-    return [parse_task_tree(task) for task in tasks_inventory]
+    return [parse_task_tree(task, main_instances) for task in tasks_inventory]
 
 
 def instance_args(tasks, replacements):
diff --git a/MooreScripts/python/MooreScripts/testbench/emulator.py b/MooreScripts/python/MooreScripts/testbench/emulator.py
index 62e29ee45f2e31ab9ceb24b4474c9ba80badce91..852738d0cdad4a6f6d91b84fe53bc3517878171c 100644
--- a/MooreScripts/python/MooreScripts/testbench/emulator.py
+++ b/MooreScripts/python/MooreScripts/testbench/emulator.py
@@ -402,14 +402,15 @@ def check_for_orphans(names):
                            "\n".join(matches))
 
 
-async def measure_throughput(utgids, max_duration, print_throughput):
+async def measure_throughput(utgids, max_duration, print_throughput, counter):
     def throughput(start, end):
         return (end[1] - start[1]) / (end[0] - start[0]).total_seconds()
 
     ta = None
     async with AsyncExitStack() as stack:
         services = [
-            stack.enter_context(asyncdim.DimService(u + "/Events/OUT", "X"))
+            stack.enter_context(
+                asyncdim.DimService(f"{u}/Events/{counter}", "X"))
             for u in utgids
         ]
         # get the first data point per task
@@ -444,10 +445,12 @@ async def measure_throughput(utgids, max_duration, print_throughput):
 async def tasks_measure_throughput(tasks,
                                    max_duration,
                                    type_pattern=r".*(HLT|Mon).*",
-                                   print_throughput=True):
+                                   print_throughput=True,
+                                   counter="OUT"):
     utgids = [t.utgid for t in tasks]
     utgids = [u for u in utgids if re.match(type_pattern, u.split("_")[2])]
-    return await measure_throughput(utgids, max_duration, print_throughput)
+    return await measure_throughput(utgids, max_duration, print_throughput,
+                                    counter)
 
 
 async def hlt1_wait_for_output(tasks, prod_svc, proc_svc):
diff --git a/MooreScripts/python/MooreScripts/testbench/scenarios/alignment.py b/MooreScripts/python/MooreScripts/testbench/scenarios/alignment.py
index 5936a6298d5d758b50fe43aaf8eb373d3cc85249..5148b5c8c3d5cdddb66a14f77b2ce4b4aab80802 100644
--- a/MooreScripts/python/MooreScripts/testbench/scenarios/alignment.py
+++ b/MooreScripts/python/MooreScripts/testbench/scenarios/alignment.py
@@ -8,6 +8,7 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
+import argparse
 import logging
 from MooreScripts.testbench.emulator import (
     tasks_load,
@@ -23,14 +24,22 @@ log = logging.getLogger(__name__)
 
 
 async def run(tasks, args, extra_argv):
+    parser = argparse.ArgumentParser()
+    parser.add_argument(
+        "--runs", nargs="*", type=int, help="Run numbers for the RunList.opts")
+    parser.add_argument(
+        "--numiter", type=int, default=14, help="Max number of iterations")
+    extra_args = parser.parse_args(extra_argv)
+
     analyzers = [t for t in tasks if "Wrk" in t.type]
     iterator, = [t for t in tasks if "Drv" in t.type]
     assert len(tasks) == len(analyzers) + 1
 
     # Write the alignment-specific options
     with open("RunList.opts", "w") as f:
-        # dump_opts({"DeferredRuns": {"0000230000"}}, f)
-        dump_opts({"DeferredRuns": {"0000264400"}}, f)
+        dump_opts({
+            "DeferredRuns": set(f"{run:010}" for run in extra_args.runs)
+        }, f)
     with open("NodeList.opts", "w") as f:
         # usually the NodeList would contain only the node name
         # since we run one instance per node. When testing locally
@@ -49,7 +58,7 @@ async def run(tasks, args, extra_argv):
     await tasks_send_command(tasks, "start")
     await tasks_wait_for_status(tasks, "RUNNING")
 
-    for iteration in range(10):
+    for iteration in range(extra_args.numiter):
         log.info(f"Running analyzer for iteration {iteration} ...")
         await tasks_wait_for_status(analyzers, "PAUSED")
 
diff --git a/MooreScripts/python/MooreScripts/testbench/scenarios/default.py b/MooreScripts/python/MooreScripts/testbench/scenarios/default.py
index b69240d034e6c8bb769ed29e19d057fd2d84698d..626c34a78c0dc52404ef9260a9c64ec19cc4f142 100644
--- a/MooreScripts/python/MooreScripts/testbench/scenarios/default.py
+++ b/MooreScripts/python/MooreScripts/testbench/scenarios/default.py
@@ -49,9 +49,10 @@ async def run(tasks: List[emulator.Task], args, extra_argv):
         t for t in tasks if re.match(r".*(HLT|Mon).*",
                                      t.utgid.split("_")[2])
     ]
-    if len(prod_tasks) != 1:
-        raise ValueError("There must be exactly one *Prod task")
-    prod_task = prod_tasks[0]
+    if args.measure_throughput == 0:
+        if len(prod_tasks) != 1:
+            raise ValueError("There must be exactly one *Prod task")
+        prod_task = prod_tasks[0]
 
     if extra_args.use_perf or extra_args.use_perf_control:
         for t in main_tasks:
@@ -80,6 +81,8 @@ async def run(tasks: List[emulator.Task], args, extra_argv):
     await tasks_send_command(tasks, "start")
     await tasks_wait_for_status(tasks, "RUNNING")
 
+    prod_counter = "SLICED" if "HLT1" in main_tasks[0].utgid else "OUT"
+
     if args.measure_throughput > 0:
         # wait a bit for things to settle and measure throughput
         # in case we are running the perf profile, we don't want to report the throughput
@@ -88,29 +91,30 @@ async def run(tasks: List[emulator.Task], args, extra_argv):
             tasks,
             max_duration=args.measure_throughput,
             print_throughput=not (extra_args.use_perf
-                                  or extra_args.use_perf_control))
+                                  or extra_args.use_perf_control),
+            counter=prod_counter)
     else:
         # wait for the reader task to get to a PAUSED state (no more input)
         await tasks_wait_for_status(prod_tasks, "PAUSED")
-
-    dim_prod_out = asyncdim.DimService(prod_task.utgid + "/Events/OUT", "X")
+        dim_prod_out = asyncdim.DimService(prod_task.utgid + "/Events/OUT",
+                                           "X")
 
     # stop producing new data
     await tasks_send_command(prod_tasks, "stop")
     await tasks_wait_for_status(prod_tasks, "READY")
 
-    # Get last published value
-    # TODO can we make it such that the number of events put in the buffer keeps being published after stop?
-    #      Markus says MDFReader may need to be Class 1 but are there side effects?
-    n_events_produced = next(
-        v for ts, v in reversed(await dim_prod_out.get_all()) if v is not None)
-
     if not args.measure_throughput > 0:
         if "HLT1" in main_tasks[0].utgid:
             log.info(f"Waiting until all events have been processed")
-            await hlt1_wait_for_output(main_tasks, "Events/OUT",
+            await hlt1_wait_for_output(main_tasks, "Events/" + prod_counter,
                                        "MBMOutput/NProcessed")
         elif "HLT2" in main_tasks[0].utgid:
+            # Get last published value
+            # TODO can we make it such that the number of events put in the buffer keeps being published after stop?
+            #      Markus says MDFReader may need to be Class 1 but are there side effects?
+            n_events_produced = next(
+                v for ts, v in reversed(await dim_prod_out.get_all())
+                if v is not None)
             log.info(
                 f"Waiting until all {n_events_produced} events have been processed"
             )
diff --git a/MooreScripts/scripts/runDFTask.sh b/MooreScripts/scripts/runDFTask.sh
index 4bd4ca0c78c391bc11a96f7a9023cad878d2f591..e75bb68ffc8b0c1f2fa284d1352e4ac7296f6a33 100755
--- a/MooreScripts/scripts/runDFTask.sh
+++ b/MooreScripts/scripts/runDFTask.sh
@@ -28,10 +28,33 @@ setup_options_path
 
 cd_working_dir
 dump_environment
+
+# For HLT1 tests there is a separate Events buffer per NUMA
+# domain. Setting this here allows a single .opts file to be used for both
+if [[ "$NBOFSLAVES" == "0" ]]; then
+    export EVENTS_INSTANCE_BUFFER="Events"
+else
+    instance=$(echo $UTGID | grep -oP '[0-9]+$' )
+    export EVENTS_INSTANCE_BUFFER="Events_${instance}"
+fi
+
+cmd=()
+if test -n "${BIND_NUMA-}"; then
+    numa_domains_num=$(lscpu -p=NODE | grep -oP '^[0-9]+$' | sort | uniq | wc -l)
+    numa_domain=$(( $(echo $UTGID | grep -oP '[0-9]+$') % $numa_domains_num ))
+    cmd+=(numactl -N $numa_domain -m $numa_domain)
+fi
+cmd+=(
+    setarch x86_64 --addr-no-randomize bash -c 'exec -a "$0" "$@"'
+    ${UTGID}
+    genRunner.exe libDataflow.so dataflow_run_task
+    -msg=Dataflow_OutputLogger -mon=Dataflow_DIMMonitoring -class=${CLASS}
+    -opts=${OPTIONS}
+)
+
 if test -f "${OPTIONS}" -a -n "`echo ${OPTIONS} | grep .opts`"; then
-    exec -a ${UTGID} genRunner.exe libDataflow.so dataflow_run_task \
-        -msg=Dataflow_OutputLogger -mon=Dataflow_DIMMonitoring -class=${CLASS} \
-        -opts=${OPTIONS}
+    echo "${cmd[@]}"
+    exec  "${cmd[@]}"
 else
     echo "'${OPTIONS}' does not exist does not end with .opts"
     exit 123
diff --git a/MooreScripts/scripts/testbench.py b/MooreScripts/scripts/testbench.py
index 85a071b28eb369d5f3e9ba5d48035eeb93b796c9..dceab88d9031ae9cedc54b3a60135e5caae5166e 100755
--- a/MooreScripts/scripts/testbench.py
+++ b/MooreScripts/scripts/testbench.py
@@ -135,6 +135,13 @@ parser.add_argument(
     help=
     "Enables writing of the encoding keys by setting env WRITE_ENCODING_KEYS=1.",
 )
+parser.add_argument(
+    "-n",
+    "--instances",
+    type=int,
+    default=None,
+    help="Number of instances of the main task to run",
+)
 args, unknown_argv = parser.parse_known_args()
 args.data_dir = args.working_dir / args.data_dir
 
@@ -149,7 +156,13 @@ args.working_dir = args.working_dir.resolve()
 # Ideally, the nightlies would properly isolate test jobs.
 # Another approach would be to convince Online to be able to control
 # where the shared resources go (/tmp/... and /dev/shm/...).
-args.partition = args.partition + os.getenv("BUILD_ID", "")
+PARTITION_MAX_LEN = 16
+build_id = os.getenv("BUILD_ID", "")
+args.partition = args.partition + build_id[-(
+    PARTITION_MAX_LEN - len(args.partition)):]
+if len(args.partition) > PARTITION_MAX_LEN:
+    raise RuntimeError(f"Partition name is too long (len({args.partition!r})="
+                       + f"{len(args.partition)} > {PARTITION_MAX_LEN})")
 
 emulator.setup_logging(
     args.working_dir / args.log_file, console_level=args.log_level)
@@ -168,7 +181,7 @@ replacements = {
     "WORKING_DIR": args.working_dir.resolve(),
 }
 
-arch = architecture.read_xml(args.architecture)
+arch = architecture.read_xml(args.architecture, args.instances)
 if args.write_encoding_keys:
     arch = architecture.overwrite_dict_value(
         arch,
diff --git a/MooreScripts/tests/options/CaloPi0/Arch.xml b/MooreScripts/tests/options/CaloPi0/Arch.xml
new file mode 100644
index 0000000000000000000000000000000000000000..cf2d7e53b49564ae541ddd0a44587c8e67c9a5a1
--- /dev/null
+++ b/MooreScripts/tests/options/CaloPi0/Arch.xml
@@ -0,0 +1,39 @@
+<!--
+    (c) Copyright 2021-2022 CERN for the benefit of the LHCb Collaboration
+
+    This software is distributed under the terms of the GNU General Public
+    Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".
+
+    In applying this licence, CERN does not waive the privileges and immunities
+    granted to it by virtue of its status as an Intergovernmental Organization
+    or submit itself to any jurisdiction.
+-->
+<tasks_inventory>
+
+  <task name="AlignWrk" user="${USER}" group="${GROUP}" instances="1">
+    <command>${MOORESCRIPTSROOT}/job/CaloPi0/runAnalyzer.sh</command>
+    <argument name="-type" value="${NAME}" />
+    <argument name="-runinfo" value="${RUNINFO}" />
+    <argument name="-class" value="Class1" />
+    <fmcparam name="utgid" value="${PARTITION}_${NODE}_${NAME}_${INSTANCE}" />
+    <fmcparam name="define" value="BINARY_TAG=${BINARY_TAG}" />
+    <fmcparam name="define" value="PYTHONUNBUFFERED=1" />
+    <fmcparam name="define" value="WORKING_DIR=${WORKING_DIR}" />
+    <timeout action="Any" value="120" />
+    <timeout action="load" value="20" />
+  </task>
+
+  <task name="AlignDrv" user="${USER}" group="${GROUP}">
+    <command>${MOORESCRIPTSROOT}/job/CaloPi0/runIterator.sh</command>
+    <argument name="-type" value="${NAME}" />
+    <argument name="-runinfo" value="${RUNINFO}" />
+    <argument name="-class" value="Class1" />
+    <fmcparam name="utgid" value="${PARTITION}_${NODE}_${NAME}_${INSTANCE}" />
+    <fmcparam name="define" value="BINARY_TAG=${BINARY_TAG}" />
+    <fmcparam name="define" value="PYTHONUNBUFFERED=1" />
+    <fmcparam name="define" value="WORKING_DIR=${WORKING_DIR}" />
+    <timeout action="Any" value="120" />
+    <timeout action="load" value="20" />
+  </task>
+
+</tasks_inventory>
diff --git a/MooreScripts/tests/options/CaloPi0/OnlineEnv.opts b/MooreScripts/tests/options/CaloPi0/OnlineEnv.opts
new file mode 100644
index 0000000000000000000000000000000000000000..92f6aba6dd5f614ecced1e930b1eb5751b84a864
--- /dev/null
+++ b/MooreScripts/tests/options/CaloPi0/OnlineEnv.opts
@@ -0,0 +1,4 @@
+OnlineEnv.PartitionID         = 65535;
+OnlineEnv.PartitionName       = "TESTBEAMGUI";
+OnlineEnv.Activity            = "Alignment|CaloPi0";
+OnlineEnv.OutputLevel         = 3;
diff --git a/MooreScripts/tests/options/HLT2VdM/OnlineEnvBase.py b/MooreScripts/tests/options/CaloPi0/OnlineEnvBase.py
similarity index 93%
rename from MooreScripts/tests/options/HLT2VdM/OnlineEnvBase.py
rename to MooreScripts/tests/options/CaloPi0/OnlineEnvBase.py
index 146de0e100d61e043bdef137602c83a0970fc77b..e7420eed31e7d7ef93368637320ec4b8ff7879a3 100644
--- a/MooreScripts/tests/options/HLT2VdM/OnlineEnvBase.py
+++ b/MooreScripts/tests/options/CaloPi0/OnlineEnvBase.py
@@ -9,8 +9,8 @@
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
 PartitionID = 65535
-PartitionName = "TEST"
-Activity = "PHYSICS"
+PartitionName = "TESTBEAMGUI"
+Activity = "Alignment|CaloPi0"
 HltArchitecture = "dummy"
 OnlineVersion = "v0"
 MooreVersion = "v0"
diff --git a/MooreScripts/tests/options/HLT2/Arch.xml b/MooreScripts/tests/options/HLT2/Arch.xml
index e7afe86636c880abed9f509e9210f49337926183..1a2330ed4502d2f62185862efb73bac9bf1a83a1 100644
--- a/MooreScripts/tests/options/HLT2/Arch.xml
+++ b/MooreScripts/tests/options/HLT2/Arch.xml
@@ -35,16 +35,15 @@
     <timeout action="Any" value="30" />
   </task>
 
-  <task name="HLT2" user="${USER}" group="${GROUP}" instances="2">
+  <task name="HLT2" user="${USER}" group="${GROUP}" instances="1">
     <command>${MOORESCRIPTSROOT}/job/runHLT2.sh</command>
     <argument name="-type" value="${NAME}" />
     <argument name="-runinfo" value="${RUNINFO}" />
     <argument name="-class" value="Class1" />
-    <argument name="-numthreads" value="20" />
+    <!-- <argument name="-numthreads" value="20" /> -->
     <fmcparam name="utgid" value="${PARTITION}_${NODE}_${NAME}_${INSTANCE}" />
     <fmcparam name="define" value="BINARY_TAG=${BINARY_TAG}" />
     <fmcparam name="define" value="WORKING_DIR=${WORKING_DIR}" />
-    <fmcparam name="define" value="BIND_NUMA=1" />
     <fmcparam name="define" value="WRITE_ENCODING_KEYS=0" />
     <timeout action="Any" value="120" />
     <timeout action="load" value="20" />
diff --git a/MooreScripts/tests/options/HLT2Perf/Arch.xml b/MooreScripts/tests/options/HLT2Perf/Arch.xml
index ebeeea451eb4ef6c0af06ad55fc7819f3bc89e7d..cdb0b07f221df2543a6b620fac2a706ab945f043 100644
--- a/MooreScripts/tests/options/HLT2Perf/Arch.xml
+++ b/MooreScripts/tests/options/HLT2Perf/Arch.xml
@@ -40,7 +40,7 @@
     <argument name="-type" value="${NAME}" />
     <argument name="-runinfo" value="${RUNINFO}" />
     <argument name="-class" value="Class1" />
-    <argument name="-numthreads" value="20" />
+    <!-- <argument name="-numthreads" value="20" /> -->
     <fmcparam name="utgid" value="${PARTITION}_${NODE}_${NAME}_${INSTANCE}" />
     <fmcparam name="define" value="BINARY_TAG=${BINARY_TAG}" />
     <fmcparam name="define" value="WORKING_DIR=${WORKING_DIR}" />
diff --git a/MooreScripts/tests/options/HLT2VdM/Arch.xml b/MooreScripts/tests/options/HLT2VdM/Arch.xml
deleted file mode 100644
index 3090c882055be19314a27bae06883e7e78ac194c..0000000000000000000000000000000000000000
--- a/MooreScripts/tests/options/HLT2VdM/Arch.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<!--
-    (c) Copyright 2021-2022 CERN for the benefit of the LHCb Collaboration
-
-    This software is distributed under the terms of the GNU General Public
-    Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".
-
-    In applying this licence, CERN does not waive the privileges and immunities
-    granted to it by virtue of its status as an Intergovernmental Organization
-    or submit itself to any jurisdiction.
--->
-<tasks_inventory>
-
-  <task name="MBM" user="${USER}" group="${GROUP}">
-    <command>${MOORESCRIPTSROOT}/scripts/runDFTask.sh</command>
-    <argument name="-type" value="${NAME}" />
-    <argument name="-runinfo" value="${RUNINFO}" />
-    <argument name="-options" value="${MOORESCRIPTSROOT}/options/HLT2MBM.opts" />
-    <argument name="-class" value="Class0" />
-    <fmcparam name="utgid" value="${PARTITION}_${NODE}_${NAME}_${INSTANCE}" />
-    <fmcparam name="define" value="BINARY_TAG=${BINARY_TAG}" />
-    <fmcparam name="define" value="WORKING_DIR=${WORKING_DIR}" />
-    <timeout action="Any" value="20" />
-  </task>
-
-  <task name="MDFProd" user="${USER}" group="${GROUP}">
-    <command>${MOORESCRIPTSROOT}/scripts/runDFTask.sh</command>
-    <argument name="-type" value="${NAME}" />
-    <argument name="-runinfo" value="${RUNINFO}" />
-    <argument name="-options" value="${MOORESCRIPTSROOT}/options/HLT2MDFProd.opts" />
-    <argument name="-class" value="Class2" />
-    <fmcparam name="utgid" value="${PARTITION}_${NODE}_${NAME}_${INSTANCE}" />
-    <fmcparam name="define" value="BINARY_TAG=${BINARY_TAG}" />
-    <fmcparam name="define" value="WORKING_DIR=${WORKING_DIR}" />
-    <fmcparam name="define" value="DATA_DIR=${DATA_DIR}" />
-    <timeout action="Any" value="30" />
-  </task>
-
-  <task name="HLT2" user="${USER}" group="${GROUP}" instances="2">
-    <command>${MOORESCRIPTSROOT}/job/runHLT2VdM.sh</command>
-    <argument name="-type" value="${NAME}" />
-    <argument name="-runinfo" value="${RUNINFO}" />
-    <argument name="-class" value="Class1" />
-    <argument name="-numthreads" value="20" />
-    <fmcparam name="utgid" value="${PARTITION}_${NODE}_${NAME}_${INSTANCE}" />
-    <fmcparam name="define" value="BINARY_TAG=${BINARY_TAG}" />
-    <fmcparam name="define" value="WORKING_DIR=${WORKING_DIR}" />
-    <fmcparam name="define" value="BIND_NUMA=1" />
-    <timeout action="Any" value="120" />
-    <timeout action="load" value="20" />
-  </task>
-
-  <task name="Writer" user="${USER}" group="${GROUP}">
-    <command>${MOORESCRIPTSROOT}/scripts/runDFTask.sh</command>
-    <argument name="-type" value="${NAME}" />
-    <argument name="-runinfo" value="${RUNINFO}" />
-    <argument name="-options" value="${MOORESCRIPTSROOT}/options/TestWriter.opts" />
-    <argument name="-class" value="Class1" />
-    <fmcparam name="utgid" value="${PARTITION}_${NODE}_${NAME}_${INSTANCE}" />
-    <fmcparam name="define" value="BINARY_TAG=${BINARY_TAG}" />
-    <fmcparam name="define" value="WORKING_DIR=${WORKING_DIR}" />
-    <timeout action="Any" value="20" />
-    <timeout action="load" value="20" />
-  </task>
-
-</tasks_inventory>
diff --git a/MooreScripts/tests/options/HLT2VdM/OnlineEnv.opts b/MooreScripts/tests/options/HLT2VdM/OnlineEnv.opts
deleted file mode 100644
index 5f131486a51a9ca8671738aee7d5fd4a0dc22c32..0000000000000000000000000000000000000000
--- a/MooreScripts/tests/options/HLT2VdM/OnlineEnv.opts
+++ /dev/null
@@ -1,12 +0,0 @@
-OnlineEnv.PartitionID         = 65535;
-OnlineEnv.PartitionName       = "TEST";
-OnlineEnv.Activity            = "PHYSICS";
-OnlineEnv.OutputLevel         = 3;
-//
-OnlineEnv.Reader_Rescan       = 0;
-// OnlineEnv.Reader_Directories  = {"/hlt2/objects/LHCb/0000252975/"};
-// OnlineEnv.Reader_FilePrefix   = "Run_0000252975_";
-// 4.0 GB
-// OnlineEnv.Reader_FilePrefix   = "Run_0000252975_HLT24705_20221110-090425-628";
-OnlineEnv.Reader_Directories  = {"/hlt2/objects/LHCb/0000255983"};
-OnlineEnv.Reader_FilePrefix   = "Run_0000255983_HLT22610_20230204";
diff --git a/MooreScripts/tests/options/HLT2_pp_thor/Arch.xml b/MooreScripts/tests/options/HLT2_pp_thor/Arch.xml
index ecdb1180c0e7eaeb2f7ea5b3a12fe37452a1b832..66936e984c2ac41129c6661e49c0fb8b06ef0cf6 100644
--- a/MooreScripts/tests/options/HLT2_pp_thor/Arch.xml
+++ b/MooreScripts/tests/options/HLT2_pp_thor/Arch.xml
@@ -40,7 +40,7 @@
     <argument name="-type" value="${NAME}" />
     <argument name="-runinfo" value="${RUNINFO}" />
     <argument name="-class" value="Class1" />
-    <argument name="-numthreads" value="20" />
+    <!-- <argument name="-numthreads" value="20" /> -->
     <fmcparam name="utgid" value="${PARTITION}_${NODE}_${NAME}_${INSTANCE}" />
     <fmcparam name="define" value="BINARY_TAG=${BINARY_TAG}" />
     <fmcparam name="define" value="WORKING_DIR=${WORKING_DIR}" />
diff --git a/MooreScripts/tests/qmtest/alignment.qmt b/MooreScripts/tests/qmtest/alignment.qmt
index d73863d58b943ce0645d7b56997f6056dc6c0ddb..0fa0422b57f9b298861bb705e1bde9923b9cb49d 100644
--- a/MooreScripts/tests/qmtest/alignment.qmt
+++ b/MooreScripts/tests/qmtest/alignment.qmt
@@ -20,6 +20,7 @@ Run an HLT2 job in the Online testbench
   <text>--test-file-db-key=2022_raw_hlt1_253597</text>
   <text>$MOORESCRIPTSROOT/tests/options/VeloHalf/Arch.xml</text>
   <text>alignment</text>
+  <text>--runs=253597</text>
 </set></argument>
 <argument name="unsupported_platforms"><set>
   <text>detdesc</text>
diff --git a/MooreScripts/tests/qmtest/check_run_change.qmt b/MooreScripts/tests/qmtest/check_run_change.qmt
index 05305e520d2f2ec407a818c9eca725882a7caf85..64e27a680b0cbf55e725f400502ad9d314cac504 100644
--- a/MooreScripts/tests/qmtest/check_run_change.qmt
+++ b/MooreScripts/tests/qmtest/check_run_change.qmt
@@ -24,4 +24,7 @@
   </set></argument>
   <argument name="timeout"><integer>200</integer></argument>
   <argument name="use_temp_dir"><enumeral>true</enumeral></argument>
+  <argument name="unsupported_platforms"><set>
+    <text>detdesc</text>
+  </set></argument>
 </extension>
diff --git a/MooreScripts/tests/qmtest/create_hlt1_tck.qmt b/MooreScripts/tests/qmtest/create_hlt1_tck.qmt
index 33a1db5435c6e147f74d772b5ab784031ce4f782..6275c80c1f874eea4295b3974d03c74e3e5f95b5 100644
--- a/MooreScripts/tests/qmtest/create_hlt1_tck.qmt
+++ b/MooreScripts/tests/qmtest/create_hlt1_tck.qmt
@@ -12,6 +12,9 @@
 #######################################################
 -->
 <extension class="GaudiTest.GaudiExeTest" kind="test">
+  <argument name="prerequisites"><set>
+    <tuple><text>create_hlt1_tck_prepare</text><enumeral>PASS</enumeral></tuple>
+  </set></argument>
   <argument name="program"><text>python</text></argument>
   <argument name="args"><set>
   <text>$ALLENROOT/scripts/create_hlt1_tck.py</text>
diff --git a/MooreScripts/tests/qmtest/create_hlt1_tck_prepare.qmt b/MooreScripts/tests/qmtest/create_hlt1_tck_prepare.qmt
new file mode 100644
index 0000000000000000000000000000000000000000..daaf6dc16bc1cec70c2c682bfef95476ae293987
--- /dev/null
+++ b/MooreScripts/tests/qmtest/create_hlt1_tck_prepare.qmt
@@ -0,0 +1,20 @@
+<?xml version="1.0" ?><!DOCTYPE extension  PUBLIC '-//QM/2.3/Extension//EN'  'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'>
+<!--
+    (c) Copyright 2024 CERN for the benefit of the LHCb Collaboration
+
+    This software is distributed under the terms of the GNU General Public
+    Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".
+
+    In applying this licence, CERN does not waive the privileges and immunities
+    granted to it by virtue of its status as an Intergovernmental Organization
+    or submit itself to any jurisdiction.
+-->
+<extension class="GaudiTest.GaudiExeTest" kind="test">
+  <argument name="program"><text>rm</text></argument>
+  <argument name="args"><set>
+  <text>-rf</text>
+  <text>config.git</text>
+  </set></argument>
+  <argument name="timeout"><integer>100</integer></argument>
+  <argument name="use_temp_dir"><enumeral>true</enumeral></argument>
+</extension>
diff --git a/MooreScripts/tests/qmtest/hlt1runchange.qmt b/MooreScripts/tests/qmtest/hlt1runchange.qmt
index 4094e5b62519ba47b40e9867a3dc480d8e75dbd9..c1e1cb5c38aa87623fb2aed88d30af89a32d1785 100644
--- a/MooreScripts/tests/qmtest/hlt1runchange.qmt
+++ b/MooreScripts/tests/qmtest/hlt1runchange.qmt
@@ -17,7 +17,7 @@ Run an HLT1 job in the Online testbench
 <argument name="args"><set>
   <text>$MOORESCRIPTSROOT/tests/options/HLT1Slim/Arch.xml</text>
   <text>--working-dir=hlt1runchange</text>
-  <text>--partition=TESTHLT1RUNCHANGE</text>
+  <text>--partition=TESTHLT1RC</text>
   <text>--test-file-db-key=2024_mep_292860_run_change_test</text>
   <text>--hlt-type=config.git:0x10000001</text>
   <text>--tck-from-odin</text>
@@ -38,4 +38,7 @@ for fn in glob.glob(workdir + "/hlt1runchange/*.*"):
         result[os.path.basename(fn)] = open(fn).read()
 
 </text></argument>
+<argument name="unsupported_platforms"><set>
+  <text>detdesc</text>
+</set></argument>
 </extension>
diff --git a/MooreScripts/tests/qmtest/hlt2slim.qmt b/MooreScripts/tests/qmtest/hlt2slim.qmt
index 8efcab55636b9761f65128a74752aed2a425bd2c..429f878d58d51798feff9dd44c3132190992fd5f 100644
--- a/MooreScripts/tests/qmtest/hlt2slim.qmt
+++ b/MooreScripts/tests/qmtest/hlt2slim.qmt
@@ -22,6 +22,7 @@ Run an HLT2 job in the Online testbench
   <text>--test-file-db-key=2022_raw_hlt1_253597</text>
 </set></argument>
 <argument name="use_temp_dir"><enumeral>true</enumeral></argument>
+<argument name="unsupported_platforms"><set><text>detdesc</text></set></argument>
 <argument name="validator"><text>
 
 # No validator for now: only check the exit code
diff --git a/MooreScripts/tests/qmtest/odinmon.qmt b/MooreScripts/tests/qmtest/odinmon.qmt
index c1d791c451ffd3f7002c6b474705aa466891aa48..f3ba51c434ba1e81120bd4bb7350133acfb74482 100644
--- a/MooreScripts/tests/qmtest/odinmon.qmt
+++ b/MooreScripts/tests/qmtest/odinmon.qmt
@@ -21,6 +21,7 @@ Run an ODINMon job in the Online testbench
   <text>--test-file-db-key=2024_raw_hlt1_288877_tae</text>
 </set></argument>
 <argument name="use_temp_dir"><enumeral>true</enumeral></argument>
+<argument name="unsupported_platforms"><set><text>detdesc</text></set></argument>
 <argument name="validator"><text>
 
 # No validator for now: only check the exit code
diff --git a/MooreScripts/tests/qmtest/odinmon_offline.qmt b/MooreScripts/tests/qmtest/odinmon_offline.qmt
index 75221b7255ce6a74343c58b0cd9226a2af5786b8..367dde023b79e685a6061ea7614ca9f83772e3ba 100644
--- a/MooreScripts/tests/qmtest/odinmon_offline.qmt
+++ b/MooreScripts/tests/qmtest/odinmon_offline.qmt
@@ -19,6 +19,7 @@ Run an ODINMon job in an offline way
   <text>$MOOREONLINECONFROOT/options/odin.py</text>
 </set></argument>
 <argument name="use_temp_dir"><enumeral>per-test</enumeral></argument>
+<argument name="unsupported_platforms"><set><text>detdesc</text></set></argument>
 <argument name="validator"><text>
 
 # No validator for now: only check the exit code
diff --git a/MooreScripts/tests/qmtest/recomon.qmt b/MooreScripts/tests/qmtest/recomon.qmt
index 05066b627121434c1a91c1dea0820690de372201..b92254d585896e2336c117be9668669ad6602da0 100644
--- a/MooreScripts/tests/qmtest/recomon.qmt
+++ b/MooreScripts/tests/qmtest/recomon.qmt
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE extension  PUBLIC '-//QM/2.3/Extension//EN'  'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'>
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE extension  PUBLIC '-//QM/2.3/Extension//EN'  'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'>
 <!--
     (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration
 
@@ -28,7 +28,7 @@ Run an RecoMon job in the Online testbench
 import glob
 workdir = self._common_tmpdir
 for fn in glob.glob(workdir + "/recomon/*.*"):
-    if not fn.endswith(".mdf"):
+    if not fn.endswith(".mdf") and not fn.endswith(".root"):
         result[os.path.basename(fn)] = open(fn).read()
 
 </text></argument>
diff --git a/README.md b/README.md
index 2c01d21d418953db2c1adc6003de7c05de4f5e4c..861515de3878928c0f0372f75e0e66ee72ce11d9 100644
--- a/README.md
+++ b/README.md
@@ -187,7 +187,7 @@ MooreOnline/run bash -c '$PRCONFIGROOT/scripts/benchmark-scripts/MooreOnline_hlt
 
 ```sh
 MooreOnline/run MooreOnline/MooreScripts/scripts/testbench.py --help
-MooreOnline/run MooreOnline/MooreScripts/scripts/testbench.py --working-dir=output --test-file-db-key=2022_raw_hlt1_253597 --partition=TESTALIGNMENT  MooreOnline/MooreScripts/tests/options/VeloHalf/Arch.xml alignment
+MooreOnline/run MooreOnline/MooreScripts/scripts/testbench.py --working-dir=output --test-file-db-key=2022_raw_hlt1_253597 --partition=TESTALIGNMENT  MooreOnline/MooreScripts/tests/options/VeloHalf/Arch.xml alignment --runs 253597
 ```
 
 <details><summary> `tree output` (click to expand) </summary>
@@ -202,11 +202,9 @@ output
 ├── AlignWrk_0.env
 ├── AlignWrk_0.log
 ├── AlignWrk_0.opts
-├── AlignWrk_1.dump
-├── AlignWrk_1.env
-├── AlignWrk_1.log
-├── AlignWrk_1.opts
 ├── emu.log
+├── input_data
+│   └── Run_0000253597_HLT24640_20221114-023831-878_06c6355a15f87f57bfdcb9cf5ef57754.mdf
 ├── NodeList.opts
 ├── OnlineEnvBase.py
 ├── OnlineEnv.opts
@@ -216,28 +214,41 @@ output
 ├── setup.vars
 └── VeloHalf
     ├── analyzer
-    │   └── 0000255623
-    │       ├── derivatives-TEST_N8190402_AlignWrk_0.out
-    │       ├── derivatives-TEST_N8190402_AlignWrk_1.out
-    │       ├── histograms-TEST_N8190402_AlignWrk_0_new.root
-    │       ├── histograms-TEST_N8190402_AlignWrk_1_new.root
+    │   └── 0000253597
+    │       ├── derivatives-TESTALIGNMENT_N8190402_AlignWrk_0.out
     │       └── tag
     └── iterator
-        └── 0000255623
+        └── 0000253597
             ├── alignlog.txt
+            ├── iter0
+            │   ├── histograms-TESTALIGNMENT_N8190402_AlignWrk_0_new.root
+            │   └── MergedHistos_Iter0.root
+            ├── iter1
+            │   ├── histograms-TESTALIGNMENT_N8190402_AlignWrk_0_new.root
+            │   └── MergedHistos_Iter1.root
+            ├── iter2
+            │   ├── histograms-TESTALIGNMENT_N8190402_AlignWrk_0_new.root
+            │   └── MergedHistos_Iter2.root
             ├── new-constants-0
             │   └── Conditions
             │       └── VP
             │           └── Alignment
-            │               ├── Global.yml
-            │               └── Modules.yml
+            │               └── Global.yml
             ├── new-constants-1
+            │   └── Conditions
+            │       └── VP
+            │           └── Alignment
+            │               └── Global.yml
+            ├── new-constants-2
+            │   └── Conditions
+            │       └── VP
+            │           └── Alignment
+            │               └── Global.yml
             ├── OverlayRoot
             │   └── Conditions
             │       └── VP
             │           └── Alignment
-            │               ├── Global.yml
-            │               └── Modules.yml
+            │               └── Global.yml
             └── tag
 ```
 
@@ -251,7 +262,7 @@ As of May 2023, at most 5 MDFs from the beginning of each run are stored in
 ```
 /calib/online/tmpHlt1Dumps/LHCb/<run-number>
 ```
-Those files will become available only after the run is stopped, and deleted after one week. 
+Those files will become available only after the run is stopped, and deleted after one week.
 If you need different or (slightly) more files from a run, follow the instructions below.