Belle II Software development
DQMHistAnalysisHLTMonObj.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// Own header.
10#include <dqm/analysis/modules/DQMHistAnalysisHLTMonObj.h>
11
12// Basf2 headers.
13#include <hlt/utilities/Units.h>
14
15// Roofit headers
16#include <RooAddPdf.h>
17#include <RooArgList.h>
18#include <RooArgSet.h>
19#include <RooChebychev.h>
20#include <RooDataHist.h>
21#include <RooFit.h>
22#include <RooFitResult.h>
23#include <RooGaussian.h>
24#include <RooMsgService.h>
25#include <RooRealVar.h>
26#include <RooPlot.h>
27
28// C++ headers
29#include <regex>
30
31using namespace std;
32using namespace Belle2;
33
34//-----------------------------------------------------------------
35// Register module
36//-----------------------------------------------------------------
37
38REG_MODULE(DQMHistAnalysisHLTMonObj);
39
42{
43 setDescription("Produces MonitoringObject for the HLT from the available DQM histograms");
45}
46
48{
49 // make monitoring object related to this module
50 // if monitoring object already exists this will return pointer to it
52
53 // make canvases to be added to MonitoringObject
54 m_c_filter = new TCanvas("Filter", "filter", 750, 400);
55 m_c_skim = new TCanvas("Skim", "skim", 400, 400);
56 m_c_hardware = new TCanvas("Hardware", "hardware", 1000, 1000);
57 m_c_l1 = new TCanvas("L1", "l1", 750, 400);
58 m_c_ana_eff_shifter = new TCanvas("ana_eff_shifter", "ana_eff_shifter", 1000, 1000);
59 m_c_nks = new TCanvas("Ks", "Ks_histograms", 1000, 1000);
60
61 // add canvases to MonitoringObject
62 m_monObj->addCanvas(m_c_filter);
63 m_monObj->addCanvas(m_c_skim);
64 m_monObj->addCanvas(m_c_hardware);
65 m_monObj->addCanvas(m_c_l1);
66 m_monObj->addCanvas(m_c_ana_eff_shifter);
67 m_monObj->addCanvas(m_c_nks);
68
69
70 //--- HLTPrefilter monitoring ---//
71 //--- Fit variables ---//
72 m_KsInvMass = new RooRealVar("m_KsInvMass", "M", 0.45, 0.55);
73
74 //--- Signal double gaussian ---//
75 m_mean1 = new RooRealVar("#mu_{1}", "MEAN of 1st gaussian", 0.498, 0.49, 0.51);
76 m_sigma1 = new RooRealVar("#sigma_{1}", "Sigma of 1st gaussian", 0.002, 0.0001, 0.05);
77 m_gauss1 = new RooGaussian("gauss1", "1st gaussian PDF", *m_KsInvMass, *m_mean1, *m_sigma1);
78
79 m_sigma2 = new RooRealVar("#sigma_{2}", "Sigma of 1st gaussian", 0.02, 0.0001, 0.05);
80 m_gauss2 = new RooGaussian("gauss2", "2nd gaussian PDF", *m_KsInvMass, *m_mean1, *m_sigma2);
81
82 m_frac = new RooRealVar("frac", "fraction", 0.6, 0.4, 0.8);
83 m_double_gauss = new RooAddPdf("double_gauss", "add two gaussian", RooArgList(*m_gauss1, *m_gauss2), RooArgSet(*m_frac));
84
85 //--- Chebychev background first order ---//
86 m_slope = new RooRealVar("s", "Slope of Polynomial", 0.5, -2.0, 2.0);
87 m_chebpol = new RooChebychev("chebpol", "Chebshev Polynomial ", *m_KsInvMass, RooArgList(*m_slope));
88
89 //--- Signal and Background yields ---//
90 m_sig = new RooRealVar("N_{sig}", "SIGNAL EVENTS", 1000, 10, 5000000);
91 m_bkg = new RooRealVar("N_{bkg}", "BACKGROUND EVENTS", 2000, 100, 20000000);
92
93 //--- Total fit pdf ---//
94 m_KsPdf = new RooAddPdf("m_KsPdf", "Two Gaussian + Pol1 background", RooArgList(*m_double_gauss, *m_chebpol), RooArgList(*m_sig,
95 *m_bkg));
96
97}
98
99
101{
102
103 // get existing histograms produced by DQM modules
104 TH1* h_hlt = findHist("softwaretrigger/total_result");
105 TH1* h_skim = findHist("softwaretrigger/skim");
106 TH1* h_budget = findHist("timing_statistics/fullTimeHistogram");
107 TH1* h_processing = findHist("timing_statistics/processingTimeHistogram");
108 TH1* h_proc_passive = findHist("timing_statistics/processingTimePassiveVeto");
109 TH1* h_proc_active = findHist("timing_statistics/processingTimeNotPassiveVeto");
110 TH1* h_proc_prefilter_time = findHist("timing_statistics/processingTimeNotPassiveVetoTimingCut");
111 TH1* h_proc_prefilter_cdcecl = findHist("timing_statistics/processingTimeNotPassiveVetoCDCECLCut");
112 TH1* h_meantime = findHist("timing_statistics/meanTimeHistogram");
113 TH1* h_budg_unit = findHist("timing_statistics/fullTimeMeanPerUnitHistogram");
114 TH1* h_proc_unit = findHist("timing_statistics/processingTimeMeanPerUnitHistogram");
115 TH1* h_procs = findHist("timing_statistics/processesPerUnitHistogram");
116 TH1* h_l1 = findHist("softwaretrigger_before_filter/hlt_unit_number");
117 TH1* h_err_flag = findHist("softwaretrigger_before_filter/error_flag");
118 TH1* h_hlt_triggers = findHist("softwaretrigger/filter");
119 TH1* h_l1_triggers = findHist("TRGGDL/hGDL_psn_all");
120 TH1* h_l1_triggers_filt = findHist("softwaretrigger/l1_total_result");
121 TH1* h_l1_cat_w_overlap = findHist("TRGGDL/hGDL_psn_raw_rate_all");
122 TH1* h_l1_cat_wo_overlap = findHist("TRGGDL/hGDL_psn_effect_to_l1_all");
123 TH1* h_full_mem = findHist("timing_statistics/fullMemoryHistogram");
124 TCanvas* c_GDL_ana_eff_shifter = findCanvas("TRGGDL/hGDL_ana_eff_shifter");
125 TH1* h_GDL_ana_eff_shifter = nullptr;
126
127 if (c_GDL_ana_eff_shifter) {
128 c_GDL_ana_eff_shifter->cd();
129 h_GDL_ana_eff_shifter = dynamic_cast<TH1*>(gPad->GetPrimitive("hGDL_ana_eff_shifter"));
130 }
131
132 // set the content of filter canvas
133 m_c_filter->Clear(); // clear existing content
134 m_c_filter->Divide(2, 2);
135 m_c_filter->cd(1);
136 if (h_hlt) h_hlt->Draw();
137 m_c_filter->cd(2);
138 if (h_hlt_triggers) h_hlt_triggers->Draw();
139 m_c_filter->cd(3);
140 if (h_err_flag) h_err_flag->Draw();
141
142 // set the content of skim canvas
143 m_c_skim->Clear(); // clear existing content
144 m_c_skim->cd();
145 if (h_skim) h_skim->Draw();
146
147 // set the content of hardware canvas
148 m_c_hardware->Clear(); // clear existing content
149 m_c_hardware->Divide(3, 3);
150 m_c_hardware->cd(1);
151 if (h_l1) h_l1->Draw();
152 m_c_hardware->cd(2);
153 if (h_budget) h_budget->Draw();
154 m_c_hardware->cd(3);
155 if (h_processing) h_processing->Draw();
156 m_c_hardware->cd(4);
157 if (h_budg_unit) h_budg_unit->Draw();
158 m_c_hardware->cd(5);
159 if (h_proc_unit) h_proc_unit->Draw();
160 m_c_hardware->cd(6);
161 if (h_meantime) h_meantime->Draw();
162 m_c_hardware->cd(7);
163 if (h_procs) h_procs->Draw();
164 m_c_hardware->cd(8);
165 if (h_full_mem) h_full_mem->Draw();
166
167 // set the content of L1 canvas
168 m_c_l1->Clear(); // clear existing content
169 m_c_l1->Divide(2, 2);
170 m_c_l1->cd(1);
171 if (h_l1_triggers) h_l1_triggers->Draw();
172 m_c_l1->cd(2);
173 if (h_l1_triggers_filt) h_l1_triggers_filt->Draw();
174 m_c_l1->cd(3);
175 if (h_l1_cat_w_overlap) h_l1_cat_w_overlap->Draw();
176 m_c_l1->cd(4);
177 if (h_l1_cat_wo_overlap) h_l1_cat_wo_overlap->Draw();
178
179// set the content of ana_eff_shifter canvas
180 m_c_ana_eff_shifter->Clear();
182 if (h_GDL_ana_eff_shifter) h_GDL_ana_eff_shifter->Draw();
183
184 double n_hlt = 0.;
185 if (h_hlt) n_hlt = (double)h_hlt->GetBinContent((h_hlt->GetXaxis())->FindFixBin("total_result"));
186 m_monObj->setVariable("n_hlt", n_hlt);
187
188 double n_l1 = 0.;
189 if (h_l1) {
190 n_l1 = h_l1->GetEntries();
191 m_monObj->setVariable("n_l1", n_l1);
192 for (int i = 2; i <= h_l1->GetXaxis()->GetNbins(); i++) {
193 std::string label = "n_l1_HLT" + std::to_string(i - 1);
194 m_monObj->setVariable(label, h_l1->GetBinContent(i));
195 }
196 }
197
198 if (h_procs) {
199 m_monObj->setVariable("n_procs", h_procs->GetEntries());
200 for (int i = 2; i <= h_procs->GetXaxis()->GetNbins(); i++) {
201 std::string label = "n_procs_HLT" + std::to_string(i - 1);
202 m_monObj->setVariable(label, h_procs->GetBinContent(i));
203 }
204 }
205
206 if (h_skim) {
207 // loop bins, add variable to monObj named as "effCS_" + bin label w/o "accept"
208 for (int ibin = 1; ibin < h_skim->GetXaxis()->GetNbins() + 1; ibin++) {
209 double nentr = (double)h_skim->GetBinContent(ibin);
210 std::string bin_name(h_skim->GetXaxis()->GetBinLabel(ibin));
211 m_monObj->setVariable(bin_name.replace(0, 6, "effCS"), nentr);
212 }
213 }
214
215 if (h_l1_triggers) {
216 // loop bins, add variable to monObj named as "effCS_l1_" + bin label
217 for (int ibin = 1; ibin < h_l1_triggers->GetXaxis()->GetNbins() + 1; ibin++) {
218 double nentr = (double)h_l1_triggers->GetBinContent(ibin);
219 std::string bin_name(h_l1_triggers->GetXaxis()->GetBinLabel(ibin));
220 if (bin_name == "") continue;
221 m_monObj->setVariable(bin_name.insert(0, "effCS_l1_"), nentr);
222 }
223 }
224
225 if (h_l1_triggers_filt) {
226 // loop bins, add variable to monObj named as "effCS_l1_fON_" + bin label
227 for (int ibin = 1; ibin < h_l1_triggers_filt->GetXaxis()->GetNbins() + 1; ibin++) {
228 double nentr = (double)h_l1_triggers_filt->GetBinContent(ibin);
229 std::string bin_name(h_l1_triggers_filt->GetXaxis()->GetBinLabel(ibin));
230 if (bin_name == "") continue;
231 m_monObj->setVariable(bin_name.insert(0, "effCS_l1_fON_"), nentr);
232 }
233 }
234
235 if (h_hlt_triggers) {
236 // loop bins, add variable to monObj named as "effCS_hlt_" + bin label
237 for (int ibin = 1; ibin < h_hlt_triggers->GetXaxis()->GetNbins() + 1; ibin++) {
238 double nentr = (double)h_hlt_triggers->GetBinContent(ibin);
239 std::string bin_name(h_hlt_triggers->GetXaxis()->GetBinLabel(ibin));
240 bin_name = std::regex_replace(bin_name, std::regex("=="), "_eq_");
241 bin_name = std::regex_replace(bin_name, std::regex("\\."), "_");
242 m_monObj->setVariable(bin_name.insert(0, "effCS_hlt_"), nentr);
243 }
244 }
245
246 if (h_meantime) {
247 // loop bins, add variable to monObj named as "secTime_" + bin label
248 for (int ibin = 1; ibin < h_meantime->GetXaxis()->GetNbins() + 1; ibin++) {
249 double nentr = (double)h_meantime->GetBinContent(ibin);
250 std::string bin_name(h_meantime->GetXaxis()->GetBinLabel(ibin));
251 m_monObj->setVariable(bin_name.insert(0, "secTime_"), nentr);
252 }
253 }
254
255 if (h_err_flag) {
256 // loop bins, add variable to monObj named as "errFlag_" + bin label
257 for (int ibin = 1; ibin < h_err_flag->GetXaxis()->GetNbins() + 1; ibin++) {
258 double nentr = (double)h_err_flag->GetBinContent(ibin);
259 std::string bin_name(h_err_flag->GetXaxis()->GetBinLabel(ibin));
260 m_monObj->setVariable(bin_name.insert(0, "errFlag_"), nentr);
261 }
262 }
263
264 if (h_l1_cat_w_overlap) {
265 // loop bins, add variable to monObj named as "l1_Ov_" + bin label
266 for (int ibin = 1; ibin < h_l1_cat_w_overlap->GetXaxis()->GetNbins() + 1; ibin++) {
267 double nentr = (double)h_l1_cat_w_overlap->GetBinContent(ibin);
268 std::string bin_name(h_l1_cat_w_overlap->GetXaxis()->GetBinLabel(ibin));
269 m_monObj->setVariable(bin_name.insert(0, "l1_Ov_"), nentr);
270 }
271 }
272
273 if (h_l1_cat_wo_overlap) {
274 // loop bins, add variable to monObj named as "l1_noOv_" + bin label
275 for (int ibin = 1; ibin < h_l1_cat_wo_overlap->GetXaxis()->GetNbins() + 1; ibin++) {
276 double nentr = (double)h_l1_cat_wo_overlap->GetBinContent(ibin);
277 std::string bin_name(h_l1_cat_wo_overlap->GetXaxis()->GetBinLabel(ibin));
278 m_monObj->setVariable(bin_name.insert(0, "l1_noOv_"), nentr);
279 }
280 }
281
282 if (h_GDL_ana_eff_shifter) {
283 // loop bins, add variable to monObj named as "GDLanaEffShifter_" + bin label
284 for (int ibin = 1; ibin < h_GDL_ana_eff_shifter->GetXaxis()->GetNbins() + 1; ibin++) {
285 double nentr = (double)h_GDL_ana_eff_shifter->GetBinContent(ibin);
286 std::string bin_name(h_GDL_ana_eff_shifter->GetXaxis()->GetBinLabel(ibin));
287 m_monObj->setVariable(bin_name.insert(0, "GDLanaEffShifter_"), nentr);
288 }
289 }
290
291 double bgt = 0.;
292 if (h_budget) bgt = h_budget->GetMean();
293 m_monObj->setVariable("budget_time", bgt);
294
295 m_monObj->setVariable("n_l1_x_budget_time", n_l1 * bgt);
296
297 double procTime = 0.;
298 if (h_processing) procTime = h_processing->GetMean();
299 m_monObj->setVariable("processing_time", procTime);
300
301 double procTimePassive = 0.;
302 if (h_proc_passive) procTimePassive = h_proc_passive->GetMean();
303 m_monObj->setVariable("processing_time_passive", procTimePassive);
304
305 double procTimeActive = 0.;
306 if (h_proc_active) procTimeActive = h_proc_active->GetMean();
307 m_monObj->setVariable("processing_time_active", procTimeActive);
308
309 double procTimePrefilterTiming = 0.;
310 if (h_proc_prefilter_time) procTimePrefilterTiming = h_proc_prefilter_time->GetMean();
311 m_monObj->setVariable("processing_time_prefilter_time", procTimePrefilterTiming);
312
313 double procTimePrefilterCDCECL = 0.;
314 if (h_proc_prefilter_cdcecl) procTimePrefilterCDCECL = h_proc_prefilter_cdcecl->GetMean();
315 m_monObj->setVariable("processing_time_prefilter_CDCECL", procTimePrefilterCDCECL);
316
317 double nEventsPassive = 0.;
318 if (h_proc_passive) nEventsPassive = h_proc_passive->GetEntries();
319 m_monObj->setVariable("N_events_passive", nEventsPassive);
320
321 double nEventsActive = 0.;
322 if (h_proc_active) nEventsActive = h_proc_active->GetEntries();
323 m_monObj->setVariable("N_events_active", nEventsActive);
324
325 double nEventsPrefilterTiming = 0.;
326 if (h_proc_prefilter_time) nEventsPrefilterTiming = h_proc_prefilter_time->GetEntries();
327 m_monObj->setVariable("N_events_prefilter_time", nEventsPrefilterTiming);
328
329 double nEventsPrefilterCDCECL = 0.;
330 if (h_proc_prefilter_cdcecl) nEventsPrefilterCDCECL = h_proc_prefilter_cdcecl->GetEntries();
331 m_monObj->setVariable("N_events_prefilter_CDCECL", nEventsPrefilterCDCECL);
332
333
334 double fullMemory = 0.;
335 if (h_full_mem) fullMemory = h_full_mem->GetBinLowEdge(h_full_mem->FindLastBinAbove(0) + 1);
336 m_monObj->setVariable("full_memory", fullMemory);
337
338 TH1* h_budgetUnit = nullptr;
339 TH1* h_memoryUnit = nullptr;
340
341 for (unsigned int index = 1; index <= HLTUnits::max_hlt_units; index++) {
342 // add budget time per unit
343 h_budgetUnit = findHist(("timing_statistics/fullTimePerUnitHistogram_HLT" + std::to_string(index)).c_str());
344 double bgunit = 0.;
345 if (h_budgetUnit) bgunit = h_budgetUnit->GetMean();
346 m_monObj->setVariable(("budget_time_HLT" + std::to_string(index)).c_str(), bgunit);
347 // add processing time per unit
348 h_budgetUnit = findHist(("timing_statistics/processingTimePerUnitHistogram_HLT" + std::to_string(index)).c_str());
349 if (h_budgetUnit) bgunit = h_budgetUnit->GetMean();
350 else bgunit = 0.;
351 m_monObj->setVariable(("processing_time_HLT" + std::to_string(index)).c_str(), bgunit);
352 // add memory per unit
353 h_memoryUnit = findHist(("timing_statistics/fullMemoryPerUnitHistogram_HLT" + std::to_string(index)).c_str());
354 double memunit = 0.;
355 if (h_memoryUnit && bgunit > 0) memunit = h_memoryUnit->GetBinLowEdge(h_memoryUnit->FindLastBinAbove(0.) + 1);
356 m_monObj->setVariable(("memory_HLT" + std::to_string(index)).c_str(), memunit);
357 }
358
359 //--- HLTprefilter monitoring ---//
360
361 // Silence uneccesary warnings //
362 RooMsgService::instance().setSilentMode(true);
363 RooMsgService::instance().setGlobalKillBelow(RooFit::WARNING);
364
365 double nKs_all = 0;
366 double nKs_uncertainty_all = 0;
367 double nKs_active = 0;
368 double nKs_activeNotTime = 0;
369 double nKs_activeNotCDCECL = 0;
370
371 auto m_hKshortAllH = findHist("PhysicsObjects/hist_nKshortAllH");
372 auto m_hKshortActiveH = findHist("PhysicsObjects/hist_nKshortActiveH");
373 auto m_hKshortActiveNotTimeH = findHist("PhysicsObjects/hist_nKshortActiveNotTimeH");
374 auto m_hKshortActiveNotCDCECLH = findHist("PhysicsObjects/hist_nKshortActiveNotCDCECLH");
375
376 // Create RooPlot objects
377 // All Ks candidates
378 RooPlot* m_KshortAll_frame =
379 m_KsInvMass->frame(RooFit::Title("All events"));
380 m_KshortAll_frame->GetXaxis()->SetTitle("M_{#pi^{+}#pi^{-}} [GeV/c^{2}]");
381 m_KshortAll_frame->GetYaxis()->SetTitle("Candidates / (2 MeV/c^{2})");
382 // Ks from Active veto
383 RooPlot* m_KshortActive_frame =
384 m_KsInvMass->frame(RooFit::Title("Active veto"));
385 m_KshortActive_frame->GetXaxis()->SetTitle("M_{#pi^{+}#pi^{-}} [GeV/c^{2}]");
386 m_KshortActive_frame->GetYaxis()->SetTitle("Candidates / (2 MeV/c^{2})");
387 // Ks from Active veto after Prefilter (timing cut)
388 RooPlot* m_KshortActiveNotTime_frame =
389 m_KsInvMass->frame(RooFit::Title("Active veto (Prefilter Time)"));
390 m_KshortActiveNotTime_frame->GetXaxis()->SetTitle("M_{#pi^{+}#pi^{-}} [GeV/c^{2}]");
391 m_KshortActiveNotTime_frame->GetYaxis()->SetTitle("Candidates / (2 MeV/c^{2})");
392 // Ks from Active veto after Prefilter (CDC-ECL cut)
393 RooPlot* m_KshortActiveNotCDCECL_frame =
394 m_KsInvMass->frame(RooFit::Title("Active veto (Prefilter CDC+ECL)"));
395 m_KshortActiveNotCDCECL_frame->GetXaxis()->SetTitle("M_{#pi^{+}#pi^{-}} [GeV/c^{2}]");
396 m_KshortActiveNotCDCECL_frame->GetYaxis()->SetTitle("Candidates / (2 MeV/c^{2})");
397
398 if (m_hKshortAllH) {
399 RooDataHist* KsHist_all = new RooDataHist("KsHist_all", "Histogram data", RooArgList(*m_KsInvMass), m_hKshortAllH);
400 m_KsPdf->fitTo(*KsHist_all, RooFit::Minos(true));
401 nKs_all = m_sig->getValV();
402 nKs_uncertainty_all = m_sig->getError();
403 KsHist_all->plotOn(m_KshortAll_frame) ;
404 m_KsPdf->plotOn(m_KshortAll_frame);
405 m_KsPdf->paramOn(m_KshortAll_frame, RooFit::Layout(0.6, 0.9, 0.9));
406 delete KsHist_all;
407 }
408 m_monObj->setVariable("nKs_all_hlt", nKs_all);
409 m_monObj->setVariable("nKs_uncertainty_all_hlt", nKs_uncertainty_all);
410
411 if (m_hKshortActiveH) {
412 RooDataHist* KsHist_active = new RooDataHist("KsHist_active", "Histogram data", RooArgList(*m_KsInvMass), m_hKshortActiveH);
413 m_KsPdf->fitTo(*KsHist_active, RooFit::Minos(true));
414 nKs_active = m_sig->getValV();
415 KsHist_active->plotOn(m_KshortActive_frame) ;
416 m_KsPdf->plotOn(m_KshortActive_frame);
417 m_KsPdf->paramOn(m_KshortActive_frame, RooFit::Layout(0.6, 0.9, 0.9));
418 delete KsHist_active;
419 }
420 m_monObj->setVariable("nKs_activeVeto_hlt", nKs_active);
421
422 if (m_hKshortActiveNotTimeH) {
423 RooDataHist* KsHist_activeNotTime = new RooDataHist("KsHist_activeNotTime", "Histogram data", RooArgList(*m_KsInvMass),
424 m_hKshortActiveNotTimeH);
425 m_KsPdf->fitTo(*KsHist_activeNotTime, RooFit::Minos(true));
426 nKs_activeNotTime = m_sig->getValV();
427 KsHist_activeNotTime->plotOn(m_KshortActiveNotTime_frame) ;
428 m_KsPdf->plotOn(m_KshortActiveNotTime_frame);
429 m_KsPdf->paramOn(m_KshortActiveNotTime_frame, RooFit::Layout(0.6, 0.9, 0.9));
430 delete KsHist_activeNotTime;
431 }
432 m_monObj->setVariable("nKs_activeVetoPrefilterTime_hlt", nKs_activeNotTime);
433
434 if (m_hKshortActiveNotCDCECLH) {
435 RooDataHist* KsHist_activeNotCDCECL = new RooDataHist("KsHist_activeNotCDCECL", "Histogram data", RooArgList(*m_KsInvMass),
436 m_hKshortActiveNotCDCECLH);
437 m_KsPdf->fitTo(*KsHist_activeNotCDCECL, RooFit::Minos(true));
438 nKs_activeNotCDCECL = m_sig->getValV();
439 KsHist_activeNotCDCECL->plotOn(m_KshortActiveNotCDCECL_frame) ;
440 m_KsPdf->plotOn(m_KshortActiveNotCDCECL_frame);
441 m_KsPdf->paramOn(m_KshortActiveNotCDCECL_frame, RooFit::Layout(0.6, 0.9, 0.9));
442 delete KsHist_activeNotCDCECL;
443 }
444 m_monObj->setVariable("nKs_activeVetoPrefilterCDCECL_hlt", nKs_activeNotCDCECL);
445
446 // set the contents of Ks canvas
447 m_c_nks->Clear(); // clear existing content
448 m_c_nks->cd();
449 m_c_nks->Divide(2, 2);
450
451 m_c_nks->cd(1);
452 m_KshortAll_frame->Draw();
453 m_c_nks->cd(2);
454 m_KshortActive_frame->Draw();
455 m_c_nks->cd(3);
456 m_KshortActiveNotTime_frame->Draw();
457 m_c_nks->cd(4);
458 m_KshortActiveNotCDCECL_frame->Draw();
459
460 B2DEBUG(20, "DQMHistAnalysisHLTMonObj : endRun called");
461}
462
464{
465 delete m_KsInvMass;
466 delete m_mean1;
467 delete m_sigma1;
468 delete m_gauss1;
469 delete m_mean2;
470 delete m_sigma2;
471 delete m_gauss2;
472 delete m_double_gauss;
473 delete m_slope;
474 delete m_chebpol;
475 delete m_sig;
476 delete m_bkg;
477 delete m_KsPdf;
478
479 B2DEBUG(20, "terminate called");
480}
RooRealVar * m_bkg
Number of background from fit.
TCanvas * m_c_ana_eff_shifter
Canvas with histogram related to ana_eff_shifter.
TCanvas * m_c_skim
Canvas with histograms related to HLT skims.
RooRealVar * m_frac
*Fraction of first gaussian in double gaussian
RooRealVar * m_mean2
Mean of first gaussian.
void initialize() override final
Initialize the Module.
RooRealVar * m_sigma1
*Sigma of second gaussian
RooRealVar * m_KsInvMass
Invariant mass of KS for HLTPrefilter monitoring.
TCanvas * m_c_l1
Canvas with histograms related to L1.
RooChebychev * m_chebpol
First order polynomial.
RooRealVar * m_sig
Number of Ks events from fit.
RooRealVar * m_mean1
*Mean of first gaussian
MonitoringObject * m_monObj
MonitoringObject to be produced by this module.
void terminate() override final
Termination action.
RooRealVar * m_slope
Slope for first order polynomial.
TCanvas * m_c_filter
Canvas with histograms related to HLT filter.
void endRun() override final
End-of-run action.
RooAddPdf * m_KsPdf
Fit PDF for Ks invariant mass.
RooRealVar * m_sigma2
*Sigma of second gaussian
RooAddPdf * m_double_gauss
Sum of two gaussian.
TCanvas * m_c_hardware
Canvas with histograms related to HLT hardware.
TCanvas * m_c_nks
Canvas to plot Ks histograms.
static TCanvas * findCanvas(TString cname)
Find canvas by name.
static MonitoringObject * getMonitoringObject(const std::string &name)
Get MonitoringObject with given name (new object is created if non-existing)
static TH1 * findHist(const std::string &histname, bool onlyIfUpdated=false)
Get histogram from list (no other search).
DQMHistAnalysisModule()
Constructor / Destructor.
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
#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.
STL namespace.