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#include <framework/gearbox/Const.h>
19
20namespace Belle2 {
25
30
31 public:
32
36 KLMCluster();
37
48 KLMCluster(float x, float y, float z, float time, int nLayers,
49 int nInnermostLayer, float p);
50
55
60 inline float getTime() const
61 {return m_time;}
62
67 inline int getLayers() const
68 {return m_layers;}
69
74 inline int getInnermostLayer() const
75 {return m_innermostLayer;}
76
81 inline ROOT::Math::XYZVector getClusterPosition() const
82 {return ROOT::Math::XYZVector(m_globalX, m_globalY, m_globalZ);}
83
90 inline ROOT::Math::XYZVector getPosition() const
91 {return ROOT::Math::XYZVector(0, 0, 0);}
92
97 float getMomentumMag() const;
98
103 float getEnergy() const;
104
109 ROOT::Math::PxPyPzEVector getMomentum() const;
110
115 TMatrixDSym getError4x4() const;
116
121 TMatrixDSym getError7x7() const;
122
127 bool getAssociatedEclClusterFlag() const;
128
133 bool getAssociatedTrackFlag() const;
134
140
146
152
157 inline float getShapeStdDev1() const { return m_shapeStdDev1; }
158
163 inline float getShapeStdDev2() const { return m_shapeStdDev2; }
164
169 inline float getShapeStdDev3() const { return m_shapeStdDev3; }
170
175 void setClusterTrackRotationAngle(float rotation)
176 {
178 }
179
184 void setClusterTrackSeparationAngle(float separation)
185 {
187 }
188
194 {
196 }
197
202 void setShapeStdDev1(float std1)
203 {
204 m_shapeStdDev1 = std1;
205 }
206
211 void setShapeStdDev2(float std2)
212 {
213 m_shapeStdDev2 = std2;
214 }
215
220 void setShapeStdDev3(float std3)
221 {
222 m_shapeStdDev3 = std3;
223 }
224
229 void setTime(float time)
230 {
231 m_time = time;
232 }
233
238 void setLayers(int layers)
239 {
240 m_layers = layers;
241 }
242
247 void setInnermostLayer(int innermostLayer)
248 {
249 m_innermostLayer = innermostLayer;
250 }
251
258 void setClusterPosition(float globalX, float globalY, float globalZ)
259 {
260 m_globalX = globalX;
261 m_globalY = globalY;
262 m_globalZ = globalZ;
263 }
264
269 void setMomentumMag(float momentumMag)
270 {
271 m_p = momentumMag;
272 }
273
274 private:
275
277 float m_time;
278
281
284
287
290
293
295 float m_p;
296
299
302
305
307 float m_shapeStdDev1 = 0;
308
310 float m_shapeStdDev2 = 0;
311
313 float m_shapeStdDev3 = 0;
314
317
318 };
319
320}
static const float floatNaN
quiet_NaN
Definition Const.h:704
KLM cluster data.
Definition KLMCluster.h:29
bool getAssociatedTrackFlag() const
Check for associated tracks.
Definition KLMCluster.cc:62
void setShapeStdDev3(float std3)
Set std deviation of the 3rd axis, from PCA.
Definition KLMCluster.h:220
float m_time
Decay time.
Definition KLMCluster.h:277
float getEnergy() const
Get energy.
Definition KLMCluster.cc:43
int getInnermostLayer() const
Get number of the innermost layer with hits.
Definition KLMCluster.h:74
float getClusterTrackSeparationAngle() const
Get KLM cluster-track separation angle.
Definition KLMCluster.h:145
int m_innermostLayer
Number of the innermost layer with hits.
Definition KLMCluster.h:283
void setLayers(int layers)
Set number of layers with hits.
Definition KLMCluster.h:238
float getTime() const
Get time.
Definition KLMCluster.h:60
float m_globalX
Global position X coordinate.
Definition KLMCluster.h:286
void setClusterTrackSeparation(float dist)
Set KLM cluster-track distance.
Definition KLMCluster.h:193
int getLayers() const
Get number of layers with hits.
Definition KLMCluster.h:67
float getClusterTrackSeparation() const
Get KLM cluster-track distance.
Definition KLMCluster.h:151
float m_shapeStdDev1
Std deviation of axis 1 (from Cluster Shape PCA).
Definition KLMCluster.h:307
void setShapeStdDev2(float std2)
Set std deviation of the 2nd axis, from PCA.
Definition KLMCluster.h:211
TMatrixDSym getError7x7() const
Get KLM cluster momentum error matrix.
Definition KLMCluster.cc:95
float m_globalZ
Global position Z coordinate.
Definition KLMCluster.h:292
float m_shapeStdDev2
Std deviation of axis 2 (from Cluster Shape PCA).
Definition KLMCluster.h:310
float m_clusterTrackSeparation
Track-cluster separation (distance).
Definition KLMCluster.h:304
float m_shapeStdDev3
Std deviation of axis 3 (from Cluster Shape PCA).
Definition KLMCluster.h:313
float m_clusterTrackSeparationAngle
Track-cluster separation angle.
Definition KLMCluster.h:301
float getClusterTrackRotationAngle() const
Get KLM cluster-track rotation angle.
Definition KLMCluster.h:139
ClassDef(Belle2::KLMCluster, 4)
Needed to make objects storable.
float m_p
Absolute value of momentum, 0 means unknown.
Definition KLMCluster.h:295
float getShapeStdDev3() const
Get std deviation of the 3rd axis from PCA.
Definition KLMCluster.h:169
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:258
void setShapeStdDev1(float std1)
Set std deviation of the 1st axis, from PCA.
Definition KLMCluster.h:202
void setTime(float time)
Set time.
Definition KLMCluster.h:229
~KLMCluster()
Destructor.
Definition KLMCluster.cc:34
void setInnermostLayer(int innermostLayer)
Set number of the innermost layer with hits.
Definition KLMCluster.h:247
KLMCluster()
Constructor.
Definition KLMCluster.cc:22
void setMomentumMag(float momentumMag)
Set momentum magnitude.
Definition KLMCluster.h:269
float getMomentumMag() const
Get momentum magnitude.
Definition KLMCluster.cc:38
float getShapeStdDev1() const
Get std deviation of the 1st axis from PCA.
Definition KLMCluster.h:157
void setClusterTrackRotationAngle(float rotation)
Set KLM cluster-track rotation angle.
Definition KLMCluster.h:175
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:90
ROOT::Math::XYZVector getClusterPosition() const
Get global position (ROOT::Math::XYZVector version).
Definition KLMCluster.h:81
float m_clusterTrackRotationAngle
Track-cluster rotation angle.
Definition KLMCluster.h:298
ROOT::Math::PxPyPzEVector getMomentum() const
Get momentum.
Definition KLMCluster.cc:49
int m_layers
Number of layers with hits.
Definition KLMCluster.h:280
float getShapeStdDev2() const
Get KLM std deviation of the 2nd axis from PCA.
Definition KLMCluster.h:163
void setClusterTrackSeparationAngle(float separation)
Set KLM cluster-track separation angle.
Definition KLMCluster.h:184
float m_globalY
Global position Y coordinate.
Definition KLMCluster.h:289
RelationsInterface< TObject > RelationsObject
Provides interface for getting/adding relations to objects in StoreArrays.
Abstract base class for different kinds of events.