Belle II Software development
KLMClusterShape.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10/* Basf2 headers. */
11#include <framework/datastore/RelationsObject.h>
12
13/* ROOT headers. */
14#include <Math/Vector3D.h>
15#include <TMatrixT.h>
16
17/* C++ headers. */
18#include <cmath>
19
20namespace Belle2 {
30
31 public:
32
37
42
45
50 {
51 }
52
53 //Define get functions to obtain private information
54
56 double getVariance1() const
57 {
58 return std::abs(m_primaryVec[3]);
59 }
60
62 double getVariance2() const
63 {
64 return std::abs(m_secondaryVec[3]);
65 }
66
68 double getVariance3() const
69 {
70 return std::abs(m_tertiaryVec[3]);
71 }
72
76 ROOT::Math::XYZVector getPrimaryVector();
77
79 ROOT::Math::XYZVector getSecondaryVector();
80
82 ROOT::Math::XYZVector getTertiaryVector();
83
85 int getNHits() const
86 {
87 return m_nHits;
88 }
89
91 void setEigen(TMatrixT<double> eigenList);
92
94 void setNHits(int nHits)
95 {
96 m_nHits = nHits;
97 }
98
99 private:
100
103
104
105 //Normalization for eigenvectors should be unity.
106 //Indexing: 0-2 is unit eigenvector, 3 is eigenvalue.
107
109 std::array<double, 4> m_primaryVec;
110
112 std::array<double, 4> m_secondaryVec;
113
115 std::array<double, 4> m_tertiaryVec;
116
119
120 }; // end of public RelationsObject
121
123}// end of namespace Belle2
124
Variable for KLM cluster shape analysis.
KLMClusterShape()
Empty Constructor for ROOT IO (needed to make the class storable).
std::array< double, 4 > m_tertiaryVec
Principal axis eigenvector and eigenvalue.
KLMClusterShape & operator=(const KLMClusterShape &)
Assignment operator.
int m_nHits
Number of hits.
void setEigen(TMatrixT< double > eigenList)
Set eigenvectors and eigenvalues.
void setNHits(int nHits)
Set number of hits.
~KLMClusterShape()
Destructor.
double getVariance1() const
Get principal axis eigenvector.
double getVariance3() const
Get tertiary axis eigenvector.
std::array< double, 4 > m_primaryVec
Principal axis eigenvector and eigenvalue.
ROOT::Math::XYZVector getTertiaryVector()
Get tertiary axis eigenvector.
double getVariance2() const
Get secondary axis eigenvector.
int getNHits() const
Get number of hits used in a cluster.
std::array< double, 4 > m_secondaryVec
Principal axis eigenvector and eigenvalue.
ROOT::Math::XYZVector getPrimaryVector()
Get eigenvectors.
ROOT::Math::XYZVector getSecondaryVector()
Get secondary axis eigenvector.
Defines interface for accessing relations of objects in StoreArray.
ClassDef(RelationsInterface, 0)
defines interface for accessing relations of objects in StoreArray.
Abstract base class for different kinds of events.