Belle II Software  release-05-02-19
KLMCluster.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2013 Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Timofey Uglov, Kirill Chilikin *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 /* External headers. */
14 #include <TLorentzVector.h>
15 #include <TMatrixDSym.h>
16 #include <TVector3.h>
17 
18 /* Belle2 headers. */
19 #include <framework/datastore/RelationsObject.h>
20 
21 namespace Belle2 {
30  class KLMCluster: public RelationsObject {
31 
32  public:
33 
37  KLMCluster();
38 
49  KLMCluster(float x, float y, float z, float time, int nLayers,
50  int nInnermostLayer, float p);
51 
55  ~KLMCluster();
56 
61  inline float getTime() const
62  {return m_time;}
63 
68  inline int getLayers() const
69  {return m_layers;}
70 
75  inline int getInnermostLayer() const
76  {return m_innermostLayer;}
77 
82  inline TVector3 getClusterPosition() const
83  {return TVector3(m_globalX, m_globalY, m_globalZ);}
84 
91  inline TVector3 getPosition() const
92  {return TVector3(0, 0, 0);}
93 
98  float getMomentumMag() const;
99 
104  float getEnergy() const;
105 
110  TLorentzVector getMomentum() const;
111 
116  TMatrixDSym getError4x4() const;
117 
122  TMatrixDSym getError7x7() const;
123 
128  bool getAssociatedEclClusterFlag() const;
129 
134  bool getAssociatedTrackFlag() const;
135 
140  void setTime(float time)
141  {m_time = time;}
142 
147  void setLayers(int layers)
148  {m_layers = layers;}
149 
154  void setInnermostLayer(int innermostLayer)
155  {m_innermostLayer = innermostLayer;}
156 
163  void setClusterPosition(float globalX, float globalY, float globalZ)
164  {
165  m_globalX = globalX;
166  m_globalY = globalY;
167  m_globalZ = globalZ;
168  }
169 
174  void setMomentumMag(float momentumMag)
175  {m_p = momentumMag;}
176 
181  void setErrorX(float errorX)
182  {m_errorX = errorX;}
183 
188  void setErrorY(float errorY)
189  {m_errorY = errorY;}
190 
195  void setErrorZ(float errorZ)
196  {m_errorZ = errorZ;}
197 
202  void setErrorP(float errorP)
203  {m_errorP = errorP;}
204 
205  private:
206 
208  float m_time;
209 
211  int m_layers;
212 
214  int m_innermostLayer;
215 
217  float m_globalX;
218 
220  float m_globalY;
221 
223  float m_globalZ;
224 
226  float m_p;
227 
229  float m_errorX;
230 
232  float m_errorY;
233 
235  float m_errorZ;
236 
238  float m_errorP;
239 
242 
243  };
244 
246 }
247 
Belle2::KLMCluster::getEnergy
float getEnergy() const
Get energy.
Definition: KLMCluster.cc:44
Belle2::KLMCluster::setErrorP
void setErrorP(float errorP)
Set error of momentum absolute value.
Definition: KLMCluster.h:210
Belle2::KLMCluster::getInnermostLayer
int getInnermostLayer() const
Get number of the innermost layer with hits.
Definition: KLMCluster.h:83
Belle2::KLMCluster::getLayers
int getLayers() const
Get number of layers with hits.
Definition: KLMCluster.h:76
Belle2::KLMCluster::m_errorP
float m_errorP
Error of momentum absolute value.
Definition: KLMCluster.h:246
Belle2::KLMCluster::getClusterPosition
TVector3 getClusterPosition() const
Get global position (TVector3 version).
Definition: KLMCluster.h:90
Belle2::KLMCluster::m_globalX
float m_globalX
Global position X coordinate.
Definition: KLMCluster.h:225
Belle2::KLMCluster::setErrorZ
void setErrorZ(float errorZ)
Set error of vertex Z coordinate.
Definition: KLMCluster.h:203
Belle2::KLMCluster::setTime
void setTime(float time)
Set time.
Definition: KLMCluster.h:148
Belle2::KLMCluster::~KLMCluster
~KLMCluster()
Destructor.
Definition: KLMCluster.cc:35
Belle2::KLMCluster::m_layers
int m_layers
Number of layers with hits.
Definition: KLMCluster.h:219
Belle2::KLMCluster::getError4x4
TMatrixDSym getError4x4() const
Get KLM cluster momentum error matrix.
Definition: KLMCluster.cc:69
Belle2::KLMCluster::m_p
float m_p
Absolute value of momentum, 0 means unknown.
Definition: KLMCluster.h:234
Belle2::KLMCluster::setErrorY
void setErrorY(float errorY)
Set error of vertex Y coordinate.
Definition: KLMCluster.h:196
Belle2::KLMCluster::setErrorX
void setErrorX(float errorX)
Set error of vertex X coordinate.
Definition: KLMCluster.h:189
Belle2::KLMCluster::m_globalY
float m_globalY
Global position Y coordinate.
Definition: KLMCluster.h:228
Belle2::KLMCluster::setClusterPosition
void setClusterPosition(float globalX, float globalY, float globalZ)
Set global position.
Definition: KLMCluster.h:171
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::KLMCluster::ClassDef
ClassDef(Belle2::KLMCluster, 2)
Needed to make objects storable.
Belle2::KLMCluster::KLMCluster
KLMCluster()
Constructor.
Definition: KLMCluster.cc:21
Belle2::KLMCluster::getPosition
TVector3 getPosition() const
Get global position (TVector3 version) of the origin of KLMCluster (always return (0,...
Definition: KLMCluster.h:99
Belle2::KLMCluster::getTime
float getTime() const
Get time.
Definition: KLMCluster.h:69
Belle2::KLMCluster::getMomentum
TLorentzVector getMomentum() const
Get momentum.
Definition: KLMCluster.cc:50
Belle2::KLMCluster::m_errorX
float m_errorX
Error of vertex X coordinate.
Definition: KLMCluster.h:237
Belle2::KLMCluster::m_errorZ
float m_errorZ
Error of vertex Z coordinate.
Definition: KLMCluster.h:243
Belle2::KLMCluster::getMomentumMag
float getMomentumMag() const
Get momentum magnitude.
Definition: KLMCluster.cc:39
Belle2::KLMCluster
KLM cluster data.
Definition: KLMCluster.h:38
Belle2::KLMCluster::setLayers
void setLayers(int layers)
Set number of layers with hits.
Definition: KLMCluster.h:155
Belle2::RelationsObject
RelationsInterface< TObject > RelationsObject
Provides interface for getting/adding relations to objects in StoreArrays.
Definition: RelationsObject.h:443
Belle2::KLMCluster::m_innermostLayer
int m_innermostLayer
Number of the innermost layer with hits.
Definition: KLMCluster.h:222
Belle2::KLMCluster::m_globalZ
float m_globalZ
Global position Z coordinate.
Definition: KLMCluster.h:231
Belle2::KLMCluster::setInnermostLayer
void setInnermostLayer(int innermostLayer)
Set number of the innermost layer with hits.
Definition: KLMCluster.h:162
Belle2::KLMCluster::m_errorY
float m_errorY
Error of vertex Y coordinate.
Definition: KLMCluster.h:240
Belle2::KLMCluster::getAssociatedTrackFlag
bool getAssociatedTrackFlag() const
Check for associated tracks.
Definition: KLMCluster.cc:63
Belle2::KLMCluster::setMomentumMag
void setMomentumMag(float momentumMag)
Set momentum magnitude.
Definition: KLMCluster.h:182
Belle2::KLMCluster::getError7x7
TMatrixDSym getError7x7() const
Get KLM cluster momentum error matrix.
Definition: KLMCluster.cc:100
Belle2::KLMCluster::m_time
float m_time
Decay time.
Definition: KLMCluster.h:216
Belle2::KLMCluster::getAssociatedEclClusterFlag
bool getAssociatedEclClusterFlag() const
Check for associated ECL clusters.
Definition: KLMCluster.cc:57