Belle II Software development
DQMHistAnalysisPXDER.cc
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#include <dqm/analysis/modules/DQMHistAnalysisPXDER.h>
10
11#include <pxd/geometry/SensorInfo.h>
12#include <vxd/geometry/SensorInfoBase.h>
13#include <vxd/geometry/GeoCache.h>
14
15#include <format>
16
17#include <TROOT.h>
18
19using namespace std;
20using namespace Belle2;
21
22//-----------------------------------------------------------------
23// Register the Module
24//-----------------------------------------------------------------
25REG_MODULE(DQMHistAnalysisPXDER);
26
27
28//-----------------------------------------------------------------
29// Implementation
30//-----------------------------------------------------------------
31
33{
34 // This module CAN NOT be run in parallel!
35 setDescription("PXD DQM analysis module for Express Reco ");
36
37 // Set module properties
38 addParam("histogramDirectoryName", m_histogramDirectoryName, "Name of the directory where histograms were placed",
39 std::string("PXDER"));
40}
41
43{
44 gROOT->cd(); // this seems to be important, or strange things happen
45 // basic constants presets:
47 c_nVXDLayers = geo.getLayers().size();
48 c_firstVXDLayer = 1; // counting start from 1...
56
57 c_nPXDSensors = 0;
58 for (VxdID layer : geo.getLayers()) {
59 for (VxdID ladder : geo.getLadders(layer)) {
60 if (layer.getLayerNumber() <= c_lastPXDLayer) { // PXD
61 c_nPXDSensors += geo.getLadders(layer).size() * geo.getSensors(ladder).size();
62 }
63 break;
64 }
65 }
66
67// m_hitMapCounts = "DQMER_PXD_PixelHitmapCounts";
68// m_hitMapClCounts = "DQMER_PXD_ClusterHitmapCounts";
69
70 for (int i = 0; i < c_nPXDSensors; i++) {
71 int iLayer = 0;
72 int iLadder = 0;
73 int iSensor = 0;
74 getIDsFromIndex(i, iLayer, iLadder, iSensor);
75 VxdID sensorID(iLayer, iLadder, iSensor);
76 string sensorDescr = std::format("{0}_{1}_{2}", iLayer, iLadder, iSensor);
77 //----------------------------------------------------------------
78 // Number of fired pixels per frame
79 //----------------------------------------------------------------
80 m_fired.emplace_back(std::format("DQMER_PXD_{0}_Fired", sensorDescr));
81 m_ref_fired.emplace_back(m_fired.back());
82 //----------------------------------------------------------------
83 // Number of clusters per frame
84 //----------------------------------------------------------------
85 m_clusters.emplace_back(std::format("DQMER_PXD_{0}_Clusters", sensorDescr));
86 m_ref_clusters.emplace_back(m_clusters.back());
87 //----------------------------------------------------------------
88 // Start row distribution
89 //----------------------------------------------------------------
90 m_startRow.emplace_back(std::format("DQMER_PXD_{0}_StartRow", sensorDescr));
91 m_ref_startRow.emplace_back(m_startRow.back());
92 //----------------------------------------------------------------
93 // Cluster seed charge by distance from the start row
94 //----------------------------------------------------------------
95 m_chargStartRow.emplace_back(std::format("DQMER_PXD_{0}_AverageSeedByStartRow", sensorDescr));
96 m_ref_chargStartRow.emplace_back(m_chargStartRow.back());
97
98
99 m_startRowCount.emplace_back(std::format("DQMER_PXD_{0}_SeedCountsByStartRow", sensorDescr));
100 m_ref_startRowCount.emplace_back(m_startRowCount.back());
101 //----------------------------------------------------------------
102 // Cluster Charge
103 //----------------------------------------------------------------
104 m_clusterCharge.emplace_back(std::format("DQMER_PXD_{0}_ClusterCharge", sensorDescr));
105 m_ref_clusterCharge.emplace_back(m_clusterCharge.back());
106 //----------------------------------------------------------------
107 // Pixel Signal
108 //----------------------------------------------------------------
109 m_pixelSignal.emplace_back(std::format("DQMER_PXD_{0}_PixelSignal", sensorDescr));
110 m_ref_pixelSignal.emplace_back(m_pixelSignal.back());
111 //----------------------------------------------------------------
112 // Cluster Size in U
113 //----------------------------------------------------------------
114 m_clusterSizeU.emplace_back(std::format("DQMER_PXD_{0}_ClusterSizeU", sensorDescr));
115 m_ref_clusterSizeU.emplace_back(m_clusterSizeU.back());
116 //----------------------------------------------------------------
117 // Cluster Size in V
118 //----------------------------------------------------------------
119 m_clusterSizeV.emplace_back(std::format("DQMER_PXD_{0}_ClusterSizeV", sensorDescr));
120 m_ref_clusterSizeV.emplace_back(m_clusterSizeV.back());
121 //----------------------------------------------------------------
122 // Cluster Size in U+V
123 //----------------------------------------------------------------
124 m_clusterSizeUV.emplace_back(std::format("DQMER_PXD_{0}_ClusterSizeUV", sensorDescr));
125 m_ref_clusterSizeUV.emplace_back(m_clusterSizeUV.back());
126 }
127// m_fHitMapCountsFlag = NULL;
128// m_fHitMapClCountsFlag = NULL;
129// m_hitMapCounts = NULL;
130// m_hitMapClCounts = NULL;
131
132// Create flag histograms:
133// DirPXDFlags->cd();
134 m_fFiredFlag = new TH1I("DQMER_PXD_FiredFlag", "DQM ER PXD Fired Flag",
136 m_fFiredFlag->GetXaxis()->SetTitle("Sensor ID");
137 m_fFiredFlag->GetYaxis()->SetTitle("flag");
138 m_fClustersFlag = new TH1I("DQMER_PXD_ClustersFlag", "DQM ER PXD Clusters Flag",
140 m_fClustersFlag->GetXaxis()->SetTitle("Sensor ID");
141 m_fClustersFlag->GetYaxis()->SetTitle("flag");
142 m_fStartRowFlag = new TH1I("DQMER_PXD_StartRowFlag", "DQM ER PXD Start Row Flag",
144 m_fStartRowFlag->GetXaxis()->SetTitle("Sensor ID");
145 m_fStartRowFlag->GetYaxis()->SetTitle("flag");
146 m_fChargStartRowFlag = new TH1I("DQMER_PXD_ChargStartRowFlag", "DQM ER PXD Charg Start Row Flag",
148 m_fChargStartRowFlag->GetXaxis()->SetTitle("Sensor ID");
149 m_fChargStartRowFlag->GetYaxis()->SetTitle("flag");
150 m_fStartRowCountFlag = new TH1I("DQMER_PXD_StartRowCountFlag", "DQM ER PXD Row Count Flag",
152 m_fStartRowCountFlag->GetXaxis()->SetTitle("Sensor ID");
153 m_fStartRowCountFlag->GetYaxis()->SetTitle("flag");
154// m_fHitMapCountsFlag = new TH1I("DQMER_PXD_PixelHitmapCountsFlag", "DQM ER PXD Pixel Hitmaps Counts Flag",
155// c_nPXDSensors, 0, c_nPXDSensors);
156// m_fHitMapCountsFlag->GetXaxis()->SetTitle("Sensor ID");
157// m_fHitMapCountsFlag->GetYaxis()->SetTitle("flag");
158// m_fHitMapClCountsFlag = new TH1I("DQMER_PXD_ClusterHitmapCountsFlag", "DQM ER PXD Cluster Hitmaps Counts Flag",
159// c_nPXDSensors, 0, c_nPXDSensors);
160// m_fHitMapClCountsFlag->GetXaxis()->SetTitle("Sensor ID");
161// m_fHitMapClCountsFlag->GetYaxis()->SetTitle("flag");
162 m_fClusterChargeFlag = new TH1I("DQMER_PXD_ClusterChargeFlag", "DQM ER PXD Cluster Charge Flag",
164 m_fClusterChargeFlag->GetXaxis()->SetTitle("Sensor ID");
165 m_fClusterChargeFlag->GetYaxis()->SetTitle("flag");
166 m_fPixelSignalFlag = new TH1I("DQMER_PXD_PixelSignalFlag", "DQM ER PXD Pixel Signal Flag",
168 m_fPixelSignalFlag->GetXaxis()->SetTitle("Sensor ID");
169 m_fPixelSignalFlag->GetYaxis()->SetTitle("flag");
170 m_fClusterSizeUFlag = new TH1I("DQMER_PXD_ClusterSizeUFlag", "DQM ER PXD Cluster Size U Flag",
172 m_fClusterSizeUFlag->GetXaxis()->SetTitle("Sensor ID");
173 m_fClusterSizeUFlag->GetYaxis()->SetTitle("flag");
174 m_fClusterSizeVFlag = new TH1I("DQMER_PXD_ClusterSizeVFlag", "DQM ER PXD Cluster Size V Flag",
176 m_fClusterSizeVFlag->GetXaxis()->SetTitle("Sensor ID");
177 m_fClusterSizeVFlag->GetYaxis()->SetTitle("flag");
178 m_fClusterSizeUVFlag = new TH1I("DQMER_PXD_ClusterSizeUVFlag", "DQM ER PXD Cluster Size UV Flag",
180 m_fClusterSizeUVFlag->GetXaxis()->SetTitle("Sensor ID");
181 m_fClusterSizeUVFlag->GetYaxis()->SetTitle("flag");
182
183 for (int i = 0; i < c_nPXDSensors; i++) {
184 int iLayer = 0;
185 int iLadder = 0;
186 int iSensor = 0;
187 getIDsFromIndex(i, iLayer, iLadder, iSensor);
188 TString AxisTicks = Form("%i_%i_%i", iLayer, iLadder, iSensor);
189// m_hitMapCounts->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
190// m_hitMapClCounts->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
191 m_fFiredFlag->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
192 m_fClustersFlag->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
193 m_fStartRowFlag->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
194 m_fChargStartRowFlag->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
195 m_fStartRowCountFlag->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
196// m_fHitMapCountsFlag->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
197// m_fHitMapClCountsFlag->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
198 m_fClusterChargeFlag->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
199 m_fPixelSignalFlag->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
200 m_fClusterSizeUFlag->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
201 m_fClusterSizeVFlag->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
202 m_fClusterSizeUVFlag->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
203 }
204// m_oldDir->cd();
205}
206
208{
209 // Just to make sure, reset all the histograms.
210// if (m_fHitMapCountsFlag != NULL) m_fHitMapCountsFlag->Reset();
211// if (m_fHitMapClCountsFlag != NULL) m_fHitMapClCountsFlag->Reset();
212 if (m_fFiredFlag != NULL) m_fFiredFlag->Reset();
213 if (m_fClustersFlag != NULL) m_fClustersFlag->Reset();
214 if (m_fStartRowFlag != NULL) m_fStartRowFlag->Reset();
215 if (m_fChargStartRowFlag != NULL) m_fChargStartRowFlag->Reset();
216 if (m_fStartRowCountFlag != NULL) m_fStartRowCountFlag->Reset();
217 if (m_fClusterChargeFlag != NULL) m_fClusterChargeFlag->Reset();
218 if (m_fPixelSignalFlag != NULL) m_fPixelSignalFlag->Reset();
219 if (m_fClusterSizeUFlag != NULL) m_fClusterSizeUFlag->Reset();
220 if (m_fClusterSizeVFlag != NULL) m_fClusterSizeVFlag->Reset();
221 if (m_fClusterSizeUVFlag != NULL) m_fClusterSizeUVFlag->Reset();
222
223// if (m_hitMapCounts != NULL) m_hitMapCounts->Reset();
224// if (m_hitMapClCounts != NULL) m_hitMapClCounts->Reset();
225
226}
227
228
230{
231
232 // Dont sum up!
233// if (m_fHitMapCountsFlag != NULL) m_fHitMapCountsFlag->Reset();
234// if (m_fHitMapClCountsFlag != NULL) m_fHitMapClCountsFlag->Reset();
235 if (m_fFiredFlag != NULL) m_fFiredFlag->Reset();
236 if (m_fClustersFlag != NULL) m_fClustersFlag->Reset();
237 if (m_fStartRowFlag != NULL) m_fStartRowFlag->Reset();
238 if (m_fChargStartRowFlag != NULL) m_fChargStartRowFlag->Reset();
239 if (m_fStartRowCountFlag != NULL) m_fStartRowCountFlag->Reset();
240 if (m_fClusterChargeFlag != NULL) m_fClusterChargeFlag->Reset();
241 if (m_fPixelSignalFlag != NULL) m_fPixelSignalFlag->Reset();
242 if (m_fClusterSizeUFlag != NULL) m_fClusterSizeUFlag->Reset();
243 if (m_fClusterSizeVFlag != NULL) m_fClusterSizeVFlag->Reset();
244 if (m_fClusterSizeUVFlag != NULL) m_fClusterSizeUVFlag->Reset();
245
246 // Compare histograms with reference histograms and create flags:
247 for (int i = 0; i < c_nPXDSensors; i++) {
248 double pars[2];
249 pars[0] = 0.01;// Probability value error?
250 pars[1] = 0.05;// Probability value warning?
251
252 double m_NoOfEvents = 1., m_NoOfEventsRef = 1.; // workaround
253
254// SetFlag(9, i, pars, (double)m_NoOfEvents / m_NoOfEventsRef,
255// m_hitMapCounts, r_hitMapCounts, m_fHitMapCountsFlag);
256// SetFlag(9, i, pars, (double)m_NoOfEvents / m_NoOfEventsRef,
257// m_hitMapClCounts, r_hitMapClCounts, m_fHitMapClCountsFlag);
258 SetFlag(2, i, pars, (double)m_NoOfEvents / m_NoOfEventsRef,
259 m_fired.at(i), m_ref_fired.at(i), m_fFiredFlag);
260 SetFlag(2, i, pars, (double)m_NoOfEvents / m_NoOfEventsRef,
262 SetFlag(100, i, pars, (double)m_NoOfEvents / m_NoOfEventsRef,
264 SetFlag(100, i, pars, (double)m_NoOfEvents / m_NoOfEventsRef,
266 SetFlag(100, i, pars, (double)m_NoOfEvents / m_NoOfEventsRef,
268 SetFlag(5, i, pars, (double)m_NoOfEvents / m_NoOfEventsRef,
270 SetFlag(5, i, pars, (double)m_NoOfEvents / m_NoOfEventsRef,
272 SetFlag(2, i, pars, (double)m_NoOfEvents / m_NoOfEventsRef,
274 SetFlag(2, i, pars, (double)m_NoOfEvents / m_NoOfEventsRef,
276 SetFlag(2, i, pars, (double)m_NoOfEvents / m_NoOfEventsRef,
278
279 }
280}
281
282
283void DQMHistAnalysisPXDERModule::getIDsFromIndex(const int Index, int& Layer, int& Ladder, int& Sensor) const
284{
286 int tempcounter = 0;
287 for (VxdID layer : geo.getLayers()) {
288 if (layer.getLayerNumber() > c_lastPXDLayer) continue; // need PXD
289 for (VxdID ladder : geo.getLadders(layer)) {
290 for (VxdID sensor : geo.getSensors(ladder)) {
291 if (tempcounter == Index) {
292 Layer = layer.getLayerNumber();
293 Ladder = ladder.getLadderNumber();
294 Sensor = sensor.getSensorNumber();
295 return;
296 }
297 tempcounter++;
298 }
299 }
300 }
301}
302
303int DQMHistAnalysisPXDERModule::SetFlag(int Type, int bin, const double* pars, double ratio, const std::string& name_hist,
304 const std::string& name_refhist, TH1I* flaghist)
305{
306 int iret = 0;
307 float WarningLevel = 6.0;
308 float ErrorLevel = 10.0;
309
310 auto hist = findHist(m_histogramDirectoryName, name_hist);
311 if (!hist) return -1;
312 auto refhist = findRefHist(m_histogramDirectoryName, name_refhist);
313 if (!refhist) return -1;
314
315 // What happens if they are TH1I, TH1D and not TH1F
316
317 auto temp = std::unique_ptr<TH1F>(new TH1F("temp", "temp", hist->GetNbinsX(), hist->GetXaxis()->GetXmin(),
318 hist->GetXaxis()->GetXmax()));
319 double NEvents = 0;
320 double flagInt = 0;
321 double flagrInt = 0;
322 for (int j = 0; j < hist->GetNbinsX(); j++) {
323 double val = hist->GetBinContent(j + 1);
324 NEvents += val;
325 val = val / ratio;
326 temp->SetBinContent(j + 1, val);
327 flagInt += temp->GetBinContent(j + 1);
328 flagrInt += refhist->GetBinContent(j + 1);
329 }
330 if (NEvents < 100) { // not enough information for comparison
331 iret = -1;
332 flaghist->SetBinContent(bin + 1, -1);
333 return iret;
334 }
335 double flag = temp->GetMean();
336 double flagErr = temp->GetMeanError();
337 double flagRMS = temp->GetRMS();
338 double flagRMSErr = temp->GetRMSError();
339 double flagr = refhist->GetMean();
340 double flagrErr = refhist->GetMeanError();
341 double flagrRMS = refhist->GetRMS();
342 double flagrRMSErr = refhist->GetRMSError();
343 TString strDebugInfo = Form("Conditions for Flag--->\n source %f %f+-%f %f+-%f\n referen %f %f+-%f %f+-%f\n",
344 flagInt, flag, flagErr, flagRMS, flagRMSErr,
345 flagrInt, flagr, flagrErr, flagrRMS, flagrRMSErr
346 );
347 B2DEBUG(130, strDebugInfo.Data());
348 if (Type == 1) { // counts+mean+RMS use
349 if ((fabs(flag - flagr) > ErrorLevel * (flagErr + flagrErr)) ||
350 (fabs(flagRMS - flagrRMS) > ErrorLevel * (flagRMSErr + flagrRMSErr)) ||
351 (fabs(flagInt - flagrInt) > ErrorLevel * (sqrt(flagInt) + sqrt(flagrInt)))
352 ) {
353 flaghist->SetBinContent(bin + 1, 2);
354 } else if ((fabs(flag - flagr) > WarningLevel * (flagErr + flagrErr)) ||
355 (fabs(flagRMS - flagrRMS) > WarningLevel * (flagRMSErr + flagrRMSErr)) ||
356 (fabs(flagInt - flagrInt) > WarningLevel * (sqrt(flagInt) + sqrt(flagrInt)))
357 ) {
358 flaghist->SetBinContent(bin + 1, 1);
359 } else {
360 flaghist->SetBinContent(bin + 1, 0);
361 }
362 iret = 1;
363 } else if (Type == 2) { // counts use
364 if (fabs(flagInt - flagrInt) > ErrorLevel * (sqrt(flagInt) + sqrt(flagrInt))) {
365 flaghist->SetBinContent(bin + 1, 2);
366 } else if (fabs(flagInt - flagrInt) > WarningLevel * (sqrt(flagInt) + sqrt(flagrInt))) {
367 flaghist->SetBinContent(bin + 1, 1);
368 } else {
369 flaghist->SetBinContent(bin + 1, 0);
370 }
371 iret = 1;
372 } else if (Type == 3) { // mean use
373 if (fabs(flag - flagr) > ErrorLevel * (flagErr + flagrErr)) {
374 flaghist->SetBinContent(bin + 1, 2);
375 } else if (fabs(flag - flagr) > WarningLevel * (flagErr + flagrErr)) {
376 flaghist->SetBinContent(bin + 1, 1);
377 } else {
378 flaghist->SetBinContent(bin + 1, 0);
379 }
380 iret = 1;
381 } else if (Type == 4) { // RMS use
382 if (fabs(flagRMS - flagrRMS) > ErrorLevel * (flagRMSErr + flagrRMSErr)) {
383 flaghist->SetBinContent(bin + 1, 2);
384 } else if (fabs(flagRMS - flagrRMS) > WarningLevel * (flagRMSErr + flagrRMSErr)) {
385 flaghist->SetBinContent(bin + 1, 1);
386 } else {
387 flaghist->SetBinContent(bin + 1, 0);
388 }
389 iret = 1;
390 } else if (Type == 5) { // counts+mean use
391 if ((fabs(flag - flagr) > ErrorLevel * (flagErr + flagrErr)) ||
392 (fabs(flagInt - flagrInt) > ErrorLevel * (sqrt(flagInt) + sqrt(flagrInt)))
393 ) {
394 flaghist->SetBinContent(bin + 1, 2);
395 } else if ((fabs(flag - flagr) > WarningLevel * (flagErr + flagrErr)) ||
396 (fabs(flagInt - flagrInt) > WarningLevel * (sqrt(flagInt) + sqrt(flagrInt)))
397 ) {
398 flaghist->SetBinContent(bin + 1, 1);
399 } else {
400 flaghist->SetBinContent(bin + 1, 0);
401 }
402 iret = 1;
403 } else if (Type == 9) { // bin content use
404 flagInt = temp->GetBinContent(bin + 1);
405 flagrInt = refhist->GetBinContent(bin + 1);
406 if (fabs(flagInt - flagrInt) > ErrorLevel * (sqrt(flagInt) + sqrt(flagrInt))) {
407 flaghist->SetBinContent(bin + 1, 2);
408 } else if (fabs(flagInt - flagrInt) > WarningLevel * (sqrt(flagInt) + sqrt(flagrInt))) {
409 flaghist->SetBinContent(bin + 1, 1);
410 } else {
411 flaghist->SetBinContent(bin + 1, 0);
412 }
413 iret = 1;
414 } else if (Type == 10) {
415 float flag2 = refhist->Chi2Test(temp.get());
416 flaghist->SetBinContent(bin + 1, 0);
417 if (flag2 > pars[1])
418 flaghist->SetBinContent(bin + 1, 2);
419 if (flag2 > pars[0])
420 flaghist->SetBinContent(bin + 1, 1);
421 iret = 1;
422 } else if (Type == 100) {
423 flaghist->SetBinContent(bin + 1, 0);
424 iret = 1;
425 } else {
426 flaghist->SetBinContent(bin + 1, -3);
427 iret = -1;
428 }
429 strDebugInfo = Form("SetFlag---> %f, type %i\n", flaghist->GetBinContent(bin + 1), Type);
430 B2DEBUG(130, strDebugInfo.Data());
431 return iret;
432}
433
434// int DQMHistAnalysisPXDERModule::SetFlag(int Type, int bin, double* pars, double ratio, std::string name_hist, std::string name_refhist, TH1I* flaghist)
435// {
436//
437// TH1F* histF = new TH1F("histF", "histF", hist->GetNbinsX(), hist->GetXaxis()->GetXmin(), hist->GetXaxis()->GetXmax());
438// TH1F* refhistF = new TH1F("refhistF", "refhistF", refhist->GetNbinsX(), refhist->GetXaxis()->GetXmin(),
439// refhist->GetXaxis()->GetXmax());
440// for (int j = 0; j < hist->GetNbinsX(); j++) {
441// histF->SetBinContent(j + 1, hist->GetBinContent(j + 1));
442// refhistF->SetBinContent(j + 1, refhist->GetBinContent(j + 1));
443// }
444// int ret = SetFlag(Type, bin, pars, ratio, histF, refhistF, flaghist);
445// delete histF;
446// delete refhistF;
447// return ret;
448// }
449
DQMHistAnalysisModule()
Constructor / Destructor.
static TH1 * findRefHist(const std::string &dirname, const std::string &histname="", ERefScaling scaling=ERefScaling::c_RefScaleNone, const TH1 *hist=nullptr)
Find reference histogram.
static TH1 * findHist(const std::string &dirname, const std::string &histname="", bool onlyIfUpdated=false)
Find histogram.
int c_nPXDLayers
Number of PXD layers on Belle II.
void terminate(void) override final
Terminator.
void initialize() override final
Initializer.
std::vector< std::string > m_chargStartRow
Cluster seed charge by distance from the start row.
std::vector< std::string > m_startRow
Start row distribution.
std::vector< std::string > m_ref_clusterCharge
Charge of clusters.
TH1I * m_fClusterSizeUFlag
Flags of u cluster size.
int c_firstVXDLayer
First VXD layer on Belle II.
std::vector< std::string > m_ref_clusterSizeV
v cluster size
int c_lastVXDLayer
Last VXD layer on Belle II.
std::vector< std::string > m_clusterSizeU
u cluster size
TH1I * m_fPixelSignalFlag
Flags of Charge of pixels.
std::vector< std::string > m_ref_startRow
Start row distribution.
int c_lastPXDLayer
Last PXD layer on Belle II.
std::vector< std::string > m_ref_clusterSizeU
u cluster size
std::vector< std::string > m_clusters
Clusters per event.
std::vector< std::string > m_ref_startRowCount
counter for Cluster seed charge by distance from the start row
TH1I * m_fStartRowFlag
Flags of Start row distribution.
TH1I * m_fClusterSizeUVFlag
Flags of Cluster size.
std::vector< std::string > m_clusterSizeUV
Cluster size.
int c_firstPXDLayer
First PXD layer on Belle II.
TH1I * m_fStartRowCountFlag
Flags of counter for Cluster seed charge by distance from the start row.
TH1I * m_fChargStartRowFlag
Flags of Cluster seed charge by distance from the start row.
void event() override final
This method is called for each event.
TH1I * m_fClusterSizeVFlag
Flags of v cluster size.
TH1I * m_fClustersFlag
Flags of Clusters per event.
std::vector< std::string > m_startRowCount
counter for Cluster seed charge by distance from the start row
std::string m_histogramDirectoryName
Function return flag histogram filled based on condition from TH1I source.
std::vector< std::string > m_clusterSizeV
v cluster size
std::vector< std::string > m_pixelSignal
Charge of pixels.
std::vector< std::string > m_ref_clusterSizeUV
Cluster size.
std::vector< std::string > m_ref_clusters
Clusters per event.
void beginRun() override final
Called when entering a new run.
TH1I * m_fClusterChargeFlag
Flags of Charge of clusters.
int SetFlag(int Type, int bin, const double *pars, double ratio, const std::string &name_hist, const std::string &name_refhist, TH1I *flaghist)
Function return flag histogram filled based on condition from TH1F source.
std::vector< std::string > m_fired
Hitmaps of Digits.
TH1I * m_fFiredFlag
Basic Directory in output file.
std::vector< std::string > m_ref_chargStartRow
Cluster seed charge by distance from the start row.
std::vector< std::string > m_ref_pixelSignal
Charge of pixels.
int c_nPXDSensors
Number of PXD sensors on Belle II.
std::vector< std::string > m_clusterCharge
Charge of clusters.
void getIDsFromIndex(const int Index, int &Layer, int &Ladder, int &Sensor) const
Function return index of sensor in plots.
int c_nVXDLayers
Number of pixels on PXD v direction.
std::vector< std::string > m_ref_fired
Fired pixels per event.
int c_firstSVDLayer
First SVD layer on Belle II.
int c_nSVDLayers
Number of SVD layers on Belle II.
int c_lastSVDLayer
Last SVD layer on Belle II.
void setDescription(const std::string &description)
Sets the description of the module.
Definition Module.cc:214
Class to facilitate easy access to sensor information of the VXD like coordinate transformations or p...
Definition GeoCache.h:38
const std::set< Belle2::VxdID > getLayers(SensorInfoBase::SensorType sensortype=SensorInfoBase::VXD)
Return a set of all known Layers.
Definition GeoCache.cc:176
const std::set< Belle2::VxdID > & getSensors(Belle2::VxdID ladder) const
Return a set of all sensor IDs belonging to a given ladder.
Definition GeoCache.cc:204
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition GeoCache.cc:214
const std::set< Belle2::VxdID > & getLadders(Belle2::VxdID layer) const
Return a set of all ladder IDs belonging to a given layer.
Definition GeoCache.cc:193
Class to uniquely identify a any structure of the PXD and SVD.
Definition VxdID.h:32
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition Module.h:559
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition Module.h:649
double sqrt(double a)
sqrt for double
Definition beamHelpers.h:28
Abstract base class for different kinds of events.
STL namespace.