From 1ec6c7b8b6f9743c79ab3ae2ded28aa7eb02654a Mon Sep 17 00:00:00 2001
From: Jens Kroeger <kroeger@physi.uni-heidelberg.de>
Date: Mon, 9 Mar 2020 18:33:37 +0100
Subject: [PATCH] AnalysisDUT: simplified filling of histograms with
 assoc_cluster->column/row()

---
 src/modules/AnalysisDUT/AnalysisDUT.cpp | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/modules/AnalysisDUT/AnalysisDUT.cpp b/src/modules/AnalysisDUT/AnalysisDUT.cpp
index 0a0157b12..fac0b0772 100644
--- a/src/modules/AnalysisDUT/AnalysisDUT.cpp
+++ b/src/modules/AnalysisDUT/AnalysisDUT.cpp
@@ -416,12 +416,9 @@ StatusCode AnalysisDUT::run(std::shared_ptr<Clipboard> clipboard) {
             hTrackCorrelationPos->Fill(posDiff);
             hTrackCorrelationPosVsCorrelationTime->Fill(track->timestamp() - assoc_cluster->timestamp(), posDiff);
 
-            // FIXME need to understand local coord of clusters - why shifted? what's normal?
-            auto clusterLocal = m_detector->globalToLocal(assoc_cluster->global());
-            hClusterMapAssoc->Fill(m_detector->getColumn(clusterLocal), m_detector->getRow(clusterLocal));
-            hClusterSizeMapAssoc->Fill(m_detector->getColumn(clusterLocal),
-                                       m_detector->getRow(clusterLocal),
-                                       static_cast<double>(assoc_cluster->size()));
+            hClusterMapAssoc->Fill(assoc_cluster->column(), assoc_cluster->row());
+            hClusterSizeMapAssoc->Fill(
+                assoc_cluster->column(), assoc_cluster->row(), static_cast<double>(assoc_cluster->size()));
 
             // Cluster charge normalized to path length in sensor:
             double norm = 1; // FIXME fabs(cos( turn*wt )) * fabs(cos( tilt*wt ));
@@ -431,8 +428,7 @@ StatusCode AnalysisDUT::run(std::shared_ptr<Clipboard> clipboard) {
 
             // clusterChargeAssoc->Fill(normalized_charge);
             clusterChargeAssoc->Fill(cluster_charge);
-            hClusterChargeMapAssoc->Fill(
-                m_detector->getColumn(clusterLocal), m_detector->getRow(clusterLocal), cluster_charge);
+            hClusterChargeMapAssoc->Fill(assoc_cluster->column(), assoc_cluster->column(), cluster_charge);
 
             // Fill per-pixel histograms
             for(auto& pixel : assoc_cluster->pixels()) {
-- 
GitLab