Belle II Software development
svd data objects

Namespaces

namespace  Belle2::SVDRunType
 Run type, 2-bits: 00 raw, 01 transparent, 10 zero-suppressed, 11 zero-suppressed + hit time finding.
 
namespace  Belle2::SVDEventType
 Event Type, 3 bits, separated into 1+2 bits:
 
namespace  Belle2::SVDDAQModeType
 2+3 bit: 00 1-sample, 01 3-sample, 10 6-sample
 

Classes

class  SVDAPVHistograms< H >
 template class for the APV Histograms More...
 
class  SVDCluster
 The SVD Cluster class This class stores all information about reconstructed SVD clusters. More...
 
class  SVDDAQDiagnostic
 Class to store SVD DAQ diagnostic information. More...
 
class  SVDEnergyDepositionEvent
 Class SVDEnergyDepositionEvent: SVDSimHit data container for background studies. More...
 
class  SVDEventInfo
 Stores SVDModeByte object with Trigger time, DAQ mode, Run type & Event type! Also - the information of any inconsistencies of these variables within one event are stored. More...
 
class  SVDHistograms< H >
 template class for SVd histograms More...
 
class  SVDModeByte
 Class to store SVD mode information. More...
 
class  SVDNeutronFluxEvent
 Class SVDNeutronFluxEvent: SVDTrueHit data container for background studies. More...
 
class  SVDOccupancyEvent
 Class SVDOccupancyEvent: SVDCluster data container for background studies. More...
 
class  SVDRecoDigit
 The SVD RecoDigit class. More...
 
class  SVDRecoTimeBase
 The SVD RecoTimeBase class. More...
 
class  SVDShaperDigit
 The SVD ShaperDigit class. More...
 
class  SVDSimHit
 Class SVDSimHit - Geant4 simulated hit for the SVD. More...
 
class  SVDSummaryPlots
 class to summarize SVD quantities per sensor and side More...
 
class  SVDTransparentDigit
 The SVD digit class. More...
 
class  SVDTriggerType
 Class to store Trigger Type information. More...
 
class  SVDTrueHit
 Class SVDTrueHit - Records of tracks that either enter or leave the sensitive volume. More...
 

Functions

std::ostream & operator<< (std::ostream &out, const SVDModeByte &id)
 Print id to stream by converting it to string.
 
 SVDAPVHistograms (const H &templateAPV)
 Use.
 
void customize (H &histogram, VxdID vxdID, int view, int apv)
 customize the histogram with the sensor, view and APV numbers
 
 SVDHistograms (const H &templateU3, const H &templateV3, const H &templateU456, const H &templateV456)
 Use templates to initialize all the histograms.
 
void customize (H &histogram, VxdID vxdID, int view)
 customize the histogram with the sensor, view
 
 operator std::string () const
 Convert to string.
 

Variables

static const baseType c_DefaultID = 151
 Default / non-informative id 10010111 = 151 Run type: zero-suppressed, 2 Event type: global run, 0 DAQ mode: 6-samples, 2 Trigger invalid 111 = 7.
 
static size_t s_APVSampleMode = 6
 APV acquisition mode (3 or 6)
 
static size_t s_APVSampleBegin = 0
 first sample number for 3 sample acquisition mode (0 - 3)
 

Detailed Description

Function Documentation

◆ customize() [1/2]

void customize ( H &  histogram,
VxdID  vxdID,
int  view 
)
private

customize the histogram with the sensor, view

customize the histogram with the sensor and view

Definition at line 192 of file SVDHistograms.h.

193 {
194 bool isU = view == UIndex;
195 std::string name = histogram.GetName();
196 customizeString(name, vxdID, isU);
197 histogram.SetName(name.c_str());
198
199 std::string title = histogram.GetTitle();
200 customizeString(title, vxdID, isU);
201 histogram.SetTitle(title.c_str());
202
203 std::string xAxis = histogram.GetXaxis()->GetTitle();
204 customizeString(xAxis, vxdID, isU);
205 histogram.SetXTitle(xAxis.c_str());
206
207 std::string yAxis = histogram.GetYaxis()->GetTitle();
208 customizeString(yAxis, vxdID, isU);
209 histogram.SetYTitle(yAxis.c_str());
210
211 std::string zAxis = histogram.GetZaxis()->GetTitle();
212 customizeString(zAxis, vxdID, isU);
213 histogram.SetZTitle(zAxis.c_str());
214
215 }
void customizeString(std::string &base, const VxdID &vxdID, bool isU)
replaces layer ladder sensor view and apv with the current numbers
Definition: SVDHistograms.h:92

