Constructor.
The data type corresponding to the hits should provide for the following policy methods.
Note that the input data should be ordered with increasing z-positions.
73 :
76 {
79
80 const int N =
distance(__begin, __end);
81
83
85
86 for (T q = __begin, p = q++; q != __end; ++p, ++q) {
87
88 const double dz = q->getZ() - p->getZ();
89
90 if (dz != 0.0) {
91
93
94 Q.conjugate();
95 Q.mul(q->getQuaternion());
96 Q.pow(1.0 / dz);
97
98 buffer.push_back(Q);
99 }
100 }
101
104
106
109
110 } else {
112 }
113 }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Data structure for unit quaternion in three dimensions.
const JQuaternion3D & getQuaternion() const
Get quaternion.
Exception for accessing a value in a collection that is outside of its range.
T pow(const T &x, const double y)
Power .
std::iterator_traits< T >::value_type getAverage(T __begin, T __end)
Get average.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
double getZ() const
Get z-position.
static const int NUMBER_OF_PARAMETERS
number of parameters of fit per quaternion
Auxiliary data structure for decomposition of quaternion in twist and swing quaternions.
JQuaternion3D twist
rotation around parallel axis