00001
00002 #ifndef DETDESC_3DTRANSFORMATIONFUNCTIONS_H
00003 #define DETDESC_3DTRANSFORMATIONFUNCTIONS_H 1
00004
00005
00006 #include "GaudiKernel/Transform3DTypes.h"
00007 #include "Math/Translation3D.h"
00008 #include "Math/RotationZYX.h"
00009 #include <vector>
00010
00011 namespace DetDesc {
00012
00028 const Gaudi::Transform3D localToGlobalTransformation(const std::vector<double>& translationParams,
00029 const std::vector<double>& rotationParams,
00030 const std::vector<double>& pivotParams);
00031
00032
00046 void getZYXTransformParameters(const Gaudi::Transform3D& CDM,
00047 std::vector<double>& translationParams,
00048 std::vector<double>& rotationParams,
00049 const std::vector<double>& pivotParams = std::vector<double>(3,0.));
00050
00067 template <class ROT>
00068 void getZYXRotationParameters( const ROT& rotation,
00069 double& rotX,
00070 double& rotY,
00071 double& rotZ )
00072 {
00073 ROOT::Math::RotationZYX euler321 = ROOT::Math::RotationZYX(rotation);
00074 euler321.GetComponents(rotZ, rotY, rotX);
00075 }
00076
00077 }
00078
00079 #endif // DETDESC_3DTRANSFORMATIONFUNCTIONS_H