Belle II Software  release-05-01-25
BgoSimHit.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010-2014 Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Martin Ritter, Igal Jaegle *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef BgoSIMHIT_H
12 #define BgoSIMHIT_H
13 
14 #include <simulation/dataobjects/SimHitBase.h>
15 
16 // ROOT
17 #include <TVector3.h>
18 
19 namespace Belle2 {
33  class BgoSimHit : public SimHitBase {
34  public:
36  BgoSimHit(): 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,
37  0) {;}
39  BgoSimHit(
40  int CellId,
41  int TrackId,
42  int Pdg,
43  float FlightTime,
44  float Edep,
45  TVector3 Momentum,
46  TVector3 Position
48  {
49  m_CellId = CellId;
50  m_TrackId = TrackId;
51  m_Pdg = Pdg;
52  m_FlightTime = FlightTime;
53  m_Edep = Edep;
54  m_Momentum = Momentum;
55  m_Position = Position;
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 
94 
98  int getCellId() const { return m_CellId; }
99 
103  int getTrackId() const { return m_TrackId; }
104 
108  int getPDGCode() const { return m_Pdg; }
109 
113  double getFlightTime() const { return (double)m_FlightTime; }
114 
118  double getEnergyDep() const { return (double) m_Edep; }
119 
123  TVector3 getMomentum() const { return m_Momentum; }
124 
128  TVector3 getPosIn() const { return m_Position; }
129 
133  TVector3 getPosition() const { return m_Position; }
134 
135 
139  void shiftInTime(float delta) override { m_FlightTime += delta; }
140 
141 
142  private:
143  int m_CellId;
144  int m_TrackId;
145  int m_Pdg;
146  float m_FlightTime;
147  float m_Edep;
148  TVector3 m_Momentum;
149  TVector3 m_Position;
151  ClassDefOverride(BgoSimHit, 1)
152  };
153 
155 } // end namespace Belle2
156 
157 #endif
Belle2::BgoSimHit::setMomentum
void setMomentum(TVector3 Momentum)
Set Momentum.
Definition: BgoSimHit.h:92
Belle2::BgoSimHit::getTrackId
int getTrackId() const
Get Track ID.
Definition: BgoSimHit.h:111
Belle2::BgoSimHit::setPosIn
void setPosIn(TVector3 Position)
Set Position.
Definition: BgoSimHit.h:96
Belle2::BgoSimHit::m_Pdg
int m_Pdg
Particle PDG (can be one of secondaries)
Definition: BgoSimHit.h:153
Belle2::BgoSimHit::getEnergyDep
double getEnergyDep() const
Get Deposit energy.
Definition: BgoSimHit.h:126
Belle2::BgoSimHit::m_CellId
int m_CellId
Cell ID.
Definition: BgoSimHit.h:151
Belle2::BgoSimHit::getPosIn
TVector3 getPosIn() const
Get Position.
Definition: BgoSimHit.h:136
Belle2::BgoSimHit::setPosition
void setPosition(TVector3 Position)
Set Position.
Definition: BgoSimHit.h:100
Belle2::BgoSimHit::setFlightTime
void setFlightTime(double FlightTime)
Set Flight time from IP.
Definition: BgoSimHit.h:84
Belle2::BgoSimHit::getCellId
int getCellId() const
Get Cell ID.
Definition: BgoSimHit.h:106
Belle2::BgoSimHit::m_Position
TVector3 m_Position
Position.
Definition: BgoSimHit.h:157
Belle2::SimHitBase
Class SimHitBase - A common base for subdetector SimHits.
Definition: SimHitBase.h:38
Belle2::SimHitBase::SimHitBase
SimHitBase()
Constructor.
Definition: SimHitBase.h:43
Belle2::BgoSimHit::getPosition
TVector3 getPosition() const
Get Position.
Definition: BgoSimHit.h:141
Belle2::BgoSimHit::m_FlightTime
float m_FlightTime
Flight time from IP.
Definition: BgoSimHit.h:154
Belle2::BgoSimHit::setPDGCode
void setPDGCode(int Pdg)
Set Particle PDG (can be one of secondaries)
Definition: BgoSimHit.h:80
Belle2::BgoSimHit::getFlightTime
double getFlightTime() const
Get Flight time from IP.
Definition: BgoSimHit.h:121
Belle2::BgoSimHit::setTrackId
void setTrackId(int TrackId)
Set Track ID.
Definition: BgoSimHit.h:76
Belle2::BgoSimHit::getPDGCode
int getPDGCode() const
Get Particle PDG (can be one of secondaries)
Definition: BgoSimHit.h:116
Belle2::BgoSimHit::getMomentum
TVector3 getMomentum() const
Get Momentum.
Definition: BgoSimHit.h:131
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::BgoSimHit::setCellId
void setCellId(int CellId)
Set Cell ID.
Definition: BgoSimHit.h:72
Belle2::BgoSimHit::BgoSimHit
BgoSimHit()
default constructor for ROOT
Definition: BgoSimHit.h:44
Belle2::BgoSimHit::shiftInTime
void shiftInTime(float delta) override
Shift the SimHit in time (needed for beam background mixing)
Definition: BgoSimHit.h:147
Belle2::BgoSimHit
ClassBgoSimHit - Geant4 simulated hit for the Bgo crystal in beast.
Definition: BgoSimHit.h:41
Belle2::BgoSimHit::m_TrackId
int m_TrackId
Track ID.
Definition: BgoSimHit.h:152
Belle2::BgoSimHit::setEnergyDep
void setEnergyDep(double Edep)
Set Deposit energy.
Definition: BgoSimHit.h:88
Belle2::BgoSimHit::m_Momentum
TVector3 m_Momentum
Momentum.
Definition: BgoSimHit.h:156
Belle2::BgoSimHit::m_Edep
float m_Edep
Deposit energy.
Definition: BgoSimHit.h:155