Jpp
JCompassMatrix.hh
Go to the documentation of this file.
1 #ifndef __JDETECTOR__JCOMPASSMATRIX__
2 #define __JDETECTOR__JCOMPASSMATRIX__
3 
4 #include <cmath>
5 
7 #include "JDetector/JCompass.hh"
8 
9 
10 /**
11  * \author mdejong
12  */
13 
14 namespace JDETECTOR {}
15 namespace JPP { using namespace JDETECTOR; }
16 
17 namespace JDETECTOR {
18 
20 
21 
22  /**
23  * Compass matrix
24  *
25  * The Compass matrix is a genuine 3D rotation matrix, i.e.
26  * the inverse of a Compass matrix is equal to its tranpose.
27  *
28  * The Compass angles are defined as follows:
29  *
30  * -# pitch 2D rotation around X -axis;
31  * -# roll 2D rotation around Y' -axis;
32  * -# yaw 2D rotation around Z''-axis;
33  */
35  public JRotation3D
36  {
37  public:
38  /**
39  * Default constructor (= identity matrix).
40  */
42  JRotation3D()
43  {}
44 
45 
46  /**
47  * Constructor.
48  *
49  * \param compass compass
50  */
51  JCompassMatrix(const JCompass& compass) :
52  JRotation3D()
53  {
54  using namespace JGEOMETRY3D;
55 
56  const JRotation3D Rx = JRotation3X(compass.getPitch());
57  const JRotation3D Ry = JRotation3Y(compass.getRoll());
58  const JRotation3D Rz = JRotation3Z(compass.getYaw());
59 
60  set(Rz * Ry * Rx);
61  }
62  };
63 }
64 
65 #endif
JGEOMETRY3D::JRotation3X
Rotation around X-axis.
Definition: JRotation3D.hh:31
JDETECTOR::JCompass::getRoll
double getRoll() const
Get roll compass.
Definition: JCompass.hh:178
JDETECTOR::JCompassMatrix::JCompassMatrix
JCompassMatrix(const JCompass &compass)
Constructor.
Definition: JCompassMatrix.hh:51
JCompass.hh
JDETECTOR::JCompassMatrix::JCompassMatrix
JCompassMatrix()
Default constructor (= identity matrix).
Definition: JCompassMatrix.hh:41
JMATH::JMatrix3D::set
void set(const JMatrix3D &A)
Set matrix.
Definition: JMath/JMatrix3D.hh:119
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JAAnetToolkit.hh:37
JDETECTOR::JCompass::getPitch
double getPitch() const
Get pitch compass.
Definition: JCompass.hh:167
JDETECTOR::JCompass::getYaw
double getYaw() const
Get yaw compass.
Definition: JCompass.hh:189
JGEOMETRY3D::JRotation3Z
Rotation around Z-axis.
Definition: JRotation3D.hh:85
JDETECTOR::JCompass
Data structure for comapss in three dimensions.
Definition: JCompass.hh:31
JRotation3D.hh
JGEOMETRY3D
Auxiliary classes and methods for 3D geometrical objects and operations.
Definition: JAngle3D.hh:18
JGEOMETRY3D::JRotation3Y
Rotation around Y-axis.
Definition: JRotation3D.hh:57
JDETECTOR::JCompassMatrix
Compass matrix.
Definition: JCompassMatrix.hh:34
JDETECTOR
Auxiliary classes and methods for detector calibration.
Definition: JAnchor.hh:12
JGEOMETRY3D::JRotation3D
Rotation matrix.
Definition: JRotation3D.hh:111