diff --git a/NPLib/Detectors/PISTA/TICPhysics.cxx b/NPLib/Detectors/PISTA/TICPhysics.cxx index 360d4e96ff85d39d61c743043c489d11dcea08cd..ec3931bdce0b34621eebe12fa82a94127319eb11 100644 --- a/NPLib/Detectors/PISTA/TICPhysics.cxx +++ b/NPLib/Detectors/PISTA/TICPhysics.cxx @@ -100,12 +100,11 @@ void TICPhysics::BuildPhysicalEvent() { if (fIC_Init[1]>0 && fIC_Init[5]>0) { EtotInit = 0 ; - int DataYear = Cal->GetValue("IC/DATA_YEAR",0); double ScalorInit = Cal->GetValue("IC/INIT_ETOT_SCALING",0); for (int Seg = 0; Seg<10; Seg++){ - if (Seg == 0 && DataYear == 2024 ){ + if (Seg == 0 && m_Data_Year == 2024 ){ EtotInit += 0.75 * Cal->GetValue("IC/INIT_SEG"+NPL::itoa(Seg)+"_ALIGN",0); } @@ -224,6 +223,13 @@ void TICPhysics::ReadAnalysisConfig() { m_E_Threshold = atof(DataBuffer.c_str()); cout << whatToDo << " " << m_E_Threshold << endl; } + + else if (whatToDo=="DATA_YEAR") { + AnalysisConfigFile >> DataBuffer; + m_Data_Year = atof(DataBuffer.c_str()); + cout << whatToDo << " " << m_Data_Year << endl; + } + else if (whatToDo=="LOAD_Z_SPLINE"){ AnalysisConfigFile >> DataBuffer; m_Z_SPLINE_PATH = DataBuffer; @@ -310,7 +316,6 @@ void TICPhysics::AddParameterToCalibrationManager() { //Calibration from online analysis Cal->AddParameter("IC","INIT_ETOT_SCALING","IC_INIT_ETOT_SCALING"); - Cal->AddParameter("IC","DATA_YEAR","IC_DATA_YEAR"); for (int segment=0; segment<11;segment++){ Cal->AddParameter("IC","INIT_SEG"+NPL::itoa(segment+1)+"_ALIGN","IC_INIT_SEG"+NPL::itoa(segment+1)+"_ALIGN"); } diff --git a/NPLib/Detectors/PISTA/TICPhysics.h b/NPLib/Detectors/PISTA/TICPhysics.h index ef2135b07cf00aff31c0022d3bfa70f8145d3ce5..dd3e6cf52bf6eba7b0856f4e8a9a739b02226752 100644 --- a/NPLib/Detectors/PISTA/TICPhysics.h +++ b/NPLib/Detectors/PISTA/TICPhysics.h @@ -156,6 +156,9 @@ class TICPhysics : public TObject, public NPL::VDetector { bool m_Z_SPLINE_CORRECTION; //! TSpline3* m_Zspline; //! + //Year of acquisition + private: + double m_Data_Year; //! // Static constructor to be passed to the Detector Factory public: static NPL::VDetector* Construct();