From bee607625e9ad11b724c0d65a990f0c58ffa1645 Mon Sep 17 00:00:00 2001 From: nathanielerowe <70993723+nathanielerowe@users.noreply.github.com> Date: Wed, 5 Nov 2025 08:59:08 -0600 Subject: [PATCH 1/2] eps increase, window shrink, def vals --- sbncode/BeamSpillInfoRetriever/POTTools.cpp | 94 +++++++++---------- .../SBNDBNBRetriever_module.cc | 2 +- .../job/sbndbnbdefaults.fcl | 2 +- 3 files changed, 49 insertions(+), 49 deletions(-) diff --git a/sbncode/BeamSpillInfoRetriever/POTTools.cpp b/sbncode/BeamSpillInfoRetriever/POTTools.cpp index 48f6984df..585fdba5b 100644 --- a/sbncode/BeamSpillInfoRetriever/POTTools.cpp +++ b/sbncode/BeamSpillInfoRetriever/POTTools.cpp @@ -68,42 +68,42 @@ namespace sbn::pot{ // initializing all of our device carriers // device definitions can be found in BNBSpillInfo.h - double TOR860 = 0; // units e12 protons - double TOR875 = 0; // units e12 protons - double LM875A = 0; // units R/s - double LM875B = 0; // units R/s - double LM875C = 0; // units R/s - double HP873 = 0; // units mm - double VP873 = 0; // units mm; not in the first IFBeam query bunch - double HP875 = 0; // units mm - double VP875 = 0; // units mm - double HPTG1 = 0; // units mm - double VPTG1 = 0; // units mm - double HPTG2 = 0; // units mm - double VPTG2 = 0; // units mm - double BTJT2 = 0; // units Deg C - double THCURR = 0; // units kiloAmps - double M875HS = 0; // units mm - double M875VS = 0; // units mm - double M875HM = 0; // units mm - double M875VM = 0; // units mm - double M876HS = 0; // units mm - double M876VS = 0; // units mm - double M876HM = 0; // units mm - double M876VM = 0; // units mm + double TOR860 = -999; // units e12 protons + double TOR875 = -999; // units e12 protons + double LM875A = -999; // units R/s + double LM875B = -999; // units R/s + double LM875C = -999; // units R/s + double HP873 = -999; // units mm + double VP873 = -999; // units mm; not in the first IFBeam query bunch + double HP875 = -999; // units mm + double VP875 = -999; // units mm + double HPTG1 = -999; // units mm + double VPTG1 = -999; // units mm + double HPTG2 = -999; // units mm + double VPTG2 = -999; // units mm + double BTJT2 = -999; // units Deg C + double THCURR = -999; // units kiloAmps + double M875HS = -999; // units mm + double M875VS = -999; // units mm + double M875HM = -999; // units mm + double M875VM = -999; // units mm + double M876HS = -999; // units mm + double M876VS = -999; // units mm + double M876HM = -999; // units mm + double M876VM = -999; // units mm - double HP875Offset =0;//units mm; make a another separate IFBeam query bunch for offsets - double VP875Offset =0;//units mm - double VP873Offset =0;//units mm - double HPTG1Offset =0;//units mm - double HPTG2Offset =0;//units mm - double VPTG1Offset =0;//units mm - double VPTG2Offset =0;//units mm + double HP875Offset =-999;//units mm; make a another separate IFBeam query bunch for offsets + double VP875Offset =-999;//units mm + double VP873Offset =-999;//units mm + double HPTG1Offset =-999;//units mm + double HPTG2Offset =-999;//units mm + double VPTG1Offset =-999;//units mm + double VPTG2Offset =-999;//units mm - double TOR860_time = 0; // units s + double TOR860_time = -999; // units s - double FOM =0; + double FOM =-999; // Here we request all the devices // since sometimes devices fail to report we'll @@ -116,7 +116,7 @@ namespace sbn::pot{ try{bfp->GetNamedData(time, "E:LM875B",&LM875B);}catch (WebAPIException &we) {mf::LogDebug("BNBRetriever")<< "At time : " << time << " " << "got exception: " << we.what() << "\n";} try{bfp->GetNamedData(time, "E:LM875C",&LM875C);}catch (WebAPIException &we) {mf::LogDebug("BNBRetriever")<< "At time : " << time << " " << "got exception: " << we.what() << "\n";} try{bfp->GetNamedData(time, "E:HP873",&HP873);}catch (WebAPIException &we) {mf::LogDebug("BNBRetriever")<< "At time : " << time << " " << "got exception: " << we.what() << "\n";} - try{bfp->GetNamedData(time, "E:VP873",&VP873);}catch (WebAPIException &we) {mf::LogDebug("BNBRetriever")<< "At time : " << time << " " << "got exception: " << we.what() << "\n";} + try{vp873->GetNamedData(time, "E:VP873",&VP873);}catch (WebAPIException &we) {mf::LogDebug("BNBRetriever")<< "At time : " << time << " " << "got exception: " << we.what() << "\n";} try{bfp->GetNamedData(time, "E:HP875",&HP875);}catch (WebAPIException &we) {mf::LogDebug("BNBRetriever")<< "At time : " << time << " " << "got exception: " << we.what() << "\n";} try{bfp->GetNamedData(time, "E:VP875",&VP875);}catch (WebAPIException &we) {mf::LogDebug("BNBRetriever")<< "At time : " << time << " " << "got exception: " << we.what() << "\n";} try{bfp->GetNamedData(time, "E:HPTG1",&HPTG1);}catch (WebAPIException &we) {mf::LogDebug("BNBRetriever")<< "At time : " << time << " " << "got exception: " << we.what() << "\n";} @@ -231,21 +231,21 @@ namespace sbn::pot{ bool BrokenClock(double time, std::unique_ptr const& bfp) { - double TOR860 = 0; // units e12 protons - double TOR875 = 0; // units e12 protons - double LM875A = 0; // units R/s - double LM875B = 0; // units R/s - double LM875C = 0; // units R/s - double HP875 = 0; // units mm - double VP875 = 0; // units mm - double HPTG1 = 0; // units mm - double VPTG1 = 0; // units mm - double HPTG2 = 0; // units mm - double VPTG2 = 0; // units mm - double BTJT2 = 0; // units Deg C - double THCURR = 0; // units kiloAmps + double TOR860 = -999; // units e12 protons + double TOR875 = -999; // units e12 protons + double LM875A = -999; // units R/s + double LM875B = -999; // units R/s + double LM875C = -999; // units R/s + double HP875 = -999; // units mm + double VP875 = -999; // units mm + double HPTG1 = -999; // units mm + double VPTG1 = -999; // units mm + double HPTG2 = -999; // units mm + double VPTG2 = -999; // units mm + double BTJT2 = -999; // units Deg C + double THCURR = -999; // units kiloAmps - double TOR860_time = 0; // units s + double TOR860_time = -999; // units s // Here we request all the devices // since sometimes devices fail to report we'll diff --git a/sbncode/BeamSpillInfoRetriever/SBNDBNBRetriever/SBNDBNBRetriever_module.cc b/sbncode/BeamSpillInfoRetriever/SBNDBNBRetriever/SBNDBNBRetriever_module.cc index 97ca57d6d..779be4053 100644 --- a/sbncode/BeamSpillInfoRetriever/SBNDBNBRetriever/SBNDBNBRetriever_module.cc +++ b/sbncode/BeamSpillInfoRetriever/SBNDBNBRetriever/SBNDBNBRetriever_module.cc @@ -71,7 +71,7 @@ sbn::SBNDBNBRetriever::SBNDBNBRetriever(fhicl::ParameterSet const & params) vp873->set_epsilon(0.02); offsets = ifbeam_handle->getBeamFolder(params.get("OffsetBundle"), params.get("URL"), timeWindow); - offsets->set_epsilon(600); + offsets->set_epsilon(1000); } diff --git a/sbncode/BeamSpillInfoRetriever/job/sbndbnbdefaults.fcl b/sbncode/BeamSpillInfoRetriever/job/sbndbnbdefaults.fcl index 2ef9a7491..47f37d9ba 100644 --- a/sbncode/BeamSpillInfoRetriever/job/sbndbnbdefaults.fcl +++ b/sbncode/BeamSpillInfoRetriever/job/sbndbnbdefaults.fcl @@ -12,7 +12,7 @@ sbndbnbspillinfo: { OffsetBundle: "BNB_BPM_settings" TimeWindow: "700" #seconds - MWR_TimeWindow: "3601" #seconds + MWR_TimeWindow: "700" #seconds DeviceUsedForTiming: "E:TOR860" } From 6853934b756b03ef489c325361d72adb9a8b1c02 Mon Sep 17 00:00:00 2001 From: Max Dubnowski <90648380+maxdubnowski@users.noreply.github.com> Date: Fri, 14 Nov 2025 12:45:33 -0500 Subject: [PATCH 2/2] Add VP873Offset to CAFMaker --- sbncode/CAFMaker/FillExposure.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/sbncode/CAFMaker/FillExposure.cxx b/sbncode/CAFMaker/FillExposure.cxx index 195884698..b6bd758a9 100644 --- a/sbncode/CAFMaker/FillExposure.cxx +++ b/sbncode/CAFMaker/FillExposure.cxx @@ -26,6 +26,7 @@ namespace caf single_store.FOM = info.FOM; single_store.VP873 = info.VP873; single_store.VP875Offset = info.VP875Offset; + single_store.VP873Offset = info.VP873Offset; single_store.HP875Offset = info.HP875Offset; single_store.VPTG1Offset = info.VPTG1Offset; single_store.HPTG1Offset = info.HPTG1Offset;