Belle II Software development
BgoHit.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 BgoHIT_H
10#define BgoHIT_H
11
12#include <simulation/dataobjects/SimHitBase.h>
13
14// ROOT
15#include <Math/Vector3D.h>
16
17namespace Belle2 {
31 class BgoHit : public SimHitBase {
32 public:
34 BgoHit(): SimHitBase(), m_CellId(0), m_TrackId(0), m_Pdg(0), m_FlightTime(0), m_Edep(0), m_Momentum(0, 0, 0), m_Position(0, 0, 0),
35 m_Erecdep(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 float Erecdep
46 ): SimHitBase(), m_CellId(CellId), m_TrackId(TrackId), m_Pdg(Pdg), m_FlightTime(FlightTime), m_Edep(Edep), m_Momentum(Momentum),
47 m_Position(Position), m_Erecdep(Erecdep)
48 {
49 }
50
51
52
53
56 void setCellId(int CellId) { m_CellId = CellId; }
57
60 void setTrackId(int TrackId) { m_TrackId = TrackId; }
61
64 void setPDGCode(int Pdg) { m_Pdg = Pdg; }
65
68 void setFlightTime(double FlightTime) { m_FlightTime = (float) FlightTime; }
69
72 void setEnergyDep(double Edep) { m_Edep = (float) Edep; }
73
76 void setMomentum(ROOT::Math::XYZVector Momentum) { m_Momentum = Momentum; }
77
80 void setPosIn(ROOT::Math::XYZVector Position) { m_Position = Position; }
81
84 void setPosition(ROOT::Math::XYZVector Position) { m_Position = Position; }
85
86
90 int getCellId() const { return m_CellId; }
91
95 int getTrackId() const { return m_TrackId; }
96
100 int getPDGCode() const { return m_Pdg; }
101
105 double getFlightTime() const { return (double)m_FlightTime; }
106
110 double getEnergyDep() const { return (double) m_Edep; }
111
115 double getEnergyRecDep() const { return (double) m_Erecdep; }
116
120 ROOT::Math::XYZVector getMomentum() const { return m_Momentum; }
121
125 ROOT::Math::XYZVector getPosIn() const { return m_Position; }
126
130 ROOT::Math::XYZVector getPosition() const { return m_Position; }
131
132
136 void shiftInTime(float delta) override { m_FlightTime += delta; }
137
138
139 private:
142 int m_Pdg;
144 float m_Edep;
145 ROOT::Math::XYZVector m_Momentum;
146 ROOT::Math::XYZVector m_Position;
147 float m_Erecdep;
149 ClassDefOverride(BgoHit, 2)
150 };
151
153} // end namespace Belle2
154
155#endif
ClassBgoHit - Geant4 ulated hit for the Bgo crystal in beast.
Definition: BgoHit.h:31
ROOT::Math::XYZVector m_Position
Position.
Definition: BgoHit.h:146
int getPDGCode() const
Get Particle PDG (can be one of secondaries)
Definition: BgoHit.h:100
void setEnergyDep(double Edep)
Set Deposit energy.
Definition: BgoHit.h:72
int getTrackId() const
Get Track ID.
Definition: BgoHit.h:95
BgoHit()
default constructor for ROOT
Definition: BgoHit.h:34
int getCellId() const
Get Cell ID.
Definition: BgoHit.h:90
int m_CellId
Cell ID.
Definition: BgoHit.h:140
double getFlightTime() const
Get Flight time from IP.
Definition: BgoHit.h:105
void setPDGCode(int Pdg)
Set Particle PDG (can be one of secondaries)
Definition: BgoHit.h:64
void setPosition(ROOT::Math::XYZVector Position)
Set Position.
Definition: BgoHit.h:84
double getEnergyRecDep() const
Get Deposit energy folded by resolution.
Definition: BgoHit.h:115
void setCellId(int CellId)
Set Cell ID.
Definition: BgoHit.h:56
double getEnergyDep() const
Get Deposit energy.
Definition: BgoHit.h:110
float m_FlightTime
Flight time from IP.
Definition: BgoHit.h:143
float m_Edep
Deposit energy.
Definition: BgoHit.h:144
void setPosIn(ROOT::Math::XYZVector Position)
Set Position.
Definition: BgoHit.h:80
void setMomentum(ROOT::Math::XYZVector Momentum)
Set Momentum.
Definition: BgoHit.h:76
BgoHit(int CellId, int TrackId, int Pdg, float FlightTime, float Edep, ROOT::Math::XYZVector Momentum, ROOT::Math::XYZVector Position, float Erecdep)
Useful Constructor.
Definition: BgoHit.h:37
float m_Erecdep
Deposit energy reconstructed.
Definition: BgoHit.h:147
void setTrackId(int TrackId)
Set Track ID.
Definition: BgoHit.h:60
ROOT::Math::XYZVector getPosIn() const
Get Position.
Definition: BgoHit.h:125
void setFlightTime(double FlightTime)
Set Flight time from IP.
Definition: BgoHit.h:68
ROOT::Math::XYZVector getMomentum() const
Get Momentum.
Definition: BgoHit.h:120
ROOT::Math::XYZVector getPosition() const
Get Position.
Definition: BgoHit.h:130
void shiftInTime(float delta) override
Shift the Hit in time (needed for beam background mixing)
Definition: BgoHit.h:136
ROOT::Math::XYZVector m_Momentum
Momentum.
Definition: BgoHit.h:145
int m_TrackId
Track ID.
Definition: BgoHit.h:141
int m_Pdg
Particle PDG (can be one of secondaries)
Definition: BgoHit.h:142
Class SimHitBase - A common base for subdetector SimHits.
Definition: SimHitBase.h:28
Abstract base class for different kinds of events.