From be7b0684ddb95abce4445dc8c3de6161d294742d Mon Sep 17 00:00:00 2001
From: Fernando Monticelli <fernando.monticelli@cern.ch>
Date: Fri, 2 Oct 2020 12:26:54 +0000
Subject: [PATCH] Configure hypo for calo iso

---
 .../TrigEgammaPrecisionPhotonHypoTool.py      | 27 +++++++++--
 .../TrigEgammaPrecisionPhotonHypoToolInc.cxx  | 46 +++++++++++++++++--
 .../TrigEgammaPrecisionPhotonHypoToolInc.h    |  9 +++-
 .../share/ref_RDOtoRDOTrig_v1Dev_build.ref    | 15 ++++++
 .../share/ref_data_v1Dev_build.ref            | 15 ++++++
 .../python/HLTMenuConfig/Egamma/PhotonDef.py  | 24 ++++++----
 .../python/HLTMenuConfig/Menu/LS2_v1.py       |  5 ++
 .../HLTMenuConfig/Menu/SignatureDicts.py      |  2 +-
 8 files changed, 126 insertions(+), 17 deletions(-)

diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaPrecisionPhotonHypoTool.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaPrecisionPhotonHypoTool.py
index 62c0a226c6b7..eebbd4a6f6ae 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaPrecisionPhotonHypoTool.py
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaPrecisionPhotonHypoTool.py
@@ -1,12 +1,20 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon.Logging import logging
 logging.getLogger().info("Importing %s",__name__)
 log = logging.getLogger("TrigEgammaHypo.TrigEgammaPrecisionPhotonHypoTool") 
 from TriggerMenuMT.HLTMenuConfig.Egamma.EgammaDefs import TrigPhotonSelectors
-def _IncTool(name, threshold, sel):
 
-    log.debug('TrigEgammaPrecisionPhotonHypoTool _IncTool("'+name+'", threshold = '+str(threshold) + ', sel = '+str(sel))
+CaloIsolationCut = {
+        None: None,
+        'icaloloose': 0.1,
+        'icalomedium': 0.075,
+        'icalotight': 0.
+        }
+
+def _IncTool(name, threshold, sel, iso):
+
+    log.debug('TrigEgammaPrecisionPhotonHypoTool _IncTool("'+name+'", threshold = '+str(threshold) + ', sel = '+str(sel)+',  iso = '+str(iso))
 
     from TrigEgammaHypo.TrigEgammaHypoConf import TrigEgammaPrecisionPhotonHypoToolInc    
 
@@ -39,6 +47,13 @@ def _IncTool(name, threshold, sel):
 
     # configure the selector tool corresponding the selection set by sel
     tool.PhotonIsEMSelector = TrigPhotonSelectors(sel)
+    if  iso  and iso != '':
+        if iso not in CaloIsolationCut:
+            log.error('Isolation cut %s not defined!', iso)
+        log.debug('Configuring Isolation cut %s with value %d',iso,CaloIsolationCut[iso])
+        tool.RelEtConeCut = CaloIsolationCut[iso]
+
+
 
     return tool
 
@@ -52,9 +67,13 @@ def TrigEgammaPrecisionPhotonHypoToolFromDict( d ):
     
     def __sel(cpart):
         return cpart['addInfo'][0] if cpart['addInfo'] else cpart['IDinfo']
+   
+    def __iso(cpart):
+        return cpart['isoInfo']
+
     
     name = d['chainName']
         
