Belle II Software  release-08-01-10
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 <TVector3.h>
16 
17 namespace 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  TVector3 Momentum,
44  TVector3 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(TVector3 Momentum) { m_Momentum = Momentum; }
85 
88  void setPosIn(TVector3 Position) { m_Position = Position; }
89 
92  void setPosition(TVector3 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  TVector3 getMomentum() const { return m_Momentum; }
128 
132  TVector3 getPosIn() const { return m_Position; }
133 
137  TVector3 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:
152  int m_CellId;
153  int m_TrackId;
154  int m_Pdg;
155  float m_FlightTime;
156  float m_Edep;
157  TVector3 m_Momentum;
158  TVector3 m_Position;
159  int m_flag;
161  ClassDef(TPCSimHit, 1)
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
TVector3 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 setCellId(int CellId)
Set Cell ID.
Definition: TPCSimHit.h:64
TVector3 m_Momentum
Momentum.
Definition: TPCSimHit.h:157
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
TVector3 getMomentum() const
Get Momentum.
Definition: TPCSimHit.h:127
void shiftInTime(float delta)
Shift the SimHit in time (needed for beam background mixing)
Definition: TPCSimHit.h:148
void setPosition(TVector3 Position)
Set Position.
Definition: TPCSimHit.h:92
void setTrackId(int TrackId)
Set Track ID.
Definition: TPCSimHit.h:68
int getFlag() const
Get flag.
Definition: TPCSimHit.h:142
TVector3 getPosition() const
Get Position.
Definition: TPCSimHit.h:137
void setPosIn(TVector3 Position)
Set Position.
Definition: TPCSimHit.h:88
void setFlightTime(double FlightTime)
Set Flight time from IP.
Definition: TPCSimHit.h:76
TPCSimHit(int CellId, int TrackId, int Pdg, float FlightTime, float Edep, TVector3 Momentum, TVector3 Position, int flag)
Useful Constructor.
Definition: TPCSimHit.h:37
TVector3 getPosIn() const
Get Position.
Definition: TPCSimHit.h:132
void setMomentum(TVector3 Momentum)
Set Momentum.
Definition: TPCSimHit.h:84
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.