Belle II Software  release-08-01-10
ARICHSimHit.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 #ifndef ARICHSIMHIT_H
10 #define ARICHSIMHIT_H
11 
12 #include <simulation/dataobjects/SimHitBase.h>
13 
14 #include <TVector2.h>
15 
16 namespace Belle2 {
24 
29  class ARICHSimHit : public SimHitBase {
30  public:
31 
34  m_moduleID(0),
35  m_x(0.0),
36  m_y(0.0),
37  m_globalTime(0.0),
38  m_energy(0.0)
39  {
41  }
42 
44 
53  int moduleID,
54  TVector2 position,
55  double globalTime,
56  double energy): SimHitBase()
57  {
58  m_moduleID = moduleID;
59  m_x = (float) position.X();
60  m_y = (float) position.Y();
61  m_globalTime = (float) globalTime;
62  m_energy = (float) energy;
63  }
64 
66  int getModuleID() const { return m_moduleID; }
67 
69  TVector2 getLocalPosition() const { TVector2 vec(m_x, m_y); return vec; }
70 
72  float getGlobalTime() const override { return m_globalTime; }
73 
75  double getEnergy() const { return m_energy; }
76 
80  void shiftInTime(float delta) override { m_globalTime += delta;}
81 
82 
83  private:
84  int m_moduleID;
85  float m_x;
86  float m_y;
87  float m_globalTime;
88  float m_energy;
92  };
93 
95 } // end namespace Belle2
96 
97 #endif
Class ARICHSimHit - Geant4 simulated hit for ARICH.
Definition: ARICHSimHit.h:29
ClassDefOverride(ARICHSimHit, 1)
the class title
float m_globalTime
Global time of hit.
Definition: ARICHSimHit.h:87
ARICHSimHit()
Default constructor.
Definition: ARICHSimHit.h:33
float getGlobalTime() const override
Get global time of hit.
Definition: ARICHSimHit.h:72
float m_energy
Energy of detected photon.
Definition: ARICHSimHit.h:88
double getEnergy() const
Get detected photon energy.
Definition: ARICHSimHit.h:75
int m_moduleID
ID number of module that registered hit.
Definition: ARICHSimHit.h:84
int getModuleID() const
Get ID number of module that registered hit.
Definition: ARICHSimHit.h:66
TVector2 getLocalPosition() const
Get local position of hit (in module coordinates)
Definition: ARICHSimHit.h:69
ARICHSimHit(int moduleID, TVector2 position, double globalTime, double energy)
Full constructor.
Definition: ARICHSimHit.h:52
float m_y
Local position of hit, y component (in module coordinates)
Definition: ARICHSimHit.h:86
void shiftInTime(float delta) override
Shift the SimHit in time (needed for beam background mixing)
Definition: ARICHSimHit.h:80
float m_x
Local position of hit, x component (in module coordinates)
Definition: ARICHSimHit.h:85
Class SimHitBase - A common base for subdetector SimHits.
Definition: SimHitBase.h:28
Abstract base class for different kinds of events.