Belle II Software  release-05-01-25
ARICHSimHit.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Luka Santelj *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef ARICHSIMHIT_H
12 #define ARICHSIMHIT_H
13 
14 #include <simulation/dataobjects/SimHitBase.h>
15 
16 #include <TVector2.h>
17 
18 namespace Belle2 {
25 
31  class ARICHSimHit : public SimHitBase {
32  public:
33 
36  m_moduleID(0),
37  m_x(0.0),
38  m_y(0.0),
40  m_energy(0.0)
41  {
43  }
44 
46 
55  int moduleID,
56  TVector2 position,
57  double globalTime,
58  double energy): SimHitBase()
59  {
60  m_moduleID = moduleID;
61  m_x = (float) position.X();
62  m_y = (float) position.Y();
63  m_globalTime = (float) globalTime;
64  m_energy = (float) energy;
65  }
66 
68  int getModuleID() const { return m_moduleID; }
69 
71  TVector2 getLocalPosition() const { TVector2 vec(m_x, m_y); return vec; }
72 
74  float getGlobalTime() const override { return m_globalTime; }
75 
77  double getEnergy() const { return m_energy; }
78 
82  void shiftInTime(float delta) override { m_globalTime += delta;}
83 
84 
85  private:
86  int m_moduleID;
87  float m_x;
88  float m_y;
89  float m_globalTime;
90  float m_energy;
94  };
95 
97 } // end namespace Belle2
98 
99 #endif
Belle2::ARICHSimHit::getLocalPosition
TVector2 getLocalPosition() const
Get local position of hit (in module coordinates)
Definition: ARICHSimHit.h:79
Belle2::ARICHSimHit::m_moduleID
int m_moduleID
ID number of module that registered hit.
Definition: ARICHSimHit.h:94
Belle2::ARICHSimHit::getModuleID
int getModuleID() const
Get ID number of module that registered hit.
Definition: ARICHSimHit.h:76
Belle2::ARICHSimHit::m_energy
float m_energy
Energy of detected photon.
Definition: ARICHSimHit.h:98
Belle2::SimHitBase
Class SimHitBase - A common base for subdetector SimHits.
Definition: SimHitBase.h:38
Belle2::SimHitBase::SimHitBase
SimHitBase()
Constructor.
Definition: SimHitBase.h:43
Belle2::ARICHSimHit::m_x
float m_x
Local position of hit, x component (in module coordinates)
Definition: ARICHSimHit.h:95
Belle2::ARICHSimHit::m_y
float m_y
Local position of hit, y component (in module coordinates)
Definition: ARICHSimHit.h:96
Belle2::ARICHSimHit::ARICHSimHit
ARICHSimHit()
Default constructor.
Definition: ARICHSimHit.h:43
Belle2::ARICHSimHit::shiftInTime
void shiftInTime(float delta) override
Shift the SimHit in time (needed for beam background mixing)
Definition: ARICHSimHit.h:90
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ARICHSimHit::m_globalTime
float m_globalTime
Global time of hit.
Definition: ARICHSimHit.h:97
Belle2::ARICHSimHit
Class ARICHSimHit - Geant4 simulated hit for ARICH.
Definition: ARICHSimHit.h:39
Belle2::ARICHSimHit::getEnergy
double getEnergy() const
Get detected photon energy.
Definition: ARICHSimHit.h:85
Belle2::ARICHSimHit::ClassDefOverride
ClassDefOverride(ARICHSimHit, 1)
the class title
Belle2::ARICHSimHit::getGlobalTime
float getGlobalTime() const override
Get global time of hit.
Definition: ARICHSimHit.h:82