1 #ifndef __JCOMPASS_JMODEL__
2 #define __JCOMPASS_JMODEL__
19 namespace JPP {
using namespace JCOMPASS; }
85 for (
T q = __begin, p = q++; q != __end; ++p, ++q) {
87 const double dz = q->getZ() - p->getZ();
94 Q.
mul(q->getQuaternion());
double getAngle(const JQuaternion3D &first, const JQuaternion3D &second)
Get space angle between quanternions.
JQuaternion3D & pow(const double y)
Raise quaternion to given power.
Auxiliary base class for aritmetic operations of derived class types.
JQuaternion3D getConjugate() const
Get conjugate of this quaternion.
Interface for maximum likelihood estimator (M-estimator).
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
JLANG::JSharedPointer< JMEstimator > estimator
M-Estimator function.
JModel & add(const JModel &model)
Add model.
std::iterator_traits< T >::value_type getAverage(T __begin, T __end)
Get average.
double getZ() const
Get z-position.
JQuaternion3D & mul(const double factor)
Scale quaternion.
const JQuaternion3D & getQuaternion() const
Get quaternion.
Auxiliary data structure for chi2 evaluation.
The template JSharedPointer class can be used to share a pointer to an object.
JQuaternion3D twist
rotation around parallel axis
const array_type< JValue_t > & make_array(const JValue_t(&array)[N])
Method to create array of values.
do set_variable OUTPUT_DIRECTORY $WORKDIR T
T pow(const T &x, const double y)
Power .
JModel()
Default constructor.
JModel & mul(const double factor)
Scale model.
JChi2(const int type)
Constructor.
JModel(const JQuaternion3D &Q0, const JQuaternion3D &Q1)
Constructor.
Data structure for unit quaternion in three dimensions.
static const JVector3D JVector3Z_t(0, 0, 1)
unit z-vector
Base class for data structures with artithmetic capabilities.
double operator()(const JModel &model, const JHit &hit) const
Fit function.
JQuaternion3D & normalise()
Normalise quaternion.
Exception for accessing a value in a collection that is outside of its range.
JModel(T __begin, T __end)
Constructor.
JMEstimator * getMEstimator(const int type)
Get M-Estimator.
JQuaternion3D operator()(const double z) const
Get quaternion at given z-position.
double getSigma() const
Get resolution.
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.
then usage $script[input file[working directory[option]]] nWhere option can be N
Maximum likelihood estimator (M-estimators).
JModel & sub(const JModel &model)
Subtract model.
JQuaternion3D & conjugate()
Conjugate quaternion.