Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:44:44

0001 /** \file KarimakiAlignmentDerivatives.cc
0002  *
0003  *  $Date: 2007/05/02 10:51:40 $
0004  *  $Revision: 1.5 $
0005  */
0006 
0007 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0008 
0009 #include "Alignment/CommonAlignmentParametrization/interface/KarimakiAlignmentDerivatives.h"
0010 
0011 AlgebraicMatrix KarimakiAlignmentDerivatives::operator()(const TrajectoryStateOnSurface &tsos) const {
0012   // Get track parameters on surface
0013   AlgebraicVector5 alivec = tsos.localParameters().mixedFormatVector();
0014 
0015   // [0] q/p  : charged: charge (+ or - one) divided by magnitude of momentum
0016   //            neutral : inverse magnitude of momentum
0017   // [1] dxdz : direction tangent in local xz-plane
0018   // [2] dydz : direction tangent in local yz-plane
0019   // [3] x    : local x-coordinate
0020   // [4] y    : local y-coordinate
0021 
0022   double tanpsi = alivec[1];
0023   double tantheta = alivec[2];
0024   double ux = alivec[3];
0025   double vx = alivec[4];
0026 
0027   AlgebraicMatrix aliderivs(6, 2);
0028 
0029   aliderivs[0][0] = -1.0;
0030   aliderivs[0][1] = 0.0;
0031   aliderivs[1][0] = 0.0;
0032   aliderivs[1][1] = -1.0;
0033   aliderivs[2][0] = tanpsi;
0034   aliderivs[2][1] = tantheta;
0035   aliderivs[3][0] = vx * tanpsi;
0036   aliderivs[3][1] = vx * tantheta;
0037   aliderivs[4][0] = -ux * tanpsi;    // New beta sign convention
0038   aliderivs[4][1] = -ux * tantheta;  // New beta sign convention
0039   aliderivs[5][0] = vx;
0040   aliderivs[5][1] = -ux;
0041 
0042   return (aliderivs);
0043 }