From 26ab0b23a1e862b078af58c23eeb6b45283606c5 Mon Sep 17 00:00:00 2001 From: epic-capybara <139920704+epic-capybara@users.noreply.github.com> Date: Sun, 9 Jun 2024 15:01:08 -0400 Subject: [PATCH] [Backport v1.14] fixed LFHCAL adjacency matrix (#1495) # Description Backport of #1493 to `v1.14`. Co-authored-by: Peter Steinberg --- src/detectors/FHCAL/FHCAL.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/detectors/FHCAL/FHCAL.cc b/src/detectors/FHCAL/FHCAL.cc index e58e146f5d..2d796d1bdf 100644 --- a/src/detectors/FHCAL/FHCAL.cc +++ b/src/detectors/FHCAL/FHCAL.cc @@ -186,10 +186,11 @@ extern "C" { // Magic constants: // 54 - number of modules in a row/column // 2 - number of towers in a module - std::string cellIdx_1 = "(54*2-moduleIDx_1*2+towerx_1)"; - std::string cellIdx_2 = "(54*2-moduleIDx_2*2+towerx_2)"; - std::string cellIdy_1 = "(54*2-moduleIDy_1*2+towery_1)"; - std::string cellIdy_2 = "(54*2-moduleIDy_2*2+towery_2)"; + // sign for towerx and towery are *negative* to maintain linearity with global X and Y + std::string cellIdx_1 = "(54*2-moduleIDx_1*2-towerx_1)"; + std::string cellIdx_2 = "(54*2-moduleIDx_2*2-towerx_2)"; + std::string cellIdy_1 = "(54*2-moduleIDy_1*2-towery_1)"; + std::string cellIdy_2 = "(54*2-moduleIDy_2*2-towery_2)"; std::string cellIdz_1 = "rlayerz_1"; std::string cellIdz_2 = "rlayerz_2"; std::string deltaX = Form("abs(%s-%s)", cellIdx_2.data(), cellIdx_1.data());