Class for sphericity tensor calculations.  
 More...
#include <JEventShapeVariables.hh>
Class for sphericity tensor calculations. 
The tensor is constructed following the definition in section 15.2.1 of arXiv:hep-ph/0603175v2. 
Definition at line 236 of file JEventShapeVariables.hh.
 
◆ eigen_values
◆ JSphericityTensor() [1/3]
  
  
      
        
          | JSIRENE::JSphericityTensor::JSphericityTensor  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ JSphericityTensor() [2/3]
  
  
      
        
          | JSIRENE::JSphericityTensor::JSphericityTensor  | 
          ( | 
          std::vector< Trk >::const_iterator  | 
          __begin,  | 
         
        
           | 
           | 
          std::vector< Trk >::const_iterator  | 
          __end,  | 
         
        
           | 
           | 
          const double  | 
          r = 2.0  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Constructor. 
- Parameters
 - 
  
    | __begin | beginning of track data  | 
    | __end | end of track data  | 
    | r | the power of the momentum-dependence  | 
  
   
Definition at line 256 of file JEventShapeVariables.hh.
  271           const double c = 
pow(p.
len(), 
r-2);
 
  273           a00 += c * p.
x * p.
x;
 
  274           a01 += c * p.
x * p.
y;
 
  275           a02 += c * p.
x * p.
z;
 
  277           a10 += c * p.
y * p.
x;
 
  278           a11 += c * p.
y * p.
y;
 
  279           a12 += c * p.
y * p.
z;
 
  281           a20 += c * p.
z * p.
x;
 
  282           a21 += c * p.
z * p.
y;
 
  283           a22 += c * p.
z * p.
z;
 
  285           norm += c * p.
dot(p);
 
JMatrix3D & div(const double factor)
Scale matrix.
 
eigen_values getEigenValues(const double epsilon=1e-6) const
Get eigen values.
 
double getKineticEnergy(const Trk &trk)
Get track kinetic energy.
 
bool is_finalstate(const Trk &track)
Test whether given track corresponds to a final state particle.
 
T pow(const T &x, const double y)
Power .
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
eigen_values lambda
sorted eigenvalues
 
The Vec class is a straightforward 3-d vector, which also works in pyroot.
 
double len() const
Get length.
 
double dot(const Vec &v) const
Get dot product.
 
 
 
 
◆ JSphericityTensor() [3/3]
  
  
      
        
          | JSIRENE::JSphericityTensor::JSphericityTensor  | 
          ( | 
          const Evt &  | 
          event,  | 
         
        
           | 
           | 
          const double  | 
          r = 2.0  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Constructor. 
- Parameters
 - 
  
    | event | event  | 
    | r | the power of the momentum dependence  | 
  
   
Definition at line 301 of file JEventShapeVariables.hh.
std::vector< Trk > mc_trks
MC: list of MC truth tracks.
 
JSphericityTensor()
Default constructor.
 
 
 
 
◆ getEigenValues() [1/2]
  
  
      
        
          | const eigen_values& JSIRENE::JSphericityTensor::getEigenValues  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ getSphericity()
  
  
      
        
          | double JSIRENE::JSphericityTensor::getSphericity  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ getAplanarity()
  
  
      
        
          | double JSIRENE::JSphericityTensor::getAplanarity  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ getCircularity()
  
  
      
        
          | double JSIRENE::JSphericityTensor::getCircularity  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ getPlanarFlow()
  
  
      
        
          | double JSIRENE::JSphericityTensor::getPlanarFlow  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ getC()
  
  
      
        
          | double JSIRENE::JSphericityTensor::getC  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ getD()
  
  
      
        
          | double JSIRENE::JSphericityTensor::getD  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ invert()
  
  
      
        
          | void JMATH::JMatrix3S::invert  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlineinherited   | 
  
 
Invert matrix. 
Definition at line 80 of file JMatrix3S.hh.
   93       if (fabs(
a10) > fabs(val)) {
 
   98       if (fabs(
a20) > fabs(val)) {
 
  119         throw JDivisionByZero(
"LDU decomposition zero pivot");  
 
  132       if (fabs(
a21) > fabs(val)) {
 
  147         throw JDivisionByZero(
"LDU decomposition zero pivot");
 
  156         throw JDivisionByZero(
"D matrix not invertable");
 
 
 
 
◆ getEigenValues() [2/2]
  
  
      
        
          | eigen_values JMATH::JMatrix3S::getEigenValues  | 
          ( | 
          const double  | 
          epsilon = 1e-6 | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Get eigen values. 
The eigen values sorted in decreasing order of absolute values.
Algorithm taken from "Eigenvalues of a symmetric 3x3 matrix"
by Oliver K. Smith; see reference.
- Parameters
 - 
  
  
 
- Returns
 - eigen values 
 
Definition at line 227 of file JMatrix3S.hh.
  237         const double q  = (
a00 + 
a11 + 
a22) / 3.0;
 
  239         const double p  = sqrt(p2 / 6.0);
 
  246         const double r   = B.getDeterminant() / 2.0;
 
  247         const double phi = (
r < -1.0 ? 
PI / 3.0 : (
r >  1.0 ? 0.0 : acos(
r) / 3.0));
 
  249         eigenvalues[0] = q + 2*p*cos(phi);
 
  250         eigenvalues[2] = q + 2*p*cos(phi + 2*
PI/3.0);
 
  251         eigenvalues[1] = 3 * q - eigenvalues[0] - eigenvalues[2];
 
  260       if (fabs(eigenvalues[0]) < fabs(eigenvalues[1])) {
 
  261         swap(eigenvalues[0], eigenvalues[1]);
 
  264       if (fabs(eigenvalues[1]) < fabs(eigenvalues[2])) {
 
  266         swap(eigenvalues[1], eigenvalues[2]);
 
  268         if (fabs(eigenvalues[0]) < fabs(eigenvalues[1])) {
 
  269           swap(eigenvalues[0], eigenvalues[1]);
 
static const JMatrix3D & getIdentity()
Get reference to unique instance of this class object.
 
std::array< double, 3 > eigen_values
Type definition of Eigen values.
 
static const double PI
Mathematical constants.
 
 
 
 
◆ getInstance()
  
  
      
        
          | static const JMatrix3D& JMATH::JMatrix3D::getInstance  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlinestaticinherited   | 
  
 
Get reference to unique instance of this class object. 
- Returns
 - zero matrix 
 
Definition at line 78 of file JMath/JMatrix3D.hh.
 
 
◆ setIdentity()
◆ getIdentity()
  
  
      
        
          | static const JMatrix3D& JMATH::JMatrix3D::getIdentity  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlinestaticinherited   | 
  
 
Get reference to unique instance of this class object. 
- Returns
 - identity matrix 
 
Definition at line 106 of file JMath/JMatrix3D.hh.
JMatrix3D()
Default constructor.
 
JMatrix3D & setIdentity()
Set to identity matrix.
 
 
 
 
◆ set()
  
  
      
        
          | void JMATH::JMatrix3D::set  | 
          ( | 
          const JMatrix3D &  | 
          A | ) | 
           | 
         
       
   | 
  
inlineinherited   | 
  
 
 
◆ reset()
◆ transpose()
◆ negate()
◆ add()
◆ sub()
◆ mul() [1/3]
  
  
      
        
          | JMatrix3D& JMATH::JMatrix3D::mul  | 
          ( | 
          const double  | 
          factor | ) | 
           | 
         
       
   | 
  
inlineinherited   | 
  
 
Scale matrix. 
- Parameters
 - 
  
  
 
- Returns
 - this matrix * factor 
 
Definition at line 208 of file JMath/JMatrix3D.hh.
  210       a00 *= factor; 
a01 *= factor; 
a02 *= factor;
 
  211       a10 *= factor; 
a11 *= factor; 
a12 *= factor;
 
  212       a20 *= factor; 
a21 *= factor; 
a22 *= factor;
 
 
 
 
◆ mul() [2/3]
◆ mul() [3/3]
Multiply with object. 
- Parameters
 - 
  
  
 
- Returns
 - result object 
 
Definition at line 354 of file JMath.hh.
  356       return static_cast<JFirst_t&
>(*this) = JFirst_t().mul(
static_cast<const JFirst_t&
>(*
this), 
object);
 
 
 
 
◆ div()
  
  
      
        
          | JMatrix3D& JMATH::JMatrix3D::div  | 
          ( | 
          const double  | 
          factor | ) | 
           | 
         
       
   | 
  
inlineinherited   | 
  
 
Scale matrix. 
- Parameters
 - 
  
  
 
- Returns
 - this matrix / factor 
 
Definition at line 224 of file JMath/JMatrix3D.hh.
  226       a00 /= factor; 
a01 /= factor; 
a02 /= factor;
 
  227       a10 /= factor; 
a11 /= factor; 
a12 /= factor;
 
  228       a20 /= factor; 
a21 /= factor; 
a22 /= factor;
 
 
 
 
◆ equals()
  
  
      
        
          | bool JMATH::JMatrix3D::equals  | 
          ( | 
          const JMatrix3D &  | 
          A,  | 
         
        
           | 
           | 
          const double  | 
          eps = std::numeric_limits<double>::min()  | 
         
        
           | 
          ) | 
           |  const | 
         
       
   | 
  
inlineinherited   | 
  
 
Equality. 
- Parameters
 - 
  
    | A | matrix  | 
    | eps | numerical precision  | 
  
   
- Returns
 - true if matrices identical; else false 
 
Definition at line 267 of file JMath/JMatrix3D.hh.
  270       return (fabs(
a00 - A.
a00) <= eps  &&
 
  271               fabs(
a01 - A.
a01) <= eps  &&
 
  272               fabs(
a02 - A.
a02) <= eps  &&
 
  273               fabs(
a10 - A.
a10) <= eps  &&
 
  274               fabs(
a11 - A.
a11) <= eps  &&
 
  275               fabs(
a12 - A.
a12) <= eps  &&
 
  276               fabs(
a20 - A.
a20) <= eps  &&
 
  277               fabs(
a21 - A.
a21) <= eps  &&
 
  278               fabs(
a22 - A.
a22) <= eps);
 
 
 
 
◆ isIdentity()
  
  
      
        
          | bool JMATH::JMatrix3D::isIdentity  | 
          ( | 
          const double  | 
          eps = std::numeric_limits<double>::min() | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Test identity. 
- Parameters
 - 
  
  
 
- Returns
 - true if identity matrix; else false 
 
Definition at line 288 of file JMath/JMatrix3D.hh.
bool equals(const JMatrix3D &A, const double eps=std::numeric_limits< double >::min()) const
Equality.
 
 
 
 
◆ getDeterminant()
  
  
      
        
          | double JMATH::JMatrix3D::getDeterminant  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Get determinant of matrix. 
- Returns
 - determinant of matrix 
 
Definition at line 299 of file JMath/JMatrix3D.hh.
 
 
◆ transform()
  
  
      
        
          | void JMATH::JMatrix3D::transform  | 
          ( | 
          double &  | 
          __x,  | 
         
        
           | 
           | 
          double &  | 
          __y,  | 
         
        
           | 
           | 
          double &  | 
          __z  | 
         
        
           | 
          ) | 
           |  const | 
         
       
   | 
  
inlineinherited   | 
  
 
Transform. 
- Parameters
 - 
  
    | __x | x value  | 
    | __y | y value  | 
    | __z | z value  | 
  
   
Definition at line 318 of file JMath/JMatrix3D.hh.
  320       const double x = 
a00 * __x  +  
a01 * __y  +  
a02 * __z;
 
  321       const double y = 
a10 * __x  +  
a11 * __y  +  
a12 * __z;
 
  322       const double z = 
a20 * __x  +  
a21 * __y  +  
a22 * __z;
 
 
 
 
◆ lambda
◆ a00
  
  
      
        
          | double JMATH::JMatrix3D::a00 | 
         
       
   | 
  
inherited   | 
  
 
 
◆ a01
  
  
      
        
          | double JMATH::JMatrix3D::a01 | 
         
       
   | 
  
inherited   | 
  
 
 
◆ a02
  
  
      
        
          | double JMATH::JMatrix3D::a02 | 
         
       
   | 
  
inherited   | 
  
 
 
◆ a10
  
  
      
        
          | double JMATH::JMatrix3D::a10 | 
         
       
   | 
  
inherited   | 
  
 
 
◆ a11
  
  
      
        
          | double JMATH::JMatrix3D::a11 | 
         
       
   | 
  
inherited   | 
  
 
 
◆ a12
  
  
      
        
          | double JMATH::JMatrix3D::a12 | 
         
       
   | 
  
inherited   | 
  
 
 
◆ a20
  
  
      
        
          | double JMATH::JMatrix3D::a20 | 
         
       
   | 
  
inherited   | 
  
 
 
◆ a21
  
  
      
        
          | double JMATH::JMatrix3D::a21 | 
         
       
   | 
  
inherited   | 
  
 
 
◆ a22
  
  
      
        
          | double JMATH::JMatrix3D::a22 | 
         
       
   | 
  
inherited   | 
  
 
 
The documentation for this struct was generated from the following file: