Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #include "Alignment/CommonAlignment/interface/SurveyDet.h"
0002 
0003 SurveyDet::SurveyDet(const AlignableSurface& surface, const align::ErrorMatrix& errors)
0004     : theSurface(surface), theErrors(errors) {
0005   const align::Scalar W3 = surface.width() / 3.;
0006   const align::Scalar L3 = surface.length() / 3.;
0007 
0008   thePoints.reserve(4);  // 4 survey points
0009 
0010   //   thePoints.push_back( align::LocalPoint( 0.,  0., 0.) );
0011   thePoints.push_back(align::LocalPoint(W3, 0., 0.));
0012   //   thePoints.push_back( align::LocalPoint( W3,  L3, 0.) );
0013   thePoints.push_back(align::LocalPoint(0., L3, 0.));
0014   //   thePoints.push_back( align::LocalPoint(-W3,  L3, 0.) );
0015   thePoints.push_back(align::LocalPoint(-W3, 0., 0.));
0016   //   thePoints.push_back( align::LocalPoint(-W3, -L3, 0.) );
0017   thePoints.push_back(align::LocalPoint(0., -L3, 0.));
0018   //   thePoints.push_back( align::LocalPoint( W3, -L3, 0.) );
0019 }
0020 
0021 AlgebraicMatrix SurveyDet::derivatives(unsigned int index) const {
0022   AlgebraicMatrix jac(6, 3, 0);  // 6 by 3 Jacobian init to 0
0023 
0024   //   jac(1, 1) = S11; jac(1, 2) = S12; jac(1, 3) = S13;
0025   //   jac(2, 1) = S21; jac(2, 2) = S22; jac(2, 3) = S23;
0026   //   jac(3, 1) = S31; jac(3, 2) = S32; jac(3, 3) = S33;
0027 
0028   //   jac(4, 1) = u2 * S31;
0029   //   jac(4, 2) = u2 * S32;
0030   //   jac(4, 3) = u2 * S33;
0031 
0032   //   jac(5, 1) = -u1 * S31;
0033   //   jac(5, 2) = -u1 * S32;
0034   //   jac(5, 3) = -u1 * S33;
0035 
0036   //   jac(6, 1) = u1 * S21 - u2 * S11;
0037   //   jac(6, 2) = u1 * S22 - u2 * S12;
0038   //   jac(6, 3) = u1 * S23 - u2 * S13;
0039 
0040   jac(1, 1) = 1.;
0041   jac(2, 2) = 1.;
0042   jac(3, 3) = 1.;
0043 
0044   jac(5, 3) -= jac(6, 2) = thePoints[index].x();
0045   jac(6, 1) -= jac(4, 3) = thePoints[index].y();
0046 
0047   return jac;
0048 }