◆ customize() [2/2]

void customize ( H &  histogram,
VxdID  vxdID,
int  view,
int  apv 
)
private

customize the histogram with the sensor, view and APV numbers

Definition at line 193 of file SVDAPVHistograms.h.

194 {
195 bool isU = view == UIndex;
196 std::string name = histogram.GetName();
197 customizeString(name, vxdID, isU, apv);
198 histogram.SetName(name.c_str());
199
200 std::string title = histogram.GetTitle();
201 customizeString(title, vxdID, isU, apv);
202 histogram.SetTitle(title.c_str());
203
204 std::string xAxis = histogram.GetXaxis()->GetTitle();
205 customizeString(xAxis, vxdID, isU, apv);
206 histogram.SetXTitle(xAxis.c_str());
207
208 std::string yAxis = histogram.GetYaxis()->GetTitle();
209 customizeString(yAxis, vxdID, isU, apv);
210 histogram.SetYTitle(yAxis.c_str());
211
212 std::string zAxis = histogram.GetZaxis()->GetTitle();
213 customizeString(zAxis, vxdID, isU, apv);
214 histogram.SetZTitle(zAxis.c_str());
215
216 }
void customizeString(std::string &base, const VxdID &vxdID, bool isU, int user_apv)
replaces layer ladder sensor view and apv with the current numbers

◆ operator std::string()

operator std::string ( ) const

Convert to string.

Definition at line 20 of file SVDModeByte.cc.

21 {
22 std::stringstream os;
23 switch (m_id.parts.runType) {
24 case SVDRunType::raw:
25 os << "raw";
26 break;
28 os << "transpt";
29 break;
31 os << "0-suppr";
32 break;
34 os << "0-suppr+tfit";
35 break;
36 }
37 os << "/";
38 switch (m_id.parts.eventType) {
40 os << "global";
41 break;
43 os << "local";
44 break;
45 }
46 os << "/";
47 switch (m_id.parts.daqMode) {
49 os << "1 sample";
50 break;
52 os << "3 samples";
53 break;
55 os << "6 samples";
56 break;
57 default:
58 os << "unknown";
59 }
60 os << "/";
61 if (m_id.parts.triggerBin <= MaxGoodTriggerBin) {
62 os << static_cast<int>(m_id.parts.triggerBin);
63 } else {
64 os << "???";
65 }
66 return os.str();
67 }
@ MaxGoodTriggerBin
Maximum valid trigger time ID.
Definition: SVDModeByte.h:88
union Belle2::SVDModeByte::@241 m_id
Union to store the ID and all components in one go.
constexpr uint8_t daq_3samples
three samples per strip
Definition: SVDModeByte.h:59
constexpr uint8_t daq_1sample
one sample per strip
Definition: SVDModeByte.h:58
constexpr uint8_t daq_6samples
six samples per strip
Definition: SVDModeByte.h:60
constexpr uint8_t global_run
global run
Definition: SVDModeByte.h:47
constexpr uint8_t local_run
local run - should never happen
Definition: SVDModeByte.h:48
constexpr uint8_t zero_suppressed
Definition: SVDModeByte.h:36
constexpr uint8_t raw
00.
Definition: SVDModeByte.h:34
constexpr uint8_t zero_suppressed_timefit
Definition: SVDModeByte.h:37
constexpr uint8_t transparent
01.
Definition: SVDModeByte.h:35

◆ operator<<()

std::ostream & operator<< ( std::ostream &  out,
const SVDModeByte id 
)

Print id to stream by converting it to string.

Definition at line 69 of file SVDModeByte.cc.

70 {
71 out << ((std::string)id);
72 return out;
73 }

◆ SVDAPVHistograms()

SVDAPVHistograms ( const H &  templateAPV)
explicit

Use.

constructor, builds all histograms and customize them

Parameters
templateAPVto initialize all the histograms

Definition at line 151 of file SVDAPVHistograms.h.

