10#include <dqm/analysis/modules/DQMHistAnalysisMiraBelle.h>
28 setDescription(
"Modify and analyze the data quality histograms of MiraBelle");
51 mumu_main =
new TCanvas(
"mumu_main",
"mumu_main", 0, 0, 800, 600);
52 mumu_resolution =
new TCanvas(
"mumu_resolution",
"mumu_resolution", 0, 0, 800, 600);
53 mumu_muon_val =
new TCanvas(
"mumu_muon_val",
"mumu_muon_val", 0, 0, 400, 400);
54 dst_mass =
new TCanvas(
"dst_mass",
"dst_mass", 0, 0, 1200, 400);
55 dst_pi_val =
new TCanvas(
"dst_pi_val",
"dst_pi_val", 0, 0, 800, 400);
56 dst_k_val =
new TCanvas(
"dst_k_val",
"dst_k_val", 0, 0, 800, 400);
58 bhabha_main =
new TCanvas(
"bhabha_main",
"bhabha_main", 0, 0, 800, 600);
59 bhabha_resolution =
new TCanvas(
"bhabha_resolution",
"bhabha_resolution", 0, 0, 800, 600);
60 hadron_main =
new TCanvas(
"hadron_main",
"hadron_main", 0, 0, 800, 600);
74 B2DEBUG(20,
"DQMHistAnalysisMiraBelle: initialized.");
80 B2DEBUG(20,
"DQMHistAnalysisMiraBelle: beginRun called.");
85 B2DEBUG(20,
"DQMHistAnalysisOutputMiraBelle: event called.");
92 auto* hist_npxd =
findHist(
"PhysicsObjectsMiraBelle/hist_npxd");
93 auto* hist_nsvd =
findHist(
"PhysicsObjectsMiraBelle/hist_nsvd");
94 auto* hist_ncdc =
findHist(
"PhysicsObjectsMiraBelle/hist_ncdc");
95 auto* hist_topdig =
findHist(
"PhysicsObjectsMiraBelle/hist_topdig");
96 auto* hist_DetPhotonARICH =
findHist(
"PhysicsObjectsMiraBelle/hist_DetPhotonARICH");
97 auto* hist_klmTotalHits =
findHist(
"PhysicsObjectsMiraBelle/hist_klmTotalHits");
98 auto* hist_klmClusterLayers =
findHist(
"PhysicsObjectsMiraBelle/hist_klmClusterLayers");
99 auto* hist_dD0 =
findHist(
"PhysicsObjectsMiraBelle/hist_dD0");
100 auto* hist_dZ0 =
findHist(
"PhysicsObjectsMiraBelle/hist_dZ0");
101 auto* hist_dPtcms =
findHist(
"PhysicsObjectsMiraBelle/hist_dPtcms");
102 auto* hist_Pval =
findHist(
"PhysicsObjectsMiraBelle/hist_Pval");
103 auto* hist_nExtraCDCHits =
findHist(
"PhysicsObjectsMiraBelle/hist_nExtraCDCHits");
104 auto* hist_nECLClusters =
findHist(
"PhysicsObjectsMiraBelle/hist_nECLClusters");
105 auto* hist_muid =
findHist(
"PhysicsObjectsMiraBelle/hist_muid");
106 auto* hist_inv_p =
findHist(
"PhysicsObjectsMiraBelle/hist_inv_p");
107 auto* hist_ndf =
findHist(
"PhysicsObjectsMiraBelle/hist_ndf");
108 auto* hist_D0 =
findHist(
"PhysicsObjectsMiraBelle/hist_D0");
109 auto* hist_Z0 =
findHist(
"PhysicsObjectsMiraBelle/hist_Z0");
110 auto* hist_theta =
findHist(
"PhysicsObjectsMiraBelle/hist_theta");
111 auto* hist_Phi0 =
findHist(
"PhysicsObjectsMiraBelle/hist_Phi0");
112 auto* hist_Pt =
findHist(
"PhysicsObjectsMiraBelle/hist_Pt");
113 auto* hist_Mom =
findHist(
"PhysicsObjectsMiraBelle/hist_Mom");
114 auto* hist_klmTotalBarrelHits =
findHist(
"PhysicsObjectsMiraBelle/hist_klmTotalBarrelHits");
115 auto* hist_klmTotalEndcapHits =
findHist(
"PhysicsObjectsMiraBelle/hist_klmTotalEndcapHits");
116 auto* hist_dPhicms =
findHist(
"PhysicsObjectsMiraBelle/hist_dPhicms");
118 if (hist_npxd ==
nullptr) {
119 B2ERROR(
"Can not find the hist_npxd histogram!");
122 if (hist_nsvd ==
nullptr) {
123 B2ERROR(
"Can not find the hist_nsvd histogram!");
126 if (hist_ncdc ==
nullptr) {
127 B2ERROR(
"Can not find the hist_ncdc histogram!");
130 if (hist_topdig ==
nullptr) {
131 B2ERROR(
"Can not find the hist_topdig histogram!");
134 if (hist_DetPhotonARICH ==
nullptr) {
135 B2ERROR(
"Can not find the hist_DetPhotonARICH histogram!");
138 if (hist_klmTotalHits ==
nullptr) {
139 B2ERROR(
"Can not find the hist_klmTotalHits histogram!");
142 if (hist_klmClusterLayers ==
nullptr) {
143 B2ERROR(
"Can not find the hist_klmClusterLayers histogram!");
146 if (hist_dD0 ==
nullptr) {
147 B2ERROR(
"Can not find the hist_dD0 histogram!");
150 if (hist_dZ0 ==
nullptr) {
151 B2ERROR(
"Can not find the hist_dZ0 histogram!");
154 if (hist_dPtcms ==
nullptr) {
155 B2ERROR(
"Can not find the hist_dPtcms histogram!");
158 if (hist_Pval ==
nullptr) {
159 B2ERROR(
"Can not find the hist_Pval histogram!");
162 if (hist_nExtraCDCHits ==
nullptr) {
163 B2ERROR(
"Can not find the hist_nExtraCDCHits histogram!");
166 if (hist_nECLClusters ==
nullptr) {
167 B2ERROR(
"Can not find the hist_nECLClusters histogram!");
170 if (hist_muid ==
nullptr) {
171 B2ERROR(
"Can not find the hist_muid histogram!");
174 if (hist_inv_p ==
nullptr) {
175 B2ERROR(
"Can not find the hist_inv_p histogram!");
178 if (hist_ndf ==
nullptr) {
179 B2ERROR(
"Can not find the hist_ndf histogram!");
182 if (hist_D0 ==
nullptr) {
183 B2ERROR(
"Can not find the hist_D0 histogram!");
186 if (hist_Z0 ==
nullptr) {
187 B2ERROR(
"Can not find the hist_Z0 histogram!");
190 if (hist_theta ==
nullptr) {
191 B2ERROR(
"Can not find the hist_theta histogram!");
194 if (hist_Phi0 ==
nullptr) {
195 B2ERROR(
"Can not find the hist_Phi0 histogram!");
198 if (hist_Pt ==
nullptr) {
199 B2ERROR(
"Can not find the hist_Pt histogram!");
202 if (hist_Mom ==
nullptr) {
203 B2ERROR(
"Can not find the hist_Mom histogram!");
206 if (hist_klmTotalBarrelHits ==
nullptr) {
207 B2ERROR(
"Can not find the hist_klmTotalBarrelHits histogram!");
210 if (hist_klmTotalEndcapHits ==
nullptr) {
211 B2ERROR(
"Can not find the hist_klmTotalEndcapHits histogram!");
214 if (hist_dPhicms ==
nullptr) {
215 B2ERROR(
"Can not find the hist_dPhicms histogram!");
230 mumu_main->cd(9); hist_DetPhotonARICH->Draw();
231 mumu_main->cd(10); hist_klmClusterLayers->Draw();
232 mumu_main->cd(11); hist_nExtraCDCHits->Draw();
233 mumu_main->cd(12); hist_nECLClusters->Draw();
252 double mean_npxd = hist_npxd->GetMean();
253 double mean_nsvd = hist_nsvd->GetMean();
254 double mean_ncdc = hist_ncdc->GetMean();
255 double mean_nklmlayer = hist_klmClusterLayers->GetMean();
256 double mean_nklm = hist_klmTotalHits->GetMean();
257 double mean_nbklm = hist_klmTotalBarrelHits->GetMean();
258 double mean_neklm = hist_klmTotalEndcapHits->GetMean();
259 double mean_topdig = hist_topdig->GetMean();
260 double mean_parich = hist_DetPhotonARICH->GetMean();
261 double mean_ncdc_ex = hist_nExtraCDCHits->GetMean();
262 double mean_necl = hist_nECLClusters->GetMean();
263 double mean_muid = hist_muid->GetMean();
264 double mean_d0 = hist_D0->GetMean();
265 double mean_z0 = hist_Z0->GetMean();
266 double mean_pval = hist_Pval->GetMean();
267 double mean_ndf = hist_ndf->GetMean();
268 double dif_ndf_ncdc = mean_ndf - mean_ncdc;
269 double mean_dd0 = hist_dD0->GetMean();
270 double mean_dz0 = hist_dZ0->GetMean();
271 double mean_dpt = hist_dPtcms->GetMean();
272 double rms_dd0 = hist_dD0->GetRMS();
273 double rms_dz0 = hist_dZ0->GetRMS();
274 double rms_dpt = hist_dPtcms->GetRMS();
278 int ntot = hist_nsvd->GetEntries();
279 double neve_mumu = ntot;
280 double goodmu_frac = -1.;
281 double pval_frac_0 = -1.;
282 double pval_frac_1 = -1.;
283 double nocdc_frac = -1.;
284 double notop_frac = -1.;
285 double noarich_frac = -1.;
286 double muidcontent = hist_muid->GetBinContent(1);
287 double goodmu_o_badmu = -1.;
288 if (muidcontent != 0) {
289 goodmu_o_badmu = hist_muid->GetBinContent(20) / muidcontent;
291 goodmu_o_badmu = 0.0;
293 double pval_more95 = 0.0;
294 double pval_less05 = 0.0;
295 for (
int i = 95; i < 100; i++) pval_more95 += hist_Pval->GetBinContent(i + 1);
296 for (
int i = 0; i < 5; i++) pval_less05 += hist_Pval->GetBinContent(i + 1);
298 goodmu_frac = hist_muid->GetBinContent(20) / neve_mumu;
299 pval_frac_0 = pval_less05 / neve_mumu;
300 pval_frac_1 = pval_more95 / neve_mumu;
301 nocdc_frac = hist_ncdc->GetBinContent(1) / neve_mumu;
302 notop_frac = hist_topdig->GetBinContent(1) / neve_mumu;
303 noarich_frac = hist_DetPhotonARICH->GetBinContent(1) / neve_mumu;
313 double peak_mumu = hist_inv_p->GetXaxis()->GetBinCenter(hist_inv_p->GetMaximumBin());
314 TF1* f_mumuInvM =
new TF1(
"f_mumuInvM",
"gaus", peak_mumu - 0.05, peak_mumu + 0.05);
315 f_mumuInvM->SetParameters(hist_inv_p->GetMaximum(), peak_mumu, 0.045);
316 f_mumuInvM->SetParLimits(1, peak_mumu - 0.05, peak_mumu + 0.05);
317 f_mumuInvM->SetParLimits(2, 0.01, 0.08);
318 hist_inv_p->Fit(f_mumuInvM,
"R");
319 double fit_mumumass = f_mumuInvM->GetParameter(1);
320 if (fit_mumumass < 9.) fit_mumumass = 9.;
321 if (fit_mumumass > 12.) fit_mumumass = 12.;
322 double fit_mumumass_error = f_mumuInvM->GetParError(1);
323 double pull_mumumass = (fit_mumumass -
m_reference_mumu) / fit_mumumass_error;
324 double fit_sigma_mumu = f_mumuInvM->GetParameter(2);
368 auto* hist_D0_InvM =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_InvM");
369 auto* hist_delta_m =
findHist(
"PhysicsObjectsMiraBelleDst/hist_delta_m");
370 auto* hist_D0_softpi_PID_ALL_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_softpi_PID_ALL_pion");
371 auto* hist_D0_softpi_PID_SVD_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_softpi_PID_SVD_pion");
372 auto* hist_D0_softpi_PID_CDC_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_softpi_PID_CDC_pion");
373 auto* hist_D0_softpi_PID_TOP_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_softpi_PID_TOP_pion");
374 auto* hist_D0_softpi_PID_ARICH_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_softpi_PID_ARICH_pion");
375 auto* hist_D0_softpi_PID_ECL_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_softpi_PID_ECL_pion");
376 auto* hist_D0_softpi_PID_KLM_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_softpi_PID_KLM_pion");
377 auto* hist_D0_pi_PID_ALL_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_pi_PID_ALL_pion");
378 auto* hist_D0_pi_PID_SVD_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_pi_PID_SVD_pion");
379 auto* hist_D0_pi_PID_CDC_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_pi_PID_CDC_pion");
380 auto* hist_D0_pi_PID_TOP_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_pi_PID_TOP_pion");
381 auto* hist_D0_pi_PID_ARICH_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_pi_PID_ARICH_pion");
382 auto* hist_D0_pi_PID_ECL_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_pi_PID_ECL_pion");
383 auto* hist_D0_pi_PID_KLM_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_pi_PID_KLM_pion");
384 auto* hist_D0_K_PID_ALL_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_K_PID_ALL_kaon");
385 auto* hist_D0_K_PID_SVD_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_K_PID_SVD_kaon");
386 auto* hist_D0_K_PID_CDC_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_K_PID_CDC_kaon");
387 auto* hist_D0_K_PID_TOP_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_K_PID_TOP_kaon");
388 auto* hist_D0_K_PID_ARICH_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_K_PID_ARICH_kaon");
389 auto* hist_D0_K_PID_ECL_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_K_PID_ECL_kaon");
390 auto* hist_D0_K_PID_KLM_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_K_PID_KLM_kaon");
391 auto* hist_sideband_D0_softpi_PID_ALL_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_softpi_PID_ALL_pion");
392 auto* hist_sideband_D0_softpi_PID_SVD_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_softpi_PID_SVD_pion");
393 auto* hist_sideband_D0_softpi_PID_CDC_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_softpi_PID_CDC_pion");
394 auto* hist_sideband_D0_softpi_PID_TOP_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_softpi_PID_TOP_pion");
395 auto* hist_sideband_D0_softpi_PID_ARICH_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_softpi_PID_ARICH_pion");
396 auto* hist_sideband_D0_softpi_PID_ECL_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_softpi_PID_ECL_pion");
397 auto* hist_sideband_D0_softpi_PID_KLM_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_softpi_PID_KLM_pion");
398 auto* hist_sideband_D0_pi_PID_ALL_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_pi_PID_ALL_pion");
399 auto* hist_sideband_D0_pi_PID_SVD_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_pi_PID_SVD_pion");
400 auto* hist_sideband_D0_pi_PID_CDC_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_pi_PID_CDC_pion");
401 auto* hist_sideband_D0_pi_PID_TOP_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_pi_PID_TOP_pion");
402 auto* hist_sideband_D0_pi_PID_ARICH_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_pi_PID_ARICH_pion");
403 auto* hist_sideband_D0_pi_PID_ECL_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_pi_PID_ECL_pion");
404 auto* hist_sideband_D0_pi_PID_KLM_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_pi_PID_KLM_pion");
405 auto* hist_sideband_D0_K_PID_ALL_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_K_PID_ALL_kaon");
406 auto* hist_sideband_D0_K_PID_SVD_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_K_PID_SVD_kaon");
407 auto* hist_sideband_D0_K_PID_CDC_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_K_PID_CDC_kaon");
408 auto* hist_sideband_D0_K_PID_TOP_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_K_PID_TOP_kaon");
409 auto* hist_sideband_D0_K_PID_ARICH_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_K_PID_ARICH_kaon");
410 auto* hist_sideband_D0_K_PID_ECL_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_K_PID_ECL_kaon");
411 auto* hist_sideband_D0_K_PID_KLM_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_K_PID_KLM_kaon");
412 auto* hist_D0_pi0_InvM =
findHist(
"PhysicsObjectsMiraBelleDst2/hist_D0_pi0_InvM");
413 if (hist_D0_InvM ==
nullptr) {
414 B2ERROR(
"Can not find the hist_D0_InvM histogram!");
417 if (hist_delta_m ==
nullptr) {
418 B2ERROR(
"Can not find the hist_delta_m histogram!");
421 if (hist_D0_softpi_PID_ALL_pion ==
nullptr) {
422 B2ERROR(
"Can not find the hist_D0_softpi_PID_ALL_pion histogram!");
425 if (hist_D0_softpi_PID_SVD_pion ==
nullptr) {
426 B2ERROR(
"Can not find the hist_D0_softpi_PID_SVD_pion histogram!");
429 if (hist_D0_softpi_PID_CDC_pion ==
nullptr) {
430 B2ERROR(
"Can not find the hist_D0_softpi_PID_CDC_pion histogram!");
433 if (hist_D0_softpi_PID_TOP_pion ==
nullptr) {
434 B2ERROR(
"Can not find the hist_D0_softpi_PID_TOP_pion histogram!");
437 if (hist_D0_softpi_PID_ARICH_pion ==
nullptr) {
438 B2ERROR(
"Can not find the hist_D0_softpi_PID_ARICH_pion histogram!");
441 if (hist_D0_softpi_PID_ECL_pion ==
nullptr) {
442 B2ERROR(
"Can not find the hist_D0_softpi_PID_ECL_pion histogram!");
445 if (hist_D0_softpi_PID_KLM_pion ==
nullptr) {
446 B2ERROR(
"Can not find the hist_D0_softpi_PID_KLM_pion histogram!");
449 if (hist_D0_pi_PID_ALL_pion ==
nullptr) {
450 B2ERROR(
"Can not find the hist_D0_pi_PID_ALL_pion histogram!");
453 if (hist_D0_pi_PID_SVD_pion ==
nullptr) {
454 B2ERROR(
"Can not find the hist_D0_pi_PID_SVD_pion histogram!");
457 if (hist_D0_pi_PID_CDC_pion ==
nullptr) {
458 B2ERROR(
"Can not find the hist_D0_pi_PID_CDC_pion histogram!");
461 if (hist_D0_pi_PID_TOP_pion ==
nullptr) {
462 B2ERROR(
"Can not find the hist_D0_pi_PID_TOP_pion histogram!");
465 if (hist_D0_pi_PID_ARICH_pion ==
nullptr) {
466 B2ERROR(
"Can not find the hist_D0_pi_PID_ARICH_pion histogram!");
469 if (hist_D0_pi_PID_ECL_pion ==
nullptr) {
470 B2ERROR(
"Can not find the hist_D0_pi_PID_ECL_pion histogram!");
473 if (hist_D0_pi_PID_KLM_pion ==
nullptr) {
474 B2ERROR(
"Can not find the hist_D0_pi_PID_KLM_pion histogram!");
477 if (hist_D0_K_PID_ALL_kaon ==
nullptr) {
478 B2ERROR(
"Can not find the hist_D0_K_PID_ALL_kaon histogram!");
481 if (hist_D0_K_PID_SVD_kaon ==
nullptr) {
482 B2ERROR(
"Can not find the hist_D0_K_PID_SVD_kaon histogram!");
485 if (hist_D0_K_PID_CDC_kaon ==
nullptr) {
486 B2ERROR(
"Can not find the hist_D0_K_PID_CDC_kaon histogram!");
489 if (hist_D0_K_PID_TOP_kaon ==
nullptr) {
490 B2ERROR(
"Can not find the hist_D0_K_PID_TOP_kaon histogram!");
493 if (hist_D0_K_PID_ARICH_kaon ==
nullptr) {
494 B2ERROR(
"Can not find the hist_D0_K_PID_ARICH_kaon histogram!");
497 if (hist_D0_K_PID_ECL_kaon ==
nullptr) {
498 B2ERROR(
"Can not find the hist_D0_K_PID_ECL_kaon histogram!");
501 if (hist_D0_K_PID_KLM_kaon ==
nullptr) {
502 B2ERROR(
"Can not find the hist_D0_K_PID_KLM_kaon histogram!");
505 if (hist_sideband_D0_softpi_PID_ALL_pion ==
nullptr) {
506 B2ERROR(
"Can not find the hist_sideband_D0_softpi_PID_ALL_pion histogram!");
509 if (hist_sideband_D0_softpi_PID_SVD_pion ==
nullptr) {
510 B2ERROR(
"Can not find the hist_sideband_D0_softpi_PID_SVD_pion histogram!");
513 if (hist_sideband_D0_softpi_PID_CDC_pion ==
nullptr) {
514 B2ERROR(
"Can not find the hist_sideband_D0_softpi_PID_CDC_pion histogram!");
517 if (hist_sideband_D0_softpi_PID_TOP_pion ==
nullptr) {
518 B2ERROR(
"Can not find the hist_sideband_D0_softpi_PID_TOP_pion histogram!");
521 if (hist_sideband_D0_softpi_PID_ARICH_pion ==
nullptr) {
522 B2ERROR(
"Can not find the hist_sideband_D0_softpi_PID_ARICH_pion histogram!");
525 if (hist_sideband_D0_softpi_PID_ECL_pion ==
nullptr) {
526 B2ERROR(
"Can not find the hist_sideband_D0_softpi_PID_ECL_pion histogram!");
529 if (hist_sideband_D0_softpi_PID_KLM_pion ==
nullptr) {
530 B2ERROR(
"Can not find the hist_sideband_D0_softpi_PID_KLM_pion histogram!");
533 if (hist_sideband_D0_pi_PID_ALL_pion ==
nullptr) {
534 B2ERROR(
"Can not find the hist_sideband_D0_pi_PID_ALL_pion histogram!");
537 if (hist_sideband_D0_pi_PID_SVD_pion ==
nullptr) {
538 B2ERROR(
"Can not find the hist_sideband_D0_pi_PID_SVD_pion histogram!");
541 if (hist_sideband_D0_pi_PID_CDC_pion ==
nullptr) {
542 B2ERROR(
"Can not find the hist_sideband_D0_pi_PID_CDC_pion histogram!");
545 if (hist_sideband_D0_pi_PID_TOP_pion ==
nullptr) {
546 B2ERROR(
"Can not find the hist_sideband_D0_pi_PID_TOP_pion histogram!");
549 if (hist_sideband_D0_pi_PID_ARICH_pion ==
nullptr) {
550 B2ERROR(
"Can not find the hist_sideband_D0_pi_PID_ARICH_pion histogram!");
553 if (hist_sideband_D0_pi_PID_ECL_pion ==
nullptr) {
554 B2ERROR(
"Can not find the hist_sideband_D0_pi_PID_ECL_pion histogram!");
557 if (hist_sideband_D0_pi_PID_KLM_pion ==
nullptr) {
558 B2ERROR(
"Can not find the hist_sideband_D0_pi_PID_KLM_pion histogram!");
561 if (hist_sideband_D0_K_PID_ALL_kaon ==
nullptr) {
562 B2ERROR(
"Can not find the hist_sideband_D0_K_PID_ALL_kaon histogram!");
565 if (hist_sideband_D0_K_PID_SVD_kaon ==
nullptr) {
566 B2ERROR(
"Can not find the hist_sideband_D0_K_PID_SVD_kaon histogram!");
569 if (hist_sideband_D0_K_PID_CDC_kaon ==
nullptr) {
570 B2ERROR(
"Can not find the hist_sideband_D0_K_PID_CDC_kaon histogram!");
573 if (hist_sideband_D0_K_PID_TOP_kaon ==
nullptr) {
574 B2ERROR(
"Can not find the hist_sideband_D0_K_PID_TOP_kaon histogram!");
577 if (hist_sideband_D0_K_PID_ARICH_kaon ==
nullptr) {
578 B2ERROR(
"Can not find the hist_sideband_D0_K_PID_ARICH_kaon histogram!");
581 if (hist_sideband_D0_K_PID_ECL_kaon ==
nullptr) {
582 B2ERROR(
"Can not find the hist_sideband_D0_K_PID_ECL_kaon histogram!");
585 if (hist_sideband_D0_K_PID_KLM_kaon ==
nullptr) {
586 B2ERROR(
"Can not find the hist_sideband_D0_K_PID_KLM_kaon histogram!");
589 if (hist_D0_pi0_InvM ==
nullptr) {
590 B2ERROR(
"Can not find the hist_D0_pi0_InvM histogram!");
594 TF1* f_InvM =
new TF1(
"f_InvM",
"[0]*TMath::Gaus(x,[1],[2])+[3]*pow(x-[4],2)+[5]", 1.81, 1.95);
595 f_InvM->SetParNames(
"Height",
"#mu",
"#sigma",
"a",
"b",
"c");
596 f_InvM->SetParameters(hist_D0_InvM->GetMaximum(), 1.86, 5e-3, 0., 1.86, 0.);
597 hist_D0_InvM->Fit(f_InvM,
"",
"", 1.81, 1.95);
598 f_InvM->SetLineColor(kRed);
600 TF1* f_delta_m =
new TF1(
"f_delta_m",
"[0]*TMath::Gaus(x,[1],[2])+[3]*pow(x-[4],2)+[5]", 0.14, 0.16);
601 f_delta_m->SetParNames(
"Height",
"#mu",
"#sigma",
"a",
"b",
"c");
602 f_delta_m->SetParameters(hist_delta_m->GetMaximum(), 0.145, 5e-4, 0., 0.145, 0.);
603 hist_delta_m->Fit(f_delta_m,
"",
"", 0.14, 0.16);
604 f_delta_m->SetLineColor(kRed);
606 TF1* f_pi0_InvM =
new TF1(
"f_pi0_InvM",
"[0]*TMath::Gaus(x,[1],[2])+[3]*pow(x-[4],2)+[5]", 0.09, 0.17);
607 f_pi0_InvM->SetParNames(
"Height",
"#mu",
"#sigma",
"a",
"b",
"c");
608 f_pi0_InvM->SetParameters(hist_D0_pi0_InvM->GetMaximum(), 0.13, 5e-3, 0., 0.13, 0.);
609 hist_D0_pi0_InvM->Fit(f_pi0_InvM,
"",
"", 0.09, 0.17);
610 f_pi0_InvM->SetLineColor(kRed);
613 TF1* f_gaus_InvM =
new TF1(
"f_gaus_InvM",
"gaus", 1.81, 1.95);
614 f_gaus_InvM->SetParameters(f_InvM->GetParameter(0), f_InvM->GetParameter(1), f_InvM->GetParameter(2));
615 double InvM_bin_width = hist_D0_InvM->GetXaxis()->GetBinWidth(1);
616 double neve_dst = f_gaus_InvM->Integral(1.81, 1.95) / InvM_bin_width;
618 TF1* f_gaus_pi0_InvM =
new TF1(
"f_gaus_pi0_InvM",
"gaus", 0.09, 0.17);
619 f_gaus_pi0_InvM->SetParameters(f_pi0_InvM->GetParameter(0), f_pi0_InvM->GetParameter(1), f_pi0_InvM->GetParameter(2));
620 double pi0_InvM_bin_width = hist_D0_pi0_InvM->GetXaxis()->GetBinWidth(1);
621 double neve_pi0 = f_gaus_pi0_InvM->Integral(0.09, 0.17) / pi0_InvM_bin_width;
624 hist_D0_softpi_PID_ALL_pion->Sumw2();
625 hist_D0_softpi_PID_SVD_pion->Sumw2();
626 hist_D0_softpi_PID_CDC_pion->Sumw2();
627 hist_D0_softpi_PID_TOP_pion->Sumw2();
628 hist_D0_softpi_PID_ARICH_pion->Sumw2();
629 hist_D0_softpi_PID_ECL_pion->Sumw2();
630 hist_D0_softpi_PID_KLM_pion->Sumw2();
631 hist_D0_pi_PID_ALL_pion->Sumw2();
632 hist_D0_pi_PID_SVD_pion->Sumw2();
633 hist_D0_pi_PID_CDC_pion->Sumw2();
634 hist_D0_pi_PID_TOP_pion->Sumw2();
635 hist_D0_pi_PID_ARICH_pion->Sumw2();
636 hist_D0_pi_PID_ECL_pion->Sumw2();
637 hist_D0_pi_PID_KLM_pion->Sumw2();
638 hist_D0_K_PID_ALL_kaon->Sumw2();
639 hist_D0_K_PID_SVD_kaon->Sumw2();
640 hist_D0_K_PID_CDC_kaon->Sumw2();
641 hist_D0_K_PID_TOP_kaon->Sumw2();
642 hist_D0_K_PID_ARICH_kaon->Sumw2();
643 hist_D0_K_PID_ECL_kaon->Sumw2();
644 hist_D0_K_PID_KLM_kaon->Sumw2();
645 hist_sideband_D0_softpi_PID_ALL_pion->Sumw2();
646 hist_sideband_D0_softpi_PID_SVD_pion->Sumw2();
647 hist_sideband_D0_softpi_PID_CDC_pion->Sumw2();
648 hist_sideband_D0_softpi_PID_TOP_pion->Sumw2();
649 hist_sideband_D0_softpi_PID_ARICH_pion->Sumw2();
650 hist_sideband_D0_softpi_PID_ECL_pion->Sumw2();
651 hist_sideband_D0_softpi_PID_KLM_pion->Sumw2();
652 hist_sideband_D0_pi_PID_ALL_pion->Sumw2();
653 hist_sideband_D0_pi_PID_SVD_pion->Sumw2();
654 hist_sideband_D0_pi_PID_CDC_pion->Sumw2();
655 hist_sideband_D0_pi_PID_TOP_pion->Sumw2();
656 hist_sideband_D0_pi_PID_ARICH_pion->Sumw2();
657 hist_sideband_D0_pi_PID_ECL_pion->Sumw2();
658 hist_sideband_D0_pi_PID_KLM_pion->Sumw2();
659 hist_sideband_D0_K_PID_ALL_kaon->Sumw2();
660 hist_sideband_D0_K_PID_SVD_kaon->Sumw2();
661 hist_sideband_D0_K_PID_CDC_kaon->Sumw2();
662 hist_sideband_D0_K_PID_TOP_kaon->Sumw2();
663 hist_sideband_D0_K_PID_ARICH_kaon->Sumw2();
664 hist_sideband_D0_K_PID_ECL_kaon->Sumw2();
665 hist_sideband_D0_K_PID_KLM_kaon->Sumw2();
668 hist_sideband_D0_softpi_PID_ALL_pion->Scale(
m_scale_dst);
669 hist_sideband_D0_softpi_PID_SVD_pion->Scale(
m_scale_dst);
670 hist_sideband_D0_softpi_PID_CDC_pion->Scale(
m_scale_dst);
671 hist_sideband_D0_softpi_PID_TOP_pion->Scale(
m_scale_dst);
672 hist_sideband_D0_softpi_PID_ARICH_pion->Scale(
m_scale_dst);
673 hist_sideband_D0_softpi_PID_ECL_pion->Scale(
m_scale_dst);
674 hist_sideband_D0_softpi_PID_KLM_pion->Scale(
m_scale_dst);
675 hist_sideband_D0_pi_PID_ALL_pion->Scale(
m_scale_dst);
676 hist_sideband_D0_pi_PID_SVD_pion->Scale(
m_scale_dst);
677 hist_sideband_D0_pi_PID_CDC_pion->Scale(
m_scale_dst);
678 hist_sideband_D0_pi_PID_TOP_pion->Scale(
m_scale_dst);
679 hist_sideband_D0_pi_PID_ARICH_pion->Scale(
m_scale_dst);
680 hist_sideband_D0_pi_PID_ECL_pion->Scale(
m_scale_dst);
681 hist_sideband_D0_pi_PID_KLM_pion->Scale(
m_scale_dst);
682 hist_sideband_D0_K_PID_ALL_kaon->Scale(
m_scale_dst);
683 hist_sideband_D0_K_PID_SVD_kaon->Scale(
m_scale_dst);
684 hist_sideband_D0_K_PID_CDC_kaon->Scale(
m_scale_dst);
685 hist_sideband_D0_K_PID_TOP_kaon->Scale(
m_scale_dst);
686 hist_sideband_D0_K_PID_ARICH_kaon->Scale(
m_scale_dst);
687 hist_sideband_D0_K_PID_ECL_kaon->Scale(
m_scale_dst);
688 hist_sideband_D0_K_PID_KLM_kaon->Scale(
m_scale_dst);
691 hist_D0_softpi_PID_ALL_pion->Add(hist_sideband_D0_softpi_PID_ALL_pion, -1);
692 hist_D0_softpi_PID_SVD_pion->Add(hist_sideband_D0_softpi_PID_SVD_pion, -1);
693 hist_D0_softpi_PID_CDC_pion->Add(hist_sideband_D0_softpi_PID_CDC_pion, -1);
694 hist_D0_softpi_PID_TOP_pion->Add(hist_sideband_D0_softpi_PID_TOP_pion, -1);
695 hist_D0_softpi_PID_ARICH_pion->Add(hist_sideband_D0_softpi_PID_ARICH_pion, -1);
696 hist_D0_softpi_PID_ECL_pion->Add(hist_sideband_D0_softpi_PID_ECL_pion, -1);
697 hist_D0_softpi_PID_KLM_pion->Add(hist_sideband_D0_softpi_PID_KLM_pion, -1);
698 hist_D0_pi_PID_ALL_pion->Add(hist_sideband_D0_pi_PID_ALL_pion, -1);
699 hist_D0_pi_PID_SVD_pion->Add(hist_sideband_D0_pi_PID_SVD_pion, -1);
700 hist_D0_pi_PID_CDC_pion->Add(hist_sideband_D0_pi_PID_CDC_pion, -1);
701 hist_D0_pi_PID_TOP_pion->Add(hist_sideband_D0_pi_PID_TOP_pion, -1);
702 hist_D0_pi_PID_ARICH_pion->Add(hist_sideband_D0_pi_PID_ARICH_pion, -1);
703 hist_D0_pi_PID_ECL_pion->Add(hist_sideband_D0_pi_PID_ECL_pion, -1);
704 hist_D0_pi_PID_KLM_pion->Add(hist_sideband_D0_pi_PID_KLM_pion, -1);
705 hist_D0_K_PID_ALL_kaon->Add(hist_sideband_D0_K_PID_ALL_kaon, -1);
706 hist_D0_K_PID_SVD_kaon->Add(hist_sideband_D0_K_PID_SVD_kaon, -1);
707 hist_D0_K_PID_CDC_kaon->Add(hist_sideband_D0_K_PID_CDC_kaon, -1);
708 hist_D0_K_PID_TOP_kaon->Add(hist_sideband_D0_K_PID_TOP_kaon, -1);
709 hist_D0_K_PID_ARICH_kaon->Add(hist_sideband_D0_K_PID_ARICH_kaon, -1);
710 hist_D0_K_PID_ECL_kaon->Add(hist_sideband_D0_K_PID_ECL_kaon, -1);
711 hist_D0_K_PID_KLM_kaon->Add(hist_sideband_D0_K_PID_KLM_kaon, -1);
717 hist_D0_InvM->Draw();
718 f_InvM->Draw(
"SAME");
720 hist_delta_m->Draw();
721 f_delta_m->Draw(
"SAME");
723 hist_D0_pi0_InvM->Draw();
724 f_pi0_InvM->Draw(
"SAME");
727 dst_pi_val->cd(1); hist_D0_pi_PID_ALL_pion->Draw();
728 dst_pi_val->cd(2); hist_D0_pi_PID_SVD_pion->Draw();
729 dst_pi_val->cd(3); hist_D0_pi_PID_CDC_pion->Draw();
730 dst_pi_val->cd(4); hist_D0_pi_PID_TOP_pion->Draw();
731 dst_pi_val->cd(5); hist_D0_pi_PID_ARICH_pion->Draw();
732 dst_pi_val->cd(6); hist_D0_pi_PID_ECL_pion->Draw();
733 dst_pi_val->cd(7); hist_D0_pi_PID_KLM_pion->Draw();
736 dst_k_val->cd(1); hist_D0_K_PID_ALL_kaon->Draw();
737 dst_k_val->cd(2); hist_D0_K_PID_SVD_kaon->Draw();
738 dst_k_val->cd(3); hist_D0_K_PID_CDC_kaon->Draw();
739 dst_k_val->cd(4); hist_D0_K_PID_TOP_kaon->Draw();
740 dst_k_val->cd(5); hist_D0_K_PID_ARICH_kaon->Draw();
741 dst_k_val->cd(6); hist_D0_K_PID_ECL_kaon->Draw();
742 dst_k_val->cd(7); hist_D0_K_PID_KLM_kaon->Draw();
745 double mean_D0_InvM = f_InvM->GetParameter(1);
746 double width_D0_InvM = f_InvM->GetParameter(2);
747 double mean_delta_m = f_delta_m->GetParameter(1);
748 double width_delta_m = f_delta_m->GetParameter(2);
749 double mean_pi0_InvM = f_pi0_InvM->GetParameter(1);
750 double width_pi0_InvM = f_pi0_InvM->GetParameter(2);
751 double mean_D0_softpi_PID_ALL_pion = hist_D0_softpi_PID_ALL_pion->GetMean();
752 double mean_D0_softpi_PID_SVD_pion = hist_D0_softpi_PID_SVD_pion->GetMean();
753 double mean_D0_softpi_PID_CDC_pion = hist_D0_softpi_PID_CDC_pion->GetMean();
754 double mean_D0_softpi_PID_TOP_pion = hist_D0_softpi_PID_TOP_pion->GetMean();
755 double mean_D0_softpi_PID_ARICH_pion = hist_D0_softpi_PID_ARICH_pion->GetMean();
756 double mean_D0_softpi_PID_ECL_pion = hist_D0_softpi_PID_ECL_pion->GetMean();
757 double mean_D0_softpi_PID_KLM_pion = hist_D0_softpi_PID_KLM_pion->GetMean();
758 double mean_D0_pi_PID_ALL_pion = hist_D0_pi_PID_ALL_pion->GetMean();
759 double mean_D0_pi_PID_SVD_pion = hist_D0_pi_PID_SVD_pion->GetMean();
760 double mean_D0_pi_PID_CDC_pion = hist_D0_pi_PID_CDC_pion->GetMean();
761 double mean_D0_pi_PID_TOP_pion = hist_D0_pi_PID_TOP_pion->GetMean();
762 double mean_D0_pi_PID_ARICH_pion = hist_D0_pi_PID_ARICH_pion->GetMean();
763 double mean_D0_pi_PID_ECL_pion = hist_D0_pi_PID_ECL_pion->GetMean();
764 double mean_D0_pi_PID_KLM_pion = hist_D0_pi_PID_KLM_pion->GetMean();
765 double mean_D0_K_PID_ALL_kaon = hist_D0_K_PID_ALL_kaon->GetMean();
766 double mean_D0_K_PID_SVD_kaon = hist_D0_K_PID_SVD_kaon->GetMean();
767 double mean_D0_K_PID_CDC_kaon = hist_D0_K_PID_CDC_kaon->GetMean();
768 double mean_D0_K_PID_TOP_kaon = hist_D0_K_PID_TOP_kaon->GetMean();
769 double mean_D0_K_PID_ARICH_kaon = hist_D0_K_PID_ARICH_kaon->GetMean();
770 double mean_D0_K_PID_ECL_kaon = hist_D0_K_PID_ECL_kaon->GetMean();
771 double mean_D0_K_PID_KLM_kaon = hist_D0_K_PID_KLM_kaon->GetMean();
807 auto* histbh_npxd =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_npxd");
808 auto* histbh_nsvd =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_nsvd");
809 auto* histbh_ncdc =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_ncdc");
810 auto* histbh_topdig =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_topdig");
811 auto* histbh_DetPhotonARICH =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_DetPhotonARICH");
812 auto* histbh_dD0 =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_dD0");
813 auto* histbh_dZ0 =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_dZ0");
814 auto* histbh_dPtcms =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_dPtcms");
815 auto* histbh_Pval =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_Pval");
816 auto* histbh_nExtraCDCHits =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_nExtraCDCHits");
817 auto* histbh_nECLClusters =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_nECLClusters");
818 auto* histbh_electronid =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_electronid");
819 auto* histbh_inv_p =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_inv_p");
820 auto* histbh_ndf =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_ndf");
821 auto* histbh_D0 =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_D0");
822 auto* histbh_Z0 =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_Z0");
823 auto* histbh_theta =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_theta");
824 auto* histbh_Phi0 =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_Phi0");
825 auto* histbh_Pt =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_Pt");
826 auto* histbh_Mom =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_Mom");
827 auto* histbh_dPhicms =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_dPhicms");
829 if (histbh_npxd ==
nullptr) {
830 B2ERROR(
"Can not find the histbh_npxd histogram!");
833 if (histbh_nsvd ==
nullptr) {
834 B2ERROR(
"Can not find the histbh_nsvd histogram!");
837 if (histbh_ncdc ==
nullptr) {
838 B2ERROR(
"Can not find the histbh_ncdc histogram!");
841 if (histbh_topdig ==
nullptr) {
842 B2ERROR(
"Can not find the histbh_topdig histogram!");
845 if (histbh_DetPhotonARICH ==
nullptr) {
846 B2ERROR(
"Can not find the histbh_DetPhotonARICH histogram!");
849 if (histbh_dD0 ==
nullptr) {
850 B2ERROR(
"Can not find the histbh_dD0 histogram!");
853 if (histbh_dZ0 ==
nullptr) {
854 B2ERROR(
"Can not find the histbh_dZ0 histogram!");
857 if (histbh_dPtcms ==
nullptr) {
858 B2ERROR(
"Can not find the histbh_dPtcms histogram!");
861 if (histbh_Pval ==
nullptr) {
862 B2ERROR(
"Can not find the histbh_Pval histogram!");
865 if (histbh_nExtraCDCHits ==
nullptr) {
866 B2ERROR(
"Can not find the histbh_nExtraCDCHits histogram!");
869 if (histbh_nECLClusters ==
nullptr) {
870 B2ERROR(
"Can not find the histbh_nECLClusters histogram!");
873 if (histbh_electronid ==
nullptr) {
874 B2ERROR(
"Can not find the histbh_electronid histogram!");
877 if (histbh_inv_p ==
nullptr) {
878 B2ERROR(
"Can not find the histbh_inv_p histogram!");
881 if (histbh_ndf ==
nullptr) {
882 B2ERROR(
"Can not find the histbh_ndf histogram!");
885 if (histbh_D0 ==
nullptr) {
886 B2ERROR(
"Can not find the histbh_D0 histogram!");
889 if (histbh_Z0 ==
nullptr) {
890 B2ERROR(
"Can not find the histbh_Z0 histogram!");
893 if (histbh_theta ==
nullptr) {
894 B2ERROR(
"Can not find the histbh_theta histogram!");
897 if (histbh_Phi0 ==
nullptr) {
898 B2ERROR(
"Can not find the histbh_Phi0 histogram!");
901 if (histbh_Pt ==
nullptr) {
902 B2ERROR(
"Can not find the histbh_Pt histogram!");
905 if (histbh_Mom ==
nullptr) {
906 B2ERROR(
"Can not find the histbh_Mom histogram!");
909 if (histbh_dPhicms ==
nullptr) {
910 B2ERROR(
"Can not find the histbh_dPhicms histogram!");
940 double bh_mean_npxd = histbh_npxd->GetMean();
941 double bh_mean_nsvd = histbh_nsvd->GetMean();
942 double bh_mean_ncdc = histbh_ncdc->GetMean();
943 double bh_mean_topdig = histbh_topdig->GetMean();
944 double bh_mean_parich = histbh_DetPhotonARICH->GetMean();
945 double bh_mean_ncdc_ex = histbh_nExtraCDCHits->GetMean();
946 double bh_mean_necl = histbh_nECLClusters->GetMean();
947 double bh_mean_electronid = histbh_electronid->GetMean();
948 double bh_mean_d0 = histbh_D0->GetMean();
949 double bh_mean_z0 = histbh_Z0->GetMean();
950 double bh_mean_pval = histbh_Pval->GetMean();
951 double bh_mean_ndf = histbh_ndf->GetMean();
952 double bh_dif_ndf_ncdc = mean_ndf - mean_ncdc;
953 double bh_mean_dd0 = histbh_dD0->GetMean();
954 double bh_mean_dz0 = histbh_dZ0->GetMean();
955 double bh_mean_dpt = histbh_dPtcms->GetMean();
956 double bh_rms_dd0 = histbh_dD0->GetRMS();
957 double bh_rms_dz0 = histbh_dZ0->GetRMS();
958 double bh_rms_dpt = histbh_dPtcms->GetRMS();
959 double bh_sigma68_dd0 =
getSigma68(histbh_dD0);
960 double bh_sigma68_dz0 =
getSigma68(histbh_dZ0);
961 double bh_sigma68_dpt =
getSigma68(histbh_dPtcms);
962 int bh_ntot = histbh_nECLClusters->GetEntries();
963 double bh_neve_bhabha = bh_ntot;
964 int bh_ntot_sign = histbh_nsvd->GetEntries();
965 double bh_neve_bhabha_sign = bh_ntot_sign;
966 double bh_goode_frac = -1.;
967 double bh_pval_frac_0 = -1.;
968 double bh_pval_frac_1 = -1.;
969 double bh_nocdc_frac = -1.;
970 double bh_notop_frac = -1.;
971 double bh_noarich_frac = -1.;
972 double eidcontent = histbh_electronid->GetBinContent(1);
973 double bh_goode_o_bade;
974 if (eidcontent != 0) {
975 bh_goode_o_bade = histbh_electronid->GetBinContent(20) / eidcontent;
977 bh_goode_o_bade = 0.0;
979 double bh_pval_more95 = 0.0;
980 double bh_pval_less05 = 0.0;
981 for (
int i = 95; i < 100; i++) bh_pval_more95 += histbh_Pval->GetBinContent(i + 1);
982 for (
int i = 0; i < 5; i++) bh_pval_less05 += histbh_Pval->GetBinContent(i + 1);
983 if (bh_neve_bhabha_sign != 0) {
984 bh_goode_frac = histbh_electronid->GetBinContent(20) / bh_neve_bhabha_sign;
985 bh_pval_frac_0 = bh_pval_less05 / bh_neve_bhabha_sign;
986 bh_pval_frac_1 = bh_pval_more95 / bh_neve_bhabha_sign;
987 bh_nocdc_frac = histbh_ncdc->GetBinContent(1) / bh_neve_bhabha_sign;
988 bh_notop_frac = histbh_topdig->GetBinContent(1) / bh_neve_bhabha_sign;
989 bh_noarich_frac = histbh_DetPhotonARICH->GetBinContent(1) / bh_neve_bhabha_sign;
992 bh_pval_frac_0 = 0.0;
993 bh_pval_frac_1 = 0.0;
996 bh_noarich_frac = 0.0;
1032 auto* histhad_nECLClusters =
findHist(
"PhysicsObjectsMiraBelleHadron/hist_nECLClusters");
1033 auto* histhad_visibleEnergyCMSnorm =
findHist(
"PhysicsObjectsMiraBelleHadron/hist_visibleEnergyCMSnorm");
1034 auto* histhad_EsumCMSnorm =
findHist(
"PhysicsObjectsMiraBelleHadron/hist_EsumCMSnorm");
1035 auto* histhad_R2 =
findHist(
"PhysicsObjectsMiraBelleHadron/hist_R2");
1036 auto* histhad_physicsresultsH =
findHist(
"PhysicsObjectsMiraBelleHadron/hist_physicsresultsH");
1038 if (histhad_nECLClusters ==
nullptr) {
1039 B2ERROR(
"Can not find the histhad_nECLClusters histogram!");
1042 if (histhad_visibleEnergyCMSnorm ==
nullptr) {
1043 B2ERROR(
"Can not find the histhad_visibleEnergyCMSnorm histogram!");
1046 if (histhad_EsumCMSnorm ==
nullptr) {
1047 B2ERROR(
"Can not find the histhad_EsumCMSnorm histogram!");
1050 if (histhad_R2 ==
nullptr) {
1051 B2ERROR(
"Can not find the histhad_R2 histogram!");
1054 if (histhad_physicsresultsH ==
nullptr) {
1055 B2ERROR(
"Can not find the histhad_physicsresultsH histogram!");
1063 hadron_main->cd(2); histhad_visibleEnergyCMSnorm->Draw();
1067 double had_ntot = histhad_physicsresultsH->GetBinContent(3);
1068 double ratio_hadron_bhabha = 0.;
1070 double ratio_pull_hadBhabha = -10.;
1071 double error_ratio = -10.;
1073 ratio_hadron_bhabha = had_ntot / bh_neve_bhabha;
1075 error_ratio = ratio_hadron_bhabha *
sqrt((1 / had_ntot) + (1 / bh_neve_bhabha));
1076 ratio_pull_hadBhabha = (ratio_hadron_bhabha -
m_reference_hadb) / error_ratio;
1084 B2DEBUG(20,
"DQMHistAnalysisMiraBelle : endRun called");
1090 B2DEBUG(20,
"terminate called");
TCanvas * dst_k_val
TCanvas object for PID distributions of K.
void initialize() override final
Initialize the Module.
TCanvas * bhabha_main
TCanvas object for main display.
double m_reference_hadb
Reference value for hadronb2_tight bhabha ratio.
TCanvas * hadron_main
TCanvas object for main display.
TCanvas * bhabha_resolution
TCanvas object for resolution display.
~DQMHistAnalysisMiraBelleModule()
Destructor.
TCanvas * mumu_resolution
TCanvas object for resolution display.
Belle2::MonitoringObject * mon_bhabha
MonitoringObject for bhabha events.
void terminate() override final
Termination action.
TCanvas * dst_pi_val
TCanvas object for PID distributions of pi.
Belle2::MonitoringObject * mon_dst
MonitoringObject for D* events.
void event() override final
Event processor.
double m_reference_mumu
Reference value for mumu inv mass.
TCanvas * mumu_main
TCanvas object for main display.
TCanvas * mumu_muon_val
TCanvas object for mumu values display.
Belle2::MonitoringObject * mon_mumu
MonitoringObject for mumu events.
void endRun() override final
End-of-run action.
DQMHistAnalysisMiraBelleModule()
Constructor.
TCanvas * dst_mass
TCanvas object for D0 mass, delta mass, and pi0 mass.
double m_scale_dst
Scale factor "signal region" / "sideband", assuming uniform events.
void beginRun() override final
Called when entering a new run.
Belle2::MonitoringObject * mon_hadron
MonitoringObject for hadronb2 tight events.
The base class for the histogram analysis module.
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).
double getSigma68(TH1 *h) const
Helper function to compute half of the central interval covering 68% of a distribution.
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
void setVariable(const std::string &var, float val, float upErr=-1., float dwErr=-1)
set value to float variable (new variable is made if not yet existing)
void addCanvas(TCanvas *canv)
Add Canvas to monitoring object.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
double sqrt(double a)
sqrt for double
Abstract base class for different kinds of events.