Main Page
Namespaces
Classes
Package Documentation
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
{
15
16
public
:
18
class
NullMatrix
{};
19
20
GlobalErrorBaseExtended
() {}
21
GlobalErrorBaseExtended
(
const
NullMatrix &) {}
22
23
28
GlobalErrorBaseExtended
(
T
c11,
T
c21,
T
c31,
T
c41,
T
c51,
T
c61,
29
T
c22,
T
c32,
T
c42,
T
c52,
T
c62,
30
T
c33,
T
c43,
T
c53,
T
c63,
31
T
c44,
T
c54,
T
c64,
32
T
c55,
T
c65,
33
T
c66
34
) {
35
theCartesianError
(0,0)=c11;
36
theCartesianError
(1,0)=c21;
37
theCartesianError
(2,0)=c31;
38
theCartesianError
(3,0)=c41;
39
theCartesianError
(4,0)=c51;
40
theCartesianError
(5,0)=c61;
41
42
theCartesianError
(1,1)=c22;
43
theCartesianError
(2,1)=c32;
44
theCartesianError
(3,1)=c42;
45
theCartesianError
(4,1)=c52;
46
theCartesianError
(5,1)=c62;
47
48
theCartesianError
(2,2)=c33;
49
theCartesianError
(3,2)=c43;
50
theCartesianError
(4,2)=c53;
51
theCartesianError
(5,2)=c63;
52
53
theCartesianError
(3,3)=c44;
54
theCartesianError
(4,3)=c54;
55
theCartesianError
(5,3)=c64;
56
57
theCartesianError
(4,4)=c55;
58
theCartesianError
(5,4)=c65;
59
60
theCartesianError
(5,5)=c66;
61
}
62
63
GlobalErrorBaseExtended
(
const
AlgebraicSymMatrix66
& err) :
64
theCartesianError
(err) { }
65
66
GlobalErrorBaseExtended
(
const
AlgebraicSymMatrix33
& err) {
67
theCartesianError
(0,0)=err[0][0];
68
theCartesianError
(1,0)=err[1][0];
69
theCartesianError
(2,0)=err[2][0];
70
theCartesianError
(3,0)=0;
71
theCartesianError
(4,0)=0;
72
theCartesianError
(5,0)=0;
73
74
theCartesianError
(1,1)=err[1][1];
75
theCartesianError
(2,1)=err[2][1];
76
theCartesianError
(3,1)=0;
77
theCartesianError
(4,1)=0;
78
theCartesianError
(5,1)=0;
79
80
theCartesianError
(2,2)=err[2][2];
81
theCartesianError
(3,2)=0;
82
theCartesianError
(4,2)=0;
83
theCartesianError
(5,2)=0;
84
85
theCartesianError
(3,3)=0;
86
theCartesianError
(4,3)=0;
87
theCartesianError
(5,3)=0;
88
89
theCartesianError
(4,4)=0;
90
theCartesianError
(5,4)=0;
91
92
theCartesianError
(5,5)=0;
93
}
94
95
~GlobalErrorBaseExtended
() {}
96
97
T
cxx
()
const
{
98
return
theCartesianError
(0,0);
99
}
100
101
T
cyx
()
const
{
102
return
theCartesianError
(1,0);
103
}
104
105
T
czx
()
const
{
106
return
theCartesianError
(2,0);
107
}
108
109
T
cphixx
()
const
{
110
return
theCartesianError
(3,0);
111
}
112
113
T
cphiyx
()
const
{
114
return
theCartesianError
(4,0);
115
}
116
117
T
cphizx
()
const
{
118
return
theCartesianError
(5,0);
119
}
120
121
T
cyy
()
const
{
122
return
theCartesianError
(1,1);
123
}
124
125
T
czy
()
const
{
126
return
theCartesianError
(2,1);
127
}
128
129
T
cphixy
()
const
{
130
return
theCartesianError
(3,1);
131
}
132
133
T
cphiyy
()
const
{
134
return
theCartesianError
(4,1);
135
}
136
137
T
cphizy
()
const
{
138
return
theCartesianError
(5,1);
139
}
140
141
T
czz
()
const
{
142
return
theCartesianError
(2,2);
143
}
144
145
T
cphixz
()
const
{
146
return
theCartesianError
(3,2);
147
}
148
149
T
cphiyz
()
const
{
150
return
theCartesianError
(4,2);
151
}
152
153
T
cphizz
()
const
{
154
return
theCartesianError
(5,2);
155
}
156
157
T
cphixphix
()
const
{
158
return
theCartesianError
(3,3);
159
}
160
161
T
cphiyphix
()
const
{
162
return
theCartesianError
(4,3);
163
}
164
165
T
cphizphix
()
const
{
166
return
theCartesianError
(5,3);
167
}
168
169
T
cphiyphiy
()
const
{
170
return
theCartesianError
(4,4);
171
}
172
173
T
cphizphiy
()
const
{
174
return
theCartesianError
(5,4);
175
}
176
177
T
cphizphiz
()
const
{
178
return
theCartesianError
(5,5);
179
}
180
185
const
AlgebraicSymMatrix66
&
matrix
()
const
{
186
return
theCartesianError
;
187
}
188
const
AlgebraicSymMatrix66
&
matrix_new
()
const
{
189
return
theCartesianError
;
190
}
191
192
//FIXME to be reimplemented
193
T
rerr
(
const
GlobalPoint
& aPoint)
const
{
194
T
r2
= aPoint.
perp2
();
195
T
x2
= aPoint.
x
()*aPoint.
x
();
196
T
y2 = aPoint.
y
()*aPoint.
y
();
197
T
xy
= aPoint.
x
()*aPoint.
y
();
198
if
(r2 != 0)
199
return
std::max<T>(0, (1./
r2
)*(x2*
cxx
() + 2.*xy*
cyx
() + y2*
cyy
()));
200
else
201
return
0.5*(
cxx
() +
cyy
());
202
}
203
204
//FIXME to be reimplemented
205
T
phierr
(
const
GlobalPoint
& aPoint)
const
{
206
T
r2
= aPoint.
perp2
();
207
T
x2
= aPoint.
x
()*aPoint.
x
();
208
T
y2 = aPoint.
y
()*aPoint.
y
();
209
T
xy
= aPoint.
x
()*aPoint.
y
();
210
if
(r2 != 0)
211
return
std::max<T>(0, (1./(r2*
r2
))*(y2*
cxx
() - 2.*xy*
cyx
() + x2*
cyy
()));
212
else
213
return
0;
214
}
215
216
GlobalErrorBaseExtended
operator+
(
const
GlobalErrorBaseExtended
& err)
const
{
217
return
GlobalErrorBaseExtended
(
theCartesianError
+ err.
theCartesianError
);
218
}
219
GlobalErrorBaseExtended
operator-
(
const
GlobalErrorBaseExtended
& err)
const
{
220
return
GlobalErrorBaseExtended
(
theCartesianError
- err.
theCartesianError
);
221
}
222
223
private
:
224
225
AlgebraicSymMatrix66
theCartesianError
;
226
227
};
228
229
#endif
GlobalErrorBaseExtended::czx
T czx() const
Definition:
GlobalErrorBaseExtended.h:105
GlobalErrorBaseExtended::operator+
GlobalErrorBaseExtended operator+(const GlobalErrorBaseExtended &err) const
Definition:
GlobalErrorBaseExtended.h:216
GlobalErrorBaseExtended::rerr
T rerr(const GlobalPoint &aPoint) const
Definition:
GlobalErrorBaseExtended.h:193
AlgebraicROOTObjects.h
GlobalErrorBaseExtended::cphizx
T cphizx() const
Definition:
GlobalErrorBaseExtended.h:117
GlobalErrorBaseExtended::cphixz
T cphixz() const
Definition:
GlobalErrorBaseExtended.h:145
GlobalErrorBaseExtended::operator-
GlobalErrorBaseExtended operator-(const GlobalErrorBaseExtended &err) const
Definition:
GlobalErrorBaseExtended.h:219
GlobalErrorBaseExtended::cyx
T cyx() const
Definition:
GlobalErrorBaseExtended.h:101
AlgebraicSymMatrix66
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > AlgebraicSymMatrix66
Definition:
AlgebraicROOTObjects.h:24
diffTwoXMLs.r2
r2
Definition:
diffTwoXMLs.py:72
GlobalErrorBaseExtended::cphizphiz
T cphizphiz() const
Definition:
GlobalErrorBaseExtended.h:177
GlobalErrorBaseExtended::czz
T czz() const
Definition:
GlobalErrorBaseExtended.h:141
PV3DBase::y
T y() const
Definition:
PV3DBase.h:63
GlobalErrorBaseExtended::cxx
T cxx() const
Definition:
GlobalErrorBaseExtended.h:97
PV3DBase::perp2
T perp2() const
Definition:
PV3DBase.h:71
GlobalErrorBaseExtended::cphixx
T cphixx() const
Definition:
GlobalErrorBaseExtended.h:109
GlobalErrorBaseExtended::czy
T czy() const
Definition:
GlobalErrorBaseExtended.h:125
geometryCSVtoXML.xy
xy
Definition:
geometryCSVtoXML.py:18
GlobalErrorBaseExtended::cphizy
T cphizy() const
Definition:
GlobalErrorBaseExtended.h:137
GlobalErrorBaseExtended::cphiyphix
T cphiyphix() const
Definition:
GlobalErrorBaseExtended.h:161
GlobalErrorBaseExtended::theCartesianError
AlgebraicSymMatrix66 theCartesianError
Definition:
GlobalErrorBaseExtended.h:225
GlobalErrorBaseExtended::cphizphiy
T cphizphiy() const
Definition:
GlobalErrorBaseExtended.h:173
AlgebraicSymMatrix33
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
Definition:
AlgebraicROOTObjects.h:21
GlobalErrorBaseExtended::cphizz
T cphizz() const
Definition:
GlobalErrorBaseExtended.h:153
GlobalErrorBaseExtended::matrix_new
const AlgebraicSymMatrix66 & matrix_new() const
Definition:
GlobalErrorBaseExtended.h:188
GlobalErrorBaseExtended::GlobalErrorBaseExtended
GlobalErrorBaseExtended(const NullMatrix &)
Definition:
GlobalErrorBaseExtended.h:21
GlobalErrorBaseExtended::cphizphix
T cphizphix() const
Definition:
GlobalErrorBaseExtended.h:165
GlobalErrorBaseExtended::matrix
const AlgebraicSymMatrix66 & matrix() const
Definition:
GlobalErrorBaseExtended.h:185
Exception.h
globals_cff.x2
x2
Definition:
globals_cff.py:29
GlobalErrorBaseExtended::~GlobalErrorBaseExtended
~GlobalErrorBaseExtended()
Definition:
GlobalErrorBaseExtended.h:95
GlobalErrorBaseExtended::GlobalErrorBaseExtended
GlobalErrorBaseExtended(const AlgebraicSymMatrix66 &err)
Definition:
GlobalErrorBaseExtended.h:63
GlobalErrorBaseExtended::GlobalErrorBaseExtended
GlobalErrorBaseExtended()
Definition:
GlobalErrorBaseExtended.h:20
GlobalErrorBaseExtended::cphiyphiy
T cphiyphiy() const
Definition:
GlobalErrorBaseExtended.h:169
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:28
GlobalErrorBaseExtended::NullMatrix
Tag to request a null error matrix.
Definition:
GlobalErrorBaseExtended.h:18
GlobalErrorBaseExtended::cphiyy
T cphiyy() const
Definition:
GlobalErrorBaseExtended.h:133
GlobalErrorBaseExtended::GlobalErrorBaseExtended
GlobalErrorBaseExtended(const AlgebraicSymMatrix33 &err)
Definition:
GlobalErrorBaseExtended.h:66
DeepCopyPointer.h
Point3DBase< float, GlobalTag >
GlobalErrorBaseExtended::cphiyz
T cphiyz() const
Definition:
GlobalErrorBaseExtended.h:149
GlobalErrorBaseExtended::cphixy
T cphixy() const
Definition:
GlobalErrorBaseExtended.h:129
T
long double T
Definition:
Basic3DVectorLD.h:66
PV3DBase::x
T x() const
Definition:
PV3DBase.h:62
GlobalErrorBaseExtended::cphiyx
T cphiyx() const
Definition:
GlobalErrorBaseExtended.h:113
GlobalErrorBaseExtended::cphixphix
T cphixphix() const
Definition:
GlobalErrorBaseExtended.h:157
GlobalErrorBaseExtended::cyy
T cyy() const
Definition:
GlobalErrorBaseExtended.h:121
GlobalPoint.h
GlobalErrorBaseExtended
Definition:
GlobalErrorBaseExtended.h:13
GlobalErrorBaseExtended::phierr
T phierr(const GlobalPoint &aPoint) const
Definition:
GlobalErrorBaseExtended.h:205
Generated for CMSSW Reference Manual by
1.8.11