-    return _IncTool( name, __th( cparts[0]),  __sel( cparts[0] ) )
+    return _IncTool( name, __th( cparts[0]),  __sel( cparts[0] ), __iso( cparts[0])  )
                    
     
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionPhotonHypoToolInc.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionPhotonHypoToolInc.cxx
index d3c6bbc16658..fa119ef3cf72 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionPhotonHypoToolInc.cxx
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionPhotonHypoToolInc.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include <algorithm>
@@ -17,6 +17,8 @@ TrigEgammaPrecisionPhotonHypoToolInc::TrigEgammaPrecisionPhotonHypoToolInc( cons
   : base_class( type, name, parent ),
     m_decisionId( HLT::Identifier::fromToolName( name ) ) {
 	declareProperty("PhotonIsEMSelector"        ,m_egammaPhotonCutIDTool   );
+	declareProperty("RelEtConeCut"              ,m_RelEtConeCut=-999.);
+
     }
 
 StatusCode TrigEgammaPrecisionPhotonHypoToolInc::initialize()  {
@@ -35,6 +37,10 @@ StatusCode TrigEgammaPrecisionPhotonHypoToolInc::initialize()  {
   ATH_MSG_DEBUG( "Retrieving egammaPhotonCutIDTool..."  );
   CHECK( m_egammaPhotonCutIDTool.retrieve() );
 
+  // Retrieving Luminosity info
+  ATH_MSG_DEBUG( "Retrieving luminosityCondData..."  );
+  ATH_CHECK( m_avgMuKey.initialize() );
+
   unsigned int nEtaBin = m_etabin.size();
 #define CHECK_SIZE( __n) if ( m_##__n.size() !=  (nEtaBin - 1) )		\
     { ATH_MSG_DEBUG(" __n size is " << m_##__n.size() << " but needs to be " << (nEtaBin - 1) ); return StatusCode::FAILURE; }
@@ -63,11 +69,14 @@ bool TrigEgammaPrecisionPhotonHypoToolInc::decide( const ITrigEgammaPrecisionPho
   auto etaBin       = Monitored::Scalar( "EtaBin", -1. );
   auto monEta       = Monitored::Scalar( "Eta", -99. ); 
   auto monPhi       = Monitored::Scalar( "Phi", -99. );
+  auto mon_mu       = Monitored::Scalar("mu",   -1.);
+  auto mon_etcone20 = Monitored::Scalar("etcone20",   -99.);
+  auto mon_reletcone20 = Monitored::Scalar("reletcone20",   -99.);
   auto PassedCuts   = Monitored::Scalar<int>( "CutCounter", -1 );  
   auto monitorIt    = Monitored::Group( m_monTool, ET,
 					       dEta, dPhi, 
                                                etaBin, monEta,
-					       monPhi,PassedCuts );
+					       monPhi, mon_mu, mon_etcone20, mon_reletcone20, PassedCuts );
  // when leaving scope it will ship data to monTool
   PassedCuts = PassedCuts + 1; //got called (data in place)
 
@@ -146,10 +155,19 @@ bool TrigEgammaPrecisionPhotonHypoToolInc::decide( const ITrigEgammaPrecisionPho
   std::bitset<32> isEMdecision = m_egammaPhotonCutIDTool->accept(input.photon).getCutResultInvertedBitSet();
   ATH_MSG_DEBUG("isEM Result bitset: " << isEMdecision);
 
+  // get average luminosity information to calculate LH
+  
+  float avg_mu = 0; 
+  SG::ReadDecorHandle<xAOD::EventInfo,float> eventInfoDecor(m_avgMuKey);
+  if(eventInfoDecor.isPresent()) {
+    avg_mu = eventInfoDecor(0);
+    ATH_MSG_DEBUG("Average mu " << avg_mu);
+    mon_mu = avg_mu;
+  }
 
   float Rhad1(0), Rhad(0), Reta(0), Rphi(0), e277(0), weta2c(0), //emax2(0), 
     Eratio(0), DeltaE(0), f1(0), weta1c(0), wtot(0), fracm(0);
-  float ptcone20(999), ptcone30(999), ptcone40(999), etcone20(999), etcone30(999), etcone40(999), topoetcone20(999), topoetcone30(999), topoetcone40(999);
+  float ptcone20(999), ptcone30(999), ptcone40(999), etcone20(999), etcone30(999), etcone40(999), topoetcone20(999), topoetcone30(999), topoetcone40(999), reletcone20(999);
 
     
   // variables based on HCAL
@@ -223,6 +241,12 @@ bool TrigEgammaPrecisionPhotonHypoToolInc::decide( const ITrigEgammaPrecisionPho
   ATH_MSG_DEBUG( " topoetcone20 " << topoetcone20 ) ;
   ATH_MSG_DEBUG( " topoetcone30 " << topoetcone30 ) ;
   ATH_MSG_DEBUG( " topoetcone40 " << topoetcone40 ) ;
+  // Monitor showershapes                      
+  mon_etcone20 = etcone20;
+  reletcone20 = etcone20/input.photon->caloCluster()->et();
+  ATH_MSG_DEBUG("reletcone20 = " <<reletcone20  );
+  mon_reletcone20 = reletcone20;
+  ATH_MSG_DEBUG("m_RelEtConeCut = " << m_RelEtConeCut );
 
 
  // Decode isEM bits of result to see which bits passed and which bits fialed
@@ -230,9 +254,25 @@ bool TrigEgammaPrecisionPhotonHypoToolInc::decide( const ITrigEgammaPrecisionPho
 
   if ( !pass ){
       ATH_MSG_DEBUG("REJECT isEM failed");
+      return pass;
   } else {
       ATH_MSG_DEBUG("ACCEPT isEM passed");
   }
+  // Check if need to apply isolation
+  // First check logic. if cut is very negative, then no isolation cut is defined
+  // if m_RelEtConeCut <-100 then hypo is configured not to apply isolation
+  if (m_RelEtConeCut < -100){
+      ATH_MSG_DEBUG(" not applying isolation. Returning NOW");
+      ATH_MSG_DEBUG("TAccept = " << pass);
+      return pass;
+  }
+  // Then, It will pass if reletcone20 is less than cut:
+  pass = (reletcone20 < m_RelEtConeCut);
+  //
+  // Reach this point successfully  
+  ATH_MSG_DEBUG( "pass = " << pass );
+
+  return pass;
 
   // Reach this point successfully  
   ATH_MSG_DEBUG( "pass = " << pass );
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionPhotonHypoToolInc.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionPhotonHypoToolInc.h
index 952b6ebb0070..2a31172ff82a 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionPhotonHypoToolInc.h
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionPhotonHypoToolInc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 #ifndef TRIGEGAMMAHYPO_TRIGPRECISIONPHOTONHYPOTOOLINC_H
 #define TRIGEGAMMAHYPO_TRIGPRECISIONPHOTONHYPOTOOLINC_H 1
@@ -16,6 +16,7 @@
 #include "ITrigEgammaPrecisionPhotonHypoTool.h"
 #include "PATCore/AcceptData.h"
 #include "EgammaAnalysisInterfaces/IAsgPhotonIsEMSelector.h"
+#include "StoreGate/ReadDecorHandle.h"
 
 /**
  * @class Implementation of the Egamma selection for Photons
@@ -44,8 +45,14 @@ class TrigEgammaPrecisionPhotonHypoToolInc : public extends<AthAlgTool, ITrigEga
   Gaudi::Property< float > m_detacluster { this, "dETACLUSTERthr", 0. , "" };
   Gaudi::Property< float > m_dphicluster { this, "dPHICLUSTERthr", 0. , "" };  
 
+ /* Calo isolation cut */
+  float m_RelEtConeCut;
+
   ToolHandle< GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool" };
   ToolHandle<IAsgPhotonIsEMSelector> m_egammaPhotonCutIDTool;
+/*Luminosity info*/
+  SG::ReadDecorHandleKey<xAOD::EventInfo> m_avgMuKey { this, "AveIntPerXKey", "EventInfo.AveIntPerXDecor", "Decoration for Average Interaction Per Crossing" };
+
   int findCutIndex( float eta ) const;
 }; 
 
diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
index 7a5a00e23ad8..c7a5695e4104 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
@@ -22,6 +22,9 @@ TrigSignatureMoniMT                                 INFO -- #3765708828 Features
 TrigSignatureMoniMT                                 INFO HLT_2g20_tight_L12EM15VH #3837353071
 TrigSignatureMoniMT                                 INFO -- #3837353071 Events         2          2          2          0          0          0          -          -          -          -          -          -          -          -          -          0
 TrigSignatureMoniMT                                 INFO -- #3837353071 Features                             2          0          0          0          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_2g20_tight_icaloloose_L12EM15VH #1319738689
+TrigSignatureMoniMT                                 INFO -- #1319738689 Events         2          2          2          0          0          0          -          -          -          -          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #1319738689 Features                             2          0          0          0          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_2g22_tight_L12EM15VH #708421357
 TrigSignatureMoniMT                                 INFO -- #708421357 Events          2          2          2          0          0          0          -          -          -          -          -          -          -          -          -          0
 TrigSignatureMoniMT                                 INFO -- #708421357 Features                              2          0          0          0          -          -          -          -          -          -          -          -          -
@@ -232,6 +235,18 @@ TrigSignatureMoniMT                                 INFO -- #1776910226 Features
 TrigSignatureMoniMT                                 INFO HLT_g20_etcut_LArPEB_L1EM15 #2706532790
 TrigSignatureMoniMT                                 INFO -- #2706532790 Events         14         14         14         14         12         12         -          -          -          -          -          -          -          -          -          12
 TrigSignatureMoniMT                                 INFO -- #2706532790 Features                             24         24         22         20         -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_g20_tight_L1EM15VH #270010748
+TrigSignatureMoniMT                                 INFO -- #270010748 Events          8          8          8          8          8          5          -          -          -          -          -          -          -          -          -          5
+TrigSignatureMoniMT                                 INFO -- #270010748 Features                              8          8          16         5          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_g20_tight_icaloloose_L1EM15VH #4091638976
+TrigSignatureMoniMT                                 INFO -- #4091638976 Events         8          8          8          8          8          5          -          -          -          -          -          -          -          -          -          5
+TrigSignatureMoniMT                                 INFO -- #4091638976 Features                             8          8          16         5          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_g20_tight_icalomedium_L1EM15VH #2032419080
+TrigSignatureMoniMT                                 INFO -- #2032419080 Events         8          8          8          8          8          5          -          -          -          -          -          -          -          -          -          5
+TrigSignatureMoniMT                                 INFO -- #2032419080 Features                             8          8          16         5          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO HLT_g20_tight_icalotight_L1EM15VH #2824200612
+TrigSignatureMoniMT                                 INFO -- #2824200612 Events         8          8          8          8          8          0          -          -          -          -          -          -          -          -          -          0
+TrigSignatureMoniMT                                 INFO -- #2824200612 Features                             8          8          16         0          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_g25_etcut_L1EM20VH #1417839619
 TrigSignatureMoniMT                                 INFO -- #1417839619 Events         7          7          7          7          7          -          -          -          -          -          -          -          -          -          -          7
 TrigSignatureMoniMT                                 INFO -- #1417839619 Features                             11         11         10         -          -          -          -          -          -          -          -          -          -
diff --git a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
index 2971de46756b..8a2420c044a7 100644
--- a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
@@ -22,6 +22,9 @@ TrigSignatureMoniMT                                 INFO -- #3765708828 Features
 TrigSignatureMoniMT                                 INFO HLT_2g20_tight_L12EM15VH #3837353071
 TrigSignatureMoniMT                                 INFO -- #3837353071 Events         20         20         0          0          0          0          -          -          -          -          -          -          -          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #3837353071 Features                             0          0          0          0          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_2g20_tight_icaloloose_L12EM15VH #1319738689
+TrigSignatureMoniMT                                 INFO -- #1319738689 Events         20         20         0          0          0          0          -          -          -          -          -          -          -          -          -          0          
+TrigSignatureMoniMT                                 INFO -- #1319738689 Features                             0          0          0          0          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_2g22_tight_L12EM15VH #708421357
 TrigSignatureMoniMT                                 INFO -- #708421357 Events          20         20         0          0          0          0          -          -          -          -          -          -          -          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #708421357 Features                              0          0          0          0          -          -          -          -          -          -          -          -          -          
@@ -232,6 +235,18 @@ TrigSignatureMoniMT                                 INFO -- #1776910226 Features
 TrigSignatureMoniMT                                 INFO HLT_g20_etcut_LArPEB_L1EM15 #2706532790
 TrigSignatureMoniMT                                 INFO -- #2706532790 Events         20         20         4          4          3          3          -          -          -          -          -          -          -          -          -          3          
 TrigSignatureMoniMT                                 INFO -- #2706532790 Features                             5          5          4          4          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_g20_tight_L1EM15VH #270010748
+TrigSignatureMoniMT                                 INFO -- #270010748 Events          20         20         0          0          0          0          -          -          -          -          -          -          -          -          -          0          
+TrigSignatureMoniMT                                 INFO -- #270010748 Features                              0          0          0          0          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_g20_tight_icaloloose_L1EM15VH #4091638976
+TrigSignatureMoniMT                                 INFO -- #4091638976 Events         20         20         0          0          0          0          -          -          -          -          -          -          -          -          -          0          
+TrigSignatureMoniMT                                 INFO -- #4091638976 Features                             0          0          0          0          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_g20_tight_icalomedium_L1EM15VH #2032419080
+TrigSignatureMoniMT                                 INFO -- #2032419080 Events         20         20         0          0          0          0          -          -          -          -          -          -          -          -          -          0          
+TrigSignatureMoniMT                                 INFO -- #2032419080 Features                             0          0          0          0          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_g20_tight_icalotight_L1EM15VH #2824200612
+TrigSignatureMoniMT                                 INFO -- #2824200612 Events         20         20         0          0          0          0          -          -          -          -          -          -          -          -          -          0          
+TrigSignatureMoniMT                                 INFO -- #2824200612 Features                             0          0          0          0          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_g25_etcut_L1EM20VH #1417839619
 TrigSignatureMoniMT                                 INFO -- #1417839619 Events         20         20         3          3          2          -          -          -          -          -          -          -          -          -          -          2          
 TrigSignatureMoniMT                                 INFO -- #1417839619 Features                             3          3          2          -          -          -          -          -          -          -          -          -          -          
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonDef.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonDef.py
index c52532fcbf3e..2a99e0c1b305 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonDef.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonDef.py
@@ -47,14 +47,21 @@ class PhotonChainConfiguration(ChainConfigurationBase):
         # --------------------
         # define here the names of the steps and obtain the chainStep configuration 
         # --------------------
-        etcut_sequence = [self.getFastCalo(), self.getFastPhoton(), self.getPrecisionCaloPhoton()]
-        photon_sequence = [self.getFastCalo(), self.getFastPhoton(), self.getPrecisionCaloPhoton(), self.getPrecisionPhoton()]
         stepDictionary = {
-            "etcut": etcut_sequence,
-            "etcutetcut": etcut_sequence,
-            "loose": photon_sequence,
-            "medium": photon_sequence,
-            "tight": photon_sequence,
+            "etcut": ['getFastCalo', 'getFastPhoton', 'getPrecisionCaloPhoton'],
+            "etcutetcut": ['getFastCalo', 'getFastPhoton', 'getPrecisionCaloPhoton'],
+            "loose":  ['getFastCalo', 'getFastPhoton', 'getPrecisionCaloPhoton', 'getPrecisionPhoton'], 
+            "medium":  ['getFastCalo', 'getFastPhoton', 'getPrecisionCaloPhoton', 'getPrecisionPhoton'], 
+            "tight":  ['getFastCalo', 'getFastPhoton', 'getPrecisionCaloPhoton', 'getPrecisionPhoton'], 
+            "looseicaloloose":  ['getFastCalo', 'getFastPhoton', 'getPrecisionCaloPhoton', 'getPrecisionPhoton'], 
+            "mediumicaloloose":  ['getFastCalo', 'getFastPhoton', 'getPrecisionCaloPhoton', 'getPrecisionPhoton'], 
+            "tighticaloloose":  ['getFastCalo', 'getFastPhoton', 'getPrecisionCaloPhoton', 'getPrecisionPhoton'], 
+            "looseicalomedium":  ['getFastCalo', 'getFastPhoton', 'getPrecisionCaloPhoton', 'getPrecisionPhoton'], 
+            "mediumicalomedium":  ['getFastCalo', 'getFastPhoton', 'getPrecisionCaloPhoton', 'getPrecisionPhoton'], 
+            "tighticalomedium":  ['getFastCalo', 'getFastPhoton', 'getPrecisionCaloPhoton', 'getPrecisionPhoton'], 
+            "looseicalotight":  ['getFastCalo', 'getFastPhoton', 'getPrecisionCaloPhoton', 'getPrecisionPhoton'], 
+            "mediumicalotight":  ['getFastCalo', 'getFastPhoton', 'getPrecisionCaloPhoton', 'getPrecisionPhoton'], 
+            "tighticalotight":  ['getFastCalo', 'getFastPhoton', 'getPrecisionCaloPhoton', 'getPrecisionPhoton'], 
         }
         
         ## This needs to be configured by the Egamma Developer!!
@@ -73,7 +80,8 @@ class PhotonChainConfiguration(ChainConfigurationBase):
 
         for step in steps:
             log.debug('Adding photon trigger step ' + str(step))
-            chainSteps+=[step]
+            chainstep = getattr(self, step)()
+            chainSteps+=[chainstep]
     
         myChain = self.buildChain(chainSteps)
         return myChain
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
index 6df10626d20f..8a59baba5ac8 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
@@ -147,12 +147,17 @@ def setupMenu():
         ChainProp(name='HLT_g25_loose_L1EM20VH', groups=SinglePhotonGroup),
         ChainProp(name='HLT_g25_medium_L1EM20VH', groups=SinglePhotonGroup),
         ChainProp(name='HLT_g25_tight_L1EM20VH', groups=SinglePhotonGroup),
+        ChainProp(name='HLT_g20_tight_L1EM15VH', groups=SinglePhotonGroup),
+        ChainProp(name='HLT_g20_tight_icaloloose_L1EM15VH', groups=SinglePhotonGroup),
+        ChainProp(name='HLT_g20_tight_icalomedium_L1EM15VH', groups=SinglePhotonGroup),
+        ChainProp(name='HLT_g20_tight_icalotight_L1EM15VH', groups=SinglePhotonGroup),
         # Primary photon chains
         ChainProp(name='HLT_g140_loose_L1EM22VHI', groups=SinglePhotonGroup),
         ChainProp(name='HLT_2g35_medium_L12EM20VH', groups=MultiPhotonGroup),
         ChainProp(name='HLT_g35_medium_g25_medium_L12EM20VH', groups=MultiPhotonGroup),
         ChainProp(name='HLT_2g20_tight_L12EM15VH', groups=MultiPhotonGroup),
         #ChainProp(name='HLT_2g22_tight_L12EM15VHI', groups=MultiPhotonGroup),
+        ChainProp(name='HLT_2g20_tight_icaloloose_L12EM15VH', groups=MultiPhotonGroup),
         ChainProp(name='HLT_2g22_tight_L12EM15VH', groups=MultiPhotonGroup),
         ChainProp(name='HLT_2g50_loose_L12EM20VH', groups=MultiPhotonGroup),
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py
index 75118f0600c4..0e73f4a6d75e 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py
@@ -411,7 +411,7 @@ PhotonChainParts = {
     'threshold'      : '',
     'extra'          : [],
     'IDinfo'         : ['etcut','loose','medium','tight'],
-    'isoInfo'        : [],
+    'isoInfo'        : ['icaloloose','icalomedium','icalotight'],
     'reccalibInfo'   : [],
     'trkInfo'        : [],
     'caloInfo'       : [],
-- 
GitLab