Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
MnGlobalCorrelationCoeff.cxx
Go to the documentation of this file.
1// @(#)root/minuit2:$Id$
2// Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
3
4/**********************************************************************
5 * *
6 * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT *
7 * *
8 **********************************************************************/
9
11#include "Minuit2/MnPrint.h"
12#include <cmath>
13
14namespace ROOT {
15
16namespace Minuit2 {
17
19 : fGlobalCC(std::vector<double>()), fValid(true)
20{
21 // constructor: calculate global correlation given a symmetric matrix
22 MnPrint print("MnGlobalCorrelationCoeff");
23
25 int ifail = Invert(inv);
26 if (ifail != 0) {
27 print.Warn("inversion of matrix fails");
28 fValid = false;
29 } else {
30
31 unsigned int n = cov.Nrow();
32 fGlobalCC.reserve(n);
33 for (unsigned int i = 0; i < n; i++) {
34 double denom = inv(i, i) * cov(i, i);
35 if (denom < 1. && denom > 0.)
36 fGlobalCC.push_back(0.);
37 else
38 fGlobalCC.push_back(std::sqrt(1. - 1. / denom));
39 }
40 }
41}
42
43} // namespace Minuit2
44
45} // namespace ROOT
Class describing a symmetric matrix of size n.
Definition LASymMatrix.h:45
unsigned int Nrow() const
void Warn(const Ts &... args)
Definition MnPrint.h:135
const Int_t n
Definition legend1.C:16
int Invert(LASymMatrix &)
Definition LaInverse.cxx:21
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
void inv(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition rsaaux.cxx:949