Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:56:13

0001 /** \file KarimakiAlignmentDerivatives.cc
0002  *
0003  *  $Date: 2007/05/02 21:01:53 $
0004  *  $Revision: 1.7 $
0005  */
0006 
0007 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0008 
0009 #include "Alignment/CommonAlignmentParametrization/interface/SegmentAlignmentDerivatives4D.h"
0010 
0011 AlgebraicMatrix SegmentAlignmentDerivatives4D::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, 4);
0028 
0029   // delta_x
0030   aliderivs[0][0] = -1.0;
0031   aliderivs[0][1] = 0.0;
0032   aliderivs[0][2] = 0.0;
0033   aliderivs[0][3] = 0.0;
0034   // delta_y
0035   aliderivs[1][0] = 0.0;
0036   aliderivs[1][1] = -1.0;
0037   aliderivs[1][2] = 0.0;
0038   aliderivs[1][3] = 0.0;
0039   // delta_z
0040   aliderivs[2][0] = tanpsi;
0041   aliderivs[2][1] = tantheta;
0042   aliderivs[2][2] = tanpsi;
0043   aliderivs[2][3] = tantheta;
0044   // alpha
0045   aliderivs[3][0] = vx * tanpsi;
0046   aliderivs[3][1] = vx * tantheta;
0047   aliderivs[3][2] = 0;
0048   aliderivs[3][3] = 1.0;
0049   // beta
0050   aliderivs[4][0] = -ux * tanpsi;    // New beta sign convention
0051   aliderivs[4][1] = -ux * tantheta;  // New beta sign convention
0052   aliderivs[4][2] = -1.0;
0053   aliderivs[4][3] = 0.0;
0054   // gamma
0055   aliderivs[5][0] = vx;
0056   aliderivs[5][1] = -ux;
0057   aliderivs[5][2] = tantheta;
0058   aliderivs[5][3] = -tanpsi;
0059 
0060   return (aliderivs);
0061 }