64 if(
m_trigDecTool->ExperimentalAndExpertMethods().isHLTTruncated()){
66 return StatusCode::SUCCESS;
78 if (! hlt_electron_cont.
isValid() ) {
83 if (! hlt_muon_cont.
isValid() ) {
89 if (! hlt_topoclusters_cont.
isValid() ) {
95 if (! hlt_tracks_cont.
isValid() ) {
101 if (! hlt_vertex_cont.
isValid() ) {
106 if (! offline_vertex_cont.
isValid() ) {
112 if (! offline_met_cont.
isValid() ) {
117 std::optional<SG::ReadHandle<xAOD::EnergySumRoI>> l1_roi_cont_rh;
121 if (l1_roi_cont_rh->isValid()) l1_roi_cont = l1_roi_cont_rh->cptr();
126 if (! l1_jFexMet_cont.
isValid() ) {
130 if (! l1_jFexSumEt_cont.
isValid() ) {
134 if (! l1_gFexJwojScalar_cont.
isValid() ) {
138 if (! l1_gFexJwojMETComponents_cont.
isValid() ) {
142 if (! l1_gFexJwojMHTComponents_cont.
isValid() ) {
146 if (! l1_gFexJwojMSTComponents_cont.
isValid() ) {
150 if (! l1_gFexNCMETScalar_cont.
isValid() ) {
154 if (! l1_gFexNCMETComponents_cont.
isValid() ) {
158 if (! l1_gFexRhoMETScalar_cont.
isValid() ) {
162 if (! l1_gFexRhoMETComponents_cont.
isValid() ) {
168 if (! hlt_cell_met_cont.
isValid() ) {
173 if (! hlt_mht_met_cont.
isValid() ) {
178 if (! hlt_tc_met_cont.
isValid() ) {
183 if (! hlt_tc_em_met_cont.
isValid() ) {
188 if (! hlt_tcpufit_met_cont.
isValid() ) {
193 if (! hlt_tcpufit_sig30_met_cont.
isValid() ) {
198 if (! hlt_trkmht_met_cont.
isValid() ) {
203 if (! hlt_pfsum_met_cont.
isValid() ) {
208 if (! hlt_pfsum_cssk_met_cont.
isValid() ) {
213 if (! hlt_pfsum_vssk_met_cont.
isValid() ) {
218 if (! hlt_pfopufit_met_cont.
isValid() ) {
223 if (! hlt_pfopufit_sig30_met_cont.
isValid() ) {
228 if (! hlt_cvfpufit_met_cont.
isValid() ) {
233 if (! hlt_mhtpufit_pf_met_cont.
isValid() ) {
238 if (! hlt_mhtpufit_em_met_cont.
isValid() ) {
243 if (! hlt_met_nn_cont.
isValid() ) {
288 double epsilon = 1.189;
293 auto tool =
getGroup(
"TrigMETMonitor");
296 act_IPBC = eventInfo->actualInteractionsPerCrossing();
300 bool passedPrimaryEl =
false;
303 passedPrimaryEl =
true;
307 if ( hlt_electron_cont.
isValid() && passedPrimaryEl ){
308 hlt_el_mult = hlt_electron_cont->size();
309 fill(tool,hlt_el_mult);
310 if( hlt_electron_cont->size() > 0 ) {
311 for (
auto Electron: *hlt_electron_cont) {
312 hlt_el_pt =
Electron->pt()/Gaudi::Units::GeV;
313 fill(tool, hlt_el_pt);
319 bool passedPrimaryMu =
false;
322 passedPrimaryMu =
true;
326 if( hlt_muon_cont.
isValid() &&passedPrimaryMu ){
327 hlt_mu_mult = hlt_muon_cont->size();
328 fill(tool,hlt_mu_mult);
329 if ( hlt_muon_cont->size() > 0 ){
330 for(
auto Muon : *hlt_muon_cont){
331 hlt_mu_pt =
Muon->pt()/Gaudi::Units::GeV;
332 fill(tool, hlt_mu_pt);
338 if(hlt_topoclusters_cont.
isValid() && hlt_topoclusters_cont->size() > 0){
339 hlt_topoclusters_mult = hlt_topoclusters_cont->size();
340 for(
auto topoclusters : *hlt_topoclusters_cont){
341 hlt_topoclusters_pt = topoclusters->pt()/Gaudi::Units::GeV;
342 if(hlt_topoclusters_pt > 0){
343 fill(tool, hlt_topoclusters_pt);
347 if(hlt_topoclusters_mult > 0){
348 fill(tool, hlt_topoclusters_mult);
353 if( hlt_tracks_cont.
isValid() && hlt_tracks_cont->size() > 0){
354 hlt_tracks_mult = hlt_tracks_cont->size();
355 float scalarSumPt = 0.0;
356 float scalarSumPx = 0.0;
357 float scalarSumPy = 0.0;
358 for(
auto tracks : *hlt_tracks_cont){
359 float i_track_pt = tracks->pt()/Gaudi::Units::GeV;
360 hlt_tracks_pt = i_track_pt;
361 scalarSumPt += i_track_pt;
362 scalarSumPx += (tracks->p4().Px());
363 scalarSumPy += (tracks->p4().Py());
365 if(hlt_tracks_pt > hlt_tracks_leading_pt){
366 hlt_tracks_leading_pt = i_track_pt;
369 if(hlt_tracks_pt > 0){
370 fill(tool, hlt_tracks_pt);
373 if(hlt_tracks_pt > 3){
374 hlt_tracks_eta = (tracks->eta());
375 hlt_tracks_phi = (tracks->phi());
376 fill(tool, hlt_tracks_eta, hlt_tracks_phi);
380 hlt_tracks_vec_sumPt = std::sqrt(scalarSumPx*scalarSumPx + scalarSumPy*scalarSumPy)/Gaudi::Units::GeV;
381 hlt_tracks_sca_sumPt = scalarSumPt;
383 fill(tool, hlt_tracks_mult, hlt_tracks_leading_pt, hlt_tracks_vec_sumPt, hlt_tracks_sca_sumPt);
387 if(hlt_vertex_cont.
isValid() && hlt_vertex_cont->size() > 0){
388 hlt_vertex_mult = hlt_vertex_cont->size();
389 hlt_vertex_mult_mu = hlt_vertex_cont->size();
391 for(
auto vertex : *hlt_vertex_cont){
399 hlt_vertex_z = hlt_vertex->
z();
400 fill(tool, hlt_vertex_z);
402 if(offline_vertex_cont.
isValid() && offline_vertex_cont->size() > 0){
404 for(
auto vertex : *offline_vertex_cont){
406 offline_vertex = vertex;
412 hlt_vertex_z_diff = hlt_vertex_z - offline_vertex->
z();
413 fill(tool, hlt_vertex_z_diff);
418 hlt_vertex_mult = -1;
419 hlt_vertex_mult_mu = 1;
422 fill(tool, hlt_vertex_mult);
423 fill(tool, act_IPBC, hlt_vertex_mult_mu);
428 if ( offline_met_cont.
isValid() && offline_met_cont->size() > 0 ) {
429 finalTrkMET = ((*offline_met_cont)[
"FinalTrk"]);
430 muonsMET = ((*offline_met_cont)[
"Muons"]);
433 offline_Ex = - finalTrkMET->
mpx()/Gaudi::Units::GeV;
434 offline_Ey = - finalTrkMET->
mpy()/Gaudi::Units::GeV;
435 offline_sumEt = finalTrkMET->
sumet()/Gaudi::Units::GeV;
436 offline_Et = std::sqrt(offline_Ex*offline_Ex + offline_Ey*offline_Ey);
437 offline_Et_eff = std::sqrt(offline_Ex*offline_Ex + offline_Ey*offline_Ey);
438 fill(tool,offline_Ex,offline_Ey,offline_Et,offline_sumEt);
442 offline_NoMu_Ex = - finalTrkNoMuMET.
mpx()/Gaudi::Units::GeV;
443 offline_NoMu_Ey = - finalTrkNoMuMET.
mpy()/Gaudi::Units::GeV;
444 offline_NoMu_sumEt = finalTrkNoMuMET.
sumet()/Gaudi::Units::GeV;
445 offline_NoMu_Et = std::sqrt(offline_NoMu_Ex*offline_NoMu_Ex + offline_NoMu_Ey*offline_NoMu_Ey);
446 offline_NoMu_Et_eff = std::sqrt(offline_NoMu_Ex*offline_NoMu_Ex + offline_NoMu_Ey*offline_NoMu_Ey);
447 fill(tool,offline_NoMu_Ex,offline_NoMu_Ey,offline_NoMu_Et,offline_NoMu_sumEt);
453 for (
const std::string& alg :
m_algsL1) {
454 if (alg ==
"roi" && l1_roi_cont !=
nullptr) {
456 if ((l1_roi_cont->
energyX())>-9e12 && (l1_roi_cont->
energyX())<9e12 && (l1_roi_cont->
energyY())>-9e12 && (l1_roi_cont->
energyY())<9e12) {
457 float L1_met_Ex = - l1_roi_cont->
energyX()/Gaudi::Units::GeV;
458 float L1_met_Ey = - l1_roi_cont->
energyY()/Gaudi::Units::GeV;
459 float L1_met_Et = std::sqrt(L1_met_Ex*L1_met_Ex + L1_met_Ey*L1_met_Ey);
460 float L1_met_sumEt = l1_roi_cont->
energyT()/Gaudi::Units::GeV;
461 float L1_met_Ex_log =
signed_log(L1_met_Ex, epsilon);
462 float L1_met_Ey_log =
signed_log(L1_met_Ey, epsilon);
463 float L1_met_Et_log =
signed_log(L1_met_Et, epsilon);
464 float L1_met_sumEt_log =
signed_log(L1_met_sumEt, epsilon);
465 TVector3 v(L1_met_Ex, L1_met_Ey, 0.0);
466 float L1_met_phi = v.Phi();
477 fill(tool, L1_Ex, L1_Ey, L1_Et, L1_sumEt,
478 L1_Ex_log, L1_Ey_log, L1_Et_log, L1_sumEt_log, L1_phi);
484 if (l1_jFexMet_cont.
isValid() && l1_jFexMet_cont->size() > 0) {
487 for (
const auto l1_jmet: *l1_jFexMet_cont) {
488 L1_met_Ex += l1_jmet->Ex()/Gaudi::Units::GeV;
489 L1_met_Ey += l1_jmet->Ey()/Gaudi::Units::GeV;
491 float L1_met_Et = std::sqrt(L1_met_Ex*L1_met_Ex + L1_met_Ey*L1_met_Ey);
492 float L1_met_Ex_log =
signed_log(L1_met_Ex, epsilon);
493 float L1_met_Ey_log =
signed_log(L1_met_Ey, epsilon);
494 float L1_met_Et_log =
signed_log(L1_met_Et, epsilon);
495 TVector3 v(L1_met_Ex, L1_met_Ey, 0.0);
496 float L1_met_phi = v.Phi();
504 fill(tool, L1_Ex, L1_Ey, L1_Et, L1_Ex_log, L1_Ey_log, L1_Et_log, L1_phi);
506 if (l1_jFexSumEt_cont.
isValid() && l1_jFexSumEt_cont->size() > 0) {
507 float L1_met_sumEt = 0;
508 for (
const auto l1_jsumEt: *l1_jFexSumEt_cont) {
509 L1_met_sumEt += l1_jsumEt->Et_lower()/Gaudi::Units::GeV + l1_jsumEt->Et_upper()/Gaudi::Units::GeV;
511 float L1_met_sumEt_log =
signed_log(L1_met_sumEt, epsilon);
514 fill(tool, L1_sumEt, L1_sumEt_log);
522 if (l1_gFexJwojScalar_cont.
isValid() && l1_gFexJwojScalar_cont->size() > 0) {
523 l1_gmet = l1_gFexJwojScalar_cont->at(0);
526 float L1_met_Et_log =
signed_log(L1_met_Et, epsilon);
527 float L1_met_sumEt_log =
signed_log(L1_met_sumEt, epsilon);
532 fill(tool, L1_Et, L1_Et_log, L1_sumEt, L1_sumEt_log);
535 if (l1_gFexJwojMETComponents_cont.
isValid() && l1_gFexJwojMETComponents_cont->size() > 0) {
536 l1_gmet = l1_gFexJwojMETComponents_cont->at(0);
538 float L1_met_Ex_log =
signed_log(L1_met_Ex, epsilon);
540 float L1_met_Ey_log =
signed_log(L1_met_Ey, epsilon);
541 TVector3 v(L1_met_Ex, L1_met_Ey, 0.0);
542 float L1_met_phi = v.Phi();
548 fill(tool, L1_Ex, L1_Ey, L1_Ex_log, L1_Ey_log, L1_phi);
551 if (l1_gFexJwojMHTComponents_cont.
isValid() && l1_gFexJwojMHTComponents_cont->size() > 0) {
552 l1_gmet = l1_gFexJwojMHTComponents_cont->at(0);
554 float L1_met_HT_Ex_log =
signed_log(L1_met_HT_Ex, epsilon);
556 float L1_met_HT_Ey_log =
signed_log(L1_met_HT_Ey, epsilon);
557 TVector3 v(L1_met_HT_Ex, L1_met_HT_Ey, 0.0);
558 float L1_met_HT_phi = v.Phi();
564 fill(tool, L1_HT_Ex, L1_HT_Ey, L1_HT_Ex_log, L1_HT_Ey_log, L1_HT_phi);
567 if (l1_gFexJwojMSTComponents_cont.
isValid() && l1_gFexJwojMSTComponents_cont->size() > 0) {
568 l1_gmet = l1_gFexJwojMSTComponents_cont->at(0);
570 float L1_met_ST_Ex_log =
signed_log(L1_met_ST_Ex, epsilon);
572 float L1_met_ST_Ey_log =
signed_log(L1_met_ST_Ey, epsilon);
573 TVector3 v(L1_met_ST_Ex, L1_met_ST_Ey, 0.0);
574 float L1_met_ST_phi = v.Phi();
580 fill(tool, L1_ST_Ex, L1_ST_Ey, L1_ST_Ex_log, L1_ST_Ey_log, L1_ST_phi);
583 if (l1_gFexNCMETScalar_cont.
isValid() && l1_gFexNCMETScalar_cont->size() > 0) {
584 l1_gmet = l1_gFexNCMETScalar_cont->at(0);
587 float L1_met_Et_log =
signed_log(L1_met_Et, epsilon);
588 float L1_met_sumEt_log =
signed_log(L1_met_sumEt, epsilon);
593 fill(tool, L1_Et, L1_Et_log, L1_sumEt, L1_sumEt_log);
596 if (l1_gFexNCMETComponents_cont.
isValid() && l1_gFexNCMETComponents_cont->size() > 0) {
597 l1_gmet = l1_gFexNCMETComponents_cont->at(0);
599 float L1_met_Ex_log =
signed_log(L1_met_Ex, epsilon);
601 float L1_met_Ey_log =
signed_log(L1_met_Ey, epsilon);
602 TVector3 v(L1_met_Ex, L1_met_Ey, 0.0);
603 float L1_met_phi = v.Phi();
609 fill(tool, L1_Ex, L1_Ey, L1_Ex_log, L1_Ey_log, L1_phi);
612 if (l1_gFexRhoMETScalar_cont.
isValid() && l1_gFexRhoMETScalar_cont->size() > 0) {
613 l1_gmet = l1_gFexRhoMETScalar_cont->at(0);
616 float L1_met_Et_log =
signed_log(L1_met_Et, epsilon);
617 float L1_met_sumEt_log =
signed_log(L1_met_sumEt, epsilon);
622 fill(tool, L1_Et, L1_Et_log, L1_sumEt, L1_sumEt_log);
625 if (l1_gFexRhoMETComponents_cont.
isValid() && l1_gFexRhoMETComponents_cont->size() > 0) {
626 l1_gmet = l1_gFexRhoMETComponents_cont->at(0);
628 float L1_met_Ex_log =
signed_log(L1_met_Ex, epsilon);
630 float L1_met_Ey_log =
signed_log(L1_met_Ey, epsilon);
631 TVector3 v(L1_met_Ex, L1_met_Ey, 0.0);
632 float L1_met_phi = v.Phi();
638 fill(tool, L1_Ex, L1_Ey, L1_Ex_log, L1_Ey_log, L1_phi);
647 if ( hlt_cell_met_cont.
isValid() && hlt_cell_met_cont->size() > 0 ) {
648 hlt_met = hlt_cell_met_cont->at(0);
649 for (
int j=0; j<nStatus; ++j) {
650 unsigned mask = (1u<<j);
651 if (hlt_met->
flag() & mask) {
657 fill(tool,mon1,MET_status);
660 for (
int i=0; i<nComponent; ++i) {
661 float ex = hlt_met->
exComponent(i)/Gaudi::Units::GeV;
662 float ey = hlt_met->
eyComponent(i)/Gaudi::Units::GeV;
663 component_Et = sqrt(ex*ex+ey*ey);
665 fill(tool,mon2,component_Et);
668 for (
int i=0; i<nComponent; ++i) {
669 for (
int j=0; j<nStatus; ++j) {
670 unsigned mask = (1u<<j);
672 component_status_weight = 1.;
674 component_status_weight = 0;
678 fill(tool,mon_comp,mon_bit,component_status_weight);
684 float L1_roiMet_Et = 0;
685 if ( l1_roi_cont !=
nullptr ) {
686 if ((l1_roi_cont->
energyX())>-9e12 && (l1_roi_cont->
energyX())<9e12 && (l1_roi_cont->
energyY())>-9e12 && (l1_roi_cont->
energyY())<9e12) {
687 float Ex = - l1_roi_cont->
energyX()/Gaudi::Units::GeV;
688 float Ey = - l1_roi_cont->
energyY()/Gaudi::Units::GeV;
689 L1_roiMet_Et = std::sqrt(Ex*Ex + Ey*Ey);
692 float L1_jFexMet_Et = 0;
693 if (l1_jFexMet_cont.
isValid() && l1_jFexMet_cont->size() > 0) {
696 for (
const auto l1_jmet: *l1_jFexMet_cont) {
697 L1_met_Ex += l1_jmet->Ex()/Gaudi::Units::GeV;
698 L1_met_Ey += l1_jmet->Ey()/Gaudi::Units::GeV;
700 L1_jFexMet_Et = std::sqrt(L1_met_Ex*L1_met_Ex + L1_met_Ey*L1_met_Ey);
702 float L1_gFexJWOJMet_Et = 0;
704 float L1_PreSelMet_Et = L1_roiMet_Et;
705 if (
m_L1MetAlg == 1) L1_PreSelMet_Et = L1_jFexMet_Et;
706 if (
m_L1MetAlg == 2) L1_PreSelMet_Et = L1_gFexJWOJMet_Et;
709 for (
const std::string& alg :
m_algsHLT) {
710 if (alg ==
"cell" && hlt_cell_met_cont.
isValid() && hlt_cell_met_cont->size() > 0) {
711 hlt_met = hlt_cell_met_cont->at(0);
712 }
else if (alg ==
"mht" && hlt_mht_met_cont.
isValid() && hlt_mht_met_cont->size() > 0) {
713 hlt_met = hlt_mht_met_cont->at(0);
714 }
else if (alg ==
"tc" && hlt_tc_met_cont.
isValid() && hlt_tc_met_cont->size() > 0) {
715 hlt_met = hlt_tc_met_cont->at(0);
716 }
else if (alg ==
"tc_em" && hlt_tc_em_met_cont.
isValid() && hlt_tc_em_met_cont->size() > 0) {
717 hlt_met = hlt_tc_em_met_cont->at(0);
718 }
else if (alg ==
"tcpufit" && hlt_tcpufit_met_cont.
isValid() && hlt_tcpufit_met_cont->size() > 0) {
719 hlt_met = hlt_tcpufit_met_cont->at(0);
720 }
else if (alg ==
"tcpufit_sig30" && hlt_tcpufit_sig30_met_cont.
isValid() && hlt_tcpufit_sig30_met_cont->size() > 0) {
721 hlt_met = hlt_tcpufit_sig30_met_cont->at(0);
722 }
else if (alg ==
"trkmht" && hlt_trkmht_met_cont.
isValid() && hlt_trkmht_met_cont->size() > 0) {
723 hlt_met = hlt_trkmht_met_cont->at(0);
724 }
else if (alg ==
"pfsum" && hlt_pfsum_met_cont.
isValid() && hlt_pfsum_met_cont->size() > 0) {
725 hlt_met = hlt_pfsum_met_cont->at(0);
726 }
else if (alg ==
"pfsum_cssk" && hlt_pfsum_cssk_met_cont.
isValid() && hlt_pfsum_cssk_met_cont->size() > 0) {
727 hlt_met = hlt_pfsum_cssk_met_cont->at(0);
728 }
else if (alg ==
"pfsum_vssk" && hlt_pfsum_vssk_met_cont.
isValid() && hlt_pfsum_vssk_met_cont->size() > 0) {
729 hlt_met = hlt_pfsum_vssk_met_cont->at(0);
730 }
else if (alg ==
"pfopufit" && hlt_pfopufit_met_cont.
isValid() && hlt_pfopufit_met_cont->size() > 0) {
731 hlt_met = hlt_pfopufit_met_cont->at(0);
732 }
else if (alg ==
"pfopufit_sig30" && hlt_pfopufit_sig30_met_cont.
isValid() && hlt_pfopufit_sig30_met_cont->size() > 0) {
733 hlt_met = hlt_pfopufit_sig30_met_cont->at(0);
734 }
else if (alg ==
"cvfpufit" && hlt_cvfpufit_met_cont.
isValid() && hlt_cvfpufit_met_cont->size() > 0) {
735 hlt_met = hlt_cvfpufit_met_cont->at(0);
736 }
else if (alg ==
"mhtpufit_pf" && hlt_mhtpufit_pf_met_cont.
isValid() && hlt_mhtpufit_pf_met_cont->size() > 0) {
737 hlt_met = hlt_mhtpufit_pf_met_cont->at(0);
738 }
else if (alg ==
"mhtpufit_em" && hlt_mhtpufit_em_met_cont.
isValid() && hlt_mhtpufit_em_met_cont->size() > 0) {
739 hlt_met = hlt_mhtpufit_em_met_cont->at(0);
740 }
else if (alg ==
"met_nn" && hlt_met_nn_cont.
isValid() && hlt_met_nn_cont->size() > 0) {
741 hlt_met = hlt_met_nn_cont->at(0);
747 float hlt_Ex = hlt_met->
ex()/Gaudi::Units::GeV;
748 float hlt_Ey = hlt_met->
ey()/Gaudi::Units::GeV;
749 float hlt_Ez = hlt_met->
ez()/Gaudi::Units::GeV;
750 float hlt_Et = std::sqrt(hlt_Ex*hlt_Ex + hlt_Ey*hlt_Ey);
751 float hlt_sumEt = hlt_met->
sumEt()/Gaudi::Units::GeV;
752 float hlt_Ex_log =
signed_log(hlt_Ex, epsilon);
753 float hlt_Ey_log =
signed_log(hlt_Ey, epsilon);
754 float hlt_Et_log =
signed_log(hlt_Et, epsilon);
755 float hlt_sumEt_log =
signed_log(hlt_sumEt, epsilon);
756 TVector3 v(hlt_Ex, hlt_Ey, hlt_Ez);
757 float hlt_eta = v.Eta();
758 float hlt_phi = v.Phi();
770 fill(tool,met_Ex,met_Ey,met_Et,met_sumEt,
771 met_Ex_log,met_Ey_log,met_Et_log,met_sumEt_log,
779 if (alg ==
"cell" && hlt_cell_met_cont.
isValid() && hlt_cell_met_cont->size() > 0) {
780 hlt_met = hlt_cell_met_cont->at(0);
781 }
else if (alg ==
"mht" && hlt_mht_met_cont.
isValid() && hlt_mht_met_cont->size() > 0) {
782 hlt_met = hlt_mht_met_cont->at(0);
783 }
else if (alg ==
"tc" && hlt_tc_met_cont.
isValid() && hlt_tc_met_cont->size() > 0) {
784 hlt_met = hlt_tc_met_cont->at(0);
785 }
else if (alg ==
"tc_em" && hlt_tc_em_met_cont.
isValid() && hlt_tc_em_met_cont->size() > 0) {
786 hlt_met = hlt_tc_em_met_cont->at(0);
787 }
else if (alg ==
"tcpufit" && hlt_tcpufit_met_cont.
isValid() && hlt_tcpufit_met_cont->size() > 0) {
788 hlt_met = hlt_tcpufit_met_cont->at(0);
789 }
else if (alg ==
"tcpufit_sig30" && hlt_tcpufit_sig30_met_cont.
isValid() && hlt_tcpufit_sig30_met_cont->size() > 0) {
790 hlt_met = hlt_tcpufit_sig30_met_cont->at(0);
791 }
else if (alg ==
"trkmht" && hlt_trkmht_met_cont.
isValid() && hlt_trkmht_met_cont->size() > 0) {
792 hlt_met = hlt_trkmht_met_cont->at(0);
793 }
else if (alg ==
"pfsum" && hlt_pfsum_met_cont.
isValid() && hlt_pfsum_met_cont->size() > 0) {
794 hlt_met = hlt_pfsum_met_cont->at(0);
795 }
else if (alg ==
"pfsum_cssk" && hlt_pfsum_cssk_met_cont.
isValid() && hlt_pfsum_cssk_met_cont->size() > 0) {
796 hlt_met = hlt_pfsum_cssk_met_cont->at(0);
797 }
else if (alg ==
"pfsum_vssk" && hlt_pfsum_vssk_met_cont.
isValid() && hlt_pfsum_vssk_met_cont->size() > 0) {
798 hlt_met = hlt_pfsum_vssk_met_cont->at(0);
799 }
else if (alg ==
"pfopufit" && hlt_pfopufit_met_cont.
isValid() && hlt_pfopufit_met_cont->size() > 0) {
800 hlt_met = hlt_pfopufit_met_cont->at(0);
801 }
else if (alg ==
"pfopufit_sig30" && hlt_pfopufit_sig30_met_cont.
isValid() && hlt_pfopufit_sig30_met_cont->size() > 0) {
802 hlt_met = hlt_pfopufit_sig30_met_cont->at(0);
803 }
else if (alg ==
"cvfpufit" && hlt_cvfpufit_met_cont.
isValid() && hlt_cvfpufit_met_cont->size() > 0) {
804 hlt_met = hlt_cvfpufit_met_cont->at(0);
805 }
else if (alg ==
"mhtpufit_pf" && hlt_mhtpufit_pf_met_cont.
isValid() && hlt_mhtpufit_pf_met_cont->size() > 0) {
806 hlt_met = hlt_mhtpufit_pf_met_cont->at(0);
807 }
else if (alg ==
"mhtpufit_em" && hlt_mhtpufit_em_met_cont.
isValid() && hlt_mhtpufit_em_met_cont->size() > 0) {
808 hlt_met = hlt_mhtpufit_em_met_cont->at(0);
809 }
else if (alg ==
"met_nn" && hlt_met_nn_cont.
isValid() && hlt_met_nn_cont->size() > 0) {
810 hlt_met = hlt_met_nn_cont->at(0);
816 float hlt_Ex = hlt_met->
ex()/Gaudi::Units::GeV;
817 float hlt_Ey = hlt_met->
ey()/Gaudi::Units::GeV;
818 float hlt_Et = std::sqrt(hlt_Ex*hlt_Ex + hlt_Ey*hlt_Ey);
819 if (L1_PreSelMet_Et >
m_L1MetCut && !std::isnan(hlt_Et)) {
821 fill(tool,met_presel_Et);
827 if (alg ==
"cell" && hlt_cell_met_cont.
isValid() && hlt_cell_met_cont->size() > 0) {
828 hlt_met = hlt_cell_met_cont->at(0);
829 }
else if (alg ==
"mht" && hlt_mht_met_cont.
isValid() && hlt_mht_met_cont->size() > 0) {
830 hlt_met = hlt_mht_met_cont->at(0);
831 }
else if (alg ==
"tc" && hlt_tc_met_cont.
isValid() && hlt_tc_met_cont->size() > 0) {
832 hlt_met = hlt_tc_met_cont->at(0);
833 }
else if (alg ==
"tc_em" && hlt_tc_em_met_cont.
isValid() && hlt_tc_em_met_cont->size() > 0) {
834 hlt_met = hlt_tc_em_met_cont->at(0);
835 }
else if (alg ==
"tcpufit" && hlt_tcpufit_met_cont.
isValid() && hlt_tcpufit_met_cont->size() > 0) {
836 hlt_met = hlt_tcpufit_met_cont->at(0);
837 }
else if (alg ==
"trkmht" && hlt_trkmht_met_cont.
isValid() && hlt_trkmht_met_cont->size() > 0) {
838 hlt_met = hlt_trkmht_met_cont->at(0);
839 }
else if (alg ==
"pfsum" && hlt_pfsum_met_cont.
isValid() && hlt_pfsum_met_cont->size() > 0) {
840 hlt_met = hlt_pfsum_met_cont->at(0);
841 }
else if (alg ==
"pfsum_cssk" && hlt_pfsum_cssk_met_cont.
isValid() && hlt_pfsum_cssk_met_cont->size() > 0) {
842 hlt_met = hlt_pfsum_cssk_met_cont->at(0);
843 }
else if (alg ==
"pfsum_vssk" && hlt_pfsum_vssk_met_cont.
isValid() && hlt_pfsum_vssk_met_cont->size() > 0) {
844 hlt_met = hlt_pfsum_vssk_met_cont->at(0);
845 }
else if (alg ==
"pfopufit" && hlt_pfopufit_met_cont.
isValid() && hlt_pfopufit_met_cont->size() > 0) {
846 hlt_met = hlt_pfopufit_met_cont->at(0);
847 }
else if (alg ==
"cvfpufit" && hlt_cvfpufit_met_cont.
isValid() && hlt_cvfpufit_met_cont->size() > 0) {
848 hlt_met = hlt_cvfpufit_met_cont->at(0);
849 }
else if (alg ==
"mhtpufit_pf" && hlt_mhtpufit_pf_met_cont.
isValid() && hlt_mhtpufit_pf_met_cont->size() > 0) {
850 hlt_met = hlt_mhtpufit_pf_met_cont->at(0);
851 }
else if (alg ==
"mhtpufit_em" && hlt_mhtpufit_em_met_cont.
isValid() && hlt_mhtpufit_em_met_cont->size() > 0) {
852 hlt_met = hlt_mhtpufit_em_met_cont->at(0);
858 float hlt_Ex = hlt_met->
ex()/Gaudi::Units::GeV;
859 float hlt_Ey = hlt_met->
ey()/Gaudi::Units::GeV;
860 float hlt_Ez = hlt_met->
ez()/Gaudi::Units::GeV;
861 float hlt_Et = std::sqrt(hlt_Ex*hlt_Ex + hlt_Ey*hlt_Ey);
862 float hlt_sumEt = hlt_met->
sumEt()/Gaudi::Units::GeV;
863 float hlt_Ex_log =
signed_log(hlt_Ex, epsilon);
864 float hlt_Ey_log =
signed_log(hlt_Ey, epsilon);
865 float hlt_Et_log =
signed_log(hlt_Et, epsilon);
866 float hlt_sumEt_log =
signed_log(hlt_sumEt, epsilon);
867 TVector3 v(hlt_Ex, hlt_Ey, hlt_Ez);
868 float hlt_eta = v.Eta();
869 float hlt_phi = v.Phi();
882 auto met_sumEt_log =
Monitored::Scalar<float>(alg+
"_LArNoiseBurstVeto_sumEt_log",
static_cast<float>(hlt_sumEt_log));
885 fill(tool,met_Ex,met_Ey,met_Et,met_sumEt,
886 met_Ex_log,met_Ey_log,met_Et_log,met_sumEt_log,
894 if (alg ==
"cell" && hlt_cell_met_cont.
isValid() && hlt_cell_met_cont->size() > 0) {
895 hlt_met = hlt_cell_met_cont->at(0);
896 }
else if (alg ==
"mht" && hlt_mht_met_cont.
isValid() && hlt_mht_met_cont->size() > 0) {
897 hlt_met = hlt_mht_met_cont->at(0);
898 }
else if (alg ==
"tc" && hlt_tc_met_cont.
isValid() && hlt_tc_met_cont->size() > 0) {
899 hlt_met = hlt_tc_met_cont->at(0);
900 }
else if (alg ==
"tc_em" && hlt_tc_em_met_cont.
isValid() && hlt_tc_em_met_cont->size() > 0) {
901 hlt_met = hlt_tc_em_met_cont->at(0);
902 }
else if (alg ==
"tcpufit" && hlt_tcpufit_met_cont.
isValid() && hlt_tcpufit_met_cont->size() > 0) {
903 hlt_met = hlt_tcpufit_met_cont->at(0);
904 }
else if (alg ==
"trkmht" && hlt_trkmht_met_cont.
isValid() && hlt_trkmht_met_cont->size() > 0) {
905 hlt_met = hlt_trkmht_met_cont->at(0);
906 }
else if (alg ==
"pfsum" && hlt_pfsum_met_cont.
isValid() && hlt_pfsum_met_cont->size() > 0) {
907 hlt_met = hlt_pfsum_met_cont->at(0);
908 }
else if (alg ==
"pfsum_cssk" && hlt_pfsum_cssk_met_cont.
isValid() && hlt_pfsum_cssk_met_cont->size() > 0) {
909 hlt_met = hlt_pfsum_cssk_met_cont->at(0);
910 }
else if (alg ==
"pfsum_vssk" && hlt_pfsum_vssk_met_cont.
isValid() && hlt_pfsum_vssk_met_cont->size() > 0) {
911 hlt_met = hlt_pfsum_vssk_met_cont->at(0);
912 }
else if (alg ==
"pfopufit" && hlt_pfopufit_met_cont.
isValid() && hlt_pfopufit_met_cont->size() > 0) {
913 hlt_met = hlt_pfopufit_met_cont->at(0);
914 }
else if (alg ==
"cvfpufit" && hlt_cvfpufit_met_cont.
isValid() && hlt_cvfpufit_met_cont->size() > 0) {
915 hlt_met = hlt_cvfpufit_met_cont->at(0);
916 }
else if (alg ==
"mhtpufit_pf" && hlt_mhtpufit_pf_met_cont.
isValid() && hlt_mhtpufit_pf_met_cont->size() > 0) {
917 hlt_met = hlt_mhtpufit_pf_met_cont->at(0);
918 }
else if (alg ==
"mhtpufit_em" && hlt_mhtpufit_em_met_cont.
isValid() && hlt_mhtpufit_em_met_cont->size() > 0) {
919 hlt_met = hlt_mhtpufit_em_met_cont->at(0);
925 float hlt_Ex = hlt_met->
ex()/Gaudi::Units::GeV;
926 float hlt_Ey = hlt_met->
ey()/Gaudi::Units::GeV;
927 float hlt_Ez = hlt_met->
ez()/Gaudi::Units::GeV;
928 float hlt_Et = std::sqrt(hlt_Ex*hlt_Ex + hlt_Ey*hlt_Ey);
929 float hlt_sumEt = hlt_met->
sumEt()/Gaudi::Units::GeV;
930 float hlt_Ex_log =
signed_log(hlt_Ex, epsilon);
931 float hlt_Ey_log =
signed_log(hlt_Ey, epsilon);
932 float hlt_Et_log =
signed_log(hlt_Et, epsilon);
933 float hlt_sumEt_log =
signed_log(hlt_sumEt, epsilon);
934 TVector3 v(hlt_Ex, hlt_Ey, hlt_Ez);
935 float hlt_eta = v.Eta();
936 float hlt_phi = v.Phi();
950 fill(tool,met_Ex,met_Ey,met_Et,met_sumEt,
951 met_Ex_log,met_Ey_log,met_Et_log,met_sumEt_log,
967 fill(tool,met_Ex,met_Ey,met_Et,met_sumEt,
968 met_Ex_log,met_Ey_log,met_Et_log,met_sumEt_log,
976 if (alg ==
"cell" && hlt_cell_met_cont.
isValid() && hlt_cell_met_cont->size() > 0) {
977 hlt_met = hlt_cell_met_cont->at(0);
978 }
else if (alg ==
"mht" && hlt_mht_met_cont.
isValid() && hlt_mht_met_cont->size() > 0) {
979 hlt_met = hlt_mht_met_cont->at(0);
980 }
else if (alg ==
"tc" && hlt_tc_met_cont.
isValid() && hlt_tc_met_cont->size() > 0) {
981 hlt_met = hlt_tc_met_cont->at(0);
982 }
else if (alg ==
"tc_em" && hlt_tc_em_met_cont.
isValid() && hlt_tc_em_met_cont->size() > 0) {
983 hlt_met = hlt_tc_em_met_cont->at(0);
984 }
else if (alg ==
"tcpufit" && hlt_tcpufit_met_cont.
isValid() && hlt_tcpufit_met_cont->size() > 0) {
985 hlt_met = hlt_tcpufit_met_cont->at(0);
986 }
else if (alg ==
"tcpufit_sig30" && hlt_tcpufit_sig30_met_cont.
isValid() && hlt_tcpufit_sig30_met_cont->size() > 0) {
987 hlt_met = hlt_tcpufit_sig30_met_cont->at(0);
988 }
else if (alg ==
"trkmht" && hlt_trkmht_met_cont.
isValid() && hlt_trkmht_met_cont->size() > 0) {
989 hlt_met = hlt_trkmht_met_cont->at(0);
990 }
else if (alg ==
"pfsum" && hlt_pfsum_met_cont.
isValid() && hlt_pfsum_met_cont->size() > 0) {
991 hlt_met = hlt_pfsum_met_cont->at(0);
992 }
else if (alg ==
"pfsum_cssk" && hlt_pfsum_cssk_met_cont.
isValid() && hlt_pfsum_cssk_met_cont->size() > 0) {
993 hlt_met = hlt_pfsum_cssk_met_cont->at(0);
994 }
else if (alg ==
"pfsum_vssk" && hlt_pfsum_vssk_met_cont.
isValid() && hlt_pfsum_vssk_met_cont->size() > 0) {
995 hlt_met = hlt_pfsum_vssk_met_cont->at(0);
996 }
else if (alg ==
"pfopufit" && hlt_pfopufit_met_cont.
isValid() && hlt_pfopufit_met_cont->size() > 0) {
997 hlt_met = hlt_pfopufit_met_cont->at(0);
998 }
else if (alg ==
"pfopufit_sig30" && hlt_pfopufit_sig30_met_cont.
isValid() && hlt_pfopufit_sig30_met_cont->size() > 0) {
999 hlt_met = hlt_pfopufit_sig30_met_cont->at(0);
1000 }
else if (alg ==
"cvfpufit" && hlt_cvfpufit_met_cont.
isValid() && hlt_cvfpufit_met_cont->size() > 0) {
1001 hlt_met = hlt_cvfpufit_met_cont->at(0);
1002 }
else if (alg ==
"mhtpufit_pf" && hlt_mhtpufit_pf_met_cont.
isValid() && hlt_mhtpufit_pf_met_cont->size() > 0) {
1003 hlt_met = hlt_mhtpufit_pf_met_cont->at(0);
1004 }
else if (alg ==
"mhtpufit_em" && hlt_mhtpufit_em_met_cont.
isValid() && hlt_mhtpufit_em_met_cont->size() > 0) {
1005 hlt_met = hlt_mhtpufit_em_met_cont->at(0);
1006 }
else if (alg ==
"met_nn" && hlt_met_nn_cont.
isValid() && hlt_met_nn_cont->size() > 0) {
1007 hlt_met = hlt_met_nn_cont->at(0);
1013 float hlt_Ex = hlt_met->
ex()/Gaudi::Units::GeV;
1014 float hlt_Ey = hlt_met->
ey()/Gaudi::Units::GeV;
1015 float hlt_Et = std::sqrt(hlt_Ex*hlt_Ex + hlt_Ey*hlt_Ey);
1016 float hlt_sumEt = hlt_met->
sumEt()/Gaudi::Units::GeV;
1017 if (!std::isnan(hlt_Et)) {
1022 fill(tool,met_Ex,met_Ey,met_Et,met_sumEt);
1024 if (L1_roiMet_Et > 50.) {
1026 fill(tool,met_presel_Et);
1035 if (alg ==
"cell" && hlt_cell_met_cont.
isValid() && hlt_cell_met_cont->size() > 0) {
1036 hlt_met = hlt_cell_met_cont->at(0);
1037 }
else if (alg ==
"mht" && hlt_mht_met_cont.
isValid() && hlt_mht_met_cont->size() > 0) {
1038 hlt_met = hlt_mht_met_cont->at(0);
1039 }
else if (alg ==
"tc" && hlt_tc_met_cont.
isValid() && hlt_tc_met_cont->size() > 0) {
1040 hlt_met = hlt_tc_met_cont->at(0);
1041 }
else if (alg ==
"tc_em" && hlt_tc_em_met_cont.
isValid() && hlt_tc_em_met_cont->size() > 0) {
1042 hlt_met = hlt_tc_em_met_cont->at(0);
1043 }
else if (alg ==
"trkmht_pf" && hlt_trkmht_met_cont.
isValid() && hlt_trkmht_met_cont->size() > 0) {
1044 hlt_met = hlt_trkmht_met_cont->at(0);
1045 }
else if (alg ==
"pfsum" && hlt_pfsum_met_cont.
isValid() && hlt_pfsum_met_cont->size() > 0) {
1046 hlt_met = hlt_pfsum_met_cont->at(0);
1047 }
else if (alg ==
"pfsum_cssk" && hlt_pfsum_cssk_met_cont.
isValid() && hlt_pfsum_cssk_met_cont->size() > 0) {
1048 hlt_met = hlt_pfsum_cssk_met_cont->at(0);
1049 }
else if (alg ==
"pfsum_vssk" && hlt_pfsum_vssk_met_cont.
isValid() && hlt_pfsum_vssk_met_cont->size() > 0) {
1050 hlt_met = hlt_pfsum_vssk_met_cont->at(0);
1051 }
else if (alg ==
"pfopufit" && hlt_pfopufit_met_cont.
isValid() && hlt_pfopufit_met_cont->size() > 0) {
1052 hlt_met = hlt_pfopufit_met_cont->at(0);
1053 }
else if (alg ==
"cvfpufit" && hlt_cvfpufit_met_cont.
isValid() && hlt_cvfpufit_met_cont->size() > 0) {
1054 hlt_met = hlt_cvfpufit_met_cont->at(0);
1055 }
else if (alg ==
"mhtpufit_pf" && hlt_mhtpufit_pf_met_cont.
isValid() && hlt_mhtpufit_pf_met_cont->size() > 0) {
1056 hlt_met = hlt_mhtpufit_pf_met_cont->at(0);
1057 }
else if (alg ==
"mhtpufit_em" && hlt_mhtpufit_em_met_cont.
isValid() && hlt_mhtpufit_em_met_cont->size() > 0) {
1058 hlt_met = hlt_mhtpufit_em_met_cont->at(0);
1063 if(hlt_met && hlt_tcpufit_met_cont.
isValid() && hlt_tcpufit_met_cont->size() > 0){
1064 hlt_tcpufit_met = hlt_tcpufit_met_cont->at(0);
1065 float hlt_Ex = hlt_met->
ex()/Gaudi::Units::GeV;
1066 float hlt_Ey = hlt_met->
ey()/Gaudi::Units::GeV;
1067 float hlt_Et = std::sqrt(hlt_Ex*hlt_Ex + hlt_Ey*hlt_Ey);
1070 float hlt_tcpufit_Ex = hlt_tcpufit_met->
ex()/Gaudi::Units::GeV;
1071 float hlt_tcpufit_Ey = hlt_tcpufit_met->
ey()/Gaudi::Units::GeV;
1072 float hlt_tcpufit_Et = std::sqrt(hlt_tcpufit_Ex*hlt_tcpufit_Ex + hlt_tcpufit_Ey*hlt_tcpufit_Ey);
1074 fill(tool, met_Et, tcpufit_met_Et);
1079 for (
const std::string& chain :
m_l1Chains) {
1081 fill(tool, pass_chain,offline_NoMu_Et_eff);
1085 fill(tool, pass_chain,offline_NoMu_Et_eff);
1089 fill(tool, pass_chain,offline_NoMu_Et_eff);
1093 fill(tool, pass_chain,offline_NoMu_Et_eff);
1096 return StatusCode::SUCCESS;