ATLAS Offline Software
Public Member Functions | List of all members
Trk::JacobianPhiThetaLocalAngles Class Reference

#include <JacobianPhiThetaLocalAngles.h>

Inheritance diagram for Trk::JacobianPhiThetaLocalAngles:
Collaboration diagram for Trk::JacobianPhiThetaLocalAngles:

Public Member Functions

 JacobianPhiThetaLocalAngles (const Amg::RotationMatrix3D &rot)
 
 JacobianPhiThetaLocalAngles (const double phi, const double theta, const Amg::RotationMatrix3D &rot)
 
 ~JacobianPhiThetaLocalAngles ()
 

Detailed Description

This jacobian transforms the polar and azimutal angle \( \phi, \theta \) of a global momentum representation to a local momentum representation as given in the Trk::LocalMomentum class, therefor it is of dimension (2x2).

The Rotation given for construction is the one declared by the Surface frame:

Surface::transform()::getRotation()

Author
Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch

Definition at line 32 of file JacobianPhiThetaLocalAngles.h.

Constructor & Destructor Documentation

◆ JacobianPhiThetaLocalAngles() [1/2]

Trk::JacobianPhiThetaLocalAngles::JacobianPhiThetaLocalAngles ( const Amg::RotationMatrix3D rot)

◆ JacobianPhiThetaLocalAngles() [2/2]

Trk::JacobianPhiThetaLocalAngles::JacobianPhiThetaLocalAngles ( const double  phi,
const double  theta,
const Amg::RotationMatrix3D rot 
)

Definition at line 13 of file JacobianPhiThetaLocalAngles.cxx.

13  :
14  AmgMatrix(2,2)()
15 {
16  // initialize
17  this->setIdentity();
18 
19  // Rot is a 3x3 rotation matrix from global 3-vector to local 3-vector
20  double cp = std::cos(phi);
21  double sp = std::sin(phi);
22  double ct = std::cos(theta);
23  double st = std::sin(theta);
24 
25  AmgMatrix(3,2) J2 = AmgMatrix(3,2)::Zero();
26 //
27 // derivatives dx/dphi dx/dtheta
28 // dy/dphi dy/dtheta
29 // dz/dphi dz/dtheta
30 //
31 // x = sin(theta)*cos(phi)
32 // y = sin(theta)*sin(phi)
33 // z = cos(theta)
34 //
35  J2(0,0) = -st*sp;
36  J2(1,0) = st*cp;
37  J2(0,1) = ct*cp;
38  J2(1,1) = ct*sp;
39  J2(2,1) = -st;
40 
41 // Determine Local theta and phi
42 
43  Amg::Vector3D gdir(st*cp,st*sp,ct);
44  Amg::Vector3D ldir = rot*gdir;
45  double angleXZ = std::atan2(ldir.z(),ldir.x());
46  double angleYZ = std::atan2(ldir.z(),ldir.y());
47 
48  double cx = std::cos(angleXZ);
49  double sx = std::sin(angleXZ);
50  double cy = std::cos(angleYZ);
51  double sy = std::sin(angleYZ);
52  double norm = std::sqrt(cx*sy*cx*sy + cy*sx*cy*sx + sx*sy*sx*sy);
53  double zinv = norm/(sx*sy) ;
54 
55 // std::cout << " Local angles XZ " << angleXZ << " YZ " << angleYZ << std::endl;
56 //
57 // local direction x = cx * sy / norm
58 // y = cy * sx / norm
59 // z = sx * sy / norm
60 //
61  AmgMatrix(2,3) J1 = AmgMatrix(2,3)::Zero();
62 //
63 // derivatives d alphaXZ/dx d alphaXZ/dy d alphaXZ/dz
64 // d alphaYZ/dx d alphaYZ/dy d alphaYZ/dz
65 //
66 // tan(alphaXZ) = z / x
67 // tan(alhpaYZ) = z / y
68 //
69  J1(0,0) = -sx*sx*zinv;
70  J1(1,1) = -sy*sy*zinv;
71  J1(0,2) = cx*sx*zinv;
72  J1(1,2) = cy*sy*zinv;
73 
74  const AmgMatrix(3,3)& Rot = rot;
75  AmgMatrix(2,2) J = AmgMatrix(2,2)::Zero();
76 //
77 // Jacobian: lefthand local righthand global
78 //
79  J = J1*(Rot*J2);
80 //
81 // Store Jacobian J
82 //
83  (*this)(0,0) = J(0,0);
84  (*this)(0,1) = J(0,1);
85  (*this)(1,0) = J(1,0);
86  (*this)(1,1) = J(1,1);
87 }

◆ ~JacobianPhiThetaLocalAngles()

Trk::JacobianPhiThetaLocalAngles::~JacobianPhiThetaLocalAngles ( )
inline

Definition at line 36 of file JacobianPhiThetaLocalAngles.h.

36 {}

The documentation for this class was generated from the following files:
Trk::y
@ y
Definition: ParamDefs.h:56
Trk::AmgMatrix
AmgMatrix(3, 3) NeutralParticleParameterCalculator
Definition: NeutralParticleParameterCalculator.cxx:233
PlotCalibFromCool.norm
norm
Definition: PlotCalibFromCool.py:100
fitman.sy
sy
Definition: fitman.py:524
Trk::z
@ z
global position (cartesian)
Definition: ParamDefs.h:57
python.compressB64.sx
string sx
Definition: compressB64.py:96
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
PlotCalibFromCool.cx
cx
Definition: PlotCalibFromCool.py:666
Trk::theta
@ theta
Definition: ParamDefs.h:66
calibdata.ct
ct
Definition: calibdata.py:418
Amg
Definition of ATLAS Math & Geometry primitives (Amg)
Definition: AmgStringHelpers.h:19
LArNewCalib_PedestalAutoCorr.cp
cp
Definition: LArNewCalib_PedestalAutoCorr.py:185
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
PlotCalibFromCool.cy
cy
Definition: PlotCalibFromCool.py:667
Trk::phi
@ phi
Definition: ParamDefs.h:75
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
Trk::x
@ x
Definition: ParamDefs.h:55