166 B2WARNING(
"Tracks array not available, but required to estimate the trigger efficiency");
170 B2WARNING(
"ECLClusters array not available, but required to estimate the trigger efficiency");
174 B2WARNING(
"KLMClusters array not available, but required to estimate the trigger efficiency");
178 B2WARNING(
"TRGSummary object not available but required to estimate the trigger efficiency");
182 B2WARNING(
"SoftwareTriggerResult object not available but required to get the HLT result");
186 bool hltAccepted =
false;
192 }
catch (
const std::out_of_range&) {
197 if (not hltAccepted) {
198 B2WARNING(
"TRGEfficiencyDQMModule: Event rejected by the HLT filter, skipping the module");
207 double E_ecl_all = 0;
208 double E_ecl_hie = 0;
210 bool trg_hie_psncdc = 0;
211 bool trg_hie_Eecl = 0;
212 bool trg_ecltiming_psncdc = 0;
213 bool trg_ecltiming_Eecl = 0;
214 bool trg_nobha_hie_Eecl = 0;
220 const double phi = b2eclcluster.getPhi() /
Unit::deg;
221 const double theta = b2eclcluster.getTheta() /
Unit::deg;
222 const double energy = b2eclcluster.getEnergyRaw();
224 if (energy < 0.1)
continue;
228 if (theta >= 22.49 && theta <= 126.8) {
234 const bool trg_hie_nobha =
m_TrgSummary->testInput(
"ehigh");
235 const bool trg_ecltiming =
m_TrgSummary->testFtdl(
"ecltiming");
237 m_ecltiming_theta->Fill(theta);
238 m_ecltiming_phi->Fill(phi);
242 trg_ecltiming_psncdc = 1;
244 m_ecltiming_theta_psnecl->Fill(theta);
245 m_ecltiming_phi_psnecl->Fill(phi);
248 if (trg_psncdc && trg_hie) {
251 if (trg_psncdc && trg_hie_nobha) {
252 trg_nobha_hie_Eecl = 1;
254 if (trg_psncdc && trg_ecltiming) {
255 trg_ecltiming_Eecl = 1;
257 m_ecltiming_theta_psnecl_ftdf->Fill(theta);
258 m_ecltiming_phi_psnecl_ftdf->Fill(phi);
263 m_hie_E->Fill(E_ecl_hie);
264 m_nobha_hie_E->Fill(E_ecl_hie);
265 if (trg_hie_psncdc) {
266 m_hie_E_psnecl->Fill(E_ecl_hie);
267 m_nobha_hie_E_psnecl->Fill(E_ecl_hie);
270 m_hie_E_psnecl_ftdf->Fill(E_ecl_hie);
272 if (trg_nobha_hie_Eecl) {
273 m_nobha_hie_E_psnecl_ftdf->Fill(E_ecl_hie);
276 m_ecltiming_E->Fill(E_ecl_all);
277 if (trg_ecltiming_psncdc) {
278 m_ecltiming_E_psnecl->Fill(E_ecl_all);
280 if (trg_ecltiming_Eecl) {
281 m_ecltiming_E_psnecl_ftdf->Fill(E_ecl_all);
288 const int nlayer = b2klmcluster.getLayers();
293 const double phi = b2klmcluster.getMomentum().Phi() /
Unit::deg;
294 const double theta = b2klmcluster.getMomentum().Theta() /
Unit::deg;
303 }
catch (
const std::exception&) {
306 const bool trg_klmhit =
m_TrgSummary->testFtdl(
"klmhit");
307 const bool trg_eklmhit =
m_TrgSummary->testFtdl(
"eklmhit");
309 m_klmhit_phi->Fill(phi);
310 m_klmhit_theta->Fill(theta);
311 m_eklmhit_phi->Fill(phi);
312 m_eklmhit_theta->Fill(theta);
315 m_klmhit_theta_psnecl->Fill(theta);
316 m_eklmhit_theta_psnecl->Fill(theta);
318 if (trg_KLMecl && trg_klmhit) {
319 m_klmhit_theta_psnecl_ftdf->Fill(theta);
321 if (trg_KLMecl && trg_eklmhit) {
322 m_eklmhit_theta_psnecl_ftdf->Fill(theta);
326 if (trg_KLMecl && theta > 50 && theta < 120) {
327 m_klmhit_phi_psnecl->Fill(phi);
329 if (trg_KLMecl && ((theta > 20 && theta < 40) || (theta > 120 && theta < 160))) {
330 m_eklmhit_phi_psnecl->Fill(phi);
332 if (trg_KLMecl && trg_klmhit && theta > 50 && theta < 120) {
333 m_klmhit_phi_psnecl_ftdf->Fill(phi);
335 if (trg_KLMecl && trg_eklmhit && ((theta > 20 && theta < 40) || (theta > 120 && theta < 160))) {
336 m_eklmhit_phi_psnecl_ftdf->Fill(phi);
344 std::vector<double> p_stt_P3_psnecl_ftdf, p_stt_P3_psnecl, p_stt_P3, phi_fyo_dphi, phi_fyo_dphi_psnecl, phi_fyo_dphi_psnecl_ftdf ;
346 std::vector<double> p_nobha_stt_P3_psnecl_ftdf, p_nobha_stt_P3_psnecl, p_nobha_stt_P3, phi_nobha_fyo_dphi,
347 phi_nobha_fyo_dphi_psnecl,
348 phi_nobha_fyo_dphi_psnecl_ftdf ;
351 for (
const auto& b2track :
m_Tracks) {
354 B2WARNING(
"No track fit result found.");
360 const int ndf = fitresult->
getNDF();
381 }
catch (
const std::exception&) {
408 const bool trg_stt_nobha =
m_TrgSummary->testInput(
"typ") ;
416 if (trg_psnecl && trg_ftdf) {
422 m_nobha_hPt->Fill(pt);
423 m_nobha_f_phi->Fill(phi);
428 m_nobha_hP3_z->Fill(p3);
429 m_nobha_hP3_y->Fill(p3);
431 m_nobha_phi_z->Fill(phi);
432 m_nobha_phi_y->Fill(phi);
434 m_stt_theta->Fill(theta);
435 m_stt_phi->Fill(phi);
436 p_stt_P3.push_back(p3);
438 m_nobha_stt_theta->Fill(theta);
439 m_nobha_stt_phi->Fill(phi);
440 p_nobha_stt_P3.push_back(p3);
444 m_hPt_psnecl->Fill(pt);
445 m_nobha_hPt_psnecl->Fill(pt);
446 m_nobha_f_phi_psnecl->Fill(phi);
448 m_hP3_z_psnecl->Fill(p3);
449 m_hP3_y_psnecl->Fill(p3);
451 m_nobha_hP3_z_psnecl->Fill(p3);
452 m_nobha_hP3_y_psnecl->Fill(p3);
454 m_nobha_phi_z_psnecl->Fill(phi);
455 m_nobha_phi_y_psnecl->Fill(phi);
457 m_stt_phi_psnecl->Fill(phi);
458 p_stt_P3_psnecl.push_back(p3);
459 m_stt_theta_psnecl->Fill(theta);
461 m_nobha_stt_phi_psnecl->Fill(phi);
462 p_nobha_stt_P3_psnecl.push_back(p3);
463 m_nobha_stt_theta_psnecl->Fill(theta);
466 if (trg_psnecl && trg_ftdf) {
467 m_hPt_psnecl_ftdf->Fill(pt);
469 if (trg_psnecl && trg_itdt2) {
470 m_nobha_hPt_psnecl_ftdf->Fill(pt);
471 m_nobha_f_phi_psnecl_ftdf->Fill(phi);
474 if (trg_psnecl && trg_ftdz) {
475 m_hP3_z_psnecl_ftdf->Fill(p3);
477 if (trg_psnecl && trg_ftdy) {
478 m_hP3_y_psnecl_ftdf->Fill(p3);
480 if (trg_psnecl && trg_itdt3) {
481 m_nobha_hP3_z_psnecl_ftdf->Fill(p3);
482 m_nobha_phi_z_psnecl_ftdf->Fill(phi);
484 if (trg_psnecl && trg_itdt4) {
485 m_nobha_hP3_y_psnecl_ftdf->Fill(p3);
486 m_nobha_phi_y_psnecl_ftdf->Fill(phi);
489 if (trg_psnecl && trg_stt) {
490 m_stt_phi_psnecl_ftdf->Fill(phi);
491 p_stt_P3_psnecl_ftdf.push_back(p3);
492 m_stt_theta_psnecl_ftdf->Fill(theta);
494 if (trg_psnecl && trg_stt_nobha) {
495 m_nobha_stt_phi_psnecl_ftdf->Fill(phi);
496 p_nobha_stt_P3_psnecl_ftdf.push_back(p3);
497 m_nobha_stt_theta_psnecl_ftdf->Fill(theta);
502 for (
const auto& j_b2track :
m_Tracks) {
503 if (nitrack >= njtrack) {
510 B2WARNING(
"No track fit result found.");
516 int jndf = jfitresult->
getNDF();
526 const double delta_phi = std::abs(phi - jrk_phi);
527 const double dphi = (delta_phi > 180) ? 360 - delta_phi : delta_phi;
538 phi_fyo_dphi.push_back(dphi);
539 phi_nobha_fyo_dphi.push_back(dphi);
542 phi_fyo_dphi_psnecl.push_back(dphi);
543 phi_nobha_fyo_dphi_psnecl.push_back(dphi);
545 if (trg_psnecl && trg_fyo) {
546 phi_fyo_dphi_psnecl_ftdf.push_back(dphi);
548 if (trg_psnecl && trg_fyo_nobha) {
549 phi_nobha_fyo_dphi_psnecl_ftdf.push_back(dphi);
559 if (phi_fyo_dphi_psnecl_ftdf.size() != 0) {
560 const auto max_it = std::max_element(phi_fyo_dphi_psnecl_ftdf.begin(), phi_fyo_dphi_psnecl_ftdf.end());
561 const double max_value = *max_it;
562 m_fyo_dphi_psnecl_ftdf->Fill(max_value);
564 if (phi_fyo_dphi_psnecl.size() != 0) {
565 const auto max_it = std::max_element(phi_fyo_dphi_psnecl.begin(), phi_fyo_dphi_psnecl.end());
566 const double max_value = *max_it;
567 m_fyo_dphi_psnecl->Fill(max_value);
569 if (phi_fyo_dphi.size() != 0) {
570 const auto max_it = std::max_element(phi_fyo_dphi.begin(), phi_fyo_dphi.end());
571 const double max_value = *max_it;
572 m_fyo_dphi->Fill(max_value);
576 if (phi_nobha_fyo_dphi_psnecl_ftdf.size() != 0) {
577 const auto max_it = std::max_element(phi_nobha_fyo_dphi_psnecl_ftdf.begin(), phi_nobha_fyo_dphi_psnecl_ftdf.end());
578 const double max_value = *max_it;
579 m_nobha_fyo_dphi_psnecl_ftdf->Fill(max_value);
581 if (phi_nobha_fyo_dphi_psnecl.size() != 0) {
582 const auto max_it = std::max_element(phi_nobha_fyo_dphi_psnecl.begin(), phi_nobha_fyo_dphi_psnecl.end());
583 const double max_value = *max_it;
584 m_nobha_fyo_dphi_psnecl->Fill(max_value);
586 if (phi_nobha_fyo_dphi.size() != 0) {
587 const auto max_it = std::max_element(phi_nobha_fyo_dphi.begin(), phi_nobha_fyo_dphi.end());
588 const double max_value = *max_it;
589 m_nobha_fyo_dphi->Fill(max_value);
593 if (p_stt_P3_psnecl_ftdf.size() != 0) {
594 const auto max_it = std::max_element(p_stt_P3_psnecl_ftdf.begin(), p_stt_P3_psnecl_ftdf.end());
595 const double max_value = *max_it;
596 m_stt_P3_psnecl_ftdf->Fill(max_value);
598 if (p_stt_P3_psnecl.size() != 0) {
599 const auto max_it = std::max_element(p_stt_P3_psnecl.begin(), p_stt_P3_psnecl.end());
600 const double max_value = *max_it;
601 m_stt_P3_psnecl->Fill(max_value);
603 if (p_stt_P3.size() != 0) {
604 const auto max_it = std::max_element(p_stt_P3.begin(), p_stt_P3.end());
605 const double max_value = *max_it;
606 m_stt_P3->Fill(max_value);
610 if (p_nobha_stt_P3_psnecl_ftdf.size() != 0) {
611 const auto max_it = std::max_element(p_nobha_stt_P3_psnecl_ftdf.begin(), p_nobha_stt_P3_psnecl_ftdf.end());
612 const double max_value = *max_it;
613 m_nobha_stt_P3_psnecl_ftdf->Fill(max_value);
615 if (p_nobha_stt_P3_psnecl.size() != 0) {
616 const auto max_it = std::max_element(p_nobha_stt_P3_psnecl.begin(), p_nobha_stt_P3_psnecl.end());
617 const double max_value = *max_it;
618 m_nobha_stt_P3_psnecl->Fill(max_value);
620 if (p_nobha_stt_P3.size() != 0) {
621 const auto max_it = std::max_element(p_nobha_stt_P3.begin(), p_nobha_stt_P3.end());
622 const double max_value = *max_it;
623 m_nobha_stt_P3->Fill(max_value);