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 <boost/format.hpp>
16
17#include <TROOT.h>
18
19using namespace std;
20using boost::format;
21using namespace Belle2;
22
23//-----------------------------------------------------------------
24// Register the Module
25//-----------------------------------------------------------------
26REG_MODULE(DQMHistAnalysisPXDER);
27
28
29//-----------------------------------------------------------------
30// Implementation
31//-----------------------------------------------------------------
32
34{
35 // This module CAN NOT be run in parallel!
36 setDescription("PXD DQM analysis module for Express Reco ");
37
38 // Set module properties
39 addParam("histogramDirectoryName", m_histogramDirectoryName, "Name of the directory where histograms were placed",
40 std::string("PXDER"));
41 addParam("RefHistoFile", m_refFileName, "Reference histrogram file name", std::string("refHisto.root"));
42}
43
45{
46 m_refFile = NULL;
47 if (m_refFileName != "") {
48 m_refFile = new TFile(m_refFileName.data());// default is read only
49 }
50
51 gROOT->cd(); // this seems to be important, or strange things happen
52 // basic constants presets:
54 c_nVXDLayers = geo.getLayers().size();
55 c_firstVXDLayer = 1; // counting start from 1...
63
64 c_nPXDSensors = 0;
65 for (VxdID layer : geo.getLayers()) {
66 for (VxdID ladder : geo.getLadders(layer)) {
67 if (layer.getLayerNumber() <= c_lastPXDLayer) { // PXD
68 c_nPXDSensors += geo.getLadders(layer).size() * geo.getSensors(ladder).size();
69 }
70 break;
71 }
72 }
73
74// m_hitMapCounts = "DQMER_PXD_PixelHitmapCounts";
75// m_hitMapClCounts = "DQMER_PXD_ClusterHitmapCounts";
76
77 for (int i = 0; i < c_nPXDSensors; i++) {
78 int iLayer = 0;
79 int iLadder = 0;
80 int iSensor = 0;
81 getIDsFromIndex(i, iLayer, iLadder, iSensor);
82 VxdID sensorID(iLayer, iLadder, iSensor);
83 string sensorDescr = str(format("%1%_%2%_%3%") % iLayer % iLadder % iSensor);
84 //----------------------------------------------------------------
85 // Number of fired pixels per frame
86 //----------------------------------------------------------------
87 m_fired.emplace_back(str(format("DQMER_PXD_%1%_Fired") % sensorDescr));
88 m_ref_fired.emplace_back(m_fired.back());
89 //----------------------------------------------------------------
90 // Number of clusters per frame
91 //----------------------------------------------------------------
92 m_clusters.emplace_back(str(format("DQMER_PXD_%1%_Clusters") % sensorDescr));
93 m_ref_clusters.emplace_back(m_clusters.back());
94 //----------------------------------------------------------------
95 // Start row distribution
96 //----------------------------------------------------------------
97 m_startRow.emplace_back(str(format("DQMER_PXD_%1%_StartRow") % sensorDescr));
98 m_ref_startRow.emplace_back(m_startRow.back());
99 //----------------------------------------------------------------
100 // Cluster seed charge by distance from the start row
101 //----------------------------------------------------------------
102 m_chargStartRow.emplace_back(str(format("DQMER_PXD_%1%_AverageSeedByStartRow") % sensorDescr));
103 m_ref_chargStartRow.emplace_back(m_chargStartRow.back());
104
105
106 m_startRowCount.emplace_back(str(format("DQMER_PXD_%1%_SeedCountsByStartRow") % sensorDescr));
107 m_ref_startRowCount.emplace_back(m_startRowCount.back());
108 //----------------------------------------------------------------
109 // Cluster Charge
110 //----------------------------------------------------------------
111 m_clusterCharge.emplace_back(str(format("DQMER_PXD_%1%_ClusterCharge") % sensorDescr));
112 m_ref_clusterCharge.emplace_back(m_clusterCharge.back());
113 //----------------------------------------------------------------
114 // Pixel Signal
115 //----------------------------------------------------------------
116 m_pixelSignal.emplace_back(str(format("DQMER_PXD_%1%_PixelSignal") % sensorDescr));
117 m_ref_pixelSignal.emplace_back(m_pixelSignal.back());
118 //----------------------------------------------------------------
119 // Cluster Size in U
120 //----------------------------------------------------------------
121 m_clusterSizeU.emplace_back(str(format("DQMER_PXD_%1%_ClusterSizeU") % sensorDescr));
122 m_ref_clusterSizeU.emplace_back(m_clusterSizeU.back());
123 //----------------------------------------------------------------
124 // Cluster Size in V
125 //----------------------------------------------------------------
126 m_clusterSizeV.emplace_back(str(format("DQMER_PXD_%1%_ClusterSizeV") % sensorDescr));
127 m_ref_clusterSizeV.emplace_back(m_clusterSizeV.back());
128 //----------------------------------------------------------------
129 // Cluster Size in U+V
130 //----------------------------------------------------------------
131 m_clusterSizeUV.emplace_back(str(format("DQMER_PXD_%1%_ClusterSizeUV") % sensorDescr));
132 m_ref_clusterSizeUV.emplace_back(m_clusterSizeUV.back());
133 }
134// m_fHitMapCountsFlag = NULL;
135// m_fHitMapClCountsFlag = NULL;
136// m_hitMapCounts = NULL;
137// m_hitMapClCounts = NULL;
138
139// Create flag histograms:
140// DirPXDFlags->cd();
141 m_fFiredFlag = new TH1I("DQMER_PXD_FiredFlag", "DQM ER PXD Fired Flag",
143 m_fFiredFlag->GetXaxis()->SetTitle("Sensor ID");
144 m_fFiredFlag->GetYaxis()->SetTitle("flag");
145 m_fClustersFlag = new TH1I("DQMER_PXD_ClustersFlag", "DQM ER PXD Clusters Flag",
147 m_fClustersFlag->GetXaxis()->SetTitle("Sensor ID");
148 m_fClustersFlag->GetYaxis()->SetTitle("flag");
149 m_fStartRowFlag = new TH1I("DQMER_PXD_StartRowFlag", "DQM ER PXD Start Row Flag",
151 m_fStartRowFlag->GetXaxis()->SetTitle("Sensor ID");
152 m_fStartRowFlag->GetYaxis()->SetTitle("flag");
153 m_fChargStartRowFlag = new TH1I("DQMER_PXD_ChargStartRowFlag", "DQM ER PXD Charg Start Row Flag",
155 m_fChargStartRowFlag->GetXaxis()->SetTitle("Sensor ID");
156 m_fChargStartRowFlag->GetYaxis()->SetTitle("flag");
157 m_fStartRowCountFlag = new TH1I("DQMER_PXD_StartRowCountFlag", "DQM ER PXD Row Count Flag",
159 m_fStartRowCountFlag->GetXaxis()->SetTitle("Sensor ID");
160 m_fStartRowCountFlag->GetYaxis()->SetTitle("flag");
161// m_fHitMapCountsFlag = new TH1I("DQMER_PXD_PixelHitmapCountsFlag", "DQM ER PXD Pixel Hitmaps Counts Flag",
162// c_nPXDSensors, 0, c_nPXDSensors);
163// m_fHitMapCountsFlag->GetXaxis()->SetTitle("Sensor ID");
164// m_fHitMapCountsFlag->GetYaxis()->SetTitle("flag");
165// m_fHitMapClCountsFlag = new TH1I("DQMER_PXD_ClusterHitmapCountsFlag", "DQM ER PXD Cluster Hitmaps Counts Flag",
166// c_nPXDSensors, 0, c_nPXDSensors);
167// m_fHitMapClCountsFlag->GetXaxis()->SetTitle("Sensor ID");
168// m_fHitMapClCountsFlag->GetYaxis()->SetTitle("flag");
169 m_fClusterChargeFlag = new TH1I("DQMER_PXD_ClusterChargeFlag", "DQM ER PXD Cluster Charge Flag",
171 m_fClusterChargeFlag->GetXaxis()->SetTitle("Sensor ID");
172 m_fClusterChargeFlag->GetYaxis()->SetTitle("flag");
173 m_fPixelSignalFlag = new TH1I("DQMER_PXD_PixelSignalFlag", "DQM ER PXD Pixel Signal Flag",
175 m_fPixelSignalFlag->GetXaxis()->SetTitle("Sensor ID");
176 m_fPixelSignalFlag->GetYaxis()->SetTitle("flag");
177 m_fClusterSizeUFlag = new TH1I("DQMER_PXD_ClasterSizeUFlag", "DQM ER PXD Cluster Size U Flag",
179 m_fClusterSizeUFlag->GetXaxis()->SetTitle("Sensor ID");
180 m_fClusterSizeUFlag->GetYaxis()->SetTitle("flag");
181 m_fClusterSizeVFlag = new TH1I("DQMER_PXD_ClasterSizeVFlag", "DQM ER PXD Cluster Size V Flag",
183 m_fClusterSizeVFlag->GetXaxis()->SetTitle("Sensor ID");
184 m_fClusterSizeVFlag->GetYaxis()->SetTitle("flag");
185 m_fClusterSizeUVFlag = new TH1I("DQMER_PXD_ClasterSizeUVFlag", "DQM ER PXD Cluster Size UV Flag",
187 m_fClusterSizeUVFlag->GetXaxis()->SetTitle("Sensor ID");
188 m_fClusterSizeUVFlag->GetYaxis()->SetTitle("flag");
189
190 for (int i = 0; i < c_nPXDSensors; i++) {
191 int iLayer = 0;
192 int iLadder = 0;
193 int iSensor = 0;
194 getIDsFromIndex(i, iLayer, iLadder, iSensor);
195 TString AxisTicks = Form("%i_%i_%i", iLayer, iLadder, iSensor);
196// m_hitMapCounts->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
197// m_hitMapClCounts->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
198 m_fFiredFlag->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
199 m_fClustersFlag->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
200 m_fStartRowFlag->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
201 m_fChargStartRowFlag->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
202 m_fStartRowCountFlag->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
203// m_fHitMapCountsFlag->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
204// m_fHitMapClCountsFlag->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
205 m_fClusterChargeFlag->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
206 m_fPixelSignalFlag->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
207 m_fClusterSizeUFlag->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
208 m_fClusterSizeVFlag->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
209 m_fClusterSizeUVFlag->GetXaxis()->SetBinLabel(i + 1, AxisTicks.Data());
210 }
211// m_oldDir->cd();
212}
213
215{
216 // Just to make sure, reset all the histograms.
217// if (m_fHitMapCountsFlag != NULL) m_fHitMapCountsFlag->Reset();
218// if (m_fHitMapClCountsFlag != NULL) m_fHitMapClCountsFlag->Reset();
219 if (m_fFiredFlag != NULL) m_fFiredFlag->Reset();
220 if (m_fClustersFlag != NULL) m_fClustersFlag->Reset();
221 if (m_fStartRowFlag != NULL) m_fStartRowFlag->Reset();
222 if (m_fChargStartRowFlag != NULL) m_fChargStartRowFlag->Reset();
223 if (m_fStartRowCountFlag != NULL) m_fStartRowCountFlag->Reset();
224 if (m_fClusterChargeFlag != NULL) m_fClusterChargeFlag->Reset();
225 if (m_fPixelSignalFlag != NULL) m_fPixelSignalFlag->Reset();
226 if (m_fClusterSizeUFlag != NULL) m_fClusterSizeUFlag->Reset();
227 if (m_fClusterSizeVFlag != NULL) m_fClusterSizeVFlag->Reset();
228 if (m_fClusterSizeUVFlag != NULL) m_fClusterSizeUVFlag->Reset();
229
230// if (m_hitMapCounts != NULL) m_hitMapCounts->Reset();
231// if (m_hitMapClCounts != NULL) m_hitMapClCounts->Reset();
232
233}
234
235
237{
238
239 // Dont sum up!
240// if (m_fHitMapCountsFlag != NULL) m_fHitMapCountsFlag->Reset();
241// if (m_fHitMapClCountsFlag != NULL) m_fHitMapClCountsFlag->Reset();
242 if (m_fFiredFlag != NULL) m_fFiredFlag->Reset();
243 if (m_fClustersFlag != NULL) m_fClustersFlag->Reset();
244 if (m_fStartRowFlag != NULL) m_fStartRowFlag->Reset();
245 if (m_fChargStartRowFlag != NULL) m_fChargStartRowFlag->Reset();
246 if (m_fStartRowCountFlag != NULL) m_fStartRowCountFlag->Reset();
247 if (m_fClusterChargeFlag != NULL) m_fClusterChargeFlag->Reset();
248 if (m_fPixelSignalFlag != NULL) m_fPixelSignalFlag->Reset();
249 if (m_fClusterSizeUFlag != NULL) m_fClusterSizeUFlag->Reset();
250 if (m_fClusterSizeVFlag != NULL) m_fClusterSizeVFlag->Reset();
251 if (m_fClusterSizeUVFlag != NULL) m_fClusterSizeUVFlag->Reset();
252
253 // Compare histograms with reference histograms and create flags:
254 for (int i = 0; i < c_nPXDSensors; i++) {
255 double pars[2];
256 pars[0] = 0.01;// Probability value error?
257 pars[1] = 0.05;// Probability value warning?
258
259 double m_NoOfEvents = 1., m_NoOfEventsRef = 1.; // workaround
260
261// SetFlag(9, i, pars, (double)m_NoOfEvents / m_NoOfEventsRef,
262// m_hitMapCounts, r_hitMapCounts, m_fHitMapCountsFlag);
263// SetFlag(9, i, pars, (double)m_NoOfEvents / m_NoOfEventsRef,
264// m_hitMapClCounts, r_hitMapClCounts, m_fHitMapClCountsFlag);
265 SetFlag(2, i, pars, (double)m_NoOfEvents / m_NoOfEventsRef,
266 m_fired.at(i), m_ref_fired.at(i), m_fFiredFlag);
267 SetFlag(2, i, pars, (double)m_NoOfEvents / m_NoOfEventsRef,
269 SetFlag(100, i, pars, (double)m_NoOfEvents / m_NoOfEventsRef,
271 SetFlag(100, i, pars, (double)m_NoOfEvents / m_NoOfEventsRef,
273 SetFlag(100, i, pars, (double)m_NoOfEvents / m_NoOfEventsRef,
275 SetFlag(5, i, pars, (double)m_NoOfEvents / m_NoOfEventsRef,
277 SetFlag(5, i, pars, (double)m_NoOfEvents / m_NoOfEventsRef,
279 SetFlag(2, i, pars, (double)m_NoOfEvents / m_NoOfEventsRef,
281 SetFlag(2, i, pars, (double)m_NoOfEvents / m_NoOfEventsRef,
283 SetFlag(2, i, pars, (double)m_NoOfEvents / m_NoOfEventsRef,
285
286 }
287}
288
289
290void DQMHistAnalysisPXDERModule::getIDsFromIndex(const int Index, int& Layer, int& Ladder, int& Sensor) const
291{
293 int tempcounter = 0;
294 for (VxdID layer : geo.getLayers()) {
295 if (layer.getLayerNumber() > c_lastPXDLayer) continue; // need PXD
296 for (VxdID ladder : geo.getLadders(layer)) {
297 for (VxdID sensor : geo.getSensors(ladder)) {
298 if (tempcounter == Index) {
299 Layer = layer.getLayerNumber();
300 Ladder = ladder.getLadderNumber();
301 Sensor = sensor.getSensorNumber();
302 return;
303 }
304 tempcounter++;
305 }
306 }
307 }
308}
309
310int DQMHistAnalysisPXDERModule::SetFlag(int Type, int bin, const double* pars, double ratio, const std::string& name_hist,
311 const std::string& name_refhist, TH1I* flaghist)
312{
313 int iret = 0;
314 float WarningLevel = 6.0;
315 float ErrorLevel = 10.0;
316
317 TH1* hist = nullptr, *refhist = nullptr;
318
319 hist = findHist(m_histogramDirectoryName, name_hist);
320 if (!hist) return -1;
321 // assumes that ref file has no sub dirs
322 refhist = findHistInFile(m_refFile, name_refhist);
323 if (!refhist) return -1;
324
325 // What happens if they are TH1I, TH1D and not TH1F
326
327 auto temp = std::unique_ptr<TH1F>(new TH1F("temp", "temp", hist->GetNbinsX(), hist->GetXaxis()->GetXmin(),
328 hist->GetXaxis()->GetXmax()));
329 double NEvents = 0;
330 double flagInt = 0;
331 double flagrInt = 0;
332 for (int j = 0; j < hist->GetNbinsX(); j++) {
333 double val = hist->GetBinContent(j + 1);
334 NEvents += val;
335 val = val / ratio;
336 temp->SetBinContent(j + 1, val);
337 flagInt += temp->GetBinContent(j + 1);
338 flagrInt += refhist->GetBinContent(j + 1);
339 }
340 if (NEvents < 100) { // not enough information for comparison
341 iret = -1;
342 flaghist->SetBinContent(bin + 1, -1);
343 return iret;
344 }
345 double flag = temp->GetMean();
346 double flagErr = temp->GetMeanError();
347 double flagRMS = temp->GetRMS();
348 double flagRMSErr = temp->GetRMSError();
349 double flagr = refhist->GetMean();
350 double flagrErr = refhist->GetMeanError();
351 double flagrRMS = refhist->GetRMS();
352 double flagrRMSErr = refhist->GetRMSError();
353 TString strDebugInfo = Form("Conditions for Flag--->\n source %f %f+-%f %f+-%f\n referen %f %f+-%f %f+-%f\n",
354 flagInt, flag, flagErr, flagRMS, flagRMSErr,
355 flagrInt, flagr, flagrErr, flagrRMS, flagrRMSErr
356 );
357 B2DEBUG(130, strDebugInfo.Data());
358 if (Type == 1) { // counts+mean+RMS use
359 if ((fabs(flag - flagr) > ErrorLevel * (flagErr + flagrErr)) ||
360 (fabs(flagRMS - flagrRMS) > ErrorLevel * (flagRMSErr + flagrRMSErr)) ||
361 (fabs(flagInt - flagrInt) > ErrorLevel * (sqrt(flagInt) + sqrt(flagrInt)))
362 ) {
363 flaghist->SetBinContent(bin + 1, 2);
364 } else if ((fabs(flag - flagr) > WarningLevel * (flagErr + flagrErr)) ||
365 (fabs(flagRMS - flagrRMS) > WarningLevel * (flagRMSErr + flagrRMSErr)) ||
366 (fabs(flagInt - flagrInt) > WarningLevel * (sqrt(flagInt) + sqrt(flagrInt)))
367 ) {
368 flaghist->SetBinContent(bin + 1, 1);
369 } else {
370 flaghist->SetBinContent(bin + 1, 0);
371 }
372 iret = 1;
373 } else if (Type == 2) { // counts use
374 if (fabs(flagInt - flagrInt) > ErrorLevel * (sqrt(flagInt) + sqrt(flagrInt))) {
375 flaghist->SetBinContent(bin + 1, 2);
376 } else if (fabs(flagInt - flagrInt) > WarningLevel * (sqrt(flagInt) + sqrt(flagrInt))) {
377 flaghist->SetBinContent(bin + 1, 1);
378 } else {
379 flaghist->SetBinContent(bin + 1, 0);
380 }
381 iret = 1;
382 } else if (Type == 3) { // mean use
383 if (fabs(flag - flagr) > ErrorLevel * (flagErr + flagrErr)) {
384 flaghist->SetBinContent(bin + 1, 2);
385 } else if (fabs(flag - flagr) > WarningLevel * (flagErr + flagrErr)) {
386 flaghist->SetBinContent(bin + 1, 1);
387 } else {
388 flaghist->SetBinContent(bin + 1, 0);
389 }
390 iret = 1;
391 } else if (Type == 4) { // RMS use
392 if (fabs(flagRMS - flagrRMS) > ErrorLevel * (flagRMSErr + flagrRMSErr)) {
393 flaghist->SetBinContent(bin + 1, 2);
394 } else if (fabs(flagRMS - flagrRMS) > WarningLevel * (flagRMSErr + flagrRMSErr)) {
395 flaghist->SetBinContent(bin + 1, 1);
396 } else {
397 flaghist->SetBinContent(bin + 1, 0);
398 }
399 iret = 1;
400 } else if (Type == 5) { // counts+mean use
401 if ((fabs(flag - flagr) > ErrorLevel * (flagErr + flagrErr)) ||
402 (fabs(flagInt - flagrInt) > ErrorLevel * (sqrt(flagInt) + sqrt(flagrInt)))
403 ) {
404 flaghist->SetBinContent(bin + 1, 2);
405 } else if ((fabs(flag - flagr) > WarningLevel * (flagErr + flagrErr)) ||
406 (fabs(flagInt - flagrInt) > WarningLevel * (sqrt(flagInt) + sqrt(flagrInt)))
407 ) {
408 flaghist->SetBinContent(bin + 1, 1);
409 } else {
410 flaghist->SetBinContent(bin + 1, 0);
411 }
412 iret = 1;
413 } else if (Type == 9) { // bin content use
414 flagInt = temp->GetBinContent(bin + 1);
415 flagrInt = refhist->GetBinContent(bin + 1);
416 if (fabs(flagInt - flagrInt) > ErrorLevel * (sqrt(flagInt) + sqrt(flagrInt))) {
417 flaghist->SetBinContent(bin + 1, 2);
418 } else if (fabs(flagInt - flagrInt) > WarningLevel * (sqrt(flagInt) + sqrt(flagrInt))) {
419 flaghist->SetBinContent(bin + 1, 1);
420 } else {
421 flaghist->SetBinContent(bin + 1, 0);
422 }
423 iret = 1;
424 } else if (Type == 10) {
425 float flag2 = refhist->Chi2Test(temp.get());
426 flaghist->SetBinContent(bin + 1, 0);
427 if (flag2 > pars[1])
428 flaghist->SetBinContent(bin + 1, 2);
429 if (flag2 > pars[0])
430 flaghist->SetBinContent(bin + 1, 1);
431 iret = 1;
432 } else if (Type == 100) {
433 flaghist->SetBinContent(bin + 1, 0);
434 iret = 1;
435 } else {
436 flaghist->SetBinContent(bin + 1, -3);
437 iret = -1;
438 }
439 strDebugInfo = Form("SetFlag---> %f, type %i\n", flaghist->GetBinContent(bin + 1), Type);
440 B2DEBUG(130, strDebugInfo.Data());
441 return iret;
442}
443
444// int DQMHistAnalysisPXDERModule::SetFlag(int Type, int bin, double* pars, double ratio, std::string name_hist, std::string name_refhist, TH1I* flaghist)
445// {
446//
447// TH1F* histF = new TH1F("histF", "histF", hist->GetNbinsX(), hist->GetXaxis()->GetXmin(), hist->GetXaxis()->GetXmax());
448// TH1F* refhistF = new TH1F("refhistF", "refhistF", refhist->GetNbinsX(), refhist->GetXaxis()->GetXmin(),
449// refhist->GetXaxis()->GetXmax());
450// for (int j = 0; j < hist->GetNbinsX(); j++) {
451// histF->SetBinContent(j + 1, hist->GetBinContent(j + 1));
452// refhistF->SetBinContent(j + 1, refhist->GetBinContent(j + 1));
453// }
454// int ret = SetFlag(Type, bin, pars, ratio, histF, refhistF, flaghist);
455// delete histF;
456// delete refhistF;
457// return ret;
458// }
459
static TH1 * findHistInFile(TFile *file, const std::string &histname)
Find histogram in specific TFile (e.g.
static TH1 * findHist(const std::string &histname, bool onlyIfUpdated=false)
Get histogram from list (no other search).
DQMHistAnalysisModule()
Constructor / Destructor.
int c_nPXDLayers
Number of PXD layers on Belle II.
void terminate(void) override final
Terminator.
std::string m_refFileName
Reference Histogram Root file name.
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.
TFile * m_refFile
The pointer to the reference file.
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.