From 92e8d659f1289f2c71535bc196fbead1eee73a80 Mon Sep 17 00:00:00 2001
From: Norbert Herrmann <n.herrmann@physi.uni-heidelberg.de>
Date: Thu, 16 Jul 2020 08:06:00 +0200
Subject: [PATCH] add fatal for debugging

---
 reco/detectors/tof/CbmTofFindTracks.cxx | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/reco/detectors/tof/CbmTofFindTracks.cxx b/reco/detectors/tof/CbmTofFindTracks.cxx
index c3ebf38d93..5a53cb2d45 100644
--- a/reco/detectors/tof/CbmTofFindTracks.cxx
+++ b/reco/detectors/tof/CbmTofFindTracks.cxx
@@ -2055,6 +2055,21 @@ void CbmTofFindTracks::FillHistograms() {
                     0,
                     CbmTofAddress::GetSmType(iAddr));
                   CbmTofCell* fChannelInfoMiss = fDigiPar->GetCell(iAddrMiss);
+                  if (NULL == fChannelInfoMiss) {
+                    LOG(fatal)
+                      << Form("Geo consistency check 0x%08x, 0x%08x failed at "
+                              "St%d, z=%7.2f,%7.2f: iChTrafo %d, Miss %d , "
+                              "xloc %6.2f, dx %4.2f",
+                              iAddr,
+                              iAddrMiss,
+                              iSt,
+                              zPos,
+                              zPosMiss,
+                              iChTrafo,
+                              iChMiss,
+                              hitpos_local[0],
+                              fChannelInfo->GetSizex());
+                  }
                   zPosMiss =
                     fChannelInfoMiss->GetZ()
                     + (Double_t) fhPullZ_Smt_Off->GetBinContent(iRpcInd + 1);
-- 
GitLab