00001 #ifndef Alignment_CommonAlignmentParametrization_FrameToFrameDerivative_h 00002 #define Alignment_CommonAlignmentParametrization_FrameToFrameDerivative_h 00003 00004 #include "CondFormats/Alignment/interface/Definitions.h" 00005 00013 00014 class Alignable; 00015 00016 class FrameToFrameDerivative 00017 { 00018 00019 public: 00020 00022 AlgebraicMatrix frameToFrameDerivative(const Alignable* object, 00023 const Alignable* composedObject) const; 00024 00025 private: 00026 00028 inline static AlgebraicMatrix transform(const align::RotationType&); 00029 00031 AlgebraicMatrix getDerivative(const align::RotationType &detUnitRot, 00032 const align::RotationType &composeRot, 00033 const align::GlobalVector &posVec) const; 00034 00036 AlgebraicVector linearEulerAngles(const AlgebraicMatrix &rotDelta) const; 00037 00039 AlgebraicMatrix derivativePosPos(const AlgebraicMatrix &RotDet, 00040 const AlgebraicMatrix &RotRot) const; 00041 00043 AlgebraicMatrix derivativePosRot(const AlgebraicMatrix &RotDet, 00044 const AlgebraicMatrix &RotRot, 00045 const AlgebraicVector &S) const; 00046 00048 AlgebraicMatrix derivativeRotRot(const AlgebraicMatrix &RotDet, 00049 const AlgebraicMatrix &RotRot) const; 00050 00051 }; 00052 00053 AlgebraicMatrix FrameToFrameDerivative::transform(const align::RotationType& rot) 00054 { 00055 AlgebraicMatrix R(3, 3); 00056 00057 R(1, 1) = rot.xx(); R(1, 2) = rot.xy(); R(1, 3) = rot.xz(); 00058 R(2, 1) = rot.yx(); R(2, 2) = rot.yy(); R(2, 3) = rot.yz(); 00059 R(3, 1) = rot.zx(); R(3, 2) = rot.zy(); R(3, 3) = rot.zz(); 00060 00061 return R; 00062 } 00063 00064 #endif 00065