Logo ROOT   6.08/07
Reference Guide
RotationTraits.h
Go to the documentation of this file.
1 #ifndef ROTATIONTRAITS_H
2 #define ROTATIONTRAITS_H
3 
4 // $Id: RotationTraits.h,v 1.1 2005/08/11 14:18:00 fischler Exp $
5 //
6 // Rotation traits useful for testing purposes.
7 //
8 // For example, when reporting a problem, it is nice to be able
9 // to present a human-readable name for the rotation.
10 //
11 // Created by: Mark Fischler at Thu Aug 12 2005
12 //
13 
14 #include <string>
15 #include <typeinfo>
24 
25 namespace ROOT {
26 namespace Math {
27 
28 template <class C>
30  static const std::string name() {return "NOT-A-ROTATION!";}
31 };
32 
33 template <>
35  static const std::string name() {
36  std::string s = "Rotation3D";
37  return s;
38  }
39 };
40 
41 template <>
43  static const std::string name() {
44  std::string s = "AxisAngle";
45  return s;
46  }
47 };
48 
49 template <>
51  static const std::string name() {
52  std::string s = "EulerAngles";
53  return s;
54  }
55 };
56 
57 template <>
59  static const std::string name() {
60  std::string s = "Quaternion";
61  return s;
62  }
63 };
64 
65 template <>
67  static const std::string name() {
68  std::string s = "RotationX";
69  return s;
70  }
71 };
72 
73 template <>
75  static const std::string name() {
76  std::string s = "RotationY";
77  return s;
78  }
79 };
80 
81 template <>
83  static const std::string name() {
84  std::string s = "RotationZ";
85  return s;
86  }
87 };
88 
89 template <>
91  static const std::string name() {
92  std::string s = "LorentzRotation";
93  return s;
94  }
95 };
96 
97 #ifdef TODO
98 template <>
99 struct RotationTraits < Boost >{
100  static const std::string name() {
101  std::string s = "Boost";
102  return s;
103  }
104 };
105 
106 template <>
107 struct RotationTraits < BoostX >{
108  static const std::string name() {
109  std::string s = "BoostX";
110  return s;
111  }
112 };
113 
114 template <>
115 struct RotationTraits < BoostY >{
116  static const std::string name() {
117  std::string s = "BoostY";
118  return s;
119  }
120 };
121 
122 template <>
123 struct RotationTraits < BoostZ >{
124  static const std::string name() {
125  std::string s = "BoostZ";
126  return s;
127  }
128 };
129 #endif // TODO
130 
131 
132 
133 } // namespace Math
134 } // namespace ROOT
135 
136 #endif // COORDINATETRAITS_H
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
Definition: StringConv.hxx:21
Rotation class representing a 3D rotation about the Z axis by the angle of rotation.
Definition: RotationZ.h:43
static const std::string name()
Rotation class with the (3D) rotation represented by a unit quaternion (u, i, j, k).
Definition: Quaternion.h:47
static const std::string name()
AxisAngle class describing rotation represented with direction axis (3D Vector) and an angle of rotat...
Definition: AxisAngle.h:41
static const std::string name()
static const std::string name()
Rotation class representing a 3D rotation about the Y axis by the angle of rotation.
Definition: RotationY.h:43
Lorentz transformation class with the (4D) transformation represented by a 4x4 orthosymplectic matrix...
static const std::string name()
Rotation class representing a 3D rotation about the X axis by the angle of rotation.
Definition: RotationX.h:43
Rotation class with the (3D) rotation represented by a 3x3 orthogonal matrix.
Definition: Rotation3D.h:65
EulerAngles class describing rotation as three angles (Euler Angles).
Definition: EulerAngles.h:43
Namespace for new Math classes and functions.