Belle II Software  release-05-02-19
CsiHit.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Poyuan Chen *
7  * Alexandre Beaulieu
8  * *
9  * This software is provided "as is" without any warranty. *
10  **************************************************************************/
11 
12 #ifndef CSIHIT_H
13 #define CSIHIT_H
14 
15 #include <simulation/dataobjects/SimHitBase.h>
16 
17 namespace Belle2 {
29  class CsiHit : public SimHitBase {
30  public:
32  CsiHit(): SimHitBase()
33  {
34  m_CellId = 0;
35  m_Edep = 0;
36  m_TimeAve = 0;
37  m_TimeVar = 0;
38  ;
39  }
40 
42  CsiHit(
43  int CellId,
44  float Edep,
45  float TimeAve,
46  float TimeVar
47  ): SimHitBase()
48  {
49  m_CellId = CellId;
50  m_Edep = Edep;
51  m_TimeAve = TimeAve;
52  m_TimeVar = TimeVar;
53  }
54 
55 
58  void setCellId(int CellId) { m_CellId = CellId; }
59 
62  void setEnergyDep(double Edep) { m_Edep = (float) Edep; }
63 
66  void setTimeAve(double TimeAve) { m_TimeAve = (float)TimeAve; }
67 
70  void setTimeVar(double TimeVar) { m_TimeVar = (float)TimeVar; }
71 
72 
76  int getCellId() const { return m_CellId; }
77 
81  double getEnergyDep() const { return (double) m_Edep; }
82 
86  double getTimeAve() const {return (double) m_TimeAve;}
87 
91  double getTimeVar() const {return (double) m_TimeVar;}
92 
93 
97  void shiftInTime(float delta) override { m_TimeAve += delta; }
98 
99 
100  private:
101 
102  int m_CellId;
103  float m_Edep;
104  float m_TimeAve;
105  float m_TimeVar;
109  };
110 
112 } // end namespace Belle2
113 
114 #endif
Belle2::CsiHit::m_TimeAve
float m_TimeAve
average time
Definition: CsiHit.h:113
Belle2::SimHitBase
Class SimHitBase - A common base for subdetector SimHits.
Definition: SimHitBase.h:38
Belle2::SimHitBase::SimHitBase
SimHitBase()
Constructor.
Definition: SimHitBase.h:43
Belle2::CsiHit::getCellId
int getCellId() const
Get Cell ID.
Definition: CsiHit.h:85
Belle2::CsiHit::m_CellId
int m_CellId
Cell ID.
Definition: CsiHit.h:111
Belle2::CsiHit::getTimeVar
double getTimeVar() const
Get time variance.
Definition: CsiHit.h:100
Belle2::CsiHit::setTimeVar
void setTimeVar(double TimeVar)
Set time variance.
Definition: CsiHit.h:79
Belle2::CsiHit::m_Edep
float m_Edep
deposited energy
Definition: CsiHit.h:112
Belle2::CsiHit::getEnergyDep
double getEnergyDep() const
Get deposit energy.
Definition: CsiHit.h:90
Belle2::CsiHit::setEnergyDep
void setEnergyDep(double Edep)
Set deposit energy.
Definition: CsiHit.h:71
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::CsiHit::getTimeAve
double getTimeAve() const
Get average time.
Definition: CsiHit.h:95
Belle2::CsiHit::shiftInTime
void shiftInTime(float delta) override
Shift the Hit in time (needed for beam background mixing)
Definition: CsiHit.h:106
Belle2::CsiHit::setCellId
void setCellId(int CellId)
Set Cell ID.
Definition: CsiHit.h:67
Belle2::CsiHit::m_TimeVar
float m_TimeVar
time variance
Definition: CsiHit.h:114
Belle2::CsiHit::CsiHit
CsiHit()
default constructor for ROOT
Definition: CsiHit.h:41
Belle2::CsiHit::ClassDefOverride
ClassDefOverride(CsiHit, 3)
ClassDef.
Belle2::CsiHit::setTimeAve
void setTimeAve(double TimeAve)
Set average time.
Definition: CsiHit.h:75
Belle2::CsiHit
Class to store simulated hits which equate to average of CsiSimHit on crystals Input for digitization...
Definition: CsiHit.h:38