Belle II Software development
BKLMHit1d.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/* KLM headers. */
12#include <klm/dataobjects/bklm/BKLMElementNumbers.h>
13#include <klm/dataobjects/bklm/BKLMStatus.h>
14#include <klm/dataobjects/KLMDigit.h>
15
16/* Basf2 headers. */
17#include <framework/datastore/RelationsObject.h>
18
19/* C++ headers. */
20#include <utility>
21#include <vector>
22
23namespace Belle2 {
30 class BKLMHit1d : public RelationsObject {
31
32 public:
33
35 BKLMHit1d();
36
39 explicit BKLMHit1d(const std::vector<std::pair<const KLMDigit*, double>>& digitsWithTime);
40
42 BKLMHit1d(const BKLMHit1d&);
43
46
49 {
50 }
51
54 bool inRPC() const
55 {
57 }
58
61 int getSection() const
62 {
64 }
65
68 int getSector() const
69 {
71 }
72
75 int getLayer() const
76 {
78 }
79
82 int getPlane() const
83 {
85 }
86
89 bool isPhiReadout() const
90 {
93 }
94
97 int getStripMin() const
98 {
100 }
101
104 int getStripMax() const
105 {
107 }
108
111 double getStripAve() const
112 {
113 return 0.5 * (getStripMin() + getStripMax());
114 }
115
119 int getModuleID() const
120 {
121 return m_ModuleID;
122 }
123
126 float getTime() const
127 {
128 return m_Time;
129 }
130
133 void setTime(double time)
134 {
135 m_Time = time;
136 }
137
140 float getEnergyDeposit() const
141 {
142 return m_EnergyDeposit;
143 }
144
145 private:
146
150
152 float m_Time;
153
156
159
160 };
161
163} // end of namespace Belle2
static int getSectorByModule(int module)
Get sector number by module identifier.
static int getStripByModule(int module)
Get strip number by module identifier.
static int getPlaneByModule(int module)
Get plane number (0 = z, 1 = phi) by module identifier.
@ c_FirstRPCLayer
First RPC layer.
static int getLayerByModule(int module)
Get layer number by module identifier.
static int getSectionByModule(int module)
Get section number by module identifier.
Store one reconstructed BKLM 1D hit as a ROOT object.
Definition: BKLMHit1d.h:30
bool inRPC() const
Determine whether this 1D hit is in RPC or scintillator.
Definition: BKLMHit1d.h:54
int getStripMin() const
Get lowest strip number of this 1D hit.
Definition: BKLMHit1d.h:97
int getLayer() const
Get layer number.
Definition: BKLMHit1d.h:75
BKLMHit1d()
Empty constructor for ROOT IO (needed to make the class storable)
Definition: BKLMHit1d.cc:25
float m_Time
reconstructed hit time (ns)
Definition: BKLMHit1d.h:152
float getTime() const
Get reconstructed hit time.
Definition: BKLMHit1d.h:126
int getSection() const
Get section number.
Definition: BKLMHit1d.h:61
int getPlane() const
Get plane number.
Definition: BKLMHit1d.h:82
void setTime(double time)
Set reconstructed hit time.
Definition: BKLMHit1d.h:133
float m_EnergyDeposit
reconstructed pulse height (MeV)
Definition: BKLMHit1d.h:155
int getSector() const
Get sector number.
Definition: BKLMHit1d.h:68
int getModuleID() const
Get detector-module identifier.
Definition: BKLMHit1d.h:119
bool isPhiReadout() const
Get readout coordinate.
Definition: BKLMHit1d.h:89
int m_ModuleID
detector-module identifier
Definition: BKLMHit1d.h:149
float getEnergyDeposit() const
Get energy deposition.
Definition: BKLMHit1d.h:140
BKLMHit1d & operator=(const BKLMHit1d &)
Assignment operator.
Definition: BKLMHit1d.cc:92
~BKLMHit1d()
Destructor.
Definition: BKLMHit1d.h:48
int getStripMax() const
Get highest strip number of this 1D hit.
Definition: BKLMHit1d.h:104
double getStripAve() const
Get average strip number.
Definition: BKLMHit1d.h:111
static int getMaximalStrip(int module)
Get maximal strip number.
Definition: BKLMStatus.h:41
Defines interface for accessing relations of objects in StoreArray.
ClassDef(RelationsInterface, 0)
defines interface for accessing relations of objects in StoreArray.
Abstract base class for different kinds of events.