Belle II Software development
CsiDigiHit.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 CSIDIGIT_H
10#define CSIDIGIT_H
11
12#include <framework/datastore/RelationsObject.h>
13
14#include <vector> //< For fixed-size integers
15namespace Belle2 {
26 class CsiDigiHit : public RelationsObject {
27 public:
30 {
31 m_CellId = 0;
32 m_Charge = 0;
33 m_Baseline = 0;
34 m_MaxVal = 0;
35 m_Time = 0;
36 m_TrueEdep = 0;
37 m_PDG = 0;
38 m_Waveform.clear();
39 m_StatusBits.clear();
40 }
41
44 void setCellId(uint8_t CellId) { m_CellId = CellId; }
45
48 void setCharge(uint64_t charge) { m_Charge = charge; }
49
50
53 void setTime(uint64_t time) { m_Time = time; }
54
55
56
57
61 uint8_t getCellId() const { return m_CellId; }
62
63
67 uint32_t getCharge() const { return m_Charge; }
68
72 uint32_t getTime() const { return m_Time; }
73
77 double getTrueEdep() const { return m_TrueEdep; }
78
81 void setTrueEdep(double edep) { m_TrueEdep = edep; }
82
83
87 uint16_t getBaseline() const { return m_Baseline; }
88
91 void setBaseline(uint16_t baseline) { m_Baseline = baseline; }
92
95 uint16_t getMaxVal() const { return m_MaxVal; }
96
99 void setMaxVal(uint16_t maxval) { m_MaxVal = maxval; }
100
101
105 std::vector<uint16_t>* getWaveform() { return &m_Waveform; }
106
109 void setWaveform(std::vector<uint16_t>* waveform) { m_Waveform = *waveform; }
110
114 std::vector<uint8_t>* getStatusBits() { return &m_StatusBits; }
115
118 void setStatusBits(std::vector<uint8_t>* status) { m_StatusBits = *status; }
119
120
123 void setPDG(int pdg) {m_PDG = pdg;}
124
125 private:
126
127 uint8_t m_CellId;
128 uint16_t m_Baseline;
129 uint16_t m_MaxVal;
130 uint32_t m_Charge;
131 uint32_t m_Time;
132 double m_TrueEdep;
133 int m_PDG;
134 std::vector<uint16_t> m_Waveform;
135 std::vector<uint8_t> m_StatusBits;
140 };
142} // end namespace Belle2
143
144#endif
Class to store Csi digitized hits (output of CsIDigitizer) relation to CsiHit filled in beast/csi/mod...
Definition: CsiDigiHit.h:26
uint16_t m_Baseline
Baseline (pedestal) frozen during charge integration.
Definition: CsiDigiHit.h:128
void setWaveform(std::vector< uint16_t > *waveform)
Set Waveform Array.
Definition: CsiDigiHit.h:109
double m_TrueEdep
True deposited energy per event-crystal.
Definition: CsiDigiHit.h:132
int m_PDG
PDG code of the initial particle.
Definition: CsiDigiHit.h:133
double getTrueEdep() const
Get true deposited energy.
Definition: CsiDigiHit.h:77
std::vector< uint16_t > m_Waveform
Saved waveform.
Definition: CsiDigiHit.h:134
std::vector< uint8_t > m_StatusBits
Saved waveform.
Definition: CsiDigiHit.h:135
uint16_t getBaseline() const
Get Baseline.
Definition: CsiDigiHit.h:87
void setTime(uint64_t time)
Set Trigger Time.
Definition: CsiDigiHit.h:53
void setMaxVal(uint16_t maxval)
Set Maximal Value.
Definition: CsiDigiHit.h:99
std::vector< uint16_t > * getWaveform()
Get Waveform array.
Definition: CsiDigiHit.h:105
ClassDef(CsiDigiHit, 1)
ClassDef.
uint32_t getTime() const
Get Trigger Time.
Definition: CsiDigiHit.h:72
uint32_t getCharge() const
Get Integrated Charge.
Definition: CsiDigiHit.h:67
CsiDigiHit()
default constructor for ROOT
Definition: CsiDigiHit.h:29
uint32_t m_Time
Trigger Time index.
Definition: CsiDigiHit.h:131
void setTrueEdep(double edep)
Set True Edep.
Definition: CsiDigiHit.h:81
std::vector< uint8_t > * getStatusBits()
Get Status bits array.
Definition: CsiDigiHit.h:114
void setPDG(int pdg)
Set incoming particle PDG code.
Definition: CsiDigiHit.h:123
uint8_t getCellId() const
Get Cell ID.
Definition: CsiDigiHit.h:61
void setCellId(uint8_t CellId)
Set Cell ID.
Definition: CsiDigiHit.h:44
uint16_t m_MaxVal
Maximal value.
Definition: CsiDigiHit.h:129
uint16_t getMaxVal() const
Get Maximal Value.
Definition: CsiDigiHit.h:95
uint8_t m_CellId
Cell ID.
Definition: CsiDigiHit.h:127
void setBaseline(uint16_t baseline)
Set Baseline.
Definition: CsiDigiHit.h:91
uint32_t m_Charge
Integrated Charge.
Definition: CsiDigiHit.h:130
void setCharge(uint64_t charge)
Set Integrated Charge.
Definition: CsiDigiHit.h:48
void setStatusBits(std::vector< uint8_t > *status)
Set Status Bits Array.
Definition: CsiDigiHit.h:118
Defines interface for accessing relations of objects in StoreArray.
Abstract base class for different kinds of events.