From 058717da4cab1d815aa92e94b0444e3fdd5e45d5 Mon Sep 17 00:00:00 2001
From: Bertrand Martin <martindl@cern.ch>
Date: Sun, 8 Nov 2020 17:53:44 +0100
Subject: [PATCH] tauRec: fix flag check

Hello,

There was a recent jump in CPU for the first tau algorithm we run, while there was no change in any tool:
https://atlaspmb.web.cern.ch/atlaspmb/arch-mon-fullchain_mc16_ttbar_valid_13tev_25ns_mu40/?test=cpu/master__x86_64-centos7-gcc8-opt#RAWtoESD/tau

I suspect it's due to
https://gitlab.cern.ch/atlas/athena/-/merge_requests/37904/diffs#491ed5996e49b45b60c269a6852c901e7f54cf9c_1026_1022
where rec.doESD should rather be rec.doESD().
As the check fails, we might not be using the cached track-calo extrapolation, which may cause the CPU increase.
I'm running some test to verify this. Results in a few minutes.

Cheers,
Bertrand
---
 Reconstruction/tauRec/python/TauAlgorithmsHolder.py | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/Reconstruction/tauRec/python/TauAlgorithmsHolder.py b/Reconstruction/tauRec/python/TauAlgorithmsHolder.py
index 749c9a83751..4c8da41e0d6 100644
--- a/Reconstruction/tauRec/python/TauAlgorithmsHolder.py
+++ b/Reconstruction/tauRec/python/TauAlgorithmsHolder.py
@@ -1008,13 +1008,9 @@ def getTauVertexCorrection():
 def getParticleCache():
     #If reading from ESD we not create a cache of extrapolations to the calorimeter, so we should signify this by setting the cache key to a null string
     from RecExConfig.RecFlags import rec
-    if rec.doESD is True:
+    if rec.doESD():
         ParticleCache = "ParticleCaloExtension"
-    else : 
+    else: 
         ParticleCache = ""
     
     return ParticleCache
-
-
-
-
-- 
GitLab