DataFormats
GeometryCommonDetAlgo
interface
GlobalErrorBaseExtended.h
Go to the documentation of this file.
1
#ifndef GlobalErrorExtendedType_H
2
#define GlobalErrorExtendedType_H
3
4
#include "
DataFormats/GeometryCommonDetAlgo/interface/DeepCopyPointer.h
"
5
#include "
DataFormats/Math/interface/AlgebraicROOTObjects.h
"
6
#include "
DataFormats/GeometryVector/interface/GlobalPoint.h
"
7
//
8
// Exceptions
9
//
10
#include "
FWCore/Utilities/interface/Exception.h
"
11
12
template
<
class
T,
class
ErrorWeightType>
13
class
GlobalErrorBaseExtended
{
14
public
:
16
class
NullMatrix
{};
17
18
GlobalErrorBaseExtended
() {}
19
GlobalErrorBaseExtended
(
const
NullMatrix&) {}
20
25
GlobalErrorBaseExtended
(
T
c11,
26
T
c21,
27
T
c31,
28
T
c41,
29
T
c51,
30
T
c61,
31
T
c22,
32
T
c32,
33
T
c42,
34
T
c52,
35
T
c62,
36
T
c33,
37
T
c43,
38
T
c53,
39
T
c63,
40
T
c44,
41
T
c54,
42
T
c64,
43
T
c55,
44
T
c65,
45
T
c66) {
46
theCartesianError
(0, 0) = c11;
47
theCartesianError
(1, 0) = c21;
48
theCartesianError
(2, 0) = c31;
49
theCartesianError
(3, 0) = c41;
50
theCartesianError
(4, 0) = c51;
51
theCartesianError
(5, 0) = c61;
52
53
theCartesianError
(1, 1) = c22;
54
theCartesianError
(2, 1) = c32;
55
theCartesianError
(3, 1) = c42;
56
theCartesianError
(4, 1) = c52;
57
theCartesianError
(5, 1) = c62;
58
59
theCartesianError
(2, 2) = c33;
60
theCartesianError
(3, 2) = c43;
61
theCartesianError
(4, 2) = c53;
62
theCartesianError
(5, 2) = c63;
63
64
theCartesianError
(3, 3) = c44;
65
theCartesianError
(4, 3) = c54;
66
theCartesianError
(5, 3) = c64;
67
68
theCartesianError
(4, 4) = c55;
69
theCartesianError
(5, 4) = c65;
70
71
theCartesianError
(5, 5) = c66;
72
}
73
74
GlobalErrorBaseExtended
(
const
AlgebraicSymMatrix66
&
err
) :
theCartesianError
(
err
) {}
75
76
GlobalErrorBaseExtended
(
const
AlgebraicSymMatrix33
&
err
) {
77
theCartesianError
(0, 0) =
err
[0][0];
78
theCartesianError
(1, 0) =
err
[1][0];
79
theCartesianError
(2, 0) =
err
[2][0];
80
theCartesianError
(3, 0) = 0;
81
theCartesianError
(4, 0) = 0;
82
theCartesianError
(5, 0) = 0;
83
84
theCartesianError
(1, 1) =
err
[1][1];
85
theCartesianError
(2, 1) =
err
[2][1];
86
theCartesianError
(3, 1) = 0;
87
theCartesianError
(4, 1) = 0;
88
theCartesianError
(5, 1) = 0;
89
90
theCartesianError
(2, 2) =
err
[2][2];
91
theCartesianError
(3, 2) = 0;
92
theCartesianError
(4, 2) = 0;
93
theCartesianError
(5, 2) = 0;
94
95
theCartesianError
(3, 3) = 0;
96
theCartesianError
(4, 3) = 0;
97
theCartesianError
(5, 3) = 0;
98
99
theCartesianError
(4, 4) = 0;
100
theCartesianError
(5, 4) = 0;
101
102
theCartesianError
(5, 5) = 0;
103
}
104
105
~GlobalErrorBaseExtended
() {}
106
107
T
cxx
()
const
{
return
theCartesianError
(0, 0); }
108
109
T
cyx
()
const
{
return
theCartesianError
(1, 0); }
110
111
T
czx
()
const
{
return
theCartesianError
(2, 0); }
112
113
T
cphixx
()
const
{
return
theCartesianError
(3, 0); }
114
115
T
cphiyx
()
const
{
return
theCartesianError
(4, 0); }
116
117
T
cphizx
()
const
{
return
theCartesianError
(5, 0); }
118
119
T
cyy
()
const
{
return
theCartesianError
(1, 1); }
120
121
T
czy
()
const
{
return
theCartesianError
(2, 1); }
122
123
T
cphixy
()
const
{
return
theCartesianError
(3, 1); }
124
125
T
cphiyy
()
const
{
return
theCartesianError
(4, 1); }
126
127
T
cphizy
()
const
{
return
theCartesianError
(5, 1); }
128
129
T
czz
()
const
{
return
theCartesianError
(2, 2); }
130
131
T
cphixz
()
const
{
return
theCartesianError
(3, 2); }
132
133
T
cphiyz
()
const
{
return
theCartesianError
(4, 2); }
134
135
T
cphizz
()
const
{
return
theCartesianError
(5, 2); }
136
137
T
cphixphix
()
const
{
return
theCartesianError
(3, 3); }
138
139
T
cphiyphix
()
const
{
return
theCartesianError
(4, 3); }
140
141
T
cphizphix
()
const
{
return
theCartesianError
(5, 3); }
142
143
T
cphiyphiy
()
const
{
return
theCartesianError
(4, 4); }
144
145
T
cphizphiy
()
const
{
return
theCartesianError
(5, 4); }
146
147
T
cphizphiz
()
const
{
return
theCartesianError
(5, 5); }
148
153
const
AlgebraicSymMatrix66
&
matrix
()
const
{
return
theCartesianError
; }
154
const
AlgebraicSymMatrix66
&
matrix_new
()
const
{
return
theCartesianError
; }
155
156
//FIXME to be reimplemented
157
T
rerr
(
const
GlobalPoint
& aPoint)
const
{
158
T
r2
= aPoint.
perp2
();
159
T
x2
= aPoint.
x
() * aPoint.
x
();
160
T
y2
= aPoint.
y
() * aPoint.
y
();
161
T
xy
= aPoint.
x
() * aPoint.
y
();
162
if
(
r2
!= 0)
163
return
std::max<T>(0, (1. /
r2
) * (
x2
*
cxx
() + 2. *
xy
*
cyx
() +
y2
*
cyy
()));
164
else
165
return
0.5 * (
cxx
() +
cyy
());
166
}
167
168
//FIXME to be reimplemented
169
T
phierr
(
const
GlobalPoint
& aPoint)
const
{
170
T
r2
= aPoint.
perp2
();
171
T
x2
= aPoint.
x
() * aPoint.
x
();
172
T
y2
= aPoint.
y
() * aPoint.
y
();
173
T
xy
= aPoint.
x
() * aPoint.
y
();
174
if
(
r2
!= 0)
175
return
std::max<T>(0, (1. / (
r2
*
r2
)) * (
y2
*
cxx
() - 2. *
xy
*
cyx
() +
x2
*
cyy
()));
176
else
177
return
0;
178
}
179
180
GlobalErrorBaseExtended
operator+
(
const
GlobalErrorBaseExtended
&
err
)
const
{
181
return
GlobalErrorBaseExtended
(
theCartesianError
+
err
.theCartesianError);
182
}
183
GlobalErrorBaseExtended
operator-
(
const
GlobalErrorBaseExtended
&
err
)
const
{
184
return
GlobalErrorBaseExtended
(
theCartesianError
-
err
.theCartesianError);
185
}
186
187
private
:
188
AlgebraicSymMatrix66
theCartesianError
;
189
};
190
191
#endif
GlobalErrorBaseExtended::phierr
T phierr(const GlobalPoint &aPoint) const
Definition:
GlobalErrorBaseExtended.h:169
GlobalErrorBaseExtended::cphiyphiy
T cphiyphiy() const
Definition:
GlobalErrorBaseExtended.h:143
GlobalErrorBaseExtended::operator-
GlobalErrorBaseExtended operator-(const GlobalErrorBaseExtended &err) const
Definition:
GlobalErrorBaseExtended.h:183
AlgebraicSymMatrix33
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
Definition:
AlgebraicROOTObjects.h:21
PV3DBase::x
T x() const
Definition:
PV3DBase.h:59
testProducerWithPsetDescEmpty_cfi.x2
x2
Definition:
testProducerWithPsetDescEmpty_cfi.py:28
GlobalErrorBaseExtended::cphixphix
T cphixphix() const
Definition:
GlobalErrorBaseExtended.h:137
GlobalErrorBaseExtended::cphixy
T cphixy() const
Definition:
GlobalErrorBaseExtended.h:123
GlobalErrorBaseExtended::cphixz
T cphixz() const
Definition:
GlobalErrorBaseExtended.h:131
GlobalErrorBaseExtended::czx
T czx() const
Definition:
GlobalErrorBaseExtended.h:111
GlobalErrorBaseExtended::cphizphiy
T cphizphiy() const
Definition:
GlobalErrorBaseExtended.h:145
GlobalErrorBaseExtended::cphizphix
T cphizphix() const
Definition:
GlobalErrorBaseExtended.h:141
GlobalErrorBaseExtended::operator+
GlobalErrorBaseExtended operator+(const GlobalErrorBaseExtended &err) const
Definition:
GlobalErrorBaseExtended.h:180
AlgebraicSymMatrix66
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > AlgebraicSymMatrix66
Definition:
AlgebraicROOTObjects.h:24
GlobalErrorBaseExtended::GlobalErrorBaseExtended
GlobalErrorBaseExtended(const NullMatrix &)
Definition:
GlobalErrorBaseExtended.h:19
GlobalErrorBaseExtended::cphiyy
T cphiyy() const
Definition:
GlobalErrorBaseExtended.h:125
Point3DBase< float, GlobalTag >
geometryCSVtoXML.xy
xy
Definition:
geometryCSVtoXML.py:19
GlobalErrorBaseExtended::cphiyz
T cphiyz() const
Definition:
GlobalErrorBaseExtended.h:133
GlobalErrorBaseExtended::cphizy
T cphizy() const
Definition:
GlobalErrorBaseExtended.h:127
testProducerWithPsetDescEmpty_cfi.y2
y2
Definition:
testProducerWithPsetDescEmpty_cfi.py:30
GlobalErrorBaseExtended::GlobalErrorBaseExtended
GlobalErrorBaseExtended()
Definition:
GlobalErrorBaseExtended.h:18
GlobalErrorBaseExtended::theCartesianError
AlgebraicSymMatrix66 theCartesianError
Definition:
GlobalErrorBaseExtended.h:188
GlobalErrorBaseExtended::cphizphiz
T cphizphiz() const
Definition:
GlobalErrorBaseExtended.h:147
diffTwoXMLs.r2
r2
Definition:
diffTwoXMLs.py:73
GlobalErrorBaseExtended::GlobalErrorBaseExtended
GlobalErrorBaseExtended(const AlgebraicSymMatrix33 &err)
Definition:
GlobalErrorBaseExtended.h:76
PV3DBase::y
T y() const
Definition:
PV3DBase.h:60
GlobalErrorBaseExtended::cxx
T cxx() const
Definition:
GlobalErrorBaseExtended.h:107
GlobalErrorBaseExtended::cyx
T cyx() const
Definition:
GlobalErrorBaseExtended.h:109
GlobalErrorBaseExtended::GlobalErrorBaseExtended
GlobalErrorBaseExtended(const AlgebraicSymMatrix66 &err)
Definition:
GlobalErrorBaseExtended.h:74
GlobalErrorBaseExtended::matrix_new
const AlgebraicSymMatrix66 & matrix_new() const
Definition:
GlobalErrorBaseExtended.h:154
submitPVResolutionJobs.err
err
Definition:
submitPVResolutionJobs.py:85
GlobalErrorBaseExtended::cyy
T cyy() const
Definition:
GlobalErrorBaseExtended.h:119
T
long double T
Definition:
Basic3DVectorLD.h:48
GlobalErrorBaseExtended::~GlobalErrorBaseExtended
~GlobalErrorBaseExtended()
Definition:
GlobalErrorBaseExtended.h:105
GlobalErrorBaseExtended::NullMatrix
Tag to request a null error matrix.
Definition:
GlobalErrorBaseExtended.h:16
GlobalErrorBaseExtended::cphizz
T cphizz() const
Definition:
GlobalErrorBaseExtended.h:135
GlobalErrorBaseExtended::GlobalErrorBaseExtended
GlobalErrorBaseExtended(T c11, T c21, T c31, T c41, T c51, T c61, T c22, T c32, T c42, T c52, T c62, T c33, T c43, T c53, T c63, T c44, T c54, T c64, T c55, T c65, T c66)
Definition:
GlobalErrorBaseExtended.h:25
GlobalErrorBaseExtended::cphizx
T cphizx() const
Definition:
GlobalErrorBaseExtended.h:117
Exception.h
GlobalErrorBaseExtended::rerr
T rerr(const GlobalPoint &aPoint) const
Definition:
GlobalErrorBaseExtended.h:157
DeepCopyPointer.h
GlobalErrorBaseExtended::matrix
const AlgebraicSymMatrix66 & matrix() const
Definition:
GlobalErrorBaseExtended.h:153
GlobalErrorBaseExtended::cphiyx
T cphiyx() const
Definition:
GlobalErrorBaseExtended.h:115
GlobalErrorBaseExtended
Definition:
GlobalErrorBaseExtended.h:13
GlobalErrorBaseExtended::czz
T czz() const
Definition:
GlobalErrorBaseExtended.h:129
GlobalErrorBaseExtended::cphiyphix
T cphiyphix() const
Definition:
GlobalErrorBaseExtended.h:139
GlobalErrorBaseExtended::czy
T czy() const
Definition:
GlobalErrorBaseExtended.h:121
GlobalPoint.h
AlgebraicROOTObjects.h
PV3DBase::perp2
T perp2() const
Definition:
PV3DBase.h:68
GlobalErrorBaseExtended::cphixx
T cphixx() const
Definition:
GlobalErrorBaseExtended.h:113
Generated for CMSSW Reference Manual by
1.8.16