From c36a5f94f5eb963154b90d067d815be4463eb821 Mon Sep 17 00:00:00 2001
From: James Richard Catmore <james.catmore@cern.ch>
Date: Tue, 5 Dec 2017 09:23:33 +0100
Subject: [PATCH] Fix for ATLASRECTS-3861

The DerivationFramework SlimmingHelper, which is used by a number of performance DPDs made at Tier-0, imports a python fragment that builds xAOD truth when it encounters the GEN_EVENT container. This fragment is normally used for TRUTH format making and is called by the slimming helper for adding certain truth branches. However, in performance DPDs the input is transient ESD, and the xAOD truth has already been run. So there is a conflict as the truth metadata is written and a crash, reported in ATLASRECTS-3861. This MR by-passes this issue by removing the import of the truth-building fragment. Note that in newer versions of the SlimmingHelper used in 21.2, this import was dropped anyway, but it is part of a much bigger set of changes that we aren't ready to import to 21.0 at this stage.


Former-commit-id: 7885d264ea0044f4a8dcd652464e75f74a994607
---
 .../DerivationFrameworkCore/python/SlimmingHelper.py         | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.py
index 22acc77c344..1300fdcf76f 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.py
@@ -64,8 +64,9 @@ class lockable_list(list):
                 self.__dict__["_locked"] = True
 
 ###This Include builds some Truth Information needed by the smart slimming list
-if globalflags.DataSource()=='geant4':
-	from DerivationFrameworkMCTruth.MCTruthCommon import *
+# Commented out for 21.0 to avoid problems with DAOD_IDTRKVALID - see ATLASRECTS-3861
+#if globalflags.DataSource()=='geant4':
+#	from DerivationFrameworkMCTruth.MCTruthCommon import *
 
 
 def buildNamesAndTypes():
-- 
GitLab