Belle II Software  release-08-01-10
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 <TVector3.h>
16 
17 namespace 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  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 
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(TVector3 Momentum) { m_Momentum = Momentum; }
77 
80  void setPosIn(TVector3 Position) { m_Position = Position; }
81 
84  void setPosition(TVector3 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  TVector3 getMomentum() const { return m_Momentum; }
121 
125  TVector3 getPosIn() const { return m_Position; }
126 
130  TVector3 getPosition() const { return m_Position; }
131 
132 
136  void shiftInTime(float delta) override { m_FlightTime += delta; }
137 
138 
139  private:
140  int m_CellId;
141  int m_TrackId;
142  int m_Pdg;
143  float m_FlightTime;
144  float m_Edep;
145  TVector3 m_Momentum;
146  TVector3 m_Position;
147  float m_Erecdep;
149  ClassDefOverride(BgoHit, 1)
150  };
151 
153 } // end namespace Belle2
154 
155 #endif
ClassBgoHit - Geant4 ulated hit for the Bgo crystal in beast.
Definition: BgoHit.h:31
TVector3 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
double getEnergyRecDep() const
Get Deposit energy folded by resolution.
Definition: BgoHit.h:115
void setCellId(int CellId)
Set Cell ID.
Definition: BgoHit.h:56
TVector3 m_Momentum
Momentum.
Definition: BgoHit.h:145
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
TVector3 getMomentum() const
Get Momentum.
Definition: BgoHit.h:120
void setPosition(TVector3 Position)
Set Position.
Definition: BgoHit.h:84
BgoHit(int CellId, int TrackId, int Pdg, float FlightTime, float Edep, TVector3 Momentum, TVector3 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
TVector3 getPosition() const
Get Position.
Definition: BgoHit.h:130
void setPosIn(TVector3 Position)
Set Position.
Definition: BgoHit.h:80
void setFlightTime(double FlightTime)
Set Flight time from IP.
Definition: BgoHit.h:68
TVector3 getPosIn() const
Get Position.
Definition: BgoHit.h:125
void setMomentum(TVector3 Momentum)
Set Momentum.
Definition: BgoHit.h:76
void shiftInTime(float delta) override
Shift the Hit in time (needed for beam background mixing)
Definition: BgoHit.h:136
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.