From cb95c71590a4d3745f1ea5b2122598c6bd12d10d Mon Sep 17 00:00:00 2001 From: Alex Austregesilo Date: Tue, 31 Jul 2018 09:28:32 -0400 Subject: [PATCH] removed last traces of covariance matrix arithmetics, now backwards-compatible with root 5 --- wave.cc | 19 ------------------- wave.h | 4 ---- 2 files changed, 23 deletions(-) diff --git a/wave.cc b/wave.cc index 7dc6eb4..27353ad 100644 --- a/wave.cc +++ b/wave.cc @@ -43,21 +43,6 @@ wave::getHistPhase(const wave& other) } -// The covariance matrix doesn't contain columns corresponding to the -// fixed parameters, and there seems to be no way foreseen to obtain -// the correct indices into the covariance matrix. Therefore this -// contortion ... which carries the assumption also made above that we -// never fix real parts. -// size_t -// wave::idxInCovariance(const ROOT::Math::Minimizer* minuit) const -// { -// size_t countFixedBelow = 0; -// for (size_t i = 0; i < idx; i++) -// countFixedBelow += minuit->IsFixedVariable(i); -// return idx - countFixedBelow; -// } - - void wave::fillHistIntensity(int iBin, const ROOT::Math::Minimizer* minuit) { @@ -69,7 +54,6 @@ wave::fillHistIntensity(int iBin, const ROOT::Math::Minimizer* minuit) error = 2*abs(a)*minuit->Errors()[idx]; else { - //size_t idxCov = idxInCovariance(minuit); double cov = minuit->CovMatrix(idx, idx + 1); error = 2*(sqrt(pow(real(a) * minuit->Errors()[idx], 2) @@ -209,9 +193,6 @@ wave::fillHistPhase(int iBin, const wave& other, const ROOT::Math::Minimizer* mi { TMatrixDSym cov(4); size_t idxOther = other.getIndex(); - // size_t idxCov, idxCovOther; - // idxCov = idxInCovariance(minuit); - // idxCovOther = other.idxInCovariance(minuit); cov(0,0) = minuit->CovMatrix(idx, idx); cov(1,1) = minuit->CovMatrix(idx + 1, idx + 1); cov(2,2) = minuit->CovMatrix(idxOther, idxOther); diff --git a/wave.h b/wave.h index 49cfc05..4ef8e59 100644 --- a/wave.h +++ b/wave.h @@ -32,10 +32,6 @@ struct wave { void setIndex(int idx_) { idx = idx_; } size_t getIndex() const { return idx; } - // Thanks to the brilliance of Minuit2, the covariance matrix doesn't - // contain the fixed parameters, making the mapping of fit parameters - // to covariance matrix elements awkward. This should help. - size_t idxInCovariance(const ROOT::Math::Minimizer* minuit) const; const string& getName() const { return name; } size_t getL() const { return l; }