Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions sbncode/CAFMaker/CAFMaker_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
5 changes: 4 additions & 1 deletion sbncode/CAFMaker/FillTrue.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ namespace caf {
const std::vector<geo::BoxBoundedGeo> &active_volumes) {

srneutrino.index = i;
srneutrino.cryostat = -1001;

for (int c = 0; c < 2; c++) {
SRTrueInteractionPlaneInfo init;
Expand Down Expand Up @@ -599,8 +600,10 @@ 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;
srneutrino.cryostat = icryo;
break;
}
Expand Down