End-of-run action.
Save run-related stuff, such as statistics.
89{
90
91
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");
117 auto* hist_hltEff =
findHist(
"PhysicsObjectsMiraBelle/hist_hltEff");
118
119 if (hist_npxd == nullptr) {
120 B2ERROR("Can not find the hist_npxd histogram!");
121 return;
122 }
123 if (hist_nsvd == nullptr) {
124 B2ERROR("Can not find the hist_nsvd histogram!");
125 return;
126 }
127 if (hist_ncdc == nullptr) {
128 B2ERROR("Can not find the hist_ncdc histogram!");
129 return;
130 }
131 if (hist_topdig == nullptr) {
132 B2ERROR("Can not find the hist_topdig histogram!");
133 return;
134 }
135 if (hist_DetPhotonARICH == nullptr) {
136 B2ERROR("Can not find the hist_DetPhotonARICH histogram!");
137 return;
138 }
139 if (hist_klmTotalHits == nullptr) {
140 B2ERROR("Can not find the hist_klmTotalHits histogram!");
141 return;
142 }
143 if (hist_klmClusterLayers == nullptr) {
144 B2ERROR("Can not find the hist_klmClusterLayers histogram!");
145 return;
146 }
147 if (hist_dD0 == nullptr) {
148 B2ERROR("Can not find the hist_dD0 histogram!");
149 return;
150 }
151 if (hist_dZ0 == nullptr) {
152 B2ERROR("Can not find the hist_dZ0 histogram!");
153 return;
154 }
155 if (hist_dPtcms == nullptr) {
156 B2ERROR("Can not find the hist_dPtcms histogram!");
157 return;
158 }
159 if (hist_Pval == nullptr) {
160 B2ERROR("Can not find the hist_Pval histogram!");
161 return;
162 }
163 if (hist_nExtraCDCHits == nullptr) {
164 B2ERROR("Can not find the hist_nExtraCDCHits histogram!");
165 return;
166 }
167 if (hist_nECLClusters == nullptr) {
168 B2ERROR("Can not find the hist_nECLClusters histogram!");
169 return;
170 }
171 if (hist_muid == nullptr) {
172 B2ERROR("Can not find the hist_muid histogram!");
173 return;
174 }
175 if (hist_inv_p == nullptr) {
176 B2ERROR("Can not find the hist_inv_p histogram!");
177 return;
178 }
179 if (hist_ndf == nullptr) {
180 B2ERROR("Can not find the hist_ndf histogram!");
181 return;
182 }
183 if (hist_D0 == nullptr) {
184 B2ERROR("Can not find the hist_D0 histogram!");
185 return;
186 }
187 if (hist_Z0 == nullptr) {
188 B2ERROR("Can not find the hist_Z0 histogram!");
189 return;
190 }
191 if (hist_theta == nullptr) {
192 B2ERROR("Can not find the hist_theta histogram!");
193 return;
194 }
195 if (hist_Phi0 == nullptr) {
196 B2ERROR("Can not find the hist_Phi0 histogram!");
197 return;
198 }
199 if (hist_Pt == nullptr) {
200 B2ERROR("Can not find the hist_Pt histogram!");
201 return;
202 }
203 if (hist_Mom == nullptr) {
204 B2ERROR("Can not find the hist_Mom histogram!");
205 return;
206 }
207 if (hist_klmTotalBarrelHits == nullptr) {
208 B2ERROR("Can not find the hist_klmTotalBarrelHits histogram!");
209 return;
210 }
211 if (hist_klmTotalEndcapHits == nullptr) {
212 B2ERROR("Can not find the hist_klmTotalEndcapHits histogram!");
213 return;
214 }
215 if (hist_dPhicms == nullptr) {
216 B2ERROR("Can not find the hist_dPhicms histogram!");
217 return;
218 }
219 if (hist_hltEff == nullptr) {
220 B2ERROR("Can not find the hist_dPhicms histogram!");
221 return;
222 }
223
224
225
226
236 mumu_main->cd(9); hist_DetPhotonARICH->Draw();
237 mumu_main->cd(10); hist_klmClusterLayers->Draw();
238 mumu_main->cd(11); hist_nExtraCDCHits->Draw();
239 mumu_main->cd(12); hist_nECLClusters->Draw();
240
251
256
257
258 double mean_npxd = hist_npxd->GetMean();
259 double mean_nsvd = hist_nsvd->GetMean();
260 double mean_ncdc = hist_ncdc->GetMean();
261 double mean_nklmlayer = hist_klmClusterLayers->GetMean();
262 double mean_nklm = hist_klmTotalHits->GetMean();
263 double mean_nbklm = hist_klmTotalBarrelHits->GetMean();
264 double mean_neklm = hist_klmTotalEndcapHits->GetMean();
265 double mean_topdig = hist_topdig->GetMean();
266 double mean_parich = hist_DetPhotonARICH->GetMean();
267 double mean_ncdc_ex = hist_nExtraCDCHits->GetMean();
268 double mean_necl = hist_nECLClusters->GetMean();
269 double mean_muid = hist_muid->GetMean();
270 double mean_d0 = hist_D0->GetMean();
271 double mean_z0 = hist_Z0->GetMean();
272 double mean_pval = hist_Pval->GetMean();
273 double mean_ndf = hist_ndf->GetMean();
274 double dif_ndf_ncdc = mean_ndf - mean_ncdc;
275 double mean_dd0 = hist_dD0->GetMean();
276 double mean_dz0 = hist_dZ0->GetMean();
277 double mean_dpt = hist_dPtcms->GetMean();
278 double rms_dd0 = hist_dD0->GetRMS();
279 double rms_dz0 = hist_dZ0->GetRMS();
280 double rms_dpt = hist_dPtcms->GetRMS();
284 int ntot = hist_nsvd->GetEntries();
285 double neve_mumu = ntot;
286 double goodmu_frac = -1.;
287 double pval_frac_0 = -1.;
288 double pval_frac_1 = -1.;
289 double nocdc_frac = -1.;
290 double notop_frac = -1.;
291 double noarich_frac = -1.;
292 double muidcontent = hist_muid->GetBinContent(1);
293 double goodmu_o_badmu = -1.;
294 if (muidcontent != 0) {
295 goodmu_o_badmu = hist_muid->GetBinContent(20) / muidcontent;
296 } else {
297 goodmu_o_badmu = 0.0;
298 }
299 double pval_more95 = 0.0;
300 double pval_less05 = 0.0;
301 for (int i = 95; i < 100; i++) pval_more95 += hist_Pval->GetBinContent(i + 1);
302 for (int i = 0; i < 5; i++) pval_less05 += hist_Pval->GetBinContent(i + 1);
303 if (ntot != 0) {
304 goodmu_frac = hist_muid->GetBinContent(20) / neve_mumu;
305 pval_frac_0 = pval_less05 / neve_mumu;
306 pval_frac_1 = pval_more95 / neve_mumu;
307 nocdc_frac = hist_ncdc->GetBinContent(1) / neve_mumu;
308 notop_frac = hist_topdig->GetBinContent(1) / neve_mumu;
309 noarich_frac = hist_DetPhotonARICH->GetBinContent(1) / neve_mumu;
310 } else {
311 goodmu_frac = 0.0;
312 pval_frac_0 = 0.0;
313 pval_frac_1 = 0.0;
314 nocdc_frac = 0.0;
315 notop_frac = 0.0;
316 noarich_frac = 0.0;
317 }
318
319 double peak_mumu = hist_inv_p->GetXaxis()->GetBinCenter(hist_inv_p->GetMaximumBin());
320 TF1* f_mumuInvM = new TF1("f_mumuInvM", "gaus", peak_mumu - 0.05, peak_mumu + 0.05);
321 f_mumuInvM->SetParameters(hist_inv_p->GetMaximum(), peak_mumu, 0.045);
322 f_mumuInvM->SetParLimits(1, peak_mumu - 0.05, peak_mumu + 0.05);
323 f_mumuInvM->SetParLimits(2, 0.01, 0.08);
324 hist_inv_p->Fit(f_mumuInvM, "R");
325 double fit_mumumass = f_mumuInvM->GetParameter(1);
326 if (fit_mumumass < 9.) fit_mumumass = 9.;
327 if (fit_mumumass > 12.) fit_mumumass = 12.;
328 double fit_mumumass_error = f_mumuInvM->GetParError(1);
329 double pull_mumumass = (fit_mumumass -
m_reference_mumu) / fit_mumumass_error;
330 double fit_sigma_mumu = f_mumuInvM->GetParameter(2);
331
332
333 double Nmumu_ECLMuonPair = hist_hltEff->GetBinContent(2);
334 double Nmumu_ECLMuonPairSelectmumu = hist_hltEff->GetBinContent(3);
335
336
337 mon_mumu->setVariable(
"mean_npxd", mean_npxd);
338 mon_mumu->setVariable(
"mean_nsvd", mean_nsvd);
339 mon_mumu->setVariable(
"mean_ncdc", mean_ncdc);
340 mon_mumu->setVariable(
"mean_nklmlayer", mean_nklmlayer);
341 mon_mumu->setVariable(
"mean_nklm", mean_nklm);
342 mon_mumu->setVariable(
"mean_nbklm", mean_nbklm);
343 mon_mumu->setVariable(
"mean_neklm", mean_neklm);
344 mon_mumu->setVariable(
"mean_topdig", mean_topdig);
345 mon_mumu->setVariable(
"mean_parich", mean_parich);
346 mon_mumu->setVariable(
"mean_ncdc_ex", mean_ncdc_ex);
347 mon_mumu->setVariable(
"mean_necl", mean_necl);
348 mon_mumu->setVariable(
"mean_muid", mean_muid);
349 mon_mumu->setVariable(
"mean_d0", mean_d0);
350 mon_mumu->setVariable(
"mean_z0", mean_z0);
351 mon_mumu->setVariable(
"mean_pval", mean_pval);
352 mon_mumu->setVariable(
"mean_ndf", mean_ndf);
353 mon_mumu->setVariable(
"dif_ndf_ncdc", dif_ndf_ncdc);
354 mon_mumu->setVariable(
"mean_dd0", mean_dd0);
355 mon_mumu->setVariable(
"mean_dz0", mean_dz0);
356 mon_mumu->setVariable(
"mean_dpt", mean_dpt);
357 mon_mumu->setVariable(
"rms_dd0", rms_dd0);
358 mon_mumu->setVariable(
"rms_dz0", rms_dz0);
359 mon_mumu->setVariable(
"rms_dpt", rms_dpt);
360 mon_mumu->setVariable(
"sigma68_dd0", sigma68_dd0);
361 mon_mumu->setVariable(
"sigma68_dz0", sigma68_dz0);
362 mon_mumu->setVariable(
"sigma68_dpt", sigma68_dpt);
363 mon_mumu->setVariable(
"neve_mumu", neve_mumu);
364 mon_mumu->setVariable(
"goodmu_frac", goodmu_frac);
365 mon_mumu->setVariable(
"goodmu_o_badmu", goodmu_o_badmu);
366 mon_mumu->setVariable(
"pval_frac_0", pval_frac_0);
367 mon_mumu->setVariable(
"pval_frac_1", pval_frac_1);
368 mon_mumu->setVariable(
"nocdc_frac", nocdc_frac);
369 mon_mumu->setVariable(
"notop_frac", notop_frac);
370 mon_mumu->setVariable(
"noarich_frac", noarich_frac);
371 mon_mumu->setVariable(
"fit_mumumass", fit_mumumass);
372 mon_mumu->setVariable(
"fit_mumumass_error", fit_mumumass_error);
373 mon_mumu->setVariable(
"pull_mumumass", pull_mumumass);
374 mon_mumu->setVariable(
"sigma_mumumass", fit_sigma_mumu);
375 mon_mumu->setVariable(
"Nmumu_ECLMuonPair", Nmumu_ECLMuonPair);
376 mon_mumu->setVariable(
"Nmumu_ECLMuonPairSelectmumu", Nmumu_ECLMuonPairSelectmumu);
377
378
379
380 auto* hist_D0_InvM =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_InvM");
381 auto* hist_delta_m =
findHist(
"PhysicsObjectsMiraBelleDst/hist_delta_m");
382 auto* hist_D0_softpi_PID_ALL_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_softpi_PID_ALL_pion");
383 auto* hist_D0_softpi_PID_SVD_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_softpi_PID_SVD_pion");
384 auto* hist_D0_softpi_PID_CDC_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_softpi_PID_CDC_pion");
385 auto* hist_D0_softpi_PID_TOP_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_softpi_PID_TOP_pion");
386 auto* hist_D0_softpi_PID_ARICH_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_softpi_PID_ARICH_pion");
387 auto* hist_D0_softpi_PID_ECL_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_softpi_PID_ECL_pion");
388 auto* hist_D0_softpi_PID_KLM_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_softpi_PID_KLM_pion");
389 auto* hist_D0_pi_PID_ALL_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_pi_PID_ALL_pion");
390 auto* hist_D0_pi_PID_SVD_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_pi_PID_SVD_pion");
391 auto* hist_D0_pi_PID_CDC_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_pi_PID_CDC_pion");
392 auto* hist_D0_pi_PID_TOP_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_pi_PID_TOP_pion");
393 auto* hist_D0_pi_PID_ARICH_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_pi_PID_ARICH_pion");
394 auto* hist_D0_pi_PID_ECL_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_pi_PID_ECL_pion");
395 auto* hist_D0_pi_PID_KLM_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_pi_PID_KLM_pion");
396 auto* hist_D0_K_PID_ALL_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_K_PID_ALL_kaon");
397 auto* hist_D0_K_PID_SVD_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_K_PID_SVD_kaon");
398 auto* hist_D0_K_PID_CDC_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_K_PID_CDC_kaon");
399 auto* hist_D0_K_PID_TOP_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_K_PID_TOP_kaon");
400 auto* hist_D0_K_PID_ARICH_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_K_PID_ARICH_kaon");
401 auto* hist_D0_K_PID_ECL_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_K_PID_ECL_kaon");
402 auto* hist_D0_K_PID_KLM_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_D0_K_PID_KLM_kaon");
403 auto* hist_sideband_D0_softpi_PID_ALL_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_softpi_PID_ALL_pion");
404 auto* hist_sideband_D0_softpi_PID_SVD_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_softpi_PID_SVD_pion");
405 auto* hist_sideband_D0_softpi_PID_CDC_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_softpi_PID_CDC_pion");
406 auto* hist_sideband_D0_softpi_PID_TOP_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_softpi_PID_TOP_pion");
407 auto* hist_sideband_D0_softpi_PID_ARICH_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_softpi_PID_ARICH_pion");
408 auto* hist_sideband_D0_softpi_PID_ECL_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_softpi_PID_ECL_pion");
409 auto* hist_sideband_D0_softpi_PID_KLM_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_softpi_PID_KLM_pion");
410 auto* hist_sideband_D0_pi_PID_ALL_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_pi_PID_ALL_pion");
411 auto* hist_sideband_D0_pi_PID_SVD_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_pi_PID_SVD_pion");
412 auto* hist_sideband_D0_pi_PID_CDC_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_pi_PID_CDC_pion");
413 auto* hist_sideband_D0_pi_PID_TOP_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_pi_PID_TOP_pion");
414 auto* hist_sideband_D0_pi_PID_ARICH_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_pi_PID_ARICH_pion");
415 auto* hist_sideband_D0_pi_PID_ECL_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_pi_PID_ECL_pion");
416 auto* hist_sideband_D0_pi_PID_KLM_pion =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_pi_PID_KLM_pion");
417 auto* hist_sideband_D0_K_PID_ALL_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_K_PID_ALL_kaon");
418 auto* hist_sideband_D0_K_PID_SVD_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_K_PID_SVD_kaon");
419 auto* hist_sideband_D0_K_PID_CDC_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_K_PID_CDC_kaon");
420 auto* hist_sideband_D0_K_PID_TOP_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_K_PID_TOP_kaon");
421 auto* hist_sideband_D0_K_PID_ARICH_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_K_PID_ARICH_kaon");
422 auto* hist_sideband_D0_K_PID_ECL_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_K_PID_ECL_kaon");
423 auto* hist_sideband_D0_K_PID_KLM_kaon =
findHist(
"PhysicsObjectsMiraBelleDst/hist_sideband_D0_K_PID_KLM_kaon");
424 auto* hist_D0_pi0_InvM =
findHist(
"PhysicsObjectsMiraBelleDst2/hist_D0_pi0_InvM");
425 if (hist_D0_InvM == nullptr) {
426 B2ERROR("Can not find the hist_D0_InvM histogram!");
427 return;
428 }
429 if (hist_delta_m == nullptr) {
430 B2ERROR("Can not find the hist_delta_m histogram!");
431 return;
432 }
433 if (hist_D0_softpi_PID_ALL_pion == nullptr) {
434 B2ERROR("Can not find the hist_D0_softpi_PID_ALL_pion histogram!");
435 return;
436 }
437 if (hist_D0_softpi_PID_SVD_pion == nullptr) {
438 B2ERROR("Can not find the hist_D0_softpi_PID_SVD_pion histogram!");
439 return;
440 }
441 if (hist_D0_softpi_PID_CDC_pion == nullptr) {
442 B2ERROR("Can not find the hist_D0_softpi_PID_CDC_pion histogram!");
443 return;
444 }
445 if (hist_D0_softpi_PID_TOP_pion == nullptr) {
446 B2ERROR("Can not find the hist_D0_softpi_PID_TOP_pion histogram!");
447 return;
448 }
449 if (hist_D0_softpi_PID_ARICH_pion == nullptr) {
450 B2ERROR("Can not find the hist_D0_softpi_PID_ARICH_pion histogram!");
451 return;
452 }
453 if (hist_D0_softpi_PID_ECL_pion == nullptr) {
454 B2ERROR("Can not find the hist_D0_softpi_PID_ECL_pion histogram!");
455 return;
456 }
457 if (hist_D0_softpi_PID_KLM_pion == nullptr) {
458 B2ERROR("Can not find the hist_D0_softpi_PID_KLM_pion histogram!");
459 return;
460 }
461 if (hist_D0_pi_PID_ALL_pion == nullptr) {
462 B2ERROR("Can not find the hist_D0_pi_PID_ALL_pion histogram!");
463 return;
464 }
465 if (hist_D0_pi_PID_SVD_pion == nullptr) {
466 B2ERROR("Can not find the hist_D0_pi_PID_SVD_pion histogram!");
467 return;
468 }
469 if (hist_D0_pi_PID_CDC_pion == nullptr) {
470 B2ERROR("Can not find the hist_D0_pi_PID_CDC_pion histogram!");
471 return;
472 }
473 if (hist_D0_pi_PID_TOP_pion == nullptr) {
474 B2ERROR("Can not find the hist_D0_pi_PID_TOP_pion histogram!");
475 return;
476 }
477 if (hist_D0_pi_PID_ARICH_pion == nullptr) {
478 B2ERROR("Can not find the hist_D0_pi_PID_ARICH_pion histogram!");
479 return;
480 }
481 if (hist_D0_pi_PID_ECL_pion == nullptr) {
482 B2ERROR("Can not find the hist_D0_pi_PID_ECL_pion histogram!");
483 return;
484 }
485 if (hist_D0_pi_PID_KLM_pion == nullptr) {
486 B2ERROR("Can not find the hist_D0_pi_PID_KLM_pion histogram!");
487 return;
488 }
489 if (hist_D0_K_PID_ALL_kaon == nullptr) {
490 B2ERROR("Can not find the hist_D0_K_PID_ALL_kaon histogram!");
491 return;
492 }
493 if (hist_D0_K_PID_SVD_kaon == nullptr) {
494 B2ERROR("Can not find the hist_D0_K_PID_SVD_kaon histogram!");
495 return;
496 }
497 if (hist_D0_K_PID_CDC_kaon == nullptr) {
498 B2ERROR("Can not find the hist_D0_K_PID_CDC_kaon histogram!");
499 return;
500 }
501 if (hist_D0_K_PID_TOP_kaon == nullptr) {
502 B2ERROR("Can not find the hist_D0_K_PID_TOP_kaon histogram!");
503 return;
504 }
505 if (hist_D0_K_PID_ARICH_kaon == nullptr) {
506 B2ERROR("Can not find the hist_D0_K_PID_ARICH_kaon histogram!");
507 return;
508 }
509 if (hist_D0_K_PID_ECL_kaon == nullptr) {
510 B2ERROR("Can not find the hist_D0_K_PID_ECL_kaon histogram!");
511 return;
512 }
513 if (hist_D0_K_PID_KLM_kaon == nullptr) {
514 B2ERROR("Can not find the hist_D0_K_PID_KLM_kaon histogram!");
515 return;
516 }
517 if (hist_sideband_D0_softpi_PID_ALL_pion == nullptr) {
518 B2ERROR("Can not find the hist_sideband_D0_softpi_PID_ALL_pion histogram!");
519 return;
520 }
521 if (hist_sideband_D0_softpi_PID_SVD_pion == nullptr) {
522 B2ERROR("Can not find the hist_sideband_D0_softpi_PID_SVD_pion histogram!");
523 return;
524 }
525 if (hist_sideband_D0_softpi_PID_CDC_pion == nullptr) {
526 B2ERROR("Can not find the hist_sideband_D0_softpi_PID_CDC_pion histogram!");
527 return;
528 }
529 if (hist_sideband_D0_softpi_PID_TOP_pion == nullptr) {
530 B2ERROR("Can not find the hist_sideband_D0_softpi_PID_TOP_pion histogram!");
531 return;
532 }
533 if (hist_sideband_D0_softpi_PID_ARICH_pion == nullptr) {
534 B2ERROR("Can not find the hist_sideband_D0_softpi_PID_ARICH_pion histogram!");
535 return;
536 }
537 if (hist_sideband_D0_softpi_PID_ECL_pion == nullptr) {
538 B2ERROR("Can not find the hist_sideband_D0_softpi_PID_ECL_pion histogram!");
539 return;
540 }
541 if (hist_sideband_D0_softpi_PID_KLM_pion == nullptr) {
542 B2ERROR("Can not find the hist_sideband_D0_softpi_PID_KLM_pion histogram!");
543 return;
544 }
545 if (hist_sideband_D0_pi_PID_ALL_pion == nullptr) {
546 B2ERROR("Can not find the hist_sideband_D0_pi_PID_ALL_pion histogram!");
547 return;
548 }
549 if (hist_sideband_D0_pi_PID_SVD_pion == nullptr) {
550 B2ERROR("Can not find the hist_sideband_D0_pi_PID_SVD_pion histogram!");
551 return;
552 }
553 if (hist_sideband_D0_pi_PID_CDC_pion == nullptr) {
554 B2ERROR("Can not find the hist_sideband_D0_pi_PID_CDC_pion histogram!");
555 return;
556 }
557 if (hist_sideband_D0_pi_PID_TOP_pion == nullptr) {
558 B2ERROR("Can not find the hist_sideband_D0_pi_PID_TOP_pion histogram!");
559 return;
560 }
561 if (hist_sideband_D0_pi_PID_ARICH_pion == nullptr) {
562 B2ERROR("Can not find the hist_sideband_D0_pi_PID_ARICH_pion histogram!");
563 return;
564 }
565 if (hist_sideband_D0_pi_PID_ECL_pion == nullptr) {
566 B2ERROR("Can not find the hist_sideband_D0_pi_PID_ECL_pion histogram!");
567 return;
568 }
569 if (hist_sideband_D0_pi_PID_KLM_pion == nullptr) {
570 B2ERROR("Can not find the hist_sideband_D0_pi_PID_KLM_pion histogram!");
571 return;
572 }
573 if (hist_sideband_D0_K_PID_ALL_kaon == nullptr) {
574 B2ERROR("Can not find the hist_sideband_D0_K_PID_ALL_kaon histogram!");
575 return;
576 }
577 if (hist_sideband_D0_K_PID_SVD_kaon == nullptr) {
578 B2ERROR("Can not find the hist_sideband_D0_K_PID_SVD_kaon histogram!");
579 return;
580 }
581 if (hist_sideband_D0_K_PID_CDC_kaon == nullptr) {
582 B2ERROR("Can not find the hist_sideband_D0_K_PID_CDC_kaon histogram!");
583 return;
584 }
585 if (hist_sideband_D0_K_PID_TOP_kaon == nullptr) {
586 B2ERROR("Can not find the hist_sideband_D0_K_PID_TOP_kaon histogram!");
587 return;
588 }
589 if (hist_sideband_D0_K_PID_ARICH_kaon == nullptr) {
590 B2ERROR("Can not find the hist_sideband_D0_K_PID_ARICH_kaon histogram!");
591 return;
592 }
593 if (hist_sideband_D0_K_PID_ECL_kaon == nullptr) {
594 B2ERROR("Can not find the hist_sideband_D0_K_PID_ECL_kaon histogram!");
595 return;
596 }
597 if (hist_sideband_D0_K_PID_KLM_kaon == nullptr) {
598 B2ERROR("Can not find the hist_sideband_D0_K_PID_KLM_kaon histogram!");
599 return;
600 }
601 if (hist_D0_pi0_InvM == nullptr) {
602 B2ERROR("Can not find the hist_D0_pi0_InvM histogram!");
603 return;
604 }
605
606 TF1* f_InvM = new TF1("f_InvM", "[0]*TMath::Gaus(x,[1],[2])+[3]*pow(x-[4],2)+[5]", 1.81, 1.95);
607 f_InvM->SetParNames("Height", "#mu", "#sigma", "a", "b", "c");
608 f_InvM->SetParameters(hist_D0_InvM->GetMaximum(), 1.86, 5e-3, 0., 1.86, 0.);
609 hist_D0_InvM->Fit(f_InvM, "", "", 1.81, 1.95);
610 f_InvM->SetLineColor(kRed);
611
612 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);
613 f_delta_m->SetParNames("Height", "#mu", "#sigma", "a", "b", "c");
614 f_delta_m->SetParameters(hist_delta_m->GetMaximum(), 0.145, 5e-4, 0., 0.145, 0.);
615 hist_delta_m->Fit(f_delta_m, "", "", 0.14, 0.16);
616 f_delta_m->SetLineColor(kRed);
617
618 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);
619 f_pi0_InvM->SetParNames("Height", "#mu", "#sigma", "a", "b", "c");
620 f_pi0_InvM->SetParameters(hist_D0_pi0_InvM->GetMaximum(), 0.13, 5e-3, 0., 0.13, 0.);
621 hist_D0_pi0_InvM->Fit(f_pi0_InvM, "", "", 0.09, 0.17);
622 f_pi0_InvM->SetLineColor(kRed);
623
624
625 TF1* f_gaus_InvM = new TF1("f_gaus_InvM", "gaus", 1.81, 1.95);
626 f_gaus_InvM->SetParameters(f_InvM->GetParameter(0), f_InvM->GetParameter(1), f_InvM->GetParameter(2));
627 double InvM_bin_width = hist_D0_InvM->GetXaxis()->GetBinWidth(1);
628 double neve_dst = f_gaus_InvM->Integral(1.81, 1.95) / InvM_bin_width;
629
630 TF1* f_gaus_pi0_InvM = new TF1("f_gaus_pi0_InvM", "gaus", 0.09, 0.17);
631 f_gaus_pi0_InvM->SetParameters(f_pi0_InvM->GetParameter(0), f_pi0_InvM->GetParameter(1), f_pi0_InvM->GetParameter(2));
632 double pi0_InvM_bin_width = hist_D0_pi0_InvM->GetXaxis()->GetBinWidth(1);
633 double neve_pi0 = f_gaus_pi0_InvM->Integral(0.09, 0.17) / pi0_InvM_bin_width;
634
635
636 hist_D0_softpi_PID_ALL_pion->Sumw2();
637 hist_D0_softpi_PID_SVD_pion->Sumw2();
638 hist_D0_softpi_PID_CDC_pion->Sumw2();
639 hist_D0_softpi_PID_TOP_pion->Sumw2();
640 hist_D0_softpi_PID_ARICH_pion->Sumw2();
641 hist_D0_softpi_PID_ECL_pion->Sumw2();
642 hist_D0_softpi_PID_KLM_pion->Sumw2();
643 hist_D0_pi_PID_ALL_pion->Sumw2();
644 hist_D0_pi_PID_SVD_pion->Sumw2();
645 hist_D0_pi_PID_CDC_pion->Sumw2();
646 hist_D0_pi_PID_TOP_pion->Sumw2();
647 hist_D0_pi_PID_ARICH_pion->Sumw2();
648 hist_D0_pi_PID_ECL_pion->Sumw2();
649 hist_D0_pi_PID_KLM_pion->Sumw2();
650 hist_D0_K_PID_ALL_kaon->Sumw2();
651 hist_D0_K_PID_SVD_kaon->Sumw2();
652 hist_D0_K_PID_CDC_kaon->Sumw2();
653 hist_D0_K_PID_TOP_kaon->Sumw2();
654 hist_D0_K_PID_ARICH_kaon->Sumw2();
655 hist_D0_K_PID_ECL_kaon->Sumw2();
656 hist_D0_K_PID_KLM_kaon->Sumw2();
657 hist_sideband_D0_softpi_PID_ALL_pion->Sumw2();
658 hist_sideband_D0_softpi_PID_SVD_pion->Sumw2();
659 hist_sideband_D0_softpi_PID_CDC_pion->Sumw2();
660 hist_sideband_D0_softpi_PID_TOP_pion->Sumw2();
661 hist_sideband_D0_softpi_PID_ARICH_pion->Sumw2();
662 hist_sideband_D0_softpi_PID_ECL_pion->Sumw2();
663 hist_sideband_D0_softpi_PID_KLM_pion->Sumw2();
664 hist_sideband_D0_pi_PID_ALL_pion->Sumw2();
665 hist_sideband_D0_pi_PID_SVD_pion->Sumw2();
666 hist_sideband_D0_pi_PID_CDC_pion->Sumw2();
667 hist_sideband_D0_pi_PID_TOP_pion->Sumw2();
668 hist_sideband_D0_pi_PID_ARICH_pion->Sumw2();
669 hist_sideband_D0_pi_PID_ECL_pion->Sumw2();
670 hist_sideband_D0_pi_PID_KLM_pion->Sumw2();
671 hist_sideband_D0_K_PID_ALL_kaon->Sumw2();
672 hist_sideband_D0_K_PID_SVD_kaon->Sumw2();
673 hist_sideband_D0_K_PID_CDC_kaon->Sumw2();
674 hist_sideband_D0_K_PID_TOP_kaon->Sumw2();
675 hist_sideband_D0_K_PID_ARICH_kaon->Sumw2();
676 hist_sideband_D0_K_PID_ECL_kaon->Sumw2();
677 hist_sideband_D0_K_PID_KLM_kaon->Sumw2();
678
679
680 hist_sideband_D0_softpi_PID_ALL_pion->Scale(
m_scale_dst);
681 hist_sideband_D0_softpi_PID_SVD_pion->Scale(
m_scale_dst);
682 hist_sideband_D0_softpi_PID_CDC_pion->Scale(
m_scale_dst);
683 hist_sideband_D0_softpi_PID_TOP_pion->Scale(
m_scale_dst);
684 hist_sideband_D0_softpi_PID_ARICH_pion->Scale(
m_scale_dst);
685 hist_sideband_D0_softpi_PID_ECL_pion->Scale(
m_scale_dst);
686 hist_sideband_D0_softpi_PID_KLM_pion->Scale(
m_scale_dst);
687 hist_sideband_D0_pi_PID_ALL_pion->Scale(
m_scale_dst);
688 hist_sideband_D0_pi_PID_SVD_pion->Scale(
m_scale_dst);
689 hist_sideband_D0_pi_PID_CDC_pion->Scale(
m_scale_dst);
690 hist_sideband_D0_pi_PID_TOP_pion->Scale(
m_scale_dst);
691 hist_sideband_D0_pi_PID_ARICH_pion->Scale(
m_scale_dst);
692 hist_sideband_D0_pi_PID_ECL_pion->Scale(
m_scale_dst);
693 hist_sideband_D0_pi_PID_KLM_pion->Scale(
m_scale_dst);
694 hist_sideband_D0_K_PID_ALL_kaon->Scale(
m_scale_dst);
695 hist_sideband_D0_K_PID_SVD_kaon->Scale(
m_scale_dst);
696 hist_sideband_D0_K_PID_CDC_kaon->Scale(
m_scale_dst);
697 hist_sideband_D0_K_PID_TOP_kaon->Scale(
m_scale_dst);
698 hist_sideband_D0_K_PID_ARICH_kaon->Scale(
m_scale_dst);
699 hist_sideband_D0_K_PID_ECL_kaon->Scale(
m_scale_dst);
700 hist_sideband_D0_K_PID_KLM_kaon->Scale(
m_scale_dst);
701
702
703 hist_D0_softpi_PID_ALL_pion->Add(hist_sideband_D0_softpi_PID_ALL_pion, -1);
704 hist_D0_softpi_PID_SVD_pion->Add(hist_sideband_D0_softpi_PID_SVD_pion, -1);
705 hist_D0_softpi_PID_CDC_pion->Add(hist_sideband_D0_softpi_PID_CDC_pion, -1);
706 hist_D0_softpi_PID_TOP_pion->Add(hist_sideband_D0_softpi_PID_TOP_pion, -1);
707 hist_D0_softpi_PID_ARICH_pion->Add(hist_sideband_D0_softpi_PID_ARICH_pion, -1);
708 hist_D0_softpi_PID_ECL_pion->Add(hist_sideband_D0_softpi_PID_ECL_pion, -1);
709 hist_D0_softpi_PID_KLM_pion->Add(hist_sideband_D0_softpi_PID_KLM_pion, -1);
710 hist_D0_pi_PID_ALL_pion->Add(hist_sideband_D0_pi_PID_ALL_pion, -1);
711 hist_D0_pi_PID_SVD_pion->Add(hist_sideband_D0_pi_PID_SVD_pion, -1);
712 hist_D0_pi_PID_CDC_pion->Add(hist_sideband_D0_pi_PID_CDC_pion, -1);
713 hist_D0_pi_PID_TOP_pion->Add(hist_sideband_D0_pi_PID_TOP_pion, -1);
714 hist_D0_pi_PID_ARICH_pion->Add(hist_sideband_D0_pi_PID_ARICH_pion, -1);
715 hist_D0_pi_PID_ECL_pion->Add(hist_sideband_D0_pi_PID_ECL_pion, -1);
716 hist_D0_pi_PID_KLM_pion->Add(hist_sideband_D0_pi_PID_KLM_pion, -1);
717 hist_D0_K_PID_ALL_kaon->Add(hist_sideband_D0_K_PID_ALL_kaon, -1);
718 hist_D0_K_PID_SVD_kaon->Add(hist_sideband_D0_K_PID_SVD_kaon, -1);
719 hist_D0_K_PID_CDC_kaon->Add(hist_sideband_D0_K_PID_CDC_kaon, -1);
720 hist_D0_K_PID_TOP_kaon->Add(hist_sideband_D0_K_PID_TOP_kaon, -1);
721 hist_D0_K_PID_ARICH_kaon->Add(hist_sideband_D0_K_PID_ARICH_kaon, -1);
722 hist_D0_K_PID_ECL_kaon->Add(hist_sideband_D0_K_PID_ECL_kaon, -1);
723 hist_D0_K_PID_KLM_kaon->Add(hist_sideband_D0_K_PID_KLM_kaon, -1);
724
725
726
729 hist_D0_InvM->Draw();
730 f_InvM->Draw("SAME");
732 hist_delta_m->Draw();
733 f_delta_m->Draw("SAME");
735 hist_D0_pi0_InvM->Draw();
736 f_pi0_InvM->Draw("SAME");
737
739 dst_pi_val->cd(1); hist_D0_pi_PID_ALL_pion->Draw();
740 dst_pi_val->cd(2); hist_D0_pi_PID_SVD_pion->Draw();
741 dst_pi_val->cd(3); hist_D0_pi_PID_CDC_pion->Draw();
742 dst_pi_val->cd(4); hist_D0_pi_PID_TOP_pion->Draw();
743 dst_pi_val->cd(5); hist_D0_pi_PID_ARICH_pion->Draw();
744 dst_pi_val->cd(6); hist_D0_pi_PID_ECL_pion->Draw();
745 dst_pi_val->cd(7); hist_D0_pi_PID_KLM_pion->Draw();
746
748 dst_k_val->cd(1); hist_D0_K_PID_ALL_kaon->Draw();
749 dst_k_val->cd(2); hist_D0_K_PID_SVD_kaon->Draw();
750 dst_k_val->cd(3); hist_D0_K_PID_CDC_kaon->Draw();
751 dst_k_val->cd(4); hist_D0_K_PID_TOP_kaon->Draw();
752 dst_k_val->cd(5); hist_D0_K_PID_ARICH_kaon->Draw();
753 dst_k_val->cd(6); hist_D0_K_PID_ECL_kaon->Draw();
754 dst_k_val->cd(7); hist_D0_K_PID_KLM_kaon->Draw();
755
756
757 double mean_D0_InvM = f_InvM->GetParameter(1);
758 double width_D0_InvM = f_InvM->GetParameter(2);
759 double mean_delta_m = f_delta_m->GetParameter(1);
760 double width_delta_m = f_delta_m->GetParameter(2);
761 double mean_pi0_InvM = f_pi0_InvM->GetParameter(1);
762 double width_pi0_InvM = f_pi0_InvM->GetParameter(2);
763 double mean_D0_softpi_PID_ALL_pion = hist_D0_softpi_PID_ALL_pion->GetMean();
764 double mean_D0_softpi_PID_SVD_pion = hist_D0_softpi_PID_SVD_pion->GetMean();
765 double mean_D0_softpi_PID_CDC_pion = hist_D0_softpi_PID_CDC_pion->GetMean();
766 double mean_D0_softpi_PID_TOP_pion = hist_D0_softpi_PID_TOP_pion->GetMean();
767 double mean_D0_softpi_PID_ARICH_pion = hist_D0_softpi_PID_ARICH_pion->GetMean();
768 double mean_D0_softpi_PID_ECL_pion = hist_D0_softpi_PID_ECL_pion->GetMean();
769 double mean_D0_softpi_PID_KLM_pion = hist_D0_softpi_PID_KLM_pion->GetMean();
770 double mean_D0_pi_PID_ALL_pion = hist_D0_pi_PID_ALL_pion->GetMean();
771 double mean_D0_pi_PID_SVD_pion = hist_D0_pi_PID_SVD_pion->GetMean();
772 double mean_D0_pi_PID_CDC_pion = hist_D0_pi_PID_CDC_pion->GetMean();
773 double mean_D0_pi_PID_TOP_pion = hist_D0_pi_PID_TOP_pion->GetMean();
774 double mean_D0_pi_PID_ARICH_pion = hist_D0_pi_PID_ARICH_pion->GetMean();
775 double mean_D0_pi_PID_ECL_pion = hist_D0_pi_PID_ECL_pion->GetMean();
776 double mean_D0_pi_PID_KLM_pion = hist_D0_pi_PID_KLM_pion->GetMean();
777 double mean_D0_K_PID_ALL_kaon = hist_D0_K_PID_ALL_kaon->GetMean();
778 double mean_D0_K_PID_SVD_kaon = hist_D0_K_PID_SVD_kaon->GetMean();
779 double mean_D0_K_PID_CDC_kaon = hist_D0_K_PID_CDC_kaon->GetMean();
780 double mean_D0_K_PID_TOP_kaon = hist_D0_K_PID_TOP_kaon->GetMean();
781 double mean_D0_K_PID_ARICH_kaon = hist_D0_K_PID_ARICH_kaon->GetMean();
782 double mean_D0_K_PID_ECL_kaon = hist_D0_K_PID_ECL_kaon->GetMean();
783 double mean_D0_K_PID_KLM_kaon = hist_D0_K_PID_KLM_kaon->GetMean();
784
785
786 mon_dst->setVariable(
"neve_dst", neve_dst);
787 mon_dst->setVariable(
"neve_pi0", neve_pi0);
788 mon_dst->setVariable(
"mean_D0_InvM", mean_D0_InvM);
789 mon_dst->setVariable(
"width_D0_InvM", width_D0_InvM);
790 mon_dst->setVariable(
"mean_delta_m", mean_delta_m);
791 mon_dst->setVariable(
"width_delta_m", width_delta_m);
792 mon_dst->setVariable(
"mean_pi0_InvM", mean_pi0_InvM);
793 mon_dst->setVariable(
"width_pi0_InvM", width_pi0_InvM);
794 mon_dst->setVariable(
"mean_D0_softpi_PID_ALL_pion", mean_D0_softpi_PID_ALL_pion);
795 mon_dst->setVariable(
"mean_D0_softpi_PID_SVD_pion", mean_D0_softpi_PID_SVD_pion);
796 mon_dst->setVariable(
"mean_D0_softpi_PID_CDC_pion", mean_D0_softpi_PID_CDC_pion);
797 mon_dst->setVariable(
"mean_D0_softpi_PID_TOP_pion", mean_D0_softpi_PID_TOP_pion);
798 mon_dst->setVariable(
"mean_D0_softpi_PID_ARICH_pion", mean_D0_softpi_PID_ARICH_pion);
799 mon_dst->setVariable(
"mean_D0_softpi_PID_ECL_pion", mean_D0_softpi_PID_ECL_pion);
800 mon_dst->setVariable(
"mean_D0_softpi_PID_KLM_pion", mean_D0_softpi_PID_KLM_pion);
801 mon_dst->setVariable(
"mean_D0_pi_PID_ALL_pion", mean_D0_pi_PID_ALL_pion);
802 mon_dst->setVariable(
"mean_D0_pi_PID_SVD_pion", mean_D0_pi_PID_SVD_pion);
803 mon_dst->setVariable(
"mean_D0_pi_PID_CDC_pion", mean_D0_pi_PID_CDC_pion);
804 mon_dst->setVariable(
"mean_D0_pi_PID_TOP_pion", mean_D0_pi_PID_TOP_pion);
805 mon_dst->setVariable(
"mean_D0_pi_PID_ARICH_pion", mean_D0_pi_PID_ARICH_pion);
806 mon_dst->setVariable(
"mean_D0_pi_PID_ECL_pion", mean_D0_pi_PID_ECL_pion);
807 mon_dst->setVariable(
"mean_D0_pi_PID_KLM_pion", mean_D0_pi_PID_KLM_pion);
808 mon_dst->setVariable(
"mean_D0_K_PID_ALL_kaon", mean_D0_K_PID_ALL_kaon);
809 mon_dst->setVariable(
"mean_D0_K_PID_SVD_kaon", mean_D0_K_PID_SVD_kaon);
810 mon_dst->setVariable(
"mean_D0_K_PID_CDC_kaon", mean_D0_K_PID_CDC_kaon);
811 mon_dst->setVariable(
"mean_D0_K_PID_TOP_kaon", mean_D0_K_PID_TOP_kaon);
812 mon_dst->setVariable(
"mean_D0_K_PID_ARICH_kaon", mean_D0_K_PID_ARICH_kaon);
813 mon_dst->setVariable(
"mean_D0_K_PID_ECL_kaon", mean_D0_K_PID_ECL_kaon);
814 mon_dst->setVariable(
"mean_D0_K_PID_KLM_kaon", mean_D0_K_PID_KLM_kaon);
815
816
817
818
819 auto* histbh_npxd =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_npxd");
820 auto* histbh_nsvd =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_nsvd");
821 auto* histbh_ncdc =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_ncdc");
822 auto* histbh_topdig =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_topdig");
823 auto* histbh_DetPhotonARICH =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_DetPhotonARICH");
824 auto* histbh_dD0 =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_dD0");
825 auto* histbh_dZ0 =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_dZ0");
826 auto* histbh_dPtcms =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_dPtcms");
827 auto* histbh_Pval =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_Pval");
828 auto* histbh_nExtraCDCHits =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_nExtraCDCHits");
829 auto* histbh_nECLClusters =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_nECLClusters");
830 auto* histbh_electronid =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_electronid");
831 auto* histbh_inv_p =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_inv_p");
832 auto* histbh_ndf =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_ndf");
833 auto* histbh_D0 =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_D0");
834 auto* histbh_Z0 =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_Z0");
835 auto* histbh_theta =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_theta");
836 auto* histbh_Phi0 =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_Phi0");
837 auto* histbh_Pt =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_Pt");
838 auto* histbh_Mom =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_Mom");
839 auto* histbh_dPhicms =
findHist(
"PhysicsObjectsMiraBelleBhabha/hist_dPhicms");
840
841 if (histbh_npxd == nullptr) {
842 B2ERROR("Can not find the histbh_npxd histogram!");
843 return;
844 }
845 if (histbh_nsvd == nullptr) {
846 B2ERROR("Can not find the histbh_nsvd histogram!");
847 return;
848 }
849 if (histbh_ncdc == nullptr) {
850 B2ERROR("Can not find the histbh_ncdc histogram!");
851 return;
852 }
853 if (histbh_topdig == nullptr) {
854 B2ERROR("Can not find the histbh_topdig histogram!");
855 return;
856 }
857 if (histbh_DetPhotonARICH == nullptr) {
858 B2ERROR("Can not find the histbh_DetPhotonARICH histogram!");
859 return;
860 }
861 if (histbh_dD0 == nullptr) {
862 B2ERROR("Can not find the histbh_dD0 histogram!");
863 return;
864 }
865 if (histbh_dZ0 == nullptr) {
866 B2ERROR("Can not find the histbh_dZ0 histogram!");
867 return;
868 }
869 if (histbh_dPtcms == nullptr) {
870 B2ERROR("Can not find the histbh_dPtcms histogram!");
871 return;
872 }
873 if (histbh_Pval == nullptr) {
874 B2ERROR("Can not find the histbh_Pval histogram!");
875 return;
876 }
877 if (histbh_nExtraCDCHits == nullptr) {
878 B2ERROR("Can not find the histbh_nExtraCDCHits histogram!");
879 return;
880 }
881 if (histbh_nECLClusters == nullptr) {
882 B2ERROR("Can not find the histbh_nECLClusters histogram!");
883 return;
884 }
885 if (histbh_electronid == nullptr) {
886 B2ERROR("Can not find the histbh_electronid histogram!");
887 return;
888 }
889 if (histbh_inv_p == nullptr) {
890 B2ERROR("Can not find the histbh_inv_p histogram!");
891 return;
892 }
893 if (histbh_ndf == nullptr) {
894 B2ERROR("Can not find the histbh_ndf histogram!");
895 return;
896 }
897 if (histbh_D0 == nullptr) {
898 B2ERROR("Can not find the histbh_D0 histogram!");
899 return;
900 }
901 if (histbh_Z0 == nullptr) {
902 B2ERROR("Can not find the histbh_Z0 histogram!");
903 return;
904 }
905 if (histbh_theta == nullptr) {
906 B2ERROR("Can not find the histbh_theta histogram!");
907 return;
908 }
909 if (histbh_Phi0 == nullptr) {
910 B2ERROR("Can not find the histbh_Phi0 histogram!");
911 return;
912 }
913 if (histbh_Pt == nullptr) {
914 B2ERROR("Can not find the histbh_Pt histogram!");
915 return;
916 }
917 if (histbh_Mom == nullptr) {
918 B2ERROR("Can not find the histbh_Mom histogram!");
919 return;
920 }
921 if (histbh_dPhicms == nullptr) {
922 B2ERROR("Can not find the histbh_dPhicms histogram!");
923 return;
924 }
925
926
927
940
950
951
952 double bh_mean_npxd = histbh_npxd->GetMean();
953 double bh_mean_nsvd = histbh_nsvd->GetMean();
954 double bh_mean_ncdc = histbh_ncdc->GetMean();
955 double bh_mean_topdig = histbh_topdig->GetMean();
956 double bh_mean_parich = histbh_DetPhotonARICH->GetMean();
957 double bh_mean_ncdc_ex = histbh_nExtraCDCHits->GetMean();
958 double bh_mean_necl = histbh_nECLClusters->GetMean();
959 double bh_mean_electronid = histbh_electronid->GetMean();
960 double bh_mean_d0 = histbh_D0->GetMean();
961 double bh_mean_z0 = histbh_Z0->GetMean();
962 double bh_mean_pval = histbh_Pval->GetMean();
963 double bh_mean_ndf = histbh_ndf->GetMean();
964 double bh_dif_ndf_ncdc = mean_ndf - mean_ncdc;
965 double bh_mean_dd0 = histbh_dD0->GetMean();
966 double bh_mean_dz0 = histbh_dZ0->GetMean();
967 double bh_mean_dpt = histbh_dPtcms->GetMean();
968 double bh_rms_dd0 = histbh_dD0->GetRMS();
969 double bh_rms_dz0 = histbh_dZ0->GetRMS();
970 double bh_rms_dpt = histbh_dPtcms->GetRMS();
971 double bh_sigma68_dd0 =
getSigma68(histbh_dD0);
972 double bh_sigma68_dz0 =
getSigma68(histbh_dZ0);
973 double bh_sigma68_dpt =
getSigma68(histbh_dPtcms);
974 int bh_ntot = histbh_nECLClusters->GetEntries();
975 double bh_neve_bhabha = bh_ntot;
976 int bh_ntot_sign = histbh_nsvd->GetEntries();
977 double bh_neve_bhabha_sign = bh_ntot_sign;
978 double bh_goode_frac = -1.;
979 double bh_pval_frac_0 = -1.;
980 double bh_pval_frac_1 = -1.;
981 double bh_nocdc_frac = -1.;
982 double bh_notop_frac = -1.;
983 double bh_noarich_frac = -1.;
984 double eidcontent = histbh_electronid->GetBinContent(1);
985 double bh_goode_o_bade;
986 if (eidcontent != 0) {
987 bh_goode_o_bade = histbh_electronid->GetBinContent(20) / eidcontent;
988 } else {
989 bh_goode_o_bade = 0.0;
990 }
991 double bh_pval_more95 = 0.0;
992 double bh_pval_less05 = 0.0;
993 for (int i = 95; i < 100; i++) bh_pval_more95 += histbh_Pval->GetBinContent(i + 1);
994 for (int i = 0; i < 5; i++) bh_pval_less05 += histbh_Pval->GetBinContent(i + 1);
995 if (bh_neve_bhabha_sign != 0) {
996 bh_goode_frac = histbh_electronid->GetBinContent(20) / bh_neve_bhabha_sign;
997 bh_pval_frac_0 = bh_pval_less05 / bh_neve_bhabha_sign;
998 bh_pval_frac_1 = bh_pval_more95 / bh_neve_bhabha_sign;
999 bh_nocdc_frac = histbh_ncdc->GetBinContent(1) / bh_neve_bhabha_sign;
1000 bh_notop_frac = histbh_topdig->GetBinContent(1) / bh_neve_bhabha_sign;
1001 bh_noarich_frac = histbh_DetPhotonARICH->GetBinContent(1) / bh_neve_bhabha_sign;
1002 } else {
1003 bh_goode_frac = 0.0;
1004 bh_pval_frac_0 = 0.0;
1005 bh_pval_frac_1 = 0.0;
1006 bh_nocdc_frac = 0.0;
1007 bh_notop_frac = 0.0;
1008 bh_noarich_frac = 0.0;
1009 }
1010
1011 mon_bhabha->setVariable(
"bh_mean_npxd", bh_mean_npxd);
1012 mon_bhabha->setVariable(
"bh_mean_nsvd", bh_mean_nsvd);
1013 mon_bhabha->setVariable(
"bh_mean_ncdc", bh_mean_ncdc);
1014 mon_bhabha->setVariable(
"bh_mean_topdig", bh_mean_topdig);
1015 mon_bhabha->setVariable(
"bh_mean_parich", bh_mean_parich);
1016 mon_bhabha->setVariable(
"bh_mean_ncdc_ex", bh_mean_ncdc_ex);
1017 mon_bhabha->setVariable(
"bh_mean_necl", bh_mean_necl);
1018 mon_bhabha->setVariable(
"bh_mean_electronid", bh_mean_electronid);
1019 mon_bhabha->setVariable(
"bh_mean_d0", bh_mean_d0);
1020 mon_bhabha->setVariable(
"bh_mean_z0", bh_mean_z0);
1021 mon_bhabha->setVariable(
"bh_mean_pval", bh_mean_pval);
1022 mon_bhabha->setVariable(
"bh_mean_ndf", bh_mean_ndf);
1023 mon_bhabha->setVariable(
"bh_dif_ndf_ncdc", bh_dif_ndf_ncdc);
1024 mon_bhabha->setVariable(
"bh_mean_dd0", bh_mean_dd0);
1025 mon_bhabha->setVariable(
"bh_mean_dz0", bh_mean_dz0);
1026 mon_bhabha->setVariable(
"bh_mean_dpt", bh_mean_dpt);
1027 mon_bhabha->setVariable(
"bh_rms_dd0", bh_rms_dd0);
1028 mon_bhabha->setVariable(
"bh_rms_dz0", bh_rms_dz0);
1029 mon_bhabha->setVariable(
"bh_rms_dpt", bh_rms_dpt);
1030 mon_bhabha->setVariable(
"bh_sigma68_dd0", bh_sigma68_dd0);
1031 mon_bhabha->setVariable(
"bh_sigma68_dz0", bh_sigma68_dz0);
1032 mon_bhabha->setVariable(
"bh_sigma68_dpt", bh_sigma68_dpt);
1033 mon_bhabha->setVariable(
"bh_neve_bhabha", bh_neve_bhabha);
1034 mon_bhabha->setVariable(
"bh_neve_bhabha_sign", bh_neve_bhabha_sign);
1035 mon_bhabha->setVariable(
"bh_goode_frac", bh_goode_frac);
1036 mon_bhabha->setVariable(
"bh_goode_o_bade", bh_goode_o_bade);
1037 mon_bhabha->setVariable(
"bh_pval_frac_0", bh_pval_frac_0);
1038 mon_bhabha->setVariable(
"bh_pval_frac_1", bh_pval_frac_1);
1039 mon_bhabha->setVariable(
"bh_nocdc_frac", bh_nocdc_frac);
1040 mon_bhabha->setVariable(
"bh_notop_frac", bh_notop_frac);
1041 mon_bhabha->setVariable(
"bh_noarich_frac", bh_noarich_frac);
1042
1043
1044 auto* histhad_nECLClusters =
findHist(
"PhysicsObjectsMiraBelleHadron/hist_nECLClusters");
1045 auto* histhad_visibleEnergyCMSnorm =
findHist(
"PhysicsObjectsMiraBelleHadron/hist_visibleEnergyCMSnorm");
1046 auto* histhad_EsumCMSnorm =
findHist(
"PhysicsObjectsMiraBelleHadron/hist_EsumCMSnorm");
1047 auto* histhad_R2 =
findHist(
"PhysicsObjectsMiraBelleHadron/hist_R2");
1048 auto* histhad_physicsresultsH =
findHist(
"PhysicsObjectsMiraBelleHadron/hist_physicsresultsH");
1049
1050 if (histhad_nECLClusters == nullptr) {
1051 B2ERROR("Can not find the histhad_nECLClusters histogram!");
1052 return;
1053 }
1054 if (histhad_visibleEnergyCMSnorm == nullptr) {
1055 B2ERROR("Can not find the histhad_visibleEnergyCMSnorm histogram!");
1056 return;
1057 }
1058 if (histhad_EsumCMSnorm == nullptr) {
1059 B2ERROR("Can not find the histhad_EsumCMSnorm histogram!");
1060 return;
1061 }
1062 if (histhad_R2 == nullptr) {
1063 B2ERROR("Can not find the histhad_R2 histogram!");
1064 return;
1065 }
1066 if (histhad_physicsresultsH == nullptr) {
1067 B2ERROR("Can not find the histhad_physicsresultsH histogram!");
1068 return;
1069 }
1070
1071
1072
1075 hadron_main->cd(2); histhad_visibleEnergyCMSnorm->Draw();
1078
1079 double had_ntot = histhad_physicsresultsH->GetBinContent(3);
1080 double ratio_hadron_bhabha = 0.;
1081
1082 double ratio_pull_hadBhabha = -10.;
1083 double error_ratio = -10.;
1084 if (bh_ntot != 0) {
1085 ratio_hadron_bhabha = had_ntot / bh_neve_bhabha;
1086
1087 error_ratio = ratio_hadron_bhabha *
sqrt((1 / had_ntot) + (1 / bh_neve_bhabha));
1088 ratio_pull_hadBhabha = (ratio_hadron_bhabha -
m_reference_hadb) / error_ratio;
1089 }
1090
1091 mon_bhabha->setVariable(
"had_ntot", had_ntot);
1092 mon_hadron->setVariable(
"ratio_hadron_bhabha", ratio_hadron_bhabha);
1093 mon_hadron->setVariable(
"error_ratio", error_ratio);
1094 mon_hadron->setVariable(
"ratio_pull_hadBhabha", ratio_pull_hadBhabha);
1095
1096 B2DEBUG(20, "DQMHistAnalysisMiraBelle : endRun called");
1097}
TCanvas * dst_k_val
TCanvas object for PID distributions of K.
TCanvas * bhabha_main
TCanvas object for main display.
TCanvas * hadron_main
TCanvas object for main display.
TCanvas * bhabha_resolution
TCanvas object for resolution display.
TCanvas * mumu_resolution
TCanvas object for resolution display.
Belle2::MonitoringObject * mon_bhabha
MonitoringObject for bhabha events.
TCanvas * dst_pi_val
TCanvas object for PID distributions of pi.
Belle2::MonitoringObject * mon_dst
MonitoringObject for D* events.
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.
TCanvas * dst_mass
TCanvas object for D0 mass, delta mass, and pi0 mass.
Belle2::MonitoringObject * mon_hadron
MonitoringObject for hadronb2 tight events.
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.
double sqrt(double a)
sqrt for double