19 return StatusCode::SUCCESS;
24 constexpr
float threshold_offset = 10.0;
33 const std::vector<const xAOD::eFexTauRoI*> xtob_etau_rois =
getL1xTOBeTAUs();
38 if(!
info.isL1TauOnly()) {
39 ATH_MSG_WARNING(
"Chain \"" << trigger <<
"\" is not an L1 tau trigger. Skipping...");
45 std::vector<const xAOD::TauJet*> offline_taus_1p = offline_taus.first;
46 std::vector<const xAOD::TauJet*> offline_taus_3p = offline_taus.second;
48 if(
info.getL1TauType() ==
"eTAU") {
57 }
else if(
info.getL1TauType() ==
"jTAU") {
66 }
else if(
info.getL1TauType() ==
"cTAU") {
67 std::vector<std::pair<const xAOD::eFexTauRoI*, const xAOD::jFexTauRoI*>>
rois =
getL1cTAUs(ctx,
info.getL1TauItem());
69 std::vector<const xAOD::eFexTauRoI*> eTau_rois;
70 eTau_rois.reserve(
rois.size());
71 for(
const auto& [eTau_roi, jTau_roi] :
rois) eTau_rois.push_back(eTau_roi);
82 return StatusCode::SUCCESS;
98 fill(
monGroup, L1RoIEt, L1RoIEta, L1RoIPhi, L1RoIRCore, L1RoIRHad, L1RoIBDTScore);
115 fill(
monGroup, L1RoIEt, L1RoIEta, L1RoIPhi, L1jFexRoIIso);
131 auto L1eFexRoIRCore =
Monitored::Collection(
"L1eFexRoIRCore",
rois, [](
const auto L1roi){
return L1roi.first->rCore(); });
135 std::vector<bool> jFex_isMatched;
136 std::vector<float> jFex_eFex_et_ratio;
137 std::vector<float> jFex_isolation;
138 std::vector<float> cTau_isolation;
139 for(
const auto& [eFexRoI, jFexRoI] :
rois) {
141 jFex_isMatched.push_back(
false);
145 jFex_isMatched.push_back(
true);
146 jFex_eFex_et_ratio.push_back(jFexRoI->et()/eFexRoI->et());
148 cTau_isolation.push_back(jFexRoI->iso()/eFexRoI->et());
155 fill(
monGroup, L1RoIEt, L1RoIEta, L1RoIPhi, L1eFexRoIRCore, L1eFexRoIRHad, L1cTauRoITopoMatch, L1jFexRoIIso, L1cTauRoIIso, L1RoIcTauEtRatio, L1RoIBDTScore );
162 std::vector<const xAOD::eFexTauRoI*> roi_vec;
167 if(!
rois.isValid()) {
168 ATH_MSG_WARNING(
"The L1_eTauxRoI container is not available! No e/cTAU BDT score will be retrieved");
178 if(xtob_rois.empty())
return 0;
181 if(xroi->eta() == roi->
eta() && xroi->phi() == roi->
phi())
return xroi->bdtScore();
183 ATH_MSG_DEBUG(
"Unmatched RoI! et=" << roi->
et() <<
", eta=" << roi->
eta() <<
", phi=" << roi->
phi());
185 ATH_MSG_DEBUG(
" - xRoI et=" << xroi->et() <<
", eta=" << xroi->eta() <<
", phi=" << xroi->phi());