Belle II Software  release-05-02-19
TOPSimHit.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Marko Petric, Marko Staric *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <simulation/dataobjects/SimHitBase.h>
14 #include <TVector2.h>
15 
16 namespace Belle2 {
29  class TOPSimHit : public SimHitBase {
30  public:
31 
36  {}
37 
47  TOPSimHit(
48  int moduleID,
49  int pmtID,
50  double xLocal,
51  double yLocal,
52  double globalTime,
53  double energy_eV
54  ): SimHitBase()
55  {
56  m_moduleID = moduleID;
57  m_pmtID = pmtID;
58  m_x = (float) xLocal;
59  m_y = (float) yLocal;
60  m_globalTime = (float) globalTime;
61  m_energy = (float) energy_eV;
62  }
63 
68  int getModuleID() const { return m_moduleID; }
69 
74  int getPmtID() const { return m_pmtID; }
75 
80  TVector2 getPosition() const { return TVector2(m_x, m_y); }
81 
86  double getX() const { return m_x; }
87 
92  double getY() const { return m_y; }
93 
98  double getTime() const { return m_globalTime; }
99 
104  float getGlobalTime() const override { return m_globalTime; }
105 
110  double getEnergy() const { return m_energy; }
111 
116  void shiftInTime(float delta) override { m_globalTime += delta; }
117 
118  private:
119 
120  int m_moduleID = 0;
121  int m_pmtID = 0;
122  float m_x = 0;
123  float m_y = 0;
124  float m_globalTime = 0;
125  float m_energy = 0;
129  };
130 
131 
133 } // end namespace Belle2
134 
Belle2::TOPSimHit::getPosition
TVector2 getPosition() const
Returns local position of hit (in PMT frame)
Definition: TOPSimHit.h:88
Belle2::TOPSimHit::m_y
float m_y
detection position in local PMT frame, y component
Definition: TOPSimHit.h:131
Belle2::TOPSimHit::m_moduleID
int m_moduleID
TOP module ID.
Definition: TOPSimHit.h:128
Belle2::TOPSimHit
Class to store simulated hits of Cherenkov photons on PMT's input for digitization module (TOPDigitiz...
Definition: TOPSimHit.h:37
Belle2::TOPSimHit::getX
double getX() const
Returns local x position of hit (in PMT frame)
Definition: TOPSimHit.h:94
Belle2::TOPSimHit::m_pmtID
int m_pmtID
PMT ID.
Definition: TOPSimHit.h:129
Belle2::SimHitBase
Class SimHitBase - A common base for subdetector SimHits.
Definition: SimHitBase.h:38
Belle2::SimHitBase::SimHitBase
SimHitBase()
Constructor.
Definition: SimHitBase.h:43
Belle2::TOPSimHit::m_globalTime
float m_globalTime
detection time
Definition: TOPSimHit.h:132
Belle2::TOPSimHit::getGlobalTime
float getGlobalTime() const override
Returns detection time (implementation of base class function)
Definition: TOPSimHit.h:112
Belle2::TOPSimHit::m_x
float m_x
detection position in local PMT frame, x component
Definition: TOPSimHit.h:130
Belle2::TOPSimHit::ClassDefOverride
ClassDefOverride(TOPSimHit, 3)
ClassDef.
Belle2::TOPSimHit::m_energy
float m_energy
photon energy in [eV]
Definition: TOPSimHit.h:133
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TOPSimHit::shiftInTime
void shiftInTime(float delta) override
Shift SimHit in time (needed for beam background mixing)
Definition: TOPSimHit.h:124
Belle2::TOPSimHit::getTime
double getTime() const
Returns detection time.
Definition: TOPSimHit.h:106
Belle2::TOPSimHit::TOPSimHit
TOPSimHit()
Default constructor.
Definition: TOPSimHit.h:43
Belle2::TOPSimHit::getY
double getY() const
Returns local y position of hit (in PMT frame)
Definition: TOPSimHit.h:100
Belle2::TOPSimHit::getModuleID
int getModuleID() const
Returns module ID.
Definition: TOPSimHit.h:76
Belle2::TOPSimHit::getPmtID
int getPmtID() const
Returns PMT ID.
Definition: TOPSimHit.h:82
Belle2::TOPSimHit::getEnergy
double getEnergy() const
Returns photon energy.
Definition: TOPSimHit.h:118