Belle II Software  release-05-02-19
ECLHit.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Poyuan Chen *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef ECLHIT_H
12 #define ECLHIT_H
13 
14 #include <simulation/dataobjects/SimHitBase.h>
15 
16 namespace Belle2 {
28  class ECLHit : public SimHitBase {
29  public:
31  ECLHit(): SimHitBase()
32  {
33  m_CellId = 0;
34  m_Edep = 0;
35  m_TimeAve = 0;
36  ;
37  }
38 
40  ECLHit(
41  int CellId,
42  double Edep,
43  double TimeAve
44  ): SimHitBase()
45  {
46  m_CellId = CellId;
47  m_Edep = Edep;
48  m_TimeAve = TimeAve;
49  }
50 
51 
54  void setCellId(int CellId) { m_CellId = CellId; }
55 
58  void setEnergyDep(double Edep) { m_Edep = static_cast<double>(Edep); }
59 
62  void setTimeAve(double TimeAve) { m_TimeAve = static_cast<double>(TimeAve); }
63 
64 
68  int getCellId() const { return m_CellId; }
69 
73  double getEnergyDep() const { return m_Edep; }
74 
78  double getTimeAve() const { return m_TimeAve; }
79 
83  float getGlobalTime() const override { return m_TimeAve; }
84 
88  void shiftInTime(float delta) override { m_TimeAve += delta; }
89 
90 
91  private:
92 
93  int m_CellId;
94  double m_Edep;
95  double m_TimeAve;
99  };
100 
102 } // end namespace Belle2
103 
104 #endif
Belle2::ECLHit::m_TimeAve
double m_TimeAve
average time
Definition: ECLHit.h:103
Belle2::ECLHit::getCellId
int getCellId() const
Get Cell ID.
Definition: ECLHit.h:76
Belle2::ECLHit::m_CellId
int m_CellId
Cell ID.
Definition: ECLHit.h:101
Belle2::ECLHit::setEnergyDep
void setEnergyDep(double Edep)
Set deposit energy.
Definition: ECLHit.h:66
Belle2::ECLHit::ClassDefOverride
ClassDefOverride(ECLHit, 4)
ClassDef.
Belle2::ECLHit::getEnergyDep
double getEnergyDep() const
Get deposit energy.
Definition: ECLHit.h:81
Belle2::SimHitBase
Class SimHitBase - A common base for subdetector SimHits.
Definition: SimHitBase.h:38
Belle2::SimHitBase::SimHitBase
SimHitBase()
Constructor.
Definition: SimHitBase.h:43
Belle2::ECLHit::ECLHit
ECLHit()
default constructor for ROOT
Definition: ECLHit.h:39
Belle2::ECLHit::getGlobalTime
float getGlobalTime() const override
Get average time (implementation of base class function)
Definition: ECLHit.h:91
Belle2::ECLHit::setTimeAve
void setTimeAve(double TimeAve)
Set average time.
Definition: ECLHit.h:70
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ECLHit::m_Edep
double m_Edep
deposited energy
Definition: ECLHit.h:102
Belle2::ECLHit
Class to store simulated hits which equate to average of ECLSImHit on crystals input for digitization...
Definition: ECLHit.h:36
Belle2::ECLHit::shiftInTime
void shiftInTime(float delta) override
Shift the Hit in time (needed for beam background mixing)
Definition: ECLHit.h:96
Belle2::ECLHit::getTimeAve
double getTimeAve() const
Get average time.
Definition: ECLHit.h:86
Belle2::ECLHit::setCellId
void setCellId(int CellId)
Set Cell ID.
Definition: ECLHit.h:62