From 87b7368e0e1602afc571fc4e0eb081f8888bff32 Mon Sep 17 00:00:00 2001 From: nathanielerowe <70993723+nathanielerowe@users.noreply.github.com> Date: Mon, 12 Jan 2026 10:50:52 -0600 Subject: [PATCH 1/6] Change cryostat initialization value to -1000 --- sbncode/CAFMaker/FillTrue.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbncode/CAFMaker/FillTrue.cxx b/sbncode/CAFMaker/FillTrue.cxx index ef1b4cc0c..35389950f 100644 --- a/sbncode/CAFMaker/FillTrue.cxx +++ b/sbncode/CAFMaker/FillTrue.cxx @@ -809,7 +809,7 @@ namespace caf { srparticle.parent = particle.Mother(); // Set the initial cryostat - srparticle.cryostat = -1; + srparticle.cryostat = -1000; if (entry_point >= 0) { for (unsigned c = 0; c < active_volumes.size(); c++) { if (active_volumes[c].ContainsPosition(particle.Position(entry_point).Vect())) { From ca389e2958463d6986a143c1f3f529d9251f96ba Mon Sep 17 00:00:00 2001 From: nathanielerowe <70993723+nathanielerowe@users.noreply.github.com> Date: Mon, 12 Jan 2026 11:26:14 -0600 Subject: [PATCH 2/6] Update cryostat values in FillTrue.cxx --- sbncode/CAFMaker/FillTrue.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbncode/CAFMaker/FillTrue.cxx b/sbncode/CAFMaker/FillTrue.cxx index 35389950f..1e68c3586 100644 --- a/sbncode/CAFMaker/FillTrue.cxx +++ b/sbncode/CAFMaker/FillTrue.cxx @@ -464,6 +464,7 @@ namespace caf { const std::vector &active_volumes) { srneutrino.index = i; + srneutrino.cryostat = -1001; for (int c = 0; c < 2; c++) { SRTrueInteractionPlaneInfo init; @@ -809,7 +810,7 @@ namespace caf { srparticle.parent = particle.Mother(); // Set the initial cryostat - srparticle.cryostat = -1000; + srparticle.cryostat = -1; if (entry_point >= 0) { for (unsigned c = 0; c < active_volumes.size(); c++) { if (active_volumes[c].ContainsPosition(particle.Position(entry_point).Vect())) { From d013ac7fd66d0acc61f315878856095baa82e04f Mon Sep 17 00:00:00 2001 From: nathanielerowe <70993723+nathanielerowe@users.noreply.github.com> Date: Mon, 12 Jan 2026 22:01:41 -0600 Subject: [PATCH 3/6] Add debug output for cryostat loop --- sbncode/CAFMaker/FillTrue.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/sbncode/CAFMaker/FillTrue.cxx b/sbncode/CAFMaker/FillTrue.cxx index 1e68c3586..b2a673f0f 100644 --- a/sbncode/CAFMaker/FillTrue.cxx +++ b/sbncode/CAFMaker/FillTrue.cxx @@ -601,6 +601,7 @@ namespace caf { // Set the cryostat of the position for (int icryo = 0; icryo < 2; icryo++) { + std::cout << "You have entered loop!" << std::endl; if (active_volumes[icryo].ContainsPosition(nu.Nu().Position().Vect())) { srneutrino.cryostat = icryo; break; From f2992deab21c75e52eda1f931bfe186a77c88903 Mon Sep 17 00:00:00 2001 From: nathanielerowe <70993723+nathanielerowe@users.noreply.github.com> Date: Tue, 13 Jan 2026 09:01:58 -0600 Subject: [PATCH 4/6] Improve debug messages in FillTrue.cxx Enhanced debug output in cryostat loop. --- sbncode/CAFMaker/FillTrue.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbncode/CAFMaker/FillTrue.cxx b/sbncode/CAFMaker/FillTrue.cxx index b2a673f0f..1c2dd6074 100644 --- a/sbncode/CAFMaker/FillTrue.cxx +++ b/sbncode/CAFMaker/FillTrue.cxx @@ -601,8 +601,9 @@ namespace caf { // Set the cryostat of the position for (int icryo = 0; icryo < 2; icryo++) { - std::cout << "You have entered loop!" << std::endl; + std::cout << "You have entered loop! " << icryo << std::endl; if (active_volumes[icryo].ContainsPosition(nu.Nu().Position().Vect())) { + std::cout << "Boolean passed!" << std::endl; srneutrino.cryostat = icryo; break; } From 287fae6b8573e3f46aba8556208a93145b1611e2 Mon Sep 17 00:00:00 2001 From: nathanielerowe <70993723+nathanielerowe@users.noreply.github.com> Date: Tue, 13 Jan 2026 11:59:00 -0600 Subject: [PATCH 5/6] Log active volume dimensions on start Added logging for active volume parameters. --- sbncode/CAFMaker/CAFMaker_module.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sbncode/CAFMaker/CAFMaker_module.cc b/sbncode/CAFMaker/CAFMaker_module.cc index 9f2c01590..3b0ea775c 100644 --- a/sbncode/CAFMaker/CAFMaker_module.cc +++ b/sbncode/CAFMaker/CAFMaker_module.cc @@ -664,6 +664,11 @@ void CAFMaker::InitVolumes() { double YMax = std::max_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MaxY() < rhs.MaxY(); })->MaxY(); double ZMax = std::max_element(tpcs.begin(), tpcs.end(), [](auto &lhs, auto &rhs) { return lhs.MaxZ() < rhs.MaxZ(); })->MaxZ(); + std::cout << "Starting new active volume!" << std::endl; + std::cout << "XMin: " << XMin << " XMax: " << XMax << std::endl; + std::cout << "YMin: " << YMin << " YMax: " << YMax << std::endl; + std::cout << "ZMin: " << ZMin << " ZMax: " << ZMax << std::endl; + fActiveVolumes.emplace_back(XMin, XMax, YMin, YMax, ZMin, ZMax); } } From d42bc61b31a159e1f0416081c7c3370a3c921a3f Mon Sep 17 00:00:00 2001 From: nathanielerowe <70993723+nathanielerowe@users.noreply.github.com> Date: Tue, 13 Jan 2026 15:17:37 -0600 Subject: [PATCH 6/6] Update cryostat loop to use active_volumes size --- sbncode/CAFMaker/FillTrue.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbncode/CAFMaker/FillTrue.cxx b/sbncode/CAFMaker/FillTrue.cxx index 1c2dd6074..9d44309b8 100644 --- a/sbncode/CAFMaker/FillTrue.cxx +++ b/sbncode/CAFMaker/FillTrue.cxx @@ -600,7 +600,7 @@ namespace caf { } // Set the cryostat of the position - for (int icryo = 0; icryo < 2; icryo++) { + for (int icryo = 0; icryo < (int)active_volumes.size(); icryo++) { std::cout << "You have entered loop! " << icryo << std::endl; if (active_volumes[icryo].ContainsPosition(nu.Nu().Position().Vect())) { std::cout << "Boolean passed!" << std::endl;