ATLAS Offline Software
Loading...
Searching...
No Matches
JacobianPerigeeToCartesian.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
6// JacobianPerigeeToCartesian.cxx, (c) ATLAS Detector software
8
10#include <cmath>
11
13 const double,
14 const double phi0,
15 const double theta,
16 const double qOverP,
17 const double mass ):
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}
59
double charge(const T &p)
Definition AtlasPID.h:997
JacobianPerigeeToCartesian(const double d0, const double z0, const double phi0, const double theta, const double qOverP, const double mass=ParticleConstants::muonMassInMeV)
int cost(std::vector< std::string > &files, node &n, const std::string &directory="", bool deleteref=false, bool relocate=false)
Definition hcg.cxx:922
AmgMatrix(3, 3) NeutralParticleParameterCalculator
@ 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