Belle II Software development
BgoSimHit.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 BgoSIMHIT_H
10#define BgoSIMHIT_H
11
12#include <simulation/dataobjects/SimHitBase.h>
13
14// ROOT
15#include <Math/Vector3D.h>
16
17namespace Belle2 {
31 class BgoSimHit : public SimHitBase {
32 public:
35 0) {;}
38 int CellId,
39 int TrackId,
40 int Pdg,
41 float FlightTime,
42 float Edep,
43 ROOT::Math::XYZVector Momentum,
44 ROOT::Math::XYZVector Position
45 ): SimHitBase(), m_CellId(CellId), m_TrackId(TrackId), m_Pdg(Pdg), m_FlightTime(FlightTime), m_Edep(Edep), m_Momentum(Momentum),
46 m_Position(Position)
47 {
48 }
49
50
51
52
55 void setCellId(int CellId) { m_CellId = CellId; }
56
59 void setTrackId(int TrackId) { m_TrackId = TrackId; }
60
63 void setPDGCode(int Pdg) { m_Pdg = Pdg; }
64
67 void setFlightTime(double FlightTime) { m_FlightTime = (float) FlightTime; }
68
71 void setEnergyDep(double Edep) { m_Edep = (float) Edep; }
72
75 void setMomentum(ROOT::Math::XYZVector Momentum) { m_Momentum = Momentum; }
76
79 void setPosIn(ROOT::Math::XYZVector Position) { m_Position = Position; }
80
83 void setPosition(ROOT::Math::XYZVector Position) { m_Position = Position; }
84
85
89 int getCellId() const { return m_CellId; }
90
94 int getTrackId() const { return m_TrackId; }
95
99 int getPDGCode() const { return m_Pdg; }
100
104 double getFlightTime() const { return (double)m_FlightTime; }
105
109 double getEnergyDep() const { return (double) m_Edep; }
110
114 ROOT::Math::XYZVector getMomentum() const { return m_Momentum; }
115
119 ROOT::Math::XYZVector getPosIn() const { return m_Position; }
120
124 ROOT::Math::XYZVector getPosition() const { return m_Position; }
125
126
130 void shiftInTime(float delta) override { m_FlightTime += delta; }
131
132
133 private:
136 int m_Pdg;
138 float m_Edep;
139 ROOT::Math::XYZVector m_Momentum;
140 ROOT::Math::XYZVector m_Position;
142 ClassDefOverride(BgoSimHit, 2)
143 };
144
146} // end namespace Belle2
147
148#endif
ClassBgoSimHit - Geant4 simulated hit for the Bgo crystal in beast.
Definition: BgoSimHit.h:31
ROOT::Math::XYZVector m_Position
Position.
Definition: BgoSimHit.h:140
int getPDGCode() const
Get Particle PDG (can be one of secondaries)
Definition: BgoSimHit.h:99
void setEnergyDep(double Edep)
Set Deposit energy.
Definition: BgoSimHit.h:71
int getTrackId() const
Get Track ID.
Definition: BgoSimHit.h:94
int getCellId() const
Get Cell ID.
Definition: BgoSimHit.h:89
int m_CellId
Cell ID.
Definition: BgoSimHit.h:134
double getFlightTime() const
Get Flight time from IP.
Definition: BgoSimHit.h:104
void setPDGCode(int Pdg)
Set Particle PDG (can be one of secondaries)
Definition: BgoSimHit.h:63
void setPosition(ROOT::Math::XYZVector Position)
Set Position.
Definition: BgoSimHit.h:83
void setCellId(int CellId)
Set Cell ID.
Definition: BgoSimHit.h:55
double getEnergyDep() const
Get Deposit energy.
Definition: BgoSimHit.h:109
float m_FlightTime
Flight time from IP.
Definition: BgoSimHit.h:137
float m_Edep
Deposit energy.
Definition: BgoSimHit.h:138
BgoSimHit()
default constructor for ROOT
Definition: BgoSimHit.h:34
void setPosIn(ROOT::Math::XYZVector Position)
Set Position.
Definition: BgoSimHit.h:79
BgoSimHit(int CellId, int TrackId, int Pdg, float FlightTime, float Edep, ROOT::Math::XYZVector Momentum, ROOT::Math::XYZVector Position)
Useful Constructor.
Definition: BgoSimHit.h:37
void setMomentum(ROOT::Math::XYZVector Momentum)
Set Momentum.
Definition: BgoSimHit.h:75
void setTrackId(int TrackId)
Set Track ID.
Definition: BgoSimHit.h:59
ROOT::Math::XYZVector getPosIn() const
Get Position.
Definition: BgoSimHit.h:119
void setFlightTime(double FlightTime)
Set Flight time from IP.
Definition: BgoSimHit.h:67
ROOT::Math::XYZVector getMomentum() const
Get Momentum.
Definition: BgoSimHit.h:114
ROOT::Math::XYZVector getPosition() const
Get Position.
Definition: BgoSimHit.h:124
void shiftInTime(float delta) override
Shift the SimHit in time (needed for beam background mixing)
Definition: BgoSimHit.h:130
ROOT::Math::XYZVector m_Momentum
Momentum.
Definition: BgoSimHit.h:139
int m_TrackId
Track ID.
Definition: BgoSimHit.h:135
int m_Pdg
Particle PDG (can be one of secondaries)
Definition: BgoSimHit.h:136
Class SimHitBase - A common base for subdetector SimHits.
Definition: SimHitBase.h:28
Abstract base class for different kinds of events.