From 18db38f1587114a5221e5dcc9167eb0c3e3878c7 Mon Sep 17 00:00:00 2001 From: nathanielerowe <70993723+nathanielerowe@users.noreply.github.com> Date: Thu, 14 May 2026 16:30:30 -0500 Subject: [PATCH 1/2] Enhance BNBRetriever with new BeamFolder handling Updated BNBSpillInfo creation to include additional parameters and set epsilon values for new BeamFolder instances. --- .../BNBRetriever/BNBRetriever_module.cc | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/sbncode/BeamSpillInfoRetriever/BNBRetriever/BNBRetriever_module.cc b/sbncode/BeamSpillInfoRetriever/BNBRetriever/BNBRetriever_module.cc index 903d52873..028f5f6a5 100644 --- a/sbncode/BeamSpillInfoRetriever/BNBRetriever/BNBRetriever_module.cc +++ b/sbncode/BeamSpillInfoRetriever/BNBRetriever/BNBRetriever_module.cc @@ -26,6 +26,9 @@ #include "sbnobj/Common/POTAccounting/BNBSpillInfo.h" +#include "sbncode/BeamSpillInfoRetriever/POTTools.h" +#include "sbncode/BeamSpillInfoRetriever/getFOM.h" + #include "ifdh_art/IFBeamService/IFBeam_service.h" #include "ifbeam_c.h" #include "MWRData.h" @@ -130,6 +133,8 @@ class sbn::BNBRetriever : public art::EDProducer { // art::ServiceHandle ifbeam_handle; std::unique_ptr bfp; + std::unique_ptr offsets; + std::unique_ptr vp873; std::unique_ptr bfp_mwr; // @@ -260,6 +265,8 @@ sbn::BNBRetriever::BNBRetriever(Parameters const& params) raw_data_label(params().RawDataLabel()), fDeviceUsedForTiming(params().DeviceUsedForTiming()), bfp( ifbeam_handle->getBeamFolder(params().Bundle(), params().URL(), params().TimeWindow())), + vp873( ifbeam_handle->getBeamFolder(params().VP873Bundle(), params().URL(), params().TimeWindow())), + offsets( ifbeam_handle->getBeamFolder(params().OffsetBundle(), params().URL(), params().TimeWindow())), bfp_mwr( ifbeam_handle->getBeamFolder(params().MultiWireBundle(), params().URL(), params().MWR_TimeWindow())), fTriggerDatabaseFile(params().TriggerDatabaseFile()) { @@ -278,7 +285,9 @@ sbn::BNBRetriever::BNBRetriever(Parameters const& params) // bfp->set_epsilon(0.02); //20 ms, this was tuned by hand and compared to IFBeamDB times bfp_mwr->set_epsilon(0.5); - + vp873->set_epsilon(0.02); + offsets->set_epsilon(600); + //bfp_mwr->setValidWindow(86400); bfp_mwr->setValidWindow(3605); produces< std::vector< sbn::BNBSpillInfo >, art::InSubRun >(); @@ -633,8 +642,9 @@ int sbn::BNBRetriever::matchMultiWireData( }//end loop over MWR devices - sbn::BNBSpillInfo spillInfo = makeBNBSpillInfo(eventID, times_temps[i], MWRdata, matched_MWR); - + sbn::BNBSpillInfo spillInfo = sbn::pot::makeBNBSpillInfo(eventID, times_temps[i], MWRdata, matched_MWR, bfp, offsets, vp873); + double const spillFOM = sbn::getBNBqualityFOM(spillInfo); + spillInfo.FOM = spillFOM; beamInfos.push_back(std::move(spillInfo)); // We do not write these to the art::Events because From ab3bbb72306329ad3df2eecf18a09f283d356c67 Mon Sep 17 00:00:00 2001 From: nathanielerowe <70993723+nathanielerowe@users.noreply.github.com> Date: Thu, 14 May 2026 16:31:05 -0500 Subject: [PATCH 2/2] Add VP873Bundle and OffsetBundle to configuration --- sbncode/BeamSpillInfoRetriever/job/bnbspillinfo.fcl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbncode/BeamSpillInfoRetriever/job/bnbspillinfo.fcl b/sbncode/BeamSpillInfoRetriever/job/bnbspillinfo.fcl index 3aece8658..4675b8664 100644 --- a/sbncode/BeamSpillInfoRetriever/job/bnbspillinfo.fcl +++ b/sbncode/BeamSpillInfoRetriever/job/bnbspillinfo.fcl @@ -8,6 +8,8 @@ bnbspillinfo: { URL: "" #keep this blank and we're good Bundle: "BoosterNeutrinoBeam_read" MultiWireBundle: "BNBMultiWire" + VP873Bundle: "BNB_monitor" + OffsetBundle: "BNB_BPM_settings" TimeWindow: "700" #seconds MWR_TimeWindow: "3601" #seconds raw_data_label: "daq"