File indexing completed on 2024-04-06 11:56:12
0001 #ifndef Alignment_CommonAlignmentParametrization_FrameToFrameDerivative_h
0002 #define Alignment_CommonAlignmentParametrization_FrameToFrameDerivative_h
0003
0004 #include "CondFormats/Alignment/interface/Definitions.h"
0005 #include "DataFormats/Math/interface/AlgebraicROOTObjects.h"
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 class Alignable;
0019
0020 class FrameToFrameDerivative {
0021 public:
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035 AlgebraicMatrix frameToFrameDerivative(const Alignable *object, const Alignable *composedObject) const;
0036
0037
0038
0039
0040
0041
0042 AlgebraicMatrix66 getDerivative(const align::RotationType &objectRot,
0043 const align::RotationType &composeRot,
0044 const align::GlobalPoint &objectPos,
0045 const align::GlobalPoint &composePos) const;
0046
0047 private:
0048
0049 inline static AlgebraicMatrix transform(const align::RotationType &);
0050
0051
0052
0053 AlgebraicMatrix getDerivative(const align::RotationType &objectRot,
0054 const align::RotationType &composeRot,
0055 const align::GlobalVector &posVec) const;
0056
0057
0058 AlgebraicVector linearEulerAngles(const AlgebraicMatrix &rotDelta) const;
0059
0060
0061 AlgebraicMatrix derivativePosPos(const AlgebraicMatrix &RotDet, const AlgebraicMatrix &RotRot) const;
0062
0063
0064 AlgebraicMatrix derivativePosRot(const AlgebraicMatrix &RotDet,
0065 const AlgebraicMatrix &RotRot,
0066 const AlgebraicVector &S) const;
0067
0068
0069 AlgebraicMatrix derivativeRotRot(const AlgebraicMatrix &RotDet, const AlgebraicMatrix &RotRot) const;
0070 };
0071
0072 AlgebraicMatrix FrameToFrameDerivative::transform(const align::RotationType &rot) {
0073 AlgebraicMatrix R(3, 3);
0074
0075 R(1, 1) = rot.xx();
0076 R(1, 2) = rot.xy();
0077 R(1, 3) = rot.xz();
0078 R(2, 1) = rot.yx();
0079 R(2, 2) = rot.yy();
0080 R(2, 3) = rot.yz();
0081 R(3, 1) = rot.zx();
0082 R(3, 2) = rot.zy();
0083 R(3, 3) = rot.zz();
0084
0085 return R;
0086 }
0087
0088 #endif