From c4dea8260960d1aedc8eef9888b559022e671308 Mon Sep 17 00:00:00 2001
From: Teng Jian Khoo <khoo@lxplus786.cern.ch>
Date: Fri, 15 May 2020 20:43:50 +0200
Subject: [PATCH] Add LBMuWriter to JetRecTestCfg

---
 Reconstruction/Jet/JetRecConfig/share/JetRecTestCfg.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/Reconstruction/Jet/JetRecConfig/share/JetRecTestCfg.py b/Reconstruction/Jet/JetRecConfig/share/JetRecTestCfg.py
index eb332bf7503..4a73eacb0b4 100755
--- a/Reconstruction/Jet/JetRecConfig/share/JetRecTestCfg.py
+++ b/Reconstruction/Jet/JetRecConfig/share/JetRecTestCfg.py
@@ -146,7 +146,6 @@ if __name__=="__main__":
     
     # Config flags steer the job at various levels
     from AthenaConfiguration.AllConfigFlags import ConfigFlags
-    ConfigFlags.Input.isMC  = True
     ConfigFlags.Input.Files = args.filesIn.split(",")
 
     # Flags relating to multithreaded execution
@@ -172,6 +171,15 @@ if __name__=="__main__":
     from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
     cfg.merge(PoolReadCfg(ConfigFlags))
 
+    # Nowadays the jet calibration tool requires the EventInfo
+    # to be decorated with lumi info, which is not in Run 2 AODs
+    from LumiBlockComps.LuminosityCondAlgConfig import LuminosityCondAlgCfg
+    cfg.merge(LuminosityCondAlgCfg(ConfigFlags))
+
+    from AthenaConfiguration.ComponentFactory import CompFactory
+    muWriter = CompFactory.LumiBlockMuWriter("LumiBlockMuWriter",LumiDataKey="LuminosityCondData")
+    cfg.addEventAlgo(muWriter,"AthAlgSeq")
+
     # Add the components from our jet reconstruction job
     cfg.merge(JetRecTestCfg(jetdefs,ConfigFlags,args))
 
-- 
GitLab