ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::JacobianPerigeeToCartesian Class Reference

Jacobian for transforming perigee track parameters \((d_0, z_0, \phi_0, \theta, q/p)\) to the cartesian frame \((p_x,p_y,p_z,E,x,y,z)\). More...

#include <JacobianPerigeeToCartesian.h>

Inheritance diagram for Trk::JacobianPerigeeToCartesian:
Collaboration diagram for Trk::JacobianPerigeeToCartesian:

Public Member Functions

 JacobianPerigeeToCartesian (const double d0, const double z0, const double phi0, const double theta, const double qOverP, const double mass=ParticleConstants::muonMassInMeV)
 ~JacobianPerigeeToCartesian ()

Detailed Description

Jacobian for transforming perigee track parameters \((d_0, z_0, \phi_0, \theta, q/p)\) to the cartesian frame \((p_x,p_y,p_z,E,x,y,z)\).

It needs a mass in order to calculate the energy, default is muon-mass.

Author
Maaik.nosp@m.e.Li.nosp@m.mper@.nosp@m.cern.nosp@m..ch

Definition at line 29 of file JacobianPerigeeToCartesian.h.

Constructor & Destructor Documentation

◆ JacobianPerigeeToCartesian()

Trk::JacobianPerigeeToCartesian::JacobianPerigeeToCartesian ( const double d0,
const double z0,
const double phi0,
const double theta,
const double qOverP,
const double mass = ParticleConstants::muonMassInMeV )

Definition at line 12 of file JacobianPerigeeToCartesian.cxx.

17 :
18 AmgMatrix(7,5)()
19{
20
21 // initialize to zero
22 this->setZero();
23
24 double sinp = std::sin(phi0);
25 double cosp = std::cos(phi0);
26 double sint = std::sin(theta);
27 double cost = std::cos(theta);
28 double rho = std::fabs(qOverP);
29 int charge=+1;
30 if(qOverP<0) { charge = -1;}
31
32 // transformation of track parameters
33 double px = cosp*sint/rho;
34 double py = sinp*sint/rho;
35 double pz = cost/rho;
36 double E = std::sqrt(1/rho/rho+mass*mass);
37
38 // I don't need this
39 //double x = xref[0] - d0*sinp;
40 //double y = xref[1] + d0*cosp;
41 //double z = xref[2] + z0;
42
43 (*this)(0,2) = -py; // dpx/dphi0
44 (*this)(0,3) = pz*cosp; // dpx/dtheta
45 (*this)(0,4) = -charge*px/rho; // dpx/dqOverP
46 (*this)(1,2) = px; // dpy/dphi0
47 (*this)(1,3) = pz*sinp; // dpy/dtheta
48 (*this)(1,4) = -charge*py/rho; // dpy/dqOverP
49 (*this)(2,3) = -sint/rho; // dpz/dtheta
50 (*this)(2,4) = -charge*pz/rho; // dpz/dqOverP
51 (*this)(3,4) = -charge*1./(E*rho*rho*rho); // dE/dqOverP
52 (*this)(4,0) = -sinp; // dx/dd0
53 (*this)(4,2) = -d0*cosp; // dx/dphi0
54 (*this)(5,0) = +cosp; // dy/dd0
55 (*this)(5,2) = -d0*sinp; // dy/dphi0
56 (*this)(6,1) = 1.; //dz/dz0
57
58}
double charge(const T &p)
Definition AtlasPID.h:997
#define AmgMatrix(rows, cols)
int cost(std::vector< std::string > &files, node &n, const std::string &directory="", bool deleteref=false, bool relocate=false)
Definition hcg.cxx:922
@ pz
global momentum (cartesian)
Definition ParamDefs.h:61
@ phi0
Definition ParamDefs.h:65
@ theta
Definition ParamDefs.h:66
@ qOverP
perigee
Definition ParamDefs.h:67
@ d0
Definition ParamDefs.h:63
@ px
Definition ParamDefs.h:59
@ py
Definition ParamDefs.h:60

◆ ~JacobianPerigeeToCartesian()

Trk::JacobianPerigeeToCartesian::~JacobianPerigeeToCartesian ( )
inline

Definition at line 32 of file JacobianPerigeeToCartesian.h.

32{}

The documentation for this class was generated from the following files: