Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
TrackingTools
AnalyticalJacobians
src
JacobianLocalToCartesian.cc
Go to the documentation of this file.
1
#include "
TrackingTools/AnalyticalJacobians/interface/JacobianLocalToCartesian.h
"
2
#include "
DataFormats/GeometrySurface/interface/Surface.h
"
3
#include "
DataFormats/TrajectoryState/interface/LocalTrajectoryParameters.h
"
4
5
JacobianLocalToCartesian::JacobianLocalToCartesian
(
const
Surface
& surface,
6
const
LocalTrajectoryParameters
& localParameters)
7
: theJacobian() {
8
//LocalCoordinates 1 = (x, y, z, px, py, pz)
9
//LocalCoordinates 2 = (q/|p|, dx/dz, dy/dz, x, y)
10
//Transformation: x = x
11
// y = y
12
// px = (q/(q/|p|)) * (dx/dz) * sqrt(1./(1.+(dx/dz)^2+(dy/dz)^2))
13
// py = (q/(q/|p|)) * (dy/dz) * sqrt(1./(1.+(dx/dz)^2+(dy/dz)^2))
14
// pz = (q/(q/|p|)) * sqrt(1./(1.+(dx/dz)^2+(dy/dz)^2))
15
//Jacobian J((x, y, px, py, pz) = f(q/|p|, dx/dz, dy/dz, x, y))
16
17
// AlgebraicVector5 localTrackParams = localParameters.mixedFormatVector();
18
double
qbp = localParameters.
qbp
();
19
double
dxdz
= localParameters.
dxdz
();
20
double
dydz
= localParameters.
dydz
();
21
TrackCharge
iq = localParameters.
charge
();
22
// for neutrals: qbp is 1/p instead of q/p -
23
// equivalent to charge 1
24
if
(iq == 0)
25
iq = 1;
26
double
pzSign = localParameters.
pzSign
();
27
double
q
= iq * pzSign;
28
double
sqr
=
sqrt
(
dxdz
*
dxdz
+
dydz
*
dydz
+ 1);
29
double
den = -
q
/ (
sqr
*
sqr
*
sqr
* qbp);
30
31
// no difference between local and data member
32
AlgebraicMatrix65
& lJacobian =
theJacobian
;
33
lJacobian(0, 3) = 1.;
34
lJacobian(1, 4) = 1.;
35
lJacobian(3, 0) = (
dxdz
* (-
q
/ (
sqr
* qbp * qbp)));
36
lJacobian(3, 1) = (
q
/ (
sqr
* qbp) + (den *
dxdz
*
dxdz
));
37
lJacobian(3, 2) = ((den *
dxdz
*
dydz
));
38
lJacobian(4, 0) = (
dydz
* (-
q
/ (
sqr
* qbp * qbp)));
39
lJacobian(4, 1) = ((den *
dxdz
*
dydz
));
40
lJacobian(4, 2) = (
q
/ (
sqr
* qbp) + (den *
dydz
*
dydz
));
41
lJacobian(5, 0) = (-
q
/ (
sqr
* qbp * qbp));
42
lJacobian(5, 1) = ((den *
dxdz
));
43
lJacobian(5, 2) = ((den *
dydz
));
44
45
/*
46
GlobalVector g1 = surface.toGlobal(LocalVector(1., 0., 0.));
47
GlobalVector g2 = surface.toGlobal(LocalVector(0., 1., 0.));
48
GlobalVector g3 = surface.toGlobal(LocalVector(0., 0., 1.));
49
*/
50
AlgebraicMatrix33
Rsub;
51
/*
52
Rsub(0,0) = g1.x(); Rsub(0,1) = g2.x(); Rsub(0,2) = g3.x();
53
Rsub(1,0) = g1.y(); Rsub(1,1) = g2.y(); Rsub(1,2) = g3.y();
54
Rsub(2,0) = g1.z(); Rsub(2,1) = g2.z(); Rsub(2,2) = g3.z();
55
*/
56
// need to be copied anhhow to go from float to double...
57
Surface::RotationType
const
&
rot
= surface.
rotation
();
58
Rsub(0, 0) =
rot
.xx();
59
Rsub(0, 1) =
rot
.yx();
60
Rsub(0, 2) =
rot
.zx();
61
Rsub(1, 0) =
rot
.xy();
62
Rsub(1, 1) =
rot
.yy();
63
Rsub(1, 2) =
rot
.zy();
64
Rsub(2, 0) =
rot
.xz();
65
Rsub(2, 1) =
rot
.yz();
66
Rsub(2, 2) =
rot
.zz();
67
68
AlgebraicMatrix66
R
;
69
R
.Place_at(Rsub, 0, 0);
70
R
.Place_at(Rsub, 3, 3);
71
theJacobian
=
R
* lJacobian;
72
//dbg::dbg_trace(1,"Loc2Ca", localParameters.vector(),g1,g2,g3,theJacobian);
73
}
TkRotation< float >
LocalTrajectoryParameters::dxdz
float dxdz() const
Definition:
LocalTrajectoryParameters.h:159
TrackCharge
int TrackCharge
Definition:
TrackCharge.h:4
LocalTrajectoryParameters::qbp
float qbp() const
Definition:
LocalTrajectoryParameters.h:158
JacobianLocalToCartesian::JacobianLocalToCartesian
JacobianLocalToCartesian(const Surface &surface, const LocalTrajectoryParameters &localParameters)
Definition:
JacobianLocalToCartesian.cc:5
LocalTrajectoryParameters::dydz
float dydz() const
Definition:
LocalTrajectoryParameters.h:160
sqr
int sqr(const T &t)
Definition:
pfalgo_common_ref.h:9
Surface
Definition:
Surface.h:36
AlgebraicMatrix33
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepStd< double, 3, 3 > > AlgebraicMatrix33
Definition:
AlgebraicROOTObjects.h:41
LocalTrajectoryParameters
Definition:
LocalTrajectoryParameters.h:25
LocalTrajectoryParameters.h
Surface.h
mathSSE::sqrt
T sqrt(T t)
Definition:
SSEVec.h:19
JacobianLocalToCartesian.h
BeamSpotPI::dxdz
Definition:
BeamSpotPayloadInspectorHelper.h:36
LocalTrajectoryParameters::charge
TrackCharge charge() const
Charge (-1, 0 or 1)
Definition:
LocalTrajectoryParameters.h:110
LocalTrajectoryParameters::pzSign
float pzSign() const
Sign of the z-component of the momentum in the local frame.
Definition:
LocalTrajectoryParameters.h:146
JacobianLocalToCartesian::theJacobian
AlgebraicMatrix65 theJacobian
Definition:
JacobianLocalToCartesian.h:29
BeamSpotPI::dydz
Definition:
BeamSpotPayloadInspectorHelper.h:37
submitPVResolutionJobs.q
q
Definition:
submitPVResolutionJobs.py:84
AlgebraicMatrix65
ROOT::Math::SMatrix< double, 6, 5, ROOT::Math::MatRepStd< double, 6, 5 > > AlgebraicMatrix65
Definition:
AlgebraicROOTObjects.h:61
AlgebraicMatrix66
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepStd< double, 6, 6 > > AlgebraicMatrix66
Definition:
AlgebraicROOTObjects.h:62
makeMuonMisalignmentScenario.rot
rot
Definition:
makeMuonMisalignmentScenario.py:322
GloballyPositioned::rotation
const RotationType & rotation() const
Definition:
GloballyPositioned.h:38
dttmaxenums::R
Definition:
DTTMax.h:29
Generated for CMSSW Reference Manual by
1.8.16