Belle II Software development
KLMCluster.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
9#pragma once
10
11/* External headers. */
12#include <Math/Vector3D.h>
13#include <Math/Vector4D.h>
14#include <TMatrixDSym.h>
15
16/* Basf2 headers. */
17#include <framework/datastore/RelationsObject.h>
18
19namespace Belle2 {
29
30 public:
31
35 KLMCluster();
36
47 KLMCluster(float x, float y, float z, float time, int nLayers,
48 int nInnermostLayer, float p);
49
54
59 inline float getTime() const
60 {return m_time;}
61
66 inline int getLayers() const
67 {return m_layers;}
68
73 inline int getInnermostLayer() const
74 {return m_innermostLayer;}
75
80 inline ROOT::Math::XYZVector getClusterPosition() const
81 {return ROOT::Math::XYZVector(m_globalX, m_globalY, m_globalZ);}
82
89 inline ROOT::Math::XYZVector getPosition() const
90 {return ROOT::Math::XYZVector(0, 0, 0);}
91
96 float getMomentumMag() const;
97
102 float getEnergy() const;
103
108 ROOT::Math::PxPyPzEVector getMomentum() const;
109
114 TMatrixDSym getError4x4() const;
115
120 TMatrixDSym getError7x7() const;
121
126 bool getAssociatedEclClusterFlag() const;
127
132 bool getAssociatedTrackFlag() const;
133
138 void setTime(float time)
139 {m_time = time;}
140
145 void setLayers(int layers)
146 {m_layers = layers;}
147
152 void setInnermostLayer(int innermostLayer)
153 {m_innermostLayer = innermostLayer;}
154
161 void setClusterPosition(float globalX, float globalY, float globalZ)
162 {
163 m_globalX = globalX;
164 m_globalY = globalY;
165 m_globalZ = globalZ;
166 }
167
172 void setMomentumMag(float momentumMag)
173 {m_p = momentumMag;}
174
175 private:
176
178 float m_time;
179
182
185
188
191
194
196 float m_p;
197
200
201 };
202
204}
205
KLM cluster data.
Definition: KLMCluster.h:28
bool getAssociatedTrackFlag() const
Check for associated tracks.
Definition: KLMCluster.cc:62
float m_time
Decay time.
Definition: KLMCluster.h:178
float getEnergy() const
Get energy.
Definition: KLMCluster.cc:43
int getInnermostLayer() const
Get number of the innermost layer with hits.
Definition: KLMCluster.h:73
int m_innermostLayer
Number of the innermost layer with hits.
Definition: KLMCluster.h:184
void setLayers(int layers)
Set number of layers with hits.
Definition: KLMCluster.h:145
float getTime() const
Get time.
Definition: KLMCluster.h:59
float m_globalX
Global position X coordinate.
Definition: KLMCluster.h:187
int getLayers() const
Get number of layers with hits.
Definition: KLMCluster.h:66
TMatrixDSym getError7x7() const
Get KLM cluster momentum error matrix.
Definition: KLMCluster.cc:95
float m_globalZ
Global position Z coordinate.
Definition: KLMCluster.h:193
ClassDef(Belle2::KLMCluster, 3)
Needed to make objects storable.
float m_p
Absolute value of momentum, 0 means unknown.
Definition: KLMCluster.h:196
bool getAssociatedEclClusterFlag() const
Check for associated ECL clusters.
Definition: KLMCluster.cc:56
void setClusterPosition(float globalX, float globalY, float globalZ)
Set global position.
Definition: KLMCluster.h:161
void setTime(float time)
Set time.
Definition: KLMCluster.h:138
~KLMCluster()
Destructor.
Definition: KLMCluster.cc:34
void setInnermostLayer(int innermostLayer)
Set number of the innermost layer with hits.
Definition: KLMCluster.h:152
KLMCluster()
Constructor.
Definition: KLMCluster.cc:22
void setMomentumMag(float momentumMag)
Set momentum magnitude.
Definition: KLMCluster.h:172
float getMomentumMag() const
Get momentum magnitude.
Definition: KLMCluster.cc:38
TMatrixDSym getError4x4() const
Get KLM cluster momentum error matrix.
Definition: KLMCluster.cc:68
ROOT::Math::XYZVector getPosition() const
Get global position (ROOT::Math::XYZVector version) of the origin of KLMCluster (always return (0,...
Definition: KLMCluster.h:89
ROOT::Math::XYZVector getClusterPosition() const
Get global position (ROOT::Math::XYZVector version).
Definition: KLMCluster.h:80
ROOT::Math::PxPyPzEVector getMomentum() const
Get momentum.
Definition: KLMCluster.cc:49
int m_layers
Number of layers with hits.
Definition: KLMCluster.h:181
float m_globalY
Global position Y coordinate.
Definition: KLMCluster.h:190
Defines interface for accessing relations of objects in StoreArray.
Abstract base class for different kinds of events.