Belle II Software  release-08-01-10
CsiHit_v2.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 CsiHIT_V2_H
10 #define CsiHIT_V2_H
11 
12 #include <simulation/dataobjects/SimHitBase.h>
13 
14 // ROOT
15 #include <TVector3.h>
16 
17 namespace Belle2 {
31  class CsiHit_v2 : public SimHitBase {
32  public:
35  0), m_Erecdep(0) {;}
38  int CellId,
39  int TrackId,
40  int Pdg,
41  float FlightTime,
42  float Edep,
43  TVector3 Momentum,
44  TVector3 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 
54  void setCellId(int CellId) { m_CellId = CellId; }
55 
58  void setTrackId(int TrackId) { m_TrackId = TrackId; }
59 
62  void setPDGCode(int Pdg) { m_Pdg = Pdg; }
63 
66  void setFlightTime(double FlightTime) { m_FlightTime = (float) FlightTime; }
67 
70  void setEnergyDep(double Edep) { m_Edep = (float) Edep; }
71 
74  void setMomentum(TVector3 Momentum) { m_Momentum = Momentum; }
75 
78  void setPosIn(TVector3 Position) { m_Position = Position; }
79 
82  void setPosition(TVector3 Position) { m_Position = Position; }
83 
84 
88  int getCellId() const { return m_CellId; }
89 
93  int getTrackId() const { return m_TrackId; }
94 
98  int getPDGCode() const { return m_Pdg; }
99 
103  double getFlightTime() const { return (double)m_FlightTime; }
104 
108  double getEnergyDep() const { return (double) m_Edep; }
109 
113  double getEnergyRecDep() const { return (double) m_Erecdep; }
114 
118  TVector3 getMomentum() const { return m_Momentum; }
119 
123  TVector3 getPosIn() const { return m_Position; }
124 
128  TVector3 getPosition() const { return m_Position; }
129 
130 
134  void shiftInTime(float delta) override { m_FlightTime += delta; }
135 
136 
137  private:
138  int m_CellId;
139  int m_TrackId;
140  int m_Pdg;
141  float m_FlightTime;
142  float m_Edep;
143  TVector3 m_Momentum;
144  TVector3 m_Position;
145  float m_Erecdep;
147  ClassDefOverride(CsiHit_v2, 1)
148  };
149 
151 } // end namespace Belle2
152 
153 #endif
ClassCsiHit_v2 - Geant4 simulated hits in CsI crystals in BEAST.
Definition: CsiHit_v2.h:31
TVector3 m_Position
Position.
Definition: CsiHit_v2.h:144
int getPDGCode() const
Get Particle PDG (can be one of secondaries)
Definition: CsiHit_v2.h:98
void setEnergyDep(double Edep)
Set Deposit energy.
Definition: CsiHit_v2.h:70
int getTrackId() const
Get Track ID.
Definition: CsiHit_v2.h:93
int getCellId() const
Get Cell ID.
Definition: CsiHit_v2.h:88
int m_CellId
Cell ID.
Definition: CsiHit_v2.h:138
double getFlightTime() const
Get Flight time from IP.
Definition: CsiHit_v2.h:103
void setPDGCode(int Pdg)
Set Particle PDG (can be one of secondaries)
Definition: CsiHit_v2.h:62
double getEnergyRecDep() const
Get Deposit energy folded by resolution.
Definition: CsiHit_v2.h:113
void setCellId(int CellId)
Set Cell ID.
Definition: CsiHit_v2.h:54
TVector3 m_Momentum
Momentum.
Definition: CsiHit_v2.h:143
double getEnergyDep() const
Get Deposit energy.
Definition: CsiHit_v2.h:108
float m_FlightTime
Flight time from IP.
Definition: CsiHit_v2.h:141
float m_Edep
Deposit energy.
Definition: CsiHit_v2.h:142
TVector3 getMomentum() const
Get Momentum.
Definition: CsiHit_v2.h:118
void setPosition(TVector3 Position)
Set Position.
Definition: CsiHit_v2.h:82
float m_Erecdep
Deposit energy reconstructed.
Definition: CsiHit_v2.h:145
void setTrackId(int TrackId)
Set Track ID.
Definition: CsiHit_v2.h:58
TVector3 getPosition() const
Get Position.
Definition: CsiHit_v2.h:128
void setPosIn(TVector3 Position)
Set Position.
Definition: CsiHit_v2.h:78
void setFlightTime(double FlightTime)
Set Flight time from IP.
Definition: CsiHit_v2.h:66
TVector3 getPosIn() const
Get Position.
Definition: CsiHit_v2.h:123
CsiHit_v2(int CellId, int TrackId, int Pdg, float FlightTime, float Edep, TVector3 Momentum, TVector3 Position, float Erecdep)
Useful Constructor.
Definition: CsiHit_v2.h:37
void setMomentum(TVector3 Momentum)
Set Momentum.
Definition: CsiHit_v2.h:74
void shiftInTime(float delta) override
Shift the SimHit in time (needed for beam background mixing)
Definition: CsiHit_v2.h:134
CsiHit_v2()
default constructor for ROOT
Definition: CsiHit_v2.h:34
int m_TrackId
Track ID.
Definition: CsiHit_v2.h:139
int m_Pdg
Particle PDG (can be one of secondaries)
Definition: CsiHit_v2.h:140
Class SimHitBase - A common base for subdetector SimHits.
Definition: SimHitBase.h:28
Abstract base class for different kinds of events.