From 5a7f3cac1039676e9ab49d73a006f3ca2625076c Mon Sep 17 00:00:00 2001
From: Antonio De Maria <antonio.de.maria@cern.ch>
Date: Thu, 21 Mar 2024 15:55:02 +0100
Subject: [PATCH 1/4] add TauTrig collection in 24.0 for Trigger validation
 during 2024 rump-up period

---
 .../python/FullListOfSmartContainers.py          |  3 ++-
 .../python/SlimmingHelper.py                     | 15 ++++++++++++---
 .../python/TauTriggerContent.py                  | 16 ++++++++++++++--
 .../DerivationFrameworkPhys/python/PHYS.py       |  2 +-
 4 files changed, 29 insertions(+), 7 deletions(-)

diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/FullListOfSmartContainers.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/FullListOfSmartContainers.py
index 0e67c1b888f0..6157984cf4fd 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/FullListOfSmartContainers.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/FullListOfSmartContainers.py
@@ -64,7 +64,8 @@ def FullListOfSmartContainers(flags=None):
       "HLT_xAOD__TrigVertexCountsContainer_vertexcounts",
       "HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf",
       "HLT_IDVertex_FS",
-      "HLT_IDTrack_FS_FTF"
+      "HLT_IDTrack_FS_FTF",
+      "HLT_TrigTauRecMerged_MVA",
    ]
 
    if flags is not None and flags.Tracking.doPseudoTracking:
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.py
index c74f616c65ed..8abc138df406 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.py
@@ -200,7 +200,12 @@ class SlimmingHelper:
 
                 if (self.IncludeTauTriggerContent is True):
                         triggerContent = True
-                        self.SmartCollections.append("HLT_xAOD__TauJetContainer_TrigTauRecMerged")
+                        if self.flags.Trigger.EDMVersion == 2: 
+                            self.SmartCollections.append("HLT_xAOD__TauJetContainer_TrigTauRecMerged")
+
+                        elif self.flags.Trigger.EDMVersion == 3:
+                            self.SmartCollections.append("HLT_TrigTauRecMerged_MVA")
+
 
                 if (self.IncludeBJetTriggerContent is True):
                         triggerContent = True
@@ -339,6 +344,7 @@ class SlimmingHelper:
 
         # Get all branches associated with all tools needed for this container
         def GetSmartItems(self,collectionName):
+                print("watch me %s" %(collectionName))
                 # Look up what is needed for this container type
                 items = []
                 if collectionName not in FullListOfSmartContainers(self.flags):
@@ -603,8 +609,11 @@ class SlimmingHelper:
                         from DerivationFrameworkCore.EtMissTriggerContent import EtMissTriggerContent
                         items.extend(EtMissTriggerContent)
                 elif collectionName=="HLT_xAOD__TauJetContainer_TrigTauRecMerged":
-                        from DerivationFrameworkCore.TauTriggerContent import TauTriggerContent
-                        items.extend(TauTriggerContent)
+                        from DerivationFrameworkCore.TauTriggerContent import TauTriggerContentRun2
+                        items.extend(TauTriggerContentRun2)
+                elif collectionName=="HLT_TrigTauRecMerged_MVA":
+                        from DerivationFrameworkCore.TauTriggerContent import TauTriggerContentRun3
+                        items.extend(TauTriggerContentRun3)
                 elif collectionName=="HLT_xAOD__BTaggingContainer_HLTBjetFex":
                         from DerivationFrameworkFlavourTag.BJetTriggerContent import BJetTriggerContent
                         items.extend(BJetTriggerContent)
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/TauTriggerContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/TauTriggerContent.py
index 806f6fb87046..62fe872383e6 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/TauTriggerContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/TauTriggerContent.py
@@ -1,8 +1,20 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2014 CERN for the benefit of the ATLAS collaboration
 
