Belle II Software  release-06-01-15
KLMHit2d.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/modules/KLMClustersReconstructor/KLMHit2d.h>
11 
12 using namespace Belle2;
13 
15  m_bklmHit(true),
16  m_bklmHit2d(bklmHit2d),
17  m_eklmHit2d(nullptr)
18 {
19 }
20 
22  m_bklmHit(false),
23  m_bklmHit2d(nullptr),
24  m_eklmHit2d(eklmHit2d)
25 {
26 }
27 
29 {
30 }
31 
32 TVector3 KLMHit2d::getPosition() const
33 {
34  if (m_bklmHit)
36  return m_eklmHit2d->getPosition();
37 }
38 
39 float KLMHit2d::getTime() const
40 {
41  if (m_bklmHit)
42  return m_bklmHit2d->getTime();
43  return m_eklmHit2d->getTime();
44 }
45 
46 int KLMHit2d::getLayer() const
47 {
48  if (m_bklmHit)
49  return m_bklmHit2d->getLayer();
50  return m_eklmHit2d->getLayer();
51 }
52 
Store one BKLM strip hit as a ROOT object.
Definition: BKLMHit2d.h:32
int getLayer() const
Get layer number.
Definition: BKLMHit2d.h:80
float getTime() const
Get reconstructed hit time.
Definition: BKLMHit2d.h:186
TVector3 getGlobalPosition(void) const
Get 3D hit position in global coordinates.
Definition: BKLMHit2d.h:179
Class for 2d hits handling.
Definition: EKLMHit2d.h:30
int getLayer() const
Get layer number.
Definition: EKLMHitBase.h:64
float getTime() const
Get hit time.
Definition: EKLMHitBase.h:118
TVector3 getPosition() const
Get hit global position.
int getLayer() const
Get hit layer.
Definition: KLMHit2d.cc:46
bool m_bklmHit
True if BKLM hit, false - EKLM.
Definition: KLMHit2d.h:87
float getTime() const
Get hit time.
Definition: KLMHit2d.cc:39
EKLMHit2d * m_eklmHit2d
EKLM hit.
Definition: KLMHit2d.h:93
BKLMHit2d * m_bklmHit2d
BKLM hit.
Definition: KLMHit2d.h:90
TVector3 getPosition() const
Get hit position.
Definition: KLMHit2d.cc:32
KLMHit2d(BKLMHit2d *bklmHit2d)
Constructor.
Definition: KLMHit2d.cc:14
~KLMHit2d()
Destructor.
Definition: KLMHit2d.cc:28
Abstract base class for different kinds of events.