From b536cdf666a681685e69043de4f7a55e9359a90e Mon Sep 17 00:00:00 2001 From: Bertrand Martin <martindl@cern.ch> Date: Wed, 9 Dec 2020 19:27:39 +0100 Subject: [PATCH] xAODTau: drop range check on eta and phi Hello, This MR is dropping a range check on tau eta and phi that was introduced because we used to set dummy default values (-1111) for eta and phi for 0-prong and >5-prong taus, leading to eta = NAN upon retrieval. This has been fixed in the reconstruction (ATLTAU-1665), where we no longer set dummy values. So we can now drop the range check in the TauJet interface class, to save a tiny amount of CPU. This MR does not change the reconstruction output. It can wait until 22.0.23 is built. Cheers, Bertrand --- Event/xAOD/xAODTau/Root/TauJet_v3.cxx | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Event/xAOD/xAODTau/Root/TauJet_v3.cxx b/Event/xAOD/xAODTau/Root/TauJet_v3.cxx index b6f641c4e37..ec71140fae7 100644 --- a/Event/xAOD/xAODTau/Root/TauJet_v3.cxx +++ b/Event/xAOD/xAODTau/Root/TauJet_v3.cxx @@ -19,13 +19,6 @@ #include "TauJetAccessors_v3.h" #include "xAODCaloEvent/CaloVertexedTopoCluster.h" -namespace{ - bool - inRange(const double val, const double lo, const double hi){ - return (val>=lo) and (val<=hi); - } - -} namespace xAOD { @@ -112,9 +105,7 @@ namespace xAOD { TauJet_v3::FourMom_t TauJet_v3::p4() const { FourMom_t p4{}; - bool validAnswer = inRange(eta(),-10,10); - validAnswer&= inRange(phi(),-M_PI,+M_PI); - if (validAnswer) p4.SetPtEtaPhiM( pt(), eta(), phi(),m()); + p4.SetPtEtaPhiM( pt(), eta(), phi(),m()); return p4; } -- GitLab