CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/Alignment/CommonAlignmentParametrization/src/SegmentAlignmentDerivatives4D.cc

Go to the documentation of this file.
00001 
00007 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00008 
00009 #include "Alignment/CommonAlignmentParametrization/interface/SegmentAlignmentDerivatives4D.h"
00010 
00011 
00012 AlgebraicMatrix 
00013 SegmentAlignmentDerivatives4D::operator()( const TrajectoryStateOnSurface &tsos ) const
00014 { 
00015 
00016   // Get track parameters on surface
00017   AlgebraicVector5 alivec = tsos.localParameters().mixedFormatVector();
00018 
00019   // [0] q/p  : charged: charge (+ or - one) divided by magnitude of momentum
00020   //            neutral : inverse magnitude of momentum
00021   // [1] dxdz : direction tangent in local xz-plane
00022   // [2] dydz : direction tangent in local yz-plane
00023   // [3] x    : local x-coordinate
00024   // [4] y    : local y-coordinate
00025 
00026   double tanpsi   = alivec[1];
00027   double tantheta = alivec[2];
00028   double ux       = alivec[3];
00029   double vx       = alivec[4];
00030 
00031   AlgebraicMatrix aliderivs(6,4);
00032 
00033   //delta_x
00034   aliderivs[0][0]= -1.0;
00035   aliderivs[0][1]=  0.0;
00036   aliderivs[0][2]=  0.0;
00037   aliderivs[0][3]=  0.0;
00038   //delta_y
00039   aliderivs[1][0]=  0.0;
00040   aliderivs[1][1]= -1.0;
00041   aliderivs[1][2]=  0.0;
00042   aliderivs[1][3]=  0.0;
00043   //delta_z
00044   aliderivs[2][0]=  tanpsi;
00045   aliderivs[2][1]=  tantheta;
00046   aliderivs[2][2]=  tanpsi;
00047   aliderivs[2][3]=  tantheta;
00048   //alpha
00049   aliderivs[3][0]=  vx*tanpsi;
00050   aliderivs[3][1]=  vx*tantheta;
00051   aliderivs[3][2]=  0;
00052   aliderivs[3][3]=  1.0;
00053   //beta
00054   aliderivs[4][0]= -ux*tanpsi;   // New beta sign convention
00055   aliderivs[4][1]= -ux*tantheta; // New beta sign convention
00056   aliderivs[4][2]= -1.0;  
00057   aliderivs[4][3]= 0.0; 
00058   //gamma 
00059   aliderivs[5][0]=  vx;
00060   aliderivs[5][1]= -ux;
00061   aliderivs[5][2]=  tantheta;
00062   aliderivs[5][3]= -tanpsi;
00063    
00064   return(aliderivs);
00065 
00066 }