Skip to content

Commit

Permalink
removed last traces of covariance matrix arithmetics, now backwards-c…
Browse files Browse the repository at this point in the history
…ompatible with root 5
  • Loading branch information
aaust committed Jul 31, 2018
1 parent 3f0115f commit cb95c71
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
19 changes: 0 additions & 19 deletions wave.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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)
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 0 additions & 4 deletions wave.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down

0 comments on commit cb95c71

Please sign in to comment.