Belle II Software development
CsiSimHit.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 CsiSIMHIT_H
10#define CsiSIMHIT_H
11
12#include <simulation/dataobjects/SimHitBase.h>
13
14// ROOT
15#include <Math/Vector3D.h>
16
17namespace Belle2 {
31 class CsiSimHit : 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
53 void setCellId(int CellId) { m_CellId = CellId; }
54
57 void setTrackId(int TrackId) { m_TrackId = TrackId; }
58
61 void setPDGCode(int Pdg) { m_Pdg = Pdg; }
62
65 void setFlightTime(double FlightTime) { m_FlightTime = (float) FlightTime; }
66
69 void setEnergyDep(double Edep) { m_Edep = (float) Edep; }
70
73 void setMomentum(ROOT::Math::XYZVector Momentum) { m_Momentum = Momentum; }
74
77 void setPosIn(ROOT::Math::XYZVector Position) { m_Position = Position; }
78
81 void setPosition(ROOT::Math::XYZVector Position) { m_Position = Position; }
82
83
87 int getCellId() const { return m_CellId; }
88
92 int getTrackId() const { return m_TrackId; }
93
97 int getPDGCode() const { return m_Pdg; }
98
102 double getFlightTime() const { return (double)m_FlightTime; }
103
107 double getEnergyDep() const { return (double) m_Edep; }
108
112 ROOT::Math::XYZVector getMomentum() const { return m_Momentum; }
113
117 ROOT::Math::XYZVector getPosIn() const { return m_Position; }
118
122 ROOT::Math::XYZVector getPosition() const { return m_Position; }
123
124
128 void shiftInTime(float delta) override { m_FlightTime += delta; }
129
130
131 private:
134 int m_Pdg;
136 float m_Edep;
137 ROOT::Math::XYZVector m_Momentum;
138 ROOT::Math::XYZVector m_Position;
140 ClassDefOverride(CsiSimHit, 2)
141 };
142
144} // end namespace Belle2
145
146#endif
ClassCsiSimHit - Geant4 simulated hits in CsI crystals in BEAST.
Definition: CsiSimHit.h:31
ROOT::Math::XYZVector m_Position
Position.
Definition: CsiSimHit.h:138
int getPDGCode() const
Get Particle PDG (can be one of secondaries)
Definition: CsiSimHit.h:97
void setEnergyDep(double Edep)
Set Deposit energy.
Definition: CsiSimHit.h:69
int getTrackId() const
Get Track ID.
Definition: CsiSimHit.h:92
CsiSimHit()
default constructor for ROOT
Definition: CsiSimHit.h:34
int getCellId() const
Get Cell ID.
Definition: CsiSimHit.h:87
int m_CellId
Cell ID.
Definition: CsiSimHit.h:132
double getFlightTime() const
Get Flight time from IP.
Definition: CsiSimHit.h:102
void setPDGCode(int Pdg)
Set Particle PDG (can be one of secondaries)
Definition: CsiSimHit.h:61
void setPosition(ROOT::Math::XYZVector Position)
Set Position.
Definition: CsiSimHit.h:81
void setCellId(int CellId)
Set Cell ID.
Definition: CsiSimHit.h:53
double getEnergyDep() const
Get Deposit energy.
Definition: CsiSimHit.h:107
float m_FlightTime
Flight time from IP.
Definition: CsiSimHit.h:135
float m_Edep
Deposit energy.
Definition: CsiSimHit.h:136
void setPosIn(ROOT::Math::XYZVector Position)
Set Position.
Definition: CsiSimHit.h:77
void setMomentum(ROOT::Math::XYZVector Momentum)
Set Momentum.
Definition: CsiSimHit.h:73
void setTrackId(int TrackId)
Set Track ID.
Definition: CsiSimHit.h:57
ROOT::Math::XYZVector getPosIn() const
Get Position.
Definition: CsiSimHit.h:117
CsiSimHit(int CellId, int TrackId, int Pdg, float FlightTime, float Edep, ROOT::Math::XYZVector Momentum, ROOT::Math::XYZVector Position)
Useful Constructor.
Definition: CsiSimHit.h:37
void setFlightTime(double FlightTime)
Set Flight time from IP.
Definition: CsiSimHit.h:65
ROOT::Math::XYZVector getMomentum() const
Get Momentum.
Definition: CsiSimHit.h:112
ROOT::Math::XYZVector getPosition() const
Get Position.
Definition: CsiSimHit.h:122
void shiftInTime(float delta) override
Shift the SimHit in time (needed for beam background mixing)
Definition: CsiSimHit.h:128
ROOT::Math::XYZVector m_Momentum
Momentum.
Definition: CsiSimHit.h:137
int m_TrackId
Track ID.
Definition: CsiSimHit.h:133
int m_Pdg
Particle PDG (can be one of secondaries)
Definition: CsiSimHit.h:134
Class SimHitBase - A common base for subdetector SimHits.
Definition: SimHitBase.h:28
Abstract base class for different kinds of events.