Belle II Software development
KLMClusterShape.cc
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
9/* Own header. */
10#include <klm/dataobjects/KLMClusterShape.h>
11
12
13using namespace Belle2;
14
16
19 m_nHits(0),
20 m_primaryVec{0., 0., 0., 0.},
21 m_secondaryVec{0., 0., 0., 0.},
22 m_tertiaryVec{0., 0., 0., 0.}
23{
24}
25
26
27
30 RelationsObject(clusterShape),
31 m_nHits(clusterShape.m_nHits),
32 m_primaryVec(clusterShape.m_primaryVec),
33 m_secondaryVec(clusterShape.m_secondaryVec),
34 m_tertiaryVec(clusterShape.m_tertiaryVec)
35{
36}
37
38
41{
42 m_nHits = clusterShape.m_nHits;
43
44 for (int i = 0; i < 4; i++) {
45 m_primaryVec[i] = clusterShape.m_primaryVec[i];
46 m_secondaryVec[i] = clusterShape.m_secondaryVec[i];
47 m_tertiaryVec[i] = clusterShape.m_tertiaryVec[i];
48 }
49 return *this;
50}
51
52//GETTERS (for vectors)
53ROOT::Math::XYZVector KLMClusterShape::getPrimaryVector()
54{
55 ROOT::Math::XYZVector output(m_primaryVec[0], m_primaryVec[1], m_primaryVec[2]);
56 return output;
57}
58
60{
61 ROOT::Math::XYZVector output(m_secondaryVec[0], m_secondaryVec[1], m_secondaryVec[2]);
62 return output;
63}
64
66{
67 ROOT::Math::XYZVector output(m_tertiaryVec[0], m_tertiaryVec[1], m_tertiaryVec[2]);
68 return output;
69}
70
71//setters
72void KLMClusterShape::setEigen(TMatrixT<double> eigenList)
73{
74 for (int i = 0; i < 4; i++) {
75 m_primaryVec[i] = eigenList[i][0];
76 m_secondaryVec[i] = eigenList[i][1];
77 m_tertiaryVec[i] = eigenList[i][2];
78 }
79
80}
81
82
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.
std::array< double, 4 > m_primaryVec
Principal axis eigenvector and eigenvalue.
ROOT::Math::XYZVector getTertiaryVector()
Get tertiary axis eigenvector.
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.
Abstract base class for different kinds of events.