Belle II Software  release-05-02-19
CsiDigiHit.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  * Alexandre Beaulieu *
8  * *
9  * This software is provided "as is" without any warranty. *
10  **************************************************************************/
11 
12 #ifndef CSIDIGIT_H
13 #define CSIDIGIT_H
14 
15 #include <framework/datastore/RelationsObject.h>
16 
17 #include <vector> //< For fixed-size integers
18 namespace Belle2 {
29  class CsiDigiHit : public RelationsObject {
30  public:
32  CsiDigiHit()
33  {
34  m_CellId = 0;
35  m_Charge = 0;
36  m_Baseline = 0;
37  m_MaxVal = 0;
38  m_Time = 0;
39  m_TrueEdep = 0;
40  m_PDG = 0;
41  m_Waveform.clear();
42  m_StatusBits.clear();
43  }
44 
47  void setCellId(uint8_t CellId) { m_CellId = CellId; }
48 
51  void setCharge(uint64_t charge) { m_Charge = charge; }
52 
53 
56  void setTime(uint64_t time) { m_Time = time; }
57 
58 
59 
60 
64  uint8_t getCellId() const { return m_CellId; }
65 
66 
70  uint32_t getCharge() const { return m_Charge; }
71 
75  uint32_t getTime() const { return m_Time; }
76 
80  double getTrueEdep() const { return m_TrueEdep; }
81 
84  void setTrueEdep(double edep) { m_TrueEdep = edep; }
85 
86 
90  uint16_t getBaseline() const { return m_Baseline; }
91 
94  void setBaseline(uint16_t baseline) { m_Baseline = baseline; }
95 
98  uint16_t getMaxVal() const { return m_MaxVal; }
99 
102  void setMaxVal(uint16_t maxval) { m_MaxVal = maxval; }
103 
104 
108  std::vector<uint16_t>* getWaveform() { return &m_Waveform; }
109 
112  void setWaveform(std::vector<uint16_t>* waveform) { m_Waveform = *waveform; }
113 
117  std::vector<uint8_t>* getStatusBits() { return &m_StatusBits; }
118 
121  void setStatusBits(std::vector<uint8_t>* status) { m_StatusBits = *status; }
122 
123 
126  void setPDG(int pdg) {m_PDG = pdg;}
127 
128  private:
129 
130  uint8_t m_CellId;
131  uint16_t m_Baseline;
132  uint16_t m_MaxVal;
133  uint32_t m_Charge;
134  uint32_t m_Time;
135  double m_TrueEdep;
136  int m_PDG;
137  std::vector<uint16_t> m_Waveform;
138  std::vector<uint8_t> m_StatusBits;
143  };
145 } // end namespace Belle2
146 
147 #endif
Belle2::CsiDigiHit::m_Waveform
std::vector< uint16_t > m_Waveform
Saved waveform.
Definition: CsiDigiHit.h:146
Belle2::CsiDigiHit::getCellId
uint8_t getCellId() const
Get Cell ID.
Definition: CsiDigiHit.h:73
Belle2::CsiDigiHit::setMaxVal
void setMaxVal(uint16_t maxval)
Set Maximal Value.
Definition: CsiDigiHit.h:111
Belle2::CsiDigiHit::m_StatusBits
std::vector< uint8_t > m_StatusBits
Saved waveform.
Definition: CsiDigiHit.h:147
Belle2::CsiDigiHit::getBaseline
uint16_t getBaseline() const
Get Baseline.
Definition: CsiDigiHit.h:99
Belle2::CsiDigiHit
Class to store Csi digitized hits (output of CsIDigitizer) relation to CsiHit filled in beast/csi/mod...
Definition: CsiDigiHit.h:38
Belle2::CsiDigiHit::setStatusBits
void setStatusBits(std::vector< uint8_t > *status)
Set Status Bits Array.
Definition: CsiDigiHit.h:130
Belle2::CsiDigiHit::getCharge
uint32_t getCharge() const
Get Integrated Charge.
Definition: CsiDigiHit.h:79
Belle2::CsiDigiHit::m_Charge
uint32_t m_Charge
Integrated Charge.
Definition: CsiDigiHit.h:142
Belle2::CsiDigiHit::m_CellId
uint8_t m_CellId
Cell ID.
Definition: CsiDigiHit.h:139
Belle2::CsiDigiHit::setBaseline
void setBaseline(uint16_t baseline)
Set Baseline.
Definition: CsiDigiHit.h:103
Belle2::CsiDigiHit::ClassDef
ClassDef(CsiDigiHit, 1)
ClassDef.
Belle2::CsiDigiHit::setCellId
void setCellId(uint8_t CellId)
Set Cell ID.
Definition: CsiDigiHit.h:56
Belle2::CsiDigiHit::getMaxVal
uint16_t getMaxVal() const
Get Maximal Value.
Definition: CsiDigiHit.h:107
Belle2::CsiDigiHit::m_Time
uint32_t m_Time
Trigger Time index.
Definition: CsiDigiHit.h:143
Belle2::CsiDigiHit::setWaveform
void setWaveform(std::vector< uint16_t > *waveform)
Set Waveform Array.
Definition: CsiDigiHit.h:121
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::CsiDigiHit::getWaveform
std::vector< uint16_t > * getWaveform()
Get Waveform array.
Definition: CsiDigiHit.h:117
Belle2::CsiDigiHit::setPDG
void setPDG(int pdg)
Set incoming particle PDG code.
Definition: CsiDigiHit.h:135
Belle2::CsiDigiHit::getTrueEdep
double getTrueEdep() const
Get true deposited energy.
Definition: CsiDigiHit.h:89
Belle2::CsiDigiHit::setTrueEdep
void setTrueEdep(double edep)
Set True Edep.
Definition: CsiDigiHit.h:93
Belle2::CsiDigiHit::m_PDG
int m_PDG
PDG code of the initial particle.
Definition: CsiDigiHit.h:145
Belle2::CsiDigiHit::setCharge
void setCharge(uint64_t charge)
Set Integrated Charge.
Definition: CsiDigiHit.h:60
Belle2::RelationsObject
RelationsInterface< TObject > RelationsObject
Provides interface for getting/adding relations to objects in StoreArrays.
Definition: RelationsObject.h:443
Belle2::CsiDigiHit::CsiDigiHit
CsiDigiHit()
default constructor for ROOT
Definition: CsiDigiHit.h:41
Belle2::CsiDigiHit::m_TrueEdep
double m_TrueEdep
True deposited energy per event-crystal.
Definition: CsiDigiHit.h:144
Belle2::CsiDigiHit::setTime
void setTime(uint64_t time)
Set Trigger Time.
Definition: CsiDigiHit.h:65
Belle2::CsiDigiHit::m_Baseline
uint16_t m_Baseline
Baseline (pedestal) frozen during charge integration.
Definition: CsiDigiHit.h:140
Belle2::CsiDigiHit::getStatusBits
std::vector< uint8_t > * getStatusBits()
Get Status bits array.
Definition: CsiDigiHit.h:126
Belle2::CsiDigiHit::m_MaxVal
uint16_t m_MaxVal
Maximal value.
Definition: CsiDigiHit.h:141
Belle2::CsiDigiHit::getTime
uint32_t getTime() const
Get Trigger Time.
Definition: CsiDigiHit.h:84