Belle II Software  release-08-01-10
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 
19 namespace Belle2 {
28  class KLMCluster: public RelationsObject {
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 
53  ~KLMCluster();
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 
179  void setErrorX(float errorX)
180  {m_errorX = errorX;}
181 
186  void setErrorY(float errorY)
187  {m_errorY = errorY;}
188 
193  void setErrorZ(float errorZ)
194  {m_errorZ = errorZ;}
195 
200  void setErrorP(float errorP)
201  {m_errorP = errorP;}
202 
203  private:
204 
206  float m_time;
207 
209  int m_layers;
210 
213 
215  float m_globalX;
216 
218  float m_globalY;
219 
221  float m_globalZ;
222 
224  float m_p;
225 
227  float m_errorX;
228 
230  float m_errorY;
231 
233  float m_errorZ;
234 
236  float m_errorP;
237 
240 
241  };
242 
244 }
245 
KLM cluster data.
Definition: KLMCluster.h:28
bool getAssociatedTrackFlag() const
Check for associated tracks.
Definition: KLMCluster.cc:64
float m_time
Decay time.
Definition: KLMCluster.h:206
float getEnergy() const
Get energy.
Definition: KLMCluster.cc:45
int getInnermostLayer() const
Get number of the innermost layer with hits.
Definition: KLMCluster.h:73
ClassDef(Belle2::KLMCluster, 2)
Needed to make objects storable.
int m_innermostLayer
Number of the innermost layer with hits.
Definition: KLMCluster.h:212
void setLayers(int layers)
Set number of layers with hits.
Definition: KLMCluster.h:145
void setErrorZ(float errorZ)
Set error of vertex Z coordinate.
Definition: KLMCluster.h:193
float getTime() const
Get time.
Definition: KLMCluster.h:59
float m_globalX
Global position X coordinate.
Definition: KLMCluster.h:215
int getLayers() const
Get number of layers with hits.
Definition: KLMCluster.h:66
float m_errorX
Error of vertex X coordinate.
Definition: KLMCluster.h:227
TMatrixDSym getError7x7() const
Get KLM cluster momentum error matrix.
Definition: KLMCluster.cc:101
float m_globalZ
Global position Z coordinate.
Definition: KLMCluster.h:221
void setErrorX(float errorX)
Set error of vertex X coordinate.
Definition: KLMCluster.h:179
float m_p
Absolute value of momentum, 0 means unknown.
Definition: KLMCluster.h:224
bool getAssociatedEclClusterFlag() const
Check for associated ECL clusters.
Definition: KLMCluster.cc:58
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:36
void setInnermostLayer(int innermostLayer)
Set number of the innermost layer with hits.
Definition: KLMCluster.h:152
KLMCluster()
Constructor.
Definition: KLMCluster.cc:22
float m_errorP
Error of momentum absolute value.
Definition: KLMCluster.h:236
float m_errorY
Error of vertex Y coordinate.
Definition: KLMCluster.h:230
void setMomentumMag(float momentumMag)
Set momentum magnitude.
Definition: KLMCluster.h:172
void setErrorP(float errorP)
Set error of momentum absolute value.
Definition: KLMCluster.h:200
float getMomentumMag() const
Get momentum magnitude.
Definition: KLMCluster.cc:40
TMatrixDSym getError4x4() const
Get KLM cluster momentum error matrix.
Definition: KLMCluster.cc:70
ROOT::Math::XYZVector getPosition() const
Get global position (ROOT::Math::XYZVector version) of the origin of KLMCluster (always return (0,...
Definition: KLMCluster.h:89
float m_errorZ
Error of vertex Z coordinate.
Definition: KLMCluster.h:233
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:51
int m_layers
Number of layers with hits.
Definition: KLMCluster.h:209
void setErrorY(float errorY)
Set error of vertex Y coordinate.
Definition: KLMCluster.h:186
float m_globalY
Global position Y coordinate.
Definition: KLMCluster.h:218
Defines interface for accessing relations of objects in StoreArray.
Abstract base class for different kinds of events.