21 ATH_MSG_INFO(
"TrigEgammaMonitorAnalysisAlgorithm::initialize()...");
24 return StatusCode::SUCCESS;
33 const std::string &histname,
34 const std::string &
label )
const
37 fill( groupHandle, mon );
45 const std::vector< std::pair< const xAOD::Egamma*, const TrigCompositeUtils::Decision * >>& pairObjs,
46 const TrigInfo& info,
const bool onlyHLT )
const
49 std::vector< std::pair< const xAOD::Egamma*, const TrigCompositeUtils::Decision * >> pair_vec;
50 std::vector< std::pair< const xAOD::Egamma*, const TrigCompositeUtils::Decision * >> pair_iso_vec;
52 std::vector<asg::AcceptData> accept_vec;
53 std::vector<asg::AcceptData> accept_iso_vec;
55 std::vector<asg::AcceptData> emu_accept_vec;
56 std::vector<asg::AcceptData> emu_accept_iso_vec;
58 ATH_MSG_DEBUG(
"Inside fillEfficiencies: pairObject which is passed to function is: " << pairObjs.size());
60 for(
auto pairObj : pairObjs ){
64 auto passBits=
tdt()->isPassedBits(info.trigger);
66 ATH_MSG_DEBUG(
"Prescaled trigger: " << info.trigger <<
" Skipping to normalize efficiencies");
70 float et =
getEt(el)/Gaudi::Units::GeV;
71 if(
et < info.etthr-5.0)
continue;
75 float et = getCluster_et(pairObj.first)/Gaudi::Units::GeV;
76 ATH_MSG_DEBUG(
"raw cluster et (MeV?) = " << getCluster_et(pairObj.first));
79 if(
et < info.etthr-5.0)
continue;
83 bool pass_CaloIso = getIsolation_topoetcone20(pairObj.first)/getCluster_et(pairObj.first) < 0.065;
84 bool pass_trkIso = getIsolation_ptcone20(pairObj.first)/getCluster_et(pairObj.first) < 0.05;
89 if (!pass_CaloIso || !pass_trkIso){
90 ATH_MSG_DEBUG(
"Did not passed FixedCutLoose offline isolationFixedCutLoose offline isolation");
100 auto acceptData =
m_emulatorTool->emulate(ctx, pairObj.second, info.trigger, valid);
106 emu_accept_vec.push_back( acceptData );
108 if( IsolatedDec(*pairObj.first) ){
109 emu_accept_iso_vec.push_back(acceptData);
115 pair_vec.push_back(pairObj);
116 auto acceptData =
setAccept( ctx, pairObj.second, info, onlyHLT );
117 accept_vec.push_back(acceptData);
120 if( IsolatedDec(*pairObj.first) ){
121 pair_iso_vec.push_back(pairObj);
122 accept_iso_vec.push_back(acceptData);
129 std::string
dirname=
"Efficiency";
130 std::string l2step =
"FastElectron";
131 if( info.signature ==
"Electron" or info.signature ==
"e" ){
132 l2step =
"FastElectron";
133 }
else if( info.signature ==
"Photon" or info.signature ==
"g" ){
134 l2step =
"FastPhoton";
139 fillEfficiency(ctx,
"PrecisionCalo" ,
"EFCalo" , info.pidname, info, pair_vec , accept_vec,
dirname);
142 ATH_MSG_DEBUG(
"THE SIZE OF PAIR_VEC IS: " << pair_vec.size());
143 ATH_MSG_DEBUG(
"THE SIZE OF accept_VEC IS: " << accept_vec.size());
164 fillEfficiency(ctx,
"PrecisionCalo" ,
"EFCalo" , info.pidname, info, pair_vec , emu_accept_vec,
dirname);
177 const std::string &subgroup,
178 const std::string &level,
179 const std::string &pidword,
183 const std::vector< asg::AcceptData >& acceptObjs ,
184 const std::string&
dirname )
const
186 const float etthr = info.etthr;
187 const std::string trigger = info.trigger;
188 const auto & monGroup =
getGroup( trigger +
"_"+
dirname+
"_" + subgroup );
190 std::vector<float> et_vec, highet_vec, pt_vec, eta_vec, phi_vec, avgmu_vec, npvtx_vec,et_slice0_vec,et_slice1_vec,et_slice2_vec,et_slice3_vec, ptvarcone20rel_vec, ptvarcone30rel_vec, z0_vec, d0_vec;
191 std::vector<float> match_et_vec, match_highet_vec, match_pt_vec, match_eta_vec, match_phi_vec, match_avgmu_vec, match_npvtx_vec, match_ptvarcone20rel_vec, match_ptvarcone30rel_vec, match_z0_vec, match_d0_vec;
192 std::vector<bool> et_passed_vec, et_failed_vec, highet_passed_vec, highet_failed_vec, pt_passed_vec, eta_passed_vec, eta_failed_vec, phi_passed_vec, avgmu_passed_vec, npvtx_passed_vec;
193 std::vector<bool> ptvarcone20rel_passed_vec, ptvarcone30rel_passed_vec, z0_passed_vec, d0_passed_vec;
194 std::vector<bool> et_slice0_passed_vec,et_slice1_passed_vec,et_slice2_passed_vec,et_slice3_passed_vec;
216 auto match_ptvarcone20rel_col =
Monitored::Collection(
"match_ptvarcone20rel" , match_ptvarcone20rel_vec );
217 auto match_ptvarcone30rel_col =
Monitored::Collection(
"match_ptvarcone30rel" , match_ptvarcone30rel_vec );
232 auto ptvarcone20rel_passed_col =
Monitored::Collection(
"ptvarcone20rel_passed" , ptvarcone20rel_passed_vec );
233 auto ptvarcone30rel_passed_col =
Monitored::Collection(
"ptvarcone30rel_passed" , ptvarcone30rel_passed_vec );
252 for(
auto pairObj : pairObjs ){
255 bool isPassed = acceptObjs[iObj].getCutResult( level );
257 float ptvarcone20rel = -99.0;
258 float ptvarcone30rel = -99.0;
261 const auto *eg = pairObj.first;
268 et =
getEt(el)/Gaudi::Units::GeV;
270 ptvarcone20rel = getIsolation_ptvarcone20(el)/el->pt();
271 ptvarcone30rel = getIsolation_ptvarcone30(el)/el->pt();
273 z0 = getTrack_z0(el);
274 d0 = getTrack_d0(el);
276 else et=eg->caloCluster()->et()/Gaudi::Units::GeV;
278 float eta = eg->caloCluster()->etaBE(2);
279 float phi = eg->phi();
280 float pt = eg->pt()/Gaudi::Units::GeV;
284 ATH_MSG_DEBUG(
"PID decision efficiency " << pidwordDec(*eg));
287 et_vec.push_back(
et );
288 pt_vec.push_back( pt );
289 highet_vec.push_back(
et );
292 eta_vec.push_back(
eta);
293 phi_vec.push_back(
phi);
294 avgmu_vec.push_back(avgmu);
295 npvtx_vec.push_back(npvtx);
296 ptvarcone20rel_vec.push_back(ptvarcone20rel);
297 ptvarcone30rel_vec.push_back(ptvarcone30rel);
298 z0_vec.push_back(z0);
299 d0_vec.push_back(d0);
303 et_slice0_vec.push_back(
et);
304 }
else if( abs(
eta) > 0.80 && abs(
eta) <= 1.37 ){
305 et_slice1_vec.push_back(
et);
306 }
else if( abs(
eta) > 1.37 && abs(
eta) <= 1.54 ){
307 et_slice2_vec.push_back(
et);
308 }
else if( abs(
eta) > 1.54 && abs(
eta) <= 2.50 ){
309 et_slice3_vec.push_back(
et);
313 match_et_vec.push_back(
et );
314 match_pt_vec.push_back( pt );
315 match_highet_vec.push_back(
et );
318 match_eta_vec.push_back(
eta);
319 match_phi_vec.push_back(
phi);
320 match_avgmu_vec.push_back(avgmu);
321 match_npvtx_vec.push_back(npvtx);
322 match_ptvarcone20rel_vec.push_back(ptvarcone20rel);
323 match_ptvarcone30rel_vec.push_back(ptvarcone30rel);
324 match_z0_vec.push_back(z0);
325 match_d0_vec.push_back(d0);
328 et_passed_vec.push_back(
true );
329 et_failed_vec.push_back(
false );
330 pt_passed_vec.push_back(
true );
331 highet_passed_vec.push_back(
true );
332 highet_failed_vec.push_back(
false );
335 et_slice0_passed_vec.push_back(
true);
336 }
else if( abs(
eta) > 0.80 && abs(
eta) <= 1.37 ){
337 et_slice1_passed_vec.push_back(
true);
338 }
else if( abs(
eta) > 1.37 && abs(
eta) <= 1.54 ){
339 et_slice2_passed_vec.push_back(
true);
340 }
else if( abs(
eta) > 1.54 && abs(
eta) <= 2.50 ){
341 et_slice3_passed_vec.push_back(
true);
345 eta_passed_vec.push_back(
true );
346 eta_failed_vec.push_back(
false );
347 phi_passed_vec.push_back(
true );
348 avgmu_passed_vec.push_back(
true );
349 npvtx_passed_vec.push_back(
true );
350 ptvarcone20rel_passed_vec.push_back(
true );
351 ptvarcone30rel_passed_vec.push_back(
true );
352 z0_passed_vec.push_back(
true );
353 d0_passed_vec.push_back(
true );
358 et_passed_vec.push_back(
false );
359 et_failed_vec.push_back(
true );
360 pt_passed_vec.push_back(
false );
361 highet_passed_vec.push_back(
false );
362 highet_failed_vec.push_back(
true );
365 et_slice0_passed_vec.push_back(
false);
366 }
else if( abs(
eta) > 0.80 && abs(
eta) <= 1.37 ){
367 et_slice1_passed_vec.push_back(
false);
368 }
else if( abs(
eta) > 1.37 && abs(
eta) <= 1.54 ){
369 et_slice2_passed_vec.push_back(
false);
370 }
else if( abs(
eta) > 1.54 && abs(
eta) <= 2.50 ){
371 et_slice3_passed_vec.push_back(
false);
375 eta_passed_vec.push_back(
false );
376 eta_failed_vec.push_back(
true );
377 phi_passed_vec.push_back(
false );
378 avgmu_passed_vec.push_back(
false );
379 npvtx_passed_vec.push_back(
false );
380 ptvarcone20rel_passed_vec.push_back(
false );
381 ptvarcone30rel_passed_vec.push_back(
false );
382 z0_passed_vec.push_back(
false );
383 d0_passed_vec.push_back(
false );
391 fill( monGroup, et_col, highet_col, pt_col, eta_col, phi_col, avgmu_col, npvtx_col, ptvarcone20rel_col, ptvarcone30rel_col, z0_col, d0_col,
392 match_et_col, match_highet_col, match_pt_col, match_eta_col, match_phi_col, match_avgmu_col, match_npvtx_col, match_ptvarcone20rel_col, match_ptvarcone30rel_col,match_z0_col,match_d0_col,
393 et_passed_col, et_failed_col, highet_passed_col, highet_failed_col, pt_passed_col, eta_passed_col, eta_failed_col, phi_passed_col, avgmu_passed_col, npvtx_passed_col, ptvarcone20rel_passed_col, ptvarcone30rel_passed_col, z0_passed_col, d0_passed_col,
394 et_slice0_col,et_slice1_col,et_slice2_col,et_slice3_col,et_slice0_passed_col,et_slice1_passed_col,et_slice2_passed_col,et_slice3_passed_col);
404 const std::vector< asg::AcceptData >& acceptObjs )
const
406 const auto & monGroup =
getGroup(info.trigger+
"_Inefficiency");
409 for(
auto pairObj : pairObjs ){
412 bool isPassedL1Calo = acceptObjs[iObj].getCutResult(
"L1Calo");
413 bool isPassedL2Calo = acceptObjs[iObj].getCutResult(
"L2Calo");
414 bool isPassedL2 = acceptObjs[iObj].getCutResult(
"L2" );
415 bool isPassedEFCalo = acceptObjs[iObj].getCutResult(
"EFCalo");
416 bool isPassedHLT = acceptObjs[iObj].getCutResult(
"HLT" );
418 const auto *eg = pairObj.first;
427 fillLabel(monGroup,
"InefficiencyCounts",
"L1Calo" );
428 }
if(!isPassedL2Calo){
429 fillLabel(monGroup,
"InefficiencyCounts",
"L2Calo" );
431 fillLabel(monGroup,
"InefficiencyCounts",
"L2" );
432 }
if(!isPassedEFCalo){
433 fillLabel(monGroup,
"InefficiencyCounts",
"EFCalo" );
435 fillLabel(monGroup,
"InefficiencyCounts",
"HLT" );
447 const std::string trigger = info.trigger;
452 std::vector<const xAOD::Egamma*> eg_vec;
453 std::vector<const xAOD::Electron*> el_vec;
454 for(
auto pairObj: pairObjs )
456 eg_vec.push_back(pairObj.first);
459 el_vec.push_back(elOff);
473 std::vector<const xAOD::EmTauRoI*> l1_vec;
474 for(
auto &initRoi: initRois ){
475 if( !initRoi.link.isValid() )
continue;
476 const auto *feat =
match()->getL1Feature( ctx, initRoi.source );
477 if(feat) l1_vec.push_back(feat);
481 std::vector<const xAOD::eFexEMRoI*> l1_vec;
482 for(
auto &initRoi: initRois ){
483 if( !initRoi.link.isValid() )
continue;
484 const auto *feat =
match()->getL1eEMFeature( ctx, initRoi.source );
485 if(feat) l1_vec.push_back(feat);
495 std::vector<const xAOD::TrigEMCluster*> emCluster_vec;
497 for(
auto &featLinkInfo :
vec ){
498 if(! featLinkInfo.isValid() )
continue;
499 const auto *feat = *(featLinkInfo.link);
501 emCluster_vec.push_back(feat);
507 std::string key =
match()->key(
"PrecisionCalo_Electron");
508 if(info.signature ==
"Photon" or info.signature ==
"g") key =
match()->key(
"PrecisionCalo_Photon");
509 if(info.lrt) key =
match()->key(
"PrecisionCalo_LRT");
510 if(info.ion) key =
match()->key(
"PrecisionCalo_HI");
512 std::vector<const xAOD::CaloCluster* > clus_vec;
514 for(
auto &featLinkInfo :
vec ){
515 if(! featLinkInfo.isValid() )
continue;
516 const auto *feat = *(featLinkInfo.link);
518 clus_vec.push_back(feat);
523 if ( info.signature ==
"Electron" or info.signature ==
"e" ){
527 std::string key =
match()->key(
"FastElectrons");
528 if(info.lrt) key =
match()->key(
"FastElectrons_LRT");
530 std::vector<const xAOD::TrigElectron*> el_vec;
533 for(
auto &featLinkInfo :
vec ){
534 if(! featLinkInfo.isValid() )
continue;
535 const auto *feat = *(featLinkInfo.link);
537 el_vec.push_back(feat);
543 std::string key =
match()->key(
"Electrons_GSF");
544 if(info.nogsf) key =
match()->key(
"Electrons");
545 if(info.lrt) key =
match()->key(
"Electrons_LRT");
547 std::vector<const xAOD::Electron*> el_vec;
548 std::vector<const xAOD::Egamma*> eg_vec;
550 for(
auto &featLinkInfo :
vec ){
551 if(! featLinkInfo.isValid() )
continue;
552 const auto *feat = *(featLinkInfo.link);
554 el_vec.push_back(feat);
555 eg_vec.push_back(feat);
560 }
else if ( info.signature ==
"Photon" or info.signature ==
"g"){
563 std::string key =
match()->key(
"FastPhotons");
564 std::vector<const xAOD::TrigPhoton*> ph_vec;
567 for(
auto &featLinkInfo :
vec ){
568 if(! featLinkInfo.isValid() )
continue;
569 const auto *feat = *(featLinkInfo.link);
571 ph_vec.push_back(feat);
578 std::vector<const xAOD::Egamma*> ph_vec;
580 for(
auto &featLinkInfo :
vec ){
581 if(! featLinkInfo.isValid() )
continue;
582 const auto *feat = *(featLinkInfo.link);
584 ph_vec.push_back(feat);
599 const auto & monGroup =
getGroup(trigger+
"_Distributions_L1Calo");
601 std::vector<float> eta_vec, phi_vec, energy_vec, roi_et_vec, emIso_vec, hadCore_vec;
610 for(
const auto *l1 : l1_vec )
613 eta_vec.push_back( l1->eta() );
614 phi_vec.push_back( l1->phi() );
615 energy_vec.push_back( l1->emClus()/Gaudi::Units::GeV );
616 roi_et_vec.push_back( l1->eT()/Gaudi::Units::GeV );
617 emIso_vec.push_back( l1->emIsol()/Gaudi::Units::GeV );
618 hadCore_vec.push_back( l1->hadCore()/Gaudi::Units::GeV );
621 fill( monGroup, eta_col, phi_col, energy_col, roi_et_col, emIso_col, hadCore_col );
628 const auto & monGroup =
getGroup(trigger+
"_Distributions_L1Calo");
630 std::vector<float> eta_vec, phi_vec, et_vec, wstot_vec, reta_vec, rhad_vec;
640 for(
const auto *l1 : l1_vec )
643 et_vec.push_back( l1->et()/Gaudi::Units::GeV );
644 eta_vec.push_back( l1->eta() );
645 phi_vec.push_back( l1->phi() );
646 wstot_vec.push_back( l1->Wstot() );
647 reta_vec.push_back( l1->Reta() );
648 rhad_vec.push_back( l1->Rhad() );
651 fill( monGroup, eta_col, phi_col, et_col, wstot_col, reta_col, rhad_col );
659 const auto & monGroup =
getGroup(trigger+
"_Distributions_L2Calo");
661 std::vector<float> et_vec,highet_vec, eta_vec, phi_vec;
668 for (
const auto *emCluster : emCluster_vec )
670 if(!emCluster)
continue;
671 et_vec.push_back( emCluster->et()/Gaudi::Units::GeV );
672 highet_vec.push_back( emCluster->et()/Gaudi::Units::GeV );
673 eta_vec.push_back( emCluster->eta() );
674 phi_vec.push_back( emCluster->phi() );
677 fill( monGroup, et_col, eta_col, phi_col, highet_col );
687 const auto & monGroup =
getGroup(trigger+
"_Distributions_L2Electron");
689 std::vector<float> et_vec, eta_vec, phi_vec, highet_vec;
696 for (
const auto *el : el_vec )
699 et_vec.push_back( el->pt()/Gaudi::Units::GeV );
700 highet_vec.push_back( el->pt()/Gaudi::Units::GeV );
701 eta_vec.push_back( el->eta() );
702 phi_vec.push_back( el->phi() );
705 fill( monGroup, et_col, eta_col, phi_col, highet_col );
711 const auto & monGroup =
getGroup(trigger+
"_Distributions_L2Photon");
713 std::vector<float> et_vec, eta_vec, phi_vec, highet_vec;
720 for (
const auto *ph : ph_vec )
723 et_vec.push_back( ph->pt()/Gaudi::Units::GeV );
724 highet_vec.push_back( ph->pt()/Gaudi::Units::GeV );
725 eta_vec.push_back( ph->eta() );
726 phi_vec.push_back( ph->phi() );
729 fill( monGroup, et_col, eta_col, phi_col, highet_col );
736 const auto & monGroup =
getGroup( trigger +
"_Distributions_EFCalo" );
739 std::vector<float> energyBE0_vec, energyBE1_vec, energyBE2_vec, energyBE3_vec,
740 energy_vec, et_vec, eta_vec, phi_vec, eta_calo_vec, phi_calo_vec, highet_vec;
756 for (
const auto *clus : clus_vec )
758 double tmpeta = -999.;
761 double tmpphi = -999.;
765 energyBE0_vec.push_back( clus->energyBE(0)/Gaudi::Units::GeV );
766 energyBE1_vec.push_back( clus->energyBE(1)/Gaudi::Units::GeV );
767 energyBE2_vec.push_back( clus->energyBE(2)/Gaudi::Units::GeV );
768 energyBE3_vec.push_back( clus->energyBE(3)/Gaudi::Units::GeV );
769 energy_vec.push_back( clus->e()/Gaudi::Units::GeV );
770 et_vec.push_back( clus->et()/Gaudi::Units::GeV );
771 highet_vec.push_back( clus->et()/Gaudi::Units::GeV );
772 eta_vec.push_back( clus->eta() );
773 phi_vec.push_back( clus->phi() );
774 eta_calo_vec.push_back( tmpeta );
775 phi_calo_vec.push_back( tmpphi );
780 fill( monGroup, energyBE0_col, energyBE1_col, energyBE2_col, energyBE3_col,
781 energy_col, et_col, eta_col, phi_col, eta_calo_col, phi_calo_col, highet_col);
792 const auto & monGroup =
getGroup( trigger + (
online ?
"_Distributions_HLT" :
"_Distributions_Offline") );
794 std::vector<float> Rhad_vec, Rhad1_vec, Reta_vec, Rphi_vec, weta1_vec, weta2_vec,
795 f1_vec, f3_vec, eratio_vec, et_vec, highet_vec , eta_vec, phi_vec, topoetcone20_vec, topoetcone40_shift_vec,
796 topoetcone20_rel_vec, topoetcone40_shift_rel_vec, ptvarcone20_rel_vec, pt_vec, mu_vec, pt_track_vec, z0_vec, res_etVsEt_vec, res_eprobht_vec, res_cnv_et_vec;
814 auto topoetcone40_shift_rel_col =
Monitored::Collection(
"topoetcone40_shift_rel", topoetcone40_shift_rel_vec );
824 for (
const auto *eg : eg_vec ){
828 Rhad_vec.push_back( getShowerShape_Rhad(eg));
829 Rhad1_vec.push_back( getShowerShape_Rhad(eg));
830 Reta_vec.push_back( getShowerShape_Reta(eg));
831 Rphi_vec.push_back( getShowerShape_Rphi(eg));
832 weta1_vec.push_back( getShowerShape_weta1(eg));
833 weta2_vec.push_back( getShowerShape_weta2(eg));
834 f1_vec.push_back( getShowerShape_f1(eg));
835 f3_vec.push_back( getShowerShape_f3(eg));
836 eratio_vec.push_back( getShowerShape_Eratio(eg));
837 et_vec.push_back( eg->pt()/Gaudi::Units::GeV);
838 highet_vec.push_back( eg->pt()/Gaudi::Units::GeV);
839 eta_vec.push_back( eg->eta());
840 phi_vec.push_back( eg->phi());
841 topoetcone20_vec.push_back( getIsolation_topoetcone20(eg)/Gaudi::Units::GeV);
842 topoetcone40_shift_vec.push_back( (getIsolation_topoetcone40(eg)-2450)/Gaudi::Units::GeV );
845 topoetcone20_rel_vec.push_back( getIsolation_topoetcone20(eg)/eg->pt());
846 topoetcone40_shift_rel_vec.push_back( (getIsolation_topoetcone40(eg)-2450)/eg->pt() );
851 fill( monGroup, Rhad_col, Rhad1_col, Reta_col, Rphi_col, weta1_col, weta2_col,
852 f1_col, f3_col, eratio_col, et_col, highet_col , eta_col, phi_col, topoetcone20_col, topoetcone40_shift_col,
853 topoetcone20_rel_col, topoetcone40_shift_rel_col, ptvarcone20_rel_col, pt_col, mu_col, pt_track_col, z0_col, res_etVsEt_col, res_eprobht_col, res_cnv_et_col);
863 const auto & monGroup =
getGroup( trigger + (
online ?
"_Distributions_HLT" :
"_Distributions_Offline") );
865 std::vector<float> deta1_vec, deta1_EMECA_vec, deta1_EMECC_vec, deta1_EMEBA_vec, deta1_EMEBC_vec, deta2_vec, dphi2_vec,
866 dphiresc_vec, eprobht_vec, npixhits_vec, nscthits_vec, charge_vec, ptcone20_vec, ptvarcone20_vec, ptcone30_vec, ptvarcone30_vec, z0_vec, d0_vec, d0sig_vec,
867 pt_vec,pt_trk_vec, ptcone20_rel_vec, ptvarcone20_rel_vec, ptcone30_rel_vec, ptvarcone30_rel_vec, eta_vec, mu_vec;
899 for (
const auto *eg : eg_vec ){
904 if(eg->caloCluster()) cleta=eg->caloCluster()->eta();
905 else cleta=eg->eta();
907 deta1_vec.push_back( getCaloTrackMatch_deltaEta1(eg));
909 if(cleta > 1.375 && cleta < 3.2)
910 deta1_EMECA_vec.push_back( getCaloTrackMatch_deltaEta1(eg));
911 if(cleta < -1.375 && cleta > -3.2)
912 deta1_EMECC_vec.push_back( getCaloTrackMatch_deltaEta1(eg));
913 if(cleta > 0 && cleta < 1.375)
914 deta1_EMEBA_vec.push_back( getCaloTrackMatch_deltaEta1(eg));
915 if(cleta < 0 && cleta > -1.375)
916 deta1_EMEBC_vec.push_back( getCaloTrackMatch_deltaEta1(eg));
918 deta2_vec.push_back( getCaloTrackMatch_deltaEta2(eg));
919 dphi2_vec.push_back( getCaloTrackMatch_deltaPhi2(eg));
920 dphiresc_vec.push_back( getCaloTrackMatch_deltaPhiRescaled2(eg));
921 eprobht_vec.push_back( getTrackSummaryFloat_eProbabilityHT(eg));
922 npixhits_vec.push_back( getTrackSummary_numberOfPixelHits(eg));
923 nscthits_vec.push_back( getTrackSummary_numberOfSCTHits(eg));
924 charge_vec.push_back( eg->charge());
925 ptcone20_vec.push_back( getIsolation_ptcone20(eg)/Gaudi::Units::GeV);
926 ptvarcone20_vec.push_back( getIsolation_ptvarcone20(eg)/Gaudi::Units::GeV);
927 ptcone30_vec.push_back( getIsolation_ptcone30(eg)/Gaudi::Units::GeV);
928 ptvarcone30_vec.push_back( getIsolation_ptvarcone30(eg)/Gaudi::Units::GeV);
932 z0_vec.push_back( getTrack_z0(eg));
933 d0_vec.push_back( getTrack_d0(eg));
935 pt_vec.push_back( eg->pt()/Gaudi::Units::GeV);
936 pt_trk_vec.push_back( getTrack_pt(eg)/Gaudi::Units::GeV);
937 eta_vec.push_back(eg->eta());
940 mu_vec.push_back( avgmu );
943 ptcone20_rel_vec.push_back( getIsolation_ptcone20(eg)/eg->pt());
944 ptvarcone20_rel_vec.push_back( getIsolation_ptvarcone20(eg)/eg->pt());
945 ptcone30_rel_vec.push_back( getIsolation_ptcone30(eg)/eg->pt());
946 ptvarcone30_rel_vec.push_back( getIsolation_ptvarcone30(eg)/eg->pt());
952 fill( monGroup, deta1_col, deta1_EMECA_col, deta1_EMECC_col, deta1_EMEBA_col, deta1_EMEBC_col, deta2_col, dphi2_col,
953 dphiresc_col, eprobht_col, npixhits_col, nscthits_col, charge_col, ptcone20_col, ptvarcone20_col, ptcone30_col, ptvarcone30_col, z0_col, d0_col, d0sig_col,
954 pt_col, ptcone20_rel_col, ptvarcone20_rel_col, ptcone30_rel_col, ptvarcone30_rel_col, eta_col, mu_col,pt_trk_col);
965 const std::vector< std::pair< const xAOD::Egamma*, const TrigCompositeUtils::Decision * >>& pairObjs,
969 std::vector< std::pair< const xAOD::Egamma*, const xAOD::EmTauRoI * >> pair_l1_vec;
970 std::vector< std::pair< const xAOD::Egamma*, const TrigCompositeUtils::Decision * >> pair_eg_vec;
971 const std::string trigger = info.trigger;
974 for(
auto pairObj : pairObjs ){
977 const auto *feat = pairObj.second;
984 const auto *l1 =
match()->getL1Feature( ctx, feat );
987 float et =
getEt(el)/Gaudi::Units::GeV;
988 if(
et < info.etthr-5.0)
continue;
989 if(!pidnameDec(*eg))
continue;
990 pair_eg_vec.emplace_back(el,feat);
991 if(l1) pair_l1_vec.emplace_back(eg,l1 );
994 float et = getCluster_et(eg)/Gaudi::Units::GeV;
995 if(
et < info.etthr-5.0)
continue;
996 pair_eg_vec.emplace_back(eg,feat);
997 if(l1) pair_l1_vec.emplace_back(eg,l1 );
1009 if ( info.signature==
"Electron" or info.signature ==
"e"){
1012 else if ( info.signature==
"Photon" or info.signature ==
"g"){
1022 const std::vector< std::pair< const xAOD::Egamma*, const xAOD::EmTauRoI * >>& pairObjs )
const
1024 const auto & monGroup =
getGroup( trigger +
"_Resolutions_L1Calo" );
1026 std::vector<float> eta_vec, res_et_vec;
1032 for (
const auto & pairObj : pairObjs){
1033 const auto *off = pairObj.first;
1034 const auto *l1 = pairObj.second;
1038 eta_vec.push_back( l1->eta() );
1039 res_et_vec.push_back( (l1->emClus()-
getEt(eloff))/
getEt(eloff) ) ;
1044 fill( monGroup, eta_col, res_et_col );
1052 const std::vector< std::pair< const xAOD::Egamma*, const xAOD::EmTauRoI * >>& pairObjs )
const
1054 const auto & monGroup =
getGroup( trigger +
"_AbsResolutions_L1Calo" );
1056 std::vector<float> eta_vec, res_et_vec;
1062 for (
const auto & pairObj : pairObjs){
1063 const auto *off = pairObj.first;
1064 const auto *l1 = pairObj.second;
1068 eta_vec.push_back( l1->eta() );
1069 res_et_vec.push_back( (l1->emClus()-
getEt(eloff))/Gaudi::Units::GeV ) ;
1073 fill( monGroup, eta_col, res_et_col );
1080 const std::vector< std::pair< const xAOD::Egamma*, const TrigCompositeUtils::Decision * >>& pairObjs,
1084 const auto & monGroup =
getGroup( trigger +
"_Resolutions_HLT" );
1086 std::vector<float> res_pt_vec, res_et_vec, res_phi_vec, res_eta_vec, res_deta1_vec, res_deta2_vec, res_dphi2_vec, res_dphiresc_vec,
1087 res_z0_vec, res_d0_vec, res_d0sig_vec, res_eprobht_vec, res_npixhits_vec, res_nscthits_vec, res_Rhad_vec, res_Rhad1_vec, res_Reta_vec,
1088 res_Rphi_vec, res_weta1_vec, res_weta2_vec, res_wtots1_vec, res_f1_vec, res_f3_vec, res_eratio_vec, res_ethad_vec, res_ethad1_vec,
1089 et_vec, eta_vec, mu_vec, pt_vec;
1090 std::vector<float> res_ptcone20_vec, res_ptcone20_rel_vec, res_ptvarcone20_vec, res_ptvarcone20_rel_vec;
1091 std::vector<float> res_etInEta0_vec, res_etInEta1_vec, res_etInEta2_vec, res_etInEta3_vec;
1136 auto res_ptvarcone20_rel_col =
Monitored::Collection(
"res_ptvarcone20_rel" , res_ptvarcone20_rel_vec );
1144 std::string key =
match()->key(
"Electrons_GSF");
1145 if(info.nogsf) key =
match()->key(
"Electrons");
1146 if(info.lrt) key =
match()->key(
"Electrons_LRT");
1148 for (
const auto & pairObj : pairObjs ){
1155 float maxDeltaR=0.05;
1157 for(
auto &featLinkInfo :
vec ){
1158 if(! featLinkInfo.isValid() )
continue;
1159 const auto *feat = *(featLinkInfo.link);
1161 float deltaR =
dR( off->
eta(), off->
phi(), feat->eta(), feat->phi() );
1172 const float onl_eta=onl->eta();
1173 const float feta = abs(onl_eta);
1174 const float onl_et =
getEt(onl)/Gaudi::Units::GeV;
1176 const float dummy=-999;
1178 eta_vec.push_back( onl_eta );
1179 et_vec.push_back( onl_et );
1180 mu_vec.push_back( avgmu );
1182 val_off=getTrack_pt(off);
1184 res_pt_vec.push_back( (getTrack_pt(off)-val_off)/val_off );
1191 res_et_vec.push_back( (
getEt(onl)-val_off)/val_off );
1193 res_etInEta0_vec.push_back((
getEt(onl)-val_off)/val_off);
1194 else if( feta >=1.37 && feta <= 1.52 )
1195 res_etInEta1_vec.push_back((
getEt(onl)-val_off)/val_off);
1196 else if( feta >= 1.55 && feta < 1.8 )
1197 res_etInEta2_vec.push_back((
getEt(onl)-val_off)/val_off);
1198 else if( feta >= 1.8 && feta < 2.45 )
1199 res_etInEta3_vec.push_back((
getEt(onl)-val_off)/val_off);
1204 res_eta_vec.push_back( (onl_eta-val_off)/val_off );
1206 res_eta_vec.push_back( dummy );
1211 res_phi_vec.push_back( (onl->phi()-val_off)/val_off );
1213 res_phi_vec.push_back(dummy );
1216 val_off=getShowerShape_ethad(off);
1218 res_ethad_vec.push_back((getShowerShape_ethad(onl)-val_off)/val_off);
1220 res_ethad_vec.push_back( dummy );
1223 val_off=getShowerShape_ethad1(off);
1225 res_ethad1_vec.push_back((getShowerShape_ethad1(onl)-val_off)/val_off);
1227 res_ethad1_vec.push_back( dummy);
1230 val_off=getShowerShape_Rhad(off);
1232 res_Rhad_vec.push_back( (getShowerShape_Rhad(onl)-val_off)/val_off );
1234 res_Rhad_vec.push_back( dummy );
1237 val_off=getShowerShape_Rhad1(off);
1239 res_Rhad1_vec.push_back( (getShowerShape_Rhad1(onl)-val_off)/val_off );
1241 res_Rhad1_vec.push_back( dummy );
1244 val_off=getShowerShape_Reta(off);
1246 res_Reta_vec.push_back( (getShowerShape_Reta(onl)-val_off)/val_off );
1248 res_Reta_vec.push_back( dummy );
1251 val_off=getShowerShape_Rphi(off);
1253 res_Rphi_vec.push_back( (getShowerShape_Rphi(onl)-val_off)/val_off );
1255 res_Rphi_vec.push_back( dummy);
1258 val_off=getShowerShape_weta1(off);
1260 res_weta1_vec.push_back( (getShowerShape_weta1(onl)-val_off)/val_off );
1262 res_weta1_vec.push_back( dummy );
1265 val_off=getShowerShape_weta2(off);
1267 res_weta2_vec.push_back( (getShowerShape_weta2(onl)-val_off)/val_off );
1269 res_weta2_vec.push_back( dummy );
1272 val_off=getShowerShape_wtots1(off);
1274 res_wtots1_vec.push_back( (getShowerShape_wtots1(onl)-val_off)/val_off );
1276 res_wtots1_vec.push_back( dummy );
1279 val_off=getShowerShape_f1(off);
1281 res_f1_vec.push_back( (getShowerShape_f1(onl)-val_off)/val_off );
1283 res_f1_vec.push_back(dummy );
1286 val_off=getShowerShape_f3(off);
1288 res_f3_vec.push_back( (getShowerShape_f3(onl)-val_off)/val_off );
1290 res_f3_vec.push_back( dummy );
1293 val_off=getShowerShape_Eratio(off);
1295 res_eratio_vec.push_back( (getShowerShape_Eratio(onl)-val_off)/val_off );
1297 res_eratio_vec.push_back( dummy );
1305 val_off=getTrack_pt(off);
1307 res_pt_vec.push_back( (getTrack_pt(onl)-val_off)/val_off );
1309 res_pt_vec.push_back( dummy );
1314 res_et_vec.push_back( (
getEt(onl)-val_off)/val_off );
1316 res_et_vec.push_back( dummy );
1319 val_off=getCaloTrackMatch_deltaEta1(off);
1321 res_deta1_vec.push_back( (getCaloTrackMatch_deltaEta1(onl)-val_off)/val_off );
1323 res_deta1_vec.push_back( dummy );
1326 val_off=getCaloTrackMatch_deltaEta2(off);
1327 res_deta2_vec.push_back( (getCaloTrackMatch_deltaEta2(onl)-val_off)/val_off );
1328 val_off=getCaloTrackMatch_deltaPhi2(off);
1330 res_dphi2_vec.push_back( (getCaloTrackMatch_deltaPhi2(onl)-val_off)/val_off );
1332 res_dphi2_vec.push_back(dummy );
1335 val_off=getCaloTrackMatch_deltaPhiRescaled2(off);
1336 res_dphiresc_vec.push_back( (getCaloTrackMatch_deltaPhiRescaled2(onl)-val_off)/val_off );
1338 val_off=getTrack_z0(off);
1340 res_z0_vec.push_back( getTrack_z0(onl)-val_off );
1342 res_z0_vec.push_back( dummy );
1346 val_off=getTrack_d0(off);
1348 res_d0_vec.push_back( getTrack_d0(onl)-val_off );
1350 res_d0_vec.push_back( dummy );
1355 res_d0sig_vec.push_back(
getD0sig(onl)-val_off );
1357 res_d0sig_vec.push_back( dummy );
1361 val_off=getTrackSummaryFloat_eProbabilityHT(off);
1362 res_eprobht_vec.push_back( (getTrackSummaryFloat_eProbabilityHT(onl)-val_off) );
1363 res_npixhits_vec.push_back( getTrackSummary_numberOfPixelHits(onl)-getTrackSummary_numberOfPixelHits(onl) );
1364 res_nscthits_vec.push_back( getTrackSummary_numberOfSCTHits(onl)-getTrackSummary_numberOfSCTHits(onl) );
1371 float val_off=getIsolation_ptcone20(off);
1373 res_ptcone20_vec.push_back((getIsolation_ptcone20(onl)-val_off)/val_off);
1375 const float reliso_onl=getIsolation_ptcone20(onl)/
getEt(onl);
1376 const float reliso_off=getIsolation_ptcone20(off)/
getEt(off);
1377 res_ptcone20_rel_vec.push_back((reliso_onl-reliso_off)/reliso_off);
1379 res_ptcone20_rel_vec.push_back(dummy);
1382 res_ptcone20_vec.push_back(dummy);
1383 res_ptcone20_rel_vec.push_back(dummy);
1387 val_off=getIsolation_ptvarcone20(off);
1390 res_ptvarcone20_vec.push_back((getIsolation_ptvarcone20(onl)-val_off)/val_off);
1391 const float reliso_onl=getIsolation_ptvarcone20(onl)/
getEt(onl);
1392 const float reliso_off=getIsolation_ptvarcone20(off)/
getEt(off);
1393 res_ptvarcone20_rel_vec.push_back((reliso_onl-reliso_off)/reliso_off);
1395 res_ptvarcone20_rel_vec.push_back(dummy);
1398 res_ptvarcone20_vec.push_back(dummy);
1399 res_ptvarcone20_rel_vec.push_back(dummy);
1443 res_ptcone20_rel_col ,
1444 res_ptvarcone20_col ,
1445 res_ptvarcone20_rel_col ,
1460 const std::vector< std::pair< const xAOD::Egamma*, const TrigCompositeUtils::Decision * >>& pairObjs,
1464 const auto & monGroup =
getGroup( trigger +
"_Resolutions_HLT" );
1466 std::vector<float> res_phi_vec, res_eta_vec, res_Rhad_vec, res_Rhad1_vec, res_Reta_vec, res_ethad_vec, res_ethad1_vec,
1467 res_Rphi_vec, res_weta1_vec, res_weta2_vec, res_wtots1_vec, res_f1_vec, res_f3_vec, res_eratio_vec, et_vec, eta_vec, mu_vec;
1469 std::vector<float> res_et_vec, res_et_cnv_vec, res_et_uncnv_vec, res_cnv_et_vec, res_uncnv_et_vec;
1470 std::vector<float> res_etInEta0_vec, res_etInEta1_vec, res_etInEta2_vec, res_etInEta3_vec;
1471 std::vector<float> res_cnv_etInEta0_vec, res_cnv_etInEta1_vec, res_cnv_etInEta2_vec, res_cnv_etInEta3_vec;
1472 std::vector<float> res_uncnv_etInEta0_vec, res_uncnv_etInEta1_vec, res_uncnv_etInEta2_vec, res_uncnv_etInEta3_vec;
1476 std::vector<float> res_topoetcone20_vec, res_topoetcone20_rel_vec;
1512 auto res_uncnv_etInEta0_col =
Monitored::Collection(
"res_uncnv_etInEta0" , res_uncnv_etInEta0_vec);
1513 auto res_uncnv_etInEta1_col =
Monitored::Collection(
"res_uncnv_etInEta1" , res_uncnv_etInEta1_vec);
1514 auto res_uncnv_etInEta2_col =
Monitored::Collection(
"res_uncnv_etInEta2" , res_uncnv_etInEta2_vec);
1515 auto res_uncnv_etInEta3_col =
Monitored::Collection(
"res_uncnv_etInEta3" , res_uncnv_etInEta3_vec);
1519 auto res_topoetcone20_rel_col =
Monitored::Collection(
"res_topoetcone20_rel" , res_topoetcone20_rel_vec );
1529 for (
const auto & pairObj : pairObjs ){
1536 float maxDeltaR=0.05;
1537 static const std::string photonsStr{
"Photons"};
1539 for(
auto &featLinkInfo :
vec ){
1540 if(! featLinkInfo.isValid() )
continue;
1541 const auto *feat = *(featLinkInfo.link);
1543 float deltaR =
dR( off->
eta(), off->
phi(), feat->eta(), feat->phi() );
1555 const float onl_eta=onl->eta();
1556 const float feta = abs(onl_eta);
1557 const float onl_et = getCluster_et(onl)/Gaudi::Units::GeV;
1558 const float dummy=-999;
1561 et_vec.push_back( onl_et );
1562 eta_vec.push_back( onl_eta );
1563 mu_vec.push_back( avgmu );
1566 val_off=getCluster_et(off);
1568 res_et_vec.push_back( (getCluster_et(onl)-val_off)/val_off );
1570 res_etInEta0_vec.push_back((getCluster_et(onl)-val_off)/val_off);
1571 else if( feta >=1.37 && feta <= 1.52 )
1572 res_etInEta1_vec.push_back((getCluster_et(onl)-val_off)/val_off);
1573 else if( feta >= 1.55 && feta < 1.8 )
1574 res_etInEta2_vec.push_back((getCluster_et(onl)-val_off)/val_off);
1575 else if( feta >= 1.8 && feta < 2.45 )
1576 res_etInEta3_vec.push_back((getCluster_et(onl)-val_off)/val_off);
1579 res_et_cnv_vec.push_back((getCluster_et(onl)-val_off)/val_off);
1581 res_cnv_etInEta0_vec.push_back((getCluster_et(onl)-val_off)/val_off);
1582 else if( feta >=1.37 && feta <= 1.52 )
1583 res_cnv_etInEta1_vec.push_back((getCluster_et(onl)-val_off)/val_off);
1584 else if( feta >= 1.55 && feta < 1.8 )
1585 res_cnv_etInEta2_vec.push_back((getCluster_et(onl)-val_off)/val_off);
1586 else if( feta >= 1.8 && feta < 2.45 )
1587 res_cnv_etInEta3_vec.push_back((getCluster_et(onl)-val_off)/val_off);
1589 res_et_uncnv_vec.push_back((getCluster_et(onl)-val_off)/val_off);
1591 res_uncnv_etInEta0_vec.push_back((getCluster_et(onl)-val_off)/val_off);
1592 else if( feta >=1.37 && feta <= 1.52 )
1593 res_uncnv_etInEta1_vec.push_back((getCluster_et(onl)-val_off)/val_off);
1594 else if( feta >= 1.55 && feta < 1.8 )
1595 res_uncnv_etInEta2_vec.push_back((getCluster_et(onl)-val_off)/val_off);
1596 else if( feta >= 1.8 && feta < 2.45 )
1597 res_uncnv_etInEta3_vec.push_back((getCluster_et(onl)-val_off)/val_off);
1603 res_eta_vec.push_back( (onl_eta-val_off)/val_off ) ;
1605 res_eta_vec.push_back( dummy ) ;
1610 res_phi_vec.push_back( (onl->phi()-val_off)/val_off );
1612 res_phi_vec.push_back(dummy );
1615 val_off=getShowerShape_ethad(off);
1617 res_ethad_vec.push_back((getShowerShape_ethad(onl)-val_off)/val_off);
1619 res_ethad_vec.push_back(dummy);
1622 val_off=getShowerShape_ethad1(off);
1624 res_ethad1_vec.push_back((getShowerShape_ethad1(onl)-val_off)/val_off);
1626 res_ethad1_vec.push_back(dummy);
1629 val_off=getShowerShape_Rhad(off);
1631 res_Rhad_vec.push_back( (getShowerShape_Rhad(onl)-val_off)/val_off );
1633 res_Rhad_vec.push_back(dummy );
1636 val_off=getShowerShape_Rhad1(off);
1638 res_Rhad1_vec.push_back( (getShowerShape_Rhad1(onl)-val_off)/val_off );
1640 res_Rhad1_vec.push_back(dummy );
1643 val_off=getShowerShape_Reta(off);
1645 res_Reta_vec.push_back( (getShowerShape_Reta(onl)-val_off)/val_off );
1647 res_Reta_vec.push_back( dummy );
1650 val_off=getShowerShape_Rphi(off);
1652 res_Rphi_vec.push_back( (getShowerShape_Rphi(onl)-val_off)/val_off );
1654 res_Rphi_vec.push_back(dummy );
1657 val_off=getShowerShape_weta1(off);
1659 res_weta1_vec.push_back( (getShowerShape_weta1(onl)-val_off)/val_off );
1661 res_weta1_vec.push_back( dummy );
1664 val_off=getShowerShape_weta2(off);
1666 res_weta2_vec.push_back( (getShowerShape_weta2(onl)-val_off)/val_off );
1668 res_weta2_vec.push_back(dummy);
1671 val_off=getShowerShape_wtots1(off);
1673 res_wtots1_vec.push_back( (getShowerShape_wtots1(onl)-val_off)/val_off );
1675 res_wtots1_vec.push_back( dummy );
1678 val_off=getShowerShape_f1(off);
1680 res_f1_vec.push_back( (getShowerShape_f1(onl)-val_off)/val_off );
1682 res_f1_vec.push_back( dummy );
1685 val_off=getShowerShape_f3(off);
1687 res_f3_vec.push_back( (getShowerShape_f3(onl)-val_off)/val_off );
1689 res_f3_vec.push_back( dummy );
1692 val_off=getShowerShape_Eratio(off);
1694 res_eratio_vec.push_back( (getShowerShape_Eratio(onl)-val_off)/val_off);
1696 res_eratio_vec.push_back( dummy);
1700 if( info.isolated ){
1702 float val_off=getIsolation_topoetcone20(off);
1703 float etonl=onl->pt();
1704 float etoff=off->
pt();
1706 res_topoetcone20_vec.push_back((getIsolation_topoetcone20(onl)-val_off)/val_off);
1707 if (etonl > 0. && etoff > 0.) {
1708 const float reliso_onl=getIsolation_topoetcone20(onl)/etonl;
1709 const float reliso_off=getIsolation_topoetcone20(off)/etoff;
1710 res_topoetcone20_rel_vec.push_back((reliso_onl-reliso_off)/reliso_off);
1712 res_topoetcone20_rel_vec.push_back(dummy);
1715 res_topoetcone20_vec.push_back(dummy);
1716 res_topoetcone20_rel_vec.push_back(dummy);
1744 res_topoetcone20_col ,
1745 res_topoetcone20_rel_col ,
1751 res_cnv_etInEta0_col,
1752 res_cnv_etInEta1_col,
1753 res_cnv_etInEta2_col,
1754 res_cnv_etInEta3_col,
1758 res_uncnv_etInEta0_col,
1759 res_uncnv_etInEta1_col,
1760 res_uncnv_etInEta2_col,
1761 res_uncnv_etInEta3_col
1770 const std::vector< std::pair< const xAOD::Egamma*, const TrigCompositeUtils::Decision * >>& pairObjs )
const
1775 const auto & monGroup =
getGroup( trigger +
"_Resolutions_L2Calo" );
1777 std::vector<float> res_et_vec, res_phi_vec, res_eta_vec, res_Rhad_vec, res_Rhad1_vec, res_Reta_vec, res_ethad_vec, res_ethad1_vec,
1778 res_Rphi_vec, res_weta2_vec, res_f1_vec, res_f3_vec, res_eratio_vec, et_vec, eta_vec, res_etVsEt_vec;
1801 for (
const auto & pairObj : pairObjs ){
1808 float maxDeltaR=0.05;
1809 static const std::string fastCaloStr{
"FastCalo"};
1811 for(
auto &featLinkInfo :
vec ){
1812 if(! featLinkInfo.isValid() )
continue;
1813 const auto *feat = *(featLinkInfo.link);
1815 float deltaR =
dR( off->
eta(), off->
phi(), feat->eta(), feat->phi() );
1825 et_vec.push_back(onl->et()*1e-3);
1826 eta_vec.push_back(onl->eta());
1827 const float dummy=-999;
1833 res_et_vec.push_back(((onl->et())-val_off)/val_off);
1835 res_et_vec.push_back(dummy);
1840 res_eta_vec.push_back((onl->eta()-val_off)/val_off);
1842 res_eta_vec.push_back(dummy);
1847 res_phi_vec.push_back((onl->phi()-val_off)/val_off);
1849 res_phi_vec.push_back(dummy);
1852 float elonl_ethad = onl->energy( CaloSampling::HEC0 ); elonl_ethad += onl->energy( CaloSampling::HEC1 );
1853 elonl_ethad += onl->energy( CaloSampling::HEC2 ); elonl_ethad += onl->energy( CaloSampling::HEC3 );
1854 elonl_ethad += onl->energy( CaloSampling::TileBar0 ); elonl_ethad += onl->energy( CaloSampling::TileExt0 );
1855 elonl_ethad += onl->energy( CaloSampling::TileBar1 ); elonl_ethad += onl->energy( CaloSampling::TileExt1 );
1856 elonl_ethad += onl->energy( CaloSampling::TileBar2 ); elonl_ethad += onl->energy( CaloSampling::TileExt2 );
1857 elonl_ethad /= TMath::CosH(onl->eta() );
1858 val_off=getShowerShape_ethad(off);
1860 res_ethad_vec.push_back((elonl_ethad-val_off)/val_off);
1862 res_ethad_vec.push_back(dummy);
1865 val_off=getShowerShape_ethad1(off);
1867 res_ethad1_vec.push_back(( (onl->ehad1()/TMath::Abs(onl->eta()) )-val_off)/val_off);
1869 res_ethad1_vec.push_back(dummy);
1872 float elonl_Rhad = elonl_ethad / onl->energy() ;
1873 val_off=getShowerShape_Rhad(off);
1875 res_Rhad_vec.push_back(( elonl_Rhad-val_off)/val_off);
1877 res_Rhad_vec.push_back(dummy);
1880 float elonl_Rhad1 = onl->ehad1() / onl->energy() ;
1881 val_off=getShowerShape_Rhad1(off);
1883 res_Rhad1_vec.push_back(( elonl_Rhad1-val_off)/val_off);
1885 res_Rhad1_vec.push_back(dummy);
1888 float onl_reta= 999.0;
1889 if ( fabsf ( onl->e277() ) > 0.01 ) onl_reta = onl->e237() / onl->e277();
1890 val_off=getShowerShape_Reta(off);
1892 res_Reta_vec.push_back( (onl_reta -val_off)/val_off);
1894 res_Reta_vec.push_back(dummy);
1897 val_off=getShowerShape_weta2(off);
1899 res_weta2_vec.push_back(( (onl->weta2())-val_off)/val_off);
1901 res_weta2_vec.push_back(dummy);
1904 float onl_f1 = onl->energy(CaloSampling::EMB1)+onl->energy(CaloSampling::EME1);
1905 onl_f1 /= onl->energy();
1906 val_off=getShowerShape_f1(off);
1908 res_f1_vec.push_back(( (onl_f1)-val_off)/val_off);
1910 res_f1_vec.push_back(dummy);
1913 float onl_f3 = onl->energy(CaloSampling::EMB3)+onl->energy(CaloSampling::EME3);
1914 onl_f3 /= onl->energy();
1915 val_off=getShowerShape_f3(off);
1917 res_f3_vec.push_back(( (onl_f3)-val_off)/val_off);
1919 res_f3_vec.push_back(dummy);
1922 float onl_eratio = 999.0;
1923 if ( fabsf(onl->emaxs1() + onl->e2tsts1()) > 0.01 )
1924 onl_eratio = (onl->emaxs1() - onl->e2tsts1()) / (onl->emaxs1() + onl->e2tsts1());
1925 val_off=getShowerShape_Eratio(off);
1927 res_eratio_vec.push_back(( (onl_eratio)-val_off)/val_off);
1929 res_eratio_vec.push_back(dummy);
Scalar eta() const
pseudorapidity method
Scalar deltaR(const MatrixBase< Derived > &vec) const
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_INFO(x,...)
std::vector< size_t > vec
Helper class to provide type-safe access to aux data.
const ToolHandle< GenericMonitoringTool > & getGroup(std::string_view name) const
Get a specific monitoring tool from the tool handle array.
Declare a monitored scalar variable.
void fillEfficiencies(const EventContext &ctx, const std::vector< std::pair< const xAOD::Egamma *, const TrigCompositeUtils::Decision * > > &, const TrigInfo &, const bool) const
void fillTracking(const EventContext &ctx, const std::string &trigger, const std::vector< const xAOD::Electron * > &eg_vec, bool online) const
void fillEFCalo(const std::string &trigger, const std::vector< const xAOD::CaloCluster * > &clus_vec) const
void fillShowerShapes(const std::string &trigger, const std::vector< const xAOD::Egamma * > &eg_vec, bool online) const
void fillL2Calo(const std::string &trigger, const std::vector< const xAOD::TrigEMCluster * > &emCluster_vec) const
virtual StatusCode initialize() override
initialize
void fillL1eEM(const std::string &trigger, const std::vector< const xAOD::eFexEMRoI * > &l1_vec) const
void fillHLTPhotonResolution(const EventContext &ctx, const std::string &trigger, const std::vector< std::pair< const xAOD::Egamma *, const TrigCompositeUtils::Decision * > > &pairObjs, const TrigInfo &info) const
void fillHLTElectronResolution(const EventContext &ctx, const std::string &trigger, const std::vector< std::pair< const xAOD::Egamma *, const TrigCompositeUtils::Decision * > > &pairObjs, const TrigInfo &info) const
void fillL1CaloAbsResolution(const std::string &trigger, const std::vector< std::pair< const xAOD::Egamma *, const xAOD::EmTauRoI * > > &pairObjs) const
void fillL2CaloResolution(const std::string &trigger, const std::vector< std::pair< const xAOD::Egamma *, const TrigCompositeUtils::Decision * > > &pairObjs) const
TrigEgammaMonitorAnalysisAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
virtual ~TrigEgammaMonitorAnalysisAlgorithm() override
void fillEfficiency(const EventContext &ctx, const std::string &subgroup, const std::string &level, const std::string &pidword, const TrigInfo &info, const std::vector< std::pair< const xAOD::Egamma *, const TrigCompositeUtils::Decision * > > &pairObjs, const std::vector< asg::AcceptData > &acceptObjs, const std::string &dirname) const
void fillL1CaloResolution(const std::string &trigger, const std::vector< std::pair< const xAOD::Egamma *, const xAOD::EmTauRoI * > > &pairObjs) const
void fillL2Photon(const std::string &trigger, const std::vector< const xAOD::TrigPhoton * > &eg_vec) const
void fillInefficiency(const std::string &pidword, const TrigInfo &info, const std::vector< std::pair< const xAOD::Egamma *, const TrigCompositeUtils::Decision * > > &pairObjs, const std::vector< asg::AcceptData > &acceptObjs) const
void fillL2Electron(const std::string &trigger, const std::vector< const xAOD::TrigElectron * > &el_vec) const
void fillDistributions(const EventContext &ctx, const std::vector< std::pair< const xAOD::Egamma *, const TrigCompositeUtils::Decision * > > &, const TrigInfo &) const
void fillResolutions(const EventContext &ctx, const std::vector< std::pair< const xAOD::Egamma *, const TrigCompositeUtils::Decision * > > &pairObjs, const TrigInfo &info) const
*****************************************************************************************************...
void fillLabel(const ToolHandle< GenericMonitoringTool > &groupHandle, const std::string &histname, const std::string &label) const
void fillL1Calo(const std::string &trigger, const std::vector< const xAOD::EmTauRoI * > &l1_vec) const
Gaudi::Property< std::vector< std::string > > m_isemname
isem names
TrigEgammaMonitorBaseAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
const ToolHandle< TrigEgammaMatchingToolMT > & match() const
Get the e/g match tool.
float dR(const float, const float, const float, const float) const
Get delta R.
Gaudi::Property< bool > m_detailedHists
Include more detailed histograms.
const ToolHandle< Trig::TrigDecisionTool > & tdt() const
Get the TDT.
Gaudi::Property< bool > m_doEmulation
Do emulation.
float getEt(const xAOD::Electron *eg) const
asg::AcceptData setAccept(const EventContext &ctx, const TrigCompositeUtils::Decision *, const TrigInfo &, const bool) const
Set the accept object for all trigger levels.
Gaudi::Property< std::vector< std::string > > m_lhname
lh names
virtual StatusCode initialize() override
initialize
float getD0sig(const xAOD::Electron *eg) const
ToolHandle< Trig::TrigEgammaEmulationToolMT > m_emulatorTool
virtual double eta() const
The pseudorapidity ( ) of the particle.
virtual double phi() const
The azimuthal angle ( ) of the particle.
@ ETACALOFRAME
Eta in the calo frame (for egamma).
@ PHICALOFRAME
Phi in the calo frame (for egamma).
virtual double pt() const override final
The transverse momentum ( ) of the particle.
virtual Type::ObjectType type() const override=0
The type of the object as a simple enumeration, remains pure virtual in e/gamma.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
const xAOD::CaloCluster * caloCluster(size_t index=0) const
Pointer to the xAOD::CaloCluster/s that define the electron candidate.
void fill(const ToolHandle< GenericMonitoringTool > &groupHandle, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable > > &&variables) const
Fills a vector of variables to a group by reference.
virtual float lbAverageInteractionsPerCrossing(const EventContext &ctx) const
Calculate the average mu, i.e.
std::string label(const std::string &format, int i)
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
SG::Decorator< T, ALLOC > Decorator
Helper class to provide type-safe access to aux data, specialized for JaggedVecElt.
xAOD::TrigComposite Decision
static const unsigned int EF_prescaled
static const unsigned int L1_isPassedAfterVeto
static const unsigned int allFeaturesOfType
Run 3 "enum". Return all features along legs (still with type and container checks).
static const unsigned int Physics
@ Photon
The object is a photon.
@ Electron
The object is an electron.
bool isConvertedPhoton(const xAOD::Egamma *eg, bool excludeTRT=false)
is the object a converted photon
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
PhotonContainer_v1 PhotonContainer
Definition of the current "photon container version".
TrigElectronContainer_v1 TrigElectronContainer
Declare the latest version of the container.
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
TrigEMClusterContainer_v1 TrigEMClusterContainer
Define the latest version of the trigger EM cluster container.
TrigPhotonContainer_v1 TrigPhotonContainer
Declare the latest version of the container.
Egamma_v1 Egamma
Definition of the current "egamma version".
TrigEMCluster_v1 TrigEMCluster
Define the latest version of the trigger EM cluster class.
Photon_v1 Photon
Definition of the current "egamma version".
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.
Electron_v1 Electron
Definition of the current "egamma version".
Extra patterns decribing particle interation process.
std::string dirname(std::string name)