Belle II Software development
TOPSimHit.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#pragma once
10
11#include <simulation/dataobjects/SimHitBase.h>
12#include <Math/Point2D.h>
13
14namespace Belle2 {
27 class TOPSimHit : public SimHitBase {
28 public:
29
34 {}
35
46 int moduleID,
47 int pmtID,
48 double xLocal,
49 double yLocal,
50 double globalTime,
51 double energy_eV
52 ): SimHitBase()
53 {
54 m_moduleID = moduleID;
55 m_pmtID = pmtID;
56 m_x = (float) xLocal;
57 m_y = (float) yLocal;
58 m_globalTime = (float) globalTime;
59 m_energy = (float) energy_eV;
60 }
61
66 int getModuleID() const { return m_moduleID; }
67
72 int getPmtID() const { return m_pmtID; }
73
78 ROOT::Math::XYPoint getPosition() const { return ROOT::Math::XYPoint(m_x, m_y); }
79
84 double getX() const { return m_x; }
85
90 double getY() const { return m_y; }
91
96 double getTime() const { return m_globalTime; }
97
102 float getGlobalTime() const override { return m_globalTime; }
103
108 double getEnergy() const { return m_energy; }
109
114 void shiftInTime(float delta) override { m_globalTime += delta; }
115
116 private:
117
118 int m_moduleID = 0;
119 int m_pmtID = 0;
120 float m_x = 0;
121 float m_y = 0;
122 float m_globalTime = 0;
123 float m_energy = 0;
127 };
128
129
131} // end namespace Belle2
132
Class SimHitBase - A common base for subdetector SimHits.
Definition: SimHitBase.h:28
Class to store simulated hits of Cherenkov photons on PMT's input for digitization module (TOPDigitiz...
Definition: TOPSimHit.h:27
float m_globalTime
detection time
Definition: TOPSimHit.h:122
double getX() const
Returns local x position of hit (in PMT frame)
Definition: TOPSimHit.h:84
ClassDefOverride(TOPSimHit, 3)
ClassDef.
float getGlobalTime() const override
Returns detection time (implementation of base class function)
Definition: TOPSimHit.h:102
float m_energy
photon energy in [eV]
Definition: TOPSimHit.h:123
double getEnergy() const
Returns photon energy.
Definition: TOPSimHit.h:108
ROOT::Math::XYPoint getPosition() const
Returns local position of hit (in PMT frame)
Definition: TOPSimHit.h:78
int m_moduleID
TOP module ID.
Definition: TOPSimHit.h:118
int getModuleID() const
Returns module ID.
Definition: TOPSimHit.h:66
TOPSimHit()
Default constructor.
Definition: TOPSimHit.h:33
double getY() const
Returns local y position of hit (in PMT frame)
Definition: TOPSimHit.h:90
float m_y
detection position in local PMT frame, y component
Definition: TOPSimHit.h:121
void shiftInTime(float delta) override
Shift SimHit in time (needed for beam background mixing)
Definition: TOPSimHit.h:114
int m_pmtID
PMT ID.
Definition: TOPSimHit.h:119
float m_x
detection position in local PMT frame, x component
Definition: TOPSimHit.h:120
int getPmtID() const
Returns PMT ID.
Definition: TOPSimHit.h:72
TOPSimHit(int moduleID, int pmtID, double xLocal, double yLocal, double globalTime, double energy_eV)
Full constructor.
Definition: TOPSimHit.h:45
double getTime() const
Returns detection time.
Definition: TOPSimHit.h:96
Abstract base class for different kinds of events.