ATLAS Offline Software
JacobianCartesianToPerigee.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 // JacobianCartesianToPerigee.cxx, (c) ATLAS Detector software
8 
10 #include <cmath>
11 
12 Trk::JacobianCartesianToPerigee::JacobianCartesianToPerigee(const double px, const double py, const double pz, const double E, const double, const double, const double, const double charge ):
13  AmgMatrix(5,7)()
14 {
15  // initialize to zero
16  this->setZero();
17 
18  double ptot = std::sqrt(px*px+py*py+pz*pz);
19  double pt = std::sqrt(px*px+py*py);
20 
21  double tan_theta = pt/pz;
22 
23  double cos_phi = px/pt;
24  double sin_phi = py/pt;
25 
26  (*this)(0,4) = -sin_phi ; // dd0/dx
27  (*this)(0,5) = cos_phi ; // dd0/dy
28  (*this)(1,6) = 1.; // dz0/dz
29  (*this)(2,0) = -py/(px*px+py*py) ; // dphi/dpx
30  (*this)(2,1) = px/(px*px+py*py) ; // dphi/dpy
31  (*this)(3,0) = (cos_phi/pz)*(1./(1+tan_theta*tan_theta)); // dtheta/dpx
32  (*this)(3,1) = (sin_phi/pz)*(1./(1+tan_theta*tan_theta)); // dtheta/dpy
33  (*this)(3,2) = (-tan_theta/pz)*(1./(1+tan_theta*tan_theta)); // dtheta/dpz
34  (*this)(4,3) = -charge*E/(ptot*ptot*ptot); // dqOverP/dE
35 
36 }
37 
Trk::py
@ py
Definition: ParamDefs.h:66
test_pyathena.px
px
Definition: test_pyathena.py:18
test_pyathena.pt
pt
Definition: test_pyathena.py:11
Trk::pz
@ pz
global momentum (cartesian)
Definition: ParamDefs.h:67
AmgMatrix
#define AmgMatrix(rows, cols)
Definition: EventPrimitives.h:51
Trk::px
@ px
Definition: ParamDefs.h:65
Amg::pz
@ pz
Definition: GeoPrimitives.h:40
Trk::JacobianCartesianToPerigee::JacobianCartesianToPerigee
JacobianCartesianToPerigee(const double px, const double py, const double pz, const double E, const double x, const double y, const double z, const double charge)
Definition: JacobianCartesianToPerigee.cxx:12
Amg::py
@ py
Definition: GeoPrimitives.h:39
JacobianCartesianToPerigee.h
VP1PartSpect::E
@ E
Definition: VP1PartSpectFlags.h:21
charge
double charge(const T &p)
Definition: AtlasPID.h:494