9#include "TMatrixDSymEigen.h"
34 public std::map<double, JVector3D, std::greater<double> >
54 for (T i = __begin; i != __end; ++i) {
56 const double dx = center.
getX() - i->getX();
57 const double dy = center.
getY() - i->getY();
58 const double dz = center.
getZ() - i->getZ();
74 const TMatrixDSymEigen result(A);
76 const TVectorD& u = result.GetEigenValues();
77 const TMatrixD& V = result.GetEigenVectors();
79 for (Int_t i = 0; i != u.GetNoElements(); ++i) {
125 for (T i = __begin; i != __end; ++i) {
150 const TMatrixDSymEigen result(A);
152 const TVectorD& u = result.GetEigenValues();
153 const TMatrixD& V = result.GetEigenVectors();
155 if (u.GetNoElements() != 0 && fabs(u[0]) > MINIMAL_EIGEN_VALUE) {
159 if (Q.
getA() < 0.0) {
186 a(2,0) = a(0,2); a(2,1) = a(1,2); a(2,2) = Q.
getC()*Q.
getC(); a(2,3) = Q.
getC()*Q.
getD();
187 a(3,0) = a(0,3); a(3,1) = a(1,3); a(3,2) = a(2,3); a(3,3) = Q.
getD()*Q.
getD();
229 this->
set(xmin, xmax);
241 const double z = this->getX(x);
244 for (
size_t n = 0; n != this->size(); ++n) {
248 return y.normalise();
282 this->
set(xmin, xmax);
302 this->
set(__begin, __end);
319 void set(T __begin, T __end)
321 this->
set(__begin, __end, __end);
339 void set(T __begin, T __not, T __end)
343 static const double factor = 1.0 / (PI * 45.0 / 180.0);
345 for (
size_t n = 0; n != N + 1; ++n) {
349 this->xmin = std::numeric_limits<double>::max();
350 this->xmax = std::numeric_limits<double>::lowest();
352 for (T i = __begin; i != __end; ++i) {
354 if (i->first < this->xmin) { this->xmin = i->first; }
355 if (i->first > this->xmax) { this->xmax = i->first; }
359 for (
size_t n = 0; n != N + 1; ++n) {
363 for (T i = __begin; i != __end; ++i) {
366 const double x = i->first;
368 const double z = this->getX(x);
370 const JQuaternion3D q = this->getValue(x).getConjugate() * y;
379 (*this)[n].pow(factor);
394 for (
typename JLegendre::iterator i =
object.begin(); i !=
object.end(); ++i) {
Base class for data structures with artithmetic capabilities.
Data structure for unit quaternion in three dimensions.
double getB() const
Get b value.
double getD() const
Get d value.
double getC() const
Get c value.
JQuaternion3D & pow(const double y)
Raise quaternion to given power.
double getA() const
Get a value.
JQuaternion3D & negate()
Negate quaternion.
Data structure for vector in three dimensions.
double getY() const
Get y position.
double getZ() const
Get z position.
double getX() const
Get x position.
Exception for division by zero.
Auxiliary classes and methods for 3D geometrical objects and operations.
Auxiliary classes and methods for mathematical operations.
static const JZero zero
Function object to assign zero value.
T pow(const T &x, const double y)
Power .
double legendre(const size_t n, const double x)
Legendre polynome.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
JEigenValues3D(T __begin, T __end)
Constructor.
JAverage(T __begin, T __end)
Constructor.
void put(const JQuaternion3D &Q, const double w=1.0)
Put quaternion.
static double MINIMAL_EIGEN_VALUE
Numerical precision for eigen value evaluation.
JAverage()
Default constructor.
Auxiliary class to determine average of set of values.
void put(const JValue_t &value, const double w=1.0)
Put value.
void set(T __begin, T __not, T __end)
Set Legendre polynome of quaternions.
JLegendre(const double xmin, const double xmax)
Constructor.
JLegendre(T __begin, T __end)
Constructor.
friend std::istream & operator>>(std::istream &in, JLegendre &object)
Read Legendre polynome from input.
void set(T __begin, T __end)
Set Legendre polynome of quaternions.
JLegendre()
Default constructor.
JLegendre(const double xmin, const double xmax)
Constructor.
JLegendre()
Default constructor.
virtual JQuaternion3D getValue(const double x) const override
Function value.
Base class for Legendre polynome.
Template definition for function evaluation of Legendre polynome.
void set(T __begin, T __end)
Set Legendre polynome.