152 {
153 m_defaultHistogram = new H(templateAPV);
154
155 VXD::GeoCache& geoCache = VXD::GeoCache::getInstance();
156 for (auto layer : geoCache.getLayers(VXD::SensorInfoBase::SVD)) {
157 unsigned int layerNumber = layer.getLayerNumber();
158 if (m_histograms.size() <= layerNumber)
159 m_histograms.resize(layerNumber + 1);
160
161 for (auto ladder : geoCache.getLadders(layer)) {
162 unsigned int ladderNumber = ladder.getLadderNumber();
163 if (m_histograms[layerNumber].size() <= ladderNumber)
164 m_histograms[layerNumber].resize(ladderNumber + 1);
165
166 for (Belle2::VxdID sensor : geoCache.getSensors(ladder)) {
167 unsigned int sensorNumber = sensor.getSensorNumber();
168 if (m_histograms[layerNumber][ladderNumber].size() <= sensorNumber)
169 m_histograms[layerNumber][ladderNumber].resize(sensorNumber + 1);
170 m_histograms[layerNumber][ladderNumber][sensorNumber].resize(2);
171
172 for (int view = VIndex ; view < UIndex + 1; view++) {
173 int nAPV = 6;
174 unsigned int viewNumber = 3;
175
176 if (m_histograms[layerNumber][ladderNumber][view].size() < viewNumber)
177 m_histograms[layerNumber][ladderNumber][sensorNumber].resize(viewNumber);
178 m_histograms[layerNumber][ladderNumber][sensorNumber][view].resize(nAPV);
179 for (int apv = 0; apv < nAPV; apv ++) {
180
181 H h = templateAPV;
182 customize(h, sensor, view, apv);
183 m_histograms[layerNumber][ladderNumber][sensorNumber][view][apv] = new H(h);
184 }
185 }
186 }
187 }
188 }
189 }
t_SVD m_histograms
the vector of vector ... that contains all histograms
H * m_defaultHistogram
the default histogram
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition: GeoCache.cc:214
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33
void customize(H &histogram, VxdID vxdID, int view, int apv)
customize the histogram with the sensor, view and APV numbers

◆ SVDHistograms()

SVDHistograms ( const H &  templateU3,
const H &  templateV3,
const H &  templateU456,
const H &  templateV456 
)

Use templates to initialize all the histograms.

constructor, builds all histograms and customize them

Parameters
templateU3for the layer 3 U side
templateV3for the layer 3 V side
templateU456for the layer 4 5 6 U side
templateV456for the layer 4 5 6 V side

Definition at line 156 of file SVDHistograms.h.

158 {
159 m_defaultHistogram = new H(templateU3);
160
161 VXD::GeoCache& geoCache = VXD::GeoCache::getInstance();
162 for (auto layer : geoCache.getLayers(VXD::SensorInfoBase::SVD)) {
163 unsigned int layerNumber = layer.getLayerNumber();
164 if (m_histograms.size() <= layerNumber)
165 m_histograms.resize(layerNumber + 1);
166
167 for (auto ladder : geoCache.getLadders(layer)) {
168 unsigned int ladderNumber = ladder.getLadderNumber();
169 if (m_histograms[layerNumber].size() <= ladderNumber)
170 m_histograms[layerNumber].resize(ladderNumber + 1);
171
172 for (Belle2::VxdID sensor : geoCache.getSensors(ladder)) {
173 unsigned int sensorNumber = sensor.getSensorNumber();
174 if (m_histograms[layerNumber][ladderNumber].size() <= sensorNumber)
175 m_histograms[layerNumber][ladderNumber].resize(sensorNumber + 1);
176 m_histograms[layerNumber][ladderNumber][sensorNumber].resize(2);
177
178 for (int view = VIndex ; view < UIndex + 1; view++) {
179 H h = layerNumber == 3 && view == UIndex ? templateU3 :
180 layerNumber == 3 && view == VIndex ? templateV3 :
181 view == UIndex ? templateU456 : templateV456 ;
182 customize(h, sensor, view);
183 m_histograms[layerNumber][ladderNumber][sensorNumber][view] = new H(h);
184 }
185 }
186 }
187 }
188 }
t_SVD m_histograms
the vector of vector ... that contains all histograms
H * m_defaultHistogram
the default histogram
void customize(H &histogram, VxdID vxdID, int view)
customize the histogram with the sensor, view

Variable Documentation

◆ c_DefaultID

const SVDModeByte::baseType c_DefaultID = 151
static

Default / non-informative id 10010111 = 151 Run type: zero-suppressed, 2 Event type: global run, 0 DAQ mode: 6-samples, 2 Trigger invalid 111 = 7.

Definition at line 106 of file SVDModeByte.h.

◆ s_APVSampleBegin

size_t s_APVSampleBegin = 0
staticprivate

first sample number for 3 sample acquisition mode (0 - 3)

Definition at line 297 of file SVDShaperDigit.h.

◆ s_APVSampleMode

size_t s_APVSampleMode = 6
staticprivate

APV acquisition mode (3 or 6)

Definition at line 296 of file SVDShaperDigit.h.