diff --git a/NPLib/Core/NPCalibrationManager.cxx b/NPLib/Core/NPCalibrationManager.cxx index 4666f877f84c8f1faaae015fc82b0ee1baa68ced..efd9386d3b68912ebef6aaba2c2b349356cb4f67 100644 --- a/NPLib/Core/NPCalibrationManager.cxx +++ b/NPLib/Core/NPCalibrationManager.cxx @@ -20,15 +20,15 @@ * * *****************************************************************************/ #include "NPCalibrationManager.h" +#include "NPCore.h" #include "NPOptionManager.h" -#include "TAsciiFile.h" #include "RootOutput.h" -#include "NPCore.h" +#include "TAsciiFile.h" #include "TRandom.h" // STL +#include <cmath> #include <cstdlib> #include <limits> -#include <cmath> #include <sstream> // ROOT #include <TSystem.h> @@ -36,7 +36,7 @@ ////////////////////////////////////////////////////////////////// CalibrationManager* CalibrationManager::instance = 0; -CalibrationManager* CalibrationManager::getInstance(const std::string& configFileName){ +CalibrationManager* CalibrationManager::getInstance(const std::string& configFileName) { // A new instance of CalibrationManager is created if it does not exist: if (instance == 0) { instance = new CalibrationManager(configFileName); @@ -47,7 +47,7 @@ CalibrationManager* CalibrationManager::getInstance(const std::string& configFil } ////////////////////////////////////////////////////////////////// -CalibrationManager::CalibrationManager(std::string configFileName){ +CalibrationManager::CalibrationManager(std::string configFileName) { // Read configuration file Buffer std::string lineBuffer, dataBuffer; @@ -55,35 +55,35 @@ CalibrationManager::CalibrationManager(std::string configFileName){ std::ifstream inputConfigFile; inputConfigFile.open(gSystem->ExpandPathName(configFileName.c_str())); - if(!NPOptionManager::getInstance()->IsDefault("Calibration")){ + if (!NPOptionManager::getInstance()->IsDefault("Calibration")) { std::cout << std::endl; std::cout << "/////////// Calibration Information ///////////" << std::endl; std::cout << "Getting list of calibration files" << std::endl; } - + if (!inputConfigFile) { - if(!NPOptionManager::getInstance()->IsDefault("Calibration")) - std::cout << "Calibration Path file: " << configFileName << " not found" << std::endl; + if (!NPOptionManager::getInstance()->IsDefault("Calibration")) + std::cout << "Calibration Path file: " << configFileName << " not found" << std::endl; return; } - else { - std::cout << "Reading list of files from: " << configFileName << std::endl; + else { + std::cout << "Reading list of files from: " << configFileName << std::endl; while (!inputConfigFile.eof()) { getline(inputConfigFile, lineBuffer); // search for token giving the list of Root files to treat - if ( lineBuffer.compare(0, 19, "CalibrationFilePath") == 0 ) { + if (lineBuffer.compare(0, 19, "CalibrationFilePath") == 0) { while (!inputConfigFile.eof()) { inputConfigFile >> dataBuffer; - // ignore comment Line + // ignore comment Line if (dataBuffer.compare(0, 1, "%") == 0) { inputConfigFile.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); } else if (!inputConfigFile.eof()) { - dataBuffer = gSystem->ExpandPathName(dataBuffer.c_str()); + dataBuffer = gSystem->ExpandPathName(dataBuffer.c_str()); AddFile(dataBuffer); std::cout << "Adding file " << dataBuffer << " to Calibration" << std::endl; } @@ -95,325 +95,320 @@ CalibrationManager::CalibrationManager(std::string configFileName){ } ////////////////////////////////////////////////////////////////// -CalibrationManager::~CalibrationManager() -{} +CalibrationManager::~CalibrationManager() {} ////////////////////////////////////////////////////////////////// -bool CalibrationManager::AddParameter(std::string DetectorName , std::string ParameterName , std::string Token, std::vector<double> def ){ - std::string ParameterPath = DetectorName + "/" + ParameterName ; - fToken[Token] = ParameterPath ; +bool CalibrationManager::AddParameter(std::string DetectorName, std::string ParameterName, std::string Token, + std::vector<double> def) { + std::string ParameterPath = DetectorName + "/" + ParameterName; + fToken[Token] = ParameterPath; + // std::cout << ParameterPath << std::endl; // Case where a default value is given - if(def.size()!=0) + if (def.size() != 0) fCalibrationCoeff[ParameterPath] = def; return true; } ////////////////////////////////////////////////////////////////// -bool CalibrationManager::AddParameter(std::string Token, std::vector<double> def ){ +bool CalibrationManager::AddParameter(std::string Token, std::vector<double> def) { fToken[Token] = Token; // Case where a default value is given - if(def.size()!=0) + if (def.size() != 0) fCalibrationCoeff[Token] = def; return true; } - ///////////////////////////////////////////////////////////////// -void CalibrationManager::ClearCalibration(){ - fCalibrationCoeff.clear(); -} +void CalibrationManager::ClearCalibration() { fCalibrationCoeff.clear(); } ///////////////////////////////////////////////////////////////// std::vector<double> CalibrationManager::GetCorrection(const std::string& ParameterPath) const { - std::vector<double> Coeff ; - std::map< std::string , std::vector<double> >::const_iterator it ; - it = fCalibrationCoeff.find(ParameterPath) ; + std::vector<double> Coeff; + std::map<std::string, std::vector<double>>::const_iterator it; + it = fCalibrationCoeff.find(ParameterPath); - if(it == fCalibrationCoeff.end() ) - { - /* std::cout << "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX " << std::endl ; - std::cout << " ERROR: PARAMETER " << ParameterPath << " IS NOT FOUND IN THE CALIBRATION DATA BASE " << std::endl ; - std::cout << "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX " << std::endl ;*/ + if (it == fCalibrationCoeff.end()) { + /* std::cout << "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX " << std::endl + ; std::cout << " ERROR: PARAMETER " << ParameterPath << " IS NOT FOUND IN THE CALIBRATION DATA BASE " << + std::endl ; std::cout << "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX " + << std::endl ;*/ - return Coeff ; + return Coeff; } - Coeff = it->second ; + Coeff = it->second; - return(Coeff); + return (Coeff); } - ////////////////////////////////////////////////////////////////// -void CalibrationManager::LoadParameterFromFile(){ - std::ifstream CalibFile; - std::string DataBuffer; - std::string LineBuffer; +void CalibrationManager::LoadParameterFromFile() { + std::ifstream CalibFile; + std::string DataBuffer; + std::string LineBuffer; // Get pointer to the TAsciifile CalibrationFile in RootOuput TAsciiFile* AcsiiCalibration = RootOutput::getInstance()->GetAsciiFileCalibration(); - unsigned int sizeF = fFileList.size(); - if(sizeF){// If calibration parameter are given, suppress all default calibration + if (sizeF) { // If calibration parameter are given, suppress all default calibration fCalibrationCoeff.clear(); } - for(unsigned int i = 0 ; i < sizeF ; i++){ - CalibFile.open( fFileList[i].c_str() ); - std::map<std::string,std::string>::iterator it ; + for (unsigned int i = 0; i < sizeF; i++) { + CalibFile.open(fFileList[i].c_str()); + std::map<std::string, std::string>::iterator it; - if(!CalibFile){ + if (!CalibFile) { std::ostringstream message; - message << "file " << fFileList[i] << " is missing " ; - NPL::SendWarning ("NPL::CalibrationManager" , message.str()); + message << "file " << fFileList[i] << " is missing "; + NPL::SendWarning("NPL::CalibrationManager", message.str()); } - + else { // Append the Calibration File to the RootOuput for Back-up std::string comment = "%%% From File " + fFileList[i] + "%%%"; AcsiiCalibration->AppendLine(comment.c_str()); AcsiiCalibration->Append(fFileList[i].c_str()); - while( !CalibFile.eof() ){ + while (!CalibFile.eof()) { // Read the file Line by line getline(CalibFile, LineBuffer); // Create a istd::stringstream to manipulate the line easely - std::istringstream theLine (LineBuffer,std::istringstream::in); - theLine >> DataBuffer ; + std::istringstream theLine(LineBuffer, std::istringstream::in); + theLine >> DataBuffer; // Comment support, comment symbole is % - if(DataBuffer.compare(0, 1, "%") == 0) { - CalibFile.ignore ( std::numeric_limits<std::streamsize>::max(), '\n' );} + if (DataBuffer.compare(0, 1, "%") == 0) { + CalibFile.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); + } // Search word in the token list - it=fToken.find(DataBuffer); + it = fToken.find(DataBuffer); // if the word is find, values are read - if( it!=fToken.end() ){ - std::vector<double> Coeff ; - while( theLine >> DataBuffer ){ - Coeff.push_back( atof(DataBuffer.c_str()) ) ; + if (it != fToken.end()) { + std::vector<double> Coeff; + while (theLine >> DataBuffer) { + Coeff.push_back(atof(DataBuffer.c_str())); } // Check this parameter is not already define - if( fCalibrationCoeff.find(it->second) != fCalibrationCoeff.end() ) + if (fCalibrationCoeff.find(it->second) != fCalibrationCoeff.end()) std::cout << "WARNING: Parameter " << it->second << " Already found. It will be overwritten. " << std::endl; // Add the list of Coeff to the Coeff std::map using Parameter Path as index - fCalibrationCoeff[ it->second ] = Coeff ; + fCalibrationCoeff[it->second] = Coeff; } } } - CalibFile.close() ; + CalibFile.close(); } } ////////////////////////////////////////////////////////////////// -double CalibrationManager::ApplyCalibration(const std::string& ParameterPath , const double& RawValue, double random) const { - std::map< std::string , std::vector<double> >::const_iterator it ; - static std::map< std::string , std::vector<double> >::const_iterator ite = fCalibrationCoeff.end(); +double CalibrationManager::ApplyCalibration(const std::string& ParameterPath, const double& RawValue, + double random) const { + std::map<std::string, std::vector<double>>::const_iterator it; + static std::map<std::string, std::vector<double>>::const_iterator ite = fCalibrationCoeff.end(); // Find the good parameter in the Map // Using Find method of stl is the fastest way - it = fCalibrationCoeff.find(ParameterPath) ; + it = fCalibrationCoeff.find(ParameterPath); // If the find methods return the end iterator it's mean the parameter was not found - if(it == ite ){ - return RawValue ; + if (it == ite) { + return RawValue; } - double val ; - if(random){ - val=RawValue + gRandom->Uniform(random); - } + double val; + if (random) { + val = RawValue + gRandom->Uniform(random); + } else - val=RawValue; + val = RawValue; // The std::vector size give the degree of calibration // We just apply the coeff it->second and returned the calibrated value - double CalibratedValue = 0 ; - unsigned int mysize = it->second.size(); - for(unsigned int i = 0 ; i < mysize ; i++){ - CalibratedValue += it->second[i]*pow(val, (double)i); + double CalibratedValue = 0; + unsigned int mysize = it->second.size(); + for (unsigned int i = 0; i < mysize; i++) { + CalibratedValue += it->second[i] * pow(val, (double)i); } - return CalibratedValue ; - + return CalibratedValue; } ////////////////////////////////////////////////////////////////// -double CalibrationManager::ApplyCalibrationDebug(const std::string& ParameterPath , const double& RawValue, double random) const{ - std::map< std::string , std::vector<double> >::const_iterator it ; - static std::map< std::string , std::vector<double> >::const_iterator ite = fCalibrationCoeff.end(); +double CalibrationManager::ApplyCalibrationDebug(const std::string& ParameterPath, const double& RawValue, + double random) const { + std::map<std::string, std::vector<double>>::const_iterator it; + static std::map<std::string, std::vector<double>>::const_iterator ite = fCalibrationCoeff.end(); // Find the good parameter in the Map // Using Find method of stl is the fastest way - it = fCalibrationCoeff.find(ParameterPath) ; + it = fCalibrationCoeff.find(ParameterPath); + + // for (auto it2 = fCalibrationCoeff.begin(); it2 != fCalibrationCoeff.end(); it2++) { + // std::cout << it2.first << std::endl; + // } // If the find methods return the end iterator it's mean the parameter was not found - if(it == ite ){ - std::cout << " PARAMETER " << ParameterPath << " IS NOT FOUND IN THE CALIBRATION DATA BASE " << std::endl ; - return RawValue ; + if (it == ite) { + std::cout << " PARAMETER " << ParameterPath << " IS NOT FOUND IN THE CALIBRATION DATA BASE " << std::endl; + return RawValue; } - double val ; - if(random){ - val=RawValue + gRandom->Uniform(random); - } + double val; + if (random) { + val = RawValue + gRandom->Uniform(random); + } else - val=RawValue; - + val = RawValue; // Else we take the second part of the element (first is index, ie: parameter path) // Second is the std::vector of Coeff - std::cout << it->first << " : raw = " << RawValue << " randomize = " << val << " coeff = " ; - std::vector<double> Coeff = it->second ; + std::cout << it->first << " : raw = " << RawValue << " randomize = " << val << " coeff = "; + std::vector<double> Coeff = it->second; // The std::vector size give the degree of calibration // We just apply the coeff and returned the calibrated value - double CalibratedValue = 0 ; - for(unsigned int i = 0 ; i < Coeff.size() ; i++){ - std::cout << Coeff[i] << " " ; - CalibratedValue += Coeff[i]*pow(RawValue, (double)i); + double CalibratedValue = 0; + for (unsigned int i = 0; i < Coeff.size(); i++) { + std::cout << Coeff[i] << " "; + CalibratedValue += Coeff[i] * pow(RawValue, (double)i); } - std::cout << "results = " << CalibratedValue << std::endl ; - return CalibratedValue ; + std::cout << "results = " << CalibratedValue << std::endl; + return CalibratedValue; } //////////////////////////////////////////////////////////////////////////////// -double CalibrationManager::ApplyResistivePositionCalibration(const std::string& ParameterPath , const double& DeltaRawValue) const{ - std::map< std::string , std::vector<double> >::const_iterator it ; - static std::map< std::string , std::vector<double> >::const_iterator ite = fCalibrationCoeff.end(); +double CalibrationManager::ApplyResistivePositionCalibration(const std::string& ParameterPath, + const double& DeltaRawValue) const { + std::map<std::string, std::vector<double>>::const_iterator it; + static std::map<std::string, std::vector<double>>::const_iterator ite = fCalibrationCoeff.end(); // Find the good parameter in the Map // Using Find method of stl is the fastest way - it = fCalibrationCoeff.find(ParameterPath) ; + it = fCalibrationCoeff.find(ParameterPath); // If the find methods return the end iterator it's mean the parameter was not found - if(it == ite ){ - return DeltaRawValue ; + if (it == ite) { + return DeltaRawValue; } // Check that the number of coeff is ok - if(it->second.size()!=2) - return DeltaRawValue ; + if (it->second.size() != 2) + return DeltaRawValue; - double CalibratedValue = (DeltaRawValue-it->second[0])/(it->second[1]); + double CalibratedValue = (DeltaRawValue - it->second[0]) / (it->second[1]); - return CalibratedValue ; + return CalibratedValue; } //////////////////////////////////////////////////////////////////////////////// -double CalibrationManager::ApplyResistivePositionCalibrationDebug(const std::string& ParameterPath , const double& DeltaRawValue) const { - std::map< std::string , std::vector<double> >::const_iterator it ; - static std::map< std::string , std::vector<double> >::const_iterator ite = fCalibrationCoeff.end(); +double CalibrationManager::ApplyResistivePositionCalibrationDebug(const std::string& ParameterPath, + const double& DeltaRawValue) const { + std::map<std::string, std::vector<double>>::const_iterator it; + static std::map<std::string, std::vector<double>>::const_iterator ite = fCalibrationCoeff.end(); // Find the good parameter in the Map // Using Find method of stl is the fastest way - it = fCalibrationCoeff.find(ParameterPath) ; - + it = fCalibrationCoeff.find(ParameterPath); + // If the find methods return the end iterator it's mean the parameter was not found - if(it == ite ){ - std::cout << " PARAMETER " << ParameterPath << " IS NOT FOUND IN THE CALIBRATION DATA BASE " << std::endl ; - return DeltaRawValue ; + if (it == ite) { + std::cout << " PARAMETER " << ParameterPath << " IS NOT FOUND IN THE CALIBRATION DATA BASE " << std::endl; + return DeltaRawValue; } - std::vector<double> Coeff = it->second ; - + std::vector<double> Coeff = it->second; + // Check that the number of coeff is ok - if(Coeff.size()!=2){ - std::cout << " NUMBER OF COEFF " << Coeff.size() << " IS DIFFERENT THAN TWO " << std::endl ; - return DeltaRawValue ; + if (Coeff.size() != 2) { + std::cout << " NUMBER OF COEFF " << Coeff.size() << " IS DIFFERENT THAN TWO " << std::endl; + return DeltaRawValue; } - double CalibratedValue = (DeltaRawValue-Coeff[0])/(Coeff[1]); - std::cout << it->first << " : raw = " << DeltaRawValue << " coeff = " ; - std::cout << Coeff[0] << " " << Coeff[1] << std::endl ; - std::cout << "results = " << CalibratedValue << std::endl ; + double CalibratedValue = (DeltaRawValue - Coeff[0]) / (Coeff[1]); + std::cout << it->first << " : raw = " << DeltaRawValue << " coeff = "; + std::cout << Coeff[0] << " " << Coeff[1] << std::endl; + std::cout << "results = " << CalibratedValue << std::endl; - return CalibratedValue ; + return CalibratedValue; } ////////////////////////////////////////////////////////////////// -bool CalibrationManager::ApplyThreshold(const std::string& ParameterPath, const double& RawValue) const{ - std::map< std::string , std::vector<double> >::const_iterator it ; - static std::map< std::string , std::vector<double> >::const_iterator ite = fCalibrationCoeff.end(); - +bool CalibrationManager::ApplyThreshold(const std::string& ParameterPath, const double& RawValue) const { + std::map<std::string, std::vector<double>>::const_iterator it; + static std::map<std::string, std::vector<double>>::const_iterator ite = fCalibrationCoeff.end(); + // Find the good parameter in the Map // Using Find method of stl is the fastest way - it = fCalibrationCoeff.find(ParameterPath) ; + it = fCalibrationCoeff.find(ParameterPath); // If the find methods return the end iterator it's mean the parameter was not found - if(it == ite ){ + if (it == ite) { return false; } // The std::vector size give the degree of calibration // We just apply the coeff and returned the calibrated value - double ThresholdValue ; + double ThresholdValue; - if(it->second.size()==2){ // CATS style - ThresholdValue = it->second[0] + 3*it->second[1]; + if (it->second.size() == 2) { // CATS style + ThresholdValue = it->second[0] + 3 * it->second[1]; } - else{ // Standard Threshold + else { // Standard Threshold ThresholdValue = it->second[0]; } - - if(RawValue > ThresholdValue) + if (RawValue > ThresholdValue) return true; - else + else return false; } ///////////////////////////////////////////////////////////////////////////////////////////// -double CalibrationManager::ApplySigmoid(const std::string& ParameterPath, const double& RawValue) const{ - std::map< std::string , std::vector<double> >::const_iterator it ; - static std::map< std::string , std::vector<double> >::const_iterator ite = fCalibrationCoeff.end(); +double CalibrationManager::ApplySigmoid(const std::string& ParameterPath, const double& RawValue) const { + std::map<std::string, std::vector<double>>::const_iterator it; + static std::map<std::string, std::vector<double>>::const_iterator ite = fCalibrationCoeff.end(); // Find the good parameter in the Map // Using Find method of stl is the fastest way - it = fCalibrationCoeff.find(ParameterPath) ; - // If the find methods return the end iterator it's mean the parameter was not found - if(it == ite ){ - return RawValue ; + it = fCalibrationCoeff.find(ParameterPath); + // If the find methods return the end iterator it's mean the parameter was not found + if (it == ite) { + return RawValue; } - std::vector<double> Coeff = it->second ; + std::vector<double> Coeff = it->second; // Check that the number of coeff is ok - if(Coeff.size()!=3){ - return RawValue ; + if (Coeff.size() != 3) { + return RawValue; } - return (Coeff[0]/(exp(Coeff[1]*(Coeff[2]-(RawValue+gRandom->Uniform(1))))+1)); - - - } -///////////////////////////////////////////////////////////////////////////////////////////// -double CalibrationManager::GetPedestal(const std::string& ParameterPath) const{ - return GetValue(ParameterPath,0); + return (Coeff[0] / (exp(Coeff[1] * (Coeff[2] - (RawValue + gRandom->Uniform(1)))) + 1)); } +///////////////////////////////////////////////////////////////////////////////////////////// +double CalibrationManager::GetPedestal(const std::string& ParameterPath) const { return GetValue(ParameterPath, 0); } ///////////////////////////////////////////////////////////////////////////////////////////// -double CalibrationManager::GetValue(const std::string& ParameterPath,const unsigned int& order) const{ - std::map< std::string , std::vector<double> >::const_iterator it ; - static std::map< std::string , std::vector<double> >::const_iterator ite = fCalibrationCoeff.end(); +double CalibrationManager::GetValue(const std::string& ParameterPath, const unsigned int& order) const { + std::map<std::string, std::vector<double>>::const_iterator it; + static std::map<std::string, std::vector<double>>::const_iterator ite = fCalibrationCoeff.end(); // Find the good parameter in the Map // Using Find method of stl is the fastest way - it = fCalibrationCoeff.find(ParameterPath) ; + it = fCalibrationCoeff.find(ParameterPath); // If the find methods return the end iterator it's mean the parameter was not found - if(it == ite ){ + if (it == ite) { return 0; } // The std::vector size give the degree of calibration - double Value = 0 ; - if(it->second.size()>order){ - Value = it->second[order]; + double Value = 0; + if (it->second.size() > order) { + Value = it->second[order]; } return Value; } - - - diff --git a/NPLib/Detectors/MUST2/TMust2Physics.cxx b/NPLib/Detectors/MUST2/TMust2Physics.cxx index 13f9bb4cfc2397972f28582010e461c952e63d59..0239c2503fdb1200ea503ff7387f43655c5d8e12 100644 --- a/NPLib/Detectors/MUST2/TMust2Physics.cxx +++ b/NPLib/Detectors/MUST2/TMust2Physics.cxx @@ -62,7 +62,8 @@ ClassImp(TMust2Physics) m_Si_X_E_RAW_Threshold = 8192; m_Si_Y_E_RAW_Threshold = 8192; m_SiLi_E_RAW_Threshold = 8192; - m_CsI_E_RAW_Threshold = 8192; + // m_CsI_E_RAW_Threshold = 8192; + m_CsI_E_RAW_Threshold = 0; // Calibrated Threshold m_Si_X_E_Threshold = 0; m_Si_Y_E_Threshold = 0; @@ -527,11 +528,11 @@ void TMust2Physics::PreTreat() { for (unsigned int i = 0; i < m_CsIEMult; ++i) { if (m_EventData->GetMMCsIEEnergy(i) > m_CsI_E_RAW_Threshold && IsValidChannel(3, m_EventData->GetMMCsIEDetectorNbr(i), m_EventData->GetMMCsIECristalNbr(i))) { - // double ECsI = fCsI_E(m_EventData, i); - double ECsI = m_EventData->GetMMCsIEEnergy(i); - if (ECsI > 8192) { - m_PreTreatedData->SetCsIE(m_EventData->GetMMCsIEDetectorNbr(i), m_EventData->GetMMCsIECristalNbr(i), ECsI); - } + double ECsI = fCsI_E(m_EventData, i); + // double ECsI = m_EventData->GetMMCsIEEnergy(i); + // if (ECsI > 8192) { + // m_PreTreatedData->SetCsIE(m_EventData->GetMMCsIEDetectorNbr(i), m_EventData->GetMMCsIECristalNbr(i), ECsI); + // } } } @@ -1229,10 +1230,10 @@ void TMust2Physics::AddParameterToCalibrationManager() { for (int i = 0; i < m_NumberOfTelescope; ++i) { if (m_CsIOffset[i] == 1) { - vector<double> standardCsI = {0, 500. / 16384.}; + standardCsI = {0, 500. / 16384.}; } else - vector<double> standardCsI = {-250, 250. / 8192.}; + standardCsI = {-250, 250. / 8192.}; for (int j = 0; j < 128; ++j) { Cal->AddParameter("MUST2", "T" + NPL::itoa(i + 1) + "_Si_X" + NPL::itoa(j + 1) + "_E", @@ -2487,6 +2488,7 @@ namespace MUST2_LOCAL { name += "_Si_X"; name += NPL::itoa(m_EventData->GetMMStripXEStripNbr(i)); name += "_E"; + std::cout << name << std::endl; return CalibrationManager::getInstance()->ApplyCalibration(name, m_EventData->GetMMStripXEEnergy(i)); } diff --git a/Projects/e870/.ninja_deps b/Projects/e870/.ninja_deps deleted file mode 100644 index e5242e333298b947ce0ae1064f6ded67f029ff39..0000000000000000000000000000000000000000 Binary files a/Projects/e870/.ninja_deps and /dev/null differ diff --git a/Projects/e870/.ninja_log b/Projects/e870/.ninja_log deleted file mode 100644 index 04af91053da4ab435b29f02682a81d56261ef5de..0000000000000000000000000000000000000000 --- a/Projects/e870/.ninja_log +++ /dev/null @@ -1,7 +0,0 @@ -# ninja log v5 -1 1656 1695300534290875975 CMakeFiles/NPAnalysis.dir/Analysis.cxx.o 347c3e2100991f25 -1658 1739 1695300534383442421 libNPAnalysis.dylib e562c682b4871f00 -16 847 1701680090608418567 CMakeFiles/NPAnalysis.dir/Analysis.cxx.o a301c5350290ac9d -847 885 1701680090649635627 libNPAnalysis.dylib d27ffcc9974cc0be -7 800 1701680808001962729 CMakeFiles/NPAnalysis.dir/Analysis.cxx.o a301c5350290ac9d -800 836 1701680808040090422 libNPAnalysis.dylib d27ffcc9974cc0be diff --git a/Projects/e870/Analysis.cxx b/Projects/e870/Analysis.cxx index caa103f814a8647de282b247668fd515f1f64e1d..eb565fa96cbefbfd066cd9fd5a641a5d6e044127 100644 --- a/Projects/e870/Analysis.cxx +++ b/Projects/e870/Analysis.cxx @@ -142,7 +142,6 @@ void Analysis::TreatEvent() { //////////////////////////////// LOOP on MUST2 //////////////////////////// //////////////////////////////////////////////////////////////////////////// for (unsigned int countMust2 = 0; countMust2 < M2->Si_E.size(); countMust2++) { - std::cout << 1 << std::endl; /************************************************/ // Part 0 : Get the usefull Data // MUST2 diff --git a/Projects/e870/libNPAnalysis.dylib b/Projects/e870/libNPAnalysis.dylib deleted file mode 100755 index 26bfd006771cecb21510ba31fe1757d51920e0de..0000000000000000000000000000000000000000 Binary files a/Projects/e870/libNPAnalysis.dylib and /dev/null differ