ATLAS Offline Software
Loading...
Searching...
No Matches
JacobianCartesianToPolar.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// JacobianCartesianToPolar.cxx, (c) ATLAS Detector Software
8
10#include <cmath>
11
13 AmgMatrix(5,5)()
14{
15 // initialize to identify matrix
16 this->setIdentity();
17
18 if (std::fabs(lx)>10e-6 || std::fabs(ly)>10e-6){
19
20 double r = std::sqrt(lx*lx+ly*ly);
21
22 (*this)(Trk::locR,Trk::locX) = lx/r;
23 (*this)(Trk::locR,Trk::locY) = ly/r;
24 (*this)(Trk::locPhi,Trk::locX) = -ly/(r*r);
25 (*this)(Trk::locPhi,Trk::locY) = lx/(r*r);
26 }
27}
28
JacobianCartesianToPolar(const double lx, const double ly)
int r
Definition globals.cxx:22
AmgMatrix(3, 3) NeutralParticleParameterCalculator
@ locY
local cartesian
Definition ParamDefs.h:38
@ locX
Definition ParamDefs.h:37
@ locR
Definition ParamDefs.h:44
@ locPhi
local polar
Definition ParamDefs.h:45