ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
FourMom
FourMom
ErrorMatrixBase.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ErrorMatrixBase_H
6
#define ErrorMatrixBase_H
7
8
#include "CLHEP/Matrix/SymMatrix.h"
9
10
template
<
class
Type>
11
class
ErrorMatrixBase
{
12
public
:
13
14
ErrorMatrixBase
() :
m_matrix
() {}
15
ErrorMatrixBase
(
int
dim) :
m_matrix
(dim) {}
16
ErrorMatrixBase
(
const
CLHEP::HepSymMatrix& mat) :
m_matrix
(mat) {}
17
18
inline
int
num_row
()
const
{
return
m_matrix
.num_row();}
19
inline
int
num_col
()
const
{
return
m_matrix
.num_col();}
20
22
const
double
&
operator()
(
int
row,
int
col)
const
;
23
double
&
operator()
(
int
row,
int
col);
24
26
const
double
&
operator()
(
int
diagElement)
const
;
27
double
&
operator()
(
int
diagElement);
28
29
const
CLHEP::HepSymMatrix&
hsm
()
const
{
return
m_matrix
;}
30
31
class
ErrorMatrixBase_row
{
32
public
:
33
inline
ErrorMatrixBase_row
(
ErrorMatrixBase
&,
int
);
34
inline
double
&
operator[]
(
int
);
35
private
:
36
ErrorMatrixBase
&
m_a
;
37
int
m_r
;
38
};
39
class
ErrorMatrixBase_row_const
{
40
public
:
41
inline
ErrorMatrixBase_row_const
(
const
ErrorMatrixBase
&,
int
);
42
inline
const
double
&
operator[]
(
int
)
const
;
43
private
:
44
const
ErrorMatrixBase
&
m_a
;
45
int
m_r
;
46
};
47
// helper class to implement m[i][j]
48
49
inline
ErrorMatrixBase_row
operator[]
(
int
);
50
inline
ErrorMatrixBase_row_const
operator[]
(
int
)
const
;
51
52
private
:
53
54
CLHEP::HepSymMatrix
m_matrix
;
55
56
protected
:
57
58
const
CLHEP::HepSymMatrix&
impl
()
const
{
return
m_matrix
;}
59
CLHEP::HepSymMatrix&
impl
() {
return
m_matrix
;}
60
61
};
62
63
template
<
class
Type>
64
inline
const
double
&
ErrorMatrixBase<Type>::operator()
(
int
row,
int
col)
const
65
{
66
return
m_matrix
(row+1,col+1);
67
}
68
69
template
<
class
Type>
70
inline
const
double
&
ErrorMatrixBase<Type>::operator()
(
int
diag)
const
71
{
72
return
m_matrix
(diag+1,diag+1);
73
}
74
75
template
<
class
Type>
76
inline
double
&
ErrorMatrixBase<Type>::operator()
(
int
row,
int
col)
77
{
78
return
m_matrix
(row+1,col+1);
79
}
80
81
template
<
class
Type>
82
inline
double
&
ErrorMatrixBase<Type>::operator()
(
int
diag)
83
{
84
return
m_matrix
(diag+1,diag+1);
85
}
86
87
template
<
class
Type>
88
inline
typename
ErrorMatrixBase<Type>::ErrorMatrixBase_row
ErrorMatrixBase<Type>::operator[]
(
int
r
)
89
{
90
return
ErrorMatrixBase_row
(*
this
,
r
);
91
}
92
93
template
<
class
Type>
94
inline
typename
ErrorMatrixBase<Type>::ErrorMatrixBase_row_const
ErrorMatrixBase<Type>::operator[]
(
int
r
)
const
95
{
96
return
ErrorMatrixBase_row_const
(*
this
,
r
);
97
}
98
99
template
<
class
Type>
100
inline
double
&
ErrorMatrixBase<Type>::ErrorMatrixBase_row::operator[]
(
int
c)
101
{
102
return
m_a
.impl()(
m_r
,c);
103
}
104
105
template
<
class
Type>
106
inline
const
double
&
107
ErrorMatrixBase<Type>::ErrorMatrixBase_row_const::operator[]
(
int
c)
const
108
{
109
return
m_a
.impl()(
m_r
,c);
110
}
111
112
template
<
class
Type>
113
inline
ErrorMatrixBase<Type>::ErrorMatrixBase_row::ErrorMatrixBase_row
(
ErrorMatrixBase
&
a
,
114
int
r
)
115
:
m_a
(
a
),
m_r
(
r
)
116
{}
117
118
template
<
class
Type>
119
inline
ErrorMatrixBase<Type>::ErrorMatrixBase_row_const::ErrorMatrixBase_row_const
120
(
const
ErrorMatrixBase
&
a
,
int
r
)
121
:
m_a
(
a
),
m_r
(
r
)
122
{}
123
124
125
#endif
a
static Double_t a
Definition
LArPhysWaveHECTool.cxx:38
ErrorMatrixBase::ErrorMatrixBase_row_const
Definition
ErrorMatrixBase.h:39
ErrorMatrixBase::ErrorMatrixBase_row_const::operator[]
const double & operator[](int) const
Definition
ErrorMatrixBase.h:107
ErrorMatrixBase::ErrorMatrixBase_row_const::m_a
const ErrorMatrixBase & m_a
Definition
ErrorMatrixBase.h:44
ErrorMatrixBase::ErrorMatrixBase_row_const::m_r
int m_r
Definition
ErrorMatrixBase.h:45
ErrorMatrixBase::ErrorMatrixBase_row_const::ErrorMatrixBase_row_const
ErrorMatrixBase_row_const(const ErrorMatrixBase &, int)
Definition
ErrorMatrixBase.h:120
ErrorMatrixBase::ErrorMatrixBase_row
Definition
ErrorMatrixBase.h:31
ErrorMatrixBase::ErrorMatrixBase_row::m_r
int m_r
Definition
ErrorMatrixBase.h:37
ErrorMatrixBase::ErrorMatrixBase_row::operator[]
double & operator[](int)
Definition
ErrorMatrixBase.h:100
ErrorMatrixBase::ErrorMatrixBase_row::ErrorMatrixBase_row
ErrorMatrixBase_row(ErrorMatrixBase &, int)
Definition
ErrorMatrixBase.h:113
ErrorMatrixBase::ErrorMatrixBase_row::m_a
ErrorMatrixBase & m_a
Definition
ErrorMatrixBase.h:36
ErrorMatrixBase::operator()
const double & operator()(int diagElement) const
The single argument versions return diagonal elements.
Definition
ErrorMatrixBase.h:70
ErrorMatrixBase< ErrorMatrixEEtaPhiM >::m_matrix
CLHEP::HepSymMatrix m_matrix
Definition
ErrorMatrixBase.h:54
ErrorMatrixBase::hsm
const CLHEP::HepSymMatrix & hsm() const
Definition
ErrorMatrixBase.h:29
ErrorMatrixBase::ErrorMatrixBase
ErrorMatrixBase()
Definition
ErrorMatrixBase.h:14
ErrorMatrixBase::ErrorMatrixBase
ErrorMatrixBase(const CLHEP::HepSymMatrix &mat)
Definition
ErrorMatrixBase.h:16
ErrorMatrixBase::ErrorMatrixBase
ErrorMatrixBase(int dim)
Definition
ErrorMatrixBase.h:15
ErrorMatrixBase::num_col
int num_col() const
Definition
ErrorMatrixBase.h:19
ErrorMatrixBase::num_row
int num_row() const
Definition
ErrorMatrixBase.h:18
ErrorMatrixBase::impl
const CLHEP::HepSymMatrix & impl() const
Definition
ErrorMatrixBase.h:58
ErrorMatrixBase::operator[]
ErrorMatrixBase_row operator[](int)
Definition
ErrorMatrixBase.h:88
ErrorMatrixBase::operator()
const double & operator()(int row, int col) const
The element access operator M(i,j) starts counting indeces from zero.
Definition
ErrorMatrixBase.h:64
ErrorMatrixBase::operator()
double & operator()(int row, int col)
Definition
ErrorMatrixBase.h:76
ErrorMatrixBase::impl
CLHEP::HepSymMatrix & impl()
Definition
ErrorMatrixBase.h:59
ErrorMatrixBase::operator()
double & operator()(int diagElement)
Definition
ErrorMatrixBase.h:82
r
int r
Definition
globals.cxx:22
Generated on
for ATLAS Offline Software by
1.17.0