Belle II Software development
TrackingAbortDQMModule.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 "tracking/modules/trackingDQM/TrackingAbortDQMModule.h"
10
11#include <framework/dataobjects/EventMetaData.h>
12#include <svd/dataobjects/SVDShaperDigit.h>
13#include <svd/dataobjects/SVDCluster.h>
14#include <mdst/dataobjects/EventLevelTrackingInfo.h>
15#include <mdst/dataobjects/TRGSummary.h>
16
17#include <TDirectory.h>
18#include <TLine.h>
19#include <TStyle.h>
20
21#include <algorithm>
22
23
24using namespace Belle2;
25using namespace TrackingUtilities;
26
27//-----------------------------------------------------------------
28// Register the Module
29//-----------------------------------------------------------------
30REG_MODULE(TrackingAbortDQM);
31
32
33//-----------------------------------------------------------------
34// Implementation
35//-----------------------------------------------------------------
36
38{
39 setDescription("DQM Module to monitor Tracking Aborts and detector-related quantities.");
40
41 addParam("histogramDirectoryName", m_histogramDirectoryName, "Name of the directory where histograms will be placed.",
42 std::string("TrackingAbort"));
43
45}
46
47
48TrackingAbortDQMModule::~TrackingAbortDQMModule()
49{
50}
51
52//------------------------------------------------------------------
53// Function to define histograms
54//-----------------------------------------------------------------
55
57{
58
59 // Create a separate histogram directories and cd into it.
60 TDirectory* oldDir = gDirectory;
61 if (m_histogramDirectoryName != "") {
62 oldDir->mkdir(m_histogramDirectoryName.c_str());
63 oldDir->cd(m_histogramDirectoryName.c_str());
64 }
65
66 //histogram index:
67 // 0 if the event is triggered OUTSIDE the active_veto window
68 std::string tag[2] = {"OUT", "IN"};
69 std::string title[2] = {"[Outside Active Veto Window]", "[Inside Active Veto Window]"};
70
71
72 //number of events with and without at least one abort
73 //outside active_veto window:
74 std::string histoName = "EventsWithAborts";
75 std::string histoTitle = "Events With at Least one Abort";
76 m_nEventsWithAbort[0] = new TH1F(TString::Format("%s_%s", histoName.c_str(), tag[0].c_str()),
77 TString::Format("%s %s", histoTitle.c_str(), title[0].c_str()),
78 2, -0.5, 1.5);
79 m_nEventsWithAbort[0]->GetYaxis()->SetTitle("Number of Events");
80 m_nEventsWithAbort[0]->GetXaxis()->SetBinLabel(1, "No Abort");
81 m_nEventsWithAbort[0]->GetXaxis()->SetBinLabel(2, "At Least One Abort");
82 m_nEventsWithAbort[0]->SetMinimum(0.1);
83
84 //inside active_veto window:
85 m_nEventsWithAbort[1] = new TH1F(*m_nEventsWithAbort[0]);
86 m_nEventsWithAbort[1]->SetName(TString::Format("%s_%s", histoName.c_str(), tag[1].c_str()));
87 m_nEventsWithAbort[1]->SetTitle(TString::Format("%s %s", histoTitle.c_str(), title[1].c_str()));
88
89 //abort flag reason
90 //outside active_veto window:
91 histoName = "TrkAbortReason";
92 histoTitle = "Tracking Abort Reason";
93 m_trackingErrorFlagsReasons[0] = new TH1F(TString::Format("%s_%s", histoName.c_str(), tag[0].c_str()),
94 TString::Format("%s %s", histoTitle.c_str(), title[0].c_str()),
95 5, -0.5, 4.5);
96 m_trackingErrorFlagsReasons[0]->GetXaxis()->SetTitle("Type of error occurred");
97 m_trackingErrorFlagsReasons[0]->GetYaxis()->SetTitle("Number of Events");
98 m_trackingErrorFlagsReasons[0]->GetXaxis()->SetBinLabel(1, "Unspecified PR");
99 m_trackingErrorFlagsReasons[0]->GetXaxis()->SetBinLabel(2, "VXDTF2");
100 m_trackingErrorFlagsReasons[0]->GetXaxis()->SetBinLabel(3, "SVDCKF");
101 m_trackingErrorFlagsReasons[0]->GetXaxis()->SetBinLabel(4, "PXDCKF");
102 m_trackingErrorFlagsReasons[0]->GetXaxis()->SetBinLabel(5, "SpacePoint");
103 //inside active_veto window:
105 m_trackingErrorFlagsReasons[1]->SetName(TString::Format("%s_%s", histoName.c_str(), tag[1].c_str()));
106 m_trackingErrorFlagsReasons[1]->SetTitle(TString::Format("%s %s", histoTitle.c_str(), title[1].c_str()));
107
108
109 //SVD L3 occupancy - see SVDDQMDose module for details
110 histoName = "SVDL3UOcc";
111 histoTitle = "SVD L3 u-side ZS5 Occupancy (%)";
112 //outside active_veto window:
113 m_svdL3uZS5Occupancy[0] = new TH1F(TString::Format("%s_%s", histoName.c_str(), tag[0].c_str()),
114 TString::Format("%s %s", histoTitle.c_str(), title[0].c_str()),
115 90, 0, 100.0 / 1536.0 * 90);
116 m_svdL3uZS5Occupancy[0]->GetXaxis()->SetTitle("occupancy [%]");
117 m_svdL3uZS5Occupancy[0]->GetYaxis()->SetTitle("Number of Events");
118 //inside active_veto window:
120 m_svdL3uZS5Occupancy[1]->SetName(TString::Format("%s_%s", histoName.c_str(), tag[1].c_str()));
121 m_svdL3uZS5Occupancy[1]->SetTitle(TString::Format("%s %s", histoTitle.c_str(), title[1].c_str()));
122
123 //SVD L3 occupancy when VXDTF2 Aborts- see SVDDQMDose module for details
124 histoName = "SVDL3UOccVXDTF2aborts";
125 histoTitle = "SVD L3 u-side ZS5 Occupancy (%) when VXDTF2 Aborts";
126 //outside active_veto window:
127 m_svdL3uZS5Occupancy_VXDTF2aborts[0] = new TH1F(TString::Format("%s_%s", histoName.c_str(), tag[0].c_str()),
128 TString::Format("%s %s", histoTitle.c_str(), title[0].c_str()),
129 180, 0, 100.0 / 1536.0 * 180);
130 m_svdL3uZS5Occupancy_VXDTF2aborts[0]->GetXaxis()->SetTitle("occupancy [%]");
131 m_svdL3uZS5Occupancy_VXDTF2aborts[0]->GetYaxis()->SetTitle("Number of Events");
132 //inside active_veto window:
134 m_svdL3uZS5Occupancy_VXDTF2aborts[1]->SetName(TString::Format("%s_%s", histoName.c_str(), tag[1].c_str()));
135 m_svdL3uZS5Occupancy_VXDTF2aborts[1]->SetTitle(TString::Format("%s %s", histoTitle.c_str(), title[1].c_str()));
136
137//SVD L3 occupancy when toSVDCFK Aborts- see SVDDQMDose module for details
138 histoName = "SVDL3UOccToSVDCKFaborts";
139 histoTitle = "SVD L3 u-side ZS5 Occupancy (%) when toSVDCKF Aborts";
140 //outside active_veto window:
141 m_svdL3uZS5Occupancy_toSVDCKFaborts[0] = new TH1F(TString::Format("%s_%s", histoName.c_str(), tag[0].c_str()),
142 TString::Format("%s %s", histoTitle.c_str(), title[0].c_str()),
143 180, 0, 100.0 / 1536.0 * 180);
144 m_svdL3uZS5Occupancy_toSVDCKFaborts[0]->GetXaxis()->SetTitle("occupancy [%]");
145 m_svdL3uZS5Occupancy_toSVDCKFaborts[0]->GetYaxis()->SetTitle("Number of Events");
146 //inside active_veto window:
148 m_svdL3uZS5Occupancy_toSVDCKFaborts[1]->SetName(TString::Format("%s_%s", histoName.c_str(), tag[1].c_str()));
149 m_svdL3uZS5Occupancy_toSVDCKFaborts[1]->SetTitle(TString::Format("%s %s", histoTitle.c_str(), title[1].c_str()));
150
151 //CDC extra hits
152 histoName = "nCDCExtraHits";
153 histoTitle = "Number of CDC Extra Hits";
154 //outside active_veto window:
155 m_nCDCExtraHits[0] = new TH1F(TString::Format("%s_%s", histoName.c_str(), tag[0].c_str()),
156 TString::Format("%s %s", histoTitle.c_str(), title[0].c_str()),
157 200, 0, 5000);
158 m_nCDCExtraHits[0]->GetXaxis()->SetTitle("nCDCExtraHits");
159 m_nCDCExtraHits[0]->GetYaxis()->SetTitle("Number of Events");
160 //inside active_veto window:
161 m_nCDCExtraHits[1] = new TH1F(*m_nCDCExtraHits[0]);
162 m_nCDCExtraHits[1]->SetName(TString::Format("%s_%s", histoName.c_str(), tag[1].c_str()));
163 m_nCDCExtraHits[1]->SetTitle(TString::Format("%s %s", histoTitle.c_str(), title[1].c_str()));
164
165 //SVD L3 v-side cluster time
166 histoName = "svdL3VTime";
167 histoTitle = "Layer3 v-side Cluster Time Distribution";
168 //outside active_veto window:
169 m_svdTime[0] = new TH1F(TString::Format("%s_%s", histoName.c_str(), tag[0].c_str()),
170 TString::Format("%s %s", histoTitle.c_str(), title[0].c_str()),
171 300, -150, 150);
172 m_svdTime[0]->GetXaxis()->SetTitle("cluster time (ns)");
173 m_svdTime[0]->GetYaxis()->SetTitle("Number of Clusters");
174 //inside active_veto window:
175 m_svdTime[1] = new TH1F(*m_svdTime[0]);
176 m_svdTime[1]->SetName(TString::Format("%s_%s", histoName.c_str(), tag[1].c_str()));
177 m_svdTime[1]->SetTitle(TString::Format("%s %s", histoTitle.c_str(), title[1].c_str()));
178
179 //SVD, CDC Averages
180 histoName = "averages";
181 histoTitle = "Averages from SVD and CDC";
182 //outside active_veto window:
183 m_integratedAverages[0] = new TH1D(TString::Format("%s_%s", histoName.c_str(), tag[0].c_str()),
184 TString::Format("%s %s", histoTitle.c_str(), title[0].c_str()),
185 5, 0, 5);
186 m_integratedAverages[0]->GetYaxis()->SetTitle("Number of X [bin-dependent]");
187 m_integratedAverages[0]->GetXaxis()->SetBinLabel(1, "nCDCHitsInner");
188 m_integratedAverages[0]->GetXaxis()->SetBinLabel(2, "nCDCHitsOuter");
189 m_integratedAverages[0]->GetXaxis()->SetBinLabel(3, "nStripsZS5_L3V");
190 m_integratedAverages[0]->GetXaxis()->SetBinLabel(4, "nStripsZS5_L4U");
191 m_integratedAverages[0]->GetXaxis()->SetBinLabel(5, "nStripsZS5_L4V");
192 //inside active_veto window:
194 m_integratedAverages[1]->SetName(TString::Format("%s_%s", histoName.c_str(), tag[1].c_str()));
195 m_integratedAverages[1]->SetTitle(TString::Format("%s %s", histoTitle.c_str(), title[1].c_str()));
196
197 //CDC extra hits per SL
198 histoName = "nCDCExtraHitsSL";
199 histoTitle = "Number of CDC Extra Hits in SL";
200 for (int sl = 0; sl < 9; sl++) {
201 //outside active_veto window:
202 m_nCDCExtraHitsSL[0][sl] = new TH1F(TString::Format("%s%d_%s", histoName.c_str(), sl, tag[0].c_str()),
203 TString::Format("%s%d %s", histoTitle.c_str(), sl, title[0].c_str()),
204 201, -1000 / 200 / 2, 1000 + 1000 / 200 / 2);
205 m_nCDCExtraHitsSL[0][sl]->GetXaxis()->SetTitle("nCDCExtraHits");
206 m_nCDCExtraHitsSL[0][sl]->GetYaxis()->SetTitle("Number of Events");
207 //inside active_veto window:
208 m_nCDCExtraHitsSL[1][sl] = new TH1F(*m_nCDCExtraHitsSL[0][sl]);
209 m_nCDCExtraHitsSL[1][sl]->SetName(TString::Format("%s%d_%s", histoName.c_str(), sl, tag[1].c_str()));
210 m_nCDCExtraHitsSL[1][sl]->SetTitle(TString::Format("%s%d %s", histoTitle.c_str(), sl, title[1].c_str()));
211 }
212
213 //CDC extra hits per SL
214 histoName = "fCDCExtraHitsPostCleanSL";
215 histoTitle = "Fraction of CDC Extra Hits Post Cleaning in SL";
216 for (int sl = 0; sl < 9; sl++) {
217 //outside active_veto window:
218 m_fCDCExtraHitsPostCleanSL[0][sl] = new TH1F(TString::Format("%s%d_%s", histoName.c_str(), sl, tag[0].c_str()),
219 TString::Format("%s%d %s", histoTitle.c_str(), sl, title[0].c_str()),
220 100, 0, 1);
221 m_fCDCExtraHitsPostCleanSL[0][sl]->GetXaxis()->SetTitle("nCDCExtraHitsPostClean/nCDCExtraHits");
222 m_fCDCExtraHitsPostCleanSL[0][sl]->GetYaxis()->SetTitle("Number of Events");
223 //inside active_veto window:
225 m_fCDCExtraHitsPostCleanSL[1][sl]->SetName(TString::Format("%s%d_%s", histoName.c_str(), sl, tag[1].c_str()));
226 m_fCDCExtraHitsPostCleanSL[1][sl]->SetTitle(TString::Format("%s%d %s", histoTitle.c_str(), sl, title[1].c_str()));
227 }
228
229 //CDC signal hits per SL
230 histoName = "nCDCHitsSL";
231 histoTitle = "Average Number of CDC Hits per Track in SL";
232 for (int sl = 0; sl < 9; sl++) {
233 //outside active_veto window:
234 m_nCDCHitsSL[0][sl] = new TH1F(TString::Format("%s%d_%s", histoName.c_str(), sl, tag[0].c_str()),
235 TString::Format("%s%d %s", histoTitle.c_str(), sl, title[0].c_str()),
236 31, -0.5, 30 + 0.5);
237 m_nCDCHitsSL[0][sl]->GetXaxis()->SetTitle("average nCDCHits per track");
238 m_nCDCHitsSL[0][sl]->GetYaxis()->SetTitle("Number of Events");
239 //inside active_veto window:
240 m_nCDCHitsSL[1][sl] = new TH1F(*m_nCDCHitsSL[0][sl]);
241 m_nCDCHitsSL[1][sl]->SetName(TString::Format("%s%d_%s", histoName.c_str(), sl, tag[1].c_str()));
242 m_nCDCHitsSL[1][sl]->SetTitle(TString::Format("%s%d %s", histoTitle.c_str(), sl, title[1].c_str()));
243 }
244
245 //no CDC signal hits in SL
246 histoName = "noCDCHitsInSL";
247 histoTitle = "No Signal CDC Hits in SL";
248 //outside active_veto window:
249 m_noCDCHitsInSL[0] = new TH1F(TString::Format("%s_%s", histoName.c_str(), tag[0].c_str()),
250 TString::Format("%s %s", histoTitle.c_str(), title[0].c_str()),
251 9, -0.5, 8 + 0.5);
252 m_noCDCHitsInSL[0]->GetXaxis()->SetTitle("SuperLayer");
253 m_noCDCHitsInSL[0]->GetYaxis()->SetTitle("Number of Events");
254 //inside active_veto window:
255 m_noCDCHitsInSL[1] = new TH1F(*m_noCDCHitsInSL[0]);
256 m_noCDCHitsInSL[1]->SetName(TString::Format("%s_%s", histoName.c_str(), tag[1].c_str()));
257 m_noCDCHitsInSL[1]->SetTitle(TString::Format("%s %s", histoTitle.c_str(), title[1].c_str()));
258
259 oldDir->cd();
260
261}
262
264{
265 m_eventLevelTrackingInfo.isOptional();
266 m_eventMetaData.isOptional();
267 m_trgSummary.isOptional();
268 m_strips.isOptional();
269
270 // Register histograms (calls back defineHisto)
271 REG_HISTOGRAM
272}
273
274
276{
277
278 if (m_trackingErrorFlagsReasons[0] != nullptr) m_trackingErrorFlagsReasons[0]->Reset();
279 if (m_trackingErrorFlagsReasons[1] != nullptr) m_trackingErrorFlagsReasons[1]->Reset();
280 if (m_nEventsWithAbort[0] != nullptr) m_nEventsWithAbort[0]->Reset();
281 if (m_nEventsWithAbort[1] != nullptr) m_nEventsWithAbort[1]->Reset();
282 if (m_svdL3uZS5Occupancy[0] != nullptr) m_svdL3uZS5Occupancy[0]->Reset();
283 if (m_svdL3uZS5Occupancy[1] != nullptr) m_svdL3uZS5Occupancy[1]->Reset();
288 if (m_nCDCExtraHits[0] != nullptr) m_nCDCExtraHits[0]->Reset();
289 if (m_nCDCExtraHits[1] != nullptr) m_nCDCExtraHits[1]->Reset();
290 if (m_svdTime[0] != nullptr) m_svdTime[0]->Reset();
291 if (m_svdTime[1] != nullptr) m_svdTime[1]->Reset();
292 if (m_integratedAverages[0] != nullptr) m_integratedAverages[0]->Reset();
293 if (m_integratedAverages[1] != nullptr) m_integratedAverages[1]->Reset();
294 for (int sl = 0; sl < 9; sl++) {
295 if (m_nCDCExtraHitsSL[0][sl] != nullptr) m_nCDCExtraHitsSL[0][sl]->Reset();
296 if (m_nCDCExtraHitsSL[1][sl] != nullptr) m_nCDCExtraHitsSL[1][sl]->Reset();
297 if (m_fCDCExtraHitsPostCleanSL[0][sl] != nullptr) m_fCDCExtraHitsPostCleanSL[0][sl]->Reset();
298 if (m_fCDCExtraHitsPostCleanSL[1][sl] != nullptr) m_fCDCExtraHitsPostCleanSL[1][sl]->Reset();
299 if (m_nCDCHitsSL[0][sl] != nullptr) m_nCDCHitsSL[0][sl]->Reset();
300 if (m_nCDCHitsSL[1][sl] != nullptr) m_nCDCHitsSL[1][sl]->Reset();
301 }
302 if (m_noCDCHitsInSL[0] != nullptr) m_noCDCHitsInSL[0]->Reset();
303 if (m_noCDCHitsInSL[1] != nullptr) m_noCDCHitsInSL[1]->Reset();
304
305}
306
308{
309
310 //skip events in which we do not have EventMetaData or TRGSummary
311 if (!m_eventMetaData.isValid()) return;
312 if (!m_trgSummary.isValid()) return;
313
314 //skip the empty events
316 return;
317
319 return;
320
322 return;
323
325 return;
326
327 //find out if we are in the passive veto (i=0) or in the active veto window (i=1)
328 int index = 0; //events accepted in the passive veto window but not in the active
329 try {
330 if (m_trgSummary->testInput("passive_veto") == 1 && m_trgSummary->testInput("cdcecl_veto") == 0) index = 1;
331 } catch (const std::exception&) {
332 }
333
334 //fill the tracking abort reason histogram & nEvents with Abort
335 if (m_eventLevelTrackingInfo.isValid()) {
336 if (m_eventLevelTrackingInfo->hasAnErrorFlag()) {
337
338 m_nEventsWithAbort[index]->Fill(1);
339
340 if (m_eventLevelTrackingInfo->hasUnspecifiedTrackFindingFailure())
341 m_trackingErrorFlagsReasons[index]->Fill(0);
342 if (m_eventLevelTrackingInfo->hasVXDTF2AbortionFlag())
343 m_trackingErrorFlagsReasons[index]->Fill(1);
344 if (m_eventLevelTrackingInfo->hasSVDCKFAbortionFlag())
345 m_trackingErrorFlagsReasons[index]->Fill(2);
346 if (m_eventLevelTrackingInfo->hasPXDCKFAbortionFlag())
347 m_trackingErrorFlagsReasons[index]->Fill(3);
348 if (m_eventLevelTrackingInfo->hasSVDSpacePointCreatorAbortionFlag())
349 m_trackingErrorFlagsReasons[index]->Fill(4);
350 } else { //EventLevelTrackingInfo valid but no error
351 m_nEventsWithAbort[index]->Fill(0);
352 }
353 } else //EventLevelTrackingInfo not valid
354 m_nEventsWithAbort[index]->Fill(0);
355
356 //compute the number of ZS5 strips of L3 and L4, both sides
357 float nStripsL3UZS5 = 0;
358 float nStripsL3VZS5 = 0;
359 float nStripsL4UZS5 = 0;
360 float nStripsL4VZS5 = 0;
361 for (const SVDShaperDigit& hit : m_strips) {
362 const VxdID& sensorID = hit.getSensorID();
363 if (sensorID.getLayerNumber() > 4) continue;
364 const float noise = m_NoiseCal.getNoise(sensorID, hit.isUStrip(), hit.getCellID());
365 const float cutMinSignal = std::round(5 * noise);
366
367 if (hit.passesZS(1, cutMinSignal)) {
368 if (sensorID.getLayerNumber() == 3) {
369 if (hit.isUStrip()) nStripsL3UZS5++;
370 else nStripsL3VZS5++;
371 } else if (hit.isUStrip()) nStripsL4UZS5++;
372 else nStripsL4VZS5++;
373 }
374 }
375
376 //fill the SVD L3 v-side cluster time
377 for (const SVDCluster& hit : m_clusters) {
378 const VxdID& sensorID = hit.getSensorID();
379 if (sensorID.getLayerNumber() != 3) continue;
380 if (hit.isUCluster()) continue;
381
382 m_svdTime[index]->Fill(hit.getClsTime());
383 }
384
385 // fill the svd L3 v ZS5 occupancy, add the overflow in the last bin to make them visible in the plot
386 double tmp_L3uZS5occupancy = (double)nStripsL3UZS5 / m_nStripsL3U * 100;
387 double L3uZS5occupancy = std::min(tmp_L3uZS5occupancy, (double)100.0 / 1536.0 * 90);
388 m_svdL3uZS5Occupancy[index]->Fill(L3uZS5occupancy);
389 double L3uZS5occupancy_abort = std::min(tmp_L3uZS5occupancy, (double)100.0 / 1536.0 * 180);
390 if (m_eventLevelTrackingInfo->hasVXDTF2AbortionFlag())
391 m_svdL3uZS5Occupancy_VXDTF2aborts[index]->Fill(L3uZS5occupancy_abort);
392 if (m_eventLevelTrackingInfo->hasSVDCKFAbortionFlag())
393 m_svdL3uZS5Occupancy_toSVDCKFaborts[index]->Fill(L3uZS5occupancy_abort);
394
395 //fill the nCDCExtraHits, add the overflow in the last bin to make them visible in the plot
396 if (m_eventLevelTrackingInfo.isValid())
397 m_nCDCExtraHits[index]->Fill(std::min((int)m_eventLevelTrackingInfo->getNCDCHitsNotAssigned(), (int)4999));
398
399 //compute number of CDC hits in the inner and outer layers
400 //and the number of signal-per-track and extra hits per SL
401 int nTracks = m_tracks.getEntries();
402
403 int nCDCHitsInner = 0;
404 int nCDCHitsOuter = 0;
405 int nTotalCDCHits[9] = {0};
406 int nTakenCDCHits[9] = {0};
407 int nBgCDCHits[9] = {0};
408
409 const std::vector<CDCWireHit>& wireHitVector = *m_wireHitVector;
410 int wireHitAmount = wireHitVector.size();
411 for (int hitID = 0; hitID < wireHitAmount; ++hitID) {
412 const auto& wireHit = wireHitVector[hitID];
413 int sl = wireHit.getISuperLayer();
414 if (sl == 0) nCDCHitsInner++;
415 else nCDCHitsOuter++;
416
417 nTotalCDCHits[sl] += 1;
418 if (wireHit->hasTakenFlag()) nTakenCDCHits[sl] += 1;
419 if (wireHit->hasBackgroundFlag()) nBgCDCHits[sl] += 1;
420 }
421
422 for (int sl = 0; sl < 9; sl++) {
423
424 float nSignalCDCHits = nTakenCDCHits[sl] - nBgCDCHits[sl];
425 int nCDCExtraHits = nTotalCDCHits[sl] - nSignalCDCHits;
426 int nCDCExtraHitsPostClean = nCDCExtraHits - nBgCDCHits[sl];
427 if (nTracks > 0) nSignalCDCHits = nSignalCDCHits / nTracks;
428
429 if (nSignalCDCHits == 0) m_noCDCHitsInSL[index]->Fill(sl);
430 else {
431 if (m_nCDCExtraHitsSL[index][sl] != nullptr) m_nCDCExtraHitsSL[index][sl]->Fill(std::min(nCDCExtraHits, (int)999));
432 if (m_fCDCExtraHitsPostCleanSL[index][sl] != nullptr) m_fCDCExtraHitsPostCleanSL[index][sl]->Fill((
433 float)nCDCExtraHitsPostClean / nCDCExtraHits);
434 if (m_nCDCHitsSL[index][sl] != nullptr) m_nCDCHitsSL[index][sl]->Fill(std::min(nSignalCDCHits, (float)30.5));
435 }
436 }
437
438 // fill the integrated averages TH1F
439 // bin 1: nCDCHits Inner layers
440 updateBinContent(index, 1, nCDCHitsInner);
441 // bin 2: nCDCHits Outer layers
442 updateBinContent(index, 2, nCDCHitsOuter);
443 // bin 3: nStrips L3 V-side
444 updateBinContent(index, 3, nStripsL3VZS5);
445 // bin 4: nStrips L4 U-side
446 updateBinContent(index, 4, nStripsL4UZS5);
447 // bin 5: nStrips L4 V-side
448 updateBinContent(index, 5, nStripsL4VZS5);
449
450
451}
452
453void TrackingAbortDQMModule::updateBinContent(int index, int bin, float valueToBeAdded)
454{
455 float oldValue = m_integratedAverages[index]->GetBinContent(bin);
456 m_integratedAverages[index]->SetBinContent(bin, oldValue + valueToBeAdded);
457}
@ c_B2LinkPacketCRCError
Belle2link CRC error is detected in the event.
@ c_HLTCrash
The HLT reconstruction crashed in this event or the event before.
@ c_B2LinkEventCRCError
HSLB_COPPER CRC error is detected in the event.
@ c_HLTPrefilterDiscard
The HLTPrefilter tagged the event as noisy due to injection background or high CDC-SVD occupancy.
HistoModule()
Constructor.
Definition HistoModule.h:32
void setDescription(const std::string &description)
Sets the description of the module.
Definition Module.cc:214
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
Definition Module.cc:208
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Definition Module.h:80
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
Definition SVDCluster.h:29
The SVD ShaperDigit class.
void initialize() override final
Module function initialize.
TH1F * m_svdTime[2]
L3 V-side time for all clusters.
TH1F * m_svdL3uZS5Occupancy_toSVDCKFaborts[2]
distribution of the SVD L3 V ZS5 occupancy when toSVDCKF aborts
TH1F * m_nCDCHitsSL[2][9]
distribution of the number of signal CDC hits divided by SL
TH1F * m_svdL3uZS5Occupancy_VXDTF2aborts[2]
distribution of the SVD L3 V ZS5 occupancy when VXDTF2 aborts
StoreObjPtr< EventLevelTrackingInfo > m_eventLevelTrackingInfo
tracking abort info
TH1D * m_integratedAverages[2]
integrated averages of additional SVD, CDC variables
SVDNoiseCalibrations m_NoiseCal
SVDNoise calibration db object.
TH1F * m_trackingErrorFlagsReasons[2]
stores the reason of the abort
void defineHisto() override final
Defines Histograms.
StoreObjPtr< TRGSummary > m_trgSummary
trg summary
TH1F * m_svdL3uZS5Occupancy[2]
distribution of the SVD L3 V ZS5 occupancy
TH1F * m_noCDCHitsInSL[2]
number of tracks without CDC hits in each SL
StoreArray< SVDCluster > m_clusters
SVD clusters.
TH1F * m_nEventsWithAbort[2]
0: no abort; 1: at least one abort
TH1F * m_nCDCExtraHits[2]
distribution of the number of extra CDC hits
static constexpr int m_nStripsL3U
number of U-side L3 strips
StoreObjPtr< EventMetaData > m_eventMetaData
event meta data
TH1F * m_nCDCExtraHitsSL[2][9]
distribution of the number of extra CDC hits divided by SL
void event() override final
Module function event.
StoreArray< SVDShaperDigit > m_strips
SVD strips.
void updateBinContent(int index, int bin, float valueToBeAdded)
function to update the bin content
std::string m_histogramDirectoryName
Name of the histogram directory in ROOT file.
StoreArray< Track > m_tracks
tracks
void beginRun() override final
Module function beginRun.
TrackingUtilities::StoreWrappedObjPtr< std::vector< Belle2::TrackingUtilities::CDCWireHit > > m_wireHitVector
CDC wire hits.
TH1F * m_fCDCExtraHitsPostCleanSL[2][9]
distribution of the fraction of extra CDC hits post cleaning divided by SL
Class to uniquely identify a any structure of the PXD and SVD.
Definition VxdID.h:32
baseType getLayerNumber() const
Get the layer id.
Definition VxdID.h:95
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
Abstract base class for different kinds of events.