-TauTriggerContent = [
+#Run2 collections
+TauTriggerContentRun2 = [
 "HLT_xAOD__TauJetContainer_TrigTauRecMerged",
 "HLT_xAOD__TauJetContainer_TrigTauRecMergedAux.",
 "LVL1EmTauRoIs",
 "LVL1EmTauRoIsAux."
 ]
+
+#Run3 collections
+TauTriggerContentRun3 = [
+"HLT_TrigTauRecMerged_MVA",
+"HLT_TrigTauRecMerged_MVAAux.",
+"L1_eTauRoI",
+"L1_eTauRoIAux.",
+"L1_cTauRoI",
+"L1_cTauRoIAux."
+]
+
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/python/PHYS.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/python/PHYS.py
index b3593174873b..8020911a3991 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/python/PHYS.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/python/PHYS.py
@@ -194,7 +194,7 @@ def PHYSCoreCfg(flags, name_tag='PHYS', StreamName='StreamDAOD_PHYS', TriggerLis
     PHYSSlimmingHelper.IncludeMuonTriggerContent = False
     PHYSSlimmingHelper.IncludeEGammaTriggerContent = False
     PHYSSlimmingHelper.IncludeJetTauEtMissTriggerContent = False
-    PHYSSlimmingHelper.IncludeTauTriggerContent = False
+    PHYSSlimmingHelper.IncludeTauTriggerContent = True
     PHYSSlimmingHelper.IncludeEtMissTriggerContent = False
     PHYSSlimmingHelper.IncludeBJetTriggerContent = False
     PHYSSlimmingHelper.IncludeBPhysTriggerContent = False
-- 
GitLab


From b38e13945802e8d9d2779796ae0605b3c3e1f2f8 Mon Sep 17 00:00:00 2001
From: Antonio De Maria <antonio.de.maria@cern.ch>
Date: Thu, 21 Mar 2024 16:27:53 +0100
Subject: [PATCH 2/4] updates

---
 .../DerivationFrameworkCore/python/SlimmingHelper.py         | 1 -
 .../DerivationFrameworkCore/python/TauTriggerContent.py      | 5 +++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.py
index 8abc138df406..c6ae8859cb19 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.py
@@ -344,7 +344,6 @@ class SlimmingHelper:
 
         # Get all branches associated with all tools needed for this container
         def GetSmartItems(self,collectionName):
-                print("watch me %s" %(collectionName))
                 # Look up what is needed for this container type
                 items = []
                 if collectionName not in FullListOfSmartContainers(self.flags):
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/TauTriggerContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/TauTriggerContent.py
index 62fe872383e6..9132f665e595 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/TauTriggerContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/TauTriggerContent.py
@@ -12,9 +12,14 @@ TauTriggerContentRun2 = [
 TauTriggerContentRun3 = [
 "HLT_TrigTauRecMerged_MVA",
 "HLT_TrigTauRecMerged_MVAAux.",
+"LVL1EmTauRoIs",
+"LVL1EmTauRoIsAux.",
 "L1_eTauRoI",
 "L1_eTauRoIAux.",
+"L1_eTauRoIAuxDyn.thresholdPatterns",
 "L1_cTauRoI",
 "L1_cTauRoIAux."
+"L1_cTauRoIAuxDyn.thresholdPatterns",
+
 ]
 
-- 
GitLab


From fa8666d13096022446c2143efee782f78b0c8760 Mon Sep 17 00:00:00 2001
From: Antonio De Maria <antonio.de.maria@cern.ch>
Date: Thu, 21 Mar 2024 16:36:08 +0100
Subject: [PATCH 3/4] minor refinement

---
 .../DerivationFrameworkCore/python/TauTriggerContent.py      | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/TauTriggerContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/TauTriggerContent.py
index 9132f665e595..c28ba571e3c3 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/TauTriggerContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/TauTriggerContent.py
@@ -18,8 +18,7 @@ TauTriggerContentRun3 = [
 "L1_eTauRoIAux.",
 "L1_eTauRoIAuxDyn.thresholdPatterns",
 "L1_cTauRoI",
-"L1_cTauRoIAux."
-"L1_cTauRoIAuxDyn.thresholdPatterns",
-
+"L1_cTauRoIAux.",
+"L1_cTauRoIAuxDyn.thresholdPatterns.jTauLink",
 ]
 
-- 
GitLab


From 13a77b1e6123862885ca60399b3aefce2a18cee9 Mon Sep 17 00:00:00 2001
From: Antonio De Maria <antonio.de.maria@cern.ch>
Date: Thu, 21 Mar 2024 17:14:13 +0100
Subject: [PATCH 4/4] update

---
 .../DerivationFrameworkCore/python/TauTriggerContent.py       | 2 --
 .../DerivationFrameworkPhys/python/PHYS.py                    | 4 +++-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/TauTriggerContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/TauTriggerContent.py
index c28ba571e3c3..23ee132866a6 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/TauTriggerContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/TauTriggerContent.py
@@ -16,9 +16,7 @@ TauTriggerContentRun3 = [
 "LVL1EmTauRoIsAux.",
 "L1_eTauRoI",
 "L1_eTauRoIAux.",
-"L1_eTauRoIAuxDyn.thresholdPatterns",
 "L1_cTauRoI",
 "L1_cTauRoIAux.",
-"L1_cTauRoIAuxDyn.thresholdPatterns.jTauLink",
 ]
 
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/python/PHYS.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/python/PHYS.py
index 8020911a3991..e1963f094073 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/python/PHYS.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/python/PHYS.py
@@ -159,7 +159,9 @@ def PHYSCoreCfg(flags, name_tag='PHYS', StreamName='StreamDAOD_PHYS', TriggerLis
                                               "TauJets.dRmax.etOverPtLeadTrk",
                                               "TauJets_MuonRM.dRmax.etOverPtLeadTrk",
                                               "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET.ex.ey",
-                                              "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_mht.ex.ey"]
+                                              "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_mht.ex.ey",
+                                              "L1_eTauRoI.thresholdPatterns",
+                                              "L1_cTauRoI.thresholdPatterns.jTauLink"]
     if TauJets_EleRM_in_input:
         PHYSSlimmingHelper.ExtraVariables += ["TauJets_EleRM.dRmax.etOverPtLeadTrk"]
 
-- 
GitLab