Go to the documentation of this file.00001 #include "TrackingTools/AnalyticalJacobians/interface/JacobianLocalToCartesian.h"
00002 #include "DataFormats/GeometrySurface/interface/Surface.h"
00003 #include "DataFormats/TrajectoryState/interface/LocalTrajectoryParameters.h"
00004
00005 JacobianLocalToCartesian::JacobianLocalToCartesian(const Surface& surface,
00006 const LocalTrajectoryParameters& localParameters) : theJacobian() {
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 double qbp = localParameters.qbp();
00019 double dxdz = localParameters.dxdz();
00020 double dydz = localParameters.dydz();
00021 TrackCharge iq = localParameters.charge();
00022
00023
00024 if ( iq==0 ) iq = 1;
00025 double pzSign = localParameters.pzSign();
00026 double q = iq*pzSign;
00027 double sqr = sqrt(dxdz*dxdz + dydz*dydz + 1);
00028 double den = -q/(sqr*sqr*sqr*qbp);
00029
00030
00031 AlgebraicMatrix65 & lJacobian = theJacobian;
00032 lJacobian(0,3) = 1.;
00033 lJacobian(1,4) = 1.;
00034 lJacobian(3,0) = ( dxdz*(-q/(sqr*qbp*qbp)) );
00035 lJacobian(3,1) = ( q/(sqr*qbp) + (den*dxdz*dxdz) );
00036 lJacobian(3,2) = ( (den*dxdz*dydz) );
00037 lJacobian(4,0) = ( dydz*(-q/(sqr*qbp*qbp)) );
00038 lJacobian(4,1) = ( (den*dxdz*dydz) );
00039 lJacobian(4,2) = ( q/(sqr*qbp) + (den*dydz*dydz) );
00040 lJacobian(5,0) = ( -q/(sqr*qbp*qbp) );
00041 lJacobian(5,1) = ( (den*dxdz) );
00042 lJacobian(5,2) = ( (den*dydz) );
00043
00044
00045
00046
00047
00048
00049 AlgebraicMatrix33 Rsub;
00050
00051
00052
00053
00054
00055
00056 Surface::RotationType const & rot = surface.rotation();
00057 Rsub(0,0) = rot.xx(); Rsub(0,1) = rot.yx(); Rsub(0,2) = rot.zx();
00058 Rsub(1,0) = rot.xy(); Rsub(1,1) = rot.yy(); Rsub(1,2) = rot.zy();
00059 Rsub(2,0) = rot.xz(); Rsub(2,1) = rot.yz(); Rsub(2,2) = rot.zz();
00060
00061 AlgebraicMatrix66 R;
00062 R.Place_at(Rsub, 0,0);
00063 R.Place_at(Rsub, 3,3);
00064 theJacobian = R * lJacobian;
00065
00066 }
00067