diff --git a/covariance/covarianceBase.cpp b/covariance/covarianceBase.cpp index d0b7adb12..633f5d9a2 100644 --- a/covariance/covarianceBase.cpp +++ b/covariance/covarianceBase.cpp @@ -61,7 +61,7 @@ covarianceBase::~covarianceBase(){ delete[] throwMatrixCholDecomp; const int nThreads = MaCh3Utils::GetNThreads(); - for (int iThread = 0;iThread < nThreads; iThread++) delete random_number[iThread]; + for (int iThread = 0;iThread < nThreads; iThread++) delete random_number[iThread]; delete[] random_number; if (throwMatrix != nullptr) delete throwMatrix; } @@ -133,12 +133,10 @@ void covarianceBase::init(std::string name, std::string file) { for (int iThread = 0; iThread < nThreads; iThread++) { random_number[iThread] = new TRandom3(0); } - // Not using adaptive by default use_adaptive = false; // Set the covariance matrix - size = CovMat->GetNrows(); - _fNumPar = size; + _fNumPar = CovMat->GetNrows(); InvertCovMatrix = new double*[_fNumPar](); throwMatrixCholDecomp = new double*[_fNumPar](); @@ -196,13 +194,10 @@ void covarianceBase::init(const std::vector& YAMLFile) { for (int iThread = 0; iThread < nThreads; iThread++) { random_number[iThread] = new TRandom3(0); } - PrintLength = 35; // Set the covariance matrix _fNumPar = _fYAMLDoc["Systematics"].size(); - size = _fNumPar; - use_adaptive = false; InvertCovMatrix = new double*[_fNumPar](); @@ -321,8 +316,7 @@ void covarianceBase::init(const std::vector& YAMLFile) { // ******************************************** void covarianceBase::init(TMatrixDSym* covMat) { // ******************************************** - size = covMat->GetNrows(); - _fNumPar = size; + _fNumPar = covMat->GetNrows(); InvertCovMatrix = new double*[_fNumPar](); throwMatrixCholDecomp = new double*[_fNumPar](); // Set the defaults to true diff --git a/covariance/covarianceBase.h b/covariance/covarianceBase.h index 73ec35236..09634ea84 100644 --- a/covariance/covarianceBase.h +++ b/covariance/covarianceBase.h @@ -285,8 +285,6 @@ class covarianceBase { //KS: Transfer to normal base TransferToParam(); } - /// @brief Get number of params in normal Base, if you want something which will work with PCA as well please use getNpars() - inline int getSize() { return _fNumPar; } /// @brief Get number of params which will be different depending if using Eigen decomposition or not inline int getNpars() { if (pca) return _fNumParPCA; @@ -343,7 +341,7 @@ class covarianceBase { /// @brief Getter to return a copy of the YAML node YAML::Node GetConfig() const { return _fYAMLDoc; } -protected: + protected: /// @brief Initialisation of the class using matrix from root file void init(std::string name, std::string file); /// @brief Initialisation of the class using config @@ -387,8 +385,6 @@ class covarianceBase { /// The input root file we read in const std::string inputFile; - /// Total number of params, deprecated, please don't use it - int size; /// Name of cov matrix std::string matrixName; /// The covariance matrix