Belle II Software development
TPCSimHit.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 TPCSIMHIT_H
10#define TPCSIMHIT_H
11
12#include <simulation/dataobjects/SimHitBase.h>
13
14// ROOT
15#include <Math/Vector3D.h>
16
17namespace Belle2 {
31 class TPCSimHit : public SimHitBase {
32 public:
35 0), m_flag(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 int flag
46 ): SimHitBase()
47 {
48 m_CellId = CellId;
49 m_TrackId = TrackId;
50 m_Pdg = Pdg;
51 m_FlightTime = FlightTime;
52 m_Edep = Edep;
53 m_Momentum = Momentum;
54 m_Position = Position;
55 m_flag = flag;
56
57 }
58
59
60
61
64 void setCellId(int CellId) { m_CellId = CellId; }
65
68 void setTrackId(int TrackId) { m_TrackId = TrackId; }
69
72 void setPDGCode(int Pdg) { m_Pdg = Pdg; }
73
76 void setFlightTime(double FlightTime) { m_FlightTime = (float) FlightTime; }
77
80 void setEnergyDep(double Edep) { m_Edep = (float) Edep; }
81
84 void setMomentum(ROOT::Math::XYZVector Momentum) { m_Momentum = Momentum; }
85
88 void setPosIn(ROOT::Math::XYZVector Position) { m_Position = Position; }
89
92 void setPosition(ROOT::Math::XYZVector Position) { m_Position = Position; }
93
96 void setFlag(int flag) { m_flag = flag; }
97
98
102 int getCellId() const { return m_CellId; }
103
107 int getTrackId() const { return m_TrackId; }
108
112 int getPDGCode() const { return m_Pdg; }
113
117 double getFlightTime() const { return (double)m_FlightTime; }
118
122 double getEnergyDep() const { return (double) m_Edep; }
123
127 ROOT::Math::XYZVector getMomentum() const { return m_Momentum; }
128
132 ROOT::Math::XYZVector getPosIn() const { return m_Position; }
133
137 ROOT::Math::XYZVector getPosition() const { return m_Position; }
138
142 int getFlag() const { return m_flag; }
143
144
148 void shiftInTime(float delta) { m_FlightTime += delta; }
149
150
151 private:
154 int m_Pdg;
156 float m_Edep;
157 ROOT::Math::XYZVector m_Momentum;
158 ROOT::Math::XYZVector m_Position;
159 int m_flag;
162 };
163
165} // end namespace Belle2
166
167#endif
ClassDef(RelationsInterface, 0)
defines interface for accessing relations of objects in StoreArray.
Class SimHitBase - A common base for subdetector SimHits.
Definition: SimHitBase.h:28
ClassTPCSimHit - Geant4 simulated hit for the TPC crystal in beast.
Definition: TPCSimHit.h:31
ROOT::Math::XYZVector m_Position
Position.
Definition: TPCSimHit.h:158
int getPDGCode() const
Get Particle PDG (can be one of secondaries)
Definition: TPCSimHit.h:112
void setEnergyDep(double Edep)
Set Deposit energy.
Definition: TPCSimHit.h:80
int getTrackId() const
Get Track ID.
Definition: TPCSimHit.h:107
void setFlag(int flag)
Set flag.
Definition: TPCSimHit.h:96
int getCellId() const
Get Cell ID.
Definition: TPCSimHit.h:102
TPCSimHit()
default constructor for ROOT
Definition: TPCSimHit.h:34
int m_CellId
Cell ID.
Definition: TPCSimHit.h:152
double getFlightTime() const
Get Flight time from IP.
Definition: TPCSimHit.h:117
void setPDGCode(int Pdg)
Set Particle PDG (can be one of secondaries)
Definition: TPCSimHit.h:72
void setPosition(ROOT::Math::XYZVector Position)
Set Position.
Definition: TPCSimHit.h:92
void setCellId(int CellId)
Set Cell ID.
Definition: TPCSimHit.h:64
double getEnergyDep() const
Get Deposit energy.
Definition: TPCSimHit.h:122
float m_FlightTime
Flight time from IP.
Definition: TPCSimHit.h:155
float m_Edep
Deposit energy.
Definition: TPCSimHit.h:156
void setPosIn(ROOT::Math::XYZVector Position)
Set Position.
Definition: TPCSimHit.h:88
void shiftInTime(float delta)
Shift the SimHit in time (needed for beam background mixing)
Definition: TPCSimHit.h:148
void setMomentum(ROOT::Math::XYZVector Momentum)
Set Momentum.
Definition: TPCSimHit.h:84
void setTrackId(int TrackId)
Set Track ID.
Definition: TPCSimHit.h:68
ROOT::Math::XYZVector getPosIn() const
Get Position.
Definition: TPCSimHit.h:132
int getFlag() const
Get flag.
Definition: TPCSimHit.h:142
void setFlightTime(double FlightTime)
Set Flight time from IP.
Definition: TPCSimHit.h:76
ROOT::Math::XYZVector getMomentum() const
Get Momentum.
Definition: TPCSimHit.h:127
ROOT::Math::XYZVector getPosition() const
Get Position.
Definition: TPCSimHit.h:137
TPCSimHit(int CellId, int TrackId, int Pdg, float FlightTime, float Edep, ROOT::Math::XYZVector Momentum, ROOT::Math::XYZVector Position, int flag)
Useful Constructor.
Definition: TPCSimHit.h:37
ROOT::Math::XYZVector m_Momentum
Momentum.
Definition: TPCSimHit.h:157
int m_TrackId
Track ID.
Definition: TPCSimHit.h:153
int m_Pdg
Particle PDG (can be one of secondaries)
Definition: TPCSimHit.h:154
Abstract base class for different kinds of events.