ROOT
master
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
10
#include "
Minuit2/MnGlobalCorrelationCoeff.h
"
11
#include "
Minuit2/MnPrint.h
"
12
#include <cmath>
13
14
namespace
ROOT
{
15
16
namespace
Minuit2 {
17
18
MnGlobalCorrelationCoeff::MnGlobalCorrelationCoeff
(
const
MnAlgebraicSymMatrix
&
cov
)
19
: fValid(
true
)
20
{
21
// constructor: calculate global correlation given a symmetric matrix
22
MnPrint
print(
"MnGlobalCorrelationCoeff"
);
23
24
MnAlgebraicSymMatrix
inv
(
cov
);
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
MnGlobalCorrelationCoeff.h
MnPrint.h
TRangeDynCast
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Definition
TCollection.h:358
ROOT::Detail::TRangeCast
Definition
TCollection.h:311
ROOT::Minuit2::LASymMatrix
Class describing a symmetric matrix of size n.
Definition
MnMatrix.h:438
ROOT::Minuit2::MnGlobalCorrelationCoeff::MnGlobalCorrelationCoeff
MnGlobalCorrelationCoeff()
Definition
MnGlobalCorrelationCoeff.h:28
ROOT::Minuit2::MnGlobalCorrelationCoeff::fValid
bool fValid
Definition
MnGlobalCorrelationCoeff.h:38
ROOT::Minuit2::MnGlobalCorrelationCoeff::fGlobalCC
std::vector< double > fGlobalCC
Definition
MnGlobalCorrelationCoeff.h:37
ROOT::Minuit2::MnPrint
Definition
MnPrint.h:69
ROOT::Minuit2::MnPrint::Warn
void Warn(const Ts &... args)
Definition
MnPrint.h:123
n
const Int_t n
Definition
legend1.C:16
ROOT::Minuit2::Invert
int Invert(LASymMatrix &)
Definition
MnMatrix.cxx:296
ROOT
Definition
EExecutionPolicy.hxx:4
inv
void inv(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition
rsaaux.cxx:949
math
minuit2
src
MnGlobalCorrelationCoeff.cxx
ROOT master - Reference Guide Generated on Fri Sep 19 2025 15:05:23 (GVA Time) using Doxygen 1.10.0