From 357839873b8906a3b370a4cb2bc8dcfc8c60051e Mon Sep 17 00:00:00 2001
From: "lenain@lpccaen.in2p3.fr" <lenain@lpccaen.in2p3.fr>
Date: Mon, 16 Sep 2019 18:58:41 +0200
Subject: [PATCH] Fixing errors in TMinosPhysics

---
 NPLib/Detectors/Minos/TMinosPhysics.cxx | 78 ++++++++++++-------------
 1 file changed, 39 insertions(+), 39 deletions(-)

diff --git a/NPLib/Detectors/Minos/TMinosPhysics.cxx b/NPLib/Detectors/Minos/TMinosPhysics.cxx
index 28928f545..6ea1a9931 100644
--- a/NPLib/Detectors/Minos/TMinosPhysics.cxx
+++ b/NPLib/Detectors/Minos/TMinosPhysics.cxx
@@ -72,7 +72,7 @@ void TMinosPhysics::AddDetector(double R, double Theta, double Phi, string shape
   
 ///////////////////////////////////////////////////////////////////////////
 void TMinosPhysics::BuildSimplePhysicalEvent() {
-  BuildPhysicalEvent();
+  /* BuildPhysicalEvent(); */
 }
 
 
@@ -80,50 +80,50 @@ void TMinosPhysics::BuildSimplePhysicalEvent() {
 ///////////////////////////////////////////////////////////////////////////
 void TMinosPhysics::BuildPhysicalEvent() {
   // apply thresholds and calibration
-  PreTreat();
+  /* PreTreat(); */
 
   // match energy and time together
-  unsigned int mysizeE = m_PreTreatedData->GetMultEnergy();
-  unsigned int mysizeT = m_PreTreatedData->GetMultTime();
-  for (UShort_t e = 0; e < mysizeE ; e++) {
-    for (UShort_t t = 0; t < mysizeT ; t++) {
-      if (m_PreTreatedData->GetE_DetectorNbr(e) == m_PreTreatedData->GetT_DetectorNbr(t)) {
-        DetectorNumber.push_back(m_PreTreatedData->GetE_DetectorNbr(e));
-        Energy.push_back(m_PreTreatedData->Get_Energy(e));
-        Time.push_back(m_PreTreatedData->Get_Time(t));
-      }
-    }
-  }
+  /* unsigned int mysizeE = m_PreTreatedData->GetMultEnergy(); */
+  /* unsigned int mysizeT = m_PreTreatedData->GetMultTime(); */
+  /* for (UShort_t e = 0; e < mysizeE ; e++) { */
+  /*   for (UShort_t t = 0; t < mysizeT ; t++) { */
+  /*     if (m_PreTreatedData->GetE_DetectorNbr(e) == m_PreTreatedData->GetT_DetectorNbr(t)) { */
+  /*       DetectorNumber.push_back(m_PreTreatedData->GetE_DetectorNbr(e)); */
+  /*       Energy.push_back(m_PreTreatedData->Get_Energy(e)); */
+  /*       Time.push_back(m_PreTreatedData->Get_Time(t)); */
+  /*     } */
+  /*   } */
+  /* } */
 }
 
 ///////////////////////////////////////////////////////////////////////////
 void TMinosPhysics::PreTreat() {
-  // This method typically applies thresholds and calibrations
-  // Might test for disabled channels for more complex detector
-
-  // clear pre-treated object
-  ClearPreTreatedData();
-
-  // instantiate CalibrationManager
-  static CalibrationManager* Cal = CalibrationManager::getInstance();
-
-  // Energy
-  unsigned int mysize = m_EventData->GetMultEnergy();
-  for (UShort_t i = 0; i < mysize ; ++i) {
-    if (m_EventData->Get_Energy(i) > m_E_RAW_Threshold) {
-      Double_t Energy = Cal->ApplyCalibration("Minos/ENERGY"+NPL::itoa(m_EventData->GetE_DetectorNbr(i)),m_EventData->Get_Energy(i));
-      if (Energy > m_E_Threshold) {
-        m_PreTreatedData->SetEnergy(m_EventData->GetE_DetectorNbr(i), Energy);
-      }
-    }
-  }
-
-  // Time 
-  mysize = m_EventData->GetMultTime();
-  for (UShort_t i = 0; i < mysize; ++i) {
-    Double_t Time= Cal->ApplyCalibration("Minos/TIME"+NPL::itoa(m_EventData->GetT_DetectorNbr(i)),m_EventData->Get_Time(i));
-    m_PreTreatedData->SetTime(m_EventData->GetT_DetectorNbr(i), Time);
-  }
+  /* // This method typically applies thresholds and calibrations */
+  /* // Might test for disabled channels for more complex detector */
+
+  /* // clear pre-treated object */
+  /* ClearPreTreatedData(); */
+
+  /* // instantiate CalibrationManager */
+  /* static CalibrationManager* Cal = CalibrationManager::getInstance(); */
+
+  /* // Energy */
+  /* unsigned int mysize = m_EventData->GetMultEnergy(); */
+  /* for (UShort_t i = 0; i < mysize ; ++i) { */
+  /*   if (m_EventData->Get_Energy(i) > m_E_RAW_Threshold) { */
+  /*     Double_t Energy = Cal->ApplyCalibration("Minos/ENERGY"+NPL::itoa(m_EventData->GetE_DetectorNbr(i)),m_EventData->Get_Energy(i)); */
+  /*     if (Energy > m_E_Threshold) { */
+  /*       m_PreTreatedData->SetEnergy(m_EventData->GetE_DetectorNbr(i), Energy); */
+  /*     } */
+  /*   } */
+  /* } */
+
+  /* // Time */ 
+  /* mysize = m_EventData->GetMultTime(); */
+  /* for (UShort_t i = 0; i < mysize; ++i) { */
+  /*   Double_t Time= Cal->ApplyCalibration("Minos/TIME"+NPL::itoa(m_EventData->GetT_DetectorNbr(i)),m_EventData->Get_Time(i)); */
+  /*   m_PreTreatedData->SetTime(m_EventData->GetT_DetectorNbr(i), Time); */
+  /* } */
 }
 
 
-- 
GitLab