Belle II Software development
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 <Math/Vector2D.h>
15
16namespace 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
52 int moduleID,
53 ROOT::Math::XYVector position,
54 double globalTime,
55 double energy): SimHitBase()
56 {
57 m_moduleID = moduleID;
58 m_x = (float) position.X();
59 m_y = (float) position.Y();
60 m_globalTime = (float) globalTime;
61 m_energy = (float) energy;
62 }
63
65 int getModuleID() const { return m_moduleID; }
66
68 ROOT::Math::XYVector getLocalPosition() const { return ROOT::Math::XYVector(m_x, m_y); }
69
71 float getGlobalTime() const override { return m_globalTime; }
72
74 double getEnergy() const { return m_energy; }
75
79 void shiftInTime(float delta) override { m_globalTime += delta;}
80
81
82 private:
84 float m_x;
85 float m_y;
87 float m_energy;
91 };
92
94} // end namespace Belle2
95
96#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:86
ARICHSimHit(int moduleID, ROOT::Math::XYVector position, double globalTime, double energy)
Full constructor.
Definition: ARICHSimHit.h:51
ARICHSimHit()
Default constructor.
Definition: ARICHSimHit.h:33
float getGlobalTime() const override
Get global time of hit.
Definition: ARICHSimHit.h:71
float m_energy
Energy of detected photon.
Definition: ARICHSimHit.h:87
double getEnergy() const
Get detected photon energy.
Definition: ARICHSimHit.h:74
int m_moduleID
ID number of module that registered hit.
Definition: ARICHSimHit.h:83
int getModuleID() const
Get ID number of module that registered hit.
Definition: ARICHSimHit.h:65
ROOT::Math::XYVector getLocalPosition() const
Get local position of hit (in module coordinates)
Definition: ARICHSimHit.h:68
float m_y
Local position of hit, y component (in module coordinates)
Definition: ARICHSimHit.h:85
void shiftInTime(float delta) override
Shift the SimHit in time (needed for beam background mixing)
Definition: ARICHSimHit.h:79
float m_x
Local position of hit, x component (in module coordinates)
Definition: ARICHSimHit.h:84
Class SimHitBase - A common base for subdetector SimHits.
Definition: SimHitBase.h:28
Abstract base class for different kinds of events.