Belle II Software development
ECLHit.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#pragma once
10
11#include <simulation/dataobjects/SimHitBase.h>
12
13namespace Belle2 {
25 class ECLHit : public SimHitBase {
26 public:
29 {
30 m_CellId = 0;
31 m_Edep = 0;
32 m_TimeAve = 0;
33 ;
34 }
35
38 int CellId,
39 double Edep,
40 double TimeAve
41 ): SimHitBase()
42 {
43 m_CellId = CellId;
44 m_Edep = Edep;
45 m_TimeAve = TimeAve;
46 }
47
48
51 void setCellId(int CellId) { m_CellId = CellId; }
52
55 void setEnergyDep(double Edep) { m_Edep = static_cast<double>(Edep); }
56
59 void setTimeAve(double TimeAve) { m_TimeAve = static_cast<double>(TimeAve); }
60
61
65 int getCellId() const { return m_CellId; }
66
70 double getEnergyDep() const { return m_Edep; }
71
75 double getTimeAve() const { return m_TimeAve; }
76
80 float getGlobalTime() const override { return m_TimeAve; }
81
85 void shiftInTime(float delta) override { m_TimeAve += delta; }
86
87
88 private:
89
91 double m_Edep;
92 double m_TimeAve;
96 };
97
99} // end namespace Belle2
100
Class to store simulated hits which equate to average of ECLSImHit on crystals input for digitization...
Definition: ECLHit.h:25
double getTimeAve() const
Get average time.
Definition: ECLHit.h:75
void setEnergyDep(double Edep)
Set deposit energy.
Definition: ECLHit.h:55
int getCellId() const
Get Cell ID.
Definition: ECLHit.h:65
int m_CellId
Cell ID.
Definition: ECLHit.h:90
float getGlobalTime() const override
Get average time (implementation of base class function)
Definition: ECLHit.h:80
ECLHit()
default constructor for ROOT
Definition: ECLHit.h:28
ECLHit(int CellId, double Edep, double TimeAve)
Useful Constructor.
Definition: ECLHit.h:37
void setCellId(int CellId)
Set Cell ID.
Definition: ECLHit.h:51
double getEnergyDep() const
Get deposit energy.
Definition: ECLHit.h:70
double m_Edep
deposited energy
Definition: ECLHit.h:91
ClassDefOverride(ECLHit, 4)
ClassDef.
double m_TimeAve
average time
Definition: ECLHit.h:92
void shiftInTime(float delta) override
Shift the Hit in time (needed for beam background mixing)
Definition: ECLHit.h:85
void setTimeAve(double TimeAve)
Set average time.
Definition: ECLHit.h:59
Class SimHitBase - A common base for subdetector SimHits.
Definition: SimHitBase.h:28
Abstract base class for different kinds of events.