From af79103bfb57ddedc5284dcaf0ceb37885571df6 Mon Sep 17 00:00:00 2001 From: adrien-matta <a.matta@surrey.ac.uk> Date: Mon, 14 Dec 2015 16:20:19 +0000 Subject: [PATCH] * Fixing ReadAnalysis in TMust2Physics --- NPLib/MUST2/TMust2Physics.cxx | 21 ++++++++++----------- Projects/MUGAST/Analysis.h | 2 +- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/NPLib/MUST2/TMust2Physics.cxx b/NPLib/MUST2/TMust2Physics.cxx index 3ae6cc576..d30e04984 100644 --- a/NPLib/MUST2/TMust2Physics.cxx +++ b/NPLib/MUST2/TMust2Physics.cxx @@ -662,49 +662,49 @@ void TMust2Physics::ReadAnalysisConfig(){ else if (whatToDo=="SI_X_E_RAW_THRESHOLD") { AnalysisConfigFile >> DataBuffer; - m_Si_X_E_RAW_Threshold = atoi(DataBuffer.c_str()); + m_Si_X_E_RAW_Threshold = atof(DataBuffer.c_str()); cout << whatToDo << " " << m_Si_X_E_RAW_Threshold << endl; } else if (whatToDo=="SI_Y_E_RAW_THRESHOLD") { AnalysisConfigFile >> DataBuffer; - m_Si_Y_E_RAW_Threshold = atoi(DataBuffer.c_str()); + m_Si_Y_E_RAW_Threshold = atof(DataBuffer.c_str()); cout << whatToDo << " " << m_Si_Y_E_RAW_Threshold << endl; } else if (whatToDo=="SILI_E_RAW_THRESHOLD") { AnalysisConfigFile >> DataBuffer; - m_SiLi_E_RAW_Threshold = atoi(DataBuffer.c_str()); + m_SiLi_E_RAW_Threshold = atof(DataBuffer.c_str()); cout << whatToDo << " " << m_SiLi_E_RAW_Threshold << endl; } else if (whatToDo== "CSI_E_RAW_THRESHOLD") { AnalysisConfigFile >> DataBuffer; - m_CsI_E_Threshold = atoi(DataBuffer.c_str()); + m_CsI_E_RAW_Threshold = atof(DataBuffer.c_str()); cout << whatToDo << " " << m_CsI_E_Threshold << endl; } else if (whatToDo=="SI_X_E_THRESHOLD") { AnalysisConfigFile >> DataBuffer; - m_Si_X_E_Threshold = atoi(DataBuffer.c_str()); + m_Si_X_E_Threshold = atof(DataBuffer.c_str()); cout << whatToDo << " " << m_Si_X_E_Threshold << endl; } else if (whatToDo== "SI_Y_E_THRESHOLD") { AnalysisConfigFile >> DataBuffer; - m_Si_Y_E_Threshold = atoi(DataBuffer.c_str()); + m_Si_Y_E_Threshold = atof(DataBuffer.c_str()); cout << whatToDo << " " << m_Si_Y_E_Threshold << endl; } else if (whatToDo=="SILI_E_THRESHOLD") { AnalysisConfigFile >> DataBuffer; - m_SiLi_E_Threshold = atoi(DataBuffer.c_str()); + m_SiLi_E_Threshold = atof(DataBuffer.c_str()); cout << whatToDo << " " << m_SiLi_E_Threshold << endl; } else if (whatToDo=="CSI_E_THRESHOLD") { AnalysisConfigFile >> DataBuffer; - m_CsI_E_Threshold = atoi(DataBuffer.c_str()); + m_CsI_E_Threshold = atof(DataBuffer.c_str()); cout << whatToDo << " " << m_CsI_E_Threshold << endl; } @@ -737,11 +737,10 @@ bool TMust2Physics :: Match_Si_CsI(int X, int Y , int CristalNbr){ if( abs(m_CsI_MatchingX[CristalNbr-1] - X) < m_CsI_Size/2.&& abs(m_CsI_MatchingY[CristalNbr-1] - Y) < m_CsI_Size/2.) - return true ; - else return false; - + else + return false; } /////////////////////////////////////////////////////////////////////////// diff --git a/Projects/MUGAST/Analysis.h b/Projects/MUGAST/Analysis.h index 67905f72c..2aa356315 100644 --- a/Projects/MUGAST/Analysis.h +++ b/Projects/MUGAST/Analysis.h @@ -54,7 +54,7 @@ class Analysis: public NPL::VAnalysis{ double ThetaLab; double ThetaCM; NPL::Reaction* myReaction; -TInitialConditions* myInit ; + TInitialConditions* myInit ; // Energy loss table: the G4Table are generated by the simulation EnergyLoss LightCD2; EnergyLoss LightAl; -- GitLab