diff --git a/CI/config.yaml b/CI/config.yaml
index 1a989fcfda2389ce1a4f4a0768e70141ea31c9d0..4a2242fca4c8c84fb7546ed8bc2f80a1f8e038aa 100644
--- a/CI/config.yaml
+++ b/CI/config.yaml
@@ -1,4 +1,4 @@
 sweep-targets:
-  '21.0':
+  '21.0-TrigMC':
     '.*':
       - 'master'
diff --git a/DataQuality/DataQualityConfigurations/config/HLT/HLTmuon/cosmics_run.config b/DataQuality/DataQualityConfigurations/config/HLT/HLTmuon/cosmics_run.config
index 837ca2538944b265364b968a26d37da7479705fe..da17b3aab34ddaa7971f81e6a810259f28a1ae1c 100644
--- a/DataQuality/DataQualityConfigurations/config/HLT/HLTmuon/cosmics_run.config
+++ b/DataQuality/DataQualityConfigurations/config/HLT/HLTmuon/cosmics_run.config
@@ -6,60 +6,24 @@
 # HLTmuon
 #######################
 
-#######################
+#############
 # Output
-#######################
+#############
 
 output top_level {
-
   output HLT {
-
     output TRMUO {
       algorithm = TRMUO_WorstCaseSummary  
-      output Shifter {
-        output L2MuonSA {
-          algorithm = TRMUO_WorstCaseSummary  
-        }
-        output L2muonCB {
-          algorithm = TRMUO_WorstCaseSummary  
-        }
-        output MuonEF {
-          algorithm = TRMUO_WorstCaseSummary  
-        }
-      }
-      output Expert {
-        algorithm = TRMUO_AlwaysGreenSummary  
-
-        output L2MuonSA {
-          algorithm = TRMUO_WorstCaseSummary  
-        }
-        output L2muonCB {
-          algorithm = TRMUO_WorstCaseSummary  
-        }
-        output TileMu {
-          algorithm = TRMUO_WorstCaseSummary  
-        }
-        output MuonEF {
-          algorithm = TRMUO_WorstCaseSummary  
-        }
-        output muChain1 {
-          algorithm = TRMUO_WorstCaseSummary  
-        }
-        output muChainMSonly1 {
-          algorithm = TRMUO_AlwaysGreenSummary  
-        }
-      }
     }
   }
 }
 
+
 #######################
 # Histogram Assessments
 #######################
 
 dir HLT {
-  algorithm = HLT_Histogram_Not_Empty&GatherData
-
   dir MuonMon {
     algorithm = Muon_Bins_LessThan_Threshold&GatherData
     output = HLT/TRMUO
@@ -219,6 +183,7 @@ dir HLT {
 	algorithm = alg_eta_vs_phi
         reference = stream=physics_Main:CentrallyManagedReferences_Main;CentrallyManagedReferences
         weight = 0.0
+        reference = stream=physics_Main:CentrallyManagedReferences_Main;CentrallyManagedReferences
       }
       hist EFMS_pt {
         output = HLT/TRMUO/Shifter/MuonEF
@@ -232,9 +197,9 @@ dir HLT {
         weight = 0.0
         reference = stream=physics_Main:CentrallyManagedReferences_Main;CentrallyManagedReferences
       }
-      hist EFCB_pt {
-        output = HLT/TRMUO/Shifter/MuonEF
-	algorithm = TRMUO_GatherData
+      hist EFCB_eta_vs_phi_in_10LBs {
+        output = HLT/TRMUO
+        algorithm = alg_eta_vs_phi
         weight = 0.0
         reference = stream=physics_Main:CentrallyManagedReferences_Main;CentrallyManagedReferences
       }
@@ -531,16 +496,19 @@ algorithm alg_L2MuonSA_residual_endcap {
   thresholds = th_L2MuonSA_residual_endcap
 }
 
+#############
+##Algorithms
+#############
 algorithm alg_eta_vs_phi {
   libname = libdqm_algorithms.so
   name = Bins_GreaterThanNonZeroMedian_Threshold
   thresholds = th_eta_vs_phi
   BinThreshold = 0.02
   MinBinThreshold = 1
-  MinStat = 20000
-# 108*96 = 10368
-# no trigger for |eta|>2.45 --> 10bins
-# 98*96 = 9408
+  MinStat = 2000
+# 16*27 = 432
+# no trigger for |eta|>2.45 --> 2bins
+# 16*25 = 400
 # 10% due to barrel holes
 # 8468
   TotalBins = 8468
@@ -639,20 +607,17 @@ algorithm TRMUO_fermi_fit_mu6_MSonly_L2MuonSA {
   LikelihoodFit = 2.0
 }
 
-algorithm TRMUO_fermi_fit_mu6_MSonly_MuonEFMS {
+algorithm alg_eta_vs_phi_tilemu {
   libname = libdqm_algorithms.so
-  name = Simple_fermi_Fit
-  thresholds = th_TRMUO_fermi_fit_mu6_MSonly_MuonEFMS
-  MinStat = 1000
-  LikelihoodFit = 2.0
-}
-
-algorithm TRMUO_fermi_fit_mu6_MSonly_MuonEFSA {
-  libname = libdqm_algorithms.so
-  name = Simple_fermi_Fit
-  thresholds = th_TRMUO_fermi_fit_mu6_MSonly_MuonEFSA
-  MinStat = 1000
-  LikelihoodFit = 2.0
+  name = Bins_GreaterThanNonZeroMedian_Threshold
+  thresholds = th_eta_vs_phi_tilemu
+  BinThreshold = 0.02
+  MinBinThreshold = 1
+  MinStat = 2000
+# 16*27 = 432
+# no trigger for |eta|>1.5 --> 14bins
+# 16*13 = 208
+  TotalBins = 208
 }
 
 #
@@ -724,29 +689,6 @@ thresholds th_L2MuonSA_residual_endcap {
 #  }
 }
 
-thresholds th_eta_vs_phi {
-  limits NBins {
-# 8468*0.8 = 6774.4
-    warning = 6774
-    error = 6773.9
-  }
-}
-
-thresholds th_muComb_ptratio {
- limits Sigma {
-    warning = 0.4
-    error = 0.6
-  }
-  limits AbsMean {
-    warning = 0.4
-    error = 0.6
-  }
-#  limits Chi2_per_NDF {
-#    warning = 30.
-#    error = 50.
-#  }
-}
-
 # muChainMSonly1
 thresholds th_TRMUO_fermi_fit_mu10_MSonly_L2MuonSA_upstream {
   limits Plateau {
@@ -932,5 +874,12 @@ thresholds th_TRMUO_fermi_fit_mu6_MSonly_MuonEFSA {
   limits Resolution {
     warning = 3.0
     error   = 4.0
+=======
+thresholds th_eta_vs_phi_tilemu {
+  limits NBins {
+# 208*0.9 = 187.2
+    warning = 187
+    error = 186
+>>>>>>> upstream/21.1
   }
 }
diff --git a/Database/AthenaRoot/AthenaRootComps/share/POOLEventSelector_testJobOptions.py b/Database/AthenaRoot/AthenaRootComps/share/POOLEventSelector_testJobOptions.py
deleted file mode 100644
index c03b9bd21742c0a201289e23e7c06ecdea6b2793..0000000000000000000000000000000000000000
--- a/Database/AthenaRoot/AthenaRootComps/share/POOLEventSelector_testJobOptions.py
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-#this joboption is used in performance monitoring to compare to xAODEventSelector
-
-theApp.EvtMax = -1
-
-import os
-
-jps.AthenaCommonFlags.FilesInput = [os.environ.get("ASG_TEST_FILE_MC","/afs/cern.ch/user/a/asgbase/patspace/xAODs/r7725/mc15_13TeV.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.merge.AOD.e3698_s2608_s2183_r7725_r7676/AOD.07915862._000100.pool.root.1")]
-
-
-
-import AthenaPoolCnvSvc.ReadAthenaPool
-
-
-algseq = CfgMgr.AthSequencer("AthAlgSeq")
-algseq += CfgMgr.EventCounterAlg(BookkeepOtherMCEventWeights=True)
diff --git a/Database/AthenaRoot/AthenaRootComps/share/xAODEventSelector_testJobOptions.py b/Database/AthenaRoot/AthenaRootComps/share/xAODEventSelector_testJobOptions.py
deleted file mode 100644
index 224aebf4e92b8f3f766b04a855cbf9ac14008180..0000000000000000000000000000000000000000
--- a/Database/AthenaRoot/AthenaRootComps/share/xAODEventSelector_testJobOptions.py
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-#this joboption is used in performance monitoring to compare to POOL
-
-theApp.EvtMax = -1
-
-import os
-
-jps.AthenaCommonFlags.FilesInput = [os.environ.get("ASG_TEST_FILE_MC","/afs/cern.ch/user/a/asgbase/patspace/xAODs/r7725/mc15_13TeV.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.merge.AOD.e3698_s2608_s2183_r7725_r7676/AOD.07915862._000100.pool.root.1")]
-
-
-
-import AthenaRootComps.ReadAthenaxAODHybrid
-
-
-algseq = CfgMgr.AthSequencer("AthAlgSeq")
-algseq += CfgMgr.EventCounterAlg(BookkeepOtherMCEventWeights=True)
diff --git a/DetectorDescription/GeoModel/AtlasGeoModel/python/InDetGM.py b/DetectorDescription/GeoModel/AtlasGeoModel/python/InDetGM.py
index dbbaa82341541e9afa70ebdcdde93475f00f1a97..f4a051c12f2b6c921a29b83606b1e94b8a392335 100755
--- a/DetectorDescription/GeoModel/AtlasGeoModel/python/InDetGM.py
+++ b/DetectorDescription/GeoModel/AtlasGeoModel/python/InDetGM.py
@@ -47,7 +47,10 @@ elif ( DetFlags.detdescr.ID_on() ):
             ToolSvc += blmTool
             GeoModelSvc.DetectorTools['PixelDetectorTool'].BLM_Tool = blmTool
 
+        GeoModelSvc.DetectorTools['PixelDetectorTool'].useDynamicAlignFolders = GeometryFlags.useDynamicAlignFolders()
+
     if ( DetFlags.detdescr.SCT_on() ):
+
         if GeometryFlags.isSLHC():
             #SLHC specific code
             if "GMX" == GeometryFlags.StripGeoType():
@@ -70,12 +73,15 @@ elif ( DetFlags.detdescr.ID_on() ):
             from AthenaCommon import CfgGetter
             GeoModelSvc.DetectorTools += [ CfgGetter.getPrivateTool("SCT_DetectorTool", checkType=True) ]
 
+        GeoModelSvc.DetectorTools['SCT_DetectorTool'].useDynamicAlignFolders = GeometryFlags.useDynamicAlignFolders()
+
     if ( DetFlags.detdescr.TRT_on() ):
         from TRT_GeoModel.TRT_GeoModelConf import TRT_DetectorTool
         trtDetectorTool = TRT_DetectorTool()
         if ( DetFlags.simulate.TRT_on() ):
             trtDetectorTool.DoXenonArgonMixture = True
             trtDetectorTool.DoKryptonMixture = True
+        trtDetectorTool.useDynamicAlignFolders = GeometryFlags.useDynamicAlignFolders()
         GeoModelSvc.DetectorTools += [ trtDetectorTool ]
 
     from InDetServMatGeoModel.InDetServMatGeoModelConf import InDetServMatTool
diff --git a/DetectorDescription/GeoModel/AtlasGeoModel/python/InDetGMJobProperties.py b/DetectorDescription/GeoModel/AtlasGeoModel/python/InDetGMJobProperties.py
index eff1ea5eecd4b7bcab02775262251868f697dcfb..610794a2e873e61ba909cc8f00bfae563684c81a 100755
--- a/DetectorDescription/GeoModel/AtlasGeoModel/python/InDetGMJobProperties.py
+++ b/DetectorDescription/GeoModel/AtlasGeoModel/python/InDetGMJobProperties.py
@@ -191,6 +191,13 @@ class StripGeoType(JobProperty):
      allowedTypes = ['str']
      StoredValue  = "UNDEFINED"
 
+class useDynamicAlignFolders(JobProperty):
+    """ Use to turn on dynamic alignment constants folder scheme (first deployed in 2016) """
+    statusOn     = True
+    allowedTypes = ['bool']
+    StoredValue  = False
+
+
 
 # add to jobproperties
 class GeometryFlags_JobProperties(JobPropertyContainer):
@@ -252,6 +259,7 @@ jobproperties.GeometryFlags_JobProperties.add_JobProperty(isDBM)
 jobproperties.GeometryFlags_JobProperties.add_JobProperty(Run)
 jobproperties.GeometryFlags_JobProperties.add_JobProperty(GeoType)
 jobproperties.GeometryFlags_JobProperties.add_JobProperty(StripGeoType)
+jobproperties.GeometryFlags_JobProperties.add_JobProperty(useDynamicAlignFolders)
 
 GeometryFlags = jobproperties.GeometryFlags_JobProperties
 GeometryFlags.setupValuesFromDB()
diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoMaterial.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoMaterial.cxx
index 665bd3359d397564717e8b168351f0244c76301d..805a50536d4f2f231e0967ed54607a8d82e992b2 100755
--- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoMaterial.cxx
+++ b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoMaterial.cxx
@@ -29,6 +29,7 @@
 #include <cfloat>
 #include <iostream>
 #include <algorithm>
+#include <iterator>
 
 //## end module%3CD878BB0006.includes
 
@@ -379,7 +380,10 @@ void GeoMaterial::lock ()
       int iZ = (int) (m_element[e]->getZ () + 0.5) - 1;	// Atomic number index     
 
       dEDxConstant += w * C0 * dovera * Z;
-      dEDxI0 += w * s_ionizationPotential[iZ];
+      // Make sure we don't overflow the table:
+      // the `Ether' special `element' has Z set to 500.
+      if (iZ >= 0 && iZ < (std::end(s_ionizationPotential)-std::begin(s_ionizationPotential)))
+        dEDxI0 += w * s_ionizationPotential[iZ];
       NILinv += n * pow (N, 2.0 / 3.0) * CLHEP::amu * inv_lambda0;
 
       double nAtomsPerVolume = A ? CLHEP::Avogadro*m_density*m_fraction[e]/A : 0.;
diff --git a/ForwardDetectors/AFP/AFP_LocRecoInterfaces/AFP_LocRecoInterfaces/IAFPSiDLocRecoTool.h b/ForwardDetectors/AFP/AFP_LocRecoInterfaces/AFP_LocRecoInterfaces/IAFPSiDLocRecoTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..2c32917437e9215fe2222350b94cfa20061210fc
--- /dev/null
+++ b/ForwardDetectors/AFP/AFP_LocRecoInterfaces/AFP_LocRecoInterfaces/IAFPSiDLocRecoTool.h
@@ -0,0 +1,46 @@
+#ifndef AFP_LOCRECO_IAFPSIDLOCRECOTOOL_H
+#define AFP_LOCRECO_IAFPSIDLOCRECOTOOL_H 1
+
+/// @file   IAFPSiDLocRecoTool.h
+/// @author Grzegorz Gach <gach@agh.edu.pl>
+/// @date   2017-03-01
+/// 
+/// @brief  Header file for interface IAFPSiDLocRecoTool
+
+
+// STL includes
+
+// HepMC / CLHEP includes
+
+// FrameWork includes
+#include "GaudiKernel/IAlgTool.h"
+#include "AthContainers/DataVector.h"
+
+static const InterfaceID IID_IAFPSiDLocRecoTool("IAFPSiDLocRecoTool", 1, 0);
+
+/// Interface for AFP tools that reconstruct tracks from silicon detector hits
+class IAFPSiDLocRecoTool : virtual public ::IAlgTool
+{ 
+
+ public: 
+  /// Empty destructor
+  virtual ~IAFPSiDLocRecoTool() {}
+
+  static const InterfaceID& interfaceID();
+
+  /// @brief run tracks reconstruction
+  /// 
+  /// The method that does the actual tracks reconstruction. It reads
+  /// silicon detector hits from StoreGate, reconstructs tracks and
+  /// saves result to StoreGate.
+  virtual StatusCode reconstructTracks() = 0;
+
+}; 
+
+inline const InterfaceID& IAFPSiDLocRecoTool::interfaceID() 
+{ 
+   return IID_IAFPSiDLocRecoTool; 
+}
+
+
+#endif //> !AFP_LOCRECO_IAFPSiDLOCRECOTOOL_H
diff --git a/ForwardDetectors/AFP/AFP_LocRecoInterfaces/CMakeLists.txt b/ForwardDetectors/AFP/AFP_LocRecoInterfaces/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..a705d71bec2a4ce263075a263536bb82acab2dcc
--- /dev/null
+++ b/ForwardDetectors/AFP/AFP_LocRecoInterfaces/CMakeLists.txt
@@ -0,0 +1,15 @@
+################################################################################
+# Package: AFP_LocRecoInterfaces
+################################################################################
+
+# Declare the package name:
+atlas_subdir( AFP_LocRecoInterfaces )
+
+# Declare the package's dependencies:
+atlas_depends_on_subdirs( PUBLIC
+                          Control/AthContainers
+                          GaudiKernel )
+
+# Install files from the package:
+atlas_install_headers( AFP_LocRecoInterfaces )
+
diff --git a/HLT/HLTUtils/python/hltOksUtils.py b/HLT/HLTUtils/python/hltOksUtils.py
index 8060580ab0b451ebedda9f865f1d0f3af401ed5e..4ce66e9ee37e5a162eb26c84d381dc31cb0a3714 100644
--- a/HLT/HLTUtils/python/hltOksUtils.py
+++ b/HLT/HLTUtils/python/hltOksUtils.py
@@ -4,14 +4,14 @@
 Utilities for HLT OKS file generation
 """
 
+import os
+
 def defaultTags():
    """Return list of supported CMTCONFIG tags"""
    
    import pm.common
-   import os
 
-   project = os.environ.get('AtlasProject','')
-   tag = os.environ.get('%s_PLATFORM' % project, os.environ.get('CMTCONFIG',None))
+   tag = platform()
    opt_tag = '-'.join(tag.split('-')[:-1])+'-opt'
    dbg_tag = '-'.join(tag.split('-')[:-1])+'-dbg'
    tags = [pm.common.tdaqRepository.getObject('Tag', opt_tag),
@@ -19,3 +19,12 @@ def defaultTags():
    
    return tags
 
+def platform():
+   """Return current CMTCONFIG tag"""
+
+   project = os.environ.get('AtlasProject','')
+   tag = os.environ.get('%s_PLATFORM' % project, os.environ.get('CMTCONFIG',None))
+
+   return tag
+
+
diff --git a/HLT/HLTUtils/share/make_hlt_rep.py b/HLT/HLTUtils/share/make_hlt_rep.py
index c152496d2e6dc29b9f86009af30d899f91633289..796da5859df1dc6c0a6fad36035d2493ac55eff0 100755
--- a/HLT/HLTUtils/share/make_hlt_rep.py
+++ b/HLT/HLTUtils/share/make_hlt_rep.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 import optparse
 import os
@@ -42,22 +43,24 @@ else:
     # numbered releases
     atlas_version = os.environ.get('AtlasVersion')
 
+platform = hltOksUtils.platform()
+
 swvars = [
-    dal.SW_PackageVariable('XMLPATH%s' % modifier,
+    dal.SW_PackageVariable('XMLPATH',
                            Name='XMLPATH',
-                           Suffix="XML"),
-    dal.SW_PackageVariable('DATAPATH%s' % modifier,
+                           Suffix=os.path.join(platform,"XML")),
+    dal.SW_PackageVariable('DATAPATH',
                            Name='DATAPATH',
-                           Suffix="share"),
-    dal.SW_PackageVariable('CALIBPATH%s' % modifier,
+                           Suffix=os.path.join(platform,"share")),
+    dal.SW_PackageVariable('CALIBPATH',
                            Name='CALIBPATH',
-                           Suffix="share"),                           
-    dal.SW_PackageVariable('JOBOPTSEARCHPATH%s' % modifier,
+                           Suffix=os.path.join(platform,"share")),                           
+    dal.SW_PackageVariable('JOBOPTSEARCHPATH',
                            Name='JOBOPTSEARCHPATH',
-                           Suffix="jobOptions"),
-    dal.SW_PackageVariable('PYTHONPATH%s' % modifier,
+                           Suffix=os.path.join(platform,"jobOptions")),
+    dal.SW_PackageVariable('PYTHONPATH',
                            Name='PYTHONPATH',
-                           Suffix="python")
+                           Suffix=os.path.join(platform,"python"))
 ]
 
 puvars = [
@@ -92,7 +95,7 @@ pars = dal.VariableSet('%s-Parameters' % prefix,
                                                  Description='%s release version' % prefix) ])
 
 apps = [
-    dal.Script('HLTMPPU_asetup',
+    dal.Binary('HLTMPPU_asetup',
                BinaryName='asetup_wrapper',
                Description='HLTMPPU_main with asetup environment',
                DefaultParameters='HLTMPPU_main',
@@ -104,8 +107,8 @@ hltRep = dal.SW_Repository('%s-Repository' % prefix,
                            Name=('%s-Repository' % prefix),
                            InstallationPath="%s/InstallArea" % os.environ.get('AtlasArea'),
                            SW_Objects=apps,
-                           Tags=hltOksUtils.defaultTags(),
-                           ISInfoDescriptionFiles=['share/data/daq/schema/is_trigconf_hlt.schema.xml'],
+                           Tags=[pm.common.tdaqRepository.getObject('Tag',hltOksUtils.platform())],
+                           ISInfoDescriptionFiles=[os.path.join(platform,'share/data/daq/schema/is_trigconf_hlt.schema.xml')],
                            AddProcessEnvironment = swvars
                            )
 
diff --git a/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/src/TrigL1TopoROBMonitor.cxx b/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/src/TrigL1TopoROBMonitor.cxx
index 28cc1998c045b57a2dae4081ebea4114d2916c9f..cebf7abfa7152e5d7035847eb4b1d1088f29cf8d 100644
--- a/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/src/TrigL1TopoROBMonitor.cxx
+++ b/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/src/TrigL1TopoROBMonitor.cxx
@@ -93,6 +93,8 @@ TrigL1TopoROBMonitor::TrigL1TopoROBMonitor(const std::string& name, ISvcLocator*
   m_histTopoSimHdwEventOverflowComparison(0),
   m_histTopoCtpSimHdwEventComparison(0),
   m_histTopoCtpHdwEventComparison(0),
+  m_histTopoDaqRobEventComparison(0),
+  m_histDaqRobCtpEventComparison(0),
   m_histTopoSimResult(0),
   m_histTopoHdwResult(0),
   m_histTopoSimNotHdwResult(0),
@@ -103,6 +105,10 @@ TrigL1TopoROBMonitor::TrigL1TopoROBMonitor(const std::string& name, ISvcLocator*
   m_histTopoHdwNotSimOverflow(0),
   m_histTopoProblems(0),
   m_histInputLinkCRCfromROIConv(0),
+  m_histTopoDaqRobSimResult(0),
+  m_histTopoDaqRobHdwResult(0),
+  m_histTopoDaqRobSimNotHdwResult(0),
+  m_histTopoDaqRobHdwNotSimResult(0),
   m_setTopoSimResult(false),
   m_firstEvent(true)
 {
@@ -113,6 +119,7 @@ TrigL1TopoROBMonitor::TrigL1TopoROBMonitor(const std::string& name, ISvcLocator*
   declareProperty("doRawMon", m_doRawMon = true, "enable L1Topo monitoring direct from ROB fragments");
   declareProperty("doCnvMon", m_doCnvMon = true, "enable L1Topo monitoring via converters");
   declareProperty("doSimMon", m_doSimMon = true, "enable L1Topo hardware vs simulation comparison");
+  declareProperty("doSimDaq", m_doSimDaq = true, "enable L1Topo DAQ hardware vs simulation comparison");
   declareProperty("doWriteValData", m_doWriteValData = true, "write L1Topo simulation/validation data into HLTResult"); 
   declareProperty("useDetMask", m_useDetMask = true, "only monitor if L1Topo is included in the event according to the detector mask; this can disable monitoring automatically in spite of other options");
   declareProperty("SimTopoCTPLocation", m_simTopoCTPLocation = LVL1::DEFAULT_L1TopoCTPLocation, "StoreGate key of simulated topo decision output for CTP, defaults to default output key of L1TopoSimulation" );
@@ -128,6 +135,7 @@ StatusCode TrigL1TopoROBMonitor::initialize(){
   ATH_MSG_DEBUG ( m_doRawMon );
   ATH_MSG_DEBUG ( m_doCnvMon );
   ATH_MSG_DEBUG ( m_doSimMon );
+  ATH_MSG_DEBUG ( m_doSimDaq );
   ATH_MSG_DEBUG ( m_doWriteValData );
   ATH_MSG_DEBUG ( m_useDetMask );
   ATH_MSG_DEBUG ( m_vDAQROBIDs );
@@ -206,6 +214,9 @@ StatusCode TrigL1TopoROBMonitor::execute() {
     CHECK( doSimMon(prescaleForDAQROBAccess) );
     CHECK( doOverflowSimMon() );
   }
+  if(m_doSimDaq){
+      CHECK(doSimDaq(prescaleForDAQROBAccess));
+  }
  
   if (m_doWriteValData){
     CHECK( doWriteValData() );
@@ -287,6 +298,8 @@ StatusCode TrigL1TopoROBMonitor::beginRun() {
   CHECK( bookAndRegisterHist(rootHistSvc, m_histTopoSimHdwEventOverflowComparison, "Hdw_vs_Sim_EventOverflow", "L1Topo overflow hardware XOR simulation event-by-event differences", m_nTopoCTPOutputs, 0, m_nTopoCTPOutputs) ) ;
   CHECK( bookAndRegisterHist(rootHistSvc, m_histTopoCtpSimHdwEventComparison, "CTP_Hdw_vs_Sim_Events", "L1Topo decisions CTP hardware XOR simulation event-by-event differences, events with no overflows", m_nTopoCTPOutputs, 0, m_nTopoCTPOutputs) ) ;
   CHECK( bookAndRegisterHist(rootHistSvc, m_histTopoCtpHdwEventComparison, "CTP_Hdw_vs_L1Topo_Hdw_Events", "L1Topo decisions hardware (trigger|overflow) XOR CTP TIP hardware event-by-event differences, events with no overflows", m_nTopoCTPOutputs, 0, m_nTopoCTPOutputs) ) ;
+  CHECK( bookAndRegisterHist(rootHistSvc, m_histTopoDaqRobEventComparison, "DAQ_ROB_Hdw_vs_L1Topo_Hdw_Events", "L1Topo decisions hardware XOR DAQ ROB hardware event-by-event differences", m_nTopoCTPOutputs, 0, m_nTopoCTPOutputs) ) ;
+  CHECK( bookAndRegisterHist(rootHistSvc, m_histDaqRobCtpEventComparison, "DAQ_ROB_Hdw_vs_CTP_Hdw_Events", "L1Topo DAQ ROB hardware XOR CTP TIP hardware event-by-event differences", m_nTopoCTPOutputs, 0, m_nTopoCTPOutputs) ) ;
   CHECK( bookAndRegisterHist(rootHistSvc, m_histTopoSimResult, "SimResults", "L1Topo simulation accepts, events with no overflows", m_nTopoCTPOutputs, 0, m_nTopoCTPOutputs) );
   CHECK( bookAndRegisterHist(rootHistSvc, m_histTopoHdwResult, "HdwResults", "L1Topo hardware accepts, events with no overflows", m_nTopoCTPOutputs, 0, m_nTopoCTPOutputs) ) ;
   CHECK( bookAndRegisterHist(rootHistSvc, m_histTopoSimNotHdwResult, "SimNotHdwResult", "L1Topo events with simulation accept and hardware fail, events with no overflows", m_nTopoCTPOutputs, 0, m_nTopoCTPOutputs) );
@@ -298,6 +311,10 @@ StatusCode TrigL1TopoROBMonitor::beginRun() {
   unsigned int nProblems=m_problems.size();
   CHECK( bookAndRegisterHist(rootHistSvc, m_histTopoProblems, "Problems", "Counts of various problems", nProblems, 0, nProblems) ) ;
   CHECK( bookAndRegisterHist(rootHistSvc, m_histInputLinkCRCfromROIConv, "InputLinkCRCs","CRC flags for input links, from ROI via converter", 5, 0, 5) );
+  CHECK( bookAndRegisterHist(rootHistSvc, m_histTopoDaqRobSimResult, "SimDaqRobResults", "L1Topo simulation accepts, events with no overflows (DAQ ROB)", m_nTopoCTPOutputs, 0, m_nTopoCTPOutputs) );
+  CHECK( bookAndRegisterHist(rootHistSvc, m_histTopoDaqRobHdwResult, "HdwDaqRobResults", "L1Topo hardware accepts, events with no overflows (DAQ ROB)", m_nTopoCTPOutputs, 0, m_nTopoCTPOutputs) ) ;
+  CHECK( bookAndRegisterHist(rootHistSvc, m_histTopoDaqRobSimNotHdwResult, "SimNotHdwDaqRobResult", "L1Topo events with simulation accept and hardware fail, events with no overflows (DAQ ROB)", m_nTopoCTPOutputs, 0, m_nTopoCTPOutputs) );
+  CHECK( bookAndRegisterHist(rootHistSvc, m_histTopoDaqRobHdwNotSimResult, "HdwNotSimDaqRobResult", "L1Topo events with hardware accept and simulation fail, events with no overflows (DAQ ROB)", m_nTopoCTPOutputs, 0, m_nTopoCTPOutputs) );
 
   // Next, apply x-bin labels to some histograms
 
@@ -363,6 +380,12 @@ StatusCode TrigL1TopoROBMonitor::beginRun() {
       m_histTopoSimHdwEventOverflowComparison->GetXaxis()->SetBinLabel(binIndex+1,label.c_str());
       m_histTopoCtpSimHdwEventComparison->GetXaxis()->SetBinLabel(binIndex+1,label.c_str());
       m_histTopoCtpHdwEventComparison->GetXaxis()->SetBinLabel(binIndex+1,label.c_str());
+      m_histTopoDaqRobEventComparison->GetXaxis()->SetBinLabel(binIndex+1,label.c_str());
+      m_histDaqRobCtpEventComparison->GetXaxis()->SetBinLabel(binIndex+1,label.c_str());
+      m_histTopoDaqRobSimResult->GetXaxis()->SetBinLabel(binIndex+1,label.c_str());
+      m_histTopoDaqRobHdwResult->GetXaxis()->SetBinLabel(binIndex+1,label.c_str());
+      m_histTopoDaqRobSimNotHdwResult->GetXaxis()->SetBinLabel(binIndex+1,label.c_str());
+      m_histTopoDaqRobHdwNotSimResult->GetXaxis()->SetBinLabel(binIndex+1,label.c_str());
     }
   }
 
@@ -449,6 +472,8 @@ StatusCode TrigL1TopoROBMonitor::doCnvMon(bool prescalForDAQROBAccess) {
   m_overflowBits.reset();
   m_topoSimResult.reset();
   m_topoCtpResult.reset();
+  m_triggerBitsDaqRob.reset();
+  m_overflowBitsDaqRob.reset();
   m_setTopoSimResult=false;
 
   // Retrieve and print the L1Topo RDOs from the ROI RODs
@@ -533,7 +558,8 @@ StatusCode TrigL1TopoROBMonitor::doCnvMon(bool prescalForDAQROBAccess) {
   // Only check DAQ ROBs if prescaler said yes
   if (prescalForDAQROBAccess){
 
-    std::vector<L1Topo::L1TopoTOB> daqTobsBC0;
+    std::vector<L1Topo::L1TopoTOB> daqTobsBC0; // to compute m_triggerBitsDaqRob, m_overflowBitsDaqRob
+    std::vector<uint32_t> tobsbc0SourceIds; // to compute bit indices
     
     // Retrieve the L1Topo RDOs from the DAQ RODs
     const DataHandle<L1TopoRDOCollection> rdos = 0;
@@ -618,7 +644,8 @@ StatusCode TrigL1TopoROBMonitor::doCnvMon(bool prescalForDAQROBAccess) {
               daqTobs.push_back(tob);
               if (header.bcn_offset()==0){
                 daqTobsBC0.push_back(tob);
-	    }
+                tobsbc0SourceIds.push_back(rdo->getSourceID());
+              }
               break;
             }
           default:
@@ -636,14 +663,9 @@ StatusCode TrigL1TopoROBMonitor::doCnvMon(bool prescalForDAQROBAccess) {
     }
     
   // Compare ROI and DAQ L1Topo TOBS
-
-  // need to sort them first? Note zero supression possible
-
       if (roiTobs.empty() and daqTobsBC0.empty()){
 	ATH_MSG_DEBUG( "L1Topo TOBs from both ROI and DAQ via converters are empty: zero supression or problem?" );
       } 
-
-    
     /*
       if (daqTobsBC0==roiTobs){
       ATH_MSG_DEBUG( "DAQ L1Topo TOBs from BC0 are the same as ROI L1Topo TOBs" );
@@ -654,7 +676,26 @@ StatusCode TrigL1TopoROBMonitor::doCnvMon(bool prescalForDAQROBAccess) {
       //compareL1TopoTOBs(daqTobsBC0,roiTobs);
     */
 
-  }
+      // the comparison of all words is non-trivial, because of
+      // different ordering and zero suppression (some TOBs could be
+      // missing from the DAQ output).
+      // So we just compare the decision bits.
+      ATH_MSG_DEBUG("Assigning trigger and overflow bitsets from "<<daqTobsBC0.size()<<" words from the DAQ ROB");
+      for(uint32_t iTob=0; iTob<daqTobsBC0.size(); ++iTob){
+          const L1Topo::L1TopoTOB &tob = daqTobsBC0[iTob];
+          const uint32_t &sourceId = tobsbc0SourceIds[iTob];
+          for(unsigned int i=0; i<8; ++i){
+              unsigned int index = L1Topo::triggerBitIndexNew(sourceId, tob, i);
+              m_triggerBitsDaqRob[index]  = (tob.trigger_bits()>>i)&1;
+              m_overflowBitsDaqRob[index] = (tob.overflow_bits()>>i)&1;
+          }
+      } // for(tob)
+      ATH_MSG_VERBOSE("trigger  bits from DAQ ROB Cnv: "<<m_triggerBitsDaqRob);
+      ATH_MSG_VERBOSE("overflow bits from DAQ ROB Cnv: "<<m_overflowBitsDaqRob);
+      compBitSets("L1Topo hardware", "L1Topo DAQ ROB",
+                  m_triggerBits, m_triggerBitsDaqRob,
+                  m_histTopoDaqRobEventComparison);
+  } // if(prescalForDAQROBAccess)
   else {
     ATH_MSG_DEBUG( "L1Topo DAQ ROB access via converter skipped due to prescale" );
   }
@@ -699,13 +740,6 @@ StatusCode TrigL1TopoROBMonitor::doSimMon(bool prescalForDAQROBAccess){
       ATH_MSG_INFO( "Retrieve of LVL1::FrontPanelCTP failed. Skipping simulation comparison." );
     }
     else {
-
-
-      // New code to fill histograms of simulated L1Topo decisions bits and comparison
-      
-      // Do the comparison and fill histograms only if the L1Topo items did not overflow
-      if (m_overflowBits.none()){
-
         m_setTopoSimResult=true;
         // From L1CaloL1TopoMon code (simulated result)
         for(unsigned int i=0; i<32; ++i) {
@@ -720,6 +754,9 @@ StatusCode TrigL1TopoROBMonitor::doSimMon(bool prescalForDAQROBAccess){
             m_topoSimResult[96 + i] = 1; // cable 2, clock 1
         }
 
+      // New code to fill histograms of simulated L1Topo decisions bits and comparison
+      // Do the comparison and fill histograms only if the L1Topo items did not overflow
+      if (m_overflowBits.none()){
         // fill histograms
         for (unsigned int i=0; i< m_nTopoCTPOutputs; ++i){
           m_histTopoHdwResult->Fill(i,m_triggerBits.test(i)); 
@@ -795,7 +832,9 @@ StatusCode TrigL1TopoROBMonitor::doSimMon(bool prescalForDAQROBAccess){
         compBitSets("L1Topo hardware trigger|overflow", "CTP TIP hardware",
                     m_triggerBits|m_overflowBits, m_topoCtpResult,
                     m_histTopoCtpHdwEventComparison);
-
+        compBitSets("L1Topo DAQ ROB trigger|overflow", "CTP TIP hardware",
+                    m_triggerBitsDaqRob|m_overflowBitsDaqRob, m_topoCtpResult,
+                    m_histDaqRobCtpEventComparison);
 	if (m_overflowBits.none() && m_setTopoSimResult){
 	  // Compare L1Topo outputs from simulation with those at the CTP
 	  compBitSets("L1Topo CTP TIP hardware", "L1Topo CTP simulation",
@@ -812,7 +851,28 @@ StatusCode TrigL1TopoROBMonitor::doSimMon(bool prescalForDAQROBAccess){
   return StatusCode::SUCCESS;
 
 }
-
+//----------------------------------------------------------
+StatusCode TrigL1TopoROBMonitor::doSimDaq(bool prescalForDAQROBAccess){
+    ATH_MSG_DEBUG( "doSimDaq" );
+    if(prescalForDAQROBAccess and m_setTopoSimResult and m_overflowBitsDaqRob.none()){
+        for (unsigned int i=0; i< m_nTopoCTPOutputs; ++i){
+            m_histTopoDaqRobHdwResult->Fill(i,m_triggerBitsDaqRob.test(i));
+        }
+        for (unsigned int i=0; i< m_nTopoCTPOutputs; ++i){
+            m_histTopoDaqRobSimResult->Fill(i,m_topoSimResult.test(i));
+        }
+        for (unsigned int i=0; i< m_nTopoCTPOutputs; ++i){
+            m_histTopoDaqRobSimNotHdwResult->Fill(i,
+                                                  m_topoSimResult.test(i) and not
+                                                  m_triggerBitsDaqRob.test(i));
+            m_histTopoDaqRobHdwNotSimResult->Fill(i,
+                                                  m_triggerBitsDaqRob.test(i)
+                                                  and not m_topoSimResult.test(i));
+        }
+    } // if(overflow.none)
+    return StatusCode::SUCCESS;
+}
+//----------------------------------------------------------
 StatusCode TrigL1TopoROBMonitor::doWriteValData(){
   ATH_MSG_DEBUG( "doWriteValData" );
 
diff --git a/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/src/TrigL1TopoROBMonitor.h b/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/src/TrigL1TopoROBMonitor.h
index f6027934ea5221e6ddd511afc699ea60042f4276..9d317f2c1e00060e4529c2a81d25e038b1f69023 100644
--- a/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/src/TrigL1TopoROBMonitor.h
+++ b/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/src/TrigL1TopoROBMonitor.h
@@ -43,6 +43,7 @@ class TrigL1TopoROBMonitor:public AthAlgorithm {
   StatusCode doCnvMon(bool);
   StatusCode doRawMon(bool);
   StatusCode doSimMon(bool);
+  StatusCode doSimDaq(bool);
   StatusCode doOverflowSimMon();
   StatusCode doWriteValData();
   StatusCode monitorROBs(const std::vector<uint32_t>&, bool);
@@ -58,6 +59,7 @@ class TrigL1TopoROBMonitor:public AthAlgorithm {
   BooleanProperty m_doRawMon;
   BooleanProperty m_doCnvMon;
   BooleanProperty m_doSimMon;
+  BooleanProperty m_doSimDaq;
   BooleanProperty m_doWriteValData;
   UnsignedIntegerArrayProperty m_vDAQROBIDs;
   UnsignedIntegerArrayProperty m_vROIROBIDs;
@@ -86,6 +88,8 @@ class TrigL1TopoROBMonitor:public AthAlgorithm {
   TH1F* m_histTopoSimHdwEventOverflowComparison;
   TH1F* m_histTopoCtpSimHdwEventComparison;
   TH1F* m_histTopoCtpHdwEventComparison;
+  TH1F* m_histTopoDaqRobEventComparison;
+  TH1F* m_histDaqRobCtpEventComparison;
   TH1F* m_histTopoSimResult;
   TH1F* m_histTopoHdwResult;
   TH1F* m_histTopoSimNotHdwResult;
@@ -98,11 +102,17 @@ class TrigL1TopoROBMonitor:public AthAlgorithm {
   TH1F* m_histInputLinkCRCfromROIConv;
   TH1F* m_histTopoSimOverfl;
   TH1F* m_histTopoHdwOverfl;
+  TH1F* m_histTopoDaqRobSimResult;
+  TH1F* m_histTopoDaqRobHdwResult;
+  TH1F* m_histTopoDaqRobSimNotHdwResult;
+  TH1F* m_histTopoDaqRobHdwNotSimResult;
   std::bitset<m_nTopoCTPOutputs> m_triggerBits; //! trigger bits sent to CTP
   std::bitset<m_nTopoCTPOutputs> m_overflowBits; //! overflow bits corresponding to CTP output
   std::bitset<m_nTopoCTPOutputs> m_topoSimResult; //! simulation of CTP output
   std::bitset<m_nTopoCTPOutputs> m_topoSimOverfl; //! simulation of overflow bits
   std::bitset<m_nTopoCTPOutputs> m_topoCtpResult; //! actual hardware CTP output
+  std::bitset<m_nTopoCTPOutputs> m_triggerBitsDaqRob; //! trigger bits for BC0 from the DAQ ROB
+  std::bitset<m_nTopoCTPOutputs> m_overflowBitsDaqRob; //! overflow bits for BC0 from the DAQ ROB
   bool m_setTopoSimResult; //! keep track of whether this event's sim results had been stored
   bool m_firstEvent; //! used to toggle the ATH_MSG_INFO only on the first event
   enum class Problems {
diff --git a/HLT/Trigger/TrigTransforms/TrigTransform/python/dbgAnalysis.py b/HLT/Trigger/TrigTransforms/TrigTransform/python/dbgAnalysis.py
index 93b7fab31293110c696cb1dd75268a39439e724b..2657baa2bd28f23835d88beae541e6b29e8dc145 100644
--- a/HLT/Trigger/TrigTransforms/TrigTransform/python/dbgAnalysis.py
+++ b/HLT/Trigger/TrigTransforms/TrigTransform/python/dbgAnalysis.py
@@ -28,7 +28,7 @@ def dbgPreRun(inputFileList,outputFileList):
     total = 0
     #open root output file
     out_file = outputFileList[0]
-    hfile = TFile( out_file , 'UPDATE' )
+    hfile = TFile( out_file , 'RECREATE' )
     #inicialize dbgEventInfo,  this is the main event analysis class
     eventInfo = dbgEventInfo("_Pre",inputFileList.value[0])
     data = []
@@ -264,13 +264,13 @@ def getAsetupString(release):
     #If TestArea is for tzero (tzero/software/patches/AtlasP1HLT-RELEASE), then returns tzero/software/patches/AtlasP1HLT-release where release is the parameter given to this function getAsetupString(release)    
     if eVarDic.get('TestArea') :
         TestArea = eVarDic['TestArea']
-        if  TestArea.find("tzero/software/patches/AtlasP1HLT-") > 0 :
+        if  TestArea.find("tzero/software/patches/AthenaP1-") > 0 :
             testarea = TestArea.split('-')
             TestArea = testarea[0]+'-'+release
-        asetupString = AtlasProject + ',' + release + ',gcc49,cvmfs --testarea '+ TestArea
+        asetupString = AtlasProject + ',' + release + ',gcc62 --testarea '+ TestArea
         return asetupString
 
     #else, there is no TestArea,  then use the local directory    
     else :
-        asetupString = AtlasProject + ',' + release + ',gcc49,here'
+        asetupString = AtlasProject + ',' + release + ',gcc62,here'
     return asetupString
diff --git a/HLT/Trigger/TrigTransforms/TrigTransform/python/dbgEventInfo.py b/HLT/Trigger/TrigTransforms/TrigTransform/python/dbgEventInfo.py
index e9ce500f4f44fc85fe52fa7c134384b1804966ae..579683da3b1b3b9bd1be426d5af3707535525c9e 100644
--- a/HLT/Trigger/TrigTransforms/TrigTransform/python/dbgEventInfo.py
+++ b/HLT/Trigger/TrigTransforms/TrigTransform/python/dbgEventInfo.py
@@ -405,7 +405,6 @@ class dbgEventInfo:
 
 
     def root_definitions(self,dbgStep,inputFile):
-        gROOT.Reset()
         gStyle.SetCanvasColor(0)
         gStyle.SetOptStat(000000)
         gROOT.SetStyle("Plain")
diff --git a/HLT/Trigger/TrigTransforms/TrigTransform/python/trigRecoExe.py b/HLT/Trigger/TrigTransforms/TrigTransform/python/trigRecoExe.py
index 5e5b57a923670f870ed7f964ca722800595da339..8726c20d3edd14120f200da041ed11359594acaa 100644
--- a/HLT/Trigger/TrigTransforms/TrigTransform/python/trigRecoExe.py
+++ b/HLT/Trigger/TrigTransforms/TrigTransform/python/trigRecoExe.py
@@ -16,7 +16,7 @@ import re
 from PyJobTransforms.trfExe import athenaExecutor
 
 #imports for preExecute
-from PyJobTransforms.trfUtils import asetupReport
+from PyJobTransforms.trfUtils import asetupReport, cvmfsDBReleaseCheck
 import PyJobTransforms.trfEnv as trfEnv
 import PyJobTransforms.trfExceptions as trfExceptions
 from PyJobTransforms.trfExitCodes import trfExit as trfExit
diff --git a/InnerDetector/InDetConditions/InDetCondFolders/python/InDetAlignFolders.py b/InnerDetector/InDetConditions/InDetCondFolders/python/InDetAlignFolders.py
index 01056a88de06cea6a6fe526d8749af7d1720733a..b8fd140b9a81418d40cd54b8275e3f8a3518dadf 100644
--- a/InnerDetector/InDetConditions/InDetCondFolders/python/InDetAlignFolders.py
+++ b/InnerDetector/InDetConditions/InDetCondFolders/python/InDetAlignFolders.py
@@ -17,14 +17,9 @@ conddb.addFolderSplitOnline("INDET","/Indet/Onl/IBLDist","/Indet/IBLDist")
 # Adding protection against new dynamic folder scheme;
 # In future we might want to add also to MC DB
 # Solution below is not pretty but in response to JIRA ATLASSIM-2746
-useDynamicAlignFolders = False
-try:
-    from InDetRecExample.InDetJobProperties import InDetFlags
-    if InDetFlags.useDynamicAlignFolders and conddb.dbdata == "CONDBR2":
-        useDynamicAlignFolders = True
-except ImportError:
-    pass
-if useDynamicAlignFolders:
+
+from AtlasGeoModel.InDetGMJobProperties import GeometryFlags as geoFlags
+if geoFlags.useDynamicAlignFolders():
     conddb.addFolderSplitOnline("INDET","/Indet/Onl/AlignL1/ID","/Indet/AlignL1/ID")
     conddb.addFolderSplitOnline("INDET","/Indet/Onl/AlignL2/PIX","/Indet/AlignL2/PIX")
     conddb.addFolderSplitOnline("INDET","/Indet/Onl/AlignL2/SCT","/Indet/AlignL2/SCT")
@@ -34,4 +29,3 @@ if useDynamicAlignFolders:
 else:
     conddb.addFolderSplitOnline("INDET","/Indet/Onl/Align","/Indet/Align")
     conddb.addFolderSplitOnline("TRT","/TRT/Onl/Align","/TRT/Align")
-del useDynamicAlignFolders #tidy up
diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelDetectorFactory.h b/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelDetectorFactory.h
index bec4be43cf146ac386723d60247d171f18c30874..cbdc029d95fc328c17579b7f520e0549cbdbb56d 100644
--- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelDetectorFactory.h
+++ b/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelDetectorFactory.h
@@ -32,8 +32,6 @@ class PixelDetectorFactory : public InDetDD::DetectorFactoryBase {
   // Access to the results:
   virtual const InDetDD::PixelDetectorManager * getDetectorManager() const;
 
-  // Determine which alignment folders are loaded to decide if we register old or new folders
-  virtual InDetDD::AlignFolderType getAlignFolderType() const;
 
  private:  
   
@@ -45,6 +43,9 @@ class PixelDetectorFactory : public InDetDD::DetectorFactoryBase {
   PixelGeometryManager * m_geometryManager;
 
   void doChecks();
+
+private:
+  bool m_useDynamicAlignFolders;
   
 };
 
diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelDetectorTool.h b/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelDetectorTool.h
index ce6918b56ea107bfac9cee1080cdd649b8ae4548..28e8fa98d305b4653be26f9cd3b314d2fdf1a4dd 100644
--- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelDetectorTool.h
+++ b/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelDetectorTool.h
@@ -52,6 +52,7 @@ private:
   bool m_initialLayout;
   bool m_devVersion;
   bool m_buildDBM;
+  bool m_useDynamicAlignFolders;
   ToolHandle< IGeoSubDetTool > m_bcmTool;
   ToolHandle< IGeoSubDetTool > m_blmTool;
   ToolHandle< IInDetServMatBuilderTool > m_serviceBuilderTool;
diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelSwitches.h b/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelSwitches.h
index 68eadf25111da8d9b5d4e0929bb70af8f23e1b8e..27f2119debd22ef3202460384ff89b5d09594d5f 100644
--- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelSwitches.h
+++ b/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelSwitches.h
@@ -51,6 +51,10 @@ public:
   void setDBM(bool flag = false);
   bool dbm() const;
 
+  //dynamic alignment folders
+  void setDynamicAlignFolders(const bool useDynAlignFolders);
+  bool dynamicAlignFolders() const;
+
 private:
 
   // flag to build also the services
@@ -80,6 +84,8 @@ private:
   // DBM
   bool m_dbm;
 
+  //controls which set of alignment folders is used
+  bool m_dynAlignFolders;
 };
 
 #endif // PixelSwitches_H
diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactory.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactory.cxx
index 8579934f433d6271d1ef630de7a42309fdab5f8e..ad94ef9e327949f6fcb310f77dc080b63df23c9e 100644
--- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactory.cxx
+++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactory.cxx
@@ -34,7 +34,8 @@ using InDetDD::SiCommonItems;
 PixelDetectorFactory::PixelDetectorFactory(const PixelGeoModelAthenaComps * athenaComps,
 					   const PixelSwitches & switches)
   : InDetDD::DetectorFactoryBase(athenaComps),
-    m_detectorManager(0)
+    m_detectorManager(0),
+    m_useDynamicAlignFolders(false)
 {
   // Create the detector manager
   m_detectorManager = new PixelDetectorManager(detStore());
@@ -97,6 +98,8 @@ PixelDetectorFactory::PixelDetectorFactory(const PixelGeoModelAthenaComps * athe
 			   versionPatchNumber);
   m_detectorManager->setVersion(version);
 
+  m_useDynamicAlignFolders = switches.dynamicAlignFolders();
+
 }
 
 
@@ -162,10 +165,8 @@ void PixelDetectorFactory::create(GeoPhysVol *world)
   // Register the callbacks and keys and the level corresponding to the key.
   if (m_geometryManager->Alignable()) {
 
-    InDetDD::AlignFolderType AlignFolder = getAlignFolderType();
-    m_detectorManager->addAlignFolderType(AlignFolder);
-
-    if (AlignFolder==InDetDD::static_run1){
+    if (!m_useDynamicAlignFolders){
+      m_detectorManager->addAlignFolderType(InDetDD::static_run1);
       m_detectorManager->addFolder("/Indet/Align");
       m_detectorManager->addChannel("/Indet/Align/ID",     2, InDetDD::global);
       m_detectorManager->addChannel("/Indet/Align/PIX",    1, InDetDD::global);
@@ -181,7 +182,8 @@ void PixelDetectorFactory::create(GeoPhysVol *world)
       m_detectorManager->addChannel("/Indet/Align/PIXEC3", 0, InDetDD::local);
     }
     
-    if (AlignFolder==InDetDD::timedependent_run2){
+    else {
+      m_detectorManager->addAlignFolderType(InDetDD::timedependent_run2);
       m_detectorManager->addGlobalFolder("/Indet/AlignL1/ID");
       m_detectorManager->addGlobalFolder("/Indet/AlignL2/PIX");
       m_detectorManager->addChannel("/Indet/AlignL1/ID",     2, InDetDD::global);
@@ -366,31 +368,4 @@ PixelDetectorFactory::doChecks()
 
 }
 
-// Determine which alignment folders are loaded to decide if we register old or new folders
-InDetDD::AlignFolderType PixelDetectorFactory::getAlignFolderType() const
-{
-
-  bool static_folderStruct = false;
-  bool timedep_folderStruct = false;
-  if (detStore()->contains<CondAttrListCollection>("/Indet/AlignL1/ID") &&
-      detStore()->contains<CondAttrListCollection>("/Indet/AlignL2/PIX") &&
-      detStore()->contains<AlignableTransformContainer>("/Indet/AlignL3") ) timedep_folderStruct = true;
-
-  if (detStore()->contains<AlignableTransformContainer>("/Indet/Align") ) static_folderStruct = true;
-
-  if (static_folderStruct && !timedep_folderStruct){
-    msg(MSG::INFO) << " Static run1 type alignment folder structure found" << endmsg; 
-    return InDetDD::static_run1;
-  }
-  else if (!static_folderStruct && timedep_folderStruct){
-    msg(MSG::INFO) << " Time dependent run2 type alignment folder structure found" << endmsg;
-    return InDetDD::timedependent_run2;
-  }
-  else if (static_folderStruct && timedep_folderStruct){
-    throw std::runtime_error("Old and new alignment folders are loaded at the same time! This should not happen!");    
-  }
-  else return InDetDD::none;
-
-}
-
 
diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorTool.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorTool.cxx
index 3aff1ba7c39c5f5af882f19512f944d998b420df..be6a7ee9b21407af4bdef309fea167f32aa1de4d 100644
--- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorTool.cxx
+++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorTool.cxx
@@ -42,6 +42,7 @@ PixelDetectorTool::PixelDetectorTool( const std::string& type, const std::string
     m_detectorName("PixelDetector"),
     m_IBLParameterSvc("IBLParameterSvc",name),
     m_buildDBM(0),
+    m_useDynamicAlignFolders(false),
     m_bcmTool(""),
     m_blmTool(""),
     m_serviceBuilderTool(""),
@@ -67,6 +68,7 @@ PixelDetectorTool::PixelDetectorTool( const std::string& type, const std::string
   declareProperty("GeoModelSvc", m_geoModelSvc);
   declareProperty("LorentzAngleSvc", m_lorentzAngleSvc);
   declareProperty("OverrideVersionName", m_overrideVersionName);
+  declareProperty("useDynamicAlignFolders", m_useDynamicAlignFolders);
 }
 /**
  ** Destructor
@@ -198,6 +200,7 @@ StatusCode PixelDetectorTool::create( StoreGateSvc* detStore )
     if (versionName == "SLHC") switches.setSLHC();
     if (versionName == "IBL") switches.setIBL();
     switches.setDBM(m_buildDBM); //DBM flag
+    switches.setDynamicAlignFolders(m_useDynamicAlignFolders);
 
     //JBdV
     switches.setServicesOnLadder(m_servicesOnLadder);
@@ -383,7 +386,7 @@ PixelDetectorTool::registerCallback( StoreGateSvc* detStore)
   StatusCode sc = StatusCode::FAILURE;
   if (m_alignable) {
 
-    {  
+    if (m_useDynamicAlignFolders) {  
       std::string folderName = "/Indet/AlignL1/ID";
       if (detStore->contains<CondAttrListCollection>(folderName)) {
 	msg(MSG::DEBUG) << "Registering callback on global Container with folder " << folderName << endmsg;
@@ -435,7 +438,7 @@ PixelDetectorTool::registerCallback( StoreGateSvc* detStore)
     }
 
     
-    {
+    else {
       std::string folderName = "/Indet/Align";
       if (detStore->contains<AlignableTransformContainer>(folderName)) {
 	if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Registering callback on AlignableTransformContainer with folder " << folderName << endmsg;
diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelSwitches.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelSwitches.cxx
index fd244ad0111eca751eeb0f2764d40023b3c53e68..7de1740d43e48d277f847dce7336fbe5211c3343 100644
--- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelSwitches.cxx
+++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelSwitches.cxx
@@ -13,7 +13,8 @@ PixelSwitches::PixelSwitches()
     m_alignable(true),
     m_slhc(false),
     m_ibl(false),
-    m_dbm(false)
+    m_dbm(false),
+    m_dynAlignFolders(false)
 {}
 
 void PixelSwitches::setServices(bool flag) {m_services = flag;}
@@ -46,3 +47,5 @@ bool PixelSwitches::ibl() const {return m_ibl;}
 void PixelSwitches::setDBM(bool flag) {m_dbm = flag;} //switch to build the DBM
 bool PixelSwitches::dbm() const {return m_dbm;}
 
+void PixelSwitches::setDynamicAlignFolders(const bool useDynAlignFolders){m_dynAlignFolders = useDynAlignFolders;}
+bool PixelSwitches::dynamicAlignFolders() const {  return m_dynAlignFolders;}
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorFactory.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorFactory.h
index 634c767f63553fbefeee324a86c1030ce51b356e..822cea24a084f1dc0b778720200895e2f518b63a 100755
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorFactory.h
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorFactory.h
@@ -31,9 +31,6 @@ class SCT_DetectorFactory : public InDetDD::DetectorFactoryBase
   // Access to the results: 
   virtual const InDetDD::SCT_DetectorManager * getDetectorManager() const; 
 
-  // Determine which alignment folders are loaded to decide if we register old or new folders
-  virtual InDetDD::AlignFolderType getAlignFolderType() const;
-
  private: 
   // Copy and assignments operations illegal and so are made private
   SCT_DetectorFactory(const SCT_DetectorFactory &right); 
@@ -41,6 +38,7 @@ class SCT_DetectorFactory : public InDetDD::DetectorFactoryBase
 
   InDetDD::SCT_DetectorManager *m_detectorManager;
   SCT_GeometryManager *m_geometryManager;
+  bool m_useDynamicAlignFolders;
 
 }; 
  
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorTool.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorTool.h
index 503354587f7a3daefd9a1575f789322e2cbec01c..3d7db762dc43b7e2708b026dd32ec6e46308192c 100755
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorTool.h
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_DetectorTool.h
@@ -45,6 +45,7 @@ private:
   bool m_initialLayout;
   bool m_alignable;
   bool m_cosmic;
+  bool m_useDynamicAlignFolders;
   
   const InDetDD::SCT_DetectorManager * m_manager;
   
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Options.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Options.h
index e20e1900bc6ea69173d2558135d0971a33ee96ac..fd79a5649692bf709ce1a415cf741b15b20968a1 100755
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Options.h
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Options.h
@@ -25,6 +25,9 @@ public:
   void setAlignable(bool flag = true);
   void setAlignAtModuleLevel(bool flag = true);
 
+  //dynamic alignment folders
+  void setDynamicAlignFolders(const bool flag = true);
+  bool dynamicAlignFolders() const;
 
 private:
 
@@ -33,7 +36,7 @@ private:
   bool m_dc2Geometry;
   bool m_alignable;
   bool m_alignModule;
-
+  bool m_dynAlignFolders;   //controls which set of alignment folders is used
 
 };
 
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx
index 226f75905bb34e17d5881e329c780ef94ab12609..26b5b37ea82c280233ffbc5ed54bcee527388c55 100755
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx
@@ -63,7 +63,8 @@ using InDetDD::SiCommonItems;
 
 SCT_DetectorFactory::SCT_DetectorFactory(const SCT_GeoModelAthenaComps * athenaComps,
 					 const SCT_Options & options)
-  : InDetDD::DetectorFactoryBase(athenaComps) 
+  : InDetDD::DetectorFactoryBase(athenaComps),
+    m_useDynamicAlignFolders(false)
 { 
   
   // Create the detector manager
@@ -76,6 +77,8 @@ SCT_DetectorFactory::SCT_DetectorFactory(const SCT_GeoModelAthenaComps * athenaC
   m_geometryManager = new SCT_GeometryManager();
   m_geometryManager->setOptions(options);
   m_geometryManager->setAthenaComps(athenaComps);
+
+  m_useDynamicAlignFolders = options.dynamicAlignFolders();
  
   // Pass the Athena components the data base access class
   SCT_DataBase::setAthenaComps(athenaComps);
@@ -274,14 +277,15 @@ void SCT_DetectorFactory::create(GeoPhysVol *world)
   // Register the keys and the level corresponding to the key
   // and whether it expects a global or local shift.
   // level 0: sensor, level 1: module, level 2, layer/disc, level 3: whole barrel/enccap
-  InDetDD::AlignFolderType AlignFolder = getAlignFolderType();
-  m_detectorManager->addAlignFolderType(AlignFolder);
 
-  if (AlignFolder==InDetDD::static_run1){
+
+  if (!m_useDynamicAlignFolders){
+
+    m_detectorManager->addAlignFolderType(InDetDD::static_run1);
     m_detectorManager->addFolder("/Indet/Align");
     m_detectorManager->addChannel("/Indet/Align/ID",3,InDetDD::global);
     m_detectorManager->addChannel("/Indet/Align/SCT",2,InDetDD::global);
-  
+    
     if (barrelPresent) {
       m_detectorManager->addChannel("/Indet/Align/SCTB1",1,InDetDD::local);
       m_detectorManager->addChannel("/Indet/Align/SCTB2",1,InDetDD::local);
@@ -311,8 +315,9 @@ void SCT_DetectorFactory::create(GeoPhysVol *world)
       m_detectorManager->addChannel("/Indet/Align/SCTEC9",1,InDetDD::local);
     }
   }
-
-  if (AlignFolder==InDetDD::timedependent_run2){
+  
+  else {
+    m_detectorManager->addAlignFolderType(InDetDD::timedependent_run2);
     m_detectorManager->addGlobalFolder("/Indet/AlignL1/ID");
     m_detectorManager->addGlobalFolder("/Indet/AlignL2/SCT");
     m_detectorManager->addChannel("/Indet/AlignL1/ID",3,InDetDD::global);
@@ -361,29 +366,3 @@ const SCT_DetectorManager * SCT_DetectorFactory::getDetectorManager() const
 }
  
 
-// Determine which alignment folders are loaded to decide if we register old or new folders                                         
-InDetDD::AlignFolderType SCT_DetectorFactory::getAlignFolderType() const
-{
-
-  bool static_folderStruct = false;
-  bool timedep_folderStruct = false;
-  if (detStore()->contains<CondAttrListCollection>("/Indet/AlignL1/ID") &&
-      detStore()->contains<CondAttrListCollection>("/Indet/AlignL2/SCT") &&
-      detStore()->contains<AlignableTransformContainer>("/Indet/AlignL3") ) timedep_folderStruct = true;
-
-  if (detStore()->contains<AlignableTransformContainer>("/Indet/Align") ) static_folderStruct = true;
-
-  if (static_folderStruct && !timedep_folderStruct){
-    msg(MSG::INFO) << " Static run1 type alignment folder structure found" << endreq;
-    return InDetDD::static_run1;
-  }
-  else if (!static_folderStruct && timedep_folderStruct){
-    msg(MSG::INFO) << " Time dependent run2 type alignment folder structure found" << endreq;
-    return InDetDD::timedependent_run2;
-  }
-  else if (static_folderStruct && timedep_folderStruct){
-    throw std::runtime_error("Old and new alignment folders are loaded at the same time! This should not happen!");
-  }
-  else return InDetDD::none;
-
-}
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorTool.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorTool.cxx
index 3153d98a2062cefa169001fb70ff8049026bd219..8eb23959723dc66505f747c5a70dfe8ceb29c929 100755
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorTool.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorTool.cxx
@@ -42,6 +42,7 @@ SCT_DetectorTool::SCT_DetectorTool( const std::string& type,
     m_initialLayout(false),
     m_alignable(true),
     m_cosmic(false),
+    m_useDynamicAlignFolders(false),
     m_manager(0), 
     m_athenaComps(0),
     m_geoModelSvc("GeoModelSvc",name),
@@ -58,6 +59,7 @@ SCT_DetectorTool::SCT_DetectorTool( const std::string& type,
   declareProperty("GeometryDBSvc", m_geometryDBSvc);
   declareProperty("GeoModelSvc", m_geoModelSvc);
   declareProperty("LorentzAngleSvc", m_lorentzAngleSvc);
+  declareProperty("useDynamicAlignFolders", m_useDynamicAlignFolders);
 }
 
 //
@@ -171,7 +173,7 @@ SCT_DetectorTool::create( StoreGateSvc* detStore )
       SCT_Options options;
       
       options.setAlignable(m_alignable);
-      
+      options.setDynamicAlignFolders(m_useDynamicAlignFolders);
       
       m_manager = 0;
 
@@ -296,7 +298,7 @@ SCT_DetectorTool::registerCallback( StoreGateSvc* detStore)
   StatusCode sc = StatusCode::FAILURE;
   if (m_alignable) {
 
-    {
+    if (m_useDynamicAlignFolders) {
       std::string folderName = "/Indet/AlignL1/ID";
       if (detStore->contains<CondAttrListCollection>(folderName)) {
 	msg(MSG::DEBUG) << "Registering callback on global Container with folder " << folderName << endreq;
@@ -348,7 +350,7 @@ SCT_DetectorTool::registerCallback( StoreGateSvc* detStore)
     }
 
 
-    {
+    else {
       std::string folderName = "/Indet/Align";
       if (detStore->contains<AlignableTransformContainer>(folderName)) {
 	if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Registering callback on AlignableTransformContainer with folder " << folderName << endreq;
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Options.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Options.cxx
index a8a7557952ae3e16b62af289cd5853018d86f894..6b7119b2b16a2d774ca051296ea0a99a73b78e44 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Options.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Options.cxx
@@ -9,7 +9,8 @@ SCT_Options::SCT_Options()
     m_dc1Geometry(false),
     m_dc2Geometry(true),
     m_alignable(true),
-    m_alignModule(true)
+    m_alignModule(true),
+    m_dynAlignFolders(false)
 {}
 
 void 
@@ -76,3 +77,12 @@ SCT_Options::alignAtModuleLevel() const
   return m_alignModule;
 }
 
+void SCT_Options::setDynamicAlignFolders(const bool flag)
+{
+  m_dynAlignFolders = flag;
+}
+
+bool SCT_Options::dynamicAlignFolders() const 
+{  
+  return m_dynAlignFolders;
+}
diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/TRT_GeoModel/TRTDetectorFactory_Full.h b/InnerDetector/InDetDetDescr/TRT_GeoModel/TRT_GeoModel/TRTDetectorFactory_Full.h
index 8e3d09eadaabcb1aaa1de0834b1e5be89eda3e4f..dfc5d5326a405c72c01565e92ff689364fcadb8c 100755
--- a/InnerDetector/InDetDetDescr/TRT_GeoModel/TRT_GeoModel/TRTDetectorFactory_Full.h
+++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/TRT_GeoModel/TRTDetectorFactory_Full.h
@@ -44,7 +44,8 @@ class TRTDetectorFactory_Full : public InDetDD::DetectorFactoryBase  {
 			  int overridedigversion,                              //
 			  bool alignable,                                      //
 			  bool doArgon,                                        //
-        bool doKrypton);                                     //
+			  bool doKrypton,                                      //
+			  bool useDynamicAlignmentFolders);                    //
   //                                                                           //
   // Destructor:                                                               //
   ~TRTDetectorFactory_Full();                                                  //
@@ -62,8 +63,6 @@ class TRTDetectorFactory_Full : public InDetDD::DetectorFactoryBase  {
     return n;
   }
 
-  // Determine which alignment folders are loaded to decide if we register old or new folders
-  virtual InDetDD::AlignFolderType getAlignFolderType() const;
 
  private:  
 
@@ -105,6 +104,7 @@ class TRTDetectorFactory_Full : public InDetDD::DetectorFactoryBase  {
   bool m_strawsvcavailable;
   bool m_doArgon;
   bool m_doKrypton;
+  bool m_useDynamicAlignFolders;
 };
 
 #endif // TRTDetectorFactory_Full_h
diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/TRT_GeoModel/TRT_DetectorTool.h b/InnerDetector/InDetDetDescr/TRT_GeoModel/TRT_GeoModel/TRT_DetectorTool.h
index 658ad2cd8881123c38ce6abe4dc75d63b0a318a7..291ca80bcc0b0d6301edb2509d7a50d5f95b94de 100755
--- a/InnerDetector/InDetDetDescr/TRT_GeoModel/TRT_GeoModel/TRT_DetectorTool.h
+++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/TRT_GeoModel/TRT_DetectorTool.h
@@ -58,6 +58,7 @@ public:
  
     bool m_doArgonMixture;
     bool m_doKryptonMixture;
+    bool m_useDynamicAlignFolders;
  
     const InDetDD::TRT_DetectorManager * m_manager;
     InDetDD::AthenaComps * m_athenaComps;
diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.cxx b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.cxx
index b0c95bf37365760f605d433578bd5f06ed74a17d..9c00f02ef21c89819f52deffc6e8e6f448058d0e 100755
--- a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.cxx
+++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.cxx
@@ -69,7 +69,8 @@ TRTDetectorFactory_Full::TRTDetectorFactory_Full(const InDetDD::AthenaComps * at
 						 int overridedigversion,
 						 bool alignable,
 						 bool doArgon,
-             bool doKrypton)
+						 bool doKrypton,
+						 bool useDynamicAlignmentFolders)
   : InDetDD::DetectorFactoryBase(athenaComps), 
     m_detectorManager(0), 
     m_materialManager(0),
@@ -81,9 +82,10 @@ TRTDetectorFactory_Full::TRTDetectorFactory_Full(const InDetDD::AthenaComps * at
     m_sumSvc("TRT_StrawStatusSummarySvc","InDetTRTStrawStatusSummarySvc"),
     m_strawsvcavailable(0),
     m_doArgon(doArgon),
-    m_doKrypton(doKrypton)
+    m_doKrypton(doKrypton),
+    m_useDynamicAlignFolders(useDynamicAlignmentFolders)
 { 
-m_sumSvc=m_summarySvc;
+  m_sumSvc=m_summarySvc;
 }
 //////////////////////////////////////////////////////////////////////////////////
 
@@ -280,10 +282,9 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world)
   const int AlignmentLevelTop       = 3; // Level 1
 
   if (m_alignable) {
-    InDetDD::AlignFolderType AlignFolder = getAlignFolderType();
-    m_detectorManager->addAlignFolderType(AlignFolder);
 
-    if (AlignFolder==InDetDD::static_run1){
+    if (!m_useDynamicAlignFolders){
+      m_detectorManager->addAlignFolderType(InDetDD::static_run1);
       m_detectorManager->addFolder("/TRT/Align");
       m_detectorManager->addChannel("/TRT/Align/TRT", AlignmentLevelTop, InDetDD::global);
 
@@ -300,7 +301,9 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world)
       }
     }
 
-    if (AlignFolder==InDetDD::timedependent_run2){
+    else {
+      m_detectorManager->addAlignFolderType(InDetDD::timedependent_run2);
+
       m_detectorManager->addGlobalFolder("/TRT/AlignL1/TRT");
       m_detectorManager->addChannel("/TRT/AlignL1/TRT", AlignmentLevelTop, InDetDD::global);
       m_detectorManager->addFolder("/TRT/AlignL2");
@@ -2569,30 +2572,4 @@ TRTDetectorFactory_Full::ActiveGasMixture TRTDetectorFactory_Full::DecideGasMixt
   return return_agm; 
   }
 
-// Determine which alignment folders are loaded to decide if we register old or new folders    
-InDetDD::AlignFolderType TRTDetectorFactory_Full::getAlignFolderType() const
-{
-
-  bool static_folderStruct = false;
-  bool timedep_folderStruct = false;
-  if (detStore()->contains<CondAttrListCollection>("/TRT/AlignL1/TRT") &&
-      detStore()->contains<AlignableTransformContainer>("/TRT/AlignL2") ) timedep_folderStruct = true;
-
-  if (detStore()->contains<AlignableTransformContainer>("/TRT/Align") ) static_folderStruct = true;
-
-  if (static_folderStruct && !timedep_folderStruct){
-    msg(MSG::INFO) << " Static run1 type alignment folder structure found" << endreq;
-    return InDetDD::static_run1;
-  }
-  else if (!static_folderStruct && timedep_folderStruct){
-    msg(MSG::INFO) << " Time dependent run2 type alignment folder structure found" << endreq;
-    return InDetDD::timedependent_run2;
-  }
-  else if (static_folderStruct && timedep_folderStruct){
-    throw std::runtime_error("Old and new alignment folders are loaded at the same time! This should not happen!");
-  }
-  else return InDetDD::none;
-
-}
-
 //////////////////////////////////////////////////////////////////////////////////
diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetectorTool.cxx b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetectorTool.cxx
index 4aced09164cf774020959094c7b3fe94933b21e4..ceeb7e221206fff876ab7ae5ebc483d890c8e6ea 100755
--- a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetectorTool.cxx
+++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetectorTool.cxx
@@ -38,6 +38,7 @@ TRT_DetectorTool::TRT_DetectorTool( const std::string& type, const std::string&
     m_sumSvc("TRT_StrawStatusSummarySvc", name),
     m_doArgonMixture(0),
     m_doKryptonMixture(0),
+    m_useDynamicAlignFolders(false),
     m_manager(0),
     m_athenaComps(0)
 {
@@ -51,6 +52,8 @@ TRT_DetectorTool::TRT_DetectorTool( const std::string& type, const std::string&
   declareProperty("InDetTRTStrawStatusSummarySvc", m_sumSvc);  // need for Argon
   declareProperty("DoXenonArgonMixture", m_doArgonMixture); // Set to 1 to use argon. DEFAULT VALUE is 0. Overridden by DOARGONMIXTURE switch
   declareProperty("DoKryptonMixture", m_doKryptonMixture); // Set to 1 to use krypton. DEFAULT VALUE is 0. Overridden by DOKRYPTONMIXTURE switch
+  declareProperty("useDynamicAlignFolders", m_useDynamicAlignFolders);
+
 }
 
 
@@ -209,7 +212,8 @@ StatusCode TRT_DetectorTool::create( StoreGateSvc* detStore )
 					  m_overridedigversion,
 					  m_alignable,
 					  m_doArgonMixture,
-					  m_doKryptonMixture
+					  m_doKryptonMixture,
+					  m_useDynamicAlignFolders
     );
     theTRTFactory.create(world);
     m_manager=theTRTFactory.getDetectorManager();
@@ -244,59 +248,59 @@ TRT_DetectorTool::registerCallback( StoreGateSvc* detStore)
 
   if (m_alignable) {
 
-    // Regular alignment new shema   
+    
     {
-      std::string folderName = "/TRT/AlignL1/TRT";
-      if (detStore->contains<CondAttrListCollection>(folderName)) {
-        msg(MSG::DEBUG) << "Registering callback on global Container with folder " << folderName << endreq;
-        const DataHandle<CondAttrListCollection> calc;
-        StatusCode trttmp = detStore->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool*>(this), calc, folderName);
-        // We don't expect this to fail as we have already checked that the detstore contains the object. 
-        if (trttmp.isFailure()) {
-          msg(MSG::ERROR) << "Problem when register callback on global Container with folder " << folderName <<endreq;
-        } else {
-          sc =  StatusCode::SUCCESS;
-        }
-      } else {
-        msg(MSG::WARNING) << "Unable to register callback on global Container with folder " << folderName <<endreq;
-        //return StatusCode::FAILURE;
-      }
 
-      folderName = "/TRT/AlignL2";
-      if (detStore->contains<AlignableTransformContainer>(folderName)) {
-        if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Registering callback on AlignableTransformContainer with folder " << folderName << endreq;
-        const DataHandle<AlignableTransformContainer> atc;
-        StatusCode sctmp = detStore->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool *>(this), atc, folderName);
-        if(sctmp.isFailure()) {
-          msg(MSG::ERROR) << "Problem when register callback on AlignableTransformContainer with folder " << folderName <<endreq;
-        } else {
-          sc =  StatusCode::SUCCESS;
-        }
-      }
-      else {
-	msg(MSG::WARNING) << "Unable to register callback on AlignableTransformContainer with folder "
-                          << folderName <<  endreq;
-        //return StatusCode::FAILURE;
+      if (m_useDynamicAlignFolders){ // Regular alignment new shema   
+	std::string folderName = "/TRT/AlignL1/TRT";
+	if (detStore->contains<CondAttrListCollection>(folderName)) {
+	  msg(MSG::DEBUG) << "Registering callback on global Container with folder " << folderName << endreq;
+	  const DataHandle<CondAttrListCollection> calc;
+	  StatusCode trttmp = detStore->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool*>(this), calc, folderName);
+	  // We don't expect this to fail as we have already checked that the detstore contains the object. 
+	  if (trttmp.isFailure()) {
+	    msg(MSG::ERROR) << "Problem when register callback on global Container with folder " << folderName <<endreq;
+	  } else {
+	    sc =  StatusCode::SUCCESS;
+	  }
+	} else {
+	  msg(MSG::WARNING) << "Unable to register callback on global Container with folder " << folderName <<endreq;
+	  //return StatusCode::FAILURE;
+	}
+	
+	folderName = "/TRT/AlignL2";
+	if (detStore->contains<AlignableTransformContainer>(folderName)) {
+	  if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Registering callback on AlignableTransformContainer with folder " << folderName << endreq;
+	  const DataHandle<AlignableTransformContainer> atc;
+	  StatusCode sctmp = detStore->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool *>(this), atc, folderName);
+	  if(sctmp.isFailure()) {
+	    msg(MSG::ERROR) << "Problem when register callback on AlignableTransformContainer with folder " << folderName <<endreq;
+	  } else {
+	    sc =  StatusCode::SUCCESS;
+	  }
+	}
+	else {
+	  msg(MSG::WARNING) << "Unable to register callback on AlignableTransformContainer with folder "
+			    << folderName <<  endreq;
+	  //return StatusCode::FAILURE;
+	}
       }
-    }
-
-
-    // Regular alignment
-    {
-      std::string folderName = "/TRT/Align";
-      if (detStore->contains<AlignableTransformContainer>(folderName)) {
-	msg(MSG::DEBUG) << "Registering callback on AlignableTransformContainer with folder " << folderName << endreq;
-	const DataHandle<AlignableTransformContainer> atc;
-	StatusCode sctmp = detStore->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool *>(this), atc, folderName);
-	// We don't expect this to fail as we have already checked that the detstore contains the object.
-	if (sctmp.isFailure()) {
-	  msg(MSG::ERROR) << "Problem when register callback on AlignableTransformContainer with folder " << folderName <<endreq;
+      else {  // Regular alignment old schema
+	std::string folderName = "/TRT/Align";
+	if (detStore->contains<AlignableTransformContainer>(folderName)) {
+	  msg(MSG::DEBUG) << "Registering callback on AlignableTransformContainer with folder " << folderName << endreq;
+	  const DataHandle<AlignableTransformContainer> atc;
+	  StatusCode sctmp = detStore->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool *>(this), atc, folderName);
+	  // We don't expect this to fail as we have already checked that the detstore contains the object.
+	  if (sctmp.isFailure()) {
+	    msg(MSG::ERROR) << "Problem when register callback on AlignableTransformContainer with folder " << folderName <<endreq;
+	  } else {
+	    sc =  StatusCode::SUCCESS;
+	  }
 	} else {
-	  sc =  StatusCode::SUCCESS;
+	  msg(MSG::WARNING) << "Unable to register callback on AlignableTransformContainer with folder "
+			    << folderName << ", Alignments disabled! (Only if no Run2 schema is loaded)" << endreq;
 	}
-      } else {
-	msg(MSG::WARNING) << "Unable to register callback on AlignableTransformContainer with folder "
-			  << folderName << ", Alignments disabled! (Only if no Run2 schema is loaded)" << endreq;
       }
     }
 
diff --git a/InnerDetector/InDetExample/InDetRecExample/python/InDetJobProperties.py b/InnerDetector/InDetExample/InDetRecExample/python/InDetJobProperties.py
index 4809bae195222dcd2af2877e526a2c4924c8b796..592d3735cb897f26cbb163a6b475bd33c7da79b6 100644
--- a/InnerDetector/InDetExample/InDetRecExample/python/InDetJobProperties.py
+++ b/InnerDetector/InDetExample/InDetRecExample/python/InDetJobProperties.py
@@ -414,12 +414,6 @@ class doMonitoringAlignment(InDetFlagsJobProperty):
     allowedTypes = ['bool']
     StoredValue  = False
 
-class useDynamicAlignFolders(InDetFlagsJobProperty):
-    """ Use to turn on dynamic alignment constants folder scheme (new development for 2016) """
-    statusOn     = True
-    allowedTypes = ['bool']
-    StoredValue  = False
-
 class doPerfMon(InDetFlagsJobProperty):
     """ Use to turn on PerfMon """
     statusOn     = True
@@ -2515,7 +2509,9 @@ class InDetJobProperties(JobPropertyContainer):
           print '* use non-standard SCT DCS based on ~20V HV cut'          
     if self.useTrtDCS():
        print '* use TRT DCS'
-    if self.useDynamicAlignFolders():
+
+    from AtlasGeoModel.InDetGMJobProperties import GeometryFlags as geoFlags
+    if geoFlags.useDynamicAlignFolders():
        print '* use of Dynamic alignment folder scheme enabled'
 
     if not self.doPRDFormation():
@@ -2654,7 +2650,6 @@ _list_InDetJobProperties = [Enabled,
                             doMonitoringSCT,
                             doMonitoringTRT,
                             doMonitoringAlignment,
-                            useDynamicAlignFolders,
                             doPerfMon,
                             AODall,
                             useBeamConstraint,
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringPixel.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringPixel.py
index 48ce0c7eb18445de0671c1e420a5b6004fb542ef..67206c47adb1ac418341dff799cf3c384c98626a 100644
--- a/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringPixel.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringPixel.py
@@ -29,7 +29,7 @@ if doAllHits:
 
                                   do2DMaps            = True,       #Turn on/off the sets of 2D module maps                                             
                                   doModules           = doAllHitsModules, #Turn on/off the sets of 1744 module histograms (for dqmf)
-                                  doFEChipSummary     = doAllHitsModules, #Turn on/off the 1744 module FE chip summary histograms (low memory version of doModules)
+                                  doFEChipSummary     = False,      #Turn on/off the 1744 module FE chip summary histograms (low memory version of doModules)
                                   doLowOccupancy      = False,      #Turn on/off histograms with binning for cosmics/single beam                        
                                   doHighOccupancy     = True,       #Turn on/off histograms with binning for collisions                                 
                                   doRodSim            = False,      #Turn on/off histograms specific for the rod simulator                              
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMainMon.h b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMainMon.h
index e1de89c9f8063b9f63785e9ba29f9decd1df17ba..cae7d2adb8306f0f152072c46239aef1ff39b0b7 100755
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMainMon.h
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMainMon.h
@@ -250,6 +250,11 @@ private:
       "ECC0", "ECC1", "ECC2",
       "B0",   "B1",   "B2", "IBL"
    };
+   std::string m_modLabel_PixLayerDisk[PixLayerDisk::COUNT] = {
+      "ECA0", "ECA1", "ECA2",
+      "ECC0", "ECC1", "ECC2",
+      "B0",   "B1",   "B2", "IBL"
+   };
 
    bool m_doRDO;              //storegate type flags from jobOptions
    bool m_doRODError;
diff --git a/Projects/AthenaP1/CMakeLists.txt b/Projects/AthenaP1/CMakeLists.txt
index 54e7002f0549a2cd561e862044c8b2c160a79a64..c9116eedc0b8b04a4f3d8770145067b21d3fa849 100644
--- a/Projects/AthenaP1/CMakeLists.txt
+++ b/Projects/AthenaP1/CMakeLists.txt
@@ -1,3 +1,4 @@
+
 # The minimum required CMake version:
 cmake_minimum_required( VERSION 3.2 FATAL_ERROR )
 
@@ -29,6 +30,19 @@ find_package( AtlasCMake QUIET )
 find_package( AthenaExternals REQUIRED )
 find_package( Gaudi REQUIRED )
 
+# Load all the files from the externals/ subdirectory:
+file( GLOB _externals "${CMAKE_CURRENT_SOURCE_DIR}/externals/*.cmake" )
+foreach( _external ${_externals} )
+   include( ${_external} )
+   get_filename_component( _extName ${_external} NAME_WE )
+   string( TOUPPER ${_extName} _extNameUpper )
+   message( STATUS "Taking ${_extName} from: ${${_extNameUpper}_ROOT}" )
+   unset( _extName )
+   unset( _extNameUpper )
+endforeach()
+unset( _external )
+unset( _externals )
+
 # Disable the usage of the --no-undefined linker flag:
 atlas_disable_no_undefined()
 
@@ -41,6 +55,10 @@ atlas_project( AthenaP1 ${ATHENAP1_PROJECT_VERSION}
    PROJECT_ROOT ${CMAKE_SOURCE_DIR}/../../
    FORTRAN )
 
+# Install the external configurations:
+install( DIRECTORY ${CMAKE_SOURCE_DIR}/externals
+   DESTINATION ${CMAKE_INSTALL_CMAKEDIR} USE_SOURCE_PERMISSIONS )
+
 # Generate the environment setup for the externals, to be used during the build:
 lcg_generate_env( SH_FILE ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}/env_setup.sh )
 
diff --git a/Projects/AthenaP1/PostConfig.cmake.in b/Projects/AthenaP1/PostConfig.cmake.in
index ff1c1f2ed7e657e132708ae44e2bbce687965cdd..741f09cdd3c8b6a4537963b7db4e7c55e411ea10 100644
--- a/Projects/AthenaP1/PostConfig.cmake.in
+++ b/Projects/AthenaP1/PostConfig.cmake.in
@@ -12,4 +12,22 @@ set( TDAQ-COMMON_ROOT "@TDAQ-COMMON_ROOT@" )
 set( DQM-COMMON_VERSION "@DQM-COMMON_VERSION@" )
 set( DQM-COMMON_ROOT "@DQM-COMMON_ROOT@" )
 
-find_package( Gaudi )
+# Find Gaudi:
+find_package( Gaudi REQUIRED )
+
+# Load all the files from the externals/ subdirectory:
+get_filename_component( _thisdir ${CMAKE_CURRENT_LIST_FILE} PATH )
+file( GLOB _externals "${_thisdir}/externals/*.cmake" )
+unset( _thisdir )
+foreach( _external ${_externals} )
+   include( ${_external} )
+   get_filename_component( _extName ${_external} NAME_WE )
+   string( TOUPPER ${_extName} _extNameUpper )
+   if( NOT AtlasExternals_FIND_QUIETLY )
+      message( STATUS "Taking ${_extName} from: ${${_extNameUpper}_ROOT}" )
+   endif()
+   unset( _extName )
+   unset( _extNameUpper )
+endforeach()
+unset( _external )
+unset( _externals )
diff --git a/Projects/AthenaP1/externals.txt b/Projects/AthenaP1/externals.txt
index a13149331a11d345eb2e34fa21713bf48da64cd4..ed7077393cd7b7d62b92a3004f3dfe3011b174cb 100644
--- a/Projects/AthenaP1/externals.txt
+++ b/Projects/AthenaP1/externals.txt
@@ -5,5 +5,5 @@
 # an "origin/" prefix before it. For tags however this is explicitly
 # forbidden.
 
-AthenaExternalsVersion = 1.0.15
+AthenaExternalsVersion = 1.0.10
 GaudiVersion = v27r1.012
diff --git a/Projects/AthenaP1/externals/HEPUtils.cmake b/Projects/AthenaP1/externals/HEPUtils.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..f16c2e48e92c56530f74d9e87b43b7109d860a3e
--- /dev/null
+++ b/Projects/AthenaP1/externals/HEPUtils.cmake
@@ -0,0 +1,7 @@
+#
+# File specifying the location of HEPUtils to use.
+#
+
+set( HEPUTILS_VERSION 1.1.0 )
+set( HEPUTILS_ROOT
+   ${LCG_RELEASE_DIR}/MCGenerators/heputils/${HEPUTILS_VERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthenaP1/externals/MCUtils.cmake b/Projects/AthenaP1/externals/MCUtils.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..5fd191cfe6159b5c67aef98b53b8d38960e2d47a
--- /dev/null
+++ b/Projects/AthenaP1/externals/MCUtils.cmake
@@ -0,0 +1,7 @@
+#
+# File specifying the location of MCUtils to use.
+#
+
+set( MCUTILS_VERSION 1.2.1 )
+set( MCUTILS_ROOT
+   ${LCG_RELEASE_DIR}/MCGenerators/mcutils/${MCUTILS_VERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthenaP1/externals/README.md b/Projects/AthenaP1/externals/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..421329e58e0e415fa7a3283af3eacbb18f85177a
--- /dev/null
+++ b/Projects/AthenaP1/externals/README.md
@@ -0,0 +1,20 @@
+Directory collecting external package declarations
+==================================================
+
+This directory is used to collect simple CMake files that get included by
+the CMake configuration to set up the locations of all the externals used
+for the offline release build.
+
+Each external should be defined by its own CMake file. The files should
+have a name <Bla> corresponding to the Find<Bla> module name used to find
+the external in question.
+
+The files should define all the variables expected by the Find<Bla> modules,
+which normally boil down to variables:
+
+`EXTNAME_ROOT`
+`EXTNAME_VERSION`
+
+But some modules may require other variables. In which case the `_ROOT`
+variable should still be set, to get a nice printout from the AtlasExternals
+code during the build about the location of the used external.
diff --git a/Projects/AthenaP1/package_filters.txt b/Projects/AthenaP1/package_filters.txt
index 3548bc1dc0755cb6c37b52a7c49e77795689ea1d..4922adcd4ca4569fd479c20c5e54cff2c4e18ef6 100644
--- a/Projects/AthenaP1/package_filters.txt
+++ b/Projects/AthenaP1/package_filters.txt
@@ -2,23 +2,46 @@
 # Package filtering rules for the AthenaP1 project build.
 #
 
+# Don't pick up anything from the Projects directory:
+- Projects/.*
+
 # Only pick up a few packages from the External directory:
 + External/AtlasDataArea
 + External/pyAMI
 + External/AtlasPyFwdBwdPorts
 - External/.*
 
-# Only pick up the RunTime packages from Projects:
-+ Projects/.*RunTime
-- Projects/.*
-
 # Offload service has build problems
-- External/APEGlue
 - Offloading/.*
 
 # Temporary VP1 compilation issues 
 - graphics/VP1/.*
 
+# Some analysis packages that are not part of Athena
+- AsgExternal/Asg_Test
+- PhysicsAnalysis/D3PDTools/EventLoop
+- PhysicsAnalysis/AnalysisCommon/CPAnalysisExamples
+- PhysicsAnalysis/AnalysisCommon/PMGTools
+- PhysicsAnalysis/D3PDTools/EventLoop
+- PhysicsAnalysis/D3PDTools/EventLoopAlgs
+- PhysicsAnalysis/D3PDTools/EventLoopGrid
+- PhysicsAnalysis/D3PDTools/MultiDraw
+- PhysicsAnalysis/D3PDTools/SampleHandler
+- PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection
+- PhysicsAnalysis/ElectronPhotonID/PhotonVertexSelection
+- PhysicsAnalysis/HiggsPhys/Run2/HZZ/Tools/ZMassConstraint
+- PhysicsAnalysis/JetPhys/SemileptonicCorr
+- PhysicsAnalysis/SUSYPhys/SUSYTools
+- PhysicsAnalysis/TauID/DiTauMassTools
+- PhysicsAnalysis/TauID/TauCorrUncert
+- PhysicsAnalysis/TopPhys/QuickAna
+- PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools
+- Reconstruction/Jet/JetAnalysisTools/JetTileCorrection
+- Reconstruction/Jet/JetJvtEfficiency
+- Reconstruction/Jet/JetReclustering
+- Trigger/TrigAnalysis/TrigMuonEfficiency
+- Trigger/TrigAnalysis/TrigTauAnalysis/TrigTauMatching
+
 # Remove simulation packages except those required for EDM, etc.
 - Calorimeter/CaloG4Sim
 - ForwardDetectors/AFP/AFP_G4_SD
@@ -97,19 +120,24 @@
 - TileCalorimeter/TileFastCaloSim
 - Tracking/TrkG4Components/.*
 
-#Remove analysis-related and D3PD code
-#- Trigger/TrigAnalysis/TriggerMenuAnalysis
-#+ PhysicsAnalysis/D3PDMaker/D3PDMakerUtils
-#+ PhysicsAnalysis/D3PDMaker/D3PDMakerCoreComps
-#+ PhysicsAnalysis/D3PDMaker/D3PDMakerRoot
-#+ PhysicsAnalysis/D3PDMaker/D3PDMakerConfig
-#+ PhysicsAnalysis/D3PDMaker/D3PDMakerInterfaces
-#+ PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker
-#+ PhysicsAnalysis/HeavyIonPhys/.*
-#- PhysicsAnalysis/D3PDMaker/.*
-#- PhysicsAnalysis/.*Phys/.*
+# Remove analysis-related and D3PD code
+- Trigger/TrigAnalysis/TriggerMenuAnalysis
++ PhysicsAnalysis/D3PDMaker/D3PDMakerUtils
++ PhysicsAnalysis/D3PDMaker/D3PDMakerCoreComps
++ PhysicsAnalysis/D3PDMaker/D3PDMakerRoot
++ PhysicsAnalysis/D3PDMaker/D3PDMakerConfig
++ PhysicsAnalysis/D3PDMaker/D3PDMakerInterfaces
++ PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker
++ PhysicsAnalysis/HeavyIonPhys/.*
+- PhysicsAnalysis/.*Phys/.*
+- PhysicsAnalysis/D3PDMaker/.*
+- PhysicsAnalysis/D23PDMakerUtils/.*
+- PhysicsAnalysis/NTUPtoNTUP/.*
+- PhysicsAnalysis/MonteCarloReact/.*
 - PhysicsAnalysis/AnalysisCommon/ReweightUtils
-- PhysicsAnalysis/D3PDMaker/TruthD3PDMaker
++ PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces
+- PhysicsAnalysis/DerivationFramework/.*
 
 # Temporarily disabled
 - HLT/HLToks
+
diff --git a/Projects/AthenaP1/version.txt b/Projects/AthenaP1/version.txt
index 9fcf356b68f0d6239b3b3479f200b041f2c46885..0c282424a9b1401a37ff3d055c13e2a4d6e36f9f 100644
--- a/Projects/AthenaP1/version.txt
+++ b/Projects/AthenaP1/version.txt
@@ -1 +1 @@
-21.1.2
+21.1.7
diff --git a/README.md b/README.md
index 8949b257d08f4965fbd3a6911ce65238d7180bd3..38813ff67c27c7c5432eb60c5e39e824be60539b 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,4 @@
-Athena - 21.0 Branch - Offline Reconstruction 2017
-==========================
+Athena - 21.0-TrigMC Branch - MC production with new trigger developments
 
 This branch is currently used for:
-- Tier0 processing for 2017
-- Derivations for 2017
-
+- Trigger developments that break Frozen Tier-0 Policy
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionRegressionTF.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionRegressionTF.h
index 8853e1e07086675d0003b3eadcb298766f36537c..d8d8cf28b6f782dd47a159acbf5b27924c0c32ae 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionRegressionTF.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionRegressionTF.h
@@ -27,7 +27,8 @@ class TFCS1DFunctionRegressionTF:public TFCS1DFunctionRegression
     float m_rangeval;
     float m_startval;
 		
-  ClassDef(TFCS1DFunctionRegressionTF,1)
+  public:
+    ClassDef(TFCS1DFunctionRegressionTF,1)
   
 };
 
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/CMakeLists.txt b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/CMakeLists.txt
index fcacbb48b48c458cc9f0416aeb65c3efeae1a081..c423adac6c9e57ff02ed314f753a2e9c253a1e6f 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/CMakeLists.txt
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/CMakeLists.txt
@@ -47,23 +47,34 @@ find_package( CLHEP )
 find_package( Geant4 )
 find_package( HepMC )
 find_package( HepPDT )
-find_package( ROOT COMPONENTS TreePlayer Cint Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint TMVA Graf Graf3d Gpad Html Postscript Gui GX11TTF GX11 )
+find_package( ROOT COMPONENTS Cint Core Tree TreePlayer MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint TMVA Graf Graf3d Gpad Html Postscript Gui GX11TTF GX11 )
 find_package( XercesC )
 
 # Component(s) in the package:
 atlas_add_root_dictionary( ISF_FastCaloSimParametrizationLib
                            ISF_FastCaloSimParametrizationLibDictSource
                            ROOT_HEADERS
-                           ISF_FastCaloSimParametrization/MeanAndRMS.h
-                           ISF_FastCaloSimParametrization/TFCSLateralShapeParametrization.h
-                           ISF_FastCaloSimParametrization/TFCSNNLateralShapeParametrization.h
-                           ISF_FastCaloSimParametrization/TFCSSimpleLateralShapeParametrization.h
-                           ISF_FastCaloSimParametrization/TreeReader.h
-                           Root/LinkDef.h
+                          ISF_FastCaloSimParametrization/MeanAndRMS.h
+                          ISF_FastCaloSimParametrization/TFCSLateralShapeParametrization.h
+                          ISF_FastCaloSimParametrization/TFCSNNLateralShapeParametrization.h
+                          ISF_FastCaloSimParametrization/TFCSSimpleLateralShapeParametrization.h
+                          ISF_FastCaloSimParametrization/TFCS1DFunctionRegression.h
+                          ISF_FastCaloSimParametrization/TFCS1DFunctionRegressionTF.h
+                          ISF_FastCaloSimParametrization/TFCS1DFunctionHistogram.h
+                          ISF_FastCaloSimParametrization/TFCSFunction.h
+                          ISF_FastCaloSimParametrization/TreeReader.h
+                          ISF_FastCaloSimParametrization/firstPCA.h
+                          ISF_FastCaloSimParametrization/secondPCA.h
+                          ISF_FastCaloSimParametrization/TFCS2Function.h
+                          ISF_FastCaloSimParametrization/TFCS2DFunction.h
+                          ISF_FastCaloSimParametrization/DetailedShapeBinning.h
+                          ISF_FastCaloSimParametrization/FitDetailedShape.h
+                          ISF_FastCaloSimParametrization/TFCS2DFunctionRegression.h
+                          Root/LinkDef.h
                            EXTERNAL_PACKAGES  ROOT HepPDT XercesC CLHEP HepMC Geant4 )
 
 atlas_add_library( ISF_FastCaloSimParametrizationLib
-                   Root/*.cxx src/CaloGeometry.cxx src/CaloGeometryFromFile.cxx
+                   Root/*.cxx src/CaloGeometry.cxx
                    ${ISF_FastCaloSimParametrizationLibDictSource}
                    PUBLIC_HEADERS ISF_FastCaloSimParametrization
                    INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${HEPPDT_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS}
diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromClustersPUC.cxx b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromClustersPUC.cxx
index 7743b3abdcb42246722beefdd1c44e765637a444..fbafc1320f3301140cfb239de039ee14b05809cd 100644
--- a/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromClustersPUC.cxx
+++ b/Trigger/TrigAlgorithms/TrigEFMissingET/src/EFMissingETFromClustersPUC.cxx
@@ -222,6 +222,8 @@ StatusCode EFMissingETFromClustersPUC::execute(xAOD::TrigMissingET * /* met */ ,
       VarEtTower += term;
     }
     VarEtTower *= 1.0/m_ntowers;
+    // Set a minimum value to avoid FPEs
+    if (VarEtTower < 1.0e6) VarEtTower = 1.0e6;
     ptmin_final = EtTowerTrimMean + m_nsigma*sqrt(VarEtTower);
     
     // find binning that gives largest sumEt from bins above threshold
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx
index 57ab8d1363bc769261ce10b249d0ca76f34f270d..620405904a2abf7dc3508ad88402463eb0fdc1ba 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx
@@ -403,6 +403,7 @@ HLT::ErrorCode MuFastSteering::hltExecute(const HLT::TriggerElement* inputTE,
 
       // Data preparation
       m_rpcHits.clear();
+      m_tgcHits.clear();     
       sc = m_dataPreparator->prepareData(*p_roi,
                                          *p_roids,
                                          m_rpcHits,
@@ -474,6 +475,7 @@ HLT::ErrorCode MuFastSteering::hltExecute(const HLT::TriggerElement* inputTE,
       ATH_MSG_DEBUG("Endcap");
 
       // Data preparation
+      m_rpcHits.clear();
       m_tgcHits.clear();     
       sc = m_dataPreparator->prepareData(*p_roi,
                                          *p_roids,
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcPatFinder.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcPatFinder.cxx
index 9428c02b329a9ca0374ac4d4f9c14dcc39dfba31..caedf8a322fd38971fd5dc8a424decac599cb56c 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcPatFinder.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcPatFinder.cxx
@@ -546,31 +546,39 @@ void TrigL2MuonSA::RpcPatFinder::abcal(unsigned int result_pat, size_t index[],
     }//else
   }//else 
 
-   for(int i=1;i<3;i++){
-    if((Z[hot_max[i]] != Z[hot_min[i]])&&(hot_min[i]!=999)&&(hot_max[i]!=-999)){
-      aw[i] = (R[hot_max[i]]- R[hot_min[i]]) / (Z[hot_max[i]]-Z[hot_min[i]]);
-      bw[i] = R[hot_max[i]] - Z[hot_max[i]]*aw[i];
-      aw[i] = 1.0/aw[i];
+  for(int i=1;i<3;i++){
+    if(hot_max[i]!=999 && hot_min[i]!=-999){
+      if(Z[hot_max[i]]!=Z[hot_min[i]]){
+        aw[i] = (R[hot_max[i]]- R[hot_min[i]]) / (Z[hot_max[i]]-Z[hot_min[i]]);
+        bw[i] = R[hot_max[i]] - Z[hot_max[i]]*aw[i];
+        aw[i] = 1.0/aw[i];
+      }else if(i<2){
+        aw[i] = Z[hot_min[i]] / R[hot_min[i]];
+        bw[i] = 0.0;
+      } else{
+        aw[i] = Z[hot_max[i]] / R[hot_max[i]];
+        bw[i] = 0.0;
+      }
     }else{
       if(i <2){
-	if(hot_min[i]!=999){
-	  aw[i] = Z[hot_min[i]] / R[hot_min[i]];
-	  bw[i] = 0.0;
-	}else{
-	  aw[i] = Z[hot_max[i]] / R[hot_max[i]];
-	  bw[i] = 0.0;
-	}//else
+        if(hot_min[i]!=999){
+          aw[i] = Z[hot_min[i]] / R[hot_min[i]];
+          bw[i] = 0.0;
+        }else if(hot_max[i]!=-999){
+          aw[i] = Z[hot_max[i]] / R[hot_max[i]];
+          bw[i] = 0.0;
+        }
       }else{
-	if(hot_max[i]!=-999){
-	  aw[i] = Z[hot_max[i]] / R[hot_max[i]];
-	  bw[i] = 0.0;
-	}else{
-	  aw[i] = Z[hot_min[i]] / R[hot_min[i]];
-	  bw[i] = 0.0;
-	}//else
-      }//else
-    }//else    
-  }//for
+        if(hot_max[i]!=-999){
+          aw[i] = Z[hot_max[i]] / R[hot_max[i]];
+          bw[i] = 0.0;
+        }else if(hot_min[i]!=999){
+          aw[i] = Z[hot_min[i]] / R[hot_min[i]];
+          bw[i] = 0.0;
+        }
+      }    
+    }
+  }
 }//abcal()
 
 // --------------------------------------------------------------------------------
diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py b/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py
index b6cdbc3cb5e2a02cb91cc81c017ebe5465b783a4..aeed3a0f6b3016eafd803af8f1310289e15f88f0 100755
--- a/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py
+++ b/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py
@@ -515,6 +515,7 @@ class TrigMuonEFStandaloneTrackToolConfig (TrigMuonEFStandaloneTrackTool):
         self.maxRpcHits      = 0
         self.maxMdtHits      = 0
         self.doCache = True
+        self.IgnoreMisalginedCSCs = True
 
         self.TrackBuilderTool  = "TMEF_TrackBuilderTool"
         self.TrkSummaryTool = "TMEF_TrackSummaryTool"
diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.cxx b/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.cxx
index b9bce1f6794cc202fa484e813ec3a69c9a10408d..cd3f0bea3adddbec508fda9b123a6e492ae40e1d 100644
--- a/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.cxx
+++ b/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.cxx
@@ -138,7 +138,8 @@ TrigMuonEFStandaloneTrackTool::TrigMuonEFStandaloneTrackTool(const std::string&
     m_totalExtrapolatedCalls(0),
     m_cachedExtrapolatedCalls(0),
     m_muonCandidateTool("MuonCandidateTool/MuonCandidateTool"),
-    m_TrackToTrackParticleConvTool("MuonParticleCreatorTool")
+    m_TrackToTrackParticleConvTool("MuonParticleCreatorTool"),
+    m_ignoreCSC(true)
 {
   m_hashlist.reserve(4);
 
@@ -183,7 +184,7 @@ TrigMuonEFStandaloneTrackTool::TrigMuonEFStandaloneTrackTool(const std::string&
   declareProperty("maxCscHits",m_maxCscHits);
   declareProperty("maxRpcHits",m_maxRpcHits);
   declareProperty("maxMdtHits",m_maxMdtHits);
-  
+  declareProperty("IgnoreMisalginedCSCs", m_ignoreCSC);
 
 
   clearRoiCache();
@@ -1319,6 +1320,10 @@ if (m_useMdtData>0) {
     CscPrepDataContainer::const_iterator CSCcoll;
     for(std::vector<IdentifierHash>::const_iterator idit = csc_hash_ids.begin();
 	idit != csc_hash_ids.end(); ++idit) {
+      if(m_ignoreCSC && (*idit==16 || *idit==17)){
+	ATH_MSG_DEBUG("Skipping misaligned chamber with hashid "<<*idit);
+	continue;
+      }
       CSCcoll = cscPrds->indexFind(*idit);
       if( CSCcoll == cscPrds->end() ) continue;
       if( (*CSCcoll)->size() == 0)    continue;
@@ -1327,8 +1332,8 @@ if (m_useMdtData>0) {
       nCscHits+=(*CSCcoll)->size(); // count hits for TrigMuonEFInfo
       cscCols.push_back(*CSCcoll);
       if (msgLvl(MSG::DEBUG)) msg() << MSG::DEBUG << "Selected Csc Collection: "
-			 << m_cscIdHelper->show_to_string((*CSCcoll)->identify())
-			 << " with size " << (*CSCcoll)->size() << endmsg;
+				    << m_cscIdHelper->show_to_string((*CSCcoll)->identify())
+				    << " with size " << (*CSCcoll)->size() << endmsg;
       else
 	if (testRoiDrivenMode) msg() << MSG::INFO << "Selected Csc Collection: "
 				     << m_cscIdHelper->show_to_string((*CSCcoll)->identify())
diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.h b/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.h
index 190032a20fda9f2994e055b1221b70bbfd12a156..b4169bda9d1092a722503bc3d01c0229fccaaabb 100644
--- a/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.h
+++ b/Trigger/TrigAlgorithms/TrigMuonEF/src/TrigMuonEFStandaloneTrackTool.h
@@ -329,6 +329,7 @@ class TrigMuonEFStandaloneTrackTool : public AthAlgTool,
   int m_maxRpcHits;
   int m_maxTgcHits;
 
+
   //Map to cache
   std::map<std::vector<std::vector<IdentifierHash> >, SegmentCache*> m_SFCacheSCMap;
   
@@ -381,6 +382,9 @@ class TrigMuonEFStandaloneTrackTool : public AthAlgTool,
   std::ofstream m_fileWithHashIds_csc;
 #endif
 
+  bool m_ignoreCSC;
+
+
 };
 
 #endif // TRIGMUONEF_TRIGMUONEFSTANDALONETRACKTOOL_H
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/chainparser.cxx b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/chainparser.cxx
index 82e6fa323b3904c21981e6dcceca2b4122ec0e52..9a5d9441541fb8dbd168f96d367d0e1ad1c58824 100644
--- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/chainparser.cxx
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/chainparser.cxx
@@ -15,6 +15,9 @@
 #include <cstdlib> 
 #include <cstdio> 
 #include <map> 
+#include <regex>
+
+
 
 #include <cmath>
 
@@ -29,8 +32,12 @@ std::ostream& operator<<( std::ostream& s, std::vector<T>& v ) {
 }
 
 
-bool contains( const std::string& s, const std::string& regex ) { 
-  return s.find( regex )!=std::string::npos;
+bool contains( const std::string& s, const std::string& regx ) { 
+  return s.find( regx )!=std::string::npos;
+}
+
+bool contains_end( const std::string& s, const std::string& regx ) { 
+  return std::regex_match( s, std::regex(regx+"$") ); 
 }
 
 
@@ -214,6 +221,11 @@ int main( int argc, char** argv ) {
   chains.insert( chain_map::value_type( "Tau",      "_tau" ) );
   chains.insert( chain_map::value_type( "Bjet",     "_j" ) );
 
+  chains.insert( chain_map::value_type( "EgammaPurity",   "_e" ) );
+  chains.insert( chain_map::value_type( "MuonPurity",     "_mu" ) );
+  chains.insert( chain_map::value_type( "TauPurity",      "_tau" ) );
+  chains.insert( chain_map::value_type( "BjetPurity",     "_j" ) );
+
   chain_map::const_iterator itr = chains.find( rawslice );
 
   if ( itr==chains.end() ) { 
@@ -230,6 +242,8 @@ int main( int argc, char** argv ) {
 
   /// read through and parse chain list file
 
+  bool purity = contains( slice, "Purity" );
+
   while( getline( file, line ) && !file.fail() ) {
 
     if ( !contains( line, slice ) ) continue;
@@ -244,8 +258,8 @@ int main( int argc, char** argv ) {
 
     if      ( expl[2] == "IDMon" ) expected_size = 6;
     else if ( expl[2] == "TRIDT" ) { 
-      if      ( expl[4] == "Expert"  ) expected_size = 7;
-      else if ( expl[4] == "Shifter" ) expected_size = 6;
+      if      ( expl[4] == "Expert"  && !purity ) expected_size = 7;
+      else if ( expl[4] == "Shifter" ||  purity ) expected_size = 6;
       else { 
 	std::cerr << "unknown HIST type" << std::endl;
 	return 1;
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/comparitor.cxx b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/comparitor.cxx
index 8c0a8aaa24c56379dc6ea266ebffa7ba4c525534..4cbb444bcd987994325f06e06b1e66ffa94dac7d 100644
--- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/comparitor.cxx
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/comparitor.cxx
@@ -1719,6 +1719,19 @@ int main(int argc, char** argv) {
       double  yminset = 0;
       double  ymaxset = 0;
 
+      double rmin = 0;
+      double rmax = 0;
+      
+      if ( xinfo.rangeset() ) { 
+	rmin = plots.realmin( plots.lo(), plots.hi() );
+	rmax = plots.realmax( plots.lo(), plots.hi() );
+      }
+      else {
+	rmin = plots.realmin();
+	rmax = plots.realmax();
+      }
+      
+
       if ( yinfo.autoset() ) { 
 	
 	double rmin = 0;
@@ -1832,9 +1845,12 @@ int main(int argc, char** argv) {
 
       if ( fulldbg ) std::cout << __LINE__ << std::endl;
 
-      if ( yminset>0 ) plots.SetLogy(yinfo.log());
-      else             plots.SetLogy(false);
-   
+      if ( yminset!=0 || ymaxset!=0 ) { 
+	if ( yminset>0 ) plots.SetLogy(yinfo.log());
+	else             plots.SetLogy(false);
+      }	
+      else plots.SetLogy(yinfo.log());
+
       //      plots.SetLogy(false);
 
       if ( fulldbg ) std::cout << __LINE__ << std::endl;
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/computils.h b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/computils.h
index d76123e63ee1d10e9ccdbf47e268b029817dd47b..67a5f2b4d01fda79e8d4296f91d18957f35db493 100644
--- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/computils.h
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/computils.h
@@ -366,7 +366,8 @@ public:
       if ( htest() ) std::cout << "\tentries " << plotable( htest() );
       std::cout << std::endl;
 
-      if(first)  { 
+      if(first)  {
+#if 0 
 	if ( plotref && href() ) {
 	  href()->GetXaxis()->SetMoreLogLabels(true);
 	  href()->Draw("hist][");
@@ -374,7 +375,9 @@ public:
 	  //	    setParameters( href(), tgref() );
 	  //	  }
 	}
-	else    {
+	else
+#endif
+        {
 	  if ( tgtest() ) { 
 	    zeroErrors(htest());
 	    htest()->GetXaxis()->SetMoreLogLabels(true);
diff --git a/Trigger/TrigConfiguration/TrigConfStorage/python/TriggerCoolUtil.py b/Trigger/TrigConfiguration/TrigConfStorage/python/TriggerCoolUtil.py
index 846a36d618dbfdb7612a0d7fdbb9d0e4ff9ad3bf..910bb73b4b41e721da76867ce22ea250818d6615 100644
--- a/Trigger/TrigConfiguration/TrigConfStorage/python/TriggerCoolUtil.py
+++ b/Trigger/TrigConfiguration/TrigConfStorage/python/TriggerCoolUtil.py
@@ -127,7 +127,6 @@ class TriggerCoolUtil:
                 if runNr>1000000: continue
                 payload = obj.payload()
                 hltpsk  = payload['HltPrescaleKey']
-                if hltpsk>10000: continue
                 firstLB = obj.since() & lbmask
                 lastLB  = (obj.until() & lbmask) -1
                 configKeys.setdefault(runNr,{}).setdefault( "HLTPSK2", [] ).append((hltpsk,firstLB,lastLB))
diff --git a/Trigger/TrigConfiguration/TrigDbHltUpload/share/buildConfigInstaller.sh b/Trigger/TrigConfiguration/TrigDbHltUpload/share/buildConfigInstaller.sh
index 4d7558230336ab0fa984201c66af230e1d95a8be..d501c55f9afeaf89c6660283b1aa527d7956ee73 100755
--- a/Trigger/TrigConfiguration/TrigDbHltUpload/share/buildConfigInstaller.sh
+++ b/Trigger/TrigConfiguration/TrigDbHltUpload/share/buildConfigInstaller.sh
@@ -8,7 +8,9 @@ echo "Self Extracting Menu TriggerDB Installer"
 echo ""
 
 export TMPDIR=\`mktemp -d /tmp/selfextract.XXXXXX\`
-export TRIGGER_EXP_CORAL_PATH=/afs/cern.ch/user/a/attrgcnf/.expertauth 
+unset TRIGGER_EXP_CORAL_PATH 
+export TRIGGER_EXP_CORAL_PATH_RUN2=/afs/cern.ch/user/a/attrgcnf/.dbauth/menuexperts
+
 ARCHIVE=\`awk '/^__ARCHIVE_BELOW__/ {print NR + 1; exit 0; }' \$0\`
 
 tail -n+\$ARCHIVE \$0 | tar xz -C \$TMPDIR
@@ -41,10 +43,11 @@ fi
 
 _JAVA_OPTIONS="-Xms250m -Xmx1400m"
 TTJAR=\${TRIGGERTOOL:-/afs/cern.ch/user/a/attrgcnf/TriggerTool/TriggerTool-new.jar}
+TTSH=\${TRIGGERTOOL:-/afs/cern.ch/user/a/attrgcnf/TriggerTool/run_TriggerTool.sh}
 DB=\${TRIGGERDB:-TRIGGERDBREPR}
 NAME=\${CONFIGNAME:-USEXML}
 
-CMD="java -jar \$TTJAR -db \$DB -up -l1  \$TARGET/lvl1Menu.xml -hlt \$TARGET/hltMenu.xml -l2s \$TARGET/l2setup.xml -efs \$TARGET/efsetup.xml \$p1ConfigTT -rel $2 -o \$TARGET/$1-\$TIME-UploadTT.log -n \$NAME"
+CMD="\$TTSH -db \$DB -up -l1  \$TARGET/lvl1Menu.xml -hlt \$TARGET/hltMenu.xml -l1topo \$TARGET/l1topoMenu.xml -efs \$TARGET/efsetup.xml \$p1ConfigTT -rel $2 -o \$TARGET/$1-\$TIME-UploadTT.log -n \$NAME"
 echo \$CMD
 
 echo ""
@@ -69,7 +72,7 @@ fi
 
 ARCHIVE=./payload_$1.tar.gz
 
-tar zcf $ARCHIVE -C setup/$1 ./lvl1Menu.xml ./hltMenu.xml ./l2setup.xml ./efsetup.xml
+tar zcf $ARCHIVE -C setup/$1 ./LVL1config.dtd ./lvl1Menu.xml ./hltMenu.xml ./l1topoMenu.xml ./efsetup.xml
 
 SELFEXTRACTFILE=selfextract-$1-`date +%F-%H-%M-%S`.bsx
 
diff --git a/Trigger/TrigConfiguration/TrigDbHltUpload/share/prepareOnlineTriggerConfig.py b/Trigger/TrigConfiguration/TrigDbHltUpload/share/prepareOnlineTriggerConfig.py
index a32c71c7e66aa7be018f798ebfde436391526002..0d590629179e3cf4ab372812973406140015f3b2 100755
--- a/Trigger/TrigConfiguration/TrigDbHltUpload/share/prepareOnlineTriggerConfig.py
+++ b/Trigger/TrigConfiguration/TrigDbHltUpload/share/prepareOnlineTriggerConfig.py
@@ -2,8 +2,11 @@
 
 import sys, subprocess, tempfile, os, re, signal
 import __main__
-from PyQt4 import QtGui, QtCore
-from PyQt4.QtGui import QLabel, QCheckBox,QMessageBox
+from PyQt5 import QtCore, QtWidgets
+from PyQt5.QtWidgets import QLabel, QCheckBox, QMessageBox
+from PyQt5.QtGui import QColor, QPalette, QPixmap
+import timeit
+import socket
 
 class StringVar:
     def __init__(self,value=""):
@@ -39,11 +42,11 @@ class Option:
         if qtw!=None:
             self.qtw = qtw
         elif self.name=='userPreCommand':
-            self.qtw = QtGui.QTextEdit()
+            self.qtw = QtWidgets.QTextEdit()
             self.qtw.setMinimumHeight(60)
             self.qtw.textChanged.connect(self.textChanged)
         else:
-            self.qtw = QtGui.QLineEdit()
+            self.qtw = QtWidgets.QLineEdit()
             self.qtw.textEdited.connect(self.textEdited)
         self.set(value)
 
@@ -66,6 +69,9 @@ class BoolOption:
     def __init__(self, name, isChecked, description, label):
         self.name        = name
         self.cb          = QCheckBox(label)
+        palette = QPalette( self.cb.palette() )
+        palette.setColor( palette.WindowText, QColor("#ffffff") )    
+        self.cb.setPalette(palette)
         self.description = description
         self.cb.setCheckState(QtCore.Qt.Checked if isChecked else QtCore.Qt.Unchecked)
         self.cb.setToolTip(description)
@@ -84,10 +90,12 @@ class Process:
         self.w_label.setCheckState(QtCore.Qt.Checked)
         self.w_state     = QLabel()
         self.w_logfile   = QLabel()
+        button_style ="QPushButton {padding: 4px; font-size: 14px; color: #3a81c7; font-weight: bold; background-color: #ffffff; border-radius: 1px; border: 1px solid #3a81c7;}"
         if name == 'jobCheckRes':
-            self.w_showMT  = QtGui.QPushButton("Show MT Result")
-            self.w_showPT  = QtGui.QPushButton("Show PT Result")
-        self.w_clearbutton = QtGui.QPushButton("Clear")
+            self.w_showHLT  = QtWidgets.QPushButton("Show athenaHLT Result")
+            self.w_showHLT.setStyleSheet(button_style)
+        self.w_clearbutton = QtWidgets.QPushButton("Clear")
+        self.w_clearbutton.setStyleSheet(button_style)
 
     def __str__(self):
         return "### %s\nprocess['%s'] = (%i, '%s', '%s')\n" % (self.description, self.name, self.enabled, self.w_state.text(), self.logfile)
@@ -168,10 +176,10 @@ class Config:
         import os
         tempdir = os.environ["TMPDIR"] if "TMPDIR" in os.environ else (tempfile.gettempdir() + '/' + os.environ["USER"])
         # red 
-        self.addOption('release','',"The release tag",  'Release:'      , QtGui.QLabel())
-        self.addOption('patch',  '',"The patch tag",    'Patch:'        , QtGui.QLabel())
-        self.addOption('swpath','',"The software path", 'Software path:', QtGui.QLabel())
-        self.addOption('tt','/afs/cern.ch/user/a/attrgcnf/TriggerTool/TriggerTool-new.jar',"The TriggerTool jar-file", 'TriggerTool:')
+        self.addOption('release','',"The release tag number",  'Release number:'      , QtWidgets.QLabel())
+        self.addOption('relName',  '',"The release build name",    'Release build:'        , QtWidgets.QLabel())
+        self.addOption('swpath','',"The software path", 'Software path:', QtWidgets.QLabel())
+        self.addOption('tt','/afs/cern.ch/user/a/attrgcnf/TriggerTool/run_TriggerTool.sh',"The TriggerTool run script", 'TriggerTool:')
         # green
         self.addOption('jobName', 'Default',"Job name", 'Job name:')
         self.addOption('jobOption','',"The python job option file", 'Joboption file')
@@ -179,40 +187,40 @@ class Config:
         self.addOption('setupDir','./setup',"Directory for setup and xml files (a subdir for each job is created)", 'Output directory:')
         self.addOption('tmpDir',tempdir,"Directory for temporary results", 'Temp directory:')
         self.addOption('nEvt',10,"Number of Events", 'Number of Events:')
-        self.addOption('inputL2','input.data',"Input data file L2", 'MT input data:')
-        self.addOption('inputEF','',          "Input data file EF", 'PT input data:')
+        self.addOption('inputBSFile','input.data',"Input bs file", 'Input file:')
         self.addOption('l1menu',   '',"LVL1 menu file",   'L1 menu:')
-        self.addOption('hltl2menu','',"HLT L2 menu file", 'L2 menu:')
-        self.addOption('hltefmenu','',"HLT EF menu file", 'EF menu:')
-        self.addOption('setupL2','',"Setup file L2", 'L2 setup:')
-        self.addOption('setupEF','',"Setup file EF", 'EF setup:')
+        self.addOption('l1topomenu','',"L1Topo menu file", 'L1Topo menu:')
+        self.addOption('hltmenu','',"HLT menu file", 'HLT menu:')
+        self.addOption('setupEF','',"EF Setup file", 'EF setup:')
         self.addOption('dbAlias','TRIGGERDBREPR',"Alias for TriggerDB connection", 'DB connection')
         self.addOption('dbPW','',"Password for writer accound (not needed by experts)", 'DB password')
-        self.addOption('cfgKey',0,"Configuration key", 'Configuration key:')
+        self.addOption('cfgKey',0,"Super Master key", 'Super master key:')
         self.addOption('l1psKey',0,"LVL1 prescale key", 'LVL1 prescale key:')
         self.addOption('hltpsKey',0,"HLT prescale key", 'HLT prescale key:')
         self.addBoolOption('onlineMonitoring', 'Online Monitoring', 'Online Monitoring switch (e.g. online histogram service)', True)
         self.addBoolOption('cafConfig', 'Reprocessing', 'Configuration for reprocessings (enable additional monitoring)', False)
-        self.addBoolOption('l1rerun', 'Rerun Level 1', 'Rerun level 1 simulation (should be on for CAF)', False)
-        self.dontStore('cafConfig', 'l1rerun', 'release', 'patch', 'swpath') # excempt from storage option to avoid accidental use for online
+        self.addBoolOption('l1rerun', 'Rerun Level 1', 'Rerun level 1 simulation (should be on for reprocessings if L1 menu has changed since last EB run)', False)
+        self.addBoolOption('doDBConfig', 'doDBConfig', 'Needs to be true to generate the text files for configuration', True)
+        self.dontStore('cafConfig', 'l1rerun', 'release', 'relName', 'swpath') # excempt from storage option to avoid accidental use for online
         # blue
-        self.addProcess('jobMTjo',     "Run athenaMT from JobOptions", 'run athenaMT from JO')
-        self.addProcess('jobPTjo',     "Run athenaPT from JobOptions", 'run athenaPT from JO')
-        self.addProcess('jobSetupCnv', "Run setup conversion script",  'convert setup')
-        self.addProcess('jobUploadDb', "Load TriggerDB",               'load TriggerDB')
-        self.addProcess('jobMTdb',     "Run athenaMT from TriggerDB",  'run athenaMT from DB')
-        self.addProcess('jobPTdb',     "Run athenaPT from TriggerDB",  'run athenaPT from DB')
-        self.addProcess('jobCheckRes', "Compare counts",               'check results')
+        self.addProcess('jobHLTjo',     "Run athenaHLT from JobOptions", 'Run athenaHLT from JO')
+        self.addProcess('jobSetupCnv', "Run setup conversion script",  'Convert ef setup')
+        self.addProcess('jobUploadDb', "Upload xmls to TriggerDB",               'Upload xmls to TriggerDB')
+        self.addProcess('jobHLTdb',     "Run athenaHLT from TriggerDB",  'Run athenaHLT from DB')
+        self.addProcess('jobCheckRes', "Compare counts",               'Compare athenaHLT results')
         self.jobOption.qtw.textChanged.connect(self.readMenus)
         self.cafConfig.cb.stateChanged.connect(self.toggleModifierCAF)
         self.l1rerun.cb.stateChanged.connect(self.toggleL1RerunOption)
+        self.doDBConfig.cb.stateChanged.connect(self.toggleDBConfigOption)
 
     def toggleModifierCAF(self):
-        self.setPreCommandModifier('caf', 'True' if self.cafConfig() else None)
+        self.setPreCommandModifier('enableCostForCAF', 'True' if self.cafConfig() else None)
 
     def toggleL1RerunOption(self):
         self.setPreCommandModifier('rerunLVL1', 'True' if self.l1rerun() else None)
 
+    def toggleDBConfigOption(self):
+        self.setPreCommandModifier('doDBConfig', 'True' if self.doDBConfig() else None)
 
     def read(self):
         if self.inputFile==None: return
@@ -222,7 +230,7 @@ class Config:
         print "Reading configuration from %s!" % self.inputFile
         execfile(self.inputFile,__main__.__dict__)
         for name, (value, desc) in option.iteritems():
-            if name in ['athenaMTjo','athenaMTdb','athenaPTjo','athenaPTdb','checkRes','uploadDb','setupCnv','mtJoLog', 'ptJoLog','mtDbLog', 'ptDbLog', 'cnvLog', 'loadDbLog']: continue  # for backward compatibility
+            if name in ['athenaHLTjo','athenaHLTdb','checkRes','uploadDb','setupCnv','mtJoLog', 'ptJoLog','mtDbLog', 'ptDbLog', 'cnvLog', 'loadDbLog']: continue  # for backward compatibility
             self.options[name].set(value)
         if 'process' in dir(__main__):
             for name, content in process.iteritems():
@@ -267,7 +275,7 @@ class Config:
                     end=i+1
                     break
             exec(''.join(lines[begin:end]))
-            self.menus = sorted(menuMap.keys())
+            self.menus = sorted(menuMap.keys()) 
         except:
             self.menus = None
 
@@ -296,7 +304,7 @@ class Config:
         f.close()
 
 
-class KeyPrep(QtGui.QScrollArea):
+class KeyPrep(QtWidgets.QScrollArea):
     def __init__(self, configFile, parent=None):
         super(KeyPrep,self).__init__(parent)
         self.config = Config(configFile)
@@ -306,11 +314,13 @@ class KeyPrep(QtGui.QScrollArea):
         self.layout()
         self.checkReleaseAndTT()
         self.updateMenuComboBox()
+        self.updateCommandBox()
+        self.checkMachine()
         self.runThread = KeyPrep.RunThread(self)
         self.currentSubprocess = None
 
-    def position(self, w=550, h=870, m=30):
-        desktop = QtGui.QApplication.desktop()
+    def position(self, w=675, h=870, m=30):
+        desktop = QtWidgets.QApplication.desktop()
         dw = desktop.availableGeometry().width()
         dh = desktop.availableGeometry().height()
         h = min(h,dh-2*m)
@@ -320,59 +330,73 @@ class KeyPrep(QtGui.QScrollArea):
     def elements(self):
         self.position()
         self.setWindowTitle('Prepare Trigger Configuration')
-
         self.gr_relconf = {
-            'box' : QtGui.QGroupBox("Release configuration"),
-            'cont': [ self.config.release, self.config.patch, self.config.swpath, self.config.tt ]
+            'box' : QtWidgets.QGroupBox("Release configuration"),
+            'cont': [ self.config.relName, self.config.release, self.config.swpath, self.config.tt ]
             }
-        self.gr_relconf['box'].setStyleSheet("QGroupBox { background-color: #8CDBFF; }");
-
+        self.gr_relconf['box'].setStyleSheet("QGroupBox { background-color: #3a81c7; color: #e2e2e2; font-weight: bold; font-size: 12pt; }")
 
         self.gr_setup = {
-            'box' : QtGui.QGroupBox("Job configuration"),
+            'box' : QtWidgets.QGroupBox("Job configuration"),
             'cont': [ self.config.jobName, self.config.jobOption, self.config.userPreCommand, self.config.setupDir,
-                      self.config.tmpDir, self.config.dbAlias, self.config.dbPW, self.config.nEvt, self.config.inputL2,
-                      self.config.inputEF, self.config.l1menu, self.config.hltl2menu, self.config.hltefmenu,
-                      self.config.setupL2, self.config.setupEF, self.config.cfgKey, self.config.l1psKey, self.config.hltpsKey ]
+                      self.config.tmpDir, self.config.dbAlias, self.config.dbPW, self.config.nEvt,
+                      self.config.inputBSFile, self.config.l1menu, self.config.l1topomenu, self.config.hltmenu,
+                      self.config.setupEF, self.config.cfgKey, self.config.l1psKey, self.config.hltpsKey ]
             }
-        self.gr_setup['box'].setStyleSheet("QGroupBox { background-color: #FFE430; }");
+        self.gr_setup['box'].setStyleSheet("QGroupBox { background-color: #7c7c7c; color: #ffffff;font-weight: bold; font-size: 12pt;  }");
 
         self.gr_run = {
-            'box' : QtGui.QGroupBox("Run state"),
-            'cont': [ self.config.jobMTjo, self.config.jobPTjo, self.config.jobSetupCnv, self.config.jobUploadDb,
-                      self.config.jobMTdb, self.config.jobPTdb, self.config.jobCheckRes ]
+            'box' : QtWidgets.QGroupBox("Run state"),
+            'cont': [ self.config.jobHLTjo, self.config.jobSetupCnv, self.config.jobUploadDb,
+                      self.config.jobHLTdb, self.config.jobCheckRes ]
             }
-        self.gr_run['box'].setStyleSheet("QGroupBox { background-color: #A5FF00; }");
-
-        self.config.jobCheckRes.w_showMT.clicked.connect(self.displayResultMT)
-        self.config.jobCheckRes.w_showPT.clicked.connect(self.displayResultPT)
-
-        self.d_menu = QtGui.QComboBox()
-        self.b_save = QtGui.QPushButton("Save",self)
-        self.b_kill = QtGui.QPushButton("Kill Process",self)
-        self.b_run  = QtGui.QPushButton("Run",self)
-        self.b_quit = QtGui.QPushButton("Quit",self)
-        self.connect(self.b_run,  QtCore.SIGNAL('clicked()'), self.run)
-        self.connect(self.b_kill, QtCore.SIGNAL('clicked()'), self.killCurrentProcess)
-        self.connect(self.b_save, QtCore.SIGNAL('clicked()'), self.config.write)
-        self.connect(self.b_quit, QtCore.SIGNAL('clicked()'), self.quit)
+        self.gr_run['box'].setStyleSheet("QGroupBox { background-color: #e2e2e2; font-weight: bold; font-size: 12pt;}");
+
+        self.config.jobCheckRes.w_showHLT.clicked.connect(self.displayResultHLT)
+
+        button_style ="QPushButton {padding: 4px; font-size: 14px; color: #3a81c7; \
+                      font-weight: bold; background-color: #ffffff; border-radius: 1px; border: 1px solid #3a81c7;}"
+
+        self.d_menu = QtWidgets.QComboBox()
+        self.d_menu.setStyleSheet("QComboBox {padding: 2px; color #3a81c7; border-radius: 1px; border: 1px solid #3a81c7;}")
+        self.b_save = QtWidgets.QPushButton("Save",self)
+        self.b_save.setStyleSheet(button_style)
+        self.b_kill = QtWidgets.QPushButton("Kill Process",self)
+        self.b_kill.setStyleSheet(button_style)
+        self.b_run  = QtWidgets.QPushButton("Run",self)
+        self.b_run.setStyleSheet(button_style)
+        self.b_quit = QtWidgets.QPushButton("Quit",self)
+        self.b_quit.setStyleSheet(button_style)
+        self.b_run.clicked.connect(self.run)
+        self.b_kill.clicked.connect(self.killCurrentProcess)
+        self.b_save.clicked.connect(self.config.write)
+        self.b_quit.clicked.connect(self.quit)
 
     def layout(self):
-        top = QtGui.QVBoxLayout()
+        top = QtWidgets.QVBoxLayout()
+        top.setContentsMargins(0,0,0,0)
 
         # release info
-        grid = QtGui.QGridLayout()
+        grid = QtWidgets.QGridLayout()
         for i,c in enumerate(self.gr_relconf['cont']):
             grid.addWidget(c.w_label,i,0,1,1)
+            c.w_label.setStyleSheet("QWidget { color: #e2e2e2; font-weight: bold; font-size: 11pt; }")
             grid.addWidget(c.qtw,i,1,1,3)
+            c.qtw.setStyleSheet("QWidget { color: #e2e2e2; }")
+            if c.name =="tt":
+              c.qtw.setStyleSheet("QWidget { background-color: #a9a9a9; }")
+
         self.gr_relconf['box'].setLayout(grid)
         top.addWidget(self.gr_relconf['box'])
 
         # job setup
-        grid = QtGui.QGridLayout()
+        grid = QtWidgets.QGridLayout()
         grid.setVerticalSpacing(0)
+        grid.setHorizontalSpacing(0)
+        
         line = 0
         for c in self.gr_setup['cont']:
+            c.w_label.setStyleSheet("QWidget { color: #ffffff; }")
             if c.name=='userPreCommand':
                 grid.addWidget(c.w_label,line,0) # label
                 grid.addWidget(self.d_menu,line+1,0,QtCore.Qt.AlignTop) # menu combo box
@@ -382,9 +406,14 @@ class KeyPrep(QtGui.QScrollArea):
                 grid.addWidget(c.w_label,line,0) # label
                 grid.addWidget(c.qtw,line,1,1,7) # field
                 line += 1
-        grid.addItem(QtGui.QSpacerItem(10,10),line,0,1,4) # space
-        hl = QtGui.QHBoxLayout() # horizontal box for buttons
+            if c.name in ['jobOption','l1psKey', 'hltpsKey', 'cfgKey', 'dbPW', 'l1menu','l1topomenu','hltmenu','setupEF']:
+                c.qtw.setStyleSheet("QWidget { background-color: #D4E1EA; }")
+
+        grid.addItem(QtWidgets.QSpacerItem(10,10),line,0,1,4) # space
+        hl = QtWidgets.QHBoxLayout() # horizontal box for buttons
+
         hl.addWidget(self.config.onlineMonitoring.cb)
+        hl.addWidget(self.config.doDBConfig.cb)
         hl.addWidget(self.config.cafConfig.cb)
         hl.addWidget(self.config.l1rerun.cb)
         hl.addStretch(1)
@@ -394,40 +423,49 @@ class KeyPrep(QtGui.QScrollArea):
         top.addWidget(self.gr_setup['box'])
 
         # job progress
-        grid = QtGui.QGridLayout()
+        grid = QtWidgets.QGridLayout()
         grid.setVerticalSpacing(0)
+        grid.setHorizontalSpacing(0)
+        grid.setContentsMargins(0,0,0,0)
         line = 0
         for c in self.gr_run['cont']:
             grid.addWidget(c.w_label,line,0) # label
             grid.addWidget(c.w_state,line,1) # state
             if c.name != 'jobCheckRes':
                 grid.addWidget(c.w_logfile,line,2,1,6) # field
-                #c.w_logfile.setStyleSheet("QLineEdit { background-color: rgb(255, 176, 165); }");
             else:
-                grid.addWidget(c.w_showMT,line,6) # show res button
-                grid.addWidget(c.w_showPT,line,7) # show res button
-            #grid.addWidget(c.w_clearbutton,line,9) # clear button
+                grid.addWidget(c.w_showHLT,line,6) # show res button
             line += 1
         self.gr_run['box'].setLayout(grid)
         top.addWidget(self.gr_run['box'])
 
-        actions = QtGui.QHBoxLayout()
-        #actions.addWidget(self.b_style)
+        actions = QtWidgets.QHBoxLayout()
+        actions.setContentsMargins(4,0,4,4)
         actions.addWidget(self.b_kill)
         actions.addStretch(1)
         actions.addWidget(self.b_run)
         actions.addWidget(self.b_quit)
         top.addLayout(actions)
+        top.addStretch(1)
 
-        #self.setLayout(top)
-
-        frame = QtGui.QFrame()
+        frame = QtWidgets.QFrame()
         frame.setLayout(top)
-        self.setWidget(frame)
-        self.setWidgetResizable(True)
 
+        palette = QPalette( frame.palette() )
+        palette.setColor( frame.backgroundRole(), QColor("#7c7c7c") )
 
+        frame.setAutoFillBackground(True)
+        frame.setPalette( palette )
+        
+        self.setWidget(frame)
+        self.setWidgetResizable(True)
+        self.setContentsMargins(0,0,100,0)
 
+        label = QLabel(self)
+        pixmap = QPixmap('/afs/cern.ch/user/a/attrgcnf/TriggerDBReplica/TrigDbHltUploadFiles/logo.png') 
+        label.setPixmap(pixmap)
+        label.setGeometry(675-5-100,5,675-5,100+5)
+       
     def updateMenuComboBox(self):
         menus = self.config.menus
         try:
@@ -441,24 +479,30 @@ class KeyPrep(QtGui.QScrollArea):
         index=-1
         if self.menuInPreCommand:
             index = menus.index(self.menuInPreCommand)
-        elif "PhysicsV4" in menus:
-            index = menus.index("PhysicsV4")            
-        elif "PhysicsV3" in menus:
-            index = menus.index("PhysicsV3")
-        elif "PhysicsV2" in menus:
-            index = menus.index("PhysicsV2")
+        elif "PhysicsV7" in menus:
+            index = menus.index("PhysicsV7")            
         if index>=0:
             self.d_menu.setCurrentIndex(index)
-          
+
+    def updateCommandBox(self):
+        if self.config.doDBConfig():
+             self.config.setPreCommandModifier('doDBConfig', 'True')
+      
     def selectMenu(self, menu):
         if self.menuInPreCommand!=None: # remove the old one first
             self.config.setPreCommandModifier('test%s' % self.menuInPreCommand, None)
         self.config.setPreCommandModifier('test%s' % menu, 'True') # set the selected one
         self.menuInPreCommand = menu
+   
+    def checkMachine(self):
+      if "lxplus" in socket.gethostname():
+          QMessageBox.information(None, '', "Warning! You're running on lxplus, and this will be slow!")
+      elif "tbed" not in socket.gethostname():
+          QMessageBox.information(None, '', "Warning! You're not running on the testbed, it could be slow!")
 
     def quit(self):
         self.config.write()
-        QtGui.qApp.quit()
+        QtWidgets.qApp.quit()
 
     def setFrameTitle(self,title):
         self.setWindowTitle(title)
@@ -469,9 +513,9 @@ class KeyPrep(QtGui.QScrollArea):
 
     def checkReleaseAndTT(self):
         self.config.release.set(os.getenv('AtlasVersion'))
-        self.config.swpath.set(os.getenv('AtlasBaseDir'))
-        if os.getenv('AtlasProject') in ['AtlasP1HLT','AtlasCAFHLT','AtlasProduction']:
-            self.config.patch.set(os.getenv('AtlasProject'))
+        self.config.swpath.set(os.getenv('AtlasBaseDir'))	
+        if os.getenv('AtlasProject') in ['Athena','AthenaP1']:
+            self.config.relName.set(os.getenv('AtlasProject'))
         
         if self.config.tt()=='':
             for p in os.getenv('DATAPATH').split(os.pathsep):
@@ -489,7 +533,7 @@ class KeyPrep(QtGui.QScrollArea):
     def write(self,s):
         if not self.summarylog:
             base = self.config.jobName()
-            mode = "w" if self.config.jobMTjo.enabled else "a"
+            mode = "w" if self.config.jobHLTjo.enabled else "a"
             self.summarylog=open('%s/log%sSummary' % (self.config.tmpDir(),base), mode)
         print s,
         print >>self.summarylog, s,
@@ -502,7 +546,9 @@ class KeyPrep(QtGui.QScrollArea):
             self.success = True
 
         def run(self):
-            for job in ['MTjo', 'PTjo', 'SetupCnv', 'UploadDb', 'MTdb', 'PTdb', 'CheckRes']:
+            processing_times = []
+            for job in ['HLTjo', 'SetupCnv', 'UploadDb', 'HLTdb', 'CheckRes']:
+                start_time = timeit.default_timer()
                 proc_conf = getattr(self.gui.config, "job%s" % job)
                 if not proc_conf.enabled:
                     proc_conf.setSkipped()
@@ -527,7 +573,10 @@ class KeyPrep(QtGui.QScrollArea):
                     return
                 proc_conf.setSuccess()
                 print >>self.gui, "===>>> Success"
-
+                elapsed = timeit.default_timer() - start_time
+		timer_line = "Elapsed time: " + str(elapsed)
+                print timer_line
+                processing_times += [timer_line]
             print "===>>> Success"
             self.gui.setFrameTitle('Success')
             self.success = True
@@ -570,7 +619,7 @@ class KeyPrep(QtGui.QScrollArea):
             print 'ERROR: <%s> No %s configured' % (caller, filedesc)
             proc_conf.setError()
             return False
-        if not os.path.exists(filename):
+        if 'root://eosatlas//eos/atlas/' not in filename and not os.path.exists(filename):
             print 'ERROR: <%s> %s %s does not exist in %s' % (caller, filedesc, filename, os.path.realpath('.'))
             proc_conf.setError()
             return False
@@ -626,87 +675,43 @@ class KeyPrep(QtGui.QScrollArea):
 
     #####################################################
     ###
-    ### Running athenaMT from the JO
+    ### Running athenaHLT from the JO
     ###
     #####################################################
-    def clearMTjo(self):
+    def clearHLTjo(self):
         base = self.config.jobName()
         self.deleteLocalFile("%s-1._0001.data" % base)
         self.deleteLocalFile("%s-1._0001.data.writing" % base)
-        self.deleteTmpFile('log%sMT' % base)
-        self.clearOptions( ['l1menu', 'hltl2menu', 'hltefmenu', 'setupL2', 'inputEF', 'jobMTjo'] )
+        self.deleteTmpFile('log%sHLT' % base)
+        self.clearOptions( ['l1menu', 'hltmenu', 'setupEF', 'jobHLTjo'] )
 
-    def checkPreReqMTjo(self,proc_conf):
-        return self.checkInput(proc_conf, 'inputL2', '') and \
-               self.checkFile(proc_conf, self.config.inputL2(), "Input file")
+    def checkPreReqHLTjo(self,proc_conf):
+        return self.checkInput(proc_conf, 'inputBSFile', '') and \
+               self.checkFile(proc_conf, self.config.inputBSFile(), "Input file")
 
-    def runMTjo(self, proc_conf):
+    def runHLTjo(self, proc_conf):
         base    = self.config.jobName()
-        logfile = '%s/log%sMT' % (self.config.tmpDir(),base)
+        logfile = '%s/log%sHLT' % (self.config.tmpDir(),base)
         proc_conf.setLogfile(logfile)
 
 
-        args = [ '-n %i' % self.config.nEvt(),
-                 '-o %s' % base,
-                 "-c doDBConfig=True",
-                 "-c trigBase='\"%s\"'" % base,
-                 "" if self.config.userPreCommand().strip()=='' else " -c '%s'"  % self.config.userPreCommand().strip(),
-                 '-f %s' % self.config.inputL2(),
-                 '--oh-monitoring' if self.config.onlineMonitoring() else '' ]
-        cmd = 'athenaMT.py %s %s' % ( " ".join(args), self.config.jobOption() )
-        print >>self, '%s &>! %s' % (cmd,logfile)
+        args = [ '-n 1 -f %s' % self.config.inputBSFile(),
+                 '-M' if self.config.onlineMonitoring() else '', 
+                 "" if self.config.userPreCommand().strip()=='' else " -c %s"  % self.config.userPreCommand().strip() ]
+        cmd = 'athenaHLT.py %s %s' % ( " ".join(args), self.config.jobOption() )
+        print >>self, '%s &> %s' % (cmd,logfile)
 
         if not self.executeProcess(cmd, proc_conf): return False
 
         try:
             self.config.l1menu     = subprocess.Popen("egrep 'DBCONFIG LVL1XML' %s" % logfile, shell=True,stdout=subprocess.PIPE).communicate()[0].split()[-1]
-            self.config.hltl2menu  = subprocess.Popen("egrep 'DBCONFIG HLTXML' %s" % logfile, shell=True,stdout=subprocess.PIPE).communicate()[0].split()[-1]
-            self.config.inputEF    = "%s-1._0001.data" % base
-            self.config.setupL2    = './l2_%s_setup.txt' % base
+            self.config.l1topomenu = self.config.l1menu().split("LVL1")[0]+"L1Topo"+self.config.l1menu().split("LVL1")[1]
+            self.config.hltmenu    = subprocess.Popen("egrep 'DBCONFIG HLTXML' %s" % logfile, shell=True,stdout=subprocess.PIPE).communicate()[0].split()[-1]
+            self.config.setupEF    = './ef__setup.txt'
         except:
             return False
         return True
-
-    #####################################################
-    ###
-    ### athenaPT from JobOptions
-    ###
-    #####################################################
-    def clearPTjo(self):
-        base = self.config.jobName()
-        self.deleteLocalFile("ef_%s_setup.txt" % base)
-        self.deleteLocalFile("%s-1._0001.data.writing" % base)
-        self.deleteTmpFile('log%sPT' % base)
-        self.clearOptions( ['hltefmenu', 'setupEF', 'jobPTjo'] )
-
-    def checkPreReqPTjo(self,proc_conf):
-        return self.checkInput(proc_conf, 'inputEF', '') and \
-               self.checkFile(proc_conf, self.config.inputEF(), "Input file")
-
-    def runPTjo(self, proc_conf):
-        base = self.config.jobName()
-        logfile = '%s/log%sPT' % (self.config.tmpDir(),base)
-        proc_conf.setLogfile(logfile)
-
-        args = [ '-n %i' % self.config.nEvt(),
-                 '-c doDBConfig=True',
-                 "-c trigBase='\"%s\"'" % base,
-                 "" if self.config.userPreCommand().strip()=='' else " -c '%s'"  % self.config.userPreCommand().strip(),
-                 '-f %s' % self.config.inputEF(),
-                 '--oh-monitoring' if self.config.onlineMonitoring() else '' ]
-        cmd = 'athenaPT.py %s %s' % ( " ".join(args), self.config.jobOption() )
-        print >>self, '%s &>! %s' % (cmd,logfile)
-
-        if not self.executeProcess(cmd, proc_conf): return False
-
-        try:
-            self.config.hltefmenu = subprocess.Popen("egrep 'DBCONFIG HLTXML' %s" % logfile, shell=True,stdout=subprocess.PIPE).communicate()[0].split()[-1]
-            self.config.setupEF   = './ef_%s_setup.txt' % base
-        except:
-            return False
-        return True
-
-
+    
     #####################################################
     ###
     ### setup conversion
@@ -722,50 +727,48 @@ class KeyPrep(QtGui.QScrollArea):
 
     def checkPreReqSetupCnv(self,proc_conf):
         allfiles = \
-                 self.checkFile(proc_conf, self.config.setupL2(), "L2 setup file") and \
                  self.checkFile(proc_conf, self.config.setupEF(), 'EF setup file') and \
-                 self.checkFile(proc_conf, self.config.hltl2menu(), 'HLT L2 menu file') and \
-                 self.checkFile(proc_conf, self.config.hltefmenu(), 'HLT EF menu file')
+                 self.checkFile(proc_conf, self.config.hltmenu(), 'HLT menu file')
         if not allfiles: return False
         return self.checkInput(proc_conf, 'l1menu', '')
 
     def runSetupCnv(self, proc_conf):
+
+        print 'Running the setup conversion'
+
         # check for level 1 menu
         base = self.config.jobName()
         fullSetupDir = '%s/%s' % (self.config.setupDir(), base)
+
+        print 'I think things are in the folder',fullSetupDir,', and this is where I\'ll put the files'
+
         l1menuName = os.path.basename(self.config.l1menu())
-        subprocess.call( ('cp -f %s .' % self.config.l1menu()).split() ) 
+        subprocess.call( ('cp -f %s .' % self.config.l1menu()).split() )
+        subprocess.call( ('cp -f %s .' % self.config.l1topomenu()).split()  )
+        l1topoName = os.path.basename(self.config.l1topomenu()) 
+
         #l1menuName = os.path.basename(self.config.l1menu())
         #if not os.path.exists(l1menuName):
         #    subprocess.call(('get_files -xmls %s' % l1menuName).split())
         if not self.checkFile(proc_conf, l1menuName, "L1 menu file after running get_files"):
             return False
+        if not self.checkFile(proc_conf, l1topoName, "L1 topo menu file after running get_files"):
+            return False
         
         logfile = '%s/log%sConv' % (self.config.tmpDir(),base)
         proc_conf.setLogfile(logfile)
 
-        subprocess.call(['cp', self.config.setupL2(), fullSetupDir+'/l2setup.txt'])
-        subprocess.call(['cp', self.config.setupEF(), fullSetupDir+'/efsetup.txt'])
-        subprocess.call(['cp', l1menuName,            fullSetupDir+'/lvl1Menu.xml'])
-        subprocess.call(['cp', self.config.hltl2menu(), fullSetupDir+'/hltL2Menu.xml'])
-        subprocess.call(['cp', self.config.hltefmenu(), fullSetupDir+'/hltEFMenu.xml'])
-        subprocess.call(['cp', self.config.setupL2().replace('.txt','_setup.txt'), fullSetupDir+'/l2setuppy.txt'])
-        subprocess.call(['cp', self.config.setupEF().replace('.txt','_setup.txt'), fullSetupDir+'/efsetuppy.txt'])
+        subprocess.call(['cp', self.config.setupEF(),   fullSetupDir+'/efsetup.txt'])
+        subprocess.call(['cp', l1menuName,              fullSetupDir+'/lvl1Menu.xml'])
+        subprocess.call(['cp', l1topoName,              fullSetupDir+'/l1topoMenu.xml'])
+        subprocess.call(['cp', self.config.hltmenu(),   fullSetupDir+'/hltMenu.xml'])
+        subprocess.call(['cp', self.config.setupEF().replace('.txt','_setup.txt'), fullSetupDir+'/efsetup_setup.txt'])
 
         cwd = os.getcwd()
         os.chdir(fullSetupDir)
 
-        cmd = 'menumerge.py --l2menu hltL2Menu.xml --efmenu hltEFMenu.xml --output hltMenu.xml'
-        print '%s &>! %s' % (cmd,logfile)
-        if not self.executeProcess(cmd, proc_conf): return False
-
-
-        cmd = 'ConvertHLTSetup_txt2xml.py l2setup.txt l2setuppy.txt'
-        print >>self,'%s &>>! %s' % (cmd,logfile)
-        if not self.executeProcess(cmd, proc_conf): return False
-
-        cmd = 'ConvertHLTSetup_txt2xml.py efsetup.txt efsetuppy.txt'
-        print >>self,'%s &>>! %s' % (cmd,logfile)
+        cmd = 'ConvertHLTSetup_txt2xml.py efsetup.txt efsetup_setup.txt'
+        print >>self,'%s &> %s' % (cmd,logfile)
         if not self.executeProcess(cmd, proc_conf): return False
 
         os.chdir(cwd)
@@ -786,18 +789,20 @@ class KeyPrep(QtGui.QScrollArea):
         fullSetupDir = '%s/%s' % (self.config.setupDir(), self.config.jobName())
         cwd = os.getcwd()
         os.chdir(fullSetupDir)
+        subprocess.call(['get_files','LVL1config.dtd'])
         allfiles = \
-                 self.checkFile(proc_conf, 'l2setup.xml', 'L2 setup file') and \
                  self.checkFile(proc_conf, 'efsetup.xml', 'EF setup file') and \
                  self.checkFile(proc_conf, 'hltMenu.xml', 'HLT menu file') and \
-                 self.checkFile(proc_conf, 'lvl1Menu.xml','LVL1 menu file')
+                 self.checkFile(proc_conf, 'lvl1Menu.xml','LVL1 menu file') and \
+                 self.checkFile(proc_conf, 'LVL1config.dtd','LVL1 configuration file') and \
+                 self.checkFile(proc_conf, 'l1topoMenu.xml','L1Topo menu file')
         os.chdir(cwd)
         return allfiles
 
     def runUploadDb(self,proc_conf):
         base = self.config.jobName()
         fullSetupDir = '%s/%s' % (self.config.setupDir(),base)
-        java='/afs/cern.ch/sw/lcg/external/Java/JDK/1.6.0/ia32/jre/bin/java -Xms512m -Xmx2000m'
+        #java='/afs/cern.ch/sw/lcg/external/Java/JDK/Oracle_1.8.0_31/amd64/bin/java -Xms512m -Xmx2000m'
         TT=self.config.tt()
         
         logfile = '%s/log%sUpload' % (self.config.tmpDir(),base)
@@ -815,83 +820,59 @@ class KeyPrep(QtGui.QScrollArea):
                     '-pw %s' % self.config.dbPW()]
         args += ['-up',
                  '-l1  %s/lvl1Menu.xml' % fullSetupDir,
+                 '-l1topo  %s/l1topoMenu.xml' % fullSetupDir,
                  '-hlt %s/hltMenu.xml'  % fullSetupDir,
-                 '-l2s %s/l2setup.xml'  % fullSetupDir,
                  '-efs %s/efsetup.xml'  % fullSetupDir,
                  '-rel %s'  % self.config.release(),
-                 '-o %sTT'  % logfile ]
+                 '-m \"Upload from script\"',
+                 '-o %sTTlog'  % logfile ]
 
-        cmd  = '%s -jar %s %s' % (java,TT,' '.join(args))
-        print >>self,'%s &>! %s' % (cmd,logfile)
-        if not self.executeProcess(cmd, proc_conf): return False
-
-        self.config.cfgKey   = int(subprocess.Popen("egrep 'UPLOAD Supermasterkey' %sTT" % logfile, shell=True,stdout=subprocess.PIPE).communicate()[0].split()[-1])
-        self.config.l1psKey  = int(subprocess.Popen("egrep 'UPLOAD LVL1prescalekey' %sTT" % logfile, shell=True,stdout=subprocess.PIPE).communicate()[0].split()[-1])
-        self.config.hltpsKey = int(subprocess.Popen("egrep 'UPLOAD HLTprescalekey' %sTT" % logfile, shell=True,stdout=subprocess.PIPE).communicate()[0].split()[-1])
-        return True
+        cmd  = '%s %s' % (TT,' '.join(args))
+        print >>self,'%s &> %s' % (cmd,logfile)
 
+        os.unsetenv("TRIGGER_EXP_CORAL_PATH")
+        os.environ["TRIGGER_EXP_CORAL_PATH_RUN2"] = "/afs/cern.ch/user/a/attrgcnf/.dbauth/menuexperts"
+        subprocess.call(cmd, shell=True) 
 
+        self.config.cfgKey   = int(subprocess.Popen("egrep 'UPLOAD Supermasterkey' %sTTlog" % logfile, shell=True,stdout=subprocess.PIPE).communicate()[0].split()[-1])
+        self.config.l1psKey  = int(subprocess.Popen("egrep 'UPLOAD LVL1prescalekey' %sTTlog" % logfile, shell=True,stdout=subprocess.PIPE).communicate()[0].split()[-1])
+        self.config.hltpsKey = int(subprocess.Popen("egrep 'UPLOAD HLTprescalekey' %sTTlog" % logfile, shell=True,stdout=subprocess.PIPE).communicate()[0].split()[-1])
+        return True
 
     #####################################################
     ###
-    ### Running athenaMT from the DB
+    ### Running athenaHLT from the DB
     ###
     #####################################################
-    def clearMTdb(self):
+    def clearHLTdb(self):
         base = self.config.jobName()
         self.deleteLocalFile("%s-1._0001.data" % base)
         self.deleteLocalFile("%s-1._0001.data.writing" % base)
-        self.deleteTmpFile('log%sMTdb' % base)
-        self.clearOptions( ['jobMTdb'] )
-    def checkPreReqMTdb(self,proc_conf):
+        self.deleteTmpFile('log%sHLTdb' % base)
+        self.clearOptions( ['jobHLTdb'] )
+    def checkPreReqHLTdb(self,proc_conf):
         return self.checkInput(proc_conf, 'cfgKey', 0) and \
                    self.checkInput(proc_conf, 'l1psKey', 0) and \
                    self.checkInput(proc_conf, 'hltpsKey', 0)
-    def runMTdb(self,proc_conf):
+    def runHLTdb(self,proc_conf):
         base = self.config.jobName()
-        logfile = '%s/log%sMTdb' % (self.config.tmpDir(),base)
+        logfile = '%s/log%sHLTdb' % (self.config.tmpDir(),base)
         proc_conf.setLogfile(logfile)
 
-        args = [ '-f %s' % self.config.inputL2(),
+        args = [ '-f %s' % self.config.inputBSFile(),
                  '-n %i' % self.config.nEvt(),
-                 '-o %s' % base,
-                 '--oh-monitoring' if self.config.onlineMonitoring() else '',
                  '-J TrigConf::HLTJobOptionsSvc',
-                 '-b DBServer=%s:DBSMKey=%i:DBHLTPSKey=%i:DBLVL1PSKey=%i:Instance=L2' % (self.config.dbAlias(),self.config.cfgKey(),self.config.hltpsKey(),self.config.l1psKey()) ]
-        cmd  = 'athenaMT.py %s' % ' '.join(args)
-        print >>self,'%s &>! %s' % (cmd,logfile)
-        if not self.executeProcess(cmd, proc_conf): return False
-        return True
+                 '-M' if self.config.onlineMonitoring() else '', 
+                 '--use-database --db-type Coral  --db-server %s --db-smk %i --db-hltpskey %i --db-extra {"lvl1key":%i}' % (self.config.dbAlias(),self.config.cfgKey(),self.config.hltpsKey(),self.config.l1psKey()) ]
 
-    #####################################################
-    ###
-    ### Running athenaPT from the DB
-    ###
-    #####################################################
-    def clearPTdb(self):
-        base = self.config.jobName()
-        self.deleteTmpFile('log%sPTdb' % base)
-        self.clearOptions( ['jobPTdb'] )
-
-    def checkPreReqPTdb(self,proc_conf):
-        return self.checkInput(proc_conf, 'cfgKey', 0)
-
-    def runPTdb(self,proc_conf):
-        base = self.config.jobName()
-        logfile = '%s/log%sPTdb' % (self.config.tmpDir(),base)
-        proc_conf.setLogfile(logfile)
+        cmd  = 'athenaHLT.py %s' % ' '.join(args)
+        print >>self,'%s &> %s' % (cmd,logfile)
 
-        args = [ '-f %s' % self.config.inputEF(),
-                 '-n %i' % self.config.nEvt(),
-                 '--oh-monitoring' if self.config.onlineMonitoring() else '',
-                 '-J TrigConf::HLTJobOptionsSvc',
-                 '-b DBServer=%s:DBSMKey=%i:DBHLTPSKey=%i:DBLVL1PSKey=%i:Instance=EF' % (self.config.dbAlias(),self.config.cfgKey(),self.config.hltpsKey(),self.config.l1psKey()) ]
-        cmd  = 'athenaPT.py %s' % ' '.join(args)
-        print >>self,'%s &>! %s' % (cmd,logfile)
+        os.unsetenv("FRONTIER_SERVER")
+        
         if not self.executeProcess(cmd, proc_conf): return False
         return True
 
-
     #####################################################
     ###
     ### Running the Result Checker
@@ -904,31 +885,21 @@ class KeyPrep(QtGui.QScrollArea):
 
     def checkPreReqCheckRes(self, proc_conf):
         allfiles = \
-                 self.checkFile(proc_conf, self.config.jobMTjo.logfile, "L2 JO log file") and \
-                 self.checkFile(proc_conf, self.config.jobMTdb.logfile, 'L2 DB log file') and \
-                 self.checkFile(proc_conf, self.config.jobPTjo.logfile, "EF JO log file") and \
-                 self.checkFile(proc_conf, self.config.jobPTdb.logfile, 'EF DB log file')
+                 self.checkFile(proc_conf, self.config.jobHLTjo.logfile, "HLT JO log file") and \
+                 self.checkFile(proc_conf, self.config.jobHLTdb.logfile, 'HLT DB log file')
         return allfiles
 
     def runCheckRes(self, proc_conf):
         base = self.config.jobName()
-        resMtJo = self.getResultFromLog(self.config.jobMTjo.logfile)
-        resMtDb = self.getResultFromLog(self.config.jobMTdb.logfile)
+        resHltJo = self.getResultFromLog(self.config.jobHLTjo.logfile)
+        resHltDb = self.getResultFromLog(self.config.jobHLTdb.logfile)
         self.testresults = {
-            'mtjo' : resMtJo,
-            'mtdb' : resMtDb
+            'hltjo' : resHltJo,
+            'hltdb' : resHltDb
             }
-        print >>self,"Checking L2\n==========="
-        successMT = self.checkResultInLevel(proc_conf, resMtJo, resMtDb)
+        print >>self,"Checking HLT\n==========="
+        success = self.checkResultInLevel(proc_conf, resHltJo, resHltDb)
         
-        resPtJo = self.getResultFromLog(self.config.jobPTjo.logfile)
-        resPtDb = self.getResultFromLog(self.config.jobPTdb.logfile)
-        self.testresults['ptjo'] = resPtJo
-        self.testresults['ptdb'] = resPtDb
-        print >>self,"Checking EF\n==========="
-        successPT = self.checkResultInLevel(proc_conf, resPtJo, resPtDb)
-
-        success = successMT and successPT
         if success:
             print >>self,"Check successful! This database key returns the correct answers and can be used online!"
         else:
@@ -937,7 +908,7 @@ class KeyPrep(QtGui.QScrollArea):
         if True:
             logfile = '%s/log%sCheckRes' % (self.config.tmpDir(),base)
             cmd  = 'buildConfigInstaller.sh %s %s' % (self.config.jobName(), self.config.release())
-            print >>self,'%s &>! %s' % (cmd,logfile)
+            print >>self,'%s &> %s' % (cmd,logfile)
             try:
                 successBuildInstaller = ( 0 == subprocess.call(cmd.split()) )
             except OSError, v:
@@ -992,14 +963,11 @@ class KeyPrep(QtGui.QScrollArea):
                 d[m.group('chain')] = m.groupdict()
         return d
 
-    def displayResultMT(self):
-        self.displayResult('mt')
+    def displayResultHLT(self):
+        self.displayResult('hlt')
         
-    def displayResultPT(self):
-        self.displayResult('pt')
-
     def displayResult(self, name):
-        if name!='mt' and name!='pt':
+        if name!='hlt':
             return
         if not (self.testresults.has_key('%sjo' % name) and self.testresults.has_key('%sdb' % name)):
             print "Results for %s are missing" % name
@@ -1071,10 +1039,6 @@ class KeyPrep(QtGui.QScrollArea):
         #t.insert("%s+1l" % INSERT, ul)
         print ul
 
-
-
-
-
 def parse_programm_options():
     import getopt
     short_opt = "h?F:"
@@ -1106,7 +1070,8 @@ def parse_programm_options():
 def main():
     signal.signal(signal.SIGINT, sigint_handler)
     inputFile = parse_programm_options()
-    app = QtGui.QApplication(sys.argv)
+    app = QtWidgets.QApplication(sys.argv)
+    app.setStyle('cleanlooks')
     timer = QtCore.QTimer()
     timer.start(500)  # interval after which timeout signal is called
     timer.timeout.connect(lambda: None)
@@ -1120,7 +1085,7 @@ def sigint_handler(*args):
     #if QMessageBox.question(None, '', "Are you sure you want to quit?",
     #                        QMessageBox.Yes | QMessageBox.No,
     #                        QMessageBox.No) == QMessageBox.Yes:
-    QtGui.QApplication.quit()
+    QtWidgets.QApplication.quit()
 
 if __name__ == "__main__":
     main()
diff --git a/Trigger/TrigConfiguration/TrigDbHltUpload/share/setupEnv.sh b/Trigger/TrigConfiguration/TrigDbHltUpload/share/setupEnv.sh
new file mode 100755
index 0000000000000000000000000000000000000000..ca6722d7eb65626ea554b3e935800e61d372be7c
--- /dev/null
+++ b/Trigger/TrigConfiguration/TrigDbHltUpload/share/setupEnv.sh
@@ -0,0 +1,3 @@
+lsetup "lcgenv -p LCG_88 x86_64-slc6-gcc62-opt pyqt5"
+export QT_PLUGIN_PATH=/cvmfs/sft.cern.ch/lcg/releases/LCG_88/qt5/5.6.0/x86_64-slc6-gcc62-opt/plugins/
+export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb
diff --git a/Trigger/TrigCost/TrigCostRootAnalysis/Root/Config.cxx b/Trigger/TrigCost/TrigCostRootAnalysis/Root/Config.cxx
index 7b39916563e3c61b677535a62657ab84b7994088..33cb32118cdad860cc25d76dccc1b0f44a8b11fa 100644
--- a/Trigger/TrigCost/TrigCostRootAnalysis/Root/Config.cxx
+++ b/Trigger/TrigCost/TrigCostRootAnalysis/Root/Config.cxx
@@ -134,6 +134,7 @@ namespace TrigCostRootAnalysis {
     static Int_t _upgradeMergeTOBOverlap = kFALSE;
     static Int_t _doExponentialMu = kFALSE;
     static Int_t _invertHighMuRunVeto = kFALSE;
+    static Int_t _ignoreGRL = kFALSE;
 
     // User options
     std::vector< std::string > _inputFiles;
@@ -433,6 +434,9 @@ namespace TrigCostRootAnalysis {
         {
           "doExponentialMu", no_argument, &_doExponentialMu, 1
         },
+        {
+          "ignoreGRL", no_argument, &_ignoreGRL, 1
+        },       
         {
           "invertHighMuRunVeto", no_argument, &_invertHighMuRunVeto, 1
         }, // Hidden option
@@ -781,6 +785,9 @@ namespace TrigCostRootAnalysis {
           std::cout <<
             "--noLBRescaling\t\t\t\t\tFlag to prevent the rescaling of the effective time per LB in EB runs based on the events processed and the known run size."
                     << std::endl;
+          std::cout <<
+            "--ignoreGRL\t\t\t\tFlag to switch off the exclusion of LB which fail the good run lists in ehnaced bias runs."
+                    << std::endl;
           std::cout <<
             "--patternsMonitor patt1 patt2 ...\t\tPatterns to match in names when running. Regex currently NOT supported. Partial matched allowed. Only entries which match will be analysed."
                     << std::endl;
@@ -1815,6 +1822,7 @@ namespace TrigCostRootAnalysis {
     set(kDoExponentialMu, _doExponentialMu, "DoExponentialMu");
     set(kInvertHighMuRunVeto, _invertHighMuRunVeto, "InvertHighMuRunVeto");
     set(kUseOnlyTheseBCIDs, _useOnlyTheseBCIDs, "UseOnlyTheseBCIDs");
+    set(kIgnoreGRL, _ignoreGRL, "IgnoreGRL");
 
     std::stringstream _multiRunss(_multiRun); // Comma separated
     std::string _tempStr;
diff --git a/Trigger/TrigCost/TrigCostRootAnalysis/Root/TrigXMLService.cxx b/Trigger/TrigCost/TrigCostRootAnalysis/Root/TrigXMLService.cxx
index 24ae623b3acdb70eb22a3bd9dd17320a65ad84d6..84308a36d3bd74228d9662148497ae2b33b770d2 100644
--- a/Trigger/TrigCost/TrigCostRootAnalysis/Root/TrigXMLService.cxx
+++ b/Trigger/TrigCost/TrigCostRootAnalysis/Root/TrigXMLService.cxx
@@ -75,6 +75,7 @@ namespace TrigCostRootAnalysis {
   }
 
   void TrigXMLService::init() {
+    m_ignoreGRL = Config::config().getInt(kIgnoreGRL);
     parseRunXML(Config::config().getInt(kRunNumber), kTRUE);
     // Is this a "multi run"? If so - load details from the LB of the other runs
     std::vector<Int_t> _multiRun = Config::config().getIntVec(kMultiRun);
@@ -865,6 +866,7 @@ namespace TrigCostRootAnalysis {
    *could affect rates prediction
    */
   Bool_t TrigXMLService::getIsLBFlaggedBad(Int_t _lb) {
+    if (m_ignoreGRL) return kFALSE;
     return (Bool_t) m_badLumiBlocks.count(_lb);
   }
 
diff --git a/Trigger/TrigCost/TrigCostRootAnalysis/TrigCostRootAnalysis/TrigXMLService.h b/Trigger/TrigCost/TrigCostRootAnalysis/TrigCostRootAnalysis/TrigXMLService.h
index 372db8f758b23e3dce2b21a541ea0db0bc87ade6..2574875aeb2e8716d8242e7fdf98f0b1f20db8b0 100644
--- a/Trigger/TrigCost/TrigCostRootAnalysis/TrigCostRootAnalysis/TrigXMLService.h
+++ b/Trigger/TrigCost/TrigCostRootAnalysis/TrigCostRootAnalysis/TrigXMLService.h
@@ -152,6 +152,7 @@ namespace TrigCostRootAnalysis {
     IntIntMap_t m_totalEventsPerLB; //!< Map of how many events there were online per LB (from COOL, stored in XML)
     Int_PairStringInt_Map_t m_bunchGroupXML; //!< Bunchgroup config, loaded from XML
     Bool_t m_parsedRunXML; //!< If we managed to read the run XML
+    Bool_t m_ignoreGRL; //!< Cache this setting if GRL is to be ignored in enhanced bias data 
     std::set<Int_t>         m_badLumiBlocks; //!< LBs flagged as bad by rate experts in the run XML
     Int_t m_minLB; //!< Lower lumi block with information in the run XML
     Int_t m_maxLB; //!< Upper lumi block with information in the run XML
diff --git a/Trigger/TrigCost/TrigCostRootAnalysis/TrigCostRootAnalysis/Utility.h b/Trigger/TrigCost/TrigCostRootAnalysis/TrigCostRootAnalysis/Utility.h
index 12dcefff9b5dc2acf5ced8858019b68895b69d5f..e944bf5675bd0e3af10466b142f29a95be3e5297 100644
--- a/Trigger/TrigCost/TrigCostRootAnalysis/TrigCostRootAnalysis/Utility.h
+++ b/Trigger/TrigCost/TrigCostRootAnalysis/TrigCostRootAnalysis/Utility.h
@@ -241,6 +241,7 @@ namespace TrigCostRootAnalysis {
     kDoEBWeighting,
     kDoCPS,
     kIgnoreNonPhysBunchGroups,
+    kIgnoreGRL,
     kNoLBRescaling,
     kPatternsInvert,
     kDirectlyApplyPrescales,
diff --git a/Trigger/TrigFTK/FTKStandaloneMonitoring/CMakeLists.txt b/Trigger/TrigFTK/FTKStandaloneMonitoring/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..486eb00df2a544ffd7ad635f30c067b6ed02ba39
--- /dev/null
+++ b/Trigger/TrigFTK/FTKStandaloneMonitoring/CMakeLists.txt
@@ -0,0 +1,29 @@
+atlas_subdir(FTKStandaloneMonitoring)
+
+atlas_depends_on_subdirs( PUBLIC
+                          Event/ByteStreamData
+                          Trigger/TrigFTK/TrigFTK_RawData
+			  Trigger/TrigAnalysis/TrigInDetAnalysis
+			  Trigger/TrigAnalysis/TrigInDetAnalysisUtils
+                          PRIVATE
+                          Trigger/TrigFTK/TrigFTKSim
+                          )
+
+# External dependencies:
+find_package( tdaq-common COMPONENTS eformat_write ) 
+find_package( tdaq COMPONENTS rc_RunController ipc omnithread omniORB4 rc RunControl rc_OnlSvc ohroot )
+
+atlas_add_library(FTKStandaloneMonitoring
+                  src/*.cxx
+                  PUBLIC_HEADERS FTKStandaloneMonitoring
+                  PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${TDAQ_INCLUDE_DIRS}
+                  LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ${TDAQ_LIBRARIES}  ByteStreamData   TrigFTK_RawData TrigFTKSimLib TrigInDetAnalysisUtils TrigInDetAnalysis TrigFTK_RawData
+                  PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
+
+atlas_add_executable(MonitoringFTKHWSWComparison
+                     test/MonitoringComparison.cxx
+                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${TDAQ_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES}  ${TDAQ_LIBRARIES} ByteStreamData TrigFTK_RawData TrigFTKSimLib TrigInDetAnalysisUtils TrigInDetAnalysis TrigFTK_RawData FTKStandaloneMonitoring
+		     )
+
+atlas_install_headers( FTKStandaloneMonitoring )
diff --git a/Trigger/TrigFTK/FTKStandaloneMonitoring/FTKStandaloneMonitoring/CompareFTKEvents.h b/Trigger/TrigFTK/FTKStandaloneMonitoring/FTKStandaloneMonitoring/CompareFTKEvents.h
new file mode 100644
index 0000000000000000000000000000000000000000..d3f1409610d24e82155aea66fcb239e63897f3ed
--- /dev/null
+++ b/Trigger/TrigFTK/FTKStandaloneMonitoring/FTKStandaloneMonitoring/CompareFTKEvents.h
@@ -0,0 +1,102 @@
+/*
+Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+#ifndef __CompareFTKEvents__
+#define __CompareFTKEvents__
+
+
+#include <iostream>
+#include <fstream>
+
+#include <getopt.h>
+#include <vector>
+#include <cmath>
+#include "TTree.h"
+#include "TFile.h"
+
+
+#include "ByteStreamData/RawEvent.h"
+#include "TrigFTKSim/FTKTrackStream.h"
+#include "TrigFTK_RawData/FTK_RawTrackContainer.h"
+#include "TrigFTK_RawData/FTK_RawPixelCluster.h"
+#include "TrigFTK_RawData/FTK_RawSCT_Cluster.h"
+#include "FTKStandaloneMonitoring/FTKTrkAssoc.h"
+#include "FTKStandaloneMonitoring/CompareFTKTracks.h"
+#include "RunControl/Common/OnlineServices.h"
+#include "ipc/partition.h"
+#include "ipc/core.h"
+#include "oh/OHRootProvider.h"	
+#include "RunControl/Common/Exceptions.h"
+class CompareFTKEvents{
+  public:
+    CompareFTKEvents();
+    CompareFTKEvents(const std::string &BSfile, const std::string &NTUP_FTK_file);
+    void SetupPartition(const std::string &partition_name);
+    std::streampos readBSevent(int ievent,std::streampos startbufpos);
+    void readNTUP_FTKfile();
+    void PrintFiles();
+    void EventLoop();
+    void SetHistos(std::vector<std::string> histo_list);
+    void SetEvtInfoString(std::string &str_tree_evtinfo){m_str_tree_evtinfo=str_tree_evtinfo;}
+    void SetTreeNTUPString(std::string &str_tree_ftkdata){m_str_tree_ftkdata=str_tree_ftkdata;}
+    void SetBranchString(std::string &str_tree_ftkstream){m_str_tree_ftkstream=str_tree_ftkstream;}
+    void SetVerbose(){m_verbose=true;}
+    void SetNEvents(int nevtmax){m_nevtmax=nevtmax;}
+    void Execute();
+    int GetNEventsBS();
+    ~CompareFTKEvents();
+  private:
+    StatusCode decode(uint32_t nTracks, OFFLINE_FRAGMENTS_NAMESPACE::PointerType rodData, FTK_RawTrackContainer* result);
+    FTK_RawTrack* unpackFTTrack( OFFLINE_FRAGMENTS_NAMESPACE::PointerType data);
+    void unpackPixCluster(OFFLINE_FRAGMENTS_NAMESPACE::PointerType data, FTK_RawPixelCluster& cluster);
+    void unpackSCTCluster(OFFLINE_FRAGMENTS_NAMESPACE::PointerType data, FTK_RawSCT_Cluster& cluster) { cluster.setWord(*data); }
+    int m_nevtmax=0;
+    const size_t TrackBlobSize = 22; // magic number from BS specification
+    const size_t TrackParamsBlobSize = 6; // --||--
+    const size_t PixHitParamsBlobSize = 2; // --||--
+    const size_t SCTHitParamsBlobSize = 1; // --||--
+    const size_t NPixLayers=4;
+    const size_t NSCTLayers=8;
+    std::vector<uint32_t> m_data;
+    std::string m_BSfile;
+    std::string m_NTUP_FTK_file;
+    uint32_t m_checkword=0xaa1234aa;
+    uint32_t trackBlockOffsetStart=0;	  // Nr of words in ROB data block before track blocks start
+    uint32_t trackBlockOffsetEnd=0;	  // Nr of words in ROB data block after track blocks end
+    int m_Nevents_BS;
+    int m_Nevents_NTUPFTK;
+    std::ifstream m_myBSfile;
+    std::streampos m_tmpbufpos=0;
+    TTree *m_tevtinfo;
+    TTree *m_theTree;
+    TFile *m_fntupftk;
+    int RN, EN, LB, BCID, EL1ID, l1TT;
+    FTKTrackStream *m_ft;
+    bool m_allmatched=true;
+    bool m_verbose=false;
+    bool m_setup_partition=false;
+    CompareFTKTracks * m_compTrk;
+    std::vector<std::string> m_histo_list;
+    std::map<std::string , TH1D * > map_histo;
+    std::map<std::string , TH2D * > map_histo_2D;
+    TFile * m_fout;
+    void CreateHistos();
+    void WriteHistos();
+    std::string m_str_tree_evtinfo="evtinfo";
+    std::string m_str_tree_ftkdata="ftkdata";
+    std::string m_str_tree_ftkstream="FTKMergedTracksStream";
+    std::string m_partition_name="";
+    std::map<std::string, std::vector<double> > histo_param={{"pt",{1000.,0.,100000.}},
+                                                              {"eta",{100.,-2.5,2.5}},
+							      {"phi",{100.,-3.2,3.2}},
+							      {"d0",{100.,-5.,5.}},
+							      {"z0",{100,-50,50}},
+							      {"chi2",{100,0,50}},
+							      {"ETA_PHI",{100,-2.5,2.5,100,-3.2,3.2}}};
+    std::vector<std::string> variable_list={"pt","eta","phi","d0","z0","chi2","ETA_PHI"};    
+    IPCPartition                                    m_ipcpartition;     // Partition 
+    std::string                         m_name="HLmon_HWSWcomp";
+    OHRootProvider                      *m_ohProvider;
+    TH1F                                *m_histogram;       // Histogram
+  };
+#endif //__CompareFTKEvents__
diff --git a/Trigger/TrigFTK/FTKStandaloneMonitoring/FTKStandaloneMonitoring/CompareFTKTracks.h b/Trigger/TrigFTK/FTKStandaloneMonitoring/FTKStandaloneMonitoring/CompareFTKTracks.h
new file mode 100644
index 0000000000000000000000000000000000000000..485a642bf7077bfd55f60198ecf0a9fc5be9ff8d
--- /dev/null
+++ b/Trigger/TrigFTK/FTKStandaloneMonitoring/FTKStandaloneMonitoring/CompareFTKTracks.h
@@ -0,0 +1,39 @@
+/*
+Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+#ifndef __CompareFTKTracks__
+#define __CompareFTKTracks__
+
+
+#include <iostream>
+#include <fstream>
+
+#include <vector>
+#include <cmath>
+#include "TTree.h"
+#include "TFile.h"
+#include "TH1.h"
+#include "TH2.h"
+
+#include "TrigFTK_RawData/FTK_RawTrackContainer.h"
+#include "FTKStandaloneMonitoring/FTKTrkAssoc.h"
+class CompareFTKTracks{
+  public:
+    CompareFTKTracks();
+    CompareFTKTracks(std::vector<const FTK_RawTrack *> &ref, std::vector<const FTK_RawTrack *> &test, std::map<std::string , TH1D * > &map_histo, std::map<std::string , TH2D * > &map_histo_2D);
+    void AssociateTracks();
+    void SetDRmax(double dmax){m_dmax=dmax;}
+    void TestEquivalence();
+    void FillHistos();
+    double GetValue(std::string & variable, const FTK_RawTrack * tmptrk);
+  private:
+    std::map<std::string , TH1D * > m_map_histo;
+    std::map<std::string , TH2D * > m_map_histo_2D;
+    std::vector<const FTK_RawTrack *> m_ref;
+    std::vector<const FTK_RawTrack *> m_test;
+    FTKTrkAssoc* m_associator;
+    double m_dmax=0.2;
+    bool m_allmatched=true;
+    std::vector<std::string> variable_list={"pt","eta","phi","d0","z0","chi2","ETA_PHI"};
+};
+#endif //__CompareFTKTracks__
diff --git a/Trigger/TrigFTK/FTKStandaloneMonitoring/FTKStandaloneMonitoring/FTKTrkAssoc.h b/Trigger/TrigFTK/FTKStandaloneMonitoring/FTKStandaloneMonitoring/FTKTrkAssoc.h
new file mode 100644
index 0000000000000000000000000000000000000000..6478974105ac1ba169a21905e0e455a5edcd0645
--- /dev/null
+++ b/Trigger/TrigFTK/FTKStandaloneMonitoring/FTKStandaloneMonitoring/FTKTrkAssoc.h
@@ -0,0 +1,24 @@
+/*
+Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+#ifndef __FTKTRKASSOC_H__
+#define __FTKTRKASSOC_H__
+#include "TrigFTK_RawData/FTK_RawTrack.h"
+#include "TrigInDetAnalysisUtils/BestMatcher.h"
+#include "TMath.h"
+typedef BestMatcher<const FTK_RawTrack> TrkMatch;
+class FTKTrkAssoc : public TrkMatch { 
+    public:
+      FTKTrkAssoc(const std::string& name, double d) : 
+        TrkMatch(name, d)
+    { } 
+      virtual ~FTKTrkAssoc() { } 
+      double distance( const FTK_RawTrack* t0,  const FTK_RawTrack* t1 ) const {
+        double deta = TMath::ASinH(t0->getCotTh())-TMath::ASinH(t1->getCotTh());
+        double dphi = t0->getPhi()-t1->getPhi(); 
+        if ( dphi> M_PI ) dphi-=2*M_PI; 
+        if ( dphi<-M_PI ) dphi+=2*M_PI;
+        return std::sqrt( deta*deta + dphi*dphi );
+      }
+  };
+#endif
diff --git a/Trigger/TrigFTK/FTKStandaloneMonitoring/src/CompareFTKEvents.cxx b/Trigger/TrigFTK/FTKStandaloneMonitoring/src/CompareFTKEvents.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..547a30130ff0d98e4927f4d44ac88bd1b717b75b
--- /dev/null
+++ b/Trigger/TrigFTK/FTKStandaloneMonitoring/src/CompareFTKEvents.cxx
@@ -0,0 +1,391 @@
+/*
+Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+#include "FTKStandaloneMonitoring/CompareFTKEvents.h"
+#include <iostream>
+#include <string>
+CompareFTKEvents::CompareFTKEvents()
+{
+    std::cout<<"Empty constructor"<<std::endl;
+}
+CompareFTKEvents::CompareFTKEvents(const std::string &BSfile, const std::string &NTUP_FTK_file):
+   m_BSfile(BSfile),
+   m_NTUP_FTK_file(NTUP_FTK_file)
+{
+    std::cout<<"Input files constructor"<<std::endl;
+    std::cout<<m_BSfile<<std::endl;
+    std::cout<<m_NTUP_FTK_file<<std::endl;
+    m_myBSfile.open(m_BSfile.c_str(),std::ios::in | std::ios::binary);
+    if (m_myBSfile.fail()){
+        std::cout << "ERROR! cannot open file "<<m_BSfile.c_str();
+	m_myBSfile.clear( );
+    }
+}    
+// setting up partition
+void CompareFTKEvents::SetupPartition(const std::string &partition_name)
+{   
+    m_partition_name=partition_name;
+    m_setup_partition=true;
+    // initialization of IPCParition
+    try {
+       m_ipcpartition      = daq::rc::OnlineServices::instance().getIPCPartition();
+       std::cout<<"==> Getting partition from Online Service Instance: you are running in a partition"<<std::endl;
+    }
+    catch ( daq::rc::Exception & ex ){	    
+       ers::warning(ex);  //or throw e; 
+       m_ipcpartition = IPCPartition( m_partition_name );
+       std::cout<<"==> Setting up partition from the name you provided in the command line: "<<m_partition_name<<std::endl;
+       if (m_partition_name.empty()) std::cout<<"!!!! Empty partition name => you should provide it with \"-p [partition_name]\" as argument while executing"<<std::endl;
+    }
+    // Creating the Histogramming provider
+    std::string OHServer("Histogramming"); 
+    std::string OHName("FTK_" + m_name);   
+    std::cout<<"partition initialized"<<std::endl;
+    //initialization of the OH provider
+    try {
+      m_ohProvider = new OHRootProvider ( m_ipcpartition , OHServer, OHName );
+      ERS_LOG("OH: publishing in " << OHServer << "." << m_name );
+    }
+    catch ( daq::oh::Exception & ex)
+    { // Raise a warning or throw an exception.
+      std::cout<<"OH error exception"<<std::endl;
+      ers::warning(ex);  
+    }  
+}
+// defining histograms
+void CompareFTKEvents::SetHistos(std::vector<std::string> histo_list){
+    m_histo_list=histo_list;
+    for (auto & istr : m_histo_list){
+	std::size_t pos = istr.find("_");      
+        std::string str3 = istr.substr (pos+1);
+        std::stringstream ss;
+        if (istr.find("HWSW")!=std::string::npos)        ss<<"HW=SIM;"<<str3<<";FTK HW=SIM Tracks";
+        else if (istr.find("HWonly")!=std::string::npos) ss<<"HW only;"<<str3<<";FTK HW Tracks w/o SW match";
+        else if (istr.find("SWonly")!=std::string::npos) ss<<"SW only;"<<str3<<";FTK SW Tracks w/o HW match";
+        else if (istr.find("HWvsSWhw")!=std::string::npos) ss<<"Matched Tracks but HW!=SW; HW "<<str3<<";FTK HW Tracks w/ SW match "<<str3;
+        else if (istr.find("HWvsSWsw")!=std::string::npos) ss<<"Matched Tracks but HW!=SW; SW "<<str3<<";FTK SW Tracks w/ HW match "<<str3;
+	//else if (istr.find("res")!=std::string::npos)  ss<<"Matched Tracks but HW!=SW, #Delta  (SW-HW)/ HW;"<<str3<<";FTK HW Tracks w/ SW match";
+	else if (istr.find("nTrk")!=std::string::npos) ss<<istr<<";N tracks;Events";
+	std::string title = ss.str();
+	//if histo is not eta vs phi 2D histo
+        if (istr.find("ETA_PHI")==std::string::npos){
+            if (istr.find("nTrk")!=std::string::npos) map_histo.insert(std::map<std::string, TH1D *>::value_type(istr, new TH1D(istr.c_str(),title.c_str(),100,0,100)));
+ 	    else if (istr.find("HWSW")!=std::string::npos|| istr.find("HWonly")!=std::string::npos||istr.find("SWonly")!=std::string::npos||(istr.find("HWvsSW")!=std::string::npos&&istr.find("diff")==std::string::npos))
+	       map_histo.insert(std::map<std::string, TH1D *>::value_type(istr, new TH1D(istr.c_str(),title.c_str(),histo_param[str3].at(0),histo_param[str3].at(1),histo_param[str3].at(2))));
+            else if (istr.find("HWvsSWdiff_pt")!=std::string::npos)
+		map_histo.insert(std::map<std::string, TH1D *>::value_type(istr, new TH1D(istr.c_str(),"#Delta p_{T} (test-ref); p_{T}^{test} - p_{T}^{ref} ;FTK Tracks",1000,-5000,5000)));
+            else if (istr.find("HWvsSWdiff_eta")!=std::string::npos)
+		map_histo.insert(std::map<std::string, TH1D *>::value_type(istr, new TH1D(istr.c_str(),"#Delta #eta (test-ref); #eta^{test} - #eta^{ref} ;FTK Tracks",2000,-0.1,0.1)));
+            else if (istr.find("HWvsSWdiff_phi")!=std::string::npos)
+		map_histo.insert(std::map<std::string, TH1D *>::value_type(istr, new TH1D(istr.c_str(),"#Delta #phi (test-ref); #phi^{test} - #phi^{ref} ;FTK Tracks",2000,-0.1,0.1)));
+            else if (istr.find("HWvsSWdiff_d0")!=std::string::npos) 
+		map_histo.insert(std::map<std::string, TH1D *>::value_type(istr, new TH1D(istr.c_str(),"#Delta d_{0} (test-ref); d_{0}^{test} - d_{0}^{ref} ;FTK Tracks",4000,-5.,5.)));
+            else if (istr.find("HWvsSWdiff_z0")!=std::string::npos) 
+		map_histo.insert(std::map<std::string, TH1D *>::value_type(istr, new TH1D(istr.c_str(),"#Delta z_{0} (test-ref); z_{0}^{test} - z_{0}^{ref} ;FTK Tracks",4000,-2.,2.)));
+            else if (istr.find("HWvsSWdiff_chi2")!=std::string::npos) 
+		map_histo.insert(std::map<std::string, TH1D *>::value_type(istr, new TH1D(istr.c_str(),"#Delta chi2 (test-ref); chi2^{test} - chi2^{ref} ;FTK Tracks",4000,-5.,5.)));
+            else if (istr.find("res_pt")!=std::string::npos)
+		map_histo.insert(std::map<std::string, TH1D *>::value_type(istr, new TH1D(istr.c_str(),"#Delta p_{T} (test-ref)/ p_{T}^{ref};( p_{T}^{test} - p_{T}^{ref} )/ p_{T}^{ref};FTK Tracks",2000,-1.,1.)));
+            else if (istr.find("res_eta")!=std::string::npos)
+		map_histo.insert(std::map<std::string, TH1D *>::value_type(istr, new TH1D(istr.c_str(),"#Delta #eta (test-ref)/ #eta^{ref};( #eta^{test} - #eta^{ref} )/ #eta^{ref};FTK Tracks",2000,-1.,1.)));
+            else if (istr.find("res_phi")!=std::string::npos)
+		map_histo.insert(std::map<std::string, TH1D *>::value_type(istr, new TH1D(istr.c_str(),"#Delta #phi (test-ref)/ #phi^{ref};( #phi^{test} - #phi^{ref} )/ #phi^{ref};FTK Tracks",2000,-1.,1.)));
+            else if (istr.find("res_d0")!=std::string::npos) 
+		map_histo.insert(std::map<std::string, TH1D *>::value_type(istr, new TH1D(istr.c_str(),"#Delta d_{0} (test-ref)/ d_{0}^{ref};( d_{0}^{test} - d_{0}^{ref} )/ d_{0}^{ref};FTK Tracks",4000,-2.,2.)));
+            else if (istr.find("res_z0")!=std::string::npos) 
+		map_histo.insert(std::map<std::string, TH1D *>::value_type(istr, new TH1D(istr.c_str(),"#Delta z_{0} (test-ref)/ z_{0}^{ref};( z_{0}^{test} - z_{0}^{ref} )/ z_{0}^{ref};FTK Tracks",4000,-2.,2.)));
+            else if (istr.find("res_chi2")!=std::string::npos) 
+		map_histo.insert(std::map<std::string, TH1D *>::value_type(istr, new TH1D(istr.c_str(),"#Delta chi2 (test-ref)/ chi2^{ref};( chi2^{test} - chi2^{ref} )/ chi2^{ref};FTK Tracks",4000,-2.,2.)));
+	}
+	else {
+ 	    map_histo_2D.insert(std::map<std::string, TH2D *>::value_type(istr, new TH2D(istr.c_str(),title.c_str(),100,-2.5,2.5,100,-3.2,3.2)));	
+	}
+    }	
+}
+// reading BS file, starting loop on events and writing histograms
+void CompareFTKEvents::Execute()
+{
+    m_Nevents_BS=GetNEventsBS();
+    std::cout<<"Input BS file has N events: "<<m_Nevents_BS<<std::endl;
+    readNTUP_FTKfile();
+    if (m_Nevents_BS!=m_Nevents_NTUPFTK) {
+	std::cout<<"different number of events: "<<m_Nevents_BS<<" "<<m_Nevents_NTUPFTK<<std::endl;
+	m_allmatched=false;
+    }
+    EventLoop();
+    WriteHistos();
+}
+// reading the SW NTUP_FTK TTrees
+void CompareFTKEvents::readNTUP_FTKfile()
+{
+    std::cout<<"Reading NTUP_FTK file "<<m_NTUP_FTK_file<<std::endl;
+    m_fntupftk = new TFile(m_NTUP_FTK_file.c_str());
+    if (!m_fntupftk) std::cout<<"ERROR!! NTUP_FTK file could not be opened: "<<m_NTUP_FTK_file.c_str()<<std::endl;
+    if (!m_fntupftk->GetListOfKeys()->Contains(m_str_tree_evtinfo.c_str())) std::cout<<"ERROR!! NTUP_FTK file does not contain tree: "<<m_str_tree_evtinfo.c_str()<<std::endl;
+    m_tevtinfo = (TTree*)m_fntupftk->Get(m_str_tree_evtinfo.c_str());
+    m_tevtinfo->SetBranchAddress("RunNumber",&RN);  
+    m_tevtinfo->SetBranchAddress("EventNumber",&EN);  
+    m_tevtinfo->SetBranchAddress("LB",&LB);  
+    m_tevtinfo->SetBranchAddress("BCID",&BCID);  
+    m_tevtinfo->SetBranchAddress("ExtendedLevel1ID",&EL1ID);  
+    m_tevtinfo->SetBranchAddress("Level1TriggerType",&l1TT); 
+    if (!m_fntupftk->GetListOfKeys()->Contains(m_str_tree_ftkdata.c_str())) std::cout<<"ERROR!! NTUP_FTK file does not contain tree: "<<m_str_tree_ftkdata.c_str()<<std::endl;
+    m_theTree=(TTree *)m_fntupftk->Get(m_str_tree_ftkdata.c_str());
+    m_ft=new FTKTrackStream();
+    if (!m_theTree->GetListOfBranches()->Contains(m_str_tree_ftkstream.c_str()))std::cout<<"ERROR!! NTUP_FTK file does not contain branch: "<<m_str_tree_ftkstream.c_str()<<std::endl;
+    auto branch  = m_theTree->GetBranch(m_str_tree_ftkstream.c_str());
+    branch->SetAddress(&m_ft);
+    m_Nevents_NTUPFTK=m_theTree->GetEntries();
+}
+// decoding functions from FTKByteStreamDecoderEncoder
+StatusCode CompareFTKEvents::decode(uint32_t nTracks, OFFLINE_FRAGMENTS_NAMESPACE::PointerType rodData, FTK_RawTrackContainer* result) {
+
+  result->reserve(result->size() + nTracks);
+  for ( size_t i = 0; i < nTracks; ++i ) {
+    FTK_RawTrack* track = unpackFTTrack( rodData );
+    rodData += TrackBlobSize;
+    result->push_back(track);
+  }
+  return StatusCode::SUCCESS;
+}
+FTK_RawTrack* CompareFTKEvents::unpackFTTrack( OFFLINE_FRAGMENTS_NAMESPACE::PointerType data) {  
+  FTK_RawTrack* track = new FTK_RawTrack(data[0], data[1], data[2], data[3], data[4], data[5]); // first six words are track params
+  data += TrackParamsBlobSize;
+
+  // get pixel hits  
+  track->getPixelClusters().resize(NPixLayers);
+  for ( size_t i = 0; i < size_t(NPixLayers); ++i) {
+    size_t offset = PixHitParamsBlobSize*i;
+    unpackPixCluster(data+offset, track->getPixelCluster(i) );    
+  }
+  data += PixHitParamsBlobSize*NPixLayers;
+
+  // gets SCT hits
+  track->getSCTClusters().resize(NSCTLayers);
+  for ( size_t i = 0; i < size_t(NSCTLayers); ++i) {
+    size_t offset = SCTHitParamsBlobSize*i;
+    unpackSCTCluster(data+offset, track->getSCTCluster(i) );    
+  }
+  // no more shifts needed
+  return track;
+}  
+void CompareFTKEvents::unpackPixCluster(OFFLINE_FRAGMENTS_NAMESPACE::PointerType data, FTK_RawPixelCluster& cluster) {
+  cluster.setWordA(*data);
+  cluster.setWordB(*(data+1));
+}
+// Looping over events of the HW (BS_FTK) and SW (NTUP_FTK files) and collecting track info
+void CompareFTKEvents::EventLoop()
+{
+    std::cout<<"Starting Loop"<<std::endl;
+    m_tmpbufpos=0;
+    if (m_nevtmax==0)m_nevtmax=std::min(m_Nevents_BS,m_Nevents_NTUPFTK);
+    for (int ievent=1;ievent<=m_nevtmax;ievent++){
+       m_tmpbufpos =readBSevent( 1,m_tmpbufpos);  
+       int lengthdata=m_data.size();
+       uint32_t * data32=NULL;
+       data32=new uint32_t[lengthdata]; 
+       for(int ij=0; ij<lengthdata; ij++) {
+           data32[ij]=m_data[ij];
+       }
+       OFFLINE_FRAGMENTS_NAMESPACE::PointerType pdata=data32;
+       //event info are given to FullEventFragment
+       eformat::read::FullEventFragment fe(pdata);
+       std::vector< eformat::read::ROBFragment > ROBFragments_v;
+       if (m_verbose)std::cout<<"Run Number "<<fe.run_no()<<" Lvl1 "<<fe.lvl1_id()<<" BCID "<<fe.bc_id()<<std::endl;
+       fe.robs( ROBFragments_v );
+       FTK_RawTrackContainer* trkcontainer= new FTK_RawTrackContainer();
+       std::vector<const FTK_RawTrack *> ftkBSref;
+       int nrob=0;
+       int nTrks=0;
+       for(auto& ROBFragment : ROBFragments_v){
+           unsigned int niTrks=0;
+           eformat::helper::SourceIdentifier ROBSource_id = eformat::helper::SourceIdentifier( ROBFragment.source_id() );
+           if(ROBSource_id.subdetector_id() != eformat::TDAQ_FTK ){
+              continue;
+           }
+           const uint32_t *rod_data = ROBFragment.rod_data();
+           uint32_t rod_ndata = ROBFragment.rod_ndata();
+	   if( ( rod_ndata - trackBlockOffsetStart - trackBlockOffsetEnd ) % TrackBlobSize != 0 ){
+	      std::cout<<"Error: wrong size of rod"<<rod_ndata<<std::endl;
+	      continue;
+	   }
+           niTrks = ( rod_ndata - trackBlockOffsetStart - trackBlockOffsetEnd ) / TrackBlobSize;
+	   nTrks+=niTrks;
+           rod_data += trackBlockOffsetStart;            // moving data pointer to first track block
+	   if (m_verbose){
+	      std::cout<<"test of working rod l1 "<<ROBFragment.rod_lvl1_id()<<" ndata "<<rod_ndata<<std::endl;
+	   }
+	   // decoding the rod info into FTK track container
+           StatusCode sc;
+	   sc=decode(niTrks,rod_data, trkcontainer);
+	   if (!sc.isSuccess()) std::cout<<"ERROR!! decode function did not return success"<<std::endl;
+	   if (trkcontainer->size()==0) {
+               std::cout<<"no FTK tracks from BS file continue"<<std::endl;
+	       continue;
+	   }
+	   if (m_verbose){
+	      std::cout<<sc.isSuccess()<<std::endl;
+              std::cout<< "collection of size " << trkcontainer->size() << std::endl;
+	   }
+           for ( unsigned int i = 0 ; i < niTrks; ++i ) {
+	       ftkBSref.push_back(trkcontainer->at(i));
+	   }
+	   nrob+=1;	  
+       }
+       auto search = map_histo.find("nTrk_HW");
+       if(search != map_histo.end()) search->second->Fill(nTrks);
+       else  std::cout << "Not found "<<search->first<<std::endl;
+       if (nrob>1){std::cout<<"!!!!!!!!!!SOMETHING WRONG number of robs >1:"<<nrob<<std::endl;}
+       std::cout<<"Event "<<ievent<<" N tracks BS file "<<trkcontainer->size()<<std::endl;
+       // end reading info from BS file
+       //---------------------------------------------------------------------//
+       // start reading info from NTUP_FTK file
+       m_theTree->GetEvent(ievent-1); 
+       FTK_RawTrackContainer* trkcontainerNTUP= new FTK_RawTrackContainer();
+       std::vector<const FTK_RawTrack *> ftkNTUPtest;
+       int NTracksNTUP;
+       NTracksNTUP=m_ft->getNTracks();
+       auto search_SW = map_histo.find("nTrk_SW");
+       if(search_SW != map_histo.end()) search_SW->second->Fill(NTracksNTUP);
+       else  std::cout << "Not found "<<search_SW->first<<std::endl;
+       for(int it=0; it<NTracksNTUP;it++){
+         FTKTrack* ftktrk=m_ft->getTrack(it);
+         FTK_RawTrack* rawftktrk=new FTK_RawTrack();
+	 rawftktrk->setD0(ftktrk->getIP());
+	 rawftktrk->setZ0(ftktrk->getZ0());
+	 rawftktrk->setPhi(ftktrk->getPhi());
+	 rawftktrk->setCotTh(ftktrk->getCotTheta());
+	 rawftktrk->setInvPt(2*ftktrk->getHalfInvPt());
+	 rawftktrk->setChi2(ftktrk->getChi2());
+	 rawftktrk->setBarcode(ftktrk->getBarcode());
+	 trkcontainerNTUP->push_back(rawftktrk);
+         ftkNTUPtest.push_back(trkcontainerNTUP->at(it));
+       }
+       std::cout<<"Event "<<ievent<<" N tracks NTUP_FTK "<<trkcontainerNTUP->size()<<std::endl;
+       // end reading info from NTUP_FTK file
+       //---------------------------------------------------------------------//
+       // start comparing infos
+       m_tevtinfo->GetEntry(ievent-1);
+       if (NTracksNTUP!=nTrks){std::cout<<"different N tracks: "<<NTracksNTUP<<" "<<nTrks<<std::endl;m_allmatched=false;}
+       if (fe.run_no()!=(unsigned int)RN){std::cout<<"different RunNUmber: "<<fe.run_no()<<" "<<RN<<std::endl; m_allmatched=false;}
+       if (fe.bc_id()!=(unsigned int)BCID){std::cout<<"different BCID: "<<fe.bc_id()<<" "<<BCID<<std::endl;m_allmatched=false;}
+       // end comparing infos
+       //---------------------------------------------------------------------//
+       // start matching
+       for ( int i = 0 ; i < std::min((int) nTrks,NTracksNTUP); ++i ) {
+           if(trkcontainerNTUP->at(i)->getD0()!=0&&trkcontainerNTUP->at(i)->getZ0()!=0&&trkcontainerNTUP->at(i)->getInvPt()!=0&&
+	      trkcontainerNTUP->at(i)->getPhi()!=0&&trkcontainerNTUP->at(i)->getCotTh()!=0&&trkcontainerNTUP->at(i)->getChi2()!=0
+	      &&(
+	       fabs(trkcontainer->at(i)->getD0()/trkcontainerNTUP->at(i)->getD0()-1.)>0.001||
+               fabs(trkcontainer->at(i)->getZ0()/trkcontainerNTUP->at(i)->getZ0()-1.)>0.001||
+               fabs(trkcontainer->at(i)->getInvPt()/trkcontainerNTUP->at(i)->getInvPt()-1.)>0.001||
+               fabs(trkcontainer->at(i)->getPhi()/trkcontainerNTUP->at(i)->getPhi()-1.)>0.001||
+               fabs(trkcontainer->at(i)->getCotTh()/trkcontainerNTUP->at(i)->getCotTh()-1.)>0.001||
+               fabs(trkcontainer->at(i)->getChi2()/trkcontainerNTUP->at(i)->getChi2()-1.)>0.001)){
+		   if (m_verbose){
+		       std::cout<<"Difference in comparing trk "<<i<<std::endl;
+		       std::cout<<"\td0 : \t"<<trkcontainer->at(i)->getD0()<<"\t"<<trkcontainerNTUP->at(i)->getD0()<<std::endl;
+		       std::cout<<"\tz0 : \t"<<trkcontainer->at(i)->getZ0()<<"\t"<<trkcontainerNTUP->at(i)->getZ0()<<std::endl;
+		       std::cout<<"\tipt : \t"<<trkcontainer->at(i)->getInvPt()<<"\t"<<trkcontainerNTUP->at(i)->getInvPt()<<std::endl;
+		       std::cout<<"\tPhi : \t"<<trkcontainer->at(i)->getPhi()<<"\t"<<trkcontainerNTUP->at(i)->getPhi()<<std::endl;
+		       std::cout<<"\tCotTh : \t"<<trkcontainer->at(i)->getCotTh()<<"\t"<<trkcontainerNTUP->at(i)->getCotTh()<<std::endl;
+		       std::cout<<"\tChi2 : \t"<<trkcontainer->at(i)->getChi2()<<"\t"<<trkcontainerNTUP->at(i)->getChi2()<<std::endl;
+		   }    
+		   m_allmatched=false;
+               }
+	   else {if (i%std::min(nTrks,NTracksNTUP)==0 && m_allmatched){std::cout<<"Track Parameters btw BS_FTK and NTUP_FTK are the same: good!"<<std::endl;}}
+       }
+       m_compTrk= new CompareFTKTracks(ftkBSref,ftkNTUPtest, map_histo, map_histo_2D);
+       m_compTrk->AssociateTracks();
+       m_compTrk->FillHistos();
+       delete data32;
+     }
+}
+void CompareFTKEvents::WriteHistos(){
+    m_fout= new TFile("./out.histo.root","RECREATE");
+    m_fout->cd();
+    for(auto & imap : map_histo){
+        imap.second->Write();
+	if (m_setup_partition){
+	   try { m_ohProvider->publish( imap.second, imap.second->GetName(), true ); }
+	   catch ( daq::oh::Exception & ex)
+	   { // Raise a warning or throw an exception.
+	     std::cout<<"ERROR: OH provider error"<<std::endl;
+	     ers::warning(ex);  //or throw e; 
+	   }
+	}
+    }
+    for(auto & imap : map_histo_2D){
+        imap.second->Write();
+    }
+    m_fout->Write();
+    m_fout->Close();
+    std::cout<<"Histo written into file "<<m_fout->GetName()<<std::endl;
+}
+std::streampos CompareFTKEvents::readBSevent(int ievent,std::streampos startbufpos)
+{
+    if (m_verbose) std::cout<<"Reading BS event"<<std::endl;
+    m_data.clear();
+    uint32_t word;
+    int iil=0;
+    int nprocessedevents=0;
+    std::streampos lastpos;
+    if (m_verbose) std::cout<<"pointer position start"<<m_myBSfile.tellg()<<std::endl;
+    if (ievent ==1){
+       if (m_verbose) std::cout<<"going to buffer position "<<startbufpos<<std::endl;
+       m_myBSfile.seekg(startbufpos);
+    }
+    if (m_verbose) std::cout<<"starting reading words "<<startbufpos<<std::endl;
+    while(m_myBSfile.is_open())
+    {
+       if(m_myBSfile.eof()){  break; }
+       word=0;
+       m_myBSfile.read ((char*)&word, sizeof(word));
+       if (word==m_checkword) {
+	  nprocessedevents+=1;
+          if (m_verbose) std::cout<<"pointer position start event"<<m_myBSfile.tellg()<<std::endl;
+       }
+       if (nprocessedevents==ievent){ 
+          m_data.push_back(word);
+          iil++;
+	  lastpos=m_myBSfile.tellg();
+       }
+       else if (nprocessedevents>ievent) {
+          if (m_verbose) std::cout<<"pointer position end event "<<lastpos<<std::endl;
+          break;
+       }
+    }
+    if (m_verbose) std::cout<<"pointer position before closing"<<m_myBSfile.tellg()<<std::endl;
+    return lastpos;    
+}
+int CompareFTKEvents::GetNEventsBS()
+{
+    std::cout<<"Getting N events BS file"<<std::endl;
+    uint32_t word;
+    int nevents=0;
+    while(m_myBSfile.is_open())
+    {
+       if(m_myBSfile.eof()){ break; }
+       word=0;
+       m_myBSfile.read ((char*)&word, sizeof(word));
+       if (word==m_checkword) {
+	  nevents+=1;
+       }
+    }
+    m_myBSfile.clear();
+    m_myBSfile.seekg(0,std::ios::beg);
+    return nevents;    
+}
+void CompareFTKEvents::PrintFiles()
+{
+    std::cout<<"Print Input files"<<std::endl;
+    std::cout<<m_BSfile<<std::endl;
+    std::cout<<m_NTUP_FTK_file<<std::endl;    
+}
+CompareFTKEvents::~CompareFTKEvents()
+{
+    m_myBSfile.close();
+    if (m_allmatched) std::cout<<"====>Finished successfully: the two files contain the same infos"<<std::endl;
+    else std::cout<<"====>There was something different, check the printouts"<<std::endl;
+    
+}
diff --git a/Trigger/TrigFTK/FTKStandaloneMonitoring/src/CompareFTKTracks.cxx b/Trigger/TrigFTK/FTKStandaloneMonitoring/src/CompareFTKTracks.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..ea370c7e72d3ee733084299c55b956e2a1afef91
--- /dev/null
+++ b/Trigger/TrigFTK/FTKStandaloneMonitoring/src/CompareFTKTracks.cxx
@@ -0,0 +1,165 @@
+/*
+Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+#include "FTKStandaloneMonitoring/CompareFTKTracks.h"
+#include <iostream>
+#include <string>
+CompareFTKTracks::CompareFTKTracks(std::vector<const FTK_RawTrack *> &ref, std::vector<const FTK_RawTrack *> &test, std::map<std::string , TH1D * > &map_histo, std::map<std::string , TH2D * > &map_histo_2D){
+      m_ref=ref;
+      m_test=test;
+      m_map_histo=map_histo;
+      m_map_histo_2D=map_histo_2D;
+}
+void CompareFTKTracks::AssociateTracks(){
+      m_associator= new FTKTrkAssoc("FTKTrkAssoc", m_dmax);
+      m_associator->match( m_ref,m_test);
+      std::cout<<"Of N ref trks ("<<m_ref.size()<<") wrt to test trk ("<<m_test.size()<<"), number of matched trks: "<<m_associator->size()<<std::endl;
+}
+
+void CompareFTKTracks::TestEquivalence(){
+      const FTK_RawTrack* match_track = NULL;
+      int itrk=0;
+      for(auto& ref_track : m_ref){
+         itrk+=1;
+         match_track = m_associator->matched(ref_track);
+	 if (!match_track) {std::cout<<"the "<<itrk<<"-th track has no matched track"<<std::endl; continue;}
+	 if (ref_track->getPhi()!=0&&fabs(match_track->getPhi()/ref_track->getPhi()-1.)>0.001){	    
+      	    std::cout<<"Wrong matching: Phi matched "<<match_track->getPhi()<<" ref "<<ref_track->getPhi()<<std::endl;
+	    m_allmatched=false;
+	 }
+      }
+      if (m_allmatched) std::cout<<"CompareFTKTracks: All matched tracks had the same phi"<<std::endl;
+      else std::cout<<"CompareFTKTracks: Some matched tracks had different phi"<<std::endl;
+}
+double CompareFTKTracks::GetValue(std::string & variable, const FTK_RawTrack  *tmptrk){
+     double outvar=0.;
+     if (variable.find("pt")!=std::string::npos)        {outvar= 1./tmptrk->getInvPt();}
+     else if (variable.find("d0")!=std::string::npos)   {outvar= tmptrk->getD0();}
+     else if (variable.find("z0")!=std::string::npos)   {outvar= tmptrk->getZ0();}
+     else if (variable.find("chi2")!=std::string::npos) {outvar= tmptrk->getChi2();}
+     else if (variable.find("phi")!=std::string::npos)  {outvar= tmptrk->getPhi();}
+     else if (variable.find("eta")!=std::string::npos)  {outvar= TMath::ASinH(tmptrk->getCotTh());}
+     else std::cout<<"variable not found!! "<<variable<<std::endl;
+     return outvar;
+}
+void CompareFTKTracks::FillHistos(){
+      const FTK_RawTrack* match_track = NULL;
+      int itrk=0;
+      int HWSWmatched=0;
+      int HWSWdifferent=0;
+      int HWonly=0;
+      int SWonly=0;
+      for(auto& test_track : m_test){
+          match_track = m_associator->revmatched(test_track);
+	  if (!match_track) {
+	     std::cout<<"the "<<itrk<<"-th SW track has no matched track"<<std::endl; 
+             for (auto& imap : m_map_histo){
+	         if (imap.first.find("SWonly")==std::string::npos) continue;
+		 std::size_t pos = imap.first.find("_");      
+        	 std::string istr = imap.first.substr (pos+1);		 
+                 imap.second->Fill(GetValue(istr,test_track));
+	     } 
+             for (auto& imap : m_map_histo_2D){
+		 std::size_t pos = imap.first.find("_");      
+        	 std::string istr = imap.first.substr (pos+1);		 
+	         if (imap.first.find("SWonly")==std::string::npos) continue;
+		 if (istr.find("ETA_PHI")!=std::string::npos) {		     
+		     std::string etastr("eta");
+		     std::string phistr("phi");
+		     imap.second->Fill(GetValue(etastr,test_track),GetValue(phistr,test_track));
+		 }    
+             }
+	     SWonly+=1;	      
+	  }    
+      }  
+      for(auto& ref_track : m_ref){
+         itrk+=1;
+         match_track = m_associator->matched(ref_track);
+	 //no SW matched track
+	 if (!match_track) {
+	     std::cout<<"the "<<itrk<<"-th HW track has no matched track"<<std::endl; 
+             for (auto& imap : m_map_histo){
+	         if (imap.first.find("HWonly")==std::string::npos) continue;
+		 std::size_t pos = imap.first.find("_");      
+        	 std::string istr = imap.first.substr (pos+1);		 
+                 imap.second->Fill(GetValue(istr,ref_track));
+	     } 
+             for (auto& imap : m_map_histo_2D){
+		 std::size_t pos = imap.first.find("_");      
+        	 std::string istr = imap.first.substr (pos+1);		 
+	         if (imap.first.find("HWonly")==std::string::npos) continue;
+		 if (istr.find("ETA_PHI")!=std::string::npos) {		     
+		     std::string etastr("eta");
+		     std::string phistr("phi");
+		     imap.second->Fill(GetValue(etastr,ref_track),GetValue(phistr,ref_track));
+		 }    
+             }
+	     HWonly+=1;
+	 }
+	 //completely matched tracks    
+	 else if (!(
+	      (ref_track->getPhi()!=0&&fabs(match_track->getPhi()/ref_track->getPhi()-1.)>0.001)||
+	      (ref_track->getInvPt()!=0&&fabs(match_track->getInvPt()/ref_track->getInvPt()-1.)>0.001)||
+	      (ref_track->getD0()!=0&&fabs(match_track->getD0()/ref_track->getD0()-1.)>0.001)||
+	      (ref_track->getZ0()!=0&&fabs(match_track->getZ0()/ref_track->getZ0()-1.)>0.001)||
+	      (ref_track->getChi2()!=0&&fabs(match_track->getChi2()/ref_track->getChi2()-1.)>0.001)||
+	      (ref_track->getCotTh()!=0&&fabs(match_track->getCotTh()/ref_track->getCotTh()-1.)>0.001)
+	      )
+	     ){	     
+             for (auto& imap : m_map_histo){
+	         if (imap.first.find("HWSW")==std::string::npos) continue;
+		 std::size_t pos = imap.first.find("_");      
+        	 std::string istr = imap.first.substr (pos+1);		 
+                 imap.second->Fill(GetValue(istr,match_track));
+	     } 
+             for (auto& imap : m_map_histo_2D){
+		std::size_t pos = imap.first.find("_");      
+        	std::string istr = imap.first.substr (pos+1);
+	         if (imap.first.find("HWSW")==std::string::npos) continue;
+		 if (istr.find("ETA_PHI")!=std::string::npos) {		     
+		     std::string etastr("eta");
+		     std::string phistr("phi");
+		     imap.second->Fill(GetValue(etastr,match_track),GetValue(phistr,match_track));
+		 }    
+             }
+             
+	     HWSWmatched+=1;
+	 }
+	 //not matched tracks
+	 else{
+	     for (auto& imap : m_map_histo){
+	        if (imap.first.find("HWvsSW")==std::string::npos && imap.first.find("res")==std::string::npos) continue;
+		std::size_t pos = imap.first.find("_");      
+        	std::string istr = imap.first.substr (pos+1);
+		double refval,testval;
+		refval=GetValue(istr,ref_track);
+		testval=GetValue(istr,match_track);
+		if (imap.first.find("res")!=std::string::npos) {
+                    imap.second->Fill( (testval-refval)/(refval));
+        	}
+		else if (imap.first.find("HWvsSWdiff")!=std::string::npos) {
+                    imap.second->Fill( (testval-refval));
+        	}
+		else if (imap.first.find("HWvsSWsw")!=std::string::npos) {
+                    imap.second->Fill( testval);
+        	}
+		else if (imap.first.find("HWvsSWhw")!=std::string::npos) {
+                    imap.second->Fill( refval);
+        	}
+             }
+	     auto search_h2HW = m_map_histo_2D.find("HWvsSWhw_ETA_PHI");
+	     std::string etastr("eta");
+	     std::string phistr("phi");
+	     if(search_h2HW != m_map_histo_2D.end()) search_h2HW->second->Fill(GetValue(etastr,ref_track),GetValue(phistr,ref_track));
+	     else  std::cout << "Not found "<<search_h2HW->first<<std::endl;
+	     auto search_h2SW = m_map_histo_2D.find("HWvsSWsw_ETA_PHI");
+	     if(search_h2SW != m_map_histo_2D.end()) search_h2SW->second->Fill(GetValue(etastr,match_track),GetValue(phistr,match_track));
+	     else  std::cout << "Not found "<<search_h2SW->first<<std::endl;
+	     HWSWdifferent+=1;
+	 }   
+      }
+      m_map_histo["nTrk_only_sw"]->Fill(SWonly); 
+      m_map_histo["nTrk_only_hw"]->Fill(HWonly); 
+      m_map_histo["nTrk_different_hw_sw"]->Fill(HWSWdifferent); 
+      m_map_histo["nTrk_same_hw_sw"]->Fill(HWSWmatched); 
+}
diff --git a/Trigger/TrigFTK/FTKStandaloneMonitoring/test/MonitoringComparison.cxx b/Trigger/TrigFTK/FTKStandaloneMonitoring/test/MonitoringComparison.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..a5be33bfdb96aaa0595f55259874e094a4b41534
--- /dev/null
+++ b/Trigger/TrigFTK/FTKStandaloneMonitoring/test/MonitoringComparison.cxx
@@ -0,0 +1,171 @@
+/*
+Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+#include <iostream>
+#include <fstream>
+
+#include <getopt.h>
+
+#include "TrigFTK_RawData/FTK_RawTrackContainer.h"
+#include "TTree.h"
+#include "TFile.h"
+#include "TCanvas.h"
+#include "TFrame.h"
+#include "TH1F.h"
+#include "TBenchmark.h"
+#include "TRandom.h"
+#include "TSystem.h"
+#include "TrigFTKSim/FTKTrackStream.h"
+#include "FTKStandaloneMonitoring/FTKTrkAssoc.h"
+#include "FTKStandaloneMonitoring/CompareFTKEvents.h"
+#include <ipc/core.h>
+
+using namespace std;
+
+#ifndef TRUE
+  #define TRUE                  0x01
+#endif
+
+#ifndef FALSE
+  #define FALSE                 0x00
+#endif
+
+#define BUFSIZE  (4*1024)
+
+// Globals
+int verbose = FALSE;
+int readfile = FALSE;
+char filename[200] = {0};
+
+
+
+/**************/
+void usage(void)
+/**************/
+{
+  std::cout << "Valid options are ..." << std::endl;
+  std::cout << "-f x: Read BS_FTK data from file. The parameter is the path and the name of the file" << std::endl;
+  std::cout << "-n x: Read NTUP_FTK data from file. The parameter is the path and the name of the file" << std::endl;
+  std::cout << "-m x: maximum number of events" << std::endl;
+  std::cout << "-v  : Verbose output                               -> Default: FALSE" << std::endl;
+  std::cout << "-p x: partition name" << std::endl;
+  std::cout << "-s  : not to initialize a partition" << std::endl;
+  std::cout << std::endl;
+}
+
+
+
+/*****************************/
+int main(int argc, char **argv)
+/*****************************/
+{
+
+  std::string  partition_name="";
+  //default files
+  std::string inputfilenameBS= "/afs/cern.ch/user/g/giulini/workdir/public/FTKcomparison/compareInputs/OUT.BS_FTK.root";
+  std::string inputfilenameNTUPFTK= "/afs/cern.ch/user/g/giulini/workdir/public/FTKcomparison/compareInputs/OUT.NTUP_FTK.root";
+  //evtinfo TTree NTUP_FTK
+  int c;
+  int evtmax=0;
+  bool setup_partition=true;
+  static struct option long_options[] = {"DVS", no_argument, NULL, '1'}; 
+  while ((c = getopt_long(argc, argv, "f:n:m:p:svh", long_options, NULL)) != -1)
+    switch (c) 
+    {
+    case 'h':
+      std::cout << "Usage: " << argv[0] << " [options]: "<< std::endl;
+      usage();
+      exit(-1);
+      break;
+
+    case 'f':   
+      readfile = TRUE;
+      sscanf(optarg,"%s", filename);
+      inputfilenameBS.clear();
+      inputfilenameBS.append(filename);
+      std::cout << "read BS_FTK data from file: " << std::endl<< inputfilenameBS<< std::endl << std::endl;
+      break;
+
+    case 'n':   
+      readfile = TRUE;
+      sscanf(optarg,"%s", filename);
+      inputfilenameNTUPFTK.clear();
+      inputfilenameNTUPFTK.append(filename);
+      std::cout << "read NTUP_FTK data from file: "<< std::endl << inputfilenameNTUPFTK<< std::endl << std::endl;
+      break;
+      
+    case 'p':   
+      sscanf(optarg,"%s", filename);
+      partition_name.clear();
+      partition_name.append(filename);
+      std::cout << "parition name: " << std::endl<< partition_name<< std::endl << std::endl;
+      break;
+      
+    case 'm':   
+      sscanf(optarg,"%d", &evtmax);
+      std::cout << "maximum number of events: "<< evtmax << std::endl << std::endl;
+      break;
+      
+    case 's': setup_partition = false;  break;
+
+    case 'v': verbose = TRUE;  break;
+
+
+    default:
+      std::cout << "Invalid option " << c << std::endl;
+      std::cout << "Usage: " << argv[0] << " [options]: " << std::endl;
+      usage();
+      exit (-1);
+    }
+  ;
+
+  try {
+     IPCCore::init( argc, argv );
+  }
+  catch( daq::ipc::Exception & ex ) {
+      //something went very bad, report and exit
+      std::cout<<"ERROR: IPCCore could not be initialised"<<std::endl;
+      return 1;
+  }
+
+  // initialization of the class to compare FTK events of HW (BS_FTK) and SW (NTUP_FTK)
+  CompareFTKEvents *comparison= new CompareFTKEvents(inputfilenameBS,inputfilenameNTUPFTK);
+  if (setup_partition) comparison->SetupPartition(partition_name);
+  if (verbose) comparison->SetVerbose();  
+  if (evtmax!=0)    comparison->SetNEvents(evtmax);
+  // create list of histograms to be published on oh
+  std::vector<std::string> variable_list={"pt","eta","phi","d0","z0","chi2","ETA_PHI"};//  
+  std::vector<std::string> histo_list;
+  for (auto & istr: variable_list){
+      std::stringstream ss;
+      ss << "HWSW_" << istr; // labels for FTK tracks completely matched (= same track parameters) btw HW and SW
+      std::stringstream ss2;
+      ss2 << "HWonly_" << istr; // labels for HW FTK tracks not matched to any SW track
+      std::stringstream ss3;
+      ss3 << "SWonly_" << istr; // labels for SW FTK tracks not matched to any HW track
+      std::stringstream ss4;
+      ss4 << "HWvsSWhw_" << istr; // labels for HW FTK tracks geometrically matched to SW tracks but with different track parameters
+      std::stringstream ss5;
+      ss5 << "HWvsSWsw_" << istr; // labels for SW FTK tracks geometrically matched to HW tracks but with different track parameters
+      histo_list.push_back(ss.str());
+      histo_list.push_back(ss2.str());
+      histo_list.push_back(ss3.str());
+      histo_list.push_back(ss4.str());
+      histo_list.push_back(ss5.str());
+      if (istr!="ETA_PHI"){
+          std::stringstream ss6;
+          ss6 << "HWvsSWdiff_" << istr; // resolution distributions for FTK tracks matched btw HW and SW but with different track parameters
+          histo_list.push_back(ss6.str());
+      }
+  }
+  histo_list.push_back("nTrk_same_hw_sw");
+  histo_list.push_back("nTrk_different_hw_sw");
+  histo_list.push_back("nTrk_only_hw");
+  histo_list.push_back("nTrk_only_sw");
+  histo_list.push_back("nTrk_HW");
+  histo_list.push_back("nTrk_SW");
+  comparison->SetHistos(histo_list);
+  comparison->Execute();      
+  return 0;
+}
+
diff --git a/Trigger/TrigFTK/FTK_DataProviderInterfaces/FTK_DataProviderInterfaces/IFTK_DataProviderSvc.h b/Trigger/TrigFTK/FTK_DataProviderInterfaces/FTK_DataProviderInterfaces/IFTK_DataProviderSvc.h
index 201a4323693efda8f4e06c86ae38d9e6d4cbdfe0..4db70748e782edd1724eeb31a0da7b74020bc612 100644
--- a/Trigger/TrigFTK/FTK_DataProviderInterfaces/FTK_DataProviderInterfaces/IFTK_DataProviderSvc.h
+++ b/Trigger/TrigFTK/FTK_DataProviderInterfaces/FTK_DataProviderInterfaces/IFTK_DataProviderSvc.h
@@ -43,10 +43,15 @@ public:
   static const InterfaceID& interfaceID() { return IID_IFTK_DataProviderSvc; }
   
   virtual TrackCollection* getTracks(const bool withRefit) = 0;
+  virtual TrackCollection* getTracks(const bool withRefit, unsigned int& nErrors) = 0;
+
   virtual TrackCollection* getTracksInRoi(const IRoiDescriptor&, const bool withRefit) = 0;
+  virtual TrackCollection* getTracksInRoi(const IRoiDescriptor&, const bool withRefit, unsigned int& nErrors) = 0;
 
   virtual xAOD::TrackParticleContainer* getTrackParticles(const bool withRefit) = 0;
+  virtual xAOD::TrackParticleContainer* getTrackParticles(const bool withRefit, unsigned int& nErrors) = 0;
   virtual xAOD::TrackParticleContainer* getTrackParticlesInRoi(const IRoiDescriptor&, const bool withRefit) = 0;
+  virtual xAOD::TrackParticleContainer* getTrackParticlesInRoi(const IRoiDescriptor&, const bool withRefit, unsigned int& nErrors) = 0;
 
   virtual xAOD::VertexContainer* getFastVertices(const ftk::FTK_TrackType trackType=ftk::RawTrack) =0;
 
@@ -64,6 +69,18 @@ public:
 
   virtual std::string getFastVertexCacheName(const bool withRefit)=0;
 
+  virtual std::vector<unsigned int> nMissingSCTClusters()=0;
+  virtual std::vector<unsigned int> nMissingPixelClusters()=0;
+  virtual std::vector<unsigned int> nFailedSCTClusters()=0;
+  virtual std::vector<unsigned int> nFailedPixelClusters()=0;
+
+  virtual unsigned int nRawTracks()=0;
+  virtual unsigned int nTracks(const bool withRefit)=0;
+  virtual unsigned int nTrackParticles(const bool withRefit)=0;
+  virtual unsigned int nTrackErrors(const bool withRefit)=0;
+  virtual unsigned int nTrackParticleErrors(const bool withRefit)=0;
+ 
+
 };
 
 #endif
diff --git a/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_DataProviderSvc.h b/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_DataProviderSvc.h
index 8bc315c3c9d040c64ec922ff68fd084e0ec9a0f4..bb4bdffa1f9e0e6fe3ed806ddbe35ec721d5dc9d 100644
--- a/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_DataProviderSvc.h
+++ b/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_DataProviderSvc.h
@@ -86,9 +86,16 @@ class FTK_DataProviderSvc : public virtual IFTK_DataProviderSvc, virtual public
  virtual StatusCode initialize();
  virtual StatusCode finalize();
  virtual TrackCollection* getTracksInRoi(const IRoiDescriptor&, const bool withRefit);
+ virtual TrackCollection* getTracksInRoi(const IRoiDescriptor&, const bool withRefit, unsigned int& nErrors);
+
  virtual TrackCollection* getTracks(const bool withRefit);
+ virtual TrackCollection* getTracks(const bool withRefit,unsigned int& nErrors);
+
  virtual xAOD::TrackParticleContainer* getTrackParticles(const bool withRefit);
+ virtual xAOD::TrackParticleContainer* getTrackParticles(const bool withRefit, unsigned int& nErrors);
+
  virtual xAOD::TrackParticleContainer* getTrackParticlesInRoi(const IRoiDescriptor&, const bool withRefit);
+ virtual xAOD::TrackParticleContainer* getTrackParticlesInRoi(const IRoiDescriptor&, const bool withRefit, unsigned int& nErrors);
 
  virtual  xAOD::VertexContainer* getFastVertices(const ftk::FTK_TrackType trackType=ftk::RawTrack);
  
@@ -106,6 +113,20 @@ class FTK_DataProviderSvc : public virtual IFTK_DataProviderSvc, virtual public
 
  virtual void handle( const Incident &incident );
 
+ virtual unsigned int nRawTracks();
+ virtual unsigned int nTracks(const bool withRefit);
+ virtual unsigned int nTrackParticles(const bool withRefit);
+ virtual unsigned int nTrackErrors(const bool withRefit);
+ virtual unsigned int nTrackParticleErrors(const bool withRefit);
+ 
+ virtual std::vector<unsigned int> nMissingSCTClusters();
+ virtual std::vector<unsigned int> nMissingPixelClusters();
+ virtual std::vector<unsigned int> nFailedSCTClusters();
+ virtual std::vector<unsigned int> nFailedPixelClusters();
+ 
+
+ private:
+
  void getFTK_RawTracksFromSG();
  Trk::Track* ConvertTrack(const unsigned int track);
  Trk::Track* getCachedTrack(const unsigned int track, const bool do_refit);
@@ -114,13 +135,8 @@ class FTK_DataProviderSvc : public virtual IFTK_DataProviderSvc, virtual public
  StatusCode fillTrackCache(bool do_refit);
  StatusCode fillTrackParticleCache(const bool withRefit);
 
-
-
  bool fillVertexContainerCache(bool withRefit, xAOD::TrackParticleContainer*);
 
-
- protected:
-
  
  const Trk::RIO_OnTrack* createPixelCluster(const FTK_RawPixelCluster& raw_pixel_cluster,  const Trk::TrackParameters& trkPerigee);
  const Trk::RIO_OnTrack* createSCT_Cluster( const FTK_RawSCT_Cluster& raw_sct_cluster, const Trk::TrackParameters& trkPerigee);
@@ -241,6 +257,12 @@ class FTK_DataProviderSvc : public virtual IFTK_DataProviderSvc, virtual public
   std::vector<float>  m_pixelEndCapPhiOffsets;
   std::vector<float> m_pixelEndCapEtaOffsets;
 
+  unsigned int  m_nErrors;
+  std::vector<unsigned int> m_nFailedSCTClusters;
+  std::vector<unsigned int> m_nFailedPixelClusters;
+  std::vector<unsigned int> m_nMissingSCTClusters;
+  std::vector<unsigned int> m_nMissingPixelClusters;
+
 };
 
 inline bool compareFTK_Clusters (const Trk::RIO_OnTrack* cl1, const Trk::RIO_OnTrack* cl2) {
diff --git a/Trigger/TrigFTK/FTK_DataProviderSvc/src/FTK_DataProviderSvc.cxx b/Trigger/TrigFTK/FTK_DataProviderSvc/src/FTK_DataProviderSvc.cxx
index 51523f917cc61ca8672f9da20b5063a955294b72..46d3a13a98a4ea447b59af9fcad5b5d72d45309b 100644
--- a/Trigger/TrigFTK/FTK_DataProviderSvc/src/FTK_DataProviderSvc.cxx
+++ b/Trigger/TrigFTK/FTK_DataProviderSvc/src/FTK_DataProviderSvc.cxx
@@ -147,7 +147,8 @@ FTK_DataProviderSvc::FTK_DataProviderSvc(const std::string& name, ISvcLocator* s
   m_pTscaleFactor(1.),
   m_rejectBadTracks(false),
   m_dPhiCut(0.4),
-  m_dEtaCut(0.6)
+  m_dEtaCut(0.6),
+  m_nErrors(0)
 {
   m_pixelBarrelPhiOffsets.reserve(4);
   m_pixelBarrelEtaOffsets.reserve(4);
@@ -161,6 +162,19 @@ FTK_DataProviderSvc::FTK_DataProviderSvc(const std::string& name, ISvcLocator* s
     m_pixelEndCapPhiOffsets.push_back(0.); 
     m_pixelEndCapEtaOffsets.push_back(0.);
   }
+  m_nFailedSCTClusters.reserve(8);
+  m_nMissingSCTClusters.reserve(8);
+  m_nFailedPixelClusters.reserve(4);
+  m_nMissingPixelClusters.reserve(4);
+  for (int ie=0; ie<4; ie++){
+    m_nFailedPixelClusters.push_back(0);
+    m_nMissingPixelClusters.push_back(0);
+  }
+  for (int ie=0; ie<8; ie++){
+    m_nFailedSCTClusters.push_back(0);
+    m_nMissingSCTClusters.push_back(0);
+  }
+
   declareProperty("TrackCollectionName",m_trackCacheName);
   declareProperty("TrackParticleContainerName",m_trackParticleCacheName);
   declareProperty("VertexContainerName",m_vertexCacheName);
@@ -203,6 +217,23 @@ FTK_DataProviderSvc::~FTK_DataProviderSvc(){
 }
 
 
+std::vector<unsigned int> FTK_DataProviderSvc::nMissingSCTClusters() {
+  return m_nMissingSCTClusters;
+}
+
+std::vector<unsigned int> FTK_DataProviderSvc::nMissingPixelClusters() {
+  return m_nMissingPixelClusters;
+}
+
+std::vector<unsigned int> FTK_DataProviderSvc::nFailedSCTClusters() {
+  return m_nFailedSCTClusters;
+}
+
+std::vector<unsigned int> FTK_DataProviderSvc::nFailedPixelClusters() {
+  return m_nFailedPixelClusters;
+}
+
+
 std::string FTK_DataProviderSvc::getTrackParticleCacheName(const bool withRefit) {
   return (withRefit? m_trackParticleCacheName+"Refit": m_trackParticleCacheName);
 }
@@ -289,6 +320,81 @@ StatusCode FTK_DataProviderSvc::finalize() {
 }
 
 
+unsigned int FTK_DataProviderSvc::nTrackParticleErrors(const bool withRefit) {
+
+  unsigned int nErrors=0;
+
+  if (withRefit) {
+    for (auto& it : m_refit_tp_map) 
+      if (it==-2) nErrors++;
+  } else {
+    for (auto& it : m_conv_tp_map) 
+      if (it==-2) nErrors++;
+  }    
+  return nErrors;
+
+}
+
+
+unsigned int FTK_DataProviderSvc::nRawTracks() {
+  if (!m_gotRawTracks) getFTK_RawTracksFromSG();
+  return m_ftk_tracks->size();
+}
+
+
+unsigned int FTK_DataProviderSvc::nTracks(const bool withRefit) {
+
+  unsigned int nTrk=0;
+
+  if (withRefit) {
+    for (auto& it : m_refit_track_map) 
+      if (it>=0) nTrk++;
+  } else {
+    for (auto& it : m_conv_track_map) 
+      if (it>=0) nTrk++;
+  }    
+  return nTrk;
+
+}
+
+unsigned int FTK_DataProviderSvc::nTrackParticles(const bool withRefit) {
+
+  unsigned int nTrk=0;
+
+  if (withRefit) {
+    for (auto& it : m_refit_tp_map) 
+      if (it>=0) nTrk++;
+  } else {
+    for (auto& it : m_conv_tp_map) 
+      if (it>=0) nTrk++;
+  }    
+  return nTrk;
+
+}
+
+unsigned int FTK_DataProviderSvc::nTrackErrors(const bool withRefit) {
+
+  unsigned int nErrors=0;
+
+  if (withRefit) {
+    for (auto& it : m_refit_track_map) 
+      if (it==-2) nErrors++;
+  } else {
+    for (auto& it : m_conv_track_map) 
+      if (it==-2) nErrors++;
+  }    
+  return nErrors;
+
+}
+
+
+xAOD::TrackParticleContainer* FTK_DataProviderSvc::getTrackParticlesInRoi(const IRoiDescriptor& roi, const bool withRefit, unsigned int& nErrors){
+  m_nErrors=0;
+  xAOD::TrackParticleContainer* tracks = this->getTrackParticlesInRoi(roi, withRefit);
+  nErrors = m_nErrors;
+  return tracks;
+}
+
 xAOD::TrackParticleContainer* FTK_DataProviderSvc::getTrackParticlesInRoi(const IRoiDescriptor& roi, const bool withRefit){
 
   ATH_MSG_DEBUG("FTK_DataProviderSvc::getTrackParticlesInRoi called with Refit " << withRefit);
@@ -336,10 +442,12 @@ xAOD::TrackParticleContainer* FTK_DataProviderSvc::getTrackParticlesInRoi(const
             } else { //trackLink not valid
               ATH_MSG_ERROR ("invalid ElementLink to m_refit_track_map["<<ftk_track_index<<"] = " << m_refit_track_map[ftk_track_index]);
               m_refit_tp_map[ftk_track_index]=-2;
+	      m_nErrors++;
             }
           } else { // track==nullptr
             ATH_MSG_VERBOSE("Setting m_refit_tp_map["<<  ftk_track_index <<"]=-2");
             m_refit_tp_map[ftk_track_index]=-2;
+	    m_nErrors++;
           }
         }
       }
@@ -376,11 +484,13 @@ xAOD::TrackParticleContainer* FTK_DataProviderSvc::getTrackParticlesInRoi(const
               } else {
                 ATH_MSG_ERROR ("invalid ElementLink to m_refit_conv_map["<<ftk_track_index<<"] = " <<m_conv_track_map[ftk_track_index]);
                 m_refit_tp_map[ftk_track_index]=-2;
+		m_nErrors++;
               }
             }
           } else { // track==nullptr
             ATH_MSG_VERBOSE("Setting m_conv_tp_map["<<  ftk_track_index <<"]=-2");
             m_conv_tp_map[ftk_track_index] = -2;
+	    m_nErrors++;
           }
         }
       }
@@ -475,6 +585,17 @@ StatusCode FTK_DataProviderSvc::fillTrackParticleCache(const bool withRefit){
   return  StatusCode::SUCCESS;
 }
 
+
+xAOD::TrackParticleContainer* FTK_DataProviderSvc::getTrackParticles(const bool withRefit, unsigned int& nErrors){
+
+  // Return TrackParticleCollection plus number of missing tracks du to errors 
+
+  m_nErrors=0;
+  xAOD::TrackParticleContainer* tracks=this->getTrackParticles(withRefit);
+  nErrors=m_nErrors;
+  return tracks;
+}
+
 xAOD::TrackParticleContainer* FTK_DataProviderSvc::getTrackParticles(const bool withRefit){
 
 #ifdef  FTK_useViewVector
@@ -823,6 +944,14 @@ StatusCode FTK_DataProviderSvc::getVertexContainer(xAOD::VertexContainer* userVe
 }
 
 
+
+TrackCollection* FTK_DataProviderSvc::getTracks(const bool withRefit, unsigned int& nErrors){
+  m_nErrors=0;
+  TrackCollection* tracks = this->getTracks(withRefit);
+  nErrors=m_nErrors;
+  return tracks;
+}
+
 TrackCollection* FTK_DataProviderSvc::getTracks(const bool withRefit){
 
 #ifdef  FTK_useViewVector
@@ -842,7 +971,6 @@ TrackCollection* FTK_DataProviderSvc::getTracks(const bool withRefit){
   ATH_MSG_DEBUG( "getTracks: Raw FTK Container Size = " << m_ftk_tracks->size());
   ATH_MSG_VERBOSE( "getTracks: Converting Tracks");
   for (unsigned int ftk_track_index = 0; ftk_track_index != m_ftk_tracks->size(); ++ftk_track_index){
-
     Trk::Track* track = this->getCachedTrack(ftk_track_index, withRefit);
     if (track != nullptr) userTracks->push_back(track);
   }
@@ -856,6 +984,13 @@ TrackCollection* FTK_DataProviderSvc::getTracks(const bool withRefit){
 
 }
 
+TrackCollection* FTK_DataProviderSvc::getTracksInRoi(const IRoiDescriptor& roi, const bool withRefit, unsigned int& nErrors){
+  m_nErrors=0;
+  TrackCollection* tracks = this->getTracksInRoi(roi,withRefit);
+  nErrors=m_nErrors;
+  return tracks;
+}
+
 TrackCollection* FTK_DataProviderSvc::getTracksInRoi(const IRoiDescriptor& roi, const bool withRefit){
 
 #ifdef  FTK_useViewVector
@@ -882,7 +1017,12 @@ TrackCollection* FTK_DataProviderSvc::getTracksInRoi(const IRoiDescriptor& roi,
     if (roi.isFullscan() || (RoiUtil::containsPhi(roi,ftk_track->getPhi()) && RoiUtil::contains(roi,ftk_track->getZ0(), ftk_track->getCotTh()))) {
     //if (roi.isFullscan() || (roi.containsPhi(ftk_track->getPhi()) && roi.contains(ftk_track->getZ0(), ftk_track->getCotTh()))) {
       Trk::Track* track = this->getCachedTrack(ftk_track_index, withRefit);
-      if (track != nullptr) userTracks->push_back(track);
+      if (track != nullptr) {
+	userTracks->push_back(track);
+      } else {
+	m_nErrors++;
+      } 
+
     }
   }
   if (withRefit) {
@@ -1271,6 +1411,7 @@ Trk::Track* FTK_DataProviderSvc::ConvertTrack(const unsigned int iTrack){
     if ( track.isMissingPixelLayer(cluster_number)) {
 
       ATH_MSG_VERBOSE( " No hit for layer " << cluster_number);
+      m_nMissingPixelClusters[cluster_number]++;
       continue;
     }
     if (raw_pixel_cluster.getModuleID()==0){
@@ -1280,6 +1421,7 @@ Trk::Track* FTK_DataProviderSvc::ConvertTrack(const unsigned int iTrack){
     const Trk::RIO_OnTrack* pixel_cluster_on_track = createPixelCluster(raw_pixel_cluster,*trkPerigee);
     if (pixel_cluster_on_track==nullptr){
       ATH_MSG_WARNING(" PixelClusterOnTrack failed to create cluster " << cluster_number);
+      m_nFailedPixelClusters[cluster_number]++;
     } else {
 
       clusters.push_back(pixel_cluster_on_track);
@@ -1306,6 +1448,7 @@ Trk::Track* FTK_DataProviderSvc::ConvertTrack(const unsigned int iTrack){
     FTK_RawSCT_Cluster raw_cluster = track.getSCTCluster(cluster_number);
     if ( track.isMissingSCTLayer(cluster_number)) {
       ATH_MSG_VERBOSE( "  No SCT Hit for layer "  << cluster_number);
+      m_nMissingSCTClusters[cluster_number]++;
       continue;
     }
     const Trk::RIO_OnTrack* sct_cluster_on_track = createSCT_Cluster(raw_cluster, *trkPerigee);
@@ -1313,6 +1456,7 @@ Trk::Track* FTK_DataProviderSvc::ConvertTrack(const unsigned int iTrack){
 	
     if (sct_cluster_on_track==nullptr){
       ATH_MSG_WARNING(" SCT_ClusterOnTrack failed to create cluster " <<  cluster_number);
+      m_nFailedSCTClusters[cluster_number]++;
     } else {
       
       ATH_MSG_VERBOSE( cluster_number << ": r= " << std::sqrt(std::pow(sct_cluster_on_track->globalPosition().x(),2)+std::pow(sct_cluster_on_track->globalPosition().y(),2))
@@ -1605,7 +1749,7 @@ const Trk::RIO_OnTrack*  FTK_DataProviderSvc::createPixelCluster(const FTK_RawPi
 
   ATH_MSG_VERBOSE( "FTK_DataProviderSvc::createPixelCluster: raw FTK cluster position: " <<
       " Row(phi): " <<  raw_pixel_cluster.getRowCoord() << " Col(eta): " << raw_pixel_cluster.getColCoord() <<
-      " RowWidth: " << raw_pixel_cluster.getRowWidth()+1 << " ColWidth: " << raw_pixel_cluster.getColWidth()+1);
+      " RowWidth: " << raw_pixel_cluster.getRowWidth() << " ColWidth: " << raw_pixel_cluster.getColWidth());
 
   unsigned int layer = m_pixelId->layer_disk(wafer_id);
   bool isBarrel = (m_pixelId->barrel_ec(wafer_id)==0);
@@ -1677,8 +1821,8 @@ const Trk::RIO_OnTrack*  FTK_DataProviderSvc::createPixelCluster(const FTK_RawPi
   Identifier pixel_id = m_pixelId->pixel_id(wafer_id, phi_index, eta_index);
 
 
-  int phiWidth    = raw_pixel_cluster.getRowWidth();
-  int etaWidth    = raw_pixel_cluster.getColWidth();
+  int phiWidth    = std::max(raw_pixel_cluster.getRowWidth(),1u);
+  int etaWidth    = std::max(raw_pixel_cluster.getColWidth(),1u);
 
   int colMin = (int)(eta_index-0.5*etaWidth);
   int colMax = colMin+etaWidth;
@@ -1946,5 +2090,11 @@ void FTK_DataProviderSvc::handle(const Incident& incident) {
     m_got_fast_vertex_refit = false;
     m_got_fast_vertex_conv = false;
     m_got_fast_vertex_raw = false;
+    m_nErrors=0;
+    for (auto& it :  m_nFailedSCTClusters) it=0;
+    for (auto& it :  m_nFailedPixelClusters) it=0;
+    for (auto& it :  m_nMissingSCTClusters) it=0;
+    for (auto& it :  m_nMissingPixelClusters) it=0;
+
   }
 }
diff --git a/Trigger/TrigFTK/TrigFTKSim/python/FTKSimOptions.py b/Trigger/TrigFTK/TrigFTKSim/python/FTKSimOptions.py
index 344b497d6d72981414510078c9d56c476c6108c3..2631c5757d16213053433dcc4ddf902ba986151a 100644
--- a/Trigger/TrigFTK/TrigFTKSim/python/FTKSimOptions.py
+++ b/Trigger/TrigFTK/TrigFTKSim/python/FTKSimOptions.py
@@ -33,7 +33,7 @@ def addTrigFTKSimOptions(parser,nsubregions=4):
     parser.add_argument('--UseCompressedBank', type=trfArgClasses.argFactory(trfArgClasses.argBool, runarg=True),
                         help='use compressed bank algorithm', group='TrigFTKSim')
 
-    parser.add_argument('--ReadFTKHits', type=trfArgClasses.argFactory(trfArgClasses.argBool, runarg= True),
+    parser.add_argument('--ReadFTKHits', type=trfArgClasses.argFactory(trfArgClasses.argBool, runarg=True),
                             help='Read FTKHits directly', group='TrigFTKSim')
 
     # Cannot take maxEvents as an argument from addAthenaArguments() as it will have the wrong
diff --git a/Trigger/TrigFTK/TrigFTKSim/share/skeleton.FTKStandaloneSim.py b/Trigger/TrigFTK/TrigFTKSim/share/skeleton.FTKStandaloneSim.py
index 6b6e07576661255636c85ec19fbfc0e62d9c361e..cc3fca21ad60d75da27682a815645d951bb5ca49 100644
--- a/Trigger/TrigFTK/TrigFTKSim/share/skeleton.FTKStandaloneSim.py
+++ b/Trigger/TrigFTK/TrigFTKSim/share/skeleton.FTKStandaloneSim.py
@@ -1,5 +1,5 @@
 # FTK Simulation Transform Skeleton Job Options
-# $Id: skeleton.FTKStandaloneSim.py 796937 2017-02-13 21:43:06Z jahreda $
+# $Id: skeleton.FTKStandaloneSim.py 802670 2017-04-10 22:03:45Z jahreda $
 
 from AthenaCommon.AthenaCommonFlags import jobproperties as jp
 from AthenaCommon.Logging import logging
diff --git a/Trigger/TrigFTK/TrigFTKSim/src/FTKDataInput.cxx b/Trigger/TrigFTK/TrigFTKSim/src/FTKDataInput.cxx
index 0cb57923d4d412698e156d05b41d33d253e69281..76aa2a6f0aefe83d61a7cbe95a79f69909ec2e91 100644
--- a/Trigger/TrigFTK/TrigFTKSim/src/FTKDataInput.cxx
+++ b/Trigger/TrigFTK/TrigFTKSim/src/FTKDataInput.cxx
@@ -244,6 +244,7 @@ void FTKDataInput::processRegion(int curreg, bool clearOrig)
        MultiTruth mt;
        MultiTruth::Barcode uniquecode(curhit.getEventIndex(),curhit.getBarcode());
        mt.maximize(uniquecode,curhit.getBarcodePt());
+      cout << "actually I'm here ! " << endl; 
        curhit.setTruth(mt);
          } // end hit
        }
diff --git a/Trigger/TrigFTK/TrigFTKSim/standalone/dataflow.h b/Trigger/TrigFTK/TrigFTKSim/standalone/dataflow.h
index a0463cc54d2bf31f887f231b554db119ae2a80b0..da9702378f2905053dff5c8c904cc53ccb3736db 100644
--- a/Trigger/TrigFTK/TrigFTKSim/standalone/dataflow.h
+++ b/Trigger/TrigFTK/TrigFTKSim/standalone/dataflow.h
@@ -12,7 +12,6 @@
 
 #define MAXTOWER 64
 #define MAXL 8
-
 ///#define HIST_MAXBINS 35
 
 #define HIST_MAXBINS 100
diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/TrigBjetHypo/TrigBtagFex.h b/Trigger/TrigHypothesis/TrigBjetHypo/TrigBjetHypo/TrigBtagFex.h
index 44c8880f261c492ca463a3be893abc3529392d7b..66214667d6c4519a5e848f7431dcf3171452705e 100755
--- a/Trigger/TrigHypothesis/TrigBjetHypo/TrigBjetHypo/TrigBtagFex.h
+++ b/Trigger/TrigHypothesis/TrigBjetHypo/TrigBjetHypo/TrigBtagFex.h
@@ -198,10 +198,18 @@ class TrigBtagFex: public HLT::FexAlgo {
 
   /** @brief Run-2 monitored variables. */
 
-  float m_mon_sv_mass;
-  float m_mon_sv_evtx;
-  int   m_mon_sv_nvtx;
-
+  //SV1 variables
+  float m_mon_sv_mass; 
+  float m_mon_sv_evtx; 
+  int   m_mon_sv_nvtx; 
+  //2017 variables - Nghia
+  int     m_mon_sv_ntkv;
+  float   m_mon_sv_Lxy;
+  float   m_mon_sv_L3d;
+  float   m_mon_sv_sig3;
+  float   m_mon_sv_dR;
+ 
+  //IP2/IP3 variables
   float m_mon_tag_IP2D;
   float m_mon_tag_IP3D;
   float m_mon_tag_SV1;
@@ -209,7 +217,29 @@ class TrigBtagFex: public HLT::FexAlgo {
   float m_mon_tag_MV2c00;
   float m_mon_tag_MV2c10;
   float m_mon_tag_MV2c20;
-
+  //2017 variables - Nghia
+  float m_mon_tag_IP2_c;
+  float m_mon_tag_IP2_cu;
+  float m_mon_tag_IP3_c;
+  float m_mon_tag_IP3_cu;
+
+  //JetFitter variables - Nghia
+  int   m_mon_jf_n2tv;
+  int   m_mon_jf_ntrkv; 
+  int   m_mon_jf_nvtx; 
+  int   m_mon_jf_nvtx1t; 
+  float m_mon_jf_mass; 
+  float m_mon_jf_efrc; 
+  float m_mon_jf_dR; 
+  float m_mon_jf_sig3;
+  /// @brief JetFitter : Delta eta between jet and momentum sum of all tracks associated with displaced vertices reconstructed by JetFitter
+  float m_mon_jf_deta; 
+  /// @brief JetFitter : Delta phi between jet and momentum sum of all tracks associated with displaced vertices reconstructed by JetFitter
+  float m_mon_jf_dphi;  
+
+  //jet variables - Nghia
+  float m_mon_jet_pt;
+  float m_mon_jet_eta;
 
   // /** @brief to monitor track selection. */
   // std::vector<float> m_listCutApplied;
diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/TrigBjetHypo/TrigGSCFex.h b/Trigger/TrigHypothesis/TrigBjetHypo/TrigBjetHypo/TrigGSCFex.h
index e48bc5af437397d81aa8fa5423adb4c855371524..32cefa5c48cd460b1b04545d2d00c37a01916aa1 100644
--- a/Trigger/TrigHypothesis/TrigBjetHypo/TrigBjetHypo/TrigGSCFex.h
+++ b/Trigger/TrigHypothesis/TrigBjetHypo/TrigBjetHypo/TrigGSCFex.h
@@ -94,8 +94,11 @@ class TrigGSCFex: public HLT::FexAlgo {
   // 
 
   /** @brief Run-2 monitored variables. */
-
-  //float m_mon_sv_mass;
+  int   m_mon_gsc_ntrk;
+  float m_mon_gsc_width;
+  float m_mon_gsc_ptsum;
+  float m_mon_gsc_ptdiff;
+  float m_mon_gsc_ptratio;
 
   std::string m_trackKey;
   std::string m_jetKey;
diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigBtagFexMonitoring.py b/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigBtagFexMonitoring.py
index 7f94669901e20437a565eb4c5406da3aea29bbb5..83578ea08ee7a3cf89dc2eb6952e7ef599b7e90c 100755
--- a/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigBtagFexMonitoring.py
+++ b/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigBtagFexMonitoring.py
@@ -7,12 +7,22 @@ class TrigBtagFexMonitoring(TrigGenericMonitoringToolConfig):
         super(TrigBtagFexMonitoring, self).__init__(name)
 
         # Run-2 histograms
-        self.Histograms += [ defineHistogram('sv_mass', type='TH1F', title="BtagFex SV Mass",
-                                             xbins=200, xmin=0.0, xmax=6000.0) ]
-        self.Histograms += [ defineHistogram('sv_evtx', type='TH1F', title="BtagFex SV Energy Fraction",
+        self.Histograms += [ defineHistogram('sv1_mass', type='TH1F', title="BtagFex SV Mass",
+                                             xbins=200, xmin=0.0, xmax=6000.0) ] 
+        self.Histograms += [ defineHistogram('sv1_evtx', type='TH1F', title="BtagFex SV Energy Fraction",
                                              xbins=200, xmin=0.0, xmax=1.0) ]
-        self.Histograms += [ defineHistogram('sv_nvtx', type='TH1F', title="BtagFex SV Two-Track Vertex Number",
+        self.Histograms += [ defineHistogram('sv1_nvtx', type='TH1F', title="BtagFex SV Two-Track Vertex Number",
                                              xbins=21, xmin=-0.5, xmax=20.5) ]
+        self.Histograms += [ defineHistogram('sv1_ntkv', type='TH1F', title="BtagFex SV Number of tracks used in the SV",
+                                             xbins=21, xmin=-0.5, xmax=20.5) ]
+        self.Histograms += [ defineHistogram('sv1_sig3', type='TH1F', title="BtagFex SV 3D Vertex Significance",
+                                             xbins=200, xmin=0.0, xmax=100.0) ]
+        self.Histograms += [ defineHistogram('sv1_Lxy', type='TH1F', title="BtagFex SV Transverse distance between PV and SV",
+                                             xbins=200, xmin=0.0, xmax=100.0) ]
+        self.Histograms += [ defineHistogram('sv1_L3d', type='TH1F', title="BtagFex SV Distance between PV and SV",
+                                             xbins=200, xmin=0.0, xmax=100.0) ]
+        self.Histograms += [ defineHistogram('sv1_dR', type='TH1F', title="BtagFex SV delta R",
+                                             xbins=200, xmin=0.0, xmax=3.0) ]
 
         self.Histograms += [ defineHistogram('tag_IP2D', type='TH1F', title="BtagFex IP2D Likelihood Ratio",
                                              xbins=200, xmin=-50.0, xmax=50.0) ]
@@ -22,14 +32,42 @@ class TrigBtagFexMonitoring(TrigGenericMonitoringToolConfig):
                                              xbins=200, xmin=-50.0, xmax=50.0) ]
         self.Histograms += [ defineHistogram('tag_IP3DSV1', type='TH1F', title="BtagFex IP3D+SV1 Discriminant",
                                              xbins=200, xmin=-50.0, xmax=50.0) ]
-        self.Histograms += [ defineHistogram('tag_MV2c00', type='TH1F', title="BtagFex MV2c00 Discriminant",
-                                             xbins=200, xmin=-1., xmax=1.) ]
+     #   self.Histograms += [ defineHistogram('tag_MV2c00', type='TH1F', title="BtagFex MV2c00 Discriminant",
+     #                                        xbins=200, xmin=-1., xmax=1.) ]
         self.Histograms += [ defineHistogram('tag_MV2c10', type='TH1F', title="BtagFex MV2c10 Discriminant",
-                                             xbins=200, xmin=--1., xmax=1.) ]
-        self.Histograms += [ defineHistogram('tag_MV2c20', type='TH1F', title="BtagFex MV2c20 Discriminant",
                                              xbins=200, xmin=-1., xmax=1.) ]
+        self.Histograms += [ defineHistogram('tag_MV2c20', type='TH1F', title="BtagFex MV2c20 Discriminant",
+                                             xbins=200, xmin=-1., xmax=1.) ]  
+        self.Histograms += [ defineHistogram('tag_IP2_c', type='TH1F', title="BtagFex IP2D Likelihood Ratio between b- and c-jet",
+                                             xbins=200, xmin=-50.0, xmax=50.0) ]
+        self.Histograms += [ defineHistogram('tag_IP2_cu', type='TH1F', title="BtagFex IP2D Likelihood Ratio between c- and light jet",
+                                             xbins=200, xmin=-50.0, xmax=50.0) ]
+        self.Histograms += [ defineHistogram('tag_IP3_c', type='TH1F', title="BtagFex IP3D Likelihood Ratio between b- and c-jet",
+                                             xbins=200, xmin=-50.0, xmax=50.0) ]
+        self.Histograms += [ defineHistogram('tag_IP3_cu', type='TH1F', title="BtagFex IP3D Likelihood Ratio between c- and light jet",
+                                             xbins=200, xmin=-50.0, xmax=50.0) ]
 
-
+        #MV2 taggers 
+        self.Histograms += [ defineHistogram('jf_n2tv', type='TH1F', title="BtagFex JetFitter Number of 2-track vertex",
+                                             xbins=21, xmin=-0.5, xmax=20.5) ]
+        self.Histograms += [ defineHistogram('jf_ntrkv', type='TH1F', title="BtagFex JetFitter Number of tracks from displaced vertices",
+                                             xbins=16, xmin=-0.5, xmax=15.5) ]
+        self.Histograms += [ defineHistogram('jf_nvtx', type='TH1F', title="BtagFex JetFitter Number of displaced vertices ",
+                                             xbins=11, xmin=-0.5, xmax=10.5) ]
+        self.Histograms += [ defineHistogram('jf_nvtx1t', type='TH1F', title="BtagFex JetFitter Number of displaced vertices wih 1-track",
+                                             xbins=11, xmin=-0.5, xmax=10.5) ]
+        self.Histograms += [ defineHistogram('jf_mass', type='TH1F', title="BtagFex JetFitter Jet mass",
+                                             xbins=200, xmin=0.0, xmax=9000.0) ]
+        self.Histograms += [ defineHistogram('jf_efrc', type='TH1F', title="BtagFex JetFitter Jet efrac ",
+                                             xbins=200, xmin=0.0, xmax=1.0) ]
+        self.Histograms += [ defineHistogram('jf_dR', type='TH1F', title="BtagFex JetFitter Delta R ",
+                                             xbins=200, xmin=-1.2, xmax=2.0) ]
+        self.Histograms += [ defineHistogram('jf_sig3', type='TH1F', title="BtagFex JetFitter 3D vertex significance ",
+                                             xbins=200, xmin=-0.0, xmax=100.0) ]
+        self.Histograms += [ defineHistogram('jet_pt', type='TH1F', title="BtagFex Jet PT",
+                                             xbins=200, xmin=0.0, xmax=800000.0) ]
+        self.Histograms += [ defineHistogram('jet_eta', type='TH1F', title="BtagFex Jet Eta ",
+                                             xbins=200, xmin=-4.9, xmax=4.9) ]
 
 class TrigEFBtagFexValidationMonitoring(TrigBtagFexMonitoring):
     def __init__ (self, name="TrigEFBtagFexValidationMonitoring"):
diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigGSCFexConfig.py b/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigGSCFexConfig.py
index 6bb8457fa908b50d267b674d4de99ddc20e0873c..1e1fa2c6866149c74ea81cee15af09bc7e1ea581 100644
--- a/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigGSCFexConfig.py
+++ b/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigGSCFexConfig.py
@@ -1,18 +1,18 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 from TrigBjetHypo.TrigBjetHypoConf import TrigGSCFex
-#from TrigBjetHypo.TrigGSCFexTuning import *
+#from TrigBjetHypo.TrigGSCFexTuning import *   
 
 from AthenaCommon.Logging import logging
-#from AthenaCommon.SystemOfUnits import mm, GeV
+from AthenaCommon.SystemOfUnits import mm, GeV   #commented here
 
 from AthenaCommon.AppMgr import ToolSvc
-#from BTagging.BTaggingFlags import BTaggingFlags
-#from BTagging.BTaggingConfiguration import getConfiguration
-#BTagConfig = getConfiguration("Trig")
-#BTagConfig.PrefixxAODBaseName(False)
-#BTagConfig.PrefixVertexFinderxAODBaseName(False)
-#BTagConfigSetupStatus = BTagConfig.setupJetBTaggerTool(ToolSvc, "AntiKt4EMTopo", SetupScheme="Trig", TaggerList=BTaggingFlags.TriggerTaggers)
+from BTagging.BTaggingFlags import BTaggingFlags #commented here
+from BTagging.BTaggingConfiguration import getConfiguration #commented here
+BTagConfig = getConfiguration("Trig")   #commented here
+BTagConfig.PrefixxAODBaseName(False)   #commented here
+BTagConfig.PrefixVertexFinderxAODBaseName(False)   #commented here
+BTagConfigSetupStatus = BTagConfig.setupJetBTaggerTool(ToolSvc, "AntiKt4EMTopo", SetupScheme="Trig", TaggerList=BTaggingFlags.TriggerTaggers)   #commented here
 from JetRec.JetRecCalibrationFinder import jrcf
 JetConfigSetupStatus = True
 
@@ -68,16 +68,16 @@ class GSCFex (TrigGSCFex):
                 self.GSCCalibrationTool = jrcf.find("AntiKt", 0.4, "EMTopo", "ajg", "reco", "Kt4")
                 print self.GSCCalibrationTool
         # MONITORING
-        #from TrigBjetHypo.TrigGSCFexMonitoring import TrigEFGSCFexValidationMonitoring, TrigEFGSCFexOnlineMonitoring
-        #validation = TrigEFGSCFexValidationMonitoring()
-        #online     = TrigEFGSCFexOnlineMonitoring()    
+        from TrigBjetHypo.TrigGSCFexMonitoring import TrigEFGSCFexValidationMonitoring, TrigEFGSCFexOnlineMonitoring   #commented here
+        validation = TrigEFGSCFexValidationMonitoring()   #commented here
+        online     = TrigEFGSCFexOnlineMonitoring()       #commented here
 
         from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig
         time = TrigTimeHistToolConfig("TimeHistogramForTrigBjetHypo")
         time.TimerHistLimits = [0,2]
         
-        #self.AthenaMonTools = [ time, validation, online ]
-        self.AthenaMonTools = [ time  ]
+        self.AthenaMonTools = [ time, validation, online ]  #commented here
+        #self.AthenaMonTools = [ time  ]                    #uncommented here
 
 
 ###########################################
@@ -141,16 +141,16 @@ class GSCFexSplit (TrigGSCFex):
 
 
         # MONITORING
-        #from TrigBjetHypo.TrigGSCFexMonitoring import TrigEFGSCFexValidationMonitoring, TrigEFGSCFexOnlineMonitoring
-        #validation = TrigEFGSCFexValidationMonitoring()
-        #online     = TrigEFGSCFexOnlineMonitoring()    
+        from TrigBjetHypo.TrigGSCFexMonitoring import TrigEFGSCFexValidationMonitoring, TrigEFGSCFexOnlineMonitoring   #commented here
+        validation = TrigEFGSCFexValidationMonitoring()   #commented here
+        online     = TrigEFGSCFexOnlineMonitoring()       #commented here
 
         from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig
         time = TrigTimeHistToolConfig("TimeHistogramForTrigBjetHypo")
         time.TimerHistLimits = [0,2]
         
-        #self.AthenaMonTools = [ time, validation, online ]
-        self.AthenaMonTools = [ time ]
+        self.AthenaMonTools = [ time, validation, online ]   #commented here
+        #self.AthenaMonTools = [ time ]                      #uncommented here
 
 
 ###########################################
diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigGSCFexMonitoring.py b/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigGSCFexMonitoring.py
index 17bb203f21bc5df53d857eda118d118b0c25f429..d633baf2eb13d0b727d0effecfa7d97e8c62e2b1 100644
--- a/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigGSCFexMonitoring.py
+++ b/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigGSCFexMonitoring.py
@@ -28,8 +28,16 @@ class TrigGSCFexMonitoring(TrigGenericMonitoringToolConfig):
         #                                     xbins=200, xmin=-50.0, xmax=50.0) ]
         #self.Histograms += [ defineHistogram('tag_MV2c20', type='TH1F', title="GSCFex MV2c20 Discriminant",
         #                                     xbins=200, xmin=-50.0, xmax=50.0) ]
-
-
+        self.Histograms += [ defineHistogram('gsc_ntrk', type='TH1I', title="GSCFex Number of tracks",
+                                             xbins=21, xmin=-0.5, xmax=30.5) ]
+        self.Histograms += [ defineHistogram('gsc_width', type='TH1F', title="GSCFex Track width",
+                                             xbins=200, xmin=-2.0, xmax=2.0) ]
+        self.Histograms += [ defineHistogram('gsc_ptsum', type='TH1F', title="GSCFex Sum of transverse momentum of tracks",
+                                             xbins=200, xmin=-100.0, xmax=600000.0) ]
+        self.Histograms += [ defineHistogram('gsc_ptdiff', type='TH1F', title="GSCFex PT difference between uncal jet and cal jets",
+                                             xbins=200, xmin=-100000.0, xmax=100000.0) ]
+        self.Histograms += [ defineHistogram('gsc_ptratio', type='TH1F', title="GSCFex PT ratio",
+                                             xbins=200, xmin=-1.0, xmax=1.0) ]
 
 class TrigEFGSCFexValidationMonitoring(TrigGSCFexMonitoring):
     def __init__ (self, name="TrigEFGSCFexValidationMonitoring"):
diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBtagFex.cxx b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBtagFex.cxx
index 2144c94c20266e867f8dc70b9f798d96ccaa1e4f..f62c41f22f7240aba9e31ef009aa9051b1f9c798 100755
--- a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBtagFex.cxx
+++ b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBtagFex.cxx
@@ -22,7 +22,7 @@
 #include "xAODBase/IParticle.h"
 
 #include "xAODJet/Jet.h"
-#include "xAODJet/JetContainer.h"
+ #include "xAODJet/JetContainer.h"
 
 #include "xAODTracking/TrackParticleContainer.h"
 
@@ -68,9 +68,15 @@ TrigBtagFex::TrigBtagFex(const std::string& name, ISvcLocator* pSvcLocator) :
 
   // Run-2 monitoring
 
-  declareMonitoredVariable("sv_mass", m_mon_sv_mass, AutoClear);
-  declareMonitoredVariable("sv_evtx", m_mon_sv_evtx, AutoClear);
-  declareMonitoredVariable("sv_nvtx", m_mon_sv_nvtx, AutoClear);
+  declareMonitoredVariable("sv1_mass", m_mon_sv_mass, AutoClear);
+  declareMonitoredVariable("sv1_evtx", m_mon_sv_evtx, AutoClear);
+  declareMonitoredVariable("sv1_nvtx", m_mon_sv_nvtx, AutoClear);
+  declareMonitoredVariable("sv1_ntkv", m_mon_sv_ntkv, AutoClear);
+  declareMonitoredVariable("sv1_sig3", m_mon_sv_sig3, AutoClear);
+  declareMonitoredVariable("sv1_Lxy",  m_mon_sv_Lxy,  AutoClear);
+  declareMonitoredVariable("sv1_L3d",  m_mon_sv_L3d,  AutoClear);
+  declareMonitoredVariable("sv1_dR",   m_mon_sv_dR,   AutoClear);
+
 
   declareMonitoredVariable("tag_IP2D",    m_mon_tag_IP2D,    AutoClear);
   declareMonitoredVariable("tag_IP3D",    m_mon_tag_IP3D,    AutoClear);
@@ -79,6 +85,23 @@ TrigBtagFex::TrigBtagFex(const std::string& name, ISvcLocator* pSvcLocator) :
   declareMonitoredVariable("tag_MV2c00",  m_mon_tag_MV2c00,  AutoClear);
   declareMonitoredVariable("tag_MV2c10",  m_mon_tag_MV2c10,  AutoClear);
   declareMonitoredVariable("tag_MV2c20",  m_mon_tag_MV2c20,  AutoClear);
+  declareMonitoredVariable("tag_IP2_c",   m_mon_tag_IP2_c,   AutoClear);
+  declareMonitoredVariable("tag_IP2_cu",  m_mon_tag_IP2_cu,  AutoClear);
+  declareMonitoredVariable("tag_IP3_c",   m_mon_tag_IP3_c,   AutoClear);
+  declareMonitoredVariable("tag_IP3_cu",  m_mon_tag_IP3_cu,  AutoClear);
+
+  //MV2 taggers variables
+  declareMonitoredVariable("jf_n2tv",   m_mon_jf_n2tv,   AutoClear);
+  declareMonitoredVariable("jf_ntrkv",  m_mon_jf_ntrkv,  AutoClear);
+  declareMonitoredVariable("jf_nvtx",   m_mon_jf_nvtx,   AutoClear);
+  declareMonitoredVariable("jf_nvtx1t", m_mon_jf_nvtx1t, AutoClear);
+  declareMonitoredVariable("jf_mass",   m_mon_jf_mass,   AutoClear);
+  declareMonitoredVariable("jf_efrc",   m_mon_jf_efrc,   AutoClear);
+  declareMonitoredVariable("jf_dR",     m_mon_jf_dR,     AutoClear);
+  declareMonitoredVariable("jf_sig3",   m_mon_jf_sig3,   AutoClear);
+
+  declareMonitoredVariable("jet_pt",    m_mon_jet_pt,    AutoClear);
+  declareMonitoredVariable("jet_eta",   m_mon_jet_eta,   AutoClear);
 
 }
 
@@ -334,15 +357,48 @@ HLT::ErrorCode TrigBtagFex::hltExecute(const HLT::TriggerElement* inputTE, HLT::
   trigBTagging->variable<float>("SV1", "masssvx",  m_mon_sv_mass);
   trigBTagging->variable<float>("SV1", "efracsvx", m_mon_sv_evtx);
   trigBTagging->variable<int>  ("SV1", "N2Tpair",  m_mon_sv_nvtx);
+  trigBTagging->variable<int>  ("SV1", "NGTinSvx", m_mon_sv_ntkv);
+  trigBTagging->variable<float>("SV1", "normdist", m_mon_sv_sig3);
+  m_mon_sv_Lxy = trigBTagging->auxdata<float>("SV1_Lxy");
+  m_mon_sv_L3d = trigBTagging->auxdata<float>("SV1_L3d");
+  m_mon_sv_dR  = trigBTagging->auxdata<float>("SV1_deltaR");
 
   m_mon_tag_IP2D    = trigBTagging->IP2D_loglikelihoodratio();
   m_mon_tag_IP3D    = trigBTagging->IP3D_loglikelihoodratio();
   m_mon_tag_SV1     = trigBTagging->SV1_loglikelihoodratio();
   m_mon_tag_IP3DSV1 = trigBTagging->SV1plusIP3D_discriminant();
+  m_mon_tag_MV2c00  = trigBTagging->auxdata<double>("MV2c00_discriminant");
+  m_mon_tag_MV2c10  = trigBTagging->auxdata<double>("MV2c10_discriminant");
+  m_mon_tag_MV2c20  = trigBTagging->auxdata<double>("MV2c20_discriminant");
+  if( trigBTagging->IP2D_pc() != 0 ) m_mon_tag_IP2_c   = log(( trigBTagging->IP2D_pb() )/( trigBTagging->IP2D_pc() ));
+  else m_mon_tag_IP2_c   = -999.;
+  if( trigBTagging->IP2D_pu() != 0 ) m_mon_tag_IP2_cu  = log(( trigBTagging->IP2D_pc() )/( trigBTagging->IP2D_pu() ));
+  else m_mon_tag_IP2_cu  = -999.;
+  if( trigBTagging->IP3D_pc() != 0 ) m_mon_tag_IP3_c   = log(( trigBTagging->IP3D_pb() )/( trigBTagging->IP3D_pc() ));
+  else m_mon_tag_IP3_c   = -999.;
+  if( trigBTagging->IP3D_pu() != 0 ) m_mon_tag_IP3_cu  = log(( trigBTagging->IP3D_pc() )/( trigBTagging->IP3D_pu() ));
+  else m_mon_tag_IP3_cu  = -999.;
+
+  trigBTagging->variable<int>  ("JetFitter", "N2Tpair",  m_mon_jf_n2tv);
+  trigBTagging->variable<int>  ("JetFitter", "nTracksAtVtx",  m_mon_jf_ntrkv);
+  trigBTagging->variable<int>  ("JetFitter", "nVTX",  m_mon_jf_nvtx);
+  trigBTagging->variable<int>  ("JetFitter", "nSingleTracks",  m_mon_jf_nvtx1t);
+  trigBTagging->variable<float>  ("JetFitter", "mass",  m_mon_jf_mass);
+  trigBTagging->variable<float>  ("JetFitter", "energyFraction",  m_mon_jf_efrc);
+  
+  m_mon_jf_deta = -10.;
+  m_mon_jf_dphi = -10.;
+  trigBTagging->variable<float>  ("JetFitter", "deltaeta",  m_mon_jf_deta);
+  trigBTagging->variable<float>  ("JetFitter", "deltaphi",  m_mon_jf_dphi); 
+  m_mon_jf_dR = std::hypot( m_mon_jf_deta,m_mon_jf_dphi);
+  if( m_mon_jf_dR > 14 ){ m_mon_jf_dR = -1. ; }
+  trigBTagging->variable<float>  ("JetFitter", "significance3d",  m_mon_jf_sig3); 
+
+
+
+  m_mon_jet_pt  =  jet.pt()  ;
+  m_mon_jet_eta =  jet.eta() ;
 
-  m_mon_tag_MV2c00 = trigBTagging->auxdata<double>("MV2c00_discriminant");
-  m_mon_tag_MV2c10 = trigBTagging->auxdata<double>("MV2c10_discriminant");
-  m_mon_tag_MV2c20 = trigBTagging->auxdata<double>("MV2c20_discriminant");
 
   // Dump results 
   if(msgLvl() <= MSG::DEBUG)
diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigGSCFex.cxx b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigGSCFex.cxx
index 5a62b21df0bffd2fc24f7740ecb792e3e661f2f1..a07ba6a1327b326b09a529564e48187555cdc8b6 100644
--- a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigGSCFex.cxx
+++ b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigGSCFex.cxx
@@ -49,7 +49,11 @@ TrigGSCFex::TrigGSCFex(const std::string& name, ISvcLocator* pSvcLocator) :
 
   // Run-2 monitoring
   
-  //declareMonitoredVariable("sv_mass", m_mon_sv_mass, AutoClear);
+  declareMonitoredVariable("gsc_ntrk",    m_mon_gsc_ntrk,    AutoClear);
+  declareMonitoredVariable("gsc_width",   m_mon_gsc_width,   AutoClear);
+  declareMonitoredVariable("gsc_ptsum",   m_mon_gsc_ptsum,   AutoClear);
+  declareMonitoredVariable("gsc_ptdiff",  m_mon_gsc_ptdiff,  AutoClear);
+  declareMonitoredVariable("gsc_ptratio", m_mon_gsc_ptratio, AutoClear);
 
 
 }
@@ -219,7 +223,6 @@ HLT::ErrorCode TrigGSCFex::hltExecute(const HLT::TriggerElement* inputTE, HLT::T
 //	    << " phi: " << calJet->p4().Phi()
 //	    << " m: "   << calJet->p4().M()
 //	    << std::endl;
-
   
   xAOD::JetTrigAuxContainer trigJetTrigAuxContainer;
   xAOD::JetContainer* jc = new xAOD::JetContainer;
@@ -252,8 +255,13 @@ HLT::ErrorCode TrigGSCFex::hltExecute(const HLT::TriggerElement* inputTE, HLT::T
 
 
   // Fill monitoring variables
-  //trigBTagging->variable<float>("SV1", "masssvx",  m_mon_sv_mass);
-
+  m_mon_gsc_ntrk  = nTrk;
+  m_mon_gsc_width = width;
+  m_mon_gsc_ptsum = ptsum; 
+  m_mon_gsc_ptdiff = jet.p4().Pt() - jc->back()->p4().Pt(); 
+  if( jc->back()->p4().Pt() != 0 ) m_mon_gsc_ptratio = ( m_mon_gsc_ptdiff )/( jc->back()->p4().Pt() ) ; 
+  else m_mon_gsc_ptratio = -999.;
+  
   return HLT::OK;
 }
 
diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBMuMuHypoConfig.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBMuMuHypoConfig.py
index dae612cf5e9296e43337dd86d9997857880f4a13..f9194b7d7fbe5594029324091650939ab53fa584 100644
--- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBMuMuHypoConfig.py
+++ b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigEFBMuMuHypoConfig.py
@@ -168,6 +168,27 @@ class EFBMuMuHypo_Jpsi (TrigEFBMuMuHypo):
         online = TrigEFBMuMuHypoOnlineMonitoring()
         self.AthenaMonTools = [ validation, online, time ]
 
+class EFBMuMuHypo_Jpsi_noId (TrigEFBMuMuHypo):
+    __slots__ = []
+    def __init__(self, name = "EFBMuMuHypo_Jpsi_noId"):
+        super( EFBMuMuHypo_Jpsi_noId, self ).__init__( name )
+
+        # AcceptAll flag: if true take events regardless of cuts
+        self.AcceptAll = False
+
+        # EF Bmumu cuts
+        self.LowerMassCut      = 2500.
+        self.UpperMassCut      = 4300.
+        self.ApplyUpperMassCut = True
+        self.ApplyChi2Cut      = False
+
+        from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig
+        time = TrigTimeHistToolConfig("Time")
+
+        validation = TrigEFBMuMuHypoValidationMonitoring()
+        online = TrigEFBMuMuHypoOnlineMonitoring()
+        self.AthenaMonTools = [ validation, online, time ]
+
 class EFBMuMuHypo_Upsi (TrigEFBMuMuHypo):
     __slots__ = []
     def __init__(self, name = "EFBMuMuHypo_Upsi"):
@@ -354,7 +375,7 @@ class EFBMuMuHypo_Z (TrigEFBMuMuHypo):
         self.LowerMassCut      = 60000.
         self.UpperMassCut      = 120000.
         self.ApplyUpperMassCut = True
-        self.Chi2VtxCut        = 20.
+        self.ApplyChi2Cut      = False
 
         from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig
         time = TrigTimeHistToolConfig("Time")
diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFCombinerHypo.h b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFCombinerHypo.h
index 56bf3adb8848725b72ab99d2096d6b1db73eabfb..2d172559cc106236c7bdf52fbfd5fbffcb9f8c93 100644
--- a/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFCombinerHypo.h
+++ b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFCombinerHypo.h
@@ -7,6 +7,7 @@
 
 #include <string>
 #include "TrigInterfaces/HypoAlgo.h"
+#include "LumiBlockComps/ILuminosityTool.h"
 
 class TriggerElement;
 
@@ -27,12 +28,15 @@ class TrigMuonEFCombinerHypo: public HLT::HypoAlgo {
   std::vector<float> m_ptThresholds;
   BooleanProperty m_acceptAll;
   BooleanProperty m_rejectCBmuons;
+  ToolHandle<ILuminosityTool> m_lumiTool;
 
   // Other members:   
   std::vector<float>::size_type m_bins;
   std::vector<float> m_fex_pt;
   std::vector<float> m_fex_eta;
   std::vector<float> m_fex_phi;
+  float m_fex_rate;
+  float m_fex_bcid;
 };
 
 #endif
diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/python/TrigMuonHypoMonitoring.py b/Trigger/TrigHypothesis/TrigMuonHypo/python/TrigMuonHypoMonitoring.py
index ea1ee85ae9d43accf4eef06a6548732a32fd294f..563c9e58db7a51f273a6276b216accef4a94c0c9 100755
--- a/Trigger/TrigHypothesis/TrigMuonHypo/python/TrigMuonHypoMonitoring.py
+++ b/Trigger/TrigHypothesis/TrigMuonHypo/python/TrigMuonHypoMonitoring.py
@@ -399,6 +399,12 @@ class TrigMuonEFCombinerHypoValidationMonitoring(TrigGenericMonitoringToolConfig
                                             xbins=100, xmin=-3.2, xmax=3.2) ]
         self.Histograms += [ defineHistogram('Phi', type='TH1F', title="Phi reconstruction from #TrigMuonEFCombinerHypo; Phi",
                                              xbins=100, xmin=-3.15, xmax=3.15) ]
+        self.Histograms += [ defineHistogram('BCID', type='TH1F', title="BCID from TrigMuonEFCombinerHypo; BCID",
+                                            xbins=3564, xmin=0, xmax=3563) ]
+        self.Histograms += [ defineHistogram('Rate', type='TH1F', title="Rate from TrigMuonEFCombinerHypo; Rate (Hz)",
+                                            xbins=100, xmin=0, xmax=500) ]
+        self.Histograms += [ defineHistogram('BCID, Rate', type='TProfile', title="Rate vs BCID from TrigMuonEFCombinerHypo; BCID; Rate (Hz)",
+                                             xbins=3564, xmin=0, xmax=3563) ]
 
 class TrigMuonEFCombinerHypoOnlineMonitoring(TrigGenericMonitoringToolConfig):
     def __init__ (self, name="TrigMuonEFCombinerHypoOnlineMonitoring"):
@@ -407,6 +413,13 @@ class TrigMuonEFCombinerHypoOnlineMonitoring(TrigGenericMonitoringToolConfig):
 
         self.Histograms = [ defineHistogram('Pt', type='TH1F', title="P_{T} reconstruction from #TrigMuonEFCombinerHypo; P_{T} (GeV)",
                                             xbins=200, xmin=-100, xmax=100) ]
+        self.Histograms += [ defineHistogram('BCID', type='TH1F', title="BCID from TrigMuonEFCombinerHypo; BCID",
+                                            xbins=3564, xmin=0, xmax=3563) ]
+        self.Histograms += [ defineHistogram('Rate', type='TH1F', title="Rate from TrigMuonEFCombinerHypo; Rate (Hz)",
+                                            xbins=100, xmin=0, xmax=500) ]
+        self.Histograms += [ defineHistogram('BCID, Rate', type='TProfile', title="Rate vs BCID from TrigMuonEFCombinerHypo; BCID; Rate (Hz)",
+                                             xbins=3564, xmin=0, xmax=3563) ]
+
 
 
 
diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFCombinerHypo.cxx b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFCombinerHypo.cxx
index 85ad9115cac1d08721969c4e0c125c23e8d58b27..9544f8030f0c14012616ed0c58ea340140662e9d 100644
--- a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFCombinerHypo.cxx
+++ b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFCombinerHypo.cxx
@@ -6,12 +6,15 @@
 
 #include "xAODMuon/MuonContainer.h"
 #include "CLHEP/Units/SystemOfUnits.h"
+#include "xAODEventInfo/EventInfo.h"
 
 class ISvcLocator;
 
 TrigMuonEFCombinerHypo::TrigMuonEFCombinerHypo(const std::string & name, ISvcLocator* pSvcLocator):
-	HLT::HypoAlgo(name, pSvcLocator){
-	declareProperty("AcceptAll", m_acceptAll=true);
+  HLT::HypoAlgo(name, pSvcLocator),
+  m_lumiTool("LuminosityTool/LuminosityTool")
+{
+        declareProperty("AcceptAll", m_acceptAll=true);
 	declareProperty("RejectCBmuons", m_rejectCBmuons=false);
 	std::vector<float> def_bins;
 	def_bins.push_back(0);
@@ -20,9 +23,12 @@ TrigMuonEFCombinerHypo::TrigMuonEFCombinerHypo(const std::string & name, ISvcLoc
 	def_thrs.push_back(0.*CLHEP::GeV);
 	declareProperty("PtBins", m_ptBins=def_bins);
 	declareProperty("PtThresholds", m_ptThresholds=def_thrs);
+	declareProperty("LumiTool", m_lumiTool);
 	declareMonitoredStdContainer("Pt",  m_fex_pt);
 	declareMonitoredStdContainer("Eta", m_fex_eta);
 	declareMonitoredStdContainer("Phi", m_fex_phi);
+	declareMonitoredVariable("BCID", m_fex_bcid);
+	declareMonitoredVariable("Rate", m_fex_rate);
 
 	m_bins = 0;
 }
@@ -49,7 +55,12 @@ HLT::ErrorCode TrigMuonEFCombinerHypo::hltInitialize(){
 			                                               << " CLHEP::GeV" << endreq;
 		}
 	}
-
+	if(m_lumiTool.retrieve().isFailure()){
+	  msg() <<MSG::WARNING<<"Unable to retrieve luminosity tool"<<endreq;
+	}
+	else{
+	  msg()<<MSG::DEBUG<<"Sucessfully retrieved luminosty tool"<<endreq; 
+	}
 	msg() << MSG::INFO
 	<< "Initialization completed successfully"
 	<< endreq;
@@ -73,6 +84,8 @@ HLT::ErrorCode TrigMuonEFCombinerHypo::hltExecute(const HLT::TriggerElement* out
 	m_fex_pt.clear();
 	m_fex_eta.clear();
 	m_fex_phi.clear();
+	m_fex_rate=-1;
+	m_fex_bcid=-1;
 
 	if(m_acceptAll) {
 		pass = true;
@@ -150,5 +163,27 @@ HLT::ErrorCode TrigMuonEFCombinerHypo::hltExecute(const HLT::TriggerElement* out
 	}//loop on muons		     		
        
 	pass = result;
+
+	//Add some per bcid monitoring of rates to see if there are effects from RF detuning
+	const xAOD::EventInfo* pEvent(0);
+	if(store()->retrieve(pEvent).isFailure()){
+	  msg() << MSG::ERROR << "Cannot find xAODEventInfo object" << endreq;
+	  return HLT::ERROR;
+	}
+
+	double crosssection=1.0;
+	//cross sections are ~ constant vs luminosity - taken from run 311481 (and are approximate
+	// we only care how much the rates differ between bcids, so this should be enough).
+	if(m_ptThresholds[0]/CLHEP::GeV>3.5 && m_ptThresholds[0]/CLHEP::GeV<4.0) crosssection=65.;
+	if(m_ptThresholds[0]/CLHEP::GeV>5.5 && m_ptThresholds[0]/CLHEP::GeV<6.0) crosssection=55.;
+	if(m_ptThresholds[0]/CLHEP::GeV>13.0 && m_ptThresholds[0]/CLHEP::GeV<14.0) crosssection=45.;
+	if(m_ptThresholds[0]/CLHEP::GeV>25.0 && m_ptThresholds[0]/CLHEP::GeV<26.0) crosssection=30.;
+	if(pass==true){
+	  m_fex_bcid = pEvent->bcid();
+
+	  if(m_lumiTool){
+	    m_fex_rate = m_lumiTool->lbLuminosityPerBCID()*crosssection;
+	  }
+	}
 	return HLT::OK;
 }  
diff --git a/Trigger/TrigMonitoring/TrigHLTMonitoring/share/TrigHLTMonCommon_jobOptions.py b/Trigger/TrigMonitoring/TrigHLTMonitoring/share/TrigHLTMonCommon_jobOptions.py
index 026a20bf6ae74f885a2053e281dc52784a586c2b..10b9f5d55c67368db9f4cb0d95d89271952d2c3a 100755
--- a/Trigger/TrigMonitoring/TrigHLTMonitoring/share/TrigHLTMonCommon_jobOptions.py
+++ b/Trigger/TrigMonitoring/TrigHLTMonitoring/share/TrigHLTMonCommon_jobOptions.py
@@ -184,4 +184,4 @@ if hasattr(runArgs,"useDB"):
                 if prop == "TrigConfigTool":
                     log.info("Set TrigConfigTool %s",tool.getName())
                     tool.TrigConfigTool="TrigConf::xAODConfigTool"
-        
+
diff --git a/Trigger/TrigMonitoring/TrigHLTMonitoring/share/skeleton.HLTMon_tf.py b/Trigger/TrigMonitoring/TrigHLTMonitoring/share/skeleton.HLTMon_tf.py
index b94b17765a0150b315064d7a998ea1b0f385e674..fce72438bd924c90a79996b36acfb82ec9f2cf6b 100644
--- a/Trigger/TrigMonitoring/TrigHLTMonitoring/share/skeleton.HLTMon_tf.py
+++ b/Trigger/TrigMonitoring/TrigHLTMonitoring/share/skeleton.HLTMon_tf.py
@@ -47,6 +47,7 @@ if hasattr(runArgs,"inputBSFile"):
 
 if hasattr(runArgs,"inputAODFile"):
     rec.readAOD.set_Value_and_Lock(True)
+<<<<<<< HEAD
     rec.readRDO.set_Value_and_Lock(False)
 
     globalflags.InputFormat.set_Value_and_Lock('pool')
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/MetSort.h b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/MetSort.h
index a4064582611f3d72c3d2e1faa27a518b10ad10a5..74855dd3fbdd87ee5fc5b3e1af92ab798375ecec 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/MetSort.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/MetSort.h
@@ -24,7 +24,8 @@ namespace TCS {
       virtual ~MetSort();
 
       virtual StatusCode initialize();
-      
+
+      virtual TCS::StatusCode sortBitCorrect(const InputTOBArray & input, TOBArray & output);    
       virtual TCS::StatusCode sort(const InputTOBArray & input, TOBArray & output);
 
 
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaIncl1.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaIncl1.cxx
index c5d983b9131cf00fcdb686416bf6c3d1c621ec8d..e5976a2d47e4f2a827caf637fc36c5ece9bf618b 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaIncl1.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaIncl1.cxx
@@ -19,6 +19,7 @@
 #include "L1TopoAlgorithms/DeltaEtaIncl1.h"
 #include "L1TopoCommon/Exception.h"
 #include "L1TopoInterfaces/Decision.h"
+#include "L1TopoSimulationUtils/Kinematics.h"
 
 REGISTER_ALG_TCS(DeltaEtaIncl1)
 
@@ -28,15 +29,6 @@ using namespace std;
 #define LOG cout << fullname() << ":     "
 
 
-namespace {
-   unsigned int
-   calcDeltaEta(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      double deta = fabs( tob1->eta() - tob2->eta() );
-      return deta;
-   }
-}
-
-
 TCS::DeltaEtaIncl1::DeltaEtaIncl1(const std::string & name) : DecisionAlg(name)
 {
    defineParameter("InputWidth", 0);
@@ -123,13 +115,58 @@ TCS::DeltaEtaIncl1::processBitCorrect( const std::vector<TCS::TOBArray const *>
                      Decision & decision )
 
 {
-	return process(input,output,decision);
+   if(input.size() == 1) {
+       bool iaccept[numberOutputBits()];
+       std::fill_n(iaccept,numberOutputBits(),0);
+       unsigned int nLeading = p_NumberLeading1;
+       unsigned int nLeading2 = p_NumberLeading2;
+       for( TOBArray::const_iterator tob1 = input[0]->begin();
+            tob1 != input[0]->end() && distance( input[0]->begin(), tob1) < nLeading;
+            ++tob1)
+           {
+               TCS::TOBArray::const_iterator tob2 = tob1; ++tob2;
+               for( ;
+                    tob2 != input[0]->end() && distance( input[0]->begin(), tob2) < nLeading2;
+                    ++tob2) {
+                   for(unsigned int i=0; i < numberOutputBits(); ++i) {
+                   bool accept = false;
+                   if( parType_t((*tob1)->Et()) <= min(p_MinET1[i],p_MinET2[i])) continue; // ET cut
+                   if( parType_t((*tob2)->Et()) <= min(p_MinET1[i],p_MinET2[i])) continue; // ET cut
+                   if( (parType_t((*tob1)->Et()) <= max(p_MinET1[i],p_MinET2[i])) && (parType_t((*tob2)->Et()) <= max(p_MinET1[i],p_MinET2[i]))) continue;
+                   // DeltaEta cuts
+                   unsigned int deltaEta = TSU::Kinematics::calcDeltaEtaBW( *tob1, *tob2 );
+                   std::stringstream msgss;
+                   msgss << "Combination : " << distance( input[0]->begin(), tob1)
+                         << " x " << distance( input[0]->begin(), tob2)
+                         << " eta=" << (*tob1)->eta()
+                         << " , eta=" << (*tob2)->eta() 
+                         << ", DeltaEta = " << deltaEta << " -> ";
+                   accept = deltaEta >= p_DeltaEtaMin[i] && deltaEta <= p_DeltaEtaMax[i];
+                   if( accept ) {
+                       decision.setBit(i, true);
+                       output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
+                       if (!(iaccept[i])) {
+                           iaccept[i]=1;
+                           m_histAcceptDEta1[i]->Fill((float)deltaEta/10.);
+                       }
+                   }
+                   else
+                       m_histRejectDEta1[i]->Fill((float)deltaEta/10.);
+                   msgss << (accept?"pass":"fail") << "|";
+                   TRG_MSG_DEBUG(msgss.str());
+                   }
+               }
+           }
+   } else {
+       TCS_EXCEPTION("DeltaEtaIncl1 alg must have 1 input, but got " << input.size());
+   }
+   return TCS::StatusCode::SUCCESS;
 }
 
 TCS::StatusCode
 TCS::DeltaEtaIncl1::process( const std::vector<TCS::TOBArray const *> & input,
                              const std::vector<TCS::TOBArray *> & output,
-                             Decision & decison )
+                             Decision & decision )
 {
    if(input.size() == 1) {
        bool iaccept[numberOutputBits()];
@@ -151,7 +188,7 @@ TCS::DeltaEtaIncl1::process( const std::vector<TCS::TOBArray const *> & input,
                    if( parType_t((*tob2)->Et()) <= min(p_MinET1[i],p_MinET2[i])) continue; // ET cut
                    if( (parType_t((*tob1)->Et()) <= max(p_MinET1[i],p_MinET2[i])) && (parType_t((*tob2)->Et()) <= max(p_MinET1[i],p_MinET2[i]))) continue;
                    // DeltaEta cuts
-                   unsigned int deltaEta = calcDeltaEta( *tob1, *tob2 );
+                   unsigned int deltaEta = TSU::Kinematics::calcDeltaEta( *tob1, *tob2 );
                    std::stringstream msgss;
                    msgss << "Combination : " << distance( input[0]->begin(), tob1)
                          << " x " << distance( input[0]->begin(), tob2)
@@ -160,7 +197,7 @@ TCS::DeltaEtaIncl1::process( const std::vector<TCS::TOBArray const *> & input,
                          << ", DeltaEta = " << deltaEta << " -> ";
                    accept = deltaEta >= p_DeltaEtaMin[i] && deltaEta <= p_DeltaEtaMax[i];
                    if( accept ) {
-                       decison.setBit(i, true);
+                       decision.setBit(i, true);
                        output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
                        if (!(iaccept[i])) {
                            iaccept[i]=1;
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaIncl2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaIncl2.cxx
index 2a890259213fdd6ea16cda6c72fb58d8a9cb9b1a..e82895dbbb646e092380acd7aa422fe4f1c07e94 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaIncl2.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaIncl2.cxx
@@ -19,6 +19,7 @@
 #include "L1TopoAlgorithms/DeltaEtaIncl2.h"
 #include "L1TopoCommon/Exception.h"
 #include "L1TopoInterfaces/Decision.h"
+#include "L1TopoSimulationUtils/Kinematics.h"
 
 REGISTER_ALG_TCS(DeltaEtaIncl2)
 
@@ -28,13 +29,7 @@ using namespace std;
 #define LOG cout << fullname() << ":     "
 
 
-namespace {
-   unsigned int
-   calcDeltaEta(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      double deta = fabs( tob1->eta() - tob2->eta() );
-      return deta;
-   }
-}
+
 
 
 TCS::DeltaEtaIncl2::DeltaEtaIncl2(const std::string & name) : DecisionAlg(name)
@@ -120,14 +115,48 @@ TCS::DeltaEtaIncl2::processBitCorrect( const std::vector<TCS::TOBArray const *>
                      Decision & decision )
 
 {
-	return process(input,output,decision);
+    if( input.size() == 2) {
+        bool iaccept[numberOutputBits()];
+        std::fill_n(iaccept,numberOutputBits(),0);
+        for( TOBArray::const_iterator tob1 = input[0]->begin(); 
+             tob1 != input[0]->end() && distance(input[0]->begin(), tob1) < p_NumberLeading1;
+             ++tob1)
+            {
+                for( TCS::TOBArray::const_iterator tob2 = input[1]->begin(); 
+                     tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2;
+                     ++tob2) {
+                    // test DeltaEtaMin, DeltaEtaMax
+                    unsigned int deltaEta = TSU::Kinematics::calcDeltaEtaBW( *tob1, *tob2 );
+                    for(unsigned int i=0; i<numberOutputBits(); ++i) {
+                        bool accept = false;
+                        if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut
+                        if( parType_t((*tob2)->Et()) <= p_MinET2[i]) continue; // ET cut
+                        accept = deltaEta >= p_DeltaEtaMin[i] && deltaEta <= p_DeltaEtaMax[i];
+                        if( accept ) {
+                            decision.setBit(i, true);
+                            output[i]->push_back(TCS::CompositeTOB(*tob1, *tob2));
+                            if (!(iaccept[i])) {
+                                iaccept[i]=1;
+                                m_histAcceptDEta2[i]->Fill(deltaEta);
+                            }
+                        }
+                        else 
+                            m_histRejectDEta2[i]->Fill(deltaEta);
+                        TRG_MSG_DEBUG("DeltaEta = " << deltaEta << " -> accept bit  " << i << " -> "
+                                      << (accept?"pass":"fail"));
+                    }
+                }
+            }
+    } else {
+        TCS_EXCEPTION("DeltaEtaIncl2 alg must have 2 inputs, but got " << input.size());
+    }
+    return TCS::StatusCode::SUCCESS;
 }
 
-
 TCS::StatusCode
 TCS::DeltaEtaIncl2::process( const std::vector<TCS::TOBArray const *> & input,
                              const std::vector<TCS::TOBArray *> & output,
-                             Decision & decison )
+                             Decision & decision )
 {
     if( input.size() == 2) {
         bool iaccept[numberOutputBits()];
@@ -140,14 +169,14 @@ TCS::DeltaEtaIncl2::process( const std::vector<TCS::TOBArray const *> & input,
                      tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2;
                      ++tob2) {
                     // test DeltaEtaMin, DeltaEtaMax
-                    unsigned int deltaEta = calcDeltaEta( *tob1, *tob2 );
+                    unsigned int deltaEta = TSU::Kinematics::calcDeltaEta( *tob1, *tob2 );
                     for(unsigned int i=0; i<numberOutputBits(); ++i) {
                         bool accept = false;
                         if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut
                         if( parType_t((*tob2)->Et()) <= p_MinET2[i]) continue; // ET cut
                         accept = deltaEta >= p_DeltaEtaMin[i] && deltaEta <= p_DeltaEtaMax[i];
                         if( accept ) {
-                            decison.setBit(i, true);
+                            decision.setBit(i, true);
                             output[i]->push_back(TCS::CompositeTOB(*tob1, *tob2));
                             if (!(iaccept[i])) {
                                 iaccept[i]=1;
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaPhiIncl1.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaPhiIncl1.cxx
index 8a0d99223a4615e874d6eb94c04bc27442a2afe6..07de5f93933e5f66e31c0b542b481e8b6231658a 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaPhiIncl1.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaPhiIncl1.cxx
@@ -14,39 +14,12 @@
 #include "L1TopoAlgorithms/DeltaEtaPhiIncl1.h"
 #include "L1TopoCommon/Exception.h"
 #include "L1TopoInterfaces/Decision.h"
+#include "L1TopoSimulationUtils/Kinematics.h"
 
 REGISTER_ALG_TCS(DeltaEtaPhiIncl1)
 
 using namespace std;
 
-namespace {
-   unsigned int
-   calcDeltaPhi(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      double dphi = fabs( tob1->phiDouble() - tob2->phiDouble() );
-      if(dphi>M_PI)
-         dphi = 2*M_PI - dphi;
-      
-      return round( 10 * dphi );
-   }
-
-   unsigned int
-   calcDeltaEta(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      double deta = fabs( tob1->eta() - tob2->eta() );
-      return deta;
-   }
-
-   unsigned int
-   calcDeltaPhiBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      int dphiB = abs( tob1->phi() - tob2->phi() );
-      if(dphiB>32)
-         dphiB = 64 - dphiB; 
-
-      return dphiB ;
-   }
-
-}
-
-
 TCS::DeltaEtaPhiIncl1::DeltaEtaPhiIncl1(const std::string & name) : DecisionAlg(name)
 {
    defineParameter("InputWidth", 3);
@@ -129,9 +102,9 @@ TCS::DeltaEtaPhiIncl1::processBitCorrect( const std::vector<TCS::TOBArray const
                     tob2 != input[0]->end() && distance( input[0]->begin(), tob2) < p_NumberLeading2;
                     ++tob2) {
                    // DeltaPhi cuts
-                   unsigned int deltaPhi = calcDeltaPhiBW( *tob1, *tob2 );
+                   unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhiBW( *tob1, *tob2 );
                    // DeltaEta cuts
-                   unsigned int deltaEta = calcDeltaEta( *tob1, *tob2 );
+                   unsigned int deltaEta = TSU::Kinematics::calcDeltaEtaBW( *tob1, *tob2 );
                    //
                    // to-do change message output
                    std::stringstream msgss;
@@ -175,9 +148,9 @@ TCS::DeltaEtaPhiIncl1::process( const std::vector<TCS::TOBArray const *> & input
                      tob2 != input[0]->end() && distance( input[0]->begin(), tob2) < p_NumberLeading2;
                      ++tob2) {
                     // DeltaPhi cuts
-                    unsigned int deltaPhi = calcDeltaPhi( *tob1, *tob2 );
+                    unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhi( *tob1, *tob2 );
                     // DeltaEta cuts
-                    unsigned int deltaEta = calcDeltaEta( *tob1, *tob2 );
+                    unsigned int deltaEta = TSU::Kinematics::calcDeltaEta( *tob1, *tob2 );
                     //
                     // to-do change message output
                     std::stringstream msgss;
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaPhiIncl2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaPhiIncl2.cxx
index 01ab4c03b47522ee7dd23c257e40ecc8fb4245d4..f4c67f29b350d21e282bf8c69b4d9595bb71fb16 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaPhiIncl2.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaPhiIncl2.cxx
@@ -13,39 +13,13 @@
 #include "L1TopoAlgorithms/DeltaEtaPhiIncl2.h"
 #include "L1TopoCommon/Exception.h"
 #include "L1TopoInterfaces/Decision.h"
+#include "L1TopoSimulationUtils/Kinematics.h"
+
 
 REGISTER_ALG_TCS(DeltaEtaPhiIncl2)
 
 using namespace std;
 
-namespace {
-   unsigned int
-   calcDeltaPhi(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      double dphi = fabs( tob1->phiDouble() - tob2->phiDouble() );
-      if(dphi>M_PI)
-         dphi = 2*M_PI - dphi;
-      
-      return round( 10 * dphi );
-   }
-
-   unsigned int
-   calcDeltaEta(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      double deta = fabs( tob1->eta() - tob2->eta() );
-      return deta;
-   }
-
-   unsigned int
-   calcDeltaPhiBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      int dphiB = abs( tob1->phi() - tob2->phi() );
-      if(dphiB>32)
-         dphiB = 64 - dphiB; 
-
-      return dphiB ;
-   }
-  
-}
-
-
 TCS::DeltaEtaPhiIncl2::DeltaEtaPhiIncl2(const std::string & name) : DecisionAlg(name)
 {
    defineParameter("InputWidth1", 5);
@@ -128,9 +102,9 @@ TCS::DeltaEtaPhiIncl2::processBitCorrect( const std::vector<TCS::TOBArray const
                      tob2 != input[1]->end() && distance( input[1]->begin(), tob2) < p_NumberLeading2;
                      ++tob2) {
                     // DeltaPhi cuts
-                    unsigned int deltaPhi = calcDeltaPhiBW( *tob1, *tob2 );
+                    unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhiBW( *tob1, *tob2 );
                     // DeltaEta cuts
-                    unsigned int deltaEta = calcDeltaEta( *tob1, *tob2 );
+                    unsigned int deltaEta = TSU::Kinematics::calcDeltaEtaBW( *tob1, *tob2 );
                     //
                     // to-do change message output
                     std::stringstream msgss;
@@ -173,9 +147,9 @@ TCS::DeltaEtaPhiIncl2::process( const std::vector<TCS::TOBArray const *> & input
                      tob2 != input[1]->end() && distance( input[1]->begin(), tob2) < p_NumberLeading2;
                      ++tob2) {
                     // DeltaPhi cuts
-                    unsigned int deltaPhi = calcDeltaPhi( *tob1, *tob2 );
+                    unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhi( *tob1, *tob2 );
                     // DeltaEta cuts
-                    unsigned int deltaEta = calcDeltaEta( *tob1, *tob2 );
+                    unsigned int deltaEta = TSU::Kinematics::calcDeltaEta( *tob1, *tob2 );
                     //
                     // to-do change message output
                     std::stringstream msgss;
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaPhiIncl1.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaPhiIncl1.cxx
index a655252d649a8b4ae64a20309a6a41c999bf360e..c36831c2d8ea39ac69c48f95475a667bf4ac1c89 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaPhiIncl1.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaPhiIncl1.cxx
@@ -14,34 +14,12 @@
 #include "L1TopoAlgorithms/DeltaPhiIncl1.h"
 #include "L1TopoCommon/Exception.h"
 #include "L1TopoInterfaces/Decision.h"
+#include "L1TopoSimulationUtils/Kinematics.h"
 
 REGISTER_ALG_TCS(DeltaPhiIncl1)
 
 using namespace std;
 
-namespace {
-   unsigned int
-   calcDeltaPhi(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      double dphi = fabs( tob1->phiDouble() - tob2->phiDouble() );
-      if(dphi>M_PI)
-         dphi = 2*M_PI - dphi;
-      
-      return round( 10 * dphi );
-   }
-
-   unsigned int
-   calcDeltaPhiBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      int dphiB = abs( tob1->phi() - tob2->phi() );
-      if(dphiB>32)
-         dphiB = 64 - dphiB; 
-
-      return dphiB ;
-   }
-
-
-}
-
-
 TCS::DeltaPhiIncl1::DeltaPhiIncl1(const std::string & name) : DecisionAlg(name)
 {
    defineParameter("InputWidth", 0);
@@ -113,7 +91,7 @@ TCS::DeltaPhiIncl1::processBitCorrect( const std::vector<TCS::TOBArray const *>
                      tob2 != input[0]->end() && distance( input[0]->begin(), tob2) < nLeading2;
                      ++tob2) {
                     // DeltaPhi cuts
-                    unsigned int deltaPhi = calcDeltaPhiBW( *tob1, *tob2 );
+                    unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhiBW( *tob1, *tob2 );
                     std::stringstream msgss;
                     msgss << "  phi1=" << (*tob1)->phi() << " , phi2=" << (*tob2)->phi()
                           << ", DeltaPhi = " << deltaPhi << " -> ";
@@ -156,7 +134,7 @@ TCS::DeltaPhiIncl1::process( const std::vector<TCS::TOBArray const *> & input,
                      tob2 != input[0]->end() && distance( input[0]->begin(), tob2) < nLeading2;
                      ++tob2) {
                     // DeltaPhi cuts
-                    unsigned int deltaPhi = calcDeltaPhi( *tob1, *tob2 );
+                    unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhi( *tob1, *tob2 );
                     std::stringstream msgss;
                     msgss << "    Combination : " << distance( input[0]->begin(), tob1) 
                           << " x " << distance( input[0]->begin(), tob2)
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaPhiIncl2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaPhiIncl2.cxx
index 8b53ab41544fb5f4fd39f2bf1660eee39d736c60..5ca631a7d3ab80f27405bf8a554a2e6ae05a74e5 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaPhiIncl2.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaPhiIncl2.cxx
@@ -19,33 +19,12 @@
 #include "L1TopoAlgorithms/DeltaPhiIncl2.h"
 #include "L1TopoCommon/Exception.h"
 #include "L1TopoInterfaces/Decision.h"
+#include "L1TopoSimulationUtils/Kinematics.h"
 
 REGISTER_ALG_TCS(DeltaPhiIncl2)
 
 using namespace std;
 
-namespace {
-   unsigned int
-   calcDeltaPhi(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      double dphi = fabs( tob1->phiDouble() - tob2->phiDouble() );
-      if(dphi>M_PI)
-         dphi = 2*M_PI - dphi;
-      
-      return round( 10 * dphi );
-   }
-
-   unsigned int
-   calcDeltaPhiBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      int dphiB = abs( tob1->phi() - tob2->phi() );
-      if(dphiB>32)
-         dphiB = 64 - dphiB; 
-
-      return dphiB ;
-   }
-
-}
-
-
 TCS::DeltaPhiIncl2::DeltaPhiIncl2(const std::string & name) : DecisionAlg(name)
 {
    defineParameter("InputWidth1", 8);
@@ -134,7 +113,7 @@ TCS::DeltaPhiIncl2::processBitCorrect( const std::vector<TCS::TOBArray const *>
                      tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2;
                      ++tob2) {
                     // test DeltaPhiMin, DeltaPhiMax
-                    unsigned int deltaPhi = calcDeltaPhiBW( *tob1, *tob2 );
+                    unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhiBW( *tob1, *tob2 );
                     for(unsigned int i=0; i<numberOutputBits(); ++i) {
                         bool accept = false;
                         if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut
@@ -184,7 +163,7 @@ TCS::DeltaPhiIncl2::process( const std::vector<TCS::TOBArray const *> & input,
                      tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2;
                      ++tob2) {
                     // test DeltaPhiMin, DeltaPhiMax
-                    unsigned int deltaPhi = calcDeltaPhi( *tob1, *tob2 );
+                    unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhi( *tob1, *tob2 );
                     for(unsigned int i=0; i<numberOutputBits(); ++i) {
                         bool accept = false;
                         if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRSqrIncl1.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRSqrIncl1.cxx
index 8165f13b0fab379cfeb2757052c18226bc962292..ad49f5dcb7b58a496f2521f264145291b607384d 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRSqrIncl1.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRSqrIncl1.cxx
@@ -13,7 +13,7 @@
 #include "L1TopoAlgorithms/DeltaRSqrIncl1.h"
 #include "L1TopoCommon/Exception.h"
 #include "L1TopoInterfaces/Decision.h"
-
+#include "L1TopoSimulationUtils/Kinematics.h"
 
 REGISTER_ALG_TCS(DeltaRSqrIncl1)
 
@@ -22,38 +22,6 @@ using namespace std;
 // not the best solution but we will move to athena where this comes for free
 #define LOG cout << "TCS::DeltaRSqrIncl1:     "
 
-
-
-
-namespace {
-   unsigned int
-   calcDeltaR2(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      double deta = ( tob1->etaDouble() - tob2->etaDouble() );
-      double dphi = fabs( tob1->phiDouble() - tob2->phiDouble() );
-      if(dphi>M_PI)
-         dphi = 2*M_PI - dphi;
-
-
-      return round ( 100 * ((dphi)*(dphi) + (deta)*(deta) )) ;
-
-   }
-
-
-   unsigned int
-   calcDeltaR2BW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-
-      int detaB = abs( tob1->eta() - tob2->eta() );
-      int dphiB = abs( tob1->phi() - tob2->phi() );
-      if(dphiB>32)
-         dphiB = 64 - dphiB;
-
-      unsigned int bit_dr2 = dphiB*dphiB + detaB*detaB;
-      return bit_dr2;
-
-   }
-}
-
-
 TCS::DeltaRSqrIncl1::DeltaRSqrIncl1(const std::string & name) : DecisionAlg(name)
 {
    defineParameter("InputWidth", 9);
@@ -131,7 +99,7 @@ TCS::DeltaRSqrIncl1::processBitCorrect( const std::vector<TCS::TOBArray const *>
                   // OneBarrel
                   if (p_OneBarrel && parType_t(abs((*tob1)->eta())) > 10 && parType_t(abs((*tob2)->eta())) > 10 ) continue;
                   // DeltaR2 cuts
-                  unsigned int deltaR2 = calcDeltaR2BW( *tob1, *tob2 );
+                  unsigned int deltaR2 = TSU::Kinematics::calcDeltaR2BW( *tob1, *tob2 );
                   for(unsigned int i=0; i<numberOutputBits(); ++i) {
                       bool accept = false;
                       accept = deltaR2 >= p_DeltaRMin[i] && deltaR2 <= p_DeltaRMax[i];
@@ -169,7 +137,7 @@ TCS::DeltaRSqrIncl1::process( const std::vector<TCS::TOBArray const *> & input,
                     // OneBarrel
                     if (p_OneBarrel && parType_t(abs((*tob1)->eta())) > 10 && parType_t(abs((*tob2)->eta())) > 10 ) continue;
                     // DeltaR2 cuts
-                    unsigned int deltaR2 = calcDeltaR2( *tob1, *tob2 );
+                    unsigned int deltaR2 = TSU::Kinematics::calcDeltaR2( *tob1, *tob2 );
                     for(unsigned int i=0; i<numberOutputBits(); ++i) {
                     bool accept = false;
                     accept = deltaR2 >= p_DeltaRMin[i] && deltaR2 <= p_DeltaRMax[i];
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRSqrIncl2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRSqrIncl2.cxx
index 82b293e462d2d0c4ac597b0adf6b3820e0347472..d2dbc70d625015f0cb5adad20a76c86825a656d6 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRSqrIncl2.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRSqrIncl2.cxx
@@ -13,6 +13,7 @@
 #include "L1TopoAlgorithms/DeltaRSqrIncl2.h"
 #include "L1TopoCommon/Exception.h"
 #include "L1TopoInterfaces/Decision.h"
+#include "L1TopoSimulationUtils/Kinematics.h"
 
 REGISTER_ALG_TCS(DeltaRSqrIncl2)
 
@@ -21,37 +22,6 @@ using namespace std;
 // not the best solution but we will move to athena where this comes for free
 #define LOG cout << "TCS::DeltaRSqrIncl2:     "
 
-
-
-
-namespace {
-   unsigned int
-   calcDeltaR2(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      double deta = ( tob1->etaDouble() - tob2->etaDouble() );
-      double dphi = fabs( tob1->phiDouble() - tob2->phiDouble() );
-      if(dphi>M_PI)
-         dphi = 2*M_PI - dphi;
-
-      return round ( 100 * ((dphi)*(dphi) + (deta)*(deta) )) ;
-
-   }
-
-
-   unsigned int
-   calcDeltaR2BW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-
-      int detaB = abs( tob1->eta() - tob2->eta() );
-      int dphiB = abs( tob1->phi() - tob2->phi() );
-      if(dphiB>32)
-         dphiB = 64 - dphiB;
-
-      unsigned int bit_dr2 = dphiB*dphiB + detaB*detaB;
-      return bit_dr2;
-
-   }
-}
-
-
 TCS::DeltaRSqrIncl2::DeltaRSqrIncl2(const std::string & name) : DecisionAlg(name)
 {
    defineParameter("InputWidth1", 9);
@@ -124,7 +94,7 @@ TCS::DeltaRSqrIncl2::processBitCorrect( const std::vector<TCS::TOBArray const *>
                   tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2;
                   ++tob2) {
                  // test DeltaR2Min, DeltaR2Max
-                 unsigned int deltaR2 = calcDeltaR2BW( *tob1, *tob2 );
+                 unsigned int deltaR2 = TSU::Kinematics::calcDeltaR2BW( *tob1, *tob2 );
                  TRG_MSG_DEBUG("Jet1 = " << **tob1 << ", Jet2 = " << **tob2 << ", deltaR2 = " << deltaR2);
                  for(unsigned int i=0; i<numberOutputBits(); ++i) {
                    bool accept = false;
@@ -165,7 +135,7 @@ TCS::DeltaRSqrIncl2::process( const std::vector<TCS::TOBArray const *> & input,
 
 
                // test DeltaR2Min, DeltaR2Max
-               unsigned int deltaR2 = calcDeltaR2( *tob1, *tob2 );
+               unsigned int deltaR2 = TSU::Kinematics::calcDeltaR2( *tob1, *tob2 );
 
                TRG_MSG_DEBUG("Jet1 = " << **tob1 << ", Jet2 = " << **tob2 << ", deltaR2 = " << deltaR2);
                for(unsigned int i=0; i<numberOutputBits(); ++i) {
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDRIncl2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDRIncl2.cxx
index 976fc01771ad33bf46d2f0f560b888a49e4d612a..4818fb6bc7a7bf0fc1a1a3f9107671a1f1517063 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDRIncl2.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDRIncl2.cxx
@@ -14,6 +14,7 @@
 #include "L1TopoAlgorithms/DisambiguationDRIncl2.h"
 #include "L1TopoCommon/Exception.h"
 #include "L1TopoInterfaces/Decision.h"
+#include "L1TopoSimulationUtils/Kinematics.h"
 
 REGISTER_ALG_TCS(DisambiguationDRIncl2)
 
@@ -23,36 +24,6 @@ using namespace std;
 #define LOG cout << "TCS::DisambiguationDRIncl2:     "
 
 
-
-
-namespace {
-   unsigned int
-   calcDeltaR2(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      double deta = ( tob1->etaDouble() - tob2->etaDouble() );
-      double dphi = fabs( tob1->phiDouble() - tob2->phiDouble() );
-      if(dphi>M_PI)
-         dphi = 2*M_PI - dphi;
-
-      return round ( 100 * ((dphi)*(dphi) + (deta)*(deta) )) ;
-
-   }
-
-   unsigned int
-   calcDeltaR2BW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-
-      int detaB = abs( tob1->eta() - tob2->eta() );
-      int dphiB = abs( tob1->phi() - tob2->phi() );
-      if(dphiB>32)
-         dphiB = 64 - dphiB;
-
-      unsigned int bit_dr2 = dphiB*dphiB + detaB*detaB;
-      return bit_dr2;
-
-   }
-  
-}
-
-
 TCS::DisambiguationDRIncl2::DisambiguationDRIncl2(const std::string & name) : DecisionAlg(name)
 {
    defineParameter("InputWidth1", 9);
@@ -130,7 +101,7 @@ TCS::DisambiguationDRIncl2::processBitCorrect( const std::vector<TCS::TOBArray c
                  tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2;
                  ++tob2) {
                 // test DeltaR2Min, DeltaR2Max
-                unsigned int deltaR2Cut = calcDeltaR2BW( *tob1, *tob2 );
+                unsigned int deltaR2Cut = TSU::Kinematics::calcDeltaR2BW( *tob1, *tob2 );
                 for(unsigned int i=0; i<numberOutputBits(); ++i) {
                     bool accept = false;
                     if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut
@@ -179,7 +150,7 @@ TCS::DisambiguationDRIncl2::process( const std::vector<TCS::TOBArray const *> &
                   tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2;
                   ++tob2) {
                  // test DeltaR2Min, DeltaR2Max
-                 unsigned int deltaR2Cut = calcDeltaR2( *tob1, *tob2 );
+                 unsigned int deltaR2Cut = TSU::Kinematics::calcDeltaR2( *tob1, *tob2 );
                  for(unsigned int i=0; i<numberOutputBits(); ++i) {
                      bool accept = false;
                      if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDRIncl3.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDRIncl3.cxx
index 5ef0b591564a6d55b4d5e15efe84878ee1dadc6e..1e6640868c36290ecc1e6673e714f19fb94dce47 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDRIncl3.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDRIncl3.cxx
@@ -14,6 +14,7 @@
 #include "L1TopoAlgorithms/DisambiguationDRIncl3.h"
 #include "L1TopoCommon/Exception.h"
 #include "L1TopoInterfaces/Decision.h"
+#include "L1TopoSimulationUtils/Kinematics.h"
 
 REGISTER_ALG_TCS(DisambiguationDRIncl3)
 
@@ -22,37 +23,6 @@ using namespace std;
 // not the best solution but we will move to athena where this comes for free
 #define LOG cout << "TCS::DisambiguationDRIncl3:     "
 
-
-
-
-namespace {
-   unsigned int
-   calcDeltaR2(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      double deta = ( tob1->etaDouble() - tob2->etaDouble() );
-      double dphi = fabs( tob1->phiDouble() - tob2->phiDouble() );
-      if(dphi>M_PI)
-         dphi = 2*M_PI - dphi;
-
-      return round ( 100 * ((dphi)*(dphi) + (deta)*(deta) )) ;
-
-   }
-
-   unsigned int
-   calcDeltaR2BW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-
-      int detaB = abs( tob1->eta() - tob2->eta() );
-      int dphiB = abs( tob1->phi() - tob2->phi() );
-      if(dphiB>32)
-         dphiB = 64 - dphiB;
-
-      unsigned int bit_dr2 = dphiB*dphiB + detaB*detaB;
-      return bit_dr2;
-
-   }
-
-}
-
-
 TCS::DisambiguationDRIncl3::DisambiguationDRIncl3(const std::string & name) : DecisionAlg(name)
 {
    defineParameter("InputWidth1", 5);
@@ -145,13 +115,13 @@ TCS::DisambiguationDRIncl3::processBitCorrect( const std::vector<TCS::TOBArray c
 
 
                // test DeltaR2Min, DeltaR2Max
-               unsigned int deltaR2Cut = calcDeltaR2BW( *tob1, *tob2 );
+               unsigned int deltaR2Cut = TSU::Kinematics::calcDeltaR2BW( *tob1, *tob2 );
                
                for( TCS::TOBArray::const_iterator tob3 = input[2]->begin();
                     tob3 != input[2]->end() ;
                     ++tob3) {
-                   unsigned int deltaR13 = calcDeltaR2( *tob1, *tob3 );
-                   unsigned int deltaR23 = calcDeltaR2( *tob2, *tob3 );
+                   unsigned int deltaR13 = TSU::Kinematics::calcDeltaR2BW( *tob1, *tob3 );
+                   unsigned int deltaR23 = TSU::Kinematics::calcDeltaR2BW( *tob2, *tob3 );
                    for(unsigned int i=0; i<numberOutputBits(); ++i) {
                        bool accept = false;
                        if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut
@@ -199,13 +169,13 @@ TCS::DisambiguationDRIncl3::process( const std::vector<TCS::TOBArray const *> &
 
 
                // test DeltaR2Min, DeltaR2Max
-               unsigned int deltaR2Cut = calcDeltaR2( *tob1, *tob2 );
+               unsigned int deltaR2Cut = TSU::Kinematics::calcDeltaR2( *tob1, *tob2 );
                
                for( TCS::TOBArray::const_iterator tob3 = input[2]->begin();
                     tob3 != input[2]->end() ;
                     ++tob3) {
-                   unsigned int deltaR13 = calcDeltaR2( *tob1, *tob3 );
-                   unsigned int deltaR23 = calcDeltaR2( *tob2, *tob3 );
+                   unsigned int deltaR13 = TSU::Kinematics::calcDeltaR2( *tob1, *tob3 );
+                   unsigned int deltaR23 = TSU::Kinematics::calcDeltaR2( *tob2, *tob3 );
                    for(unsigned int i=0; i<numberOutputBits(); ++i) {
                        bool accept = false;
                        if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDetaDPhiIncl3.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDetaDPhiIncl3.cxx
index 93731e9a6b921d47b68c44a5394402eea81bac80..d2e5dc6bb9584413ce8bd44e4ded8ed6e2fdbde8 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDetaDPhiIncl3.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDetaDPhiIncl3.cxx
@@ -14,6 +14,7 @@
 #include "L1TopoAlgorithms/DisambiguationDetaDPhiIncl3.h"
 #include "L1TopoCommon/Exception.h"
 #include "L1TopoInterfaces/Decision.h"
+#include "L1TopoSimulationUtils/Kinematics.h"
 
 REGISTER_ALG_TCS(DisambiguationDetaDPhiIncl3)
 
@@ -23,61 +24,6 @@ using namespace std;
 #define LOG cout << "TCS::DisambiguationDetaDPhiIncl3:     "
 
 
-
-namespace {
-   unsigned int
-   calcDeltaPhi(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      double dphi = fabs( tob1->phiDouble() - tob2->phiDouble() );
-      if(dphi>M_PI)
-         dphi = 2*M_PI - dphi;
-      
-      return round( 10 * dphi );
-   }
-
-   unsigned int
-   calcDeltaEta(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      double deta = fabs( tob1->eta() - tob2->eta() );
-      return deta;
-   }
-
-   unsigned int
-   calcDeltaR2(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      double deta = ( tob1->etaDouble() - tob2->etaDouble() );
-      double dphi = fabs( tob1->phiDouble() - tob2->phiDouble() );
-      if(dphi>M_PI)
-         dphi = 2*M_PI - dphi;
-
-      return round ( 100 * ((dphi)*(dphi) + (deta)*(deta) )) ;
-
-   }
-
-   unsigned int
-   calcDeltaPhiBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      int dphiB = abs( tob1->phi() - tob2->phi() );
-      if(dphiB>32)
-         dphiB = 64 - dphiB; 
-
-      return dphiB ;
-   }
-
-   unsigned int
-   calcDeltaR2BW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-
-      int detaB = abs( tob1->eta() - tob2->eta() );
-      int dphiB = abs( tob1->phi() - tob2->phi() );
-      if(dphiB>32)
-         dphiB = 64 - dphiB;
-
-      unsigned int bit_dr2 = dphiB*dphiB + detaB*detaB;
-      return bit_dr2;
-
-   }
-
-
-}
-
-
-
 TCS::DisambiguationDetaDPhiIncl3::DisambiguationDetaDPhiIncl3(const std::string & name) : DecisionAlg(name)
 {
    defineParameter("InputWidth1", 9);
@@ -193,9 +139,9 @@ TCS::DisambiguationDetaDPhiIncl3::processBitCorrect( const std::vector<TCS::TOBA
                if( parType_t(fabs((*tob2)->eta())) < p_EtaMin2 ) continue; // Eta cut
 
                // DeltaPhi cuts
-               unsigned int deltaPhi = calcDeltaPhiBW( *tob1, *tob2 );
+               unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhiBW( *tob1, *tob2 );
                // DeltaEta cuts
-               unsigned int deltaEta = calcDeltaEta( *tob1, *tob2 );
+               unsigned int deltaEta = TSU::Kinematics::calcDeltaEtaBW( *tob1, *tob2 );
 
                if(deltaPhi > p_DeltaPhiMax || deltaEta > p_DeltaEtaMax) continue;
                if (deltaEta < p_DeltaEtaMin &&  deltaPhi < p_DeltaPhiMin ) continue;
@@ -206,8 +152,8 @@ TCS::DisambiguationDetaDPhiIncl3::processBitCorrect( const std::vector<TCS::TOBA
                    if( parType_t((*tob3)->Et()) <= p_MinET3) continue; // ET cut
                    if( parType_t(fabs((*tob3)->eta())) > p_EtaMax3 ) continue; // Eta cut
                    if( parType_t(fabs((*tob3)->eta())) < p_EtaMin3 ) continue; // Eta cut
-                   unsigned int deltaR13 = calcDeltaR2BW( *tob1, *tob3 );
-                   unsigned int deltaR23 = calcDeltaR2BW( *tob2, *tob3 );
+                   unsigned int deltaR13 = TSU::Kinematics::calcDeltaR2BW( *tob1, *tob3 );
+                   unsigned int deltaR23 = TSU::Kinematics::calcDeltaR2BW( *tob2, *tob3 );
                    for(unsigned int i=0; i<numberOutputBits(); ++i) {
                        bool accept = false;
                        accept = deltaR13 > p_DisambDR[i] && deltaR23 > p_DisambDR[i] ;
@@ -255,9 +201,9 @@ TCS::DisambiguationDetaDPhiIncl3::process( const std::vector<TCS::TOBArray const
                if( parType_t(fabs((*tob2)->eta())) < p_EtaMin2 ) continue; // Eta cut
 
                // DeltaPhi cuts
-               unsigned int deltaPhi = calcDeltaPhi( *tob1, *tob2 );
+               unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhi( *tob1, *tob2 );
                // DeltaEta cuts
-               unsigned int deltaEta = calcDeltaEta( *tob1, *tob2 );
+               unsigned int deltaEta = TSU::Kinematics::calcDeltaEta( *tob1, *tob2 );
 
                if(deltaPhi > p_DeltaPhiMax || deltaEta > p_DeltaEtaMax) continue;
                if (deltaEta < p_DeltaEtaMin &&  deltaPhi < p_DeltaPhiMin ) continue;
@@ -268,8 +214,8 @@ TCS::DisambiguationDetaDPhiIncl3::process( const std::vector<TCS::TOBArray const
                    if( parType_t((*tob3)->Et()) <= p_MinET3) continue; // ET cut
                    if( parType_t(fabs((*tob3)->eta())) > p_EtaMax3 ) continue; // Eta cut
                    if( parType_t(fabs((*tob3)->eta())) < p_EtaMin3 ) continue; // Eta cut
-                   unsigned int deltaR13 = calcDeltaR2( *tob1, *tob3 );
-                   unsigned int deltaR23 = calcDeltaR2( *tob2, *tob3 );
+                   unsigned int deltaR13 = TSU::Kinematics::calcDeltaR2( *tob1, *tob3 );
+                   unsigned int deltaR23 = TSU::Kinematics::calcDeltaR2( *tob2, *tob3 );
                    for(unsigned int i=0; i<numberOutputBits(); ++i) {
                        bool accept = false;
                        accept = deltaR13 > p_DisambDR[i] && deltaR23 > p_DisambDR[i] ;
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationIncl2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationIncl2.cxx
index 529da6297650dade989816018f03b724db7c1051..c66d4e0004608e2a1191628f29fb07799dadbf4c 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationIncl2.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationIncl2.cxx
@@ -13,6 +13,7 @@
 #include "L1TopoAlgorithms/DisambiguationIncl2.h"
 #include "L1TopoCommon/Exception.h"
 #include "L1TopoInterfaces/Decision.h"
+#include "L1TopoSimulationUtils/Kinematics.h"
 
 REGISTER_ALG_TCS(DisambiguationIncl2)
 
@@ -21,37 +22,6 @@ using namespace std;
 // not the best solution but we will move to athena where this comes for free
 #define LOG cout << "TCS::DisambiguationIncl2:     "
 
-
-
-
-namespace {
-   unsigned int
-   calcDeltaR2(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      double deta = ( tob1->etaDouble() - tob2->etaDouble() );
-      double dphi = fabs( tob1->phiDouble() - tob2->phiDouble() );
-      if(dphi>M_PI)
-         dphi = 2*M_PI - dphi;
-
-      return round ( 100 * ((dphi)*(dphi) + (deta)*(deta) )) ;
-
-   }
-
-   unsigned int
-   calcDeltaR2BW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-
-      int detaB = abs( tob1->eta() - tob2->eta() );
-      int dphiB = abs( tob1->phi() - tob2->phi() );
-      if(dphiB>32)
-         dphiB = 64 - dphiB;
-
-      unsigned int bit_dr2 = dphiB*dphiB + detaB*detaB;
-      return bit_dr2;
-
-   }
-  
-}
-
-
 TCS::DisambiguationIncl2::DisambiguationIncl2(const std::string & name) : DecisionAlg(name)
 {
    defineParameter("InputWidth1", 9);
@@ -124,7 +94,7 @@ TCS::DisambiguationIncl2::processBitCorrect( const std::vector<TCS::TOBArray con
 
 
                // test DeltaR2Min, DeltaR2Max
-               unsigned int deltaR2 = calcDeltaR2BW( *tob1, *tob2 );
+               unsigned int deltaR2 = TSU::Kinematics::calcDeltaR2BW( *tob1, *tob2 );
                
                for(unsigned int i=0; i<numberOutputBits(); ++i) {
                    bool accept = false;
@@ -170,7 +140,7 @@ TCS::DisambiguationIncl2::process( const std::vector<TCS::TOBArray const *> & in
 
 
                // test DeltaR2Min, DeltaR2Max
-               unsigned int deltaR2 = calcDeltaR2( *tob1, *tob2 );
+               unsigned int deltaR2 = TSU::Kinematics::calcDeltaR2( *tob1, *tob2 );
                
                for(unsigned int i=0; i<numberOutputBits(); ++i) {
                    bool accept = false;
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationIncl3.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationIncl3.cxx
index c30ea401b6110ff37dca35f9586077ec230460b3..365e01d44ed095033c7b29eb9cf9d7d2aef9c1bc 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationIncl3.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationIncl3.cxx
@@ -13,6 +13,7 @@
 #include "L1TopoAlgorithms/DisambiguationIncl3.h"
 #include "L1TopoCommon/Exception.h"
 #include "L1TopoInterfaces/Decision.h"
+#include "L1TopoSimulationUtils/Kinematics.h"
 
 REGISTER_ALG_TCS(DisambiguationIncl3)
 
@@ -21,37 +22,6 @@ using namespace std;
 // not the best solution but we will move to athena where this comes for free
 #define LOG cout << "TCS::DisambiguationIncl3:     "
 
-
-
-
-namespace {
-   unsigned int
-   calcDeltaR2(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      double deta = ( tob1->etaDouble() - tob2->etaDouble() );
-      double dphi = fabs( tob1->phiDouble() - tob2->phiDouble() );
-      if(dphi>M_PI)
-         dphi = 2*M_PI - dphi;
-
-      return round ( 100 * ((dphi)*(dphi) + (deta)*(deta) )) ;
-
-   }
-
-   unsigned int
-   calcDeltaR2BW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-
-      int detaB = abs( tob1->eta() - tob2->eta() );
-      int dphiB = abs( tob1->phi() - tob2->phi() );
-      if(dphiB>32)
-         dphiB = 64 - dphiB;
-
-      unsigned int bit_dr2 = dphiB*dphiB + detaB*detaB;
-      return bit_dr2;
-
-   }
-
-}
-
-
 TCS::DisambiguationIncl3::DisambiguationIncl3(const std::string & name) : DecisionAlg(name)
 {
    defineParameter("InputWidth1", 9);
@@ -144,8 +114,8 @@ TCS::DisambiguationIncl3::processBitCorrect( const std::vector<TCS::TOBArray con
                     ++tob3) {
 
                
-                  unsigned int deltaR13 = calcDeltaR2BW( *tob1, *tob3 );
-                  unsigned int deltaR23 = calcDeltaR2BW( *tob2, *tob3 );
+                  unsigned int deltaR13 = TSU::Kinematics::calcDeltaR2BW( *tob1, *tob3 );
+                  unsigned int deltaR23 = TSU::Kinematics::calcDeltaR2BW( *tob2, *tob3 );
 
                   for(unsigned int i=0; i<numberOutputBits(); ++i) {
                       bool accept = false;
@@ -209,8 +179,8 @@ TCS::DisambiguationIncl3::process( const std::vector<TCS::TOBArray const *> & in
                     ++tob3) {
 
                
-                  unsigned int deltaR13 = calcDeltaR2( *tob1, *tob3 );
-                  unsigned int deltaR23 = calcDeltaR2( *tob2, *tob3 );
+                  unsigned int deltaR13 = TSU::Kinematics::calcDeltaR2( *tob1, *tob3 );
+                  unsigned int deltaR23 = TSU::Kinematics::calcDeltaR2( *tob2, *tob3 );
 
                   for(unsigned int i=0; i<numberOutputBits(); ++i) {
                       bool accept = false;
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/EtCut.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/EtCut.cxx
index c7852ff47dbfe535352833e785d30463e73adb95..7a9806eb2dfb2f209d6692e73d1fc71f81b041b2 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/EtCut.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/EtCut.cxx
@@ -52,6 +52,8 @@ TCS::EtCut::processBitCorrect( const std::vector<TCS::TOBArray const *> & input,
                      Decision & decision )
 
 {
+  //Bitwise implementation should be fully identical 
+  //to the non-bitwise one due to its nature as a simple ET cut
 	return process(input,output,decision);
 }
 
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive1.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive1.cxx
index 40c4c6af3143b7d3e59be2ddfef2ab5acc3159f2..f69aa560e7a6bf8d1c8abdc724a49bcde6305e1b 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive1.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive1.cxx
@@ -22,6 +22,8 @@
 #include "L1TopoSimulationUtils/L1TopoDataTypes.h"
 #include "L1TopoSimulationUtils/Trigo.h"
 #include "L1TopoSimulationUtils/Hyperbolic.h"
+#include "L1TopoSimulationUtils/Kinematics.h"
+
 //
 
 REGISTER_ALG_TCS(InvariantMassInclusive1)
@@ -31,38 +33,6 @@ using namespace std;
 // not the best solution but we will move to athena where this comes for free
 #define LOG cout << "TCS::InvariantMassInclusive1:     "
 
-
-
-
-namespace {
-   unsigned int
-   calcInvMass(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      double deta = fabs( tob1->etaDouble() - tob2->etaDouble() );
-      double dphi = fabs( tob1->phiDouble() - tob2->phiDouble() );
-      if(dphi>M_PI)
-         dphi = 2*M_PI - dphi;
-
-      double cosheta = cosh ( deta);
-      double cosphi = cos ( dphi);
-      double invmass2 = 2*tob1->Et()*tob2->Et()*(cosheta - cosphi);
-      return round( invmass2 );
-   }
-
-   unsigned int
-   calcInvMassBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      auto bit_cosheta = TSU::L1TopoDataTypes<19,7>(TSU::Hyperbolic::Cosh.at(abs(tob1->eta() - tob2->eta())));
-      auto bit_cosphi = TSU::L1TopoDataTypes<9,7>(TSU::Trigo::Cos.at(abs(tob1->phi() - tob2->phi())));
-      TSU::L1TopoDataTypes<11,0> bit_Et1(tob1->Et());
-      TSU::L1TopoDataTypes<11,0> bit_Et2(tob2->Et());
-      auto bit_invmass2 = 2*bit_Et1*bit_Et2*(bit_cosheta - bit_cosphi);
-      
-      return int(bit_invmass2) ;
-  
-   }
-
-}
-
-
 TCS::InvariantMassInclusive1::InvariantMassInclusive1(const std::string & name) : DecisionAlg(name)
 {
    defineParameter("InputWidth", 3);
@@ -184,7 +154,7 @@ TCS::InvariantMassInclusive1::processBitCorrect( const std::vector<TCS::TOBArray
                if (p_OneBarrel && parType_t(abs((*tob1)->eta())) > 10 && parType_t(abs((*tob2)->eta())) > 10 ) continue;
                
                // Inv Mass calculation
-               unsigned int invmass2 = calcInvMassBW( *tob1, *tob2 );
+               unsigned int invmass2 = TSU::Kinematics::calcInvMassBW( *tob1, *tob2 );
                for(unsigned int i=0; i<numberOutputBits(); ++i) {
                    bool accept = false;
                    if( parType_t((*tob1)->Et()) <= min(p_MinET1[i],p_MinET2[i])) continue; // ET cut
@@ -201,7 +171,7 @@ TCS::InvariantMassInclusive1::processBitCorrect( const std::vector<TCS::TOBArray
                    }
                    else
                        m_histRejectINV1[i]->Fill(sqrt((float)invmass2));
-                   TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail") << " invmass2 = " << invmass2);
+                   TRG_MSG_INFO("Decision " << i << ": " << (accept?"pass":"fail") << " invmass2 = " << invmass2);
                }
             }
          }
@@ -243,7 +213,7 @@ TCS::InvariantMassInclusive1::process( const std::vector<TCS::TOBArray const *>
                
                // Inv Mass calculation
              
-	       unsigned int invmass2 = calcInvMass( *tob1, *tob2 );
+	       unsigned int invmass2 = TSU::Kinematics::calcInvMass( *tob1, *tob2 );
 
 
                for(unsigned int i=0; i<numberOutputBits(); ++i) {
@@ -262,7 +232,7 @@ TCS::InvariantMassInclusive1::process( const std::vector<TCS::TOBArray const *>
                   }
                   else
                       m_histRejectINV1[i]->Fill(sqrt((float)invmass2));
-                  TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail") << " invmass2 = " << invmass2);
+                  TRG_MSG_INFO("Decision " << i << ": " << (accept?"pass":"fail") << " invmass2 = " << invmass2);
                }
             }
          }
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive2.cxx
index 129e10edf04a600e267c9189efb0dfbed38b789f..186613299002105e100597fc509db255834fba19 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive2.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive2.cxx
@@ -16,6 +16,7 @@
 #include "L1TopoSimulationUtils/L1TopoDataTypes.h"
 #include "L1TopoSimulationUtils/Trigo.h"
 #include "L1TopoSimulationUtils/Hyperbolic.h"
+#include "L1TopoSimulationUtils/Kinematics.h"
 //
 #include "TH1F.h"
 #include "TH2F.h"
@@ -30,38 +31,6 @@ using namespace std;
 // not the best solution but we will move to athena where this comes for free
 #define LOG cout << "TCS::InvariantMassInclusive2:     "
 
-
-
-
-namespace {
-   unsigned int
-   calcInvMass(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      double deta = fabs( tob1->etaDouble() - tob2->etaDouble() );
-      double dphi = fabs( tob1->phiDouble() - tob2->phiDouble() );
-      if(dphi>M_PI)
-         dphi = 2*M_PI - dphi;
-
-      double cosheta = cosh ( deta);
-      double cosphi = cos ( dphi);
-      double invmass2 = 2*tob1->Et()*tob2->Et()*(cosheta - cosphi);
-      return round( invmass2 );
-   }
-
-   unsigned int
-   calcInvMassBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      auto bit_cosheta = TSU::L1TopoDataTypes<19,7>(TSU::Hyperbolic::Cosh.at(abs(tob1->eta() - tob2->eta())));
-      auto bit_cosphi = TSU::L1TopoDataTypes<9,7>(TSU::Trigo::Cos.at(abs(tob1->phi() - tob2->phi())));
-      TSU::L1TopoDataTypes<11,0> bit_Et1(tob1->Et());
-      TSU::L1TopoDataTypes<11,0> bit_Et2(tob2->Et());
-      auto bit_invmass2 = 2*bit_Et1*bit_Et2*(bit_cosheta - bit_cosphi);
-
-      return int(bit_invmass2) ;
-
-   }
-
-}
-
-
 TCS::InvariantMassInclusive2::InvariantMassInclusive2(const std::string & name) : DecisionAlg(name)
 {
    defineParameter("InputWidth1", 9);
@@ -179,7 +148,7 @@ TCS::InvariantMassInclusive2::processBitCorrect( const std::vector<TCS::TOBArray
                  tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2;
                  ++tob2) {
                 // Inv Mass calculation
-                unsigned int invmass2 = calcInvMassBW( *tob1, *tob2 );
+                unsigned int invmass2 = TSU::Kinematics::calcInvMassBW( *tob1, *tob2 );
                 const int eta1 = (*tob1)->eta();
                 const int eta2 = (*tob2)->eta();
                 const unsigned int aeta1 = std::abs(eta1);
@@ -231,7 +200,7 @@ TCS::InvariantMassInclusive2::process( const std::vector<TCS::TOBArray const *>
                  tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2;
                  ++tob2) {
                 // Inv Mass calculation
-                unsigned int invmass2 = calcInvMass( *tob1, *tob2 );
+                unsigned int invmass2 = TSU::Kinematics::calcInvMass( *tob1, *tob2 );
                 const int eta1 = (*tob1)->eta();
                 const int eta2 = (*tob2)->eta();
                 const unsigned int aeta1 = std::abs(eta1);
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/LAr.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/LAr.cxx
index 2c63fb27998731d3255904c093f923512c79e254..769f22856a071ac62f8b73477462e1beaf536ac8 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/LAr.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/LAr.cxx
@@ -64,7 +64,43 @@ TCS::LAr::processBitCorrect( const std::vector<TCS::TOBArray const *> & input,
                      Decision & decision )
 
 {
-	return process(input,output,decision);
+   if(input.size() == 1) {
+
+      TRG_MSG_DEBUG("input size     : " << input[0]->size());
+
+      unsigned int nLeading = p_NumberLeading1;
+      bool accept{false};
+
+      for( TOBArray::const_iterator tob1 = input[0]->begin(); 
+           tob1 != input[0]->end() && distance( input[0]->begin(), tob1) < nLeading;
+           ++tob1)
+         {
+
+            if( parType_t((*tob1)->Et()) <= p_MinET ) continue; // ET cut
+            if( parType_t((*tob1)->eta()) <= p_EtaMin ) continue; // ETa cut
+            if( parType_t((*tob1)->eta()) >= p_EtaMax ) continue; // ETa cut
+            if( parType_t(abs((*tob1)->phi())) <= p_PhiMin ) continue; // phi cut
+            if( parType_t(abs((*tob1)->phi())) >= p_PhiMax ) continue; // phi cut
+
+
+
+            accept = true;
+
+            output[0]->push_back(TCS::CompositeTOB(*tob1));
+
+            TRG_MSG_DEBUG("TOB " << distance(input[0]->begin(), tob1) << " ET = " << (*tob1)->Et() << " ETa = " << (*tob1)->eta() << " phi = " << (*tob1)->phi() );
+         }
+
+      decision.setBit( 0, accept );
+
+
+
+   } else {
+
+      TCS_EXCEPTION("LAr alg must have  1 input, but got " << input.size());
+
+   }
+   return TCS::StatusCode::SUCCESS;
 }
 
 
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MetSort.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MetSort.cxx
index 79e9fa11df87c8fc4587084bb98e9a60468dbdb2..90070c6369ff3f5d62ea3f87bb4755765983cbf0 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MetSort.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MetSort.cxx
@@ -14,6 +14,7 @@
 #include "L1TopoSimulationUtils/L1TopoDataTypes.h"
 #include "L1TopoSimulationUtils/Trigo.h"
 #include "L1TopoSimulationUtils/Hyperbolic.h"
+#include "L1TopoSimulationUtils/Kinematics.h"
 
 using std::sqrt;
 using std::round;
@@ -39,6 +40,23 @@ TCS::MetSort::initialize() {
    return TCS::StatusCode::SUCCESS;
 }
 
+TCS::StatusCode
+TCS::MetSort::sortBitCorrect(const InputTOBArray & input, TOBArray & output) {
+
+   if(input.size()!=1) {
+      TCS_EXCEPTION("MET sort alg expects exactly single MET TOB, got " << input.size());
+   }
+
+   const MetTOBArray & mets = dynamic_cast<const MetTOBArray&>(input);
+   int missingET = TSU::Kinematics::quadraticSumBW(mets[0].Ex(), mets[0].Ey());
+   int metphi = TSU::Trigo::atan2(mets[0].Ex(),mets[0].Ey());
+
+   TRG_MSG_DEBUG("MET phi values " << metphi << " " );
+   output.push_back( GenericTOB( missingET, 0, metphi ) );
+
+   return TCS::StatusCode::SUCCESS;
+}
+
 TCS::StatusCode
 TCS::MetSort::sort(const InputTOBArray & input, TOBArray & output) {
 
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MinDeltaPhiIncl2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MinDeltaPhiIncl2.cxx
index cd61d5aed4db29663ddbc639a3a9a02245640b03..6ef96ff0753f6b5a13b1b6f64349ebcea88bcbe2 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MinDeltaPhiIncl2.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MinDeltaPhiIncl2.cxx
@@ -19,6 +19,7 @@
 #include "L1TopoAlgorithms/MinDeltaPhiIncl2.h"
 #include "L1TopoCommon/Exception.h"
 #include "L1TopoInterfaces/Decision.h"
+#include "L1TopoSimulationUtils/Kinematics.h"
 
 REGISTER_ALG_TCS(MinDeltaPhiIncl2)
 
@@ -27,32 +28,6 @@ using namespace std;
 // not the best solution but we will move to athena where this comes for free
 #define LOG cout << "TCS::MinDeltaPhiIncl2:     "
 
-
-
-
-namespace {
-   unsigned int
-   calcDeltaPhi(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      double dphi = fabs( tob1->phiDouble() - tob2->phiDouble() );
-      if(dphi>M_PI)
-         dphi = 2*M_PI - dphi;
-      
-      return round( 10 * dphi );
-   }
-
-   unsigned int
-   calcDeltaPhiBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
-      int dphiB = abs( tob1->phi() - tob2->phi() );
-      if(dphiB>32)
-         dphiB = 64 - dphiB; 
-
-      return dphiB ;
-   }
-
-
-}
-
-
 TCS::MinDeltaPhiIncl2::MinDeltaPhiIncl2(const std::string & name) : DecisionAlg(name)
 {
    defineParameter("InputWidth1", 9);
@@ -143,7 +118,7 @@ TCS::MinDeltaPhiIncl2::processBitCorrect( const std::vector<TCS::TOBArray const
                if( parType_t((*tob2)->Et()) <= p_MinET2) continue; // ET cut
 
                // test DeltaPhiMin, DeltaPhiMax
-               unsigned int deltaPhi = calcDeltaPhiBW( *tob1, *tob2 );
+               unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhiBW( *tob1, *tob2 );
 
                if (firstphi) {
                   mindphi = deltaPhi;
@@ -210,7 +185,7 @@ TCS::MinDeltaPhiIncl2::process( const std::vector<TCS::TOBArray const *> & input
                if( parType_t((*tob2)->Et()) <= p_MinET2) continue; // ET cut
 
                // test DeltaPhiMin, DeltaPhiMax
-               unsigned int deltaPhi = calcDeltaPhi( *tob1, *tob2 );
+               unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhi( *tob1, *tob2 );
 
                if (firstphi) {
                   mindphi = deltaPhi;
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/RatioSum.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/RatioSum.cxx
index dea93ea47f97020e11c9c39a2b5b476fa8093bbd..e2332a88400709efc434c6740a5458c13818101b 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/RatioSum.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/RatioSum.cxx
@@ -113,9 +113,70 @@ TCS::RatioSum::processBitCorrect( const std::vector<TCS::TOBArray const *> & inp
                      Decision & decision )
 
 {
-	return process(input,output,decision);
-}
+//Only difference between this method and process()
+//is the replacement of the function fabs() --> abs()
+//Note, however, that this algorithm benefits from MetSort
+//which is a sorting algorithm that does have a distinct bitwise implementation
+
+   if(input.size()!=3) {
+      TCS_EXCEPTION("RatioSum alg must have exactly 3 input lists, but got " << input.size());
+   }
+   // Note (from Murrough, ATR-14913, 2016-08-25):
+   // summing Et in ints so it might be losing 0.5 GeV counts from EM/Tau lists
+   unsigned int sumET = 0;
+   unsigned int sumET2 = 0;
+   unsigned int nLeadingele = p_NumberLeading3;
+
+   const TCS::GenericTOB & met = (*input[0])[0];
+
+   // loop over all jets
+   unsigned int objC(0);
+   for( TCS::GenericTOB * tob : *input[1]) {
+
+      if( parType_t(abs(tob->eta())) > p_EtaMax2 ) continue; // Eta cut
+      if( parType_t(abs(tob->eta())) < p_EtaMin2 ) continue; // Eta cut
+      if( tob->Et() <= p_MinET2 ) continue; // E_T cut
+
+      TRG_MSG_DEBUG("Jet : ET = " << tob->Et());
+      ++objC;
+      sumET2 += tob->Et();
+
+   }
+
+   sumET = sumET2;
+
+   // loop over the third collection (EM/tau)
+   for( TOBArray::const_iterator tob1 = input[2]->begin();
+           tob1 != input[2]->end() && distance( input[2]->begin(), tob1) < nLeadingele;
+           ++tob1)
+         {
+
+          if( parType_t(abs((*tob1)->eta())) > p_EtaMax3 ) continue; // Eta cut
+          if( parType_t(abs((*tob1)->eta())) < p_EtaMin3 ) continue; // Eta cut
+          if( (*tob1)->Et() <= p_MinET3 ) continue; // E_T cut
+          sumET += (*tob1)->Et() ;
+
+   }
+
+   for(unsigned int i=0; i<numberOutputBits(); ++i) {
 
+       bool accept = (objC!=0 && met.Et() > p_MinMET &&
+                      sumET!=sumET2 && // in practice, require an EM TOB with Et > 0 (see ATR-14913)
+                      sumET2 > p_HT &&
+                      sumET > p_SUM &&
+                      10*met.Et() >= p_Ratio[i]*sumET);
+
+    decision.setBit( i, accept );
+
+    if(accept)
+        output[i]->push_back( CompositeTOB( GenericTOB::createOnHeap( GenericTOB(sumET,0,0) ) ));
+
+    TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail") << " HT = " << sumET2 << " SUM = " << sumET);
+
+   }
+
+   return TCS::StatusCode::SUCCESS;
+}
 
 TCS::StatusCode
 TCS::RatioSum::process( const std::vector<TCS::TOBArray const *> & input,
@@ -145,8 +206,7 @@ TCS::RatioSum::process( const std::vector<TCS::TOBArray const *> & input,
       TRG_MSG_DEBUG("Jet : ET = " << tob->Et());
       ++objC;
       sumET2 += tob->Et();  
-     
-   }
+}
  
    sumET = sumET2;
 
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/L1TopoSimulationUtils/Kinematics.h b/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/L1TopoSimulationUtils/Kinematics.h
index ba4ce5ab0720b0b1cadd687d4d51cd4821d3616e..4380ca1edecc848165751f98fc32536e6addc4dc 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/L1TopoSimulationUtils/Kinematics.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/L1TopoSimulationUtils/Kinematics.h
@@ -17,8 +17,11 @@
 namespace TSU { 
    struct Kinematics {
 	static unsigned int calcDeltaPhiBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2);		
+	static unsigned int calcDeltaEtaBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2);
+
 	static unsigned int calcInvMassBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2);
 	static unsigned int calcDeltaR2BW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2);
+	static unsigned long quadraticSumBW(int i1, int i2);
 
 	static unsigned int calcDeltaPhi(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2);
 	static unsigned int calcDeltaEta(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2);
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/Root/Kinematics.cxx b/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/Root/Kinematics.cxx
index a2f88202f14ca0d4ed1c4d05c3ab5f46a2aa32f0..ae8526b0435e04c500257f322d1a22fca337d1ae 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/Root/Kinematics.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/Root/Kinematics.cxx
@@ -28,13 +28,18 @@ unsigned int TSU::Kinematics::calcDeltaPhiBW(const TCS::GenericTOB* tob1, const
       return dphiB ;
 }
 
+unsigned int TSU::Kinematics::calcDeltaEtaBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) {
+      double deta = abs( tob1->eta() - tob2->eta() );
+	return deta;
+}
+
 unsigned int TSU::Kinematics::calcInvMassBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2){
 
      auto bit_cosheta = TSU::L1TopoDataTypes<19,7>(TSU::Hyperbolic::Cosh.at(abs(tob1->eta() - tob2->eta())));
       auto bit_cosphi = TSU::L1TopoDataTypes<9,7>(TSU::Trigo::Cos.at(abs(tob1->phi() - tob2->phi())));
       TSU::L1TopoDataTypes<11,0> bit_Et1(tob1->Et());
       TSU::L1TopoDataTypes<11,0> bit_Et2(tob2->Et());
-      auto bit_invmass2 = 2*bit_Et1*bit_Et2*(bit_cosheta - bit_cosphi);
+      auto bit_invmass2 = bit_Et1*bit_Et2*(bit_cosheta - bit_cosphi)*2;
       return int(bit_invmass2) ;
 }
 
@@ -50,7 +55,35 @@ unsigned int TSU::Kinematics::calcDeltaR2BW(const TCS::GenericTOB* tob1, const T
       return bit_dr2;
 }
 
-
+unsigned long TSU::Kinematics::quadraticSumBW(int i1, int i2){
+  long a = i1*i1 + i2*i2;
+
+  unsigned long result=0;
+  long left=0,right=0,r=0;
+  long sign = 0;
+  
+  //long input = a;
+  int halflength = 16; //max 16
+  long bitmask = 0b11111111111111111111111111111111; //32 bits
+  bitmask >>= (32-halflength*2);
+  
+  for(int i = 0; i < halflength; i++){ //16-->4
+    right = 1 + (sign<<1) + (result<<2);
+
+    left = (r<<2) + (a >> 2*halflength-2);
+    a <<= 2;
+    a = a & bitmask;
+
+    if(sign) r = left + right;
+    else r = left - right;
+     
+    sign = (r & (1 << (halflength+1) ))  > 0;
+    result <<= 1;
+    if(!sign) result += 1;
+  }
+ 
+  return result;
+}
 
 /*------------------------------------------ NON-BITWISE --------------------------------------------------*/
 
diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloFcal23Cells2RxMappingTool.h b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloFcal23Cells2RxMappingTool.h
index f031523932f2fe4a09681e7d571d9954e5190524..a7703d0f48e9fe1bd292d5084e373fa3a33d6aec 100644
--- a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloFcal23Cells2RxMappingTool.h
+++ b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloFcal23Cells2RxMappingTool.h
@@ -14,8 +14,8 @@
 // Mapping tool for Fcal 23 calo cells to receivers
 //
 
-#ifndef _TRIGGER_TRIGT1_TRIGT1CALOCALIBTOOLS_L1CALOFCAL23CELLS2RXMAPPINGTOOL_H_
-#define _TRIGGER_TRIGT1_TRIGT1CALOCALIBTOOLS_L1CALOFCAL23CELLS2RXMAPPINGTOOL_H_
+#ifndef TRIGT1CALOCALIBTOOLS_L1CALOFCAL23CELLS2RXMAPPINGTOOL_H
+#define TRIGT1CALOCALIBTOOLS_L1CALOFCAL23CELLS2RXMAPPINGTOOL_H
 
 #include <map>
 #include <vector>
diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloLArTowerEnergy.h b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloLArTowerEnergy.h
index da473b1128c3372d8f455454c6f6a89347105ac8..07f021914b0787f88d9d2b564c947a0d260e9777 100644
--- a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloLArTowerEnergy.h
+++ b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloLArTowerEnergy.h
@@ -70,7 +70,7 @@ private:
 
   L1CaloCondSvc *m_condSvc;
   const CaloLVL1_ID *m_lvl1Helper;
-  const CaloIdManager *caloMgr;
+  const CaloIdManager *m_caloMgr;
   const LArOnlineID *m_LArOnlineHelper;
 
   CaloTriggerTowerService* m_ttService;
diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloOfflineTriggerTowerTools.h b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloOfflineTriggerTowerTools.h
index db7115d51d6b605ed217d27ce2cf3b654696c526..26f251ae47896cde62a3dad92aa0f3792384d16d 100644
--- a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloOfflineTriggerTowerTools.h
+++ b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloOfflineTriggerTowerTools.h
@@ -11,8 +11,8 @@
 //  ***************************************************************************/
 
 
-#ifndef TRIGGER_TRIGT1_TRIGT1CALOCALIBTOOLS_L1CALOOFFLINETRIGERTOWERTOOLS_H
-#define TRIGGER_TRIGT1_TRIGT1CALOCALIBTOOLS_L1CALOOFFLINETRIGERTOWERTOOLS_H
+#ifndef TRIGGER_TRIGT1_TRIGT1CALOCALIBTOOLS_L1CALOOFFLINETRIGGERTOWERTOOLS_H
+#define TRIGGER_TRIGT1_TRIGT1CALOCALIBTOOLS_L1CALOOFFLINETRIGGERTOWERTOOLS_H
 
 #include "AsgTools/AsgTool.h"
 #include "GaudiKernel/ToolHandle.h"
diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloPprPlotManager.h b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloPprPlotManager.h
index 92acb69f4708f1a7e7b3abd49e57477957760c04..a07fd445e94ec45addc0bcd8fcbac47884df8081 100644
--- a/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloPprPlotManager.h
+++ b/Trigger/TrigT1/TrigT1CaloCalibTools/TrigT1CaloCalibTools/L1CaloPprPlotManager.h
@@ -220,7 +220,7 @@ protected:
 
     std::map<unsigned int, TProfile*> m_map_offline_coolIDProfile_ValueVsLumi;
 
-    bool isOnline;
+    bool m_isOnline;
     bool m_firstRun;
     bool m_doRunHistograms;
     int m_ppmAdcMinValue;
diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloLArTowerEnergy.cxx b/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloLArTowerEnergy.cxx
index 35251b7d2f08a17a3f1316fc286a4268bf2e4cf2..d5af1c051594a66f5b799127b001e7379d95e5c2 100644
--- a/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloLArTowerEnergy.cxx
+++ b/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloLArTowerEnergy.cxx
@@ -10,7 +10,7 @@ namespace LVL1{
     asg::AsgTool( name ),
     m_condSvc(nullptr),
     m_lvl1Helper(nullptr),
-    caloMgr(nullptr),
+    m_caloMgr(nullptr),
     m_LArOnlineHelper(nullptr),
     m_ttService(nullptr),
     m_cells2tt("LVL1::L1CaloCells2TriggerTowers/L1CaloCells2TriggerTowers"),
@@ -30,14 +30,14 @@ namespace LVL1{
     sc = service("L1CaloCondSvc", m_condSvc);
     if(sc.isFailure()){ATH_MSG_ERROR( "Cannot access L1CaloCondSvc!" );return sc;}
 
-    sc = detStore()->retrieve(caloMgr) ;
+    sc = detStore()->retrieve(m_caloMgr) ;
     if(sc.isFailure()){ATH_MSG_ERROR( "Cannot access caloMgr");return sc;}
 
     sc = detStore()->retrieve(m_LArOnlineHelper,"LArOnlineID") ;
     if(sc.isFailure()){ATH_MSG_ERROR( "Cannot access LArOnlineID");return sc;}
     
     //Use the CaloIdManager to get a pointer to an instance of the CaloLVL1_ID helper
-    m_lvl1Helper = caloMgr->getLVL1_ID();
+    m_lvl1Helper = m_caloMgr->getLVL1_ID();
     if(!m_lvl1Helper) {
       ATH_MSG_ERROR( "Cannot access CaloLVL1_ID helper." );
       return StatusCode::FAILURE;
@@ -83,13 +83,13 @@ namespace LVL1{
     sc = m_ttTool->retrieveConditions();
     if(!sc.isSuccess()) {
       ATH_MSG_ERROR( "Cannot retrieve Conditions in L1TriggerTowerTool." );
-      return StatusCode::RECOVERABLE;
+      return false;
     }
 
     // init trigger tower to cell mapping - needed each event?
     if(!m_cells2tt->initCaloCellsTriggerTowers(caloCellContainer)) {
       ATH_MSG_ERROR( "Can not initialize L1CaloCells2TriggerTowers with CaloCellContainer "<< m_caloCellContainerName );
-      return StatusCode::RECOVERABLE;
+      return false;
     }
 
     Identifier TTid;
@@ -99,7 +99,7 @@ namespace LVL1{
 
     mapSum::iterator it_map;
 
-    LVL1::TriggerTower *tt;
+    const LVL1::TriggerTower *tt;
     TriggerTowerCollection::const_iterator p_itTT = triggerTowerCollection.begin();
     TriggerTowerCollection::const_iterator p_itTTEnd = triggerTowerCollection.end();
 
diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprEtCorrelationPlotManager.cxx b/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprEtCorrelationPlotManager.cxx
index f9dd0121d7f1e99102bb320b4eb93c0541e8f9a9..5e7fafd37237bf2ad68cdcdb6e3fb1198125b868 100644
--- a/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprEtCorrelationPlotManager.cxx
+++ b/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprEtCorrelationPlotManager.cxx
@@ -73,7 +73,7 @@ StatusCode L1CaloPprEtCorrelationPlotManager::getCaloCells()
     
     const CaloCellContainer* caloCellContainer = 0;
     
-    if (!isOnline){
+    if (!m_isOnline){
       
         sc = m_storeGate->retrieve(caloCellContainer, m_caloCellContainerName);
 	if ( sc.isFailure() || !caloCellContainer) {
@@ -157,7 +157,7 @@ void L1CaloPprEtCorrelationPlotManager::loadTools()
 {
     StatusCode sc;
     
-    if (isOnline) {
+    if (m_isOnline) {
         sc = m_caloTool.retrieve();
 	if ( sc.isFailure()) {
 	    *m_log<<MSG::WARNING<<"Unable to locate tool L1CaloMonitoringCaloTool" << endmsg;
diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprFineTimePlotManager.cxx b/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprFineTimePlotManager.cxx
index ce8b96984a167bd4e68c08b60a2e667e18e85ad6..a39ffe601f1297de5a8ef856ee05b8454985e67e 100644
--- a/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprFineTimePlotManager.cxx
+++ b/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprFineTimePlotManager.cxx
@@ -101,7 +101,7 @@ float L1CaloPprFineTimePlotManager::LArQuality(const xAOD::TriggerTower* trigTow
   
     Identifier id(0);
 
-    if(isOnline){
+    if(m_isOnline){
       id = m_ttToolOnline->identifier(trigTower->eta(), trigTower->phi(), layer); 
     }else{
       if(layer == 0) id = m_ttToolOffline->emID(trigTower->eta(),trigTower->phi());
@@ -229,7 +229,7 @@ void L1CaloPprFineTimePlotManager::loadTools()
 {
     StatusCode sc;
     
-    if (isOnline) {
+    if (m_isOnline) {
         sc = m_caloTool.retrieve();
 	if ( sc.isFailure()) {
 	    *m_log<<MSG::WARNING<<"Unable to locate tool L1CaloMonitoringCaloTool" << endmsg;
diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprPlotManager.cxx b/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprPlotManager.cxx
index 048278b7641d1cd1d55953a950b8ee64a63aa92f..1e305401848c98dd2d3e26a803d053863ee8f54d 100644
--- a/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprPlotManager.cxx
+++ b/Trigger/TrigT1/TrigT1CaloCalibTools/src/L1CaloPprPlotManager.cxx
@@ -73,7 +73,7 @@ L1CaloPprPlotManager::L1CaloPprPlotManager(ITHistSvc* histSvc,
     m_h_offline_had_etaPhiValueRMS(0),
     m_p_offline_em_valueVsRunNumber(0),
     m_p_offline_had_valueVsRunNumber(0),
-    isOnline(false),
+    m_isOnline(false),
     m_firstRun(true),
     m_doRunHistograms(doRunHistograms),
     m_ppmAdcMinValue(ADC_cut),
@@ -125,7 +125,7 @@ L1CaloPprPlotManager::L1CaloPprPlotManager(ManagedMonitorToolBase* aMonObj,
     m_h_offline_had_etaPhiValueRMS(0),
     m_p_offline_em_valueVsRunNumber(0),
     m_p_offline_had_valueVsRunNumber(0),
-    isOnline(true),
+    m_isOnline(true),
     m_firstRun(true),
     m_doRunHistograms(false),
     m_ppmAdcMinValue(ADC_cut),
@@ -158,7 +158,7 @@ void L1CaloPprPlotManager::Analyze(const EventInfo* evtInfo, const xAOD::Trigger
     m_currentRunNo = evtInfo->event_ID()->run_number();
     m_bunchCrossing = evtInfo->event_ID()->bunch_crossing_id();
 
-    if (!isOnline && m_doRunHistograms)
+    if (!m_isOnline && m_doRunHistograms)
     {
         if (m_firstRun)
         {
@@ -175,7 +175,7 @@ void L1CaloPprPlotManager::Analyze(const EventInfo* evtInfo, const xAOD::Trigger
             if (sc.isFailure()) {*m_log << MSG::FATAL << "Could not book Run Histograms" << endmsg;}
         }
     }
-    if (isOnline && this->isNewRun())
+    if (m_isOnline && this->isNewRun())
     {
         m_p_online_em_valueVsLumi = 0;
         m_p_online_had_valueVsLumi = 0;
@@ -194,7 +194,7 @@ void L1CaloPprPlotManager::Analyze(const EventInfo* evtInfo, const xAOD::Trigger
     //Check if the TriggerTowers are disabled or not before analysis
     if (!channelDisabled)
     {
-        if ( isOnline) {
+        if ( m_isOnline) {
             if ( trigTower->layer() == 0 ) { this->fillOnlineHistos(trigTower, coolID, Emlayer); }
             if ( trigTower->layer() == 1 ) { this->fillOnlineHistos(trigTower, coolID, Hadlayer); }
         }
@@ -687,7 +687,7 @@ void L1CaloPprPlotManager::fillDifferentialOfflineHistos(const xAOD::TriggerTowe
 StatusCode L1CaloPprPlotManager::MakeSummary()
 {
     StatusCode sc;
-    if ( !isOnline && m_doRunHistograms )
+    if ( !m_isOnline && m_doRunHistograms )
     {
         *m_log << MSG::INFO << "MakeSummary for " << m_monitoringName.data() << " plots" << endmsg;
         sc =  m_histoSvc->regHist(Form("/AANT/ADC/%s/run#%d/ppm_em_2d_profile_etaPhi_adc_%s",
diff --git a/Trigger/TrigValidation/TrigInDetValidation/TIDAbuild/TrigInDetValidation_FTK_beamspot_ttbar.xml b/Trigger/TrigValidation/TrigInDetValidation/TIDAbuild/TrigInDetValidation_FTK_beamspot_ttbar.xml
index 6eed8cdafd08b1e699fe277a9e275ba3d82970af..ea08af3d8b752078af4e1aa0a69f0a7877741d34 100644
--- a/Trigger/TrigValidation/TrigInDetValidation/TIDAbuild/TrigInDetValidation_FTK_beamspot_ttbar.xml
+++ b/Trigger/TrigValidation/TrigInDetValidation/TIDAbuild/TrigInDetValidation_FTK_beamspot_ttbar.xml
@@ -1,7 +1,7 @@
          <athena trendId='all_pu46' userJobId='TrigInDetValidation_FTK_beamspot_ttbar'>
-            <doc>BeamSpot slice, ttbar events, FTK, pu46, run2 chains</doc>
-            <displayName>BeamSpot slice, ttbar, FTK, pu46, run2 chains</displayName>
-	    <commandLineFlags>EventMax=1000;runMergedChain=True;doFTK=True;rec.doFloatingPointException.set_Value_and_Lock(False)</commandLineFlags>
+            <doc>BeamSpot slice, ttbar events, FTK, pu46</doc>
+            <displayName>BeamSpot slice, ttbar, FTK, pu46</displayName>
+	    <commandLineFlags>EventMax=1000;doFTK=True;rec.doFloatingPointException.set_Value_and_Lock(False)</commandLineFlags>
             <options>TrigInDetValidation/TrigInDetValidation_RTT_topOptions_BeamspotSlice</options>
             <package>Trigger/TrigValidation/TrigInDetValidation</package>
             <group>TrigInDetValidation</group>
diff --git a/Trigger/TrigValidation/TrigInDetValidation/TIDAbuild/TrigInDetValidation_beamspot_ttbar_pu46.xml b/Trigger/TrigValidation/TrigInDetValidation/TIDAbuild/TrigInDetValidation_beamspot_ttbar_pu46.xml
index 431d188f5742bbdece2b85e5781d3dfb1f323132..93e62e2f7c73c1071461dd90f99a1f5c0689f06f 100644
--- a/Trigger/TrigValidation/TrigInDetValidation/TIDAbuild/TrigInDetValidation_beamspot_ttbar_pu46.xml
+++ b/Trigger/TrigValidation/TrigInDetValidation/TIDAbuild/TrigInDetValidation_beamspot_ttbar_pu46.xml
@@ -1,7 +1,7 @@
          <athena trendId='all_pu46' userJobId='TrigInDetValidation_beamspot_ttbar_pu46'>
-            <doc>BeamSpot slice, ttbar events, pu46, run2 chains</doc>
-            <displayName>BeamSpot slice, ttbar, pu46, run2 chains</displayName>
-	    <commandLineFlags>EventMax=1000;runMergedChain=True;rec.doFloatingPointException.set_Value_and_Lock(False)</commandLineFlags>
+            <doc>BeamSpot slice, ttbar events, pu46</doc>
+            <displayName>BeamSpot slice, ttbar, pu46</displayName>
+	    <commandLineFlags>EventMax=1000;rec.doFloatingPointException.set_Value_and_Lock(False)</commandLineFlags>
             <options>TrigInDetValidation/TrigInDetValidation_RTT_topOptions_BeamspotSlice</options>
             <package>Trigger/TrigValidation/TrigInDetValidation</package>
             <group>TrigInDetValidation</group>
diff --git a/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_RTT_Chains.py b/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_RTT_Chains.py
index 71d6bd67395ca4b99cbbf733ad030c8df03c33a4..a48720bf0399bbc7f1edbaa220fe1ee5d43eff84 100644
--- a/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_RTT_Chains.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_RTT_Chains.py
@@ -204,7 +204,7 @@ def bjetChains(runMergedChain, doIDNewTracking, doFTK, doBperf):
       ]
   return (idTrigChainlist, tidaAnalysischains)
 
-def beamspotChains(runMergedChain, doIDNewTracking, doFTK):
+def beamspotChains(doIDNewTracking, doFTK):
   idTrigChainlist = []
   tidaAnalysischains = ["Truth"]
 
@@ -219,7 +219,7 @@ def beamspotChains(runMergedChain, doIDNewTracking, doFTK):
     idTrigChainlist.append(['beamspot_idperf_FTK',           'L1_4J15',    [], ['Main'], ['RATE:BeamSpot',  'BW:BeamSpot'], 1])
   
   tidaAnalysischains += [
-    'HLT_beamspot_allTE_L2StarB:TrigL2SiTrackFinder_BeamSpotB',
+    #'HLT_beamspot_allTE_L2StarB:TrigL2SiTrackFinder_BeamSpotB',
     'HLT_beamspot_allTE_trkfast:TrigFastTrackFinder_BeamSpot_IDTrig',
     'HLT_beamspot_allTE_trkfast:InDetTrigTrackingxAODCnv_BeamSpot_FTF',
     'HLT_beamspot_allTE_FTK:InDetTrigTrackingxAODCnv_BeamSpot_FTK',
diff --git a/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_RTT_topOptions_BeamspotSlice.py b/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_RTT_topOptions_BeamspotSlice.py
index 286535143adcb46fb4e2bb0d153bb3f1b4d72549..cc62ddab8cb9e86c484277eece7b8042124550af 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_RTT_topOptions_BeamspotSlice.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_RTT_topOptions_BeamspotSlice.py
@@ -20,10 +20,6 @@ from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
 
 include("TrigInDetValidation/TrigInDetValidation_RTT_Chains.py")
 
-rMC = False
-if 'runMergedChain' in dir() and runMergedChain==True:
-  rMC = True
-
 rID=False
 if 'doIDNewTracking' in dir() and doIDNewTracking==True:
   rID = True
@@ -34,7 +30,7 @@ if 'doFTK' in dir() and doFTK==True:
   TriggerFlags.doFTK=True
   rFTK=True
 
-(idtrigChainlist, tidaAnalysischains) = beamspotChains(rMC,rID,rFTK)
+(idtrigChainlist, tidaAnalysischains) = beamspotChains(rID,rFTK)
 
 def resetSigs():
   TriggerFlags.doHypo=False
@@ -48,12 +44,8 @@ include("TrigInDetValidation/TrigInDetValidation_RTT_Common.py")
 topSequence.TrigSteer_HLT.terminateAlgo.Prescale=1.
 
 if 'fastZFinder' in dir() and fastZFinder==True:
-  FTF = topSequence.TrigSteer_HLT.TrigFastTrackFinder_BeamSpot_IDTrig
-
-  # set fast ZFinder settings here
-  # from AthenaCommon.ConfigurableDb import getConfigurable
-  # zfinder = getConfigurable("TrigZFinder")
-  zfinder = FTF.trigZFinder
+  from AthenaCommon.AppMgr import ToolSvc
+  zfinder = ToolSvc.TrigZFinder
 
   zfinder.NumberOfPeaks = 4
   zfinder.TripletMode = 1
@@ -63,6 +55,5 @@ if 'fastZFinder' in dir() and fastZFinder==True:
   zfinder.MinVtxSignificance = 10
   zfinder.Percentile = 0.95
 
+  print 'zfinder settings modified by TrigInDetValidation_RTT_topOptions_BeamspotSlice.py'
   print zfinder
-
-
diff --git a/Trigger/TrigValidation/TrigP1Test/Testing/TrigP1Test.conf b/Trigger/TrigValidation/TrigP1Test/Testing/TrigP1Test.conf
index e7addb435658f03bee8eba840fc000c2f4e75a44..50fb6df92843e23b680c16348ae60fd433b02e2a 100644
--- a/Trigger/TrigValidation/TrigP1Test/Testing/TrigP1Test.conf
+++ b/Trigger/TrigValidation/TrigP1Test/Testing/TrigP1Test.conf
@@ -112,7 +112,7 @@ test 18
   name Reco_tf_physicsV7_savedBS
   doc Reco_tf on saved output from HLT_physicsV7
   pre_condition if [[ $(find ../HLT_physicsV7/HLT_physicsV7._0001.data -type f -size +1000000c 2>/dev/null) ]] ; then test -e ../HLT_physicsV7/HLT_physicsV7._0001.data ; else test -e non_existing_file ; fi   
-  athena_cmd source $AtlasSetup/scripts/asetup.sh AtlasProduction,20.7.X.Y,latest_copied_release ; Reco_tf.py --inputBSFile ../HLT_physicsV7/HLT_physicsV7._0001.data --maxEvents 2 --outputESDFile HLT_physicsV7.ESD.pool.root
+  athena_cmd source $AtlasSetup/scripts/asetup.sh latest,Athena,21.0 ; Reco_tf.py --inputBSFile ../HLT_physicsV7/HLT_physicsV7._0001.data --maxEvents 2 --outputESDFile HLT_physicsV7.ESD.pool.root
   post_command checkFile.py HLT_physicsV7.ESD.pool.root > ESD.txt
   post_command perl -i.clean -pe 's/^[\d:]+ //' log.RAWtoESD 
   post_command cat log.RAWtoESD >> Reco_tf_physicsV7_savedBS_test.log 
@@ -175,7 +175,7 @@ test 21
   checklog --config checklogTrigP1Test.conf --showexcludestats
   fullregtest    REGTEST /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/ATN/postrel20/latest/trigp1test_AthenaP1RDOtoBS.reference
   rootcomp /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/ATN/postrel20/latest/trigp1test_AthenaP1RDOtoBS.root
-  athena_cmd athena.py -c 'setMenu="MC_pp_v6";writeBS=True;rerunLVL1=True;jp.AthenaCommonFlags.EvtMax.set_Value_and_Lock(10);PoolRDOInput=["root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00/RDO.07644622._000001.pool.root.1"];myBSRDOOutput="AppName=Athena, OutputDirectory=./, FileTag="+setMenu+", Run=110401"' TriggerRelease/Trigger_topOptions_writeBS.py
+  athena_cmd athena.py -c 'setMenu="MC_pp_v7";writeBS=True;rerunLVL1=True;jp.AthenaCommonFlags.EvtMax.set_Value_and_Lock(10);PoolRDOInput=["root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00/RDO.07644622._000001.pool.root.1"];myBSRDOOutput="AppName=Athena, OutputDirectory=./, FileTag="+setMenu+", Run=110401"' TriggerRelease/Trigger_topOptions_writeBS.py
   post_command test -e  data_test.00110401.Single_Stream.daq.RAW._lb0050._Athena._0001.data
 
 test 22
@@ -222,7 +222,7 @@ test 41
   name Trigreco_physicsV7_currentT0
   doc Trig_reco_tf with current T0 config
   checklog --config checklogTrigP1Test.conf --showexcludestats
-  athena_cmd Trig_reco_tf.py --inputBS_RDOFile "root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/data15_13TeV.00272531.physics_Main.daq.RAW._lb0104._SFO-5._0001.data" --precommand "testPhysicsV7=True;HLTOutputLevel=INFO;doValidation=True" --maxEvents '15' --outputBSFile "tmp.BS" ; source $AtlasSetup/scripts/asetup.sh AtlasProduction,20.7.X.Y,latest_copied_release ; Reco_tf.py --inputBSFile "tmp.BS" --athenaopts=" --perfmon "  --outputHISTFile 'myHIST.root' --outputAODFile 'myAOD.pool.root' --outputESDFile 'myESD.pool.root' --outputNTUP_MUONCALIBFile 'myNTUP_MUONCALIB.root' --autoConfiguration='everything' --preExec 'all:from MuonRecExample.MuonRecFlags import muonRecFlags;muonRecFlags.useLooseErrorTuning.set_Value_and_Lock(True);DQMonFlags.doCTPMon=False;' --triggerConfig r2e=DATARECO:REPR
+  athena_cmd Trig_reco_tf.py --inputBS_RDOFile "root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/data15_13TeV.00272531.physics_Main.daq.RAW._lb0104._SFO-5._0001.data" --precommand "testPhysicsV7=True;HLTOutputLevel=INFO;doValidation=True" --maxEvents '15' --outputBSFile "tmp.BS" ; source $AtlasSetup/scripts/asetup.sh latest,Athena,21.0 ; Reco_tf.py --inputBSFile "tmp.BS" --athenaopts=" --perfmon "  --outputHISTFile 'myHIST.root' --outputAODFile 'myAOD.pool.root' --outputESDFile 'myESD.pool.root' --outputNTUP_MUONCALIBFile 'myNTUP_MUONCALIB.root' --autoConfiguration='everything' --preExec 'all:from MuonRecExample.MuonRecFlags import muonRecFlags;muonRecFlags.useLooseErrorTuning.set_Value_and_Lock(True);DQMonFlags.doCTPMon=False;' --triggerConfig r2e=DATARECO:REPR
   post_command checkFile.py myAOD.pool.root > AOD.txt 
 
 
@@ -233,7 +233,7 @@ test 42
   checklog --config checklogTrigP1Test.conf --showexcludestats
   fullregtest REGTEST  /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/ATN/postrel20/latest/trigp1test_TrigEDMCheck_physicsV7_currentT0.reference  
   pre_condition if [[ $(find ../Trigreco_physicsV7_currentT0/myESD.pool.root -type f -size +1000000c 2>/dev/null) ]] ; then test -e ../Trigreco_physicsV7_currentT0/myESD.pool.root ; else test -e non_existing_file ; fi
-  athena_cmd source $AtlasSetup/scripts/asetup.sh AtlasProduction,20.7.X.Y,latest_copied_release ; athena.py -c 'fileList=["../Trigreco_physicsV7_currentT0/myESD.pool.root"]' 
+  athena_cmd source $AtlasSetup/scripts/asetup.sh latest,Athena,21.0 ; athena.py -c 'fileList=["../Trigreco_physicsV7_currentT0/myESD.pool.root"]' 
 
 test 43
   name  TrigEDMCheck_physicsV7_currentT0_AOD
@@ -242,7 +242,7 @@ test 43
   checklog --config checklogTrigP1Test.conf --showexcludestats
   fullregtest REGTEST  /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/ATN/postrel20/latest/trigp1test_TrigEDMCheck_physicsV7_currentT0.reference  
   pre_condition if [[ $(find ../Trigreco_physicsV7_currentT0/myAOD.pool.root -type f -size +1000000c 2>/dev/null) ]] ; then test -e ../Trigreco_physicsV7_currentT0/myAOD.pool.root ; else test -e non_existing_file ; fi
-  athena_cmd source $AtlasSetup/scripts/asetup.sh AtlasProduction,20.7.X.Y,latest_copied_release ; athena.py -c 'fileList=["../Trigreco_physicsV7_currentT0/myAOD.pool.root"]' 
+  athena_cmd source $AtlasSetup/scripts/asetup.sh latest,Athena,21.0 ; athena.py -c 'fileList=["../Trigreco_physicsV7_currentT0/myAOD.pool.root"]' 
 
 
 ### this does not work due to conditions...
@@ -261,7 +261,7 @@ test 45
   fullregtest REGTEST  /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/ATN/postrel20/latest/trigp1test_TrigEDMCheck_mcV6_currentT0.reference  
   pre_condition test if [[ $(find ../Trig_reco_mcV6_currentT0/myESD.pool.root -type f -size +1000000c 2>/dev/null) ]] ; then test -e ../Trig_reco_mcV6_currentT0/myESD.pool.root ; else test -e non_existing_file ; fi
   pre_command ln -s ../Trig_reco_mcV6_currentT0/myESD.pool.root ESD.pool.root
-  athena_cmd source $AtlasSetup/scripts/asetup.sh AtlasProduction,20.7.X.Y,latest_copied_release ; athena.py -c 'fileList=["ESD.pool.root"]' TrigP1Test/testAthenaP1ESD_TrigEDMCheck_data.py
+  athena_cmd source $AtlasSetup/scripts/asetup.sh latest,Athena,21.0 ; athena.py -c 'fileList=["ESD.pool.root"]' TrigP1Test/testAthenaP1ESD_TrigEDMCheck_data.py
 
 
 test 46
@@ -471,7 +471,7 @@ test 80
   doc RAWtoESD on output from HLT_physicsV7
   checklog --config checklogTrigP1Test.conf --showexcludestats
   pre_condition test -e '../HLT_physicsV7/HLT_physicsV7._0001.data'
-  athena_cmd source $AtlasSetup/scripts/asetup.sh AtlasProduction,20.7.X.Y,latest_copied_release ; Reco_tf.py  --preExec 'from CaloRec.CaloCellFlags import jobproperties;jobproperties.CaloCellFlags.doLArHVCorr=False;jobproperties.CaloCellFlags.doPileupOffsetBCIDCorr.set_Value_and_Lock(False);from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doInnerDetectorCommissioning.set_Value_and_Lock(True);InDetFlags.useBroadClusterErrors.set_Value_and_Lock(False);DQMonFlags.doStreamAwareMon=False;DQMonFlags.enableLumiAccess=False;from JetRec.JetRecFlags import jetFlags;jetFlags.useTracks=False;DQMonFlags.doLVL1CaloMon=False;DQMonFlags.doCTPMon=False;' --autoConfiguration 'everything'  --inputBSFile ../HLT_physicsV7/HLT_physicsV7._0001.data   --maxEvents 5 --outputESDFile RAWtoESD.pool.root 
+  athena_cmd source $AtlasSetup/scripts/asetup.sh latest,Athena,21.0 ; Reco_tf.py  --preExec 'from CaloRec.CaloCellFlags import jobproperties;jobproperties.CaloCellFlags.doLArHVCorr=False;jobproperties.CaloCellFlags.doPileupOffsetBCIDCorr.set_Value_and_Lock(False);from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doInnerDetectorCommissioning.set_Value_and_Lock(True);InDetFlags.useBroadClusterErrors.set_Value_and_Lock(False);DQMonFlags.doStreamAwareMon=False;DQMonFlags.enableLumiAccess=False;from JetRec.JetRecFlags import jetFlags;jetFlags.useTracks=False;DQMonFlags.doLVL1CaloMon=False;DQMonFlags.doCTPMon=False;' --autoConfiguration 'everything'  --inputBSFile ../HLT_physicsV7/HLT_physicsV7._0001.data   --maxEvents 5 --outputESDFile RAWtoESD.pool.root 
   post_command checkFile.py RAWtoESD.pool.root > ESD.txt
 
 test 81
@@ -482,7 +482,7 @@ test 81
   fullregtest    REGTEST  /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/ATN/postrel20/latest/trigp1test_TrigEDMCheck_physicsV7.reference
   pre_condition if [[ $(find ../RAWtoESD_physicsV7/RAWtoESD.pool.root -type f -size +1000000c 2>/dev/null) ]] ; then test -e ../RAWtoESD_physicsV7/RAWtoESD.pool.root ; else test -e non_existing_file ; fi
   pre_command ln -s ../RAWtoESD_physicsV7/RAWtoESD.pool.root ESD.pool.root
-  athena_cmd source $AtlasSetup/scripts/asetup.sh AtlasProduction,20.7.X.Y,latest_copied_release ; athena.py -c 'fileList=["ESD.pool.root"]' 
+  athena_cmd source $AtlasSetup/scripts/asetup.sh latest,Athena,21.0 ; athena.py -c 'fileList=["ESD.pool.root"]' 
 
 test 82
   name TrigDecTool_physicsV7
@@ -701,7 +701,7 @@ test 164
   name AthenaTrigBS_L2EFMerging
   doc testing trigger results w/wo merging L2/EF, based on AthenaTrigRDO with run_standalone.py
   joboptions testAthenaL2EFMerging.py
-  athena_args -c 'EvtMax=15; testPhysicsV6=True; BSRDOInput="root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/data16_13TeV.00307126.physics_eb_zmm_egz.merged.RAW.selected._0001.data"' 
+  athena_args -c 'EvtMax=15; testPhysicsV7=True; BSRDOInput="root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/data16_13TeV.00307126.physics_eb_zmm_egz.merged.RAW.selected._0001.data"' 
   #athena_args -c 'doHLT=True; useCONDBR2=False; setGlobalTag="COMCOND-HLTP-004-03-VAL-01"; setDetDescr="ATLAS-R1-2012-02-01-00"; EvtMax=15; testPhysicsV6=True; BSRDOInput="root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/data12_8TeV.00212967.physics_eb_zee_zmumu_cc._0001.data"'
   checklog --config checklogTriggerTest.conf --showexcludestats
   checkmerge expert-monitoring.root /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/ATN/postrel20/latest/triggertest_AthenaTrigBS_L2EFMerging.root 0 
@@ -746,3 +746,15 @@ test 181
 #  post_command save_to_refdir.sh HLT_physicsV7._0001.data /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/online/references/ATN/latest
   post_command chainDump.py -n -S  --rootDirs=TrigSteer_HLT --rootHists=ChainAcceptance --rootHists=NumberOfActiveTEs
   post_test checkHist histSizes.py -t expert-monitoring.root ; cp post_test_checkHist.log checkHistathenaHLT.reference.new ; diff checkHistathenaHLT.reference.new /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/ATN/postrel20/latest/trigp1test_checkHistathenaHLT.reference 
+  extra_failure_codes ATHENA_ERROR_IN_LOG
+
+test 182
+  name HLT_physicsV7_FTK
+  doc athenaHLT on data with Physics_pp_v7 menu and doFTK currently from 2016 EB data with FTK added
+  filterlog filterREGTEST.py
+  checklog --config checklogTrigP1Test.conf --showexcludestats
+  fullregtest REGTEST  /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/ATN/postrel20/latest/trigp1test_HLT_physicsV7_FTK.reference
+  rootcomp   /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/ATN/postrel20/latest/trigp1test_HLT_physicsV7_FTK.root
+  checkcount /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/ATN/postrel20/latest/trigp1test_HLT_physicsV7_FTK.root 1 HLT
+  athena_cmd athenaHLT.py   -o HLT_physicsV7_FTK  -n 75 -f  root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/RAW.11043881._020686.pool.root.1 -c 'testPhysicsV7=True;HLTOutputLevel=INFO;doValidation=True;fpeAuditor=True;from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.doFTK=True' TriggerRelease/runHLT_standalone.py
+  post_command chainDump.py -n -S
diff --git a/Trigger/TrigValidation/TrigP1Test/share/testCheckKeys.sh b/Trigger/TrigValidation/TrigP1Test/share/testCheckKeys.sh
index d14d6edd70cc96e21632a56a4c143dd482919f50..302577356b2941a9efd1af56c4acbf306b5a0a69 100755
--- a/Trigger/TrigValidation/TrigP1Test/share/testCheckKeys.sh
+++ b/Trigger/TrigValidation/TrigP1Test/share/testCheckKeys.sh
@@ -9,17 +9,12 @@ else
 fi
 
 #setup the TT
-get_files -data -symlink TrigDb.jar
-get_files -data -symlink TriggerTool.jar
-export JAVA_VER="1.8.0"
-source /afs/cern.ch/sw/lcg/external/Java/bin/setup.sh
-export _JAVA_OPTIONS="-Xms256m -Xmx1048m"
+export _JAVA_OPTIONS="-Xms512m -Xmx1048m"
 export DBConn="TRIGGERDBATN"
 
-export TDAQ_VERSION="tdaq-07-01-00"
-export TDAQ_RELEASE_BASE=/afs/cern.ch/atlas/project/tdaq/prod
-export TDAQ_DB_PATH=/afs/cern.ch/atlas/project/tdaq/prod/tdaq/$TDAQ_VERSION/installed/share/data:/afs/cern.ch/atlas/project/tdaq/prod/tdaq/$TDAQ_VERSION/installed/databases:/afs/cern.ch/atlas/project/tdaq/prod/tdaq/$TDAQ_VERSION/databases
-source $TDAQ_RELEASE_BASE/../cmake/cmake_tdaq/bin/cm_setup.sh $TDAQ_VERSION
+source $TDAQ_RELEASE_BASE/tdaq/$TDAQ_VERSION/installed/setup.sh $TDAQ_VERSION
+export PATH=$PATH:$TDAQ_JAVA_HOME/bin
+
 export TNS_ADMIN=/afs/cern.ch/atlas/offline/external/oracle/latest/admin
 
 ##get the right pattern to load Lvl1 xml file
@@ -60,7 +55,7 @@ get_files -xmls LVL1config.dtd
 #upload the first key
 echo "upload the first key"
 
-#cmd1="java -Duser.timezone=CET -cp \"*:$TDAQ_CLASSPATH\" triggertool.TriggerTool -up -release 'P1HLT' --l1_menu $l1menu --topo_menu $l1topo -hlt $hltmenu1 --hlt_setup $hlt__setup1 --name 'P1HLTtest' -l INFO --dbConn $DBConn -w_n 60 -w_t 60 "
+cmd1="/afs/cern.ch/user/a/attrgcnf/public/TriggerTool/cmake/run_TriggerTool_MenuExperts.sh -up -release 'AthenaP1' --l1_menu $l1menu --topo_menu $l1topo -hlt $hltmenu1 --hlt_setup $hlt__setup1 --name 'AthenaP1test' -l INFO --dbConn $DBConn -w_n 60 -w_t 60 "
 
 
 echo $cmd1
@@ -91,7 +86,7 @@ hlt__setup2=ef_Default_setup_rerun.xml
 #upload the second key
 echo "upload the second key"
 
-cmd2="java -Duser.timezone=CET -cp \"*:$TDAQ_CLASSPATH\" triggertool.TriggerTool -up -release 'P1HLT' --l1_menu $l1menu --topo_menu $l1topo -hlt $hltmenu2 --hlt_setup $hlt__setup2 --name 'P1HLTtest' -l INFO --dbConn $DBConn -w_n 60 -w_t 60 "
+cmd2="/afs/cern.ch/user/a/attrgcnf/public/TriggerTool/cmake/run_TriggerTool_MenuExperts.sh -up -release 'AthenaP1' --l1_menu $l1menu --topo_menu $l1topo -hlt $hltmenu2 --hlt_setup $hlt__setup2 --name 'AthenaP1test' -l INFO --dbConn $DBConn -w_n 60 -w_t 60 "
 
 echo $cmd2 "&> uploadSMK2.log"
 eval $cmd2 &> uploadSMK2.log
@@ -115,10 +110,10 @@ smk2=`grep SM MenusKeys2.txt | cut -f8 -d" "| cut -f1 -d":"`
 smkDiffFile=diff_smk_${smk1}_${smk2}.xml
 
 echo "diff key 1 vs key 2"
-#java -jar TriggerTool.jar -diff -smk1 $smk1 -smk2 $smk2 -name "P1HLTtest" -dbConn $DBConn -xml $smkDiffFile -w_n 50 -w_t 60
-echo "java  -Duser.timezone=CET -cp \"*:$TDAQ_CLASSPATH\" triggertool.TriggerTool -diff -smk1 $smk1 -smk2 $smk2 -name "P1HLTtest" -dbConn $DBConn -xml diff_smk_${smk1}_${smk2}.xml -w_n 50 -w_t 60"
-java -Duser.timezone=CET -cp "*:$TDAQ_CLASSPATH" triggertool.TriggerTool -diff -smk1 $smk1 -smk2 $smk2 -name "P1HLTtest" -dbConn $DBConn -xml diff_smk_${smk1}_${smk2}.xml -w_n 50 -w_t 60
-
+#java -jar TriggerTool.jar -diff -smk1 $smk1 -smk2 $smk2 -name "AthenaP1test" -dbConn $DBConn -xml $smkDiffFile -w_n 50 -w_t 60
+cmd3="/afs/cern.ch/user/a/attrgcnf/public/TriggerTool/cmake/run_TriggerTool_MenuExperts.sh -diff -smk1 $smk1 -smk2 $smk2 -name 'AthenaP1test' -dbConn $DBConn -xml diff_smk_${smk1}_${smk2}.xml -w_n 50 -w_t 60"
+echo $cmd3 "&> uploadSMK3.log"
+eval $cmd3 &> uploadSMK3.log
 
 
 ### # to be reworked:
diff --git a/Trigger/TrigValidation/TrigP1Test/share/testUploadMenuKeys.sh b/Trigger/TrigValidation/TrigP1Test/share/testUploadMenuKeys.sh
index e268564fdc7633bbecd4ef4412d16b78b7027d5f..24d4c32ec1310df803318e5a492186999eef92f7 100755
--- a/Trigger/TrigValidation/TrigP1Test/share/testUploadMenuKeys.sh
+++ b/Trigger/TrigValidation/TrigP1Test/share/testUploadMenuKeys.sh
@@ -9,17 +9,12 @@ else
 fi
 
 #setup the TT
-get_files -data -symlink TrigDb.jar
-get_files -data -symlink TriggerTool.jar
-export JAVA_VER="1.8.0"
-source /afs/cern.ch/sw/lcg/external/Java/bin/setup.sh
 export _JAVA_OPTIONS="-Xms512m -Xmx1048m"
 export DBConn="TRIGGERDBATN"
 
-export TDAQ_VERSION="tdaq-07-01-00"
-export TDAQ_RELEASE_BASE=/afs/cern.ch/atlas/project/tdaq/prod
-export TDAQ_DB_PATH=/afs/cern.ch/atlas/project/tdaq/prod/tdaq/$TDAQ_VERSION/installed/share/data:/afs/cern.ch/atlas/project/tdaq/prod/tdaq/$TDAQ_VERSION/installed/databases:/afs/cern.ch/atlas/project/tdaq/prod/tdaq/$TDAQ_VERSION/databases
-source $TDAQ_RELEASE_BASE/../cmake/cmake_tdaq/bin/cm_setup.sh $TDAQ_VERSION
+source $TDAQ_RELEASE_BASE/tdaq/$TDAQ_VERSION/installed/setup.sh $TDAQ_VERSION
+export PATH=$PATH:$TDAQ_JAVA_HOME/bin
+
 export TNS_ADMIN=/afs/cern.ch/atlas/offline/external/oracle/latest/admin
 
 ##get the right pattern to load LVl1 xml file
@@ -83,13 +78,13 @@ get_files -xmls LVL1config.dtd
 
 
 
-p1_rel="P1HLT"
+p1_rel="AthenaP1"
 if [ $NICOS_ATLAS_RELEASE ]
 then
     p1_rel=$NICOS_ATLAS_RELEASE
 fi
 
-nightly="P1HLTTest"
+nightly="AthenaP1Test"
 if [ $NICOS_NIGHTLY_NAME ]
 then
     nightly="$NICOS_NIGHTLY_NAME"
@@ -106,7 +101,8 @@ rundate=`date +%F" "%H:%M" "`
 
 # Upload SMK
 
-cmd="java -Duser.timezone=CET -cp \"*:$TDAQ_CLASSPATH\"  triggertool.TriggerTool -up -release $p1_rel --l1_menu $l1menu --topo_menu $l1topo -hlt $hltmenu1 --hlt_setup $hlt__setup1 --name 'P1HLTtest'  -l INFO --SMcomment \"${rundate}${nightly}_${rel}\" --dbConn $DBConn -w_n 50 -w_t 60"
+cmd="/afs/cern.ch/user/a/attrgcnf/public/TriggerTool/cmake/run_TriggerTool_MenuExperts.sh -up -release $p1_rel --l1_menu $l1menu --topo_menu $l1topo -hlt $hltmenu1 --hlt_setup $hlt__setup1 --name 'AthenaP1Test' -l INFO --SMcomment \"${rundate}${nightly}_${rel}\" --dbConn $DBConn -w_n 50 -w_t 60"
+
 echo $cmd "&> uploadSMK.log"
 eval $cmd &> uploadSMK.log
 
@@ -149,7 +145,7 @@ echo "Generating RuleBook_HLTPS_Physics${lumi}.xml by running\ncnvXML.py --ps_na
 cnvXML.py --ps_name=Physics${lumi} --ps_xml=prescales${lumi}.xml
 
 # Upload
-java -jar TriggerTool.jar -dbConn $DBConn -psup RuleBook_HLTPS_Physics${lumi}.xml -smk $smk -w_n 50 -w_t 60 &> uploadPSK.log
+afs/cern.ch/user/a/attrgcnf/public/TriggerTool/cmake/run_TriggerTool_MenuExperts.sh -dbConn $DBConn -psup RuleBook_HLTPS_Physics${lumi}.xml -smk $smk -w_n 50 -w_t 60 &> uploadPSK.log
 hltpsk2=`grep 'HLT Prescale set saved with id' uploadPSK.log | sed 's#.*: \([0-9]*\)\.#\1#'`
 if [ -z "$hltpsk2" ]; then
     echo "ERROR Upload of prescale key failed"
diff --git a/Trigger/TrigValidation/TrigP1Test/share/trigp1test_athenaHLT.py b/Trigger/TrigValidation/TrigP1Test/share/trigp1test_athenaHLT.py
index 2b1745fcab46ba9605287d73120aeedd73843541..3341207e957b67fb09a922ff0ea724ee60407b1e 100755
--- a/Trigger/TrigValidation/TrigP1Test/share/trigp1test_athenaHLT.py
+++ b/Trigger/TrigValidation/TrigP1Test/share/trigp1test_athenaHLT.py
@@ -3,7 +3,7 @@
 
 from glob import glob
 from fnmatch import fnmatch
-from subprocess import Popen, PIPE, STDOUT, call
+from subprocess import Popen, PIPE, STDOUT, check_call
  
 #EOS walking Code courtesy of James Robinson
 def get_file_list( DATAPATH ) :
@@ -22,7 +22,9 @@ def get_file_list( DATAPATH ) :
           eos_ls = Popen( args = cmd, bufsize = 1, shell = False, stdout = PIPE, stderr = STDOUT )
           while eos_ls.poll() is None :
             line = eos_ls.stdout.readline()
-            if line : subdirectories.append( line.replace('\n','') )
+            if line : 
+              if not 'INFO: ' in line:
+                subdirectories.append( line.replace('\n','') )
           for subdirectory in subdirectories :
             if fnmatch( subdirectory, directory ) :
               new_paths.append( path+'/'+subdirectory )
@@ -54,8 +56,9 @@ def main():
   print subset 
 
   trigCmd = "athenaHLT.py -f \"" + str(subset) + "\" -c \"" + opts.modifiers + "\" TriggerRelease/runHLT_standalone.py"
-  call("echo " + trigCmd, shell=True)
-  call(trigCmd, shell=True)
+  trigCmdEsc = trigCmd.replace("\\","\\\\").replace("\"","\\\"")#For output to echo
+  check_call("echo \"" + trigCmdEsc + "\"", shell=True)#Call echo rather than print so that it completes first
+  check_call(trigCmd, shell=True)
 
 if __name__ == "__main__":
   main()
diff --git a/Trigger/TrigValidation/TrigP1Test/test/TrigP1Test_TestConfiguration.xml b/Trigger/TrigValidation/TrigP1Test/test/TrigP1Test_TestConfiguration.xml
index 1c183bcdf7893681ddc6cb9a699aefeb19012bbb..f82ee820da4b9e42c5998ef3e3efed8d5624044a 100644
--- a/Trigger/TrigValidation/TrigP1Test/test/TrigP1Test_TestConfiguration.xml
+++ b/Trigger/TrigValidation/TrigP1Test/test/TrigP1Test_TestConfiguration.xml
@@ -127,17 +127,6 @@
         
         
         
-        
-        
-        <TEST name="HLT_mcV6" type="script" suite="TP1mc">
-            <options_atn>trigtest.pl --cleardir --test HLT_mcV6 --rundir HLT_mcV6 --conf TrigP1Test.conf</options_atn>
-            <timelimit>50</timelimit>      
-            <expectations>
-                <errorMessage>FAILURE </errorMessage>
-                <returnValue>0</returnValue>
-            </expectations>
-        </TEST>
-
         <TEST name="HLT_mcV7" type="script" suite="TP1mc">
             <options_atn>trigtest.pl --cleardir --test HLT_mcV7 --rundir HLT_mcV7 --conf TrigP1Test.conf</options_atn>
             <timelimit>50</timelimit>      
@@ -173,7 +162,7 @@
         <TEST name="RAWtoESD_physicsV7" type="script" suite="TP1phys1"> 
             <options_atn>trigtest.pl --cleardir  --test RAWtoESD_physicsV7 --rundir RAWtoESD_physicsV7 --conf TrigP1Test.conf</options_atn> 
             <timelimit>30</timelimit> 
-            <nightly_exclude> MIG LCG EXP CMAKE 22 21 20.99 </nightly_exclude>
+            <nightly_exclude> MIG LCG EXP CMAKE 22 20.99 </nightly_exclude>
             <expectations> 
                 <errorMessage>FAILURE </errorMessage> 
                 <returnValue>0</returnValue> 
@@ -206,6 +195,16 @@
                 <returnValue>0</returnValue> 
             </expectations> 
         </TEST> 
+
+        <TEST name="HLT_physicsV7_FTK" type="script" suite="TP1phys2"> 
+            <options_atn>trigtest.pl --cleardir --test HLT_physicsV7_FTK --rundir HLT_physicsV7_FTK --conf TrigP1Test.conf</options_atn> 
+            <timelimit>20</timelimit> 
+            <expectations> 
+                <errorMessage>FAILURE </errorMessage> 
+                <returnValue>0</returnValue> 
+            </expectations> 
+        </TEST> 
+
         
         <TEST name="HLT_physicsV7_ALFAMon" type="script" suite="TP1phys2"> 
             <options_atn>trigtest.pl --cleardir --test HLT_physicsV7_ALFAMon --rundir HLT_physicsV7_ALFAMon --conf TrigP1Test.conf</options_atn> 
@@ -303,7 +302,7 @@
         
         <TEST name="UploadMenuKeys" type="script" suite="TP1menu">
             <options_atn>trigtest.pl --cleardir  --test UploadMenuKeys --rundir UploadMenuKeys --conf TrigP1Test.conf</options_atn>
-            <timelimit>40</timelimit>
+            <timelimit>120</timelimit>
             <platform>opt</platform>
             <nightly_exclude> MIG LCG EXP CMAKE 22 20.99 </nightly_exclude>
             <!--<mailto>joerg.stelzer@cern.ch</mailto>-->    
@@ -339,7 +338,7 @@
         <!-- CheckKeysV7 needs HLT_physicsV7_rerun -->
         <TEST name="CheckKeysV7" type="script" suite="TP1menu">
             <options_atn>trigtest.pl --cleardir  --test CheckKeysV7 --rundir CheckKeysV7 --conf TrigP1Test.conf</options_atn>
-            <timelimit>120</timelimit>     
+            <timelimit>180</timelimit>     
             <mailto>joerg.stelzer@cern.ch</mailto> 
             <platform>opt</platform>
             <nightly_exclude> MIG LCG EXP CMAKE 22 20.99 </nightly_exclude>
@@ -363,7 +362,7 @@
         
         <TEST name="UploadMenuKeys_rerunLVL1" type="script" suite="TP1menuRL1">
             <options_atn>trigtest.pl --cleardir  --test UploadMenuKeys_rerunLVL1 --rundir UploadMenuKeys_rerunLVL1 --conf TrigP1Test.conf</options_atn>
-            <timelimit>59</timelimit>
+            <timelimit>120</timelimit>
             <!--<mailto>joerg.stelzer@cern.ch</mailto>-->    
             <platform>opt</platform>
             <nightly_exclude> MIG LCG EXP CMAKE 22 20.99 </nightly_exclude>
@@ -591,7 +590,7 @@
                 <jobTransformJobName>athenaHLT_on_data_leakCheck</jobTransformJobName>
                 <jobTransformCmd>
                     export LD_PRELOAD=/afs/cern.ch/sw/lcg/external/libunwind/5c2cade/$CMTCONFIG/lib/libunwind.so; 
-                    athenaHLT.py --stdcmalloc --leak-check-execute  -o HLT_physicsV7  -n 100 -f /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/atn-test/data15_13TeV.00266904.physics_EnhancedBias.merge.RAW._lb0452._SFO-1._0001.1 -c 'testPhysicsV6=True;HLTOutputLevel=WARNING;doValidation=True' TrigP1Test/runHLT_standaloneRTT_leakCheck.py
+                    athenaHLT.py --stdcmalloc --leak-check-execute  -o HLT_physicsV7  -n 25 -f '/eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/data16_13TeV.00309640.physics_EnhancedBias.merge.RAW/data16_13TeV.00309640.physics_EnhancedBias.merge.RAW._lb0628._SFO-1._0001.1' -c "setMenu='Physics_pp_v7_tight_physics_prescale';setLVL1XML='TriggerMenuXML/LVL1config_Physics_pp_v7.xml';setL1TopoXML=setLVL1XML.replace('/LVL1','/L1Topo');HLTOutputLevel=WARNING;doValidation=True" TrigP1Test/runHLT_standaloneRTT_leakCheck.py
                 </jobTransformCmd>
                 <group>AtlasHLTChainTest</group>
                 <queue>long</queue>
@@ -603,7 +602,7 @@
                 </doc>
                 <jobTransformJobName>athenaHLT_LatestRun_MCV7</jobTransformJobName>
                 <jobTransformCmd>
-                    trigp1test_athenaHLT.py --nfiles=1 --dir='/eos/atlas/atlastier0/rucio/data16_13TeV/physics_Main/' --modifiers="testMCV7=True;fpeAuditor=True;from PerfMonComps.PerfMonFlags import jobproperties as pmon_properties ; pmon_properties.PerfMonFlags.doSemiDetailedMonitoring=True"
+                    trigp1test_athenaHLT.py --nfiles=1 --dir='/eos/atlas/atlastier0/rucio/data17_13TeV/physics_Main/' --modifiers="testMCV7=True;fpeAuditor=True;from PerfMonComps.PerfMonFlags import jobproperties as pmon_properties ; pmon_properties.PerfMonFlags.doSemiDetailedMonitoring=True"
                 </jobTransformCmd>
                 <group>AtlasHLTChainTest</group>
                 <queue>long</queue>
diff --git a/Trigger/TrigValidation/TriggerTest/Testing/TriggerTest.conf b/Trigger/TrigValidation/TriggerTest/Testing/TriggerTest.conf
index b15cc2df29d119d0b402f083f8d5ea0395be6944..3af73ecd8e7a50707f74e3dcf6842d2fb8c2e2f2 100644
--- a/Trigger/TrigValidation/TriggerTest/Testing/TriggerTest.conf
+++ b/Trigger/TrigValidation/TriggerTest/Testing/TriggerTest.conf
@@ -12,7 +12,7 @@
 #   the others
 # - multiple regtest can be specified
 # See example and documentation at end for more details
-
+FTK
 # tests for trigger QA and nightly builds
 # see other conf files for more tests
 
@@ -88,7 +88,7 @@ test 25
   name AthenaTrigRDO_MC_pp_v6_no_prescale_toxAOD_FTK
   doc FTK_MC_pp_v6_no_prescale
   joboptions testCommonSliceAthenaTrigRDOtoAOD.py
-  athena_args -c 'from TriggerJobOpts.TriggerFlags import TriggerFlags as TF;TF.run2Config.set_Value_and_Lock("2016"); enableCostMonitoring=True;RunningRTT=True;menu="MC_pp_v6_no_prescale";jp.AthenaCommonFlags.EvtMax.set_Value_and_Lock(3);jp.Rec.OutputLevel=WARNING;LVL1OutputLevel=WARNING;HLTOutputLevel=WARNING;jp.AthenaCommonFlags.FilesInput=["root://eosatlas//eos/atlas/atlascerngroupdisk/proj-sit/trigindet/user.jahreda.valid1.110401.ttbar.RDO_FTK.july28.64tower.PCM101.FixEndcapFalse.e3099_s2578_r7579.redoNov1_EXT2/user.jahreda.9778320.EXT2._000010.RDO_FTK.root"];from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.doFTK=True' 
+  athena_args -c 'from TriggerJobOpts.TriggerFlags import TriggerFlags as TF;TF.run2Config.set_Value_and_Lock("2016"); enableCostMonitoring=True;RunningRTT=True;menu="MC_pp_v6_no_prescale";jp.AthenaCommonFlags.EvtMax.set_Value_and_Lock(3);jp.Rec.OutputLevel=WARNING;LVL1OutputLevel=WARNING;HLTOutputLevel=WARNING;jp.AthenaCommonFlags.FilesInput=["root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/RDO_FTK.10733709._000019.pool.root.1"];from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.doFTK=True' 
   checklog --config checklogTriggerTest.conf --showexcludestats
   regtest TrigSteer_HLT.TrigChainMoniValidation REGTEST /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/ATN/postrel20/latest/triggertest_AthenaTrigRDO_FTK_MC_pp_v6_no_prescale.TrigChainMoniValidation.reference
   rootcomp /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/ATN/postrel20/latest/triggertest_AthenaTrigRDO_FTK_MC_pp_v6_no_prescale.root
@@ -107,12 +107,13 @@ test 26
   checkcount /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/ATN/postrel20/latest/triggertest_AthenaTrigRDO_MC_pp_v7.root 1
   pre_command RecExCommon_links.sh
   post_command chainDump.py -n -S
+  extra_failure_codes ATHENA_ERROR_IN_LOG
 
 test 27
   name AthenaTrigRDO_MC_pp_v7_no_prescale_toxAOD_FTK
   doc FTK_MC_pp_v7_no_prescale
   joboptions testCommonSliceAthenaTrigRDOtoAOD.py
-  athena_args -c "enableCostMonitoring=True;RunningRTT=True;menu='MC_pp_v7_no_prescale';jp.AthenaCommonFlags.EvtMax.set_Value_and_Lock(3);jp.Rec.OutputLevel=WARNING;LVL1OutputLevel=WARNING;HLTOutputLevel=WARNING;jp.AthenaCommonFlags.FilesInput=['root://eosatlas//eos/atlas/atlascerngroupdisk/proj-sit/trigindet/user.jahreda.valid1.110401.ttbar.RDO_FTK.july28.64tower.PCM101.FixEndcapFalse.e3099_s2578_r7579.redoNov1_EXT2/user.jahreda.9778320.EXT2._000010.RDO_FTK.root'];from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.doFTK=True" 
+  athena_args -c "enableCostMonitoring=True;RunningRTT=True;menu='MC_pp_v7_no_prescale';jp.AthenaCommonFlags.EvtMax.set_Value_and_Lock(3);jp.Rec.OutputLevel=WARNING;LVL1OutputLevel=WARNING;HLTOutputLevel=WARNING;jp.AthenaCommonFlags.FilesInput=['root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/RDO_FTK.10733709._000019.pool.root.1'];from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.doFTK=True" 
   checklog --config checklogTriggerTest.conf --showexcludestats
   regtest TrigSteer_HLT.TrigChainMoniValidation REGTEST /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/ATN/postrel20/latest/triggertest_AthenaTrigRDO_FTK_MC_pp_v7_no_prescale.TrigChainMoniValidation.reference
   rootcomp /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/ATN/postrel20/latest/triggertest_AthenaTrigRDO_FTK_MC_pp_v7_no_prescale.root
diff --git a/Trigger/TrigValidation/TriggerTest/share/TriggerTestCommon.py b/Trigger/TrigValidation/TriggerTest/share/TriggerTestCommon.py
index 4e5e3714b092643725f5667a5463ad0c9b5b149d..603397d7da36925c395cf4d7d7af18c9b6cf9ca6 100644
--- a/Trigger/TrigValidation/TriggerTest/share/TriggerTestCommon.py
+++ b/Trigger/TrigValidation/TriggerTest/share/TriggerTestCommon.py
@@ -104,3 +104,8 @@ if hasattr(svcMgr,'THistSvc'):
 #from AthenaCommon.AlgSequence import AlgSequence
 print AlgSequence
 print ServiceMgr
+
+# Tempory - 24/05/17
+from TrigT2CaloCommon.TrigT2CaloCommonConfig import TrigDataAccess;
+ToolSvc+=TrigDataAccess();ToolSvc.TrigDataAccess.fullTileMode=False;
+ToolSvc.TileRegionSelectorTable.FullRODs=False;
diff --git a/Trigger/TrigValidation/TriggerTest/test/TriggerTest_TestConfiguration.xml b/Trigger/TrigValidation/TriggerTest/test/TriggerTest_TestConfiguration.xml
index 5103d656040cf1553c1d5a027e1f9fa9fcd44f69..1e7549a6116e893d8794abb6eeb1a5c3b51a1603 100755
--- a/Trigger/TrigValidation/TriggerTest/test/TriggerTest_TestConfiguration.xml
+++ b/Trigger/TrigValidation/TriggerTest/test/TriggerTest_TestConfiguration.xml
@@ -36,15 +36,6 @@
     <atn>
         
         <!-- 2 -->
-        <TEST name="AthenaTrigRDO_MC_pp_v6" type="script" suite="tt_20">
-            <options_atn>trigtest.pl --test AthenaTrigRDO_MC_pp_v6 --run AthenaTrigRDO_MC_pp_v6 --conf TriggerTest.conf</options_atn>
-            <timelimit>60</timelimit>
-            <author>Trigger Validation</author>
-            <expectations>
-                <errorMessage>FAILURE </errorMessage>
-                <returnValue>0</returnValue>
-            </expectations>
-        </TEST>
         
         <TEST name="AthenaTrigRDO_Physics_pp_v7" type="script" suite="tt_21">
             <options_atn>trigtest.pl --test AthenaTrigRDO_Physics_pp_v7 --run AthenaTrigRDO_Physics_pp_v7 --conf TriggerTest.conf</options_atn>
@@ -85,16 +76,6 @@
                 <returnValue>0</returnValue>
             </expectations>
         </TEST>
-        
-        <TEST name="AthenaTrigRDO_MC_pp_v6_no_prescale_toxAOD_FTK" type="script" suite="tt_25">
-            <options_atn>trigtest.pl --test AthenaTrigRDO_MC_pp_v6_no_prescale_toxAOD_FTK --run AthenaTrigRDO_MC_pp_v6_no_prescale_toxAOD_FTK --conf TriggerTest.conf</options_atn>
-            <timelimit>60</timelimit>
-            <author>Trigger Validation</author>
-            <expectations>
-                <errorMessage>FAILURE </errorMessage>
-                <returnValue>0</returnValue>
-            </expectations>
-        </TEST>
 
         <TEST name="AthenaTrigRDO_MC_pp_v7" type="script" suite="tt_26">
             <options_atn>trigtest.pl --test AthenaTrigRDO_MC_pp_v7 --run AthenaTrigRDO_MC_pp_v7 --conf TriggerTest.conf</options_atn>
@@ -485,82 +466,6 @@
                 <queue>long</queue>
                 <alwaysRunPostProc />
             </athena>
-            
-            
-            <athena userJobId="MC_pp_v6" doMonitoring="True">
-                <doc>
-                    MC_pp_v6 menu on ttbar RDO 
-                </doc>
-                <displayName>MC_pp_v6</displayName>
-                <commandLineFlags>
-                    from TriggerJobOpts.TriggerFlags import TriggerFlags as TF;TF.run2Config.set_Value_and_Lock("2016"); enableCostMonitoring=True;RunningRTT=True;menu='MC_pp_v6';jp.AthenaCommonFlags.EvtMax.set_Value_and_Lock(500);jp.Rec.OutputLevel=WARNING;LVL1OutputLevel=WARNING;HLTOutputLevel=WARNING;dsName='/eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00';fileRange=[1,2]
-                </commandLineFlags>
-                <options>testCommonSliceAthenaTrigRDO.py</options>
-                <package>Trigger/TrigValidation/TriggerTest</package>
-                <group>TriggerTestMonitorHistos</group>
-                <queue>long</queue>
-                <alwaysRunPostProc />
-            </athena>
-            
-            <athena userJobId="MC_pp_v6_toAOD" doMonitoring="True" >
-                <doc>
-                    Runs MC_pp_v6 menu on ttbar dumping 1k events in an xAOD 
-                </doc>
-                <displayName>MC_pp_v6_toAOD</displayName>
-                <commandLineFlags>
-                    from TriggerJobOpts.TriggerFlags import TriggerFlags as TF;TF.run2Config.set_Value_and_Lock("2016"); RunningRTT=True;menu='MC_pp_v6';jp.AthenaCommonFlags.EvtMax.set_Value_and_Lock(500);jp.Rec.OutputLevel=WARNING;LVL1OutputLevel=WARNING;HLTOutputLevel=WARNING;dsName='/eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00';fileRange=[1,2] 
-                </commandLineFlags>
-                <options>testCommonSliceAthenaTrigRDOtoAOD.py</options>
-                <package>Trigger/TrigValidation/TriggerTest</package>
-                <group>TriggerTestMonitorHistos</group>
-                <queue>long</queue>
-                <alwaysRunPostProc />
-            </athena>
-            
-            <athena userJobId="MC_pp_v6_no_prescale_toxAOD_FTK" doMonitoring="True" >
-                <doc>
-                    Runs MC_pp_v6_no_prescale menu on user.jahreda.mc15_13TeV.410000.recon.RDO.e3698_s2608_s2183_r6630_20.7.2.3.updatesJohn.newFormat.v1_EXT2.58456700 dumping 500 events in an xAOD
-                </doc>
-                <displayName>MC_pp_v6_no_prescale_toxAOD_FTK</displayName>
-                <commandLineFlags>
-                    from TriggerJobOpts.TriggerFlags import TriggerFlags as TF;TF.run2Config.set_Value_and_Lock("2016"); RunningRTT=True;menu='MC_pp_v6_no_prescale';jp.AthenaCommonFlags.EvtMax.set_Value_and_Lock(500);jp.Rec.OutputLevel=WARNING;LVL1OutputLevel=WARNING;HLTOutputLevel=WARNING;from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.doFTK.set_Value_and_Lock(True);dsName='/eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/user.jahreda.mc15_13TeV.410000.recon.RDO.e3698_s2608_s2183_r6630_20.7.2.3.updatesJohn.newFormat.v1_EXT2.58456700_FTK/';fileRange=[1,10]
-                </commandLineFlags>
-                <options>testCommonSliceAthenaTrigRDOtoAOD.py</options>
-                <package>Trigger/TrigValidation/TriggerTest</package>
-                <group>TriggerTestMonitorHistos</group>
-                <queue>long</queue>
-                <alwaysRunPostProc />
-            </athena>
-            
-            <athena userJobId="MC_pp_v6_tight_mc_prescale" doMonitoring="True">
-                <doc>
-                    MC_pp_v6_tight_mc_prescale menu on ttbar RDO only 500 events
-                </doc>
-                <displayName>MC_pp_v6_tight_mc_prescale</displayName>
-                <commandLineFlags>
-                    from TriggerJobOpts.TriggerFlags import TriggerFlags as TF;TF.run2Config.set_Value_and_Lock("2016"); enableCostMonitoring=True;RunningRTT=True;menu='MC_pp_v6_tight_mc_prescale';jp.AthenaCommonFlags.EvtMax.set_Value_and_Lock(500);jp.Rec.OutputLevel=WARNING;LVL1OutputLevel=WARNING;HLTOutputLevel=WARNING;dsName='/eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00';fileRange=[1,2]
-                </commandLineFlags>
-                <options>testCommonSliceAthenaTrigRDO.py</options>
-                <package>Trigger/TrigValidation/TriggerTest</package>
-                <group>TriggerTestMonitorHistos</group>
-                <queue>long</queue>
-                <alwaysRunPostProc />
-            </athena>
-            
-            <athena userJobId="MC_pp_v6_loose_mc_prescale" doMonitoring="True">
-                <doc>
-                    MC_pp_v6_loose_mc_prescale menu on minbias RDO 
-                </doc>
-                <displayName>MC_pp_v6_loose_mc_prescale</displayName>
-                <commandLineFlags>
-                    from TriggerJobOpts.TriggerFlags import TriggerFlags as TF;TF.run2Config.set_Value_and_Lock("2016"); enableCostMonitoring=True;RunningRTT=True;menu='MC_pp_v6_loose_mc_prescale';jp.AthenaCommonFlags.EvtMax.set_Value_and_Lock(500);jp.Rec.OutputLevel=WARNING;LVL1OutputLevel=WARNING;HLTOutputLevel=WARNING;dsName='/eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00';fileRange=[1,2]
-                </commandLineFlags>
-                <options>testCommonSliceAthenaTrigRDO.py</options>
-                <package>Trigger/TrigValidation/TriggerTest</package>
-                <group>TriggerTestMonitorHistos</group>
-                <queue>long</queue>
-                <alwaysRunPostProc />
-            </athena>
 
 	    <!-- MC_pp_v7 menu tests go here -->
             <athena userJobId="MC_pp_v7" doMonitoring="True">
@@ -595,11 +500,11 @@
             
             <athena userJobId="MC_pp_v7_no_prescale_toxAOD_FTK" doMonitoring="True" >
                 <doc>
-                    Runs MC_pp_v7_no_prescale menu on user.jahreda.mc15_13TeV.410000.recon.RDO.e3698_s2608_s2183_r6630_20.7.2.3.updatesJohn.newFormat.v1_EXT2.58456700 dumping 500 events in an xAOD
+                    Runs MC_pp_v7_no_prescale menu on valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.digit.RDO_FTK.e4993_s2887_r8937_r9119 dumping events in an xAOD
                 </doc>
                 <displayName>MC_pp_v7_no_prescale_toxAOD_FTK</displayName>
                 <commandLineFlags>
-                    RunningRTT=True;menu='MC_pp_v7_no_prescale';jp.AthenaCommonFlags.EvtMax.set_Value_and_Lock(500);jp.Rec.OutputLevel=WARNING;LVL1OutputLevel=WARNING;HLTOutputLevel=WARNING;from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.doFTK.set_Value_and_Lock(True);dsName='/eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/user.jahreda.mc15_13TeV.410000.recon.RDO.e3698_s2608_s2183_r6630_20.7.2.3.updatesJohn.newFormat.v1_EXT2.58456700_FTK/';fileRange=[1,10]
+                    RunningRTT=True;menu='MC_pp_v7_no_prescale';jp.AthenaCommonFlags.EvtMax.set_Value_and_Lock(500);jp.Rec.OutputLevel=WARNING;LVL1OutputLevel=WARNING;HLTOutputLevel=WARNING;from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.doFTK.set_Value_and_Lock(True);jp.AthenaCommonFlags.FilesInput=['root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/RDO_FTK.10733709._000019.pool.root.1']
                 </commandLineFlags>
                 <options>testCommonSliceAthenaTrigRDOtoAOD.py</options>
                 <package>Trigger/TrigValidation/TriggerTest</package>
diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerFlags.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerFlags.py
index 65ec9999f0bfa2ab742278975c929b140eb53846..447ad58c92cd8e51face2fe21a5bde3f86deb438 100644
--- a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerFlags.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerFlags.py
@@ -366,7 +366,7 @@ class OnlineCondTag(JobProperty):
     """ Default (online) HLT conditions tag """
     statusOn=True
     allowedType=['str']
-    StoredValue='CONDBR2-HLTP-2016-01'
+    StoredValue='CONDBR2-HLTP-2017-03'
 
 _flags.append(OnlineCondTag)
 
@@ -374,7 +374,7 @@ class OnlineGeoTag(JobProperty):
     """ Default (online) HLT geometry tag """
     statusOn=True
     allowedType=['str']
-    StoredValue='ATLAS-R2-2015-04-00-00'
+    StoredValue='ATLAS-R2-2016-01-00-01'
     
 _flags.append(OnlineGeoTag)
 
@@ -1044,6 +1044,10 @@ class triggerMenuSetup(JobProperty):
 
         'MC_pp_v6','Physics_pp_v6','MC_pp_v6_no_prescale', 'MC_pp_v6_tight_mc_prescale', 'MC_pp_v6_tightperf_mc_prescale', 'MC_pp_v6_loose_mc_prescale','Physics_pp_v6_tight_physics_prescale',
         'MC_pp_v7','Physics_pp_v7','MC_pp_v7_no_prescale', 'MC_pp_v7_tight_mc_prescale', 'MC_pp_v7_tightperf_mc_prescale', 'MC_pp_v7_loose_mc_prescale','Physics_pp_v7_tight_physics_prescale',
+
+        # -----------------------------------------------------------------
+        # Upgrade
+        'MC_PhaseII',
         ]
 
     _default_menu='MC_pp_v7_tight_mc_prescale'
diff --git a/Trigger/TriggerCommon/TriggerMenu/CMakeLists.txt b/Trigger/TriggerCommon/TriggerMenu/CMakeLists.txt
index 065e931142a661cdceca1bc7be39ab2d2019a817..e7edcb4ae8b4f80ed98343c1f728ad1e2bdfe760 100644
--- a/Trigger/TriggerCommon/TriggerMenu/CMakeLists.txt
+++ b/Trigger/TriggerCommon/TriggerMenu/CMakeLists.txt
@@ -8,7 +8,7 @@ atlas_subdir( TriggerMenu )
 # Install files from the package:
 atlas_install_python_modules( python/*.py python/menu python/l1
 python/l1menu python/l1topo python/l1topomenu python/egamma
-python/muon python/jet python/bjet python/met python/tau
+python/muon python/jet python/bjet python/met python/tau python/afp
 python/minbias python/heavyion python/bphysics python/calibcosmicmon
 python/test python/combined python/commonUtils )
 atlas_install_joboptions( share/*.py )
@@ -17,7 +17,7 @@ atlas_install_xmls( data/*.dtd data/*.xml )
 
 atlas_add_test( generateMenu SCRIPT scripts/testMenu.sh 
                 PROPERTIES TIMEOUT 500 
-                POST_EXEC_SCRIPT "check_log.pl --config checklogTriggerTest.conf generateMenu.log"
+                POST_EXEC_SCRIPT "check_log.pl --config checklogTriggerTest.conf generateMenu.log" 
               )
 
 atlas_add_test ( pyflakesMenu
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/TriggerConfigL1Topo.py b/Trigger/TriggerCommon/TriggerMenu/python/TriggerConfigL1Topo.py
index 6b830341ef5aa9aece406564db5b87401815e75b..1653b8d67fed072d8d4fb96026f38d1c7ed051cb 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/TriggerConfigL1Topo.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/TriggerConfigL1Topo.py
@@ -1,8 +1,5 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-from sys import settrace
-
-from l1topo.TopoAlgos import TopoAlgo
 from l1topo.L1TopoMenu import L1TopoMenu
 from l1topo.L1TopoFlags import L1TopoFlags
 
@@ -18,7 +15,6 @@ class TriggerConfigL1Topo:
         outputFile: if no input file is specified the topo menu will be generated and written to outputFile
         menuName: ignored now
         """
-        current = self
         from TriggerJobOpts.TriggerFlags import TriggerFlags
 
         self.menuName = TriggerConfigL1Topo.getMenuBaseName(TriggerFlags.triggerMenuSetup())
@@ -51,7 +47,7 @@ class TriggerConfigL1Topo:
     @staticmethod
     def getMenuBaseName(menuName):
         import re 
-        pattern = re.compile('_v\d+|DC14')
+        pattern = re.compile('_v\d+|DC14+|_PhaseII')
         patternPos = pattern.search(menuName)
         if patternPos:
             menuName=menuName[:patternPos.end()]
@@ -128,7 +124,6 @@ class TriggerConfigL1Topo:
         """
 
         menuName = TriggerConfigL1Topo.getMenuBaseName(menuName)
-        from TriggerJobOpts.TriggerFlags import TriggerFlags
         menumodule = __import__('l1topomenu.Menu_%s' % menuName, globals(), locals(), ['defineMenu'], -1)
         menumodule.defineMenu()
         log.info("%s menu contains %i algos." % ( menuName, len(L1TopoFlags.algos()) )) 
@@ -152,11 +147,7 @@ class TriggerConfigL1Topo:
         Always to be called after defineMenu()
         """
         
-        from AthenaCommon.Logging import logging
-        log = logging.getLogger('L1Topo.generateMenu')
-
         # add the algos to the menu
-        undefined_alg = False 
         for topooutput in L1TopoFlags.algos():
             topooutput.algo = self.getRegisteredAlgo(topooutput.algoname)
             if topooutput.algo is None:
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/TriggerConfigLVL1.py b/Trigger/TriggerCommon/TriggerMenu/python/TriggerConfigLVL1.py
index de27314421fd9201f181e508abb12c4c1029b3ee..fa4b380b06f7e2ccc074503b30a82a0d32847f0c 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/TriggerConfigLVL1.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/TriggerConfigLVL1.py
@@ -268,7 +268,9 @@ class TriggerConfigLVL1:
                 item.setTriggerType( item.trigger_type | TT.phys )
             # assign ctp IDs to items that don't have one
             if item.ctpid == -1:
-                item.setCtpid( available_ctpids.pop() )
+                the_id = available_ctpids.pop()
+                log.warning('LVL1 item %s is being assigned ctpid=%d' % (item.name,  the_id ))
+                item.setCtpid( the_id )
             # add the items into the menu
             self.menu.addItem( item )
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/afp/AFPDef.py b/Trigger/TriggerCommon/TriggerMenu/python/afp/AFPDef.py
new file mode 100644
index 0000000000000000000000000000000000000000..c0d0a9c77031a4964ef033315373a918602fcdfb
--- /dev/null
+++ b/Trigger/TriggerCommon/TriggerMenu/python/afp/AFPDef.py
@@ -0,0 +1,81 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
+""" AFP slice signatures """
+
+__author__  = "L. Zivkovic, C.Bernius"
+__version__ = "" 
+__doc__="Implementation of AFP slice in new TM framework "
+##########################################################
+
+#from AthenaCommon.SystemOfUnits import GeV
+from TriggerMenu.menu.HltConfig import L2EFChainDef
+#from TriggerMenu.menu.HltConfig import L2EFChainDef,mergeRemovingOverlap
+from AthenaCommon.Logging import logging
+logging.getLogger().info("Importing %s",__name__)
+log = logging.getLogger("TriggerMenu.afp.AFPDef")
+
+## Here probably HLT goes?
+## Import from AFPHypo?
+
+#from TriggerJobOpts.TriggerFlags import TriggerFlags
+
+
+#from TrigAFPHypo.TrigAFPJetAllTEConfig import TrigAFPJetAllTE
+
+
+
+##  More may go here
+
+#############################################################################
+class L2EFChain_afp(L2EFChainDef):
+     
+    def __init__(self, chainDict):
+        
+        self.L2sequenceList   = []
+        self.EFsequenceList   = []
+        self.L2signatureList  = []
+        self.EFsignatureList  = []
+        self.TErenamingDict   = []
+
+        self.chainPart = chainDict['chainParts']
+        
+        self.chainL1Item = chainDict['L1item']        
+        self.chainPartL1Item = self.chainPart['L1item']
+        
+        self.chainCounter = chainDict['chainCounter']       
+        self.L2Name = 'L2_'+self.chainPart['chainPartName']
+        self.EFName = 'EF_'+self.chainPart['chainPartName']
+        #self.mult = int(self.chainPart['multiplicity'])
+        self.chainName = chainDict['chainName']
+        self.chainPartName = self.chainPart['chainPartName']
+        #self.chainPartNameNoMult = self.chainPartName[1:] if self.mult > 1 else self.chainPartName
+
+# These two lines should eventually be uncommented
+        self.L2InputL1Item = self.chainPartL1Item or self.chainL1Item
+        if self.L2InputL1Item:
+##             self.L2InputTE = getInputTEfromL1Item(self.L2InputL1Item)
+##         else:
+            self.L2InputTE = ''
+
+
+        L2EFChainDef.__init__(self, self.chainName, self.L2Name, self.chainCounter, self.chainL1Item, self.EFName, self.chainCounter, self.L2InputTE)
+    
+
+    def defineSequences(self):
+
+        for sequence in self.L2sequenceList:
+            self.addL2Sequence(*sequence)
+
+        for sequence in self.EFsequenceList:
+            self.addEFSequence(*sequence)
+                
+    def defineSignatures(self):
+       
+        for signature in self.L2signatureList:
+            self.addL2Signature(*signature)
+
+        for signature in self.EFsignatureList:
+            self.addEFSignature(*signature)
+
+    def defineTErenaming(self):
+        self.TErenamingMap = self.TErenamingDict
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/afp/AFPSliceFlags.py b/Trigger/TriggerCommon/TriggerMenu/python/afp/AFPSliceFlags.py
new file mode 100755
index 0000000000000000000000000000000000000000..16e23c7be1a2944a8f127573c171248af1ac3d7c
--- /dev/null
+++ b/Trigger/TriggerCommon/TriggerMenu/python/afp/AFPSliceFlags.py
@@ -0,0 +1,41 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
+""" AFP slice specific flags  """
+
+from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer
+from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper
+#from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper, AllowedList
+
+# create container
+__author__  = 'L. Zivkovic'
+__version__="$Revision: 1.0 $"
+__doc__="AFP slice specific flags  "
+
+
+_flags = []
+class signatures(JobProperty):
+    """ signatures in AFP slice """
+    statusOn=True
+    allowedTypes=['list']
+    StoredValue   = []
+
+_flags.append(signatures)
+
+
+class AFPSlice(JobPropertyContainer, CommonSliceHelper):
+    """ AFP Slice Flags """
+
+from TriggerJobOpts.TriggerFlags import TriggerFlags
+TriggerFlags.add_Container(AFPSlice)
+
+# add add common slice flags
+TriggerFlags.AFPSlice.import_JobProperties('TriggerMenu.menu.CommonSliceFlags')
+
+for flag in _flags:
+    TriggerFlags.AFPSlice.add_JobProperty(flag)
+del _flags
+
+# make an alias
+AFPSliceFlags = TriggerFlags.AFPSlice
+
+#  LocalWords:  allowedTypes
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/afp/__init__.py b/Trigger/TriggerCommon/TriggerMenu/python/afp/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..74583d364ec2ca794156596c7254d9b234a940c6
--- /dev/null
+++ b/Trigger/TriggerCommon/TriggerMenu/python/afp/__init__.py
@@ -0,0 +1,2 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/afp/generateAFPChainDefs.py b/Trigger/TriggerCommon/TriggerMenu/python/afp/generateAFPChainDefs.py
new file mode 100755
index 0000000000000000000000000000000000000000..87bad429d6f87806c69efb1e37cc5e712b57ccf9
--- /dev/null
+++ b/Trigger/TriggerCommon/TriggerMenu/python/afp/generateAFPChainDefs.py
@@ -0,0 +1,49 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
+##########################################################################################
+##########################################################################################
+__doc__=""
+__version__="Implementation of AFP Slice signatures"
+
+from AthenaCommon.Logging import logging
+logging.getLogger().info("Importing %s",__name__)
+
+
+from TriggerMenu.afp.AFPDef import L2EFChain_afp
+
+#from TriggerJobOpts.TriggerFlags import TriggerFlags
+from TriggerMenu.menu.MenuUtils import splitChainDict,mergeChainDefs
+
+AFP = []
+
+##########################################################################################
+##########################################################################################
+
+
+
+def generateChainDefs(chainDict):          
+
+    listOfChainDicts = splitChainDict(chainDict)
+    listOfChainDefs = []
+    
+    for subChainDict in listOfChainDicts:      
+        AFP = L2EFChain_afp(subChainDict)
+        
+        listOfChainDefs += [AFP.generateHLTChainDef()]
+
+
+        
+    if len(listOfChainDefs)>1:
+        listOfChainDefs = [mergeChainDefs(listOfChainDefs)]
+    else:
+        listOfChainDefs = [listOfChainDefs[0]]
+    
+    listOfChainDefs.reverse()
+    
+    return listOfChainDefs
+
+
+##########################################################
+
+
+    
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/bjet/BjetSliceFlags.py b/Trigger/TriggerCommon/TriggerMenu/python/bjet/BjetSliceFlags.py
index 4059f44615581d9e1dec56fd88031215bb659ebf..0fd4d560ebf41d5e55d72aec43192ff1118a7e05 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/bjet/BjetSliceFlags.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/bjet/BjetSliceFlags.py
@@ -2,8 +2,8 @@
 
 """ Bjet slice specific flags  """
 
-from AthenaCommon.JobProperties         import JobProperty, JobPropertyContainer, jobproperties
-from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper, AllowedList
+from AthenaCommon.JobProperties         import JobProperty, JobPropertyContainer
+from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper
 
 __author__  = 'T. Bold'
 __version__="$Revision: 1.31 $"
@@ -22,7 +22,6 @@ _flags.append(signatures)
 
 
 # create container
-from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper
 
 class BjetSlice(JobPropertyContainer, CommonSliceHelper):
     """ Bjet Slice Flags """
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/bjet/generateBjetChainDefs.py b/Trigger/TriggerCommon/TriggerMenu/python/bjet/generateBjetChainDefs.py
index 9c6ab1ba4dbcf61fc249e495f51289f517f42ac3..f2e486827ff2c28a355a9655da18a86c988326a1 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/bjet/generateBjetChainDefs.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/bjet/generateBjetChainDefs.py
@@ -344,7 +344,7 @@ def myBjetConfig_split(theChainDef, chainDict, inputTEsEF,numberOfSubChainDicts=
         #print 'muon thr for antimatch:' + str(muonthr) 
         muonTE      = "EF_SuperEF_mu{0}_MU{1}".format(muonthr,muonthr)
         jetEtHypoTE = jetEtHypoTE+'_antimatchmu{0}'.format(muonthr)
-        gscEtHypoTE = "HLT_"+gscthresh+ftk+"_eta"+"_jsplit"+"_"+tracking+'_antimatchmu{0}'.format(muonthr)
+        #gscEtHypoTE = "HLT_"+gscthresh+ftk+"_eta"+"_jsplit"+"_"+tracking+'_antimatchmu{0}'.format(muonthr)
         jetHypoTE   = jetHypoTE+'_antimatchmu{0}'.format(muonthr)
         jetTrackTE  = jetTrackTE +'_antimatchmu{0}'.format(muonthr)
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/bphysics/generateBPhysicsChainDefs.py b/Trigger/TriggerCommon/TriggerMenu/python/bphysics/generateBPhysicsChainDefs.py
index dfb951b05a7a75344f3febe41aedb394a039f956..266b8d160e0c33476971a64029f0c30e7d03696a 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/bphysics/generateBPhysicsChainDefs.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/bphysics/generateBPhysicsChainDefs.py
@@ -46,6 +46,8 @@ def generateChainDefs(chainDict):
     
     if "bBmumuxv3" in chainDict['chainName'] :  # OI this mc 2016 chain was never enabled, and is not needed in future
         thisIsBphysChain = False
+    if 'Zmumu' in chainDict['chainName'] or 'idperf' in chainDict['chainName']  : # keep idperf chains with default muon config
+        thisIsBphysChain = False
     if 'legacyVtx' in chainDict['chainName'] :  # OI Drell-Yan chains are not migrated
         thisIsBphysChain = False
     if 'invm' in chainDict['chainName'] :  # OI Drell-Yan chains are not migrated
@@ -151,18 +153,14 @@ def bSingleOptionTopos(theChainDef, chainDict, inputTEsL2, inputTEsEF, topoStart
         L2TEname = "L2_" + TEname+'_'+mtopo+'_tsf_'+chainDict['L1item']
         topo2StartFrom = L2TEname
 
-    chainParts = chainDict['chainParts']
-
     fexNameExt,trkmuons, mult, mult_without_noL1  = getBphysThresholds(chainDict)
     L2Fex = None
     L2Hypo = None
     
-    from TrigBphysHypo.TrigMultiTrkFexConfig import TrigMultiTrkFex_DiMu,TrigMultiTrkFex_DiMu_noCut,TrigMultiTrkFex_DiMu_noVtx_noOS,TrigMultiTrkFex_DiMu_noVtx_noM_SS 
-    from TrigBphysHypo.TrigEFMultiMuHypoConfig import EFMultiMuHypo_DiMu_noCut,EFMultiMuHypo_DiMu_noVtx,EFMultiMuHypo_DiMu,EFMultiMuHypo_BMeson,EFMultiMuHypo_Jpsi,EFMultiMuHypo_Upsi,EFMultiMuHypo_2700,EFMultiMuHypo_DiMu2700
+    from TrigBphysHypo.TrigMultiTrkFexConfig import TrigMultiTrkFex_DiMu,TrigMultiTrkFex_DiMu_noCut
+    from TrigBphysHypo.TrigEFMultiMuHypoConfig import EFMultiMuHypo_DiMu_noCut,EFMultiMuHypo_DiMu,EFMultiMuHypo_BMeson,EFMultiMuHypo_Jpsi,EFMultiMuHypo_Upsi,EFMultiMuHypo_2700,EFMultiMuHypo_DiMu2700
     if (mtopo == 'bJpsi'):
         if doL2MultiTrack :
-            from TrigBphysHypo.TrigMultiTrkFexConfig import TrigMultiTrkFex_DiMu
-            from TrigBphysHypo.TrigEFMultiMuHypoConfig import EFMultiMuHypo_Jpsi
             L2Fex = TrigMultiTrkFex_DiMu()
             L2Hypo = EFMultiMuHypo_Jpsi("L2MultiMuTrkHypo_Jpsi")  
             L2Hypo.bphysCollectionKey = "MultiTrkFex"
@@ -182,7 +180,6 @@ def bSingleOptionTopos(theChainDef, chainDict, inputTEsL2, inputTEsEF, topoStart
         if ('3mu' in chainDict['chainName'] or re.search('2mu[0-9]+_mu[0-9]+',chainDict['chainName']) or re.search('mu[0-9]+_2mu[0-9]+',chainDict['chainName'])):
             if doL2MultiTrack :
                 from TrigBphysHypo.TrigMultiTrkFexConfig import TrigMultiTrkFex_DiMu
-                from TrigBphysHypo.TrigEFMultiMuHypoConfig import EFMultiMuHypo_DiMu
                 L2Fex = TrigMultiTrkFex_DiMu()
                 L2Hypo = EFMultiMuHypo_DiMu("L2MultiMuTrkHypo_DiMu")
                 L2Hypo.bphysCollectionKey = "MultiTrkFex"
@@ -222,7 +219,6 @@ def bSingleOptionTopos(theChainDef, chainDict, inputTEsL2, inputTEsEF, topoStart
         L2Hypo = EFMultiMuHypo_2700("L2MultiMuHypo_bTau")
 
         from TrigBphysHypo.TrigEFMultiMuFexConfig import EFMultiMuFex_DiMu
-        from TrigBphysHypo.TrigEFMultiMuHypoConfig import EFMultiMuHypo_DiMu2700
         EFFex = EFMultiMuFex_DiMu()
         EFHypo = EFMultiMuHypo_DiMu2700()
 
@@ -249,9 +245,7 @@ def bSingleOptionTopos(theChainDef, chainDict, inputTEsL2, inputTEsEF, topoStart
 
     elif (mtopo == 'bNocut'):
 
-        from TrigBphysHypo.TrigMultiTrkFexConfig import  TrigMultiTrkFex_DiMu_noCut
         from TrigBphysHypo.TrigBphysMuonCounterConfig import  TrigBphysMuonCounter_bNmu
-        from TrigBphysHypo.TrigEFMultiMuHypoConfig import EFMultiMuHypo_DiMu_noCut
         # at level 2 just check that there is at least 2 tracks. One could cut this more down with multiplicity cut for 3mu_bNocut
         # but because of 3mu_bJpsi items we will not gain anything
         L2Fex = TrigMultiTrkFex_DiMu_noCut()
@@ -405,7 +399,6 @@ def bSingleOptionTopos(theChainDef, chainDict, inputTEsL2, inputTEsEF, topoStart
     elif (mtopo == 'bBmumu'):
         if doL2MultiTrack :
             from TrigBphysHypo.TrigMultiTrkFexConfig import TrigMultiTrkFex_DiMu
-            from TrigBphysHypo.TrigEFMultiMuHypoConfig import EFMultiMuHypo_BMeson
             L2Fex = TrigMultiTrkFex_DiMu()
             L2Hypo = EFMultiMuHypo_BMeson("L2MultiMuTrkHypo_BMeson")  
             L2Hypo.bphysCollectionKey = "MultiTrkFex"
@@ -515,7 +508,7 @@ def bMultipleOptionTopos(theChainDef, chainDict, inputTEsL2, inputTEsEF, topoSta
         #from TrigBphysHypo.TrigMultiTrkFexConfig import TrigMultiTrkFex_DiMu
         #from TrigBphysHypo.TrigEFMultiMuHypoConfig import EFMultiMuHypo_DiMu
     from TrigBphysHypo.TrigMultiTrkFexConfig import TrigMultiTrkFex_DiMu,TrigMultiTrkFex_DiMu_noCut,TrigMultiTrkFex_DiMu_noVtx_noOS,TrigMultiTrkFex_DiMu_noVtx_noM_SS
-    from TrigBphysHypo.TrigEFMultiMuHypoConfig import EFMultiMuHypo_DiMu_noCut,EFMultiMuHypo_DiMu_noVtx,EFMultiMuHypo_DiMu,EFMultiMuHypo_BMeson,EFMultiMuHypo_Jpsi,EFMultiMuHypo_Upsi,EFMultiMuHypo_2700,EFMultiMuHypo_BMeson 
+    from TrigBphysHypo.TrigEFMultiMuHypoConfig import EFMultiMuHypo_DiMu_noCut,EFMultiMuHypo_DiMu_noVtx,EFMultiMuHypo_DiMu,EFMultiMuHypo_BMeson,EFMultiMuHypo_Jpsi,EFMultiMuHypo_Upsi,EFMultiMuHypo_2700
 
     if ('7invm9' in topoAlgs) & ('noos' in topoAlgs) & ('novtx' not in topoAlgs):
         #if not doL2MultiTrack :
@@ -690,9 +683,8 @@ def bMultipleOptionTopos(theChainDef, chainDict, inputTEsL2, inputTEsEF, topoSta
         mult = 0
         for part in chainParts :
             mult = mult + int(part['multiplicity'])
-        from TrigBphysHypo.TrigEFMultiMuFexConfig import EFMultiMuFex_Tau
-        from TrigBphysHypo.TrigEFMultiMuHypoConfig import EFMultiMuHypo_2700
         from TrigBphysHypo.TrigEFMultiMuFexConfig import EFMultiMuFex_Tau2
+        from TrigBphysHypo.TrigEFMultiMuFexConfig import EFMultiMuFex_Tau3
 
         L2Fex = None
         L2Hypo = None
@@ -752,11 +744,11 @@ def bMultipleOptionTopos(theChainDef, chainDict, inputTEsL2, inputTEsEF, topoSta
         from TrigBphysHypo.TrigL2BMuMuFexConfig import L2BMuMuFex_noId
         from TrigBphysHypo.TrigL2BMuMuHypoConfig import L2BMuMuHypo_Jpsi_noId
         from TrigBphysHypo.TrigEFBMuMuFexConfig import EFBMuMuFex_noId
-        from TrigBphysHypo.TrigEFBMuMuHypoConfig import EFBMuMuHypo_Jpsi
+        from TrigBphysHypo.TrigEFBMuMuHypoConfig import EFBMuMuHypo_Jpsi_noId
         L2Fex  = L2BMuMuFex_noId()
         L2Hypo = L2BMuMuHypo_Jpsi_noId()
         EFFex  = EFBMuMuFex_noId()
-        EFHypo = EFBMuMuHypo_Jpsi()
+        EFHypo = EFBMuMuHypo_Jpsi_noId()
     elif ('bDimu' in topoAlgs) & ('noL2' in topoAlgs):
         from TrigBphysHypo.TrigL2BMuMuFexConfig  import L2BMuMuFex_DiMu_passL2
         from TrigBphysHypo.TrigL2BMuMuHypoConfig import L2BMuMuHypo_DiMu_passL2
@@ -979,7 +971,6 @@ def bMultipleOptionTopos(theChainDef, chainDict, inputTEsL2, inputTEsEF, topoSta
 ###################################################################################
 def bMuTrackPEB(theChainDef,chainDict, inputTEsL2, inputTEsEF, topoStartFrom):
 
-    EFChainName = "EF_" + chainDict['chainName']
     topoAlgs = chainDict["topo"]
 
     mtopo = topoAlgs[0]
@@ -1120,8 +1111,8 @@ def bBmumuxTopos(theChainDef,chainDict, inputTEsL2, inputTEsEF, topoStartFrom, d
         L2TEname = "L2_" + TEname+myTopoString+'_tsf_'+chainDict['L1item']
         topo2StartFrom = L2TEname
 
-    from TrigBphysHypo.TrigMultiTrkFexConfig import TrigMultiTrkFex_DiMu,TrigMultiTrkFex_DiMu_noCut,TrigMultiTrkFex_DiMu_noVtx_noOS,TrigMultiTrkFex_DiMu_noVtx_noM_SS 
-    from TrigBphysHypo.TrigEFMultiMuHypoConfig import EFMultiMuHypo_DiMu_noCut,EFMultiMuHypo_DiMu_noVtx,EFMultiMuHypo_DiMu,EFMultiMuHypo_BMeson,EFMultiMuHypo_Jpsi,EFMultiMuHypo_Upsi,EFMultiMuHypo_2700, EFMultiMuHypo_Bmumux
+    from TrigBphysHypo.TrigMultiTrkFexConfig import TrigMultiTrkFex_DiMu,TrigMultiTrkFex_DiMu_noCut
+    from TrigBphysHypo.TrigEFMultiMuHypoConfig import EFMultiMuHypo_DiMu_noCut,EFMultiMuHypo_Bmumux
     # replace L2 Te (and EF tsf) with bBmumuxv2 naming
     # same underlying sequence is used
     # Warning if ever switch to v3 implementation -- this should be changed / tested 
@@ -1229,8 +1220,6 @@ def bBmumuxTopos(theChainDef,chainDict, inputTEsL2, inputTEsEF, topoStartFrom, d
         EFFex = EFBMuMuFex_Jpsi()
         EFHypo = EFBMuMuHypo_Jpsi()
        
-
-    from TrigBphysHypo.TrigEFMultiMuHypoConfig import EFMultiMuHypo_Bmumux
     # Use simple di-muon fex/hypo for L2
     # Note - may need to change oppsign and vtx requirements
     # noL2 option to skip dimuon selection at L2
@@ -1254,8 +1243,6 @@ def bBmumuxTopos(theChainDef,chainDict, inputTEsL2, inputTEsEF, topoStartFrom, d
 
     else :
         if  doL2MultiTrack :
-            from TrigBphysHypo.TrigMultiTrkFexConfig import TrigMultiTrkFex_DiMu
-            from TrigBphysHypo.TrigEFMultiMuHypoConfig import EFMultiMuHypo_Bmumux
             L2Fex = TrigMultiTrkFex_DiMu()
             L2Hypo = EFMultiMuHypo_Bmumux("EFMultiMuHypo_Bmumux")  
             L2Hypo.bphysCollectionKey = "MultiTrkFex"
@@ -1304,7 +1291,6 @@ def bBmumuxTopos(theChainDef,chainDict, inputTEsL2, inputTEsEF, topoStartFrom, d
         trkFTK=[dummyAlgo]+trkftk[0]
         EFTEcount = 0; EFoutputTEsftk = [];
         for EFinputTE in inputTEsEF:
-            EFoutputTEdummy = EFinputTE+'_dummy'
             EFTEcount = EFTEcount + 1
             EFoutputTEftk = EFinputTE+'_ftk'+str(EFTEcount)
             EFoutputTEsftk.append(EFoutputTEftk)
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/BeamspotDef.py b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/BeamspotDef.py
index 46ef70225b15f1b9d4772e22df350390356cccdc..d66cfbd43884642f3ad806059e9357b768811bd6 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/BeamspotDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/BeamspotDef.py
@@ -7,9 +7,7 @@
 __author__  = 'M.Backes, C.Bernius'
 __version__=""
 __doc__="Implementation of beamspot chains "
-from TriggerMenu.menu.HltConfig import *
-from AthenaCommon.Include import include
-from AthenaCommon.SystemOfUnits import GeV
+from TriggerMenu.menu.HltConfig import L2EFChainDef,mergeRemovingOverlap
 
 from AthenaCommon.Logging import logging
 logging.getLogger().info("Importing %s",__name__)
@@ -112,7 +110,6 @@ class L2EFChain_Beamspot(L2EFChainDef):
         TrigL2SiTrackFinder_Config = __import__('TrigL2SiTrackFinder.TrigL2SiTrackFinder_Config', fromlist=[""])      
         my_trk_alg = getattr(TrigL2SiTrackFinder_Config, "TrigL2SiTrackFinder_BeamSpotB") 
         trk_alg = [my_trk_alg()] 
-        teaddition = 'L2StarB'
         
      elif ('trkfast' in self.l2IDAlg):
         if 'trkFS' in self.chainPart['addInfo'] :
@@ -129,7 +126,6 @@ class L2EFChain_Beamspot(L2EFChainDef):
 
         from TrigInDetConf.TrigInDetSequence import TrigInDetSequence
         [trk_alg] = TrigInDetSequence("BeamSpot", "beamSpot", "IDTrig", "FTF").getSequence()
-        teaddition = 'trkfast'
         
      elif ('FTK' in self.l2IDAlg):
         if 'trkFS' in self.chainPart['addInfo'] :
@@ -161,7 +157,6 @@ class L2EFChain_Beamspot(L2EFChainDef):
         else:   
            from TrigInDetConf.TrigInDetFTKSequence import TrigInDetFTKSequence
            [trk_alg] = TrigInDetFTKSequence("BeamSpot", "beamSpot", "").getSequence()
-        teaddition = 'trkFTK'
 
      elif ('FTKRefit' in self.l2IDAlg):
         if 'trkFS' in self.chainPart['addInfo'] :
@@ -189,7 +184,6 @@ class L2EFChain_Beamspot(L2EFChainDef):
         else: 
            from TrigInDetConf.TrigInDetFTKSequence import TrigInDetFTKSequence
            [trk_alg] = TrigInDetFTKSequence("BeamSpot", "beamSpot", "refit").getSequence()
-           teaddition = 'trkFTKRefit'
 
      else:
         mlog.error('Cannot assemble chain %s - only configured for L2StarB' % (self.chainPartName))        
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/BeamspotSliceFlags.py b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/BeamspotSliceFlags.py
index 1ca3e335e1f6da74284550de571af0ec3c7289d5..b0c0cf97dc4cb7427a68853e28782068363b4365 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/BeamspotSliceFlags.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/BeamspotSliceFlags.py
@@ -2,7 +2,7 @@
 
 """ Beamspot slice specific flags  """
 
-from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer, jobproperties
+from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer
 from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper
 
 __author__  = ''
@@ -20,7 +20,6 @@ _flags.append(signatures)
 
 
 # create container
-from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper
 
 class BeamspotSlice(JobPropertyContainer, CommonSliceHelper):
     """ Beamspot Slice Flags """
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/CalibDef.py b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/CalibDef.py
index 4a2c7eb12cfbbb8f1806954d1a3b12daa4acc231..5bd10461bdf51d0d14fc8d18579aa94b7bc5f242 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/CalibDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/CalibDef.py
@@ -206,7 +206,15 @@ class L2EFChain_CalibTemplate(L2EFChainDef):
       self.AlgList = []
       self.signatureCounterOffset = 14
 
-      from TrigDetCalib.TrigDetCalibConfig import *
+      from TrigDetCalib.TrigDetCalibConfig import (CheckForTracks_Trk9_Central,
+                                                   CheckForTracks_Trk16_Central,
+                                                   CheckForTracks_Trk29_Central,
+                                                   CheckForTracks_Trk9_Fwd,
+                                                   CheckForTracks_Trk16_Fwd,
+                                                   CheckForTracks_Trk29_Fwd,
+                                                   CheckForTracks_Trk9_Central_Beamspot,
+                                                   CheckForTracks_Trk9_Fwd_Beamspot) 
+
       trkAlgDict = {
          'idcalib_trk9_central'  : CheckForTracks_Trk9_Central('CheckForTracks_Trk9_Central'),
          'idcalib_trk16_central' : CheckForTracks_Trk16_Central('CheckForTracks_Trk16_Central'),
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/CalibSliceFlags.py b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/CalibSliceFlags.py
index 83c891a7e2f1c8bc306cc570dc56378c5ee8073b..207dc9e01f1a0768141426d5ff74d41fbde42a43 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/CalibSliceFlags.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/CalibSliceFlags.py
@@ -2,7 +2,7 @@
 
 """ Calib slice specific flags  """
 
-from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer, jobproperties
+from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer
 from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper
 
 __author__  = ''
@@ -27,7 +27,6 @@ _flags.append(signatures)
 
 
 # create container
-from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper
 
 class CalibSlice(JobPropertyContainer, CommonSliceHelper):
     """ Calib Slice Flags """
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/CosmicSliceFlags.py b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/CosmicSliceFlags.py
index 290ecfe56d3d9d682f1f7c4de04c8655c24d43b5..9ef28d4035a71a39e33c02c857e220603d0aa477 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/CosmicSliceFlags.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/CosmicSliceFlags.py
@@ -2,7 +2,7 @@
 
 """ Cosmics slice specific flags  """
 
-from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer, jobproperties
+from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer
 from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper
 
 __author__  = 'A. Cerri, after X. Wu example'
@@ -455,7 +455,6 @@ class EFPayload(JobProperty):
 _flags.append(EFPayload)
 
 # create container
-from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper
 
 class CosmicSlice(JobPropertyContainer, CommonSliceHelper):
     """ Cosmic Slice Flags """
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/EnhancedBiasDefs.py b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/EnhancedBiasDefs.py
index 2d2ba4535b203bb00161834c63204c48c9d08cc0..472c8b69495e54aa4011d94c1d656ab3c4bd930d 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/EnhancedBiasDefs.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/EnhancedBiasDefs.py
@@ -9,8 +9,7 @@ from AthenaCommon.Logging import logging
 logging.getLogger().info("Importing %s",__name__)
 log = logging.getLogger('TriggerMenu.calibcosmon.EnhancedBiasDef')
 
-from TriggerMenu.menu.HltConfig import *
-from TriggerJobOpts.TriggerFlags  import TriggerFlags
+from TriggerMenu.menu.HltConfig import L2EFChainDef
 
 #########################################################################
 
@@ -18,32 +17,23 @@ from TriggerJobOpts.TriggerFlags  import TriggerFlags
 l1_seeds ={ 
     
     # Low threshold prescaled L1 items - slected at HLT based on TBP bit from L1 in random-seeded events        
-    'low'  : ['L1_MU6', 'L1_EM10VH', 
-              'L1_J30.0ETA49_2J20.0ETA49', 'L1_TAU12',
-              'L1_MU4_J12', 'L1_2EM7',
-              'L1_2MU4', 'L1_XS30', 
-              'L1_J15', 'L1_ZB'],
+    'low'  : ['L1_2EM7', 'L1_EM10VH', 'L1_EM12_2EM3', 'L1_J20.31ETA49', 'L1_J30', 
+              'L1_J30.0ETA49_2J20.0ETA49', 'L1_MU10', 'L1_MU4_J12', 'L1_TAU20', 'L1_ZB'],
 
     # High(er) threshold prescaled L1 items - slected at HLT based on TBP bit from L1 in random-seeded events 
-    'high' : ['L1_3J15','L1_EM18VH',
-              'L1_EM20VHI',  'L1_2EM10VH', 
-              'L1_J50', 'L1_TAU30',
-              'L1_MU15','L1_TAU20_2TAU12', 
-              'L1_XE35', 'L1_MU6_2MU4',
-              'L1_MU6_J20', 'L1_EM7_MU10',
-              'L1_EM15VH_3EM7', 'L1_2EM15',
-              'L1_EM15I_MU4', 'L1_2MU6',
-              'L1_TAU20_2TAU12_XE35', 
-              'L1_DR-TAU20ITAU12I', 'L1_DY-BOX-2MU6', # Topo
-              'L1_DY-DR-2MU4', # Topo
-              'L1_2MU4-B', 'L1_BTAG-MU4J15', # Topo
-              'L1_MJJ-100', 'L1_J4-MATCH', # Topo
-              'L1_HT190-J15.ETA21', #Topo,
-              'L1_2MU4_J20_XE30_DPHI-J20s2XE30',  # 2017
-              'L1_MU4_J20_XE30_DPHI-J20s2XE30', # 2017
-              'L1_J40_XE50_DPHI-J20s2XE50', # 2017
-              'L1_2MU4_J40_XE20', # 2017
-              'L1_MU4_J50_XE40'] # 2017
+    'high' : ['L1_2EM10VH', 'L1_2EM15', 'L1_2MU4', 'L1_2MU4-B', 'L1_2MU4-BO', 
+              'L1_2MU6', 'L1_2MU6-B', 'L1_2MU6-BO', 
+              'L1_3EM3_J40_XE50_DPHI-J20s2XE50', 'L1_3J15', 
+              'L1_BPH-2M9-2MU6_BPH-2DR15-2MU6', 'L1_BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4', 
+              'L1_BPH-8M15-2MU6_BPH-0DR22-2MU6', 'L1_BPH-8M15-MU6MU4_BPH-0DR22-MU6MU4', 
+              'L1_BTAG-MU4J15', 'L1_DR-TAU20ITAU12I', 'L1_DY-BOX-2MU6', 'L1_DY-DR-2MU4', 
+              'L1_EM15I_MU4', 'L1_EM15VHI_2TAU12IM_J25_3J12', 'L1_EM15VH_3EM7', 
+              'L1_EM15_XS30', 'L1_EM18VHI', 'L1_EM20VH', 'L1_EM7_MU10', 'L1_HT190-J15.ETA21', 
+              'L1_J4-MATCH', 'L1_J40.0ETA25_2J15.31ETA49', 'L1_J50', 
+              'L1_LFV-MU6', 'L1_MJJ-400', 'L1_MU10_2MU6', 'L1_MU10_TAU12IM', 'L1_MU10_TAU12IM_J25_2J12', 
+              'L1_MU6_2MU4', 'L1_MU6_J20', 'L1_MU6_J30.0ETA49_2J20.0ETA49', 
+              'L1_TAU20IM_2TAU12IM_J25_2J20_3J12', 'L1_TAU20IM_2TAU12IM_XE35', 
+              'L1_TAU20_2TAU12', 'L1_TAU20_2TAU12_XE35', 'L1_TAU40', 'L1_XE35']
 
     }
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/EnhancedBiasSliceFlags.py b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/EnhancedBiasSliceFlags.py
index 483ed5f06d1cb5688882dfdfb0f4bd037da3d603..040580d7ade861eaf19246ac278d97127ea05d32 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/EnhancedBiasSliceFlags.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/EnhancedBiasSliceFlags.py
@@ -2,8 +2,8 @@
 
 """ EnhancedBias slice specific flags  """
 
-from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer, jobproperties
-from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper, AllowedList
+from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer
+from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper
 
 __author__  = 'P. Bell, after A. Cerri'
 __version__="$Revision: 0.1 $"
@@ -27,7 +27,6 @@ class signatures(JobProperty):
 _flags.append(signatures)
 
 # create container
-from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper
 
 class EnhancedBiasSlice(JobPropertyContainer, CommonSliceHelper):
     """ EnhancedBias Slice Flags """
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/MonitorDef.py b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/MonitorDef.py
index 7d7ebab44e4cfa217f867b69088b42d3b3bd37e0..cc47f702b200bc4c9dd3f7ce89b4011d465b41c1 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/MonitorDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/MonitorDef.py
@@ -243,9 +243,9 @@ class L2EFChain_Monitoring(L2EFChainDef):
 
         try:
             from TrigL2SiTrackFinder.TrigL2SiTrackFinder_Config import TrigL2SiTrackFinder_FullScanBC
-            theTrigL2SiTrackFInder_FullScanBC = TrigL2SiTrackFinder_FullScanBC()
+            theTrigL2SiTrackFinder_FullScanBC = TrigL2SiTrackFinder_FullScanBC()
         except:
-            theTrigL2SiTrackFInder_FullScanBC = None
+            theTrigL2SiTrackFinder_FullScanBC = None
 
 
             
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/MonitorSliceFlags.py b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/MonitorSliceFlags.py
index b2306550065967e184db1ad2434dbf23c55de866..fd5ec2030f385af89dfba5d7168b3c296b65bd18 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/MonitorSliceFlags.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/MonitorSliceFlags.py
@@ -2,8 +2,8 @@
 
 """ Flags for monitoring chains """
 
-from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer, jobproperties
-from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper, AllowedList
+from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer
+from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper
 
 _flags = [] 
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/StreamingSliceFlags.py b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/StreamingSliceFlags.py
index a9c49d9d218f061395f529d78d79bf88533b93be..839a7bb66df8afa9f1babfb534daf339c3a4f383 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/StreamingSliceFlags.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/StreamingSliceFlags.py
@@ -2,8 +2,8 @@
 
 """ Streaming slice specific flags  """
 
-from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer, jobproperties
-from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper, AllowedList
+from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer
+from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper
 
 __author__  = 'P. Bell, after A. Cerri'
 __version__="$Revision: 0.1 $"
@@ -27,7 +27,6 @@ class signatures(JobProperty):
 _flags.append(signatures)
 
 # create container
-from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper
 
 class StreamingSlice(JobPropertyContainer, CommonSliceHelper):
     """ Streaming Slice Flags """
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/generateBeamspotChainDefs.py b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/generateBeamspotChainDefs.py
index 57b1252ec61888af572f94e66bf237883bfb3d88..eee1078f5d492e921c314a6a709741bdc7823153 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/generateBeamspotChainDefs.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/generateBeamspotChainDefs.py
@@ -9,14 +9,13 @@ from AthenaCommon.Logging import logging
 logging.getLogger().info("Importing %s",__name__)
 mlog = logging.getLogger("TriggerMenu.calibcosmic.generateBeamspotChainDefs")
 
-from TriggerMenu.calibcosmicmon.BeamspotDef import *
-from TriggerMenu.menu.MenuUtils import *
+from TriggerMenu.calibcosmicmon.BeamspotDef import L2EFChain_Beamspot
+from TriggerMenu.menu.MenuUtils import splitChainDict,mergeChainDefs
 
 ##########################################################################################
 ##########################################################################################
 
 def generateChainDefs(chainDict):
-    chainParts = chainDict['chainParts']
     
     listOfChainDicts = splitChainDict(chainDict)
     listOfChainDefs = []
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/generateCalibChainDefs.py b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/generateCalibChainDefs.py
index 826a3bbd4887f3724787452ee598aabeedf854d1..3e077f6ca0c35ae1929cec85ade2fc541851ab8c 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/generateCalibChainDefs.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/generateCalibChainDefs.py
@@ -9,17 +9,14 @@ from AthenaCommon.Logging import logging
 logging.getLogger().info("Importing %s",__name__)
 mlog = logging.getLogger("TriggerMenu.calibcosmic.generateCalibChainDefs")
 
-from TriggerMenu.calibcosmicmon.CalibDef import *
-
-#from TriggerJobOpts.TriggerFlags import TriggerFlags
-from TriggerMenu.menu.MenuUtils import *
+from TriggerMenu.calibcosmicmon.CalibDef import L2EFChain_CalibTemplate
+from TriggerMenu.menu.MenuUtils import splitChainDict,mergeChainDefs
 
 
 ##########################################################################################
 ##########################################################################################
 
 def generateChainDefs(chainDict):
-    chainParts = chainDict['chainParts']
     
     listOfChainDicts = splitChainDict(chainDict)
     listOfChainDefs = []
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/generateCosmicChainDefs.py b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/generateCosmicChainDefs.py
index c37c51858feb8bb63807a42610b38702939d7331..e8abb9ba4abf9a4e384e60f9c9a1f2d4eefb5f8d 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/generateCosmicChainDefs.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/generateCosmicChainDefs.py
@@ -9,17 +9,14 @@ from AthenaCommon.Logging import logging
 logging.getLogger().info("Importing %s",__name__)
 
 
-from TriggerMenu.calibcosmicmon.CosmicDef import *
-
-#from TriggerJobOpts.TriggerFlags import TriggerFlags
-from TriggerMenu.menu.MenuUtils import *
+from TriggerMenu.calibcosmicmon.CosmicDef import L2EFChain_CosmicTemplate
+from TriggerMenu.menu.MenuUtils import splitChainDict,mergeChainDefs
 CosmicChains = []
 
 ##########################################################################################
 ##########################################################################################
 
 def generateChainDefs(chainDict):
-    chainParts = chainDict['chainParts']
     
     listOfChainDicts = splitChainDict(chainDict)
     listOfChainDefs = []
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/generateEnhancedBiasChainDefs.py b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/generateEnhancedBiasChainDefs.py
index 013456f565d1beae5673bc0ac6d9dd7690dfb64e..b27dd29f88c69bad3a677feaa818ee0b8e1d85db 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/generateEnhancedBiasChainDefs.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/generateEnhancedBiasChainDefs.py
@@ -9,14 +9,12 @@ from AthenaCommon.Logging import logging
 logging.getLogger().info("Importing %s",__name__)
 mlog = logging.getLogger("TriggerMenu.calibcosmic.generateEnhancedBiasChainDefs")
 
-from TriggerMenu.calibcosmicmon.EnhancedBiasDefs import *
-from TriggerMenu.menu.MenuUtils import *
-
+from TriggerMenu.calibcosmicmon.EnhancedBiasDefs import L2EFChain_EnhancedBiasTemplate
+from TriggerMenu.menu.MenuUtils import splitChainDict,mergeChainDefs
 ##########################################################################################
 ##########################################################################################
 
 def generateChainDefs(chainDict):
-    chainParts = chainDict['chainParts']
     
     listOfChainDicts = splitChainDict(chainDict)
     listOfChainDefs = []
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/generateMonitoringChainDefs.py b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/generateMonitoringChainDefs.py
index 5cdb754ef8eade59160f16abb6d66193ba8049b7..3d1b91b4a7bed3fdb1028aa73d1f4ce725c2b7dd 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/generateMonitoringChainDefs.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/generateMonitoringChainDefs.py
@@ -9,14 +9,13 @@ from AthenaCommon.Logging import logging
 logging.getLogger().info("Importing %s",__name__)
 log = logging.getLogger(__name__)
 
-from TriggerMenu.calibcosmicmon.MonitorDef import *
-from TriggerMenu.menu.MenuUtils import *
+from TriggerMenu.calibcosmicmon.MonitorDef import L2EFChain_Monitoring
+from TriggerMenu.menu.MenuUtils import splitChainDict,mergeChainDefs
 
 ##########################################################################################
 ##########################################################################################
 
 def generateChainDefs(chainDict):
-    chainParts = chainDict['chainParts']
     
     listOfChainDicts = splitChainDict(chainDict)
     listOfChainDefs = []
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/generateStreamingChainDefs.py b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/generateStreamingChainDefs.py
index dda53d9b52ea0d8fb08c467cb7cf7b0fa574fcf3..a5cd0af5b0ffe440877df44f7f0609f37aa1972a 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/generateStreamingChainDefs.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/calibcosmicmon/generateStreamingChainDefs.py
@@ -9,14 +9,13 @@ from AthenaCommon.Logging import logging
 logging.getLogger().info("Importing %s",__name__)
 mlog = logging.getLogger("TriggerMenu.calibcosmic.generateStreamingChainDefs")
 
-from TriggerMenu.calibcosmicmon.StreamingDef import *
-from TriggerMenu.menu.MenuUtils import *
+from TriggerMenu.calibcosmicmon.StreamingDef import L2EFChain_SeededStreamerTemplate
+from TriggerMenu.menu.MenuUtils import splitChainDict,mergeChainDefs
 
 ##########################################################################################
 ##########################################################################################
 
 def generateChainDefs(chainDict):
-    chainParts = chainDict['chainParts']
     
     listOfChainDicts = splitChainDict(chainDict)
     listOfChainDefs = []
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/combined/CombinedSliceFlags.py b/Trigger/TriggerCommon/TriggerMenu/python/combined/CombinedSliceFlags.py
index 51de8a007afe7f763a9a702cdfb1827dab8c965e..ecd5ae223fce99e9f1739ed4d0d2af466fca8191 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/combined/CombinedSliceFlags.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/combined/CombinedSliceFlags.py
@@ -2,8 +2,8 @@
 
 """ Combined slices specific flags  """
 
-from AthenaCommon.JobProperties         import JobProperty, JobPropertyContainer, jobproperties
-from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper, AllowedList
+from AthenaCommon.JobProperties         import JobProperty, JobPropertyContainer
+from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper
 
 __author__  = 'T. Bold, B. Demirkoz'
 __version__="$Revision: 1.53 $"
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/combined/generateCombinedChainDefs.py b/Trigger/TriggerCommon/TriggerMenu/python/combined/generateCombinedChainDefs.py
index f5f9cc3540896e33e0afeffc5f9613e21cdb6c0a..058d2bf069d127f0443db5e8850c39efc30bf414 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/combined/generateCombinedChainDefs.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/combined/generateCombinedChainDefs.py
@@ -448,11 +448,8 @@ def _addMatching(theChainDef,chainDicts,listOfChainDefs):
     from TrigBjetHypo.TrigLeptonJetMatchAllTEConfig  import LeptonJetMatchAllTE
  
     dzmatching = False
-    drmatching = False
     for topo in chainDicts[0]['topo']:
-        if "dz" in topo: dzmatching = True
-        if "dr" in topo: drmatching = True
- 
+        if "dz" in topo: dzmatching = True 
  
     # obtain deltaR for Hypo configuration
     deltaR = -1
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/commonUtils/makeCaloSequences.py b/Trigger/TriggerCommon/TriggerMenu/python/commonUtils/makeCaloSequences.py
index fcbbd68174a5607d92010ed4fceb36cf569415e8..478347280954715bbaa563473a1074ff80f52ef6 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/commonUtils/makeCaloSequences.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/commonUtils/makeCaloSequences.py
@@ -15,15 +15,13 @@ sys.stderr = f
 try:
     from TriggerMenu.commonUtils.LeptonIsoEDConfig import TrigHLTEnergyDensityCentral, TrigHLTEnergyDensityForward
 
-    from TrigGenericAlgs.TrigGenericAlgsConf import (PESA__DummyCombineAlgo,
-                                                     PESA__DummyUnseededAllTEAlgo as DummyAlgo)
+    from TrigGenericAlgs.TrigGenericAlgsConf import PESA__DummyUnseededAllTEAlgo as DummyAlgo
     
     from TrigCaloRec.TrigCaloRecConfig import (TrigCaloCellMaker_jet_fullcalo,
                                             TrigCaloClusterMaker_topo)
 
     from TrigCaloRec.TrigCaloRecConfig import (TrigCaloCellMaker_eGamma,
-                                            TrigCaloTowerMaker_eGamma,
-                                            TrigCaloCellMaker_eGamma_cells)
+                                            TrigCaloTowerMaker_eGamma)
     from TrigEgammaRec.TrigEgammaToolFactories import TrigCaloClusterMaker_slw
     
     # import BadImportWillFail
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/egamma/EgammaCleanMonitoring.py b/Trigger/TriggerCommon/TriggerMenu/python/egamma/EgammaCleanMonitoring.py
index 53faf515724c4f03760d78694bcb67d95483385e..c160f3cc9b7bb171f6ee2fe2e85aba537d914778 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/egamma/EgammaCleanMonitoring.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/egamma/EgammaCleanMonitoring.py
@@ -44,6 +44,11 @@ EgammaChainsToKeepMonitoring={
 "g35_loose",
 "g35_medium",
 "g200_loose_L1EM24VHIM",
+#ringer items
+"e28_lhtight_nod0_ringer_ivarloose",
+"e17_lhvloose_nod0_ringer_L1EM15VHI",
+"e60_lhmedium_nod0_ringer_L1EM24VHI",
+"e140_lhloose_nod0_ringer_L1EM24VHI",
 # Support triggers
 "e10_etcut_L1EM7",
 "e15_etcut_L1EM7",
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/egamma/EgammaDef.py b/Trigger/TriggerCommon/TriggerMenu/python/egamma/EgammaDef.py
index 384775714c172ab8721df5ce06df705844830443..a5066a5fcaeb568f8611046f4b26299eee04e67e 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/egamma/EgammaDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/egamma/EgammaDef.py
@@ -76,6 +76,7 @@ from TrigEgammaHypo.TrigEFCaloCalibFexConfig import (TrigEFCaloCalibFex_Electron
 
 from TrigMultiVarHypo.TrigL2CaloRingerHypoConfig import (TrigL2CaloRingerFexHypo_e_ID,
                                                          TrigL2CaloRingerFexHypo_e_NoCut,
+                                                         TrigL2CaloRingerFexHypo_g_NoCut,
                                                          TrigL2CaloRingerFexHypo_e_EtCut,
                                                          TrigL2CaloRingerFexHypo_g_EtCut)
 
@@ -138,7 +139,6 @@ def update_map(seq):
 
 # Class to hold all possible Fex configurables
 # Can contain both sequences and single instances
-
 class EgammaFexBuilder(object):
     """
     Summary:
@@ -554,14 +554,18 @@ class EgammaHypoBuilder(object):
             if(tt == 'e'):
                 fex,hypo = TrigL2CaloRingerFexHypo_e_NoCut(thr)
             if(tt == 'g'):
-                fex,hypo = TrigL2CaloRingerFexHypo_e_NoCut(thr)
+                fex,hypo = TrigL2CaloRingerFexHypo_g_NoCut(thr)
         elif self._properties['etcut']:
             if(tt == 'e'):
                 fex,hypo = TrigL2CaloRingerFexHypo_e_EtCut(thr)
             if(tt == 'g'):
                 fex,hypo = TrigL2CaloRingerFexHypo_g_EtCut(thr)
         elif idinfo:
-            fex, hypo = TrigL2CaloRingerFexHypo_e_ID(thr,idinfo,tt)
+            if(tt == 'e'):
+                fex, hypo = TrigL2CaloRingerFexHypo_e_ID(thr,idinfo,tt)
+            if(tt == 'g'):
+                # For now, there is no photon ringer tuning. 
+                fex, hypo = TrigL2CaloRingerFexHypo_g_NoCut(thr)
         else:
             log.error('Cannot configure ringer')
         seq = [fex,hypo]
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/egamma/EgammaSliceFlags.py b/Trigger/TriggerCommon/TriggerMenu/python/egamma/EgammaSliceFlags.py
index 186e645ebaa2770bae9b694fd4abcd68fdb1ba71..82f0c92db8b40d81473e6eb2a9402b5e355400e2 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/egamma/EgammaSliceFlags.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/egamma/EgammaSliceFlags.py
@@ -65,7 +65,7 @@ class ringerVersion (JobProperty):
     """ Version ringer tunes """
     statusOn=True
     allowedTypes=['str']
-    StoreValues='RingerSelectorTools/TrigL2_20170505_v6'
+    StoredValue='RingerSelectorTools/TrigL2_20170505_v6'
 
 _flags.append(ringerVersion)
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/egamma/ElectronDefIdTest.py b/Trigger/TriggerCommon/TriggerMenu/python/egamma/ElectronDefIdTest.py
deleted file mode 100644
index a72dc417b2153fe972aa4a386af6e64eff901077..0000000000000000000000000000000000000000
--- a/Trigger/TriggerCommon/TriggerMenu/python/egamma/ElectronDefIdTest.py
+++ /dev/null
@@ -1,998 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-""" Electron trigger slice signatures  """
-
-__author__  = 'Moritz Backes & Catrin Bernius'
-__version__=""
-__doc__="Implementation of Electron Signature"
-
-from AthenaCommon.Logging import logging
-logging.getLogger().info("Importing %s",__name__)
-log = logging.getLogger("TriggerMenu.egamma.ElectronDef")
-
-from TriggerMenu.menu.HltConfig import L2EFChainDef, mergeRemovingOverlap
-
-##########################################################################################
-#
-# Import and create fexes and hypos
-# Move global imports to class methods
-# Leave commented for now
-########################################################################################## 
-#from TrigT2CaloEgamma.TrigT2CaloEgammaConfig import T2CaloEgamma_eGamma, T2CaloEgamma_SwSeed, T2CaloEgamma_SwSeed_NoCut
-#from TrigT2CaloEgamma.TrigT2CaloEgammaConfig import T2CaloEgamma_SwCluster, T2CaloEgamma_Ringer, T2CaloEgamma_cells
-from TrigT2CaloEgamma.TrigT2CaloEgammaConfig import T2CaloEgamma_cells
-#from TrigL2MissingET.TrigL2MissingETConfig import L2CaloMissingET_Fex
-
-#theT2CaloEgamma_eGamma            = T2CaloEgamma_eGamma()
-#theT2CaloEgamma_SwSeed            = T2CaloEgamma_SwSeed()
-#theT2CaloEgamma_SwSeed_NoCut      = T2CaloEgamma_SwSeed_NoCut()
-#theT2CaloEgamma_SwCluster         = T2CaloEgamma_SwCluster()
-#theT2CaloEgamma_Ringer            = T2CaloEgamma_Ringer()
-#theL2CaloMissingET_Fex            = L2CaloMissingET_Fex() 
-theT2CaloEgamma_cells_e           = T2CaloEgamma_cells("T2CaloEgamma_cells")
-
-#from TrigIDSCAN.TrigIDSCAN_Config import TrigIDSCAN_eGamma
-#from TrigSiTrack.TrigSiTrack_Config import TrigSiTrack_eGamma, TrigSiTrack_eGamma_robust
-#from TrigL2TRTSegFinder.TrigTRTSegFinder_Config import TrigTRTSegFinder_eGamma
-
-#theTrigIDSCAN_eGamma              = TrigIDSCAN_eGamma()
-#theTrigSiTrack_eGamma             = TrigSiTrack_eGamma()
-#theTrigSiTrack_eGamma_robust      = TrigSiTrack_eGamma_robust()
-#theTrigTRTSegFinder_eGamma        = TrigTRTSegFinder_eGamma()
-
-#from TrigEgammaHypo.TrigL2CaloHypoConfig     import *
-#from TrigEgammaHypo.TrigL2ElectronFexConfig  import *
-#from TrigEgammaHypo.TrigL2ElectronHypoConfig import *
-#from TrigMultiVarHypo.TrigMultiVarHypoConfig import TrigRingerNeuralHypoConfig_e10
-#from TrigMultiVarHypo.TrigMultiVarHypoConfig import TrigRingerNeuralHypoConfig_e5
-#from TrigMultiVarHypo.TrigMultiVarHypoConfig import TrigRingerNeuralHypoConfig_e5_NoCut
-#from TrigMultiVarHypo.TrigMultiVarHypoConfig import TrigRingerNeuralFexConfig_e5
-#from TrigMultiVarHypo.TrigMultiVarHypoConfig import TrigRingerNeuralFexConfig_e10
-
-#from TrigCaloRec.TrigCaloRecConfig import  TrigCaloCellMaker_eGamma,   TrigCaloCellMaker_eGamma_cells,  TrigCaloTowerMaker_eGamma, TrigCaloClusterMaker_slw
-#theTrigCaloCellMaker_eGamma      = TrigCaloCellMaker_eGamma()
-#theTrigCaloTowerMaker_eGamma     = TrigCaloTowerMaker_eGamma()
-#theTrigCaloClusterMaker_slw      = TrigCaloClusterMaker_slw()
-
-#from TrigCaloRec.TrigCaloRecConfig import  TrigCaloCellMaker_eGamma_cells
-#theTrigCaloCellMaker_eGamma_cells= TrigCaloCellMaker_eGamma_cells()
-
-from TrigInDetConf.TrigInDetSequence import TrigInDetSequence
-[trkfast, trkprec] = TrigInDetSequence("Electron", "electron", "IDTrig").getSequence()
-
-from TrigInDetConf.TrigInDetSequence import TrigInDetSequence
-[theFastTrackFinderxAOD]                  = TrigInDetSequence("Electron","electron","FastxAOD").getSequence()
-[theL2StarxAOD]                           = TrigInDetSequence("Electron","electron","L2StarxAOD").getSequence()
-
-#theTrigEFIDOutsideInTRTOnly_Electron    = TrigEFIDSequence("Electron","electron","TRTOnly").getSequence()
-#theTrigEFIDCombined_Electron            = TrigEFIDCombined("Electron","photon", "Combined").getSequence()
-from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_eGamma as TrigFastTrackFinder_Electron
-theTrigFastTrackFinder_Electron = TrigFastTrackFinder_Electron()
-
-#from TrigEgammaHypo.TrigEFTrackHypoConfig    import *
-#from TrigEgammaHypo.TrigEFElectronHypoConfig import *
-#from TrigEgammaRec.TrigEgammaRecConfig       import *
-#theTrigEgammaRec_eGamma                  = TrigEgammaRec_eGamma()
-
-
-from TrigGenericAlgs.TrigGenericAlgsConf import PrescaleAlgo
-terminateAlgo = PrescaleAlgo('terminateAlgo')
-
-##########################################################################################
-#
-# L2 & EF Chain configuration helper classes
-#
-##########################################################################################
-
-class L2EFChain_e(L2EFChainDef):
-   
-    def __init__(self, chainDict):
-
-        self.L2sequenceList   = []
-        self.EFsequenceList   = []
-        self.L2signatureList  = []
-        self.EFsignatureList  = []
-        self.TErenamingDict   = []
-    
-        self.chainPart = chainDict['chainParts']
-
-        self.chainL1Item = chainDict['L1item']        
-        self.chainPartL1Item = self.chainPart['L1item']
-
-        self.chainCounter = chainDict['chainCounter']       
-        self.L2Name = 'L2_'+self.chainPart['chainPartName']
-        self.EFName = 'EF_'+self.chainPart['chainPartName']
-        self.mult = int(self.chainPart['multiplicity'])
-        self.chainName = chainDict['chainName']
-        self.chainPartName = self.chainPart['chainPartName']
-        self.chainPartNameNoMult = self.chainPartName[1:] if self.mult > 1 else self.chainPartName
-        self.chainPartNameNoMult += "_"+self.chainL1Item
-
-        
-        self.L2InputTE = self.chainPartL1Item or self.chainL1Item
-        # cut of L1_, _EMPTY,..., & multiplicity
-        self.L2InputTE = self.L2InputTE.replace("L1_","")
-        self.L2InputTE = self.L2InputTE.split("_")[0]
-        self.L2InputTE = self.L2InputTE[1:] if self.L2InputTE[0].isdigit() else self.L2InputTE
-
-                
-        # eXXvh_ID type chains:
-        
-        if self.chainPart['trkInfo']=='idperf': #True:# self.chainPart['IDinfo'] \
-           #and not self.chainPart['isoInfo'] \
-           #and not self.chainPart['FSinfo'] \
-           #and not self.chainPart['recoAlg'] \
-           #and not self.chainPart['hypoInfo'] \
-           #and not self.chainPart['trkInfo'] \
-           #and not self.chainPart['reccalibInfo']:
-          self.setup_eXXvh_idperf()
-        elif self.chainPart['L2IDAlg']:
-           self.setup_eXXvh_ID()
-        else:
-           self.setup_eXXvh_ID_run2()
-            
-        L2EFChainDef.__init__(self, self.chainName, self.L2Name, self.chainCounter, self.chainL1Item, self.EFName, self.chainCounter, self.L2InputTE)
-        
-
-    def defineSequences(self):
-
-        for sequence in self.L2sequenceList:
-            self.addL2Sequence(*sequence)
-
-        for sequence in self.EFsequenceList:
-            self.addEFSequence(*sequence)
-                
-    def defineSignatures(self):
-       
-        for signature in self.L2signatureList:
-            self.addL2Signature(*signature)
-
-        for signature in self.EFsignatureList:
-            self.addEFSignature(*signature)
-
-    def defineTErenaming(self):
-        self.TErenamingMap = self.TErenamingDict
-
-
-
-
-############################### DEFINE GROUPS OF CHAINS HERE ##############################
-
-
-    def setup_eXXvh_ID(self):
-        threshold = self.chainPart['threshold']
-        IDinfo = self.chainPart['IDinfo']
-        isoInfo = self.chainPart['isoInfo']
-        addInfo = self.chainPart['addInfo']
-        trkInfo = self.chainPart['trkInfo']
-        L2IDAlg = self.chainPart['L2IDAlg']
-        
-        log.info('setup_eXXvh_ID')
-        log.info('threshold: %s',threshold)
-        log.info('isoInfo: %s',isoInfo)
-        log.info('IDinfo: %s',IDinfo)
-        log.info('addInfo: %s',addInfo)
-        log.info('trkInfo: %s',trkInfo)
-       
-        # common imports required for EtCut and Electron ID chains
-        # L2 Calo FEX
-        from TrigT2CaloEgamma.TrigT2CaloEgammaConfig import T2CaloEgamma_eGamma
-        theT2CaloEgamma_eGamma            = T2CaloEgamma_eGamma()
-        
-        # L2 Tracking FEX
-        from TrigL2SiTrackFinder.TrigL2SiTrackFinder_Config import TrigL2SiTrackFinder_eGammaA
-        from TrigL2SiTrackFinder.TrigL2SiTrackFinder_Config import TrigL2SiTrackFinder_eGammaB
-        from TrigL2SiTrackFinder.TrigL2SiTrackFinder_Config import TrigL2SiTrackFinder_eGammaC
-        
-        # L2 Elecgtron FEX
-        from TrigEgammaHypo.TrigL2ElectronFexConfig  import L2ElectronFex_L2StarA
-        from TrigEgammaHypo.TrigL2ElectronFexConfig  import L2ElectronFex_L2StarB
-        from TrigEgammaHypo.TrigL2ElectronFexConfig  import L2ElectronFex_L2StarC
-        # Depends on L2 Strategy
-        log.info('L2IDAlg: %s', self.chainPart['L2IDAlg'])
-        if self.chainPart['L2IDAlg']: 
-            if L2IDAlg == 'L2StarA': 
-                theL2TrackingFex = TrigL2SiTrackFinder_eGammaA()
-                theL2ElectronFex = L2ElectronFex_L2StarA()
-            elif L2IDAlg == 'L2StarB': 
-                theL2TrackingFex = TrigL2SiTrackFinder_eGammaB()
-                theL2ElectronFex = L2ElectronFex_L2StarB()
-            elif L2IDAlg == 'L2StarC': 
-                theL2TrackingFex = TrigL2SiTrackFinder_eGammaC()
-                theL2ElectronFex = L2ElectronFex_L2StarC()
-            else:
-                log.info('Incorrect L2IDAlg')
-        # Default
-        else:
-            log.info('Use default L2StarA tracking')
-            theL2TrackingFex = TrigL2SiTrackFinder_eGammaA()
-            theL2ElectronFex = L2ElectronFex_L2StarA()
- 
-        
-
-        # EF Calo
-        from TrigCaloRec.TrigCaloRecConfig import  TrigCaloCellMaker_eGamma, TrigCaloTowerMaker_eGamma, TrigCaloClusterMaker_slw
-        theTrigCaloCellMaker_eGamma      = TrigCaloCellMaker_eGamma()
-        theTrigCaloTowerMaker_eGamma     = TrigCaloTowerMaker_eGamma()
-        theTrigCaloClusterMaker_slw      = TrigCaloClusterMaker_slw()
-        
-        # EF Tracking
-        from InDetTrigRecExample.EFInDetConfig import TrigEFIDInsideOut_Electron
-        theEFElectronIDFex           = TrigEFIDInsideOut_Electron("Electron").getSequence()
-        
-        # EF Electron FEX
-        from TrigEgammaRec.TrigEgammaRecConfig       import TrigEgammaRec_eGamma
-        theTrigEgammaRec_eGamma                  = TrigEgammaRec_eGamma()
-        #print 'ESETUP', self.chainPart
-        # these can be made more configurable later (according to tracking algorithms etc...)
-        if 'etcut' in self.chainPart['addInfo']:
-
-            from TrigEgammaHypo.TrigL2CaloHypoConfig import L2CaloHypo_NoCut
-            from TrigEgammaHypo.TrigL2ElectronHypoConfig import L2ElectronHypo_e_NoCut
-            from TrigEgammaHypo.TrigEFTrackHypoConfig import EFTrackHypo_e_NoCut
-            from TrigEgammaHypo.TrigEFElectronHypoConfig import TrigEFElectronHypo_e_EtCut
-            theL2CaloHypo      = L2CaloHypo_NoCut("L2CaloHypo_e"+str(threshold)+"_NoCut",threshold ) 
-            theL2ElectronHypo  = L2ElectronHypo_e_NoCut("L2ElectronHypo_e"+str(threshold)+"_NoCut",threshold ) 
-            theEFTrackHypo     = EFTrackHypo_e_NoCut("EFTrackHypo_e"+str(threshold)+"_NoCut",threshold) 
-            theEFElectronHypo  = TrigEFElectronHypo_e_EtCut("TrigEFElectronHypo_e"+str(threshold)+"_EtCut",threshold)
-            
-        elif 'perf' in self.chainPart['addInfo']:
-            from TrigEgammaHypo.TrigL2CaloHypoConfig import L2CaloHypo_NoCut
-            from TrigEgammaHypo.TrigL2ElectronHypoConfig import L2ElectronHypo_e_NoCut
-            from TrigEgammaHypo.TrigEFTrackHypoConfig import EFTrackHypo_e_NoCut
-            from TrigEgammaHypo.TrigEFElectronHypoConfig import TrigEFElectronHypo_e_NoCut
-            theL2CaloHypo      = L2CaloHypo_NoCut("L2CaloHypo_e"+str(threshold)+"_NoCut",threshold ) 
-            theL2ElectronHypo  = L2ElectronHypo_e_NoCut("L2ElectronHypo_e"+str(threshold)+"_NoCut",threshold ) 
-            theEFTrackHypo     = EFTrackHypo_e_NoCut("EFTrackHypo_e"+str(threshold)+"_NoCut",threshold) 
-            # EF Electron
-            theEFElectronHypo  = TrigEFElectronHypo_e_NoCut("TrigEFElectronHypo_e"+str(threshold)+"_NoCut",threshold)
-        
-        elif self.chainPart['IDinfo']:
-            algoSuffix = "e%s_%s()" % (str(threshold),IDinfo)
-            log.info('chain suffix: %s', algoSuffix)
-            #if 'mvt' in algoSuffix: 
-            #    algoSuffix = algoSuffix.replace('mvt','')
-            from TrigEgammaHypo.TrigL2CaloHypoConfig import L2CaloHypo_e_ID
-            from TrigEgammaHypo.TrigL2ElectronHypoConfig import L2ElectronHypo_e_ID
-            from TrigEgammaHypo.TrigL2ElectronHypoConfig import L2ElectronHypo_e_ID_L2TrkAlg
-            from TrigEgammaHypo.TrigEFElectronHypoConfig import TrigEFElectronHypo_e_ID
-            from TrigEgammaHypo.TrigEFElectronHypoConfig import TrigEFElectronHypo_e_Iso
-            from TrigEgammaHypo.TrigEFTrackHypoConfig import EFTrackHypo_e
-            
-            # L2 Calo
-            theL2CaloHypo = L2CaloHypo_e_ID("TrigL2CaloHypo_e"+str(threshold)+"_"+str(IDinfo),threshold,IDinfo)
-            
-            # L2 Electron
-            if self.chainPart['L2IDAlg']:
-                theL2ElectronHypo  = L2ElectronHypo_e_ID_L2TrkAlg("TrigL2ElectronHypo_e"+str(threshold)+"_"+str(IDinfo)+"_"+str(L2IDAlg),threshold,IDinfo,L2IDAlg)
-            else:
-                theL2ElectronHypo  = L2ElectronHypo_e_ID("TrigL2ElectronHypo_e"+str(threshold)+"_"+str(IDinfo),threshold,IDinfo)
-            
-            # EF Track
-            theEFTrackHypo     = EFTrackHypo_e("EFTrackHypo_e"+str(threshold)+"_"+str(IDinfo),threshold)
-            
-            # EF Electron
-            if self.chainPart['isoInfo']:
-                theEFElectronHypo  = TrigEFElectronHypo_e_Iso("TrigEFElectronHypo_e"+str(threshold)+"_"+str(IDinfo)+"_"+str(isoInfo),threshold,IDinfo,isoInfo)
-            else: 
-                theEFElectronHypo  = TrigEFElectronHypo_e_ID("TrigEFElectronHypo_e"+str(threshold)+"_"+str(IDinfo),threshold,IDinfo)
-        else:
-            algoSuffix = "e%s_%s()" % (str(threshold),IDinfo)
-            log.error('Chain %s could not be assembled', self.chainPartName)
-            log.erro('chain suffix: %s', algoSuffix)
-            return False
-        
-        ########### Sequences ###########
-        
-        self.L2sequenceList += [[self.L2InputTE, 
-                                 [theT2CaloEgamma_eGamma, theL2CaloHypo], 
-                                 'L2_e_step1']]
-        
-        self.L2sequenceList += [[['L2_e_step1'],    
-                                 [theL2TrackingFex]+theL2StarxAOD, 
-                                 'L2_e_step2']]
-        
-        self.L2sequenceList += [[['L2_e_step2'], 
-                                 [theL2ElectronFex, theL2ElectronHypo], 
-                                 'L2_e_step3']]
-        
-        self.EFsequenceList += [[['L2_e_step3'], 
-                                 [theTrigCaloCellMaker_eGamma, theTrigCaloTowerMaker_eGamma, theTrigCaloClusterMaker_slw], 
-                                 'EF_e_step1']]
-        
-        self.EFsequenceList += [[['EF_e_step1'], 
-                                 theEFElectronIDFex+[ theEFTrackHypo],
-                                 'EF_e_step2']]
-        
-        self.EFsequenceList += [[['EF_e_step2'], 
-                                 [theTrigEgammaRec_eGamma, theEFElectronHypo], 
-                                 'EF_e_step3']]
-
-        ########### Signatures ###########
-
-        self.L2signatureList += [ [['L2_e_step1']*self.mult] ]
-        self.L2signatureList += [ [['L2_e_step2']*self.mult] ]
-        self.L2signatureList += [ [['L2_e_step3']*self.mult] ]
-        self.EFsignatureList += [ [['EF_e_step1']*self.mult] ]
-        self.EFsignatureList += [ [['EF_e_step2']*self.mult] ]
-        self.EFsignatureList += [ [['EF_e_step3']*self.mult] ]
-
-        ########### TE renaming ###########
-
-        self.TErenamingDict = {
-            'L2_e_step1': mergeRemovingOverlap('L2_', self.chainPartNameNoMult+'cl'),
-            'L2_e_step2': mergeRemovingOverlap('L2_', self.chainPartNameNoMult+'id'),
-            'L2_e_step3': mergeRemovingOverlap('L2_', self.chainPartNameNoMult),
-            'EF_e_step1': mergeRemovingOverlap('EF_', self.chainPartNameNoMult+'calo'),
-            'EF_e_step2': mergeRemovingOverlap('EF_', self.chainPartNameNoMult+'id'),
-            'EF_e_step3': mergeRemovingOverlap('EF_', self.chainPartNameNoMult),
-            }
-
-
-    def setup_eXXvh_idperf(self):
-
-        threshold = self.chainPart['threshold']
-        IDinfo = self.chainPart['IDinfo']
-        isoInfo = self.chainPart['isoInfo']
-        run1 = self.chainPart['trkInfo']
-       
-        log.info('setup_eXXvh_idperf')
-        log.info('threshold: %s',threshold)
-        log.info('isoInfo: %s',isoInfo)
-        log.info('IDinfo: %s',IDinfo)
-        log.info('trkInfo: %s',run1)
-        
-        # L2 Tracking FEX
-        from TrigL2SiTrackFinder.TrigL2SiTrackFinder_Config import TrigL2SiTrackFinder_eGammaA
-        from TrigL2SiTrackFinder.TrigL2SiTrackFinder_Config import TrigL2SiTrackFinder_eGammaB
-        from TrigL2SiTrackFinder.TrigL2SiTrackFinder_Config import TrigL2SiTrackFinder_eGammaC
-        theTrigL2SiTrackFinder_eGammaA=TrigL2SiTrackFinder_eGammaA()
-        theTrigL2SiTrackFinder_eGammaB=TrigL2SiTrackFinder_eGammaB()
-        theTrigL2SiTrackFinder_eGammaC=TrigL2SiTrackFinder_eGammaC()
-        # EF Calo
-        from TrigCaloRec.TrigCaloRecConfig import  TrigCaloCellMaker_eGamma_cells
-        #theTrigCaloCellMaker_eGamma_cells= TrigCaloCellMaker_eGamma_cells()
-        from TrigCaloRec.TrigCaloRecConfig import  TrigCaloCellMaker_eGamma, TrigCaloTowerMaker_eGamma, TrigCaloClusterMaker_slw
-        theTrigCaloCellMaker_eGamma      = TrigCaloCellMaker_eGamma()
-        theTrigCaloTowerMaker_eGamma     = TrigCaloTowerMaker_eGamma()
-        theTrigCaloClusterMaker_slw      = TrigCaloClusterMaker_slw()
-        
-        # EF Tracking
-        from InDetTrigRecExample.EFInDetConfig import TrigEFIDInsideOut_Electron
-        theEFElectronIDFex           = TrigEFIDInsideOut_Electron("Electron").getSequence()
-
-        # EF Electron FEX
-        from TrigEgammaRec.TrigEgammaRecConfig       import TrigEgammaRec_eGamma
-        theTrigEgammaRec_eGamma                  = TrigEgammaRec_eGamma()
-        #print 'ESETUP', self.chainPart
-        # these can be made more configurable later (according to tracking algorithms etc...)
-        
-        if 'etcut' in self.chainPart['addInfo']:
-            from TrigEgammaHypo.TrigL2CaloHypoConfig import L2CaloHypo_NoCut
-            from TrigEgammaHypo.TrigEFElectronHypoConfig import TrigEFElectronHypo_e_EtCut
-            theL2CaloHypo      = L2CaloHypo_NoCut("L2CaloHypo_e"+str(threshold)+"_NoCut",threshold ) 
-            theEFElectronHypo  = TrigEFElectronHypo_e_EtCut("TrigEFElectronHypo_e"+str(threshold)+"_EtCut",threshold)
-        elif self.chainPart['IDinfo']:
-            from TrigEgammaHypo.TrigL2CaloHypoConfig import L2CaloHypo_e_ID
-            theL2CaloHypo = L2CaloHypo_e_ID("TrigL2CaloHypo_e"+str(threshold)+"_"+str(IDinfo),threshold,IDinfo)
-            from TrigEgammaHypo.TrigEFElectronHypoConfig import TrigEFElectronHypo_e_ID_CaloOnly
-            theEFElectronHypo  = \
-                TrigEFElectronHypo_e_ID_CaloOnly("TrigEFElectronHypo_e"+str(threshold)+"_"+str(IDinfo)+"_CaloOnly",threshold,IDinfo)
-
-
-        ########### Sequences ###########
-        trkseq = trkfast+trkprec
-
-        #calo thresholds here?
-        self.L2sequenceList += [[self.L2InputTE, 
-                                 [theT2CaloEgamma_cells_e, theL2CaloHypo], 
-                                 'L2_e_step1']]
-        
-        self.EFsequenceList += [[['L2_e_step1'], 
-                                 [theTrigCaloCellMaker_eGamma, theTrigCaloTowerMaker_eGamma, theTrigCaloClusterMaker_slw], 
-                                 'EF_e_step1']]
-        
-        if 'L2Star' in self.chainPart['addInfo']:
-            self.EFsequenceList += [[['EF_e_step1'], 
-                                     [theTrigL2SiTrackFinder_eGammaA]+theL2StarxAOD+
-                                     [theTrigL2SiTrackFinder_eGammaB]+theL2StarxAOD+
-                                     [theTrigL2SiTrackFinder_eGammaC]+theL2StarxAOD+theEFElectronIDFex,
-                                     'EF_e_step2']]
-        else:
-            self.EFsequenceList += [[['EF_e_step1'], 
-                                     trkseq,
-                                     'EF_e_step2']]
-        
-        self.EFsequenceList += [[['EF_e_step2'], 
-                                 [theTrigEgammaRec_eGamma, theEFElectronHypo], 
-                                 'EF_e_step3']]
-
-        ########### Signatures ###########
-
-        self.L2signatureList += [ [['L2_e_step1']*self.mult] ]
-        #self.L2signatureList += [ [['L2_e_step2']*self.mult] ]
-        #self.L2signatureList += [ [['L2_e_step3']*self.mult] ]
-        self.EFsignatureList += [ [['EF_e_step1']*self.mult] ]
-        self.EFsignatureList += [ [['EF_e_step2']*self.mult] ]
-        self.EFsignatureList += [ [['EF_e_step3']*self.mult] ]
-
-        ########### TE renaming ###########
-
-        self.TErenamingDict = {
-            'L2_e_step1': mergeRemovingOverlap('L2_', self.chainPartNameNoMult+'cl'),
-            'EF_e_step1': mergeRemovingOverlap('EF_', self.chainPartNameNoMult+'cl'),
-            'EF_e_step2': mergeRemovingOverlap('EF_', self.chainPartNameNoMult+'trk'),
-            'EF_e_step3': mergeRemovingOverlap('EF_', self.chainPartNameNoMult),
-            }
-
-
-    def setup_eXXvh_ID_run2(self):
-        threshold = self.chainPart['threshold']
-        IDinfo = self.chainPart['IDinfo']
-        isoInfo = self.chainPart['isoInfo']
-        trkInfo = self.chainPart['trkInfo']
-      
-        log.info('setup_eXXvh_ID_run2')
-        log.info('threshold: %s',threshold)
-        log.info('isoInfo: %s',isoInfo)
-        log.info('IDinfo: %s',IDinfo)
-        log.info('trkInfo: %s',trkInfo)
-       
-        # common imports required for EtCut and Electron ID chains
-        # L2 Calo FEX
-        from TrigT2CaloEgamma.TrigT2CaloEgammaConfig import T2CaloEgamma_eGamma
-        theT2CaloEgamma_eGamma            = T2CaloEgamma_eGamma()
-        
-        # L2 Elecgtron FEX
-        from TrigEgammaHypo.TrigL2ElectronFexConfig  import L2ElectronFex_1
-        # Depends on L2 Strategy
-        theL2ElectronFex = L2ElectronFex_1()
- 
-        # EF Calo
-        from TrigCaloRec.TrigCaloRecConfig import  TrigCaloCellMaker_eGamma, TrigCaloTowerMaker_eGamma, TrigCaloClusterMaker_slw
-        theTrigCaloCellMaker_eGamma      = TrigCaloCellMaker_eGamma()
-        theTrigCaloTowerMaker_eGamma     = TrigCaloTowerMaker_eGamma()
-        theTrigCaloClusterMaker_slw      = TrigCaloClusterMaker_slw()
-        
-        # EF Tracking
-        theEFElectronIDFex           = theTrigEFIDInsideOutMerged_Electron
-        # EF Electron FEX
-        from TrigEgammaRec.TrigEgammaRecConfig       import TrigEgammaRec_eGamma
-        theTrigEgammaRec_eGamma                  = TrigEgammaRec_eGamma()
-        #print 'ESETUP', self.chainPart
-        # these can be made more configurable later (according to tracking algorithms etc...)
-        if 'etcut' in self.chainPart['addInfo']:
-
-            from TrigEgammaHypo.TrigL2CaloHypoConfig import L2CaloHypo_NoCut
-            from TrigEgammaHypo.TrigL2ElectronHypoConfig import L2ElectronHypo_e_NoCut
-            from TrigEgammaHypo.TrigEFTrackHypoConfig import EFTrackHypo_e_NoCut
-            from TrigEgammaHypo.TrigEFElectronHypoConfig import TrigEFElectronHypo_e_EtCut
-            theL2CaloHypo      = L2CaloHypo_NoCut("L2CaloHypo_e"+str(threshold)+"_NoCut",threshold ) 
-            theL2ElectronHypo  = L2ElectronHypo_e_NoCut("L2ElectronHypo_e"+str(threshold)+"_NoCut",threshold ) 
-            theEFTrackHypo     = EFTrackHypo_e_NoCut("EFTrackHypo_e"+str(threshold)+"_NoCut",threshold) 
-            theEFElectronHypo  = TrigEFElectronHypo_e_EtCut("TrigEFElectronHypo_e"+str(threshold)+"_EtCut",threshold)
-        elif 'perf' in self.chainPart['addInfo']:
-            from TrigEgammaHypo.TrigL2CaloHypoConfig import L2CaloHypo_NoCut
-            from TrigEgammaHypo.TrigL2ElectronHypoConfig import L2ElectronHypo_e_NoCut
-            from TrigEgammaHypo.TrigEFTrackHypoConfig import EFTrackHypo_e_NoCut
-            from TrigEgammaHypo.TrigEFElectronHypoConfig import TrigEFElectronHypo_e_NoCut
-            theL2CaloHypo      = L2CaloHypo_NoCut("L2CaloHypo_e"+str(threshold)+"_NoCut",threshold ) 
-            theL2ElectronHypo  = L2ElectronHypo_e_NoCut("L2ElectronHypo_e"+str(threshold)+"_NoCut",threshold ) 
-            theEFTrackHypo     = EFTrackHypo_e_NoCut("EFTrackHypo_e"+str(threshold)+"_NoCut",threshold) 
-            # EF Electron
-            theEFElectronHypo  = TrigEFElectronHypo_e_NoCut("TrigEFElectronHypo_e"+str(threshold)+"_NoCut",threshold)
-
-        elif self.chainPart['IDinfo']:
-            algoSuffix = "e%s_%s()" % (str(threshold),IDinfo)
-            log.info('chain suffix: %s', algoSuffix)
-            #if 'mvt' in algoSuffix: 
-            #    algoSuffix = algoSuffix.replace('mvt','')
-            from TrigEgammaHypo.TrigL2CaloHypoConfig import L2CaloHypo_e_ID
-            from TrigEgammaHypo.TrigL2ElectronHypoConfig import L2ElectronHypo_e_ID
-            from TrigEgammaHypo.TrigEFElectronHypoConfig import TrigEFElectronHypo_e_ID
-            from TrigEgammaHypo.TrigEFElectronHypoConfig import TrigEFElectronHypo_e_Iso
-            from TrigEgammaHypo.TrigEFTrackHypoConfig import EFTrackHypo_e
-            
-            # L2 Calo
-            theL2CaloHypo = L2CaloHypo_e_ID("TrigL2CaloHypo_e"+str(threshold)+"_"+str(IDinfo),threshold,IDinfo)
-            
-            # L2 Electron
-            theL2ElectronHypo  = L2ElectronHypo_e_ID("TrigL2ElectronHypo_e"+str(threshold)+"_"+str(IDinfo),threshold,IDinfo)
-            
-            # EF Track
-            theEFTrackHypo     = EFTrackHypo_e("EFTrackHypo_e"+str(threshold)+"_"+str(IDinfo),threshold)
-            
-            # EF Electron
-            if self.chainPart['isoInfo']:
-                theEFElectronHypo  = TrigEFElectronHypo_e_Iso("TrigEFElectronHypo_e"+str(threshold)+"_"+str(IDinfo)+"_"+str(isoInfo),threshold,IDinfo,isoInfo)
-            else: 
-                theEFElectronHypo  = TrigEFElectronHypo_e_ID("TrigEFElectronHypo_e"+str(threshold)+"_"+str(IDinfo),threshold,IDinfo)
-        else:
-            algoSuffix = "e%s_%s()" % (str(threshold),IDinfo)
-            log.error('Chain %s could not be assembled', self.chainPartName)
-            log.erro('chain suffix: %s', algoSuffix)
-            return False
-        
-        ########### Sequences ###########
-        
-        trkcomb1st = list(theTrigEFIDDataPrep_Electron)
-        trkcomb1st.append(theTrigFastTrackFinder_Electron)
-        trkcomb1st += theFastTrackFinderxAOD
-        trkcombfull = list(trkcomb1st)
-        trkcombfull += theTrigEFIDInsideOutMerged_Electron
-
-        self.L2sequenceList += [[self.L2InputTE, 
-                                 [theT2CaloEgamma_eGamma, theL2CaloHypo], 
-                                 'L2_e_step1']]
-        
-        self.L2sequenceList += [[['L2_e_step1'],    
-                                 trkfast, 
-                                 'L2_e_step2']]
-        
-        self.L2sequenceList += [[['L2_e_step2'], 
-                                 [theL2ElectronFex, theL2ElectronHypo], 
-                                 'L2_e_step3']]
-        
-        self.EFsequenceList += [[['L2_e_step3'], 
-                                 [theTrigCaloCellMaker_eGamma, theTrigCaloTowerMaker_eGamma, theTrigCaloClusterMaker_slw], 
-                                 'EF_e_step1']]
-        
-        self.EFsequenceList += [[['EF_e_step1'], 
-                                 theEFElectronIDFex+[ theEFTrackHypo],
-                                 #trkfast+trkprec+[ theEFTrackHypo],
-                                 'EF_e_step2']]
-        
-        self.EFsequenceList += [[['EF_e_step2'], 
-                                 [theTrigEgammaRec_eGamma, theEFElectronHypo], 
-                                 'EF_e_step3']]
-
-        ########### Signatures ###########
-
-        self.L2signatureList += [ [['L2_e_step1']*self.mult] ]
-        self.L2signatureList += [ [['L2_e_step2']*self.mult] ]
-        self.L2signatureList += [ [['L2_e_step3']*self.mult] ]
-        self.EFsignatureList += [ [['EF_e_step1']*self.mult] ]
-        self.EFsignatureList += [ [['EF_e_step2']*self.mult] ]
-        self.EFsignatureList += [ [['EF_e_step3']*self.mult] ]
-
-        ########### TE renaming ###########
-
-        self.TErenamingDict = {
-            'L2_e_step1': mergeRemovingOverlap('L2_', self.chainPartNameNoMult+'cl'),
-            'L2_e_step2': mergeRemovingOverlap('L2_', self.chainPartNameNoMult+'id'),
-            'L2_e_step3': mergeRemovingOverlap('L2_', self.chainPartNameNoMult),
-            'EF_e_step1': mergeRemovingOverlap('EF_', self.chainPartNameNoMult+'calo'),
-            'EF_e_step2': mergeRemovingOverlap('EF_', self.chainPartNameNoMult+'id'),
-            'EF_e_step3': mergeRemovingOverlap('EF_', self.chainPartNameNoMult),
-            }
-
-# class L2EFChain_e_NoIDTrkCut(L2EFChain_e):
-
-#     def defineSequences(self, config):
-#         ###### L2 ######
-#         # Step 1: Calo Fex and Hypo
-#         self.addL2Sequence(self.inputTEs,
-#                            [theT2CaloEgamma_cells_e, config.L2Config.TrigL2CaloHypo_1],
-#                            'L2_e_step1')
-        
-#         # Step 2: ID Fex
-#         #append "_R1" to IDTrkNoCut chains running IDScan and SiTrack
-#         if '_R1' in self.sig_id:
-#             self.addL2Sequence(['L2_e_step1'],
-#                                [theTrigL2SiTrackFinder_eGammaA,
-#                                 theTrigL2SiTrackFinder_eGammaB,
-#                                 theTrigL2SiTrackFinder_eGammaC,
-#                                 theTrigL2SiTrackFinder_eGammaBC,
-#                                 theTrigIDSCAN_eGamma, theTrigSiTrack_eGamma, theTrigTRTSegFinder_eGamma,
-#                                 ],
-#                                'L2_e_step2')
-            
-#         elif 'L2Star' in self.sig_id:
-#             self.addL2Sequence(['L2_e_step1'],
-#                                [theTrigL2SiTrackFinder_eGammaA, theTrigL2SiTrackFinder_eGammaB, theTrigL2SiTrackFinder_eGammaC],
-#                                'L2_e_step2')
-
-#         else:
-#             #remove IDScan and SiTrack from IDTrkNoCut chains
-#             self.addL2Sequence(['L2_e_step1'],
-#                                [theTrigL2SiTrackFinder_eGammaA,
-#                                 theTrigL2SiTrackFinder_eGammaB,
-#                                 theTrigL2SiTrackFinder_eGammaC,
-#                                 theTrigL2SiTrackFinder_eGammaBC,
-#                                 theTrigTRTSegFinder_eGamma,
-#                                 ],
-#                                'L2_e_step2')
-        
-#         # Step 3: ID-Calo Fex and Hypo
-#         if 'L2Star' in self.sig_id:
-#             self.addL2Sequence(['L2_e_step2'], [config.L2Config.TrigL2ElectronFex_1], 'L2_e_step3')
-#         else:
-#             self.addL2Sequence(['L2_e_step2'],
-#                                [config.L2Config.TrigL2ElectronFex_1, config.L2Config.TrigL2ElectronHypo_1],
-#                                'L2_e_step3')
-            
-        
-#         ###### EF ######
-#         # Step 1: Calo Fex
-#         self.addEFSequence('L2_e_step3', 
-#                            [theTrigCaloCellMaker_eGamma_cells, theTrigCaloTowerMaker_eGamma, theTrigCaloClusterMaker_slw],
-#                            'EF_e_step1')
-#         # Step 2: ID Fex and Hypo
-#         self.addEFSequence('EF_e_step1', theTrigEFIDInsideOut_Electron, 'EF_e_step2')
-#         self.addEFSequence('EF_e_step2', theTrigEFIDOutsideInTRTOnly_Electron, 'EF_e_step3')
-#         # Step 3: ID-Calo Fex and Hypo
-#         self.addEFSequence('EF_e_step3', 
-#                            [theTrigEgammaRec_eGamma, config.EFConfig.TrigEFEGammaHypo_1],
-#                            'EF_e_step4')
-
-
-#     def defineSignatures(self):
-#         self.addL2Signature(['L2_e_step1']*self.mult)
-#         self.addL2Signature(['L2_e_step2']*self.mult)
-#         self.addL2Signature(['L2_e_step3']*self.mult)
-#         self.addEFSignature(['EF_e_step1']*self.mult)
-#         self.addEFSignature(['EF_e_step2']*self.mult)
-#         self.addEFSignature(['EF_e_step3']*self.mult)
-#         self.addEFSignature(['EF_e_step4']*self.mult)
-
-#     def defineTErenaming(self):
-#         self.TErenamingMap = {
-#             'L2_e_step1': mergeRemovingOverlap('L2_', self.sig_id_noMult+'cl'),
-#             'L2_e_step2': mergeRemovingOverlap('L2_', self.sig_id_noMult+'id'),
-#             'L2_e_step3': mergeRemovingOverlap('L2_', self.sig_id_noMult),
-#             'EF_e_step1': mergeRemovingOverlap('EF_', self.sig_id_noMult+'calo'),
-#             'EF_e_step2': mergeRemovingOverlap('EF_', self.sig_id_noMult+'id1'),
-#             'EF_e_step3': mergeRemovingOverlap('EF_', self.sig_id_noMult+'id2'),
-#             'EF_e_step4': mergeRemovingOverlap('EF_', self.sig_id_noMult),
-#             }
-
-
-
-
-
-# class L2EFChain_e_L2Star(L2EFChain_e):
-#     def defineSequences(self, config):
-
-#         lastpart = self.getlastpart(self.sig_id)
-
-#         if   lastpart == 'L2StarA':
-#             myTrigL2SiTrackFinder_eGamma_1 = theTrigL2SiTrackFinder_eGammaA
-#             myl2electronfex = L2ElectronFex_L2StarA()
-#         elif lastpart == 'L2StarB':
-#             myTrigL2SiTrackFinder_eGamma_1 = theTrigL2SiTrackFinder_eGammaB
-#             myl2electronfex = L2ElectronFex_L2StarB()
-#         elif lastpart == 'L2StarC':
-#             myTrigL2SiTrackFinder_eGamma_1 = theTrigL2SiTrackFinder_eGammaC
-#             myl2electronfex = L2ElectronFex_L2StarC()
-#         else:
-#             myTrigL2SiTrackFinder_eGamma_1 = theTrigL2SiTrackFinder_eGammaA
-#             myl2electronfex = L2ElectronFex_L2StarA()
-
-
-#         l2electronhypo = TrigL2ElectronHypo('L2ElectronHypo_'+self.sig_id)
-
-#         ###### L2 ######
-#         if ('etcut_L2Star' in self.sig_id):
-#             self.addL2Sequence(self.inputTEs,[theT2CaloEgamma_eGamma], 'L2_e_step1')
-#             self.addL2Sequence(['L2_e_step1'], [myTrigL2SiTrackFinder_eGamma_1], 'L2_e_step2')
-#             self.addL2Sequence(['L2_e_step2'], [myl2electronfex],  'L2_e_step3')            
-#         else:
-#             self.addL2Sequence(self.inputTEs,
-#                                [theT2CaloEgamma_eGamma, config.L2Config.TrigL2CaloHypo_1],
-#                                'L2_e_step1')
-#             self.addL2Sequence(['L2_e_step1'], [myTrigL2SiTrackFinder_eGamma_1], 'L2_e_step2')
-#             self.addL2Sequence(['L2_e_step2'], [myl2electronfex, l2electronhypo], 'L2_e_step3')
-
-
-#         ###### EF ######
-#         self.addEFSequence('L2_e_step3', 
-#                            [theTrigCaloCellMaker_eGamma, theTrigCaloTowerMaker_eGamma, theTrigCaloClusterMaker_slw],
-#                            'EF_e_step1')
-
-#         if ('etcut_L2Star' in self.sig_id):
-#             self.addEFSequence('EF_e_step1', theTrigEFIDInsideOut_Electron, 'EF_e_step2')
-#             self.addEFSequence('EF_e_step2', [theTrigEgammaRec_eGamma], 'EF_e_step3')
-#         else:
-#             self.addEFSequence('EF_e_step1', 
-#                                theTrigEFIDInsideOut_Electron + [config.EFConfig.TrigEFTrackHypo_1],
-#                                'EF_e_step2')
-#             self.addEFSequence('EF_e_step2', 
-#                                [theTrigEgammaRec_eGamma, config.EFConfig.TrigEFEGammaHypo_1],
-#                                'EF_e_step3')
-        
-
-
-# ############################################# Savannah #101482 1)
-# class L2EFChain_e_noL2ID(L2EFChain_e): 
-#     def defineSequences(self, config): 
-#         self.addL2Sequence(self.inputTEs, 
-#                            [theT2CaloEgamma_eGamma, config.L2Config.TrigL2CaloHypo_1], 
-#                            'L2_e_step1')
-#         self.addEFSequence('L2_e_step1', 
-#                            [theTrigCaloCellMaker_eGamma, theTrigCaloTowerMaker_eGamma, theTrigCaloClusterMaker_slw], 
-#                            'EF_e_step1') 
-#         self.addEFSequence('EF_e_step1', 
-#                            theTrigEFIDInsideOut_Electron + [config.EFConfig.TrigEFTrackHypo_1], 
-#                            'EF_e_step2') 
-#         self.addEFSequence('EF_e_step2', 
-#                            [theTrigEgammaRec_eGamma, config.EFConfig.TrigEFEGammaHypo_1], 
-#                            'EF_e_step3') 
-        
-#     def defineSignatures(self):
-#         self.addL2Signature(['L2_e_step1']*self.mult)
-#         self.addEFSignature(['EF_e_step1']*self.mult)
-#         self.addEFSignature(['EF_e_step2']*self.mult)
-#         self.addEFSignature(['EF_e_step3']*self.mult)
-
-#     def defineTErenaming(self):
-#         self.TErenamingMap = {
-#             'L2_e_step1': mergeRemovingOverlap('L2_', self.sig_id_noMult),
-#             'EF_e_step1': mergeRemovingOverlap('EF_', self.sig_id_noMult+'calo'),
-#             'EF_e_step2': mergeRemovingOverlap('EF_', self.sig_id_noMult+'id'),
-#             'EF_e_step3': mergeRemovingOverlap('EF_', self.sig_id_noMult),
-#             }
-
-
-# ############################################# Savannah #101482 2)
-# class L2EFChain_e_noL2IDnoEFID(L2EFChain_e): 
-#     def defineSequences(self, config): 
-#         # L2 ######
-#         # Step 1: Calo Fex and Hypo 
-#         self.addL2Sequence(self.inputTEs, 
-#                            [theT2CaloEgamma_eGamma, config.L2Config.TrigL2CaloHypo_1], 
-#                            'L2_e_step1')
-
-#         # EF ###### 
-#         # Step 1: Calo Fex 
-#         self.addEFSequence('L2_e_step1', 
-#                            [theTrigCaloCellMaker_eGamma, theTrigCaloTowerMaker_eGamma, theTrigCaloClusterMaker_slw], 
-#                            'EF_e_step1') 
-
-#         # Step 3: ID-Calo Fex and Hypo 
-#         self.addEFSequence('EF_e_step1', 
-#                            [theTrigEgammaRec_eGamma, config.EFConfig.TrigEFEGammaHypo_1], 
-#                            'EF_e_step2') 
-        
-#     def defineSignatures(self):
-#         self.addL2Signature(['L2_e_step1']*self.mult)
-#         self.addEFSignature(['EF_e_step1']*self.mult)
-#         self.addEFSignature(['EF_e_step2']*self.mult)
-
-#     def defineTErenaming(self):
-#         self.TErenamingMap = {
-#             'L2_e_step1': mergeRemovingOverlap('L2_', self.sig_id_noMult),
-#             'EF_e_step1': mergeRemovingOverlap('EF_', self.sig_id_noMult+'calo'),
-#             'EF_e_step2': mergeRemovingOverlap('EF_', self.sig_id_noMult),
-#             }
-
-# ############################################# Savannah #101482 3)
-# class L2EFChain_e_noL2IDnoEF(L2EFChain_e): 
-
-#     def defineSequences(self, config): 
-#         self.addL2Sequence(self.inputTEs, 
-#                            [theT2CaloEgamma_eGamma, config.L2Config.TrigL2CaloHypo_1], 
-#                            'L2_e_step1')
-             
-#     def defineSignatures(self):
-#         self.addL2Signature(['L2_e_step1']*self.mult)
-
-#     def defineTErenaming(self):
-#         self.TErenamingMap = {
-#             'L2_e_step1': mergeRemovingOverlap('L2_', self.sig_id_noMult),
-#             }
-
-# ############################################# Savannah #101482 4)
-# class L2EFChain_e_noL2noEFID(L2EFChain_e): 
-
-#     def defineSequences(self, config):       
-#         self.addEFSequence(self.inputTEs, 
-#                            [theTrigCaloCellMaker_eGamma, theTrigCaloTowerMaker_eGamma, theTrigCaloClusterMaker_slw], 
-#                            'EF_e_step1') 
-#         self.addEFSequence('EF_e_step1', 
-#                            [theTrigEgammaRec_eGamma, config.EFConfig.TrigEFEGammaHypo_1], 
-#                            'EF_e_step2') 
-        
-#     def defineSignatures(self):
-#         self.addEFSignature(['EF_e_step1']*self.mult)
-#         self.addEFSignature(['EF_e_step2']*self.mult)
-
-#     def defineTErenaming(self):
-#         self.TErenamingMap = {
-#             'EF_e_step1': mergeRemovingOverlap('EF_', self.sig_id_noMult+'calo'),
-#             'EF_e_step2': mergeRemovingOverlap('EF_', self.sig_id_noMult),
-#             }
-
-# ############################################# Savannah #101482 5)
-# class L2EFChain_e_noL2(L2EFChain_e): 
-
-#     def defineSequences(self, config): 
-#         self.addEFSequence(self.inputTEs, 
-#                            [theTrigCaloCellMaker_eGamma, theTrigCaloTowerMaker_eGamma, theTrigCaloClusterMaker_slw], 
-#                            'EF_e_step1') 
-#         self.addEFSequence('EF_e_step1', 
-#                            theTrigEFIDInsideOut_Electron + [config.EFConfig.TrigEFTrackHypo_1], 
-#                            'EF_e_step2') 
-#         self.addEFSequence('EF_e_step2', 
-#                            [theTrigEgammaRec_eGamma, config.EFConfig.TrigEFEGammaHypo_1], 
-#                            'EF_e_step3')
-        
-#     def defineSignatures(self):
-#         self.addEFSignature(['EF_e_step1']*self.mult)
-#         self.addEFSignature(['EF_e_step2']*self.mult)
-#         self.addEFSignature(['EF_e_step3']*self.mult)
-
-#     def defineTErenaming(self):
-#         self.TErenamingMap = {
-#             'EF_e_step1': mergeRemovingOverlap('EF_', self.sig_id_noMult+'calo'),
-#             'EF_e_step2': mergeRemovingOverlap('EF_', self.sig_id_noMult+'id'),
-#             'EF_e_step3': mergeRemovingOverlap('EF_', self.sig_id_noMult),
-#             }
-
-
-
-##########################################################################################
-#
-# Helper class for writing python code, eg HLT to L1 maps
-#
-##########################################################################################
-class ElectronCodeHelper:
-    def __init__(self):
-        
-        global Electrons
-
-        iwidth = int(0)
-        for echain in Electrons:
-            if iwidth < len(echain.l2chain.sig_id):
-                iwidth = len(echain.l2chain.sig_id) 
-            
-        for echain in Electrons:
-            l2name = '\''+echain.l2chain.sig_id.rstrip()+'\''
-            l1name = '\''+echain.l2chain.lower_chain_name.rstrip()+'\''
-            lempty = ''
-            for istep in range(len(echain.l2chain.sig_id), iwidth):
-                lempty += ' '
-            
-        for echain in Electrons:
-            if echain.l2chain.lower_chain_name not in l1map:
-                l1map[echain.l2chain.lower_chain_name] = echain.l2chain.inputTEs
-
-
-##########################################################################################
-#
-# Exception class
-#
-##########################################################################################
-class EgammaMapError(Exception):
-    def __init__(self, value):
-        self.value = value
-    def __str__(self):
-        return repr(self.value)
-
-
-##########################################################################################
-#
-# Get list of L1 thresholds (L2 input TEs) for L1 item
-#
-##########################################################################################
-# def getEM_InTEFromItemConfig(item):
-    
-#     log = logging.getLogger( "EgammaSliceFlags" )
-#     tpc = TriggerPythonConfig.currentTriggerConfig()
-
-#     if item not in tpc.allItems.keys():
-#         raise EgammaMapError('L1 item is not among all keys: '+item)
-
-#     resItem = tpc.allItems[item]
-#     resTEs  = resItem.thresholdNames()
-
-#     log.info('Found TEs for item: '+item+str(resTEs))
-#     return resTEs
-
-
-
-
-###############################
-## not in v4 menu
-###############################
-
-# class L2EFChain_e_NoIDTrkCut_IDT(L2EFChain_e):
-
-#     def defineSequences(self, config):
-#         ###### L2 ######
-#         # Step 1: Calo Fex and Hypo
-#         self.addL2Sequence(self.inputTEs,
-#                            [theT2CaloEgamma_cells_e, config.L2Config.TrigL2CaloHypo_1],
-#                            'L2_e_step1')
-        
-#         #remove IDScan and SiTrakck from IDTrkNoCut chains
-#         self.addL2Sequence(['L2_e_step1'],
-#                            [theTrigL2SiTrackFinder_eGammaA,
-#                             theTrigL2SiTrackFinder_eGammaB,
-#                             theTrigL2SiTrackFinder_eGammaC,
-#                             theTrigL2SiTrackFinder_eGammaBC,
-#                             theTrigTRTSegFinder_eGamma,
-#                             ],
-#                            'L2_e_step2')
-        
-#         # Step 3: ID-Calo Fex and Hypo
-#         self.addL2Sequence(['L2_e_step2'],
-#                            [config.L2Config.TrigL2ElectronFex_1, config.L2Config.TrigL2ElectronHypo_1],
-#                            'L2_e_step3')
-                
-#         ###### EF ######
-#         # Step 1: Calo Fex
-#         self.addEFSequence('L2_e_step3', 
-#                            [theTrigCaloCellMaker_eGamma_cells, theTrigCaloTowerMaker_eGamma, theTrigCaloClusterMaker_slw],
-#                            'EF_e_step1')
-
-#         # Step 3: ID Fex and Hypo
-#         self.addEFSequence('EF_e_step1', theTrigEFIDInsideOut_Electron, 'EF_e_step2')
-#         self.addEFSequence('EF_e_step2', theTrigEFIDOutsideInTRTOnly_Electron, 'EF_e_step3')
-
-#         # Step 4: IDMerged Fex
-#         try:
-#             from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_Electron
-#             theTrigFastTrackFinder_Electron = TrigFastTrackFinder_Electron()
-#         except:
-#             theTrigFastTrackFinder_Electron = None
-       
-  
-#         trkseq = theTrigEFIDInsideOut_Electron_MergedDP.getSequence()
-#         trkseq.append(theTrigFastTrackFinder_Electron)
-#         theTrigEFIDInsideOutMerged_Electron = TrigEFIDSequence("Electron","electron","InsideOutMerged")
-#         trkseq += theTrigEFIDInsideOutMerged_Electron.getSequence(),
-#         self.addEFSequence('EF_e_step3',
-#                            trkseq,
-#                            'EF_e_step4')
-        
-#         # Step 3: ID-Calo Fex and Hypo
-#         self.addEFSequence('EF_e_step4', 
-#                            [theTrigEgammaRec_eGamma, config.EFConfig.TrigEFEGammaHypo_1],
-#                            'EF_e_step5')
-
-#     def defineSignatures(self):
-#         self.addL2Signature(['L2_e_step1'])
-#         self.addL2Signature(['L2_e_step2'])
-#         self.addL2Signature(['L2_e_step3'])
-#         self.addEFSignature(['EF_e_step1'])
-#         self.addEFSignature(['EF_e_step2'])
-#         self.addEFSignature(['EF_e_step3'])
-#         self.addEFSignature(['EF_e_step4'])
-#         self.addEFSignature(['EF_e_step5'])
-
-#     def defineTErenaming(self):
-#         self.TErenamingMap = {
-#             'L2_e_step1': mergeRemovingOverlap('L2_', self.sig_id+'cl'),
-#             'L2_e_step2': mergeRemovingOverlap('L2_', self.sig_id+'id'),
-#             'L2_e_step3': mergeRemovingOverlap('L2_', self.sig_id),
-#             'EF_e_step1': mergeRemovingOverlap('EF_', self.sig_id+'calo'),
-#             'EF_e_step2': mergeRemovingOverlap('EF_', self.sig_id+'id1'),
-#             'EF_e_step3': mergeRemovingOverlap('EF_', self.sig_id+'id2'),
-#             'EF_e_step4': mergeRemovingOverlap('EF_', self.sig_id+'idt'),
-#             'EF_e_step5': mergeRemovingOverlap('EF_', self.sig_id),
-#             }
-
-
-# class L2EFChain_e_TRT_Ringer(L2EFChain_e):
-
-#     def defineSequences(self, config):
-#         self.addL2Sequence(self.inputTEs,
-#                            [theT2CaloEgamma_Ringer, config.L2Config.TrigL2CaloHypo_1],
-#                            'L2_e_step1')
-#         self.addL2Sequence(['L2_e_step1'],
-#                            [theTrigTRTSegFinder_eGamma],
-#                            'L2_e_step2')
-#         self.addL2Sequence(['L2_e_step2'],
-#                            [config.L2Config.TrigL2ElectronFex_1, config.L2Config.TrigL2ElectronHypo_1],
-#                            'L2_e_step3')
-#         self.addEFSequence('L2_e_step3',
-#                            [theTrigCaloCellMaker_eGamma, theTrigCaloTowerMaker_eGamma, theTrigCaloClusterMaker_slw],
-#                            'EF_e_step1')    
-#         self.addEFSequence('EF_e_step1',    
-#                            theTrigEFIDOutsideInTRTOnly_Electron + [config.EFConfig.TrigEFTrackHypo_1],
-#                            'EF_e_step2')
-#         self.addEFSequence('EF_e_step2',
-#                            [theTrigEgammaRec_eGamma, config.EFConfig.TrigEFEGammaHypo_1],
-#                            'EF_e_step3')
-        
-        
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/egamma/generateElectronChainDefs.py b/Trigger/TriggerCommon/TriggerMenu/python/egamma/generateElectronChainDefs.py
index 73690202fbf42d87829ea41ba836993221cabba7..235d5b79366b924279108e9949476a71e6c856a4 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/egamma/generateElectronChainDefs.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/egamma/generateElectronChainDefs.py
@@ -9,14 +9,7 @@ from AthenaCommon.Logging import logging
 log = logging.getLogger( 'TriggerMenu.egamma.generateElectronChainDefs' )
 log.info("Importing %s",__name__)
 
-import traceback
-
 from TriggerMenu.egamma.ElectronDef import L2EFChain_e as L2EFChain_e
-try:
-    from TriggerMenu.egamma.ElectronDefIdTest import L2EFChain_e as L2EFChain_e_IdTest
-except:
-    log.error('generateElectronChainDefs: Problems when importing ElectronDefIdTest.')
-    log.info(traceback.print_exc())
 
 #from TriggerJobOpts.TriggerFlags import TriggerFlags
 from TriggerMenu.menu.MenuUtils import splitChainDict, mergeChainDefs, setupTopoStartFrom
@@ -34,10 +27,7 @@ def generateChainDefs(chainDict):
     for subChainDict in listOfChainDicts:
         electron_seq = EgammaSequence(subChainDict)
         log.debug('Egamma Sequence: %s', electron_seq)
-        if "IdTest" in subChainDict["chainParts"]["addInfo"]:
-            Electron = L2EFChain_e_IdTest(subChainDict)
-        else:
-            Electron = L2EFChain_e(subChainDict,electron_seq)
+        Electron = L2EFChain_e(subChainDict,electron_seq)
             
         listOfChainDefs += [Electron.generateHLTChainDef()]
     if len(listOfChainDefs)>1:
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/egamma/generatePhotonChainDefs.py b/Trigger/TriggerCommon/TriggerMenu/python/egamma/generatePhotonChainDefs.py
index 6fb3825c5c27085dfc6550309b5a68edc7de7473..f8d2e409aa06ef0fd67b2c6d67556c4af4133f8c 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/egamma/generatePhotonChainDefs.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/egamma/generatePhotonChainDefs.py
@@ -46,11 +46,8 @@ def _addTopoInfo(theChainDef,chainDict,doAtL2AndEF=True):
         if signature['listOfTriggerElements'][0][0:2] == "L2":
             maxL2SignatureIndex = max(maxL2SignatureIndex,signatureIndex)
     
-    inputTEsL2 = theChainDef.signatureList[maxL2SignatureIndex]['listOfTriggerElements']
-      
     inputTEsEF = theChainDef.signatureList[-1]['listOfTriggerElements']
 
-    L2ChainName = "L2_" + chainDict['chainName']
     EFChainName = "EF_" + chainDict['chainName']
     
     if "Jpsiee" in chainDict["topo"]:
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/heavyion/HeavyIonDef.py b/Trigger/TriggerCommon/TriggerMenu/python/heavyion/HeavyIonDef.py
index 9ae2fbfcaf2e82636cf688a18c390381c91aa593..b89c2548b7ec0efd461d91c24d259068adeca923 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/heavyion/HeavyIonDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/heavyion/HeavyIonDef.py
@@ -316,7 +316,6 @@ class L2EFChain_HI(L2EFChainDef):
 
     def setup_hi_ultraperipheral_gap(self):
         from TrigCaloRec.TrigCaloRecConf import TrigL1BSTowerMaker
-        from TrigCaloRec.TrigCaloRecConfig import TrigL1BSTowerHypoConfig
         from TrigCaloRec.TrigCaloRecConf import TrigL1FCALTTSumFex
         theL1BS = TrigL1BSTowerMaker()
         theL1BSFex = TrigL1FCALTTSumFex('TrigL1FCALTTSumFex')
@@ -326,7 +325,6 @@ class L2EFChain_HI(L2EFChainDef):
         
         # L2 sel (TT) is used when The chain is sither L2Fgap* or Fgap*, and not used when EFGap, similarily for EF (cells) part
         gap  = self.chainPart['gap']
-        useEF = not ('L2Fgap' in self.chainPart['gap'])
 
         #        theSptrkMaker = 
         #        theSptrkHypo = 
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/heavyion/HeavyIonSliceFlags.py b/Trigger/TriggerCommon/TriggerMenu/python/heavyion/HeavyIonSliceFlags.py
index 4ed1991034cdac9c0f540db26171fb19187ec7f2..98e12e1a0535ec096d4cd1bb09b4060923b35d56 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/heavyion/HeavyIonSliceFlags.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/heavyion/HeavyIonSliceFlags.py
@@ -2,10 +2,8 @@
 
 """ HeavyIon slice specific flags  """
 
-from AthenaCommon.Logging import logging
-from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer, jobproperties
-from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper, AllowedList
-from TriggerMenu.menu.TriggerPythonConfig import TriggerPythonConfig
+from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer
+from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper
 
 __author__  = 'R. Kwee, B. Demirkoz, T.Bold, T.Kohno, W. H. Bell'
 __version__="$Revision: 1.18 $"
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/heavyion/generateHeavyIonChainDefs.py b/Trigger/TriggerCommon/TriggerMenu/python/heavyion/generateHeavyIonChainDefs.py
index c002a31e82dd3f7a48b75eb1c263961fe49687d7..465c922ef0479308fa6a80b5d19894d24e5375f4 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/heavyion/generateHeavyIonChainDefs.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/heavyion/generateHeavyIonChainDefs.py
@@ -3,14 +3,14 @@
 ##########################################################################################
 ##########################################################################################
 __doc__=""
-__version__="Implementation of min bias signatures"
+__version__="Implementation of heavy ion signatures"
 
 from AthenaCommon.Logging import logging
 logging.getLogger().info("Importing %s",__name__)
 
 
-from TriggerMenu.heavyion.HeavyIonDef import *
-from TriggerMenu.menu.MenuUtils import *
+from TriggerMenu.heavyion.HeavyIonDef import L2EFChain_HI
+from TriggerMenu.menu.MenuUtils import splitChainDict,mergeChainDefs
 
 
 HeavyIon = []
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/AlgFactory.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/AlgFactory.py
index b37236979b39b29307de43b1f600bb90a7cfeea2..31212bf4d6fa4e62949d89dbca80ea2fea4db8cf 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/jet/AlgFactory.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/AlgFactory.py
@@ -138,7 +138,7 @@ class AlgFactory(object):
         """Instantiate a python object for TrigHLTJetRec that will
         use TriggerTower objcts as as input."""
 
-        merge_param_str = str(self.fex_params.merge_param).zfill(2)
+        #merge_param_str = str(self.fex_params.merge_param).zfill(2)
     
         factory = 'TrigHLTJetRecFromTriggerTower'
         # add factory to instance label to facilitate log file searches
@@ -309,10 +309,10 @@ class AlgFactory(object):
         # name = '"%s_%s"' % (algType, self.chain_name_esc)
         hypo = self.menu_data.hypo_params
 
-        eta_mins = [ja.eta_min for ja in hypo.jet_attributes]
-        eta_maxs = [ja.eta_max for ja in hypo.jet_attributes]
-        EtThresholds = [ja.threshold * GeV for ja in hypo.jet_attributes]
-        asymmetrics = [ja.asymmetricEta for ja in hypo.jet_attributes]
+        eta_mins = [jatt.eta_min for jatt in hypo.jet_attributes]
+        eta_maxs = [jatt.eta_max for jatt in hypo.jet_attributes]
+        EtThresholds = [jatt.threshold * GeV for jatt in hypo.jet_attributes]
+        asymmetrics = [jatt.asymmetricEta for jatt in hypo.jet_attributes]
         
         kargs = {
             'name': name,
@@ -463,10 +463,6 @@ class AlgFactory(object):
     def superRoIMaker(self):
         factory = 'SeededAlgo'
 
-        params = {'UseRoiSizes':False,
-                  'EtaHalfWidth':0.5,
-                  'PhiHalfWidth':0.5}
-
         name = '"SeededAlgo_%s"' % self.seed
 
         options = {'name': name,
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/ChainConfigMaker.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/ChainConfigMaker.py
index 5bed0b372a6613f2a2c43aaf383b02334b5c35d8..26f8b677a62f0f331950c1e27cd4765213df5f94 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/jet/ChainConfigMaker.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/ChainConfigMaker.py
@@ -24,17 +24,17 @@ def _check_smc(smc_min, smc_max):
         return 'min smc > max smc'
 
     try:
-        test = float(smc_min)  # float('INF'), float('-INF') work...
+        float(smc_min)  # float('INF'), float('-INF') work...
     except:
         return 'min smc does not convert to float'
 
     try:
-        test = float(smc_max)  # float('INF'), float('-INF') work...
+        float(smc_max)  # float('INF'), float('-INF') work...
     except:
         return 'max smc does not convert to float'
 
 
-    if not  float(smc_min) <= float(smc_max):
+    if not float(smc_min) <= float(smc_max):
         return 'min smc > max smc'
 
     return ''
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/JetDef.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/JetDef.py
index e4d3b7bb7e8c156db6aedd47a8946a9da6515de8..f02aaee7ee168f9f6016cfd708abc85b3f3db372 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/jet/JetDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/JetDef.py
@@ -4,7 +4,6 @@
 validity and repackage before forwarding ot to the ChainDef generating
 code."""
 import os
-import re
 import copy
 import sys
 import getopt
@@ -169,8 +168,6 @@ def _make_chaindef(from_central, instantiator):
     # rearrange the input data to produce chain_config
     chain_config = chainConfigMaker(from_central)
 
-    chain_name = chain_config.chain_name
-
     alg_factory = AlgFactory(chain_config)
     seq_builder = JetSequencesBuilder(alg_factory, chain_config)
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/JetDef_test.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/JetDef_test.py
index 18c5b71d50c70991f0e83f4db4554eb9f3174861..abe6d4de8cc1deed4393f453d70b8c89368a75fa 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/jet/JetDef_test.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/JetDef_test.py
@@ -1,11 +1,7 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-import sys
-import os
-from cStringIO import StringIO
 import copy
 import unittest
-from mock import MagicMock
 from JetDef import generateHLTChainDef, usage
 
 from ChainConfigMaker import JetAttributes
@@ -35,7 +31,7 @@ class TestJetDef(unittest.TestCase):
 
     def _test_3(self):
         'run exerciser function'
-        run_test()
+        #run_test()
 
     def test_4(self):
         'test error handling: missing entry in input dict'
@@ -252,7 +248,7 @@ class TestJetDef(unittest.TestCase):
              'topoStartFrom': False,
              'topoThreshold': None}
         
-        chain_def = generateHLTChainDef(d)
+        generateHLTChainDef(d)
         
 
 if __name__ == '__main__':
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/JetDef_test2.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/JetDef_test2.py
index 6dc50c1a2727f9610e1fa341b08750072bddb483..4fafd48898bf4cb79f9cc7b491e6373f5ec5e53f 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/jet/JetDef_test2.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/JetDef_test2.py
@@ -1,18 +1,9 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-import sys
 import os
-from cStringIO import StringIO
-import copy
 import unittest
-from mock import MagicMock
-from JetDef import generateHLTChainDef, usage
 from test_functions import run_test_dicts
 
-from ChainConfigMaker import JetAttributes
-
-from MC_pp_V5_dicts import MC_pp_V5_dicts
-
 class TestJetDef2(unittest.TestCase):
 
     def setUp(self):
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/JetSequencesBuilder.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/JetSequencesBuilder.py
index f02b6e18da1110c53291def53e3c393fd338afb7..4b1b85404c991b42ea2562b40d6072d2416f4178 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/jet/JetSequencesBuilder.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/JetSequencesBuilder.py
@@ -360,7 +360,7 @@ class JetSequencesBuilder(object):
 
         menu_data = self.chain_config.menu_data
         fex_params = menu_data.fex_params
-        cluster_params = menu_data.cluster_params
+        #cluster_params = menu_data.cluster_params
 
         alias = 'hijetrec_%s' % fex_params.fex_label
 
@@ -372,7 +372,7 @@ class JetSequencesBuilder(object):
 
         menu_data = self.chain_config.menu_data
         fex_params = menu_data.fex_params
-        cluster_params = menu_data.cluster_params
+        #cluster_params = menu_data.cluster_params
 
         # set jes label according to whether the JES corrections will
         # be done by JetRecTool
@@ -450,18 +450,16 @@ class JetSequencesBuilder(object):
         if f is None:
             msg = '%s._make_jh: unknown hypotype %s' % (
                 self.__class__.__name__, hypo.hypo_type)
-    
+            raise RuntimeError(msg)
+
         return AlgList(f(), alias)
 
 
     def make_jh_ht(self):
         """Create an alg_list for 2015 JetRec hypo sequence"""
 
-        menu_data = self.chain_config.menu_data
-        hypo = menu_data.hypo_params
         f = self.alg_factory.hlthypo2_ht
 
-        hypo = menu_data.hypo_params
         alias = 'hthypo_%s' % self.chain_name_esc
 
         return AlgList(f(), alias)
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/JetSequencesBuilder_test.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/JetSequencesBuilder_test.py
index 8802520d295fb39ff6d5a78321e1ae44529d4330..d91510c90c0035c895af291695fc07b81a51162e 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/jet/JetSequencesBuilder_test.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/JetSequencesBuilder_test.py
@@ -1,7 +1,7 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 import unittest
-from mock import MagicMock, Mock
+from mock import MagicMock
 
 from JetSequencesBuilder import (AlgList,
                                  JetSequencesBuilder)
@@ -74,7 +74,8 @@ class TestJetSequencesBuilder(unittest.TestCase):
     def _test_2(self):
         'test that legal MenuData objects combinatations'
 
-        self.router.make_alglists(chain_config)
+        #2017-05-22 commenting out because chain_config is undefined and causes an error with flake8 unit testing
+        #self.router.make_alglists(chain_config)
 
 if __name__ == '__main__':
     unittest.main()
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/JetSliceFlags.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/JetSliceFlags.py
index 6bd0c474e1fe3f7334f3dd70bb6349de7ae6e55b..feb09f82c5ab295bdf83193d257a4d70f1727608 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/jet/JetSliceFlags.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/JetSliceFlags.py
@@ -2,8 +2,8 @@
 
 """ Jet slice specific flags  """
 
-from AthenaCommon.JobProperties         import JobProperty, JobPropertyContainer, jobproperties
-from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper, AllowedList
+from AthenaCommon.JobProperties         import JobProperty, JobPropertyContainer
+from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper
 
 __author__  = 'T. Bold'
 __version__="$Revision: 1.31 $"
@@ -22,7 +22,6 @@ _flags.append(signatures)
 
 
 # create container
-from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper
 
 class JetSlice(JobPropertyContainer, CommonSliceHelper):
     """ Jet Slice Flags """
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/Sequence_test.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/Sequence_test.py
index d92d9f299e500cf7022ccd9ed644a381ddd5270c..b0538b83325f500f5ae55d0a808166df7c6c52d5 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/jet/Sequence_test.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/Sequence_test.py
@@ -1,7 +1,6 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 import unittest
-from mock import MagicMock, Mock
 
 from Sequence import Sequence
 
@@ -24,7 +23,7 @@ class TestSequence(unittest.TestCase):
     def test_0(self):
 
         # excercise __str__
-        s = str(self.sequence)
+        #s = str(self.sequence)
 
         instantiator = Instantiator()
         self.sequence.instantiateAlgs(instantiator)
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/StdOutController.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/StdOutController.py
index 7bff782e700a8deeb7059646680d669485355052..afba5eb47515bb0c9585c38058b7ddef29a2a76a 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/jet/StdOutController.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/StdOutController.py
@@ -1,7 +1,6 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 import sys
-import os
 
 """Switch stdout on, off"""
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/cluster_factory.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/cluster_factory.py
index a4a4fc2fa181acffb5937b0ea55b5a30f379742d..ae69c41d973c4988f3e8210fdec75dd587d38925 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/jet/cluster_factory.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/cluster_factory.py
@@ -1,7 +1,5 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-from collections import defaultdict
-
 
 def cluster_factory(doLC):
     # no choice yet
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/fexargs_factory_test.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/fexargs_factory_test.py
index 95dbfac67f3a1dc7c9f4099e3e4c28d429408c90..dc76fcb301d197f34b38d14fcec32fe9b8e507fe 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/jet/fexargs_factory_test.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/fexargs_factory_test.py
@@ -4,7 +4,6 @@
 INCOMPLETE
 """
 
-import copy
 import unittest
 from mock import MagicMock
 from fexargs_factory import fexargs_factory
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/fexparams_factory_test.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/fexparams_factory_test.py
index 1862862fccf4376a1abd43b50c83a0d388b6395f..62ff809f333713e07e0fc0bac0b4c863a2a5350a 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/jet/fexparams_factory_test.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/fexparams_factory_test.py
@@ -4,7 +4,6 @@
 INCOMPLETE
 """
 
-import copy
 import unittest
 from mock import MagicMock
 from fexparams_factory import fexparams_factory
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/generateJetChainDefs.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/generateJetChainDefs.py
index 4ec6e1b5d890fb7dbdd63a71f97c125c2a7804ac..79d40291b80aa19fe462ddfa991901dcde229862 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/jet/generateJetChainDefs.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/generateJetChainDefs.py
@@ -13,12 +13,12 @@ from AthenaCommon.SystemOfUnits import GeV
 
 from TriggerMenu.jet.JetDef import generateHLTChainDef
 
-from TriggerMenu.menu.MenuUtils import *
+from TriggerMenu.menu.MenuUtils import splitChainDict
 
 from JetDef import dump_chaindef
 from exc2string import exc2string2
 from TriggerMenu.menu.ChainDef import ErrorChainDef
-import os, inspect
+import os
 
 from TriggerMenu.commonUtils.makeCaloSequences import getFullScanCaloSequences
 # TrigEFHLTJetMassDEta_Config = __import__("TrigHLTJetHypo.TrigEFHLTJetMassDEtaConfig",fromlist=[""])
@@ -80,15 +80,7 @@ def _addTopoInfo(theChainDef,chainDict, topoAlgs, doAtL2AndEF=True):
     
     inputTEsL2 = theChainDef.signatureList[maxL2SignatureIndex]['listOfTriggerElements'] 
     inputTEsEF = theChainDef.signatureList[-1]['listOfTriggerElements']
-
-    L2ChainName = "L2_" + chainDict['chainName']
-    EFChainName = "EF_" + chainDict['chainName']
-    HLTChainName = "HLT_" + chainDict['chainName']   
-    #topoAlgs = chainDict["topo"]
-
-    listOfChainDicts = splitChainDict(chainDict)
-    listOfChainDefs = []
-
+ 
     if ('muvtx' in topoAlgs):
        # import pdb;pdb.set_trace()
         theChainDef = generateMuonClusterLLPchain(theChainDef, chainDict, inputTEsL2, inputTEsEF, topoAlgs)
@@ -140,7 +132,6 @@ def generateMuonClusterLLPchain(theChainDef, chainDict, inputTEsL2, inputTEsEF,
     TE_muonClusters = HLTChainName+'_muonClusters'
     TEmuonIsoB = HLTChainName+'_muIsoB'
     TEmuonClusterFex = HLTChainName+'_muClusFex'
-    TEmuonClusterHypo = HLTChainName+'_muClusHypo'
 
     # make clusters, then test if they pass the hypo
     theChainDef.addSequence([fexes_l2_MuonCluster,hypos_l2_MuonCluster], l1item, TE_muonClusters)
@@ -312,6 +303,7 @@ def addDetaInvmTopo(theChainDef,chainDicts,inputTEsL2, inputTEsEF,topoAlgs):
     
     logJet.debug("Configuration of EFHLTJetMassDeta hypo for chain %s: Hypo %s, AlgoName: %s " %(chainDicts['chainName'],hypo,algoName))
     # import pdb;pdb.set_trace()
+    TrigEFHLTJetMassDEta_Config = None
     try:
         detamjjet_hypo = getattr(TrigEFHLTJetMassDEta_Config,hypo ) 
     except:  
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/hypo_factory.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/hypo_factory.py
index 1bc9501c5d17e363cb13927196479d7c56359df3..d52e1680c2d7944e883995a9008677df180178e1 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/jet/hypo_factory.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/hypo_factory.py
@@ -1,8 +1,6 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 from collections import defaultdict
-from eta_string_conversions import eta_string_to_floats
-
 
 def hypo_factory(key, args):
 
@@ -243,7 +241,7 @@ class TLAHypo(TLABase):
 
     def __init__(self, ddict):
         TLABase.__init__(self, ddict)
-        hypo_type = 'tla'
+        self.hypo_type = 'tla'
         
 
 class HLThypo2_tla(TLABase):
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/hypo_factory_test.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/hypo_factory_test.py
index ab6080a3346f3b92a7cf181c6b2cb606b5a11606..281156bb311f2add82b6cd82f98baecfe41170d3 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/jet/hypo_factory_test.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/hypo_factory_test.py
@@ -1,10 +1,8 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-import copy
 import unittest
 from mock import MagicMock
 from hypo_factory import (hypo_factory,
-                          HypoAlg,
                           JetStandardHypo,
                           JetSingleEtaRegionHypo,
                           JetMaximumBipartiteHypo,
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/jetDefAlgToString_test.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/jetDefAlgToString_test.py
index 3a1e2dee3ef9d6e10eb2cfb9d676936b3af898ee..924e3c14556b92e5bce52de96ef42b0f9bd3d3e5 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/jet/jetDefAlgToString_test.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/jetDefAlgToString_test.py
@@ -1,7 +1,6 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 import unittest
-from mock import MagicMock, Mock
 from AlgFactory import Alg
 from jetDefAlgToString import JetDefAlgToStringInstantiator
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/jetDefInstantiator.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/jetDefInstantiator.py
index 14596a42d2f4df9fc5db7a15cf0364cf27275920..a17c3b9771593d0065fb1e2c087ab4d3559e28a7 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/jet/jetDefInstantiator.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/jetDefInstantiator.py
@@ -10,11 +10,8 @@ from exc2string import exc2string2
 
 #from TriggerJobOpts.TriggerFlags import TriggerFlags
 
-from TrigGenericAlgs.TrigGenericAlgsConf import \
-    PESA__DummyUnseededAllTEAlgo as DummyAlgo
-
-from TrigGenericAlgs.TrigGenericAlgsConf import \
-    PESA__SeededSuperRoiAllTEAlgo as SeededAlgo
+from TrigGenericAlgs.TrigGenericAlgsConf import PESA__DummyUnseededAllTEAlgo as DummyAlgo   # noqa: F401
+from TrigGenericAlgs.TrigGenericAlgsConf import PESA__SeededSuperRoiAllTEAlgo as SeededAlgo # noqa: F401
 
 # from TrigGenericAlgs.TrigGenericAlgsConf import DummyFEX
 
@@ -25,44 +22,44 @@ from TrigGenericAlgs.TrigGenericAlgsConf import \
 #                                           TrigCaloClusterMaker_topo,
 #                                           TrigLArNoisyROAlgConfig)
 
-from TrigCaloRec.TrigCaloRecConfig import (TrigCaloCellMaker_jet_fullcalo,
-                                           TrigCaloCellMaker_jet_super,
-                                           TrigCaloClusterMaker_topo)
-
-from TrigCaloRec.TrigCaloRecConf import (TrigL1BSTowerMaker,)
-
-from TrigHLTJetRec.TrigHLTJetRecConf import TrigHLTRoIDiagnostics
-
-from TrigHLTJetRec.TrigHLTJetRecConfig import (TrigHLTJetDiagnostics_named,
-                                               TrigHLTJetRecFromCluster,
-                                               TrigHLTJetRecFromJet,
-                                               TrigHLTJetRecGroomer,
-                                               TrigHLTJetRecFromTriggerTower,
-                                               TrigHLTClusterDiagnostics_named,
-                                               TrigHLTCellDiagnostics_named,
-                                               TrigHLTHypoDiagnostics_named,
-                                               TrigHLTJetDebug,
-                                               TrigHLTEnergyDensity,
-                                               TrigHLTSoftKiller,
-                                               TrigHLTJetDSSelector,
-                                               TrigHLTTrackMomentHelpers,)
-
-from TrigHLTJetHypo.TrigHLTJetHypoConfig import (TrigHLTJetHypo2,
-                                                 TrigHLTJetHypo_DijetMassDEta,
-                                                 TrigHLTJetHypo_EtaEt,
-                                                 TrigHLTJetHypo_HT,
-                                                 TrigHLTJetHypo_TLA,
-                                                 TrigHLTJetHypo_SMC,
+from TrigCaloRec.TrigCaloRecConfig import (TrigCaloCellMaker_jet_fullcalo, # noqa: F401
+                                           TrigCaloCellMaker_jet_super,    # noqa: F401
+                                           TrigCaloClusterMaker_topo)      # noqa: F401
+
+from TrigCaloRec.TrigCaloRecConf import (TrigL1BSTowerMaker,)     # noqa: F401
+
+from TrigHLTJetRec.TrigHLTJetRecConf import TrigHLTRoIDiagnostics # noqa: F401
+
+from TrigHLTJetRec.TrigHLTJetRecConfig import (TrigHLTJetDiagnostics_named,     # noqa: F401
+                                               TrigHLTJetRecFromCluster,        # noqa: F401
+                                               TrigHLTJetRecFromJet,            # noqa: F401
+                                               TrigHLTJetRecGroomer,            # noqa: F401
+                                               TrigHLTJetRecFromTriggerTower,   # noqa: F401
+                                               TrigHLTClusterDiagnostics_named, # noqa: F401
+                                               TrigHLTCellDiagnostics_named,    # noqa: F401
+                                               TrigHLTHypoDiagnostics_named,    # noqa: F401
+                                               TrigHLTJetDebug,                 # noqa: F401
+                                               TrigHLTEnergyDensity,            # noqa: F401
+                                               TrigHLTSoftKiller,               # noqa: F401
+                                               TrigHLTJetDSSelector,            # noqa: F401
+                                               TrigHLTTrackMomentHelpers,)      # noqa: F401
+
+from TrigHLTJetHypo.TrigHLTJetHypoConfig import (TrigHLTJetHypo2,              # noqa: F401
+                                                 TrigHLTJetHypo_DijetMassDEta, # noqa: F401
+                                                 TrigHLTJetHypo_EtaEt,         # noqa: F401
+                                                 TrigHLTJetHypo_HT,            # noqa: F401
+                                                 TrigHLTJetHypo_TLA,           # noqa: F401
+                                                 TrigHLTJetHypo_SMC,           # noqa: F401
                                                  )
 
-from TrigDetCalib.TrigDetCalibConf import ScoutingStreamWriter
+from TrigDetCalib.TrigDetCalibConf import ScoutingStreamWriter    # noqa: F401
 
-from TrigHIRec.TrigHICaloRec import (TrigCaloTowerMaker_hijet,
-                                     TrigHIClusterMaker_hijet,
-                                     TrigHIEventShapeMaker_hijet,
+from TrigHIRec.TrigHICaloRec import (TrigCaloTowerMaker_hijet,    # noqa: F401
+                                     TrigHIClusterMaker_hijet,    # noqa: F401
+                                     TrigHIEventShapeMaker_hijet, # noqa: F401
                                     )
                                     
-from TrigHIRec.TrigHLTHIJetRecConfig import TrigHLTHIJetRecFromHICluster
+from TrigHIRec.TrigHLTHIJetRecConfig import TrigHLTHIJetRecFromHICluster  # noqa: F401
 
 abomination_to_keep_config_weakvalue_dict_intact = []
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/jetDefInstantiator_test.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/jetDefInstantiator_test.py
index ae3f07e40b095f7998f21458b0b9e61568ff8ae1..0dff12d9cc35208573fc2e0696998cb413f5b26a 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/jet/jetDefInstantiator_test.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/jetDefInstantiator_test.py
@@ -1,6 +1,5 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-import copy
 import unittest
 from mock import MagicMock
 from jetDefInstantiator import Instantiator
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/test_functions.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/test_functions.py
index b4d042bf58f734948f069f9d67a6d24c069a975c..67307deabc9c2f5270e3e2b1cab35007da34e704 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/jet/test_functions.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/test_functions.py
@@ -8,8 +8,6 @@ import importlib
 
 from generateJetChainDefs import  generateChainDefs
 from exc2string import exc2string2 
-from AthenaCommon.Include import include
-from AthenaCommon.OldStyleConfig import  Service
 
 def _generate(d, silent):
 
@@ -37,16 +35,16 @@ def run_triggerMenuXML_dicts(silent,
              ' to write to disk' % (len(dicts))
     print m
 
-    devnull = open(os.devnull, 'w')
-    old_out = sys.stdout
-    old_err = sys.stderr
+    #devnull = open(os.devnull, 'w')
+    #old_out = sys.stdout
+    #old_err = sys.stderr
     
     result = []
     ndicts = 0
-    toSkip = (
-        'j30_jes_cleanLLP_PS_llp_noiso_L1TAU8_EMPTY',
-        'j30_jes_PS_llp_L1TAU8_UNPAIRED_ISO',
-        )
+    #toSkip = (
+    #    'j30_jes_cleanLLP_PS_llp_noiso_L1TAU8_EMPTY',
+    #    'j30_jes_PS_llp_L1TAU8_UNPAIRED_ISO',
+    #    )
     for d in dicts:
         # if d['chainName'] in toSkip or '_PS_' in d['chainName']:
         #    print d['chainName']
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1/BunchGroupSet.py b/Trigger/TriggerCommon/TriggerMenu/python/l1/BunchGroupSet.py
index 2836d05cd649888e2e5d50fdcd97f5154b07db1a..43e00921ff0b61e906475faaca7d4f9e7e7be0f0 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1/BunchGroupSet.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1/BunchGroupSet.py
@@ -1,7 +1,5 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-from copy import deepcopy
-
 from Limits import Limits
 from Lvl1Flags import Lvl1Flags
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1/Cabling.py b/Trigger/TriggerCommon/TriggerMenu/python/l1/Cabling.py
index 282e615f20b9bc7b81ebbcbabf592f79c1b7bad8..831f7a6d361939a043737bfc14a994f849bdc1f3 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1/Cabling.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1/Cabling.py
@@ -1,6 +1,6 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-from Limits import Limits
+from Limits import Limits # noqa: F401
 from AthenaCommon.Logging import logging
 log = logging.getLogger("Cabling")
 log.setLevel(logging.INFO)
@@ -146,7 +146,7 @@ class Cabling:
     @staticmethod
     def calcBitnum(thrtype):
         # get the widths for the threshold types is defined in L1Common
-        exec("nbits = Limits.%s_bitnum" % thrtype)
+        nbits = getattr(Limits,'%s_bitnum' % thrtype)
         return nbits
 
 
@@ -264,8 +264,7 @@ class InputCable:
         """
         Gets the cable assignment from L1Common
         """
-        exec("cable = Limits.%s_cable" % thrtype)
-        
+        cable = getattr(Limits,'%s_cable' % thrtype)
         # we change the format for run 2, the tuple now contains also the bit multiplicity, as it is not constant per type
         infosize = (len(cable)-1)/cable[0]
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1/Limits.py b/Trigger/TriggerCommon/TriggerMenu/python/l1/Limits.py
index 38da63573d2789d490952cdca9c2255c59989878..d5edaa71200587abd087b212025c8ba7fe61ef07 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1/Limits.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1/Limits.py
@@ -50,13 +50,13 @@ class Limits:
     @staticmethod
     def getCTPdataformat(version):
         module = __import__('CTPfragment.CTPdataformat_v%i' % version, globals(), locals(), ['CTPdataformat_v%i' % version], -1)
-        exec("CTPdataformat = module.CTPdataformat_v%i" % version)
+        CTPdataformat = getattr(module,'CTPdataformat_v%i' % version)
         return CTPdataformat
 
     @staticmethod
     def getL1Common(version):
         module = __import__('L1Common.L1Common_v%i' % version, globals(), locals(), ['L1Common_v%i' % version], -1)
-        exec("L1Common = module.L1Common_v%i" % version)
+        L1Common = getattr(module,'L1Common_v%i' % version)
         return L1Common
 
     @staticmethod
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1/Logic.py b/Trigger/TriggerCommon/TriggerMenu/python/l1/Logic.py
index ce8e6f034e606b675223d11764d2a769c0c2979d..33f3f152a449dcd2e59b6e4383d1c609d582f0b5 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1/Logic.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1/Logic.py
@@ -2,7 +2,7 @@
 
 __all__ = ['Logic', 'Not']
 
-from copy import copy,deepcopy
+from copy import copy
 
 from Lvl1MenuUtil import log
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1/Lvl1Flags.py b/Trigger/TriggerCommon/TriggerMenu/python/l1/Lvl1Flags.py
index 80fdc158b1a2a214c8d73c63028e73491a31a656..d79e5bd0abe26c68c6d1665856fcb134ee494098 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1/Lvl1Flags.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1/Lvl1Flags.py
@@ -4,8 +4,7 @@
 Lvl1 specific flags
 """
 
-from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer, jobproperties
-from TriggerMenu.menu.CommonSliceHelper import AllowedList
+from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer
 from AthenaCommon.Logging import logging
 from Limits import Limits
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1/Lvl1Menu.py b/Trigger/TriggerCommon/TriggerMenu/python/l1/Lvl1Menu.py
index 22361ed88a3a8efce62825001b66a438bdff2a6f..c512d276fb0e648b287eee69b667b4401263aba0 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1/Lvl1Menu.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1/Lvl1Menu.py
@@ -1,7 +1,7 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-from Lvl1Thresholds import LVL1Thresholds, LVL1Threshold, ThresholdValue
-from Lvl1MenuItems import LVL1MenuItems, LVL1MenuItem
+from Lvl1Thresholds import LVL1Thresholds
+from Lvl1MenuItems import LVL1MenuItems
 from Lvl1MonCounters import Lvl1MonCounters
 from CaloInfo import CaloInfo
 from MuctpiInfo import MuctpiInfo
@@ -128,7 +128,6 @@ class Lvl1Menu:
         All other checks should be implemented in TrigConfStorage/src/CheckConsistency.cxx
         This method is only for quick solutions but should be intermediate
         """
-        from Lvl1Flags import Lvl1Flags
 
         success = True
         
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1/Lvl1MenuItems.py b/Trigger/TriggerCommon/TriggerMenu/python/l1/Lvl1MenuItems.py
index 1678d4c0c0493352e4d2e97d5dd19f28524932c1..74e2dd53a55a3e3c6de2449e0320c740453b69cb 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1/Lvl1MenuItems.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1/Lvl1MenuItems.py
@@ -1,6 +1,6 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-from PrescaleHelper import getCutFromPrescale, getPrescaleFromCut, maxPrescaleCut
+from PrescaleHelper import getCutFromPrescale, getPrescaleFromCut
 from Lvl1MenuUtil import oldStyle
 
 from AthenaCommon.Logging import logging
@@ -171,7 +171,6 @@ class PrescaleHandler(object):
         self.items = menuitems
         self.itemsByPartition = {}
 
-        from Lvl1Flags import Lvl1Flags
         for item in menuitems:
             self.itemsByPartition.setdefault(item.partition,[]).append(item)
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1/Lvl1MenuUtil.py b/Trigger/TriggerCommon/TriggerMenu/python/l1/Lvl1MenuUtil.py
index 857b4a7b32a4fe0fdbc3803cce0959d7b47f7996..66fadaf367d1f9a9105a981cc57f3bcbf5ba98a5 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1/Lvl1MenuUtil.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1/Lvl1MenuUtil.py
@@ -1,6 +1,6 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-__all__ = ['log', 'idgen', 'binstr', 'get_smk_psk_Name', 'applyLVL1Prescale', 'oldStyle']
+__all__ = ['log', 'idgen', 'binstr', 'get_smk_psk_Name', 'oldStyle']
 
 from AthenaCommon.Logging import logging
 log = logging.getLogger("TriggerConfigL1")
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1/Lvl1Thresholds.py b/Trigger/TriggerCommon/TriggerMenu/python/l1/Lvl1Thresholds.py
index 4d0cd678b6acbbf0847c4379a6cb1a6acb530e86..0937b945ba2238367c0b7421a06e29d8e46f2834 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1/Lvl1Thresholds.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1/Lvl1Thresholds.py
@@ -3,7 +3,6 @@
 from Limits import CaloLimits as CL
 IsolationOff = CL.IsolationOff
 
-from Lvl1MenuUtil import log
 from copy import deepcopy
 
 class ThresholdValue:
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1/TriggerTypeDef.py b/Trigger/TriggerCommon/TriggerMenu/python/l1/TriggerTypeDef.py
index 8732502202b8502db65119a2306d2d90a65f29d4..2fdfe268bdba15e22412261c4d5526a42c62b7a8 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1/TriggerTypeDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1/TriggerTypeDef.py
@@ -1,8 +1,5 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-
-from TriggerJobOpts.TriggerFlags import TriggerFlags as TF
-
 class TT:
     """
     Trigger type logic
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1/XMLMenuReader.py b/Trigger/TriggerCommon/TriggerMenu/python/l1/XMLMenuReader.py
index 0d7e538daac132f7b87f68f7e0c932e862c18304..ac13db2527a87a6b0ad4315f8b75e90fdcbf9bc5 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1/XMLMenuReader.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1/XMLMenuReader.py
@@ -8,7 +8,7 @@ from PrescaleHelper import getCutFromPrescale
 from Logic import Logic
 from Lvl1Condition import Lvl1InternalTrigger, ThrCondition
 from CaloInfo import MinimumTOBPt
-from Lvl1MonCounters import Lvl1MonCounters, Lvl1CtpinCounter, Lvl1CtpmonCounter
+from Lvl1MonCounters import Lvl1CtpinCounter, Lvl1CtpmonCounter
 
 
 from AthenaCommon.Logging import logging
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1menu/CaloDef.py b/Trigger/TriggerCommon/TriggerMenu/python/l1menu/CaloDef.py
index acbcbe3006287573b0e5d3a8859e1e9fc47b9d36..f1c7fe5a3de2548e4376cf8bf70eb6448a79103e 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1menu/CaloDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1menu/CaloDef.py
@@ -9,12 +9,6 @@ class CaloDef:
 
         
         from TriggerMenu.l1.CaloInfo import MinimumTOBPt, CaloInfo
-        from TriggerMenu.l1.Limits import CaloLimits, Limits
-        from TriggerMenu.l1.Lvl1Flags import Lvl1Flags
-
-
-        run1 = Lvl1Flags.CTPVersion()<=3
-
 
         caloInfo = tc.menu.CaloInfo
         menuName = tc.menuName
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1menu/ItemDef.py b/Trigger/TriggerCommon/TriggerMenu/python/l1menu/ItemDef.py
index 91165ad228e29af88bf5fd1d1aa71e49b764fdc5..302f3764397a21fb6bb176db25695d995c0f513b 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1menu/ItemDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1menu/ItemDef.py
@@ -4,7 +4,6 @@
 
 
 from TriggerJobOpts.TriggerFlags import TriggerFlags
-import re
 
 from AthenaCommon.Logging import logging
 log = logging.getLogger('TriggerMenu.Lvl1.py')
@@ -12,10 +11,9 @@ log = logging.getLogger('TriggerMenu.Lvl1.py')
 # The trigger types
 from TriggerMenu.l1.TriggerTypeDef import TT
 from TriggerMenu.l1.Limits import Limits
-from TriggerMenu.l1.Logic import Logic,Not
+from TriggerMenu.l1.Logic import Logic,Not # noqa: F401
 from TriggerMenu.l1.Lvl1MenuItems import LVL1MenuItem
-from TriggerMenu.l1.Lvl1Condition import ThrCondition, Lvl1InternalTrigger
-
+from TriggerMenu.l1.Lvl1Condition import ThrCondition, Lvl1InternalTrigger  # noqa: F401
 
 class ItemDef:
     """
@@ -45,1062 +43,1054 @@ class ItemDef:
         LVL1MenuItem.l1configForRegistration = tm  # from now on all new LVL1MenuItems are registered to tm
 
         # Setting up bunch group and BPTX conditions
-        physcond            = BGRP0 & BGRP1
-        calibcond           = BGRP0 & BGRP2
-        cosmiccond          = BGRP0 & BGRP3
-        unpaired_isocond    = BGRP0 & BGRP4 # unpaired isolated (satellite bunches)
-        unpaired_nonisocond = BGRP0 & BGRP5 # unpaired non-isolated (parasitic bunches)
-        firstempty          = BGRP0 & BGRP6
-        unpairedRcond       = BGRP0 & BGRP7 # unpaired beams 1 oR beam 2
-        bgrp7cond           = BGRP0 & BGRP7 # No unpaired anymore
-        bgrp9cond           = BGRP0 & BGRP9 
-        bgrp11cond          = BGRP0 & BGRP11 
-        bgrp12cond          = BGRP0 & BGRP12
-        alfacalib           = BGRP0 & BGRP10
-        abortgap            = BGRP0 & BGRP8
+        physcond            = BGRP0 & BGRP1                                                  # noqa: F821
+        calibcond           = BGRP0 & BGRP2                                                  # noqa: F821
+        cosmiccond          = BGRP0 & BGRP3                                                  # noqa: F821
+        unpaired_isocond    = BGRP0 & BGRP4 # unpaired isolated (satellite bunches)          # noqa: F821
+        unpaired_nonisocond = BGRP0 & BGRP5 # unpaired non-isolated (parasitic bunches)      # noqa: F821
+        firstempty          = BGRP0 & BGRP6                                                  # noqa: F821
+        unpairedRcond       = BGRP0 & BGRP7 # unpaired beams 1 or beam 2                     # noqa: F821
+        bgrp7cond           = BGRP0 & BGRP7 # No unpaired anymore                            # noqa: F821       
+        bgrp9cond           = BGRP0 & BGRP9                                                  # noqa: F821
+        bgrp11cond          = BGRP0 & BGRP11                                                 # noqa: F821
+        bgrp12cond          = BGRP0 & BGRP12                                                 # noqa: F821
+        alfacalib           = BGRP0 & BGRP10                                                 # noqa: F821
+        abortgap            = BGRP0 & BGRP8                                                  # noqa: F821
         
         # partition 1
-        bgrpcond1           = BGRP0 & BGRP11
-        calibcond1          = BGRP0 & BGRP12
+        #bgrpcond1           = BGRP0 & BGRP11                                                 # noqa: F821
+        #calibcond1          = BGRP0 & BGRP12                                                 # noqa: F821
 
         # partition 2
-        bgrpcond2           = BGRP0 & BGRP14
+        #bgrpcond2           = BGRP0 & BGRP14                                                 # noqa: F821
 
 
         LVL1MenuItem.currentPartition = 1
 
 
         # E/gamma ctpid=[0:0x1f]
-        LVL1MenuItem('L1_EM3'       ).setLogic( EM3        & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM3HI'     ).setLogic( EM3HI      & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM4'       ).setLogic( EM4        & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM5'       ).setLogic( EM5        & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM7'       ).setLogic( EM7        & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM10'      ).setLogic( EM10       & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM24VHI'   ).setLogic( EM24VHI    & physcond).setTriggerType( TT.calo)
-        LVL1MenuItem('L1_EM8'       ).setLogic( EM8        & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM8I'      ).setLogic( EM8I       & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM12'      ).setLogic( EM12       & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM14'      ).setLogic( EM14       & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM15'      ).setLogic( EM15       & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM15_BGRP7').setLogic( EM15       & bgrp7cond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM15I'     ).setLogic( EM15 & EM8I      & physcond).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_EM3'       ).setLogic( EM3        & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_EM3HI'     ).setLogic( EM3HI      & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_EM4'       ).setLogic( EM4        & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_EM5'       ).setLogic( EM5        & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_EM7'       ).setLogic( EM7        & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_EM10'      ).setLogic( EM10       & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_EM24VHI'   ).setLogic( EM24VHI    & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_EM8'       ).setLogic( EM8        & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_EM8I'      ).setLogic( EM8I       & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_EM12'      ).setLogic( EM12       & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_EM14'      ).setLogic( EM14       & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_EM15'      ).setLogic( EM15       & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_EM15_BGRP7').setLogic( EM15       & bgrp7cond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_EM15I'     ).setLogic( EM15 & EM8I      & physcond).setTriggerType( TT.calo )     # noqa: F821
         if not '_v6' in TriggerFlags.triggerMenuSetup() and not '_HI' in TriggerFlags.triggerMenuSetup():
-           LVL1MenuItem('L1_EM15VHI'    ).setLogic( EM15VHI      & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM22VHIM'   ).setLogic( EM22VHIM      & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM24VHIM'   ).setLogic( EM24VHIM      & physcond).setTriggerType( TT.calo )
+           LVL1MenuItem('L1_EM15VHI'    ).setLogic( EM15VHI      & physcond).setTriggerType( TT.calo )     # noqa: F821
+           LVL1MenuItem('L1_EM22VHIM'   ).setLogic( EM22VHIM      & physcond).setTriggerType( TT.calo )    # noqa: F821
+           LVL1MenuItem('L1_EM24VHIM'   ).setLogic( EM24VHIM      & physcond).setTriggerType( TT.calo )    # noqa: F821
         else:
-           LVL1MenuItem('L1_EM15HI'    ).setLogic( EM15HI      & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM26VHI'   ).setLogic( EM26VHI    & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM18VH'    ).setLogic( EM18VH     & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM16'      ).setLogic( EM16       & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM8VH'     ).setLogic( EM8VH      & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM10VH'    ).setLogic( EM10VH     & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM20A'     ).setLogic( EM20A      & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM20C'     ).setLogic( EM20C      & physcond).setTriggerType( TT.calo )
+           LVL1MenuItem('L1_EM15HI'    ).setLogic( EM15HI      & physcond).setTriggerType( TT.calo )       # noqa: F821
+           LVL1MenuItem('L1_EM26VHI'   ).setLogic( EM26VHI    & physcond).setTriggerType( TT.calo )        # noqa: F821
+           LVL1MenuItem('L1_EM18VH'    ).setLogic( EM18VH     & physcond).setTriggerType( TT.calo )        # noqa: F821
+        LVL1MenuItem('L1_EM16'      ).setLogic( EM16       & physcond).setTriggerType( TT.calo )           # noqa: F821
+        LVL1MenuItem('L1_EM8VH'     ).setLogic( EM8VH      & physcond).setTriggerType( TT.calo )           # noqa: F821
+        LVL1MenuItem('L1_EM10VH'    ).setLogic( EM10VH     & physcond).setTriggerType( TT.calo )           # noqa: F821
+        LVL1MenuItem('L1_EM20A'     ).setLogic( EM20A      & physcond).setTriggerType( TT.calo )           # noqa: F821
+        LVL1MenuItem('L1_EM20C'     ).setLogic( EM20C      & physcond).setTriggerType( TT.calo )           # noqa: F821
         if '_v6' in TriggerFlags.triggerMenuSetup() or '_HI' in TriggerFlags.triggerMenuSetup():
-           LVL1MenuItem('L1_EM13VH'    ).setLogic( EM13VH     & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM15VH'    ).setLogic( EM15VH     & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM18'      ).setLogic( EM18       & physcond).setTriggerType( TT.calo )
+           LVL1MenuItem('L1_EM13VH'    ).setLogic( EM13VH     & physcond).setTriggerType( TT.calo )        # noqa: F821
+        LVL1MenuItem('L1_EM15VH'    ).setLogic( EM15VH     & physcond).setTriggerType( TT.calo )           # noqa: F821
+        LVL1MenuItem('L1_EM18'      ).setLogic( EM18       & physcond).setTriggerType( TT.calo )           # noqa: F821
         if not '_v6' in TriggerFlags.triggerMenuSetup() and not '_HI' in TriggerFlags.triggerMenuSetup():
-           LVL1MenuItem('L1_EM18VHI'    ).setLogic( EM18VHI     & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM20'      ).setLogic( EM20       & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM20VH'    ).setLogic( EM20VH     & physcond).setTriggerType( TT.calo )  
-        LVL1MenuItem('L1_EM20VHI'   ).setLogic( EM20VHI    & physcond).setTriggerType( TT.calo )  # isolation not yet defined
-        LVL1MenuItem('L1_EM22'      ).setLogic( EM22       & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM22VHI'   ).setLogic( EM22VHI    & physcond).setTriggerType( TT.calo )  # isolation not yet defined
-        LVL1MenuItem('L1_EM50V'     ).setLogic( EM50V      & physcond).setTriggerType( TT.calo )
+           LVL1MenuItem('L1_EM18VHI'    ).setLogic( EM18VHI     & physcond).setTriggerType( TT.calo )      # noqa: F821
+        LVL1MenuItem('L1_EM20'      ).setLogic( EM20       & physcond).setTriggerType( TT.calo )           # noqa: F821
+        LVL1MenuItem('L1_EM20VH'    ).setLogic( EM20VH     & physcond).setTriggerType( TT.calo )           # noqa: F821
+        LVL1MenuItem('L1_EM20VHI'   ).setLogic( EM20VHI    & physcond).setTriggerType( TT.calo )  # isolation not yet defined # noqa: F821
+        LVL1MenuItem('L1_EM22'      ).setLogic( EM22       & physcond).setTriggerType( TT.calo )           # noqa: F821
+        LVL1MenuItem('L1_EM22VHI'   ).setLogic( EM22VHI    & physcond).setTriggerType( TT.calo )  # isolation not yet defined # noqa: F821
+        LVL1MenuItem('L1_EM50V'     ).setLogic( EM50V      & physcond).setTriggerType( TT.calo )           # noqa: F821
 
 
 
         # 2xEM, 3xEM
-        LVL1MenuItem('L1_2EM3'           ).setLogic( EM3.x(2)             & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_2EM5'           ).setLogic( EM5.x(2)             & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_2EM7'           ).setLogic( EM7.x(2)             & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_2EM10'          ).setLogic( EM10.x(2)            & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_2EM10VH'        ).setLogic( EM10VH.x(2)          & physcond).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_2EM3'           ).setLogic( EM3.x(2)             & physcond).setTriggerType( TT.calo )     # noqa: F821
+        LVL1MenuItem('L1_2EM5'           ).setLogic( EM5.x(2)             & physcond).setTriggerType( TT.calo )     # noqa: F821
+        LVL1MenuItem('L1_2EM7'           ).setLogic( EM7.x(2)             & physcond).setTriggerType( TT.calo )     # noqa: F821
+        LVL1MenuItem('L1_2EM10'          ).setLogic( EM10.x(2)            & physcond).setTriggerType( TT.calo )     # noqa: F821
+        LVL1MenuItem('L1_2EM10VH'        ).setLogic( EM10VH.x(2)          & physcond).setTriggerType( TT.calo )     # noqa: F821
         if '_v6' in TriggerFlags.triggerMenuSetup() or '_HI' in TriggerFlags.triggerMenuSetup():
-           LVL1MenuItem('L1_2EM13VH'        ).setLogic( EM13VH.x(2)          & physcond).setTriggerType( TT.calo )                
-           LVL1MenuItem('L1_2EM18VH'        ).setLogic( EM18VH.x(2)          & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_2EM15'          ).setLogic( EM15.x(2)            & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_2EM15VH'        ).setLogic( EM15VH.x(2)          & physcond).setTriggerType( TT.calo )
+           LVL1MenuItem('L1_2EM13VH'        ).setLogic( EM13VH.x(2)          & physcond).setTriggerType( TT.calo )  # noqa: F821              
+           LVL1MenuItem('L1_2EM18VH'        ).setLogic( EM18VH.x(2)          & physcond).setTriggerType( TT.calo )  # noqa: F821
+        LVL1MenuItem('L1_2EM15'          ).setLogic( EM15.x(2)            & physcond).setTriggerType( TT.calo )     # noqa: F821
+        LVL1MenuItem('L1_2EM15VH'        ).setLogic( EM15VH.x(2)          & physcond).setTriggerType( TT.calo )     # noqa: F821
         if not '_v6' in TriggerFlags.triggerMenuSetup() and not '_HI' in TriggerFlags.triggerMenuSetup():
-           LVL1MenuItem('L1_2EM15VHI'    ).setLogic( EM15VHI.x(2)      & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_2EM20VH'        ).setLogic( EM20VH.x(2)          & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM7_2EM3'       ).setLogic( EM7 & EM3.x(2)       & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM12_2EM3'      ).setLogic( EM12 & EM3.x(2)      & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM20VH_2EM7'    ).setLogic( EM20VH & EM7.x(2)    & physcond).setTriggerType( TT.calo )        
+           LVL1MenuItem('L1_2EM15VHI'    ).setLogic( EM15VHI.x(2)      & physcond).setTriggerType( TT.calo )        # noqa: F821
+        LVL1MenuItem('L1_2EM20VH'        ).setLogic( EM20VH.x(2)          & physcond).setTriggerType( TT.calo )     # noqa: F821
+        LVL1MenuItem('L1_EM7_2EM3'       ).setLogic( EM7 & EM3.x(2)       & physcond).setTriggerType( TT.calo )     # noqa: F821
+        LVL1MenuItem('L1_EM12_2EM3'      ).setLogic( EM12 & EM3.x(2)      & physcond).setTriggerType( TT.calo )     # noqa: F821
+        LVL1MenuItem('L1_EM20VH_2EM7'    ).setLogic( EM20VH & EM7.x(2)    & physcond).setTriggerType( TT.calo )     # noqa: F821   
 
-        LVL1MenuItem('L1_EM20VH_3EM10VH' ).setLogic( EM20VH & EM10VH.x(3)    & physcond).setTriggerType( TT.calo )        
-        LVL1MenuItem('L1_EM20VH_2EM10VH_3EM8VH' ).setLogic( EM20VH & EM10VH.x(2) & EM8VH.x(3)    & physcond).setTriggerType( TT.calo )        
+        LVL1MenuItem('L1_EM20VH_3EM10VH' ).setLogic( EM20VH & EM10VH.x(3)    & physcond).setTriggerType( TT.calo )                        # noqa: F821
+        LVL1MenuItem('L1_EM20VH_2EM10VH_3EM8VH' ).setLogic( EM20VH & EM10VH.x(2) & EM8VH.x(3)    & physcond).setTriggerType( TT.calo )    # noqa: F821    
 
         # 4xEM
-        LVL1MenuItem('L1_EM15VH_3EM7'         ).setLogic( EM15VH & EM7.x(3)    & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM15VH_3EM8VH'       ).setLogic( EM15VH & EM8VH.x(3)    & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM15VH_3EM10VH'      ).setLogic( EM15VH & EM10VH.x(3)    & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM15VH_2EM10VH_3EM7' ).setLogic( EM15VH & EM10VH.x(2) & EM7.x(3)     & physcond).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_EM15VH_3EM7'         ).setLogic( EM15VH & EM7.x(3)    & physcond).setTriggerType( TT.calo )       # noqa: F821
+        LVL1MenuItem('L1_EM15VH_3EM8VH'       ).setLogic( EM15VH & EM8VH.x(3)    & physcond).setTriggerType( TT.calo )     # noqa: F821
+        LVL1MenuItem('L1_EM15VH_3EM10VH'      ).setLogic( EM15VH & EM10VH.x(3)    & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_EM15VH_2EM10VH_3EM7' ).setLogic( EM15VH & EM10VH.x(2) & EM7.x(3)     & physcond).setTriggerType( TT.calo )    # noqa: F821
         if '_v6' in TriggerFlags.triggerMenuSetup() or '_HI' in TriggerFlags.triggerMenuSetup():
-           LVL1MenuItem('L1_EM18VH_3EM8VH'       ).setLogic( EM18VH & EM8VH.x(3)    & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM18VH_2EM10VH_3EM7' ).setLogic( EM18VH & EM10VH.x(2) & EM7.x(3)     & physcond).setTriggerType( TT.calo )
+           LVL1MenuItem('L1_EM18VH_3EM8VH'       ).setLogic( EM18VH & EM8VH.x(3)    & physcond).setTriggerType( TT.calo )  # noqa: F821
+           LVL1MenuItem('L1_EM18VH_2EM10VH_3EM7' ).setLogic( EM18VH & EM10VH.x(2) & EM7.x(3)     & physcond).setTriggerType( TT.calo )    # noqa: F821
 
         # EM and jet
-        LVL1MenuItem('L1_JJ15.23ETA49' ).setLogic( JJ1523ETA49 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J15.23ETA49' ).setLogic( J1523ETA49 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J15.24ETA49' ).setLogic( J1524ETA49 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J15.31ETA49' ).setLogic( J1531ETA49 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J20.28ETA31' ).setLogic( J2028ETA31 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J20.31ETA49' ).setLogic( J2031ETA49 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J30.31ETA49' ).setLogic( J3031ETA49 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J40.0ETA25' ).setLogic( J400ETA25 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J50.31ETA49' ).setLogic( J5031ETA49 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J70.31ETA49' ).setLogic( J7031ETA49 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J100.31ETA49' ).setLogic( J10031ETA49 & physcond).setTriggerType(TT.calo)
-
-        LVL1MenuItem('L1_J15.0ETA25'  ).setLogic( J150ETA25 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J20.0ETA28'  ).setLogic( J200ETA28 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J25.0ETA23'  ).setLogic( J250ETA23 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J35.0ETA23'  ).setLogic( J350ETA23 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J20.0ETA49'  ).setLogic( J200ETA49 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J30.0ETA49'  ).setLogic( J300ETA49 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J25.0ETA23_2J15.31ETA49'  ).setLogic( J250ETA23 & J1531ETA49.x(2) & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_JJ15.23ETA49' ).setLogic( JJ1523ETA49 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J15.23ETA49' ).setLogic( J1523ETA49 & physcond).setTriggerType(TT.calo)      # noqa: F821
+        LVL1MenuItem('L1_J15.24ETA49' ).setLogic( J1524ETA49 & physcond).setTriggerType(TT.calo)      # noqa: F821
+        LVL1MenuItem('L1_J15.31ETA49' ).setLogic( J1531ETA49 & physcond).setTriggerType(TT.calo)      # noqa: F821
+        LVL1MenuItem('L1_J20.28ETA31' ).setLogic( J2028ETA31 & physcond).setTriggerType(TT.calo)      # noqa: F821
+        LVL1MenuItem('L1_J20.31ETA49' ).setLogic( J2031ETA49 & physcond).setTriggerType(TT.calo)      # noqa: F821
+        LVL1MenuItem('L1_J30.31ETA49' ).setLogic( J3031ETA49 & physcond).setTriggerType(TT.calo)      # noqa: F821
+        LVL1MenuItem('L1_J40.0ETA25' ).setLogic( J400ETA25 & physcond).setTriggerType(TT.calo)        # noqa: F821
+        LVL1MenuItem('L1_J50.31ETA49' ).setLogic( J5031ETA49 & physcond).setTriggerType(TT.calo)      # noqa: F821
+        LVL1MenuItem('L1_J70.31ETA49' ).setLogic( J7031ETA49 & physcond).setTriggerType(TT.calo)      # noqa: F821
+        LVL1MenuItem('L1_J100.31ETA49' ).setLogic( J10031ETA49 & physcond).setTriggerType(TT.calo)    # noqa: F821
+
+        LVL1MenuItem('L1_J15.0ETA25'  ).setLogic( J150ETA25 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J20.0ETA28'  ).setLogic( J200ETA28 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J25.0ETA23'  ).setLogic( J250ETA23 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J35.0ETA23'  ).setLogic( J350ETA23 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J20.0ETA49'  ).setLogic( J200ETA49 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J30.0ETA49'  ).setLogic( J300ETA49 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J25.0ETA23_2J15.31ETA49'  ).setLogic( J250ETA23 & J1531ETA49.x(2) & physcond).setTriggerType(TT.calo)    # noqa: F821
         
 
-
-
-
-
-
-
-
-
         # HI
-        LVL1MenuItem('L1_EM3_NZ'         ).setLogic( EM3      & Not(ZDC_AND) & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_2EM3_NZ'        ).setLogic( EM3.x(2) & Not(ZDC_AND) & physcond).setTriggerType( TT.calo )   
+        LVL1MenuItem('L1_EM3_NZ'         ).setLogic( EM3      & Not(ZDC_AND) & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_2EM3_NZ'        ).setLogic( EM3.x(2) & Not(ZDC_AND) & physcond).setTriggerType( TT.calo )    # noqa: F821
 
-        LVL1MenuItem('L1_EM3_NL'         ).setLogic( EM3      & Not(LUCID_A) & Not(LUCID_C) & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_2EM3_NL'        ).setLogic( EM3.x(2) & Not(LUCID_A) & Not(LUCID_C) & physcond).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_EM3_NL'         ).setLogic( EM3      & Not(LUCID_A) & Not(LUCID_C) & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_2EM3_NL'        ).setLogic( EM3.x(2) & Not(LUCID_A) & Not(LUCID_C) & physcond).setTriggerType( TT.calo )    # noqa: F821
 
-        LVL1MenuItem('L1_EM3_MV'         ).setLogic( EM3      & Not(MBTS_A & MBTS_C) & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM3_MV_VTE50'   ).setLogic( EM3      & Not(MBTS_A & MBTS_C) & Not(TE50) & physcond).setTriggerType( TT.calo ) 
+        LVL1MenuItem('L1_EM3_MV'         ).setLogic( EM3      & Not(MBTS_A & MBTS_C) & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_EM3_MV_VTE50'   ).setLogic( EM3      & Not(MBTS_A & MBTS_C) & Not(TE50) & physcond).setTriggerType( TT.calo ) # noqa: F821
 
-        LVL1MenuItem('L1_EM3_TE50'       ).setLogic( EM3      & TE50 & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM3_VTE50'      ).setLogic( EM3      & Not(TE50) & physcond).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_EM3_TE50'       ).setLogic( EM3      & TE50 & physcond).setTriggerType( TT.calo )         # noqa: F821
+        LVL1MenuItem('L1_EM3_VTE50'      ).setLogic( EM3      & Not(TE50) & physcond).setTriggerType( TT.calo )    # noqa: F821
 
-        LVL1MenuItem('L1_EM3_UNPAIRED_ISO'   ).setLogic(EM3 & unpaired_isocond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM3_UNPAIRED_NONISO').setLogic(EM3 & unpaired_nonisocond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM3_EMPTY'          ).setLogic(EM3 & cosmiccond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM3_FIRSTEMPTY'     ).setLogic(EM3 & firstempty).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_EM3_UNPAIRED_ISO'   ).setLogic(EM3 & unpaired_isocond).setTriggerType( TT.calo )       # noqa: F821
+        LVL1MenuItem('L1_EM3_UNPAIRED_NONISO').setLogic(EM3 & unpaired_nonisocond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_EM3_EMPTY'          ).setLogic(EM3 & cosmiccond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_EM3_FIRSTEMPTY'     ).setLogic(EM3 & firstempty).setTriggerType( TT.calo )    # noqa: F821
 
-        LVL1MenuItem('L1_EM5_EMPTY'          ).setLogic(EM5 & cosmiccond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM5_UNPAIRED_ISO'   ).setLogic(EM5 & unpaired_isocond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM5_UNPAIRED_NONISO').setLogic(EM5 & unpaired_nonisocond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM5_FIRSTEMPTY'     ).setLogic(EM5 & firstempty).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_EM5_EMPTY'          ).setLogic(EM5 & cosmiccond).setTriggerType( TT.calo )          # noqa: F821
+        LVL1MenuItem('L1_EM5_UNPAIRED_ISO'   ).setLogic(EM5 & unpaired_isocond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_EM5_UNPAIRED_NONISO').setLogic(EM5 & unpaired_nonisocond).setTriggerType( TT.calo ) # noqa: F821
+        LVL1MenuItem('L1_EM5_FIRSTEMPTY'     ).setLogic(EM5 & firstempty).setTriggerType( TT.calo )          # noqa: F821
 
-        LVL1MenuItem('L1_EM7_EMPTY'          ).setLogic(EM7 & cosmiccond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM7_UNPAIRED_ISO'   ).setLogic(EM7 & unpaired_isocond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM7_UNPAIRED_NONISO').setLogic(EM7 & unpaired_nonisocond).setTriggerType( TT.calo ) 
-        LVL1MenuItem('L1_EM7_FIRSTEMPTY'     ).setLogic(EM7 & firstempty).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_EM7_EMPTY'          ).setLogic(EM7 & cosmiccond).setTriggerType( TT.calo )          # noqa: F821
+        LVL1MenuItem('L1_EM7_UNPAIRED_ISO'   ).setLogic(EM7 & unpaired_isocond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_EM7_UNPAIRED_NONISO').setLogic(EM7 & unpaired_nonisocond).setTriggerType( TT.calo ) # noqa: F821
+        LVL1MenuItem('L1_EM7_FIRSTEMPTY'     ).setLogic(EM7 & firstempty).setTriggerType( TT.calo )          # noqa: F821
 
-        LVL1MenuItem('L1_EM20VH_FIRSTEMPTY'    ).setLogic( EM20VH & firstempty).setTriggerType( TT.calo )  
-        LVL1MenuItem('L1_EM22VHI_FIRSTEMPTY'    ).setLogic( EM22VHI & firstempty).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_EM20VH_FIRSTEMPTY'    ).setLogic( EM20VH & firstempty).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_EM22VHI_FIRSTEMPTY'    ).setLogic( EM22VHI & firstempty).setTriggerType( TT.calo )  # noqa: F821
 
-        LVL1MenuItem('L1_J10_VTE100'      ).setLogic( J10      & Not(TE100) & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_J10_VTE200'      ).setLogic( J10      & Not(TE200) & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_J10_VTE300'      ).setLogic( J10      & Not(TE300) & physcond).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_J10_VTE100'      ).setLogic( J10      & Not(TE100) & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_J10_VTE200'      ).setLogic( J10      & Not(TE200) & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_J10_VTE300'      ).setLogic( J10      & Not(TE300) & physcond).setTriggerType( TT.calo )    # noqa: F821
 
-        LVL1MenuItem('L1_TE5_VTE200'      ).setLogic( TE5      & Not(TE200) & physcond).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_TE5_VTE200'      ).setLogic( TE5      & Not(TE200) & physcond).setTriggerType( TT.calo )    # noqa: F821
 
 
         # MUON ctpid=[0x20;0x2f]
-        LVL1MenuItem('L1_MU0'  ).setLogic( MU0  & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU4'  ).setLogic( MU4  & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU6'  ).setLogic( MU6  & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU10' ).setLogic( MU10 & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU11' ).setLogic( MU11 & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU15' ).setLogic( MU15 & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU20' ).setLogic( MU20 & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU21' ).setLogic( MU21 & physcond).setTriggerType(TT.muon)
+        LVL1MenuItem('L1_MU0'  ).setLogic( MU0  & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU4'  ).setLogic( MU4  & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU6'  ).setLogic( MU6  & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU10' ).setLogic( MU10 & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU11' ).setLogic( MU11 & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU15' ).setLogic( MU15 & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU20' ).setLogic( MU20 & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU21' ).setLogic( MU21 & physcond).setTriggerType(TT.muon)    # noqa: F821
 
         # 2xMU, 3xMU, 4xMU
-        LVL1MenuItem('L1_2MU0'     ).setLogic( MU0.x(2)        & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_2MU4'     ).setLogic( MU4.x(2)        & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_2MU6'     ).setLogic( MU6.x(2)        & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_2MU10'    ).setLogic( MU10.x(2)       & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_2MU11'    ).setLogic( MU11.x(2)       & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_2MU20'    ).setLogic( MU20.x(2)       & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU4_MU10' ).setLogic( MU4 & MU10      & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU6_MU4' ).setLogic( MU6 & MU4      & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU10_2MU6').setLogic( MU10 & MU6.x(2) & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU11_2MU6').setLogic( MU11 & MU6.x(2) & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU10_2MU4').setLogic( MU10 & MU4.x(2) & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_3MU4'     ).setLogic( MU4.x(3)        & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_4MU4'     ).setLogic( MU4.x(4)        & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU6_2MU4' ).setLogic( MU6 & MU4.x(2)  & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU6_3MU4' ).setLogic( MU6 & MU4.x(3)  & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_2MU6_3MU4' ).setLogic( MU6.x(2) & MU4.x(3)  & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_3MU6'     ).setLogic( MU6.x(3)        & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_2MU0_MU6' ).setLogic( MU0.x(2) & MU6  & physcond).setTriggerType(TT.muon)
-
-        LVL1MenuItem('L1_2MU20_OVERLAY').setLogic( MU20.x(2)   & physcond).setTriggerType(TT.zerobs)
+        LVL1MenuItem('L1_2MU0'     ).setLogic( MU0.x(2)        & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_2MU4'     ).setLogic( MU4.x(2)        & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_2MU6'     ).setLogic( MU6.x(2)        & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_2MU10'    ).setLogic( MU10.x(2)       & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_2MU11'    ).setLogic( MU11.x(2)       & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_2MU20'    ).setLogic( MU20.x(2)       & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU4_MU10' ).setLogic( MU4 & MU10      & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU6_MU4' ).setLogic( MU6 & MU4      & physcond).setTriggerType(TT.muon)      # noqa: F821
+        LVL1MenuItem('L1_MU10_2MU6').setLogic( MU10 & MU6.x(2) & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU11_2MU6').setLogic( MU11 & MU6.x(2) & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU10_2MU4').setLogic( MU10 & MU4.x(2) & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_3MU4'     ).setLogic( MU4.x(3)        & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_4MU4'     ).setLogic( MU4.x(4)        & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU6_2MU4' ).setLogic( MU6 & MU4.x(2)  & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU6_3MU4' ).setLogic( MU6 & MU4.x(3)  & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_2MU6_3MU4' ).setLogic( MU6.x(2) & MU4.x(3)  & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_3MU6'     ).setLogic( MU6.x(3)        & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_2MU0_MU6' ).setLogic( MU0.x(2) & MU6  & physcond).setTriggerType(TT.muon)    # noqa: F821
+
+        LVL1MenuItem('L1_2MU20_OVERLAY').setLogic( MU20.x(2)   & physcond).setTriggerType(TT.zerobs)    # noqa: F821
 
         # HI
-        LVL1MenuItem('L1_MU0_NZ'   ).setLogic( MU0      & Not(ZDC_AND) & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_2MU0_NZ'  ).setLogic( MU0.x(2) & Not(ZDC_AND) & physcond).setTriggerType(TT.muon)   
+        LVL1MenuItem('L1_MU0_NZ'   ).setLogic( MU0      & Not(ZDC_AND) & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_2MU0_NZ'  ).setLogic( MU0.x(2) & Not(ZDC_AND) & physcond).setTriggerType(TT.muon)    # noqa: F821   
 
-        LVL1MenuItem('L1_MU0_NL'   ).setLogic( MU0      & Not(LUCID_A) & Not(LUCID_C) & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_2MU0_NL'  ).setLogic( MU0.x(2) & Not(LUCID_A) & Not(LUCID_C) & physcond).setTriggerType(TT.muon)                  
+        LVL1MenuItem('L1_MU0_NL'   ).setLogic( MU0      & Not(LUCID_A) & Not(LUCID_C) & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_2MU0_NL'  ).setLogic( MU0.x(2) & Not(LUCID_A) & Not(LUCID_C) & physcond).setTriggerType(TT.muon)    # noqa: F821                 
                             
-        LVL1MenuItem('L1_MU0_MV'   ).setLogic( MU0      & Not(MBTS_A & MBTS_C) & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_2MU0_MV'  ).setLogic( MU0.x(2) & Not(MBTS_A & MBTS_C) & physcond).setTriggerType(TT.muon)
+        LVL1MenuItem('L1_MU0_MV'   ).setLogic( MU0      & Not(MBTS_A & MBTS_C) & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_2MU0_MV'  ).setLogic( MU0.x(2) & Not(MBTS_A & MBTS_C) & physcond).setTriggerType(TT.muon)    # noqa: F821
         
-        LVL1MenuItem('L1_MU4_VTE10').setLogic( MU4      & Not(TE10) & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_2MU4_VTE10').setLogic( MU4.x(2)      & Not(TE10) & physcond).setTriggerType(TT.muon)
+        LVL1MenuItem('L1_MU4_VTE10').setLogic( MU4      & Not(TE10) & physcond).setTriggerType(TT.muon)          # noqa: F821
+        LVL1MenuItem('L1_2MU4_VTE10').setLogic( MU4.x(2)      & Not(TE10) & physcond).setTriggerType(TT.muon)    # noqa: F821
         
-        LVL1MenuItem('L1_MU0_TE50' ).setLogic( MU0      & TE50 & physcond).setTriggerType(TT.muon)
+        LVL1MenuItem('L1_MU0_TE50' ).setLogic( MU0      & TE50 & physcond).setTriggerType(TT.muon)    # noqa: F821
 
 
-        LVL1MenuItem('L1_MU4_TE50' ).setLogic( MU4      & TE50 & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU4_TE70' ).setLogic( MU4      & TE70 & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU4_TE90' ).setLogic( MU4      & TE90 & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU4_TE120' ).setLogic( MU4     & TE120 & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU4_TE160' ).setLogic( MU4     & TE160 & physcond).setTriggerType(TT.muon)
+        LVL1MenuItem('L1_MU4_TE50' ).setLogic( MU4      & TE50 & physcond).setTriggerType(TT.muon)     # noqa: F821
+        LVL1MenuItem('L1_MU4_TE70' ).setLogic( MU4      & TE70 & physcond).setTriggerType(TT.muon)     # noqa: F821
+        LVL1MenuItem('L1_MU4_TE90' ).setLogic( MU4      & TE90 & physcond).setTriggerType(TT.muon)     # noqa: F821
+        LVL1MenuItem('L1_MU4_TE120' ).setLogic( MU4     & TE120 & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU4_TE160' ).setLogic( MU4     & TE160 & physcond).setTriggerType(TT.muon)    # noqa: F821
         
-        LVL1MenuItem('L1_MU4_TE10.0ETA24' ).setLogic( MU4      & TE100ETA24 & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU4_TE15.0ETA24' ).setLogic( MU4      & TE150ETA24 & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU4_TE20.0ETA24' ).setLogic( MU4      & TE200ETA24 & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU4_TE25.0ETA24' ).setLogic( MU4      & TE250ETA24 & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU4_TE30.0ETA24' ).setLogic( MU4     & TE300ETA24 & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU4_TE35.0ETA24' ).setLogic( MU4      & TE350ETA24 & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU4_TE40.0ETA24' ).setLogic( MU4      & TE400ETA24 & physcond).setTriggerType(TT.muon)
+        LVL1MenuItem('L1_MU4_TE10.0ETA24' ).setLogic( MU4      & TE100ETA24 & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU4_TE15.0ETA24' ).setLogic( MU4      & TE150ETA24 & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU4_TE20.0ETA24' ).setLogic( MU4      & TE200ETA24 & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU4_TE25.0ETA24' ).setLogic( MU4      & TE250ETA24 & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU4_TE30.0ETA24' ).setLogic( MU4     & TE300ETA24 & physcond).setTriggerType(TT.muon)     # noqa: F821
+        LVL1MenuItem('L1_MU4_TE35.0ETA24' ).setLogic( MU4      & TE350ETA24 & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU4_TE40.0ETA24' ).setLogic( MU4      & TE400ETA24 & physcond).setTriggerType(TT.muon)    # noqa: F821
         
-        LVL1MenuItem('L1_MU0_VTE50').setLogic( MU0      & Not(TE50) & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU4_VTE50').setLogic( MU4      & Not(TE50) & physcond).setTriggerType(TT.muon)
-
-        LVL1MenuItem('L1_MU0_MV_VTE50').setLogic( MU0 & Not(MBTS_A & MBTS_C) & Not(TE50) & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU4_MV_VTE50').setLogic( MU4 & Not(MBTS_A & MBTS_C) & Not(TE50) & physcond).setTriggerType(TT.muon)
-
-        LVL1MenuItem('L1_MU0_UNPAIRED_ISO'   ).setLogic(MU0 & unpaired_isocond   ).setTriggerType( TT.muon )
-        LVL1MenuItem('L1_MU0_UNPAIRED_NONISO').setLogic(MU0 & unpaired_nonisocond).setTriggerType( TT.muon )
-        LVL1MenuItem('L1_MU0_EMPTY'          ).setLogic(MU0 & cosmiccond).setTriggerType( TT.muon )
-        LVL1MenuItem('L1_MU0_FIRSTEMPTY'     ).setLogic(MU0 & firstempty).setTriggerType( TT.muon )
-
-        LVL1MenuItem('L1_MU4_UNPAIRED_ISO'   ).setLogic(MU4 & unpaired_isocond   ).setTriggerType( TT.muon )
-        LVL1MenuItem('L1_MU4_UNPAIRED_NONISO').setLogic(MU4 & unpaired_nonisocond).setTriggerType( TT.muon )
-        LVL1MenuItem('L1_MU4_EMPTY'          ).setLogic(MU4 & cosmiccond).setTriggerType( TT.muon )
-        LVL1MenuItem('L1_MU6_EMPTY'          ).setLogic(MU6 & cosmiccond).setTriggerType( TT.muon )
-        LVL1MenuItem('L1_MU4_FIRSTEMPTY'     ).setLogic(MU4 & firstempty).setTriggerType( TT.muon )
-
-        LVL1MenuItem('L1_MU6_FIRSTEMPTY'     ).setLogic(MU4  & firstempty).setTriggerType( TT.muon ) 
-        LVL1MenuItem('L1_MU10_EMPTY'         ).setLogic(MU10 & cosmiccond).setTriggerType( TT.muon ) 
-        LVL1MenuItem('L1_MU11_EMPTY'         ).setLogic(MU11 & cosmiccond).setTriggerType( TT.muon ) 
+        LVL1MenuItem('L1_MU0_VTE50').setLogic( MU0      & Not(TE50) & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU4_VTE50').setLogic( MU4      & Not(TE50) & physcond).setTriggerType(TT.muon)    # noqa: F821
+
+        LVL1MenuItem('L1_MU0_MV_VTE50').setLogic( MU0 & Not(MBTS_A & MBTS_C) & Not(TE50) & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU4_MV_VTE50').setLogic( MU4 & Not(MBTS_A & MBTS_C) & Not(TE50) & physcond).setTriggerType(TT.muon)    # noqa: F821
+
+        LVL1MenuItem('L1_MU0_UNPAIRED_ISO'   ).setLogic(MU0 & unpaired_isocond   ).setTriggerType( TT.muon )    # noqa: F821
+        LVL1MenuItem('L1_MU0_UNPAIRED_NONISO').setLogic(MU0 & unpaired_nonisocond).setTriggerType( TT.muon )    # noqa: F821
+        LVL1MenuItem('L1_MU0_EMPTY'          ).setLogic(MU0 & cosmiccond).setTriggerType( TT.muon )    # noqa: F821
+        LVL1MenuItem('L1_MU0_FIRSTEMPTY'     ).setLogic(MU0 & firstempty).setTriggerType( TT.muon )    # noqa: F821
+
+        LVL1MenuItem('L1_MU4_UNPAIRED_ISO'   ).setLogic(MU4 & unpaired_isocond   ).setTriggerType( TT.muon )    # noqa: F821
+        LVL1MenuItem('L1_MU4_UNPAIRED_NONISO').setLogic(MU4 & unpaired_nonisocond).setTriggerType( TT.muon )    # noqa: F821
+        LVL1MenuItem('L1_MU4_EMPTY'          ).setLogic(MU4 & cosmiccond).setTriggerType( TT.muon )    # noqa: F821
+        LVL1MenuItem('L1_MU6_EMPTY'          ).setLogic(MU6 & cosmiccond).setTriggerType( TT.muon )    # noqa: F821
+        LVL1MenuItem('L1_MU4_FIRSTEMPTY'     ).setLogic(MU4 & firstempty).setTriggerType( TT.muon )    # noqa: F821
+
+        LVL1MenuItem('L1_MU6_FIRSTEMPTY'     ).setLogic(MU4  & firstempty).setTriggerType( TT.muon )    # noqa: F821
+        LVL1MenuItem('L1_MU10_EMPTY'         ).setLogic(MU10 & cosmiccond).setTriggerType( TT.muon )    # noqa: F821
+        LVL1MenuItem('L1_MU11_EMPTY'         ).setLogic(MU11 & cosmiccond).setTriggerType( TT.muon )    # noqa: F821
         
-        LVL1MenuItem('L1_2MU0_EMPTY'         ).setLogic(MU0.x(2) & cosmiccond).setTriggerType( TT.muon )
-        LVL1MenuItem('L1_2MU4_EMPTY'         ).setLogic(MU4.x(2) & cosmiccond).setTriggerType( TT.muon ) 
-        LVL1MenuItem('L1_2MU6_UNPAIRED_ISO'  ).setLogic(MU6.x(2) & unpaired_isocond).setTriggerType( TT.muon )
-        LVL1MenuItem('L1_2MU6_UNPAIRED_NONISO').setLogic(MU6.x(2) & unpaired_nonisocond).setTriggerType( TT.muon )
-        LVL1MenuItem('L1_2MU6_EMPTY'         ).setLogic(MU6.x(2) & cosmiccond).setTriggerType( TT.muon )
-        LVL1MenuItem('L1_2MU6_FIRSTEMPTY'    ).setLogic(MU6.x(2) & firstempty).setTriggerType( TT.muon )
+        LVL1MenuItem('L1_2MU0_EMPTY'         ).setLogic(MU0.x(2) & cosmiccond).setTriggerType( TT.muon )    # noqa: F821
+        LVL1MenuItem('L1_2MU4_EMPTY'         ).setLogic(MU4.x(2) & cosmiccond).setTriggerType( TT.muon )    # noqa: F821
+        LVL1MenuItem('L1_2MU6_UNPAIRED_ISO'  ).setLogic(MU6.x(2) & unpaired_isocond).setTriggerType( TT.muon )    # noqa: F821
+        LVL1MenuItem('L1_2MU6_UNPAIRED_NONISO').setLogic(MU6.x(2) & unpaired_nonisocond).setTriggerType( TT.muon )    # noqa: F821
+        LVL1MenuItem('L1_2MU6_EMPTY'         ).setLogic(MU6.x(2) & cosmiccond).setTriggerType( TT.muon )    # noqa: F821
+        LVL1MenuItem('L1_2MU6_FIRSTEMPTY'    ).setLogic(MU6.x(2) & firstempty).setTriggerType( TT.muon )    # noqa: F821
 
-        LVL1MenuItem('L1_MU20_FIRSTEMPTY' ).setLogic( MU20 & firstempty).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU21_FIRSTEMPTY' ).setLogic( MU21 & firstempty).setTriggerType(TT.muon)
+        LVL1MenuItem('L1_MU20_FIRSTEMPTY' ).setLogic( MU20 & firstempty).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU21_FIRSTEMPTY' ).setLogic( MU21 & firstempty).setTriggerType(TT.muon)    # noqa: F821
 
         #FTK items
-        LVL1MenuItem('L1_MU6_FTK').setLogic( MU6  & physcond).setTriggerType(TT.ftk)
-        LVL1MenuItem('L1_MU15_FTK').setLogic( MU15  & physcond).setTriggerType(TT.ftk)
-        LVL1MenuItem('L1_MU20_FTK').setLogic( MU20  & physcond).setTriggerType(TT.ftk)
-        LVL1MenuItem('L1_MU21_FTK').setLogic( MU21  & physcond).setTriggerType(TT.ftk)
+        LVL1MenuItem('L1_MU6_FTK').setLogic( MU6  & physcond).setTriggerType(TT.ftk)               # noqa: F821
+        LVL1MenuItem('L1_MU15_FTK').setLogic( MU15  & physcond).setTriggerType(TT.ftk)             # noqa: F821
+        LVL1MenuItem('L1_MU20_FTK').setLogic( MU20  & physcond).setTriggerType(TT.ftk)             # noqa: F821
+        LVL1MenuItem('L1_MU21_FTK').setLogic( MU21  & physcond).setTriggerType(TT.ftk)             # noqa: F821
             
         # EM and MU
-        LVL1MenuItem('L1_EM6_MU10'   ).setLogic( EM6        & MU10     & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_EM7_MU10'   ).setLogic( EM7        & MU10     & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_EM7_MU15'   ).setLogic( EM7        & MU15     & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_EM8VH_MU15' ).setLogic( EM8VH      & MU15     & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_EM7_MU20'   ).setLogic( EM7        & MU20     & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_EM8VH_MU20' ).setLogic( EM8VH      & MU20     & physcond).setTriggerType(TT.muon)
-
-        LVL1MenuItem('L1_EM7_MU11' ).setLogic( EM7        & MU11     & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_EM8_MU10'   ).setLogic( EM8        & MU10     & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_EM8I_MU10'  ).setLogic( EM8I       & MU10     & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_EM15I_MU4'   ).setLogic( EM15  & EM8I     & MU4      & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_EM15VH_MU10').setLogic( EM15VH     & MU10     & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_EM3_MU20'   ).setLogic( EM3        & MU20     & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_2EM8VH_MU10').setLogic( EM8VH.x(2) & MU10     & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_EM15VH_2EM8VH_MU6').setLogic( EM15VH & EM8VH.x(2) &  MU6 & physcond).setTriggerType(TT.muon)
+        LVL1MenuItem('L1_EM6_MU10'   ).setLogic( EM6        & MU10     & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_EM7_MU10'   ).setLogic( EM7        & MU10     & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_EM7_MU15'   ).setLogic( EM7        & MU15     & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_EM8VH_MU15' ).setLogic( EM8VH      & MU15     & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_EM7_MU20'   ).setLogic( EM7        & MU20     & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_EM8VH_MU20' ).setLogic( EM8VH      & MU20     & physcond).setTriggerType(TT.muon)    # noqa: F821
+
+        LVL1MenuItem('L1_EM7_MU11' ).setLogic( EM7        & MU11     & physcond).setTriggerType(TT.muon)      # noqa: F821
+        LVL1MenuItem('L1_EM8_MU10'   ).setLogic( EM8        & MU10     & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_EM8I_MU10'  ).setLogic( EM8I       & MU10     & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_EM15I_MU4'   ).setLogic( EM15  & EM8I     & MU4      & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_EM15VH_MU10').setLogic( EM15VH     & MU10     & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_EM3_MU20'   ).setLogic( EM3        & MU20     & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_2EM8VH_MU10').setLogic( EM8VH.x(2) & MU10     & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_EM15VH_2EM8VH_MU6').setLogic( EM15VH & EM8VH.x(2) &  MU6 & physcond).setTriggerType(TT.muon)    # noqa: F821
 
         # TAU ctpid=[0x40:0x4f]
-        LVL1MenuItem('L1_TAU6'  ).setLogic( HA6   & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU8'  ).setLogic( HA8   & physcond).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_TAU6'  ).setLogic( HA6   & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU8'  ).setLogic( HA8   & physcond).setTriggerType( TT.calo )    # noqa: F821
 
-        #LVL1MenuItem('L1_TAU10IM').setLogic( HA10IM  & physcond).setTriggerType( TT.calo )
+        #LVL1MenuItem('L1_TAU10IM').setLogic( HA10IM  & physcond).setTriggerType( TT.calo )    # noqa: F821
 
-        LVL1MenuItem('L1_TAU12' ).setLogic( HA12  & physcond).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_TAU12' ).setLogic( HA12  & physcond).setTriggerType( TT.calo )    # noqa: F821
 
-        LVL1MenuItem('L1_TAU12IL').setLogic( HA12IL & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU12IM').setLogic( HA12IM & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU12IT').setLogic( HA12IT & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU12I').setLogic( HA12I & physcond).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_TAU12IL').setLogic( HA12IL & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU12IM').setLogic( HA12IM & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU12IT').setLogic( HA12IT & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU12I').setLogic( HA12I & physcond).setTriggerType( TT.calo )      # noqa: F821
 
-        LVL1MenuItem('L1_TAU15' ).setLogic( HA15  & physcond).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_TAU15' ).setLogic( HA15  & physcond).setTriggerType( TT.calo )      # noqa: F821
 
-        LVL1MenuItem('L1_TAU20' ).setLogic( HA20  & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU20IL' ).setLogic( HA20IL  & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU20IM' ).setLogic( HA20IM  & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU20IT' ).setLogic( HA20IT  & physcond).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_TAU20' ).setLogic( HA20  & physcond).setTriggerType( TT.calo )      # noqa: F821
+        LVL1MenuItem('L1_TAU20IL' ).setLogic( HA20IL  & physcond).setTriggerType( TT.calo )  # noqa: F821
+        LVL1MenuItem('L1_TAU20IM' ).setLogic( HA20IM  & physcond).setTriggerType( TT.calo )  # noqa: F821
+        LVL1MenuItem('L1_TAU20IT' ).setLogic( HA20IT  & physcond).setTriggerType( TT.calo )  # noqa: F821
         
-        LVL1MenuItem('L1_TAU20A' ).setLogic( HA20A  & physcond).setTriggerType( TT.calo ) 
-        LVL1MenuItem('L1_TAU20C' ).setLogic( HA20C  & physcond).setTriggerType( TT.calo ) 
+        LVL1MenuItem('L1_TAU20A' ).setLogic( HA20A  & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU20C' ).setLogic( HA20C  & physcond).setTriggerType( TT.calo )    # noqa: F821
 
-        LVL1MenuItem('L1_TAU25' ).setLogic( HA25  & physcond).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_TAU25' ).setLogic( HA25  & physcond).setTriggerType( TT.calo )      # noqa: F821
         if '_v6' in TriggerFlags.triggerMenuSetup() or '_HI' in TriggerFlags.triggerMenuSetup():
-           LVL1MenuItem('L1_TAU25IT' ).setLogic( HA25IT  & physcond).setTriggerType( TT.calo )
+           LVL1MenuItem('L1_TAU25IT' ).setLogic( HA25IT  & physcond).setTriggerType( TT.calo )    # noqa: F821
         else:
-           LVL1MenuItem('L1_TAU25IM' ).setLogic( HA25IM  & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU30' ).setLogic( HA30  & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU40' ).setLogic( HA40  & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU60' ).setLogic( HA60  & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU100' ).setLogic( HA100  & physcond).setTriggerType( TT.calo )
+           LVL1MenuItem('L1_TAU25IM' ).setLogic( HA25IM  & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU30' ).setLogic( HA30  & physcond).setTriggerType( TT.calo )      # noqa: F821
+        LVL1MenuItem('L1_TAU40' ).setLogic( HA40  & physcond).setTriggerType( TT.calo )      # noqa: F821
+        LVL1MenuItem('L1_TAU60' ).setLogic( HA60  & physcond).setTriggerType( TT.calo )      # noqa: F821
+        LVL1MenuItem('L1_TAU100' ).setLogic( HA100  & physcond).setTriggerType( TT.calo )    # noqa: F821
 
-        LVL1MenuItem('L1_TAU8_UNPAIRED_ISO'   ).setLogic( HA8   & unpaired_isocond ).setTriggerType( TT.calo ) 
+        LVL1MenuItem('L1_TAU8_UNPAIRED_ISO'   ).setLogic( HA8   & unpaired_isocond ).setTriggerType( TT.calo )    # noqa: F821
 
-        LVL1MenuItem('L1_TAU8_UNPAIRED_NONISO').setLogic( HA8   & unpaired_nonisocond ).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU8_EMPTY'          ).setLogic( HA8   & cosmiccond ).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU8_FIRSTEMPTY'     ).setLogic( HA8   & firstempty ).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_TAU8_UNPAIRED_NONISO').setLogic( HA8   & unpaired_nonisocond ).setTriggerType( TT.calo ) # noqa: F821
+        LVL1MenuItem('L1_TAU8_EMPTY'          ).setLogic( HA8   & cosmiccond ).setTriggerType( TT.calo )          # noqa: F821
+        LVL1MenuItem('L1_TAU8_FIRSTEMPTY'     ).setLogic( HA8   & firstempty ).setTriggerType( TT.calo )          # noqa: F821
 
-        LVL1MenuItem('L1_TAU12_UNPAIRED_ISO').setLogic( HA12   & unpaired_isocond ).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU12_UNPAIRED_NONISO').setLogic( HA12   & unpaired_nonisocond ).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU12_EMPTY'          ).setLogic( HA12  & cosmiccond ).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU12_FIRSTEMPTY'     ).setLogic( HA12   & firstempty ).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU30_EMPTY'          ).setLogic( HA30   & cosmiccond ).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU30_UNPAIRED_ISO').setLogic( HA30  & unpaired_isocond ).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_TAU12_UNPAIRED_ISO').setLogic( HA12   & unpaired_isocond ).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU12_UNPAIRED_NONISO').setLogic( HA12   & unpaired_nonisocond ).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU12_EMPTY'          ).setLogic( HA12  & cosmiccond ).setTriggerType( TT.calo )        # noqa: F821
+        LVL1MenuItem('L1_TAU12_FIRSTEMPTY'     ).setLogic( HA12   & firstempty ).setTriggerType( TT.calo )       # noqa: F821
+        LVL1MenuItem('L1_TAU30_EMPTY'          ).setLogic( HA30   & cosmiccond ).setTriggerType( TT.calo )       # noqa: F821
+        LVL1MenuItem('L1_TAU30_UNPAIRED_ISO').setLogic( HA30  & unpaired_isocond ).setTriggerType( TT.calo )     # noqa: F821
 
 
         # 3xTAU
-        LVL1MenuItem('L1_TAU20_2TAU12'  ).setLogic( HA20 & HA12.x(2)  & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU20_2TAU12I' ).setLogic( HA20 & HA12I.x(2) &  physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU40_2TAU20IM' ).setLogic( HA40 & HA20IM.x(2) &  physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU20IM_2TAU12IM' ).setLogic( HA20IM & HA12IM.x(2) &  physcond).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_TAU20_2TAU12'  ).setLogic( HA20 & HA12.x(2)  & physcond).setTriggerType( TT.calo )          # noqa: F821
+        LVL1MenuItem('L1_TAU20_2TAU12I' ).setLogic( HA20 & HA12I.x(2) &  physcond).setTriggerType( TT.calo )         # noqa: F821
+        LVL1MenuItem('L1_TAU40_2TAU20IM' ).setLogic( HA40 & HA20IM.x(2) &  physcond).setTriggerType( TT.calo )       # noqa: F821
+        LVL1MenuItem('L1_TAU20IM_2TAU12IM' ).setLogic( HA20IM & HA12IM.x(2) &  physcond).setTriggerType( TT.calo )   # noqa: F821
 
         # mixed tau
-        LVL1MenuItem('L1_EM15VH_2TAU12'                ).setLogic( EM15VH  & HA12.x(2)          & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM15VH_2TAU12IL'              ).setLogic( EM15VH  & HA12IL.x(2)        & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM15_2TAU12'                  ).setLogic( EM15    & HA12.x(2)          & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM15_2TAU20'                  ).setLogic( EM15    & HA20.x(2)          & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM15VH_2TAU20'                ).setLogic( EM15VH  & HA20.x(2)          & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM15_TAU40_2TAU15'            ).setLogic( EM15    & HA40 & HA15.x(2)   & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM15_2TAU12_J25_2J15_3J12'    ).setLogic( EM15  & HA12.x(2)  & J25 & J15.x(2) & J12.x(3) & physcond).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_EM15VH_2TAU12'                ).setLogic( EM15VH  & HA12.x(2)          & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_EM15VH_2TAU12IL'              ).setLogic( EM15VH  & HA12IL.x(2)        & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_EM15_2TAU12'                  ).setLogic( EM15    & HA12.x(2)          & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_EM15_2TAU20'                  ).setLogic( EM15    & HA20.x(2)          & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_EM15VH_2TAU20'                ).setLogic( EM15VH  & HA20.x(2)          & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_EM15_TAU40_2TAU15'            ).setLogic( EM15    & HA40 & HA15.x(2)   & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_EM15_2TAU12_J25_2J15_3J12'    ).setLogic( EM15  & HA12.x(2)  & J25 & J15.x(2) & J12.x(3) & physcond).setTriggerType( TT.calo )    # noqa: F821
 
         if not '_v6' in TriggerFlags.triggerMenuSetup() and not '_HI' in TriggerFlags.triggerMenuSetup():
-           LVL1MenuItem('L1_EM15VHI_2TAU12'                ).setLogic( EM15VHI  & HA12.x(2)          & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM15VHI_2TAU12IL'              ).setLogic( EM15VHI  & HA12IL.x(2)        & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM15VHI_2TAU12IM'              ).setLogic( EM15VHI  & HA12IM.x(2)        & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM15VHI_TAU40_2TAU15'          ).setLogic( EM15VHI  & HA40 & HA15.x(2)   & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM15VHI_2TAU12I_J25_2J15_3J12'  ).setLogic( EM15VHI  & HA12I.x(2)  & J25 & J15.x(2) & J12.x(3) & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM15VHI_2TAU12IM_J25_3J12'  ).setLogic( EM15VHI  & HA12IM.x(2)  & J25 & J12.x(3) & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM15VHI_2TAU12IL_J25_3J12'  ).setLogic( EM15VHI  & HA12IL.x(2)  & J25 & J12.x(3) & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM15VHI_2TAU12_J25_3J12'  ).setLogic( EM15VHI  & HA12.x(2)  & J25 & J12.x(3) & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM15VHI_2TAU12IM_4J12'  ).setLogic( EM15VHI  & HA12IM.x(2) & J12.x(4) & physcond).setTriggerType( TT.calo )
+           LVL1MenuItem('L1_EM15VHI_2TAU12'                ).setLogic( EM15VHI  & HA12.x(2)          & physcond).setTriggerType( TT.calo )    # noqa: F821
+           LVL1MenuItem('L1_EM15VHI_2TAU12IL'              ).setLogic( EM15VHI  & HA12IL.x(2)        & physcond).setTriggerType( TT.calo )    # noqa: F821
+           LVL1MenuItem('L1_EM15VHI_2TAU12IM'              ).setLogic( EM15VHI  & HA12IM.x(2)        & physcond).setTriggerType( TT.calo )    # noqa: F821
+           LVL1MenuItem('L1_EM15VHI_TAU40_2TAU15'          ).setLogic( EM15VHI  & HA40 & HA15.x(2)   & physcond).setTriggerType( TT.calo )    # noqa: F821
+           LVL1MenuItem('L1_EM15VHI_2TAU12I_J25_2J15_3J12'  ).setLogic( EM15VHI  & HA12I.x(2)  & J25 & J15.x(2) & J12.x(3) & physcond).setTriggerType( TT.calo )    # noqa: F821
+           LVL1MenuItem('L1_EM15VHI_2TAU12IM_J25_3J12'  ).setLogic( EM15VHI  & HA12IM.x(2)  & J25 & J12.x(3) & physcond).setTriggerType( TT.calo )    # noqa: F821
+           LVL1MenuItem('L1_EM15VHI_2TAU12IL_J25_3J12'  ).setLogic( EM15VHI  & HA12IL.x(2)  & J25 & J12.x(3) & physcond).setTriggerType( TT.calo )    # noqa: F821
+           LVL1MenuItem('L1_EM15VHI_2TAU12_J25_3J12'  ).setLogic( EM15VHI  & HA12.x(2)  & J25 & J12.x(3) & physcond).setTriggerType( TT.calo )    # noqa: F821
+           LVL1MenuItem('L1_EM15VHI_2TAU12IM_4J12'  ).setLogic( EM15VHI  & HA12IM.x(2) & J12.x(4) & physcond).setTriggerType( TT.calo )    # noqa: F821
         else:
-           LVL1MenuItem('L1_EM15HI_2TAU12'                ).setLogic( EM15HI  & HA12.x(2)          & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM15HI_2TAU12IL'              ).setLogic( EM15HI  & HA12IL.x(2)        & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM15HI_2TAU12IM'              ).setLogic( EM15HI  & HA12IM.x(2)        & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM15HI_TAU40_2TAU15'          ).setLogic( EM15HI  & HA40 & HA15.x(2)   & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM15HI_2TAU12I_J25_2J15_3J12'  ).setLogic( EM15HI  & HA12I.x(2)  & J25 & J15.x(2) & J12.x(3) & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM15HI_2TAU12IM_J25_3J12'  ).setLogic( EM15HI  & HA12IM.x(2)  & J25 & J12.x(3) & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM15HI_2TAU12IL_J25_3J12'  ).setLogic( EM15HI  & HA12IL.x(2)  & J25 & J12.x(3) & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM15HI_2TAU12_J25_3J12'  ).setLogic( EM15HI  & HA12.x(2)  & J25 & J12.x(3) & physcond).setTriggerType( TT.calo )
-
-        LVL1MenuItem('L1_MU10_TAU12'       ).setLogic( MU10  & HA12          & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_MU10_TAU12I'      ).setLogic( MU10  & HA12I         & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_MU10_TAU12IM'     ).setLogic( MU10  & HA12IM        & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_MU10_TAU20'       ).setLogic( MU10  & HA20          & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_MU10_TAU20IM'     ).setLogic( MU10  & HA20IM        & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_MU11_TAU20IM'     ).setLogic( MU11  & HA20IM        & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_MU10_TAU20IM_J25_2J20'     ).setLogic( MU10  & HA20IM   & J25 & J20.x(2) & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_MU10_TAU20I'       ).setLogic( MU10  & HA20I        & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_MU20_TAU12IM').setLogic( MU20 & HA12IM & physcond).setTriggerType( TT.calo)        
-        LVL1MenuItem('L1_TAU12I_MU10_J25'  ).setLogic( HA12I & MU10 & J25    & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU12I_MU10_J25_2J12'  ).setLogic( HA12I & MU10 & J25 & J12.x(2)  & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_MU10_TAU12_J25_2J12' ).setLogic( MU10 & HA12 & J25 & J12.x(2)     & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_MU10_TAU12IM_J25_2J12' ).setLogic( MU10 & HA12IM & J25 & J12.x(2)    & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_MU10_TAU12IL_J25_2J12' ).setLogic( MU10 & HA12IL & J25 & J12.x(2)    & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU12I_MU10_J20.31ETA49' ).setLogic( HA12I & MU10 & J2031ETA49    & physcond).setTriggerType( TT.calo )
+           LVL1MenuItem('L1_EM15HI_2TAU12'                ).setLogic( EM15HI  & HA12.x(2)          & physcond).setTriggerType( TT.calo )    # noqa: F821
+           LVL1MenuItem('L1_EM15HI_2TAU12IL'              ).setLogic( EM15HI  & HA12IL.x(2)        & physcond).setTriggerType( TT.calo )    # noqa: F821
+           LVL1MenuItem('L1_EM15HI_2TAU12IM'              ).setLogic( EM15HI  & HA12IM.x(2)        & physcond).setTriggerType( TT.calo )    # noqa: F821
+           LVL1MenuItem('L1_EM15HI_TAU40_2TAU15'          ).setLogic( EM15HI  & HA40 & HA15.x(2)   & physcond).setTriggerType( TT.calo )    # noqa: F821
+           LVL1MenuItem('L1_EM15HI_2TAU12I_J25_2J15_3J12'  ).setLogic( EM15HI  & HA12I.x(2)  & J25 & J15.x(2) & J12.x(3) & physcond).setTriggerType( TT.calo )    # noqa: F821
+           LVL1MenuItem('L1_EM15HI_2TAU12IM_J25_3J12'  ).setLogic( EM15HI  & HA12IM.x(2)  & J25 & J12.x(3) & physcond).setTriggerType( TT.calo )    # noqa: F821
+           LVL1MenuItem('L1_EM15HI_2TAU12IL_J25_3J12'  ).setLogic( EM15HI  & HA12IL.x(2)  & J25 & J12.x(3) & physcond).setTriggerType( TT.calo )    # noqa: F821
+           LVL1MenuItem('L1_EM15HI_2TAU12_J25_3J12'  ).setLogic( EM15HI  & HA12.x(2)  & J25 & J12.x(3) & physcond).setTriggerType( TT.calo )    # noqa: F821
+
+        LVL1MenuItem('L1_MU10_TAU12'       ).setLogic( MU10  & HA12          & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_MU10_TAU12I'      ).setLogic( MU10  & HA12I         & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_MU10_TAU12IM'     ).setLogic( MU10  & HA12IM        & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_MU10_TAU20'       ).setLogic( MU10  & HA20          & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_MU10_TAU20IM'     ).setLogic( MU10  & HA20IM        & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_MU11_TAU20IM'     ).setLogic( MU11  & HA20IM        & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_MU10_TAU20IM_J25_2J20'     ).setLogic( MU10  & HA20IM   & J25 & J20.x(2) & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_MU10_TAU20I'       ).setLogic( MU10  & HA20I        & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_MU20_TAU12IM').setLogic( MU20 & HA12IM & physcond).setTriggerType( TT.calo)                  # noqa: F821
+        LVL1MenuItem('L1_TAU12I_MU10_J25'  ).setLogic( HA12I & MU10 & J25    & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU12I_MU10_J25_2J12'  ).setLogic( HA12I & MU10 & J25 & J12.x(2)  & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_MU10_TAU12_J25_2J12' ).setLogic( MU10 & HA12 & J25 & J12.x(2)     & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_MU10_TAU12IM_J25_2J12' ).setLogic( MU10 & HA12IM & J25 & J12.x(2)    & physcond).setTriggerType( TT.calo ) # noqa: F821
+        LVL1MenuItem('L1_MU10_TAU12IL_J25_2J12' ).setLogic( MU10 & HA12IL & J25 & J12.x(2)    & physcond).setTriggerType( TT.calo ) # noqa: F821
+        LVL1MenuItem('L1_TAU12I_MU10_J20.31ETA49' ).setLogic( HA12I & MU10 & J2031ETA49    & physcond).setTriggerType( TT.calo )    # noqa: F821
         if not '_v6' in TriggerFlags.triggerMenuSetup() and not '_HI' in TriggerFlags.triggerMenuSetup():
-           LVL1MenuItem('L1_MU10_TAU12IM_3J12' ).setLogic( MU10 & HA12IM & J12.x(3)    & physcond).setTriggerType( TT.calo )
+           LVL1MenuItem('L1_MU10_TAU12IM_3J12' ).setLogic( MU10 & HA12IM & J12.x(3)    & physcond).setTriggerType( TT.calo )    # noqa: F821
 
-        LVL1MenuItem('L1_TAU20_2TAU12I_J25_2J15_3J12'   ).setLogic( HA20 & HA12I.x(2)     & J25 & J15.x(2) & J12.x(3) & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU20_2TAU12_J25_2J20_3J12'   ).setLogic( HA20 & HA12.x(2)     & J25 & J20.x(2) & J12.x(3) & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU20IM_2TAU12IM_J25_2J20_3J12').setLogic( HA20IM & HA12IM.x(2)     & J25 & J20.x(2) & J12.x(3) & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU20IL_2TAU12IL_J25_2J20_3J12').setLogic( HA20IL & HA12IL.x(2)     & J25 & J20.x(2) & J12.x(3) & physcond).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_TAU20_2TAU12I_J25_2J15_3J12'   ).setLogic( HA20 & HA12I.x(2)     & J25 & J15.x(2) & J12.x(3) & physcond).setTriggerType( TT.calo )      # noqa: F821
+        LVL1MenuItem('L1_TAU20_2TAU12_J25_2J20_3J12'   ).setLogic( HA20 & HA12.x(2)     & J25 & J20.x(2) & J12.x(3) & physcond).setTriggerType( TT.calo )         # noqa: F821
+        LVL1MenuItem('L1_TAU20IM_2TAU12IM_J25_2J20_3J12').setLogic( HA20IM & HA12IM.x(2)     & J25 & J20.x(2) & J12.x(3) & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU20IL_2TAU12IL_J25_2J20_3J12').setLogic( HA20IL & HA12IL.x(2)     & J25 & J20.x(2) & J12.x(3) & physcond).setTriggerType( TT.calo )    # noqa: F821
 
         if '_v6' in TriggerFlags.triggerMenuSetup() or '_HI' in TriggerFlags.triggerMenuSetup():
-           LVL1MenuItem('L1_TAU25IT_2TAU12IT_2J25_3J12').setLogic( HA25IT & HA12IT.x(2)     & J25.x(2)  & J12.x(3) & physcond).setTriggerType( TT.calo )
+           LVL1MenuItem('L1_TAU25IT_2TAU12IT_2J25_3J12').setLogic( HA25IT & HA12IT.x(2)     & J25.x(2)  & J12.x(3) & physcond).setTriggerType( TT.calo )    # noqa: F821
         else:
-           LVL1MenuItem('L1_TAU25IM_2TAU20IM_2J25_3J20').setLogic( HA25IM & HA20IM.x(2)     & J25.x(2)  & J20.x(3) & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_TAU20IM_2TAU12IM_4J12').setLogic( HA20IM & HA12IM.x(2)  & J12.x(4) & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_TAU60_2TAU40').setLogic( HA60 & HA40.x(2)  & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_2TAU12I_TAU20_J25_2J15_3J12'  ).setLogic( HA12I.x(2)   & HA20  & J25 & J15.x(2) & J12.x(3) & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU20_2J20_XE45'              ).setLogic( HA20    & J20.x(2)   & XE45 & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU20IM_2J20_XE50'            ).setLogic( HA20IM   & J20.x(2)   & XE50 & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU20IM_2J20_XE45'            ).setLogic( HA20IM    & J20.x(2)   & XE45 & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU25_2J20_XE45'              ).setLogic( HA25      & J20.x(2)   & XE45 & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU20_2TAU12_XE35'            ).setLogic( HA20    & HA12.x(2)  & XE35 & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU20IM_2TAU12IM_XE35'        ).setLogic( HA20IM  & HA12IM.x(2)  & XE35 & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU20IL_2TAU12IL_XE35'        ).setLogic( HA20IL  & HA12IL.x(2)  & XE35 & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU20IT_2TAU12IT_XE35'        ).setLogic( HA20IT  & HA12IT.x(2)  & XE35 & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU20IM_2TAU12IM_XE40'        ).setLogic( HA20IM  & HA12IM.x(2)  & XE40 & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU40_2TAU12IM_XE40'        ).setLogic( HA40  & HA12IM.x(2)  & XE40 & physcond).setTriggerType( TT.calo )   
-        LVL1MenuItem('L1_EM20VHI_TAU20IM_2TAU20_J25_3J20'          ).setLogic( EM20VHI  &  HA20IM  &  HA20.x(2) &  J25  & J20.x(3) & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_MU10_TAU12I_XE35'             ).setLogic( MU10    & HA12I      & XE35 & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_MU10_TAU12_XE35'              ).setLogic( MU10    & HA12       & XE35 & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_MU10_TAU12IL_XE35'            ).setLogic( MU10    & HA12IL     & XE35 & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_MU10_TAU12IM_XE35'            ).setLogic( MU10    & HA12IM     & XE35 & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_MU10_TAU12IT_XE35'            ).setLogic( MU10    & HA12IT     & XE35 & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_MU10_TAU12IM_XE40'            ).setLogic( MU10    & HA12IM     & XE40 & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU20I_2TAU12I_XE35'          ).setLogic( HA20I   & HA12I.x(2) & XE35 & physcond).setTriggerType( TT.calo )
+           LVL1MenuItem('L1_TAU25IM_2TAU20IM_2J25_3J20').setLogic( HA25IM & HA20IM.x(2)     & J25.x(2)  & J20.x(3) & physcond).setTriggerType( TT.calo )    # noqa: F821
+           LVL1MenuItem('L1_TAU20IM_2TAU12IM_4J12').setLogic( HA20IM & HA12IM.x(2)  & J12.x(4) & physcond).setTriggerType( TT.calo )    # noqa: F821
+           LVL1MenuItem('L1_TAU60_2TAU40').setLogic( HA60 & HA40.x(2)  & physcond).setTriggerType( TT.calo )                            # noqa: F821
+        LVL1MenuItem('L1_2TAU12I_TAU20_J25_2J15_3J12'  ).setLogic( HA12I.x(2)   & HA20  & J25 & J15.x(2) & J12.x(3) & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU20_2J20_XE45'              ).setLogic( HA20    & J20.x(2)   & XE45 & physcond).setTriggerType( TT.calo )      # noqa: F821
+        LVL1MenuItem('L1_TAU20IM_2J20_XE50'            ).setLogic( HA20IM   & J20.x(2)   & XE50 & physcond).setTriggerType( TT.calo )     # noqa: F821
+        LVL1MenuItem('L1_TAU20IM_2J20_XE45'            ).setLogic( HA20IM    & J20.x(2)   & XE45 & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU25_2J20_XE45'              ).setLogic( HA25      & J20.x(2)   & XE45 & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU20_2TAU12_XE35'            ).setLogic( HA20    & HA12.x(2)  & XE35 & physcond).setTriggerType( TT.calo )      # noqa: F821
+        LVL1MenuItem('L1_TAU20IM_2TAU12IM_XE35'        ).setLogic( HA20IM  & HA12IM.x(2)  & XE35 & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU20IL_2TAU12IL_XE35'        ).setLogic( HA20IL  & HA12IL.x(2)  & XE35 & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU20IT_2TAU12IT_XE35'        ).setLogic( HA20IT  & HA12IT.x(2)  & XE35 & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU20IM_2TAU12IM_XE40'        ).setLogic( HA20IM  & HA12IM.x(2)  & XE40 & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU40_2TAU12IM_XE40'        ).setLogic( HA40  & HA12IM.x(2)  & XE40 & physcond).setTriggerType( TT.calo )        # noqa: F821
+        LVL1MenuItem('L1_EM20VHI_TAU20IM_2TAU20_J25_3J20'          ).setLogic( EM20VHI  &  HA20IM  &  HA20.x(2) &  J25  & J20.x(3) & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_MU10_TAU12I_XE35'             ).setLogic( MU10    & HA12I      & XE35 & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_MU10_TAU12_XE35'              ).setLogic( MU10    & HA12       & XE35 & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_MU10_TAU12IL_XE35'            ).setLogic( MU10    & HA12IL     & XE35 & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_MU10_TAU12IM_XE35'            ).setLogic( MU10    & HA12IM     & XE35 & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_MU10_TAU12IT_XE35'            ).setLogic( MU10    & HA12IT     & XE35 & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_MU10_TAU12IM_XE40'            ).setLogic( MU10    & HA12IM     & XE40 & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU20I_2TAU12I_XE35'          ).setLogic( HA20I   & HA12I.x(2) & XE35 & physcond).setTriggerType( TT.calo )    # noqa: F821
 
         if not '_v6' in TriggerFlags.triggerMenuSetup() and not '_HI' in TriggerFlags.triggerMenuSetup():
-           LVL1MenuItem('L1_EM15VHI_TAU20IM_2TAU15_J25_2J20_3J15'          ).setLogic( EM15VHI  &  HA20IM  &  HA15.x(2) &  J25  & J20.x(2) & J15.x(3) & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM15VHI_2TAU12I_XE35'          ).setLogic( EM15VHI  & HA12I.x(2) & XE35 & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM15VHI_2TAU12IM_XE35'         ).setLogic( EM15VHI  & HA12IM.x(2) & XE35 & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM15VHI_2TAU12IL_XE35'         ).setLogic( EM15VHI  & HA12IL.x(2) & XE35 & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM15VHI_2TAU12_XE35'         ).setLogic( EM15VHI  & HA12.x(2) & XE35 & physcond).setTriggerType( TT.calo )
+           LVL1MenuItem('L1_EM15VHI_TAU20IM_2TAU15_J25_2J20_3J15'          ).setLogic( EM15VHI  &  HA20IM  &  HA15.x(2) &  J25  & J20.x(2) & J15.x(3) & physcond).setTriggerType( TT.calo )    # noqa: F821
+           LVL1MenuItem('L1_EM15VHI_2TAU12I_XE35'          ).setLogic( EM15VHI  & HA12I.x(2) & XE35 & physcond).setTriggerType( TT.calo )     # noqa: F821
+           LVL1MenuItem('L1_EM15VHI_2TAU12IM_XE35'         ).setLogic( EM15VHI  & HA12IM.x(2) & XE35 & physcond).setTriggerType( TT.calo )    # noqa: F821
+           LVL1MenuItem('L1_EM15VHI_2TAU12IL_XE35'         ).setLogic( EM15VHI  & HA12IL.x(2) & XE35 & physcond).setTriggerType( TT.calo )    # noqa: F821
+           LVL1MenuItem('L1_EM15VHI_2TAU12_XE35'         ).setLogic( EM15VHI  & HA12.x(2) & XE35 & physcond).setTriggerType( TT.calo )        # noqa: F821
         else:
-           LVL1MenuItem('L1_EM15HI_TAU20IM_2TAU15_J25_2J20_3J15'          ).setLogic( EM15HI  &  HA20IM  &  HA15.x(2) &  J25  & J20.x(2) & J15.x(3) & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM15HI_2TAU12I_XE35'          ).setLogic( EM15HI  & HA12I.x(2) & XE35 & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM15HI_2TAU12IM_XE35'         ).setLogic( EM15HI  & HA12IM.x(2) & XE35 & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM15HI_2TAU12IL_XE35'         ).setLogic( EM15HI  & HA12IL.x(2) & XE35 & physcond).setTriggerType( TT.calo )
-           LVL1MenuItem('L1_EM15HI_2TAU12_XE35'         ).setLogic( EM15HI  & HA12.x(2) & XE35 & physcond).setTriggerType( TT.calo )
+           LVL1MenuItem('L1_EM15HI_TAU20IM_2TAU15_J25_2J20_3J15'          ).setLogic( EM15HI  &  HA20IM  &  HA15.x(2) &  J25  & J20.x(2) & J15.x(3) & physcond).setTriggerType( TT.calo )    # noqa: F821
+           LVL1MenuItem('L1_EM15HI_2TAU12I_XE35'          ).setLogic( EM15HI  & HA12I.x(2) & XE35 & physcond).setTriggerType( TT.calo )     # noqa: F821
+           LVL1MenuItem('L1_EM15HI_2TAU12IM_XE35'         ).setLogic( EM15HI  & HA12IM.x(2) & XE35 & physcond).setTriggerType( TT.calo )    # noqa: F821
+           LVL1MenuItem('L1_EM15HI_2TAU12IL_XE35'         ).setLogic( EM15HI  & HA12IL.x(2) & XE35 & physcond).setTriggerType( TT.calo )    # noqa: F821
+           LVL1MenuItem('L1_EM15HI_2TAU12_XE35'         ).setLogic( EM15HI  & HA12.x(2) & XE35 & physcond).setTriggerType( TT.calo )        # noqa: F821
 
         #FTK items
-        LVL1MenuItem('L1_TAU12IM_FTK').setLogic( HA12IM & physcond).setTriggerType( TT.ftk)
-        LVL1MenuItem('L1_TAU20IM_FTK').setLogic( HA20IM & physcond).setTriggerType( TT.ftk)
+        LVL1MenuItem('L1_TAU12IM_FTK').setLogic( HA12IM & physcond).setTriggerType(TT.ftk)    # noqa: F821
+        LVL1MenuItem('L1_TAU20IM_FTK').setLogic( HA20IM & physcond).setTriggerType(TT.ftk)    # noqa: F821
         if '_v6' in TriggerFlags.triggerMenuSetup() or '_HI' in TriggerFlags.triggerMenuSetup():
-           LVL1MenuItem('L1_MU20_TAU12IM_FTK').setLogic( MU20 & HA12IM & physcond).setTriggerType( TT.ftk)
+           LVL1MenuItem('L1_MU20_TAU12IM_FTK').setLogic( MU20 & HA12IM & physcond).setTriggerType(TT.ftk)    # noqa: F821
         else:
-           LVL1MenuItem('L1_MU21_TAU12IM_FTK').setLogic( (MU20 | MU21) & HA12IM & physcond).setTriggerType( TT.ftk)
-        LVL1MenuItem('L1_TAU20IM_2TAU12IM_J25_2J20_3J12_FTK').setLogic( HA20IM & HA12IM.x(2)     & J25 & J20.x(2) & J12.x(3) & physcond).setTriggerType( TT.ftk )
-        LVL1MenuItem('L1_DR-TAU20ITAU12I-J25_FTK').setLogic( TOPO_1DISAMB_J25ab_0DR28_TAU20abi_TAU12abi & physcond).setTriggerType(TT.ftk)
+           LVL1MenuItem('L1_MU21_TAU12IM_FTK').setLogic( (MU20 | MU21) & HA12IM & physcond).setTriggerType(TT.ftk)    # noqa: F821
+        LVL1MenuItem('L1_TAU20IM_2TAU12IM_J25_2J20_3J12_FTK').setLogic( HA20IM & HA12IM.x(2)     & J25 & J20.x(2) & J12.x(3) & physcond).setTriggerType(TT.ftk)    # noqa: F821
+        LVL1MenuItem('L1_DR-TAU20ITAU12I-J25_FTK').setLogic( TOPO_1DISAMB_J25ab_0DR28_TAU20abi_TAU12abi & physcond).setTriggerType(TT.ftk)    # noqa: F821
 
 
 
 
         # JET ctpid=[0x60:0x7f]
-        LVL1MenuItem('L1_J5'   ).setLogic( J5   & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J10'   ).setLogic( J10  & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J12'   ).setLogic( J12  & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J15'   ).setLogic( J15  & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J20'   ).setLogic( J20  & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J25'   ).setLogic( J25  & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J30'   ).setLogic( J30  & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J35'   ).setLogic( J35  & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J40'   ).setLogic( J40  & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J50'   ).setLogic( J50  & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J60'   ).setLogic( J60  & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J75'   ).setLogic( J75  & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J75A'  ).setLogic( J75A & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J75C'  ).setLogic( J75C & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J85'   ).setLogic( J85  & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J100'  ).setLogic( J100 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J120'  ).setLogic( J120 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J150'  ).setLogic( J150 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J175'  ).setLogic( J175 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J250'  ).setLogic( J250 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J400'  ).setLogic( J400 & physcond).setTriggerType(TT.calo)
-
-        LVL1MenuItem('L1_J10.31ETA49').setLogic( J1031ETA49 & physcond).setTriggerType(TT.calo)
-        #LVL1MenuItem('L1_J20.31ETA49').setLogic( J2031ETA49 & physcond).setTriggerType(TT.calo)
-        #LVL1MenuItem('L1_J30.31ETA49').setLogic( J3031ETA49 & physcond).setTriggerType(TT.calo)
-        #LVL1MenuItem('L1_J50.31ETA49').setLogic( J5031ETA49 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J75.31ETA49').setLogic( J7531ETA49 & physcond).setTriggerType(TT.calo)
-        #LVL1MenuItem('L1_J100.31ETA49').setLogic( J10031ETA49 & physcond).setTriggerType(TT.calo)
-
-
-        LVL1MenuItem('L1_J10_UNPAIRED_ISO'   ).setLogic( J10 & unpaired_isocond   ).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J10_UNPAIRED_NONISO').setLogic( J10 & unpaired_nonisocond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J10_EMPTY').setLogic( J10 & cosmiccond ).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J10_FIRSTEMPTY').setLogic( J10 & firstempty ).setTriggerType(TT.calo)
-
-        LVL1MenuItem('L1_J12_UNPAIRED_ISO'   ).setLogic( J12 & unpaired_isocond   ).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J12_UNPAIRED_NONISO').setLogic( J12 & unpaired_nonisocond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J12_EMPTY').setLogic( J12 & cosmiccond ).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J12_FIRSTEMPTY').setLogic( J12 & firstempty ).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J12_ABORTGAPNOTCALIB').setLogic( J12 & abortgap ).setTriggerType(TT.calo)
-
-        LVL1MenuItem('L1_J50_UNPAIRED_ISO'   ).setLogic( J50 & unpaired_isocond   ).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J50_UNPAIRED_NONISO').setLogic( J50 & unpaired_nonisocond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J50_ABORTGAPNOTCALIB').setLogic( J50 & abortgap ).setTriggerType(TT.calo)
-
-        LVL1MenuItem('L1_J12_BGRP12').setLogic( J12 & bgrp12cond ).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J30.31ETA49_BGRP12').setLogic( J3031ETA49 & bgrp12cond ).setTriggerType(TT.calo)
-
-        LVL1MenuItem('L1_J30_EMPTY').setLogic( J30 & cosmiccond ).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J30_UNPAIRED').setLogic( J30 & unpairedRcond ).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J30_FIRSTEMPTY').setLogic( J30 & firstempty ).setTriggerType(TT.calo)
-
-        LVL1MenuItem('L1_J10.31ETA49_EMPTY').setLogic( J1031ETA49 & cosmiccond ).setTriggerType(TT.calo)
-
-        LVL1MenuItem('L1_J15.31ETA49_UNPAIRED_ISO' ).setLogic( J1531ETA49 & unpaired_isocond).setTriggerType(TT.calo)
-
-        LVL1MenuItem('L1_J30.31ETA49_EMPTY').setLogic( J3031ETA49 & cosmiccond ).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J30.31ETA49_FIRSTEMPTY').setLogic( J3031ETA49 & firstempty ).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J30.31ETA49_UNPAIRED_ISO'   ).setLogic( J3031ETA49 & unpaired_isocond   ).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J30.31ETA49_UNPAIRED_NONISO'   ).setLogic( J3031ETA49 & unpaired_nonisocond   ).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_J5'   ).setLogic( J5   & physcond).setTriggerType(TT.calo)     # noqa: F821
+        LVL1MenuItem('L1_J10'   ).setLogic( J10  & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J12'   ).setLogic( J12  & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J15'   ).setLogic( J15  & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J20'   ).setLogic( J20  & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J25'   ).setLogic( J25  & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J30'   ).setLogic( J30  & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J35'   ).setLogic( J35  & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J40'   ).setLogic( J40  & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J50'   ).setLogic( J50  & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J60'   ).setLogic( J60  & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J75'   ).setLogic( J75  & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J75A'  ).setLogic( J75A & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J75C'  ).setLogic( J75C & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J85'   ).setLogic( J85  & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J100'  ).setLogic( J100 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J120'  ).setLogic( J120 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J150'  ).setLogic( J150 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J175'  ).setLogic( J175 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J250'  ).setLogic( J250 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J400'  ).setLogic( J400 & physcond).setTriggerType(TT.calo)    # noqa: F821
+
+        LVL1MenuItem('L1_J10.31ETA49').setLogic( J1031ETA49 & physcond).setTriggerType(TT.calo)      # noqa: F821
+        #LVL1MenuItem('L1_J20.31ETA49').setLogic( J2031ETA49 & physcond).setTriggerType(TT.calo)     # noqa: F821
+        #LVL1MenuItem('L1_J30.31ETA49').setLogic( J3031ETA49 & physcond).setTriggerType(TT.calo)     # noqa: F821
+        #LVL1MenuItem('L1_J50.31ETA49').setLogic( J5031ETA49 & physcond).setTriggerType(TT.calo)     # noqa: F821
+        LVL1MenuItem('L1_J75.31ETA49').setLogic( J7531ETA49 & physcond).setTriggerType(TT.calo)      # noqa: F821
+        #LVL1MenuItem('L1_J100.31ETA49').setLogic( J10031ETA49 & physcond).setTriggerType(TT.calo)   # noqa: F821
+
+
+        LVL1MenuItem('L1_J10_UNPAIRED_ISO'   ).setLogic( J10 & unpaired_isocond   ).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J10_UNPAIRED_NONISO').setLogic( J10 & unpaired_nonisocond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J10_EMPTY').setLogic( J10 & cosmiccond ).setTriggerType(TT.calo)         # noqa: F821
+        LVL1MenuItem('L1_J10_FIRSTEMPTY').setLogic( J10 & firstempty ).setTriggerType(TT.calo)    # noqa: F821
+
+        LVL1MenuItem('L1_J12_UNPAIRED_ISO'   ).setLogic( J12 & unpaired_isocond   ).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J12_UNPAIRED_NONISO').setLogic( J12 & unpaired_nonisocond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J12_EMPTY').setLogic( J12 & cosmiccond ).setTriggerType(TT.calo)             # noqa: F821
+        LVL1MenuItem('L1_J12_FIRSTEMPTY').setLogic( J12 & firstempty ).setTriggerType(TT.calo)        # noqa: F821
+        LVL1MenuItem('L1_J12_ABORTGAPNOTCALIB').setLogic( J12 & abortgap ).setTriggerType(TT.calo)    # noqa: F821
+
+        LVL1MenuItem('L1_J50_UNPAIRED_ISO'   ).setLogic( J50 & unpaired_isocond   ).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J50_UNPAIRED_NONISO').setLogic( J50 & unpaired_nonisocond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J50_ABORTGAPNOTCALIB').setLogic( J50 & abortgap ).setTriggerType(TT.calo)             # noqa: F821
+
+        LVL1MenuItem('L1_J12_BGRP12').setLogic( J12 & bgrp12cond ).setTriggerType(TT.calo)                   # noqa: F821
+        LVL1MenuItem('L1_J30.31ETA49_BGRP12').setLogic( J3031ETA49 & bgrp12cond ).setTriggerType(TT.calo)    # noqa: F821
+
+        LVL1MenuItem('L1_J30_EMPTY').setLogic( J30 & cosmiccond ).setTriggerType(TT.calo)          # noqa: F821
+        LVL1MenuItem('L1_J30_UNPAIRED').setLogic( J30 & unpairedRcond ).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J30_FIRSTEMPTY').setLogic( J30 & firstempty ).setTriggerType(TT.calo)     # noqa: F821
+
+        LVL1MenuItem('L1_J10.31ETA49_EMPTY').setLogic( J1031ETA49 & cosmiccond ).setTriggerType(TT.calo)    # noqa: F821
+
+        LVL1MenuItem('L1_J15.31ETA49_UNPAIRED_ISO' ).setLogic( J1531ETA49 & unpaired_isocond).setTriggerType(TT.calo)    # noqa: F821
+
+        LVL1MenuItem('L1_J30.31ETA49_EMPTY').setLogic( J3031ETA49 & cosmiccond ).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J30.31ETA49_FIRSTEMPTY').setLogic( J3031ETA49 & firstempty ).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J30.31ETA49_UNPAIRED_ISO'   ).setLogic( J3031ETA49 & unpaired_isocond   ).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J30.31ETA49_UNPAIRED_NONISO'   ).setLogic( J3031ETA49 & unpaired_nonisocond   ).setTriggerType(TT.calo)    # noqa: F821
 
         
-        LVL1MenuItem('L1_J100_FIRSTEMPTY').setLogic( J100 & firstempty ).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J100.31ETA49_FIRSTEMPTY' ).setLogic( J10031ETA49 & firstempty ).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_J100_FIRSTEMPTY').setLogic( J100 & firstempty ).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J100.31ETA49_FIRSTEMPTY' ).setLogic( J10031ETA49 & firstempty ).setTriggerType(TT.calo)    # noqa: F821
 
         # multi jet
-        LVL1MenuItem('L1_2J25.31ETA49'  ).setLogic( J2531ETA49 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_2J15'   ).setLogic( J15.x(2)    & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J15_J15.31ETA49' ).setLogic( J15 & J1531ETA49 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J20_J20.31ETA49' ).setLogic( J20 & J2031ETA49 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_3J10'   ).setLogic( J10.x(3)    & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_3J15'   ).setLogic( J15.x(3)    & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_3J20'   ).setLogic( J20.x(3)    & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_3J40'   ).setLogic( J40.x(3)    & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_3J50'   ).setLogic( J50.x(3)    & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_3J75'   ).setLogic( J75.x(3)    & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_4J10'   ).setLogic( J10.x(4)    & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_4J15'   ).setLogic( J15.x(4)    & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_4J20'   ).setLogic( J20.x(4)    & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_4J20.0ETA49').setLogic( J200ETA49.x(4) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_4J30'   ).setLogic( J30.x(4)    & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_6J15'   ).setLogic( J15.x(6)    & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J75_3J20' ).setLogic( J75 & J20.x(3)    & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J85_3J30' ).setLogic( J85 & J30.x(3)    & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J30.0ETA49_2J20.0ETA49' ).setLogic( J300ETA49 & J200ETA49.x(2)    & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J15.0ETA25_2J15.31ETA49' ).setLogic( J150ETA25 & J1531ETA49.x(2)    & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J40.0ETA25_2J15.31ETA49' ).setLogic( J400ETA25 & J1531ETA49.x(2)    & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J40.0ETA25_2J25_J20.31ETA49' ).setLogic( J400ETA25 & J25.x(2) & J2031ETA49   & physcond).setTriggerType(TT.calo) 
-        LVL1MenuItem('L1_J40.0ETA25_2J30_J20.31ETA49' ).setLogic( J400ETA25 & J30.x(2) & J2031ETA49   & physcond).setTriggerType(TT.calo)
-
-        LVL1MenuItem('L1_4J17.0ETA22' ).setLogic( J170ETA22.x(4) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_3J25.0ETA23' ).setLogic( J250ETA23.x(3) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_3J35.0ETA23' ).setLogic( J350ETA23.x(3) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_3J15.0ETA25' ).setLogic( J150ETA25.x(3) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_4J15.0ETA25' ).setLogic( J150ETA25.x(4) & physcond).setTriggerType(TT.calo) 
-        LVL1MenuItem('L1_5J15.0ETA25' ).setLogic( J150ETA25.x(5) & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_2J25.31ETA49'  ).setLogic( J2531ETA49 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_2J15'   ).setLogic( J15.x(2)    & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J15_J15.31ETA49' ).setLogic( J15 & J1531ETA49 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J20_J20.31ETA49' ).setLogic( J20 & J2031ETA49 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_3J10'   ).setLogic( J10.x(3)    & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_3J15'   ).setLogic( J15.x(3)    & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_3J20'   ).setLogic( J20.x(3)    & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_3J40'   ).setLogic( J40.x(3)    & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_3J50'   ).setLogic( J50.x(3)    & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_3J75'   ).setLogic( J75.x(3)    & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_4J10'   ).setLogic( J10.x(4)    & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_4J15'   ).setLogic( J15.x(4)    & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_4J20'   ).setLogic( J20.x(4)    & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_4J20.0ETA49').setLogic( J200ETA49.x(4) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_4J30'   ).setLogic( J30.x(4)    & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_6J15'   ).setLogic( J15.x(6)    & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J75_3J20' ).setLogic( J75 & J20.x(3)    & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J85_3J30' ).setLogic( J85 & J30.x(3)    & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J30.0ETA49_2J20.0ETA49' ).setLogic( J300ETA49 & J200ETA49.x(2)    & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J15.0ETA25_2J15.31ETA49' ).setLogic( J150ETA25 & J1531ETA49.x(2)    & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J40.0ETA25_2J15.31ETA49' ).setLogic( J400ETA25 & J1531ETA49.x(2)    & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J40.0ETA25_2J25_J20.31ETA49' ).setLogic( J400ETA25 & J25.x(2) & J2031ETA49   & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J40.0ETA25_2J30_J20.31ETA49' ).setLogic( J400ETA25 & J30.x(2) & J2031ETA49   & physcond).setTriggerType(TT.calo)    # noqa: F821
+
+        LVL1MenuItem('L1_4J17.0ETA22' ).setLogic( J170ETA22.x(4) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_3J25.0ETA23' ).setLogic( J250ETA23.x(3) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_3J35.0ETA23' ).setLogic( J350ETA23.x(3) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_3J15.0ETA25' ).setLogic( J150ETA25.x(3) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_4J15.0ETA25' ).setLogic( J150ETA25.x(4) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_5J15.0ETA25' ).setLogic( J150ETA25.x(5) & physcond).setTriggerType(TT.calo)    # noqa: F821
 
         #FTK items
-        LVL1MenuItem('L1_4J15_FTK'   ).setLogic( J15.x(4)    & physcond).setTriggerType(TT.ftk)
-        LVL1MenuItem('L1_4J15.0ETA25_FTK' ).setLogic( J150ETA25.x(4) & physcond).setTriggerType(TT.ftk) 
-        LVL1MenuItem('L1_J100_FTK'  ).setLogic( J100 & physcond).setTriggerType(TT.ftk)
-        LVL1MenuItem('L1_J15_FTK'   ).setLogic( J15  & physcond).setTriggerType(TT.ftk)
-        LVL1MenuItem('L1_J40_FTK'   ).setLogic( J40  & physcond).setTriggerType(TT.ftk)
+        LVL1MenuItem('L1_4J20_FTK'   ).setLogic( J20.x(4)    & physcond).setTriggerType(TT.ftk)         # noqa: F821
+        LVL1MenuItem('L1_4J15.0ETA25_FTK' ).setLogic( J150ETA25.x(4) & physcond).setTriggerType(TT.ftk) # noqa: F821
+        LVL1MenuItem('L1_J100_FTK'  ).setLogic( J100 & physcond).setTriggerType(TT.ftk)    # noqa: F821
+        LVL1MenuItem('L1_J15_FTK'   ).setLogic( J15  & physcond).setTriggerType(TT.ftk)    # noqa: F821
+        LVL1MenuItem('L1_J40_FTK'   ).setLogic( J40  & physcond).setTriggerType(TT.ftk)    # noqa: F821
 
-#        LVL1MenuItem('L1_ZB_J20').setLogic(ZB_EM15 & J20 & physcond).setTriggerType(TT.zerobs)
+#        LVL1MenuItem('L1_ZB_J20').setLogic(ZB_EM15 & J20 & physcond).setTriggerType(TT.zerobs)    # noqa: F821
         if (('Physics_HI_v3' in TriggerFlags.triggerMenuSetup()) or ('MC_HI_v3' in TriggerFlags.triggerMenuSetup()) or ('Physics_HI_v4' in TriggerFlags.triggerMenuSetup()) or ('MC_HI_v4' in TriggerFlags.triggerMenuSetup())):
-            LVL1MenuItem('L1_ZB', ctpid=240).setLogic(ZB_J75 & physcond).setTriggerType(TT.zerobs)
+            LVL1MenuItem('L1_ZB', ctpid=240).setLogic(ZB_J75 & physcond).setTriggerType(TT.zerobs) # noqa: F821
         else:
-            LVL1MenuItem('L1_ZB', ctpid=240).setLogic(ZB_EM15 & physcond).setTriggerType(TT.zerobs)
+            LVL1MenuItem('L1_ZB', ctpid=240).setLogic(ZB_EM15 & physcond).setTriggerType(TT.zerobs)# noqa: F821
 
 
         # combined jet - xe
         #LVL1MenuItem('L1_J40_XE50').setLogic( J75 & XE40 & physcond).setTriggerType(TT.calo)#CB ERROR???
-        LVL1MenuItem('L1_J40_XE50').setLogic( J40 & XE50 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J40.0ETA25_XE50').setLogic( J400ETA25 & XE50 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J75_XE40').setLogic( J75 & XE40 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J75_XE50').setLogic( J75 & XE50 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_2J15_XE55').setLogic( J15.x(2) & XE55 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_2J40_XE45').setLogic( J40.x(2) & XE45 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_2J50_XE40').setLogic( J50.x(2) & XE50 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J40_XE60').setLogic( J40 & XE60 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J30.0ETA49_XE50').setLogic( J300ETA49 & XE50 & physcond).setTriggerType(TT.calo)
-
-        LVL1MenuItem('L1_3J15.0ETA25_XE40').setLogic( J150ETA25.x(3) & XE40 & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_J40_XE50').setLogic( J40 & XE50 & physcond).setTriggerType(TT.calo)                 # noqa: F821
+        LVL1MenuItem('L1_J40.0ETA25_XE50').setLogic( J400ETA25 & XE50 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J75_XE40').setLogic( J75 & XE40 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J75_XE50').setLogic( J75 & XE50 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_2J15_XE55').setLogic( J15.x(2) & XE55 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_2J40_XE45').setLogic( J40.x(2) & XE45 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_2J50_XE40').setLogic( J50.x(2) & XE50 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J40_XE60').setLogic( J40 & XE60 & physcond).setTriggerType(TT.calo)          # noqa: F821
+        LVL1MenuItem('L1_J30.0ETA49_XE50').setLogic( J300ETA49 & XE50 & physcond).setTriggerType(TT.calo)          # noqa: F821
+
+        LVL1MenuItem('L1_3J15.0ETA25_XE40').setLogic( J150ETA25.x(3) & XE40 & physcond).setTriggerType(TT.calo)    # noqa: F821
         
         # combined em - jet
-        LVL1MenuItem('L1_EM15VH_JJ15.23ETA49' ).setLogic( EM15VH  & JJ1523ETA49  & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_EM15VH_JJ15.23ETA49' ).setLogic( EM15VH  & JJ1523ETA49  & physcond).setTriggerType(TT.calo)    # noqa: F821
         if not '_v6' in TriggerFlags.triggerMenuSetup() and not '_HI' in TriggerFlags.triggerMenuSetup():
-            LVL1MenuItem('L1_EM18VHI_3J20' ).setLogic( EM18VHI  & J20.x(3)  & physcond).setTriggerType(TT.calo)
-            LVL1MenuItem('L1_EM20VH_3J20' ).setLogic( EM20VH  & J20.x(3)  & physcond).setTriggerType(TT.calo)
+            LVL1MenuItem('L1_EM18VHI_3J20' ).setLogic( EM18VHI  & J20.x(3)  & physcond).setTriggerType(TT.calo)    # noqa: F821
+            LVL1MenuItem('L1_EM20VH_3J20' ).setLogic( EM20VH  & J20.x(3)  & physcond).setTriggerType(TT.calo)      # noqa: F821
         else:
-            LVL1MenuItem('L1_EM13VH_3J20' ).setLogic( EM13VH  & J20.x(3)  & physcond).setTriggerType(TT.calo)
+            LVL1MenuItem('L1_EM13VH_3J20' ).setLogic( EM13VH  & J20.x(3)  & physcond).setTriggerType(TT.calo)      # noqa: F821
             ### ATR-15524
-            LVL1MenuItem('L1_EM18VH_3J20' ).setLogic( EM18VH  & J20.x(3)  & physcond).setTriggerType(TT.calo)
+            LVL1MenuItem('L1_EM18VH_3J20' ).setLogic( EM18VH  & J20.x(3)  & physcond).setTriggerType(TT.calo)      # noqa: F821
 
         # combined mu - jet
-        LVL1MenuItem('L1_MU4_J12'   ).setLogic( MU4 & J12    & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_MU6_J20'   ).setLogic( MU6 & J20    & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_MU6_J30.0ETA49_2J20.0ETA49').setLogic( MU6 & J300ETA49 & J200ETA49.x(2) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_MU6_J40'   ).setLogic( MU6 & J40    & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_MU6_J75'   ).setLogic( MU6 & J75    & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_MU4_3J15'  ).setLogic( MU4 & J15.x(3)  & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_MU4_3J20'  ).setLogic( MU4 & J20.x(3)  & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_MU4_J30'   ).setLogic( MU4 & J30    & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_MU4_J50'   ).setLogic( MU4 & J50    & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_MU10_3J20'  ).setLogic( MU10 & J20.x(3)  & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_MU10_2J20'  ).setLogic( MU10 & J20.x(2)  & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_MU10_2J15_J20'  ).setLogic( MU10 & J15.x(2) & J20  & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_MU4_J50_XE40'   ).setLogic( MU4 & J50 & XE40  & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_2MU4_J40_XE20'  ).setLogic( MU4.x(2) & J40 & XE20  & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_MU20_J40'  ).setLogic( MU20 & J40 & physcond).setTriggerType(TT.calo) ## ATR-14377
-        LVL1MenuItem('L1_MU20_XE30' ).setLogic( MU20 & XE30 & physcond) ## ATR-14377
+        LVL1MenuItem('L1_MU4_J12'   ).setLogic( MU4 & J12    & physcond).setTriggerType(TT.calo)       # noqa: F821
+        LVL1MenuItem('L1_MU6_J20'   ).setLogic( MU6 & J20    & physcond).setTriggerType(TT.calo)       # noqa: F821
+        LVL1MenuItem('L1_MU6_J30.0ETA49_2J20.0ETA49').setLogic( MU6 & J300ETA49 & J200ETA49.x(2) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_MU6_J40'   ).setLogic( MU6 & J40    & physcond).setTriggerType(TT.calo)       # noqa: F821
+        LVL1MenuItem('L1_MU6_J75'   ).setLogic( MU6 & J75    & physcond).setTriggerType(TT.calo)       # noqa: F821
+        LVL1MenuItem('L1_MU4_3J15'  ).setLogic( MU4 & J15.x(3)  & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_MU4_3J20'  ).setLogic( MU4 & J20.x(3)  & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_MU4_J30'   ).setLogic( MU4 & J30    & physcond).setTriggerType(TT.calo)       # noqa: F821
+        LVL1MenuItem('L1_MU4_J50'   ).setLogic( MU4 & J50    & physcond).setTriggerType(TT.calo)       # noqa: F821
+        LVL1MenuItem('L1_MU10_3J20'  ).setLogic( MU10 & J20.x(3)  & physcond).setTriggerType(TT.calo)  # noqa: F821
+        LVL1MenuItem('L1_MU10_2J20'  ).setLogic( MU10 & J20.x(2)  & physcond).setTriggerType(TT.calo)  # noqa: F821
+        LVL1MenuItem('L1_MU10_2J15_J20'  ).setLogic( MU10 & J15.x(2) & J20  & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_MU4_J50_XE40'   ).setLogic( MU4 & J50 & XE40  & physcond).setTriggerType(TT.calo)         # noqa: F821
+        LVL1MenuItem('L1_2MU4_J40_XE20'  ).setLogic( MU4.x(2) & J40 & XE20  & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_MU20_J40'  ).setLogic( MU20 & J40 & physcond).setTriggerType(TT.calo) ## ATR-14377 # noqa: F821
+        LVL1MenuItem('L1_MU20_XE30' ).setLogic( MU20 & XE30 & physcond) ## ATR-14377                        # noqa: F821
         # HI
-        LVL1MenuItem('L1_J15_NZ' ).setLogic( J15      & Not(ZDC_AND) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_2J15_NZ').setLogic( J15.x(2) & Not(ZDC_AND) & physcond).setTriggerType(TT.calo)   
+        LVL1MenuItem('L1_J15_NZ' ).setLogic( J15      & Not(ZDC_AND) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_2J15_NZ').setLogic( J15.x(2) & Not(ZDC_AND) & physcond).setTriggerType(TT.calo)    # noqa: F821
 
-        LVL1MenuItem('L1_J15_NL' ).setLogic( J15      & Not(LUCID_A) & Not(LUCID_C) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_2J15_NL').setLogic( J15.x(2) & Not(LUCID_A) & Not(LUCID_C) & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_J15_NL' ).setLogic( J15      & Not(LUCID_A) & Not(LUCID_C) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_2J15_NL').setLogic( J15.x(2) & Not(LUCID_A) & Not(LUCID_C) & physcond).setTriggerType(TT.calo)    # noqa: F821
         
         # XE
-        LVL1MenuItem('L1_XE35').setLogic( XE35 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE40').setLogic( XE40 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE45').setLogic( XE45 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE50').setLogic( XE50 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE55').setLogic( XE55 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE60').setLogic( XE60 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE70').setLogic( XE70 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE80').setLogic( XE80 & physcond).setTriggerType(TT.calo)
-
-
-        LVL1MenuItem('L1_XE10').setLogic( XE10 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE20').setLogic( XE20 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE25').setLogic( XE25 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE30').setLogic( XE30 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE65').setLogic( XE65 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE75').setLogic( XE75 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE150').setLogic( XE150 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE300').setLogic( XE300 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE35_BGRP7').setLogic( XE35 & bgrp7cond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE40_BGRP7').setLogic( XE40 & bgrp7cond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE45_BGRP7').setLogic( XE45 & bgrp7cond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE50_BGRP7').setLogic( XE50 & bgrp7cond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE55_BGRP7').setLogic( XE55 & bgrp7cond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE60_BGRP7').setLogic( XE60 & bgrp7cond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE70_BGRP7').setLogic( XE70 & bgrp7cond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE80_BGRP7').setLogic( XE80 & bgrp7cond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_XE35').setLogic( XE35 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE40').setLogic( XE40 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE45').setLogic( XE45 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE50').setLogic( XE50 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE55').setLogic( XE55 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE60').setLogic( XE60 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE70').setLogic( XE70 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE80').setLogic( XE80 & physcond).setTriggerType(TT.calo)    # noqa: F821
+
+
+        LVL1MenuItem('L1_XE10').setLogic( XE10 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE20').setLogic( XE20 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE25').setLogic( XE25 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE30').setLogic( XE30 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE65').setLogic( XE65 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE75').setLogic( XE75 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE150').setLogic( XE150 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE300').setLogic( XE300 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE35_BGRP7').setLogic( XE35 & bgrp7cond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE40_BGRP7').setLogic( XE40 & bgrp7cond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE45_BGRP7').setLogic( XE45 & bgrp7cond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE50_BGRP7').setLogic( XE50 & bgrp7cond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE55_BGRP7').setLogic( XE55 & bgrp7cond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE60_BGRP7').setLogic( XE60 & bgrp7cond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE70_BGRP7').setLogic( XE70 & bgrp7cond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE80_BGRP7').setLogic( XE80 & bgrp7cond).setTriggerType(TT.calo)    # noqa: F821
         # XS
-        LVL1MenuItem('L1_XS20').setLogic( XS20.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XS30').setLogic( XS30.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XS40').setLogic( XS40.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XS45').setLogic( XS45.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XS50').setLogic( XS50.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XS55').setLogic( XS55.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XS60').setLogic( XS60.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XS65').setLogic( XS65.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_EM10_XS20').setLogic( EM10 & XS20.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_EM12_XS20').setLogic( EM12 & XS20.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_EM15_XS30').setLogic( EM15 & XS30.x(1) & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_XS20').setLogic( XS20.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XS30').setLogic( XS30.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XS40').setLogic( XS40.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XS45').setLogic( XS45.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XS50').setLogic( XS50.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XS55').setLogic( XS55.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XS60').setLogic( XS60.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XS65').setLogic( XS65.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_EM10_XS20').setLogic( EM10 & XS20.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_EM12_XS20').setLogic( EM12 & XS20.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_EM15_XS30').setLogic( EM15 & XS30.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
         
         # TE
-        LVL1MenuItem('L1_TE0' ).setLogic( TE0  & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE3' ).setLogic( TE3  & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE5' ).setLogic( TE5  & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE10').setLogic( TE10 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE15').setLogic( TE15 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE20').setLogic( TE20 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE25').setLogic( TE25 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE30').setLogic( TE30 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE40').setLogic( TE40 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE45').setLogic( TE45 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE50').setLogic( TE50 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE55').setLogic( TE55 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE60').setLogic( TE60 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE65').setLogic( TE65 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE70').setLogic( TE70 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE90').setLogic( TE90 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE100').setLogic( TE100 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE120').setLogic( TE120 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE140').setLogic( TE140 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE160').setLogic( TE160 & physcond).setTriggerType(TT.calo)        
-        LVL1MenuItem('L1_TE200').setLogic( TE200 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE280').setLogic( TE280 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE300').setLogic( TE300 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE360').setLogic( TE360 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE2000').setLogic( TE2000 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE4000').setLogic( TE4000 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE10000').setLogic( TE10000 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE12000').setLogic( TE12000 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE14000').setLogic( TE14000 & physcond).setTriggerType(TT.calo)
-
-        LVL1MenuItem('L1_TE0.0ETA24').setLogic( TE00ETA24 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE3.0ETA24').setLogic( TE30ETA24 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE5.0ETA24').setLogic( TE50ETA24 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE10.0ETA24').setLogic( TE100ETA24 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE15.0ETA24').setLogic( TE150ETA24 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE20.0ETA24').setLogic( TE200ETA24 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE25.0ETA24').setLogic( TE250ETA24 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE30.0ETA24').setLogic( TE300ETA24 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE35.0ETA24').setLogic( TE350ETA24 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE40.0ETA24').setLogic( TE400ETA24 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE45.0ETA24').setLogic( TE450ETA24 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE50.0ETA24').setLogic( TE500ETA24 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE55.0ETA24').setLogic( TE550ETA24 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE60.0ETA24').setLogic( TE600ETA24 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE65.0ETA24').setLogic( TE650ETA24 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE70.0ETA24').setLogic( TE700ETA24 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE80.0ETA24').setLogic( TE800ETA24 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE110.0ETA24').setLogic( TE1100ETA24 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE150.0ETA24').setLogic( TE1500ETA24 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE180.0ETA24').setLogic( TE1800ETA24 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE2000.0ETA24').setLogic( TE20000ETA24 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE5000.0ETA24').setLogic( TE20000ETA24 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE6500.0ETA24').setLogic( TE20000ETA24 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE8000.0ETA24').setLogic( TE20000ETA24 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE9000.0ETA24').setLogic( TE20000ETA24 & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_TE0' ).setLogic( TE0  & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE3' ).setLogic( TE3  & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE5' ).setLogic( TE5  & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE10').setLogic( TE10 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE15').setLogic( TE15 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE20').setLogic( TE20 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE25').setLogic( TE25 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE30').setLogic( TE30 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE40').setLogic( TE40 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE45').setLogic( TE45 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE50').setLogic( TE50 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE55').setLogic( TE55 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE60').setLogic( TE60 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE65').setLogic( TE65 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE70').setLogic( TE70 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE90').setLogic( TE90 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE100').setLogic( TE100 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE120').setLogic( TE120 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE140').setLogic( TE140 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE160').setLogic( TE160 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE200').setLogic( TE200 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE280').setLogic( TE280 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE300').setLogic( TE300 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE360').setLogic( TE360 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE2000').setLogic( TE2000 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE4000').setLogic( TE4000 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE10000').setLogic( TE10000 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE12000').setLogic( TE12000 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE14000').setLogic( TE14000 & physcond).setTriggerType(TT.calo)    # noqa: F821
+
+        LVL1MenuItem('L1_TE0.0ETA24').setLogic( TE00ETA24 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE3.0ETA24').setLogic( TE30ETA24 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE5.0ETA24').setLogic( TE50ETA24 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE10.0ETA24').setLogic( TE100ETA24 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE15.0ETA24').setLogic( TE150ETA24 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE20.0ETA24').setLogic( TE200ETA24 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE25.0ETA24').setLogic( TE250ETA24 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE30.0ETA24').setLogic( TE300ETA24 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE35.0ETA24').setLogic( TE350ETA24 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE40.0ETA24').setLogic( TE400ETA24 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE45.0ETA24').setLogic( TE450ETA24 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE50.0ETA24').setLogic( TE500ETA24 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE55.0ETA24').setLogic( TE550ETA24 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE60.0ETA24').setLogic( TE600ETA24 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE65.0ETA24').setLogic( TE650ETA24 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE70.0ETA24').setLogic( TE700ETA24 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE80.0ETA24').setLogic( TE800ETA24 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE110.0ETA24').setLogic( TE1100ETA24 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE150.0ETA24').setLogic( TE1500ETA24 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE180.0ETA24').setLogic( TE1800ETA24 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE2000.0ETA24').setLogic( TE20000ETA24 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE5000.0ETA24').setLogic( TE20000ETA24 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE6500.0ETA24').setLogic( TE20000ETA24 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE8000.0ETA24').setLogic( TE20000ETA24 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE9000.0ETA24').setLogic( TE20000ETA24 & physcond).setTriggerType(TT.calo)    # noqa: F821
 
   # HI items
-        LVL1MenuItem('L1_TE500.0ETA49').setLogic( TE5000ETA49 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE1500.0ETA49').setLogic( TE15000ETA49 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE3000.0ETA49').setLogic( TE30000ETA49 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE3500.0ETA49').setLogic( TE35000ETA49 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE5000.0ETA49').setLogic( TE50000ETA49 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE6500.0ETA49').setLogic( TE65000ETA49 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE8000.0ETA49').setLogic( TE80000ETA49 & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE9000.0ETA49').setLogic( TE90000ETA49 & physcond).setTriggerType(TT.calo)
-
-        LVL1MenuItem('L1_TE500.0ETA49_OVERLAY').setLogic( TE5000ETA49 & physcond).setTriggerType(TT.zerobs)
-        LVL1MenuItem('L1_TE1500.0ETA49_OVERLAY').setLogic( TE15000ETA49 & physcond).setTriggerType(TT.zerobs)
-        LVL1MenuItem('L1_TE3000.0ETA49_OVERLAY').setLogic( TE30000ETA49 & physcond).setTriggerType(TT.zerobs)
-        LVL1MenuItem('L1_TE3500.0ETA49_OVERLAY').setLogic( TE35000ETA49 & physcond).setTriggerType(TT.zerobs)
-        LVL1MenuItem('L1_TE5000.0ETA49_OVERLAY').setLogic( TE50000ETA49 & physcond).setTriggerType(TT.zerobs)
-        LVL1MenuItem('L1_TE6500.0ETA49_OVERLAY').setLogic( TE65000ETA49 & physcond).setTriggerType(TT.zerobs)
-        LVL1MenuItem('L1_TE8000.0ETA49_OVERLAY').setLogic( TE80000ETA49 & physcond).setTriggerType(TT.zerobs)
-        LVL1MenuItem('L1_TE9000.0ETA49_OVERLAY').setLogic( TE90000ETA49 & physcond).setTriggerType(TT.zerobs)
-
-        LVL1MenuItem('L1_TE5_NZ').setLogic( TE5 & Not(ZDC_AND) & physcond).setTriggerType(TT.calo) 
+        LVL1MenuItem('L1_TE500.0ETA49').setLogic( TE5000ETA49 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE1500.0ETA49').setLogic( TE15000ETA49 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE3000.0ETA49').setLogic( TE30000ETA49 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE3500.0ETA49').setLogic( TE35000ETA49 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE5000.0ETA49').setLogic( TE50000ETA49 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE6500.0ETA49').setLogic( TE65000ETA49 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE8000.0ETA49').setLogic( TE80000ETA49 & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE9000.0ETA49').setLogic( TE90000ETA49 & physcond).setTriggerType(TT.calo)    # noqa: F821
+
+        LVL1MenuItem('L1_TE500.0ETA49_OVERLAY').setLogic( TE5000ETA49 & physcond).setTriggerType(TT.zerobs)   # noqa: F821
+        LVL1MenuItem('L1_TE1500.0ETA49_OVERLAY').setLogic( TE15000ETA49 & physcond).setTriggerType(TT.zerobs) # noqa: F821
+        LVL1MenuItem('L1_TE3000.0ETA49_OVERLAY').setLogic( TE30000ETA49 & physcond).setTriggerType(TT.zerobs) # noqa: F821
+        LVL1MenuItem('L1_TE3500.0ETA49_OVERLAY').setLogic( TE35000ETA49 & physcond).setTriggerType(TT.zerobs) # noqa: F821
+        LVL1MenuItem('L1_TE5000.0ETA49_OVERLAY').setLogic( TE50000ETA49 & physcond).setTriggerType(TT.zerobs) # noqa: F821
+        LVL1MenuItem('L1_TE6500.0ETA49_OVERLAY').setLogic( TE65000ETA49 & physcond).setTriggerType(TT.zerobs) # noqa: F821
+        LVL1MenuItem('L1_TE8000.0ETA49_OVERLAY').setLogic( TE80000ETA49 & physcond).setTriggerType(TT.zerobs) # noqa: F821
+        LVL1MenuItem('L1_TE9000.0ETA49_OVERLAY').setLogic( TE90000ETA49 & physcond).setTriggerType(TT.zerobs) # noqa: F821
+
+        LVL1MenuItem('L1_TE5_NZ').setLogic( TE5 & Not(ZDC_AND) & physcond).setTriggerType(TT.calo) # noqa: F821
         
         # MBTS
-        MBTS_1   = MBTS_A | MBTS_C
-        MBTS_2   = (MBTS_A.x(2) | MBTS_C.x(2) | MBTS_A) & (MBTS_A.x(2) | MBTS_C.x(2) | MBTS_C)
-        MBTS_1_1 = MBTS_A & MBTS_C
-        MBTS_2_2 = MBTS_A.x(2) & MBTS_C.x(2)
-        MBTS_2_A = MBTS_A.x(2)
-        MBTS_2_C = MBTS_C.x(2)
-        MBTS_3_3 = MBTS_A.x(3) & MBTS_C.x(3)
-        MBTS_4_4 = MBTS_A.x(4) & MBTS_C.x(4)
-        MBTS_4_A = MBTS_A.x(4)
-        MBTS_4_C = MBTS_C.x(4)
-
-
-        LVL1MenuItem('L1_MBTS_1'             ).setLogic( MBTS_1   & physcond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_1_OVERLAY'     ).setLogic( MBTS_1   & physcond ).setTriggerType(TT.zerobs)
-        LVL1MenuItem('L1_MBTS_2'             ).setLogic( MBTS_2   & physcond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_1_1'           ).setLogic( MBTS_1_1 & physcond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_1_1_OVERLAY'     ).setLogic( MBTS_1_1   & physcond ).setTriggerType(TT.zerobs)
-        LVL1MenuItem('L1_MBTS_2_2'           ).setLogic( MBTS_2_2 & physcond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_2_A'           ).setLogic( MBTS_2_A & physcond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_2_C'           ).setLogic( MBTS_2_C & physcond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_3_3'           ).setLogic( MBTS_3_3 & physcond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_4_4'           ).setLogic( MBTS_4_4 & physcond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_4_A'           ).setLogic( MBTS_4_A & physcond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_4_C'           ).setLogic( MBTS_4_C & physcond ).setTriggerType(TT.minb)
-
-
-        LVL1MenuItem('L1_MBTS_1_UNPAIRED_ISO'  ).setLogic( MBTS_1   & unpaired_isocond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_2_UNPAIRED_ISO'  ).setLogic( MBTS_2   & unpaired_isocond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_1_1_UNPAIRED_ISO').setLogic( MBTS_1_1 & unpaired_isocond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_2_2_UNPAIRED_ISO').setLogic( MBTS_2_2 & unpaired_isocond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_3_3_UNPAIRED_ISO').setLogic( MBTS_3_3 & unpaired_isocond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_4_4_UNPAIRED_ISO').setLogic( MBTS_3_3 & unpaired_isocond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_1_UNPAIRED_NONISO').setLogic( MBTS_1 & unpaired_nonisocond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_2_UNPAIRED_NONISO').setLogic( MBTS_2 & unpaired_nonisocond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_4_A_UNPAIRED_ISO' ).setLogic( MBTS_4_A & unpaired_isocond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_4_C_UNPAIRED_ISO' ).setLogic( MBTS_4_C & unpaired_isocond ).setTriggerType(TT.minb)
-
-        LVL1MenuItem('L1_MBTS_1_EMPTY'       ).setLogic( MBTS_1   & cosmiccond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_2_EMPTY'       ).setLogic( MBTS_2   & cosmiccond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_1_1_EMPTY'     ).setLogic( MBTS_1_1 & cosmiccond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_2_2_EMPTY'     ).setLogic( MBTS_2_2 & cosmiccond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_3_3_EMPTY'     ).setLogic( MBTS_3_3 & cosmiccond ).setTriggerType(TT.minb)
-
-        LVL1MenuItem('L1_MBTS_1_1_VTE50'     ).setLogic( MBTS_1_1  & Not(TE50) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_2_2_VTE50'     ).setLogic( MBTS_2_2  & Not(TE50) & physcond).setTriggerType(TT.minb)
-
-        LVL1MenuItem('L1_MBTSA0' ).setLogic( MBTS_A0 & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSA1' ).setLogic( MBTS_A1 & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSA2' ).setLogic( MBTS_A2 & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSA3' ).setLogic( MBTS_A3 & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSA4' ).setLogic( MBTS_A4 & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSA5' ).setLogic( MBTS_A5 & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSA6' ).setLogic( MBTS_A6 & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSA7' ).setLogic( MBTS_A7 & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSA8' ).setLogic( MBTS_A8 & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSA10').setLogic( MBTS_A10 & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSA12').setLogic( MBTS_A12 & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSA14').setLogic( MBTS_A14 & physcond).setTriggerType(TT.minb)
+        MBTS_1   = MBTS_A | MBTS_C                                                                 # noqa: F821
+        MBTS_2   = (MBTS_A.x(2) | MBTS_C.x(2) | MBTS_A) & (MBTS_A.x(2) | MBTS_C.x(2) | MBTS_C)     # noqa: F821
+        MBTS_1_1 = MBTS_A & MBTS_C                                                                 # noqa: F821
+        MBTS_2_2 = MBTS_A.x(2) & MBTS_C.x(2)                                                       # noqa: F821
+        MBTS_2_A = MBTS_A.x(2)                                                                     # noqa: F821
+        MBTS_2_C = MBTS_C.x(2)                                                                     # noqa: F821
+        MBTS_3_3 = MBTS_A.x(3) & MBTS_C.x(3)                                                       # noqa: F821
+        MBTS_4_4 = MBTS_A.x(4) & MBTS_C.x(4)                                                       # noqa: F821
+        MBTS_4_A = MBTS_A.x(4)                                                                     # noqa: F821
+        MBTS_4_C = MBTS_C.x(4)                                                                     # noqa: F821
+
+
+        LVL1MenuItem('L1_MBTS_1'             ).setLogic( MBTS_1   & physcond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_1_OVERLAY'     ).setLogic( MBTS_1   & physcond ).setTriggerType(TT.zerobs)  # noqa: F821
+        LVL1MenuItem('L1_MBTS_2'             ).setLogic( MBTS_2   & physcond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_1_1'           ).setLogic( MBTS_1_1 & physcond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_1_1_OVERLAY'     ).setLogic( MBTS_1_1   & physcond ).setTriggerType(TT.zerobs) # noqa: F821
+        LVL1MenuItem('L1_MBTS_2_2'           ).setLogic( MBTS_2_2 & physcond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_2_A'           ).setLogic( MBTS_2_A & physcond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_2_C'           ).setLogic( MBTS_2_C & physcond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_3_3'           ).setLogic( MBTS_3_3 & physcond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_4_4'           ).setLogic( MBTS_4_4 & physcond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_4_A'           ).setLogic( MBTS_4_A & physcond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_4_C'           ).setLogic( MBTS_4_C & physcond ).setTriggerType(TT.minb)    # noqa: F821
+
+
+        LVL1MenuItem('L1_MBTS_1_UNPAIRED_ISO'  ).setLogic( MBTS_1   & unpaired_isocond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_2_UNPAIRED_ISO'  ).setLogic( MBTS_2   & unpaired_isocond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_1_1_UNPAIRED_ISO').setLogic( MBTS_1_1 & unpaired_isocond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_2_2_UNPAIRED_ISO').setLogic( MBTS_2_2 & unpaired_isocond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_3_3_UNPAIRED_ISO').setLogic( MBTS_3_3 & unpaired_isocond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_4_4_UNPAIRED_ISO').setLogic( MBTS_3_3 & unpaired_isocond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_1_UNPAIRED_NONISO').setLogic( MBTS_1 & unpaired_nonisocond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_2_UNPAIRED_NONISO').setLogic( MBTS_2 & unpaired_nonisocond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_4_A_UNPAIRED_ISO' ).setLogic( MBTS_4_A & unpaired_isocond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_4_C_UNPAIRED_ISO' ).setLogic( MBTS_4_C & unpaired_isocond ).setTriggerType(TT.minb)    # noqa: F821
+
+        LVL1MenuItem('L1_MBTS_1_EMPTY'       ).setLogic( MBTS_1   & cosmiccond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_2_EMPTY'       ).setLogic( MBTS_2   & cosmiccond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_1_1_EMPTY'     ).setLogic( MBTS_1_1 & cosmiccond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_2_2_EMPTY'     ).setLogic( MBTS_2_2 & cosmiccond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_3_3_EMPTY'     ).setLogic( MBTS_3_3 & cosmiccond ).setTriggerType(TT.minb)    # noqa: F821
+
+        LVL1MenuItem('L1_MBTS_1_1_VTE50'     ).setLogic( MBTS_1_1  & Not(TE50) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_2_2_VTE50'     ).setLogic( MBTS_2_2  & Not(TE50) & physcond).setTriggerType(TT.minb)    # noqa: F821
+
+        LVL1MenuItem('L1_MBTSA0' ).setLogic( MBTS_A0 & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSA1' ).setLogic( MBTS_A1 & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSA2' ).setLogic( MBTS_A2 & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSA3' ).setLogic( MBTS_A3 & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSA4' ).setLogic( MBTS_A4 & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSA5' ).setLogic( MBTS_A5 & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSA6' ).setLogic( MBTS_A6 & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSA7' ).setLogic( MBTS_A7 & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSA8' ).setLogic( MBTS_A8 & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSA10').setLogic( MBTS_A10 & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSA12').setLogic( MBTS_A12 & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSA14').setLogic( MBTS_A14 & physcond).setTriggerType(TT.minb)    # noqa: F821
         # L1_MBTSA/C 9, 11, 13, 15 are removed in Run 2
 
-        LVL1MenuItem('L1_MBTSC0' ).setLogic( MBTS_C0 & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSC1' ).setLogic( MBTS_C1 & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSC2' ).setLogic( MBTS_C2 & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSC3' ).setLogic( MBTS_C3 & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSC4' ).setLogic( MBTS_C4 & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSC5' ).setLogic( MBTS_C5 & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSC6' ).setLogic( MBTS_C6 & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSC7' ).setLogic( MBTS_C7 & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSC8' ).setLogic( MBTS_C8 & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSC10').setLogic( MBTS_C10 & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSC12').setLogic( MBTS_C12 & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSC14').setLogic( MBTS_C14 & physcond).setTriggerType(TT.minb)
+        LVL1MenuItem('L1_MBTSC0' ).setLogic( MBTS_C0 & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSC1' ).setLogic( MBTS_C1 & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSC2' ).setLogic( MBTS_C2 & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSC3' ).setLogic( MBTS_C3 & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSC4' ).setLogic( MBTS_C4 & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSC5' ).setLogic( MBTS_C5 & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSC6' ).setLogic( MBTS_C6 & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSC7' ).setLogic( MBTS_C7 & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSC8' ).setLogic( MBTS_C8 & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSC10').setLogic( MBTS_C10 & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSC12').setLogic( MBTS_C12 & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSC14').setLogic( MBTS_C14 & physcond).setTriggerType(TT.minb)    # noqa: F821
         
-        LVL1MenuItem('L1_MBTS_1_BGRP9'    ).setLogic( MBTS_1 & bgrp9cond ).setTriggerType(TT.minb) 
-        LVL1MenuItem('L1_MBTS_1_1_BGRP9'  ).setLogic( MBTS_1_1 & bgrp9cond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_2_BGRP9'    ).setLogic( MBTS_2 & bgrp9cond ).setTriggerType(TT.minb)
+        LVL1MenuItem('L1_MBTS_1_BGRP9'    ).setLogic( MBTS_1 & bgrp9cond ).setTriggerType(TT.minb)      # noqa: F821
+        LVL1MenuItem('L1_MBTS_1_1_BGRP9'  ).setLogic( MBTS_1_1 & bgrp9cond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_2_BGRP9'    ).setLogic( MBTS_2 & bgrp9cond ).setTriggerType(TT.minb)      # noqa: F821
         
-        LVL1MenuItem('L1_MBTS_1_BGRP11'   ).setLogic( MBTS_1 & bgrp11cond ).setTriggerType(TT.minb) 
-        LVL1MenuItem('L1_MBTS_1_1_BGRP11' ).setLogic( MBTS_1_1 & bgrp11cond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_2_BGRP11'   ).setLogic( MBTS_2 & bgrp11cond ).setTriggerType(TT.minb) 
+        LVL1MenuItem('L1_MBTS_1_BGRP11'   ).setLogic( MBTS_1 & bgrp11cond ).setTriggerType(TT.minb)     # noqa: F821
+        LVL1MenuItem('L1_MBTS_1_1_BGRP11' ).setLogic( MBTS_1_1 & bgrp11cond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_2_BGRP11'   ).setLogic( MBTS_2 & bgrp11cond ).setTriggerType(TT.minb)     # noqa: F821
 
 
         # ZDC
-        ZDC_A_C = ZDC_A & ZDC_C
-        VZDC_A_C = Not(ZDC_A) & Not(ZDC_C)
-        LVL1MenuItem('L1_ZDC'               ).setLogic((ZDC_A | ZDC_C) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_A'             ).setLogic( ZDC_A & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_C'             ).setLogic( ZDC_C & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_AND'           ).setLogic( ZDC_AND & physcond).setTriggerType(TT.minb) 
-        LVL1MenuItem('L1_ZDC_A_C'           ).setLogic( ZDC_A_C & physcond).setTriggerType(TT.minb)
-
-        LVL1MenuItem('L1_ZDC_A_C_OVERLAY'   ).setLogic( ZDC_A_C & physcond).setTriggerType(TT.zerobs)
-        LVL1MenuItem('L1_ZDC_A_OVERLAY'   ).setLogic( ZDC_A & physcond).setTriggerType(TT.zerobs)
-        LVL1MenuItem('L1_ZDC_C_OVERLAY'   ).setLogic( ZDC_C & physcond).setTriggerType(TT.zerobs)
-        LVL1MenuItem('L1_ZDC_A_C_VTE50_OVERLAY'     ).setLogic( ZDC_A_C & Not(TE50) & physcond).setTriggerType(TT.zerobs)     
-        LVL1MenuItem('L1_TE5_OVERLAY'   ).setLogic( TE5 & physcond).setTriggerType(TT.zerobs)
-        LVL1MenuItem('L1_TE10_OVERLAY'   ).setLogic( TE10 & physcond).setTriggerType(TT.zerobs)
-        LVL1MenuItem('L1_TE20_OVERLAY'   ).setLogic( TE20 & physcond).setTriggerType(TT.zerobs)
-        LVL1MenuItem('L1_TE50_OVERLAY'   ).setLogic( TE50 & physcond).setTriggerType(TT.zerobs)
-
-        LVL1MenuItem('L1_ZDC_VTE200'        ).setLogic((ZDC_A | ZDC_C) & Not(TE200) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_AND_VTE50'     ).setLogic( ZDC_AND & Not(TE50) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_A_C_VTE50'     ).setLogic( ZDC_A_C & Not(TE50) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_A_C_TE50'      ).setLogic( ZDC_A_C & TE50 & physcond).setTriggerType(TT.minb)
+        ZDC_A_C = ZDC_A & ZDC_C                     # noqa: F821
+        VZDC_A_C = Not(ZDC_A) & Not(ZDC_C)          # noqa: F821
+        LVL1MenuItem('L1_ZDC'               ).setLogic((ZDC_A | ZDC_C) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_A'             ).setLogic( ZDC_A & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_C'             ).setLogic( ZDC_C & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_AND'           ).setLogic( ZDC_AND & physcond).setTriggerType(TT.minb)  # noqa: F821
+        LVL1MenuItem('L1_ZDC_A_C'           ).setLogic( ZDC_A_C & physcond).setTriggerType(TT.minb)  # noqa: F821
+
+        LVL1MenuItem('L1_ZDC_A_C_OVERLAY'   ).setLogic( ZDC_A_C & physcond).setTriggerType(TT.zerobs)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_A_OVERLAY'   ).setLogic( ZDC_A & physcond).setTriggerType(TT.zerobs)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_C_OVERLAY'   ).setLogic( ZDC_C & physcond).setTriggerType(TT.zerobs)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_A_C_VTE50_OVERLAY'     ).setLogic( ZDC_A_C & Not(TE50) & physcond).setTriggerType(TT.zerobs)  # noqa: F821 
+        LVL1MenuItem('L1_TE5_OVERLAY'   ).setLogic( TE5 & physcond).setTriggerType(TT.zerobs)      # noqa: F821
+        LVL1MenuItem('L1_TE10_OVERLAY'   ).setLogic( TE10 & physcond).setTriggerType(TT.zerobs)    # noqa: F821
+        LVL1MenuItem('L1_TE20_OVERLAY'   ).setLogic( TE20 & physcond).setTriggerType(TT.zerobs)    # noqa: F821
+        LVL1MenuItem('L1_TE50_OVERLAY'   ).setLogic( TE50 & physcond).setTriggerType(TT.zerobs)    # noqa: F821
+
+        LVL1MenuItem('L1_ZDC_VTE200'        ).setLogic((ZDC_A | ZDC_C) & Not(TE200) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_AND_VTE50'     ).setLogic( ZDC_AND & Not(TE50) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_A_C_VTE50'     ).setLogic( ZDC_A_C & Not(TE50) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_A_C_TE50'      ).setLogic( ZDC_A_C & TE50 & physcond).setTriggerType(TT.minb)    # noqa: F821
         
-        LVL1MenuItem('L1_ZDC_A_VTE20'      ).setLogic( ZDC_A & Not(TE20) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_C_VTE20'      ).setLogic( ZDC_C & Not(TE20) & physcond).setTriggerType(TT.minb)
+        LVL1MenuItem('L1_ZDC_A_VTE20'      ).setLogic( ZDC_A & Not(TE20) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_C_VTE20'      ).setLogic( ZDC_C & Not(TE20) & physcond).setTriggerType(TT.minb)    # noqa: F821
 
-        LVL1MenuItem('L1_ZDC_A_C_VTE200'           ).setLogic( ZDC_A_C & Not(TE200) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_A_C_TE5_VTE200'       ).setLogic( ZDC_A_C & TE5 & Not(TE200) & physcond).setTriggerType(TT.minb)
+        LVL1MenuItem('L1_ZDC_A_C_VTE200'           ).setLogic( ZDC_A_C & Not(TE200) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_A_C_TE5_VTE200'       ).setLogic( ZDC_A_C & TE5 & Not(TE200) & physcond).setTriggerType(TT.minb)    # noqa: F821
 
-        LVL1MenuItem('L1_ZDC_MBTS_1'        ).setLogic((ZDC_A | ZDC_C) & MBTS_1 & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_MBTS_2'        ).setLogic((ZDC_A | ZDC_C) & MBTS_2 & physcond).setTriggerType(TT.minb)
+        LVL1MenuItem('L1_ZDC_MBTS_1'        ).setLogic((ZDC_A | ZDC_C) & MBTS_1 & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_MBTS_2'        ).setLogic((ZDC_A | ZDC_C) & MBTS_2 & physcond).setTriggerType(TT.minb)    # noqa: F821
 
-        LVL1MenuItem('L1_ZDC_MBTS_1_1'      ).setLogic((ZDC_A | ZDC_C) & MBTS_1_1 & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_MBTS_2_2'      ).setLogic((ZDC_A | ZDC_C) & MBTS_2_2 & physcond).setTriggerType(TT.minb)
+        LVL1MenuItem('L1_ZDC_MBTS_1_1'      ).setLogic((ZDC_A | ZDC_C) & MBTS_1_1 & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_MBTS_2_2'      ).setLogic((ZDC_A | ZDC_C) & MBTS_2_2 & physcond).setTriggerType(TT.minb)    # noqa: F821
 
-        LVL1MenuItem('L1_ZDC_EMPTY'           ).setLogic( (ZDC_A | ZDC_C) & cosmiccond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_A_EMPTY'           ).setLogic( ZDC_A & cosmiccond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_C_EMPTY'           ).setLogic( ZDC_C & cosmiccond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_UNPAIRED_ISO'    ).setLogic( (ZDC_A | ZDC_C) & unpaired_isocond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_UNPAIRED_NONISO' ).setLogic( (ZDC_A | ZDC_C) & unpaired_nonisocond ).setTriggerType(TT.minb)
+        LVL1MenuItem('L1_ZDC_EMPTY'           ).setLogic( (ZDC_A | ZDC_C) & cosmiccond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_A_EMPTY'           ).setLogic( ZDC_A & cosmiccond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_C_EMPTY'           ).setLogic( ZDC_C & cosmiccond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_UNPAIRED_ISO'    ).setLogic( (ZDC_A | ZDC_C) & unpaired_isocond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_UNPAIRED_NONISO' ).setLogic( (ZDC_A | ZDC_C) & unpaired_nonisocond ).setTriggerType(TT.minb)    # noqa: F821
 
-        LVL1MenuItem('L1_ZDC_AND_EMPTY'           ).setLogic( ZDC_AND & cosmiccond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_AND_UNPAIRED_ISO'    ).setLogic( ZDC_AND & unpaired_isocond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_AND_UNPAIRED_NONISO' ).setLogic( ZDC_AND & unpaired_nonisocond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_A_UNPAIRED_NONISO' ).setLogic( ZDC_A & unpaired_nonisocond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_C_UNPAIRED_NONISO' ).setLogic( ZDC_C & unpaired_nonisocond ).setTriggerType(TT.minb)
+        LVL1MenuItem('L1_ZDC_AND_EMPTY'           ).setLogic( ZDC_AND & cosmiccond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_AND_UNPAIRED_ISO'    ).setLogic( ZDC_AND & unpaired_isocond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_AND_UNPAIRED_NONISO' ).setLogic( ZDC_AND & unpaired_nonisocond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_A_UNPAIRED_NONISO' ).setLogic( ZDC_A & unpaired_nonisocond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_C_UNPAIRED_NONISO' ).setLogic( ZDC_C & unpaired_nonisocond ).setTriggerType(TT.minb)    # noqa: F821
 
-        LVL1MenuItem('L1_ZDC_A_C_EMPTY'           ).setLogic( ZDC_A_C & cosmiccond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_A_C_UNPAIRED_ISO'    ).setLogic( ZDC_A_C & unpaired_isocond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_A_C_UNPAIRED_NONISO' ).setLogic( ZDC_A_C & unpaired_nonisocond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_A_UNPAIRED_ISO'    ).setLogic( ZDC_A & unpaired_isocond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_C_UNPAIRED_ISO'    ).setLogic( ZDC_C & unpaired_isocond ).setTriggerType(TT.minb)
+        LVL1MenuItem('L1_ZDC_A_C_EMPTY'           ).setLogic( ZDC_A_C & cosmiccond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_A_C_UNPAIRED_ISO'    ).setLogic( ZDC_A_C & unpaired_isocond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_A_C_UNPAIRED_NONISO' ).setLogic( ZDC_A_C & unpaired_nonisocond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_A_UNPAIRED_ISO'    ).setLogic( ZDC_A & unpaired_isocond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_C_UNPAIRED_ISO'    ).setLogic( ZDC_C & unpaired_isocond ).setTriggerType(TT.minb)    # noqa: F821
 
-        LVL1MenuItem('L1_ZDC_A_C_BGRP9'      ).setLogic( ZDC_A_C & bgrp9cond & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_A_BGRP9'      ).setLogic( ZDC_A & bgrp9cond & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_C_BGRP9'      ).setLogic( ZDC_C & bgrp9cond & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_A_C_BGRP11'     ).setLogic( ZDC_A_C & bgrp11cond & physcond).setTriggerType(TT.minb)
+        LVL1MenuItem('L1_ZDC_A_C_BGRP9'      ).setLogic( ZDC_A_C & bgrp9cond & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_A_BGRP9'      ).setLogic( ZDC_A & bgrp9cond & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_C_BGRP9'      ).setLogic( ZDC_C & bgrp9cond & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_A_C_BGRP11'     ).setLogic( ZDC_A_C & bgrp11cond & physcond).setTriggerType(TT.minb)    # noqa: F821
 
   # ATR-12470
-        ZDC_XOR = (ZDC_A & Not(ZDC_C)) | (ZDC_C & Not(ZDC_A))        
-        LVL1MenuItem('L1_ZDC_A_VZDC_C'      ).setLogic(ZDC_A & Not(ZDC_C) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_C_VZDC_A'      ).setLogic(ZDC_C & Not(ZDC_A) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_A_VZDC_C_VTE200'      ).setLogic(ZDC_A & Not(ZDC_C) & Not(TE200) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_C_VZDC_A_VTE200'      ).setLogic(ZDC_C & Not(ZDC_A) & Not(TE200) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_XOR'           ).setLogic(ZDC_XOR  & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_XOR_TE5_VTE200'           ).setLogic(ZDC_XOR  & TE5 & Not(TE200) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_XOR_TRT_VTE200'           ).setLogic(ZDC_XOR  & NIMTRT & Not(TE200) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_XOR_VTE200'               ).setLogic(ZDC_XOR  & Not(TE200) & physcond).setTriggerType(TT.minb)
+        ZDC_XOR = (ZDC_A & Not(ZDC_C)) | (ZDC_C & Not(ZDC_A))            # noqa: F821
+        LVL1MenuItem('L1_ZDC_A_VZDC_C'      ).setLogic(ZDC_A & Not(ZDC_C) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_C_VZDC_A'      ).setLogic(ZDC_C & Not(ZDC_A) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_A_VZDC_C_VTE200'      ).setLogic(ZDC_A & Not(ZDC_C) & Not(TE200) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_C_VZDC_A_VTE200'      ).setLogic(ZDC_C & Not(ZDC_A) & Not(TE200) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_XOR'           ).setLogic(ZDC_XOR  & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_XOR_TE5_VTE200'           ).setLogic(ZDC_XOR  & TE5 & Not(TE200) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_XOR_TRT_VTE200'           ).setLogic(ZDC_XOR  & NIMTRT & Not(TE200) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_XOR_VTE200'               ).setLogic(ZDC_XOR  & Not(TE200) & physcond).setTriggerType(TT.minb)    # noqa: F821
 
         # ATR-14967
-        LVL1MenuItem('L1_EM3_VZDC_A'               ).setLogic( EM3 & Not(ZDC_A) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_EM3_VZDC_C'               ).setLogic( EM3 & Not(ZDC_C) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_2EM3_VZDC_A'               ).setLogic( EM3.x(2) & Not(ZDC_A) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_2EM3_VZDC_C'               ).setLogic( EM3.x(2) & Not(ZDC_C) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_EM5_VZDC_A'               ).setLogic( EM5 & Not(ZDC_A) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_EM5_VZDC_C'               ).setLogic( EM5 & Not(ZDC_C) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_TE5_VZDC_A'               ).setLogic( TE5 & Not(ZDC_A) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_TE5_VZDC_C'               ).setLogic( TE5 & Not(ZDC_C) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_TE10_VZDC_A'               ).setLogic( TE10 & Not(ZDC_A) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_TE10_VZDC_C'               ).setLogic( TE10 & Not(ZDC_C) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_TE20_VZDC_A'               ).setLogic( TE20 & Not(ZDC_A) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_TE20_VZDC_C'               ).setLogic( TE20 & Not(ZDC_C) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_VTE10_VZDC_A'               ).setLogic( Not(TE10) & Not(ZDC_A) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_VTE10_VZDC_C'               ).setLogic( Not(TE10) & Not(ZDC_C) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_J5_VZDC_A'               ).setLogic( J5 & Not(ZDC_A) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_J5_VZDC_C'               ).setLogic( J5 & Not(ZDC_C) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_J10_VZDC_A'               ).setLogic( J10 & Not(ZDC_A) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_J10_VZDC_C'               ).setLogic( J10 & Not(ZDC_C) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_J15_VZDC_A'               ).setLogic( J15 & Not(ZDC_A) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_J15_VZDC_C'               ).setLogic( J15 & Not(ZDC_C) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_J20_VZDC_A'               ).setLogic( J20 & Not(ZDC_A) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_J20_VZDC_C'               ).setLogic( J20 & Not(ZDC_C) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MU4_VZDC_A'               ).setLogic( MU4 & Not(ZDC_A) & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU4_VZDC_C'               ).setLogic( MU4 & Not(ZDC_C) & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_2MU4_VZDC_A'               ).setLogic( MU4.x(2) & Not(ZDC_A) & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_2MU4_VZDC_C'               ).setLogic( MU4.x(2) & Not(ZDC_C) & physcond).setTriggerType(TT.muon)
-
-        LVL1MenuItem('L1_MU4_VTE10_VZDC_A').setLogic( MU4      & Not(TE10) & Not(ZDC_A) & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU4_VTE10_VZDC_C').setLogic( MU4      & Not(TE10) & Not(ZDC_C) & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_2MU4_VTE10_VZDC_A').setLogic( MU4.x(2)      & Not(TE10) & Not(ZDC_A) & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_2MU4_VTE10_VZDC_C').setLogic( MU4.x(2)      & Not(TE10) & Not(ZDC_C) & physcond).setTriggerType(TT.muon)
-
-        LVL1MenuItem('L1_MU4_VZDC_A_C'               ).setLogic( MU4 & VZDC_A_C & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU6_VZDC_A'               ).setLogic( MU6 & Not(ZDC_A) & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU6_VZDC_C'               ).setLogic( MU6 & Not(ZDC_C) & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU6_VTE10_VZDC_A').setLogic( MU6      & Not(TE10) & Not(ZDC_A) & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU6_VTE10_VZDC_C').setLogic( MU6      & Not(TE10) & Not(ZDC_C) & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_MU6_VZDC_A_C'               ).setLogic( MU6 & VZDC_A_C & physcond).setTriggerType(TT.muon)
-        LVL1MenuItem('L1_RD0_FILLED_VZDC_A'               ).setLogic( RNDM0 & Not(ZDC_A) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_RD0_FILLED_VZDC_C'               ).setLogic( RNDM0 & Not(ZDC_C) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_4_C_VZDC_A'               ).setLogic( MBTS_4_C & Not(ZDC_A) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_4_A_VZDC_C'               ).setLogic( MBTS_4_A & Not(ZDC_C) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_2_C_VZDC_A'               ).setLogic( MBTS_2_C & Not(ZDC_A) & physcond).setTriggerType(TT.minb)	
-        LVL1MenuItem('L1_MBTS_2_A_VZDC_C'               ).setLogic( MBTS_2_A & Not(ZDC_C) & physcond).setTriggerType(TT.minb)
+        LVL1MenuItem('L1_EM3_VZDC_A'               ).setLogic( EM3 & Not(ZDC_A) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_EM3_VZDC_C'               ).setLogic( EM3 & Not(ZDC_C) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_2EM3_VZDC_A'               ).setLogic( EM3.x(2) & Not(ZDC_A) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_2EM3_VZDC_C'               ).setLogic( EM3.x(2) & Not(ZDC_C) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_EM5_VZDC_A'               ).setLogic( EM5 & Not(ZDC_A) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_EM5_VZDC_C'               ).setLogic( EM5 & Not(ZDC_C) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_TE5_VZDC_A'               ).setLogic( TE5 & Not(ZDC_A) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_TE5_VZDC_C'               ).setLogic( TE5 & Not(ZDC_C) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_TE10_VZDC_A'               ).setLogic( TE10 & Not(ZDC_A) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_TE10_VZDC_C'               ).setLogic( TE10 & Not(ZDC_C) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_TE20_VZDC_A'               ).setLogic( TE20 & Not(ZDC_A) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_TE20_VZDC_C'               ).setLogic( TE20 & Not(ZDC_C) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_VTE10_VZDC_A'               ).setLogic( Not(TE10) & Not(ZDC_A) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_VTE10_VZDC_C'               ).setLogic( Not(TE10) & Not(ZDC_C) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_J5_VZDC_A'               ).setLogic( J5 & Not(ZDC_A) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_J5_VZDC_C'               ).setLogic( J5 & Not(ZDC_C) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_J10_VZDC_A'               ).setLogic( J10 & Not(ZDC_A) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_J10_VZDC_C'               ).setLogic( J10 & Not(ZDC_C) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_J15_VZDC_A'               ).setLogic( J15 & Not(ZDC_A) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_J15_VZDC_C'               ).setLogic( J15 & Not(ZDC_C) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_J20_VZDC_A'               ).setLogic( J20 & Not(ZDC_A) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_J20_VZDC_C'               ).setLogic( J20 & Not(ZDC_C) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MU4_VZDC_A'               ).setLogic( MU4 & Not(ZDC_A) & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU4_VZDC_C'               ).setLogic( MU4 & Not(ZDC_C) & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_2MU4_VZDC_A'               ).setLogic( MU4.x(2) & Not(ZDC_A) & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_2MU4_VZDC_C'               ).setLogic( MU4.x(2) & Not(ZDC_C) & physcond).setTriggerType(TT.muon)    # noqa: F821
+
+        LVL1MenuItem('L1_MU4_VTE10_VZDC_A').setLogic( MU4      & Not(TE10) & Not(ZDC_A) & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU4_VTE10_VZDC_C').setLogic( MU4      & Not(TE10) & Not(ZDC_C) & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_2MU4_VTE10_VZDC_A').setLogic( MU4.x(2)      & Not(TE10) & Not(ZDC_A) & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_2MU4_VTE10_VZDC_C').setLogic( MU4.x(2)      & Not(TE10) & Not(ZDC_C) & physcond).setTriggerType(TT.muon)    # noqa: F821
+
+        LVL1MenuItem('L1_MU4_VZDC_A_C'               ).setLogic( MU4 & VZDC_A_C & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU6_VZDC_A'               ).setLogic( MU6 & Not(ZDC_A) & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU6_VZDC_C'               ).setLogic( MU6 & Not(ZDC_C) & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU6_VTE10_VZDC_A').setLogic( MU6      & Not(TE10) & Not(ZDC_A) & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU6_VTE10_VZDC_C').setLogic( MU6      & Not(TE10) & Not(ZDC_C) & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_MU6_VZDC_A_C'               ).setLogic( MU6 & VZDC_A_C & physcond).setTriggerType(TT.muon)    # noqa: F821
+        LVL1MenuItem('L1_RD0_FILLED_VZDC_A'               ).setLogic( RNDM0 & Not(ZDC_A) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_RD0_FILLED_VZDC_C'               ).setLogic( RNDM0 & Not(ZDC_C) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_4_C_VZDC_A'               ).setLogic( MBTS_4_C & Not(ZDC_A) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_4_A_VZDC_C'               ).setLogic( MBTS_4_A & Not(ZDC_C) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_2_C_VZDC_A'               ).setLogic( MBTS_2_C & Not(ZDC_A) & physcond).setTriggerType(TT.minb)	 # noqa: F821
+        LVL1MenuItem('L1_MBTS_2_A_VZDC_C'               ).setLogic( MBTS_2_A & Not(ZDC_C) & physcond).setTriggerType(TT.minb)    # noqa: F821
 
 
 
 
         # VDM
-        LVL1MenuItem('L1_ZDC_A_C_BGRP7'     ).setLogic( ZDC_A_C & bgrp7cond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_LUCID_BGRP7'       ).setLogic( (LUCID_A | LUCID_C) & bgrp7cond).setTriggerType(TT.minb)
+        LVL1MenuItem('L1_ZDC_A_C_BGRP7'     ).setLogic( ZDC_A_C & bgrp7cond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_LUCID_BGRP7'       ).setLogic( (LUCID_A | LUCID_C) & bgrp7cond).setTriggerType(TT.minb)    # noqa: F821
         
         # LUCID
-        #LVL1MenuItem('L1_LUCID_COMM'      ).setLogic( LUCID_COMM        & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_LUCID_A'           ).setLogic( LUCID_A             & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_LUCID_C'           ).setLogic( LUCID_C             & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_LUCID_A_C',        ).setLogic( LUCID_A & LUCID_C   & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_LUCID'             ).setLogic((LUCID_A | LUCID_C)  & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_LUCID_COMM'        ).setLogic( LUCID_COMM          & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_LUCID_COMM_EMPTY'  ).setLogic( LUCID_COMM          & cosmiccond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_LUCID_EMPTY'       ).setLogic((LUCID_A | LUCID_C)  & cosmiccond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_LUCID_A_C_EMPTY'   ).setLogic( LUCID_A & LUCID_C   & cosmiccond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_LUCID_UNPAIRED_ISO').setLogic((LUCID_A | LUCID_C)  & unpaired_isocond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_LUCID_COMM_UNPAIRED_ISO' ).setLogic( LUCID_COMM        & unpaired_isocond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_LUCID_A_C_UNPAIRED_ISO'  ).setLogic( LUCID_A & LUCID_C & unpaired_isocond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_LUCID_A_C_UNPAIRED_NONISO').setLogic(LUCID_A & LUCID_C & unpaired_nonisocond).setTriggerType(TT.minb)
+        #LVL1MenuItem('L1_LUCID_COMM'      ).setLogic( LUCID_COMM        & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_LUCID_A'           ).setLogic( LUCID_A             & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_LUCID_C'           ).setLogic( LUCID_C             & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_LUCID_A_C',        ).setLogic( LUCID_A & LUCID_C   & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_LUCID'             ).setLogic((LUCID_A | LUCID_C)  & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_LUCID_COMM'        ).setLogic( LUCID_COMM          & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_LUCID_COMM_EMPTY'  ).setLogic( LUCID_COMM          & cosmiccond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_LUCID_EMPTY'       ).setLogic((LUCID_A | LUCID_C)  & cosmiccond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_LUCID_A_C_EMPTY'   ).setLogic( LUCID_A & LUCID_C   & cosmiccond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_LUCID_UNPAIRED_ISO').setLogic((LUCID_A | LUCID_C)  & unpaired_isocond).setTriggerType(TT.minb)           # noqa: F821
+        LVL1MenuItem('L1_LUCID_COMM_UNPAIRED_ISO' ).setLogic( LUCID_COMM        & unpaired_isocond ).setTriggerType(TT.minb)      # noqa: F821
+        LVL1MenuItem('L1_LUCID_A_C_UNPAIRED_ISO'  ).setLogic( LUCID_A & LUCID_C & unpaired_isocond).setTriggerType(TT.minb)       # noqa: F821
+        LVL1MenuItem('L1_LUCID_A_C_UNPAIRED_NONISO').setLogic(LUCID_A & LUCID_C & unpaired_nonisocond).setTriggerType(TT.minb)    # noqa: F821
         
         # BCM
-        LVL1MenuItem('L1_BCM_Wide'                   ).setLogic( BCM_Wide & physcond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_BCM_Wide_BGRP0'             ).setLogic( BCM_Wide & BGRP0 ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_BCM_Wide_EMPTY'             ).setLogic( BCM_Wide & cosmiccond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_BCM_Wide_UNPAIRED_ISO'      ).setLogic( BCM_Wide & unpaired_isocond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_BCM_Wide_UNPAIRED_NONISO'   ).setLogic( BCM_Wide & unpaired_nonisocond ).setTriggerType(TT.minb)
-
-        LVL1MenuItem('L1_BCM_HT_BGRP0'               ).setLogic( BCM_Comb.x(7) & BGRP0).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_BCM_AC_CA_BGRP0'            ).setLogic((BCM_AtoC|BCM_CtoA) & BGRP0).setTriggerType(TT.minb) 
-        LVL1MenuItem('L1_BCM_AC_CA_UNPAIRED_ISO'     ).setLogic((BCM_AtoC|BCM_CtoA)&unpaired_isocond).setTriggerType(TT.minb)
-
-        LVL1MenuItem('L1_BCM_AC_UNPAIRED_ISO'     ).setLogic( BCM_AtoC & unpaired_isocond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_BCM_CA_UNPAIRED_ISO'     ).setLogic( BCM_CtoA & unpaired_isocond).setTriggerType(TT.minb)
+        LVL1MenuItem('L1_BCM_Wide'                   ).setLogic( BCM_Wide & physcond ).setTriggerType(TT.minb)               # noqa: F821
+        LVL1MenuItem('L1_BCM_Wide_BGRP0'             ).setLogic( BCM_Wide & BGRP0 ).setTriggerType(TT.minb)                  # noqa: F821
+        LVL1MenuItem('L1_BCM_Wide_EMPTY'             ).setLogic( BCM_Wide & cosmiccond ).setTriggerType(TT.minb)             # noqa: F821
+        LVL1MenuItem('L1_BCM_Wide_UNPAIRED_ISO'      ).setLogic( BCM_Wide & unpaired_isocond ).setTriggerType(TT.minb)       # noqa: F821
+        LVL1MenuItem('L1_BCM_Wide_UNPAIRED_NONISO'   ).setLogic( BCM_Wide & unpaired_nonisocond ).setTriggerType(TT.minb)    # noqa: F821
+
+        LVL1MenuItem('L1_BCM_HT_BGRP0'               ).setLogic( BCM_Comb.x(7) & BGRP0).setTriggerType(TT.minb)                  # noqa: F821
+        LVL1MenuItem('L1_BCM_AC_CA_BGRP0'            ).setLogic((BCM_AtoC|BCM_CtoA) & BGRP0).setTriggerType(TT.minb)             # noqa: F821
+        LVL1MenuItem('L1_BCM_AC_CA_UNPAIRED_ISO'     ).setLogic((BCM_AtoC|BCM_CtoA)&unpaired_isocond).setTriggerType(TT.minb)    # noqa: F821
+
+        LVL1MenuItem('L1_BCM_AC_UNPAIRED_ISO'     ).setLogic( BCM_AtoC & unpaired_isocond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_BCM_CA_UNPAIRED_ISO'     ).setLogic( BCM_CtoA & unpaired_isocond).setTriggerType(TT.minb)    # noqa: F821
         
-        LVL1MenuItem('L1_BCM_AC_UNPAIRED_NONISO'     ).setLogic( BCM_AtoC & unpaired_nonisocond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_BCM_CA_UNPAIRED_NONISO'     ).setLogic( BCM_CtoA & unpaired_nonisocond).setTriggerType(TT.minb)
+        LVL1MenuItem('L1_BCM_AC_UNPAIRED_NONISO'     ).setLogic( BCM_AtoC & unpaired_nonisocond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_BCM_CA_UNPAIRED_NONISO'     ).setLogic( BCM_CtoA & unpaired_nonisocond).setTriggerType(TT.minb)    # noqa: F821
         
-        LVL1MenuItem('L1_BCM_AC_ABORTGAPNOTCALIB'     ).setLogic( BCM_AtoC & abortgap).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_BCM_CA_ABORTGAPNOTCALIB'     ).setLogic( BCM_CtoA & abortgap).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_BCM_Wide_ABORTGAPNOTCALIB'   ).setLogic( BCM_Wide & abortgap).setTriggerType(TT.minb)        
+        LVL1MenuItem('L1_BCM_AC_ABORTGAPNOTCALIB'     ).setLogic( BCM_AtoC & abortgap).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_BCM_CA_ABORTGAPNOTCALIB'     ).setLogic( BCM_CtoA & abortgap).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_BCM_Wide_ABORTGAPNOTCALIB'   ).setLogic( BCM_Wide & abortgap).setTriggerType(TT.minb)    # noqa: F821
 
-        LVL1MenuItem('L1_BCM_AC_CALIB'     ).setLogic( BCM_AtoC & calibcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_BCM_CA_CALIB'     ).setLogic( BCM_CtoA & calibcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_BCM_Wide_CALIB'   ).setLogic( BCM_Wide & calibcond).setTriggerType(TT.minb)        
+        LVL1MenuItem('L1_BCM_AC_CALIB'     ).setLogic( BCM_AtoC & calibcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_BCM_CA_CALIB'     ).setLogic( BCM_CtoA & calibcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_BCM_Wide_CALIB'   ).setLogic( BCM_Wide & calibcond).setTriggerType(TT.minb)    # noqa: F821        
 
 
 
         # RANDOM
-        LVL1MenuItem('L1_RD0_FILLED'         ).setLogic( RNDM0 & physcond           ).setTriggerType(TT.rand)
-        LVL1MenuItem('L1_RD0_FILLED_OVERLAY' ).setLogic( RNDM0 & physcond           ).setTriggerType(TT.zerobs)
-        LVL1MenuItem('L1_RD0_EMPTY'          ).setLogic( RNDM0 & cosmiccond         ).setTriggerType(TT.rand)
-        LVL1MenuItem('L1_RD0_UNPAIRED_ISO'   ).setLogic( RNDM0 & unpaired_isocond   ).setTriggerType(TT.rand)
-        LVL1MenuItem('L1_RD0_FIRSTEMPTY'     ).setLogic( RNDM0 & firstempty         ).setTriggerType(TT.rand)
-        LVL1MenuItem('L1_RD0_BGRP9'          ).setLogic( RNDM0 & bgrp9cond          ).setTriggerType(TT.rand) 
-        LVL1MenuItem('L1_RD0_BGRP11'         ).setLogic( RNDM0 & bgrp11cond         ).setTriggerType(TT.rand)
-        LVL1MenuItem('L1_RD0_ABORTGAPNOTCALIB').setLogic( RNDM0 & abortgap          ).setTriggerType(TT.rand)
+        LVL1MenuItem('L1_RD0_FILLED'         ).setLogic( RNDM0 & physcond           ).setTriggerType(TT.rand)    # noqa: F821
+        LVL1MenuItem('L1_RD0_FILLED_OVERLAY' ).setLogic( RNDM0 & physcond           ).setTriggerType(TT.zerobs)  # noqa: F821
+        LVL1MenuItem('L1_RD0_EMPTY'          ).setLogic( RNDM0 & cosmiccond         ).setTriggerType(TT.rand)    # noqa: F821
+        LVL1MenuItem('L1_RD0_UNPAIRED_ISO'   ).setLogic( RNDM0 & unpaired_isocond   ).setTriggerType(TT.rand)    # noqa: F821
+        LVL1MenuItem('L1_RD0_FIRSTEMPTY'     ).setLogic( RNDM0 & firstempty         ).setTriggerType(TT.rand)    # noqa: F821
+        LVL1MenuItem('L1_RD0_BGRP9'          ).setLogic( RNDM0 & bgrp9cond          ).setTriggerType(TT.rand)    # noqa: F821
+        LVL1MenuItem('L1_RD0_BGRP11'         ).setLogic( RNDM0 & bgrp11cond         ).setTriggerType(TT.rand)    # noqa: F821
+        LVL1MenuItem('L1_RD0_ABORTGAPNOTCALIB').setLogic( RNDM0 & abortgap          ).setTriggerType(TT.rand)    # noqa: F821
 
         
 
-        LVL1MenuItem('L1_RD1_FILLED'         ).setLogic( RNDM1 & physcond           ).setTriggerType(TT.rand)
-        LVL1MenuItem('L1_RD1_EMPTY'          ).setLogic( RNDM1 & cosmiccond         ).setTriggerType(TT.zerobs)
-        LVL1MenuItem('L1_RD1_BGRP10'         ).setLogic( RNDM1 & alfacalib          ).setTriggerType(TT.zerobs)
+        LVL1MenuItem('L1_RD1_FILLED'         ).setLogic( RNDM1 & physcond           ).setTriggerType(TT.rand)    # noqa: F821
+        LVL1MenuItem('L1_RD1_EMPTY'          ).setLogic( RNDM1 & cosmiccond         ).setTriggerType(TT.zerobs)  # noqa: F821
+        LVL1MenuItem('L1_RD1_BGRP10'         ).setLogic( RNDM1 & alfacalib          ).setTriggerType(TT.zerobs)  # noqa: F821
 
-        LVL1MenuItem('L1_RD2_FILLED'         ).setLogic( RNDM2 & physcond           ).setTriggerType(TT.rand)
-        LVL1MenuItem('L1_RD2_EMPTY'          ).setLogic( RNDM2 & cosmiccond         ).setTriggerType(TT.rand)
-        LVL1MenuItem('L1_RD2_BGRP11'         ).setLogic( RNDM2 & bgrp11cond         ).setTriggerType(TT.rand)
-        LVL1MenuItem('L1_RD2_BGRP12'         ).setLogic( RNDM2 & bgrp12cond         ).setTriggerType(TT.rand)
+        LVL1MenuItem('L1_RD2_FILLED'         ).setLogic( RNDM2 & physcond           ).setTriggerType(TT.rand)    # noqa: F821
+        LVL1MenuItem('L1_RD2_EMPTY'          ).setLogic( RNDM2 & cosmiccond         ).setTriggerType(TT.rand)    # noqa: F821
+        LVL1MenuItem('L1_RD2_BGRP11'         ).setLogic( RNDM2 & bgrp11cond         ).setTriggerType(TT.rand)    # noqa: F821
+        LVL1MenuItem('L1_RD2_BGRP12'         ).setLogic( RNDM2 & bgrp12cond         ).setTriggerType(TT.rand)    # noqa: F821
 
-        LVL1MenuItem('L1_RD3_FILLED'         ).setLogic( RNDM3 & physcond           ).setTriggerType(TT.rand)
-        LVL1MenuItem('L1_RD3_EMPTY'          ).setLogic( RNDM3 & cosmiccond         ).setTriggerType(TT.rand)
+        LVL1MenuItem('L1_RD3_FILLED'         ).setLogic( RNDM3 & physcond           ).setTriggerType(TT.rand)    # noqa: F821
+        LVL1MenuItem('L1_RD3_EMPTY'          ).setLogic( RNDM3 & cosmiccond         ).setTriggerType(TT.rand)    # noqa: F821
 
         # BGRP
-        LVL1MenuItem('L1_BGRP0').setLogic( RNDM0 & BGRP0 ).setTriggerType(TT.rand)
-        LVL1MenuItem('L1_BGRP1').setLogic( RNDM0 & BGRP0 & BGRP1 ).setTriggerType(TT.rand)
-        LVL1MenuItem('L1_BGRP7').setLogic( RNDM0 & BGRP0 & BGRP7 ).setTriggerType(TT.rand)
-        LVL1MenuItem('L1_BGRP9').setLogic( RNDM0 & BGRP0 & BGRP9 ).setTriggerType(TT.rand)  #fixed in ATR-14201
+        LVL1MenuItem('L1_BGRP0').setLogic( RNDM0 & BGRP0 ).setTriggerType(TT.rand)            # noqa: F821
+        LVL1MenuItem('L1_BGRP1').setLogic( RNDM0 & BGRP0 & BGRP1 ).setTriggerType(TT.rand)    # noqa: F821
+        LVL1MenuItem('L1_BGRP7').setLogic( RNDM0 & BGRP0 & BGRP7 ).setTriggerType(TT.rand)    # noqa: F821
+        LVL1MenuItem('L1_BGRP9').setLogic( RNDM0 & BGRP0 & BGRP9 ).setTriggerType(TT.rand)  #fixed in ATR-14201  # noqa: F821
 
-        LVL1MenuItem('L1_BPTX0_BGRP0', ctpid=0xf1).setLogic(BPTX0 & BGRP0).setTriggerType(TT.rand)
-        LVL1MenuItem('L1_BPTX1_BGRP0', ctpid=0xf2).setLogic(BPTX1 & BGRP0).setTriggerType(TT.rand)   
+        LVL1MenuItem('L1_BPTX0_BGRP0', ctpid=0xf1).setLogic(BPTX0 & BGRP0).setTriggerType(TT.rand)    # noqa: F821
+        LVL1MenuItem('L1_BPTX1_BGRP0', ctpid=0xf2).setLogic(BPTX1 & BGRP0).setTriggerType(TT.rand)    # noqa: F821
         
         # lumi measurements
-        LVL1MenuItem('L1_MLZ_A').setLogic( (MBTS_A|ZDC_A|LUCID_A) & physcond).setTriggerType(TT.minb) 
-        LVL1MenuItem('L1_MLZ_C').setLogic( (MBTS_C|ZDC_C|LUCID_C) & physcond).setTriggerType(TT.minb) 
-        LVL1MenuItem('L1_MBLZ' ).setLogic( ( (MBTS_A|ZDC_A|LUCID_A) & (MBTS_C|ZDC_C|LUCID_C) | BCM_Wide) & physcond ).setTriggerType(TT.minb)  
+        LVL1MenuItem('L1_MLZ_A').setLogic( (MBTS_A|ZDC_A|LUCID_A) & physcond).setTriggerType(TT.minb)  # noqa: F821
+        LVL1MenuItem('L1_MLZ_C').setLogic( (MBTS_C|ZDC_C|LUCID_C) & physcond).setTriggerType(TT.minb)  # noqa: F821
+        LVL1MenuItem('L1_MBLZ' ).setLogic( ( (MBTS_A|ZDC_A|LUCID_A) & (MBTS_C|ZDC_C|LUCID_C) | BCM_Wide) & physcond ).setTriggerType(TT.minb)   # noqa: F821
 
-        LVL1MenuItem('L1_CALREQ0', ctpid=0x1fd).setLogic( CAL0 & calibcond).setTriggerType(TT.calreq0) 
-        LVL1MenuItem('L1_CALREQ1', ctpid=0x1fe).setLogic( CAL1 & calibcond).setTriggerType(TT.calreq1)
-        LVL1MenuItem('L1_CALREQ2', ctpid=0x1ff).setLogic( CAL2 & calibcond).setTriggerType(TT.calreq2)   
+        LVL1MenuItem('L1_CALREQ0', ctpid=0x1fd).setLogic( CAL0 & calibcond).setTriggerType(TT.calreq0) # noqa: F821 
+        LVL1MenuItem('L1_CALREQ1', ctpid=0x1fe).setLogic( CAL1 & calibcond).setTriggerType(TT.calreq1) # noqa: F821
+        LVL1MenuItem('L1_CALREQ2', ctpid=0x1ff).setLogic( CAL2 & calibcond).setTriggerType(TT.calreq2) # noqa: F821   
 
         # TRT
-        LVL1MenuItem('L1_TRT'       , ctpid=0x4e).setLogic(NIMTRT & BGRP0).setTriggerType(TT.nim)
-        LVL1MenuItem('L1_TRT_FILLED').setLogic(NIMTRT & physcond).setTriggerType(TT.nim)
-        LVL1MenuItem('L1_TRT_EMPTY' ).setLogic(NIMTRT & cosmiccond).setTriggerType(TT.nim)
+        LVL1MenuItem('L1_TRT'       , ctpid=0x4e).setLogic(NIMTRT & BGRP0).setTriggerType(TT.nim) # noqa: F821
+        LVL1MenuItem('L1_TRT_FILLED').setLogic(NIMTRT & physcond).setTriggerType(TT.nim)          # noqa: F821
+        LVL1MenuItem('L1_TRT_EMPTY' ).setLogic(NIMTRT & cosmiccond).setTriggerType(TT.nim)        # noqa: F821
 
         # TGC
-        LVL1MenuItem('L1_TGC_BURST').setLogic(NIMTGC & BGRP0).setTriggerType(TT.nim)
-        # LVL1MenuItem('L1_TGC_BURST_EMPTY').setLogic(NIMTGC & cosmiccond).setTriggerType(TT.nim)
+        LVL1MenuItem('L1_TGC_BURST').setLogic(NIMTGC & BGRP0).setTriggerType(TT.nim)                 # noqa: F821
+        # LVL1MenuItem('L1_TGC_BURST_EMPTY').setLogic(NIMTGC & cosmiccond).setTriggerType(TT.nim)     # noqa: F821
 
 
         # LHCF
-        LVL1MenuItem('L1_LHCF').setLogic( NIMLHCF & physcond).setTriggerType(TT.nim)
-        LVL1MenuItem('L1_LHCF_UNPAIRED_ISO').setLogic( NIMLHCF & unpaired_isocond).setTriggerType(TT.nim)
-        LVL1MenuItem('L1_LHCF_EMPTY').setLogic( NIMLHCF & cosmiccond).setTriggerType(TT.nim)
+        LVL1MenuItem('L1_LHCF').setLogic( NIMLHCF & physcond).setTriggerType(TT.nim)                       # noqa: F821
+        LVL1MenuItem('L1_LHCF_UNPAIRED_ISO').setLogic( NIMLHCF & unpaired_isocond).setTriggerType(TT.nim)  # noqa: F821
+        LVL1MenuItem('L1_LHCF_EMPTY').setLogic( NIMLHCF & cosmiccond).setTriggerType(TT.nim)               # noqa: F821
         
         # ALFA 
 
         # LUT 22 (12 Outputs)
         # ALFA LUT output #1-8 are the single thresholds
-        ALFA_ANY_A    = ALFA_B7L1U | ALFA_B7L1L | ALFA_A7L1U | ALFA_A7L1L  #  9
-        ALFA_ANY_C    = ALFA_A7R1U | ALFA_A7R1L | ALFA_B7R1U | ALFA_B7R1L  # 10
-        ALFA_ANY_U    = ALFA_B7L1U | ALFA_A7L1U | ALFA_A7R1U | ALFA_B7R1U  # 11
-        ALFA_ANY_L    = ALFA_A7R1L | ALFA_B7R1L | ALFA_B7L1L | ALFA_A7L1L  # 12
+        ALFA_ANY_A    = ALFA_B7L1U | ALFA_B7L1L | ALFA_A7L1U | ALFA_A7L1L  #  9     # noqa: F821
+        ALFA_ANY_C    = ALFA_A7R1U | ALFA_A7R1L | ALFA_B7R1U | ALFA_B7R1L  # 10     # noqa: F821
+        ALFA_ANY_U    = ALFA_B7L1U | ALFA_A7L1U | ALFA_A7R1U | ALFA_B7R1U  # 11     # noqa: F821
+        ALFA_ANY_L    = ALFA_A7R1L | ALFA_B7R1L | ALFA_B7L1L | ALFA_A7L1L  # 12     # noqa: F821
 
         # LUT 23 (12 Outputs)
-        ALFA_LU       = ALFA2_A7L1U | ALFA2_B7L1U #  0
-        ALFA_RL       = ALFA2_A7R1L | ALFA2_B7R1L #  1
-        ALFA_LL       = ALFA2_B7L1L | ALFA2_A7L1L #  2
-        ALFA_RU       = ALFA2_A7R1U | ALFA2_B7R1U #  3
+        ALFA_LU       = ALFA2_A7L1U | ALFA2_B7L1U #  0     # noqa: F821
+        ALFA_RL       = ALFA2_A7R1L | ALFA2_B7R1L #  1     # noqa: F821
+        ALFA_LL       = ALFA2_B7L1L | ALFA2_A7L1L #  2     # noqa: F821
+        ALFA_RU       = ALFA2_A7R1U | ALFA2_B7R1U #  3     # noqa: F821
 
-        ALFA_A_UL_AA  = ALFA2_A7L1L | ALFA2_A7L1U #  4
-        ALFA_A_UL_AB  = ALFA2_A7L1U | ALFA2_B7L1L #  5
-        ALFA_A_UL_BA  = ALFA2_A7L1L | ALFA2_B7L1U #  6
-        ALFA_A_UL_BB  = ALFA2_B7L1L | ALFA2_B7L1U #  7
+        ALFA_A_UL_AA  = ALFA2_A7L1L | ALFA2_A7L1U #  4     # noqa: F821
+        ALFA_A_UL_AB  = ALFA2_A7L1U | ALFA2_B7L1L #  5     # noqa: F821
+        ALFA_A_UL_BA  = ALFA2_A7L1L | ALFA2_B7L1U #  6     # noqa: F821
+        ALFA_A_UL_BB  = ALFA2_B7L1L | ALFA2_B7L1U #  7     # noqa: F821
 
-        ALFA_C_UL_AA  = ALFA2_A7R1L | ALFA2_A7R1U #  8
-        ALFA_C_UL_AB  = ALFA2_A7R1U | ALFA2_B7R1L #  9
-        ALFA_C_UL_BA  = ALFA2_A7R1L | ALFA2_B7R1U # 10
-        ALFA_C_UL_BB  = ALFA2_B7R1L | ALFA2_B7R1U # 11
+        ALFA_C_UL_AA  = ALFA2_A7R1L | ALFA2_A7R1U #  8     # noqa: F821
+        ALFA_C_UL_AB  = ALFA2_A7R1U | ALFA2_B7R1L #  9     # noqa: F821
+        ALFA_C_UL_BA  = ALFA2_A7R1L | ALFA2_B7R1U # 10     # noqa: F821
+        ALFA_C_UL_BB  = ALFA2_B7R1L | ALFA2_B7R1U # 11     # noqa: F821
 
         # LUT 24 (9 Outputs)
-        ALFA_ANY          = ALFA3_B7L1U | ALFA3_B7L1L | ALFA3_A7L1U | ALFA3_A7L1L | ALFA3_A7R1U | ALFA3_A7R1L | ALFA3_B7R1U | ALFA3_B7R1L # 0
-        NOT_ALFA_ANY_A    = Not(ALFA3_B7L1U | ALFA3_B7L1L | ALFA3_A7L1U | ALFA3_A7L1L)  #  1-4
-        NOT_ALFA_ANY_C    = Not(ALFA3_A7R1U | ALFA3_A7R1L | ALFA3_B7R1U | ALFA3_B7R1L)  #  5-8
+        ALFA_ANY          = ALFA3_B7L1U | ALFA3_B7L1L | ALFA3_A7L1U | ALFA3_A7L1L | ALFA3_A7R1U | ALFA3_A7R1L | ALFA3_B7R1U | ALFA3_B7R1L # 0      # noqa: F821
+        #NOT_ALFA_ANY_A    = Not(ALFA3_B7L1U | ALFA3_B7L1L | ALFA3_A7L1U | ALFA3_A7L1L)  #  1-4     # noqa: F821
+        #NOT_ALFA_ANY_C    = Not(ALFA3_A7R1U | ALFA3_A7R1L | ALFA3_B7R1U | ALFA3_B7R1L)  #  5-8     # noqa: F821
 
         # LUT 25 (4 outputs)
-        ALFA_AE1          = ALFA4_B7L1U | ALFA4_A7L1U | ALFA4_B7L1L | ALFA4_A7L1L
-        ALFA_AE2          = ALFA4_B7L1U | ALFA4_A7L1U | ALFA4_A7R1L | ALFA4_B7R1L
-        ALFA_AE3          = ALFA4_A7R1U | ALFA4_B7R1U | ALFA4_B7L1L | ALFA4_A7L1L
-        ALFA_AE4          = ALFA4_A7R1U | ALFA4_B7R1U | ALFA4_A7R1L | ALFA4_B7R1L
+        ALFA_AE1          = ALFA4_B7L1U | ALFA4_A7L1U | ALFA4_B7L1L | ALFA4_A7L1L     # noqa: F821
+        ALFA_AE2          = ALFA4_B7L1U | ALFA4_A7L1U | ALFA4_A7R1L | ALFA4_B7R1L     # noqa: F821
+        ALFA_AE3          = ALFA4_A7R1U | ALFA4_B7R1U | ALFA4_B7L1L | ALFA4_A7L1L     # noqa: F821
+        ALFA_AE4          = ALFA4_A7R1U | ALFA4_B7R1U | ALFA4_A7R1L | ALFA4_B7R1L     # noqa: F821
 
 
         # further simplification (in CAM)
@@ -1111,7 +1101,7 @@ class ItemDef:
         ALFA_ANTI_ELASTIC = ALFA_AE1 & ALFA_AE2 & ALFA_AE3 & ALFA_AE4
 
 
-        MBTS_INNER = (MBTS_A0 | MBTS_A1 |  MBTS_A2 | MBTS_A3 | MBTS_A4 | MBTS_A5 | MBTS_A6 | MBTS_A7 | MBTS_C0 | MBTS_C1 | MBTS_C2 | MBTS_C3 | MBTS_C4 | MBTS_C5 | MBTS_C6 | MBTS_C7)         
+        MBTS_INNER = (MBTS_A0 | MBTS_A1 |  MBTS_A2 | MBTS_A3 | MBTS_A4 | MBTS_A5 | MBTS_A6 | MBTS_A7 | MBTS_C0 | MBTS_C1 | MBTS_C2 | MBTS_C3 | MBTS_C4 | MBTS_C5 | MBTS_C6 | MBTS_C7)              # noqa: F821
 
         ## AFP and ALFA
         #AFP_C =  ((AFP_FSC | AFP_NSC) |  (AFP_FSC & AFP_NSC ))
@@ -1126,231 +1116,231 @@ class ItemDef:
         #AFP 
         #new naming convention ATR-15881 AFP_C = AFP_NSC && AFP_FSC_SIT,  AFP_C_SPECTOF = AFP_FSC_TOF
         if not '_v6' in TriggerFlags.triggerMenuSetup():
-            AFP_A = (AFP_NSA & AFP_FSA_SIT)
-            AFP_C = (AFP_NSC & AFP_FSC_SIT)
-            AFP_A_AND_C_SPECTOF = (AFP_FSA_TOF & AFP_FSC_TOF)
-
-            LVL1MenuItem('L1_AFP_A_BGRP0').setLogic( AFP_A & BGRP0)
-            LVL1MenuItem('L1_AFP_A_SPECTOF_BGRP0').setLogic( AFP_FSA_TOF & BGRP0)
-            LVL1MenuItem('L1_AFP_C_BGRP0').setLogic( AFP_C & BGRP0)
-            LVL1MenuItem('L1_AFP_C_SPECTOF_BGRP0').setLogic( AFP_FSC_TOF & BGRP0)
-            LVL1MenuItem('L1_AFP_NSA_BGRP0').setLogic( AFP_NSA & BGRP0)
-            LVL1MenuItem('L1_AFP_NSC_BGRP0').setLogic( AFP_NSC & BGRP0)
-            LVL1MenuItem('L1_AFP_FSA_SIT_BGRP0').setLogic( AFP_FSA_SIT & BGRP0)
-            LVL1MenuItem('L1_AFP_FSC_SIT_BGRP0').setLogic( AFP_FSC_SIT & BGRP0)
-
-            LVL1MenuItem('L1_AFP_A_OR_C_UNPAIRED_ISO').setLogic( (AFP_A | AFP_C)  & unpaired_isocond )
-            LVL1MenuItem('L1_AFP_A_OR_C_UNPAIRED_NONISO').setLogic( (AFP_A | AFP_C)  & unpaired_nonisocond )
-
-            LVL1MenuItem('L1_AFP_A_OR_C_EMPTY').setLogic( (AFP_A | AFP_C) & cosmiccond)
-            LVL1MenuItem('L1_AFP_A_OR_C_FIRSTEMPTY').setLogic( (AFP_A | AFP_C) & firstempty)
+            AFP_A = (AFP_NSA & AFP_FSA_SIT)     # noqa: F821
+            AFP_C = (AFP_NSC & AFP_FSC_SIT)     # noqa: F821
+            AFP_A_AND_C_SPECTOF = (AFP_FSA_TOF & AFP_FSC_TOF)     # noqa: F821
+
+            LVL1MenuItem('L1_AFP_A_BGRP0').setLogic( AFP_A & BGRP0)                 # noqa: F821
+            LVL1MenuItem('L1_AFP_A_SPECTOF_BGRP0').setLogic( AFP_FSA_TOF & BGRP0)   # noqa: F821
+            LVL1MenuItem('L1_AFP_C_BGRP0').setLogic( AFP_C & BGRP0)                 # noqa: F821
+            LVL1MenuItem('L1_AFP_C_SPECTOF_BGRP0').setLogic( AFP_FSC_TOF & BGRP0)   # noqa: F821
+            LVL1MenuItem('L1_AFP_NSA_BGRP0').setLogic( AFP_NSA & BGRP0)             # noqa: F821
+            LVL1MenuItem('L1_AFP_NSC_BGRP0').setLogic( AFP_NSC & BGRP0)             # noqa: F821
+            LVL1MenuItem('L1_AFP_FSA_SIT_BGRP0').setLogic( AFP_FSA_SIT & BGRP0)     # noqa: F821
+            LVL1MenuItem('L1_AFP_FSC_SIT_BGRP0').setLogic( AFP_FSC_SIT & BGRP0)     # noqa: F821
+
+            LVL1MenuItem('L1_AFP_A_OR_C_UNPAIRED_ISO').setLogic( (AFP_A | AFP_C)  & unpaired_isocond )           # noqa: F821
+            LVL1MenuItem('L1_AFP_A_OR_C_UNPAIRED_NONISO').setLogic( (AFP_A | AFP_C)  & unpaired_nonisocond )     # noqa: F821
+
+            LVL1MenuItem('L1_AFP_A_OR_C_EMPTY').setLogic( (AFP_A | AFP_C) & cosmiccond)          # noqa: F821
+            LVL1MenuItem('L1_AFP_A_OR_C_FIRSTEMPTY').setLogic( (AFP_A | AFP_C) & firstempty)     # noqa: F821
             
-            LVL1MenuItem('L1_AFP_A_AND_C_SPECTOF').setLogic( AFP_A_AND_C_SPECTOF & physcond )
-
-            LVL1MenuItem('L1_AFP_A_AND_C').setLogic( AFP_A & AFP_C & physcond )
-            LVL1MenuItem('L1_AFP_A_OR_C').setLogic( (AFP_A | AFP_C) & physcond )
-            LVL1MenuItem('L1_AFP_A').setLogic( AFP_A & physcond )
-            LVL1MenuItem('L1_AFP_C').setLogic( AFP_C & physcond )
-
-            LVL1MenuItem('L1_AFP_A_AND_C_MBTS_2').setLogic( AFP_A & AFP_C & MBTS_2 & physcond )
-            LVL1MenuItem('L1_AFP_A_OR_C_MBTS_2').setLogic( (AFP_A | AFP_C) & MBTS_2 & physcond )
-
-            LVL1MenuItem('L1_AFP_A_AND_C_J12').setLogic( AFP_A & AFP_C & J12 & physcond )
-            LVL1MenuItem('L1_AFP_A_OR_C_J12').setLogic( (AFP_A | AFP_C) & J12 & physcond )
-            LVL1MenuItem('L1_AFP_A_AND_C_EM3').setLogic( AFP_A & AFP_C & EM3 & physcond )
-            LVL1MenuItem('L1_AFP_A_OR_C_EM3').setLogic( (AFP_A | AFP_C) & EM3 & physcond )
-            LVL1MenuItem('L1_AFP_A_AND_C_MU4').setLogic( AFP_A & AFP_C & MU4 & physcond )
-            LVL1MenuItem('L1_AFP_A_OR_C_MU4').setLogic( (AFP_A | AFP_C) & MU4 & physcond )
-            LVL1MenuItem('L1_AFP_A_AND_C_TE5').setLogic( AFP_A & AFP_C & TE5 & physcond )
-            LVL1MenuItem('L1_AFP_A_OR_C_TE5').setLogic( (AFP_A | AFP_C) & TE5 & physcond )
-            LVL1MenuItem('L1_AFP_A_AND_C_J50').setLogic( AFP_A & AFP_C & J50 & physcond )
-            LVL1MenuItem('L1_AFP_A_AND_C_SPECTOF_J50').setLogic( AFP_A_AND_C_SPECTOF & J50 & physcond )
-            LVL1MenuItem('L1_AFP_A_AND_C_J75').setLogic( AFP_A & AFP_C & J75 & physcond )
-            LVL1MenuItem('L1_AFP_A_AND_C_SPECTOF_J75').setLogic( AFP_A_AND_C_SPECTOF & J75 & physcond )
-            LVL1MenuItem('L1_AFP_A_AND_C_J100').setLogic( AFP_A & AFP_C & J100 & physcond )
-            LVL1MenuItem('L1_AFP_A_AND_C_SPECTOF_J100').setLogic( AFP_A_AND_C_SPECTOF & J100 & physcond )
+            LVL1MenuItem('L1_AFP_A_AND_C_SPECTOF').setLogic( AFP_A_AND_C_SPECTOF & physcond )    # noqa: F821 
+
+            LVL1MenuItem('L1_AFP_A_AND_C').setLogic( AFP_A & AFP_C & physcond )                  # noqa: F821
+            LVL1MenuItem('L1_AFP_A_OR_C').setLogic( (AFP_A | AFP_C) & physcond )                 # noqa: F821
+            LVL1MenuItem('L1_AFP_A').setLogic( AFP_A & physcond )                                # noqa: F821
+            LVL1MenuItem('L1_AFP_C').setLogic( AFP_C & physcond )                                # noqa: F821
+
+            LVL1MenuItem('L1_AFP_A_AND_C_MBTS_2').setLogic( AFP_A & AFP_C & MBTS_2 & physcond )  # noqa: F821
+            LVL1MenuItem('L1_AFP_A_OR_C_MBTS_2').setLogic( (AFP_A | AFP_C) & MBTS_2 & physcond ) # noqa: F821
+
+            LVL1MenuItem('L1_AFP_A_AND_C_J12').setLogic( AFP_A & AFP_C & J12 & physcond )  # noqa: F821
+            LVL1MenuItem('L1_AFP_A_OR_C_J12').setLogic( (AFP_A | AFP_C) & J12 & physcond ) # noqa: F821
+            LVL1MenuItem('L1_EM3_AFP_A_AND_C').setLogic( AFP_A & AFP_C & EM3 & physcond )  # noqa: F821
+            LVL1MenuItem('L1_EM3_AFP_A_OR_C').setLogic( (AFP_A | AFP_C) & EM3 & physcond ) # noqa: F821
+            LVL1MenuItem('L1_MU4_AFP_A_AND_C').setLogic( AFP_A & AFP_C & MU4 & physcond )  # noqa: F821
+            LVL1MenuItem('L1_MU4_AFP_A_OR_C').setLogic( (AFP_A | AFP_C) & MU4 & physcond ) # noqa: F821
+            LVL1MenuItem('L1_AFP_A_AND_C_TE5').setLogic( AFP_A & AFP_C & TE5 & physcond )  # noqa: F821
+            LVL1MenuItem('L1_AFP_A_OR_C_TE5').setLogic( (AFP_A | AFP_C) & TE5 & physcond ) # noqa: F821
+            LVL1MenuItem('L1_AFP_A_AND_C_J50').setLogic( AFP_A & AFP_C & J50 & physcond )  # noqa: F821
+            LVL1MenuItem('L1_AFP_A_AND_C_SPECTOF_J50').setLogic( AFP_A_AND_C_SPECTOF & J50 & physcond )   # noqa: F821
+            LVL1MenuItem('L1_AFP_A_AND_C_J75').setLogic( AFP_A & AFP_C & J75 & physcond )                 # noqa: F821
+            LVL1MenuItem('L1_AFP_A_AND_C_SPECTOF_J75').setLogic( AFP_A_AND_C_SPECTOF & J75 & physcond )   # noqa: F821
+            LVL1MenuItem('L1_AFP_A_AND_C_J100').setLogic( AFP_A & AFP_C & J100 & physcond )               # noqa: F821
+            LVL1MenuItem('L1_AFP_A_AND_C_SPECTOF_J100').setLogic( AFP_A_AND_C_SPECTOF & J100 & physcond ) # noqa: F821
 
         else:    
-            LVL1MenuItem('L1_AFP_NSC').setLogic( AFP_NSC & physcond )
-            LVL1MenuItem('L1_AFP_FSC').setLogic( AFP_FSC & physcond )
-            LVL1MenuItem('L1_AFP_C_ANY').setLogic( ( AFP_FSC | AFP_NSC) & physcond )
-            LVL1MenuItem('L1_AFP_C_ANY_UNPAIRED_ISO').setLogic( ( AFP_FSC | AFP_NSC) & unpaired_isocond)
-            LVL1MenuItem('L1_AFP_C_ANY_UNPAIRED_NONISO').setLogic( ( AFP_FSC | AFP_NSC) & unpaired_nonisocond)
-            LVL1MenuItem('L1_AFP_C_ANY_EMPTY').setLogic( ( AFP_FSC | AFP_NSC) & cosmiccond)
-            LVL1MenuItem('L1_AFP_C_ANY_FIRSTEMPTY').setLogic( ( AFP_FSC | AFP_NSC) & firstempty)
-            LVL1MenuItem('L1_AFP_C_AND').setLogic( ( AFP_FSC & AFP_NSC) & physcond )
+            LVL1MenuItem('L1_AFP_NSC').setLogic( AFP_NSC & physcond ) # noqa: F821
+            LVL1MenuItem('L1_AFP_FSC').setLogic( AFP_FSC & physcond ) # noqa: F821
+            LVL1MenuItem('L1_AFP_C_ANY').setLogic( ( AFP_FSC | AFP_NSC) & physcond ) # noqa: F821
+            LVL1MenuItem('L1_AFP_C_ANY_UNPAIRED_ISO').setLogic( ( AFP_FSC | AFP_NSC) & unpaired_isocond)       # noqa: F821
+            LVL1MenuItem('L1_AFP_C_ANY_UNPAIRED_NONISO').setLogic( ( AFP_FSC | AFP_NSC) & unpaired_nonisocond) # noqa: F821
+            LVL1MenuItem('L1_AFP_C_ANY_EMPTY').setLogic( ( AFP_FSC | AFP_NSC) & cosmiccond) # noqa: F821
+            LVL1MenuItem('L1_AFP_C_ANY_FIRSTEMPTY').setLogic( ( AFP_FSC | AFP_NSC) & firstempty) # noqa: F821
+            LVL1MenuItem('L1_AFP_C_AND').setLogic( ( AFP_FSC & AFP_NSC) & physcond ) # noqa: F821
 
 
 
-            AFP_C =  (AFP_FSC & AFP_NSC)
+            AFP_C =  (AFP_FSC & AFP_NSC) # noqa: F821
 
-            LVL1MenuItem('L1_AFP_C_MBTS_A').setLogic(AFP_C  & MBTS_A & physcond )
-            LVL1MenuItem('L1_AFP_C_ZDC_C').setLogic(AFP_C  & ZDC_C & physcond )
-            LVL1MenuItem('L1_AFP_C_J12').setLogic(AFP_C  & J12 & physcond )
-            LVL1MenuItem('L1_AFP_C_EM3').setLogic(AFP_C  & EM3 & physcond )
-            LVL1MenuItem('L1_AFP_C_MU4').setLogic(AFP_C  & MU4 & physcond )
-            LVL1MenuItem('L1_AFP_C_TE5').setLogic(AFP_C  & TE5 & physcond )
-            LVL1MenuItem('L1_AFP_C_ALFA_C').setLogic(AFP_C  &  ALFA_C & physcond )
-            LVL1MenuItem('L1_AFP_C_ALFA_A').setLogic(AFP_C  &  ALFA_A & physcond )
-            LVL1MenuItem('L1_AFP_C_ANY_MBTS_A').setLogic( (AFP_FSC | AFP_NSC) & MBTS_A & physcond )
+            LVL1MenuItem('L1_AFP_C_MBTS_A').setLogic(AFP_C  & MBTS_A & physcond )   # noqa: F821
+            LVL1MenuItem('L1_AFP_C_ZDC_C').setLogic(AFP_C  & ZDC_C & physcond )     # noqa: F821
+            LVL1MenuItem('L1_AFP_C_J12').setLogic(AFP_C  & J12 & physcond )         # noqa: F821
+            LVL1MenuItem('L1_AFP_C_EM3').setLogic(AFP_C  & EM3 & physcond )         # noqa: F821
+            LVL1MenuItem('L1_AFP_C_MU4').setLogic(AFP_C  & MU4 & physcond )         # noqa: F821
+            LVL1MenuItem('L1_AFP_C_TE5').setLogic(AFP_C  & TE5 & physcond )         # noqa: F821
+            LVL1MenuItem('L1_AFP_C_ALFA_C').setLogic(AFP_C  &  ALFA_C & physcond )  # noqa: F821
+            LVL1MenuItem('L1_AFP_C_ALFA_A').setLogic(AFP_C  &  ALFA_A & physcond )  # noqa: F821
+            LVL1MenuItem('L1_AFP_C_ANY_MBTS_A').setLogic( (AFP_FSC | AFP_NSC) & MBTS_A & physcond )         # noqa: F821
 
 
 
 
         ## ALFA Single items
-        LVL1MenuItem('L1_ALFA_B7L1U').setLogic(ALFA_B7L1U & BGRP0).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_B7L1L').setLogic(ALFA_B7L1L & BGRP0).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_A7L1U').setLogic(ALFA_A7L1U & BGRP0).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_A7L1L').setLogic(ALFA_A7L1L & BGRP0).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_A7R1U').setLogic(ALFA_A7R1U & BGRP0).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_A7R1L').setLogic(ALFA_A7R1L & BGRP0).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_B7R1U').setLogic(ALFA_B7R1U & BGRP0).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_B7R1L').setLogic(ALFA_B7R1L & BGRP0).setTriggerType(TT.alfa)
-
-
-        LVL1MenuItem('L1_ALFA_ELAST1').setLogic( ALFA_B7L1U & ALFA_A7L1U & ALFA_A7R1L & ALFA_B7R1L &
-                                                 Not(ALFA3_B7L1L | ALFA3_A7L1L | ALFA3_A7R1U | ALFA3_B7R1U)
-                                                 & physcond).setTriggerType(TT.alfa)
+        LVL1MenuItem('L1_ALFA_B7L1U').setLogic(ALFA_B7L1U & BGRP0).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_B7L1L').setLogic(ALFA_B7L1L & BGRP0).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_A7L1U').setLogic(ALFA_A7L1U & BGRP0).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_A7L1L').setLogic(ALFA_A7L1L & BGRP0).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_A7R1U').setLogic(ALFA_A7R1U & BGRP0).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_A7R1L').setLogic(ALFA_A7R1L & BGRP0).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_B7R1U').setLogic(ALFA_B7R1U & BGRP0).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_B7R1L').setLogic(ALFA_B7R1L & BGRP0).setTriggerType(TT.alfa)    # noqa: F821
+
+
+        LVL1MenuItem('L1_ALFA_ELAST1').setLogic( ALFA_B7L1U & ALFA_A7L1U & ALFA_A7R1L & ALFA_B7R1L &                 # noqa: F821
+                                                 Not(ALFA3_B7L1L | ALFA3_A7L1L | ALFA3_A7R1U | ALFA3_B7R1U)          # noqa: F821
+                                                 & physcond).setTriggerType(TT.alfa)    # noqa: F821
         
-        LVL1MenuItem('L1_ALFA_ELAST2').setLogic( ALFA_B7L1L & ALFA_A7L1L & ALFA_A7R1U & ALFA_B7R1U &
-                                                 Not(ALFA3_B7L1U | ALFA3_A7L1U | ALFA3_A7R1L | ALFA3_B7R1L)
-                                                 & physcond).setTriggerType(TT.alfa)
+        LVL1MenuItem('L1_ALFA_ELAST2').setLogic( ALFA_B7L1L & ALFA_A7L1L & ALFA_A7R1U & ALFA_B7R1U &                 # noqa: F821
+                                                 Not(ALFA3_B7L1U | ALFA3_A7L1U | ALFA3_A7R1L | ALFA3_B7R1L)          # noqa: F821
+                                                 & physcond).setTriggerType(TT.alfa)    # noqa: F821
         
-        LVL1MenuItem('L1_ALFA_ELAST11').setLogic( ALFA_B7L1U & ALFA_A7L1U & ALFA_A7R1L & ALFA_B7R1L    & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_ELAST12').setLogic( ALFA_B7L1L & ALFA_A7L1L & ALFA_A7R1U & ALFA_B7R1U    & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_ELAST13').setLogic( ALFA_LU & (ALFA_A7R1L & ALFA_B7R1L)                  & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_ELAST14').setLogic( (ALFA_B7L1U & ALFA_A7L1U) & ALFA_RL & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_ELAST15').setLogic( ALFA_LU & ALFA_RL & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_ELAST15_Calib').setLogic( ALFA_LU & ALFA_RL &  alfacalib).setTriggerType(TT.alfa) ## CHECK
-        LVL1MenuItem('L1_ALFA_ELAST16').setLogic( ALFA_LL & (ALFA_A7R1U & ALFA_B7R1U) & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_ELAST17').setLogic((ALFA_B7L1L & ALFA_A7L1L) & ALFA_RU & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_ELAST18').setLogic( ALFA_LL & ALFA_RU & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_ELAST18_Calib').setLogic( ALFA_LL & ALFA_RU & alfacalib).setTriggerType(TT.alfa)
-
-
-        LVL1MenuItem('L1_ALFA_SDIFF1').setLogic( ALFA_B7L1U & ALFA_A7L1U &
-                                                 Not(ALFA3_B7L1L | ALFA3_A7L1L | ALFA3_A7R1U | ALFA3_A7R1L | ALFA3_B7R1U | ALFA3_B7R1L)
-                                                 & physcond).setTriggerType(TT.alfa)
+        LVL1MenuItem('L1_ALFA_ELAST11').setLogic( ALFA_B7L1U & ALFA_A7L1U & ALFA_A7R1L & ALFA_B7R1L    & physcond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_ELAST12').setLogic( ALFA_B7L1L & ALFA_A7L1L & ALFA_A7R1U & ALFA_B7R1U    & physcond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_ELAST13').setLogic( ALFA_LU & (ALFA_A7R1L & ALFA_B7R1L)                  & physcond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_ELAST14').setLogic( (ALFA_B7L1U & ALFA_A7L1U) & ALFA_RL & physcond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_ELAST15').setLogic( ALFA_LU & ALFA_RL & physcond).setTriggerType(TT.alfa)                      # noqa: F821
+        LVL1MenuItem('L1_ALFA_ELAST15_Calib').setLogic( ALFA_LU & ALFA_RL &  alfacalib).setTriggerType(TT.alfa) ## CHECK     # noqa: F821
+        LVL1MenuItem('L1_ALFA_ELAST16').setLogic( ALFA_LL & (ALFA_A7R1U & ALFA_B7R1U) & physcond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_ELAST17').setLogic((ALFA_B7L1L & ALFA_A7L1L) & ALFA_RU & physcond).setTriggerType(TT.alfa)     # noqa: F821
+        LVL1MenuItem('L1_ALFA_ELAST18').setLogic( ALFA_LL & ALFA_RU & physcond).setTriggerType(TT.alfa)                      # noqa: F821
+        LVL1MenuItem('L1_ALFA_ELAST18_Calib').setLogic( ALFA_LL & ALFA_RU & alfacalib).setTriggerType(TT.alfa)               # noqa: F821
+
+
+        LVL1MenuItem('L1_ALFA_SDIFF1').setLogic( ALFA_B7L1U & ALFA_A7L1U &                                                                      # noqa: F821
+                                                 Not(ALFA3_B7L1L | ALFA3_A7L1L | ALFA3_A7R1U | ALFA3_A7R1L | ALFA3_B7R1U | ALFA3_B7R1L)         # noqa: F821
+                                                 & physcond).setTriggerType(TT.alfa)    # noqa: F821
         
-        LVL1MenuItem('L1_ALFA_SDIFF2').setLogic( ALFA_A7R1L & ALFA_B7R1L &
-                                                 Not(ALFA3_B7L1U | ALFA3_B7L1L | ALFA3_A7L1U | ALFA3_A7L1L | ALFA3_A7R1U | ALFA3_B7R1U)
-                                                 & physcond).setTriggerType(TT.alfa)
+        LVL1MenuItem('L1_ALFA_SDIFF2').setLogic( ALFA_A7R1L & ALFA_B7R1L &                                                                      # noqa: F821
+                                                 Not(ALFA3_B7L1U | ALFA3_B7L1L | ALFA3_A7L1U | ALFA3_A7L1L | ALFA3_A7R1U | ALFA3_B7R1U)         # noqa: F821
+                                                 & physcond).setTriggerType(TT.alfa)    # noqa: F821
          
-        LVL1MenuItem('L1_ALFA_SDIFF3').setLogic( ALFA_B7L1L & ALFA_A7L1L &
-                                                 Not(ALFA3_B7L1U | ALFA3_A7L1U | ALFA3_A7R1U | ALFA3_A7R1L | ALFA3_B7R1U | ALFA3_B7R1L)
-                                                 & physcond).setTriggerType(TT.alfa)
+        LVL1MenuItem('L1_ALFA_SDIFF3').setLogic( ALFA_B7L1L & ALFA_A7L1L &                                                                      # noqa: F821
+                                                 Not(ALFA3_B7L1U | ALFA3_A7L1U | ALFA3_A7R1U | ALFA3_A7R1L | ALFA3_B7R1U | ALFA3_B7R1L)         # noqa: F821
+                                                 & physcond).setTriggerType(TT.alfa)    # noqa: F821
          
-        LVL1MenuItem('L1_ALFA_SDIFF4').setLogic( ALFA_A7R1U & ALFA_B7R1U &
-                                                 Not(ALFA3_B7L1U | ALFA3_B7L1L | ALFA3_A7L1U | ALFA3_A7L1L | ALFA3_A7R1L | ALFA3_B7R1L)
-                                                 & physcond).setTriggerType(TT.alfa)
-
-        LVL1MenuItem('L1_ALFA_SDIFF5').setLogic( ALFA_B7L1U & ALFA_A7L1U &  physcond).setTriggerType(TT.alfa) 
-        LVL1MenuItem('L1_ALFA_SDIFF6').setLogic( ALFA_A7R1L & ALFA_B7R1L &  physcond).setTriggerType(TT.alfa) 
-        LVL1MenuItem('L1_ALFA_SDIFF7').setLogic( ALFA_B7L1L & ALFA_A7L1L &  physcond).setTriggerType(TT.alfa) 
-        LVL1MenuItem('L1_ALFA_SDIFF8').setLogic( ALFA_A7R1U & ALFA_B7R1U &  physcond).setTriggerType(TT.alfa) 
+        LVL1MenuItem('L1_ALFA_SDIFF4').setLogic( ALFA_A7R1U & ALFA_B7R1U &                                                                      # noqa: F821
+                                                 Not(ALFA3_B7L1U | ALFA3_B7L1L | ALFA3_A7L1U | ALFA3_A7L1L | ALFA3_A7R1L | ALFA3_B7R1L)         # noqa: F821
+                                                 & physcond).setTriggerType(TT.alfa)    # noqa: F821
+
+        LVL1MenuItem('L1_ALFA_SDIFF5').setLogic( ALFA_B7L1U & ALFA_A7L1U &  physcond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SDIFF6').setLogic( ALFA_A7R1L & ALFA_B7R1L &  physcond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SDIFF7').setLogic( ALFA_B7L1L & ALFA_A7L1L &  physcond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SDIFF8').setLogic( ALFA_A7R1U & ALFA_B7R1U &  physcond).setTriggerType(TT.alfa)    # noqa: F821
                                                            
-        LVL1MenuItem('L1_MBTS_1_A_ALFA_C').setLogic( MBTS_A & ALFA_C  & physcond).setTriggerType(TT.alfa) 
-        LVL1MenuItem('L1_MBTS_1_C_ALFA_A').setLogic( MBTS_C & ALFA_A & physcond).setTriggerType(TT.alfa)        
-        LVL1MenuItem('L1_MBTS_1_A_ALFA_C_UNPAIRED_ISO').setLogic( MBTS_A & ALFA_C & unpaired_isocond).setTriggerType(TT.alfa) 
-        LVL1MenuItem('L1_MBTS_1_C_ALFA_A_UNPAIRED_ISO').setLogic( MBTS_C & ALFA_A & unpaired_isocond).setTriggerType(TT.alfa)        
-        LVL1MenuItem('L1_MBTS_1_ALFA_ANY').setLogic( MBTS_1 & ALFA_ANY  & physcond).setTriggerType(TT.alfa) ##should be called L1_MBTS_1_ALFA_ANY                          
+        LVL1MenuItem('L1_MBTS_1_A_ALFA_C').setLogic( MBTS_A & ALFA_C  & physcond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_1_C_ALFA_A').setLogic( MBTS_C & ALFA_A & physcond).setTriggerType(TT.alfa)     # noqa: F821  
+        LVL1MenuItem('L1_MBTS_1_A_ALFA_C_UNPAIRED_ISO').setLogic( MBTS_A & ALFA_C & unpaired_isocond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_1_C_ALFA_A_UNPAIRED_ISO').setLogic( MBTS_C & ALFA_A & unpaired_isocond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_1_ALFA_ANY').setLogic( MBTS_1 & ALFA_ANY  & physcond).setTriggerType(TT.alfa) ##should be called L1_MBTS_1_ALFA_ANY   # noqa: F821                     
 
         ## check definition of MBTS_2
-        LVL1MenuItem('L1_MBTS_2_A_ALFA_C').setLogic( MBTS_A.x(2) & ALFA_C & physcond).setTriggerType(TT.alfa) 
-        LVL1MenuItem('L1_MBTS_2_C_ALFA_A').setLogic( MBTS_C.x(2) & ALFA_A & physcond).setTriggerType(TT.alfa)        
-        LVL1MenuItem('L1_MBTS_2_A_ALFA_C_UNPAIRED_ISO').setLogic( MBTS_A.x(2) & ALFA_C & unpaired_isocond).setTriggerType(TT.alfa) 
-        LVL1MenuItem('L1_MBTS_2_C_ALFA_A_UNPAIRED_ISO').setLogic( MBTS_C.x(2) & ALFA_A & unpaired_isocond).setTriggerType(TT.alfa)        
-        LVL1MenuItem('L1_MBTS_2_ALFA').setLogic( MBTS_2 & ALFA_ANY & physcond).setTriggerType(TT.alfa)              
+        LVL1MenuItem('L1_MBTS_2_A_ALFA_C').setLogic( MBTS_A.x(2) & ALFA_C & physcond).setTriggerType(TT.alfa)                       # noqa: F821
+        LVL1MenuItem('L1_MBTS_2_C_ALFA_A').setLogic( MBTS_C.x(2) & ALFA_A & physcond).setTriggerType(TT.alfa)                       # noqa: F821
+        LVL1MenuItem('L1_MBTS_2_A_ALFA_C_UNPAIRED_ISO').setLogic( MBTS_A.x(2) & ALFA_C & unpaired_isocond).setTriggerType(TT.alfa)  # noqa: F821
+        LVL1MenuItem('L1_MBTS_2_C_ALFA_A_UNPAIRED_ISO').setLogic( MBTS_C.x(2) & ALFA_A & unpaired_isocond).setTriggerType(TT.alfa)  # noqa: F821 
+        LVL1MenuItem('L1_MBTS_2_ALFA').setLogic( MBTS_2 & ALFA_ANY & physcond).setTriggerType(TT.alfa)                              # noqa: F821
         
-        LVL1MenuItem('L1_LUCID_A_ALFA_C').setLogic( LUCID_A & ALFA_C & physcond).setTriggerType(TT.alfa) 
-        LVL1MenuItem('L1_LUCID_C_ALFA_A').setLogic( LUCID_C & ALFA_A & physcond).setTriggerType(TT.alfa)     
-        LVL1MenuItem('L1_LUCID_A_ALFA_C_UNPAIRED_ISO').setLogic( LUCID_A & ALFA_C & unpaired_isocond).setTriggerType(TT.alfa) 
-        LVL1MenuItem('L1_LUCID_C_ALFA_A_UNPAIRED_ISO').setLogic( LUCID_C & ALFA_A & unpaired_isocond).setTriggerType(TT.alfa) 
-        LVL1MenuItem('L1_LUCID_ALFA').setLogic( (LUCID_A | LUCID_C) & ALFA_ANY & physcond).setTriggerType(TT.alfa) 
+        LVL1MenuItem('L1_LUCID_A_ALFA_C').setLogic( LUCID_A & ALFA_C & physcond).setTriggerType(TT.alfa)                         # noqa: F821
+        LVL1MenuItem('L1_LUCID_C_ALFA_A').setLogic( LUCID_C & ALFA_A & physcond).setTriggerType(TT.alfa)                         # noqa: F821
+        LVL1MenuItem('L1_LUCID_A_ALFA_C_UNPAIRED_ISO').setLogic( LUCID_A & ALFA_C & unpaired_isocond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_LUCID_C_ALFA_A_UNPAIRED_ISO').setLogic( LUCID_C & ALFA_A & unpaired_isocond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_LUCID_ALFA').setLogic( (LUCID_A | LUCID_C) & ALFA_ANY & physcond).setTriggerType(TT.alfa)               # noqa: F821
         
-        #LVL1MenuItem('L1_ZDC_A_ALFA_C').setLogic( ZDC_A  & ALFA_C & physcond).setTriggerType(TT.alfa) 
-        #LVL1MenuItem('L1_ZDC_C_ALFA_A').setLogic( ZDC_C  & ALFA_A & physcond).setTriggerType(TT.alfa)     
-        #LVL1MenuItem('L1_ZDC_ALFA').setLogic( (ZDC_A | ZDC_C) & ALFA_ANY & physcond).setTriggerType(TT.alfa) 
+        #LVL1MenuItem('L1_ZDC_A_ALFA_C').setLogic( ZDC_A  & ALFA_C & physcond).setTriggerType(TT.alfa)           # noqa: F821
+        #LVL1MenuItem('L1_ZDC_C_ALFA_A').setLogic( ZDC_C  & ALFA_A & physcond).setTriggerType(TT.alfa)           # noqa: F821
+        #LVL1MenuItem('L1_ZDC_ALFA').setLogic( (ZDC_A | ZDC_C) & ALFA_ANY & physcond).setTriggerType(TT.alfa)    # noqa: F821
         
-        LVL1MenuItem('L1_EM3_ALFA_ANY'             ).setLogic( EM3 & ALFA_ANY & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_EM3_ALFA_ANY_UNPAIRED_ISO').setLogic( EM3 & ALFA_ANY & unpaired_isocond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_EM3_ALFA_ANY_VETO_MBTS' ).setLogic( EM3 & ALFA_ANY  & Not(MBTS_INNER) & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_EM3_ALFA_EINE'          ).setLogic( EM3 & ALFA_EINE & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_EM3_ALFA_EINE_VETO_MBTS').setLogic( EM3 & ALFA_EINE & Not(MBTS_INNER) & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_EM3_ALFA_MBTS_A'             ).setLogic( EM3 & MBTS_A & ALFA_ANY_A & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_EM3_ALFA_MBTS_C'             ).setLogic( EM3 & MBTS_C & ALFA_ANY_C & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_EM3_ALFA_MBTS_A_UNPAIRED_ISO').setLogic( EM3 & MBTS_A & ALFA_ANY_A & unpaired_isocond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_EM3_ALFA_MBTS_C_UNPAIRED_ISO').setLogic( EM3 & MBTS_A & ALFA_ANY_C & unpaired_isocond).setTriggerType(TT.alfa)
+        LVL1MenuItem('L1_EM3_ALFA_ANY'             ).setLogic( EM3 & ALFA_ANY & physcond).setTriggerType(TT.alfa)                          # noqa: F821
+        LVL1MenuItem('L1_EM3_ALFA_ANY_UNPAIRED_ISO').setLogic( EM3 & ALFA_ANY & unpaired_isocond).setTriggerType(TT.alfa)                  # noqa: F821
+        LVL1MenuItem('L1_EM3_ALFA_ANY_VETO_MBTS' ).setLogic( EM3 & ALFA_ANY  & Not(MBTS_INNER) & physcond).setTriggerType(TT.alfa)         # noqa: F821
+        LVL1MenuItem('L1_EM3_ALFA_EINE'          ).setLogic( EM3 & ALFA_EINE & physcond).setTriggerType(TT.alfa)                           # noqa: F821
+        LVL1MenuItem('L1_EM3_ALFA_EINE_VETO_MBTS').setLogic( EM3 & ALFA_EINE & Not(MBTS_INNER) & physcond).setTriggerType(TT.alfa)         # noqa: F821
+        LVL1MenuItem('L1_EM3_ALFA_MBTS_A'             ).setLogic( EM3 & MBTS_A & ALFA_ANY_A & physcond).setTriggerType(TT.alfa)            # noqa: F821
+        LVL1MenuItem('L1_EM3_ALFA_MBTS_C'             ).setLogic( EM3 & MBTS_C & ALFA_ANY_C & physcond).setTriggerType(TT.alfa)            # noqa: F821
+        LVL1MenuItem('L1_EM3_ALFA_MBTS_A_UNPAIRED_ISO').setLogic( EM3 & MBTS_A & ALFA_ANY_A & unpaired_isocond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_EM3_ALFA_MBTS_C_UNPAIRED_ISO').setLogic( EM3 & MBTS_A & ALFA_ANY_C & unpaired_isocond).setTriggerType(TT.alfa)    # noqa: F821
         
-        LVL1MenuItem('L1_J12_ALFA_ANY'             ).setLogic( J12 & ALFA_ANY & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_J12_ALFA_ANY_UNPAIRED_ISO').setLogic( J12 & ALFA_ANY & unpaired_isocond).setTriggerType(TT.alfa)
+        LVL1MenuItem('L1_J12_ALFA_ANY'             ).setLogic( J12 & ALFA_ANY & physcond).setTriggerType(TT.alfa)            # noqa: F821
+        LVL1MenuItem('L1_J12_ALFA_ANY_UNPAIRED_ISO').setLogic( J12 & ALFA_ANY & unpaired_isocond).setTriggerType(TT.alfa)    # noqa: F821
 
-        LVL1MenuItem('L1_TE5_ALFA_ANY'             ).setLogic( TE5 & ALFA_ANY  & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_TE5_ALFA_ANY_UNPAIRED_ISO').setLogic( TE5 & ALFA_ANY  & unpaired_isocond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_TE5_ALFA_EINE'            ).setLogic( TE5 & ALFA_EINE & physcond).setTriggerType(TT.alfa)
+        LVL1MenuItem('L1_TE5_ALFA_ANY'             ).setLogic( TE5 & ALFA_ANY  & physcond).setTriggerType(TT.alfa)            # noqa: F821
+        LVL1MenuItem('L1_TE5_ALFA_ANY_UNPAIRED_ISO').setLogic( TE5 & ALFA_ANY  & unpaired_isocond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_TE5_ALFA_EINE'            ).setLogic( TE5 & ALFA_EINE & physcond).setTriggerType(TT.alfa)            # noqa: F821
         
-        LVL1MenuItem('L1_TRT_ALFA_ANY'             ).setLogic( NIMTRT & ALFA_ANY & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_TRT_ALFA_ANY_UNPAIRED_ISO').setLogic( NIMTRT & ALFA_ANY & unpaired_isocond).setTriggerType(TT.alfa)
+        LVL1MenuItem('L1_TRT_ALFA_ANY'             ).setLogic( NIMTRT & ALFA_ANY & physcond).setTriggerType(TT.alfa)          # noqa: F821
+        LVL1MenuItem('L1_TRT_ALFA_ANY_UNPAIRED_ISO').setLogic( NIMTRT & ALFA_ANY & unpaired_isocond).setTriggerType(TT.alfa)  # noqa: F821
                    
-        LVL1MenuItem('L1_TRT_ALFA_ANY_VETO_MBTS'           ).setLogic( NIMTRT & Not(MBTS_INNER) & ALFA_ANY & physcond).setTriggerType(TT.alfa)
+        LVL1MenuItem('L1_TRT_ALFA_ANY_VETO_MBTS'           ).setLogic( NIMTRT & Not(MBTS_INNER) & ALFA_ANY & physcond).setTriggerType(TT.alfa)    # noqa: F821
 
-        LVL1MenuItem('L1_TRT_ALFA_EINE'                    ).setLogic( NIMTRT & ALFA_EINE & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_TRT_ALFA_EINE_VETO_MBTS'          ).setLogic( NIMTRT & Not(MBTS_INNER) & ALFA_EINE & physcond).setTriggerType(TT.alfa)
+        LVL1MenuItem('L1_TRT_ALFA_EINE'                    ).setLogic( NIMTRT & ALFA_EINE & physcond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_TRT_ALFA_EINE_VETO_MBTS'          ).setLogic( NIMTRT & Not(MBTS_INNER) & ALFA_EINE & physcond).setTriggerType(TT.alfa)    # noqa: F821
         
-        LVL1MenuItem('L1_ALFA_ELASTIC_VETO_MBTS'                  ).setLogic( Not(MBTS_INNER) & ALFA_ELASTIC & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_ELASTIC_UNPAIRED_ISO'               ).setLogic( ALFA_ELASTIC & unpaired_isocond).setTriggerType(TT.alfa)
+        LVL1MenuItem('L1_ALFA_ELASTIC_VETO_MBTS'                  ).setLogic( Not(MBTS_INNER) & ALFA_ELASTIC & physcond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_ELASTIC_UNPAIRED_ISO'               ).setLogic( ALFA_ELASTIC & unpaired_isocond).setTriggerType(TT.alfa)    # noqa: F821
 
-        LVL1MenuItem('L1_ALFA_ANTI_ELASTIC_VETO_MBTS'             ).setLogic( Not(MBTS_INNER) & ALFA_ANTI_ELASTIC & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_ANTI_ELASTIC_UNPAIRED_ISO').setLogic( ALFA_ANTI_ELASTIC & unpaired_isocond).setTriggerType(TT.alfa)
+        LVL1MenuItem('L1_ALFA_ANTI_ELASTIC_VETO_MBTS'             ).setLogic( Not(MBTS_INNER) & ALFA_ANTI_ELASTIC & physcond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_ANTI_ELASTIC_UNPAIRED_ISO').setLogic( ALFA_ANTI_ELASTIC & unpaired_isocond).setTriggerType(TT.alfa)    # noqa: F821
 
-        LVL1MenuItem('L1_ALFA_ANY_VETO_MBTS'                      ).setLogic( Not(MBTS_INNER) & ALFA_ANY & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_ANY_VETO_MBTS_UNPAIRED_ISO'         ).setLogic( Not(MBTS_INNER) & ALFA_ANY & unpaired_isocond).setTriggerType(TT.alfa)
+        LVL1MenuItem('L1_ALFA_ANY_VETO_MBTS'                      ).setLogic( Not(MBTS_INNER) & ALFA_ANY & physcond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_ANY_VETO_MBTS_UNPAIRED_ISO'         ).setLogic( Not(MBTS_INNER) & ALFA_ANY & unpaired_isocond).setTriggerType(TT.alfa)    # noqa: F821
                 
-        LVL1MenuItem('L1_LHCF_ALFA_ANY_A'             ).setLogic( NIMLHCF & ALFA_ANY_A & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_LHCF_ALFA_ANY_C'             ).setLogic( NIMLHCF & ALFA_ANY_C & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_LHCF_ALFA_ANY_A_UNPAIRED_ISO').setLogic( NIMLHCF & ALFA_ANY_A & unpaired_isocond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_LHCF_ALFA_ANY_C_UNPAIRED_ISO').setLogic( NIMLHCF & ALFA_ANY_C & unpaired_isocond).setTriggerType(TT.alfa)
+        LVL1MenuItem('L1_LHCF_ALFA_ANY_A'             ).setLogic( NIMLHCF & ALFA_ANY_A & physcond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_LHCF_ALFA_ANY_C'             ).setLogic( NIMLHCF & ALFA_ANY_C & physcond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_LHCF_ALFA_ANY_A_UNPAIRED_ISO').setLogic( NIMLHCF & ALFA_ANY_A & unpaired_isocond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_LHCF_ALFA_ANY_C_UNPAIRED_ISO').setLogic( NIMLHCF & ALFA_ANY_C & unpaired_isocond).setTriggerType(TT.alfa)    # noqa: F821
         
-        LVL1MenuItem('L1_ALFA_BGT' ).setLogic(RNDM3 & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_BGT_UNPAIRED_ISO' ).setLogic(RNDM3 & unpaired_isocond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_BGT_BGRP10').setLogic(RNDM3 & alfacalib).setTriggerType(TT.alfa)
-
-        LVL1MenuItem('L1_ALFA_SHOWSYST5').setLogic( (ALFA_ANY_A & ALFA_ANY_C) & physcond).setTriggerType(TT.alfa)
-
-        LVL1MenuItem('L1_ALFA_SYST9' ).setLogic( ALFA_B7L1U & ALFA_A7L1U & ALFA_A7R1U & ALFA_B7R1U & Not(ALFA3_B7L1L | ALFA3_A7L1L | ALFA3_A7R1L | ALFA3_B7R1L) & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_SYST10').setLogic( ALFA_B7L1L & ALFA_A7L1L & ALFA_A7R1L & ALFA_B7R1L & Not(ALFA3_B7L1U | ALFA3_A7L1U | ALFA3_A7R1U | ALFA3_B7R1U) & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_SYST11').setLogic( ALFA_B7L1U & ALFA_A7L1U & ALFA_A7R1U & ALFA_B7R1U & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_SYST12').setLogic( ALFA_B7L1L & ALFA_A7L1L & ALFA_A7R1L & ALFA_B7R1L & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_SYST17').setLogic( ALFA_LU & ALFA_RU & physcond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_SYST18').setLogic( ALFA_LL & ALFA_RL & physcond).setTriggerType(TT.alfa)
+        LVL1MenuItem('L1_ALFA_BGT' ).setLogic(RNDM3 & physcond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_BGT_UNPAIRED_ISO' ).setLogic(RNDM3 & unpaired_isocond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_BGT_BGRP10').setLogic(RNDM3 & alfacalib).setTriggerType(TT.alfa)    # noqa: F821
+
+        LVL1MenuItem('L1_ALFA_SHOWSYST5').setLogic( (ALFA_ANY_A & ALFA_ANY_C) & physcond).setTriggerType(TT.alfa)    # noqa: F821
+
+        LVL1MenuItem('L1_ALFA_SYST9' ).setLogic( ALFA_B7L1U & ALFA_A7L1U & ALFA_A7R1U & ALFA_B7R1U & Not(ALFA3_B7L1L | ALFA3_A7L1L | ALFA3_A7R1L | ALFA3_B7R1L) & physcond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SYST10').setLogic( ALFA_B7L1L & ALFA_A7L1L & ALFA_A7R1L & ALFA_B7R1L & Not(ALFA3_B7L1U | ALFA3_A7L1U | ALFA3_A7R1U | ALFA3_B7R1U) & physcond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SYST11').setLogic( ALFA_B7L1U & ALFA_A7L1U & ALFA_A7R1U & ALFA_B7R1U & physcond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SYST12').setLogic( ALFA_B7L1L & ALFA_A7L1L & ALFA_A7R1L & ALFA_B7R1L & physcond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SYST17').setLogic( ALFA_LU & ALFA_RU & physcond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SYST18').setLogic( ALFA_LL & ALFA_RL & physcond).setTriggerType(TT.alfa)    # noqa: F821
        
-        LVL1MenuItem('L1_ALFA_ANY').setLogic(ALFA_ANY & physcond).setTriggerType(TT.alfa)
+        LVL1MenuItem('L1_ALFA_ANY').setLogic(ALFA_ANY & physcond).setTriggerType(TT.alfa)    # noqa: F821
         
-        LVL1MenuItem('L1_ALFA_ANY_EMPTY').setLogic(ALFA_ANY & cosmiccond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_ANY_FIRSTEMPTY').setLogic(ALFA_ANY & firstempty).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_ANY_UNPAIRED_ISO').setLogic(ALFA_ANY & unpaired_isocond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_ANY_UNPAIRED_NONISO').setLogic(ALFA_ANY & unpaired_nonisocond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_ANY_BGRP10').setLogic(ALFA_ANY & alfacalib).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_ANY_ABORTGAPNOTCALIB').setLogic( ALFA_ANY & abortgap).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_ANY_CALIB').setLogic( ALFA_ANY & calibcond).setTriggerType(TT.alfa)
+        LVL1MenuItem('L1_ALFA_ANY_EMPTY').setLogic(ALFA_ANY & cosmiccond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_ANY_FIRSTEMPTY').setLogic(ALFA_ANY & firstempty).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_ANY_UNPAIRED_ISO').setLogic(ALFA_ANY & unpaired_isocond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_ANY_UNPAIRED_NONISO').setLogic(ALFA_ANY & unpaired_nonisocond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_ANY_BGRP10').setLogic(ALFA_ANY & alfacalib).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_ANY_ABORTGAPNOTCALIB').setLogic( ALFA_ANY & abortgap).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_ANY_CALIB').setLogic( ALFA_ANY & calibcond).setTriggerType(TT.alfa)    # noqa: F821
 
-        LVL1MenuItem('L1_ALFA_ANY_A_EMPTY').setLogic(ALFA_ANY_A & cosmiccond).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_ANY_C_EMPTY').setLogic(ALFA_ANY_C & cosmiccond).setTriggerType(TT.alfa)
+        LVL1MenuItem('L1_ALFA_ANY_A_EMPTY').setLogic(ALFA_ANY_A & cosmiccond).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_ANY_C_EMPTY').setLogic(ALFA_ANY_C & cosmiccond).setTriggerType(TT.alfa)    # noqa: F821
 
         ## ALFA _OD items (LUT 26, 12 Outputs)
-        LVL1MenuItem('L1_ALFA_B7L1U_OD').setLogic(ALFA_B7L1U_OD & BGRP0).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_B7L1L_OD').setLogic(ALFA_B7L1L_OD & BGRP0).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_A7L1U_OD').setLogic(ALFA_A7L1U_OD & BGRP0).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_A7L1L_OD').setLogic(ALFA_A7L1L_OD & BGRP0).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_A7R1U_OD').setLogic(ALFA_A7R1U_OD & BGRP0).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_A7R1L_OD').setLogic(ALFA_A7R1L_OD & BGRP0).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_B7R1U_OD').setLogic(ALFA_B7R1U_OD & BGRP0).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_B7R1L_OD').setLogic(ALFA_B7R1L_OD & BGRP0).setTriggerType(TT.alfa)
-
-        LVL1MenuItem('L1_ALFA_B7L1_OD').setLogic( (ALFA_B7L1U_OD & ALFA_B7L1L_OD) & BGRP0).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_A7L1_OD').setLogic( (ALFA_A7L1U_OD & ALFA_A7L1L_OD) & BGRP0).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_B7R1_OD').setLogic( (ALFA_B7R1U_OD & ALFA_B7R1L_OD) & BGRP0).setTriggerType(TT.alfa)
-        LVL1MenuItem('L1_ALFA_A7R1_OD').setLogic( (ALFA_A7R1U_OD & ALFA_A7R1L_OD) & BGRP0).setTriggerType(TT.alfa)
+        LVL1MenuItem('L1_ALFA_B7L1U_OD').setLogic(ALFA_B7L1U_OD & BGRP0).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_B7L1L_OD').setLogic(ALFA_B7L1L_OD & BGRP0).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_A7L1U_OD').setLogic(ALFA_A7L1U_OD & BGRP0).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_A7L1L_OD').setLogic(ALFA_A7L1L_OD & BGRP0).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_A7R1U_OD').setLogic(ALFA_A7R1U_OD & BGRP0).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_A7R1L_OD').setLogic(ALFA_A7R1L_OD & BGRP0).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_B7R1U_OD').setLogic(ALFA_B7R1U_OD & BGRP0).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_B7R1L_OD').setLogic(ALFA_B7R1L_OD & BGRP0).setTriggerType(TT.alfa)    # noqa: F821
+
+        LVL1MenuItem('L1_ALFA_B7L1_OD').setLogic( (ALFA_B7L1U_OD & ALFA_B7L1L_OD) & BGRP0).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_A7L1_OD').setLogic( (ALFA_A7L1U_OD & ALFA_A7L1L_OD) & BGRP0).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_B7R1_OD').setLogic( (ALFA_B7R1U_OD & ALFA_B7R1L_OD) & BGRP0).setTriggerType(TT.alfa)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_A7R1_OD').setLogic( (ALFA_A7R1U_OD & ALFA_A7R1L_OD) & BGRP0).setTriggerType(TT.alfa)    # noqa: F821
 
         #if (('Physics_HI_v3' not in TriggerFlags.triggerMenuSetup()) and ('MC_HI_v3' not in TriggerFlags.triggerMenuSetup())):
             # Topo items (keep them all together)
@@ -1360,173 +1350,173 @@ class ItemDef:
             try:
 
                     # M8 menu
-                    #LVL1MenuItem('L1_MJJ-4').setLogic( TOPO_4INVM9999_AJ0s6_AJ0s6 & physcond)
-                    #LVL1MenuItem('L1_MJJ-3').setLogic( TOPO_3INVM9999_AJ0s6_AJ0s6 & physcond)
-                    #LVL1MenuItem('L1_MJJ-2').setLogic( TOPO_2INVM9999_AJ0s6_AJ0s6 & physcond)
-                    #LVL1MenuItem('L1_MJJ-1').setLogic( TOPO_1INVM9999_AJ0s6_AJ0s6 & physcond)
+                    #LVL1MenuItem('L1_MJJ-4').setLogic( TOPO_4INVM9999_AJ0s6_AJ0s6 & physcond)    # noqa: F821
+                    #LVL1MenuItem('L1_MJJ-3').setLogic( TOPO_3INVM9999_AJ0s6_AJ0s6 & physcond)    # noqa: F821
+                    #LVL1MenuItem('L1_MJJ-2').setLogic( TOPO_2INVM9999_AJ0s6_AJ0s6 & physcond)    # noqa: F821
+                    #LVL1MenuItem('L1_MJJ-1').setLogic( TOPO_1INVM9999_AJ0s6_AJ0s6 & physcond)    # noqa: F821
 
-                    #LVL1MenuItem('L1_HT200-J20s5.ETA49').setLogic( TOPO_HT200_AJ20s5ETA49 & physcond)
-                    #LVL1MenuItem('L1_HT190-J20s5.ETA49').setLogic( TOPO_HT190_AJ20s5ETA49 & physcond)
-                    #LVL1MenuItem('L1_HT1-J0.ETA49').setLogic( TOPO_HT1_AJ0allETA49 & physcond)
+                    #LVL1MenuItem('L1_HT200-J20s5.ETA49').setLogic( TOPO_HT200_AJ20s5ETA49 & physcond)    # noqa: F821
+                    #LVL1MenuItem('L1_HT190-J20s5.ETA49').setLogic( TOPO_HT190_AJ20s5ETA49 & physcond)    # noqa: F821
+                    #LVL1MenuItem('L1_HT1-J0.ETA49').setLogic( TOPO_HT1_AJ0allETA49 & physcond)    # noqa: F821
 
-                    # LVL1MenuItem('L1_JPSI-1M5-EM6').setLogic( TOPO_1INVM5_EM6s2_EMall & physcond)
-                    #LVL1MenuItem('L1_JPSI-1M5-EMs').setLogic( TOPO_1INVM5_EMs2_EMs & physcond)
-                    #LVL1MenuItem('L1_JPSI-1M5-EM6s').setLogic( TOPO_1INVM5_EM6s2_EMs & physcond)
-                    #LVL1MenuItem('L1_JPSI-1M5-EM12s').setLogic( TOPO_1INVM5_EM12s2_EMs & physcond)
+                    # LVL1MenuItem('L1_JPSI-1M5-EM6').setLogic( TOPO_1INVM5_EM6s2_EMall & physcond)    # noqa: F821
+                    #LVL1MenuItem('L1_JPSI-1M5-EMs').setLogic( TOPO_1INVM5_EMs2_EMs & physcond)    # noqa: F821
+                    #LVL1MenuItem('L1_JPSI-1M5-EM6s').setLogic( TOPO_1INVM5_EM6s2_EMs & physcond)    # noqa: F821
+                    #LVL1MenuItem('L1_JPSI-1M5-EM12s').setLogic( TOPO_1INVM5_EM12s2_EMs & physcond)    # noqa: F821
 
                     ### NOT WORKING due to acceptaed number of bits in TOPO1
-                    LVL1MenuItem("L1_2MU4-BO"     ).setLogic( TOPO_MULT_CMU4ab.x(2) & physcond)
-                    LVL1MenuItem("L1_2MU6-BO"     ).setLogic( TOPO_MULT_CMU6ab.x(2) & physcond)
-                    LVL1MenuItem("L1_MU6MU4-BO").setLogic( TOPO_MULT_CMU4ab.x(2) & TOPO_MULT_CMU6ab & physcond)
+                    LVL1MenuItem("L1_2MU4-BO"     ).setLogic( TOPO_MULT_CMU4ab.x(2) & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_2MU6-BO"     ).setLogic( TOPO_MULT_CMU6ab.x(2) & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_MU6MU4-BO").setLogic( TOPO_MULT_CMU4ab.x(2) & TOPO_MULT_CMU6ab & physcond)    # noqa: F821
 
                     # B-jet
-                    LVL1MenuItem('L1_BTAG-MU4J15').setLogic( TOPO_0DR04_MU4ab_CJ15ab & physcond)
-                    LVL1MenuItem('L1_BTAG-MU4J30').setLogic( TOPO_0DR04_MU4ab_CJ30ab & physcond)
-                    LVL1MenuItem('L1_BTAG-MU6J20').setLogic( TOPO_0DR04_MU6ab_CJ20ab & physcond)
-                    LVL1MenuItem('L1_BTAG-MU6J25').setLogic( TOPO_0DR04_MU6ab_CJ25ab & physcond)
-                    LVL1MenuItem('L1_BTAG-MU4J20').setLogic( TOPO_0DR04_MU4ab_CJ20ab & physcond)
-                    LVL1MenuItem('L1_3J15_BTAG-MU4J15').setLogic( J15.x(3) & TOPO_0DR04_MU4ab_CJ15ab & physcond)
-                    LVL1MenuItem('L1_3J15_BTAG-MU4J30').setLogic( J15.x(3) & TOPO_0DR04_MU4ab_CJ30ab & physcond)
-                    LVL1MenuItem('L1_3J15_BTAG-MU6J25').setLogic( J15.x(3) & TOPO_0DR04_MU6ab_CJ25ab & physcond)
-                    LVL1MenuItem('L1_3J20_BTAG-MU4J20').setLogic( J20.x(3) & TOPO_0DR04_MU4ab_CJ20ab & physcond)
-                    #LVL1MenuItem('L1_3J20_BTAG-MU4J30').setLogic( J20.x(3) & TOPO_0DR04_MU4ab_CJ30ab & physcond)
-                    #LVL1MenuItem('L1_3J20_BTAG-MU6J25').setLogic( J20.x(3) & TOPO_0DR04_MU6ab_CJ25ab & physcond)
+                    LVL1MenuItem('L1_BTAG-MU4J15').setLogic( TOPO_0DR04_MU4ab_CJ15ab & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_BTAG-MU4J30').setLogic( TOPO_0DR04_MU4ab_CJ30ab & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_BTAG-MU6J20').setLogic( TOPO_0DR04_MU6ab_CJ20ab & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_BTAG-MU6J25').setLogic( TOPO_0DR04_MU6ab_CJ25ab & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_BTAG-MU4J20').setLogic( TOPO_0DR04_MU4ab_CJ20ab & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_3J15_BTAG-MU4J15').setLogic( J15.x(3) & TOPO_0DR04_MU4ab_CJ15ab & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_3J15_BTAG-MU4J30').setLogic( J15.x(3) & TOPO_0DR04_MU4ab_CJ30ab & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_3J15_BTAG-MU6J25').setLogic( J15.x(3) & TOPO_0DR04_MU6ab_CJ25ab & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_3J20_BTAG-MU4J20').setLogic( J20.x(3) & TOPO_0DR04_MU4ab_CJ20ab & physcond)    # noqa: F821
+                    #LVL1MenuItem('L1_3J20_BTAG-MU4J30').setLogic( J20.x(3) & TOPO_0DR04_MU4ab_CJ30ab & physcond)    # noqa: F821
+                    #LVL1MenuItem('L1_3J20_BTAG-MU6J25').setLogic( J20.x(3) & TOPO_0DR04_MU6ab_CJ25ab & physcond)    # noqa: F821
 
                     # ZH
-                    LVL1MenuItem('L1_DPHI-AJ20s2XE50'  ).setLogic( TOPO_10MINDPHI_AJ20s2_XE50    & physcond)
+                    LVL1MenuItem('L1_DPHI-AJ20s2XE50'  ).setLogic( TOPO_10MINDPHI_AJ20s2_XE50    & physcond)    # noqa: F821
 
-                    #LVL1MenuItem('L1_J40_DPHI-Js2XE50'  ).setLogic( J40 & TOPO_10MINDPHI_Js2_XE50    & physcond) 
-                    LVL1MenuItem('L1_J40_DPHI-J20s2XE50').setLogic( J40 & TOPO_10MINDPHI_J20s2_XE50  & physcond) 
-                    LVL1MenuItem('L1_J40_DPHI-J20s2XE30').setLogic( J40 & TOPO_10MINDPHI_J20s2_XE30  & physcond)
-                    LVL1MenuItem('L1_MU4_J20_XE30_DPHI-J20s2XE30').setLogic( MU4 & J20 & XE30 & TOPO_10MINDPHI_J20s2_XE30  & physcond)
-                    LVL1MenuItem('L1_2MU4_J20_XE30_DPHI-J20s2XE30').setLogic( MU4.x(2) & J20 & XE30 & TOPO_10MINDPHI_J20s2_XE30  & physcond)
-                    LVL1MenuItem('L1_MU4_2EM3_J20_XE30_DPHI-J20s2XE30').setLogic( MU4 & EM3.x(2) & J20 & XE30 & TOPO_10MINDPHI_J20s2_XE30  & physcond)
-                    LVL1MenuItem('L1_3EM3_J40_XE50_DPHI-J20s2XE50').setLogic( EM3.x(3) & J40 & XE50 & TOPO_10MINDPHI_J20s2_XE50  & physcond)
+                    #LVL1MenuItem('L1_J40_DPHI-Js2XE50'  ).setLogic( J40 & TOPO_10MINDPHI_Js2_XE50    & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_J40_DPHI-J20s2XE50').setLogic( J40 & TOPO_10MINDPHI_J20s2_XE50  & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_J40_DPHI-J20s2XE30').setLogic( J40 & TOPO_10MINDPHI_J20s2_XE30  & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_MU4_J20_XE30_DPHI-J20s2XE30').setLogic( MU4 & J20 & XE30 & TOPO_10MINDPHI_J20s2_XE30  & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_2MU4_J20_XE30_DPHI-J20s2XE30').setLogic( MU4.x(2) & J20 & XE30 & TOPO_10MINDPHI_J20s2_XE30  & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_MU4_2EM3_J20_XE30_DPHI-J20s2XE30').setLogic( MU4 & EM3.x(2) & J20 & XE30 & TOPO_10MINDPHI_J20s2_XE30  & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_3EM3_J40_XE50_DPHI-J20s2XE50').setLogic( EM3.x(3) & J40 & XE50 & TOPO_10MINDPHI_J20s2_XE50  & physcond)    # noqa: F821
 
 
-                    LVL1MenuItem('L1_J40_XE50_DPHI-J20s2XE50').setLogic( J40 & XE50 & TOPO_10MINDPHI_J20s2_XE50  & physcond) 
-                    LVL1MenuItem('L1_J40_DPHI-J20XE50'  ).setLogic( J40 & TOPO_10MINDPHI_J20ab_XE50  & physcond) 
-                    LVL1MenuItem('L1_J40_DPHI-CJ20XE50' ).setLogic( J40 & TOPO_10MINDPHI_CJ20ab_XE50 & physcond) 
+                    LVL1MenuItem('L1_J40_XE50_DPHI-J20s2XE50').setLogic( J40 & XE50 & TOPO_10MINDPHI_J20s2_XE50  & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_J40_DPHI-J20XE50'  ).setLogic( J40 & TOPO_10MINDPHI_J20ab_XE50  & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_J40_DPHI-CJ20XE50' ).setLogic( J40 & TOPO_10MINDPHI_CJ20ab_XE50 & physcond)    # noqa: F821
 
                     #ATR-15243 Higgsino
-                    LVL1MenuItem('L1_2MU4_J40_XE50'  ).setLogic( MU4.x(2) & J40 & XE50  & physcond).setTriggerType(TT.calo)
-                    LVL1MenuItem('L1_2MU4_J20_XE40_DPHI-J20s2XE30').setLogic( MU4.x(2) & J20 & XE40 & TOPO_10MINDPHI_J20s2_XE30  & physcond)
-                    LVL1MenuItem('L1_2MU4_J20_XE50_DPHI-J20s2XE30').setLogic( MU4.x(2) & J20 & XE50 & TOPO_10MINDPHI_J20s2_XE30  & physcond)
+                    LVL1MenuItem('L1_2MU4_J40_XE50'  ).setLogic( MU4.x(2) & J40 & XE50  & physcond).setTriggerType(TT.calo)    # noqa: F821
+                    LVL1MenuItem('L1_2MU4_J20_XE40_DPHI-J20s2XE30').setLogic( MU4.x(2) & J20 & XE40 & TOPO_10MINDPHI_J20s2_XE30  & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_2MU4_J20_XE50_DPHI-J20s2XE30').setLogic( MU4.x(2) & J20 & XE50 & TOPO_10MINDPHI_J20s2_XE30  & physcond)    # noqa: F821
 
-                    LVL1MenuItem('L1_MU4_J30_XE40_DPHI-J20s2XE30').setLogic( MU4 & J30 & XE40 & TOPO_10MINDPHI_J20s2_XE30  & physcond)
-                    LVL1MenuItem('L1_MU4_J50_XE50_DPHI-J20s2XE30').setLogic( MU4 & J50 & XE50 & TOPO_10MINDPHI_J20s2_XE30  & physcond)
-                    LVL1MenuItem('L1_MU4_XE60'  ).setLogic( MU4 & XE60  & physcond).setTriggerType(TT.calo)
-                    LVL1MenuItem('L1_2MU4_XE60'  ).setLogic( MU4.x(2) & XE60  & physcond).setTriggerType(TT.calo)
+                    LVL1MenuItem('L1_MU4_J30_XE40_DPHI-J20s2XE30').setLogic( MU4 & J30 & XE40 & TOPO_10MINDPHI_J20s2_XE30  & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_MU4_J50_XE50_DPHI-J20s2XE30').setLogic( MU4 & J50 & XE50 & TOPO_10MINDPHI_J20s2_XE30  & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_MU4_XE60'  ).setLogic( MU4 & XE60  & physcond).setTriggerType(TT.calo)          # noqa: F821
+                    LVL1MenuItem('L1_2MU4_XE60'  ).setLogic( MU4.x(2) & XE60  & physcond).setTriggerType(TT.calo)    # noqa: F821
 
                     # HT
-                    #LVL1MenuItem('L1_HT0-J0.ETA49'     ).setLogic( TOPO_HT0_AJ0allETA49    & physcond)
-                    LVL1MenuItem('L1_HT190-J15.ETA21'  ).setLogic( TOPO_HT190_AJ15allETA21 & physcond)
-                    LVL1MenuItem('L1_HT190-J15s5.ETA21').setLogic( TOPO_HT190_J15s5ETA21   & physcond)
-                    LVL1MenuItem('L1_HT150-J20.ETA31'  ).setLogic( TOPO_HT150_AJ20allETA31 & physcond)
-                    LVL1MenuItem('L1_HT150-J20s5.ETA31').setLogic( TOPO_HT150_J20s5ETA31   & physcond)
+                    #LVL1MenuItem('L1_HT0-J0.ETA49'     ).setLogic( TOPO_HT0_AJ0allETA49    & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_HT190-J15.ETA21'  ).setLogic( TOPO_HT190_AJ15allETA21 & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_HT190-J15s5.ETA21').setLogic( TOPO_HT190_J15s5ETA21   & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_HT150-J20.ETA31'  ).setLogic( TOPO_HT150_AJ20allETA31 & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_HT150-J20s5.ETA31').setLogic( TOPO_HT150_J20s5ETA31   & physcond)    # noqa: F821
 
 
-                    LVL1MenuItem('L1_HT150-J20s5.ETA31_MJJ-400').setLogic( TOPO_HT150_J20s5ETA31 & TOPO_400INVM9999_AJ30s6_AJ20s6 & physcond)# new
-                    LVL1MenuItem('L1_HT150-J20s5.ETA31_MJJ-400-CF').setLogic( TOPO_HT150_J20s5ETA31 & TOPO_400INVM9999_AJ30s6ETA31_AJ20s631ETA49 & physcond) #new 
+                    LVL1MenuItem('L1_HT150-J20s5.ETA31_MJJ-400').setLogic( TOPO_HT150_J20s5ETA31 & TOPO_400INVM9999_AJ30s6_AJ20s6 & physcond)                    # noqa: F821
+                    LVL1MenuItem('L1_HT150-J20s5.ETA31_MJJ-400-CF').setLogic( TOPO_HT150_J20s5ETA31 & TOPO_400INVM9999_AJ30s6ETA31_AJ20s631ETA49 & physcond)     # noqa: F821
                     # Jpsi T&P
-                    LVL1MenuItem("L1_JPSI-1M5"     ).setLogic( TOPO_1INVM5_EMs1_EMs6   & physcond)
-                    LVL1MenuItem("L1_JPSI-1M5-EM7" ).setLogic( TOPO_1INVM5_EM7s1_EMs6  & physcond)
-                    LVL1MenuItem("L1_JPSI-1M5-EM12").setLogic( TOPO_1INVM5_EM12s1_EMs6 & physcond)
+                    LVL1MenuItem("L1_JPSI-1M5"     ).setLogic( TOPO_1INVM5_EMs1_EMs6   & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_JPSI-1M5-EM7" ).setLogic( TOPO_1INVM5_EM7s1_EMs6  & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_JPSI-1M5-EM12").setLogic( TOPO_1INVM5_EM12s1_EMs6 & physcond)    # noqa: F821
 
                     # # W T&P
                     # if not '_v6' in TriggerFlags.triggerMenuSetup():
-                    #     LVL1MenuItem("L1_W-05DPHI-JXE-0"   ).setLogic( TOPO_05MINDPHI_AJj20s6_XE0 & physcond)
-                    #     LVL1MenuItem("L1_W-10DPHI-JXE-0"   ).setLogic( TOPO_10MINDPHI_AJj20s6_XE0 & physcond)
-                    #     LVL1MenuItem("L1_W-15DPHI-JXE-0"   ).setLogic( TOPO_15MINDPHI_AJj20s6_XE0 & physcond)
-                    #     LVL1MenuItem("L1_W-10DPHI-EMXE-0"  ).setLogic( TOPO_10MINDPHI_EM10s6_XE0  & physcond)
-                    #     LVL1MenuItem("L1_W-15DPHI-EMXE-0"  ).setLogic( TOPO_15MINDPHI_EM10s6_XE0  & physcond)
-                    #     LVL1MenuItem("L1_W-05DPHI-EMXE-1"  ).setLogic( TOPO_05MINDPHI_EM15s6_XE0  & physcond)
-                    #     LVL1MenuItem("L1_W-05RO-XEHT-0"    ).setLogic( TOPO_05RATIO_XE0_HT0_AJj15allETA49   & physcond)
-                    #     LVL1MenuItem("L1_W-08RO-XEHT-0"    ).setLogic( TOPO_08RATIO_XE0_HT0_AJj15allETA49   & physcond)
-                    #     LVL1MenuItem("L1_W-90RO2-XEHT-0"   ).setLogic( TOPO_90RATIO2_XE0_HT0_AJj15allETA49  & physcond)
-                    #     LVL1MenuItem("L1_W-250RO2-XEHT-0"  ).setLogic( TOPO_250RATIO2_XE0_HT0_AJj15allETA49 & physcond)
-                    #     LVL1MenuItem("L1_W-HT20-JJ15.ETA49").setLogic( TOPO_HT20_AJj15allETA49 & physcond)
-                    #     LVL1MenuItem("L1_W-NOMATCH"        ).setLogic( TOPO_NOT_02MATCH_EM10s1_AJj15allETA49 & physcond)
-                    #     LVL1MenuItem("L1_EM10_W-MT25").setLogic( TOPO_25MT_EM10s6_XE0 & EM10 & physcond)
-                    #     LVL1MenuItem("L1_EM10_W-MT30").setLogic( TOPO_30MT_EM10s6_XE0 & EM10 & physcond)
-                    #     LVL1MenuItem("L1_EM15_W-MT35").setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & physcond)
-                    #     LVL1MenuItem("L1_EM10_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE_W-90RO2-XEHT-0" ).setLogic( TOPO_25MT_EM10s6_XE0 & EM10 & TOPO_15MINDPHI_AJj20s6_XE0 & TOPO_15MINDPHI_EM10s6_XE0 & TOPO_90RATIO2_XE0_HT0_AJj15allETA49 & physcond)
-                    #     LVL1MenuItem("L1_EM10_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE_XS30"           ).setLogic( TOPO_25MT_EM10s6_XE0 & EM10 & TOPO_15MINDPHI_AJj20s6_XE0 & TOPO_15MINDPHI_EM10s6_XE0 & XS30 & physcond)
-                    #     LVL1MenuItem("L1_EM10_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE_XS20"           ).setLogic( TOPO_25MT_EM10s6_XE0 & EM10 & TOPO_15MINDPHI_AJj20s6_XE0 & TOPO_15MINDPHI_EM10s6_XE0 & XS20 & physcond)
-                    #     LVL1MenuItem("L1_EM10_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE"                ).setLogic( TOPO_25MT_EM10s6_XE0 & EM10 & TOPO_15MINDPHI_AJj20s6_XE0 & TOPO_15MINDPHI_EM10s6_XE0 & physcond)
-                    #     LVL1MenuItem("L1_EM15_W-MT35_W-05DPHI-JXE-0_W-05DPHI-EMXE_W-250RO2-XEHT-0").setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & TOPO_05MINDPHI_AJj20s6_XE0 & TOPO_05MINDPHI_EM15s6_XE0 & TOPO_250RATIO2_XE0_HT0_AJj15allETA49 & physcond)
-                    #     LVL1MenuItem("L1_EM15_W-MT35_W-05DPHI-JXE-0_W-05DPHI-EMXE_XS60"           ).setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & TOPO_05MINDPHI_AJj20s6_XE0 & TOPO_05MINDPHI_EM15s6_XE0 & XS60 & physcond)
-                    #     LVL1MenuItem("L1_EM15_W-MT35_W-05DPHI-JXE-0_W-05DPHI-EMXE_XS30"           ).setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & TOPO_05MINDPHI_AJj20s6_XE0 & TOPO_05MINDPHI_EM15s6_XE0 & XS30 & physcond)
-                    #     LVL1MenuItem("L1_EM15_W-MT35_W-05DPHI-JXE-0_W-05DPHI-EMXE"                ).setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & TOPO_05MINDPHI_AJj20s6_XE0 & TOPO_05MINDPHI_EM15s6_XE0 & physcond)
+                    #     LVL1MenuItem("L1_W-05DPHI-JXE-0"   ).setLogic( TOPO_05MINDPHI_AJj20s6_XE0 & physcond)    # noqa: F821
+                    #     LVL1MenuItem("L1_W-10DPHI-JXE-0"   ).setLogic( TOPO_10MINDPHI_AJj20s6_XE0 & physcond)    # noqa: F821
+                    #     LVL1MenuItem("L1_W-15DPHI-JXE-0"   ).setLogic( TOPO_15MINDPHI_AJj20s6_XE0 & physcond)    # noqa: F821
+                    #     LVL1MenuItem("L1_W-10DPHI-EMXE-0"  ).setLogic( TOPO_10MINDPHI_EM10s6_XE0  & physcond)    # noqa: F821
+                    #     LVL1MenuItem("L1_W-15DPHI-EMXE-0"  ).setLogic( TOPO_15MINDPHI_EM10s6_XE0  & physcond)    # noqa: F821
+                    #     LVL1MenuItem("L1_W-05DPHI-EMXE-1"  ).setLogic( TOPO_05MINDPHI_EM15s6_XE0  & physcond)    # noqa: F821
+                    #     LVL1MenuItem("L1_W-05RO-XEHT-0"    ).setLogic( TOPO_05RATIO_XE0_HT0_AJj15allETA49   & physcond)    # noqa: F821
+                    #     LVL1MenuItem("L1_W-08RO-XEHT-0"    ).setLogic( TOPO_08RATIO_XE0_HT0_AJj15allETA49   & physcond)    # noqa: F821
+                    #     LVL1MenuItem("L1_W-90RO2-XEHT-0"   ).setLogic( TOPO_90RATIO2_XE0_HT0_AJj15allETA49  & physcond)    # noqa: F821
+                    #     LVL1MenuItem("L1_W-250RO2-XEHT-0"  ).setLogic( TOPO_250RATIO2_XE0_HT0_AJj15allETA49 & physcond)    # noqa: F821
+                    #     LVL1MenuItem("L1_W-HT20-JJ15.ETA49").setLogic( TOPO_HT20_AJj15allETA49 & physcond)    # noqa: F821
+                    #     LVL1MenuItem("L1_W-NOMATCH"        ).setLogic( TOPO_NOT_02MATCH_EM10s1_AJj15allETA49 & physcond)    # noqa: F821
+                    #     LVL1MenuItem("L1_EM10_W-MT25").setLogic( TOPO_25MT_EM10s6_XE0 & EM10 & physcond)    # noqa: F821
+                    #     LVL1MenuItem("L1_EM10_W-MT30").setLogic( TOPO_30MT_EM10s6_XE0 & EM10 & physcond)    # noqa: F821
+                    #     LVL1MenuItem("L1_EM15_W-MT35").setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & physcond)    # noqa: F821
+                    #     LVL1MenuItem("L1_EM10_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE_W-90RO2-XEHT-0" ).setLogic( TOPO_25MT_EM10s6_XE0 & EM10 & TOPO_15MINDPHI_AJj20s6_XE0 & TOPO_15MINDPHI_EM10s6_XE0 & TOPO_90RATIO2_XE0_HT0_AJj15allETA49 & physcond)    # noqa: F821
+                    #     LVL1MenuItem("L1_EM10_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE_XS30"           ).setLogic( TOPO_25MT_EM10s6_XE0 & EM10 & TOPO_15MINDPHI_AJj20s6_XE0 & TOPO_15MINDPHI_EM10s6_XE0 & XS30 & physcond)    # noqa: F821
+                    #     LVL1MenuItem("L1_EM10_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE_XS20"           ).setLogic( TOPO_25MT_EM10s6_XE0 & EM10 & TOPO_15MINDPHI_AJj20s6_XE0 & TOPO_15MINDPHI_EM10s6_XE0 & XS20 & physcond)    # noqa: F821
+                    #     LVL1MenuItem("L1_EM10_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE"                ).setLogic( TOPO_25MT_EM10s6_XE0 & EM10 & TOPO_15MINDPHI_AJj20s6_XE0 & TOPO_15MINDPHI_EM10s6_XE0 & physcond)    # noqa: F821
+                    #     LVL1MenuItem("L1_EM15_W-MT35_W-05DPHI-JXE-0_W-05DPHI-EMXE_W-250RO2-XEHT-0").setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & TOPO_05MINDPHI_AJj20s6_XE0 & TOPO_05MINDPHI_EM15s6_XE0 & TOPO_250RATIO2_XE0_HT0_AJj15allETA49 & physcond)    # noqa: F821
+                    #     LVL1MenuItem("L1_EM15_W-MT35_W-05DPHI-JXE-0_W-05DPHI-EMXE_XS60"           ).setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & TOPO_05MINDPHI_AJj20s6_XE0 & TOPO_05MINDPHI_EM15s6_XE0 & XS60 & physcond)    # noqa: F821
+                    #     LVL1MenuItem("L1_EM15_W-MT35_W-05DPHI-JXE-0_W-05DPHI-EMXE_XS30"           ).setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & TOPO_05MINDPHI_AJj20s6_XE0 & TOPO_05MINDPHI_EM15s6_XE0 & XS30 & physcond)    # noqa: F821
+                    #     LVL1MenuItem("L1_EM15_W-MT35_W-05DPHI-JXE-0_W-05DPHI-EMXE"                ).setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & TOPO_05MINDPHI_AJj20s6_XE0 & TOPO_05MINDPHI_EM15s6_XE0 & physcond)    # noqa: F821
                     #else:
-                    LVL1MenuItem("L1_W-05DPHI-JXE-0"   ).setLogic( TOPO_05MINDPHI_AJj10s6_XE0 & physcond)
-                    LVL1MenuItem("L1_W-10DPHI-JXE-0"   ).setLogic( TOPO_10MINDPHI_AJj10s6_XE0 & physcond)
-                    LVL1MenuItem("L1_W-15DPHI-JXE-0"   ).setLogic( TOPO_15MINDPHI_AJj10s6_XE0 & physcond)
-                    LVL1MenuItem("L1_W-05DPHI-EMXE-1"  ).setLogic( TOPO_05MINDPHI_EM12s6_XE0  & physcond)
-
-                    LVL1MenuItem("L1_W-05DPHI-EM15XE-1"  ).setLogic( TOPO_05MINDPHI_EM15s6_XE0  & physcond)
-
-                    LVL1MenuItem("L1_W-15DPHI-EM15XE-1"  ).setLogic( TOPO_15MINDPHI_EM15s6_XE0  & physcond)
-                    LVL1MenuItem("L1_W-15DPHI-EMXE-1"  ).setLogic( TOPO_15MINDPHI_EM12s6_XE0  & physcond)
-                    LVL1MenuItem("L1_W-05RO-XEHT-0"    ).setLogic( TOPO_05RATIO_XE0_HT0_AJj15allETA49   & physcond)
-                    LVL1MenuItem("L1_W-90RO2-XEHT-0"   ).setLogic( TOPO_90RATIO2_XE0_HT0_AJj15allETA49  & physcond)
-                    LVL1MenuItem("L1_W-250RO2-XEHT-0"  ).setLogic( TOPO_250RATIO2_XE0_HT0_AJj15allETA49 & physcond)
-                    LVL1MenuItem("L1_W-HT20-JJ15.ETA49").setLogic( TOPO_HT20_AJj15allETA49 & physcond)
-                    LVL1MenuItem("L1_W-NOMATCH"        ).setLogic( TOPO_NOT_02MATCH_EM10s1_AJj15allETA49 & physcond)
-                    #LVL1MenuItem("L1_W-NOMATCH_W-05RO-XEEMHT").setLogic( TOPO_NOT_02MATCH_EM10s1_AJj15allETA49 & TOPO_05RATIO_XE0_SUM0_EM10s1_HT0_AJj15allETA49 & physcond)
-                    LVL1MenuItem("L1_EM12_W-MT25").setLogic( TOPO_25MT_EM12s6_XE0 & EM12 & physcond)
-                    #LVL1MenuItem("L1_EM12_W-MT30").setLogic( TOPO_30MT_EM12s6_XE0 & EM12 & physcond)
-                    LVL1MenuItem("L1_EM15_W-MT35").setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & physcond)
-
-                    LVL1MenuItem("L1_EM15_W-MT35_W-250RO2-XEHT-0_W-05DPHI-JXE-0_W-05DPHI-EM15XE" ).setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & TOPO_250RATIO2_XE0_HT0_AJj15allETA49 & TOPO_05MINDPHI_AJj10s6_XE0 & TOPO_05MINDPHI_EM15s6_XE0 & physcond)
-                    LVL1MenuItem("L1_EM15_W-MT35_XS60_W-05DPHI-JXE-0_W-05DPHI-EM15XE"            ).setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & XS60 & TOPO_05MINDPHI_AJj10s6_XE0 & TOPO_05MINDPHI_EM15s6_XE0 & physcond)
-                    LVL1MenuItem("L1_EM15_W-MT35_XS40_W-05DPHI-JXE-0_W-05DPHI-EM15XE"            ).setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & XS40 & TOPO_05MINDPHI_AJj10s6_XE0 & TOPO_05MINDPHI_EM15s6_XE0 & physcond)
-                    LVL1MenuItem("L1_EM15_W-MT35_XS60").setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & XS60 & physcond)
-
-                    LVL1MenuItem("L1_EM15VH_W-MT35_XS60").setLogic( TOPO_35MT_EM15s6_XE0 & EM15VH & XS60 & physcond)
-                    LVL1MenuItem("L1_EM20VH_W-MT35_XS60").setLogic( TOPO_35MT_EM15s6_XE0 & EM20VH & XS60 & physcond)
-                    LVL1MenuItem("L1_EM22VHI_W-MT35_XS40").setLogic( TOPO_35MT_EM15s6_XE0 & EM22VHI & XS40 & physcond)
+                    LVL1MenuItem("L1_W-05DPHI-JXE-0"   ).setLogic( TOPO_05MINDPHI_AJj10s6_XE0 & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_W-10DPHI-JXE-0"   ).setLogic( TOPO_10MINDPHI_AJj10s6_XE0 & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_W-15DPHI-JXE-0"   ).setLogic( TOPO_15MINDPHI_AJj10s6_XE0 & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_W-05DPHI-EMXE-1"  ).setLogic( TOPO_05MINDPHI_EM12s6_XE0  & physcond)    # noqa: F821
+
+                    LVL1MenuItem("L1_W-05DPHI-EM15XE-1"  ).setLogic( TOPO_05MINDPHI_EM15s6_XE0  & physcond)  # noqa: F821
+
+                    LVL1MenuItem("L1_W-15DPHI-EM15XE-1"  ).setLogic( TOPO_15MINDPHI_EM15s6_XE0  & physcond)  # noqa: F821
+                    LVL1MenuItem("L1_W-15DPHI-EMXE-1"  ).setLogic( TOPO_15MINDPHI_EM12s6_XE0  & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_W-05RO-XEHT-0"    ).setLogic( TOPO_05RATIO_XE0_HT0_AJj15allETA49   & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_W-90RO2-XEHT-0"   ).setLogic( TOPO_90RATIO2_XE0_HT0_AJj15allETA49  & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_W-250RO2-XEHT-0"  ).setLogic( TOPO_250RATIO2_XE0_HT0_AJj15allETA49 & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_W-HT20-JJ15.ETA49").setLogic( TOPO_HT20_AJj15allETA49 & physcond)                 # noqa: F821
+                    LVL1MenuItem("L1_W-NOMATCH"        ).setLogic( TOPO_NOT_02MATCH_EM10s1_AJj15allETA49 & physcond)   # noqa: F821
+                    #LVL1MenuItem("L1_W-NOMATCH_W-05RO-XEEMHT").setLogic( TOPO_NOT_02MATCH_EM10s1_AJj15allETA49 & TOPO_05RATIO_XE0_SUM0_EM10s1_HT0_AJj15allETA49 & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_EM12_W-MT25").setLogic( TOPO_25MT_EM12s6_XE0 & EM12 & physcond)    # noqa: F821
+                    #LVL1MenuItem("L1_EM12_W-MT30").setLogic( TOPO_30MT_EM12s6_XE0 & EM12 & physcond)   # noqa: F821
+                    LVL1MenuItem("L1_EM15_W-MT35").setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & physcond)    # noqa: F821
+
+                    LVL1MenuItem("L1_EM15_W-MT35_W-250RO2-XEHT-0_W-05DPHI-JXE-0_W-05DPHI-EM15XE" ).setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & TOPO_250RATIO2_XE0_HT0_AJj15allETA49 & TOPO_05MINDPHI_AJj10s6_XE0 & TOPO_05MINDPHI_EM15s6_XE0 & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_EM15_W-MT35_XS60_W-05DPHI-JXE-0_W-05DPHI-EM15XE"            ).setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & XS60 & TOPO_05MINDPHI_AJj10s6_XE0 & TOPO_05MINDPHI_EM15s6_XE0 & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_EM15_W-MT35_XS40_W-05DPHI-JXE-0_W-05DPHI-EM15XE"            ).setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & XS40 & TOPO_05MINDPHI_AJj10s6_XE0 & TOPO_05MINDPHI_EM15s6_XE0 & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_EM15_W-MT35_XS60").setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & XS60 & physcond)    # noqa: F821
+
+                    LVL1MenuItem("L1_EM15VH_W-MT35_XS60").setLogic( TOPO_35MT_EM15s6_XE0 & EM15VH & XS60 & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_EM20VH_W-MT35_XS60").setLogic( TOPO_35MT_EM15s6_XE0 & EM20VH & XS60 & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_EM22VHI_W-MT35_XS40").setLogic( TOPO_35MT_EM15s6_XE0 & EM22VHI & XS40 & physcond)  # noqa: F821
 
 
                     
-                    LVL1MenuItem("L1_EM12_W-MT35_XS40_W-05DPHI-JXE-0_W-05DPHI-EMXE"            ).setLogic( TOPO_35MT_EM12s6_XE0 & EM12 & XS40 & TOPO_05MINDPHI_AJj10s6_XE0 & TOPO_05MINDPHI_EM12s6_XE0 & physcond)
-                    LVL1MenuItem("L1_EM12_W-MT35").setLogic( TOPO_35MT_EM12s6_XE0 & EM12 & physcond)                    
-                    LVL1MenuItem("L1_EM12_W-MT35_W-250RO2-XEHT-0_W-05DPHI-JXE-0_W-05DPHI-EMXE" ).setLogic( TOPO_35MT_EM12s6_XE0 & EM12 & TOPO_250RATIO2_XE0_HT0_AJj15allETA49 & TOPO_05MINDPHI_AJj10s6_XE0 & TOPO_05MINDPHI_EM12s6_XE0 & physcond)
-                    LVL1MenuItem("L1_EM12_W-MT35_XS50").setLogic( TOPO_35MT_EM12s6_XE0 & EM12 & XS50 & physcond)
-                    LVL1MenuItem("L1_EM10VH_W-MT35_XS50").setLogic( TOPO_35MT_EM12s6_XE0 & EM10VH & XS50 & physcond)
-                    LVL1MenuItem("L1_W-15DPHI-EM15XE-0"  ).setLogic( TOPO_15MINDPHI_EM15s6_XE0  & physcond)
-                    LVL1MenuItem("L1_EM15_W-MT35_W-250RO2-XEHT-0_W-15DPHI-JXE-0_W-15DPHI-EM15XE" ).setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & TOPO_250RATIO2_XE0_HT0_AJj15allETA49 & TOPO_15MINDPHI_AJj10s6_XE0 & TOPO_15MINDPHI_EM15s6_XE0 & physcond)
-                    LVL1MenuItem("L1_EM15_W-MT35_XS60_W-15DPHI-JXE-0_W-15DPHI-EM15XE"            ).setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & XS60 & TOPO_15MINDPHI_AJj10s6_XE0 & TOPO_15MINDPHI_EM15s6_XE0 & physcond)
-                    LVL1MenuItem("L1_EM15_W-MT35_XS40_W-15DPHI-JXE-0_W-15DPHI-EM15XE"            ).setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & XS40 & TOPO_15MINDPHI_AJj10s6_XE0 & TOPO_15MINDPHI_EM15s6_XE0 & physcond)
-                    LVL1MenuItem("L1_W-15DPHI-EMXE-0"  ).setLogic( TOPO_15MINDPHI_EM12s6_XE0  & physcond)
-                    LVL1MenuItem("L1_EM12_W-MT35_XS30_W-15DPHI-JXE-0_W-15DPHI-EMXE"            ).setLogic( TOPO_35MT_EM12s6_XE0 & EM12 & XS30 & TOPO_15MINDPHI_AJj10s6_XE0 & TOPO_15MINDPHI_EM12s6_XE0 & physcond)
-                    LVL1MenuItem("L1_EM12_W-MT35_W-90RO2-XEHT-0_W-15DPHI-JXE-0_W-15DPHI-EMXE"  ).setLogic( TOPO_35MT_EM12s6_XE0 & EM12 & TOPO_90RATIO2_XE0_HT0_AJj15allETA49 & TOPO_15MINDPHI_AJj10s6_XE0 & TOPO_15MINDPHI_EM12s6_XE0 & physcond)
+                    LVL1MenuItem("L1_EM12_W-MT35_XS40_W-05DPHI-JXE-0_W-05DPHI-EMXE"            ).setLogic( TOPO_35MT_EM12s6_XE0 & EM12 & XS40 & TOPO_05MINDPHI_AJj10s6_XE0 & TOPO_05MINDPHI_EM12s6_XE0 & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_EM12_W-MT35").setLogic( TOPO_35MT_EM12s6_XE0 & EM12 & physcond)      # noqa: F821   
+                    LVL1MenuItem("L1_EM12_W-MT35_W-250RO2-XEHT-0_W-05DPHI-JXE-0_W-05DPHI-EMXE" ).setLogic( TOPO_35MT_EM12s6_XE0 & EM12 & TOPO_250RATIO2_XE0_HT0_AJj15allETA49 & TOPO_05MINDPHI_AJj10s6_XE0 & TOPO_05MINDPHI_EM12s6_XE0 & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_EM12_W-MT35_XS50").setLogic( TOPO_35MT_EM12s6_XE0 & EM12 & XS50 & physcond)        # noqa: F821
+                    LVL1MenuItem("L1_EM10VH_W-MT35_XS50").setLogic( TOPO_35MT_EM12s6_XE0 & EM10VH & XS50 & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_W-15DPHI-EM15XE-0"  ).setLogic( TOPO_15MINDPHI_EM15s6_XE0  & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_EM15_W-MT35_W-250RO2-XEHT-0_W-15DPHI-JXE-0_W-15DPHI-EM15XE" ).setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & TOPO_250RATIO2_XE0_HT0_AJj15allETA49 & TOPO_15MINDPHI_AJj10s6_XE0 & TOPO_15MINDPHI_EM15s6_XE0 & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_EM15_W-MT35_XS60_W-15DPHI-JXE-0_W-15DPHI-EM15XE"            ).setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & XS60 & TOPO_15MINDPHI_AJj10s6_XE0 & TOPO_15MINDPHI_EM15s6_XE0 & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_EM15_W-MT35_XS40_W-15DPHI-JXE-0_W-15DPHI-EM15XE"            ).setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & XS40 & TOPO_15MINDPHI_AJj10s6_XE0 & TOPO_15MINDPHI_EM15s6_XE0 & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_W-15DPHI-EMXE-0"  ).setLogic( TOPO_15MINDPHI_EM12s6_XE0  & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_EM12_W-MT35_XS30_W-15DPHI-JXE-0_W-15DPHI-EMXE"            ).setLogic( TOPO_35MT_EM12s6_XE0 & EM12 & XS30 & TOPO_15MINDPHI_AJj10s6_XE0 & TOPO_15MINDPHI_EM12s6_XE0 & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_EM12_W-MT35_W-90RO2-XEHT-0_W-15DPHI-JXE-0_W-15DPHI-EMXE"  ).setLogic( TOPO_35MT_EM12s6_XE0 & EM12 & TOPO_90RATIO2_XE0_HT0_AJj15allETA49 & TOPO_15MINDPHI_AJj10s6_XE0 & TOPO_15MINDPHI_EM12s6_XE0 & physcond)    # noqa: F821
                     # Old
-                    LVL1MenuItem("L1_EM12_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE_W-90RO2-XEHT-0"   ).setLogic( TOPO_25MT_EM12s6_XE0 & EM12 & TOPO_15MINDPHI_AJj10s6_XE0 & TOPO_15MINDPHI_EM12s6_XE0 & TOPO_90RATIO2_XE0_HT0_AJj15allETA49 & physcond)
-                    LVL1MenuItem("L1_EM12_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE_XS30"           ).setLogic( TOPO_25MT_EM12s6_XE0 & EM12 & TOPO_15MINDPHI_AJj10s6_XE0 & TOPO_15MINDPHI_EM12s6_XE0 & XS30 & physcond)
-                    LVL1MenuItem("L1_EM12_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE_XS20"           ).setLogic( TOPO_25MT_EM12s6_XE0 & EM12 & TOPO_15MINDPHI_AJj10s6_XE0 & TOPO_15MINDPHI_EM12s6_XE0 & XS20 & physcond)
-                    LVL1MenuItem("L1_EM12_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE"                ).setLogic( TOPO_25MT_EM12s6_XE0 & EM12 & TOPO_15MINDPHI_AJj10s6_XE0 & TOPO_15MINDPHI_EM12s6_XE0 & physcond)
-
-
-                    LVL1MenuItem("L1_EM15_W-MT35_W-05DPHI-JXE-0_W-05DPHI-EM15XE_XS30"         ).setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & TOPO_05MINDPHI_AJj10s6_XE0 & TOPO_05MINDPHI_EM15s6_XE0 & XS30 & physcond)
-                    LVL1MenuItem("L1_EM15_W-MT35_W-05DPHI-JXE-0_W-05DPHI-EM15XE"              ).setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & TOPO_05MINDPHI_AJj10s6_XE0 & TOPO_05MINDPHI_EM15s6_XE0 & physcond)
-
-                    #LVL1MenuItem("L1_W-10DPHI-JXE-0").setLogic( TOPO_10MINDPHI_AJj15s2_XE0 & physcond)
-                    #LVL1MenuItem("L1_W-20DPHI-JXE-1").setLogic( TOPO_20MINDPHI_AJjs6_XE0 & physcond)
-                    #LVL1MenuItem("L1_W-20DPHI-JXE-0").setLogic( TOPO_20MINDPHI_AJj15s2_XE0 & physcond)
-                    #LVL1MenuItem("L1_W-10DPHI-EMXE-0").setLogic( TOPO_10MINDPHI_EM6s1_XE0 & physcond)
-                    #LVL1MenuItem("L1_W-20DPHI-EMXE-1").setLogic( TOPO_20MINDPHI_EM9s6_XE0 & physcond)
-                    #LVL1MenuItem("L1_W-20DPHI-EMXE-0").setLogic( TOPO_20MINDPHI_EM6s1_XE0 & physcond)
-                    #LVL1MenuItem("L1_W-05RO-XEHT-0").setLogic( TOPO_05RATIO_XE0_HT0_AJj15allETA49 & physcond)
-                    #LVL1MenuItem("L1_W-08RO-XEHT-1").setLogic( TOPO_08RATIO_XE0_HT0_AJj0allETA49 & physcond)
-                    #LVL1MenuItem("L1_W-40RO2-XEHT-0").setLogic( TOPO_40RATIO2_XE0_HT0_AJj15allETA49 & physcond)
-                    #LVL1MenuItem("L1_W-90RO2-XEHT-1").setLogic( TOPO_90RATIO2_XE0_HT0_AJj0allETA49 & physcond)
-                    #LVL1MenuItem("L1_W-HT20-JJ0.ETA49").setLogic( TOPO_HT20_AJj0allETA49 & physcond)
-                    #LVL1MenuItem("L1_W-NOMATCH").setLogic( TOPO_NOT_02MATCH_EM9s1_AJj15allETA49 & physcond)
-                    #LVL1MenuItem("L1_W-NOMATCH_W-05RO-XEEMHT").setLogic( TOPO_NOT_02MATCH_EM9s1_AJj15allETA49 & TOPO_05RATIO_XE0_SUM0_EM9s1_HT0_AJj15allETA49 & physcond)
-                    #LVL1MenuItem("L1_EM3_W-MT20").setLogic( TOPO_20MT_EM6s6_XE0 & EM3 & physcond)
-                    #LVL1MenuItem("L1_EM3_W-MT30").setLogic( TOPO_30MT_EM6s6_XE0 & EM3 & physcond)
-                    #LVL1MenuItem("L1_EM3_W-MT40").setLogic( TOPO_40MT_EM6s6_XE0 & EM3 & physcond)
+                    LVL1MenuItem("L1_EM12_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE_W-90RO2-XEHT-0"   ).setLogic( TOPO_25MT_EM12s6_XE0 & EM12 & TOPO_15MINDPHI_AJj10s6_XE0 & TOPO_15MINDPHI_EM12s6_XE0 & TOPO_90RATIO2_XE0_HT0_AJj15allETA49 & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_EM12_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE_XS30"           ).setLogic( TOPO_25MT_EM12s6_XE0 & EM12 & TOPO_15MINDPHI_AJj10s6_XE0 & TOPO_15MINDPHI_EM12s6_XE0 & XS30 & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_EM12_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE_XS20"           ).setLogic( TOPO_25MT_EM12s6_XE0 & EM12 & TOPO_15MINDPHI_AJj10s6_XE0 & TOPO_15MINDPHI_EM12s6_XE0 & XS20 & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_EM12_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE"                ).setLogic( TOPO_25MT_EM12s6_XE0 & EM12 & TOPO_15MINDPHI_AJj10s6_XE0 & TOPO_15MINDPHI_EM12s6_XE0 & physcond)           # noqa: F821
+
+
+                    LVL1MenuItem("L1_EM15_W-MT35_W-05DPHI-JXE-0_W-05DPHI-EM15XE_XS30"         ).setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & TOPO_05MINDPHI_AJj10s6_XE0 & TOPO_05MINDPHI_EM15s6_XE0 & XS30 & physcond)    # noqa: F821
+                    LVL1MenuItem("L1_EM15_W-MT35_W-05DPHI-JXE-0_W-05DPHI-EM15XE"              ).setLogic( TOPO_35MT_EM15s6_XE0 & EM15 & TOPO_05MINDPHI_AJj10s6_XE0 & TOPO_05MINDPHI_EM15s6_XE0 & physcond)           # noqa: F821
+
+                    #LVL1MenuItem("L1_W-10DPHI-JXE-0").setLogic( TOPO_10MINDPHI_AJj15s2_XE0 & physcond)    # noqa: F821
+                    #LVL1MenuItem("L1_W-20DPHI-JXE-1").setLogic( TOPO_20MINDPHI_AJjs6_XE0 & physcond)    # noqa: F821
+                    #LVL1MenuItem("L1_W-20DPHI-JXE-0").setLogic( TOPO_20MINDPHI_AJj15s2_XE0 & physcond)    # noqa: F821
+                    #LVL1MenuItem("L1_W-10DPHI-EMXE-0").setLogic( TOPO_10MINDPHI_EM6s1_XE0 & physcond)    # noqa: F821
+                    #LVL1MenuItem("L1_W-20DPHI-EMXE-1").setLogic( TOPO_20MINDPHI_EM9s6_XE0 & physcond)    # noqa: F821
+                    #LVL1MenuItem("L1_W-20DPHI-EMXE-0").setLogic( TOPO_20MINDPHI_EM6s1_XE0 & physcond)    # noqa: F821
+                    #LVL1MenuItem("L1_W-05RO-XEHT-0").setLogic( TOPO_05RATIO_XE0_HT0_AJj15allETA49 & physcond)    # noqa: F821
+                    #LVL1MenuItem("L1_W-08RO-XEHT-1").setLogic( TOPO_08RATIO_XE0_HT0_AJj0allETA49 & physcond)    # noqa: F821
+                    #LVL1MenuItem("L1_W-40RO2-XEHT-0").setLogic( TOPO_40RATIO2_XE0_HT0_AJj15allETA49 & physcond)    # noqa: F821
+                    #LVL1MenuItem("L1_W-90RO2-XEHT-1").setLogic( TOPO_90RATIO2_XE0_HT0_AJj0allETA49 & physcond)    # noqa: F821
+                    #LVL1MenuItem("L1_W-HT20-JJ0.ETA49").setLogic( TOPO_HT20_AJj0allETA49 & physcond)    # noqa: F821
+                    #LVL1MenuItem("L1_W-NOMATCH").setLogic( TOPO_NOT_02MATCH_EM9s1_AJj15allETA49 & physcond)    # noqa: F821
+                    #LVL1MenuItem("L1_W-NOMATCH_W-05RO-XEEMHT").setLogic( TOPO_NOT_02MATCH_EM9s1_AJj15allETA49 & TOPO_05RATIO_XE0_SUM0_EM9s1_HT0_AJj15allETA49 & physcond)    # noqa: F821
+                    #LVL1MenuItem("L1_EM3_W-MT20").setLogic( TOPO_20MT_EM6s6_XE0 & EM3 & physcond)    # noqa: F821
+                    #LVL1MenuItem("L1_EM3_W-MT30").setLogic( TOPO_30MT_EM6s6_XE0 & EM3 & physcond)    # noqa: F821
+                    #LVL1MenuItem("L1_EM3_W-MT40").setLogic( TOPO_40MT_EM6s6_XE0 & EM3 & physcond)    # noqa: F821
 
                     # Bphysics triggers
     #                 if not '_v6' in TriggerFlags.triggerMenuSetup():
@@ -1543,188 +1533,190 @@ class ItemDef:
     #                     LVL1MenuItem("L1_BPH-DR-2MU6_BPH-4M8-2MU6").setLogic( TOPO_2DR15_2MU6ab & TOPO_4INVM8_2MU6ab & physcond)            
 
                     ##Combined L1Top 
-                    LVL1MenuItem('L1_DR-MU10TAU12I_TAU12I-J25').setLogic( TOPO_0DR28_MU10ab_TAU12abi &  TOPO_1DISAMB_TAU12abi_J25ab & physcond)
-                    LVL1MenuItem('L1_MU10_TAU12I-J25').setLogic( MU10 &  TOPO_1DISAMB_TAU12abi_J25ab & physcond)
+                    LVL1MenuItem('L1_DR-MU10TAU12I_TAU12I-J25').setLogic( TOPO_0DR28_MU10ab_TAU12abi &  TOPO_1DISAMB_TAU12abi_J25ab & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_MU10_TAU12I-J25').setLogic( MU10 &  TOPO_1DISAMB_TAU12abi_J25ab & physcond)    # noqa: F821
                     #LVL1MenuItem('L1_XE35_EM15-TAU12I').setLogic( XE35 &  TOPO_DISAMB_EM15abhi_TAU12abi & physcond)  
                     #LVL1MenuItem('L1_XE40_EM15-TAU12I').setLogic( XE40 &  TOPO_DISAMB_EM15abhi_TAU12abiOB & physcond)  
-                    #LVL1MenuItem('L1_XE45_TAU20-J20').setLogic( XE45 & TOPO_1DISAMB_TAU20ab_J20ab & physcond)
-                    LVL1MenuItem('L1_J25_2J20_3J12_DR-TAU20ITAU12I').setLogic( J25 & J20.x(2) & J12.x(3) &  TOPO_0DR28_TAU20abi_TAU12abi & physcond)
+                    #LVL1MenuItem('L1_XE45_TAU20-J20').setLogic( XE45 & TOPO_1DISAMB_TAU20ab_J20ab & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_J25_2J20_3J12_DR-TAU20ITAU12I').setLogic( J25 & J20.x(2) & J12.x(3) &  TOPO_0DR28_TAU20abi_TAU12abi & physcond)    # noqa: F821
                     #LVL1MenuItem('L1_J25_3J12_EM15-TAU12I').setLogic( J25 & J12.x(3) &  TOPO_DISAMB_EM15abhi_TAU12abi & physcond)  
-                    LVL1MenuItem('L1_J25_2J12_DR-MU10TAU12I').setLogic( J25 & J12.x(2) &  TOPO_0DR28_MU10ab_TAU12abi & physcond)
-                    LVL1MenuItem('L1_J25_2J20_3J12_BOX-TAU20ITAU12I').setLogic( J25 & J20.x(2) & J12.x(3) & TOPO_0DETA20_0DPHI20_TAU20abi_TAU12abi & physcond)
+                    LVL1MenuItem('L1_J25_2J12_DR-MU10TAU12I').setLogic( J25 & J12.x(2) &  TOPO_0DR28_MU10ab_TAU12abi & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_J25_2J20_3J12_BOX-TAU20ITAU12I').setLogic( J25 & J20.x(2) & J12.x(3) & TOPO_0DETA20_0DPHI20_TAU20abi_TAU12abi & physcond)    # noqa: F821
 
-                    LVL1MenuItem('L1_MU6_MJJ-200').setLogic( MU6 & TOPO_200INVM9999_AJ30s6_AJ20s6 & physcond)
-                    LVL1MenuItem('L1_MU6_MJJ-300').setLogic( MU6 & TOPO_300INVM9999_AJ30s6_AJ20s6 & physcond)
-                    LVL1MenuItem('L1_MU6_MJJ-400').setLogic( MU6 & TOPO_400INVM9999_AJ30s6_AJ20s6 & physcond)
-                    LVL1MenuItem('L1_MU6_MJJ-500').setLogic( MU6 & TOPO_500INVM9999_AJ30s6_AJ20s6 & physcond) 
+                    LVL1MenuItem('L1_MU6_MJJ-200').setLogic( MU6 & TOPO_200INVM9999_AJ30s6_AJ20s6 & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_MU6_MJJ-300').setLogic( MU6 & TOPO_300INVM9999_AJ30s6_AJ20s6 & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_MU6_MJJ-400').setLogic( MU6 & TOPO_400INVM9999_AJ30s6_AJ20s6 & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_MU6_MJJ-500').setLogic( MU6 & TOPO_500INVM9999_AJ30s6_AJ20s6 & physcond)    # noqa: F821
 
-                    LVL1MenuItem('L1_J30_2J20_4J20.0ETA49_MJJ-400').setLogic( J30 & J20.x(2) & J200ETA49.x(4) & TOPO_400INVM9999_AJ30s6_AJ20s6 & physcond)
-                    LVL1MenuItem('L1_J30_2J20_4J20.0ETA49_MJJ-700').setLogic( J30 & J20.x(2) & J200ETA49.x(4) & TOPO_700INVM9999_AJ30s6_AJ20s6 & physcond) 
-                    LVL1MenuItem('L1_J30_2J20_4J20.0ETA49_MJJ-800').setLogic( J30 & J20.x(2) & J200ETA49.x(4) & TOPO_800INVM9999_AJ30s6_AJ20s6 & physcond)
-                    LVL1MenuItem('L1_J30_2J20_4J20.0ETA49_MJJ-900').setLogic( J30 & J20.x(2) & J200ETA49.x(4) & TOPO_900INVM9999_AJ30s6_AJ20s6 & physcond)
+                    LVL1MenuItem('L1_J30_2J20_4J20.0ETA49_MJJ-400').setLogic( J30 & J20.x(2) & J200ETA49.x(4) & TOPO_400INVM9999_AJ30s6_AJ20s6 & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_J30_2J20_4J20.0ETA49_MJJ-700').setLogic( J30 & J20.x(2) & J200ETA49.x(4) & TOPO_700INVM9999_AJ30s6_AJ20s6 & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_J30_2J20_4J20.0ETA49_MJJ-800').setLogic( J30 & J20.x(2) & J200ETA49.x(4) & TOPO_800INVM9999_AJ30s6_AJ20s6 & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_J30_2J20_4J20.0ETA49_MJJ-900').setLogic( J30 & J20.x(2) & J200ETA49.x(4) & TOPO_900INVM9999_AJ30s6_AJ20s6 & physcond)    # noqa: F821
 
-                    LVL1MenuItem('L1_3J20_4J20.0ETA49_MJJ-400').setLogic( J20.x(3) & J200ETA49.x(4) & TOPO_400INVM9999_AJ30s6_AJ20s6 & physcond)
-                    LVL1MenuItem('L1_3J20_4J20.0ETA49_MJJ-700').setLogic( J20.x(3) & J200ETA49.x(4) & TOPO_700INVM9999_AJ30s6_AJ20s6 & physcond) 
-                    LVL1MenuItem('L1_3J20_4J20.0ETA49_MJJ-800').setLogic( J20.x(3) & J200ETA49.x(4) & TOPO_800INVM9999_AJ30s6_AJ20s6 & physcond)
-                    LVL1MenuItem('L1_3J20_4J20.0ETA49_MJJ-900').setLogic( J20.x(3) & J200ETA49.x(4) & TOPO_900INVM9999_AJ30s6_AJ20s6 & physcond)
+                    LVL1MenuItem('L1_3J20_4J20.0ETA49_MJJ-400').setLogic( J20.x(3) & J200ETA49.x(4) & TOPO_400INVM9999_AJ30s6_AJ20s6 & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_3J20_4J20.0ETA49_MJJ-700').setLogic( J20.x(3) & J200ETA49.x(4) & TOPO_700INVM9999_AJ30s6_AJ20s6 & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_3J20_4J20.0ETA49_MJJ-800').setLogic( J20.x(3) & J200ETA49.x(4) & TOPO_800INVM9999_AJ30s6_AJ20s6 & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_3J20_4J20.0ETA49_MJJ-900').setLogic( J20.x(3) & J200ETA49.x(4) & TOPO_900INVM9999_AJ30s6_AJ20s6 & physcond)    # noqa: F821
 
-                    LVL1MenuItem('L1_XE35_MJJ-200').setLogic( XE35 & TOPO_200INVM9999_AJ30s6_AJ20s6 & physcond)
+                    LVL1MenuItem('L1_XE35_MJJ-200').setLogic( XE35 & TOPO_200INVM9999_AJ30s6_AJ20s6 & physcond)    # noqa: F821
                     
                     ### ATR-15062
                     if not '_v6' in TriggerFlags.triggerMenuSetup() and not '_HI' in TriggerFlags.triggerMenuSetup():
-                       LVL1MenuItem('L1_EM18VHI_MJJ-300').setLogic( EM18VHI & TOPO_300INVM9999_AJ30s6_AJ20s6 & physcond)
+                       LVL1MenuItem('L1_EM18VHI_MJJ-300').setLogic( EM18VHI & TOPO_300INVM9999_AJ30s6_AJ20s6 & physcond)    # noqa: F821
                     else:
-                       LVL1MenuItem('L1_EM18VH_MJJ-300').setLogic( EM18VH & TOPO_300INVM9999_AJ30s6_AJ20s6 & physcond)
+                       LVL1MenuItem('L1_EM18VH_MJJ-300').setLogic( EM18VH & TOPO_300INVM9999_AJ30s6_AJ20s6 & physcond)    # noqa: F821
                     # CTP items for L1Topo streamers
-                    #LVL1MenuItem('L1_DPhi_AJsAJs').setLogic( TOPO_DPhi_AJsAJs & physcond)
-                    #LVL1MenuItem('L1_DPhi_EMsTAUs').setLogic( TOPO_DPhi_EMsTAUs & physcond)
-                    #LVL1MenuItem('L1_DEta_AJabAJab').setLogic( TOPO_DEta_AJabAJab & physcond)
-                    #LVL1MenuItem('L1_DEta_EMabTAUab').setLogic( TOPO_DEta_EMabTAUab & physcond)
+                    #LVL1MenuItem('L1_DPhi_AJsAJs').setLogic( TOPO_DPhi_AJsAJs & physcond)    # noqa: F821
+                    #LVL1MenuItem('L1_DPhi_EMsTAUs').setLogic( TOPO_DPhi_EMsTAUs & physcond)    # noqa: F821
+                    #LVL1MenuItem('L1_DEta_AJabAJab').setLogic( TOPO_DEta_AJabAJab & physcond)    # noqa: F821
+                    #LVL1MenuItem('L1_DEta_EMabTAUab').setLogic( TOPO_DEta_EMabTAUab & physcond)    # noqa: F821
     #                 if not '_v6' in TriggerFlags.triggerMenuSetup():
     # #SX
-    #                     LVL1MenuItem('L1_BPH-2M-2MU4-B').setLogic( TOPO_2INVM999_CMU4ab_MU4ab & physcond)
-    #                     LVL1MenuItem('L1_BPH-2M-2MU4-BO').setLogic( TOPO_2INVM999_2CMU4ab & physcond)
-    #                     LVL1MenuItem('L1_BPH-2M-MU6MU4').setLogic( TOPO_2INVM999_MU6ab_MU4ab & physcond)
-    #                     LVL1MenuItem('L1_BPH-2M-MU6MU4-B').setLogic( TOPO_2INVM999_ONEBARREL_MU6ab_MU4ab & physcond)
-    #                     LVL1MenuItem('L1_BPH-2M-MU6MU4-BO').setLogic( TOPO_2INVM999_CMU6ab_CMU4ab & physcond)
-    #                     LVL1MenuItem('L1_BPH-4M8-2MU4-B').setLogic( TOPO_4INVM8_CMU4ab_MU4ab & physcond)
-    #                     LVL1MenuItem('L1_BPH-4M8-2MU4-BO').setLogic( TOPO_4INVM8_2CMU4ab & physcond)
-    #                     LVL1MenuItem('L1_BPH-4M8-MU6MU4').setLogic( TOPO_4INVM8_MU6ab_MU4ab & physcond)
-    #                     LVL1MenuItem('L1_BPH-4M8-MU6MU4-B').setLogic( TOPO_4INVM8_ONEBARREL_MU6ab_MU4ab & physcond)
-    #                     LVL1MenuItem('L1_BPH-4M8-MU6MU4-BO').setLogic( TOPO_4INVM8_CMU6ab_CMU4ab & physcond)
-
-                    LVL1MenuItem('L1_DY-DR-2MU4').setLogic( TOPO_2DR99_2MU4ab & physcond)
-                    LVL1MenuItem('L1_DY-BOX-MU6MU4').setLogic( TOPO_5DETA99_5DPHI99_MU6ab_MU4ab & physcond)
-                    LVL1MenuItem('L1_DY-BOX-2MU6').setLogic( TOPO_5DETA99_5DPHI99_2MU6ab & physcond)
+    #                     LVL1MenuItem('L1_BPH-2M-2MU4-B').setLogic( TOPO_2INVM999_CMU4ab_MU4ab & physcond)    # noqa: F821
+    #                     LVL1MenuItem('L1_BPH-2M-2MU4-BO').setLogic( TOPO_2INVM999_2CMU4ab & physcond)    # noqa: F821
+    #                     LVL1MenuItem('L1_BPH-2M-MU6MU4').setLogic( TOPO_2INVM999_MU6ab_MU4ab & physcond)    # noqa: F821
+    #                     LVL1MenuItem('L1_BPH-2M-MU6MU4-B').setLogic( TOPO_2INVM999_ONEBARREL_MU6ab_MU4ab & physcond)    # noqa: F821
+    #                     LVL1MenuItem('L1_BPH-2M-MU6MU4-BO').setLogic( TOPO_2INVM999_CMU6ab_CMU4ab & physcond)    # noqa: F821
+    #                     LVL1MenuItem('L1_BPH-4M8-2MU4-B').setLogic( TOPO_4INVM8_CMU4ab_MU4ab & physcond)    # noqa: F821
+    #                     LVL1MenuItem('L1_BPH-4M8-2MU4-BO').setLogic( TOPO_4INVM8_2CMU4ab & physcond)    # noqa: F821
+    #                     LVL1MenuItem('L1_BPH-4M8-MU6MU4').setLogic( TOPO_4INVM8_MU6ab_MU4ab & physcond)    # noqa: F821
+    #                     LVL1MenuItem('L1_BPH-4M8-MU6MU4-B').setLogic( TOPO_4INVM8_ONEBARREL_MU6ab_MU4ab & physcond)    # noqa: F821
+    #                     LVL1MenuItem('L1_BPH-4M8-MU6MU4-BO').setLogic( TOPO_4INVM8_CMU6ab_CMU4ab & physcond)    # noqa: F821
+
+                    LVL1MenuItem('L1_DY-DR-2MU4').setLogic( TOPO_2DR99_2MU4ab & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_DY-BOX-MU6MU4').setLogic( TOPO_5DETA99_5DPHI99_MU6ab_MU4ab & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_DY-BOX-2MU6').setLogic( TOPO_5DETA99_5DPHI99_2MU6ab & physcond)    # noqa: F821
      
-                    LVL1MenuItem('L1_LFV-MU6').setLogic( TOPO_0DR15_2MU6ab & physcond)
-                    LVL1MenuItem('L1_LFV-MU').setLogic( TOPO_0DR10_MU10ab_MU6ab & physcond)
-                    if not '_v7' in TriggerFlags.triggerMenuSetup():
-                        LVL1MenuItem('L1_LFV-EM8I').setLogic( TOPO_0DETA04_0DPHI03_EM8abi_MU10ab & physcond)
+                    LVL1MenuItem('L1_LFV-MU6').setLogic( TOPO_0DR15_2MU6ab & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_LFV-MU').setLogic( TOPO_0DR10_MU10ab_MU6ab & physcond)    # noqa: F821
+                    if not '_v7' in TriggerFlags.triggerMenuSetup() and not '_PhaseII' in TriggerFlags.triggerMenuSetup():
+                        LVL1MenuItem('L1_LFV-EM8I').setLogic( TOPO_0DETA04_0DPHI03_EM8abi_MU10ab & physcond)    # noqa: F821
                     else:
-                        LVL1MenuItem('L1_LFV-EM8I').setLogic( TOPO_0DETA04_EM8abi_MU10ab & TOPO_0DPHI03_EM8abi_MU10ab & physcond) #ATR-14282
-                    if not '_v7' in TriggerFlags.triggerMenuSetup():
-                        LVL1MenuItem('L1_LFV-EM15I').setLogic( TOPO_0DETA04_0DPHI03_EM15abi_MUab & physcond)
+                        LVL1MenuItem('L1_LFV-EM8I').setLogic( TOPO_0DETA04_EM8abi_MU10ab & TOPO_0DPHI03_EM8abi_MU10ab & physcond) #ATR-14282     # noqa: F821
+                    if not '_v7' in TriggerFlags.triggerMenuSetup() and not '_PhaseII' in TriggerFlags.triggerMenuSetup():
+                        LVL1MenuItem('L1_LFV-EM15I').setLogic( TOPO_0DETA04_0DPHI03_EM15abi_MUab & physcond)    # noqa: F821
                     else:
-                        LVL1MenuItem('L1_LFV-EM15I').setLogic( TOPO_0DETA04_EM15abi_MUab & TOPO_0DPHI03_EM15abi_MUab & physcond) #ATR-14282
-                    LVL1MenuItem('L1_DPHI-J20s2XE50').setLogic( TOPO_10MINDPHI_J20s2_XE50 & physcond)
-                    LVL1MenuItem('L1_DPHI-J20XE50').setLogic( TOPO_10MINDPHI_J20ab_XE50 & physcond)
-                    LVL1MenuItem('L1_DPHI-CJ20XE50').setLogic( TOPO_10MINDPHI_CJ20ab_XE50 & physcond)
-
-                    LVL1MenuItem('L1_MJJ-900').setLogic( TOPO_900INVM9999_AJ30s6_AJ20s6 & physcond)
-                    LVL1MenuItem('L1_MJJ-800').setLogic( TOPO_800INVM9999_AJ30s6_AJ20s6 & physcond)
-                    LVL1MenuItem('L1_MJJ-700').setLogic( TOPO_700INVM9999_AJ30s6_AJ20s6 & physcond)
-                    LVL1MenuItem('L1_MJJ-400').setLogic( TOPO_400INVM9999_AJ30s6_AJ20s6 & physcond)
-                    #LVL1MenuItem('L1_MJJ-350').setLogic( TOPO_350INVM9999_AJ30s6_AJ20s6 & physcond)
-                    LVL1MenuItem('L1_MJJ-300').setLogic( TOPO_300INVM9999_AJ30s6_AJ20s6 & physcond)
-                    LVL1MenuItem('L1_MJJ-200').setLogic( TOPO_200INVM9999_AJ30s6_AJ20s6 & physcond)
-                    LVL1MenuItem('L1_MJJ-100').setLogic( TOPO_100INVM9999_AJ30s6_AJ20s6 & physcond)
-
-                    #LVL1MenuItem('L1_MJJ-350-0').setLogic( TOPO_350INVM9999_J30s6_J20s6 & physcond)
-                    #LVL1MenuItem('L1_MJJ-300-0').setLogic( TOPO_300INVM9999_J30s6_J20s6 & physcond)
-                    #LVL1MenuItem('L1_MJJ-250-0').setLogic( TOPO_250INVM9999_J30s6_J20s6 & physcond)
-                    #LVL1MenuItem('L1_MJJ-200-0').setLogic( TOPO_200INVM9999_J30s6_J20s6 & physcond)
-                    LVL1MenuItem('L1_HT150-JJ15.ETA49').setLogic( TOPO_HT150_AJj15allETA49 & physcond)
-                    LVL1MenuItem('L1_HT150-JJ15.ETA49_MJJ-400').setLogic( TOPO_HT150_AJj15allETA49 & TOPO_400INVM9999_AJ30s6_AJ20s6 & physcond)
+                        LVL1MenuItem('L1_LFV-EM15I').setLogic( TOPO_0DETA04_EM15abi_MUab & TOPO_0DPHI03_EM15abi_MUab & physcond) #ATR-14282       # noqa: F821
+                    LVL1MenuItem('L1_DPHI-J20s2XE50').setLogic( TOPO_10MINDPHI_J20s2_XE50 & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_DPHI-J20XE50').setLogic( TOPO_10MINDPHI_J20ab_XE50 & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_DPHI-CJ20XE50').setLogic( TOPO_10MINDPHI_CJ20ab_XE50 & physcond)    # noqa: F821
+
+                    LVL1MenuItem('L1_MJJ-900').setLogic( TOPO_900INVM9999_AJ30s6_AJ20s6 & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_MJJ-800').setLogic( TOPO_800INVM9999_AJ30s6_AJ20s6 & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_MJJ-700').setLogic( TOPO_700INVM9999_AJ30s6_AJ20s6 & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_MJJ-400').setLogic( TOPO_400INVM9999_AJ30s6_AJ20s6 & physcond)    # noqa: F821
+                    #LVL1MenuItem('L1_MJJ-350').setLogic( TOPO_350INVM9999_AJ30s6_AJ20s6 & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_MJJ-300').setLogic( TOPO_300INVM9999_AJ30s6_AJ20s6 & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_MJJ-200').setLogic( TOPO_200INVM9999_AJ30s6_AJ20s6 & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_MJJ-100').setLogic( TOPO_100INVM9999_AJ30s6_AJ20s6 & physcond)    # noqa: F821
+
+                    #LVL1MenuItem('L1_MJJ-350-0').setLogic( TOPO_350INVM9999_J30s6_J20s6 & physcond)    # noqa: F821
+                    #LVL1MenuItem('L1_MJJ-300-0').setLogic( TOPO_300INVM9999_J30s6_J20s6 & physcond)    # noqa: F821
+                    #LVL1MenuItem('L1_MJJ-250-0').setLogic( TOPO_250INVM9999_J30s6_J20s6 & physcond)    # noqa: F821
+                    #LVL1MenuItem('L1_MJJ-200-0').setLogic( TOPO_200INVM9999_J30s6_J20s6 & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_HT150-JJ15.ETA49').setLogic( TOPO_HT150_AJj15allETA49 & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_HT150-JJ15.ETA49_MJJ-400').setLogic( TOPO_HT150_AJj15allETA49 & TOPO_400INVM9999_AJ30s6_AJ20s6 & physcond)    # noqa: F821
 
                     
-                    LVL1MenuItem('L1_J4-MATCH').setLogic( TOPO_0MATCH_4AJ20ETA31_4AJj15ETA31 & physcond)
+                    LVL1MenuItem('L1_J4-MATCH').setLogic( TOPO_0MATCH_4AJ20ETA31_4AJj15ETA31 & physcond)    # noqa: F821
 
-                    LVL1MenuItem('L1_LLP-RO').setLogic( TOPO_100RATIO_0MATCH_TAU30si2_EMall & physcond)
+                    LVL1MenuItem('L1_LLP-RO').setLogic( TOPO_100RATIO_0MATCH_TAU30si2_EMall & physcond)    # noqa: F821
 
-                    LVL1MenuItem('L1_LLP-NOMATCH').setLogic( TOPO_NOT_0MATCH_TAU30si2_EMall & physcond)
-                    LVL1MenuItem('L1_DR-MU10TAU12I').setLogic( TOPO_0DR28_MU10ab_TAU12abi & physcond)
-                    LVL1MenuItem('L1_TAU12I-J25').setLogic( TOPO_1DISAMB_TAU12abi_J25ab & physcond)
-                    LVL1MenuItem('L1_EM15TAU12I-J25').setLogic( TOPO_1DISAMB_EM15his2_TAU12abi_J25ab & physcond)
+                    LVL1MenuItem('L1_LLP-NOMATCH').setLogic( TOPO_NOT_0MATCH_TAU30si2_EMall & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_DR-MU10TAU12I').setLogic( TOPO_0DR28_MU10ab_TAU12abi & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_TAU12I-J25').setLogic( TOPO_1DISAMB_TAU12abi_J25ab & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_EM15TAU12I-J25').setLogic( TOPO_1DISAMB_EM15his2_TAU12abi_J25ab & physcond)    # noqa: F821
 
-                    LVL1MenuItem('L1_DR-EM15TAU12I').setLogic( TOPO_DISAMB_0DR28_EM15his2_TAU12abi & physcond)
-                    LVL1MenuItem('L1_DR-EM15TAU12I-J25').setLogic( TOPO_1DISAMB_J25ab_0DR28_EM15his2_TAU12abi & physcond)
-                    LVL1MenuItem('L1_TAU20ITAU12I-J25').setLogic( TOPO_1DISAMB_TAU20abi_TAU12abi_J25ab & physcond)
-                    LVL1MenuItem('L1_DR25-TAU20ITAU12I').setLogic( TOPO_0DR25_TAU20abi_TAU12abi & physcond)
+                    LVL1MenuItem('L1_DR-EM15TAU12I').setLogic( TOPO_DISAMB_0DR28_EM15his2_TAU12abi & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_DR-EM15TAU12I-J25').setLogic( TOPO_1DISAMB_J25ab_0DR28_EM15his2_TAU12abi & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_TAU20ITAU12I-J25').setLogic( TOPO_1DISAMB_TAU20abi_TAU12abi_J25ab & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_DR25-TAU20ITAU12I').setLogic( TOPO_0DR25_TAU20abi_TAU12abi & physcond)    # noqa: F821
 
-                    LVL1MenuItem('L1_30M-EM20ITAU12').setLogic( TOPO_DISAMB_30INVM_EM20his2_TAU12ab & physcond)
-                    LVL1MenuItem('L1_MJJ-400-CF').setLogic( TOPO_400INVM9999_AJ30s6ETA31_AJ20s631ETA49 & physcond)
-                    LVL1MenuItem('L1_DR-TAU20ITAU12I').setLogic( TOPO_0DR28_TAU20abi_TAU12abi & physcond)
-                    LVL1MenuItem('L1_BOX-TAU20ITAU12I').setLogic( TOPO_0DETA20_0DPHI20_TAU20abi_TAU12abi & physcond)
-                    LVL1MenuItem('L1_DR-TAU20ITAU12I-J25').setLogic( TOPO_1DISAMB_J25ab_0DR28_TAU20abi_TAU12abi & physcond)
+                    LVL1MenuItem('L1_30M-EM20ITAU12').setLogic( TOPO_DISAMB_30INVM_EM20his2_TAU12ab & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_MJJ-400-CF').setLogic( TOPO_400INVM9999_AJ30s6ETA31_AJ20s631ETA49 & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_DR-TAU20ITAU12I').setLogic( TOPO_0DR28_TAU20abi_TAU12abi & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_BOX-TAU20ITAU12I').setLogic( TOPO_0DETA20_0DPHI20_TAU20abi_TAU12abi & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_DR-TAU20ITAU12I-J25').setLogic( TOPO_1DISAMB_J25ab_0DR28_TAU20abi_TAU12abi & physcond)    # noqa: F821
 
-                    LVL1MenuItem('L1_DR25-TAU20ITAU12I-J25').setLogic( TOPO_1DISAMB_J25ab_0DR25_TAU20abi_TAU12abi & physcond)
-                    LVL1MenuItem('L1_LAR-EM').setLogic( TOPO_LAR_EM50s1 & physcond).setTriggerType( TT.lardemo ) # LAr demo (ATR-11897)
-                    LVL1MenuItem('L1_LAR-J').setLogic( TOPO_LAR_J100s1 & physcond).setTriggerType( TT.lardemo )  # LAr demo (ATR-11897)
+                    LVL1MenuItem('L1_DR25-TAU20ITAU12I-J25').setLogic( TOPO_1DISAMB_J25ab_0DR25_TAU20abi_TAU12abi & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_LAR-EM').setLogic( TOPO_LAR_EM50s1 & physcond).setTriggerType( TT.lardemo ) # LAr demo (ATR-11897)     # noqa: F821
+                    LVL1MenuItem('L1_LAR-J').setLogic( TOPO_LAR_J100s1 & physcond).setTriggerType( TT.lardemo )  # LAr demo (ATR-11897)     # noqa: F821
                     # if not '_v6' in TriggerFlags.triggerMenuSetup():
-                    #     LVL1MenuItem('L1_BPH-DR-2MU4-B').setLogic( TOPO_2DR15_CMU4ab_MU4ab & physcond)
-                    #     LVL1MenuItem('L1_BPH-DR-2MU4-BO').setLogic( TOPO_2DR15_2CMU4ab & physcond)
-                    #     LVL1MenuItem('L1_BPH-DR-MU6MU4').setLogic( TOPO_2DR15_MU6ab_MU4ab & physcond)
-                    #     LVL1MenuItem('L1_BPH-DR-MU6MU4-B').setLogic( TOPO_2DR15_ONEBARREL_MU6ab_MU4ab & physcond)
-                    #     LVL1MenuItem('L1_BPH-DR-MU6MU4-BO').setLogic( TOPO_2DR15_CMU6ab_CMU4ab & physcond)
+                    #     LVL1MenuItem('L1_BPH-DR-2MU4-B').setLogic( TOPO_2DR15_CMU4ab_MU4ab & physcond)    # noqa: F821
+                    #     LVL1MenuItem('L1_BPH-DR-2MU4-BO').setLogic( TOPO_2DR15_2CMU4ab & physcond)    # noqa: F821
+                    #     LVL1MenuItem('L1_BPH-DR-MU6MU4').setLogic( TOPO_2DR15_MU6ab_MU4ab & physcond)    # noqa: F821
+                    #     LVL1MenuItem('L1_BPH-DR-MU6MU4-B').setLogic( TOPO_2DR15_ONEBARREL_MU6ab_MU4ab & physcond)    # noqa: F821
+                    #     LVL1MenuItem('L1_BPH-DR-MU6MU4-BO').setLogic( TOPO_2DR15_CMU6ab_CMU4ab & physcond)    # noqa: F821
                     #     LVL1MenuItem("L1_BPH-DR-2MU4-B_BPH-2M-2MU4-B").setLogic( TOPO_2DR15_CMU4ab_MU4ab & TOPO_2INVM999_CMU4ab_MU4ab & physcond)            
                     #     LVL1MenuItem("L1_BPH-DR-2MU4-B_BPH-4M8-2MU4-B").setLogic( TOPO_2DR15_CMU4ab_MU4ab & TOPO_4INVM8_CMU4ab_MU4ab & physcond)            
                     #     LVL1MenuItem("L1_BPH-DR-2MU4-BO_BPH-2M-2MU4-BO").setLogic( TOPO_2DR15_2CMU4ab & TOPO_2INVM999_2CMU4ab & physcond)            
                     #     LVL1MenuItem("L1_BPH-DR-2MU4-BO_BPH-4M8-2MU4-BO").setLogic( TOPO_2DR15_2CMU4ab & TOPO_4INVM8_2CMU4ab & physcond)     
                         
-                    LVL1MenuItem('L1_KF-XE40').setLogic( TOPO_KF_XE40_AJall & physcond)
-                    LVL1MenuItem('L1_KF-XE50').setLogic( TOPO_KF_XE50_AJall & physcond)
-                    LVL1MenuItem('L1_KF-XE55').setLogic( TOPO_KF_XE55_AJall & physcond)
-                    LVL1MenuItem('L1_KF-XE60').setLogic( TOPO_KF_XE60_AJall & physcond)
-                    LVL1MenuItem('L1_KF-XE65').setLogic( TOPO_KF_XE65_AJall & physcond)
-                    LVL1MenuItem('L1_KF-XE75').setLogic( TOPO_KF_XE75_AJall & physcond)
+                    LVL1MenuItem('L1_KF-XE40').setLogic( TOPO_KF_XE40_AJall & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_KF-XE50').setLogic( TOPO_KF_XE50_AJall & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_KF-XE55').setLogic( TOPO_KF_XE55_AJall & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_KF-XE60').setLogic( TOPO_KF_XE60_AJall & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_KF-XE65').setLogic( TOPO_KF_XE65_AJall & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_KF-XE75').setLogic( TOPO_KF_XE75_AJall & physcond)    # noqa: F821
     #SX ATR-12789
 
                    # if  '_v6' in TriggerFlags.triggerMenuSetup():
     # nominal L1-topo items
-                    #LVL1MenuItem('L1_BPH-1M19-2MU4_BPH-0DR34-2MU4'    ).setLogic( TOPO_1INVM19_2MU4ab & TOPO_0DR34_2MU4ab & physcond)           # 50% for Bs,J/psi,Upsi
+                    #LVL1MenuItem('L1_BPH-1M19-2MU4_BPH-0DR34-2MU4'    ).setLogic( TOPO_1INVM19_2MU4ab & TOPO_0DR34_2MU4ab & physcond)           # 50% for Bs,J/psi,Upsi     # noqa: F821
              
-                    LVL1MenuItem('L1_BPH-2M8-2MU4_BPH-0DR15-2MU4'     ).setLogic( TOPO_2INVM8_2MU4ab & TOPO_0DR15_2MU4ab & physcond)            # 78% for Bs,J/psi
-                    LVL1MenuItem('L1_BPH-2M9-2MU4_BPH-0DR15-2MU4'     ).setLogic( TOPO_2INVM9_2MU4ab & TOPO_0DR15_2MU4ab & physcond)            # 78% for Bs,J/psi
-                    LVL1MenuItem('L1_BPH-7M15-2MU4_BPH-0DR24-2MU4'    ).setLogic( TOPO_7INVM15_2MU4ab & TOPO_0DR24_2MU4ab & physcond)           # 78% for Upsi
-                    LVL1MenuItem('L1_BPH-2M8-MU6MU4_BPH-0DR15-MU6MU4' ).setLogic( TOPO_2INVM8_MU6ab_MU4ab & TOPO_0DR15_MU6ab_MU4ab & physcond)  # 86% for Bs,J/psi
-                    LVL1MenuItem('L1_BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4' ).setLogic( TOPO_2INVM9_MU6ab_MU4ab & TOPO_0DR15_MU6ab_MU4ab & physcond)
+                    LVL1MenuItem('L1_BPH-2M8-2MU4_BPH-0DR15-2MU4'     ).setLogic( TOPO_2INVM8_2MU4ab & TOPO_0DR15_2MU4ab & physcond)            # 78% for Bs,J/psi    # noqa: F821
+                    LVL1MenuItem('L1_BPH-2M9-2MU4_BPH-0DR15-2MU4'     ).setLogic( TOPO_2INVM9_2MU4ab & TOPO_0DR15_2MU4ab & physcond)            # 78% for Bs,J/psi    # noqa: F821
+                    LVL1MenuItem('L1_BPH-7M15-2MU4_BPH-0DR24-2MU4'    ).setLogic( TOPO_7INVM15_2MU4ab & TOPO_0DR24_2MU4ab & physcond)           # 78% for Upsi        # noqa: F821
+                    LVL1MenuItem('L1_BPH-2M8-MU6MU4_BPH-0DR15-MU6MU4' ).setLogic( TOPO_2INVM8_MU6ab_MU4ab & TOPO_0DR15_MU6ab_MU4ab & physcond)  # 86% for Bs,J/psi    # noqa: F821
+                    LVL1MenuItem('L1_BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4' ).setLogic( TOPO_2INVM9_MU6ab_MU4ab & TOPO_0DR15_MU6ab_MU4ab & physcond)    # noqa: F821
   
-                    LVL1MenuItem('L1_BPH-8M15-MU6MU4_BPH-0DR22-MU6MU4').setLogic( TOPO_8INVM15_MU6ab_MU4ab & TOPO_0DR22_MU6ab_MU4ab & physcond) # 86% for Upsi
-                    LVL1MenuItem('L1_BPH-2M9-2MU6_BPH-2DR15-2MU6'     ).setLogic( TOPO_2INVM9_2MU6ab & TOPO_2DR15_2MU6ab & physcond)            # 96% for Bs,J/psi
+                    LVL1MenuItem('L1_BPH-8M15-MU6MU4_BPH-0DR22-MU6MU4').setLogic( TOPO_8INVM15_MU6ab_MU4ab & TOPO_0DR22_MU6ab_MU4ab & physcond) # 86% for Upsi        # noqa: F821
+                    LVL1MenuItem('L1_BPH-2M9-2MU6_BPH-2DR15-2MU6'     ).setLogic( TOPO_2INVM9_2MU6ab & TOPO_2DR15_2MU6ab & physcond)            # 96% for Bs,J/psi    # noqa: F821
      
-                    LVL1MenuItem('L1_BPH-8M15-2MU6_BPH-0DR22-2MU6'    ).setLogic( TOPO_8INVM15_2MU6ab & TOPO_0DR22_2MU6ab & physcond)           # 96% for Upsi
+                    LVL1MenuItem('L1_BPH-8M15-2MU6_BPH-0DR22-2MU6'    ).setLogic( TOPO_8INVM15_2MU6ab & TOPO_0DR22_2MU6ab & physcond)           # 96% for Upsi        # noqa: F821
 
 # Barrel and BarrelOnly items w/o topo selection
-#                    LVL1MenuItem('L1_CMU6_2CMU4').setLogic( TOPO_MULT_CMU4ab.x(2) & TOPO_MULT_CMU6ab & physcond) # MU6_2MU4_BarrelOnly
-                    LVL1MenuItem('L1_2MU4-B'    ).setLogic( MU4.x(2) & TOPO_MULT_CMU4ab & physcond)              # 2MU4_Barrel
-                    LVL1MenuItem('L1_2MU6-B'    ).setLogic( MU6.x(2) & TOPO_MULT_CMU6ab & physcond)              # 2MU6_Barrel
-                    LVL1MenuItem('L1_MU6_2MU4-B').setLogic( MU6 & MU4.x(2) & TOPO_MULT_CMU4ab & physcond)        # MU6_2MU4_Barrel,     already in the menu
+#                    LVL1MenuItem('L1_CMU6_2CMU4').setLogic( TOPO_MULT_CMU4ab.x(2) & TOPO_MULT_CMU6ab & physcond) # MU6_2MU4_BarrelOnly     # noqa: F821
+                    LVL1MenuItem('L1_2MU4-B'    ).setLogic( MU4.x(2) & TOPO_MULT_CMU4ab & physcond)              # 2MU4_Barrel              # noqa: F821
+                    LVL1MenuItem('L1_2MU6-B'    ).setLogic( MU6.x(2) & TOPO_MULT_CMU6ab & physcond)              # 2MU6_Barrel              # noqa: F821
+                    LVL1MenuItem('L1_MU6_2MU4-B').setLogic( MU6 & MU4.x(2) & TOPO_MULT_CMU4ab & physcond)        # MU6_2MU4_Barrel,         # noqa: F821
 
 # Barrel and BarrelOnly variants of L1Topo items
-                    #LVL1MenuItem('L1_BPH-1M19-2MU4-B_BPH-0DR34-2MU4'    ).setLogic( TOPO_1INVM19_CMU4ab_MU4ab & TOPO_0DR34_2MU4ab & physcond)               # 50% for Bs,J/psi,Upsi + OneBarrel
+                    #LVL1MenuItem('L1_BPH-1M19-2MU4-B_BPH-0DR34-2MU4'    ).setLogic( TOPO_1INVM19_CMU4ab_MU4ab & TOPO_0DR34_2MU4ab & physcond)               # 50% for Bs,J/psi,Upsi + OneBarrel     # noqa: F821
 
-                    LVL1MenuItem('L1_BPH-2M8-2MU4-B_BPH-0DR15-2MU4'     ).setLogic( TOPO_2INVM8_CMU4ab_MU4ab & TOPO_0DR15_2MU4ab & physcond)                # 78% for Bs,J/psi + OneBarrel
+                    LVL1MenuItem('L1_BPH-2M8-2MU4-B_BPH-0DR15-2MU4'     ).setLogic( TOPO_2INVM8_CMU4ab_MU4ab & TOPO_0DR15_2MU4ab & physcond)                # 78% for Bs,J/psi + OneBarrel           # noqa: F821
 
-                    LVL1MenuItem('L1_BPH-7M15-2MU4_BPH-0DR24-2MU4-B'    ).setLogic( TOPO_7INVM15_2MU4ab & TOPO_0DR24_2MU4ab & TOPO_MULT_CMU4ab & physcond) # 78% for Upsi + OneBarrel 
-#                    LVL1MenuItem('L1_BPH-7M15-2MU4_BPH-0DR24-2MU4-B'    ).setLogic( TOPO_7INVM15_2MU4ab & TOPO_0DR24_CMU4ab_MU4ab & physcond)               # 78% for Upsi + OneBarrel
-                    #LVL1MenuItem('L1_BPH-1M19-2MU4-BO_BPH-0DR34-2MU4'   ).setLogic( TOPO_1INVM19_2CMU4ab & TOPO_0DR34_2MU4ab & physcond)                    # 50% for Bs,J/psi,Upsi + BarrelOnly
+                    LVL1MenuItem('L1_BPH-7M15-2MU4_BPH-0DR24-2MU4-B'    ).setLogic( TOPO_7INVM15_2MU4ab & TOPO_0DR24_2MU4ab & TOPO_MULT_CMU4ab & physcond) # 78% for Upsi + OneBarrel                # noqa: F821
+#                    LVL1MenuItem('L1_BPH-7M15-2MU4_BPH-0DR24-2MU4-B'    ).setLogic( TOPO_7INVM15_2MU4ab & TOPO_0DR24_CMU4ab_MU4ab & physcond)               # 78% for Upsi + OneBarrel              # noqa: F821
+                    #LVL1MenuItem('L1_BPH-1M19-2MU4-BO_BPH-0DR34-2MU4'   ).setLogic( TOPO_1INVM19_2CMU4ab & TOPO_0DR34_2MU4ab & physcond)                    # 50% for Bs,J/psi,Upsi + BarrelOnly    # noqa: F821
 
-                        #LVL1MenuItem('L1_BPH-2M8-2MU4-BO_BPH-0DR15-2MU4'    ).setLogic( TOPO_2INVM8_2CMU4ab & TOPO_0DR15_2MU4ab & physcond)                     # 78% for Bs,J/psi + BarrelOnly
-                    LVL1MenuItem('L1_BPH-7M15-2MU4_BPH-0DR24-2MU4-BO'   ).setLogic( TOPO_7INVM15_2MU4ab & TOPO_0DR24_2CMU4ab & physcond)                    # 78% for Upsi + BarrelOnly
-                    LVL1MenuItem('L1_BPH-2M8-MU6MU4-B_BPH-0DR15-MU6MU4' ).setLogic( TOPO_2INVM8_ONEBARREL_MU6ab_MU4ab & TOPO_0DR15_MU6ab_MU4ab & physcond)  # 86% for Bs,J/psi + OneBarrel
+                        #LVL1MenuItem('L1_BPH-2M8-2MU4-BO_BPH-0DR15-2MU4'    ).setLogic( TOPO_2INVM8_2CMU4ab & TOPO_0DR15_2MU4ab & physcond)                     # 78% for Bs,J/psi + BarrelOnly     # noqa: F821
+                    LVL1MenuItem('L1_BPH-7M15-2MU4_BPH-0DR24-2MU4-BO'   ).setLogic( TOPO_7INVM15_2MU4ab & TOPO_0DR24_2CMU4ab & physcond)                    # 78% for Upsi + BarrelOnly              # noqa: F821
+                    LVL1MenuItem('L1_BPH-2M8-MU6MU4-B_BPH-0DR15-MU6MU4' ).setLogic( TOPO_2INVM8_ONEBARREL_MU6ab_MU4ab & TOPO_0DR15_MU6ab_MU4ab & physcond)  # 86% for Bs,J/psi + OneBarrel           # noqa: F821
 
-                    LVL1MenuItem('L1_BPH-8M15-MU6MU4_BPH-0DR22-MU6MU4-B').setLogic( TOPO_8INVM15_MU6ab_MU4ab & TOPO_0DR22_MU6ab_MU4ab & TOPO_MULT_CMU4ab & physcond)
+                    LVL1MenuItem('L1_BPH-8M15-MU6MU4_BPH-0DR22-MU6MU4-B').setLogic( TOPO_8INVM15_MU6ab_MU4ab & TOPO_0DR22_MU6ab_MU4ab & TOPO_MULT_CMU4ab & physcond)    # noqa: F821
 
-                    LVL1MenuItem('L1_BPH-8M15-MU6MU4_BPH-0DR22-MU6MU4-BO').setLogic( TOPO_8INVM15_MU6ab_MU4ab & TOPO_0DR22_MU6ab_MU4ab & TOPO_MULT_CMU4ab.x(2) & TOPO_MULT_CMU6ab & physcond)
+                    LVL1MenuItem('L1_BPH-8M15-MU6MU4_BPH-0DR22-MU6MU4-BO').setLogic( TOPO_8INVM15_MU6ab_MU4ab & TOPO_0DR22_MU6ab_MU4ab & TOPO_MULT_CMU4ab.x(2) & TOPO_MULT_CMU6ab & physcond)    # noqa: F821
 
 
-                    LVL1MenuItem('L1_BPH-2M8-2MU4'       ).setLogic( TOPO_2INVM8_2MU4ab & physcond)                 # backup 71% for Bs,J/psi
-                    #LVL1MenuItem('L1_BPH-2M9-2MU4'       ).setLogic( TOPO_2INVM9_2MU4ab & physcond)
-                    LVL1MenuItem('L1_BPH-8M15-MU6MU4'    ).setLogic( TOPO_8INVM15_MU6ab_MU4ab & physcond)           # backup 71% for Upsi
-                    LVL1MenuItem('L1_BPH-8M15-2MU6'      ).setLogic( TOPO_8INVM15_2MU6ab & physcond)                # backup 95% for Upsi
+                    LVL1MenuItem('L1_BPH-2M8-2MU4'       ).setLogic( TOPO_2INVM8_2MU4ab & physcond)                 # backup 71% for Bs,J/psi      # noqa: F821
+                    #LVL1MenuItem('L1_BPH-2M9-2MU4'       ).setLogic( TOPO_2INVM9_2MU4ab & physcond)    # noqa: F821
+                    LVL1MenuItem('L1_BPH-8M15-MU6MU4'    ).setLogic( TOPO_8INVM15_MU6ab_MU4ab & physcond)           # backup 71% for Upsi     # noqa: F821
+                    LVL1MenuItem('L1_BPH-8M15-2MU6'      ).setLogic( TOPO_8INVM15_2MU6ab & physcond)                # backup 95% for Upsi     # noqa: F821
     #SX end ATR-12789
 
-                    LVL1MenuItem('L1_LATE-MU10_XE50').setLogic( TOPO_LATE_MU10s1 & XE50 & physcond) 
-                    LVL1MenuItem('L1_LATE-MU10_J50').setLogic(  TOPO_LATE_MU10s1 & J50 & physcond)  
-                    if '_v7' in TriggerFlags.triggerMenuSetup():
-                      LVL1MenuItem('L1_SC111-CJ15').setLogic(  TOPO_SC111_CJ15abETA26 & physcond)
-                      LVL1MenuItem('L1_SC85-CJ15').setLogic(  TOPO_SC85_CJ15abETA26 & physcond)
+                    LVL1MenuItem('L1_LATE-MU10_XE50').setLogic( TOPO_LATE_MU10s1 & XE50 & physcond)  # noqa: F821
+                    LVL1MenuItem('L1_LATE-MU10_XE40').setLogic( TOPO_LATE_MU10s1 & XE40 & physcond)  # noqa: F821
+                    LVL1MenuItem('L1_LATE-MU10_J50').setLogic(  TOPO_LATE_MU10s1 & J50 & physcond)   # noqa: F821
+                    if '_v7' in TriggerFlags.triggerMenuSetup() or '_PhaseII' in TriggerFlags.triggerMenuSetup():
+                      LVL1MenuItem('L1_SC111-CJ15').setLogic(  TOPO_SC111_CJ15abETA26 & physcond)    # noqa: F821
+                      LVL1MenuItem('L1_SC85-CJ15').setLogic(  TOPO_SC85_CJ15abETA26 & physcond)      # noqa: F821
+
                     else:
-                      LVL1MenuItem('L1_SC111').setLogic(  TOPO_SC111_CJ15abETA26 & physcond)
-                      LVL1MenuItem('L1_SC85').setLogic(  TOPO_SC85_CJ15abETA26 & physcond)
+                      LVL1MenuItem('L1_SC111').setLogic(  TOPO_SC111_CJ15abETA26 & physcond)         # noqa: F821
+                      LVL1MenuItem('L1_SC85').setLogic(  TOPO_SC85_CJ15abETA26 & physcond)           # noqa: F821
 
-                    LVL1MenuItem('L1_TAU60_DR-TAU20ITAU12I' ).setLogic( HA60 & TOPO_0DR28_TAU20abi_TAU12abi & physcond)
+                    LVL1MenuItem('L1_TAU60_DR-TAU20ITAU12I' ).setLogic( HA60 & TOPO_0DR28_TAU20abi_TAU12abi & physcond)    # noqa: F821
 
             except Exception, ex:
                     print "Creation of L1Topo item failed, will abort! Exception is : " , ex
@@ -1740,13 +1732,13 @@ class ItemDef:
         # Partition 2
         LVL1MenuItem.currentPartition = 2
 
-        LVL1MenuItem('L1_RD2_BGRP14'         ).setLogic( RNDM2 & BGRP0 & BGRP14             ).setTriggerType(TT.rand)
+        LVL1MenuItem('L1_RD2_BGRP14'         ).setLogic( RNDM2 & BGRP0 & BGRP14             ).setTriggerType(TT.rand)    # noqa: F821
 
 
         # Partition 3
         LVL1MenuItem.currentPartition = 3
         
-        LVL1MenuItem('L1_RD3_BGRP15'         ).setLogic( RNDM3 & BGRP0 & BGRP15             ).setTriggerType(TT.rand)
+        LVL1MenuItem('L1_RD3_BGRP15'         ).setLogic( RNDM3 & BGRP0 & BGRP15             ).setTriggerType(TT.rand)    # noqa: F821
                       
 
         # reset to partition 1
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1menu/ItemDefRun1.py b/Trigger/TriggerCommon/TriggerMenu/python/l1menu/ItemDefRun1.py
index cac1430d237de36a164bd39447a643f3016c6200..4b4a70c7e0dc63d2406d604677f34c2ffaf61c2e 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1menu/ItemDefRun1.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1menu/ItemDefRun1.py
@@ -4,7 +4,6 @@
 
 
 from TriggerJobOpts.TriggerFlags import TriggerFlags
-import re
 
 from AthenaCommon.Logging import logging
 log = logging.getLogger('TriggerMenu.Lvl1.py')
@@ -13,12 +12,8 @@ log = logging.getLogger('TriggerMenu.Lvl1.py')
 # The trigger types
 from TriggerMenu.l1.TriggerTypeDefRun1 import TT
 from TriggerMenu.l1.Limits import Limits
-from TriggerMenu.l1.Logic import Logic,Not
+from TriggerMenu.l1.Logic import Not
 from TriggerMenu.l1.Lvl1MenuItems import LVL1MenuItem
-from TriggerMenu.l1.Lvl1Condition import ThrCondition, Lvl1InternalTrigger
-
-
-
 
 class ItemDef:
     def __init__(self):
@@ -55,15 +50,15 @@ class ItemDef:
         LVL1MenuItem.l1configForRegistration = tm  # from now on all new LVL1MenuItems are registered to tm
 
         # Setting up bunch group and BPTX conditions
-        bgrpcond            = BGRP0 & BGRP1
-        physcond            = BGRP0 & BGRP1
-        calibcond           = BGRP0 & BGRP2
-        cosmiccond          = BGRP0 & BGRP3
-        unpaired_isocond    = BGRP0 & BGRP4 # unpaired isolated (satellite bunches)
-        unpaired_nonisocond = BGRP0 & BGRP5 # unpaired non-isolated (parasitic bunches)
-        firstempty          = BGRP0 & BGRP6
-        unpairedRcond       = BGRP0 & BGRP7 # unpaired beams 1 oR beam 2
-        bgrp7cond           = BGRP0 & BGRP7 # No unpaired anymore
+        bgrpcond            = BGRP0 & BGRP1                                                 # noqa: F821
+        physcond            = BGRP0 & BGRP1                                                 # noqa: F821
+        calibcond           = BGRP0 & BGRP2                                                 # noqa: F821
+        cosmiccond          = BGRP0 & BGRP3                                                 # noqa: F821
+        unpaired_isocond    = BGRP0 & BGRP4 # unpaired isolated (satellite bunches)         # noqa: F821
+        unpaired_nonisocond = BGRP0 & BGRP5 # unpaired non-isolated (parasitic bunches)     # noqa: F821
+        firstempty          = BGRP0 & BGRP6                                                 # noqa: F821
+        unpairedRcond       = BGRP0 & BGRP7 # unpaired beams 1 oR beam 2                    # noqa: F821
+        bgrp7cond           = BGRP0 & BGRP7 # No unpaired anymore                           # noqa: F821
 
 
         LVL1MenuItem.currentPartition = 1
@@ -72,263 +67,263 @@ class ItemDef:
 
         emTT = TT.calo | TT.caloem
         
-        LVL1MenuItem('L1_EM3',    ctpid=0x1 ).setLogic( EM3.x(1)    & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_EM4',    ctpid=0x54).setLogic( EM4.x(1)    & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_EM5',    ctpid=-1  ).setLogic( EM5.x(1)    & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_EM6',    ctpid=-1  ).setLogic( EM6.x(1)    & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_EM7',    ctpid=0x1 ).setLogic( EM7.x(1)    & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_EM7V',   ctpid=-1  ).setLogic( EM7V.x(1)   & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_EM8VH',  ctpid=-1  ).setLogic( EM8VH.x(1)  & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_EM10',   ctpid=0x2 ).setLogic( EM10.x(1)   & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_EM10VH', ctpid=-1  ).setLogic( EM10VH.x(1) & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_EM12',   ctpid=0x2 ).setLogic( EM12.x(1)   & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_EM14',   ctpid=0x5 ).setLogic( EM14.x(1)   & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_EM14VH', ctpid=-1  ).setLogic( EM14VH.x(1) & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_EM15V',  ctpid=-1  ).setLogic( EM15V.x(1)  & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_EM15VH', ctpid=-1  ).setLogic( EM15VH.x(1) & physcond).setTriggerType( emTT ) 
-        LVL1MenuItem('L1_EM16',   ctpid=0x5 ).setLogic( EM16.x(1)   & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_EM16VH', ctpid=-1  ).setLogic( EM16VH.x(1) & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_EM16V',  ctpid=-1  ).setLogic( EM16V.x(1)  & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_EM18VH', ctpid=-1  ).setLogic( EM18VH.x(1) & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_EM20V',  ctpid=-1  ).setLogic( EM20V.x(1)  & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_EM24VHI', ctpid=-1  ).setLogic( EM24VHI.x(1) & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_EM30',   ctpid=0x8 ).setLogic( EM30.x(1)   & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_EM50',   ctpid=0x8 ).setLogic( EM50.x(1)   & physcond).setTriggerType( emTT )
+        LVL1MenuItem('L1_EM3',    ctpid=0x1 ).setLogic( EM3.x(1)    & physcond).setTriggerType( emTT )    # noqa: F821
+        LVL1MenuItem('L1_EM4',    ctpid=0x54).setLogic( EM4.x(1)    & physcond).setTriggerType( emTT )    # noqa: F821
+        LVL1MenuItem('L1_EM5',    ctpid=-1  ).setLogic( EM5.x(1)    & physcond).setTriggerType( emTT )    # noqa: F821
+        LVL1MenuItem('L1_EM6',    ctpid=-1  ).setLogic( EM6.x(1)    & physcond).setTriggerType( emTT )    # noqa: F821
+        LVL1MenuItem('L1_EM7',    ctpid=0x1 ).setLogic( EM7.x(1)    & physcond).setTriggerType( emTT )    # noqa: F821
+        LVL1MenuItem('L1_EM7V',   ctpid=-1  ).setLogic( EM7V.x(1)   & physcond).setTriggerType( emTT )    # noqa: F821
+        LVL1MenuItem('L1_EM8VH',  ctpid=-1  ).setLogic( EM8VH.x(1)  & physcond).setTriggerType( emTT )    # noqa: F821
+        LVL1MenuItem('L1_EM10',   ctpid=0x2 ).setLogic( EM10.x(1)   & physcond).setTriggerType( emTT )    # noqa: F821
+        LVL1MenuItem('L1_EM10VH', ctpid=-1  ).setLogic( EM10VH.x(1) & physcond).setTriggerType( emTT )    # noqa: F821
+        LVL1MenuItem('L1_EM12',   ctpid=0x2 ).setLogic( EM12.x(1)   & physcond).setTriggerType( emTT )    # noqa: F821
+        LVL1MenuItem('L1_EM14',   ctpid=0x5 ).setLogic( EM14.x(1)   & physcond).setTriggerType( emTT )    # noqa: F821
+        LVL1MenuItem('L1_EM14VH', ctpid=-1  ).setLogic( EM14VH.x(1) & physcond).setTriggerType( emTT )    # noqa: F821
+        LVL1MenuItem('L1_EM15V',  ctpid=-1  ).setLogic( EM15V.x(1)  & physcond).setTriggerType( emTT )    # noqa: F821
+        LVL1MenuItem('L1_EM15VH', ctpid=-1  ).setLogic( EM15VH.x(1) & physcond).setTriggerType( emTT )    # noqa: F821
+        LVL1MenuItem('L1_EM16',   ctpid=0x5 ).setLogic( EM16.x(1)   & physcond).setTriggerType( emTT )    # noqa: F821
+        LVL1MenuItem('L1_EM16VH', ctpid=-1  ).setLogic( EM16VH.x(1) & physcond).setTriggerType( emTT )    # noqa: F821
+        LVL1MenuItem('L1_EM16V',  ctpid=-1  ).setLogic( EM16V.x(1)  & physcond).setTriggerType( emTT )    # noqa: F821
+        LVL1MenuItem('L1_EM18VH', ctpid=-1  ).setLogic( EM18VH.x(1) & physcond).setTriggerType( emTT )    # noqa: F821
+        LVL1MenuItem('L1_EM20V',  ctpid=-1  ).setLogic( EM20V.x(1)  & physcond).setTriggerType( emTT )    # noqa: F821
+        LVL1MenuItem('L1_EM24VHI', ctpid=-1  ).setLogic( EM24VHI.x(1) & physcond).setTriggerType( emTT )  # noqa: F821
+        LVL1MenuItem('L1_EM30',   ctpid=0x8 ).setLogic( EM30.x(1)   & physcond).setTriggerType( emTT )    # noqa: F821
+        LVL1MenuItem('L1_EM50',   ctpid=0x8 ).setLogic( EM50.x(1)   & physcond).setTriggerType( emTT )    # noqa: F821
 
 
         # special bgrp
-        LVL1MenuItem('L1_EM30_BGRP7',  ctpid=-1).setLogic( EM30.x(1) & bgrp7cond ).setTriggerType( emTT )
+        LVL1MenuItem('L1_EM30_BGRP7',  ctpid=-1).setLogic( EM30.x(1) & bgrp7cond ).setTriggerType( emTT ) # noqa: F821
         
         # 2xEM
-        LVL1MenuItem('L1_2EM3',    ctpid=0xa ).setLogic( EM3.x(2)    & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_2EM5',    ctpid=0xb ).setLogic( EM5.x(2)    & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_2EM6',    ctpid=-1  ).setLogic( EM6.x(2)    & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_2EM8VH',  ctpid=-1  ).setLogic( EM8VH.x(2)  & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_2EM10VH', ctpid=-1  ).setLogic( EM10VH.x(2) & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_2EM12',   ctpid=0xf ).setLogic( EM12.x(2)   & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_2EM15V',  ctpid=-1 ).setLogic( EM15V.x(2)  & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_2EM15VH', ctpid=0xf ).setLogic( EM15VH.x(2) & physcond).setTriggerType( emTT )
+        LVL1MenuItem('L1_2EM3',    ctpid=0xa ).setLogic( EM3.x(2)    & physcond).setTriggerType( emTT )   # noqa: F821
+        LVL1MenuItem('L1_2EM5',    ctpid=0xb ).setLogic( EM5.x(2)    & physcond).setTriggerType( emTT )   # noqa: F821
+        LVL1MenuItem('L1_2EM6',    ctpid=-1  ).setLogic( EM6.x(2)    & physcond).setTriggerType( emTT )   # noqa: F821
+        LVL1MenuItem('L1_2EM8VH',  ctpid=-1  ).setLogic( EM8VH.x(2)  & physcond).setTriggerType( emTT )   # noqa: F821
+        LVL1MenuItem('L1_2EM10VH', ctpid=-1  ).setLogic( EM10VH.x(2) & physcond).setTriggerType( emTT )   # noqa: F821
+        LVL1MenuItem('L1_2EM12',   ctpid=0xf ).setLogic( EM12.x(2)   & physcond).setTriggerType( emTT )   # noqa: F821
+        LVL1MenuItem('L1_2EM15V',  ctpid=-1 ).setLogic( EM15V.x(2)  & physcond).setTriggerType( emTT )    # noqa: F821
+        LVL1MenuItem('L1_2EM15VH', ctpid=0xf ).setLogic( EM15VH.x(2) & physcond).setTriggerType( emTT )   # noqa: F821
 
 
 
         # 3xEM
-        LVL1MenuItem('L1_2EM3_EM6'   ).setLogic( EM3.x(2)& EM6.x(1) & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_EM7V_2EM3'   ).setLogic(EM7V.x(1)& EM3.x(2) & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_2EM3_EM12'  ).setLogic( EM3.x(2)& EM12.x(1) & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_2EM6_EM16VH').setLogic( EM6.x(2)& EM16VH.x(1) & physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_3EM6',  ctpid=-1  ).setLogic( EM6.x(3)  & physcond).setTriggerType(TT.phys).setTriggerType( emTT )
-        LVL1MenuItem('L1_EM15VH_3EM7V'  ).setLogic( EM15VH.x(1) & EM7V.x(3) & physcond).setTriggerType( emTT )
+        LVL1MenuItem('L1_2EM3_EM6'   ).setLogic( EM3.x(2)& EM6.x(1) & physcond).setTriggerType( emTT )    # noqa: F821
+        LVL1MenuItem('L1_EM7V_2EM3'   ).setLogic(EM7V.x(1)& EM3.x(2) & physcond).setTriggerType( emTT )   # noqa: F821
+        LVL1MenuItem('L1_2EM3_EM12'  ).setLogic( EM3.x(2)& EM12.x(1) & physcond).setTriggerType( emTT )   # noqa: F821
+        LVL1MenuItem('L1_2EM6_EM16VH').setLogic( EM6.x(2)& EM16VH.x(1) & physcond).setTriggerType( emTT ) # noqa: F821
+        LVL1MenuItem('L1_3EM6',  ctpid=-1  ).setLogic( EM6.x(3)  & physcond).setTriggerType(TT.phys).setTriggerType( emTT )   # noqa: F821
+        LVL1MenuItem('L1_EM15VH_3EM7V'  ).setLogic( EM15VH.x(1) & EM7V.x(3) & physcond).setTriggerType( emTT )   # noqa: F821
 
         # 4xEM
-        LVL1MenuItem('L1_3EM6_EM14VH').setLogic( EM6.x(3) & EM14VH.x(1)& physcond).setTriggerType( emTT )
-        LVL1MenuItem('L1_2EM12_EM16V').setLogic( EM12.x(2)& EM16V.x(1) & physcond).setTriggerType( emTT )
+        LVL1MenuItem('L1_3EM6_EM14VH').setLogic( EM6.x(3) & EM14VH.x(1)& physcond).setTriggerType( emTT )   # noqa: F821
+        LVL1MenuItem('L1_2EM12_EM16V').setLogic( EM12.x(2)& EM16V.x(1) & physcond).setTriggerType( emTT )   # noqa: F821
 
         
         # MUON ctpid=[0x20;0x2f]
 
-        LVL1MenuItem('L1_MU0',  ctpid=0x20).setLogic( MU0.x(1)  & physcond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_MU4',  ctpid=-1  ).setLogic( MU4.x(1)  & physcond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_MU6',  ctpid=0x21).setLogic( MU6.x(1)  & physcond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_MU10', ctpid=0x22).setLogic( MU10.x(1) & physcond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_MU11', ctpid=0x23).setLogic( MU11.x(1) & physcond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_MU15', ctpid=-1  ).setLogic( MU15.x(1) & physcond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_MU20', ctpid=0x24).setLogic( MU20.x(1) & physcond).setTriggerType(TT.rpcin)
+        LVL1MenuItem('L1_MU0',  ctpid=0x20).setLogic( MU0.x(1)  & physcond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_MU4',  ctpid=-1  ).setLogic( MU4.x(1)  & physcond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_MU6',  ctpid=0x21).setLogic( MU6.x(1)  & physcond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_MU10', ctpid=0x22).setLogic( MU10.x(1) & physcond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_MU11', ctpid=0x23).setLogic( MU11.x(1) & physcond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_MU15', ctpid=-1  ).setLogic( MU15.x(1) & physcond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_MU20', ctpid=0x24).setLogic( MU20.x(1) & physcond).setTriggerType(TT.rpcin)    # noqa: F821
 
         # 2xMU, 3xMU, 4xMU
-        LVL1MenuItem('L1_2MU0',  ctpid=0x26).setLogic( MU0.x(2)  & physcond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_2MU4',  ctpid=-1  ).setLogic( MU4.x(2)  & physcond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_2MU6',  ctpid=0x27).setLogic( MU6.x(2)  & physcond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_2MU10', ctpid=0x28).setLogic( MU10.x(2) & physcond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_2MU11', ctpid=0x28).setLogic( MU11.x(2) & physcond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_2MU20', ctpid=0x2a).setLogic( MU20.x(2) & physcond)
-        LVL1MenuItem('L1_3MU4',  ctpid=-1  ).setLogic( MU4.x(3)  & physcond)
-        LVL1MenuItem('L1_3MU6',  ctpid=0x2b).setLogic( MU6.x(3)  & physcond)
-        LVL1MenuItem('L1_2MU4_MU6'         ).setLogic( MU4.x(2) & MU6.x(1)  & physcond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_2MU6_MU10'        ).setLogic( MU6.x(2) & MU10.x(1) & physcond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_3MU4_MU6'         ).setLogic( MU4.x(3) & MU6.x(1)  & physcond).setTriggerType(TT.rpcin)
-
-        LVL1MenuItem('L1_2MU4_XE40', ctpid=-1  ).setLogic( MU4.x(2) &  XE40.x(1)  & physcond).setTriggerType(TT.calo|TT.rpcin)
-        LVL1MenuItem('L1_2MU4_XE30', ctpid=-1  ).setLogic( MU4.x(2) &  XE30.x(1) & physcond).setTriggerType(TT.calo|TT.rpcin)
+        LVL1MenuItem('L1_2MU0',  ctpid=0x26).setLogic( MU0.x(2)  & physcond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_2MU4',  ctpid=-1  ).setLogic( MU4.x(2)  & physcond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_2MU6',  ctpid=0x27).setLogic( MU6.x(2)  & physcond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_2MU10', ctpid=0x28).setLogic( MU10.x(2) & physcond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_2MU11', ctpid=0x28).setLogic( MU11.x(2) & physcond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_2MU20', ctpid=0x2a).setLogic( MU20.x(2) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_3MU4',  ctpid=-1  ).setLogic( MU4.x(3)  & physcond)    # noqa: F821
+        LVL1MenuItem('L1_3MU6',  ctpid=0x2b).setLogic( MU6.x(3)  & physcond)    # noqa: F821
+        LVL1MenuItem('L1_2MU4_MU6'         ).setLogic( MU4.x(2) & MU6.x(1)  & physcond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_2MU6_MU10'        ).setLogic( MU6.x(2) & MU10.x(1) & physcond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_3MU4_MU6'         ).setLogic( MU4.x(3) & MU6.x(1)  & physcond).setTriggerType(TT.rpcin)    # noqa: F821
+
+        LVL1MenuItem('L1_2MU4_XE40', ctpid=-1  ).setLogic( MU4.x(2) &  XE40.x(1)  & physcond).setTriggerType(TT.calo|TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_2MU4_XE30', ctpid=-1  ).setLogic( MU4.x(2) &  XE30.x(1) & physcond).setTriggerType(TT.calo|TT.rpcin)    # noqa: F821
 
         # barrel 
-        LVL1MenuItem('L1_MUB'            ).setLogic( NIM_MUB.x(1) & physcond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_MUE'            ).setLogic( NIM_MUE.x(1) & physcond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_2MU4_BARRELONLY').setLogic( ( MU4.x(2) & Not(NIM_MUE.x(1)) |  MU4.x(3)) & physcond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_2MU4_MU6_BARREL').setLogic( MU4.x(2) & NIM_MUB.x(1) & MU6.x(1) & physcond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_2MU4_BARREL'    ).setLogic( MU4.x(2) & NIM_MUB.x(1) & physcond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_2MU6_BARRELONLY').setLogic( (MU6.x(2)&Not(NIM_MUE.x(1))| MU6.x(3)) & physcond).setTriggerType(TT.rpcin)        
-        LVL1MenuItem('L1_2MU6_BARREL'    ).setLogic( MU6.x(2) & NIM_MUB.x(1) & physcond).setTriggerType(TT.rpcin)
+        LVL1MenuItem('L1_MUB'            ).setLogic( NIM_MUB.x(1) & physcond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_MUE'            ).setLogic( NIM_MUE.x(1) & physcond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_2MU4_BARRELONLY').setLogic( ( MU4.x(2) & Not(NIM_MUE.x(1)) |  MU4.x(3)) & physcond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_2MU4_MU6_BARREL').setLogic( MU4.x(2) & NIM_MUB.x(1) & MU6.x(1) & physcond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_2MU4_BARREL'    ).setLogic( MU4.x(2) & NIM_MUB.x(1) & physcond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_2MU6_BARRELONLY').setLogic( (MU6.x(2)&Not(NIM_MUE.x(1))| MU6.x(3)) & physcond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_2MU6_BARREL'    ).setLogic( MU6.x(2) & NIM_MUB.x(1) & physcond).setTriggerType(TT.rpcin)    # noqa: F821
         
 
 
         # TAU ctpid=[0x40:0x4f]
 
         # 1xTAU
-        LVL1MenuItem('L1_TAU3',   ctpid=0x40).setLogic( HA3.x(1)   & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU6',   ctpid=-1  ).setLogic( HA6.x(1)   & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU8',   ctpid=0x43).setLogic( HA8.x(1)   & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU11',  ctpid=0x44).setLogic( HA11.x(1)  & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU11I', ctpid=0x44).setLogic( HA11I.x(1) & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU12',  ctpid=-1  ).setLogic( HA12.x(1)  & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU15',  ctpid=-1  ).setLogic( HA15.x(1)  & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU15I'            ).setLogic( HA15I.x(1) & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU20',  ctpid=0x46).setLogic( HA20.x(1)  & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU40',  ctpid=0x49).setLogic( HA40.x(1)  & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU60',  ctpid=-1  ).setLogic( HA60.x(1)  & physcond).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_TAU3',   ctpid=0x40).setLogic( HA3.x(1)   & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU6',   ctpid=-1  ).setLogic( HA6.x(1)   & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU8',   ctpid=0x43).setLogic( HA8.x(1)   & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU11',  ctpid=0x44).setLogic( HA11.x(1)  & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU11I', ctpid=0x44).setLogic( HA11I.x(1) & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU12',  ctpid=-1  ).setLogic( HA12.x(1)  & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU15',  ctpid=-1  ).setLogic( HA15.x(1)  & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU15I'            ).setLogic( HA15I.x(1) & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU20',  ctpid=0x46).setLogic( HA20.x(1)  & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU40',  ctpid=0x49).setLogic( HA40.x(1)  & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU60',  ctpid=-1  ).setLogic( HA60.x(1)  & physcond).setTriggerType( TT.calo )    # noqa: F821
 
         # 2xTAU
-        LVL1MenuItem('L1_2TAU11', ctpid=0x4c ).setLogic( HA11.x(2)  & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_2TAU11I'            ).setLogic( HA11I.x(2) & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_2TAU15'             ).setLogic( HA15.x(2)  & physcond).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_2TAU11', ctpid=0x4c ).setLogic( HA11.x(2)  & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_2TAU11I'            ).setLogic( HA11I.x(2) & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_2TAU15'             ).setLogic( HA15.x(2)  & physcond).setTriggerType( TT.calo )    # noqa: F821
 
         # mixed tau
-        LVL1MenuItem('L1_EM15VH_TAU40_2TAU15'          ).setLogic( EM15VH  & HA40 & HA15.x(2)   & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_EM15VH_2TAU12_J25_2J15_3J12'  ).setLogic( EM15VH  & HA12.x(2)  & J25 & J15.x(2) & J12.x(3) & physcond).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_EM15VH_TAU40_2TAU15'          ).setLogic( EM15VH  & HA40 & HA15.x(2)   & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_EM15VH_2TAU12_J25_2J15_3J12'  ).setLogic( EM15VH  & HA12.x(2)  & J25 & J15.x(2) & J12.x(3) & physcond).setTriggerType( TT.calo )    # noqa: F821
 
-        LVL1MenuItem('L1_MU10_TAU20'       ).setLogic( MU10  & HA20          & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_MU10_TAU12_J25_2J12' ).setLogic( MU10 & HA12 & J25 & J12.x(2) & physcond).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_MU10_TAU20'       ).setLogic( MU10  & HA20          & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_MU10_TAU12_J25_2J12' ).setLogic( MU10 & HA12 & J25 & J12.x(2) & physcond).setTriggerType( TT.calo )    # noqa: F821
 
-        LVL1MenuItem('L1_TAU20_2TAU12_J25_2J20_3J12'   ).setLogic( HA20 & HA12.x(2)     & J25 & J20.x(2) & J12.x(3) & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU20_2J20_XE45'              ).setLogic( HA20    & J20.x(2)   & XE45 & physcond).setTriggerType( TT.calo )
-        LVL1MenuItem('L1_TAU20_2TAU12_XE35'            ).setLogic( HA20    & HA12.x(2)  & XE35 & physcond).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_TAU20_2TAU12_J25_2J20_3J12'   ).setLogic( HA20 & HA12.x(2)     & J25 & J20.x(2) & J12.x(3) & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU20_2J20_XE45'              ).setLogic( HA20    & J20.x(2)   & XE45 & physcond).setTriggerType( TT.calo )    # noqa: F821
+        LVL1MenuItem('L1_TAU20_2TAU12_XE35'            ).setLogic( HA20    & HA12.x(2)  & XE35 & physcond).setTriggerType( TT.calo )    # noqa: F821
 
         # EMPTY
-        LVL1MenuItem('L1_2TAU20'    ).setLogic( HA20.x(2) & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_2TAU20'    ).setLogic( HA20.x(2) & physcond).setTriggerType(TT.calo)    # noqa: F821
 
 
         # JET ctpid=[0x60:0x7f]
 
-        LVL1MenuItem('L1_J5',      ctpid=0x60).setLogic( J5.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J5_win6', ctpid=0x60).setLogic( J5_win6.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J10',     ctpid=0x61).setLogic( J10.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J15'                ).setLogic( J15.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J18',     ctpid=0x62).setLogic( J18.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J20',     ctpid=-1  ).setLogic( J20.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J30'                ).setLogic( J30.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J40'                ).setLogic( J40.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J50'                ).setLogic( J50.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J75'                ).setLogic( J75.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J100',    ctpid=-1  ).setLogic( J100.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J350',    ctpid=-1  ).setLogic( J350.x(1) & physcond).setTriggerType(TT.calo)
-
-        LVL1MenuItem('L1_J15.ETA24', ctpid=-1).setLogic(J15ETA24.x(1) & physcond).setTriggerType(TT.calo)
-
-        LVL1MenuItem('L1_J15.23ETA49' ).setLogic( (JF1523ETA49  | JB1523ETA49  ) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J20.32ETA49' ).setLogic( (JF2032ETA49  | JB2032ETA49  ) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J25.32ETA49' ).setLogic( (JF2532ETA49  | JB2532ETA49  ) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J100.32ETA49').setLogic( (JF10032ETA49 | JB10032ETA49 ) & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_J5',      ctpid=0x60).setLogic( J5.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J5_win6', ctpid=0x60).setLogic( J5_win6.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J10',     ctpid=0x61).setLogic( J10.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J15'                ).setLogic( J15.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J18',     ctpid=0x62).setLogic( J18.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J20',     ctpid=-1  ).setLogic( J20.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J30'                ).setLogic( J30.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J40'                ).setLogic( J40.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J50'                ).setLogic( J50.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J75'                ).setLogic( J75.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J100',    ctpid=-1  ).setLogic( J100.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J350',    ctpid=-1  ).setLogic( J350.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+
+        LVL1MenuItem('L1_J15.ETA24', ctpid=-1).setLogic(J15ETA24.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+
+        LVL1MenuItem('L1_J15.23ETA49' ).setLogic( (JF1523ETA49  | JB1523ETA49  ) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J20.32ETA49' ).setLogic( (JF2032ETA49  | JB2032ETA49  ) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J25.32ETA49' ).setLogic( (JF2532ETA49  | JB2532ETA49  ) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J100.32ETA49').setLogic( (JF10032ETA49 | JB10032ETA49 ) & physcond).setTriggerType(TT.calo)    # noqa: F821
 
         # pPb
-        LVL1MenuItem('L1_J5_TE90',  ctpid=0x60).setLogic( J5.x(1)& TE90.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_2J5_TE90', ctpid=0x60).setLogic( J5.x(2)& TE90.x(1) & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_J5_TE90',  ctpid=0x60).setLogic( J5.x(1)& TE90.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_2J5_TE90', ctpid=0x60).setLogic( J5.x(2)& TE90.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
 
         # Multi-jet
-        LVL1MenuItem('L1_2J5', ctpid=0x68 ).setLogic( J5.x(2)  & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_2J10'            ).setLogic( J10.x(2) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_3J10', ctpid=0x7f).setLogic( J10.x(3) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_3J15'            ).setLogic( J15.x(3) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_3J50', ctpid=0x7f).setLogic( J50.x(3) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_3J75', ctpid=-1  ).setLogic( J75.x(3) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_3J20', ctpid=-1  ).setLogic( J20.x(3) & physcond).setTriggerType(TT.calo) # new jet threshold
-        LVL1MenuItem('L1_4J10', ctpid=0x6e).setLogic( J10.x(4) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_4J15'            ).setLogic( J15.x(4) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_4J20', ctpid=-1  ).setLogic( J20.x(4) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_5J10', ctpid=-1  ).setLogic( J10.x(5) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_5J15'            ).setLogic( J15.x(5) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_5J20', ctpid=-1  ).setLogic( J20.x(5) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_6J10', ctpid=-1  ).setLogic( J10.x(6) & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_2J5', ctpid=0x68 ).setLogic( J5.x(2)  & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_2J10'            ).setLogic( J10.x(2) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_3J10', ctpid=0x7f).setLogic( J10.x(3) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_3J15'            ).setLogic( J15.x(3) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_3J50', ctpid=0x7f).setLogic( J50.x(3) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_3J75', ctpid=-1  ).setLogic( J75.x(3) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_3J20', ctpid=-1  ).setLogic( J20.x(3) & physcond).setTriggerType(TT.calo) # new jet threshold  # noqa: F821
+        LVL1MenuItem('L1_4J10', ctpid=0x6e).setLogic( J10.x(4) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_4J15'            ).setLogic( J15.x(4) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_4J20', ctpid=-1  ).setLogic( J20.x(4) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_5J10', ctpid=-1  ).setLogic( J10.x(5) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_5J15'            ).setLogic( J15.x(5) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_5J20', ctpid=-1  ).setLogic( J20.x(5) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_6J10', ctpid=-1  ).setLogic( J10.x(6) & physcond).setTriggerType(TT.calo)    # noqa: F821
         
-        LVL1MenuItem('L1_3J15.ETA24' ).setLogic( J15ETA24.x(3) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_5J15.ETA24' ).setLogic( J15ETA24.x(5) & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_3J15.ETA24' ).setLogic( J15ETA24.x(3) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_5J15.ETA24' ).setLogic( J15ETA24.x(5) & physcond).setTriggerType(TT.calo)    # noqa: F821
 
 
         #example zero bias seeded by single jet
-        #item_zb_j10  = LVL1MenuItem('L1_ZB_J10',  ctpid=240).setLogic(thr_zb_j10.x(1) & physcond).setTriggerType(TT.calo)
+        #item_zb_j10  = LVL1MenuItem('L1_ZB_J10',  ctpid=240).setLogic(thr_zb_j10.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
         #example zero bias seeded by di jet
-        #item_zb_2j10 = LVL1MenuItem('L1_ZB_2J10', ctpid=241).setLogic(thr_zb_2j10.x(1) & physcond).setTriggerType(TT.calo)
+        #item_zb_2j10 = LVL1MenuItem('L1_ZB_2J10', ctpid=241).setLogic(thr_zb_2j10.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
         #zb item for v3 menu, seeded by mbts a
 
         if ('pp_v4' in TriggerFlags.triggerMenuSetup() or 'LS1_v1' in TriggerFlags.triggerMenuSetup()) :
-            LVL1MenuItem('L1_ZB', ctpid=240).setLogic(ZB_EM12.x(1) & physcond).setTriggerType(TT.zerobs)
+            LVL1MenuItem('L1_ZB', ctpid=240).setLogic(ZB_EM12.x(1) & physcond).setTriggerType(TT.zerobs)    # noqa: F821
         elif  'DC14' in TriggerFlags.triggerMenuSetup():
-            LVL1MenuItem('L1_ZB', ctpid=240).setLogic(ZB_EM15V.x(1) & physcond).setTriggerType(TT.zerobs)
+            LVL1MenuItem('L1_ZB', ctpid=240).setLogic(ZB_EM15V.x(1) & physcond).setTriggerType(TT.zerobs)    # noqa: F821
         else:
-            LVL1MenuItem('L1_ZB', ctpid=240).setLogic(ZB_EM14.x(1) & physcond).setTriggerType(TT.zerobs)
+            LVL1MenuItem('L1_ZB', ctpid=240).setLogic(ZB_EM14.x(1) & physcond).setTriggerType(TT.zerobs)    # noqa: F821
 
 
             
         # - Add/remap new L1 thresholds:
         #   J20->J15, J40->J30, J70->J55, J100->J75, J130->J95, J150->J115
-        LVL1MenuItem('L1_4J30'    ).setLogic( J30.x(4) & physcond)
-        LVL1MenuItem('L1_3J15_J50').setLogic( J15.x(3) & J50.x(1) & physcond)
-        LVL1MenuItem('L1_J30_FJ30').setLogic( J30.x(1) & ( JF30.x(1) | JB30.x(1) ) & physcond)
-        LVL1MenuItem('L1_J50_FJ50').setLogic( J50.x(1) & ( JF50.x(1) | JB50.x(1) ) & physcond)
+        LVL1MenuItem('L1_4J30'    ).setLogic( J30.x(4) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_3J15_J50').setLogic( J15.x(3) & J50.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_J30_FJ30').setLogic( J30.x(1) & ( JF30.x(1) | JB30.x(1) ) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_J50_FJ50').setLogic( J50.x(1) & ( JF50.x(1) | JB50.x(1) ) & physcond)    # noqa: F821
 
 
 
         # FJ
         #pPb items
         
-        LVL1MenuItem('L1_FJ0',   ctpid=0x7b).setLogic(( JF0.x(1) | JB0.x(1)) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_FJ0_A', ctpid=0x7b).setLogic(( JF0.x(1)) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_FJ0_C', ctpid=0x7b).setLogic(( JB0.x(1)) & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_FJ0',   ctpid=0x7b).setLogic(( JF0.x(1) | JB0.x(1)) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_FJ0_A', ctpid=0x7b).setLogic(( JF0.x(1)) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_FJ0_C', ctpid=0x7b).setLogic(( JB0.x(1)) & physcond).setTriggerType(TT.calo)    # noqa: F821
         
         #pp items
-        LVL1MenuItem('L1_FJ5', ctpid=0x7b).setLogic(( JF5.x(1) |  JB5.x(1)) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_FJ10').setLogic(( JF10.x(1) |  JB10.x(1)) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_FJ15').setLogic(( JF15.x(1) |  JB15.x(1)) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_FJ30').setLogic(( JF30.x(1) |  JB30.x(1)) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_FJ50').setLogic(( JF50.x(1) |  JB50.x(1)) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_FJ75').setLogic(( JF75.x(1) |  JB75.x(1)) & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_FJ5', ctpid=0x7b).setLogic(( JF5.x(1) |  JB5.x(1)) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_FJ10').setLogic(( JF10.x(1) |  JB10.x(1)) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_FJ15').setLogic(( JF15.x(1) |  JB15.x(1)) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_FJ30').setLogic(( JF30.x(1) |  JB30.x(1)) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_FJ50').setLogic(( JF50.x(1) |  JB50.x(1)) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_FJ75').setLogic(( JF75.x(1) |  JB75.x(1)) & physcond).setTriggerType(TT.calo)    # noqa: F821
 
         # 2xFJ
-        LVL1MenuItem('L1_2FJ15').setLogic( JF15.x(1) &  JB15.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_2FJ30', ctpid=0x7d).setLogic( JF30.x(1) &  JB30.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_2FJ50', ctpid=0x7b).setLogic( JF50.x(1) &  JB50.x(1) & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_2FJ15').setLogic( JF15.x(1) &  JB15.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_2FJ30', ctpid=0x7d).setLogic( JF30.x(1) &  JB30.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_2FJ50', ctpid=0x7b).setLogic( JF50.x(1) &  JB50.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
 
         
         # Diffractive
 
-        LVL1MenuItem('L1_MU0_TE50'    ).setLogic( MU0.x(1) & TE50.x(1) & physcond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_MU4_TE50'    ).setLogic( MU4.x(1) & TE50.x(1) & physcond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_EM3_2J5'     ).setLogic( EM3.x(1) & J5.x(2)   & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_MU0_TE50'    ).setLogic( MU0.x(1) & TE50.x(1) & physcond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_MU4_TE50'    ).setLogic( MU4.x(1) & TE50.x(1) & physcond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_EM3_2J5'     ).setLogic( EM3.x(1) & J5.x(2)   & physcond).setTriggerType(TT.calo)    # noqa: F821
 
-        LVL1MenuItem('L1_MU0_VTE50'   ).setLogic( MU0.x(1) & Not(TE50.x(1)) & physcond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_MU0_VTE20'   ).setLogic( MU0.x(1) & Not(TE20.x(1)) & physcond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_MU4_VTE50'   ).setLogic( MU4.x(1) & Not(TE50.x(1)) & physcond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_EM3_VTE50'   ).setLogic( EM3.x(1) & Not(TE50.x(1)) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_EM3_VTE20'   ).setLogic( EM3.x(1) & Not(TE20.x(1)) & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_MU0_VTE50'   ).setLogic( MU0.x(1) & Not(TE50.x(1)) & physcond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_MU0_VTE20'   ).setLogic( MU0.x(1) & Not(TE20.x(1)) & physcond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_MU4_VTE50'   ).setLogic( MU4.x(1) & Not(TE50.x(1)) & physcond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_EM3_VTE50'   ).setLogic( EM3.x(1) & Not(TE50.x(1)) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_EM3_VTE20'   ).setLogic( EM3.x(1) & Not(TE20.x(1)) & physcond).setTriggerType(TT.calo)    # noqa: F821
 
-        LVL1MenuItem('L1_MU0_MV_VTE50').setLogic( MU0.x(1) & Not(MBTS_A.x(1)& MBTS_C.x(1)) & Not(TE50.x(1)) & physcond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_MU4_MV_VTE50').setLogic( MU4.x(1) & Not(MBTS_A.x(1)& MBTS_C.x(1)) & Not(TE50.x(1)) & physcond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_EM3_MV_VTE50').setLogic( EM3.x(1) & Not(MBTS_A.x(1)& MBTS_C.x(1)) & Not(TE50.x(1)) & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_MU0_MV_VTE50').setLogic( MU0.x(1) & Not(MBTS_A.x(1)& MBTS_C.x(1)) & Not(TE50.x(1)) & physcond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_MU4_MV_VTE50').setLogic( MU4.x(1) & Not(MBTS_A.x(1)& MBTS_C.x(1)) & Not(TE50.x(1)) & physcond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_EM3_MV_VTE50').setLogic( EM3.x(1) & Not(MBTS_A.x(1)& MBTS_C.x(1)) & Not(TE50.x(1)) & physcond).setTriggerType(TT.calo)    # noqa: F821
 
 
         # Items for EMPTY
         # EM
-        LVL1MenuItem('L1_EM3_EMPTY',   ctpid=-1).setLogic( EM3.x(1)   & cosmiccond).setTriggerType( emTT )
-        LVL1MenuItem('L1_EM5_EMPTY',   ctpid=-1).setLogic( EM5.x(1)   & cosmiccond).setTriggerType( emTT )
-        LVL1MenuItem('L1_EM6_EMPTY',   ctpid=-1).setLogic( EM6.x(1)   & cosmiccond).setTriggerType( emTT )
+        LVL1MenuItem('L1_EM3_EMPTY',   ctpid=-1).setLogic( EM3.x(1)   & cosmiccond).setTriggerType( emTT )    # noqa: F821
+        LVL1MenuItem('L1_EM5_EMPTY',   ctpid=-1).setLogic( EM5.x(1)   & cosmiccond).setTriggerType( emTT )    # noqa: F821
+        LVL1MenuItem('L1_EM6_EMPTY',   ctpid=-1).setLogic( EM6.x(1)   & cosmiccond).setTriggerType( emTT )    # noqa: F821
         # Muon
-        LVL1MenuItem('L1_MU0_EMPTY'      ).setLogic( MU0.x(1)  & cosmiccond).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_MU4_EMPTY'      ).setLogic( MU4.x(1)  & cosmiccond).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_MU10_EMPTY'     ).setLogic( MU10.x(1) & cosmiccond).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_2MU6_EMPTY'     ).setLogic( MU6.x(2)  & cosmiccond).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_2MU0_EMPTY'     ).setLogic( MU0.x(2)  & cosmiccond).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_2MU4_EMPTY'     ).setLogic( MU4.x(2)  & cosmiccond).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_MU11_EMPTY'     ).setLogic( MU11.x(1) & cosmiccond).setTriggerType(TT.rpcout)
+        LVL1MenuItem('L1_MU0_EMPTY'      ).setLogic( MU0.x(1)  & cosmiccond).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_MU4_EMPTY'      ).setLogic( MU4.x(1)  & cosmiccond).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_MU10_EMPTY'     ).setLogic( MU10.x(1) & cosmiccond).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_2MU6_EMPTY'     ).setLogic( MU6.x(2)  & cosmiccond).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_2MU0_EMPTY'     ).setLogic( MU0.x(2)  & cosmiccond).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_2MU4_EMPTY'     ).setLogic( MU4.x(2)  & cosmiccond).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_MU11_EMPTY'     ).setLogic( MU11.x(1) & cosmiccond).setTriggerType(TT.rpcout)    # noqa: F821
         # Tau
-        LVL1MenuItem('L1_TAU8_EMPTY').setLogic( HA8.x(1) & cosmiccond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_TAU8_EMPTY').setLogic( HA8.x(1) & cosmiccond).setTriggerType(TT.calo)    # noqa: F821
         # Jet
-        LVL1MenuItem('L1_J5_EMPTY' ).setLogic( J5.x(1)  & cosmiccond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J10_EMPTY').setLogic( J10.x(1) & cosmiccond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J30_EMPTY').setLogic( J30.x(1) & cosmiccond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_J5_EMPTY' ).setLogic( J5.x(1)  & cosmiccond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J10_EMPTY').setLogic( J10.x(1) & cosmiccond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J30_EMPTY').setLogic( J30.x(1) & cosmiccond).setTriggerType(TT.calo)    # noqa: F821
         # Forward Jet
-        LVL1MenuItem('L1_FJ5_EMPTY' ).setLogic( ( JF5.x(1) |  JB5.x(1)) & cosmiccond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_FJ0_EMPTY' ).setLogic( ( JF0.x(1) |  JB0.x(1)) & cosmiccond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_FJ30_EMPTY').setLogic( (JF30.x(1) | JB30.x(1)) & cosmiccond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_FJ5_EMPTY' ).setLogic( ( JF5.x(1) |  JB5.x(1)) & cosmiccond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_FJ0_EMPTY' ).setLogic( ( JF0.x(1) |  JB0.x(1)) & cosmiccond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_FJ30_EMPTY').setLogic( (JF30.x(1) | JB30.x(1)) & cosmiccond).setTriggerType(TT.calo)    # noqa: F821
         # combined
-        LVL1MenuItem('L1_MU4_J15_EMPTY'  ).setLogic( MU4.x(1)  &  J15.x(1) & cosmiccond).setTriggerType(TT.rpcout)        
+        LVL1MenuItem('L1_MU4_J15_EMPTY'  ).setLogic( MU4.x(1)  &  J15.x(1) & cosmiccond).setTriggerType(TT.rpcout)    # noqa: F821
 
 
                 
@@ -336,537 +331,537 @@ class ItemDef:
         # Items for EMPTY, UNPAIRED1, UNPAIRED2 and UNPAIRED
 
         # Jet
-        LVL1MenuItem('L1_J5_UNPAIRED_ISO'     ).setLogic( J5.x(1)  & unpaired_isocond   ).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J5_UNPAIRED_NONISO'  ).setLogic( J5.x(1)  & unpaired_nonisocond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J5_FIRSTEMPTY'       ).setLogic( J5.x(1)  & firstempty         ).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J10_UNPAIRED_ISO'    ).setLogic( J10.x(1) & unpaired_isocond   ).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J10_UNPAIRED_NONISO' ).setLogic( J10.x(1) & unpaired_nonisocond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J10_FIRSTEMPTY'      ).setLogic( J10.x(1) & firstempty         ).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J30_UNPAIRED'        ).setLogic( J30.x(1) & unpairedRcond      ).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J30_UNPAIRED_ISO'    ).setLogic( J30.x(1) & unpaired_isocond   ).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J30_UNPAIRED_NONISO' ).setLogic( J30.x(1) & unpaired_nonisocond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_J30_FIRSTEMPTY'      ).setLogic( J30.x(1) & firstempty         ).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_J5_UNPAIRED_ISO'     ).setLogic( J5.x(1)  & unpaired_isocond   ).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J5_UNPAIRED_NONISO'  ).setLogic( J5.x(1)  & unpaired_nonisocond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J5_FIRSTEMPTY'       ).setLogic( J5.x(1)  & firstempty         ).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J10_UNPAIRED_ISO'    ).setLogic( J10.x(1) & unpaired_isocond   ).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J10_UNPAIRED_NONISO' ).setLogic( J10.x(1) & unpaired_nonisocond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J10_FIRSTEMPTY'      ).setLogic( J10.x(1) & firstempty         ).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J30_UNPAIRED'        ).setLogic( J30.x(1) & unpairedRcond      ).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J30_UNPAIRED_ISO'    ).setLogic( J30.x(1) & unpaired_isocond   ).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J30_UNPAIRED_NONISO' ).setLogic( J30.x(1) & unpaired_nonisocond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_J30_FIRSTEMPTY'      ).setLogic( J30.x(1) & firstempty         ).setTriggerType(TT.calo)    # noqa: F821
         # Forward jet
-        LVL1MenuItem('L1_FJ10_UNPAIRED_NONISO').setLogic( ( JF10.x(1) |  JB10.x(1)) & unpaired_nonisocond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_FJ0_UNPAIRED_ISO'    ).setLogic( ( JF0.x(1)  |  JB0.x(1) ) & unpaired_isocond   ).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_FJ5_UNPAIRED_ISO'    ).setLogic( ( JF5.x(1)  |  JB5.x(1) ) & unpaired_isocond   ).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_FJ30_UNPAIRED_ISO'   ).setLogic( ( JF30.x(1) |  JB30.x(1)) & unpaired_isocond   ).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_FJ30_FIRSTEMPTY'     ).setLogic( ( JF30.x(1) |  JB30.x(1)) & firstempty         ).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_FJ10_UNPAIRED_NONISO').setLogic( ( JF10.x(1) |  JB10.x(1)) & unpaired_nonisocond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_FJ0_UNPAIRED_ISO'    ).setLogic( ( JF0.x(1)  |  JB0.x(1) ) & unpaired_isocond   ).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_FJ5_UNPAIRED_ISO'    ).setLogic( ( JF5.x(1)  |  JB5.x(1) ) & unpaired_isocond   ).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_FJ30_UNPAIRED_ISO'   ).setLogic( ( JF30.x(1) |  JB30.x(1)) & unpaired_isocond   ).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_FJ30_FIRSTEMPTY'     ).setLogic( ( JF30.x(1) |  JB30.x(1)) & firstempty         ).setTriggerType(TT.calo)    # noqa: F821
         # Tau
-        LVL1MenuItem('L1_TAU8_UNPAIRED_ISO'   ).setLogic( HA8.x(1) & unpaired_isocond   ).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TAU8_UNPAIRED_NONISO').setLogic( HA8.x(1) & unpaired_nonisocond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TAU8_FIRSTEMPTY'     ).setLogic( HA8.x(1) & firstempty         ).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_TAU8_UNPAIRED_ISO'   ).setLogic( HA8.x(1) & unpaired_isocond   ).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TAU8_UNPAIRED_NONISO').setLogic( HA8.x(1) & unpaired_nonisocond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TAU8_FIRSTEMPTY'     ).setLogic( HA8.x(1) & firstempty         ).setTriggerType(TT.calo)    # noqa: F821
         # EM
-        LVL1MenuItem('L1_EM3_UNPAIRED_ISO'    ).setLogic( EM3.x(1) & unpaired_isocond   ).setTriggerType(TT.calo|TT.caloem)
-        LVL1MenuItem('L1_EM3_UNPAIRED_NONISO' ).setLogic( EM3.x(1) & unpaired_nonisocond).setTriggerType(TT.calo|TT.caloem)
-        LVL1MenuItem('L1_EM3_FIRSTEMPTY'      ).setLogic( EM3.x(1) & firstempty         ).setTriggerType(TT.calo|TT.caloem)
+        LVL1MenuItem('L1_EM3_UNPAIRED_ISO'    ).setLogic( EM3.x(1) & unpaired_isocond   ).setTriggerType(TT.calo|TT.caloem)    # noqa: F821
+        LVL1MenuItem('L1_EM3_UNPAIRED_NONISO' ).setLogic( EM3.x(1) & unpaired_nonisocond).setTriggerType(TT.calo|TT.caloem)    # noqa: F821
+        LVL1MenuItem('L1_EM3_FIRSTEMPTY'      ).setLogic( EM3.x(1) & firstempty         ).setTriggerType(TT.calo|TT.caloem)    # noqa: F821
         # Muon
-        LVL1MenuItem('L1_MU0_UNPAIRED_ISO'    ).setLogic( MU0.x(1)  & unpaired_isocond   ).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_MU4_UNPAIRED_ISO'    ).setLogic( MU4.x(1)  & unpaired_isocond   ).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_MU10_UNPAIRED_ISO'   ).setLogic( MU10.x(1) & unpaired_isocond   ).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_MU0_UNPAIRED_NONISO' ).setLogic( MU0.x(1)  & unpaired_nonisocond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_MU4_UNPAIRED_NONISO' ).setLogic( MU4.x(1)  & unpaired_nonisocond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_MU0_FIRSTEMPTY'      ).setLogic( MU0.x(1)  & firstempty         ).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_MU4_FIRSTEMPTY'      ).setLogic( MU4.x(1)  & firstempty         ).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_MU6_FIRSTEMPTY'      ).setLogic( MU6.x(1)  & firstempty         ).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_MU10_FIRSTEMPTY'     ).setLogic( MU10.x(1) & firstempty         ).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_MU20_FIRSTEMPTY'     ).setLogic( MU20.x(1) & firstempty         ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_2MU6_UNPAIRED_ISO'   ).setLogic( MU6.x(2)  & unpaired_isocond   ).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_2MU6_UNPAIRED_NONISO').setLogic( MU6.x(2)  & unpaired_nonisocond).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_2MU4_FIRSTEMPTY'     ).setLogic( MU4.x(2)  & firstempty         ).setTriggerType(TT.rpcin)
-        LVL1MenuItem('L1_2MU6_FIRSTEMPTY'     ).setLogic( MU6.x(2)  & firstempty         ).setTriggerType(TT.rpcin)        
+        LVL1MenuItem('L1_MU0_UNPAIRED_ISO'    ).setLogic( MU0.x(1)  & unpaired_isocond   ).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_MU4_UNPAIRED_ISO'    ).setLogic( MU4.x(1)  & unpaired_isocond   ).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_MU10_UNPAIRED_ISO'   ).setLogic( MU10.x(1) & unpaired_isocond   ).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_MU0_UNPAIRED_NONISO' ).setLogic( MU0.x(1)  & unpaired_nonisocond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_MU4_UNPAIRED_NONISO' ).setLogic( MU4.x(1)  & unpaired_nonisocond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_MU0_FIRSTEMPTY'      ).setLogic( MU0.x(1)  & firstempty         ).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_MU4_FIRSTEMPTY'      ).setLogic( MU4.x(1)  & firstempty         ).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_MU6_FIRSTEMPTY'      ).setLogic( MU6.x(1)  & firstempty         ).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_MU10_FIRSTEMPTY'     ).setLogic( MU10.x(1) & firstempty         ).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_MU20_FIRSTEMPTY'     ).setLogic( MU20.x(1) & firstempty         ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_2MU6_UNPAIRED_ISO'   ).setLogic( MU6.x(2)  & unpaired_isocond   ).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_2MU6_UNPAIRED_NONISO').setLogic( MU6.x(2)  & unpaired_nonisocond).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_2MU4_FIRSTEMPTY'     ).setLogic( MU4.x(2)  & firstempty         ).setTriggerType(TT.rpcin)    # noqa: F821
+        LVL1MenuItem('L1_2MU6_FIRSTEMPTY'     ).setLogic( MU6.x(2)  & firstempty         ).setTriggerType(TT.rpcin)    # noqa: F821
         # combined
-        LVL1MenuItem('L1_MU4_J15_UNPAIRED_ISO').setLogic( MU4.x(1) & J15.x(1) & unpaired_isocond).setTriggerType(TT.rpcin)
+        LVL1MenuItem('L1_MU4_J15_UNPAIRED_ISO').setLogic( MU4.x(1) & J15.x(1) & unpaired_isocond).setTriggerType(TT.rpcin)    # noqa: F821
 
         #Combined JET+MET
-        LVL1MenuItem('L1_J40_XE50').setLogic( (J40.x(1) & XE50.x(1)) & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_J40_XE50').setLogic( (J40.x(1) & XE50.x(1)) & physcond).setTriggerType(TT.calo)    # noqa: F821
         
         # XE ctpid=[0x80:0x9f]
-        LVL1MenuItem('L1_XE20', ctpid=0x81).setLogic( XE20.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE25', ctpid=0x82).setLogic( XE25.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE30', ctpid=0x83).setLogic( XE30.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE40', ctpid=0x84).setLogic( XE40.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE50', ctpid=0x85).setLogic( XE50.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE70', ctpid=0x86).setLogic( XE70.x(1) & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_XE20', ctpid=0x81).setLogic( XE20.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE25', ctpid=0x82).setLogic( XE25.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE30', ctpid=0x83).setLogic( XE30.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE40', ctpid=0x84).setLogic( XE40.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE50', ctpid=0x85).setLogic( XE50.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE70', ctpid=0x86).setLogic( XE70.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
 
-        LVL1MenuItem('L1_XE35_BGRP7').setLogic( XE35.x(1)&bgrp7cond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE40_BGRP7').setLogic( XE40.x(1)&bgrp7cond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE50_BGRP7').setLogic( XE50.x(1)&bgrp7cond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_XE35_BGRP7').setLogic( XE35.x(1)&bgrp7cond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE40_BGRP7').setLogic( XE40.x(1)&bgrp7cond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE50_BGRP7').setLogic( XE50.x(1)&bgrp7cond).setTriggerType(TT.calo)    # noqa: F821
 
         #pPb items        
-        LVL1MenuItem('L1_TE10').setLogic( TE10.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE20').setLogic( TE20.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE30').setLogic( TE30.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE40').setLogic( TE40.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE35').setLogic( TE35.x(1) & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_TE10').setLogic( TE10.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE20').setLogic( TE20.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE30').setLogic( TE30.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE40').setLogic( TE40.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE35').setLogic( TE35.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
 
         # Other TE items for L=10^32 and 10^33
-        LVL1MenuItem('L1_TE800', ctpid=0x8f).setLogic( TE800.x(1) & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_TE800', ctpid=0x8f).setLogic( TE800.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
 
 
-        # items for HI p+Pb (forward TE)
+        # items for HI p+Pb (forward TE)    # noqa: F821
         if 'HI_v2' in TriggerFlags.triggerMenuSetup():
-            LVL1MenuItem('L1_TE0'  ).setLogic( TE0.x(1)   & physcond).setTriggerType(TT.calo)
-            LVL1MenuItem('L1_TE20' ).setLogic( TE20.x(1)  & physcond).setTriggerType(TT.calo)
-            LVL1MenuItem('L1_TE50' ).setLogic( TE50.x(1)  & physcond).setTriggerType(TT.calo)
-            LVL1MenuItem('L1_TE65' ).setLogic( TE65.x(1)  & physcond).setTriggerType(TT.calo)
-            LVL1MenuItem('L1_TE90' ).setLogic( TE90.x(1)  & physcond).setTriggerType(TT.calo)
-            LVL1MenuItem('L1_TE100').setLogic( TE100.x(1) & physcond).setTriggerType(TT.calo)
+            LVL1MenuItem('L1_TE0'  ).setLogic( TE0.x(1)   & physcond).setTriggerType(TT.calo)    # noqa: F821
+            LVL1MenuItem('L1_TE20' ).setLogic( TE20.x(1)  & physcond).setTriggerType(TT.calo)    # noqa: F821
+            LVL1MenuItem('L1_TE50' ).setLogic( TE50.x(1)  & physcond).setTriggerType(TT.calo)    # noqa: F821
+            LVL1MenuItem('L1_TE65' ).setLogic( TE65.x(1)  & physcond).setTriggerType(TT.calo)    # noqa: F821
+            LVL1MenuItem('L1_TE90' ).setLogic( TE90.x(1)  & physcond).setTriggerType(TT.calo)    # noqa: F821
+            LVL1MenuItem('L1_TE100').setLogic( TE100.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
         else:
-            LVL1MenuItem('L1_TE0'  ).setLogic( TE0.x(1)   & physcond).setTriggerType(TT.calo)
-            LVL1MenuItem('L1_TE50' ).setLogic( TE50.x(1)  & physcond).setTriggerType(TT.calo)
-            LVL1MenuItem('L1_TE65' ).setLogic( TE65.x(1)  & physcond).setTriggerType(TT.calo)
-            LVL1MenuItem('L1_TE90' ).setLogic( TE90.x(1)  & physcond).setTriggerType(TT.calo)
-            LVL1MenuItem('L1_TE100').setLogic( TE100.x(1) & physcond).setTriggerType(TT.calo)
+            LVL1MenuItem('L1_TE0'  ).setLogic( TE0.x(1)   & physcond).setTriggerType(TT.calo)    # noqa: F821
+            LVL1MenuItem('L1_TE50' ).setLogic( TE50.x(1)  & physcond).setTriggerType(TT.calo)    # noqa: F821
+            LVL1MenuItem('L1_TE65' ).setLogic( TE65.x(1)  & physcond).setTriggerType(TT.calo)    # noqa: F821
+            LVL1MenuItem('L1_TE90' ).setLogic( TE90.x(1)  & physcond).setTriggerType(TT.calo)    # noqa: F821
+            LVL1MenuItem('L1_TE100').setLogic( TE100.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
             
 
-        LVL1MenuItem('L1_XS30').setLogic( XS30.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XS45').setLogic( XS45.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XS50').setLogic( XS50.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XS55').setLogic( XS55.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XS60').setLogic( XS60.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XS65').setLogic( XS65.x(1) & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_XS30').setLogic( XS30.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XS45').setLogic( XS45.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XS50').setLogic( XS50.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XS55').setLogic( XS55.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XS60').setLogic( XS60.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XS65').setLogic( XS65.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
         
-        LVL1MenuItem('L1_JE140'            ).setLogic( JE140.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_JE200', ctpid=0x92).setLogic( JE200.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_JE350', ctpid=0x94).setLogic( JE350.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_JE500', ctpid=0x96).setLogic( JE500.x(1) & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_JE140'            ).setLogic( JE140.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_JE200', ctpid=0x92).setLogic( JE200.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_JE350', ctpid=0x94).setLogic( JE350.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_JE500', ctpid=0x96).setLogic( JE500.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
 
         # Transient items
-        LVL1MenuItem('L1_XE35').setLogic( XE35.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_XE60').setLogic( XE60.x(1) & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_XE35').setLogic( XE35.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_XE60').setLogic( XE60.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
 
-        LVL1MenuItem('L1_TE300').setLogic( TE300.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE500').setLogic( TE500.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TE700').setLogic( TE700.x(1) & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_TE300').setLogic( TE300.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE500').setLogic( TE500.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TE700').setLogic( TE700.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
         
         # Combined items [0xa0:0xff], [0x30:0x3f],
 
         # EM + (XE, MU, TAU)
-        LVL1MenuItem('L1_EM10VH_XE20').setLogic( EM10VH.x(1)& XE20.x(1) & physcond).setTriggerType(TT.calo|TT.caloem)
-        LVL1MenuItem('L1_EM10VH_XE30').setLogic( EM10VH.x(1)& XE30.x(1) & physcond).setTriggerType(TT.calo|TT.caloem)
-        LVL1MenuItem('L1_EM10VH_XE35').setLogic( EM10VH.x(1)& XE35.x(1) & physcond).setTriggerType(TT.calo|TT.caloem)        
-
-
-        LVL1MenuItem('L1_EM3_MU6', ctpid=0xbd).setLogic( MU6.x(1)& EM3.x(1) & physcond).setTriggerType(TT.rpcin|TT.calo|TT.caloem)
-        LVL1MenuItem('L1_EM6_2MU6'   ).setLogic( MU6.x(2)& EM6.x(1) & physcond)
-        LVL1MenuItem('L1_EM10VH_MU6' ).setLogic( EM10VH.x(1)& MU6.x(1) & physcond).setTriggerType(TT.calo|TT.caloem)
-        LVL1MenuItem('L1_EM15VH_MU10').setLogic( EM15VH.x(1)& MU10.x(1)& physcond).setTriggerType(TT.calo|TT.caloem)
-        LVL1MenuItem('L1_EM16VH_MU4' ).setLogic( EM16VH.x(1)& MU4.x(1) & physcond).setTriggerType(TT.calo|TT.caloem)
-        LVL1MenuItem('L1_2EM8VH_MU10' ).setLogic( EM8VH.x(2)& MU10.x(1) & physcond).setTriggerType(TT.calo|TT.caloem)
-        LVL1MenuItem('L1_EM8VH_2MU6' ).setLogic( EM8VH.x(1)& MU6.x(2) & physcond).setTriggerType(TT.calo|TT.caloem)
-
-
-        LVL1MenuItem('L1_2EM6_MU6'   ).setLogic( EM6.x(2)& MU6.x(1) & physcond)
-        LVL1MenuItem('L1_EM6_MU6'    ).setLogic( EM6.x(1)& MU6.x(1) & physcond)
-        LVL1MenuItem('L1_EM6_MU10'   ).setLogic( EM6.x(1)& MU10.x(1) & physcond)
-        LVL1MenuItem('L1_EM12_XE20'  ).setLogic( EM12.x(1)& XE20.x(1) & physcond)
-        LVL1MenuItem('L1_EM16V_XE20' ).setLogic( EM16V.x(1)& XE20.x(1) & physcond)
-        LVL1MenuItem('L1_EM6_XS45'   ).setLogic( EM6.x(1)& XS45.x(1) & physcond)
-        LVL1MenuItem('L1_EM6_XS50'   ).setLogic( EM6.x(1)& XS50.x(1) & physcond)
-        LVL1MenuItem('L1_EM6_XS55'   ).setLogic( EM6.x(1)& XS55.x(1) & physcond)
-        LVL1MenuItem('L1_EM6_XS60'   ).setLogic( EM6.x(1)& XS60.x(1) & physcond)
-        LVL1MenuItem('L1_EM16V_XS45' ).setLogic( EM16V.x(1)& XS45.x(1) & physcond)
-        LVL1MenuItem('L1_EM12_XS45'  ).setLogic( EM12.x(1)& XS45.x(1) & physcond)
-        LVL1MenuItem('L1_EM12_XS30'  ).setLogic( EM12.x(1)& XS30.x(1) & physcond)
-        LVL1MenuItem('L1_EM12_4J10'  ).setLogic( EM12.x(1)& J10.x(4) & physcond)
-        LVL1MenuItem('L1_EM15VH_J15.23ETA49' ).setLogic( EM15VH&  (JF1523ETA49.x(1)  | JB1523ETA49.x(1)  ) & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_EM10VH_XE20').setLogic( EM10VH.x(1)& XE20.x(1) & physcond).setTriggerType(TT.calo|TT.caloem)    # noqa: F821
+        LVL1MenuItem('L1_EM10VH_XE30').setLogic( EM10VH.x(1)& XE30.x(1) & physcond).setTriggerType(TT.calo|TT.caloem)    # noqa: F821
+        LVL1MenuItem('L1_EM10VH_XE35').setLogic( EM10VH.x(1)& XE35.x(1) & physcond).setTriggerType(TT.calo|TT.caloem)    # noqa: F821
+
+
+        LVL1MenuItem('L1_EM3_MU6', ctpid=0xbd).setLogic( MU6.x(1)& EM3.x(1) & physcond).setTriggerType(TT.rpcin|TT.calo|TT.caloem)    # noqa: F821
+        LVL1MenuItem('L1_EM6_2MU6'   ).setLogic( MU6.x(2)& EM6.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_EM10VH_MU6' ).setLogic( EM10VH.x(1)& MU6.x(1) & physcond).setTriggerType(TT.calo|TT.caloem)    # noqa: F821
+        LVL1MenuItem('L1_EM15VH_MU10').setLogic( EM15VH.x(1)& MU10.x(1)& physcond).setTriggerType(TT.calo|TT.caloem)    # noqa: F821
+        LVL1MenuItem('L1_EM16VH_MU4' ).setLogic( EM16VH.x(1)& MU4.x(1) & physcond).setTriggerType(TT.calo|TT.caloem)    # noqa: F821
+        LVL1MenuItem('L1_2EM8VH_MU10' ).setLogic( EM8VH.x(2)& MU10.x(1) & physcond).setTriggerType(TT.calo|TT.caloem)    # noqa: F821
+        LVL1MenuItem('L1_EM8VH_2MU6' ).setLogic( EM8VH.x(1)& MU6.x(2) & physcond).setTriggerType(TT.calo|TT.caloem)    # noqa: F821
+
+
+        LVL1MenuItem('L1_2EM6_MU6'   ).setLogic( EM6.x(2)& MU6.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_EM6_MU6'    ).setLogic( EM6.x(1)& MU6.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_EM6_MU10'   ).setLogic( EM6.x(1)& MU10.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_EM12_XE20'  ).setLogic( EM12.x(1)& XE20.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_EM16V_XE20' ).setLogic( EM16V.x(1)& XE20.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_EM6_XS45'   ).setLogic( EM6.x(1)& XS45.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_EM6_XS50'   ).setLogic( EM6.x(1)& XS50.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_EM6_XS55'   ).setLogic( EM6.x(1)& XS55.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_EM6_XS60'   ).setLogic( EM6.x(1)& XS60.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_EM16V_XS45' ).setLogic( EM16V.x(1)& XS45.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_EM12_XS45'  ).setLogic( EM12.x(1)& XS45.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_EM12_XS30'  ).setLogic( EM12.x(1)& XS30.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_EM12_4J10'  ).setLogic( EM12.x(1)& J10.x(4) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_EM15VH_J15.23ETA49' ).setLogic( EM15VH&  (JF1523ETA49.x(1)  | JB1523ETA49.x(1)  ) & physcond).setTriggerType(TT.calo)    # noqa: F821
 
 
         # TAU + EM
-        LVL1MenuItem('L1_2TAU11I_EM14VH').setLogic( HA11I.x(2)& EM14VH.x(1) & physcond).setTriggerType(TT.calo|TT.caloem)
-        LVL1MenuItem('L1_2TAU11_TAU20_EM14VH').setLogic( HA11.x(2)& HA20.x(1)& EM14VH.x(1) & physcond).setTriggerType(TT.calo|TT.caloem)
-        LVL1MenuItem('L1_2TAU11_TAU20_EM10VH').setLogic( HA11.x(2)& HA20.x(1)& EM10VH.x(1) & physcond).setTriggerType(TT.calo|TT.caloem)
-        LVL1MenuItem('L1_2TAU11_TAU15', ctpid=0x0).setLogic( HA11.x(2)& HA15.x(1) & physcond).setTriggerType(TT.calo)          
-        LVL1MenuItem('L1_2TAU11I_TAU15', ctpid=0x0).setLogic( HA11I.x(2)& HA15.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_2TAU11_EM10VH').setLogic( HA11.x(2)& EM10VH.x(1) & physcond).setTriggerType(TT.calo|TT.caloem)
+        LVL1MenuItem('L1_2TAU11I_EM14VH').setLogic( HA11I.x(2)& EM14VH.x(1) & physcond).setTriggerType(TT.calo|TT.caloem)    # noqa: F821
+        LVL1MenuItem('L1_2TAU11_TAU20_EM14VH').setLogic( HA11.x(2)& HA20.x(1)& EM14VH.x(1) & physcond).setTriggerType(TT.calo|TT.caloem)    # noqa: F821
+        LVL1MenuItem('L1_2TAU11_TAU20_EM10VH').setLogic( HA11.x(2)& HA20.x(1)& EM10VH.x(1) & physcond).setTriggerType(TT.calo|TT.caloem)    # noqa: F821
+        LVL1MenuItem('L1_2TAU11_TAU15', ctpid=0x0).setLogic( HA11.x(2)& HA15.x(1) & physcond).setTriggerType(TT.calo)      # noqa: F821
+        LVL1MenuItem('L1_2TAU11I_TAU15', ctpid=0x0).setLogic( HA11I.x(2)& HA15.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_2TAU11_EM10VH').setLogic( HA11.x(2)& EM10VH.x(1) & physcond).setTriggerType(TT.calo|TT.caloem)    # noqa: F821
 
         
-        LVL1MenuItem('L1_MU4_J50').setLogic( MU4.x(1)& J50.x(1) & physcond).setTriggerType(TT.rpcin|TT.calo)
-        LVL1MenuItem('L1_MU4_J10').setLogic( MU4.x(1)& J10.x(1) & physcond).setTriggerType(TT.rpcin|TT.calo)
+        LVL1MenuItem('L1_MU4_J50').setLogic( MU4.x(1)& J50.x(1) & physcond).setTriggerType(TT.rpcin|TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_MU4_J10').setLogic( MU4.x(1)& J10.x(1) & physcond).setTriggerType(TT.rpcin|TT.calo)    # noqa: F821
  
         # - Add/remap new L1 thresholds:
         #   J20->J15, J40->J30, J70->J55, J100->J75, J130->J95, J150->J115
-        LVL1MenuItem('L1_MU4_J15').setLogic( MU4.x(1)& J15.x(1) & physcond).setTriggerType(TT.rpcin|TT.calo)
-        LVL1MenuItem('L1_MU4_J30').setLogic( MU4.x(1)& J30.x(1) & physcond)
-        LVL1MenuItem('L1_MU4_J75').setLogic( MU4.x(1)& J75.x(1) & physcond) 
+        LVL1MenuItem('L1_MU4_J15').setLogic( MU4.x(1)& J15.x(1) & physcond).setTriggerType(TT.rpcin|TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_MU4_J30').setLogic( MU4.x(1)& J30.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_MU4_J75').setLogic( MU4.x(1)& J75.x(1) & physcond)    # noqa: F821
 
-        LVL1MenuItem('L1_MU4_J20_XE20').setLogic( MU4.x(1)& J20.x(1)& XE20.x(1) & physcond)
-        LVL1MenuItem('L1_MU4_J20_XE35').setLogic( MU4.x(1)& J20.x(1)& XE35.x(1) & physcond)
+        LVL1MenuItem('L1_MU4_J20_XE20').setLogic( MU4.x(1)& J20.x(1)& XE20.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_MU4_J20_XE35').setLogic( MU4.x(1)& J20.x(1)& XE35.x(1) & physcond)    # noqa: F821
 
-        LVL1MenuItem('L1_MU6_J15').setLogic( MU6.x(1)& J15.x(1) & physcond).setTriggerType(TT.rpcin|TT.calo)
-        LVL1MenuItem('L1_MU6_2J20').setLogic( MU6.x(1)& J20.x(2) & physcond).setTriggerType(TT.rpcin|TT.calo)
-        LVL1MenuItem('L1_2MU4_EM3', ctpid=0xbd).setLogic( MU4.x(2)& EM3.x(1) & physcond).setTriggerType(TT.rpcin|TT.calo|TT.caloem)
-        LVL1MenuItem('L1_2MU4_2EM3', ctpid=0xbd).setLogic( MU4.x(2)& EM3.x(2) & physcond).setTriggerType(TT.rpcin|TT.calo|TT.caloem)
+        LVL1MenuItem('L1_MU6_J15').setLogic( MU6.x(1)& J15.x(1) & physcond).setTriggerType(TT.rpcin|TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_MU6_2J20').setLogic( MU6.x(1)& J20.x(2) & physcond).setTriggerType(TT.rpcin|TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_2MU4_EM3', ctpid=0xbd).setLogic( MU4.x(2)& EM3.x(1) & physcond).setTriggerType(TT.rpcin|TT.calo|TT.caloem)    # noqa: F821
+        LVL1MenuItem('L1_2MU4_2EM3', ctpid=0xbd).setLogic( MU4.x(2)& EM3.x(2) & physcond).setTriggerType(TT.rpcin|TT.calo|TT.caloem)    # noqa: F821
 
-        LVL1MenuItem('L1_MU10_XE20').setLogic( MU10.x(1)& XE20.x(1) & physcond)
-        LVL1MenuItem('L1_MU10_XE25').setLogic( MU10.x(1)& XE25.x(1) & physcond)
-        LVL1MenuItem('L1_MU10_J20').setLogic( MU10.x(1) & J20.x(1) & physcond) # new jet threshold
+        LVL1MenuItem('L1_MU10_XE20').setLogic( MU10.x(1)& XE20.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_MU10_XE25').setLogic( MU10.x(1)& XE25.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_MU10_J20').setLogic( MU10.x(1) & J20.x(1) & physcond) # new jet threshold   # noqa: F821
 
         # TAU + MU
-        LVL1MenuItem('L1_TAU8_MU10'             ).setLogic( HA8.x(1)  & MU10.x(1) & physcond)
-        LVL1MenuItem('L1_TAU11_MU10', ctpid=0xc7).setLogic( HA11.x(1) & MU10.x(1) & physcond)
-        LVL1MenuItem('L1_2J30_XE20'             ).setLogic( J30.x(2)  & XE20.x(1) & physcond) # new jet threshold
+        LVL1MenuItem('L1_TAU8_MU10'             ).setLogic( HA8.x(1)  & MU10.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_TAU11_MU10', ctpid=0xc7).setLogic( HA11.x(1) & MU10.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_2J30_XE20'             ).setLogic( J30.x(2)  & XE20.x(1) & physcond) # new jet threshold    # noqa: F821
 
         # TAU + XE
-        LVL1MenuItem('L1_TAU15_XE35'     ).setLogic( HA15.x(1)  & XE35.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TAU15_XE40'     ).setLogic( HA15.x(1)  & XE40.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TAU15I_XE35'    ).setLogic( HA15I.x(1) & XE35.x(1) & physcond)
-        LVL1MenuItem('L1_TAU15I_XE40'    ).setLogic( HA15I.x(1) & XE40.x(1) & physcond)
-        LVL1MenuItem('L1_TAU20_XE40'     ).setLogic( HA20.x(1)  & XE40.x(1) & physcond)
-        LVL1MenuItem('L1_TAU20_XE35'     ).setLogic( HA20.x(1)  & XE35.x(1) & physcond)
-        LVL1MenuItem('L1_TAU15_XS35'     ).setLogic( HA15.x(1)  & XS35.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_TAU15_XE25_3J15').setLogic( HA15.x(1)  & XE25.x(1) & J15.x(3) & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_TAU15_XE35'     ).setLogic( HA15.x(1)  & XE35.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TAU15_XE40'     ).setLogic( HA15.x(1)  & XE40.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TAU15I_XE35'    ).setLogic( HA15I.x(1) & XE35.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_TAU15I_XE40'    ).setLogic( HA15I.x(1) & XE40.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_TAU20_XE40'     ).setLogic( HA20.x(1)  & XE40.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_TAU20_XE35'     ).setLogic( HA20.x(1)  & XE35.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_TAU15_XS35'     ).setLogic( HA15.x(1)  & XS35.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_TAU15_XE25_3J15').setLogic( HA15.x(1)  & XE25.x(1) & J15.x(3) & physcond).setTriggerType(TT.calo)    # noqa: F821
 
         # VBF request
         
-        LVL1MenuItem('L1_2TAU8_TAU15_FJ15'         ).setLogic( HA8.x(2) & HA15.x(1)  & ( JF15.x(1) | JB15.x(1)) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_2TAU8_TAU15_J15CF'        ).setLogic( HA8.x(2) & HA15.x(1)  & J15CF.x(1) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_2TAU8_TAU11I_EM10VH_FJ15' ).setLogic( HA8.x(2) & HA11I.x(1) & EM10VH.x(1)&( JF15.x(1)| JB15.x(1)) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_2TAU8_TAU11I_EM10VH_J15CF').setLogic( HA8.x(2) & HA11I.x(1) & EM10VH.x(1)& J15CF.x(1) & physcond).setTriggerType(TT.calo)
+        LVL1MenuItem('L1_2TAU8_TAU15_FJ15'         ).setLogic( HA8.x(2) & HA15.x(1)  & ( JF15.x(1) | JB15.x(1)) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_2TAU8_TAU15_J15CF'        ).setLogic( HA8.x(2) & HA15.x(1)  & J15CF.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_2TAU8_TAU11I_EM10VH_FJ15' ).setLogic( HA8.x(2) & HA11I.x(1) & EM10VH.x(1)&( JF15.x(1)| JB15.x(1)) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_2TAU8_TAU11I_EM10VH_J15CF').setLogic( HA8.x(2) & HA11I.x(1) & EM10VH.x(1)& J15CF.x(1) & physcond).setTriggerType(TT.calo)    # noqa: F821
 
                
-        LVL1MenuItem('L1_EM14VH_FJ15' ).setLogic( EM14VH.x(1)&( JF15.x(1)| JB15.x(1)) & physcond).setTriggerType(TT.calo|TT.caloem)
-        LVL1MenuItem('L1_EM14VH_J15CF').setLogic( EM14VH.x(1)& J15CF.x(1) & physcond).setTriggerType(TT.calo|TT.caloem)
+        LVL1MenuItem('L1_EM14VH_FJ15' ).setLogic( EM14VH.x(1)&( JF15.x(1)| JB15.x(1)) & physcond).setTriggerType(TT.calo|TT.caloem)    # noqa: F821
+        LVL1MenuItem('L1_EM14VH_J15CF').setLogic( EM14VH.x(1)& J15CF.x(1) & physcond).setTriggerType(TT.calo|TT.caloem)    # noqa: F821
 
-        LVL1MenuItem('L1_MU10_FJ15').setLogic(  MU10.x(1) & ( JF15.x(1) | JB15.x(1)) & physcond)
-        LVL1MenuItem('L1_MU10_J15CF').setLogic( MU10.x(1)& J15CF.x(1) & physcond)
+        LVL1MenuItem('L1_MU10_FJ15').setLogic(  MU10.x(1) & ( JF15.x(1) | JB15.x(1)) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_MU10_J15CF').setLogic( MU10.x(1)& J15CF.x(1) & physcond)    # noqa: F821
 
-        LVL1MenuItem('L1_3J15_FJ15').setLogic( J15.x(3)&( JF15.x(1)| JB15.x(1)) & physcond).setTriggerType(TT.calo)
-        LVL1MenuItem('L1_2J15_2FJ15').setLogic( J15.x(2)&( JF15.x(1)& JB15.x(1)) & physcond).setTriggerType(TT.calo)              
+        LVL1MenuItem('L1_3J15_FJ15').setLogic( J15.x(3)&( JF15.x(1)| JB15.x(1)) & physcond).setTriggerType(TT.calo)    # noqa: F821
+        LVL1MenuItem('L1_2J15_2FJ15').setLogic( J15.x(2)&( JF15.x(1)& JB15.x(1)) & physcond).setTriggerType(TT.calo)    # noqa: F821
 
         # Transient items
         # L1_TAU6_2JT4_JT35  (or whatever soft thresholds they have. JT4 must have 
         # softer cuts than TAU06 and JT35 - please get in touch with us if it is not 
-        # the case - we will need to rethink it then)
-
-        LVL1MenuItem('L1_J50_XE30').setLogic( J50.x(1)&  XE30.x(1) & physcond)
-        LVL1MenuItem('L1_J50_XE35').setLogic( J50.x(1)&  XE35.x(1) & physcond)
-        LVL1MenuItem('L1_J50_XE40').setLogic( J50.x(1)&  XE40.x(1) & physcond)
-        LVL1MenuItem('L1_J30_XE35').setLogic( J30.x(1)& XE35.x(1) & physcond)
-        LVL1MenuItem('L1_J30_XE40').setLogic( J30.x(1)& XE40.x(1) & physcond)
-        LVL1MenuItem('L1_J30_XE50').setLogic( J30.x(1)& XE50.x(1) & physcond)
-        LVL1MenuItem('L1_2J20_XE20').setLogic( J20.x(2)&  XE20.x(1) & physcond)
+        # the case - we will need to rethink it then)    # noqa: F821
+
+        LVL1MenuItem('L1_J50_XE30').setLogic( J50.x(1)&  XE30.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_J50_XE35').setLogic( J50.x(1)&  XE35.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_J50_XE40').setLogic( J50.x(1)&  XE40.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_J30_XE35').setLogic( J30.x(1)& XE35.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_J30_XE40').setLogic( J30.x(1)& XE40.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_J30_XE50').setLogic( J30.x(1)& XE50.x(1) & physcond)    # noqa: F821
+        LVL1MenuItem('L1_2J20_XE20').setLogic( J20.x(2)&  XE20.x(1) & physcond)    # noqa: F821
         
 
         # MBTS
-        MBTS_1   = MBTS_A.x(1) | MBTS_C.x(1)
-        MBTS_2   = (MBTS_A.x(2) | MBTS_C.x(2) | MBTS_A.x(1)) & (MBTS_A.x(2) | MBTS_C.x(2) | MBTS_C.x(1))
-        MBTS_1_1 = MBTS_A.x(1) & MBTS_C.x(1)
-        MBTS_2_2 = MBTS_A.x(2) & MBTS_C.x(2)
-        MBTS_3_3 = MBTS_A.x(3) & MBTS_C.x(3)
-        MBTS_4_4 = MBTS_A.x(4) & MBTS_C.x(4)
-
-        LVL1MenuItem('L1_MBTS_1',           ctpid=0xe2).setLogic( MBTS_1   & physcond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_2',           ctpid=0xe3).setLogic( MBTS_2   & physcond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_1_1_OVERLAY', ctpid=0xe4).setLogic( MBTS_1_1 & physcond ).setTriggerType(TT.zerobs)
-        LVL1MenuItem('L1_MBTS_1_1',         ctpid=0xe4).setLogic( MBTS_1_1 & physcond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_2_2'                    ).setLogic( MBTS_2_2 & physcond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_3_3'                    ).setLogic( MBTS_3_3 & physcond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_4_4',         ctpid=0xe1).setLogic( MBTS_4_4 & physcond ).setTriggerType(TT.minb)
-
-        LVL1MenuItem('L1_MBTS_1_EMPTY'  ).setLogic( MBTS_1   & cosmiccond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_2_EMPTY'  ).setLogic( MBTS_2   & cosmiccond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_1_1_EMPTY').setLogic( MBTS_1_1 & cosmiccond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_2_2_EMPTY').setLogic( MBTS_2_2 & cosmiccond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_3_3_EMPTY').setLogic( MBTS_3_3 & cosmiccond).setTriggerType(TT.minb)
-
-        LVL1MenuItem('L1_MBTS_1_UNPAIRED_ISO'   ).setLogic( MBTS_1 & unpaired_isocond    ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_1_UNPAIRED_NONISO').setLogic( MBTS_1 & unpaired_nonisocond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_2_UNPAIRED_ISO'   ).setLogic( MBTS_2 & unpaired_isocond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_2_UNPAIRED_NONISO').setLogic( MBTS_2 & unpaired_nonisocond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_2_BGRP7'          ).setLogic( MBTS_2 & bgrp7cond           ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_1_1_UNPAIRED_ISO' ).setLogic( MBTS_1_1 & unpaired_isocond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_2_2_UNPAIRED_ISO' ).setLogic( MBTS_2_2 & unpaired_isocond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_3_3_UNPAIRED_ISO' ).setLogic( MBTS_3_3 & unpaired_isocond ).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTS_4_4_UNPAIRED_ISO' ).setLogic( MBTS_4_4 & unpaired_isocond ).setTriggerType(TT.minb)
-
-        LVL1MenuItem('L1_MBTSA0' ).setLogic( MBTS_A0.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSA1' ).setLogic( MBTS_A1.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSA2' ).setLogic( MBTS_A2.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSA3' ).setLogic( MBTS_A3.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSA4' ).setLogic( MBTS_A4.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSA5' ).setLogic( MBTS_A5.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSA6' ).setLogic( MBTS_A6.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSA7' ).setLogic( MBTS_A7.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSA8' ).setLogic( MBTS_A8.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSA9' ).setLogic( MBTS_A9.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSA10').setLogic( MBTS_A10.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSA11').setLogic( MBTS_A11.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSA12').setLogic( MBTS_A12.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSA13').setLogic( MBTS_A13.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSA14').setLogic( MBTS_A14.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSA15').setLogic( MBTS_A15.x(1) & physcond).setTriggerType(TT.minb)
-
-        LVL1MenuItem('L1_MBTSC0' ).setLogic( MBTS_C0.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSC1' ).setLogic( MBTS_C1.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSC2' ).setLogic( MBTS_C2.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSC3' ).setLogic( MBTS_C3.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSC4' ).setLogic( MBTS_C4.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSC5' ).setLogic( MBTS_C5.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSC6' ).setLogic( MBTS_C6.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSC7' ).setLogic( MBTS_C7.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSC8' ).setLogic( MBTS_C8.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSC9' ).setLogic( MBTS_C9.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSC10').setLogic( MBTS_C10.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSC11').setLogic( MBTS_C11.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSC12').setLogic( MBTS_C12.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSC13').setLogic( MBTS_C13.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSC14').setLogic( MBTS_C14.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_MBTSC15').setLogic( MBTS_C15.x(1) & physcond).setTriggerType(TT.minb)
+        MBTS_1   = MBTS_A.x(1) | MBTS_C.x(1)    # noqa: F821
+        MBTS_2   = (MBTS_A.x(2) | MBTS_C.x(2) | MBTS_A.x(1)) & (MBTS_A.x(2) | MBTS_C.x(2) | MBTS_C.x(1))    # noqa: F821
+        MBTS_1_1 = MBTS_A.x(1) & MBTS_C.x(1)    # noqa: F821
+        MBTS_2_2 = MBTS_A.x(2) & MBTS_C.x(2)    # noqa: F821
+        MBTS_3_3 = MBTS_A.x(3) & MBTS_C.x(3)    # noqa: F821
+        MBTS_4_4 = MBTS_A.x(4) & MBTS_C.x(4)    # noqa: F821
+
+        LVL1MenuItem('L1_MBTS_1',           ctpid=0xe2).setLogic( MBTS_1   & physcond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_2',           ctpid=0xe3).setLogic( MBTS_2   & physcond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_1_1_OVERLAY', ctpid=0xe4).setLogic( MBTS_1_1 & physcond ).setTriggerType(TT.zerobs)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_1_1',         ctpid=0xe4).setLogic( MBTS_1_1 & physcond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_2_2'                    ).setLogic( MBTS_2_2 & physcond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_3_3'                    ).setLogic( MBTS_3_3 & physcond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_4_4',         ctpid=0xe1).setLogic( MBTS_4_4 & physcond ).setTriggerType(TT.minb)    # noqa: F821
+
+        LVL1MenuItem('L1_MBTS_1_EMPTY'  ).setLogic( MBTS_1   & cosmiccond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_2_EMPTY'  ).setLogic( MBTS_2   & cosmiccond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_1_1_EMPTY').setLogic( MBTS_1_1 & cosmiccond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_2_2_EMPTY').setLogic( MBTS_2_2 & cosmiccond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_3_3_EMPTY').setLogic( MBTS_3_3 & cosmiccond).setTriggerType(TT.minb)    # noqa: F821
+
+        LVL1MenuItem('L1_MBTS_1_UNPAIRED_ISO'   ).setLogic( MBTS_1 & unpaired_isocond    ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_1_UNPAIRED_NONISO').setLogic( MBTS_1 & unpaired_nonisocond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_2_UNPAIRED_ISO'   ).setLogic( MBTS_2 & unpaired_isocond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_2_UNPAIRED_NONISO').setLogic( MBTS_2 & unpaired_nonisocond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_2_BGRP7'          ).setLogic( MBTS_2 & bgrp7cond           ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_1_1_UNPAIRED_ISO' ).setLogic( MBTS_1_1 & unpaired_isocond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_2_2_UNPAIRED_ISO' ).setLogic( MBTS_2_2 & unpaired_isocond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_3_3_UNPAIRED_ISO' ).setLogic( MBTS_3_3 & unpaired_isocond ).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_4_4_UNPAIRED_ISO' ).setLogic( MBTS_4_4 & unpaired_isocond ).setTriggerType(TT.minb)    # noqa: F821
+
+        LVL1MenuItem('L1_MBTSA0' ).setLogic( MBTS_A0.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSA1' ).setLogic( MBTS_A1.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSA2' ).setLogic( MBTS_A2.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSA3' ).setLogic( MBTS_A3.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSA4' ).setLogic( MBTS_A4.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSA5' ).setLogic( MBTS_A5.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSA6' ).setLogic( MBTS_A6.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSA7' ).setLogic( MBTS_A7.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSA8' ).setLogic( MBTS_A8.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSA9' ).setLogic( MBTS_A9.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSA10').setLogic( MBTS_A10.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSA11').setLogic( MBTS_A11.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSA12').setLogic( MBTS_A12.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSA13').setLogic( MBTS_A13.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSA14').setLogic( MBTS_A14.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSA15').setLogic( MBTS_A15.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+
+        LVL1MenuItem('L1_MBTSC0' ).setLogic( MBTS_C0.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSC1' ).setLogic( MBTS_C1.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSC2' ).setLogic( MBTS_C2.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSC3' ).setLogic( MBTS_C3.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSC4' ).setLogic( MBTS_C4.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSC5' ).setLogic( MBTS_C5.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSC6' ).setLogic( MBTS_C6.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSC7' ).setLogic( MBTS_C7.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSC8' ).setLogic( MBTS_C8.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSC9' ).setLogic( MBTS_C9.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSC10').setLogic( MBTS_C10.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSC11').setLogic( MBTS_C11.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSC12').setLogic( MBTS_C12.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSC13').setLogic( MBTS_C13.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSC14').setLogic( MBTS_C14.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_MBTSC15').setLogic( MBTS_C15.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
         
 
         # ZDC
         
-        LVL1MenuItem('L1_ZDC'                     ).setLogic((ZDC_A.x(1)|ZDC_C.x(1)) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_EMPTY'               ).setLogic((ZDC_A.x(1)|ZDC_C.x(1))&cosmiccond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_UNPAIRED_ISO'        ).setLogic((ZDC_A.x(1)|ZDC_C.x(1))&unpaired_isocond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_UNPAIRED_NONISO'     ).setLogic((ZDC_A.x(1)|ZDC_C.x(1))&unpaired_nonisocond).setTriggerType(TT.minb)                
-        LVL1MenuItem('L1_ZDC_A_C'                 ).setLogic(ZDC_A.x(1)&ZDC_C.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_A_C_EMPTY'           ).setLogic(ZDC_A.x(1)&ZDC_C.x(1)&cosmiccond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_A_C_UNPAIRED_ISO'    ).setLogic(ZDC_A.x(1)&ZDC_C.x(1)&unpaired_isocond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_A_C_UNPAIRED_NONISO' ).setLogic(ZDC_A.x(1)&ZDC_C.x(1)&unpaired_nonisocond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_A'                   ).setLogic(ZDC_A.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_C'                   ).setLogic(ZDC_C.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_AND'                 ).setLogic(ZDC_AND.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_A_VTE20'             ).setLogic(ZDC_A.x(1)&Not( TE20.x(1)) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_C_VTE20'             ).setLogic(ZDC_C.x(1)&Not( TE20.x(1)) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_A_BGRP7'             ).setLogic(ZDC_A.x(1)&bgrp7cond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_C_BGRP7'             ).setLogic(ZDC_C.x(1)&bgrp7cond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_MBTS_1'              ).setLogic((ZDC_A.x(1)|ZDC_C.x(1))&( MBTS_A.x(1)| MBTS_C.x(1)) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_MBTS_2'              ).setLogic((ZDC_A.x(1)|ZDC_C.x(1))&\
-                                                             ( MBTS_A.x(2)| MBTS_C.x(2)| MBTS_A.x(1))\
-                                                             &( MBTS_A.x(2)| MBTS_C.x(2)| MBTS_C.x(1)) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_MBTS_1_1'            ).setLogic((ZDC_A.x(1)|ZDC_C.x(1))&( MBTS_A.x(1)& MBTS_C.x(1)) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_ZDC_MBTS_2_2'            ).setLogic((ZDC_A.x(1)|ZDC_C.x(1))&( MBTS_A.x(2)& MBTS_C.x(2)) & physcond).setTriggerType(TT.minb)
+        LVL1MenuItem('L1_ZDC'                     ).setLogic((ZDC_A.x(1)|ZDC_C.x(1)) & physcond).setTriggerType(TT.minb)                                # noqa: F821
+        LVL1MenuItem('L1_ZDC_EMPTY'               ).setLogic((ZDC_A.x(1)|ZDC_C.x(1))&cosmiccond).setTriggerType(TT.minb)                                # noqa: F821
+        LVL1MenuItem('L1_ZDC_UNPAIRED_ISO'        ).setLogic((ZDC_A.x(1)|ZDC_C.x(1))&unpaired_isocond).setTriggerType(TT.minb)                          # noqa: F821
+        LVL1MenuItem('L1_ZDC_UNPAIRED_NONISO'     ).setLogic((ZDC_A.x(1)|ZDC_C.x(1))&unpaired_nonisocond).setTriggerType(TT.minb)                       # noqa: F821
+        LVL1MenuItem('L1_ZDC_A_C'                 ).setLogic(ZDC_A.x(1)&ZDC_C.x(1) & physcond).setTriggerType(TT.minb)                                  # noqa: F821
+        LVL1MenuItem('L1_ZDC_A_C_EMPTY'           ).setLogic(ZDC_A.x(1)&ZDC_C.x(1)&cosmiccond).setTriggerType(TT.minb)                                  # noqa: F821
+        LVL1MenuItem('L1_ZDC_A_C_UNPAIRED_ISO'    ).setLogic(ZDC_A.x(1)&ZDC_C.x(1)&unpaired_isocond).setTriggerType(TT.minb)                            # noqa: F821
+        LVL1MenuItem('L1_ZDC_A_C_UNPAIRED_NONISO' ).setLogic(ZDC_A.x(1)&ZDC_C.x(1)&unpaired_nonisocond).setTriggerType(TT.minb)                         # noqa: F821
+        LVL1MenuItem('L1_ZDC_A'                   ).setLogic(ZDC_A.x(1) & physcond).setTriggerType(TT.minb)                                             # noqa: F821
+        LVL1MenuItem('L1_ZDC_C'                   ).setLogic(ZDC_C.x(1) & physcond).setTriggerType(TT.minb)                                             # noqa: F821
+        LVL1MenuItem('L1_ZDC_AND'                 ).setLogic(ZDC_AND.x(1) & physcond).setTriggerType(TT.minb)                                           # noqa: F821
+        LVL1MenuItem('L1_ZDC_A_VTE20'             ).setLogic(ZDC_A.x(1)&Not( TE20.x(1)) & physcond).setTriggerType(TT.minb)                             # noqa: F821
+        LVL1MenuItem('L1_ZDC_C_VTE20'             ).setLogic(ZDC_C.x(1)&Not( TE20.x(1)) & physcond).setTriggerType(TT.minb)                             # noqa: F821
+        LVL1MenuItem('L1_ZDC_A_BGRP7'             ).setLogic(ZDC_A.x(1)&bgrp7cond).setTriggerType(TT.minb)                                              # noqa: F821
+        LVL1MenuItem('L1_ZDC_C_BGRP7'             ).setLogic(ZDC_C.x(1)&bgrp7cond).setTriggerType(TT.minb)                                              # noqa: F821
+        LVL1MenuItem('L1_ZDC_MBTS_1'              ).setLogic((ZDC_A.x(1)|ZDC_C.x(1))&( MBTS_A.x(1)| MBTS_C.x(1)) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_MBTS_2'              ).setLogic((ZDC_A.x(1)|ZDC_C.x(1))&\                                                                  # noqa: F821
+                                                             ( MBTS_A.x(2)| MBTS_C.x(2)| MBTS_A.x(1))\                                                  # noqa: F821
+                                                             &( MBTS_A.x(2)| MBTS_C.x(2)| MBTS_C.x(1)) & physcond).setTriggerType(TT.minb)              # noqa: F821
+        LVL1MenuItem('L1_ZDC_MBTS_1_1'            ).setLogic((ZDC_A.x(1)|ZDC_C.x(1))&( MBTS_A.x(1)& MBTS_C.x(1)) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_MBTS_2_2'            ).setLogic((ZDC_A.x(1)|ZDC_C.x(1))&( MBTS_A.x(2)& MBTS_C.x(2)) & physcond).setTriggerType(TT.minb)    # noqa: F821
 
 
         # BCM
 
-        LVL1MenuItem('L1_BCM_AC_CA_BGRP0',ctpid=0xe6 ).setLogic((BCM_AtoC.x(1)|BCM_CtoA.x(1))&BGRP0).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_BCM_AC_CA_UNPAIRED_ISO'     ).setLogic((BCM_AtoC.x(1)|BCM_CtoA.x(1))&unpaired_isocond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_BCM_AC_CA_UNPAIRED_NONISO'  ).setLogic((BCM_AtoC.x(1)|BCM_CtoA.x(1))&unpaired_nonisocond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_BCM_HT_BGRP0',   ctpid=0xf8 ).setLogic( BCM_Comb.x(7)&BGRP0).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_BCM_Wide_BGRP0', ctpid=0xe8 ).setLogic( BCM_Wide.x(1)&BGRP0).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_BCM_Wide_EMPTY'             ).setLogic( BCM_Wide.x(1)&cosmiccond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_BCM_Wide_UNPAIRED_ISO'      ).setLogic( BCM_Wide.x(1)&unpaired_isocond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_BCM_Wide_UNPAIRED_NONISO'   ).setLogic( BCM_Wide.x(1)&unpaired_nonisocond).setTriggerType(TT.minb)
+        LVL1MenuItem('L1_BCM_AC_CA_BGRP0',ctpid=0xe6 ).setLogic((BCM_AtoC.x(1)|BCM_CtoA.x(1))&BGRP0).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_BCM_AC_CA_UNPAIRED_ISO'     ).setLogic((BCM_AtoC.x(1)|BCM_CtoA.x(1))&unpaired_isocond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_BCM_AC_CA_UNPAIRED_NONISO'  ).setLogic((BCM_AtoC.x(1)|BCM_CtoA.x(1))&unpaired_nonisocond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_BCM_HT_BGRP0',   ctpid=0xf8 ).setLogic( BCM_Comb.x(7)&BGRP0).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_BCM_Wide_BGRP0', ctpid=0xe8 ).setLogic( BCM_Wide.x(1)&BGRP0).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_BCM_Wide_EMPTY'             ).setLogic( BCM_Wide.x(1)&cosmiccond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_BCM_Wide_UNPAIRED_ISO'      ).setLogic( BCM_Wide.x(1)&unpaired_isocond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_BCM_Wide_UNPAIRED_NONISO'   ).setLogic( BCM_Wide.x(1)&unpaired_nonisocond).setTriggerType(TT.minb)    # noqa: F821
 
 
         # LUCID
         
-        LVL1MenuItem('L1_LUCID_C',     ctpid=0xed  ).setLogic( LUCID_C.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_LUCID_A',     ctpid=0xec  ).setLogic( LUCID_A.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_LUCID_A_C',   ctpid=0xee  ).setLogic( LUCID_A.x(1)&LUCID_C.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_LUCID',       ctpid=0xf5  ).setLogic( (LUCID_A.x(1)|LUCID_C.x(1)) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_LUCID_BGRP7'              ).setLogic( (LUCID_A.x(1)|LUCID_C.x(1))&bgrp7cond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_LUCID_COMM'               ).setLogic( NIMDIR5.x(1) & physcond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_LUCID_A_C_EMPTY'          ).setLogic( LUCID_A.x(1)&LUCID_C.x(1)&cosmiccond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_LUCID_EMPTY'              ).setLogic( (LUCID_A.x(1)|LUCID_C.x(1))&cosmiccond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_LUCID_UNPAIRED_ISO'       ).setLogic( (LUCID_A.x(1)|LUCID_C.x(1))&unpaired_isocond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_LUCID_UNPAIRED_NONISO'    ).setLogic( (LUCID_A.x(1)|LUCID_C.x(1))&unpaired_nonisocond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_LUCID_COMM_EMPTY'         ).setLogic( NIMDIR5.x(1)&cosmiccond).setTriggerType(TT.minb)
+        LVL1MenuItem('L1_LUCID_C',     ctpid=0xed  ).setLogic( LUCID_C.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_LUCID_A',     ctpid=0xec  ).setLogic( LUCID_A.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_LUCID_A_C',   ctpid=0xee  ).setLogic( LUCID_A.x(1)&LUCID_C.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_LUCID',       ctpid=0xf5  ).setLogic( (LUCID_A.x(1)|LUCID_C.x(1)) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_LUCID_BGRP7'              ).setLogic( (LUCID_A.x(1)|LUCID_C.x(1))&bgrp7cond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_LUCID_COMM'               ).setLogic( NIMDIR5.x(1) & physcond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_LUCID_A_C_EMPTY'          ).setLogic( LUCID_A.x(1)&LUCID_C.x(1)&cosmiccond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_LUCID_EMPTY'              ).setLogic( (LUCID_A.x(1)|LUCID_C.x(1))&cosmiccond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_LUCID_UNPAIRED_ISO'       ).setLogic( (LUCID_A.x(1)|LUCID_C.x(1))&unpaired_isocond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_LUCID_UNPAIRED_NONISO'    ).setLogic( (LUCID_A.x(1)|LUCID_C.x(1))&unpaired_nonisocond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_LUCID_COMM_EMPTY'         ).setLogic( NIMDIR5.x(1)&cosmiccond).setTriggerType(TT.minb)    # noqa: F821
         LVL1MenuItem('L1_LUCID_COMM_UNPAIRED_ISO'  ).setLogic( NIMDIR5.x(1)&unpaired_isocond).setTriggerType(TT.minb)        
-        LVL1MenuItem('L1_LUCID_A_C_UNPAIRED_ISO'   ).setLogic( LUCID_A.x(1)&LUCID_C.x(1)&unpaired_isocond).setTriggerType(TT.minb)
-        LVL1MenuItem('L1_LUCID_A_C_UNPAIRED_NONISO').setLogic( LUCID_A.x(1)&LUCID_C.x(1)&unpaired_nonisocond).setTriggerType(TT.minb)
+        LVL1MenuItem('L1_LUCID_A_C_UNPAIRED_ISO'   ).setLogic( LUCID_A.x(1)&LUCID_C.x(1)&unpaired_isocond).setTriggerType(TT.minb)    # noqa: F821
+        LVL1MenuItem('L1_LUCID_A_C_UNPAIRED_NONISO').setLogic( LUCID_A.x(1)&LUCID_C.x(1)&unpaired_nonisocond).setTriggerType(TT.minb)    # noqa: F821
 
 
         # RANDOM
 
-        LVL1MenuItem('L1_RD0_FILLED'         ).setLogic( RNDM0 & physcond           ).setTriggerType(TT.rand)
-        LVL1MenuItem('L1_RD0_EMPTY'          ).setLogic( RNDM0 & cosmiccond         ).setTriggerType(TT.rand)
-        LVL1MenuItem('L1_RD0_FIRSTEMPTY'     ).setLogic( RNDM0 & firstempty         ).setTriggerType(TT.rand)
-        LVL1MenuItem('L1_RD0_UNPAIRED_ISO'   ).setLogic( RNDM0 & unpaired_isocond   ).setTriggerType(TT.rand)
-        LVL1MenuItem('L1_RD0_UNPAIRED_NONISO').setLogic( RNDM0 & unpaired_nonisocond).setTriggerType(TT.rand)
-        LVL1MenuItem('L1_RD1_FILLED'         ).setLogic( RNDM1 & physcond           ).setTriggerType(TT.rand)
-        LVL1MenuItem('L1_RD1_EMPTY'          ).setLogic( RNDM1 & cosmiccond         ).setTriggerType(TT.zerobs)
+        LVL1MenuItem('L1_RD0_FILLED'         ).setLogic( RNDM0 & physcond           ).setTriggerType(TT.rand)    # noqa: F821
+        LVL1MenuItem('L1_RD0_EMPTY'          ).setLogic( RNDM0 & cosmiccond         ).setTriggerType(TT.rand)    # noqa: F821
+        LVL1MenuItem('L1_RD0_FIRSTEMPTY'     ).setLogic( RNDM0 & firstempty         ).setTriggerType(TT.rand)    # noqa: F821
+        LVL1MenuItem('L1_RD0_UNPAIRED_ISO'   ).setLogic( RNDM0 & unpaired_isocond   ).setTriggerType(TT.rand)    # noqa: F821
+        LVL1MenuItem('L1_RD0_UNPAIRED_NONISO').setLogic( RNDM0 & unpaired_nonisocond).setTriggerType(TT.rand)    # noqa: F821
+        LVL1MenuItem('L1_RD1_FILLED'         ).setLogic( RNDM1 & physcond           ).setTriggerType(TT.rand)    # noqa: F821
+        LVL1MenuItem('L1_RD1_EMPTY'          ).setLogic( RNDM1 & cosmiccond         ).setTriggerType(TT.zerobs)    # noqa: F821
 
         
         # Bunch groups
 
-        LVL1MenuItem('L1_BGRP1').setLogic(BGRP0 & BGRP1).setTriggerType(TT.rand)
-        LVL1MenuItem('L1_BGRP7').setLogic(BGRP0 & BGRP7).setTriggerType(TT.rand)
-        LVL1MenuItem('L1_BGRP1_ALFA_BGT').setLogic(BGRP0 & BGRP1).setTriggerType(TT.rand)
-        LVL1MenuItem('L1_BGRP4_ALFA_BGT').setLogic(BGRP0 & BGRP4).setTriggerType(TT.rand)
-        LVL1MenuItem('L1_BGRP7_ALFA_BGT').setLogic(BGRP0 & BGRP7).setTriggerType(TT.rand)
-        LVL1MenuItem('L1_BPTX0_BGRP0', ctpid=0xf1).setLogic(BPTX0.x(1)&BGRP0).setTriggerType(TT.rand)
-        LVL1MenuItem('L1_BPTX1_BGRP0', ctpid=0xf2).setLogic(BPTX1.x(1)&BGRP0).setTriggerType(TT.rand)
+        LVL1MenuItem('L1_BGRP1').setLogic(BGRP0 & BGRP1).setTriggerType(TT.rand)    # noqa: F821
+        LVL1MenuItem('L1_BGRP7').setLogic(BGRP0 & BGRP7).setTriggerType(TT.rand)    # noqa: F821
+        LVL1MenuItem('L1_BGRP1_ALFA_BGT').setLogic(BGRP0 & BGRP1).setTriggerType(TT.rand)    # noqa: F821
+        LVL1MenuItem('L1_BGRP4_ALFA_BGT').setLogic(BGRP0 & BGRP4).setTriggerType(TT.rand)    # noqa: F821
+        LVL1MenuItem('L1_BGRP7_ALFA_BGT').setLogic(BGRP0 & BGRP7).setTriggerType(TT.rand)    # noqa: F821
+        LVL1MenuItem('L1_BPTX0_BGRP0', ctpid=0xf1).setLogic(BPTX0.x(1)&BGRP0).setTriggerType(TT.rand)    # noqa: F821
+        LVL1MenuItem('L1_BPTX1_BGRP0', ctpid=0xf2).setLogic(BPTX1.x(1)&BGRP0).setTriggerType(TT.rand)    # noqa: F821
         
 
         # Direct inputs [0x50:0x5f]
         #LVL1MenuItem('L1_LHCF',  ctpid=-1).setLogic( (NIMDIR36.x(1) & physcond)).setTriggerType(TT.minb)        
-        LVL1MenuItem('L1_LHCF',  ctpid=-1).setLogic( (NIMDIR36.x(1) & physcond))
+        LVL1MenuItem('L1_LHCF',  ctpid=-1).setLogic( (NIMDIR36.x(1) & physcond))    # noqa: F821
 
 
 
-        LVL1MenuItem('L1_ALFA_EMPTY').setLogic( NIM_ALFA_LOG.x(1) & cosmiccond).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_BGRP7').setLogic( NIM_ALFA_LOG.x(1) & bgrp7cond).setTriggerType(TT.rpcout)
+        LVL1MenuItem('L1_ALFA_EMPTY').setLogic( NIM_ALFA_LOG.x(1) & cosmiccond).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_BGRP7').setLogic( NIM_ALFA_LOG.x(1) & bgrp7cond).setTriggerType(TT.rpcout)    # noqa: F821
 
-        LVL1MenuItem('L1_ALFA_EMPTY_OD', ctpid=-1).setLogic( NIM_ALFA_LOG_OD.x(1)&cosmiccond).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_BGRP7_OD', ctpid=-1).setLogic( NIM_ALFA_LOG_OD.x(1)&bgrp7cond).setTriggerType(TT.rpcout)
+        LVL1MenuItem('L1_ALFA_EMPTY_OD', ctpid=-1).setLogic( NIM_ALFA_LOG_OD.x(1)&cosmiccond).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_BGRP7_OD', ctpid=-1).setLogic( NIM_ALFA_LOG_OD.x(1)&bgrp7cond).setTriggerType(TT.rpcout)    # noqa: F821
 
 
-        LVL1MenuItem('L1_TRT', ctpid=0x4e).setLogic(NIMDIR25.x(1)&BGRP0).setTriggerType(TT.rpcout)
+        LVL1MenuItem('L1_TRT', ctpid=0x4e).setLogic(NIMDIR25.x(1)&BGRP0).setTriggerType(TT.rpcout)    # noqa: F821
 
-        LVL1MenuItem('L1_L1A_Mon', ctpid=0x4f).setLogic(NIMDIR26.x(1)&BGRP0).setTriggerType(TT.rpcout)
+        LVL1MenuItem('L1_L1A_Mon', ctpid=0x4f).setLogic(NIMDIR26.x(1)&BGRP0).setTriggerType(TT.rpcout)    # noqa: F821
         
-        LVL1MenuItem('L1_CALREQ0', ctpid=0xfd).setLogic( NIM28.x(1) & calibcond).setTriggerType(TT.calreq0)
-        LVL1MenuItem('L1_CALREQ1', ctpid=0xfe).setLogic( NIM29.x(1) & calibcond).setTriggerType(TT.calreq1)
-        LVL1MenuItem('L1_CALREQ2', ctpid=0xff).setLogic( NIM30.x(1) & calibcond).setTriggerType(TT.calreq2)
+        LVL1MenuItem('L1_CALREQ0', ctpid=0xfd).setLogic( NIM28.x(1) & calibcond).setTriggerType(TT.calreq0)    # noqa: F821
+        LVL1MenuItem('L1_CALREQ1', ctpid=0xfe).setLogic( NIM29.x(1) & calibcond).setTriggerType(TT.calreq1)    # noqa: F821
+        LVL1MenuItem('L1_CALREQ2', ctpid=0xff).setLogic( NIM30.x(1) & calibcond).setTriggerType(TT.calreq2)    # noqa: F821
 
 
-        LVL1MenuItem('L1_NIM_S8C2B21').setLogic(NIMDIR6.x(1) & bgrpcond).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_NIM_S8C2B22').setLogic(NIMDIR7.x(1) & bgrpcond).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_NIM_S8C2B23').setLogic(NIMDIR8.x(1) & bgrpcond).setTriggerType(TT.rpcout)
+        LVL1MenuItem('L1_NIM_S8C2B21').setLogic(NIMDIR6.x(1) & bgrpcond).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_NIM_S8C2B22').setLogic(NIMDIR7.x(1) & bgrpcond).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_NIM_S8C2B23').setLogic(NIMDIR8.x(1) & bgrpcond).setTriggerType(TT.rpcout)    # noqa: F821
 
         
 
 
         # Alfa items
-        ARL = NIM_A7R1L.x(1)
-        ARU = NIM_A7R1U.x(1)
-        ALL = NIM_A7L1L.x(1)
-        ALU = NIM_A7L1U.x(1)
-        BRL = NIM_B7R1L.x(1)
-        BRU = NIM_B7R1U.x(1)
-        BLL = NIM_B7L1L.x(1)
-        BLU = NIM_B7L1U.x(1)
+        ARL = NIM_A7R1L.x(1)    # noqa: F821
+        ARU = NIM_A7R1U.x(1)    # noqa: F821
+        ALL = NIM_A7L1L.x(1)    # noqa: F821
+        ALU = NIM_A7L1U.x(1)    # noqa: F821
+        BRL = NIM_B7R1L.x(1)    # noqa: F821
+        BRU = NIM_B7R1U.x(1)    # noqa: F821
+        BLL = NIM_B7L1L.x(1)    # noqa: F821
+        BLU = NIM_B7L1U.x(1)    # noqa: F821
 
         # Elastics1 and 2
-        LVL1MenuItem('L1_ALFA_ELAST1').setLogic( BLU & ALU & ARL & BRL & Not( BLL | ALL | ARU | BRU ) & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_ELAST2').setLogic( BLL & ALL & ARU & BRU & Not( BLU | ALU | ARL | BRL ) & physcond ).setTriggerType(TT.rpcout)
+        LVL1MenuItem('L1_ALFA_ELAST1').setLogic( BLU & ALU & ARL & BRL & Not( BLL | ALL | ARU | BRU ) & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_ELAST2').setLogic( BLL & ALL & ARU & BRU & Not( BLU | ALU | ARL | BRL ) & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
 
         # Elastics 11 - Elastics 18
-        LVL1MenuItem('L1_ALFA_ELAST11').setLogic( BLU & ALU & ARL & BRL & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_ELAST12').setLogic( BLL & ALL & ARU & BRU & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_ELAST13').setLogic( ( BLU | ALU ) & ( ARL & BRL ) & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_ELAST14').setLogic( ( BLU & ALU ) & ( ARL | BRL ) & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_ELAST15').setLogic( ( BLU | ALU ) & ( ARL | BRL ) & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_ELAST16').setLogic( ( BLL | ALL ) & ( ARU & BRU ) & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_ELAST17').setLogic( ( BLL & ALL ) & ( ARU | BRU ) & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_ELAST18').setLogic( ( BLL | ALL ) & ( ARU | BRU ) & physcond ).setTriggerType(TT.rpcout)
+        LVL1MenuItem('L1_ALFA_ELAST11').setLogic( BLU & ALU & ARL & BRL & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_ELAST12').setLogic( BLL & ALL & ARU & BRU & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_ELAST13').setLogic( ( BLU | ALU ) & ( ARL & BRL ) & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_ELAST14').setLogic( ( BLU & ALU ) & ( ARL | BRL ) & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_ELAST15').setLogic( ( BLU | ALU ) & ( ARL | BRL ) & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_ELAST16').setLogic( ( BLL | ALL ) & ( ARU & BRU ) & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_ELAST17').setLogic( ( BLL & ALL ) & ( ARU | BRU ) & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_ELAST18').setLogic( ( BLL | ALL ) & ( ARU | BRU ) & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
 
         # Single_Diffraction 1 - 8
-        LVL1MenuItem('L1_ALFA_SDIFF1').setLogic( BLU & ALU & Not( BLL | ALL | ARU | ARL | BRU | BRL ) & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_SDIFF2').setLogic( ARL & BRL & Not( BLU | BLL | ALU | ALL | ARU | BRU ) & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_SDIFF3').setLogic( BLL & ALL & Not( BLU | ALU | ARU | ARL | BRU | BRL ) & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_SDIFF4').setLogic( ARU & BRU & Not( BLU | BLL | ALU | ALL | ARL | BRL ) & physcond ).setTriggerType(TT.rpcout)
+        LVL1MenuItem('L1_ALFA_SDIFF1').setLogic( BLU & ALU & Not( BLL | ALL | ARU | ARL | BRU | BRL ) & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SDIFF2').setLogic( ARL & BRL & Not( BLU | BLL | ALU | ALL | ARU | BRU ) & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SDIFF3').setLogic( BLL & ALL & Not( BLU | ALU | ARU | ARL | BRU | BRL ) & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SDIFF4').setLogic( ARU & BRU & Not( BLU | BLL | ALU | ALL | ARL | BRL ) & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
 
-        LVL1MenuItem('L1_ALFA_SDIFF5').setLogic( BLU & ALU & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_SDIFF6').setLogic( ARL & BRL & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_SDIFF7').setLogic( BLL & ALL & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_SDIFF8').setLogic( ARU & BRU & physcond ).setTriggerType(TT.rpcout)
+        LVL1MenuItem('L1_ALFA_SDIFF5').setLogic( BLU & ALU & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SDIFF6').setLogic( ARL & BRL & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SDIFF7').setLogic( BLL & ALL & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SDIFF8').setLogic( ARU & BRU & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
 
         # Big_showers 1 - 4
-        LVL1MenuItem('L1_ALFA_SHOW1').setLogic( BLU & BLL & ALU & ALL & Not( ARU | ARL | BRU | BRL ) & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_SHOW2').setLogic( ARU & ARL & BRU & BRL & Not( BLU | BLL | ALU | ALL ) & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_SHOW3').setLogic( BLU & BLL & ALU & ALL & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_SHOW4').setLogic( ARU & ARL & BRU & BRL & physcond ).setTriggerType(TT.rpcout)
+        LVL1MenuItem('L1_ALFA_SHOW1').setLogic( BLU & BLL & ALU & ALL & Not( ARU | ARL | BRU | BRL ) & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SHOW2').setLogic( ARU & ARL & BRU & BRL & Not( BLU | BLL | ALU | ALL ) & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SHOW3').setLogic( BLU & BLL & ALU & ALL & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SHOW4').setLogic( ARU & ARL & BRU & BRL & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
 
         # Systematics 1 - 4
-        LVL1MenuItem('L1_ALFA_SYST1').setLogic( BLU & BLL & Not( ALU | ALL | ARU | ARL | BRU | BRL ) & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_SYST2').setLogic( ALU & ALL & Not( BLU | BLL | ARU | ARL | BRU | BRL ) & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_SYST3').setLogic( ARU & ARL & Not( BLU | BLL | ALU | ALL | BRU | BRL ) & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_SYST4').setLogic( BRU & BRL & Not( BLU | BLL | ALU | ALL | ARU | ARL ) & physcond ).setTriggerType(TT.rpcout)
+        LVL1MenuItem('L1_ALFA_SYST1').setLogic( BLU & BLL & Not( ALU | ALL | ARU | ARL | BRU | BRL ) & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SYST2').setLogic( ALU & ALL & Not( BLU | BLL | ARU | ARL | BRU | BRL ) & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SYST3').setLogic( ARU & ARL & Not( BLU | BLL | ALU | ALL | BRU | BRL ) & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SYST4').setLogic( BRU & BRL & Not( BLU | BLL | ALU | ALL | ARU | ARL ) & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
 
         # Big_showers_Systematics 1 - 5
-        LVL1MenuItem('L1_ALFA_SHOWSYST1').setLogic( BLU & BLL & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_SHOWSYST2').setLogic( ALU & ALL & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_SHOWSYST3').setLogic( ARU & ARL & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_SHOWSYST4').setLogic( BRU & BRL & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_SHOWSYST5').setLogic( ( BLU | BLL | ALU | ALL ) & ( ARU | ARL | BRU | BRL ) & physcond ).setTriggerType(TT.rpcout)
+        LVL1MenuItem('L1_ALFA_SHOWSYST1').setLogic( BLU & BLL & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SHOWSYST2').setLogic( ALU & ALL & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SHOWSYST3').setLogic( ARU & ARL & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SHOWSYST4').setLogic( BRU & BRL & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SHOWSYST5').setLogic( ( BLU | BLL | ALU | ALL ) & ( ARU | ARL | BRU | BRL ) & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
 
         # Systematics 9 - 12, 17, 18
-        LVL1MenuItem('L1_ALFA_SYST9' ).setLogic( BLU & ALU & ARU & BRU & Not( BLL | ALL | ARL | BRL ) & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_SYST10').setLogic( BLL & ALL & ARL & BRL & Not( BLU | ALU | ARU | BRU ) & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_SYST11').setLogic( BLU & ALU & ARU & BRU & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_SYST12').setLogic( BLL & ALL & ARL & BRL & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_SYST17').setLogic( ( BLU | ALU ) & ( ARU | BRU ) & physcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_SYST18').setLogic( ( BLL | ALL ) & ( ARL | BRL ) & physcond ).setTriggerType(TT.rpcout)
+        LVL1MenuItem('L1_ALFA_SYST9' ).setLogic( BLU & ALU & ARU & BRU & Not( BLL | ALL | ARL | BRL ) & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SYST10').setLogic( BLL & ALL & ARL & BRL & Not( BLU | ALU | ARU | BRU ) & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SYST11').setLogic( BLU & ALU & ARU & BRU & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SYST12').setLogic( BLL & ALL & ARL & BRL & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SYST17').setLogic( ( BLU | ALU ) & ( ARU | BRU ) & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_SYST18').setLogic( ( BLL | ALL ) & ( ARL | BRL ) & physcond ).setTriggerType(TT.rpcout)    # noqa: F821
 
         # ANY_ALFA = Minimum_Bias : B7L1U or B7L1L or A7L1U or A7L1L or A7R1U or A7R1L or B7R1U or B7R1L
         ANY_ALFA = BLU | BLL | ALU | ALL | ARU | ARL | BRU | BRL
-        LVL1MenuItem('L1_ALFA_ANY'                ).setLogic( ANY_ALFA & physcond            ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_ANY_EMPTY'          ).setLogic( ANY_ALFA & cosmiccond          ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_ANY_FIRSTEMPTY'     ).setLogic( ANY_ALFA & firstempty          ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_ANY_UNPAIRED_ISO'   ).setLogic( ANY_ALFA & unpaired_isocond    ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_ANY_UNPAIRED_NONISO').setLogic( ANY_ALFA & unpaired_nonisocond ).setTriggerType(TT.rpcout)
+        LVL1MenuItem('L1_ALFA_ANY'                ).setLogic( ANY_ALFA & physcond            ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_ANY_EMPTY'          ).setLogic( ANY_ALFA & cosmiccond          ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_ANY_FIRSTEMPTY'     ).setLogic( ANY_ALFA & firstempty          ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_ANY_UNPAIRED_ISO'   ).setLogic( ANY_ALFA & unpaired_isocond    ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_ANY_UNPAIRED_NONISO').setLogic( ANY_ALFA & unpaired_nonisocond ).setTriggerType(TT.rpcout)    # noqa: F821
 
         #---------------------------------
         # new ALFA items for 2012 running:
         #---------------------------------
-        ARL_OD = NIM_A7R1L_OD.x(1)
-        ARU_OD = NIM_A7R1U_OD.x(1)
-        ALL_OD = NIM_A7L1L_OD.x(1)
-        ALU_OD = NIM_A7L1U_OD.x(1)
-        BRL_OD = NIM_B7R1L_OD.x(1)
-        BRU_OD = NIM_B7R1U_OD.x(1)
-        BLL_OD = NIM_B7L1L_OD.x(1)
-        BLU_OD = NIM_B7L1U_OD.x(1)
-
-        LVL1MenuItem('L1_ALFA_A7L1U').setLogic( ALU & BGRP0 ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_A7L1L').setLogic( ALL & BGRP0 ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_A7R1U').setLogic( ARU & BGRP0 ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_A7R1L').setLogic( ARL & BGRP0 ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_B7L1U').setLogic( BLU & BGRP0 ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_B7L1L').setLogic( BLL & BGRP0 ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_B7R1U').setLogic( BRU & BGRP0 ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_B7R1L').setLogic( BRL & BGRP0 ).setTriggerType(TT.rpcout)
-
-        LVL1MenuItem('L1_ALFA_A7L1U_OD').setLogic( ALU_OD & BGRP0 ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_A7L1L_OD').setLogic( ALL_OD & BGRP0 ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_B7L1U_OD').setLogic( BLU_OD & BGRP0 ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_B7L1L_OD').setLogic( BLL_OD & BGRP0 ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_A7R1U_OD').setLogic( ARU_OD & BGRP0 ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_A7R1L_OD').setLogic( ARL_OD & BGRP0 ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_B7R1U_OD').setLogic( BRU_OD & BGRP0 ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_B7R1L_OD').setLogic( BRL_OD & BGRP0 ).setTriggerType(TT.rpcout)
-
-        LVL1MenuItem('L1_ALFA_B7L1_OD').setLogic( ( BLU_OD & BLL_OD ) & BGRP0 ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_A7L1_OD').setLogic( ( ALU_OD & ALL_OD ) & BGRP0 ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_A7R1_OD').setLogic( ( ARU_OD & ARL_OD ) & BGRP0 ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_B7R1_OD').setLogic( ( BRU_OD & BRL_OD ) & BGRP0 ).setTriggerType(TT.rpcout)
+        ARL_OD = NIM_A7R1L_OD.x(1)    # noqa: F821
+        ARU_OD = NIM_A7R1U_OD.x(1)    # noqa: F821
+        ALL_OD = NIM_A7L1L_OD.x(1)    # noqa: F821
+        ALU_OD = NIM_A7L1U_OD.x(1)    # noqa: F821
+        BRL_OD = NIM_B7R1L_OD.x(1)    # noqa: F821
+        BRU_OD = NIM_B7R1U_OD.x(1)    # noqa: F821
+        BLL_OD = NIM_B7L1L_OD.x(1)    # noqa: F821
+        BLU_OD = NIM_B7L1U_OD.x(1)    # noqa: F821
+
+        LVL1MenuItem('L1_ALFA_A7L1U').setLogic( ALU & BGRP0 ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_A7L1L').setLogic( ALL & BGRP0 ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_A7R1U').setLogic( ARU & BGRP0 ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_A7R1L').setLogic( ARL & BGRP0 ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_B7L1U').setLogic( BLU & BGRP0 ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_B7L1L').setLogic( BLL & BGRP0 ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_B7R1U').setLogic( BRU & BGRP0 ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_B7R1L').setLogic( BRL & BGRP0 ).setTriggerType(TT.rpcout)    # noqa: F821
+
+        LVL1MenuItem('L1_ALFA_A7L1U_OD').setLogic( ALU_OD & BGRP0 ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_A7L1L_OD').setLogic( ALL_OD & BGRP0 ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_B7L1U_OD').setLogic( BLU_OD & BGRP0 ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_B7L1L_OD').setLogic( BLL_OD & BGRP0 ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_A7R1U_OD').setLogic( ARU_OD & BGRP0 ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_A7R1L_OD').setLogic( ARL_OD & BGRP0 ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_B7R1U_OD').setLogic( BRU_OD & BGRP0 ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_B7R1L_OD').setLogic( BRL_OD & BGRP0 ).setTriggerType(TT.rpcout)    # noqa: F821
+
+        LVL1MenuItem('L1_ALFA_B7L1_OD').setLogic( ( BLU_OD & BLL_OD ) & BGRP0 ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_A7L1_OD').setLogic( ( ALU_OD & ALL_OD ) & BGRP0 ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_A7R1_OD').setLogic( ( ARU_OD & ARL_OD ) & BGRP0 ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_B7R1_OD').setLogic( ( BRU_OD & BRL_OD ) & BGRP0 ).setTriggerType(TT.rpcout)    # noqa: F821
         
-        LVL1MenuItem('L1_ALFA_B1_EMPTY').setLogic( ( BLU | BLL | ALU | ALL ) & cosmiccond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ALFA_B2_EMPTY').setLogic( ( ARU | ARL | BRU | BRL ) & cosmiccond ).setTriggerType(TT.rpcout)
+        LVL1MenuItem('L1_ALFA_B1_EMPTY').setLogic( ( BLU | BLL | ALU | ALL ) & cosmiccond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ALFA_B2_EMPTY').setLogic( ( ARU | ARL | BRU | BRL ) & cosmiccond ).setTriggerType(TT.rpcout)    # noqa: F821
 
         # ALFA and MBTS 
-        LVL1MenuItem('L1_MBTS_2_A_ALFA_C').setLogic( MBTS_A.x(2) & (( ARU & BRU ) | ( ARL & BRL )) & bgrpcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_MBTS_2_C_ALFA_A').setLogic( MBTS_C.x(2) & (( ALU & BLU ) | ( ALL & BLL )) & bgrpcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_MBTS_2_ALFA').setLogic( MBTS_2 & ANY_ALFA & bgrpcond ).setTriggerType(TT.rpcout)
-
-        LVL1MenuItem('L1_MBTS_2_A_ALFA_C_UNPAIRED_ISO').setLogic( MBTS_A.x(2) & ((ARU & BRU) | (ARL & BRL)) & unpaired_isocond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_MBTS_2_C_ALFA_A_UNPAIRED_ISO').setLogic( MBTS_C.x(2) & ((ALU & BLU) | (ALL & BLL)) & unpaired_isocond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_MBTS_2_ALFA_UNPAIRED_ISO'    ).setLogic( MBTS_2 & ANY_ALFA & unpaired_isocond ).setTriggerType(TT.rpcout)
-
-        LVL1MenuItem('L1_MBTS_1_A_ALFA_C').setLogic( MBTS_A.x(1) & ((ARU & BRU) | (ARL & BRL)) & bgrpcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_MBTS_1_C_ALFA_A').setLogic( MBTS_C.x(1) & ((ALU & BLU) | (ALL & BLL)) & bgrpcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_MBTS_1_A_ALFA_C_UNPAIRED_ISO').setLogic( MBTS_A.x(1) & ((ARU & BRU) | (ARL & BRL)) & unpaired_isocond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_MBTS_1_C_ALFA_A_UNPAIRED_ISO').setLogic( MBTS_C.x(1) & ((ALU & BLU) | (ALL & BLL)) & unpaired_isocond ).setTriggerType(TT.rpcout)
+        LVL1MenuItem('L1_MBTS_2_A_ALFA_C').setLogic( MBTS_A.x(2) & (( ARU & BRU ) | ( ARL & BRL )) & bgrpcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_2_C_ALFA_A').setLogic( MBTS_C.x(2) & (( ALU & BLU ) | ( ALL & BLL )) & bgrpcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_2_ALFA').setLogic( MBTS_2 & ANY_ALFA & bgrpcond ).setTriggerType(TT.rpcout)    # noqa: F821
+
+        LVL1MenuItem('L1_MBTS_2_A_ALFA_C_UNPAIRED_ISO').setLogic( MBTS_A.x(2) & ((ARU & BRU) | (ARL & BRL)) & unpaired_isocond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_2_C_ALFA_A_UNPAIRED_ISO').setLogic( MBTS_C.x(2) & ((ALU & BLU) | (ALL & BLL)) & unpaired_isocond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_2_ALFA_UNPAIRED_ISO'    ).setLogic( MBTS_2 & ANY_ALFA & unpaired_isocond ).setTriggerType(TT.rpcout)    # noqa: F821
+
+        LVL1MenuItem('L1_MBTS_1_A_ALFA_C').setLogic( MBTS_A.x(1) & ((ARU & BRU) | (ARL & BRL)) & bgrpcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_1_C_ALFA_A').setLogic( MBTS_C.x(1) & ((ALU & BLU) | (ALL & BLL)) & bgrpcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_1_A_ALFA_C_UNPAIRED_ISO').setLogic( MBTS_A.x(1) & ((ARU & BRU) | (ARL & BRL)) & unpaired_isocond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_MBTS_1_C_ALFA_A_UNPAIRED_ISO').setLogic( MBTS_C.x(1) & ((ALU & BLU) | (ALL & BLL)) & unpaired_isocond ).setTriggerType(TT.rpcout)    # noqa: F821
             
         # ALFA and LUCID 
-        LVL1MenuItem('L1_LUCID_A_ALFA_C').setLogic( LUCID_A.x(1) & ((ARU & BRU) | (ARL & BRL)) & bgrpcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_LUCID_C_ALFA_A').setLogic( LUCID_C.x(1) & ((ALU & BLU) | (ALL & BLL)) & bgrpcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_LUCID_A_ALFA_C_UNPAIRED_ISO').setLogic( LUCID_A.x(1) & ((ARU & BRU) | (ARL & BRL)) & unpaired_isocond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_LUCID_C_ALFA_A_UNPAIRED_ISO').setLogic( LUCID_C.x(1) & ((ALU & BLU) | (ALL & BLL)) & unpaired_isocond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_LUCID_ALFA').setLogic( (LUCID_A.x(1) | LUCID_C.x(1)) & ANY_ALFA & bgrpcond ).setTriggerType(TT.rpcout)
+        LVL1MenuItem('L1_LUCID_A_ALFA_C').setLogic( LUCID_A.x(1) & ((ARU & BRU) | (ARL & BRL)) & bgrpcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_LUCID_C_ALFA_A').setLogic( LUCID_C.x(1) & ((ALU & BLU) | (ALL & BLL)) & bgrpcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_LUCID_A_ALFA_C_UNPAIRED_ISO').setLogic( LUCID_A.x(1) & ((ARU & BRU) | (ARL & BRL)) & unpaired_isocond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_LUCID_C_ALFA_A_UNPAIRED_ISO').setLogic( LUCID_C.x(1) & ((ALU & BLU) | (ALL & BLL)) & unpaired_isocond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_LUCID_ALFA').setLogic( (LUCID_A.x(1) | LUCID_C.x(1)) & ANY_ALFA & bgrpcond ).setTriggerType(TT.rpcout)    # noqa: F821
 
         # ALFA and ZDC
-        LVL1MenuItem('L1_ZDC_A_ALFA_C').setLogic( ZDC_A.x(1) & ((ARU & BRU) | (ARL & BRL)) & bgrpcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ZDC_C_ALFA_A').setLogic( ZDC_C.x(1) & ((ALU & BLU) | (ALL & BLL)) & bgrpcond ).setTriggerType(TT.rpcout)
-        LVL1MenuItem('L1_ZDC_ALFA').setLogic( (ZDC_A.x(1) | ZDC_C.x(1)) & ANY_ALFA & bgrpcond ).setTriggerType(TT.rpcout)
+        LVL1MenuItem('L1_ZDC_A_ALFA_C').setLogic( ZDC_A.x(1) & ((ARU & BRU) | (ARL & BRL)) & bgrpcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_C_ALFA_A').setLogic( ZDC_C.x(1) & ((ALU & BLU) | (ALL & BLL)) & bgrpcond ).setTriggerType(TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_ZDC_ALFA').setLogic( (ZDC_A.x(1) | ZDC_C.x(1)) & ANY_ALFA & bgrpcond ).setTriggerType(TT.rpcout)    # noqa: F821
 
         # new combined ALFA items for 2012 running
-        LVL1MenuItem('L1_EM3_ALFA_ANY'   ).setLogic( EM3.x(1) & ANY_ALFA & physcond ).setTriggerType( TT.calo | TT.caloem | TT.rpcout)
-        LVL1MenuItem('L1_EM3_ALFA_MBTS_A').setLogic( EM3.x(1) & MBTS_A.x(1) & ((BRU & ARU) | (BRL & ARL)) & physcond).setTriggerType( TT.calo | TT.caloem | TT.minb | TT.rpcout)
-        LVL1MenuItem('L1_EM3_ALFA_MBTS_C').setLogic( EM3.x(1) & MBTS_C.x(1) & ((BLU & ALU) | (BLL & ALL)) & physcond).setTriggerType( TT.calo | TT.caloem | TT.minb | TT.rpcout)
+        LVL1MenuItem('L1_EM3_ALFA_ANY'   ).setLogic( EM3.x(1) & ANY_ALFA & physcond ).setTriggerType( TT.calo | TT.caloem | TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_EM3_ALFA_MBTS_A').setLogic( EM3.x(1) & MBTS_A.x(1) & ((BRU & ARU) | (BRL & ARL)) & physcond).setTriggerType( TT.calo | TT.caloem | TT.minb | TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_EM3_ALFA_MBTS_C').setLogic( EM3.x(1) & MBTS_C.x(1) & ((BLU & ALU) | (BLL & ALL)) & physcond).setTriggerType( TT.calo | TT.caloem | TT.minb | TT.rpcout)    # noqa: F821
         
-        LVL1MenuItem('L1_EM3_ALFA_ANY_UNPAIRED_ISO'   ).setLogic( EM3.x(1) & ANY_ALFA & unpaired_isocond).setTriggerType( TT.calo | TT.caloem | TT.rpcout)
-        LVL1MenuItem('L1_EM3_ALFA_MBTS_C_UNPAIRED_ISO').setLogic( EM3.x(1) & MBTS_C.x(1) & ((BLU & ALU) | (BLL & ALL)) & unpaired_isocond).setTriggerType( TT.calo | TT.caloem | TT.minb | TT.rpcout)
-        LVL1MenuItem('L1_EM3_ALFA_MBTS_A_UNPAIRED_ISO').setLogic( EM3.x(1) & MBTS_A.x(1) & ((BRU & ARU) | (BRL & ARL)) & unpaired_isocond).setTriggerType( TT.calo | TT.caloem | TT.minb | TT.rpcout)
+        LVL1MenuItem('L1_EM3_ALFA_ANY_UNPAIRED_ISO'   ).setLogic( EM3.x(1) & ANY_ALFA & unpaired_isocond).setTriggerType( TT.calo | TT.caloem | TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_EM3_ALFA_MBTS_C_UNPAIRED_ISO').setLogic( EM3.x(1) & MBTS_C.x(1) & ((BLU & ALU) | (BLL & ALL)) & unpaired_isocond).setTriggerType( TT.calo | TT.caloem | TT.minb | TT.rpcout)    # noqa: F821
+        LVL1MenuItem('L1_EM3_ALFA_MBTS_A_UNPAIRED_ISO').setLogic( EM3.x(1) & MBTS_A.x(1) & ((BRU & ARU) | (BRL & ARL)) & unpaired_isocond).setTriggerType( TT.calo | TT.caloem | TT.minb | TT.rpcout)    # noqa: F821
 
 
-        LVL1MenuItem('L1_TOPO_DPHI', ctpid=300).setLogic( TOPO_DPHI.x(1) & physcond).setTriggerType( TT.calo )
+        LVL1MenuItem('L1_TOPO_DPHI', ctpid=300).setLogic( TOPO_DPHI.x(1) & physcond).setTriggerType( TT.calo )    # noqa: F821
 
 
         # =======================================================
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1menu/Menu_MC_PhaseII.py b/Trigger/TriggerCommon/TriggerMenu/python/l1menu/Menu_MC_PhaseII.py
new file mode 100644
index 0000000000000000000000000000000000000000..300da8e1a9fab40b423d8701ef19d33671b5e3cf
--- /dev/null
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1menu/Menu_MC_PhaseII.py
@@ -0,0 +1,73 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
+
+from AthenaCommon.Logging import logging
+log = logging.getLogger( 'TriggerMenu.l1menu.Menu_MC_PhaseII' )
+
+
+def defineMenu():
+    """
+    Use MC_pp_v7 L1 menu for this
+    """
+    
+    import Menu_MC_pp_v7
+    from TriggerMenu.l1.Lvl1Flags import Lvl1Flags
+
+
+    Menu_MC_pp_v7.defineMenu()
+
+    Lvl1Flags.thresholds += [
+        ]
+
+    Lvl1Flags.items += [
+        # for running high rate tests in secondary CTP partitions
+        'L1_RD2_BGRP14', 'L1_RD3_BGRP15',
+        ]
+
+   #Make sure these triggers don't get assigned random CTPIDs
+    Lvl1Flags.CtpIdMap().update({
+        'L1_RD2_BGRP14' : 463,
+        'L1_RD3_BGRP15' : 464,
+    })
+
+    #---------------------------------
+    # L1menu in MCppV5 is basis 
+    # BeamSplashes: adapt some thresholds and items
+    #---------------------------------
+    Lvl1Flags.ThresholdMap = {
+        }
+
+    Lvl1Flags.ItemMap = {
+        }
+    
+    #----------------------------------------------
+    def remapThresholds():
+        threshToRemove = []
+        for index, thresholdName in enumerate(Lvl1Flags.thresholds()):
+            if thresholdName in Lvl1Flags.ThresholdMap():
+                if (Lvl1Flags.ThresholdMap()[thresholdName] != ''):
+                    Lvl1Flags.thresholds()[index] = Lvl1Flags.ThresholdMap()[thresholdName]
+                else:
+                    threshToRemove.append(index)
+
+        for t in reversed(threshToRemove):
+            del Lvl1Flags.thresholds()[t]
+    #----------------------------------------------
+                    
+    remapThresholds()
+
+    #----------------------------------------------
+    def remapItems():  
+        itemsToRemove = []
+        for itemIndex, itemName in enumerate(Lvl1Flags.items()):
+            if (itemName in Lvl1Flags.ItemMap()):
+                if (Lvl1Flags.ItemMap()[itemName] != ''):
+                    Lvl1Flags.items()[itemIndex] = Lvl1Flags.ItemMap()[itemName]                                                
+                else: 
+                    itemsToRemove.append(itemIndex)
+
+        for i in reversed(itemsToRemove):
+            del Lvl1Flags.items()[i]
+    #----------------------------------------------
+                                           
+    remapItems()
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1menu/Menu_MC_pp_v7.py b/Trigger/TriggerCommon/TriggerMenu/python/l1menu/Menu_MC_pp_v7.py
index 3b87c5ab364a809a31141df107c7662fee024770..574397a1ed9804fb5f4a14a97cef31aea7f42128 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1menu/Menu_MC_pp_v7.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1menu/Menu_MC_pp_v7.py
@@ -606,8 +606,8 @@ def defineMenu():
         'L1_AFP_A_AND_C','L1_AFP_A_OR_C', 'L1_AFP_A', 'L1_AFP_C',
         'L1_AFP_A_AND_C_MBTS_2','L1_AFP_A_OR_C_MBTS_2',
         'L1_AFP_A_AND_C_J12','L1_AFP_A_OR_C_J12',
-        'L1_AFP_A_AND_C_EM3','L1_AFP_A_OR_C_EM3',
-        'L1_AFP_A_AND_C_MU4','L1_AFP_A_OR_C_MU4',
+        'L1_EM3_AFP_A_AND_C','L1_EM3_AFP_A_OR_C',
+        'L1_MU4_AFP_A_AND_C','L1_MU4_AFP_A_OR_C',
         'L1_AFP_A_AND_C_TE5','L1_AFP_A_OR_C_TE5',
         'L1_AFP_A_AND_C_J50','L1_AFP_A_AND_C_SPECTOF_J50',
         'L1_AFP_A_AND_C_J75','L1_AFP_A_AND_C_SPECTOF_J75',
@@ -829,7 +829,7 @@ def defineMenu():
         ### ATR-15062
         'L1_EM18VHI_MJJ-300',
 
-        'L1_LATE-MU10_XE50', 'L1_LATE-MU10_J50',
+        'L1_LATE-MU10_XE50','L1_LATE-MU10_XE40', 'L1_LATE-MU10_J50',
 
         'L1_TAU60_DR-TAU20ITAU12I',
 
@@ -896,7 +896,7 @@ def defineMenu():
         'L1_MU21_TAU12IM_FTK', 
         'L1_TAU20IM_2TAU12IM_J25_2J20_3J12_FTK',
         'L1_DR-TAU20ITAU12I-J25_FTK',
-        'L1_4J15_FTK',
+        'L1_4J20_FTK',
         'L1_4J15.0ETA25_FTK',
         'L1_J15_FTK',
         'L1_J40_FTK',
@@ -905,11 +905,10 @@ def defineMenu():
         ]
     
 
-    # the CTP ID mapping still has to be defined, currently it is taken from the order of the items
-    #Free slot [ATR-14858], 16-08-16
-    #[82,143,377,378,379,406,409,416,480]
-
-    
+#CTP IDs are taken from this mapping. Every L1 item needs a unique ctpid.
+#Free CTP IDs (2017-05-15) are: 470-479, 481, 486, 487, 488
+# 463-464 are reserved for L1_RD2_BGRP14 and L1_RD3_BGRP15 (in MC_Physics_pp_v7)
+# 509-511 are reserved for CALREQ
 
     Lvl1Flags.CtpIdMap = {
         'L1_EM3' : 0,
@@ -1170,7 +1169,7 @@ def defineMenu():
         'L1_J40.0ETA25_2J15.31ETA49' : 181,
         'L1_J40.0ETA25_2J25_J20.31ETA49' : 182,
 
-        "L1_J40.0ETA25_2J30_J20.31ETA49":250 , 
+        "L1_J40.0ETA25_2J30_J20.31ETA49": 465, 
 
         "L1_HT150-J20s5.ETA31_MJJ-400": 272 , ## noid(ea)
         "L1_HT150-J20s5.ETA31_MJJ-400-CF": 273,
@@ -1207,10 +1206,10 @@ def defineMenu():
         'L1_AFP_A_OR_C_MBTS_2': 317,
         'L1_AFP_A_AND_C_J12': 379,
         'L1_AFP_A_OR_C_J12': 436,
-        'L1_AFP_A_AND_C_EM3': 437,
-        'L1_AFP_A_OR_C_EM3': 438,
-        'L1_AFP_A_AND_C_MU4': 439,
-        'L1_AFP_A_OR_C_MU4': 440,
+        'L1_EM3_AFP_A_AND_C': 437,
+        'L1_EM3_AFP_A_OR_C': 438,
+        'L1_MU4_AFP_A_AND_C': 439,
+        'L1_MU4_AFP_A_OR_C': 440,
         'L1_AFP_A_AND_C_TE5': 441,
         'L1_AFP_A_OR_C_TE5': 442,
         'L1_AFP_A_AND_C_J50': 443,
@@ -1335,16 +1334,32 @@ def defineMenu():
         'L1_W-HT20-JJ15.ETA49' : 281,
         'L1_W-NOMATCH' : 282,
         #'L1_W-NOMATCH_W-05RO-XEEMHT' : 283,
-        'L1_EM10_W-MT25' : 284,
+
+        'L1_EM12_W-MT25' : 50,
+        'L1_EM12_W-MT35_XS30_W-15DPHI-JXE-0_W-15DPHI-EMXE' : 77,
+        'L1_EM12_W-MT35_XS40_W-05DPHI-JXE-0_W-05DPHI-EMXE' : 79,
+        'L1_EM12_W-MT35_W-90RO2-XEHT-0_W-15DPHI-JXE-0_W-15DPHI-EMXE' : 80,
+        'L1_EM12_W-MT35_W-250RO2-XEHT-0_W-05DPHI-JXE-0_W-05DPHI-EMXE' : 124,
+        'L1_EM15_W-MT35_W-250RO2-XEHT-0_W-15DPHI-JXE-0_W-15DPHI-EM15XE' : 139,
+        'L1_EM15_W-MT35_W-250RO2-XEHT-0_W-05DPHI-JXE-0_W-05DPHI-EM15XE' : 250,
+        'L1_EM15_W-MT35_XS60_W-15DPHI-JXE-0_W-15DPHI-EM15XE' : 274,
+        'L1_EM15_W-MT35_XS60_W-05DPHI-JXE-0_W-05DPHI-EM15XE' : 275,
+
+        'L1_EM15_W-MT35_XS40_W-15DPHI-JXE-0_W-15DPHI-EM15XE' : 284,
+        'L1_EM15_W-MT35_XS40_W-05DPHI-JXE-0_W-05DPHI-EM15XE' : 285,
         'L1_EM15_W-MT35' : 286,
-        'L1_EM10_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE_W-90RO2-XEHT-0' : 287,
-        'L1_EM10_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE_XS30' : 288,
-        'L1_EM10_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE_XS20' : 289,
-        'L1_EM10_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE' : 290,
-        'L1_EM15_W-MT35_W-05DPHI-JXE-0_W-05DPHI-EMXE_W-250RO2-XEHT-0' : 291,
-        'L1_EM15_W-MT35_W-05DPHI-JXE-0_W-05DPHI-EMXE_XS60' : 292,
-        'L1_EM15_W-MT35_W-05DPHI-JXE-0_W-05DPHI-EMXE_XS30' : 293,
-        'L1_EM15_W-MT35_W-05DPHI-JXE-0_W-05DPHI-EMXE' : 294,
+        'L1_EM12_W-MT35_XS50' : 287,
+        'L1_EM15_W-MT35_XS60' : 288,
+        'L1_EM10VH_W-MT35_XS50' : 289,
+        'L1_EM15VH_W-MT35_XS60' : 290,
+        'L1_EM20VH_W-MT35_XS60' : 291,
+        'L1_EM22VHI_W-MT35_XS40' : 292,
+        'L1_EM12_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE_W-90RO2-XEHT-0' : 293,
+        'L1_EM12_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE_XS20' : 294,
+
+        'L1_EM12_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE' : 322,
+        'L1_EM15_W-MT35_W-05DPHI-JXE-0_W-05DPHI-EM15XE_XS30' : 344,
+        'L1_EM15_W-MT35_W-05DPHI-JXE-0_W-05DPHI-EM15XE' : 384,
 #SX
 #        'L1_BPH-DR-2MU4' : 295,
 #        'L1_BPH-2M-2MU4' : 296,
@@ -1439,6 +1454,7 @@ def defineMenu():
         'L1_LAR-J' : 352,
         'L1_DR-EM15TAU12I' : 353,        
         'L1_LATE-MU10_XE50': 354,
+        'L1_LATE-MU10_XE40': 466,
         'L1_LATE-MU10_J50' : 355,
         'L1_SC111-CJ15' : 356,
         'L1_SC85-CJ15' : 357,
@@ -1467,7 +1483,7 @@ def defineMenu():
         'L1_3J35.0ETA23' : 425,
         'L1_TE20' : 374,
         'L1_TE10.0ETA24' : 375,
-        'L1_TE15.ETA24' : 416,
+        'L1_TE15.0ETA24' : 48,
         'L1_TE20.0ETA24' : 376,
         'L1_TE25.0ETA24' : 409,
         #'L1_XS40' : 377,
@@ -1477,7 +1493,7 @@ def defineMenu():
         'L1_J30.31ETA49_BGRP12' : 381,
         'L1_MU6_J30.0ETA49_2J20.0ETA49' : 382,
         'L1_4J20.0ETA49' : 383,
-        'L1_HT150-JJ15.ETA49_MJJ400' : 384,
+        'L1_HT150-JJ15.ETA49_MJJ-400' : 416,
 
         ### ATR-15062
         'L1_EM18VHI_MJJ-300' : 385,
@@ -1610,7 +1626,7 @@ def defineMenu():
         'L1_TAU20IM_FTK'                       : 86,
         'L1_TAU20IM_2TAU12IM_J25_2J20_3J12_FTK': 502,
         'L1_DR-TAU20ITAU12I-J25_FTK'           : 503,
-        'L1_4J15_FTK'                          : 504,
+        'L1_4J20_FTK'                          : 504,
         'L1_4J15.0ETA25_FTK'                   : 505,
         'L1_J15_FTK'                           : 506,
         'L1_J40_FTK'                           : 507,
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1menu/Menu_Physics_HI_v3.py b/Trigger/TriggerCommon/TriggerMenu/python/l1menu/Menu_Physics_HI_v3.py
index 33181f5f3c0eed08abe7ae1d262626477b7f8dff..068da495a3c1ebeccc8715acc95828165328c6ae 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1menu/Menu_Physics_HI_v3.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1menu/Menu_Physics_HI_v3.py
@@ -591,16 +591,13 @@ def defineMenu():
         'L1_BCM_Wide_EMPTY' : 107,
         'L1_BCM_Wide_UNPAIRED_ISO' : 108,
         'L1_L1_BCM_Wide_UNPAIRED_NONISO' : 109,
-        'L1_J10_UNPAIRED_ISO' : 110,
-        'L1_J10_UNPAIRED_NONISO' : 111,
         
         'L1_LUCID_UNPAIRED_ISO' : 113,
         #'L1_TAU8_FIRSTEMPTY' : 114,
         'L1_TAU8_UNPAIRED_ISO' : 115,
         'L1_TAU8_UNPAIRED_NONISO' : 116,
         'L1_ZDC_A_C_UNPAIRED_ISO' : 117,
-        'L1_ZDC_UNPAIRED_ISO' : 118,
-        'L1_ZDC_UNPAIRED_NONISO' : 119,
+
         'L1_MBTSA0' : 120,
         'L1_MBTSA1' : 122,
         'L1_FJ0' : 123,
@@ -609,7 +606,6 @@ def defineMenu():
         'L1_BCM_Wide_UNPAIRED_NONISO' : 126,
         'L1_EM7_UNPAIRED_ISO' : 127,
         'L1_EM7_UNPAIRED_NONISO' : 128,
-        'L1_J10_FIRSTEMPTY' : 129,
         'L1_J30_FIRSTEMPTY' : 130,
         'L1_MBTSA2' : 131,
         'L1_TE5' : 132,
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1menu/Menu_Physics_HI_v4.py b/Trigger/TriggerCommon/TriggerMenu/python/l1menu/Menu_Physics_HI_v4.py
index d994309a0d86320c75d102e57d49e9fa035eff0a..23b215ff8e32ff1355aecd9a49d49748adeb2945 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1menu/Menu_Physics_HI_v4.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1menu/Menu_Physics_HI_v4.py
@@ -948,16 +948,12 @@ def defineMenu():
         'L1_BCM_Wide_EMPTY' : 107,
         'L1_BCM_Wide_UNPAIRED_ISO' : 108,
         'L1_L1_BCM_Wide_UNPAIRED_NONISO' : 109,
-        'L1_J10_UNPAIRED_ISO' : 110,
-        'L1_J10_UNPAIRED_NONISO' : 111,
         
         'L1_LUCID_UNPAIRED_ISO' : 113,
         'L1_TAU8_FIRSTEMPTY' : 114,
         'L1_TAU8_UNPAIRED_ISO' : 115,
         'L1_TAU8_UNPAIRED_NONISO' : 116,
         'L1_ZDC_A_C_UNPAIRED_ISO' : 117,
-        'L1_ZDC_UNPAIRED_ISO' : 118,
-        'L1_ZDC_UNPAIRED_NONISO' : 119,
         'L1_MBTSA0' : 120,
         'L1_MBTSA1' : 122,
         #'L1_FJ0' : 123,
@@ -966,7 +962,6 @@ def defineMenu():
         'L1_BCM_Wide_UNPAIRED_NONISO' : 126,
         'L1_EM7_UNPAIRED_ISO' : 127,
         'L1_EM7_UNPAIRED_NONISO' : 128,
-        'L1_J10_FIRSTEMPTY' : 129,
         'L1_J30_FIRSTEMPTY' : 130,
         'L1_MBTSA2' : 131,
         'L1_TE5' : 132,
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1menu/Menu_Physics_pp_v7.py b/Trigger/TriggerCommon/TriggerMenu/python/l1menu/Menu_Physics_pp_v7.py
index 9fe28f7810caa3eedfa7f5620d450c8cb51cd197..41bfad92d48a90c20867fca6af72fbd688384ca2 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1menu/Menu_Physics_pp_v7.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1menu/Menu_Physics_pp_v7.py
@@ -12,7 +12,6 @@ def defineMenu():
     
     import Menu_MC_pp_v7
     from TriggerMenu.l1.Lvl1Flags import Lvl1Flags
-    from TriggerJobOpts.TriggerFlags import TriggerFlags
 
 
     Menu_MC_pp_v7.defineMenu()
@@ -25,6 +24,11 @@ def defineMenu():
         'L1_RD2_BGRP14', 'L1_RD3_BGRP15',
         ]
 
+   #Make sure these triggers don't get assigned random CTPIDs
+    Lvl1Flags.CtpIdMap().update({
+        'L1_RD2_BGRP14' : 463,
+        'L1_RD3_BGRP15' : 464,
+    })
 
     #---------------------------------
     # L1menu in MCppV5 is basis 
@@ -32,31 +36,6 @@ def defineMenu():
     #---------------------------------
     Lvl1Flags.ThresholdMap = {
 
-#        '15MINDPHI-EM15s6-XE0':'',
-#        '35MT-EM12s6-XE0':'',
-#        'DISAMB-0DR28-EM15his2-TAU12abi':'',
-#        'LATE-MU10s1':'',        
-#        'SC111-CJ15ab.ETA26':'',
-#        'SC85-CJ15ab.ETA26':'',
-#        '10MINDPHI-AJ20s2-XE50': '',
-
-#        '2INVM9-2MU4ab': '', 
-#        '2INVM9-MU6ab-MU4ab': '',
-
-#        '0DR22-2MU6ab':'',
-#        '7INVM15-2MU4ab' :'',
-#        '0DR22-MU6ab-MU4ab' :'',
-#        '0DR15-2MU4ab':'',
-#        '0DR24-2MU4ab':'',
-#        '0DR15-2MU6ab':'',
- 
-#       '15MINDPHI-EM15s6-XE0':'',
-#        '15MINDPHI-EM12s6-XE0':'',
-#        '10MINDPHI-J20s2-XE30':'',
-#        '0DR25-TAU20abi-TAU12abi':'',
-#        '1DISAMB-J25ab-0DR25-TAU20abi-TAU12abi':'',
-#        'DISAMB-30INVM-EM20his2-TAU12ab':'',
-#        '400INVM9999-AJ30s6.ETA31-AJ20s6.31ETA49':'',
 
 #        'EM7'       : 'EM3HI',
 #        'EM8VH'     : 'EM7',
@@ -73,8 +52,7 @@ def defineMenu():
 #        'EM20VH'    : 'EM20C',
 #        'EM20VHI'   : 'EM20VH',
 #        'EM22VHI'   : 'EM20VHI',
-#
-#
+
 #        'J75'       : 'J75A',    
 #        'J85'       : 'J75C',
 #        'J100'      : 'J85',         
@@ -89,70 +67,10 @@ def defineMenu():
 #        'HA30'      : 'HA25', 
 #        'HA40'      : 'HA25IT', 
 #        'HA60'      : 'HA40', 
-				#'2INVM9-2MU4ab':'2INVM8-2MU4ab',
-        #'2INVM9-MU6ab-MU4ab':'2INVM8-MU6ab-MU4ab', 
-#        'KF-XE40-AJall':'KF-XE35-AJall',
-#        'KF-XE50-AJall':'KF-XE45-AJall',
-#        '1INVM5-EMs1-EMs6'  :'1INVM5-EMs1-EMall',
-#        '1INVM5-EM7s1-EMs6' :'1INVM5-EM7s1-EMall',
-#        '1INVM5-EM12s1-EMs6':'1INVM5-EM12s1-EMall',
-#        '100RATIO-0MATCH-TAU30si2-EMall': '210RATIO-0MATCH-TAU30si2-EMall',
 
         }
 
     Lvl1Flags.ItemMap = {
-
-#        'L1_LFV-MU6':'',
-#        'L1_W-15DPHI-EMXE-1':'',
-#        'L1_W-15DPHI-EM15XE-1':'',
-#        'L1_J40_DPHI-J20s2XE30':'',
-#        'L1_J40_XE50_DPHI-J20s2XE50':'',
-#        'L1_MU4_J20_XE30_DPHI-J20s2XE30':'',
-#        'L1_2MU4_J20_XE30_DPHI-J20s2XE30':'',
-#        'L1_DR25-TAU20ITAU12I':'',
-#        'L1_DR25-TAU20ITAU12I-J25':'',
-#        'L1_30M-EM20ITAU12':'',
-#        'L1_MJJ-400-CF':'',
-
-#        'L1_DPHI-AJ20s2XE50':'', 
-#        'L1_EM12_W-MT35_XS40_W-05DPHI-JXE-0_W-05DPHI-EMXE':'', 
-#        "L1_EM12_W-MT35":'', 
-#        "L1_EM12_W-MT35_W-250RO2-XEHT-0_W-05DPHI-JXE-0_W-05DPHI-EMXE":'', 
-#        "L1_EM12_W-MT35_XS50":'',
-        'L1_EM12_W-MT35_W-90RO2-XEHT-0_W-15DPHI-JXE-0_W-15DPHI-EMX':'',
-#        "L1_EM12_W-MT35_W-90RO2-XEHT-0_W-15DPHI-JXE-0_W-15DPHI-EMXE":'',
-#        "L1_EM15_W-MT35_W-250RO2-XEHT-0_W-15DPHI-JXE-0_W-15DPHI-EM15XE":'',
-#        "L1_EM15_W-MT35_XS40_W-15DPHI-JXE-0_W-15DPHI-EM15XE":'', 
-#        "L1_EM15_W-MT35_XS60_W-15DPHI-JXE-0_W-15DPHI-EM15XE":'',
-#        "L1_EM10VH_W-MT35_XS50":'', 
-#        "L1_W-15DPHI-EM15XE-0":'',
-
-#        "L1_EM12_W-MT35_XS30_W-15DPHI-JXE-0_W-15DPHI-EMXE":'', 
-#        "L1_EM12_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE_W-90RO2-XEHT-0":'', 
-#        "L1_EM12_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE_XS30":'', 
-#        "L1_EM12_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE_XS20":'', 
-#        "L1_EM12_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE":'',
-
-#        'L1_DR-EM15TAU12I':'', 
-#        'L1_LATE-MU10_XE50':'', 
-#        'L1_LATE-MU10_J50':'', 
-#        'L1_SC111':'', 
-#        'L1_SC85':'',
-
-#        'L1_BPH-8M15-2MU6_BPH-0DR22-2MU6':'',
-#        'L1_BPH-7M15-2MU4_BPH-0DR24-2MU4':'',
-#        'L1_BPH-7M15-2MU4_BPH-0DR24-2MU4-B':'',
-#        'L1_BPH-7M15-2MU4_BPH-0DR24-2MU4-BO':'',
-#        'L1_BPH-8M15-MU6MU4_BPH-0DR22-MU6MU4':'',
-#        'L1_BPH-2M8-2MU4_BPH-0DR15-2MU4':'',
-        #'L1_BPH-2M9-2MU4_BPH-0DR15-2MU4':'',
-#        'L1_BPH-2M8-2MU4-B_BPH-0DR15-2MU4':'',
-        #'L1_BPH-2M8-2MU4-BO_BPH-0DR15-2MU4':'',
-#        'L1_BPH-7M15-2MU4_BPH-0DR24-2MU4':'',
-
-#        'L1_HT150-J20s5.ETA31_MJJ-400':'',
-#        'L1_HT150-J20s5.ETA31_MJJ-400-CF':'',
-        'L1_J40.0ETA25_2J30_J20.31ETA49':'',
 #        'L1_EM22VHI' : 'L1_EM20A' , #eta [1.6,2.].
 #        'L1_EM13VH'    : 'L1_EM20C',     #eta[-2,-1.6] 
 #        'L1_J75'       : 'L1_J75A',         #[1.6,2.4]
@@ -160,16 +78,11 @@ def defineMenu():
 #        'L1_EM10'      : 'L1_EM3HI',
 #        'L1_TAU30'     : 'L1_TAU20A', 
 #        'L1_TAU60'     : 'L1_TAU20C', 
-#        
 #        'L1_2EM13VH' : '',
 #        'L1_3J75' : '',
 #        'L1_J75_3J20' : '',
 #        'L1_J75_XE40' :'',
 #        'L1_MU6_J75': '',
-#        'L1_KF-XE40':'L1_KF-XE35',
-#        'L1_KF-XE50':'L1_KF-XE45',
-        #'L1_BPH-2M9-2MU4':'L1_BPH-2M8-2MU4',
-        #'L1_BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4':'L1_BPH-2M8-MU6MU4_BPH-0DR15-MU6MU4',
         }
     
     #----------------------------------------------
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1menu/MonitorDef.py b/Trigger/TriggerCommon/TriggerMenu/python/l1menu/MonitorDef.py
index ba87ea3f3c68753488868c10b154176d055d1d35..357fb5305ee11b795464d48b553c6c36d9a871e7 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1menu/MonitorDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1menu/MonitorDef.py
@@ -29,8 +29,7 @@ For each of these type 64 L1Items can be monitored independently
 
 """
 
-from TriggerMenu.l1.Lvl1Menu import Lvl1Menu
-from TriggerMenu.l1.Lvl1MonCounters import Lvl1MonCounters, Lvl1CtpinCounter, Lvl1CtpmonCounter
+from TriggerMenu.l1.Lvl1MonCounters import Lvl1CtpinCounter, Lvl1CtpmonCounter
 
 class MonitorDef:
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1menu/ThresholdDef.py b/Trigger/TriggerCommon/TriggerMenu/python/l1menu/ThresholdDef.py
index fd878c6b79d14681e39a937a0eb5b9d62845059d..7f7a15a0a1fb1c15767d1019a16987978bd48c65 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1menu/ThresholdDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1menu/ThresholdDef.py
@@ -1,6 +1,6 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-from TriggerMenu.l1.Lvl1Thresholds import LVL1Threshold, ThresholdValue
+from TriggerMenu.l1.Lvl1Thresholds import ThresholdValue
 from TriggerMenu.l1.Limits import CaloLimits as CL
 from TriggerJobOpts.TriggerFlags import TriggerFlags
 
@@ -295,8 +295,8 @@ class ThresholdDef:
 
         # Beam Splashes
         for thrV in [75]:
-            tc.registerThr('J%iA' % thrV, 'JET').addThrValue(JetOff).addThrValue( thrV, etamin = 16,  etamax = 24, priority=1)
-            tc.registerThr('J%iC' % thrV, 'JET').addThrValue(JetOff).addThrValue( thrV, etamin = -24,  etamax = -16, priority=1)          
+            tc.registerThr('J%iA' % thrV, 'JET').addThrValue(JetOff).addThrValue( thrV, etamin = 15,  etamax = 23, priority=1)
+            tc.registerThr('J%iC' % thrV, 'JET').addThrValue(JetOff).addThrValue( thrV, etamin = -23,  etamax = -15, priority=1)          
         
 
         # Central jet
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1menu/ThresholdDefRun1.py b/Trigger/TriggerCommon/TriggerMenu/python/l1menu/ThresholdDefRun1.py
index e4e8e23ca21296a169be0f7fba4e37153cfa5f6f..cb83925053a60cd6ccabd9e88b60a7fb6b0ff1bd 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1menu/ThresholdDefRun1.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1menu/ThresholdDefRun1.py
@@ -1,6 +1,6 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-from TriggerMenu.l1.Lvl1Thresholds import LVL1Threshold, ThresholdValue
+from TriggerMenu.l1.Lvl1Thresholds import ThresholdValue
 from TriggerMenu.l1.Limits import CaloLimits as CL
 ClusterOff   = CL.ClusterOff
 IsolationOff = CL.IsolationOff
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1topo/L1TopoFlags.py b/Trigger/TriggerCommon/TriggerMenu/python/l1topo/L1TopoFlags.py
index 9114f8db9e19f2b895ed277f95b707c87199be9e..a0d17a1af27c0bca01d4f4643567b7e170fdf38c 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1topo/L1TopoFlags.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1topo/L1TopoFlags.py
@@ -4,8 +4,7 @@
 L1Topo specific flags
 """
 
-from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer, jobproperties
-from TriggerMenu.menu.CommonSliceHelper import AllowedList
+from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer
 from AthenaCommon.Logging import logging
 
 log = logging.getLogger('TriggerMenu.L1TopoFlags.py')
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1topo/L1TopoMenu.py b/Trigger/TriggerCommon/TriggerMenu/python/l1topo/L1TopoMenu.py
index fd8aa97e27f8de9a51c5bcb28ce6d11d37ec0c79..6f105e411465e744e35cbce6952a3ded01e17d42 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1topo/L1TopoMenu.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1topo/L1TopoMenu.py
@@ -1,6 +1,6 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-from TopoOutput import TopoOutput, TriggerLine
+from TopoOutput import TriggerLine
 from AthenaCommon.Logging import logging
 log = logging.getLogger("TriggerMenu.l1topo.L1TopoMenu")
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1topo/TopoAlgos.py b/Trigger/TriggerCommon/TriggerMenu/python/l1topo/TopoAlgos.py
index 4b09969e45fbc8f44478f585ef59b6518bcb852b..5ef84d69cb9b21b44a3aa1230cc26ed8a695d08c 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1topo/TopoAlgos.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1topo/TopoAlgos.py
@@ -1,7 +1,6 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon.Logging import logging
-from copy import deepcopy 
 from TriggerJobOpts.TriggerFlags import TriggerFlags
 
 log = logging.getLogger("TopoAlgo") 
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1topo/TopoOutput.py b/Trigger/TriggerCommon/TriggerMenu/python/l1topo/TopoOutput.py
index 0738fbce77ee03dbfd92463ac28d3d80af36675d..9bb088a963e5cf80ac54e696f0f3a84231d72b40 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1topo/TopoOutput.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1topo/TopoOutput.py
@@ -22,7 +22,6 @@ class TopoOutput(object):
 
 
 
-from collections import namedtuple
 class TriggerLine(object):
 
     import re
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_DC14.py b/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_DC14.py
index db5897f94d859a792d474716a139860f8ca9e44d..d3a0a4bd46a51fb75fb507bcefbd5b166dcefbac 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_DC14.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_DC14.py
@@ -11,7 +11,6 @@ def defineMenu():
     """
     
     from TriggerMenu.l1topo.L1TopoFlags import L1TopoFlags
-    from TriggerMenu.l1topo.TopoOutput import TopoOutput
 
     L1TopoFlags.algos = []
     
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_LS1_v1.py b/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_LS1_v1.py
index db5897f94d859a792d474716a139860f8ca9e44d..d3a0a4bd46a51fb75fb507bcefbd5b166dcefbac 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_LS1_v1.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_LS1_v1.py
@@ -11,7 +11,6 @@ def defineMenu():
     """
     
     from TriggerMenu.l1topo.L1TopoFlags import L1TopoFlags
-    from TriggerMenu.l1topo.TopoOutput import TopoOutput
 
     L1TopoFlags.algos = []
     
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_MC_HI_v3.py b/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_MC_HI_v3.py
index 5ab3916dbb1f7f7a4f3190bf7fcbd1971f071f79..846b459542935bcf3bcb34b5d076d5789573dc5c 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_MC_HI_v3.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_MC_HI_v3.py
@@ -9,9 +9,6 @@ def defineMenu():
     algos   .... list of all algo names in the menu 
 
     """
-    
-    from TriggerMenu.l1topo.L1TopoFlags import L1TopoFlags
-    from TriggerMenu.l1topo.TopoOutput import TopoOutput
 
     import Menu_MC_pp_v6
     Menu_MC_pp_v6.defineMenu()
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_MC_HI_v4.py b/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_MC_HI_v4.py
index 5ab3916dbb1f7f7a4f3190bf7fcbd1971f071f79..6ffa3c7e8ca02da390810dc902ed58c219c30634 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_MC_HI_v4.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_MC_HI_v4.py
@@ -9,10 +9,7 @@ def defineMenu():
     algos   .... list of all algo names in the menu 
 
     """
-    
-    from TriggerMenu.l1topo.L1TopoFlags import L1TopoFlags
-    from TriggerMenu.l1topo.TopoOutput import TopoOutput
-
+   
     import Menu_MC_pp_v6
     Menu_MC_pp_v6.defineMenu()
     
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_MC_PhaseII.py b/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_MC_PhaseII.py
new file mode 100644
index 0000000000000000000000000000000000000000..bde0245be0a28daf3194bcd123bc2f53e41a6bac
--- /dev/null
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_MC_PhaseII.py
@@ -0,0 +1,19 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
+
+
+def defineMenu():
+    """
+    Defines the following LlTopoFlags:
+    
+    algos   .... list of all algo names in the menu 
+
+    """
+    
+
+    import Menu_MC_pp_v7
+    Menu_MC_pp_v7.defineMenu()
+    
+
+    
+    
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_Physics_HI_v3.py b/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_Physics_HI_v3.py
index c06d34e8e5a18e4be1b04e2dc84dcf262957943b..cd89bb840dcbd297a69ff42d694030a98ca88c0b 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_Physics_HI_v3.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_Physics_HI_v3.py
@@ -9,9 +9,6 @@ def defineMenu():
     algos   .... list of all algo names in the menu 
 
     """
-    
-    from TriggerMenu.l1topo.L1TopoFlags import L1TopoFlags
-    from TriggerMenu.l1topo.TopoOutput import TopoOutput
 
     import Menu_MC_pp_v6
     Menu_MC_pp_v6.defineMenu()
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_Physics_HI_v4.py b/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_Physics_HI_v4.py
index c06d34e8e5a18e4be1b04e2dc84dcf262957943b..cd89bb840dcbd297a69ff42d694030a98ca88c0b 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_Physics_HI_v4.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_Physics_HI_v4.py
@@ -9,9 +9,6 @@ def defineMenu():
     algos   .... list of all algo names in the menu 
 
     """
-    
-    from TriggerMenu.l1topo.L1TopoFlags import L1TopoFlags
-    from TriggerMenu.l1topo.TopoOutput import TopoOutput
 
     import Menu_MC_pp_v6
     Menu_MC_pp_v6.defineMenu()
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_Physics_pp_v6.py b/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_Physics_pp_v6.py
index c06d34e8e5a18e4be1b04e2dc84dcf262957943b..cd89bb840dcbd297a69ff42d694030a98ca88c0b 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_Physics_pp_v6.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_Physics_pp_v6.py
@@ -9,9 +9,6 @@ def defineMenu():
     algos   .... list of all algo names in the menu 
 
     """
-    
-    from TriggerMenu.l1topo.L1TopoFlags import L1TopoFlags
-    from TriggerMenu.l1topo.TopoOutput import TopoOutput
 
     import Menu_MC_pp_v6
     Menu_MC_pp_v6.defineMenu()
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_Physics_pp_v7.py b/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_Physics_pp_v7.py
index 70e01a064ae3b5fbb7310b6676117bd821ec3ae8..7b80cf282e260bc4d126a9697efb4dbd85da59a9 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_Physics_pp_v7.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/Menu_Physics_pp_v7.py
@@ -9,9 +9,6 @@ def defineMenu():
     algos   .... list of all algo names in the menu 
 
     """
-    
-    from TriggerMenu.l1topo.L1TopoFlags import L1TopoFlags
-    from TriggerMenu.l1topo.TopoOutput import TopoOutput
 
     import Menu_MC_pp_v7
     Menu_MC_pp_v7.defineMenu()
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/TopoAlgoDef.py b/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/TopoAlgoDef.py
index cd634cc24197f10c7006c528577c36b4670c4fe5..0f9dc425779da6239f4713998924357818a5373e 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/TopoAlgoDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/l1topomenu/TopoAlgoDef.py
@@ -3,14 +3,14 @@
 from AthenaCommon.Logging import logging
 log = logging.getLogger('TriggerMenu.L1Topo.py')
 
-from TriggerMenu.l1topo.TopoAlgos import SortingAlgo, DecisionAlgo
+#from TriggerMenu.l1topo.TopoAlgos import SortingAlgo, DecisionAlgo
 from TriggerJobOpts.TriggerFlags import TriggerFlags
 
 # algorithm python base classes generated from C++ code
 import L1TopoAlgorithms.L1TopoAlgConfig as AlgConf
 import L1TopoHardware.L1TopoHardware as HW
 
-import re
+#import re
 
 
 class TopoAlgoDef:
@@ -21,16 +21,12 @@ class TopoAlgoDef:
 
         _etamax = 49
         _minet = 0
-        usev6 = False
         usev7 = False
-        doPhysics = False
 
-        if '_v6' in TriggerFlags.triggerMenuSetup() or '_v7' in TriggerFlags.triggerMenuSetup() or 'HI' in TriggerFlags.triggerMenuSetup():
-            usev6 = True
         if '_v7' in TriggerFlags.triggerMenuSetup():
             usev7 = True
-        if 'Physics' in TriggerFlags.triggerMenuSetup() or 'HI' in TriggerFlags.triggerMenuSetup():
-            doPhysics = True
+        if '_PhaseII' in TriggerFlags.triggerMenuSetup():
+            usev7 = True
         
         _emscale_for_decision = 2 # global scale for EM, TAU        
         if hasattr(TriggerFlags, 'useRun1CaloEnergyScale'):
@@ -293,9 +289,6 @@ class TopoAlgoDef:
         # Decision algorithms
         currentAlgoId = 0
         
-
-
-
         # VBF items    
         for x in [
             {"algoname": 'INVM_AJ_HighMass', "Threlist": [ 900, 800, 700, 500 ], "maxInvm": 9999, "otype" : "AJ", "ocut1" : 30, "olist" : "s", "nleading1" : 6, "inputwidth1": HW.OutputWidthSortJET, "ocut2" : 20, "nleading2" : 6},
@@ -304,27 +297,27 @@ class TopoAlgoDef:
             
             for k in x:
                 exec("%s = x[k]" % k)
-
-            inputList = otype + olist
+		
+            inputList = otype + olist # noqa: F821
             toponames=[]
 
-            for minInvm in Threlist:
-                toponame = "%iINVM%i-%s%s%s%s-%s%s%s%s"  % (minInvm, maxInvm,
-                                                            otype, str(ocut1) , olist, str(nleading1) if olist=="s" else "",
-                                                            otype, str(ocut2) , olist, str(nleading2) if olist=="s" else "")   
+            for minInvm in Threlist:  # noqa: F821
+                toponame = "%iINVM%i-%s%s%s%s-%s%s%s%s"  % (minInvm, maxInvm,                                                    # noqa: F821
+                                                            otype, str(ocut1) , olist, str(nleading1) if olist=="s" else "",     # noqa: F821
+                                                            otype, str(ocut2) , olist, str(nleading2) if olist=="s" else "")     # noqa: F821 
                 toponames.append(toponame)
                 
-            alg = AlgConf.InvariantMassInclusive1( name = algoname, inputs = inputList, outputs = toponames, algoId = currentAlgoId); currentAlgoId += 1
+            alg = AlgConf.InvariantMassInclusive1( name = algoname, inputs = inputList, outputs = toponames, algoId = currentAlgoId); currentAlgoId += 1  # noqa: F821
 
-            alg.addgeneric('InputWidth', inputwidth1)
-            alg.addgeneric('MaxTob', nleading1)
+            alg.addgeneric('InputWidth', inputwidth1)      # noqa: F821
+            alg.addgeneric('MaxTob', nleading1)            # noqa: F821
             alg.addgeneric('NumResultBits', len(toponames))
 
-            for bitid, minInvm in enumerate(Threlist): 
-                alg.addvariable('MinET1', ocut1, bitid)
-                alg.addvariable('MinET2', ocut2, bitid)
-                alg.addvariable('MinMSqr', minInvm * minInvm, bitid)
-                alg.addvariable('MaxMSqr', maxInvm * maxInvm, bitid)
+            for bitid, minInvm in enumerate(Threlist):     # noqa: F821
+                alg.addvariable('MinET1', ocut1, bitid)    # noqa: F821
+                alg.addvariable('MinET2', ocut2, bitid)    # noqa: F821
+                alg.addvariable('MinMSqr', minInvm * minInvm, bitid)  # noqa: F821
+                alg.addvariable('MaxMSqr', maxInvm * maxInvm, bitid)  # noqa: F821
 
             tm.registerAlgo(alg)
 
@@ -349,21 +342,21 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
 
-            obj1 = "%s%s%s%s" % ((str(mult) if mult>1 else ""), otype1, str(ocut1), olist)
-            obj2 = "-%s%s%s" % (otype2, str(ocut2), olist)
-            toponame = "%iINVM%i-%s%s%s"  % (minInvm, maxInvm, "ONEBARREL-" if onebarrel==1 else "", obj1, "" if mult>1 else obj2)
+            obj1 = "%s%s%s%s" % ((str(mult) if mult>1 else ""), otype1, str(ocut1), olist)   # noqa: F821
+            obj2 = "-%s%s%s" % (otype2, str(ocut2), olist)                                   # noqa: F821
+            toponame = "%iINVM%i-%s%s%s"  % (minInvm, maxInvm, "ONEBARREL-" if onebarrel==1 else "", obj1, "" if mult>1 else obj2)  # noqa: F821
 
             log.info("Define %s" % toponame)
 
 
-            inputList = [otype1 + olist] if (mult>1 or otype1==otype2) else [otype1 + olist, otype2 + olist]
-            algoname = AlgConf.InvariantMassInclusive1 if (mult>1 or otype1==otype2) else AlgConf.InvariantMassInclusive2
+            inputList = [otype1 + olist] if (mult>1 or otype1==otype2) else [otype1 + olist, otype2 + olist]                             # noqa: F821
+            algoname = AlgConf.InvariantMassInclusive1 if (mult>1 or otype1==otype2) else AlgConf.InvariantMassInclusive2                # noqa: F821
             alg = algoname( name = toponame,  inputs = inputList, outputs = [ toponame ], algoId = currentAlgoId); currentAlgoId += 1
 
-            if (mult>1 or otype1==otype2):
+            if (mult>1 or otype1==otype2):  # noqa: F821
                 alg.addgeneric('InputWidth', HW.OutputWidthSelectMU) 
                 alg.addgeneric('MaxTob', HW.OutputWidthSelectMU)
-                alg.addgeneric('RequireOneBarrel', onebarrel)
+                alg.addgeneric('RequireOneBarrel', onebarrel) # noqa: F821
             else:
                 alg.addgeneric('InputWidth1', HW.OutputWidthSelectMU)
                 alg.addgeneric('InputWidth2', HW.OutputWidthSelectMU) 
@@ -371,10 +364,10 @@ class TopoAlgoDef:
                 alg.addgeneric('MaxTob2', HW.OutputWidthSelectMU)
 
             alg.addgeneric('NumResultBits', 1)
-            alg.addvariable('MinET1', ocut1)
-            alg.addvariable('MinET2', ocut2 if ocut2>0 else ocut1)
-            alg.addvariable('MinMSqr', minInvm * minInvm)
-            alg.addvariable('MaxMSqr', maxInvm * maxInvm)
+            alg.addvariable('MinET1', ocut1)                           # noqa: F821
+            alg.addvariable('MinET2', ocut2 if ocut2>0 else ocut1)     # noqa: F821
+            alg.addvariable('MinMSqr', minInvm * minInvm)              # noqa: F821
+            alg.addvariable('MaxMSqr', maxInvm * maxInvm)              # noqa: F821
             tm.registerAlgo(alg)
 
 
@@ -396,20 +389,20 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
 
-            obj1 = "%s%s%s%s" % ((str(mult) if mult>1 else ""), otype1, str(ocut1), olist)
-            obj2 = "-%s%s%s" % (otype2, str(ocut2), olist)
-            toponame = "%iDR%i-%s%s%s"  % (minDr, maxDr, "ONEBARREL-" if onebarrel==1 else "", obj1, "" if mult>1 else obj2)
+            obj1 = "%s%s%s%s" % ((str(mult) if mult>1 else ""), otype1, str(ocut1), olist)    # noqa: F821
+            obj2 = "-%s%s%s" % (otype2, str(ocut2), olist)                                    # noqa: F821
+            toponame = "%iDR%i-%s%s%s"  % (minDr, maxDr, "ONEBARREL-" if onebarrel==1 else "", obj1, "" if mult>1 else obj2)  # noqa: F821
 
             log.info("Define %s" % toponame)
 
-            inputList = [otype1 + olist] if (mult>1 or otype1==otype2) else [otype1 + olist, otype2 + olist]
-            algoname = AlgConf.DeltaRSqrIncl1 if (mult>1 or otype1==otype2) else AlgConf.DeltaRSqrIncl2
+            inputList = [otype1 + olist] if (mult>1 or otype1==otype2) else [otype1 + olist, otype2 + olist]    # noqa: F821
+            algoname = AlgConf.DeltaRSqrIncl1 if (mult>1 or otype1==otype2) else AlgConf.DeltaRSqrIncl2         # noqa: F821
             alg = algoname( name = toponame,  inputs = inputList, outputs = [ toponame ], algoId = currentAlgoId); currentAlgoId += 1
-
-            if (mult>1 or otype1==otype2):
+ 
+            if (mult>1 or otype1==otype2):  # noqa: F821
                 alg.addgeneric('InputWidth', HW.OutputWidthSelectMU)
                 alg.addgeneric('MaxTob', HW.OutputWidthSelectMU)
-                alg.addgeneric('RequireOneBarrel', onebarrel)
+                alg.addgeneric('RequireOneBarrel', onebarrel)  # noqa: F821
             else:
                 alg.addgeneric('InputWidth1', HW.OutputWidthSelectMU)
                 alg.addgeneric('InputWidth2', HW.OutputWidthSelectMU) 
@@ -418,10 +411,10 @@ class TopoAlgoDef:
 
 
             alg.addgeneric('NumResultBits', 1)
-            alg.addvariable('MinET1', ocut1)
-            alg.addvariable('MinET2', ocut2)
-            alg.addvariable('DeltaRMin', minDr*minDr)
-            alg.addvariable('DeltaRMax', maxDr*maxDr)
+            alg.addvariable('MinET1', ocut1)            # noqa: F821
+            alg.addvariable('MinET2', ocut2)            # noqa: F821
+            alg.addvariable('DeltaRMin', minDr*minDr)   # noqa: F821
+            alg.addvariable('DeltaRMax', maxDr*maxDr)   # noqa: F821
             tm.registerAlgo(alg)
         
 
@@ -436,38 +429,38 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
 
-            obj1 = "%s%s%s%s" % ((str(mult) if mult>1 else ""), otype1, str(ocut1), olist1)
-            obj2 = "-%s%s%s" % (otype2, str(ocut2) if ocut2>0 else "", olist2)
-            toponame = "%sDETA%s-%sDPHI%s-%s%s"  % (minDeta, maxDeta, minDphi, maxDphi, obj1, "" if mult>1 else obj2)
+            obj1 = "%s%s%s%s" % ((str(mult) if mult>1 else ""), otype1, str(ocut1), olist1)  # noqa: F821
+            obj2 = "-%s%s%s" % (otype2, str(ocut2) if ocut2>0 else "", olist2)  # noqa: F821
+            toponame = "%sDETA%s-%sDPHI%s-%s%s"  % (minDeta, maxDeta, minDphi, maxDphi, obj1, "" if mult>1 else obj2)  # noqa: F821
             
             log.info("Define %s" % toponame)
             
-            inputList = [otype1 + olist1] if (mult>1 or otype1==otype2) else [otype1 + olist1, otype2 + olist2]
-            algoname = AlgConf.DeltaEtaPhiIncl1 if (mult>1 or otype1==otype2) else AlgConf.DeltaEtaPhiIncl2            
+            inputList = [otype1 + olist1] if (mult>1 or otype1==otype2) else [otype1 + olist1, otype2 + olist2]    # noqa: F821
+            algoname = AlgConf.DeltaEtaPhiIncl1 if (mult>1 or otype1==otype2) else AlgConf.DeltaEtaPhiIncl2        # noqa: F821     
             alg = algoname( name = toponame, inputs = inputList, outputs = [ toponame ], algoId = currentAlgoId); currentAlgoId += 1
             alg.addgeneric('NumResultBits', 1)                        
 
             
-            if (mult>1 or otype1==otype2):
-                alg.addgeneric('InputWidth', nleading1)
-                alg.addgeneric('MaxTob', nleading1)
-                alg.addvariable('MinET1', ocut1)
-                alg.addvariable('MinET2', ocut2)
-                alg.addvariable('MinDeltaEta', minDeta)
-                alg.addvariable('MaxDeltaEta', maxDeta)
-                alg.addvariable('MinDeltaPhi', minDphi)
-                alg.addvariable('MaxDeltaPhi', maxDphi)
+            if (mult>1 or otype1==otype2):  # noqa: F821
+                alg.addgeneric('InputWidth', nleading1)  # noqa: F821
+                alg.addgeneric('MaxTob', nleading1)      # noqa: F821
+                alg.addvariable('MinET1', ocut1)         # noqa: F821
+                alg.addvariable('MinET2', ocut2)         # noqa: F821
+                alg.addvariable('MinDeltaEta', minDeta)  # noqa: F821
+                alg.addvariable('MaxDeltaEta', maxDeta)  # noqa: F821
+                alg.addvariable('MinDeltaPhi', minDphi)  # noqa: F821
+                alg.addvariable('MaxDeltaPhi', maxDphi)  # noqa: F821
             else:
-                alg.addgeneric('InputWidth1', nleading1)
-                alg.addgeneric('InputWidth2', nleading2)
-                alg.addgeneric('MaxTob1', nleading1)
-                alg.addgeneric('MaxTob2', nleading2)
-                alg.addvariable('DeltaEtaMin', minDeta)
-                alg.addvariable('DeltaEtaMax', maxDeta)
-                alg.addvariable('DeltaPhiMin', minDphi)
-                alg.addvariable('DeltaPhiMax', maxDphi)
-                alg.addvariable('MinET1', ocut1)
-                alg.addvariable('MinET2', ocut2)
+                alg.addgeneric('InputWidth1', nleading1) # noqa: F821
+                alg.addgeneric('InputWidth2', nleading2) # noqa: F821
+                alg.addgeneric('MaxTob1', nleading1)     # noqa: F821
+                alg.addgeneric('MaxTob2', nleading2)     # noqa: F821
+                alg.addvariable('DeltaEtaMin', minDeta)  # noqa: F821
+                alg.addvariable('DeltaEtaMax', maxDeta)  # noqa: F821
+                alg.addvariable('DeltaPhiMin', minDphi)  # noqa: F821
+                alg.addvariable('DeltaPhiMax', maxDphi)  # noqa: F821
+                alg.addvariable('MinET1', ocut1)         # noqa: F821
+                alg.addvariable('MinET2', ocut2)         # noqa: F821
             
             tm.registerAlgo(alg)
 
@@ -485,37 +478,38 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
 
-            obj1 = "%s%s%s" % (otype1, str(ocut1), olist1)
-            obj2 = "-%s%s%s" % (otype2, str(ocut2), olist2)
-            toponame = "%iDR%i-%s%s"  % (minDr, maxDr, obj1, obj2)
+            obj1 = "%s%s%s" % (otype1, str(ocut1), olist1)         # noqa: F821
+            obj2 = "-%s%s%s" % (otype2, str(ocut2), olist2)        # noqa: F821
+            toponame = "%iDR%i-%s%s"  % (minDr, maxDr, obj1, obj2) # noqa: F821
 
             log.info("Define %s" % toponame)
             
-            inputList = [otype1 + olist1] if otype1==otype2 else [otype1 + olist1, otype2 + olist2]
-            algoname = AlgConf.DeltaRSqrIncl1 if otype1==otype2 else AlgConf.DeltaRSqrIncl2
+            inputList = [otype1 + olist1] if otype1==otype2 else [otype1 + olist1, otype2 + olist2]  # noqa: F821
+            algoname = AlgConf.DeltaRSqrIncl1 if otype1==otype2 else AlgConf.DeltaRSqrIncl2          # noqa: F821
             alg = algoname( name = toponame,  inputs = inputList, outputs = [ toponame ], algoId = currentAlgoId); currentAlgoId += 1
 
                             
-            if otype1==otype2:
-                alg.addgeneric('InputWidth', inputwidth1)
-                alg.addgeneric('MaxTob', nleading1)
+            if otype1==otype2: # noqa: F821
+                alg.addgeneric('InputWidth', inputwidth1)   # noqa: F821
+                alg.addgeneric('MaxTob', nleading1)         # noqa: F821
             else:
-                alg.addgeneric('InputWidth1', inputwidth1)
-                alg.addgeneric('InputWidth2', inputwidth2) 
-                alg.addgeneric('MaxTob1', nleading1)
-                alg.addgeneric('MaxTob2', nleading2)
+                alg.addgeneric('InputWidth1', inputwidth1)  # noqa: F821
+                alg.addgeneric('InputWidth2', inputwidth2)  # noqa: F821
+                alg.addgeneric('MaxTob1', nleading1)        # noqa: F821
+                alg.addgeneric('MaxTob2', nleading2)        # noqa: F821
+
             alg.addgeneric('NumResultBits', 1)
 
-            if otype1==otype2:
-                alg.addvariable('MinET1', ocut1)
-                alg.addvariable('MinET2', ocut2)
-                alg.addvariable('DeltaRMin', minDr*minDr)
-                alg.addvariable('DeltaRMax', maxDr*maxDr)
+            if otype1==otype2:  # noqa: F821
+                alg.addvariable('MinET1', ocut1) # noqa: F821
+                alg.addvariable('MinET2', ocut2) # noqa: F821
+                alg.addvariable('DeltaRMin', minDr*minDr) # noqa: F821
+                alg.addvariable('DeltaRMax', maxDr*maxDr) # noqa: F821
             else:
-                alg.addvariable('MinET1', ocut1, 0)
-                alg.addvariable('MinET2', ocut2, 0)
-                alg.addvariable('DeltaRMin', minDr*minDr, 0)
-                alg.addvariable('DeltaRMax', maxDr*maxDr, 0)
+                alg.addvariable('MinET1', ocut1, 0) # noqa: F821
+                alg.addvariable('MinET2', ocut2, 0) # noqa: F821
+                alg.addvariable('DeltaRMin', minDr*minDr, 0) # noqa: F821
+                alg.addvariable('DeltaRMax', maxDr*maxDr, 0) # noqa: F821
                 
             tm.registerAlgo(alg)        
 
@@ -533,23 +527,23 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
                 
-            toponame = "HT%d-%s%s%s%s.ETA%s" % (minHT, otype, str(ocut), olist, str(nleading) if olist=="s" else "", str(oeta))
+            toponame = "HT%d-%s%s%s%s.ETA%s" % (minHT, otype, str(ocut), olist, str(nleading) if olist=="s" else "", str(oeta)) # noqa: F821
             
             log.info("Define %s" % toponame)
             
-            inputList = otype + olist
+            inputList = otype + olist # noqa: F821
 
             alg = AlgConf.JetHT( name = toponame, inputs = inputList, outputs = [toponame], algoId = currentAlgoId ); currentAlgoId += 1
 
 
-            alg.addgeneric('InputWidth', inputwidth)
-            alg.addgeneric('MaxTob', nleading)        
-            alg.addgeneric('NumRegisters', 2 if olist=="all" else 0)
-            alg.addgeneric('NumResultBits', 1)
-            alg.addvariable('MinET', ocut)                        
+            alg.addgeneric('InputWidth', inputwidth)   # noqa: F821
+            alg.addgeneric('MaxTob', nleading)         # noqa: F821
+            alg.addgeneric('NumRegisters', 2 if olist=="all" else 0) # noqa: F821
+            alg.addgeneric('NumResultBits', 1) # noqa: F821
+            alg.addvariable('MinET', ocut)     # noqa: F821                    
             alg.addvariable('MinEta', 0)
-            alg.addvariable('MaxEta', oeta)            
-            alg.addvariable('MinHt', minHT) 
+            alg.addvariable('MaxEta', oeta)    # noqa: F821
+            alg.addvariable('MinHt', minHT)    # noqa: F821
             tm.registerAlgo(alg)  
 
         # INVM_EM for Jpsi    
@@ -560,29 +554,29 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
 
-            inputList = otype + olist
+            inputList = otype + olist  # noqa: F821
             toponames=[]
 
-            for ocut in ocutlist:
-                toponame = "%iINVM%i-%s%s%s%s-EMs6"   % (minInvm, maxInvm, otype, str(ocut) if ocut > 0 else "", olist, str(nleading) if olist=="s" else "")
+            for ocut in ocutlist:      # noqa: F821
+                toponame = "%iINVM%i-%s%s%s%s-EMs6"   % (minInvm, maxInvm, otype, str(ocut) if ocut > 0 else "", olist, str(nleading) if olist=="s" else "")          # noqa: F821
                 toponames.append(toponame)
 
-            alg = AlgConf.InvariantMassInclusive2( name = algoname, inputs = [inputList, 'EMs'], outputs = toponames, algoId = currentAlgoId); currentAlgoId += 1    
+            alg = AlgConf.InvariantMassInclusive2( name = algoname, inputs = [inputList, 'EMs'], outputs = toponames, algoId = currentAlgoId); currentAlgoId += 1     # noqa: F821
 
 
-            alg.addgeneric('InputWidth1', inputwidth)
+            alg.addgeneric('InputWidth1', inputwidth) # noqa: F821
             #alg.addgeneric('InputWidth2', HW.InputWidthEM)
             alg.addgeneric('InputWidth2', HW.OutputWidthSortEM)
-            alg.addgeneric('MaxTob1', nleading)
+            alg.addgeneric('MaxTob1', nleading)       # noqa: F821
             #alg.addgeneric('MaxTob2', HW.InputWidthEM)
             alg.addgeneric('MaxTob2', HW.OutputWidthSortEM)
             alg.addgeneric('NumResultBits', len(toponames))
 
-            for bitid, ocut in enumerate(ocutlist):
+            for bitid, ocut in enumerate(ocutlist): # noqa: F821
                 alg.addvariable('MinET1', ocut, bitid)
                 alg.addvariable('MinET2', 0, bitid)
-                alg.addvariable('MinMSqr', (minInvm * _emscale_for_decision)*(minInvm * _emscale_for_decision), bitid)                
-                alg.addvariable('MaxMSqr', (maxInvm * _emscale_for_decision)*(maxInvm * _emscale_for_decision), bitid)
+                alg.addvariable('MinMSqr', (minInvm * _emscale_for_decision)*(minInvm * _emscale_for_decision), bitid)        # noqa: F821         
+                alg.addvariable('MaxMSqr', (maxInvm * _emscale_for_decision)*(maxInvm * _emscale_for_decision), bitid)        # noqa: F821
                 
             tm.registerAlgo(alg)
 
@@ -603,22 +597,22 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
                 
-            toponame = "%02dMINDPHI-%s%s%s%s-XE0"  % (minDPhi, otype, str(ocut) if ocut > 0 else "", olist, str(nleading) if olist=="s" else "")
+            toponame = "%02dMINDPHI-%s%s%s%s-XE0"  % (minDPhi, otype, str(ocut) if ocut > 0 else "", olist, str(nleading) if olist=="s" else "")  # noqa: F821
             log.info("Define %s" % toponame)
 
-            inputList = otype + olist
+            inputList = otype + olist  # noqa: F821
 
             alg = AlgConf.MinDeltaPhiIncl2( name = toponame, inputs = [ inputList, 'XE'], outputs = [ toponame ], algoId = currentAlgoId ); currentAlgoId += 1
 
 
-            alg.addgeneric('InputWidth1', inputwidth)
+            alg.addgeneric('InputWidth1', inputwidth)  # noqa: F821
             alg.addgeneric('InputWidth2', 1) 
-            alg.addgeneric('MaxTob1', nleading)
+            alg.addgeneric('MaxTob1', nleading)        # noqa: F821
             alg.addgeneric('MaxTob2', 1)
             alg.addgeneric('NumResultBits', 1)
-            alg.addvariable('MinET1', ocut)
+            alg.addvariable('MinET1', ocut)            # noqa: F821
             alg.addvariable('MinET2', 0)
-            alg.addvariable('DeltaPhiMin', minDPhi, 0)
+            alg.addvariable('DeltaPhiMin', minDPhi, 0) # noqa: F821
             tm.registerAlgo(alg)
 
         # W T&P MT
@@ -632,21 +626,21 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
 
-            toponame = "%iMT-%s%s%s%s-XE0"  % (minMT, otype, str(ocut) if ocut > 0 else "", olist, str(nleading) if olist=="s" else "")
+            toponame = "%iMT-%s%s%s%s-XE0"  % (minMT, otype, str(ocut) if ocut > 0 else "", olist, str(nleading) if olist=="s" else "") # noqa: F821
             log.info("Define %s" % toponame)
 
-            inputList = otype + olist
+            inputList = otype + olist  # noqa: F821
             
             alg = AlgConf.TransverseMassInclusive1( name = toponame, inputs = [ inputList, 'XE'], outputs = [ toponame ], algoId = currentAlgoId ); currentAlgoId += 1
 
 
 
             alg.addgeneric('InputWidth', HW.OutputWidthSortEM)
-            alg.addgeneric('MaxTob', str(nleading))
+            alg.addgeneric('MaxTob', str(nleading))  # noqa: F821
             alg.addgeneric('NumResultBits', 1)
-            alg.addvariable('MinET1', str(ocut))
+            alg.addvariable('MinET1', str(ocut))     # noqa: F821
             alg.addvariable('MinET2', 0)
-            alg.addvariable('MinMTSqr', minMT*minMT)                        
+            alg.addvariable('MinMTSqr', minMT*minMT) # noqa: F821                  
             tm.registerAlgo(alg)
 
             
@@ -658,24 +652,24 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
 
-            toponame = "%iDETA%i-%s%s%s%s-%s%s%s%s"  % (minDeta, maxDeta,
-                                                        otype, str(ocut1) if ocut1 > 0 else "", olist, str(nleading1) if olist=="s" else "",
-                                                        otype, str(ocut2) if ocut2 > 0 else "", olist, str(nleading2) if olist=="s" else "")
+            toponame = "%iDETA%i-%s%s%s%s-%s%s%s%s"  % (minDeta, maxDeta,  # noqa: F821
+                                                        otype, str(ocut1) if ocut1 > 0 else "", olist, str(nleading1) if olist=="s" else "", # noqa: F821
+                                                        otype, str(ocut2) if ocut2 > 0 else "", olist, str(nleading2) if olist=="s" else "") # noqa: F821
             
             log.info("Define %s" % toponame)
-            inputList = otype + olist
+            inputList = otype + olist # noqa: F821
             
             alg = AlgConf.DeltaEtaIncl1( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId ); currentAlgoId += 1
 
 
 
-            alg.addgeneric('InputWidth', inputwidth1)
-            alg.addgeneric('MaxTob', nleading2)
+            alg.addgeneric('InputWidth', inputwidth1)  # noqa: F821
+            alg.addgeneric('MaxTob', nleading2)        # noqa: F821
             alg.addgeneric('NumResultBits', 1)                        
-            alg.addvariable('MinET1', str(ocut1), 0)            
-            alg.addvariable('MinET2', str(ocut2), 0)
-            alg.addvariable('MinDeltaEta', minDeta, 0)
-            alg.addvariable('MaxDeltaEta', maxDeta, 0)
+            alg.addvariable('MinET1', str(ocut1), 0)   # noqa: F821
+            alg.addvariable('MinET2', str(ocut2), 0)   # noqa: F821
+            alg.addvariable('MinDeltaEta', minDeta, 0) # noqa: F821
+            alg.addvariable('MaxDeltaEta', maxDeta, 0) # noqa: F821
             tm.registerAlgo(alg)
             
         # ZH Trigger
@@ -693,21 +687,21 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
                 
-            toponame = "%iMINDPHI-%s%s%s%s-XE%i"  % (minDPhi, otype, str(ocut) if ocut > 0 else "", olist, str(nleading) if olist=="s" else "",ocut2)
+            toponame = "%iMINDPHI-%s%s%s%s-XE%i"  % (minDPhi, otype, str(ocut) if ocut > 0 else "", olist, str(nleading) if olist=="s" else "",ocut2) # noqa: F821
             log.info("Define %s" % toponame)
             
-            inputList = otype + olist
+            inputList = otype + olist # noqa: F821
 
             alg = AlgConf.MinDeltaPhiIncl2( name = toponame, inputs = [inputList, 'XE'], outputs = [ toponame ], algoId = currentAlgoId ); currentAlgoId += 1
 
-            alg.addgeneric('InputWidth1', inputwidth)
+            alg.addgeneric('InputWidth1', inputwidth) # noqa: F821
             alg.addgeneric('InputWidth2', 1)  
-            alg.addgeneric('MaxTob1', nleading)
+            alg.addgeneric('MaxTob1', nleading)       # noqa: F821
             alg.addgeneric('MaxTob2', 1)
             alg.addgeneric('NumResultBits', 1)
-            alg.addvariable('MinET1', ocut)
-            alg.addvariable('MinET2', ocut2)
-            alg.addvariable('DeltaPhiMin', minDPhi, 0)
+            alg.addvariable('MinET1', ocut)           # noqa: F821
+            alg.addvariable('MinET2', ocut2)          # noqa: F821
+            alg.addvariable('DeltaPhiMin', minDPhi, 0)# noqa: F821
             tm.registerAlgo(alg)
 
             
@@ -723,10 +717,10 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
 
-            toponame = "%iDR%02d-%s%s%s-%s%s%s"  % (minDr, maxDr, otype1, str(ocut1), olist1, otype2, str(ocut2), olist2)
+            toponame = "%iDR%02d-%s%s%s-%s%s%s"  % (minDr, maxDr, otype1, str(ocut1), olist1, otype2, str(ocut2), olist2) # noqa: F821
             log.info("Define %s" % toponame)
             
-            inputList = [otype1 + olist1, otype2 + olist2]
+            inputList = [otype1 + olist1, otype2 + olist2] # noqa: F821
 
             alg = AlgConf.DeltaRSqrIncl2( name = toponame, inputs = inputList, outputs = [ toponame ], algoId = currentAlgoId); currentAlgoId += 1
 
@@ -735,10 +729,10 @@ class TopoAlgoDef:
             alg.addgeneric('MaxTob1', HW.OutputWidthSelectMU)
             alg.addgeneric('MaxTob2', HW.OutputWidthSelectJET)
             alg.addgeneric('NumResultBits', 1)                        
-            alg.addvariable('MinET1', ocut1, 0)
-            alg.addvariable('MinET2', ocut2, 0)
-            alg.addvariable('DeltaRMin', minDr*minDr, 0)
-            alg.addvariable('DeltaRMax', maxDr*maxDr, 0)
+            alg.addvariable('MinET1', ocut1, 0) # noqa: F821
+            alg.addvariable('MinET2', ocut2, 0) # noqa: F821
+            alg.addvariable('DeltaRMin', minDr*minDr, 0) # noqa: F821
+            alg.addvariable('DeltaRMax', maxDr*maxDr, 0) # noqa: F821
             tm.registerAlgo(alg)
             
         # dimu INVM items
@@ -767,20 +761,20 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
 
-            obj1 = "%s%s%s%s" % ((str(mult) if mult>1 else ""), otype1, str(ocut1), olist)
-            obj2 = "-%s%s%s" % (otype2, str(ocut2), olist)
-            toponame = "%iINVM%i-%s%s%s"  % (minInvm, maxInvm, "ONEBARREL-" if onebarrel==1 else "", obj1, "" if mult>1 else obj2)
+            obj1 = "%s%s%s%s" % ((str(mult) if mult>1 else ""), otype1, str(ocut1), olist) # noqa: F821
+            obj2 = "-%s%s%s" % (otype2, str(ocut2), olist)                                 # noqa: F821
+            toponame = "%iINVM%i-%s%s%s"  % (minInvm, maxInvm, "ONEBARREL-" if onebarrel==1 else "", obj1, "" if mult>1 else obj2) # noqa: F821
 
             log.info("Define %s" % toponame)
 
 
-            inputList = [otype1 + olist] if (mult>1 or otype1==otype2) else [otype1 + olist, otype2 + olist]
-            algoname = AlgConf.InvariantMassInclusive1 if (mult>1 or otype1==otype2) else AlgConf.InvariantMassInclusive2
+            inputList = [otype1 + olist] if (mult>1 or otype1==otype2) else [otype1 + olist, otype2 + olist]              # noqa: F821
+            algoname = AlgConf.InvariantMassInclusive1 if (mult>1 or otype1==otype2) else AlgConf.InvariantMassInclusive2 # noqa: F821
             alg = algoname( name = toponame,  inputs = inputList, outputs = [ toponame ], algoId = currentAlgoId); currentAlgoId += 1
-            if (mult>1 or otype1==otype2):
+            if (mult>1 or otype1==otype2): # noqa: F821
                 alg.addgeneric('InputWidth', HW.OutputWidthSelectMU) 
                 alg.addgeneric('MaxTob', HW.OutputWidthSelectMU)
-                alg.addgeneric('RequireOneBarrel', onebarrel)
+                alg.addgeneric('RequireOneBarrel', onebarrel)  # noqa: F821
             else:
                 alg.addgeneric('InputWidth1', HW.OutputWidthSelectMU)
                 alg.addgeneric('InputWidth2', HW.OutputWidthSelectMU) 
@@ -788,10 +782,10 @@ class TopoAlgoDef:
                 alg.addgeneric('MaxTob2', HW.OutputWidthSelectMU)
 
             alg.addgeneric('NumResultBits', 1)
-            alg.addvariable('MinET1', ocut1)
-            alg.addvariable('MinET2', ocut2 if ocut2>0 else ocut1)
-            alg.addvariable('MinMSqr', minInvm * minInvm)
-            alg.addvariable('MaxMSqr', maxInvm * maxInvm)
+            alg.addvariable('MinET1', ocut1)                       # noqa: F821
+            alg.addvariable('MinET2', ocut2 if ocut2>0 else ocut1) # noqa: F821
+            alg.addvariable('MinMSqr', minInvm * minInvm)          # noqa: F821
+            alg.addvariable('MaxMSqr', maxInvm * maxInvm)          # noqa: F821
             tm.registerAlgo(alg)
 
         # dimu DR items
@@ -809,19 +803,19 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
 
-            obj1 = "%s%s%s%s" % ((str(mult) if mult>1 else ""), otype1, str(ocut1), olist)
-            obj2 = "-%s%s%s" % (otype2, str(ocut2), olist)
-            toponame = "%iDR%i-%s%s%s"  % (minDr, maxDr, "ONEBARREL-" if onebarrel==1 else "", obj1, "" if mult>1 else obj2)
+            obj1 = "%s%s%s%s" % ((str(mult) if mult>1 else ""), otype1, str(ocut1), olist) # noqa: F821
+            obj2 = "-%s%s%s" % (otype2, str(ocut2), olist)                                 # noqa: F821
+            toponame = "%iDR%i-%s%s%s"  % (minDr, maxDr, "ONEBARREL-" if onebarrel==1 else "", obj1, "" if mult>1 else obj2) # noqa: F821
 
             log.info("Define %s" % toponame)
 
-            inputList = [otype1 + olist] if (mult>1 or otype1==otype2) else [otype1 + olist, otype2 + olist]
-            algoname = AlgConf.DeltaRSqrIncl1 if (mult>1 or otype1==otype2) else AlgConf.DeltaRSqrIncl2
+            inputList = [otype1 + olist] if (mult>1 or otype1==otype2) else [otype1 + olist, otype2 + olist] # noqa: F821
+            algoname = AlgConf.DeltaRSqrIncl1 if (mult>1 or otype1==otype2) else AlgConf.DeltaRSqrIncl2      # noqa: F821
             alg = algoname( name = toponame,  inputs = inputList, outputs = [ toponame ], algoId = currentAlgoId); currentAlgoId += 1
-            if (mult>1 or otype1==otype2):
+            if (mult>1 or otype1==otype2): # noqa: F821
                 alg.addgeneric('InputWidth', HW.OutputWidthSelectMU)
                 alg.addgeneric('MaxTob', HW.OutputWidthSelectMU)
-                alg.addgeneric('RequireOneBarrel', onebarrel)
+                alg.addgeneric('RequireOneBarrel', onebarrel) # noqa: F821
             else:
                 alg.addgeneric('InputWidth1', HW.OutputWidthSelectMU)
                 alg.addgeneric('InputWidth2', HW.OutputWidthSelectMU) 
@@ -830,10 +824,10 @@ class TopoAlgoDef:
 
 
             alg.addgeneric('NumResultBits', 1)
-            alg.addvariable('MinET1', ocut1)
-            alg.addvariable('MinET2', ocut2)
-            alg.addvariable('DeltaRMin', minDr*minDr)
-            alg.addvariable('DeltaRMax', maxDr*maxDr)
+            alg.addvariable('MinET1', ocut1) # noqa: F821
+            alg.addvariable('MinET2', ocut2) # noqa: F821
+            alg.addvariable('DeltaRMin', minDr*minDr) # noqa: F821
+            alg.addvariable('DeltaRMax', maxDr*maxDr) # noqa: F821
             tm.registerAlgo(alg)
 
 
@@ -853,38 +847,38 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
 
-            obj1 = "%s%s%s%s" % ((str(mult) if mult>1 else ""), otype1, str(ocut1), olist1)
-            obj2 = "-%s%s%s" % (otype2, str(ocut2) if ocut2>0 else "", olist2)
-            toponame = "%sDETA%s-%sDPHI%s-%s%s"  % (minDeta, maxDeta, minDphi, maxDphi, obj1, "" if mult>1 else obj2)
+            obj1 = "%s%s%s%s" % ((str(mult) if mult>1 else ""), otype1, str(ocut1), olist1) # noqa: F821
+            obj2 = "-%s%s%s" % (otype2, str(ocut2) if ocut2>0 else "", olist2) # noqa: F821
+            toponame = "%sDETA%s-%sDPHI%s-%s%s"  % (minDeta, maxDeta, minDphi, maxDphi, obj1, "" if mult>1 else obj2) # noqa: F821
             
             log.info("Define %s" % toponame)
             
-            inputList = [otype1 + olist1] if (mult>1 or otype1==otype2) else [otype1 + olist1, otype2 + olist2]
-            algoname = AlgConf.DeltaEtaPhiIncl1 if (mult>1 or otype1==otype2) else AlgConf.DeltaEtaPhiIncl2
+            inputList = [otype1 + olist1] if (mult>1 or otype1==otype2) else [otype1 + olist1, otype2 + olist2] # noqa: F821
+            algoname = AlgConf.DeltaEtaPhiIncl1 if (mult>1 or otype1==otype2) else AlgConf.DeltaEtaPhiIncl2 # noqa: F821
             
             alg = algoname( name = toponame, inputs = inputList, outputs = [ toponame ], algoId = currentAlgoId); currentAlgoId += 1
             alg.addgeneric('NumResultBits', 1)                        
             
-            if (mult>1 or otype1==otype2):
-                alg.addgeneric('InputWidth', nleading1)
-                alg.addgeneric('MaxTob', nleading1)
-                alg.addvariable('MinET1', ocut1, 0)
-                alg.addvariable('MinET2', ocut2, 0)
-                alg.addvariable('MinDeltaEta', minDeta, 0)
-                alg.addvariable('MaxDeltaEta', maxDeta, 0)
-                alg.addvariable('MinDeltaPhi', minDphi, 0)
-                alg.addvariable('MaxDeltaPhi', maxDphi, 0)
+            if (mult>1 or otype1==otype2):                 # noqa: F821
+                alg.addgeneric('InputWidth', nleading1)    # noqa: F821
+                alg.addgeneric('MaxTob', nleading1)        # noqa: F821
+                alg.addvariable('MinET1', ocut1, 0)        # noqa: F821
+                alg.addvariable('MinET2', ocut2, 0)        # noqa: F821
+                alg.addvariable('MinDeltaEta', minDeta, 0) # noqa: F821
+                alg.addvariable('MaxDeltaEta', maxDeta, 0) # noqa: F821
+                alg.addvariable('MinDeltaPhi', minDphi, 0) # noqa: F821
+                alg.addvariable('MaxDeltaPhi', maxDphi, 0) # noqa: F821
             else:
-                alg.addgeneric('InputWidth1', nleading1)
-                alg.addgeneric('InputWidth2', nleading2)
-                alg.addgeneric('MaxTob1', nleading1)
-                alg.addgeneric('MaxTob2', nleading2)
-                alg.addvariable('MinET1', ocut1, 0)
-                alg.addvariable('MinET2', ocut2, 0)
-                alg.addvariable('DeltaEtaMin', minDeta, 0)
-                alg.addvariable('DeltaEtaMax', maxDeta, 0)
-                alg.addvariable('DeltaPhiMin', minDphi, 0)
-                alg.addvariable('DeltaPhiMax', maxDphi, 0)
+                alg.addgeneric('InputWidth1', nleading1)   # noqa: F821
+                alg.addgeneric('InputWidth2', nleading2)   # noqa: F821
+                alg.addgeneric('MaxTob1', nleading1)       # noqa: F821
+                alg.addgeneric('MaxTob2', nleading2)       # noqa: F821
+                alg.addvariable('MinET1', ocut1, 0)        # noqa: F821
+                alg.addvariable('MinET2', ocut2, 0)        # noqa: F821
+                alg.addvariable('DeltaEtaMin', minDeta, 0) # noqa: F821
+                alg.addvariable('DeltaEtaMax', maxDeta, 0) # noqa: F821
+                alg.addvariable('DeltaPhiMin', minDphi, 0) # noqa: F821
+                alg.addvariable('DeltaPhiMax', maxDphi, 0) # noqa: F821
 
             
             tm.registerAlgo(alg)
@@ -903,22 +897,22 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
 
-            toponame = "%sDETA%s-%s%s%s-%s%s%s"  % (minDeta, maxDeta, otype1, str(ocut1), olist1, otype2, str(ocut2) if ocut2>0 else "", olist2)
+            toponame = "%sDETA%s-%s%s%s-%s%s%s"  % (minDeta, maxDeta, otype1, str(ocut1), olist1, otype2, str(ocut2) if ocut2>0 else "", olist2) # noqa: F821
  
             log.info("Define %s" % toponame)
 
-            inputList = [otype1 + olist1, otype2 + olist2]
+            inputList = [otype1 + olist1, otype2 + olist2] # noqa: F821
             alg = AlgConf.DeltaEtaIncl2( name = toponame, inputs = inputList, outputs = [ toponame ], algoId = currentAlgoId); currentAlgoId += 1
             alg.addgeneric('NumResultBits', 1)
 
-            alg.addgeneric('InputWidth1', nleading1)
-            alg.addgeneric('InputWidth2', nleading2)
-            alg.addgeneric('MaxTob1', nleading1)
-            alg.addgeneric('MaxTob2', nleading2)
-            alg.addvariable('MinET1', ocut1, 0)
-            alg.addvariable('MinET2', ocut2, 0)
-            alg.addvariable('MinDeltaEta', minDeta, 0)
-            alg.addvariable('MaxDeltaEta', maxDeta, 0)
+            alg.addgeneric('InputWidth1', nleading1)   # noqa: F821
+            alg.addgeneric('InputWidth2', nleading2)   # noqa: F821
+            alg.addgeneric('MaxTob1', nleading1)       # noqa: F821
+            alg.addgeneric('MaxTob2', nleading2)       # noqa: F821
+            alg.addvariable('MinET1', ocut1, 0)        # noqa: F821
+            alg.addvariable('MinET2', ocut2, 0)        # noqa: F821
+            alg.addvariable('MinDeltaEta', minDeta, 0) # noqa: F821
+            alg.addvariable('MaxDeltaEta', maxDeta, 0) # noqa: F821
 
             tm.registerAlgo(alg)
 
@@ -935,22 +929,22 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
             
-            toponame = "%sDPHI%s-%s%s%s-%s%s%s"  % (minDphi, maxDphi, otype1, str(ocut1), olist1, otype2, str(ocut2) if ocut2>0 else "", olist2)
+            toponame = "%sDPHI%s-%s%s%s-%s%s%s"  % (minDphi, maxDphi, otype1, str(ocut1), olist1, otype2, str(ocut2) if ocut2>0 else "", olist2) # noqa: F821
  
             log.info("Define %s" % toponame)
 
-            inputList = [otype1 + olist1, otype2 + olist2]
+            inputList = [otype1 + olist1, otype2 + olist2] # noqa: F821
             alg = AlgConf.DeltaPhiIncl2( name = toponame, inputs = inputList, outputs = [ toponame ], algoId = currentAlgoId); currentAlgoId += 1
             alg.addgeneric('NumResultBits', 1)
             
-            alg.addgeneric('InputWidth1', nleading1)
-            alg.addgeneric('InputWidth2', nleading2)
-            alg.addgeneric('MaxTob1', nleading1)
-            alg.addgeneric('MaxTob2', nleading2)
-            alg.addvariable('MinET1', ocut1, 0)
-            alg.addvariable('MinET2', ocut2, 0)
-            alg.addvariable('MinDeltaPhi', minDphi, 0)
-            alg.addvariable('MaxDeltaPhi', maxDphi, 0)
+            alg.addgeneric('InputWidth1', nleading1)   # noqa: F821
+            alg.addgeneric('InputWidth2', nleading2)   # noqa: F821
+            alg.addgeneric('MaxTob1', nleading1)       # noqa: F821
+            alg.addgeneric('MaxTob2', nleading2)       # noqa: F821
+            alg.addvariable('MinET1', ocut1, 0)        # noqa: F821
+            alg.addvariable('MinET2', ocut2, 0)        # noqa: F821
+            alg.addvariable('MinDeltaPhi', minDphi, 0) # noqa: F821
+            alg.addvariable('MaxDeltaPhi', maxDphi, 0) # noqa: F821
 
             tm.registerAlgo(alg)
 
@@ -1017,7 +1011,7 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
                 
-            toponame = "%02d%s-XE0-HT0-AJj%sall.ETA49"  % (minRatio, Ratio, str(ocut))
+            toponame = "%02d%s-XE0-HT0-AJj%sall.ETA49"  % (minRatio, Ratio, str(ocut)) # noqa: F821
             log.info("Define %s" % toponame)
             
             alg = AlgConf.Ratio( name = toponame, inputs = ['XE', 'AJjall'], outputs = [ toponame ], algoId = currentAlgoId ) 
@@ -1027,13 +1021,13 @@ class TopoAlgoDef:
             alg.addgeneric('MaxTob1', 1)
             alg.addgeneric('MaxTob2', HW.InputWidthJET)
             alg.addgeneric('NumResultBits', 1)
-            alg.addgeneric('isXE2', 1 if Ratio=="RATIO2" else 0)
-            alg.addvariable('MinET2', str(ocut))
+            alg.addgeneric('isXE2', 1 if Ratio=="RATIO2" else 0)   # noqa: F821
+            alg.addvariable('MinET2', str(ocut)) # noqa: F821
             alg.addvariable('EtaMin', 0)
             alg.addvariable('EtaMax', 49)
             alg.addvariable('MinET1', 0)                        
             alg.addvariable('HT', 0)
-            alg.addvariable('Ratio', str(minRatio))
+            alg.addvariable('Ratio', str(minRatio)) # noqa: F821
             tm.registerAlgo(alg)
 
             
@@ -1076,16 +1070,16 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
                 
-            toponame = "MULT-%s%s%s" % (otype1, str(ocut1), olist1)
+            toponame = "MULT-%s%s%s" % (otype1, str(ocut1), olist1) # noqa: F821
             toponames = [toponame+"[0]", toponame+"[1]"]
             log.info("Define %s" % toponames)
             
-            inputList = [otype1 + olist1] 
+            inputList = [otype1 + olist1]  # noqa: F821
             alg = AlgConf.Multiplicity( name = toponame,  inputs = inputList, outputs = toponames, algoId = currentAlgoId); currentAlgoId += 1
             
-            alg.addgeneric('InputWidth', inputwidth1)
+            alg.addgeneric('InputWidth', inputwidth1) # noqa: F821
             alg.addgeneric('NumResultBits', 2)
-            alg.addvariable('MinET', ocut1-1) # for MU threshold -1 
+            alg.addvariable('MinET', ocut1-1) # for MU threshold -1   # noqa: F821
             tm.registerAlgo(alg)        
             
         
@@ -1100,24 +1094,24 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
 
-            obj1 = "%s%s%s"  % (otype1, str(ocut1), olist1)
-            obj2 = "-%s%s%s" % (otype2, str(ocut2), olist2)
-            toponame = "%sDISAMB-%s%s"  % ( disamb if disamb>0 else "", obj1, obj2)
+            obj1 = "%s%s%s"  % (otype1, str(ocut1), olist1) # noqa: F821
+            obj2 = "-%s%s%s" % (otype2, str(ocut2), olist2) # noqa: F821
+            toponame = "%sDISAMB-%s%s"  % ( disamb if disamb>0 else "", obj1, obj2) # noqa: F821
             
             log.info("Define %s" % toponame)
             
-            inputList = [otype1 + olist1, otype2 + olist2]
+            inputList = [otype1 + olist1, otype2 + olist2] # noqa: F821
             alg = AlgConf.DisambiguationIncl2( name = toponame, inputs = inputList, outputs = [ toponame ], algoId = currentAlgoId); currentAlgoId += 1
-            alg.addgeneric('InputWidth1', nleading1 if olist1.find("ab")>=0 else -1000)
-            alg.addgeneric('InputWidth2', nleading2 if olist2.find("ab")>=0 else -1000) 
-            alg.addgeneric('MaxTob1', nleading1)
-            alg.addgeneric('MaxTob2', nleading2)
+            alg.addgeneric('InputWidth1', nleading1 if olist1.find("ab")>=0 else -1000) # noqa: F821
+            alg.addgeneric('InputWidth2', nleading2 if olist2.find("ab")>=0 else -1000)  # noqa: F821
+            alg.addgeneric('MaxTob1', nleading1) # noqa: F821
+            alg.addgeneric('MaxTob2', nleading2) # noqa: F821
             alg.addgeneric('NumResultBits', 1)
-            alg.addgeneric('ClusterOnly', 1 if (otype1=="EM" and otype2=="TAU") or (otype1=="TAU" and otype2=="EM") else 0 )
+            alg.addgeneric('ClusterOnly', 1 if (otype1=="EM" and otype2=="TAU") or (otype1=="TAU" and otype2=="EM") else 0 ) # noqa: F821
             alg.addgeneric('ApplyDR', 0)
-            alg.addvariable('MinET1', ocut1)
-            alg.addvariable('MinET2', ocut2)
-            alg.addvariable('DisambDRSqrMin', disamb*disamb)
+            alg.addvariable('MinET1', ocut1) # noqa: F821
+            alg.addvariable('MinET2', ocut2) # noqa: F821
+            alg.addvariable('DisambDRSqrMin', disamb*disamb) # noqa: F821
             tm.registerAlgo(alg)
         
         # DISAMB 3 lists
@@ -1129,27 +1123,27 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
 
-            obj1 = "%s%s%s"  % (otype1, str(ocut1), olist1.replace('shi','his') + (str(nleading1) if olist1.find('s')>=0 else ""))
-            obj2 = "-%s%s%s" % (otype2, str(ocut2), olist2.replace('shi','his') + (str(nleading2) if olist2.find('s')>=0 else ""))
-            obj3 = "-%s%s%s" % (otype3, str(ocut3), olist3)
-            toponame = "%sDISAMB-%s%s%s"  % ( disamb if disamb>0 else "", obj1, obj2, obj3)
+            obj1 = "%s%s%s"  % (otype1, str(ocut1), olist1.replace('shi','his') + (str(nleading1) if olist1.find('s')>=0 else "")) # noqa: F821
+            obj2 = "-%s%s%s" % (otype2, str(ocut2), olist2.replace('shi','his') + (str(nleading2) if olist2.find('s')>=0 else "")) # noqa: F821
+            obj3 = "-%s%s%s" % (otype3, str(ocut3), olist3) # noqa: F821
+            toponame = "%sDISAMB-%s%s%s"  % ( disamb if disamb>0 else "", obj1, obj2, obj3) # noqa: F821
             
             log.info("Define %s" % toponame)
             
-            inputList = [otype1 + olist1, otype2 + olist2, otype3 + olist3]
+            inputList = [otype1 + olist1, otype2 + olist2, otype3 + olist3] # noqa: F821
             alg = AlgConf.DisambiguationIncl3( name = toponame, inputs = inputList, outputs = [ toponame ], algoId = currentAlgoId); currentAlgoId += 1
-            alg.addgeneric('InputWidth1', inputwidth1)
-            alg.addgeneric('InputWidth2', inputwidth2)
-            alg.addgeneric('InputWidth3', inputwidth3)
-            alg.addgeneric('MaxTob1', nleading1)
-            alg.addgeneric('MaxTob2', nleading2)
-            alg.addgeneric('MaxTob3', nleading3)
+            alg.addgeneric('InputWidth1', inputwidth1) # noqa: F821
+            alg.addgeneric('InputWidth2', inputwidth2) # noqa: F821
+            alg.addgeneric('InputWidth3', inputwidth3) # noqa: F821
+            alg.addgeneric('MaxTob1', nleading1) # noqa: F821
+            alg.addgeneric('MaxTob2', nleading2) # noqa: F821
+            alg.addgeneric('MaxTob3', nleading3) # noqa: F821
             alg.addgeneric('NumResultBits', 1)
             alg.addgeneric('ApplyDR', 0)
-            alg.addvariable('MinET1', ocut1, 0)
-            alg.addvariable('MinET2', ocut2, 0)
-            alg.addvariable('MinET3', ocut3, 0)
-            alg.addvariable('DisambDRSqr', disamb*disamb, 0) # DisambDR
+            alg.addvariable('MinET1', ocut1, 0) # noqa: F821
+            alg.addvariable('MinET2', ocut2, 0) # noqa: F821
+            alg.addvariable('MinET3', ocut3, 0) # noqa: F821
+            alg.addvariable('DisambDRSqr', disamb*disamb, 0) # DisambDR # noqa: F821
             tm.registerAlgo(alg)         
 
         # DISAMB 3 lists with DR cut to 2nd and 3rd lists
@@ -1165,28 +1159,28 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
 
-            obj1 = "-%s%s%s"  % (otype1, str(ocut1), olist1.replace('shi','his') + (str(nleading1) if olist1.find('s')>=0 else ""))
-            obj2 = "-%s%s%s" % (otype2, str(ocut2), olist2.replace('shi','his') + (str(nleading2) if olist2.find('s')>=0 else ""))
-            obj3 = "%s%s%s" % (otype3, str(ocut3), olist3)
-            toponame = "%sDISAMB-%s-%dDR%d%s%s"  % ( str(disamb) if disamb>0 else "", obj3, drcutmin, drcutmax, obj1, obj2)
+            obj1 = "-%s%s%s"  % (otype1, str(ocut1), olist1.replace('shi','his') + (str(nleading1) if olist1.find('s')>=0 else ""))  # noqa: F821
+            obj2 = "-%s%s%s" % (otype2, str(ocut2), olist2.replace('shi','his') + (str(nleading2) if olist2.find('s')>=0 else "")) # noqa: F821
+            obj3 = "%s%s%s" % (otype3, str(ocut3), olist3) # noqa: F821
+            toponame = "%sDISAMB-%s-%dDR%d%s%s"  % ( str(disamb) if disamb>0 else "", obj3, drcutmin, drcutmax, obj1, obj2)  # noqa: F821
 
             log.info("Define %s" % toponame)
             
-            inputList = [otype1 + olist1, otype2 + olist2, otype3 + olist3]
+            inputList = [otype1 + olist1, otype2 + olist2, otype3 + olist3]  # noqa: F821
             alg = AlgConf.DisambiguationDRIncl3( name = toponame, inputs = inputList, outputs = [ toponame ], algoId = currentAlgoId); currentAlgoId += 1
-            alg.addgeneric('InputWidth1', inputwidth1)
-            alg.addgeneric('InputWidth2', inputwidth2)
-            alg.addgeneric('InputWidth3', inputwidth3)
-            alg.addgeneric('MaxTob1', nleading1)
-            alg.addgeneric('MaxTob2', nleading2)
-            alg.addgeneric('MaxTob3', nleading3)
+            alg.addgeneric('InputWidth1', inputwidth1) # noqa: F821
+            alg.addgeneric('InputWidth2', inputwidth2) # noqa: F821
+            alg.addgeneric('InputWidth3', inputwidth3) # noqa: F821
+            alg.addgeneric('MaxTob1', nleading1) # noqa: F821
+            alg.addgeneric('MaxTob2', nleading2) # noqa: F821
+            alg.addgeneric('MaxTob3', nleading3) # noqa: F821
             alg.addgeneric('NumResultBits', 1)
-            alg.addvariable('MinET1', ocut1, 0)
-            alg.addvariable('MinET2', ocut2, 0)
-            alg.addvariable('MinET3', ocut3, 0)
-            alg.addvariable('DisambDRSqrMin', drcutmin*drcutmin, 0)
-            alg.addvariable('DisambDRSqrMax', drcutmax*drcutmax, 0)
-            alg.addvariable('DisambDRSqr', disamb*disamb, 0)
+            alg.addvariable('MinET1', ocut1, 0) # noqa: F821
+            alg.addvariable('MinET2', ocut2, 0) # noqa: F821
+            alg.addvariable('MinET3', ocut3, 0) # noqa: F821
+            alg.addvariable('DisambDRSqrMin', drcutmin*drcutmin, 0) # noqa: F821
+            alg.addvariable('DisambDRSqrMax', drcutmax*drcutmax, 0) # noqa: F821
+            alg.addvariable('DisambDRSqr', disamb*disamb, 0) # noqa: F821
             tm.registerAlgo(alg)            
 
 
@@ -1199,21 +1193,21 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
 
-            toponame = "LAR-%s%ss1"  % ( otype, str(ocut) if not otype=="EM" else "50" )
+            toponame = "LAR-%s%ss1"  % ( otype, str(ocut) if not otype=="EM" else "50" )  # noqa: F821
             
             log.info("Define %s" % toponame)
             
-            inputList = otype + 's'
+            inputList = otype + 's'  # noqa: F821
             
             alg = AlgConf.LAr( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId ); currentAlgoId += 1
-            alg.addgeneric('InputWidth', inputwidth) 
+            alg.addgeneric('InputWidth', inputwidth)  # noqa: F821
             alg.addgeneric('MaxTob', 1)
             alg.addgeneric('NumResultBits', 1)
-            alg.addvariable('MinET', str(ocut))
-            alg.addvariable('EtaMin', minEta)
-            alg.addvariable('EtaMax', maxEta)
-            alg.addvariable('PhiMin', minPhi)
-            alg.addvariable('PhiMax', maxPhi)
+            alg.addvariable('MinET', str(ocut)) # noqa: F821
+            alg.addvariable('EtaMin', minEta) # noqa: F821
+            alg.addvariable('EtaMax', maxEta) # noqa: F821
+            alg.addvariable('PhiMin', minPhi) # noqa: F821
+            alg.addvariable('PhiMax', maxPhi) # noqa: F821
             tm.registerAlgo(alg)
 
 
@@ -1232,14 +1226,14 @@ class TopoAlgoDef:
             inputList = ['XENoSort', 'AJall']
             toponames=[]
 
-            for minxe in Threlist:
+            for minxe in Threlist:  # noqa: F821
                 toponames.append("KF-XE%s-AJall"  % (minxe))
             
             alg = AlgConf.KalmanMETCorrection( name = "KF-XE-AJall", inputs = inputList, outputs = toponames, algoId = currentAlgoId ); currentAlgoId += 1
             alg.addgeneric('InputWidth', HW.InputWidthJET)
             alg.addgeneric('NumResultBits', len(toponames))
             alg.addvariable('MinET', 0)
-            for bitid,minxe in enumerate(Threlist):
+            for bitid,minxe in enumerate(Threlist):  # noqa: F821
                 alg.addvariable('KFXE', str(minxe), bitid)
             
             tm.registerAlgo(alg)
@@ -1256,22 +1250,22 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
                 
-            toponame = "%02dMINDPHI-%s%s%s%s-XE0"  % (minDPhi, otype, str(ocut) if ocut > 0 else "", olist, str(nleading) if olist=="s" else "")
+            toponame = "%02dMINDPHI-%s%s%s%s-XE0"  % (minDPhi, otype, str(ocut) if ocut > 0 else "", olist, str(nleading) if olist=="s" else "")  # noqa: F821
             log.info("Define %s" % toponame)
 
-            inputList = otype + olist
+            inputList = otype + olist  # noqa: F821
 
             alg = AlgConf.MinDeltaPhiIncl2( name = toponame, inputs = [ inputList, 'XE'], outputs = [ toponame ], algoId = currentAlgoId ); currentAlgoId += 1
 
 
-            alg.addgeneric('InputWidth1', inputwidth)
+            alg.addgeneric('InputWidth1', inputwidth) # noqa: F821
             alg.addgeneric('InputWidth2', 1) 
-            alg.addgeneric('MaxTob1', nleading)
+            alg.addgeneric('MaxTob1', nleading) # noqa: F821
             alg.addgeneric('MaxTob2', 1)
             alg.addgeneric('NumResultBits', 1)
-            alg.addvariable('MinET1', ocut)
+            alg.addvariable('MinET1', ocut) # noqa: F821
             alg.addvariable('MinET2', 0)
-            alg.addvariable('DeltaPhiMin', minDPhi, 0)
+            alg.addvariable('DeltaPhiMin', minDPhi, 0)  # noqa: F821
             tm.registerAlgo(alg)
 
             
@@ -1284,21 +1278,21 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
 
-            toponame = "%iMT-%s%s%s%s-XE0"  % (minMT, otype, str(ocut) if ocut > 0 else "", olist, str(nleading) if olist=="s" else "")
+            toponame = "%iMT-%s%s%s%s-XE0"  % (minMT, otype, str(ocut) if ocut > 0 else "", olist, str(nleading) if olist=="s" else "")  # noqa: F821
             log.info("Define %s" % toponame)
 
-            inputList = otype + olist
+            inputList = otype + olist  # noqa: F821
             
             alg = AlgConf.TransverseMassInclusive1( name = toponame, inputs = [ inputList, 'XE'], outputs = [ toponame ], algoId = currentAlgoId ); currentAlgoId += 1
 
 
 
             alg.addgeneric('InputWidth', HW.OutputWidthSortEM)
-            alg.addgeneric('MaxTob', str(nleading))
+            alg.addgeneric('MaxTob', str(nleading)) # noqa: F821
             alg.addgeneric('NumResultBits', 1)
-            alg.addvariable('MinET1', str(ocut))
+            alg.addvariable('MinET1', str(ocut)) # noqa: F821
             alg.addvariable('MinET2', 0)
-            alg.addvariable('MinMTSqr', minMT*minMT)                        
+            alg.addvariable('MinMTSqr', minMT*minMT) # noqa: F821
             tm.registerAlgo(alg)
             
         # DISAMB 2 lists with DR cut between objects in two lists
@@ -1310,23 +1304,23 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
 
-            obj1 = "-%s%s%s"  % (otype1, str(ocut1), olist1.replace('shi','his') + (str(nleading1) if olist1.find('s')>=0 else ""))
-            obj2 = "-%s%s%s" % (otype2, str(ocut2), olist2.replace('shi','his') + (str(nleading2) if olist2.find('s')>=0 else ""))
-            toponame = "%sDISAMB-%dDR%d%s%s"  % ( str(disamb) if disamb>0 else "", drcutmin, drcutmax, obj1, obj2)
+            obj1 = "-%s%s%s"  % (otype1, str(ocut1), olist1.replace('shi','his') + (str(nleading1) if olist1.find('s')>=0 else "")) # noqa: F821
+            obj2 = "-%s%s%s" % (otype2, str(ocut2), olist2.replace('shi','his') + (str(nleading2) if olist2.find('s')>=0 else "")) # noqa: F821
+            toponame = "%sDISAMB-%dDR%d%s%s"  % ( str(disamb) if disamb>0 else "", drcutmin, drcutmax, obj1, obj2) # noqa: F821
 
             log.info("Define %s" % toponame)
 
-            inputList = [otype1 + olist1, otype2 + olist2]
+            inputList = [otype1 + olist1, otype2 + olist2] # noqa: F821
             alg = AlgConf.DisambiguationDRIncl2( name = toponame, inputs = inputList, outputs = [ toponame ], algoId = currentAlgoId); currentAlgoId += 1
-            alg.addgeneric('InputWidth1', inputwidth1)
-            alg.addgeneric('InputWidth2', inputwidth2)
-            alg.addgeneric('MaxTob1', nleading1)
-            alg.addgeneric('MaxTob2', nleading2)
+            alg.addgeneric('InputWidth1', inputwidth1) # noqa: F821
+            alg.addgeneric('InputWidth2', inputwidth2) # noqa: F821
+            alg.addgeneric('MaxTob1', nleading1) # noqa: F821
+            alg.addgeneric('MaxTob2', nleading2) # noqa: F821
             alg.addgeneric('NumResultBits', 1)
-            alg.addvariable('MinET1', ocut1, 0)
-            alg.addvariable('MinET2', ocut2, 0)
-            alg.addvariable('DisambDRSqrMin', drcutmin*drcutmin, 0)
-            alg.addvariable('DisambDRSqrMax', drcutmax*drcutmax, 0)
+            alg.addvariable('MinET1', ocut1, 0) # noqa: F821
+            alg.addvariable('MinET2', ocut2, 0) # noqa: F821
+            alg.addvariable('DisambDRSqrMin', drcutmin*drcutmin, 0) # noqa: F821
+            alg.addvariable('DisambDRSqrMax', drcutmax*drcutmax, 0) # noqa: F821
             tm.registerAlgo(alg)   
 
         # ZH Trigger
@@ -1339,21 +1333,21 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
                 
-            toponame = "%iMINDPHI-%s%s%s%s-XE50"  % (minDPhi, otype, str(ocut) if ocut > 0 else "", olist, str(nleading) if olist=="s" else "")
+            toponame = "%iMINDPHI-%s%s%s%s-XE50"  % (minDPhi, otype, str(ocut) if ocut > 0 else "", olist, str(nleading) if olist=="s" else "") # noqa: F821
             log.info("Define %s" % toponame)
             
-            inputList = otype + olist
+            inputList = otype + olist # noqa: F821
 
             alg = AlgConf.MinDeltaPhiIncl2( name = toponame, inputs = [inputList, 'XE'], outputs = [ toponame ], algoId = currentAlgoId ); currentAlgoId += 1
 
-            alg.addgeneric('InputWidth1', inputwidth)
+            alg.addgeneric('InputWidth1', inputwidth) # noqa: F821
             alg.addgeneric('InputWidth2', 1)  
-            alg.addgeneric('MaxTob1', nleading)
+            alg.addgeneric('MaxTob1', nleading) # noqa: F821
             alg.addgeneric('MaxTob2', 1)
             alg.addgeneric('NumResultBits', 1)
-            alg.addvariable('MinET1', ocut)
+            alg.addvariable('MinET1', ocut) # noqa: F821
             alg.addvariable('MinET2', 50)
-            alg.addvariable('DeltaPhiMin', minDPhi, 0)
+            alg.addvariable('DeltaPhiMin', minDPhi, 0)  # noqa: F821
             tm.registerAlgo(alg)
                 
         # LATE MUON
@@ -1365,17 +1359,17 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
 
-            toponame = "%s%ss1"  % ( otype, str(ocut) )
+            toponame = "%s%ss1"  % ( otype, str(ocut) ) # noqa: F821
 
             log.info("Define %s" % toponame)
 
             inputList = 'LMUs'
 
             alg = AlgConf.EtCut( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId ); currentAlgoId += 1
-            alg.addgeneric('InputWidth', inputwidth) 
+            alg.addgeneric('InputWidth', inputwidth)  # noqa: F821
             alg.addgeneric('MaxTob', 1)
             alg.addgeneric('NumResultBits', 1)
-            alg.addvariable('MinET', str(ocut))
+            alg.addvariable('MinET', str(ocut)) # noqa: F821
             tm.registerAlgo(alg)
             
 
@@ -1388,18 +1382,18 @@ class TopoAlgoDef:
             for k in x:
                 exec("%s = x[k]" % k)
 
-            toponame = "SC%d-%s%s%s%s.ETA%s" % (minHT, otype, str(ocut), olist, str(nleading) if olist=="s" else "", str(oeta))
+            toponame = "SC%d-%s%s%s%s.ETA%s" % (minHT, otype, str(ocut), olist, str(nleading) if olist=="s" else "", str(oeta)) # noqa: F821
 
             log.info("Define %s" % toponame)
 
-            inputList = otype + olist
+            inputList = otype + olist # noqa: F821
 
             alg = AlgConf.SimpleCone( name = toponame, inputs = inputList, outputs = [toponame], algoId = currentAlgoId ); currentAlgoId += 1
 
 
-            alg.addgeneric('InputWidth', inputwidth)
-            alg.addvariable('MinET', ocut)                        
-            alg.addvariable('MinSumET', minHT)
+            alg.addgeneric('InputWidth', inputwidth) # noqa: F821
+            alg.addvariable('MinET', ocut)           # noqa: F821       
+            alg.addvariable('MinSumET', minHT)       # noqa: F821
             alg.addvariable('MaxRSqr', 10*10)                        
             tm.registerAlgo(alg)  
 
@@ -1412,25 +1406,25 @@ class TopoAlgoDef:
                 for k in x:
                     exec("%s = x[k]" % k)
 
-                obj1 = "%s%s%s"  % (otype1, str(ocut1), olist1.replace('shi','his') + (str(nleading1) if olist1.find('s')>=0 else ""))
-                obj2 = "-%s%s%s" % (otype2, str(ocut2), olist2)
-                toponame = "%sDISAMB-%iINVM%s-%s%s"  % ( disamb if disamb>0 else "", minInvm, str(maxInvm) if maxInvm<9999 else "", obj1, obj2)          
+                obj1 = "%s%s%s"  % (otype1, str(ocut1), olist1.replace('shi','his') + (str(nleading1) if olist1.find('s')>=0 else "")) # noqa: F821
+                obj2 = "-%s%s%s" % (otype2, str(ocut2), olist2) # noqa: F821
+                toponame = "%sDISAMB-%iINVM%s-%s%s"  % ( disamb if disamb>0 else "", minInvm, str(maxInvm) if maxInvm<9999 else "", obj1, obj2)       # noqa: F821    
 
                 log.info("Define %s" % toponame)
-                inputList = [otype1 + olist1, otype2 + olist2]               
+                inputList = [otype1 + olist1, otype2 + olist2]      # noqa: F821         
                 #alg = AlgConf.DisambiguationInvariantMass2( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId); currentAlgoId += 1
                 alg = AlgConf.DisambiguationInvmIncl2( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId); currentAlgoId += 1
 
-                alg.addgeneric('InputWidth1', inputwidth1)
-                alg.addgeneric('InputWidth2', inputwidth2)
-                alg.addgeneric('MaxTob1', nleading1)
-                alg.addgeneric('MaxTob2', nleading2)
+                alg.addgeneric('InputWidth1', inputwidth1) # noqa: F821
+                alg.addgeneric('InputWidth2', inputwidth2) # noqa: F821
+                alg.addgeneric('MaxTob1', nleading1) # noqa: F821
+                alg.addgeneric('MaxTob2', nleading2) # noqa: F821
                 alg.addgeneric('NumResultBits', 1)
             
-                alg.addvariable('MinET1', ocut1)
-                alg.addvariable('MinET2', ocut2)
-                alg.addvariable('MinMSqr', minInvm * minInvm)
-                alg.addvariable('MaxMSqr', maxInvm * maxInvm)
+                alg.addvariable('MinET1', ocut1) # noqa: F821
+                alg.addvariable('MinET2', ocut2) # noqa: F821
+                alg.addvariable('MinMSqr', minInvm * minInvm) # noqa: F821
+                alg.addvariable('MaxMSqr', maxInvm * maxInvm) # noqa: F821
                 
                 tm.registerAlgo(alg)
 
@@ -1442,31 +1436,31 @@ class TopoAlgoDef:
                 for k in x:
                     exec("%s = x[k]" % k)
 
-                obj1 = "%s%s%s.%sETA%i"  % (otype1, str(ocut1), olist1 + (str(nleading1) if olist1.find('s')>=0 else ""),str(minEta1) if minEta1>0 else "", maxEta1)
-                obj2 = "-%s%s%s.%sETA%i"  % (otype2, str(ocut2), olist2 + (str(nleading2) if olist2.find('s')>=0 else ""),str(minEta2) if minEta2>0 else "", maxEta2)
+                obj1 = "%s%s%s.%sETA%i"  % (otype1, str(ocut1), olist1 + (str(nleading1) if olist1.find('s')>=0 else ""),str(minEta1) if minEta1>0 else "", maxEta1) # noqa: F821
+                obj2 = "-%s%s%s.%sETA%i"  % (otype2, str(ocut2), olist2 + (str(nleading2) if olist2.find('s')>=0 else ""),str(minEta2) if minEta2>0 else "", maxEta2) # noqa: F821
             
-                inputList = [otype1 + olist1, otype2 + olist2]
+                inputList = [otype1 + olist1, otype2 + olist2] # noqa: F821
                         
-                toponame = "%iINVM%i-%s%s"   % (minInvm, maxInvm, obj1, obj2)
+                toponame = "%iINVM%i-%s%s"   % (minInvm, maxInvm, obj1, obj2) # noqa: F821
                 alg = AlgConf.InvariantMassInclusive2( name = toponame, inputs = inputList, outputs = toponame, algoId = currentAlgoId); currentAlgoId += 1    
 
 
-                alg.addgeneric('InputWidth1', inputwidth1)
-                alg.addgeneric('InputWidth2', inputwidth2)
-                alg.addgeneric('MaxTob1', nleading1)
-                alg.addgeneric('MaxTob2', nleading2)
+                alg.addgeneric('InputWidth1', inputwidth1) # noqa: F821
+                alg.addgeneric('InputWidth2', inputwidth2) # noqa: F821
+                alg.addgeneric('MaxTob1', nleading1) # noqa: F821
+                alg.addgeneric('MaxTob2', nleading2) # noqa: F821
                 alg.addgeneric('NumResultBits', 1)
-                if (applyEtaCut>0):
-                    alg.addgeneric('ApplyEtaCut', applyEtaCut)
-
-                alg.addvariable('MinET1', ocut1)
-                alg.addvariable('MinET2', ocut2)
-                alg.addvariable('MinMSqr', minInvm * minInvm )
-                alg.addvariable('MaxMSqr', maxInvm * maxInvm )
-                if (applyEtaCut>0):
-                    alg.addvariable('MinEta1', minEta1)
-                    alg.addvariable('MaxEta1', maxEta1)
-                    alg.addvariable('MinEta2', minEta2)
-                    alg.addvariable('MaxEta2', maxEta2)
+                if (applyEtaCut>0): # noqa: F821
+                    alg.addgeneric('ApplyEtaCut', applyEtaCut) # noqa: F821
+
+                alg.addvariable('MinET1', ocut1) # noqa: F821
+                alg.addvariable('MinET2', ocut2) # noqa: F821
+                alg.addvariable('MinMSqr', minInvm * minInvm ) # noqa: F821
+                alg.addvariable('MaxMSqr', maxInvm * maxInvm ) # noqa: F821
+                if (applyEtaCut>0): # noqa: F821
+                    alg.addvariable('MinEta1', minEta1) # noqa: F821
+                    alg.addvariable('MaxEta1', maxEta1) # noqa: F821
+                    alg.addvariable('MinEta2', minEta2) # noqa: F821
+                    alg.addvariable('MaxEta2', maxEta2) # noqa: F821
 
                 tm.registerAlgo(alg)
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/CPS.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/CPS.py
index fb81fca9e8ea598c4c74e4e5616940e6a9a38111..3c83b10a2786e3c36874e4b843b2f26280cf0706 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/menu/CPS.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/CPS.py
@@ -98,7 +98,9 @@ def defineCPSGroups():
                                                'tau25_medium1_tracktwo',],  
         'RATE:CPS:HLT_tau160'		     :['tau160_idperf_track',
                                                'tau160_idperf_tracktwo',
-                                               'tau160_perf_tracktwo',],  
+                                               'tau160_perf_tracktwo',],  					       
+        'RATE:CPS:HLT_tau160_L1TAU100'	     :['tau160_idperf_tracktwo_L1TAU100',
+                                               'tau160_perf_tracktwo_L1TAU100',],  
         
         #BJet chains                                                                                                                                                    
         'RATE:CPS:HLT_j35b' : [#'j35_bperf',
@@ -322,6 +324,11 @@ def defineCPSGroups():
                                                    'mu6_j60_gsc110_bperf_split_dr05_dz02',
                                                    ],
 
+                'RATE:CPS:HLT_mu4_bJpsi_Trk' : ['mu4_bJpsi_TrkPEB','mu4_bJpsi_Trkloose'],
+                'RATE:CPS:HLT_mu6_bJpsi_Trk' : ['mu6_bJpsi_TrkPEB','mu6_bJpsi_Trkloose'],
+                'RATE:CPS:HLT_mu10_bJpsi_Trk' : ['mu10_bJpsi_TrkPEB','mu10_bJpsi_Trkloose'],
+                'RATE:CPS:HLT_mu14_bJpsi_Trk' : ['mu14_bJpsi_TrkPEB','mu14_bJpsi_Trkloose'],
+                'RATE:CPS:HLT_mu20_bJpsi_Trk' : ['mu20_bJpsi_TrkPEB','mu20_bJpsi_Trkloose'],
 
 #        'RATE:CPS:HLT_xe70_L1XE50' : ['xe70_L1XE50',
 #                                      'xe75_L1XE50',
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/ChainDef.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/ChainDef.py
index bde3cacb46f2528adaf3d384b982ae6e443e065b..6384322e479e76cbef30e0d90c38c48c76651109 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/menu/ChainDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/ChainDef.py
@@ -57,7 +57,7 @@ class ChainDef:
 
         #safety: if asked to insert with sig_counter -1, use addSignature
         if signature_counter == -1:
-            addSignature(signature_counter,listOfTriggerElements)
+            self.addSignature(signature_counter,listOfTriggerElements)
         else:
             pos_newSeq = -1
             
@@ -97,6 +97,10 @@ class ChainDef:
     def appendSignature(self, listOfTriggerElements):
         """add new signature to the end of the signature list and increment chain counter automatically"""
 
+        for s in self.signatureList:
+            if( s["listOfTriggerElements"] == listOfTriggerElements ):
+                return
+
         self.signatureList.append(
             {'signature_counter': self.signatureList[-1]["signature_counter"]+1,
              'listOfTriggerElements': listOfTriggerElements})
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/CommonSliceFlags.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/CommonSliceFlags.py
index 1c4e711d84b337b63bdfbe70fb452484d20def0a..157a75584a4bc7cd3e2305d2b4b0600f1777eaf6 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/menu/CommonSliceFlags.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/CommonSliceFlags.py
@@ -2,7 +2,7 @@
 
 """ Common slices flags  """
 
-from AthenaCommon.JobProperties import JobProperty, jobproperties
+from AthenaCommon.JobProperties import JobProperty
 
 
 __author__  = 'T. Bold'
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/DC14.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/DC14.py
index 373972790099b09c97d14fe74feaaea307772a84..fbe9d1afbf54f3e48ea1159a3da9b34dc00a54c7 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/menu/DC14.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/DC14.py
@@ -4,7 +4,6 @@
 #------------------------------------------------------------------------#
 def setupMenu():
 
-    from TriggerMenu.menu.TriggerPythonConfig import TriggerPythonConfig
     from TriggerJobOpts.TriggerFlags          import TriggerFlags
     from AthenaCommon.Logging                 import logging
     log = logging.getLogger( 'TriggerMenu.menu.DC14.py' )
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/DictFromChainName.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/DictFromChainName.py
index 83225cf19d58673aa28d2ffc6f9240e320d646ca..dd92910e4110d6aa4cae66ba02f93ba95751eebe 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/menu/DictFromChainName.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/DictFromChainName.py
@@ -12,9 +12,6 @@ __author__  = 'Moritz Backes & Catrin Bernius & Joerg Stelzer'
 __version__=""
 __doc__="Obtaining Dictionaries from Chain Names"
 
-
-import re
-
 from AthenaCommon.Logging import logging
 logging.getLogger().info("Importing %s",__name__)
 logDict = logging.getLogger('TriggerMenu.menu.DictFromChainName')
@@ -106,8 +103,7 @@ class DictFromChainName(object):
         are defined in SliceDicts
         The naming ocnvention is defined inthis document http://
         """
-        chainName_orig = chainName
-
+        
         # ---- dictionary with all chain properties ----
         from SignatureDicts import ChainDictTemplate
         from copy import deepcopy
@@ -177,9 +173,7 @@ class DictFromChainName(object):
 
         # ---- obtain dictionary parts for signature defining patterns ----
         from SignatureDicts import getSignatureNameFromToken, AllowedCosmicChainIdentifiers, \
-            AllowedCalibChainIdentifiers, AllowedStreamingChainIdentifiers, \
-            AllowedMonitorChainIdentifiers, AllowedBeamspotChainIdentifiers, AllowedEBChainIdentifiers
-            #, AllowedMatchingKeywords
+            AllowedCalibChainIdentifiers, AllowedMonitorChainIdentifiers, AllowedBeamspotChainIdentifiers
 
         logDict.debug("cparts: %s", cparts)
         for cpart in cparts:
@@ -191,7 +185,7 @@ class DictFromChainName(object):
                 logDict.debug("Pattern found in this string: %s", cpart)
                 m_groupdict = m.groupdict()
                 # Check whether the extra contains a special keyword
-                skip=False
+                #skip=False
 #                for keyword in AllowedMatchingKeywords :
 #                    if keyword in m_groupdict['extra']: skip=True
 #                if skip: continue
@@ -203,7 +197,7 @@ class DictFromChainName(object):
                     # j45 would be found in [0, 13], and 3j45 in [12]
                     # so need to make sure the multiplicities are considered here!
                     if (theMultiChainIndex != 0) & (chainName[theMultiChainIndex-1] != '_'): continue
-                    skip=False
+                    #skip=False
 #                    for keyword in AllowedMatchingKeywords :
 #                        if chainName[theMultiChainIndex:len(chainName)].startswith(cpart+keyword): skip=True
 #                    if skip: continue
@@ -232,6 +226,15 @@ class DictFromChainName(object):
                 mdicts.append(m_groupdict)
                 break # stop loop here so mb doesn't get picked up from min bias slice as it's streaming info
 
+## Not sure if this is necessary, per suggestion from C. Bernius
+            elif cpart=='afp': 
+                logDict.debug('Doing AFP')
+                multichainindex.append(chainName.index(cpart)) 
+                m_groupdict = {'signature': 'AFP', 'threshold': '', 'multiplicity': '', 
+                               'trigType': 'afp', 'extra': ''}
+                if 'AFP' not in signatureNames:  signatureNames.append('AFP')
+                mdicts.append(m_groupdict)
+
             elif cpart=='mb': 
                 logDict.debug('Doing MB')
                 multichainindex.append(chainName.index(cpart)) 
@@ -298,7 +301,6 @@ class DictFromChainName(object):
         # ----  ----
         multichainparts=[]
 
-        remainder = chainName
         multichainindex = sorted(multichainindex, key=int)
         cN = chainName
         for i in reversed(multichainindex):
@@ -321,7 +323,7 @@ class DictFromChainName(object):
             logDict.debug('chainparts %s', chainparts)
 
             # ---- check if L1 item is specified in chain Name ----
-            L1itemFromChainName = ''; L1item = ''; 
+            L1itemfromChainName = ''; L1item = ''; 
             chainpartsNoL1 = chainparts
             
             #Checking for L1 item for chain part and overall in the name
@@ -349,7 +351,7 @@ class DictFromChainName(object):
                     chainparts = chainparts[:allL1indices[1]]
                     
                 if (allL1items[0] not in L1items_chainParts):
-                    logDict.error("L1 chain part " +L1items_chainParts+" item does not seem to match the one in the chain name "+llL1items[0])
+                    logDict.error("L1 chain part " +L1items_chainParts+" item does not seem to match the one in the chain name "+allL1items[0])
 
 
 
@@ -445,7 +447,7 @@ class DictFromChainName(object):
 
             # ---- check remaining parts for complete machtes in allowedPropertiesAndValues Dict ----
             # ---- unmatched = list of tokens that are not found in the allowed values as a whole ----
-            unmatched = [] 
+            #unmatched = [] 
             parts = filter(None, parts)     #removing empty strings from list
 
             matchedparts = []
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/GenerateMenu.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/GenerateMenu.py
index 07f3e2ad99a8d1a4447309a53704d8068e4df1d1..7aea4b4a0b4f60880d187ee0f9666d25c69ede7e 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/menu/GenerateMenu.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/GenerateMenu.py
@@ -8,6 +8,7 @@ from TriggerMenu.jet.JetSliceFlags                     import JetSliceFlags
 from TriggerMenu.bjet.BjetSliceFlags                   import BjetSliceFlags
 from TriggerMenu.met.METSliceFlags                     import METSliceFlags
 from TriggerMenu.tau.TauSliceFlags                     import TauSliceFlags
+from TriggerMenu.afp.AFPSliceFlags                     import AFPSliceFlags
 from TriggerMenu.minbias.MinBiasSliceFlags             import MinBiasSliceFlags
 from TriggerMenu.heavyion.HeavyIonSliceFlags           import HeavyIonSliceFlags
 from TriggerMenu.combined.CombinedSliceFlags           import CombinedSliceFlags
@@ -22,12 +23,12 @@ from TriggerMenu.test.TestSliceFlags                   import TestSliceFlags
 from TriggerMenu.menu.TriggerPythonConfig  import TriggerPythonConfig
 from TriggerMenu.menu.CPS                  import addCPS
 from TriggerMenu.menu.Lumi                 import lumi, applyPrescales
-from TriggerMenu.menu.MenuUtil             import checkTriggerGroupAssignment, checkStreamConsistency, getStreamTagForRerunChains,checkGroups
+from TriggerMenu.menu.MenuUtil             import checkStreamConsistency, getStreamTagForRerunChains,checkGroups
 from TriggerMenu.menu.HLTObjects           import HLTChain, HLTSequence
 from TriggerMenu.menu                      import StreamInfo, DictFromChainName
-import TriggerMenu.menu.MenuUtils
+from TriggerMenu.menu.MenuUtils            import splitInterSignatureChainDict,mergeChainDefs
 
-import os, traceback, operator, commands, time
+import os, traceback, operator, commands
 
 from AthenaCommon.Logging import logging
 log = logging.getLogger( 'TriggerMenu.menu.GenerateMenu' )
@@ -76,6 +77,7 @@ class GenerateMenu:
         self.doBphysicsChains    = True
         self.doMETChains         = True
         self.doTauChains         = True
+        self.doAFPChains         = True
         self.doMinBiasChains     = True
         self.doHeavyIonChains     = True
         self.doCosmicChains      = True
@@ -93,9 +95,9 @@ class GenerateMenu:
     
 
     def deactivateChains(self,signatureGroupsToDeactivate):
-        for signatureGroupToDeactive in signatureGroupsToDeactivate:
+        for signatureGroupToDeactivate in signatureGroupsToDeactivate:
             try:
-                eval("self.do"+signatureGroupToDeactive+"Chains = False")
+                eval("self.do"+signatureGroupToDeactivate+"Chains = False")
             except:
                 log.error('GenerateMenu: Could not deactivate trigger signature:',signatureGroupToDeactivate)
 
@@ -149,6 +151,12 @@ class GenerateMenu:
         else:
             self.doTauChains = False
 
+        if (CombinedSliceFlags.signatures() or AFPSliceFlags.signatures()) and self.doAFPChains:
+            chains += AFPSliceFlags.signatures()
+            log.debug('GenerateMenu : AFP : %s', chains)
+        else:
+            self.doAFPChains = False
+
         if (CombinedSliceFlags.signatures() or MinBiasSliceFlags.signatures()) and self.doMinBiasChains:
             chains += MinBiasSliceFlags.signatures()
             log.debug('GenerateMenu : MinBias : %s', chains)
@@ -321,6 +329,14 @@ class GenerateMenu:
                 log.info(traceback.print_exc())
                 self.doBjetChains = False
 
+        if self.doAFPChains:
+            try:
+                import TriggerMenu.afp.generateAFPChainDefs
+            except:
+                log.error('Problems when importing AFP.py, disabling AFP chains.')
+                log.info(traceback.print_exc())
+                self.doAFPChains = False
+
         if self.doMinBiasChains:
             try:
                 import TriggerMenu.minbias.generateMinBiasChainDefs 
@@ -405,13 +421,13 @@ class GenerateMenu:
 
 
 
-        allowedSignatures = ["jet","egamma","muon", "electron", "photon","met","tau", 
-                             "minbias", "heavyion", "cosmic", "calibration", "streaming", "monitoring", "ht", 'bjet','eb']
+        #allowedSignatures = ["jet","egamma","muon", "electron", "photon","met","tau", "afp",
+        #                     "minbias", "heavyion", "cosmic", "calibration", "streaming", "monitoring", "ht", 'bjet','eb']
         
         listOfChainDefs = []
 
         log.debug("\n chainDicts1 %s ", chainDicts)
-        chainDicts = TriggerMenu.menu.MenuUtils.splitInterSignatureChainDict(chainDicts)        
+        chainDicts = splitInterSignatureChainDict(chainDicts)        
         log.debug("\n chainDicts2 %s", chainDicts)
         
 
@@ -489,6 +505,14 @@ class GenerateMenu:
                     log.error('Problems creating ChainDef for chain %s ' % (chainDict['chainName']))
                     log.info(traceback.print_exc())
                     continue
+                
+            elif chainDict["signature"] == "AFP" and self.doAFPChains:
+                try:
+                    chainDefs = TriggerMenu.afp.generateAFPChainDefs.generateChainDefs(chainDict)
+                except:
+                    log.error('Problems creating ChainDef for chain %s ' % (chainDict['chainName']))
+                    log.info(traceback.print_exc())
+                    continue
 
             elif chainDict["signature"] == "MinBias" and self.doMinBiasChains:
                 try:
@@ -588,7 +612,7 @@ class GenerateMenu:
             return False
         elif len(listOfChainDefs)>1:
             if ("mergingStrategy" in chainDicts[0].keys()):
-                theChainDef = TriggerMenu.menu.MenuUtils.mergeChainDefs(listOfChainDefs,chainDicts[0]["mergingStrategy"],chainDicts[0]["mergingOffset"],preserveL2EFOrder = chainDicts[0]["mergingPreserveL2EFOrder"],doTopo=doTopo,chainDicts=chainDicts)#, noTEreplication = chainDicts[0]["mergingNoTEreplication"])
+                theChainDef = mergeChainDefs(listOfChainDefs,chainDicts[0]["mergingStrategy"],chainDicts[0]["mergingOffset"],preserveL2EFOrder = chainDicts[0]["mergingPreserveL2EFOrder"],doTopo=doTopo,chainDicts=chainDicts)#, noTEreplication = chainDicts[0]["mergingNoTEreplication"])
             else:
                 log.error("No merging strategy specified for combined chain %s" % chainDicts[0]['chainName'])
                 
@@ -718,8 +742,9 @@ class GenerateMenu:
         dumpIt(f, EgammaSliceFlags.signatures(), 'Egamma')
         dumpIt(f, METSliceFlags.signatures(), 'MET')
         dumpIt(f, TauSliceFlags.signatures(), 'Tau')
+        dumpIt(f, AFPSliceFlags.signatures(), 'AFP')
         dumpIt(f, MinBiasSliceFlags.signatures(), 'MinBias')
-        dumpIt(f, HeavyIonFlagsFlags.signatures(), 'HeavyIon')
+        dumpIt(f, HeavyIonSliceFlags.signatures(), 'HeavyIon')
         dumpIt(f, CosmicSliceFlags.signatures(), 'Cosmic')
         dumpIt(f, CalibSliceFlags.signatures(), 'Calibration')
         dumpIt(f, StreamingSliceFlags.signatures(), 'Streaming')
@@ -911,7 +936,7 @@ class GenerateMenu:
         log.info('checkGroups')
         checkGroups(self.triggerPythonConfig)
 
-        cpsMenus = ['Physics_pp_v5','Physics_pp_v6','Physics_pp_v7']
+        #cpsMenus = ['Physics_pp_v5','Physics_pp_v6','Physics_pp_v7']
         ##if TriggerFlags.triggerMenuSetup() in cpsMenus:
         if TriggerFlags.triggerMenuSetup().find("pp_v")>=0:            
             log.info('Assigning CPS groups now')
@@ -930,7 +955,6 @@ class GenerateMenu:
 
         #dump configuration files
         log.info('generate: dump configuration Files')
-        lvl1_items = [x.name for x in self.trigConfL1.menu.items]
         #self.dumpSignatureList(self.trigConfL1.menu.items.itemNames(),'hltsigs.txt')
         self.triggerPythonConfig.writeConfigFiles()
         if log.isEnabledFor(logging.DEBUG): self.triggerPythonConfig.dot(algs=True)
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/GroupInfo.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/GroupInfo.py
index 857ab87533ec6b8f209c08c3c99fee2f74c84c40..7575a7175c738b651052fba42faf4e0042540633 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/menu/GroupInfo.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/GroupInfo.py
@@ -11,6 +11,7 @@ AllowedGroups = ['Muon',
                  'Egamma',
                  'Bphys',
                  'BeamSpot',
+                 'AFP',
                  'MinBias',
                  'Detector',
                  'Other',
@@ -31,10 +32,10 @@ AllowedGroup_HI = ['UltraCentral',
                    ]
 
 def getAllAllowedGroups(menu):    
-    if 'pp_v6' in menu or 'pp_v7' in menu:
+    if 'pp_v6' in menu or 'pp_v7' in menu or 'PhaseII' in menu:
         return AllowedGroups
     elif 'HI' in menu:
         return AllowedGroups+AllowedGroup_HI
     else:
-        log.error("No list of allowed groupd for "+menu)
+        log.error("No list of allowed group for "+menu)
     
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/HLTObjects.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/HLTObjects.py
index 803955f85c3901f20c294d23f8a23b319700dd36..3a4d99ad0901eb20d924e01a09f926fa4adfc124 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/menu/HLTObjects.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/HLTObjects.py
@@ -1,10 +1,5 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-import os
-import time
-import re
-import string
-from sys import settrace
 import xml.etree.cElementTree as etree
 
 from AthenaCommon.Logging import logging  # loads logger
@@ -46,7 +41,8 @@ class HLTChain:
                 for te in self.tes:
                     if type(te) != type(''): # check if this is a string
                         raise Exception("The trigger element: " + str(te) + " in the signature: " + self.sigcounter + "is not a plain string" )
-                    xTriggerElement = etree.SubElement(xSignature, 'TRIGGERELEMENT', te_name=str(te))
+                    #xTriggerElement = etree.SubElement(xSignature, 'TRIGGERELEMENT', te_name=str(te))
+                    etree.SubElement(xSignature, 'TRIGGERELEMENT', te_name=str(te))
                     
     # construction
     def __init__(self, chain_name, chain_counter,
@@ -124,7 +120,7 @@ class HLTChain:
         last_counter = 1
         if len(self.siglist) != 0:
             last_counter = self.siglist[-1].sigcounter
-            logger().debug( "The chain: " + self.chain_name + " contains already signatures. Will align sinatures to it." )
+            logger().debug( "The chain: " + self.chain_name + " with counter " + last_counter + " already contains signatures. Will align sinatures to it." )
 
 
         total_counter = 0
@@ -171,7 +167,7 @@ class HLTChain:
         last_counter = 1
         if len(self.siglist) != 0:
             last_counter = self.siglist[-1].sigcounter
-            logger().debug( "The chain: " + self.chain_name + " contains already signatures. Will align sinatures to it." )
+            logger().debug( "The chain: " + self.chain_name + " with counter " + last_counter + "already contains signatures. Will align sinatures to it." )
 
 
         max_counter = 0;
@@ -292,11 +288,13 @@ class HLTChain:
 
         xTriggerTypeList = etree.SubElement(xChain, 'TRIGGERTYPE_LIST')
         for bit in self.trigger_type_bits:
-            xTriggerType = etree.SubElement(xTriggerTypeList, 'TRIGGERTYPE', bit = str(bit))
+            #xTriggerType = etree.SubElement(xTriggerTypeList, 'TRIGGERTYPE', bit = str(bit))
+            etree.SubElement(xTriggerTypeList, 'TRIGGERTYPE', bit = str(bit))
 
         xStreamTagList = etree.SubElement(xChain, 'STREAMTAG_LIST')
         for stream in self.stream_tag:
-            xStreamTag = etree.SubElement(xStreamTagList, 'STREAMTAG',
+            #xStreamTag = etree.SubElement(xStreamTagList, 'STREAMTAG',
+            etree.SubElement(xStreamTagList, 'STREAMTAG',
                                           stream = stream[0],
                                           type = stream[1],
                                           obeyLB = stream[2],
@@ -310,7 +308,8 @@ class HLTChain:
 
         xGroupList = etree.SubElement(xChain, 'GROUP_LIST')
         for g in self.groups:
-            xGroup = etree.SubElement(xGroupList, 'GROUP', name = g)
+            #xGroup = etree.SubElement(xGroupList, 'GROUP', name = g)
+            etree.SubElement(xGroupList, 'GROUP', name = g)
             
         xSignatureList = etree.SubElement(xChain, 'SIGNATURE_LIST')
         for sig in self.siglist:
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/HltConfig.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/HltConfig.py
index ed79d0a83ef1a71987f3f4abfd9bf6ce78e38be8..55e2fc0f501c98512f3b60bf08e29384b845a046 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/menu/HltConfig.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/HltConfig.py
@@ -4,9 +4,8 @@
 # Hlt configuration base classes
 #-----------------------------------------------------
 
-#from AthenaCommon.Configurable import *
-from TriggerJobOpts.TriggerFlags import *
 from TriggerMenu.menu.ChainDef import ChainDef
+from AthenaCommon.Logging import logging  # loads logger
 
 log = logging.getLogger( 'TriggerMenu.menu.HltConfig.py' )
 # log.setLevel(logging.DEBUG)
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/L1Seeds.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/L1Seeds.py
index 0d08b9f22c9d33fb54ed8ae2517c82f901330b17..83e3149c92e77b30e5e496c2615bb45436e42bcd 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/menu/L1Seeds.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/L1Seeds.py
@@ -110,7 +110,7 @@ def getL1StandbySeed(l1items):
     #reduce the L1 seed length to below 4000 characters, such that String4k is not overloaded 
     #5 May 2017 also remove L1_X_Y_Z but only L1_X_Y_Z that have X_Y_Z all thresholds
     exclude_list = ["L1_2MU4_J40_XE20","L1_2MU4_J40_XE50","L1_EM15VHI_2TAU12IM_4J12","L1_EM15VHI_2TAU12IM_J25_3J12","L1_EM15VHI_2TAU12IM_XE35","L1_EM15VHI_TAU20IM_2TAU15_J25_2J20_3J15","L1_EM15VHI_TAU40_2TAU15","L1_EM15VH_2EM8VH_MU6","L1_EM20VHI_TAU20IM_2TAU20_J25_3J20","L1_J40.0ETA25_2J25_J20.31ETA49","L1_MU10_2J15_J20","L1_MU10_TAU12IM_3J12","L1_MU10_TAU12IM_J25_2J12","L1_MU10_TAU12IM_XE35","L1_MU10_TAU20IM_J25_2J20","L1_MU4_J50_XE40","L1_MU6_J30.0ETA49_2J20.0ETA49","L1_TAU20IM_2J20_XE45","L1_TAU20IM_2TAU12IM_J25_2J20_3J12","L1_TAU20IM_2TAU12IM_XE35","L1_TAU20_2TAU12_XE35","L1_TAU25IM_2TAU20IM_2J25_3J20","L1_TAU40_2TAU12IM_XE40"]
-    standby_seeds    = ",".join([ x for x in l1items if "_EMPTY" not in x and "CALREQ" not in x and "ZB" not in x and "-" not in x and "CMU" not in x and "ALFA" not in x  and "RD" not in x and "BCM" not in x and "BGRP12" not in x and "FTK" not in x and "SC" not in x and "LHCF" not in x and "3EM" not in x and x not in exclude_list])
+    standby_seeds    = ",".join([ x for x in l1items if "_EMPTY" not in x and "CALREQ" not in x and "ZB" not in x and "-" not in x and "CMU" not in x and "ALFA" not in x  and "RD" not in x and "BCM" not in x and "BGRP12" not in x and "FTK" not in x and "SC" not in x and "LHCF" not in x and "AFP" not in x and "3EM" not in x and x not in exclude_list])
     return standby_seeds
 ##############################
 def getL1TopoSeed(l1items):
@@ -180,18 +180,15 @@ def getEBnoL1PSSeed(l1items, l1seedname):
     # All of these L1 items must be PS=1 for an EB campaign
     noL1PS_seeds = ''
     if ('L1_PhysicsLow' in l1seedname):
-      if '_v7' in TriggerFlags.triggerMenuSetup():
-         noL1PS_seeds = 'L1_MU6_3MU4,L1_EM15VHI_2TAU12IM_J25_3J12,L1_EM15VHI_2TAU12IM_XE35,L1_EM15VHI_TAU40_2TAU15,L1_EM15VH_MU10,L1_EM15VH_3EM7,L1_EM22VHI,L1_2EM8VH_MU10,L1_MU10_TAU12IM_J25_2J12,L1_MU10_TAU12IM_XE35,L1_MU10_TAU20IM,L1_4J15,L1_XE50,L1_2J15_XE55,L1_TAU60,L1_TAU20IM_2TAU12IM_J25_2J20_3J12,L1_TAU20IM_2TAU12IM_XE35,L1_TAU20IM_2J20_XE45,L1_MU20,L1_MU6_J30.0ETA49_2J20.0ETA49,L1_MU10_3J20,L1_J40.0ETA25_2J15.31ETA49,L1_3MU6,L1_MU10_2J15_J20,L1_J40.0ETA25_2J25_J20.31ETA49,L1_2MU6_3MU4,L1_MU11_2MU6'
-      else:
-         noL1PS_seeds = 'L1_MU6_3MU4,L1_EM15HI_2TAU12IM_J25_3J12,L1_EM15HI_2TAU12IM_XE35,L1_EM15HI_TAU40_2TAU15,L1_EM15VH_MU10,L1_EM15VH_3EM7,L1_EM22VHI,L1_2EM8VH_MU10,L1_MU10_TAU12IM_J25_2J12,L1_MU10_TAU12IM_XE35,L1_MU10_TAU20IM,L1_4J15,L1_XE50,L1_2J15_XE55,L1_TAU60,L1_TAU20IM_2TAU12IM_J25_2J20_3J12,L1_TAU20IM_2TAU12IM_XE35,L1_TAU20IM_2J20_XE45,L1_MU20,L1_MU6_J30.0ETA49_2J20.0ETA49,L1_MU10_3J20,L1_J40.0ETA25_2J15.31ETA49,L1_3MU6,L1_MU10_2J15_J20,L1_J40.0ETA25_2J25_J20.31ETA49,L1_2MU6_3MU4,L1_MU11_2MU6'
+      noL1PS_seeds = 'L1_2EM20VH,L1_2EM8VH_MU10,L1_2J15_XE55,L1_2MU10,L1_2MU4_J20_XE30_DPHI-J20s2XE30,L1_2MU6_3MU4,L1_3J50,L1_3MU4,L1_4J15.0ETA25,L1_4J20,L1_4J20,L1_5J15.0ETA25,L1_DR-EM15TAU12I-J25,L1_DR-MU10TAU12I_TAU12I-J25,L1_DR-TAU20ITAU12I-J25,L1_EM15VHI_2TAU12IM_XE35,L1_EM15VHI_TAU40_2TAU15,L1_EM15VH_MU10,L1_EM20VH_3EM10VH,L1_EM24VHI,L1_HT190-J15s5.ETA21,L1_J100,L1_J40.0ETA25_2J25_J20.31ETA49,L1_J40_XE50_DPHI-J20s2XE50,L1_J75.31ETA49,L1_LLP-RO,L1_MU10_2J20,L1_MU10_TAU12IM_XE35,L1_MU11_2MU6,L1_MU20,L1_MU4_J30_XE40_DPHI-J20s2XE30,L1_MU4_J50_XE50_DPHI-J20s2XE30,L1_MU6_3MU4,L1_TAU100,L1_TAU20IM_2J20_XE45,L1_TAU60_DR-TAU20ITAU12I,L1_XE60'
     elif ('L1_PhysicsHigh' in l1seedname):
-      noL1PS_seeds = 'L1_XE80,L1_J100.31ETA49,L1_J400,L1_6J15'
+      noL1PS_seeds = 'L1_6J15,L1_J100.31ETA49,L1_J400,L1_XE80'
     elif ('L1_EMPTY' in l1seedname):
-      noL1PS_seeds = 'L1_J12_EMPTY,L1_MU11_EMPTY,L1_TAU8_EMPTY,L1_TAU30_EMPTY,L1_EM7_EMPTY'
+      noL1PS_seeds = 'L1_J12_EMPTY,L1_MU11_EMPTY,L1_TAU8_EMPTY,L1_EM7_EMPTY'
     elif ('L1_FIRSTEMPTY' in l1seedname):
       noL1PS_seeds = 'L1_J12_FIRSTEMPTY,L1_MU20_FIRSTEMPTY,L1_TAU8_FIRSTEMPTY,L1_EM7_FIRSTEMPTY'
     elif ('L1_UNPAIRED_ISO' in l1seedname):
-      noL1PS_seeds = 'L1_J12_UNPAIRED_ISO,L1_J15.31ETA49_UNPAIRED_ISO,L1_BCM_Wide_UNPAIRED_ISO,L1_BCM_AC_UNPAIRED_ISO,L1_BCM_CA_UNPAIRED_ISO,L1_MU4_UNPAIRED_ISO,L1_EM7_UNPAIRED_ISO,L1_TAU8_UNPAIRED_ISO,L1_TAU30_UNPAIRED_ISO'
+      noL1PS_seeds = 'L1_J12_UNPAIRED_ISO,L1_J15.31ETA49_UNPAIRED_ISO,L1_BCM_Wide_UNPAIRED_ISO,L1_BCM_AC_UNPAIRED_ISO,L1_BCM_CA_UNPAIRED_ISO,L1_MU4_UNPAIRED_ISO,L1_EM7_UNPAIRED_ISO,L1_TAU8_UNPAIRED_ISO'
     elif ('L1_UNPAIRED_NONISO' in l1seedname):
       noL1PS_seeds = 'L1_J12_UNPAIRED_NONISO,L1_BCM_Wide_UNPAIRED_NONISO,L1_BCM_AC_UNPAIRED_NONISO,L1_BCM_CA_UNPAIRED_NONISO'
     elif ('L1_ABORTGAPNOTCALIB' in l1seedname): 
@@ -314,7 +311,7 @@ def getL1LowLumi(l1seed):
 #####################################
 def getSpecificL1Seeds(l1seedname, l1itemobject):
     l1items = [i.name for i in l1itemobject]
-    l1ctpid = [i.ctpid for i in l1itemobject]
+    #l1ctpid = [i.ctpid for i in l1itemobject]
     L1Seed = ''
     if l1seedname == 'L1_J':
         L1Seed = getL1JetBS()
@@ -407,7 +404,7 @@ def getSpecificL1Seeds(l1seedname, l1itemobject):
         log.warning('No L1item name given!')
 
     else: 
-        #log.error('Given seed %s could not be found!' %l1seedname)
+        log.error('Given seed %s could not be found!' %str(l1seedname))
         return 'ERROR_'+l1seedname
 
     L1Seed = L1Seed.split(",")
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/LS1_v1.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/LS1_v1.py
index 25656320efc2b4f7d9491f316721a2859f926d81..900926d67f49c933279c8065879d180a17ad7235 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/menu/LS1_v1.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/LS1_v1.py
@@ -4,7 +4,6 @@
 #------------------------------------------------------------------------#
 def setupMenu():
 
-    from TriggerMenu.menu.TriggerPythonConfig import TriggerPythonConfig
     from TriggerJobOpts.TriggerFlags          import TriggerFlags
     from AthenaCommon.Logging                 import logging
     log = logging.getLogger( 'TriggerMenu.menu.LS1_v1.py' )
@@ -161,8 +160,6 @@ def setupMenu():
         ]
     
 
-    allL1TAUseeds = ",".join([ x for x in tcl1.current.menu.items.itemNames() if "TAU" in x ])
-
     TriggerFlags.CalibSlice.signatures   = [
         ['l1calocalib',              'L1_RD0_FILLED',     [], ['L1CaloCalib'], ["RATE:Calibration", "RATE:L1CaloCalib", "BW:Detector"], -1],
         ['l1calocalib_L1BGRP7',      'L1_BGRP7',          [], ['L1CaloCalib'], ["RATE:Calibration", "RATE:L1CaloCalib", "BW:Detector"], -1], 
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/Lumi.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/Lumi.py
index de92d33a1631993073d61265ed3933a76376bda9..cad98d91fad92a7e62bf2988adfab578d5e7f8d9 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/menu/Lumi.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/Lumi.py
@@ -162,6 +162,20 @@ def lumi(triggerPythonConfig):
         else:
             L1Prescales = Prescales.L1Prescales
             HLTPrescales = Prescales.HLTPrescales        
+
+    elif menu_name.startswith('MC_PhaseII') :
+        log.info('In MC_PhaseII menu setup')
+        from TriggerMenu.menu.MC_PhaseII import setupMenu, Prescales
+        setupMenu()
+        if 'cosmics_prescale' in menu_name:
+            L1Prescales = Prescales.L1Prescales_cosmics
+            HLTPrescales = Prescales.HLTPrescales_cosmics
+        elif 'tight' in menu_name:
+            L1Prescales = Prescales.L1Prescales_tight_physics_prescale
+            HLTPrescales = Prescales.HLTPrescales_tight_physics_prescale
+        else:
+            L1Prescales = Prescales.L1Prescales
+            HLTPrescales = Prescales.HLTPrescales
             
     else:
         log.fatal ('Menu with name %s is not known in this version of TriggerMenu! ', menu_name)
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_HI_v3.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_HI_v3.py
index d28540d5409a6e72fa9cf9508744062922e9d228..2729ed37320eef8750c46b0a02e39046fcaef83c 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_HI_v3.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_HI_v3.py
@@ -16,7 +16,6 @@ log = logging.getLogger( 'MC_HI_v3.py' )
 def setupMenu():
 
     physics_menu.setupMenu()
-    PhysicsStream="Main"
 
 
     # ---------------------------------------------------------------------------------------
@@ -26,7 +25,10 @@ def setupMenu():
 
     TriggerFlags.TestSlice.signatures = TriggerFlags.TestSlice.signatures() + [
         ]
-    
+
+    TriggerFlags.AFPSlice.signatures = TriggerFlags.AFPSlice.signatures() + [
+	]
+
     TriggerFlags.MuonSlice.signatures = TriggerFlags.MuonSlice.signatures() + [
         ]
     
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_HI_v4.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_HI_v4.py
index 68174004cf7342fd97e914440786bc310b7fc17b..3002fd8ee8e28ac7eafa1530cd605cc8c8935321 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_HI_v4.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_HI_v4.py
@@ -16,7 +16,6 @@ log = logging.getLogger( 'MC_HI_v4.py' )
 def setupMenu():
 
     physics_menu.setupMenu()
-    PhysicsStream="Main"
 
 
     # ---------------------------------------------------------------------------------------
@@ -26,7 +25,10 @@ def setupMenu():
 
     TriggerFlags.TestSlice.signatures = TriggerFlags.TestSlice.signatures() + [
         ]
-    
+
+    TriggerFlags.AFPSlice.signatures = TriggerFlags.AFPSlice.signatures() + [
+	]
+
     TriggerFlags.MuonSlice.signatures = TriggerFlags.MuonSlice.signatures() + [
         ]
     
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_PhaseII.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_PhaseII.py
new file mode 100644
index 0000000000000000000000000000000000000000..149a83dac638f6eb08e63479394d7e63f7fd2460
--- /dev/null
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_PhaseII.py
@@ -0,0 +1,302 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#------------------------------------------------------------------------#
+#
+# MC_PhaseII menu to be used for studies for PhaseII TDR
+# Contacts: Catrin Bernius, Anna Sfyrla, Sarah Demers, Tim Martin
+# Date: May 2017
+#------------------------------------------------------------------------#
+def setupMenu():
+
+    from TriggerJobOpts.TriggerFlags          import TriggerFlags
+    from AthenaCommon.Logging                 import logging
+    log = logging.getLogger( 'TriggerMenu.menu.MC_PhaseII.py' )
+
+    from TriggerMenu.TriggerConfigLVL1 import TriggerConfigLVL1 as tcl1
+    if tcl1.current:
+        log.info("L1 items: %s " % tcl1.current.menu.items.itemNames())
+    else:
+        log.warning("L1 menu has not yet been defined")
+
+    PhysicsStream="Main"
+
+    #---------------------------------------------------------------------
+    # INPUT FORMAT FOR CHAINS:
+    # ['chainName',  'L1itemforchain', [L1 items for chainParts], [stream], [groups], EBstep], OPTIONAL: [mergingStrategy, offset,[merginOrder] ]], topoStartsFrom = False
+    #---------------------------------------------------------------------
+
+    TriggerFlags.Slices_all_setOff()
+
+    TriggerFlags.TestSlice.signatures = []
+    TriggerFlags.MuonSlice.signatures = [
+        # Current primaries (2017 menu)
+        ['mu26_ivarmedium',	     'L1_MU21', 	  [], [PhysicsStream], ['RATE:SingleMuon', 'RATE:UpgradeMuon', 'RATE:UpgradeAll', 'BW:Muon'], -1],
+        ['mu60',  'L1_MU21',           [], [PhysicsStream], ['RATE:SingleMuon', 'RATE:UpgradeMuon', 'RATE:UpgradeAll', 'BW:Muon'], -1],
+        ['mu24_mu8noL1',           'L1_MU21', ['L1_MU21',''], [PhysicsStream], ['RATE:MultiMuon', 'RATE:UpgradeMuon', 'RATE:UpgradeAll','BW:Muon'], -1,['serial',-1,['mu24','mu8noL1']]],
+        ['mu24_2mu4noL1',          'L1_MU21', ['L1_MU21',''], [PhysicsStream], ['RATE:MultiMuon', 'RATE:UpgradeMuon', 'RATE:UpgradeAll', 'BW:Muon'], -1,['serial',-1,['mu24','2mu4noL1']]],
+        ['2mu14',                  'L1_2MU10',          [], [PhysicsStream], ['RATE:MultiMuon', 'RATE:UpgradeMuon', 'RATE:UpgradeAll', 'BW:Muon'], -1],
+        ['2mu14_nomucomb',         'L1_2MU10',          [], [PhysicsStream], ['RATE:MultiMuon', 'RATE:UpgradeMuon', 'RATE:UpgradeAll', 'BW:Muon'], -1],
+
+        #upgrade study chains
+        ['mu20_ivarmedium',	   'L1_MU6', 	  [], [PhysicsStream], ['RATE:SingleMuon', 'RATE:UpgradeMuon', 'RATE:UpgradeAll', 'BW:Muon'], -1],
+        # ['mu20',			   'L1_MU6',           [], [PhysicsStream], ['RATE:SingleMuon', 'RATE:UpgradeMuon', 'RATE:UpgradeAll', 'BW:Muon'], -1],
+        ['mu40_L1MU6',			  'L1_MU6',           [], [PhysicsStream], ['RATE:SingleMuon', 'RATE:UpgradeMuon', 'RATE:UpgradeAll', 'BW:Muon'], -1],
+        ['mu20_mu8noL1',          'L1_MU6', ['L1_MU6',''], [PhysicsStream], ['RATE:MultiMuon', 'RATE:UpgradeMuon', 'RATE:UpgradeAll','BW:Muon'], -1,['serial',-1,['mu20','mu8noL1']]],
+        ['mu20_2mu4noL1',        'L1_MU6', ['L1_MU6',''], [PhysicsStream], ['RATE:MultiMuon', 'RATE:UpgradeMuon', 'RATE:UpgradeAll','BW:Muon'], -1,['serial',-1,['mu20','2mu4noL1']]],
+        ['2mu11_L1MU6',                         'L1_MU6',           [], [PhysicsStream], ['RATE:MultiMuon', 'RATE:UpgradeMuon', 'RATE:UpgradeAll', 'BW:Muon'], -1],
+
+        ]
+
+    TriggerFlags.JetSlice.signatures = [   
+        # Current primaries (2017 menu)
+        ['j175',                        'L1_J50',  [], [PhysicsStream], ['RATE:SingleJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll', 'BW:Jet'], -1],
+
+        ['j400',                    			    'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll', 'BW:Jet'], -1],
+        ['j420',                    			    'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll', 'BW:Jet'], -1],
+        ['j440_a10t_lcw_jes_L1J100',        'L1_J100', [], [PhysicsStream], ['RATE:SingleJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll', 'BW:Jet'], -1],
+        ['4j65',                        'L1_3J15', [], [PhysicsStream], ['RATE:MultiJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll', 'BW:Jet'], -1],
+
+        ['4j110',                  			    'L1_3J50', [], [PhysicsStream], ['RATE:MultiJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll', 'BW:Jet'], -1],
+        ['2j250_j150',         		             'L1_J100', [], [PhysicsStream], ['RATE:MultiJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll',  'BW:Jet'], -1],
+        ['3j200',                    			    'L1_J100', [], [PhysicsStream], ['RATE:MultiJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll',  'BW:Jet'], -1],
+        ['5j70_0eta240',                		    'L1_4J20', [], [PhysicsStream], ['RATE:MultiJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll',  'BW:Jet'], -1],
+        ['5j70_0eta240_L14J15',       	    'L1_4J15', [], [PhysicsStream], ['RATE:MultiJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll',  'BW:Jet'], -1],
+        ['5j85_L14J15',                 'L1_4J15', [], [PhysicsStream], ['RATE:MultiJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll',  'BW:Jet'], -1],
+        ['5j85',                        'L1_4J20', [], [PhysicsStream], ['RATE:MultiJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll',  'BW:Jet'], -1],
+        ['5j90',                        'L1_4J20', [], [PhysicsStream], ['RATE:MultiJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll',  'BW:Jet'], -1],
+        ['6j70_L14J15',                 'L1_4J15', [], [PhysicsStream], ['RATE:MultiJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll' , 'BW:Jet'], -1],
+        ['6j70',                        'L1_4J20', [], [PhysicsStream], ['RATE:MultiJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll', 'BW:Jet'], -1],
+        ['6j50_0eta240_L14J15',         'L1_4J15', [], [PhysicsStream], ['RATE:MultiJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll',  'BW:Jet'], -1],
+        ['6j50_0eta240_L14J20',         'L1_4J20', [], [PhysicsStream], ['RATE:MultiJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll',  'BW:Jet'], -1],
+
+        ['ht1000_L1J100',               'L1_J100', [], [PhysicsStream], ['RATE:MultiJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll','BW:Jet'], -1],
+
+        
+        #upgrade study chains
+        ['j175_L1J12',                        'L1_J12',  [], [PhysicsStream], ['RATE:SingleJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll', 'BW:Jet'], -1],
+
+        ['j400_L1J12',                    			    'L1_J12', [], [PhysicsStream], ['RATE:SingleJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll', 'BW:Jet'], -1],
+        ['j420_L1J12',                    			    'L1_J12', [], [PhysicsStream], ['RATE:SingleJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll', 'BW:Jet'], -1],
+        ['j440_a10t_lcw_jes_L1J12',        	  		    'L1_J12', [], [PhysicsStream], ['RATE:SingleJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll', 'BW:Jet'], -1],
+        ['2j250_j150_L1J12',         		                    'L1_J12', [], [PhysicsStream], ['RATE:MultiJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll',  'BW:Jet'], -1],
+        ['3j200_L1J12',                    		            'L1_J12', [], [PhysicsStream], ['RATE:MultiJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll',  'BW:Jet'], -1],
+
+        ['4j65_L1J12',                        'L1_J12', [], [PhysicsStream], ['RATE:MultiJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll', 'BW:Jet'], -1],
+        ['4j110_L1J12',                  		    'L1_J12', [], [PhysicsStream], ['RATE:MultiJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll', 'BW:Jet'], -1],
+        ['5j90_L1J12',                		            'L1_J12', [], [PhysicsStream], ['RATE:MultiJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll',  'BW:Jet'], -1],
+        
+        ['j400_L1RD0_FILLED',                    			    'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll', 'BW:Jet'], -1],
+        ['j420_L1RD0_FILLED',                    			    'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll', 'BW:Jet'], -1],
+        ['j440_a10t_lcw_jes_L1RD0_FILLED',        	    'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll', 'BW:Jet'], -1],
+        ['2j250_j150_L1RD0_FILLED',         		             'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:MultiJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll',  'BW:Jet'], -1],
+        ['3j200_L1RD0_FILLED',                    		    'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:MultiJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll',  'BW:Jet'], -1],
+        ['4j110_L1RD0_FILLED',                  		    'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:MultiJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll', 'BW:Jet'], -1],
+        ['5j90_L1RD0_FILLED',                		            'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:MultiJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll',  'BW:Jet'], -1],       
+
+        ['ht1000_L1J12',   'L1_J12', [], [PhysicsStream], ['RATE:MultiJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll', 'BW:Jet'], -1],
+
+        # Standard topocluster large-R jet triggers
+        ['j370_a10_lcw_subjes_L1J12',       'L1_J12', [], [PhysicsStream], ['RATE:SingleJet', 'RATE:UpgradeJet', 'RATE:UpgradeAll',  'BW:Jet'], -1],
+
+        ]
+
+    TriggerFlags.BjetSlice.signatures = [
+        # Current primaries (2017 menu)
+        ['j225_bmv2c2040_split',        'L1_J100', [], [PhysicsStream], ['RATE:SingleBJet',  'RATE:UpgradeBJet', 'RATE:UpgradeAll', 'BW:BJet'], -1],
+        ['j175_gsc225_bmv2c2040_split', 'L1_J100', [], [PhysicsStream], ['RATE:SingleBJet',  'RATE:UpgradeBJet', 'RATE:UpgradeAll', 'BW:BJet'], -1],
+        ['j225_gsc275_bmv2c2060_split', 'L1_J100', [], [PhysicsStream], ['RATE:SingleBJet', 'RATE:UpgradeBJet', 'RATE:UpgradeAll',  'BW:BJet'], -1],
+        ['3j50_gsc65_bmv2c2070_split_L13J35.0ETA23', 'L1_3J35.0ETA23', [], [PhysicsStream], ['RATE:MultiBJet', 'RATE:UpgradeBJet', 'RATE:UpgradeAll',  'BW:BJet'], -1],
+        ['j150_gsc175_bmv2c2060_split_j45_gsc60_bmv2c2060_split', 'L1_J100', [], [PhysicsStream], ['RATE:MultiBJet', 'RATE:UpgradeBJet', 'RATE:UpgradeAll',  'BW:BJet'], -1],
+        ['j110_gsc150_boffperf_split_2j35_gsc55_bmv2c2060_split', 'L1_J75_3J20', [], [PhysicsStream], ['RATE:MultiBJet', 'RATE:UpgradeBJet', 'RATE:UpgradeAll',  'BW:BJet'], -1],
+        ['j50_gsc65_bmv2c2040_split_3j50_gsc65_boffperf_split',      'L1_4J15.0ETA25', [], [PhysicsStream], ['RATE:SingleBJet', 'RATE:UpgradeBJet', 'RATE:UpgradeAll',   'BW:BJet'], -1],
+        ['j55_gsc75_bmv2c2040_split_3j55_gsc75_boffperf_split',       'L1_4J20',        [], [PhysicsStream], ['RATE:SingleBJet', 'RATE:UpgradeBJet', 'RATE:UpgradeAll',  'BW:BJet'], -1],
+        ['j60_gsc85_bmv2c2050_split_3j60_gsc85_boffperf_split',       'L1_4J20',        [], [PhysicsStream], ['RATE:SingleBJet', 'RATE:UpgradeBJet', 'RATE:UpgradeAll',  'BW:BJet'], -1],
+        
+        #upgrade study chains
+        ['j225_bmv2c2040_split_L1J12',        'L1_J12', [], [PhysicsStream], ['RATE:SingleBJet',  'RATE:UpgradeBJet', 'RATE:UpgradeAll', 'BW:BJet'], -1],
+        ['j175_gsc225_bmv2c2040_split_L1J12', 'L1_J12', [], [PhysicsStream], ['RATE:SingleBJet',  'RATE:UpgradeBJet', 'RATE:UpgradeAll', 'BW:BJet'], -1],
+        ['j225_gsc275_bmv2c2060_split_L1J12', 'L1_J12', [], [PhysicsStream], ['RATE:SingleBJet', 'RATE:UpgradeBJet', 'RATE:UpgradeAll',  'BW:BJet'], -1],
+        ['3j50_gsc65_bmv2c2070_split_L13J15', 'L1_3J15', [], [PhysicsStream], ['RATE:MultiBJet', 'RATE:UpgradeBJet', 'RATE:UpgradeAll',  'BW:BJet'], -1],
+        ['j150_gsc175_bmv2c2060_split_j45_gsc60_bmv2c2060_split_L1J12', 'L1_J12', [], [PhysicsStream], ['RATE:MultiBJet', 'RATE:UpgradeBJet', 'RATE:UpgradeAll',  'BW:BJet'], -1],
+        ['j110_gsc150_boffperf_split_2j35_gsc55_bmv2c2060_split_L14J15', 'L1_4J15', [], [PhysicsStream], ['RATE:MultiBJet', 'RATE:UpgradeBJet', 'RATE:UpgradeAll',  'BW:BJet'], -1],
+        ['j50_gsc65_bmv2c2040_split_3j50_gsc65_boffperf_split_L14J15',      'L1_4J15', [], [PhysicsStream], ['RATE:SingleBJet', 'RATE:UpgradeBJet', 'RATE:UpgradeAll',   'BW:BJet'], -1],
+        ['j55_gsc75_bmv2c2040_split_3j55_gsc75_boffperf_split_L14J15',       'L1_4J15',        [], [PhysicsStream], ['RATE:SingleBJet', 'RATE:UpgradeBJet', 'RATE:UpgradeAll',  'BW:BJet'], -1],
+        ['j60_gsc85_bmv2c2050_split_3j60_gsc85_boffperf_split_L14J15',       'L1_4J15',        [], [PhysicsStream], ['RATE:SingleBJet', 'RATE:UpgradeBJet', 'RATE:UpgradeAll',  'BW:BJet'], -1],
+        
+        ]
+    
+    TriggerFlags.METSlice.signatures = [
+        
+        # Current primaries (2017 menu)
+        ['xe110_L1XE55',                      'L1_XE55',[], [PhysicsStream], ['RATE:MET', 'RATE:UpgradeMET', 'RATE:UpgradeAll', 'BW:MET'], -1],
+        ['xe110_pufit_L1XE55',                'L1_XE55',[], [PhysicsStream], ['RATE:MET', 'RATE:UpgradeMET', 'RATE:UpgradeAll', 'BW:MET'], -1],
+        ['xe110_pufit_L1XE60',                 'L1_XE60',[], [PhysicsStream], ['RATE:MET', 'RATE:UpgradeMET', 'RATE:UpgradeAll', 'BW:MET'], -1],
+        ['xe120_L1XE55',                      'L1_XE55',[], [PhysicsStream], ['RATE:MET', 'RATE:UpgradeMET', 'RATE:UpgradeAll', 'BW:MET'], -1],
+        ['xe120_mht_xe70_L1XE55','L1_XE55',  ['L1_XE55','L1_XE55'], [PhysicsStream], ['RATE:MET', 'RATE:UpgradeMET', 'RATE:UpgradeAll', 'BW:MET' ], -1, ['serial',-1,['xe120_mht','xe70_L1XE55'] ]],
+        ['xe120_mht_xe80_L1XE50','L1_XE50', ['L1_XE50','L1_XE50'], [PhysicsStream], ['RATE:MET', 'RATE:UpgradeMET', 'RATE:UpgradeAll', 'BW:MET' ], -1, ['serial',-1,['xe120_mht','xe80_L1XE50'] ]],
+        
+        #upgrade study chains
+        ['xe110_L1XE35',                      'L1_XE35',[], [PhysicsStream], ['RATE:MET', 'RATE:UpgradeMET', 'RATE:UpgradeAll', 'BW:MET'], -1],
+        ['xe110_pufit_L1XE35',                'L1_XE35',[], [PhysicsStream], ['RATE:MET', 'RATE:UpgradeMET', 'RATE:UpgradeAll', 'BW:MET'], -1],
+        ['xe120_mht_L1XE35_xe70_L1XE35','L1_XE35',  ['L1_XE35','L1_XE35'], [PhysicsStream], ['RATE:MET', 'RATE:UpgradeMET', 'RATE:UpgradeAll', 'BW:MET' ], -1, ['serial',-1,['xe120_mht_L1XE35','xe70_L1XE35'] ]],
+        ]
+    
+    TriggerFlags.TauSlice.signatures = [
+        # Current primaries (2017 menu)
+        ['tau160_medium1_tracktwo_L1TAU100',       'L1_TAU100', [], [PhysicsStream], ['RATE:SingleTau', 'RATE:UpgradeTau', 'RATE:UpgradeAll', 'BW:Tau'], -1],
+        ['tau80_medium1_tracktwo_L1TAU60_tau60_medium1_tracktwo_L1TAU40',   'L1_TAU60_2TAU40',['L1_TAU60','L1_TAU40'], [PhysicsStream], ['RATE:MultiTau', 'RATE:UpgradeTau', 'RATE:UpgradeAll',  'BW:Tau'], -1,['serial',-1,["tau80_medium1_tracktwo_L1TAU60","tau60_medium1_tracktwo_L1TAU40"]]]       ,
+        
+        #upgrade study chains
+        ['tau125_medium1_tracktwo_L1TAU12',       'L1_TAU12', [], [PhysicsStream], ['RATE:SingleTau', 'RATE:UpgradeTau', 'RATE:UpgradeAll', 'BW:Tau'], -1],
+        ['tau160_medium1_tracktwo_L1TAU12',       'L1_TAU12', [], [PhysicsStream], ['RATE:SingleTau', 'RATE:UpgradeTau', 'RATE:UpgradeAll', 'BW:Tau'], -1],
+        ['tau40_medium1_tracktwo_L1TAU20_tau29_medium1_tracktwo_L1TAU12',   'L1_TAU20_2TAU12',['L1_TAU20','L1_TAU12'], [PhysicsStream], ['RATE:MultiTau', 'RATE:UpgradeTau', 'RATE:UpgradeAll',  'BW:Tau'], -1,['serial',-1,["tau40_medium1_tracktwo_L1TAU20","tau29_medium1_tracktwo_L1TAU12"]]]       ,
+        
+        ]
+    
+    TriggerFlags.EgammaSlice.signatures = [
+        # Current primaries (2017 menu)
+        ['e28_lhtight_nod0_ivarloose',        'L1_EM24VHI', [], [PhysicsStream,'express'], ['RATE:SingleElectron', 'RATE:UpgradeElectron', 'RATE:UpgradeAll','BW:Egamma'],-1],
+        ['e60_lhmedium_nod0_L1EM24VHI', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'RATE:UpgradeElectron', 'RATE:UpgradeAll', 'BW:Egamma'],-1] ,
+        ['e60_medium_L1EM24VHI',        'L1_EM24VHI', [], [PhysicsStream], ['RATE:SingleElectron',  'RATE:UpgradeElectron', 'RATE:UpgradeAll', 'BW:Egamma'],-1], 
+        ['e140_lhloose_nod0_L1EM24VHI', 'L1_EM24VHI', [], [PhysicsStream], ['RATE:SingleElectron',  'RATE:UpgradeElectron', 'RATE:UpgradeAll', 'BW:Egamma'],-1],
+        ['2e24_lhvloose_nod0',                   'L1_2EM20VH', [], [PhysicsStream], ['RATE:MultiElectron',  'RATE:UpgradeElectron', 'RATE:UpgradeAll', 'BW:Egamma'],-1],
+        
+        ['g140_tight',        'L1_EM24VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'RATE:UpgradePhoton', 'RATE:UpgradeAll', 'BW:Egamma'],-1],
+        ['g200_loose',        'L1_EM24VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'RATE:UpgradePhoton', 'RATE:UpgradeAll', 'BW:Egamma'],-1],
+        ['2g25_tight_L12EM20VH',                    'L1_2EM20VH', [], [PhysicsStream], ['RATE:MultiPhoton',  'RATE:UpgradePhoton', 'RATE:UpgradeAll', 'BW:Egamma'],-1],
+        ['2g50_loose_L12EM20VH',                    'L1_2EM20VH', [], [PhysicsStream], ['RATE:MultiPhoton',  'RATE:UpgradePhoton', 'RATE:UpgradeAll', 'BW:Egamma'],-1], 
+        ['g35_medium_g25_medium_L12EM20VH',          'L1_2EM20VH', [], [PhysicsStream], ['RATE:MultiPhoton',  'RATE:UpgradePhoton', 'RATE:UpgradeAll', 'BW:Egamma'],-1],
+        
+        #upgrade study chains
+        ['e22_lhtight_nod0_ivarloose_L1EM15VHI',        'L1_EM15VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'RATE:UpgradeElectron', 'RATE:UpgradeAll','BW:Egamma'],-1],
+        ['e45_lhmedium_nod0_L1EM15VHI', 			'L1_EM15VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'RATE:UpgradeElectron', 'RATE:UpgradeAll', 'BW:Egamma'],-1], 
+        ['e45_medium_L1EM15VHI',               	 	'L1_EM15VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'RATE:UpgradeElectron', 'RATE:UpgradeAll', 'BW:Egamma'],-1], 
+        ['e60_lhloose_nod0_L1EM15VHI', 			'L1_EM15VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'RATE:UpgradeElectron', 'RATE:UpgradeAll', 'BW:Egamma'],-1],
+        ['2e15_lhvloose_nod0_L12EM10VH',                 'L1_2EM10VH', [], [PhysicsStream], ['RATE:MultiElectron',  'RATE:UpgradeElectron', 'RATE:UpgradeAll', 'BW:Egamma'],-1],
+        
+        ['g120_tight_L1EM15VHI',        				'L1_EM15VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'RATE:UpgradePhoton', 'RATE:UpgradeAll', 'BW:Egamma'],-1],
+        ['g120_loose_L1EM15VHI',        			'L1_EM15VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'RATE:UpgradePhoton', 'RATE:UpgradeAll', 'BW:Egamma'],-1],
+        ['g180_loose_L1EM15VHI',        			'L1_EM15VHI', [], [PhysicsStream], ['RATE:SinglePhoton', 'RATE:UpgradePhoton', 'RATE:UpgradeAll', 'BW:Egamma'],-1],
+        ['g35_medium_g25_medium_L12EM10VH',       'L1_2EM10VH', [], [PhysicsStream], ['RATE:MultiPhoton',  'RATE:UpgradePhoton', 'RATE:UpgradeAll', 'BW:Egamma'],-1],
+        ['2g50_loose_L12EM10VH',       			'L1_2EM10VH', [], [PhysicsStream], ['RATE:MultiPhoton',  'RATE:UpgradePhoton', 'RATE:UpgradeAll', 'BW:Egamma'],-1],
+        ['2g25_tight_L12EM10VH',       				'L1_2EM10VH', [], [PhysicsStream], ['RATE:MultiPhoton',  'RATE:UpgradePhoton', 'RATE:UpgradeAll', 'BW:Egamma'],-1],
+        ]
+
+    TriggerFlags.BphysicsSlice.signatures = [
+            ]
+
+
+    TriggerFlags.CombinedSlice.signatures = [
+# Current primaries (2017 menu)
+        ['j60_gsc100_bmv2c2050_split_xe80_mht_L1XE60','L1_XE60',[],[PhysicsStream], ['RATE:MultiBJet', 'RATE:UpgradeBJet', 'RATE:UpgradeAll',  'BW:BJet', 'BW:MET'], -1,['serial',-1,['j60_gsc100_bmv2c2050_split','xe80_mht_L1XE60']]],
+        ['2j45_bmv2c2070_split_xe80_mht_L12J15_XE55','L1_2J15_XE55',[],[PhysicsStream], ['RATE:MultiBJet', 'RATE:UpgradeBJet', 'RATE:UpgradeAll',  'BW:BJet', 'BW:MET'], -1,['serial',-1,['2j45_bmv2c2070_split','xe80_mht']]],
+        ['2j25_gsc45_bmv2c2070_split_xe80_mht_L12J15_XE55','L1_2J15_XE55',[],[PhysicsStream], ['RATE:MultiBJet', 'RATE:UpgradeBJet', 'RATE:UpgradeAll',  'BW:BJet', 'BW:MET'], -1,['serial',-1,['2j25_gsc45_bmv2c2070_split','xe80_mht']]],
+        ['3j35_bmv2c2077_split_xe60_mht_L13J15.0ETA25_XE40',"L1_3J15.0ETA25_XE40",[],[PhysicsStream], ['RATE:MultiBJet', 'RATE:UpgradeBJet', 'RATE:UpgradeAll',  'BW:BJet', 'BW:MET'], -1, ['serial',-1,['3j35_bmv2c2077_split','xe60_mht']]],
+        ['3j15_gsc35_bmv2c2077_split_xe60_mht_L13J15.0ETA25_XE40',"L1_3J15.0ETA25_XE40",[],[PhysicsStream], ['RATE:MultiBJet', 'RATE:UpgradeBJet', 'RATE:UpgradeAll',  'BW:BJet', 'BW:MET'], -1, ['serial',-1,['3j15_gsc35_bmv2c2077_split','xe60_mht']]],
+        ['j100_xe80',                    'L1_J40_XE50',['',''], [PhysicsStream], ['RATE:JetMET', 'RATE:UpgradeJetMET', 'RATE:UpgradeAll',  'BW:Jet', 'BW:MET'], -1,['serial',-1,["j100","xe80"]]],
+        ['j100_xe80_mht',                    'L1_J40_XE50',['',''], [PhysicsStream], ['RATE:JetMET', 'RATE:UpgradeJetMET', 'RATE:UpgradeAll',  'BW:Jet', 'BW:MET'], -1,['serial',-1,["j100","xe80_mht"]]],
+        ['j80_bmv2c2050_split_xe60_L12J50_XE40','L1_2J50_XE40',  [],  [PhysicsStream], ['RATE:JetMET', 'RATE:UpgradeJetMET', 'RATE:UpgradeAll','BW:MET', 'BW:BJet'], -1,['serial',-1,["j80_bmv2c2050_split","xe60"]]],
+        
+        #upgrade study chains
+        ['j60_gsc100_bmv2c2050_split_xe80_mht_L1XE35','L1_XE35',[],[PhysicsStream], ['RATE:MultiBJet', 'RATE:UpgradeBJet', 'RATE:UpgradeAll',  'BW:BJet', 'BW:MET'], -1,['serial',-1,['j60_gsc100_bmv2c2050_split','xe80_mht_L1XE35']]],
+        ['j80_bmv2c2050_split_xe60_L1XE35', 'L1_XE35',  [],  [PhysicsStream], ['RATE:JetMET', 'RATE:UpgradeJetMET', 'RATE:UpgradeAll','BW:MET', 'BW:BJet'], -1,['serial',-1,["j80_bmv2c2050_split","xe60_L1XE35"]]],
+        ['j80_xe80_L1XE35',                    'L1_XE35',['',''], [PhysicsStream], ['RATE:JetMET', 'RATE:UpgradeJetMET', 'RATE:UpgradeAll',  'BW:Jet', 'BW:MET'], -1,['serial',-1,["j80","xe80_L1XE35"]]],
+        #['j140_xe125_L1XE35',                'L1_XE35',['',''], [PhysicsStream], ['RATE:JetMET', 'RATE:UpgradeJetMET', 'RATE:UpgradeAll',  'BW:Jet', 'BW:MET'], -1,['serial',-1,["j140","xe125_L1XE35"]]],
+
+        ['j135_xe110_mht_L1XE35',                'L1_XE35',['',''], [PhysicsStream], ['RATE:JetMET', 'RATE:UpgradeJetMET', 'RATE:UpgradeAll',  'BW:Jet', 'BW:MET'], -1,['serial',-1,["j135","xe110_mht_L1XE35"]]],
+        ['j135_xe120_mht_L1XE35',                'L1_XE35',['',''], [PhysicsStream], ['RATE:JetMET', 'RATE:UpgradeJetMET', 'RATE:UpgradeAll',  'BW:Jet', 'BW:MET'], -1,['serial',-1,["j135","xe120_mht_L1XE35"]]],
+        
+        ]
+
+    TriggerFlags.HeavyIonSlice.signatures = [
+        ]
+
+    TriggerFlags.BeamspotSlice.signatures = [
+        ]
+
+    TriggerFlags.AFPSlice.signatures = [
+        ]
+
+    TriggerFlags.MinBiasSlice.signatures = [
+        ]
+        
+    TriggerFlags.CalibSlice.signatures   = [
+        ]
+
+    TriggerFlags.CosmicSlice.signatures  = [ 
+        ]
+
+    TriggerFlags.StreamingSlice.signatures = [
+        ]
+
+    TriggerFlags.MonitorSlice.signatures = [
+        ['costmonitor', '', [], ['CostMonitoring'], ['RATE:Monitoring','BW:Other'],1],
+        ]
+
+    TriggerFlags.EnhancedBiasSlice.signatures = [
+        ]
+
+    ###############################################################
+    #################################################################
+    signatureList=[]
+    for prop in dir(TriggerFlags):
+        if prop[-5:]=='Slice':
+            sliceName=prop
+            slice=getattr(TriggerFlags,sliceName)
+            if slice.signatures():
+                signatureList.extend(slice.signatures())
+            else:
+                log.debug('SKIPPING '+str(sliceName))
+    mySigList=[]
+    for allInfo in signatureList:
+        mySigList.append(allInfo[0])
+    mydict={}
+    for chain in mySigList:
+        mydict[chain]=[-1,0,0]
+    mydict.update(Prescales.HLTPrescales_cosmics)
+    from copy import deepcopy
+    Prescales.HLTPrescales_cosmics = deepcopy(mydict)
+
+
+#----------------------------------------------------------
+class Prescales:
+    #   Item name             | Prescale
+    #----------------------------------------------------------
+    L1Prescales = {}
+
+    #   Signature name   | [ HLTprescale, HLTpass-through, rerun]
+    #   - Prescale values should be a positive integer (default=1)
+    #   - If the current pass_through value is non-zero,
+    #     the value given here will be used as pass_through rate
+    #     Assuming that pass through chains are configured so
+    #     in the slice files and won't change. Also prescale
+    #     and pass_through will not be used together.
+    #   - If only the first value is specified,
+    #     the default value of pass-through (=0) will be used
+    #----------------------------------------------------------
+    HLTPrescales = {
+        #'larnoiseburst_rerun'       : [ 0, 0 , 1, "LArNoiseBurst"],
+        }
+
+    L1Prescales_cosmics  = {}
+    HLTPrescales_cosmics = {}
+    chain_list=[
+        #'sct_noise',
+        #'tilecalib_laser',
+        ]
+    HLTPrescales_cosmics.update(dict(map(None,chain_list,len(chain_list)*[ [1, 0, 0] ])))
+
+
+######################################################
+# TIGHT physics prescales
+######################################################
+from copy import deepcopy
+# enable if desired: # setting all L1 prescales to 1
+#Prescales.L1Prescales = dict([(ctpid,1) for ctpid in Prescales.L1Prescales]) 
+ 
+Prescales.L1Prescales_tight_physics_prescale  = deepcopy(Prescales.L1Prescales)
+Prescales.HLTPrescales_tight_physics_prescale = deepcopy(Prescales.HLTPrescales)
+
+chain_list=[]
+Prescales.HLTPrescales_tight_physics_prescale.update(dict(map(None,chain_list,len(chain_list)*[ [-1, 0,-1] ])))
+######################################################
+
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_pp_v6.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_pp_v6.py
index 7582b08488906319d0b7c246aa89bf4651ce6c61..5ce4c3868b235305a610dcb72e3643b29a9b9cd1 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_pp_v6.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_pp_v6.py
@@ -5,7 +5,7 @@ import TriggerMenu.menu.Physics_pp_v6 as physics_menu
 
 from TriggerJobOpts.TriggerFlags          import TriggerFlags
 from copy                                 import deepcopy
-
+import re
 
 
 from AthenaCommon.Logging import logging
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_pp_v7.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_pp_v7.py
index ff327cdc488c944ce10b620eede3e9d2a44796cd..c8caafd92870876f0191326a331e46444e909ce6 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_pp_v7.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_pp_v7.py
@@ -6,7 +6,7 @@ import TriggerMenu.menu.Physics_pp_v7 as physics_menu
 from TriggerJobOpts.TriggerFlags          import TriggerFlags
 from copy                                 import deepcopy
 
-
+import re
 
 from AthenaCommon.Logging import logging
 log = logging.getLogger( 'MC_pp_v7.py' )
@@ -25,8 +25,8 @@ def setupMenu():
     RATE_BphysTag      = 'RATE:Bphysics'
     RATE_BMultiMuonTag = 'RATE:MultiMuon'  # can become RATE:BMultiMuon' with one letter change 
     BW_BphysTag        = 'BW:Bphys'
-    RATE_DYTag         = 'RATE:Muon'   
-    BW_DYTag           = 'BW:Muon'   
+    #RATE_DYTag         = 'RATE:Muon'   #not being used at this time
+    #BW_DYTag           = 'BW:Muon'   
     
     
     # ---------------------------------------------------------------------------------------
@@ -35,24 +35,29 @@ def setupMenu():
     # ----------------------------------------------------------------------------------------
 
     TriggerFlags.TestSlice.signatures = TriggerFlags.TestSlice.signatures() + [
-			 ]
+        ]
+
+    TriggerFlags.AFPSlice.signatures = TriggerFlags.AFPSlice.signatures() + [
+        ['afp_L1AFP_A_AND_C_SPECTOF_J50', 'L1_AFP_A_AND_C_SPECTOF_J50', [],  ['MinBias'], [ 'RATE:MinBias','BW:MinBias'], -1],
+        #        ['afp_L1AFP_A_AND_C_SPECTOF_J50', 'L1_AFP_A_AND_C_SPECTOF_J50', [],  [PhysicsStream], [ 'RATE:MinBias','BW:MinBias'], -1],
+        ]
 
     TriggerFlags.MuonSlice.signatures = TriggerFlags.MuonSlice.signatures() + [
-        ['mu20_r1extr',            'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu10_r1extr',            'L1_MU10',           [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu4_r1extr',             'L1_MU4',            [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu24_icalo',             'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu24_iloosecalo',        'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu24_imediumcalo',       'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu26_ivarmediumcalo',    'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-
-        ['mu20_imedium_mu8noL1',    'L1_MU20MU21',     ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_imedium','mu8noL1']]],
-        ['mu20_iloose_mu8noL1',     'L1_MU20MU21',     ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_iloose','mu8noL1']]],
-        ['mu20_iloose_2mu4noL1',    'L1_MU20MU21',     ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_iloose','2mu4noL1']]],
+        ['mu20_r1extr',          'L1_MU20MU21',      ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu10_r1extr',          'L1_MU10',                   [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu4_r1extr',           'L1_MU4',                    [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu24_icalo',           'L1_MU20MU21',      ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu24_iloosecalo',      'L1_MU20MU21',      ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu24_imediumcalo',     'L1_MU20MU21',      ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu26_ivarmediumcalo',  'L1_MU20MU21',      ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+
+        ['mu20_imedium_mu8noL1',    'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_imedium','mu8noL1']]],
+        ['mu20_iloose_mu8noL1',     'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_iloose','mu8noL1']]],
+        ['mu20_iloose_2mu4noL1',    'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_iloose','2mu4noL1']]],
         ### ATR-14543
-        ['mu20_ivarmedium_mu8noL1',    'L1_MU20MU21',     ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_ivarmedium','mu8noL1']]],
-        ['mu20_ivarloose_mu8noL1',     'L1_MU20MU21',     ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_ivarloose','mu8noL1']]],
-        ['mu20_ivarloose_2mu4noL1',    'L1_MU20MU21',     ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_ivarloose','2mu4noL1']]],
+        ['mu20_ivarmedium_mu8noL1',    'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_ivarmedium','mu8noL1']]],
+        ['mu20_ivarloose_mu8noL1',     'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_ivarloose','mu8noL1']]],
+        ['mu20_ivarloose_2mu4noL1',    'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_ivarloose','2mu4noL1']]],
 
         # new test chains for dimuon inefficiency
         ['3mu4_noMuCombOvlpRm',    'L1_3MU4',           [], [PhysicsStream], ['RATE:MultiMuon', 'BW:Muon'], -1],
@@ -60,7 +65,7 @@ def setupMenu():
 
 
 
-         ['mu60_msonly_mu60noL1_msonly',  'L1_MU20MU21',     ['L1_MU20',''], [PhysicsStream],     ['RATE:MultiMuon','BW:Muon'],-1,['serial',-1,['mu60_msonly','mu60noL1_msonly']]],
+         ['mu60_msonly_mu60noL1_msonly',  'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream],     ['RATE:MultiMuon','BW:Muon'],-1,['serial',-1,['mu60_msonly','mu60noL1_msonly']]],
 
 
 
@@ -70,64 +75,58 @@ def setupMenu():
         ### ATR-14543
         ['mu14_ivarmedium_mu6noL1_msonly',    'L1_MU10',  ['L1_MU10',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu14_ivarmedium','mu6noL1_msonly']]],
         ['2mu6_mu4', 'L1_2MU6_3MU4', ['L1_2MU6','L1_MU4'], [PhysicsStream], ['RATE:MultiMuon', 'BW:Muon'], -1],
-        ['mu20_msonly_mu12noL1_msonly_nscan05_noComb',   'L1_MU20MU21',     ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu12noL1_msonly_nscan05_noComb']]],
+        ['mu20_msonly_mu12noL1_msonly_nscan05_noComb',   'L1_MU20MU21',   ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu12noL1_msonly_nscan05_noComb']]],
 
        # not working for now                                                                                                                                                                                   
-        ['mu20_msonly_mu6noL1_msonly_nscan05_noComb',       'L1_MU20MU21',     ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu6noL1_msonly_nscan05_noComb']]],
+        ['mu20_msonly_mu6noL1_msonly_nscan05_noComb',       'L1_MU20MU21',      ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu6noL1_msonly_nscan05_noComb']]],
 
         ['mu11_msonly_mu6noL1_msonly_nscan05_noComb',       'L1_MU10',      ['L1_MU10','L2_mu11_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu11_msonly','mu6noL1_msonly_nscan05_noComb']]],
         ['mu11_msonly_mu6noL1_msonly_nscan05_noComb_L1MU4_EMPTY',       'L1_MU4_EMPTY',        ['L1_MU10','L2_mu11_msonly'], ["Late"], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu11_msonly','mu6noL1_msonly_nscan05_noComb']]],
         ['mu11_msonly_mu6noL1_msonly_nscan05_noComb_L1MU4_UNPAIRED_ISO','L1_MU4_UNPAIRED_ISO', ['L1_MU10','L2_mu11_msonly'], ["Late"], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu11_msonly','mu6noL1_msonly_nscan05_noComb']]],
 
         ### ATR-14377: duplicate noComb chains with leading-leg AND nscan-leg noComb
-        ['mu20_msonly_noComb_mu12noL1_msonly_nscan05_noComb',   'L1_MU20MU21',     ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_noComb','mu12noL1_msonly_nscan05_noComb']]],
-        ['mu20_msonly_noComb_mu6noL1_msonly_nscan05_noComb',       'L1_MU20MU21',     ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_noComb','mu6noL1_msonly_nscan05_noComb']]],
+        ['mu20_msonly_noComb_mu12noL1_msonly_nscan05_noComb',   'L1_MU20MU21',   ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_noComb','mu12noL1_msonly_nscan05_noComb']]],
+        ['mu20_msonly_noComb_mu6noL1_msonly_nscan05_noComb',       'L1_MU20MU21',      ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_noComb','mu6noL1_msonly_nscan05_noComb']]],
         ['mu11_msonly_noComb_mu6noL1_msonly_nscan05_noComb',       'L1_MU10',      ['L1_MU10','L2_mu11_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu11_msonly_noComb','mu6noL1_msonly_nscan05_noComb']]],
         ['mu11_msonly_noComb_mu6noL1_msonly_nscan05_noComb_L1MU4_EMPTY',       'L1_MU4_EMPTY',        ['L1_MU10','L2_mu11_msonly'], ["Late"], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu11_msonly_noComb','mu6noL1_msonly_nscan05_noComb']]],
         ['mu11_msonly_noComb_mu6noL1_msonly_nscan05_noComb_L1MU4_UNPAIRED_ISO','L1_MU4_UNPAIRED_ISO', ['L1_MU10','L2_mu11_msonly'], ["Late"], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu11_msonly_noComb','mu6noL1_msonly_nscan05_noComb']]],
 
         ### ATR-14377: duplicate noComb chains with leading-leg-only noComb
-        ['mu20_msonly_noComb_mu12noL1_msonly_nscan05',   'L1_MU20MU21',     ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_noComb','mu12noL1_msonly_nscan05']]],
-        ['mu20_msonly_noComb_mu6noL1_msonly_nscan05',       'L1_MU20MU21',     ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_noComb','mu6noL1_msonly_nscan05']]],
+        ['mu20_msonly_noComb_mu12noL1_msonly_nscan05',   'L1_MU20MU21',   ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_noComb','mu12noL1_msonly_nscan05']]],
+        ['mu20_msonly_noComb_mu6noL1_msonly_nscan05',       'L1_MU20MU21',      ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_noComb','mu6noL1_msonly_nscan05']]],
         ['mu11_msonly_noComb_mu6noL1_msonly_nscan05',       'L1_MU10',      ['L1_MU10','L2_mu11_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu11_msonly_noComb','mu6noL1_msonly_nscan05']]],
         ['mu11_msonly_noComb_mu6noL1_msonly_nscan05_L1MU4_EMPTY',       'L1_MU4_EMPTY',        ['L1_MU10','L2_mu11_msonly'], ["Late"], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu11_msonly_noComb','mu6noL1_msonly_nscan05']]],
         ['mu11_msonly_noComb_mu6noL1_msonly_nscan05_L1MU4_UNPAIRED_ISO','L1_MU4_UNPAIRED_ISO', ['L1_MU10','L2_mu11_msonly'], ["Late"], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu11_msonly_noComb','mu6noL1_msonly_nscan05']]],
 
 
         ### ATR-14377: remove noComb for tests
-        ['mu20_msonly_mu15noL1_msonly_nscan05', 'L1_MU20MU21',     ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu15noL1_msonly_nscan05']]],
+        ['mu20_msonly_mu15noL1_msonly_nscan05', 'L1_MU20MU21',   ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu15noL1_msonly_nscan05']]],
 
 
         ### ATR-14377: nscan with iloosems legs
-        ['mu20_msonly_iloosems_mu10noL1_msonly_nscan05_noComb',   'L1_MU20MU21',     ['L1_MU20','L2_mu20_msonly_iloosems'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_iloosems','mu10noL1_msonly_nscan05_noComb']]],
-        ['mu20_msonly_iloosems_mu10noL1_msonly_nscan03_noComb',   'L1_MU20MU21',     ['L1_MU20','L2_mu20_msonly_iloosems'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_iloosems','mu10noL1_msonly_nscan03_noComb']]],
-        ['mu20_msonly_iloosems_mu15noL1_msonly_nscan05_noComb',   'L1_MU20MU21',     ['L1_MU20','L2_mu20_msonly_iloosems'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_iloosems','mu15noL1_msonly_nscan05_noComb']]],
-        ['mu20_msonly_iloosems_mu15noL1_msonly_nscan03_noComb',   'L1_MU20MU21',     ['L1_MU20','L2_mu20_msonly_iloosems'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_iloosems','mu15noL1_msonly_nscan03_noComb']]],
-        ['mu20_msonly_iloosems_mu12noL1_msonly_nscan03_noComb',   'L1_MU20MU21',     ['L1_MU20','L2_mu20_msonly_iloosems'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_iloosems','mu12noL1_msonly_nscan03_noComb']]],
-        ['mu20_msonly_iloosems_mu6noL1_msonly_nscan05',        'L1_MU20MU21',     ['L1_MU20','L2_mu20_msonly_iloosems'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_iloosems','mu6noL1_msonly_nscan05']]],
-        ['mu20_msonly_iloosems_mu6noL1_msonly_nscan05_noComb',        'L1_MU20MU21',     ['L1_MU20','L2_mu20_msonly_iloosems'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_iloosems','mu6noL1_msonly_nscan05_noComb']]],
-        ['mu20_msonly_mu6noL1_msonly_nscan03',                 'L1_MU20MU21',     ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu6noL1_msonly_nscan03']]],
-        ['mu20_msonly_iloosems_mu6noL1_msonly_nscan03',        'L1_MU20MU21',     ['L1_MU20','L2_mu20_msonly_iloosems'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_iloosems','mu6noL1_msonly_nscan03']]],
-        ['mu20_msonly_iloosems_mu6noL1_msonly_nscan03_noComb', 'L1_MU20MU21',     ['L1_MU20','L2_mu20_msonly_iloosems'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_iloosems','mu6noL1_msonly_nscan03_noComb']]],
+        ['mu20_msonly_iloosems_mu10noL1_msonly_nscan05_noComb',   'L1_MU20MU21',   ['L1_MU20','L2_mu20_msonly_iloosems'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_iloosems','mu10noL1_msonly_nscan05_noComb']]],
+        ['mu20_msonly_iloosems_mu10noL1_msonly_nscan03_noComb',   'L1_MU20MU21',   ['L1_MU20','L2_mu20_msonly_iloosems'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_iloosems','mu10noL1_msonly_nscan03_noComb']]],
+        ['mu20_msonly_iloosems_mu15noL1_msonly_nscan05_noComb',   'L1_MU20MU21',   ['L1_MU20','L2_mu20_msonly_iloosems'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_iloosems','mu15noL1_msonly_nscan05_noComb']]],
+        ['mu20_msonly_iloosems_mu15noL1_msonly_nscan03_noComb',   'L1_MU20MU21',   ['L1_MU20','L2_mu20_msonly_iloosems'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_iloosems','mu15noL1_msonly_nscan03_noComb']]],
+        ['mu20_msonly_iloosems_mu12noL1_msonly_nscan03_noComb',   'L1_MU20MU21',   ['L1_MU20','L2_mu20_msonly_iloosems'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_iloosems','mu12noL1_msonly_nscan03_noComb']]],
+        ['mu20_msonly_iloosems_mu6noL1_msonly_nscan05',           'L1_MU20MU21', ['L1_MU20','L2_mu20_msonly_iloosems'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_iloosems','mu6noL1_msonly_nscan05']]],
+        ['mu20_msonly_iloosems_mu6noL1_msonly_nscan05_noComb',    'L1_MU20MU21', ['L1_MU20','L2_mu20_msonly_iloosems'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_iloosems','mu6noL1_msonly_nscan05_noComb']]],
+        ['mu20_msonly_mu6noL1_msonly_nscan03',                 'L1_MU20MU21', ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu6noL1_msonly_nscan03']]],
+        ['mu20_msonly_iloosems_mu6noL1_msonly_nscan03',        'L1_MU20MU21', ['L1_MU20','L2_mu20_msonly_iloosems'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_iloosems','mu6noL1_msonly_nscan03']]],
+        ['mu20_msonly_iloosems_mu6noL1_msonly_nscan03_noComb', 'L1_MU20MU21', ['L1_MU20','L2_mu20_msonly_iloosems'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_iloosems','mu6noL1_msonly_nscan03_noComb']]],
 
        
-        ['mu22_iloose_mu8noL1_calotag_0eta010', 'L1_MU20MU21',     ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu22_iloose','mu8noL1_calotag_0eta010']]],
-        ['mu24_iloose_mu8noL1_calotag_0eta010', 'L1_MU20MU21',     ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu24_iloose','mu8noL1_calotag_0eta010']]],
+        ['mu22_iloose_mu8noL1_calotag_0eta010', 'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu22_iloose','mu8noL1_calotag_0eta010']]],
+        ['mu24_iloose_mu8noL1_calotag_0eta010', 'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu24_iloose','mu8noL1_calotag_0eta010']]],
         ### ATR-14543
-        ['mu22_ivarloose_mu8noL1_calotag_0eta010', 'L1_MU20MU21',     ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu22_ivarloose','mu8noL1_calotag_0eta010']]],
-        ['mu24_ivarloose_mu8noL1_calotag_0eta010', 'L1_MU20MU21',     ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu24_ivarloose','mu8noL1_calotag_0eta010']]],
-
-
-        ['mu20_nomucomb_2mu4noL1', 'L1_MU20MU21',     ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_nomucomb','2mu4noL1']]],
-        ['mu22_nomucomb_2mu4noL1', 'L1_MU20MU21',     ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu22_nomucomb','2mu4noL1']]],
-        ['mu20_nomucomb_mu8noL1' , 'L1_MU20MU21',     ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_nomucomb','mu8noL1']]],
-        ['mu22_nomucomb_mu8noL1' , 'L1_MU20MU21',     ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu22_nomucomb','mu8noL1']]],
-
+        ['mu22_ivarloose_mu8noL1_calotag_0eta010', 'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu22_ivarloose','mu8noL1_calotag_0eta010']]],
+        ['mu24_ivarloose_mu8noL1_calotag_0eta010', 'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu24_ivarloose','mu8noL1_calotag_0eta010']]],
 
 
-        ['mu10_mgonly_L1LATE-MU10_J50',          'L1_LATE-MU10_J50',           [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu10_mgonly_L1LATE-MU10_XE50',         'L1_LATE-MU10_XE50',          [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-
+        ['mu20_nomucomb_2mu4noL1', 'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_nomucomb','2mu4noL1']]],
+        ['mu22_nomucomb_2mu4noL1', 'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu22_nomucomb','2mu4noL1']]],
+        ['mu20_nomucomb_mu8noL1' , 'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_nomucomb','mu8noL1']]],
+        ['mu22_nomucomb_mu8noL1' , 'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu22_nomucomb','mu8noL1']]],
 
         ['mu8',                    'L1_MU6',            [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], 
         ['3mu6_nomucomb',                   'L1_3MU6',           [], [PhysicsStream], ['RATE:MultiMuon', 'BW:Muon'], -1],
@@ -135,7 +134,8 @@ def setupMenu():
         ['mu4_mu4noL1',            'L1_MU4',  ['L1_MU4',''],  [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu4','mu4noL1']]],
 	['mu4noL1',                '',  [],  [PhysicsStream], ['RATE:SingleMuon','BW:Muon'], -1, ],
 	['mu0noL1',                '',  [],  [PhysicsStream], ['RATE:SingleMuon','BW:Muon'], -1, ],
-        
+       
+ 
         # Toroid-off run (ATR-9923)
         ['mu11_L1MU10_2mu4noL1_nscan03_L1MU10_2MU6', 'L1_MU10_2MU6', ['L1_MU10','L2_mu11_L1MU10'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu11_L1MU10','2mu4noL1_nscan03']]],
         ['mu11_2mu4noL1_nscan03_L1MU11_2MU6',      'L1_MU11_2MU6',    ['L1_MU11','L2_mu11'],        [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu11','2mu4noL1_nscan03']]],
@@ -146,12 +146,12 @@ def setupMenu():
 
     if TriggerFlags.doFTK():
         TriggerFlags.MuonSlice.signatures = TriggerFlags.MuonSlice.signatures() + [
-            ['mu24_idperf_FTK',            'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1], 
-            ['mu6_idperf_FTK',             'L1_MU6',            [], [PhysicsStream, 'express'], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1],
-            ['mu24_idperf_FTKRefit',       'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1], 
-            ['mu6_idperf_FTKRefit',        'L1_MU6',            [], [PhysicsStream, 'express'], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1],
-            ['mu22_mu8noL1_ftkFS',         'L1_MU20MU21',     ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu22','mu8noL1_ftkFS']]],
-            ['mu26_ivarmedium_ftk',        'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+            ['mu24_idperf_FTK',            'L1_MU20MU21',    ['L1_MU20'], [PhysicsStream], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1], 
+            ['mu6_idperf_FTK',             'L1_MU6',                  [], [PhysicsStream, 'express'], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1],
+            ['mu24_idperf_FTKRefit',       'L1_MU20MU21',    ['L1_MU20'], [PhysicsStream], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1], 
+            ['mu6_idperf_FTKRefit',        'L1_MU6',                  [], [PhysicsStream, 'express'], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1],
+            ['mu22_mu8noL1_FTKFS',         'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu22','mu8noL1_FTKFS']]],
+            ['mu26_ivarmedium_FTK',        'L1_MU20MU21',    ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
             ]
 
     TriggerFlags.JetSlice.signatures = TriggerFlags.JetSlice.signatures() + [
@@ -227,6 +227,9 @@ def setupMenu():
         ['j60_tc_lcw_nojcalib',     'L1_J20',  [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1],
         ['j60_tc_lcw_sub',          'L1_J20',  [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1],
 
+        # Moved from Physics menu
+        ['j35_sktc_lcw_nojcalib',       'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet',  'BW:Jet'], -1],
+
 
 
         #####
@@ -993,8 +996,6 @@ def setupMenu():
         ['e20_mergedtight_g35_medium',           'L1_2EM15VH', [], [PhysicsStream], ['RATE:ElectronPhoton', 'BW:Egamma'], -1,['parallel',-1,[] ]],
 
         ['e20_mergedtight',                      'L1_EM15VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'], -1],
-        ['e25_mergedtight',                      'L1_EM20VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'], -1],
-        ['e30_mergedtight',                      'L1_EM20VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'], -1],
 
 
         # Fall-back if problem with new tracking kept as before)
@@ -1042,6 +1043,8 @@ def setupMenu():
     ###########################################################################################################
     TriggerFlags.BphysicsSlice.signatures = TriggerFlags.BphysicsSlice.signatures() + [
 
+	['mu11_mu6_bTau',                  'L1_MU11_2MU6', ['L1_MU11','L1_MU6'], [BPhysicsStream, 'express'], [RATE_BphysTag,BW_BphysTag], -1],
+	
         #['2mu6_bMuMu_L12MU6', 'L1_2MU6', [], [PhysicsStream], [], -1], 
 
         ['2mu4_bBmumu_noL2',    'L1_2MU4', [], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1],
@@ -1070,12 +1073,12 @@ def setupMenu():
         ['3mu4_mu2noL1_bNocut', 'L1_3MU4', ['L1_3MU4',''], [BMultiMuonStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['3mu4','mu2noL1']]],
         ['3mu4_mu4noL1_bNocut', 'L1_3MU4', ['L1_3MU4',''], [BMultiMuonStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['3mu4','mu4noL1']]],
 
-        ['mu20_2mu2noL1_bNocut', 'L1_MU20MU21',     ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20','2mu2noL1_bNocut']]],
+        ['mu20_2mu2noL1_bNocut', 'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20','2mu2noL1_bNocut']]],
 
         
-        ['mu20_2mu2noL1_bDimu', 'L1_MU20MU21',     ['L1_MU20',''], [BPhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20','2mu2noL1_bNocut']]],
-        ['mu20_2mu2noL1_bDimu2700', 'L1_MU20MU21',     ['L1_MU20',''], [BPhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20','2mu2noL1_bNocut']]],
-        ['mu20_2mu2noL1_bTau', 'L1_MU20MU21',     ['L1_MU20',''], [BPhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20','2mu2noL1_bNocut']]],
+        ['mu20_2mu2noL1_bDimu', 'L1_MU20MU21', ['L1_MU20',''], [BPhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20','2mu2noL1_bNocut']]],
+        ['mu20_2mu2noL1_bDimu2700', 'L1_MU20MU21', ['L1_MU20',''], [BPhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20','2mu2noL1_bNocut']]],
+        ['mu20_2mu2noL1_bTau', 'L1_MU20MU21', ['L1_MU20',''], [BPhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20','2mu2noL1_bNocut']]],
 
         # chains with EF B-physics selection skipped
         ['2mu4_bJpsimumu_noEFbph',                    'L1_2MU4', [], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1],
@@ -1116,9 +1119,9 @@ def setupMenu():
         ['2mu6_mu4_bDimu', 'L1_2MU6_3MU4', ['L1_2MU6','L1_MU4'], [BMultiMuonStream], [RATE_BMultiMuonTag, 'BW:Muon'], -1],
         
         # chains for Bs->mumuPhi and Bs->J/psiPhi 
-        ['mu6_mu4_bBmumux_BsJpsiPhi_delayed',                    'L1_MU6_2MU4', ['L1_MU6','L1_MU4'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1],
-        ['2mu6_bBmumux_BsJpsiPhi_delayed',                    'L1_2MU6', [], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1],
-        ['mu10_mu6_bBmumux_BsJpsiPhi_delayed',            'L1_MU10_2MU6', ['L1_MU10','L1_MU6'],[BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1],
+        ['mu6_mu4_bBmumux_BsJpsiPhi',                    'L1_MU6_2MU4', ['L1_MU6','L1_MU4'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1],
+        ['2mu6_bBmumux_BsJpsiPhi',                    'L1_2MU6', [], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1],
+        ['mu10_mu6_bBmumux_BsJpsiPhi',            'L1_MU10_2MU6', ['L1_MU10','L1_MU6'],[BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1],
 
 
         # Narrow-scan chains seeded L1_MU11_2MU6
@@ -1177,8 +1180,7 @@ def setupMenu():
         ['2mu4_bBmumuxv2_noL2_L1BPH-2M8-2MU4-B_BPH-0DR15-2MU4',  'L1_BPH-2M8-2MU4-B_BPH-0DR15-2MU4',     ['L1_2MU4'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False],
         ['2mu4_bBmumux_BcmumuDsloose_noL2_L1BPH-2M8-2MU4-B_BPH-0DR15-2MU4',  'L1_BPH-2M8-2MU4-B_BPH-0DR15-2MU4',     ['L1_2MU4'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False],
           
-        ['mu6_mu4_bUpsimumu_L1BPH-8M15-MU6MU4_BPH-0DR22-MU6MU4-B', 'L1_BPH-8M15-MU6MU4_BPH-0DR22-MU6MU4-B',     ['L1_MU6','L1_MU4'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False],
-        ['mu6_mu4_bUpsimumu_L1BPH-8M15-MU6MU4_BPH-0DR22-MU6MU4-BO', 'L1_BPH-8M15-MU6MU4_BPH-0DR22-MU6MU4-BO',     ['L1_MU6','L1_MU4'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False],
+        ['mu6_mu4_bUpsimumu_L1BPH-8M15-MU6MU4_BPH-0DR22-MU6MU4-B', 'L1_BPH-8M15-MU6MU4_BPH-0DR22-MU6MU4-B',     ['L1_MU6','L1_MU4'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False], 
 
 
         ['2mu4_bBmumuxv2',                'L1_2MU4', [], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1],
@@ -1307,7 +1309,7 @@ def setupMenu():
         ['2mu6_bBmumux_BcmumuDsloose_noL2_L1BPH-2M9-2MU6_BPH-2DR15-2MU6',  'L1_BPH-2M9-2MU6_BPH-2DR15-2MU6',     ['L1_2MU6'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False],
         
        
-       ['2mu6_bTau_L1LFV-MU6_delayed',  'L1_LFV-MU6', ['L1_2MU6'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False],
+       ['2mu6_bTau_L1LFV-MU6',  'L1_LFV-MU6', ['L1_2MU6'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False],
        ['2mu6_bPhi_L1LFV-MU6',  'L1_LFV-MU6', ['L1_2MU6'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False],
 
        ### ATR-15263
@@ -1900,10 +1902,10 @@ def setupMenu():
 
     if TriggerFlags.doFTK():
         TriggerFlags.BeamspotSlice.signatures = TriggerFlags.BeamspotSlice.signatures() + [                                                                 
-            ['beamspot_idperf_FTK',          'L1_4J15', [], ["BeamSpot"], ['RATE:BeamSpot',  'BW:BeamSpot'], -1],
-            ['beamspot_trkFS_FTK',           'L1_4J15', [], ["BeamSpot"], ['RATE:BeamSpot',  'BW:BeamSpot'], -1],
-            ['beamspot_trkFS_FTKRefit', 'L1_4J15', [], ["BeamSpot"], ['RATE:BeamSpot', 'BW:BeamSpot'], -1],
-            ['beamspot_idperf_FTKRefit', 'L1_4J15', [], ["BeamSpot"], ['RATE:BeamSpot', 'BW:BeamSpot'], -1],       
+            ['beamspot_idperf_FTK',          'L1_4J20', [], ["BeamSpot"], ['RATE:BeamSpot',  'BW:BeamSpot'], -1],
+            ['beamspot_trkFS_FTK',           'L1_4J20', [], ["BeamSpot"], ['RATE:BeamSpot',  'BW:BeamSpot'], -1],
+            ['beamspot_trkFS_FTKRefit', 'L1_4J20', [], ["BeamSpot"], ['RATE:BeamSpot', 'BW:BeamSpot'], -1],
+            ['beamspot_idperf_FTKRefit', 'L1_4J20', [], ["BeamSpot"], ['RATE:BeamSpot', 'BW:BeamSpot'], -1],
             ]
 
     ## The following slices are only needed for Physics runnings and LS1 menus
@@ -2160,6 +2162,12 @@ ps_beamspot_list=[
     'beamspot_trkFS_trkfast',
     'beamspot_trkFS_trkfast_L1TRT_EMPTY',
     'beamspot_trkFS_trkfast_L1TRT_FILLED',
+    'beamspot_trkFS_trkfast_L1J15',
+    'beamspot_allTE_trkfast_peb_L1J15',
+    'beamspot_activeTE_trkfast_peb_L1J15',
+    'beamspot_allTE_trkfast_peb_L13J15',
+    'beamspot_trkFS_trkfast_L13J15',
+    'beamspot_activeTE_trkfast_peb_L13J15'
     ]
 ps_fwdphys_list=[
     'lhcfpeb',
@@ -2422,6 +2430,7 @@ ps_minb_list=[
     'mb_sp_L1RD0_UNPAIRED_ISO',
     'mb_sp_ncb_L1RD0_UNPAIRED_ISO',
     'mb_sp_blayer_L1RD0_UNPAIRED_ISO',
+    'mb_sp_L1RD0_FILLED',
     'mb_sptrk_L1RD3_FILLED',
     'mb_sptrk_noisesup',
     'mb_sptrk_noisesup_L1RD0_EMPTY',
@@ -2487,6 +2496,7 @@ ps_rerun_list = [
     'xe0noL1_l2fsperf_pufit',
     'xe0noL1_l2fsperf_tc_em',
     'xe0noL1_l2fsperf_tc_lcw',
+    'mu0noL1'
     ]
 
 if TriggerFlags.doFTK():
@@ -2666,6 +2676,12 @@ ps_perform_list = [
     '2j55_bperf_split_L1J30_2J20_4J20.0ETA49_MJJ-700',
     '2j55_bperf_split_L1J30_2J20_4J20.0ETA49_MJJ-800',
     '2j55_bperf_split_L1J30_2J20_4J20.0ETA49_MJJ-900',
+    'j15_gsc35_boffperf_split',
+    'j25_bperf_split',
+    'j25_boffperf',
+    'e4_etcut',
+    'e5_lhmedium_nod0',
+    'e5_lhloose_nod0_idperf'
     ]
 
 ps_Jpsi_list = [
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/MenuUtil.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/MenuUtil.py
index 68c966865d93f2aa6b5920593e37c910437889de..a8a79642274fc6311423a3615693759c43831ffb 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/menu/MenuUtil.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/MenuUtil.py
@@ -116,7 +116,6 @@ def checkStreamConsistency(triggerPythonConfig):
     """
     menu_name = TriggerFlags.triggerMenuSetup()
     log.info( "Menu: " + menu_name)
-    CheckGroups=False
 
     from TriggerMenu.menu.StreamInfo       import getAllStreams
 
@@ -219,6 +218,7 @@ def allSignatures():
         TriggerFlags.METSlice,
         TriggerFlags.TauSlice,
         TriggerFlags.EgammaSlice,
+        TriggerFlags.AFPSlice,
         TriggerFlags.MinBiasSlice,
         TriggerFlags.CombinedSlice,
         )
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_HI_v3.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_HI_v3.py
index 054034eb0df7139a64b4306707722f854ad331f8..4a5b85384559065dc37e5cc513bf2aa5af94fcda 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_HI_v3.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_HI_v3.py
@@ -4,7 +4,6 @@
 #------------------------------------------------------------------------#
 def setupMenu():
     
-    from TriggerMenu.menu.TriggerPythonConfig import TriggerPythonConfig
     from TriggerJobOpts.TriggerFlags          import TriggerFlags
     from AthenaCommon.Logging                 import logging
     log = logging.getLogger( 'TriggerMenu.menu.Physics_HI_v3.py' )
@@ -32,6 +31,8 @@ def setupMenu():
     TriggerFlags.Slices_all_setOff()
 
     TriggerFlags.TestSlice.signatures = [] 
+
+    TriggerFlags.AFPSlice.signatures = []
     
     TriggerFlags.MuonSlice.signatures = [
 	#ID tracking performance
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_HI_v4.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_HI_v4.py
index 79961a7ca88d6c316067e71059557d7b3964c25d..4f62298e6f696735da378cd508e55dfdc37ec1c5 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_HI_v4.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_HI_v4.py
@@ -4,7 +4,6 @@
 #------------------------------------------------------------------------#
 def setupMenu():
     
-    from TriggerMenu.menu.TriggerPythonConfig import TriggerPythonConfig
     from TriggerJobOpts.TriggerFlags          import TriggerFlags
     from AthenaCommon.Logging                 import logging
     log = logging.getLogger( 'TriggerMenu.menu.Physics_HI_v4.py' )
@@ -32,6 +31,8 @@ def setupMenu():
     TriggerFlags.Slices_all_setOff()
 
     TriggerFlags.TestSlice.signatures = [] 
+
+    TriggerFlags.AFPSlice.signatures = []
     
     TriggerFlags.MuonSlice.signatures = [
 	#ID tracking performance
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_pp_v6.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_pp_v6.py
index b06da53bfeee46ba8d21a6f433e9dad62cc98ba3..4725919009d5060af514368e7576800f729f966d 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_pp_v6.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_pp_v6.py
@@ -4,7 +4,6 @@
 #------------------------------------------------------------------------#
 def setupMenu():
 
-    from TriggerMenu.menu.TriggerPythonConfig import TriggerPythonConfig
     from TriggerJobOpts.TriggerFlags          import TriggerFlags
     from AthenaCommon.Logging                 import logging
     log = logging.getLogger( 'TriggerMenu.menu.Physics_pp_v6.py' )
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_pp_v7.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_pp_v7.py
index 70f3cf538916c40943daee7bebf463eeca26a314..5e5f14b69c8839559101086f21d72721f811b3fb 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_pp_v7.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_pp_v7.py
@@ -4,7 +4,6 @@
 #------------------------------------------------------------------------#
 def setupMenu():
 
-    from TriggerMenu.menu.TriggerPythonConfig import TriggerPythonConfig
     from TriggerJobOpts.TriggerFlags          import TriggerFlags
     from AthenaCommon.Logging                 import logging
     log = logging.getLogger( 'TriggerMenu.menu.Physics_pp_v7.py' )
@@ -21,7 +20,7 @@ def setupMenu():
     BPhysicsStream     = "BphysLS"
     BMultiMuonStream   = "Main"  
     RATE_BphysTag      = 'RATE:Bphysics'
-    RATE_BMultiMuonTag = 'RATE:MultiMuon'  # can become RATE:BMultiMuon' with one letter change 
+    RATE_BMultiMuonTag = 'RATE:BMultiMuon'  # can become RATE:BMultiMuon' with one letter change 
     BW_BphysTag        = 'BW:Bphys'
     RATE_DYTag         = 'RATE:Muon'   
     BW_DYTag           = 'BW:Muon'   
@@ -41,35 +40,36 @@ def setupMenu():
 
     TriggerFlags.TestSlice.signatures = []
 
+    TriggerFlags.AFPSlice.signatures = []
 
     TriggerFlags.MuonSlice.signatures = [
         # single muon
 
-        ['mu24_ivarloose', 'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu24_iloose', 'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu24_ivarmedium',	      'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu26_ivarmedium',	     'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream, 'express'], ['RATE:SingleMuon', 'BW:Muon'], -1],
-#        ['mu26_ivarmedium_zROItest', 'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu28_ivarmedium',	     'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu35_ivarmedium',	     'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-
-        ['mu0_perf',              'L1_MU4',            [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], 
-        ['mu26_imedium',          'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu28_imedium',          'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu100',                 'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu80',                  'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu50',                  'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu60',                  'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu60_0eta105_msonly',   'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu40',                   'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu24_imedium',           'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu24_ivarloose',           'L1_MU20MU21',   ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu24_iloose',              'L1_MU20MU21',   ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu24_ivarmedium',	     'L1_MU20MU21',   ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu26_ivarmedium',	     'L1_MU20MU21',   ['L1_MU20'], [PhysicsStream, 'express'], ['RATE:SingleMuon', 'BW:Muon'], -1],
+#        ['mu26_ivarmedium_zROItest', 'L1_MU20MU21',   ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu28_ivarmedium',	     'L1_MU20MU21',   ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu35_ivarmedium',	     'L1_MU20MU21',   ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+
+        ['mu0_perf',               'L1_MU4',            [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1], 
+        ['mu26_imedium',           'L1_MU20MU21',   ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu28_imedium',           'L1_MU20MU21',   ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu100',                  'L1_MU20MU21',   ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu80',                   'L1_MU20MU21',   ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu50',                   'L1_MU20MU21',   ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu60',                   'L1_MU20MU21',   ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu60_0eta105_msonly',    'L1_MU20MU21',   ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu40',                   'L1_MU20MU21',   ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu24_imedium',           'L1_MU20MU21',   ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
         ['mu20_imedium_L1MU10',    'L1_MU10',           [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
         ['mu20_ivarmedium_L1MU10', 'L1_MU10',           [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu26',                   'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu22',                   'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu20',                   'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu24',                   'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream, 'express'], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu20_msonly',            'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu26',                   'L1_MU20MU21',   ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu22',                   'L1_MU20MU21',   ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu20',                   'L1_MU20MU21',   ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu24',                   'L1_MU20MU21',   ['L1_MU20'], [PhysicsStream, 'express'], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu20_msonly',            'L1_MU20MU21',   ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
         ['mu14',                   'L1_MU10',           [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
         ['mu11',                   'L1_MU10',           [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
         ['mu14_iloose',            'L1_MU10',           [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
@@ -80,8 +80,8 @@ def setupMenu():
         ['mu6_msonly',             'L1_MU6',            [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
         ['mu4',                    'L1_MU4',            [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
         ['mu4_msonly',             'L1_MU4',            [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu24_idperf',            'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1],
-        ['mu20_idperf',            'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream, 'express'], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1],
+        ['mu24_idperf',            'L1_MU20MU21',   ['L1_MU20'], [PhysicsStream], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1],
+        ['mu20_idperf',            'L1_MU20MU21',   ['L1_MU20'], [PhysicsStream, 'express'], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1],
         ['mu10_idperf',            'L1_MU10',           [], [PhysicsStream], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1],
         ['mu6_idperf',             'L1_MU6',            [], [PhysicsStream, 'express'], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1],
         ['mu4_idperf',             'L1_MU4',            [], [PhysicsStream], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1],
@@ -91,7 +91,7 @@ def setupMenu():
         ['mu10_nomucomb',                   'L1_MU10',           [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
         ['mu11_nomucomb',                   'L1_MU10',           [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
         ['mu14_nomucomb',                   'L1_MU10',           [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu20_nomucomb',                   'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu20_nomucomb',                   'L1_MU20MU21',['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
 
 				# Toroid-off run (ATR-9923)
         ['mu8_mucombTag_noEF_L1MU40',  'L1_MU20', [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
@@ -112,21 +112,21 @@ def setupMenu():
         ['3mu10_msonly_L13MU6',    'L1_3MU6',           [], [PhysicsStream], ['RATE:MultiMuon', 'BW:Muon'], -1],
         ['2mu10',                  'L1_2MU10',          [], [PhysicsStream], ['RATE:MultiMuon', 'BW:Muon'], -1],
         ['2mu10_nomucomb',         'L1_2MU10',          [], [PhysicsStream], ['RATE:MultiMuon', 'BW:Muon'], -1],
-        ['mu24_mu8noL1',           'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream, 'express'], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu24','mu8noL1']]],
-        ['mu24_mu10noL1',          'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu24','mu10noL1']]],
-        ['mu24_2mu4noL1',          'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu24','2mu4noL1']]],
-        ['mu26_mu8noL1',           'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu26','mu8noL1']]],
-        ['mu26_mu10noL1',          'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu26','mu10noL1']]],
-        ['mu28_mu8noL1',           'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu28','mu8noL1']]],
-        ['mu22_mu8noL1',           'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu22','mu8noL1']]],
-        ['mu22_2mu4noL1',          'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu22','2mu4noL1']]],
-        ['mu20_mu8noL1',           'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20','mu8noL1']]],
-        ['mu20_2mu4noL1',          'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20','2mu4noL1']]],
+        ['mu24_mu8noL1',           'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream, 'express'], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu24','mu8noL1']]],
+        ['mu24_mu10noL1',          'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu24','mu10noL1']]],
+        ['mu24_2mu4noL1',          'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu24','2mu4noL1']]],
+        ['mu26_mu8noL1',           'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu26','mu8noL1']]],
+        ['mu26_mu10noL1',          'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu26','mu10noL1']]],
+        ['mu28_mu8noL1',           'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu28','mu8noL1']]],
+        ['mu22_mu8noL1',           'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu22','mu8noL1']]],
+        ['mu22_2mu4noL1',          'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu22','2mu4noL1']]],
+        ['mu20_mu8noL1',           'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20','mu8noL1']]],
+        ['mu20_2mu4noL1',          'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20','2mu4noL1']]],
         ['2mu6',                    'L1_2MU6',  [], [PhysicsStream], [RATE_BMultiMuonTag, 'BW:Muon'], -1],
         ['2mu4',                    'L1_2MU4',  [], [PhysicsStream], [RATE_BMultiMuonTag, 'BW:Muon'], -1],
-        ['mu20_2mu2noL1_JpsimumuFS', 'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], [RATE_BMultiMuonTag,'BW:Muon'], -1,['serial',-1,['mu20','2mu2noL1_JpsimumuFS']]],  # OI - who owns these triggers? Bphys?
-        ['mu20_2mu4_JpsimumuL2',     'L1_MU20MU21',  ['L1_MU20','L1_2MU4'], [PhysicsStream], [RATE_BMultiMuonTag,'BW:Muon'], -1,['serial',-1,['2mu4_JpsimumuL2','mu20']]], # OI - who owns these triggers?
-        ['mu20_2mu2noL1',            'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20','2mu2noL1']]],
+        ['mu20_2mu2noL1_JpsimumuFS', 'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], [RATE_BMultiMuonTag,'BW:Muon'], -1,['serial',-1,['mu20','2mu2noL1_JpsimumuFS']]],  # OI - who owns these triggers? Bphys?
+        ['mu20_2mu4_JpsimumuL2',     'L1_MU20MU21', ['L1_MU20','L1_2MU4'], [PhysicsStream], [RATE_BMultiMuonTag,'BW:Muon'], -1,['serial',-1,['2mu4_JpsimumuL2','mu20']]], # OI - who owns these triggers?
+        ['mu20_2mu2noL1',            'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20','2mu2noL1']]],
         
         # Primary (multi muon chains)
         ['3mu4',                   'L1_3MU4',           [], [BMultiMuonStream], [RATE_BMultiMuonTag, BW_BphysTag], -1],
@@ -143,14 +143,17 @@ def setupMenu():
         ['4mu4_nomucomb',          'L1_4MU4', ['L1_4MU4',''], [BMultiMuonStream], [RATE_BMultiMuonTag, BW_BphysTag], -1,['serial',-1,['4mu4_nomucomb','']]],
 
 #				#ATR-15246
-        ['mu22_mu8noL1_mu6noL1',   'L1_MU20MU21',  ['L1_MU20','',''], [PhysicsStream], ['RATE:MultiMuon', 'BW:Muon'],  -1,['serial',-1,['mu22','mu8noL1','mu6noL1']]],
+        ['mu22_mu8noL1_mu6noL1',   'L1_MU20MU21',       ['L1_MU20','',''], [PhysicsStream], ['RATE:MultiMuon', 'BW:Muon'],  -1,['serial',-1,['mu22','mu8noL1','mu6noL1']]],
 				#ATR-15878
-        ['mu22_mu8noL1_calotag_0eta010', 'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu22','mu8noL1_calotag_0eta010']]],
-        ['mu24_mu8noL1_calotag_0eta010', 'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu24','mu8noL1_calotag_0eta010']]],
-        ['mu26_mu8noL1_calotag_0eta010', 'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu26','mu8noL1_calotag_0eta010']]],
-        ['mu28_mu8noL1_calotag_0eta010', 'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu28','mu8noL1_calotag_0eta010']]],
-        ['mu24_mu10noL1_calotag_0eta010', 'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu24','mu10noL1_calotag_0eta010']]],
-        ['mu26_mu10noL1_calotag_0eta010', 'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu26','mu10noL1_calotag_0eta010']]],
+        ['mu22_mu8noL1_calotag_0eta010',  'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu22','mu8noL1_calotag_0eta010']]],
+        ['mu24_mu8noL1_calotag_0eta010',  'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu24','mu8noL1_calotag_0eta010']]],
+        ['mu26_mu8noL1_calotag_0eta010',  'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu26','mu8noL1_calotag_0eta010']]],
+        ['mu28_mu8noL1_calotag_0eta010',  'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu28','mu8noL1_calotag_0eta010']]],
+        ['mu24_mu10noL1_calotag_0eta010', 'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu24','mu10noL1_calotag_0eta010']]],
+        ['mu26_mu10noL1_calotag_0eta010', 'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu26','mu10noL1_calotag_0eta010']]],
+
+        ['mu18_mu8noL1_calotag_0eta010_L1MU11', 'L1_MU11', ['L1_MU11',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu18','mu8noL1_calotag_0eta010']]],
+        ['mu20_mu8noL1_calotag_0eta010', 'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20','mu8noL1_calotag_0eta010']]],
 
         #DiMuon for TAU OVERLAY
         ['2mu20_L12MU20_OVERLAY',   'L1_2MU20_OVERLAY', [], ['TauOverlay'], ["RATE:TauOverlay",  "BW:TauOverlay"], -1],
@@ -162,11 +165,11 @@ def setupMenu():
         ['mu4_msonly_cosmic_L1MU11_EMPTY',       'L1_MU11_EMPTY', [],  ['CosmicMuons'], ["RATE:Cosmic_Muon", "BW:Muon"], -1],                            
                 
         # muon calibration
-        ['mu0_muoncalib',             'L1_MU20MU21',     ['L1_MU20'],['Muon_Calibration'],["RATE:Calibration","BW:Muon"],-1],
+        ['mu0_muoncalib',             'L1_MU20MU21', ['L1_MU20'],['Muon_Calibration'],["RATE:Calibration","BW:Muon"],-1],
         ['mu0_muoncalib_L1MU4_EMPTY', 'L1_MU4_EMPTY',[],['Muon_Calibration'],["RATE:Calibration","BW:Muon"],-1],
 
         # muon calibration, data scouting
-        ['mu0_muoncalib_ds3',             'L1_MU20MU21',     ['L1_MU20'],['DataScouting_03_CosmicMuons'],["RATE:Calibration","BW:Muon"],-1],        
+        ['mu0_muoncalib_ds3',             'L1_MU20MU21', ['L1_MU20'],['DataScouting_03_CosmicMuons'],["RATE:Calibration","BW:Muon"],-1],        
         ['mu0_muoncalib_ds3_L1MU4_EMPTY', 'L1_MU4_EMPTY',[],['DataScouting_03_CosmicMuons'],["RATE:Calibration","BW:Muon"],-1],   
 
         # Narrow scan
@@ -174,12 +177,12 @@ def setupMenu():
         # inputTE for narrow scan sequence (2nd inputTE) is a dummy string for MuonDef.py
         # To indicate narrow scan uses lastTE of previous sequence and also to avoid duplicated sequences with same TE name, write L2_ TE name of the 1st sequence.
 
-        ['mu20_nomucomb_mu6noL1_nscan03',                     'L1_MU20MU21',  ['L1_MU20','L2_mu20_nomucomb'],        [BPhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_nomucomb','mu6noL1_nscan03']]],  #OI need to discuss what to do here
+        ['mu20_nomucomb_mu6noL1_nscan03', 'L1_MU20MU21',['L1_MU20','L2_mu20_nomucomb'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1,['serial',-1,['mu20_nomucomb','mu6noL1_nscan03']]],  #OI need to discuss what to do here
 
-        ['mu11_nomucomb_2mu4noL1_nscan03_L1MU11_2MU6', 'L1_MU11_2MU6', ['L1_MU11','L2_mu11_nomucomb'], [BPhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu11_nomucomb','2mu4noL1_nscan03']]], #OI need to discuss what to do here
+        ['mu11_nomucomb_2mu4noL1_nscan03_L1MU11_2MU6', 'L1_MU11_2MU6', ['L1_MU11','L2_mu11_nomucomb'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1,['serial',-1,['mu11_nomucomb','2mu4noL1_nscan03']]], #OI need to discuss what to do here
 
         ## LFV topo based nscan (ATR-14352)
-        ['mu11_nomucomb_2mu4noL1_nscan03_L1LFV-MU', 'L1_LFV-MU', ['L1_MU10','L2_mu11_nomucomb'], [BPhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu11_nomucomb','2mu4noL1_nscan03']]], #OI need to discuss what to do here
+        ['mu11_nomucomb_2mu4noL1_nscan03_L1LFV-MU', 'L1_LFV-MU', ['L1_MU10','L2_mu11_nomucomb'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1,['serial',-1,['mu11_nomucomb','2mu4noL1_nscan03']]], #OI need to discuss what to do here
 	# -----------------------------------------------------
 
         # LLP chains
@@ -192,8 +195,8 @@ def setupMenu():
         ['3mu6_msonly_L1MU4_UNPAIRED_NONISO',                     'L1_MU4_UNPAIRED_NONISO', ['L1_3MU6'], ["Late"], ['RATE:MultiMuon', 'BW:Muon'], -1],
 
 
-        ['mu20_msonly_mu10noL1_msonly_nscan05_noComb',   'L1_MU20MU21',  ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu10noL1_msonly_nscan05_noComb']]],
-        ['mu20_msonly_mu10noL1_msonly_nscan03_noComb',   'L1_MU20MU21',  ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu10noL1_msonly_nscan03_noComb']]],
+        ['mu20_msonly_mu10noL1_msonly_nscan05_noComb',   'L1_MU20MU21',   ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu10noL1_msonly_nscan05_noComb']]],
+        ['mu20_msonly_mu10noL1_msonly_nscan03_noComb',   'L1_MU20MU21',   ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu10noL1_msonly_nscan03_noComb']]],
         ['mu20_msonly_mu10noL1_msonly_nscan05_noComb_L1MU6_EMPTY',       'L1_MU6_EMPTY',        ['L1_MU20','L2_mu20_msonly'], ["Late"], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu10noL1_msonly_nscan05_noComb']]],
         ['mu20_msonly_mu10noL1_msonly_nscan03_noComb_L1MU6_EMPTY',       'L1_MU6_EMPTY',        ['L1_MU20','L2_mu20_msonly'], ["Late"], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu10noL1_msonly_nscan03_noComb']]],
         ['mu20_msonly_mu10noL1_msonly_nscan05_noComb_L1MU4_UNPAIRED_ISO','L1_MU4_UNPAIRED_ISO', ['L1_MU20','L2_mu20_msonly'], ["Late"], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu10noL1_msonly_nscan05_noComb']]],
@@ -202,18 +205,18 @@ def setupMenu():
 
 
          ### ATR-14377: Emergency additional class of chains instead of mu20_msonly_mu10noL1_msonly_nscan05_noComb*
-         ['mu20_msonly_mu15noL1_msonly_nscan05_noComb',   'L1_MU20MU21',  ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu15noL1_msonly_nscan05_noComb']]],
-        ['mu20_msonly_mu15noL1_msonly_nscan05_noComb_L1MU6_EMPTY',       'L1_MU6_EMPTY',        ['L1_MU20','L2_mu20_msonly'], ["Late"], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu15noL1_msonly_nscan05_noComb']]],
-        ['mu20_msonly_mu15noL1_msonly_nscan05_noComb_L1MU4_UNPAIRED_ISO','L1_MU4_UNPAIRED_ISO', ['L1_MU20','L2_mu20_msonly'], ["Late"], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu15noL1_msonly_nscan05_noComb']]],
+        ['mu20_msonly_mu15noL1_msonly_nscan05_noComb',   'L1_MU20MU21',   ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu15noL1_msonly_nscan05_noComb']]],
+        ['mu20_msonly_mu15noL1_msonly_nscan05_noComb_L1MU6_EMPTY',          'L1_MU6_EMPTY',        ['L1_MU20','L2_mu20_msonly'], ["Late"], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu15noL1_msonly_nscan05_noComb']]],
+        ['mu20_msonly_mu15noL1_msonly_nscan05_noComb_L1MU4_UNPAIRED_ISO',   'L1_MU4_UNPAIRED_ISO', ['L1_MU20','L2_mu20_msonly'], ["Late"], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu15noL1_msonly_nscan05_noComb']]],
         ['mu20_msonly_mu15noL1_msonly_nscan05_noComb_L1MU4_UNPAIRED_NONISO','L1_MU4_UNPAIRED_NONISO', ['L1_MU20','L2_mu20_msonly'], ["Late"], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu15noL1_msonly_nscan05_noComb']]],
 
         ### ATR-14377:
-        ['mu20_msonly_mu15noL1_msonly_nscan03_noComb',   'L1_MU20MU21',  ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu15noL1_msonly_nscan03_noComb']]],
+        ['mu20_msonly_mu15noL1_msonly_nscan03_noComb',   'L1_MU20MU21',   ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu15noL1_msonly_nscan03_noComb']]],
         ['mu20_msonly_mu15noL1_msonly_nscan03_noComb_L1MU6_EMPTY',       'L1_MU6_EMPTY',        ['L1_MU20','L2_mu20_msonly'], ["Late"], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu15noL1_msonly_nscan03_noComb']]],
         ['mu20_msonly_mu15noL1_msonly_nscan03_noComb_L1MU4_UNPAIRED_ISO','L1_MU4_UNPAIRED_ISO', ['L1_MU20','L2_mu20_msonly'], ["Late"], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu15noL1_msonly_nscan03_noComb']]],
         ['mu20_msonly_mu15noL1_msonly_nscan03_noComb_L1MU4_UNPAIRED_NONISO','L1_MU4_UNPAIRED_NONISO', ['L1_MU20','L2_mu20_msonly'], ["Late"], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu15noL1_msonly_nscan03_noComb']]],
 
-        ['mu20_msonly_mu12noL1_msonly_nscan03_noComb',   'L1_MU20MU21',  ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu12noL1_msonly_nscan03_noComb']]],
+        ['mu20_msonly_mu12noL1_msonly_nscan03_noComb',   'L1_MU20MU21',   ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu12noL1_msonly_nscan03_noComb']]],
         ['mu20_msonly_mu12noL1_msonly_nscan03_noComb_L1MU6_EMPTY',       'L1_MU6_EMPTY',        ['L1_MU20','L2_mu20_msonly'], ["Late"], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu12noL1_msonly_nscan03_noComb']]],
         ['mu20_msonly_mu12noL1_msonly_nscan03_noComb_L1MU4_UNPAIRED_ISO','L1_MU4_UNPAIRED_ISO', ['L1_MU20','L2_mu20_msonly'], ["Late"], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu12noL1_msonly_nscan03_noComb']]],
         ['mu20_msonly_mu12noL1_msonly_nscan03_noComb_L1MU4_UNPAIRED_NONISO','L1_MU4_UNPAIRED_NONISO', ['L1_MU20','L2_mu20_msonly'], ["Late"], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu12noL1_msonly_nscan03_noComb']]],        
@@ -224,17 +227,17 @@ def setupMenu():
         ['2mu6_10invm30_pt2_z10', 'L1_2MU6', [], [PhysicsStream], ['RATE:MultiMuon', 'BW:Muon'], -1],
 
 
-        ['mu6_2mu4', 'L1_MU6_3MU4', ['L1_MU6','L1_3MU4'], [PhysicsStream], [RATE_BMultiMuonTag, BW_BphysTag], -1],
+        ['mu6_2mu4', 'L1_MU6_3MU4', ['L1_MU6','L1_3MU4'], [BMultiMuonStream], [RATE_BMultiMuonTag, BW_BphysTag], -1],
         ['mu20_imedium_L1MU10_2J20', 'L1_MU10_2J20', [], [PhysicsStream], ['RATE:MuonJet', 'BW:Muon','BW:Jet'], -1],                
         ['mu20_ivarmedium_L1MU10_2J20', 'L1_MU10_2J20', [], [PhysicsStream], ['RATE:MuonJet', 'BW:Muon','BW:Jet'], -1],                
         ['mu20_ivarmedium_L1MU10_2J15_J20', 'L1_MU10_2J15_J20', [], [PhysicsStream], ['RATE:MuonJet', 'BW:Muon','BW:Jet'], -1],  
 
         #nscan05 triggers rejecting CB muons
 
-        ['mu20_msonly_mu6noL1_msonly_nscan05',       'L1_MU20MU21',  ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu6noL1_msonly_nscan05']]],
+        ['mu20_msonly_mu6noL1_msonly_nscan05', 'L1_MU20MU21',      ['L1_MU20','L2_mu20_msonly'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu6noL1_msonly_nscan05']]],
         ['mu20_msonly_mu6noL1_msonly_nscan05_L1MU4_EMPTY',       'L1_MU4_EMPTY',        ['L1_MU20','L2_mu20_msonly'], ["Late"], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu6noL1_msonly_nscan05']]],
         ['mu20_msonly_mu6noL1_msonly_nscan05_L1MU6_EMPTY',       'L1_MU6_EMPTY',        ['L1_MU20','L2_mu20_msonly'], ["Late"], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu6noL1_msonly_nscan05']]],
-        ['mu20_msonly_mu6noL1_msonly_nscan05_L1MU4_UNPAIRED_ISO',       'L1_MU4_UNPAIRED_ISO',        ['L1_MU20','L2_mu20_msonly'], ["Late"], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu6noL1_msonly_nscan05']]],
+        ['mu20_msonly_mu6noL1_msonly_nscan05_L1MU4_UNPAIRED_ISO',       'L1_MU4_UNPAIRED_ISO', ['L1_MU20','L2_mu20_msonly'], ["Late"], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu6noL1_msonly_nscan05']]],
         ['mu20_msonly_mu6noL1_msonly_nscan05_noComb_L1MU4_EMPTY',       'L1_MU4_EMPTY',        ['L1_MU20','L2_mu20_msonly'], ["Late"], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu6noL1_msonly_nscan05_noComb']]],
         ['mu20_msonly_mu6noL1_msonly_nscan05_noComb_L1MU4_UNPAIRED_ISO','L1_MU4_UNPAIRED_ISO', ['L1_MU20','L2_mu20_msonly'], ["Late"], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly','mu6noL1_msonly_nscan05_noComb']]],
 
@@ -246,11 +249,15 @@ def setupMenu():
         ['mu20_msonly_iloosems_mu6noL1_msonly_nscan05_L1MU6_EMPTY', 'L1_MU6_EMPTY',   ['L1_MU20','L2_mu20_msonly_iloosems'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_iloosems','mu6noL1_msonly_nscan05']]],
         ['mu20_msonly_iloosems_mu6noL1_msonly_nscan05_L1MU4_UNPAIRED_ISO', 'L1_MU4_UNPAIRED_ISO',   ['L1_MU20','L2_mu20_msonly_iloosems'], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu20_msonly_iloosems','mu6noL1_msonly_nscan05']]],
 
+        #ATR-14377
+        ['mu6_dRl1_mu20_msonly_mu6noL1_dRl1_msonly','L1_2MU6', [['L1_MU6','L1_MU6'],'L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu6_dRl1','mu20_msonly','mu6noL1_dRl1_msonly']]],
+        ['mu6_dRl1_mu20_msonly_iloosems_mu6noL1_dRl1_msonly','L1_2MU6', [['L1_MU6','L1_MU6'],'L1_MU20',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu6_dRl1','mu20_msonly_iloosems','mu6noL1_dRl1_msonly']]],
+
         #Chains for testing 2e34 menus
-        ['mu32_ivarmedium',          'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu36_ivarmedium',          'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu40_ivarmedium',          'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
-        ['mu50_ivarmedium',          'L1_MU20MU21',     ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu32_ivarmedium',          'L1_MU20MU21',           ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu36_ivarmedium',          'L1_MU20MU21',           ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu40_ivarmedium',          'L1_MU20MU21',           ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu50_ivarmedium',          'L1_MU20MU21',           ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
         
 
         # Bphys item, needs to be in muon slice: ATR-14367
@@ -264,19 +271,28 @@ def setupMenu():
         ['3mu4_mu4noL1_calotag_0eta010',           'L1_3MU4', ['L1_3MU4',''], [BMultiMuonStream], [RATE_BMultiMuonTag, BW_BphysTag], -1,['serial',-1,['3mu4','mu4noL1_calotag_0eta010']]],
 
         #AFP muons
+        ['mu4_L1MU4_AFP_A_AND_C',                        'L1_MU4_AFP_A_AND_C',                  [],  ['MinBias'], [ 'RATE:MinBias','BW:MinBias'], -1],
+        ['mu4_L1MU4_AFP_A_OR_C',                        'L1_MU4_AFP_A_OR_C',                  [],  ['MinBias'], [ 'RATE:MinBias','BW:MinBias'], -1],
         ['mu4_L1MU4',                        'L1_MU4',                  [],  ['MinBias'], [ 'RATE:MinBias','BW:MinBias'], -1],
 
+
+        ['mu10_mgonly_L1LATE-MU10_J50',          'L1_LATE-MU10_J50',           [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu10_mgonly_L1LATE-MU10_XE50',         'L1_LATE-MU10_XE50',          [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu10_mgonly_L1LATE-MU10_XE40',         'L1_LATE-MU10_XE40',          [], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+	['mu50_mgonly_inTimeRoI',                'L1_MU20MU21',       ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+        ['mu60_mgonly_inTimeRoI',                'L1_MU20MU21',       ['L1_MU20'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+
         ]
 
 
     if TriggerFlags.doFTK():
         TriggerFlags.MuonSlice.signatures = TriggerFlags.MuonSlice.signatures() + [
-            ['mu24_idperf_FTK_L1MU20MU21_FTK',            'L1_MU20MU21_FTK',  ['L1_MU20_FTK'], [PhysicsStream], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1], 
+            ['mu24_idperf_FTK_L1MU20MU21_FTK',       'L1_MU20MU21_FTK', ['L1_MU20_FTK'], [PhysicsStream], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1], 
             ['mu6_idperf_FTK_L1MU6_FTK',             'L1_MU6_FTK',            [], [PhysicsStream], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1],
-            ['mu24_idperf_FTKRefit_L1MU20MU21_FTK',       'L1_MU20MU21_FTK',  ['L1_MU20_FTK'], [PhysicsStream], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1], 
+            ['mu24_idperf_FTKRefit_L1MU20MU21_FTK',  'L1_MU20MU21_FTK', ['L1_MU20_FTK'], [PhysicsStream], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1], 
             ['mu6_idperf_FTKRefit_L1MU6_FTK',        'L1_MU6_FTK',            [], [PhysicsStream], ['RATE:IDMonitoring', 'BW:Muon', 'BW:ID'], -1],
-            ['mu22_mu8noL1_ftkFS_L1MU20MU21_FTK',         'L1_MU20MU21_FTK',  ['L1_MU20_FTK',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu22','mu8noL1_ftkFS']]],
-            ['mu26_ivarmedium_ftk_L1MU20MU21_FTK',        'L1_MU20MU21_FTK',  ['L1_MU20_FTK'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
+            ['mu22_mu8noL1_FTKFS_L1MU20MU21_FTK',    'L1_MU20MU21_FTK', ['L1_MU20_FTK',''], [PhysicsStream], ['RATE:MultiMuon','BW:Muon'], -1,['serial',-1,['mu22','mu8noL1_FTKFS']]],
+            ['mu26_ivarmedium_FTK_L1MU20MU21_FTK',   'L1_MU20MU21_FTK', ['L1_MU20_FTK'], [PhysicsStream], ['RATE:SingleMuon', 'BW:Muon'], -1],
             ]
 
 
@@ -356,7 +372,7 @@ def setupMenu():
         ['j450_lcw_nojcalib',           'L1_J120', [], [PhysicsStream], ['RATE:SingleJet',  'BW:Jet'], -1],
 
         # SoftKiller central jet triggers
-        ['j35_sktc_lcw_nojcalib',       'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet',  'BW:Jet'], -1],
+        #['j35_sktc_lcw_nojcalib',       'L1_RD0_FILLED', [], [PhysicsStream], ['RATE:SingleJet',  'BW:Jet'], -1],
 
         # Standard forward jet triggers
         ['j15_320eta490',               'L1_RD0_FILLED',  [], [PhysicsStream], ['RATE:SingleJet', 'BW:Jet'], -1],
@@ -1690,9 +1706,9 @@ def setupMenu():
         ['tau160_medium1_tracktwo_L1TAU100',       'L1_TAU100', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1],
         ['tau200_medium1_tracktwo_L1TAU100',       'L1_TAU100', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1],
 
-        ['tau0_perf_ptonly_L1TAU100',       'L1_TAU100', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1],
-        ['tau160_idperf_tracktwo_L1TAU100',       'L1_TAU100', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1],
-        ['tau160_perf_tracktwo_L1TAU100',       'L1_TAU100', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1],
+        ['tau0_perf_ptonly_L1TAU100',       'L1_TAU100', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1],
+        ['tau160_idperf_tracktwo_L1TAU100',       'L1_TAU100', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1],
+        ['tau160_perf_tracktwo_L1TAU100',       'L1_TAU100', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1],
 
         ['tau35_perf_tracktwo_tau25_perf_tracktwo', 'L1_TAU20IM_2TAU12IM' , ['L1_TAU20IM','L1_TAU12IM'],[PhysicsStream, 'express'], ['RATE:MultiTau','BW:Tau'], -1],
         
@@ -2296,6 +2312,8 @@ def setupMenu():
         #ATR-16089 test chains
         ['e25_mergedtight_ivarloose',           'L1_EM20VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1],
         ['e30_mergedtight_ivarloose',           'L1_EM20VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1],
+        ['e25_mergedtight',                      'L1_EM20VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'], -1],
+        ['e30_mergedtight',                      'L1_EM20VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'], -1],
 
         ['g35_medium_icalovloose',           'L1_EM20VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1],
         ['g35_medium_icalotight',           'L1_EM20VH', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1],
@@ -2309,12 +2327,20 @@ def setupMenu():
         ['e28_lhtight_nod0_ivarloose_L1EM24VHIM_e15_etcut_L1EM7_Zee', 'L1_EM24VHIM',  ['L1_EM24VHIM','L1_EM7'], [PhysicsStream], ['RATE:MultiElectron', 'BW:Egamma'],-1],
 
         #AFP egamma       
+        ['g10_loose_L1EM3_AFP_A_OR_C',                  'L1_EM3_AFP_A_OR_C',                  [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1],
+        ['g10_loose_L1EM3_AFP_A_AND_C',                  'L1_EM3_AFP_A_AND_C',                  [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1],
+
+        ['e10_lhloose_L1EM3_AFP_A_OR_C',                  'L1_EM3_AFP_A_OR_C',                  [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1],
+        ['e10_lhloose_L1EM3_AFP_A_AND_C',                  'L1_EM3_AFP_A_AND_C',                  [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1],
+
         ['g10_loose_L1EM3',                  'L1_EM3',                  [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1],
         ['e10_lhloose_L1EM3',                  'L1_EM3',                  [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1],
 
 			 ]
 
     TriggerFlags.BphysicsSlice.signatures = [
+        #ATR-16219
+        ['3mu4_bDimu2700',                'L1_3MU4', [], [BPhysicsStream],             [RATE_BphysTag,BW_BphysTag], -1],
 
         ['2mu6_bPhi',                     'L1_2MU6', [], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1],
         ['mu11_mu6_bPhi',                 'L1_MU11_2MU6', ['L1_MU11','L1_MU6'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1,['serial',-1,['mu11','mu6_bPhi']]],
@@ -2364,28 +2390,28 @@ def setupMenu():
         ['mu6_bJpsi_Trkloose',            'L1_MU6',  [], [PhysicsStream,'express'], [RATE_BphysTag,BW_BphysTag], -1],
         ['mu10_bJpsi_Trkloose',           'L1_MU10', [], [PhysicsStream], [RATE_BphysTag,BW_BphysTag], -1],
         ['mu14_bJpsi_Trkloose',           'L1_MU10', [], [PhysicsStream], [RATE_BphysTag,BW_BphysTag], -1],
-        ['mu20_bJpsi_Trkloose',           'L1_MU20MU21', ['L1_MU20'], [PhysicsStream,'express'], [RATE_BphysTag,BW_BphysTag], -1],
+        ['mu20_bJpsi_Trkloose',       'L1_MU20MU21', ['L1_MU20'], [PhysicsStream,'express'], [RATE_BphysTag,BW_BphysTag], -1],
 
         # ATR-16163
         ['mu4_bJpsi_TrkPEB',            'L1_MU4',  [], ['BphysPEB'], [RATE_BphysTag,BW_BphysTag], -1],
         ['mu6_bJpsi_TrkPEB',            'L1_MU6',  [], ['BphysPEB'], [RATE_BphysTag,BW_BphysTag], -1],
         ['mu10_bJpsi_TrkPEB',           'L1_MU10', [], ['BphysPEB'], [RATE_BphysTag,BW_BphysTag], -1],
         ['mu14_bJpsi_TrkPEB',           'L1_MU10', [], ['BphysPEB'], [RATE_BphysTag,BW_BphysTag], -1],
-        ['mu20_bJpsi_TrkPEB',           'L1_MU20MU21', ['L1_MU20'], ['BphysPEB'], [RATE_BphysTag,BW_BphysTag], -1],
+        ['mu20_bJpsi_TrkPEB',       'L1_MU20MU21', ['L1_MU20'], ['BphysPEB'], [RATE_BphysTag,BW_BphysTag], -1],
         
-        ['3mu4_bDimu',                    'L1_3MU4', [], [BMultiMuonStream,'express'], [RATE_BphysTag,BW_BphysTag], -1],
+        ['3mu4_bDimu',                    'L1_3MU4', [], [BMultiMuonStream,'express'], [RATE_BMultiMuonTag,BW_BphysTag], -1],
         ['3mu4_bJpsi',                    'L1_3MU4', [], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1],
         ['3mu4_bTau',                     'L1_3MU4', [], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1],
         ['3mu4_nomucomb_bTau',            'L1_3MU4', [], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1],  # OI validation w.r.t 2016 
-        ['3mu4_bUpsi',                    'L1_3MU4', [], [BMultiMuonStream], [RATE_BphysTag,BW_BphysTag], -1],
+        ['3mu4_bUpsi',                    'L1_3MU4', [], [BMultiMuonStream], [RATE_BMultiMuonTag,BW_BphysTag], -1],
         
-        ['3mu6_bDimu',                   'L1_3MU6', [], [BMultiMuonStream], [RATE_BphysTag,BW_BphysTag], -1],
+        ['3mu6_bDimu',                   'L1_3MU6', [], [BMultiMuonStream], [RATE_BMultiMuonTag,BW_BphysTag], -1],
         ['3mu6_bJpsi',                   'L1_3MU6', [], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1],
         ['3mu6_bTau',                    'L1_3MU6', [], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1],
-        ['3mu6_bUpsi',                   'L1_3MU6', [], [BMultiMuonStream], [RATE_BphysTag,BW_BphysTag], -1],
+        ['3mu6_bUpsi',                   'L1_3MU6', [], [BMultiMuonStream], [RATE_BMultiMuonTag,BW_BphysTag], -1],
 
         ['mu6_2mu4_bJpsi', 'L1_MU6_3MU4', ['L1_MU6','L1_3MU4'], [BPhysicsStream], [RATE_BphysTag, BW_BphysTag], -1],
-        ['mu6_2mu4_bUpsi', 'L1_MU6_3MU4', ['L1_MU6','L1_3MU4'], [BMultiMuonStream], [RATE_BphysTag, BW_BphysTag], -1],
+        ['mu6_2mu4_bUpsi', 'L1_MU6_3MU4', ['L1_MU6','L1_3MU4'], [BMultiMuonStream], [RATE_BMultiMuonTag, BW_BphysTag], -1],
 		
         ['mu4_iloose_mu4_11invm60_noos', 'L1_2MU4', [], [PhysicsStream], [RATE_DYTag,BW_DYTag], -1],
         ['mu4_iloose_mu4_7invm9_noos',   'L1_2MU4', [], [PhysicsStream],  [RATE_DYTag,BW_DYTag], -1],
@@ -2461,27 +2487,27 @@ def setupMenu():
        ['mu6_mu4_bDimu_L1BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4','L1_BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4', ['L1_MU6','L1_MU4'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False],
        ['mu6_mu4_bDimu_novtx_noos_L1BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4','L1_BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4', ['L1_MU6','L1_MU4'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False],
 
-        ['mu11_mu6_bDimu2700',            'L1_MU11_2MU6', ['L1_MU11','L1_MU6'], [BPhysicsStream], ['RATE:Bphysics','BW:Bphys'], -1],
-        ['mu11_mu6_bDimu_Lxy0',            'L1_MU11_2MU6', ['L1_MU11','L1_MU6'], [BPhysicsStream], ['RATE:Bphysics','BW:Bphys'], -1],
-        ['mu11_mu6_bDimu2700_Lxy0',            'L1_MU11_2MU6', ['L1_MU11','L1_MU6'], [BPhysicsStream], ['RATE:Bphysics','BW:Bphys'], -1],
+        ['mu11_mu6_bDimu2700',            'L1_MU11_2MU6', ['L1_MU11','L1_MU6'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1],
+        ['mu11_mu6_bDimu_Lxy0',            'L1_MU11_2MU6', ['L1_MU11','L1_MU6'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1],
+        ['mu11_mu6_bDimu2700_Lxy0',            'L1_MU11_2MU6', ['L1_MU11','L1_MU6'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1],
         
-        ['3mu4_bNocut',          'L1_3MU4',           [], [BMultiMuonStream, 'express'], [RATE_BMultiMuonTag, 'BW:Muon'], -1],
-        ['3mu4_bVertex2',          'L1_3MU4',           [], [BMultiMuonStream], [RATE_BMultiMuonTag, 'BW:Muon'], -1],
-        ['3mu4_bVertex3',          'L1_3MU4',           [], [BMultiMuonStream], [RATE_BMultiMuonTag, 'BW:Muon'], -1],
+        ['3mu4_bNocut',          'L1_3MU4',           [], [BMultiMuonStream, 'express'], [RATE_BMultiMuonTag, 'BW:Bphys'], -1],
+        ['3mu4_bVertex2',          'L1_3MU4',           [], [BMultiMuonStream], [RATE_BMultiMuonTag, 'BW:Bphys'], -1],
+        ['3mu4_bVertex3',          'L1_3MU4',           [], [BMultiMuonStream], [RATE_BMultiMuonTag, 'BW:Bphys'], -1],
         ['3mu3_mu3noL1_bNocut_L13MU4', 'L1_3MU4', ['L1_3MU4',''], [BMultiMuonStream], [RATE_BMultiMuonTag,'BW:Muon'], -1,['serial',-1,['3mu3','mu3noL1']]],
         ['2mu4_mu3_mu2noL1_bNocut_L13MU4', 'L1_3MU4', ['L1_2MU4','L1_MU4',''], [BMultiMuonStream], [RATE_BMultiMuonTag,'BW:Muon'], -1,['serial',-1,['2mu4','mu3','mu2noL1']]],
-        ['2mu6_mu4_bUpsi', 'L1_2MU6_3MU4', ['L1_2MU6','L1_MU4'], [BMultiMuonStream], [RATE_BphysTag, BW_BphysTag], -1],
+        ['2mu6_mu4_bUpsi', 'L1_2MU6_3MU4', ['L1_2MU6','L1_MU4'], [BMultiMuonStream], [RATE_BMultiMuonTag, BW_BphysTag], -1],
         ['4mu4_bNocut', 'L1_4MU4', ['L1_4MU4',''], [BMultiMuonStream], [RATE_BMultiMuonTag,'BW:Muon'], -1,['serial',-1,['4mu4','']]],
 
         #OI replacement for mu20_nomucomb_mu6noL1_nscan03 and mu11_nomucomb_2mu4noL1_nscan03_L1MU11_2MU6
-        ['mu20_mu6noL1_bNocut',             'L1_MU20MU21',      ['L1_MU20','L2_mu20'],        [BPhysicsStream], [RATE_BMultiMuonTag,'BW:Muon'], -1,['serial',-1,['mu20','mu6noL1']]],  
-        ['mu11_2mu4noL1_bNocut_L1MU11_2MU6', 'L1_MU11_2MU6', ['L1_MU11','L2_mu11'], [BPhysicsStream], [RATE_BMultiMuonTag,'BW:Muon'], -1,['serial',-1,['mu11','2mu4noL1']]], 
-        ['mu11_2mu4noL1_bNocut_L1LFV-MU', 'L1_LFV-MU', ['L1_MU10','L2_mu11'], [BPhysicsStream], [RATE_BMultiMuonTag,'BW:Muon'], -1,['serial',-1,['mu11','2mu4noL1']]], 
+        ['mu20_mu6noL1_bNocut',             'L1_MU20MU21',      ['L1_MU20','L2_mu20'],        [BPhysicsStream], [RATE_BphysTag,'BW:Muon'], -1,['serial',-1,['mu20','mu6noL1']]],  
+        ['mu11_2mu4noL1_bNocut_L1MU11_2MU6', 'L1_MU11_2MU6', ['L1_MU11','L2_mu11'], [BPhysicsStream], [RATE_BphysTag,'BW:Muon'], -1,['serial',-1,['mu11','2mu4noL1']]], 
+        ['mu11_2mu4noL1_bNocut_L1LFV-MU', 'L1_LFV-MU', ['L1_MU10','L2_mu11'], [BPhysicsStream], [RATE_BphysTag,'BW:Muon'], -1,['serial',-1,['mu11','2mu4noL1']]], 
 
-				['3mu4_bPhi',                     'L1_3MU4', [], [BMultiMuonStream], [RATE_BphysTag,BW_BphysTag], -1],
+				['3mu4_bPhi',                     'L1_3MU4', [], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1],
 
-        ['mu6_2mu4_bNocut_L1MU6_3MU4', 'L1_MU6_3MU4', ['L1_MU6','L1_2MU4'], [BMultiMuonStream], ['RATE:MultiMuon','BW:Muon'], -1],
-        ['2mu6_mu4_bNocut_L12MU6_3MU4', 'L1_2MU6_3MU4', ['L1_2MU6','L1_MU4'], [BMultiMuonStream], ['RATE:MultiMuon','BW:Muon'], -1],
+        ['mu6_2mu4_bNocut_L1MU6_3MU4', 'L1_MU6_3MU4', ['L1_MU6','L1_2MU4'], [BMultiMuonStream], [RATE_BMultiMuonTag,'BW:Muon'], -1],
+        ['2mu6_mu4_bNocut_L12MU6_3MU4', 'L1_2MU6_3MU4', ['L1_2MU6','L1_MU4'], [BMultiMuonStream], [RATE_BMultiMuonTag,'BW:Muon'], -1],
 
 
         ['mu11_2mu4noL1_bTau_L1MU11_2MU6', 'L1_MU11_2MU6', ['L1_MU11','L2_mu11'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1,['serial',-1,['mu11','2mu4noL1']]],
@@ -2604,6 +2630,8 @@ def setupMenu():
         ['mu10_mu6_bBmumux_BcmumuDsloose_L1LFV-MU',  'L1_LFV-MU',     ['L1_MU10','L1_MU6'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False],
 
         ['mu6_mu4_bUpsimumu_L1BPH-8M15-MU6MU4_BPH-0DR22-MU6MU4', 'L1_BPH-8M15-MU6MU4_BPH-0DR22-MU6MU4',     ['L1_MU6','L1_MU4'], [BPhysicsStream, 'express'], [RATE_BphysTag,BW_BphysTag], -1, False],
+        #ATR-16219
+        ['mu6_mu4_bUpsimumu_L1BPH-8M15-MU6MU4_BPH-0DR22-MU6MU4-BO', 'L1_BPH-8M15-MU6MU4_BPH-0DR22-MU6MU4-BO',     ['L1_MU6','L1_MU4'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False],
 
 # ATR-14350
         ['2mu4_bBmumu_Lxy0_L1BPH-2M8-2MU4',      'L1_BPH-2M8-2MU4',     ['L1_2MU4'], [BPhysicsStream], [RATE_BphysTag,BW_BphysTag], -1, False],
@@ -2700,6 +2728,7 @@ def setupMenu():
         ['2j35_gsc55_bmv2c1060_split_ht300_L1HT190-J15s5.ETA21', 'L1_HT190-J15s5.ETA21', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1,['serial',-1,[ 'ht300', '2j35_gsc55_bmv2c1060_split' ]]], 
         ['2j35_gsc55_bmv2c1070_split_ht300_L1HT190-J15s5.ETA21', 'L1_HT190-J15s5.ETA21', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'], -1,['serial',-1,[ 'ht300', '2j35_gsc55_bmv2c1070_split' ]]], 
 
+        ['mu4_j35_gsc55_bperf_split_dr05_dz02', 'L1_MU4',     ['L1_MU4', ''], [PhysicsStream, 'express'], ['RATE:MuonBJet', 'BW:BJet'], -1,['serial',-1,['mu4', 'j35_gsc55_bperf_split'] ]],
 
         ### ATR-14356: bjets+HT VBF chians
         ['2j45_bmv2c1060_split_2j35_0eta490_invm700_L1HT150-JJ15.ETA49_MJJ-400', 'L1_HT150-JJ15.ETA49_MJJ-400', [], [PhysicsStream], ['RATE:MultiBJet', 'BW:BJet'],-1,['serial',-1,['2j45_bmv2c1060_split', '2j35_0eta490_invm700']]],
@@ -2799,7 +2828,7 @@ def setupMenu():
         ['g100_tight_icalovloose_L1EM24VHI_3j50noL1', 'L1_EM24VHI', ['L1_EM24VHI',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1,['serial',-1,["g100_tight_icalovloose_L1EM24VHI","3j50noL1"]]],
 
         #ATR-14196
-        ['g80_loose_xe80noL1',           'L1_EM22VHI', ['L1_EM22VHI',''], [PhysicsStream], ['RATE:EgammaMET', 'BW:Egamma', 'BW:MET'], -1,['serial',-1,["g80_loose","xe80noL1"]]],
+        ['g80_loose_xe80noL1',           'L1_EM22VHI',  ['L1_EM22VHI',''], [PhysicsStream], ['RATE:EgammaMET', 'BW:Egamma', 'BW:MET'], -1,['serial',-1,["g80_loose","xe80noL1"]]],
 
         ['g25_medium_mu24',              'L1_MU20MU21', ['L1_EM15VH','L1_MU20'], [PhysicsStream], ['RATE:EgammaMuon', 'BW:Egamma', 'BW:Muon'], -1, ['parallel',-1,[] ]],
 
@@ -2976,22 +3005,23 @@ def setupMenu():
         ['2e24_lhvloose_nod0_2j15_gsc35_boffperf_split',   'L1_2EM20VH', ['L1_2EM20VH', ''],     [PhysicsStream], ['RATE:EgammaJet', 'BW:BJet'],   -1, ['serial',-1,['2e24_lhvloose_nod0', '2j15_gsc35_boffperf_split']]],
 
         # e-mu
-#        ['e28_lhmedium_nod0_L1EM24VHI_mu8noL1_2j35_bperf',                'L1_EM24VHI', ['L1_EM24VHI', '', ''], [PhysicsStream], ['RATE:EgammaMuon',  'BW:BJet'], -1, ['serial',-1,['e28_lhmedium_nod0_L1EM24VHI','mu8noL1','2j35_bperf'] ]],
-#        ['e28_lhmedium_nod0_L1EM24VHI_mu8noL1_2j35_boffperf',             'L1_EM24VHI', ['L1_EM24VHI', '', ''], [PhysicsStream], ['RATE:EgammaMuon',  'BW:BJet'], -1, ['serial',-1,['e28_lhmedium_nod0_L1EM24VHI','mu8noL1','2j35_boffperf'] ]],
-#        ['e28_lhmedium_nod0_L1EM24VHI_mu8noL1_2j35_boffperf_split',       'L1_EM24VHI', ['L1_EM24VHI', '', ''], [PhysicsStream], ['RATE:EgammaMuon',  'BW:BJet'], -1, ['serial',-1,['e28_lhmedium_nod0_L1EM24VHI','mu8noL1','2j35_boffperf_split'] ]],
-#        ['e28_lhmedium_nod0_L1EM24VHI_mu8noL1_2j15_gsc35_boffperf_split', 'L1_EM24VHI', ['L1_EM24VHI', '', ''], [PhysicsStream], ['RATE:EgammaMuon',  'BW:BJet'], -1, ['serial',-1,['e28_lhmedium_nod0_L1EM24VHI','mu8noL1','2j15_gsc35_boffperf_split'] ]],
+        ['e28_lhmedium_nod0_L1EM24VHI_mu8noL1_2j35_bperf',                'L1_EM24VHI', ['L1_EM24VHI', '', ''], [PhysicsStream], ['RATE:EgammaMuon',  'BW:BJet'], -1, ['serial',-1,['e28_lhmedium_nod0_L1EM24VHI','mu8noL1','2j35_bperf'] ]],
+        ['e28_lhmedium_nod0_L1EM24VHI_mu8noL1_2j35_boffperf',             'L1_EM24VHI', ['L1_EM24VHI', '', ''], [PhysicsStream], ['RATE:EgammaMuon',  'BW:BJet'], -1, ['serial',-1,['e28_lhmedium_nod0_L1EM24VHI','mu8noL1','2j35_boffperf'] ]],
+        ['e28_lhmedium_nod0_L1EM24VHI_mu8noL1_2j35_boffperf_split',       'L1_EM24VHI', ['L1_EM24VHI', '', ''], [PhysicsStream], ['RATE:EgammaMuon',  'BW:BJet'], -1, ['serial',-1,['e28_lhmedium_nod0_L1EM24VHI','mu8noL1','2j35_boffperf_split'] ]],
+        ['e28_lhmedium_nod0_L1EM24VHI_mu8noL1_2j15_gsc35_boffperf_split', 'L1_EM24VHI', ['L1_EM24VHI', '', ''], [PhysicsStream], ['RATE:EgammaMuon',  'BW:BJet'], -1, ['serial',-1,['e28_lhmedium_nod0_L1EM24VHI','mu8noL1','2j15_gsc35_boffperf_split'] ]],
 
         # mu +asymmetric
-        ['mu26_ivarmedium_j150_bperf_j35_bperf',                                'L1_MU20MU21',  ['L1_MU20',    '', ''], [PhysicsStream], ['RATE:MuonBJet',  'BW:BJet'],  -1, ['serial',-1,['mu26_ivarmedium', 'j150_bperf','j35_bperf']]],
-        ['mu26_ivarmedium_j150_boffperf_j35_boffperf',                          'L1_MU20MU21',  ['L1_MU20',    '', ''], [PhysicsStream], ['RATE:MuonBJet',  'BW:BJet'],  -1, ['serial',-1,['mu26_ivarmedium', 'j150_boffperf','j35_boffperf']]],
-        ['mu26_ivarmedium_j150_boffperf_split_j35_boffperf_split',              'L1_MU20MU21',  ['L1_MU20',    '', ''], [PhysicsStream], ['RATE:MuonBJet',  'BW:BJet'],  -1, ['serial',-1,['mu26_ivarmedium', 'j150_boffperf_split','j35_boffperf_split']]],
-        ['mu26_ivarmedium_j110_gsc150_boffperf_split_j15_gsc35_boffperf_split', 'L1_MU20MU21',  ['L1_MU20',    '', ''], [PhysicsStream], ['RATE:MuonBJet',  'BW:BJet'],  -1, ['serial',-1,['mu26_ivarmedium', 'j110_gsc150_boffperf_split', 'j15_gsc35_boffperf_split']]],
+        ['mu26_ivarmedium_j150_bperf_j35_bperf',                            'L1_MU20MU21',    ['L1_MU20',    '', ''], [PhysicsStream], ['RATE:MuonBJet',  'BW:BJet'],  -1, ['serial',-1,['mu26_ivarmedium', 'j150_bperf','j35_bperf']]],
+        ['mu26_ivarmedium_j150_boffperf_j35_boffperf',                      'L1_MU20MU21',    ['L1_MU20',    '', ''], [PhysicsStream], ['RATE:MuonBJet',  'BW:BJet'],  -1, ['serial',-1,['mu26_ivarmedium', 'j150_boffperf','j35_boffperf']]],
+        ['mu26_ivarmedium_j150_boffperf_split_j35_boffperf_split',          'L1_MU20MU21',    ['L1_MU20',    '', ''], [PhysicsStream], ['RATE:MuonBJet',  'BW:BJet'],  -1, ['serial',-1,['mu26_ivarmedium', 'j150_boffperf_split','j35_boffperf_split']]],
+        ['mu26_ivarmedium_j110_gsc150_boffperf_split_j15_gsc35_boffperf_split', 'L1_MU20MU21',    ['L1_MU20',    '', ''], [PhysicsStream], ['RATE:MuonBJet',  'BW:BJet'],  -1, ['serial',-1,['mu26_ivarmedium', 'j110_gsc150_boffperf_split', 'j15_gsc35_boffperf_split']]],
 
         # mu + symmetric
-        ['mu26_ivarmedium_2j35_bperf',    'L1_MU20MU21',  ['L1_MU20', ''],    [PhysicsStream], ['RATE:MuonBJet',  'BW:BJet'],-1,['serial',-1,['mu26_ivarmedium', '2j35_bperf']]],
-        ['mu26_ivarmedium_2j35_boffperf',       'L1_MU20MU21',  ['L1_MU20', ''],    [PhysicsStream], ['RATE:MuonBJet',  'BW:BJet'],-1,['serial',-1,['mu26_ivarmedium', '2j35_boffperf']]],
-        ['mu26_ivarmedium_2j35_boffperf_split',    'L1_MU20MU21',  ['L1_MU20', ''],    [PhysicsStream], ['RATE:MuonBJet',  'BW:BJet'],-1,['serial',-1,['mu26_ivarmedium', '2j35_boffperf_split']]],
-        ['mu26_ivarmedium_2j15_gsc35_boffperf_split',    'L1_MU20MU21',  ['L1_MU20', ''],    [PhysicsStream], ['RATE:MuonBJet',  'BW:BJet'],-1,['serial',-1,['mu26_ivarmedium', '2j15_gsc35_boffperf_split']]],
+        ['mu26_ivarmedium_2j35_bperf',                'L1_MU20MU21',    ['L1_MU20',    '', ''], [PhysicsStream], ['RATE:MuonBJet',  'BW:BJet'],  -1, ['serial',-1,['mu26_ivarmedium', '2j35_bperf']]],
+        ['mu26_ivarmedium_2j35_boffperf',             'L1_MU20MU21',    ['L1_MU20',    '', ''], [PhysicsStream], ['RATE:MuonBJet',  'BW:BJet'],  -1, ['serial',-1,['mu26_ivarmedium', '2j35_boffperf']]],
+        ['mu26_ivarmedium_2j35_boffperf_split',       'L1_MU20MU21',    ['L1_MU20',    '', ''], [PhysicsStream], ['RATE:MuonBJet',  'BW:BJet'],  -1, ['serial',-1,['mu26_ivarmedium', '2j35_boffperf_split']]],
+        ['mu26_ivarmedium_2j15_gsc35_boffperf_split', 'L1_MU20MU21',    ['L1_MU20',    '', ''], [PhysicsStream], ['RATE:MuonBJet',  'BW:BJet'],  -1, ['serial',-1,['mu26_ivarmedium', '2j15_gsc35_boffperf_split']]],
+
 
         # e
         ['e28_lhtight_nod0_ivarloose_j150_bperf_j35_bperf',                                 'L1_EM24VHI', ['L1_EM24VHI', '', ''], [PhysicsStream], ['RATE:EgammaJet', 'BW:BJet'],  -1, ['serial',-1,['e28_lhtight_nod0_ivarloose', 'j150_bperf','j35_bperf']]],
@@ -3013,8 +3043,8 @@ def setupMenu():
 
         ['e20_lhmedium_2g10_loose',  'L1_EM15VH_3EM7', ['L1_EM15VH','L1_2EM7'], [PhysicsStream], ['RATE:ElectronPhoton', 'BW:Egamma'], -1,['parallel',-1,[] ]],
         ['e20_lhmedium_2g10_medium', 'L1_EM15VH_3EM7', ['L1_EM15VH','L1_2EM7'], [PhysicsStream], ['RATE:ElectronPhoton', 'BW:Egamma'], -1,['parallel',-1,[] ]],
-        ['2g10_loose_mu20',          'L1_MU20MU21',        ['L1_2EM7', 'L1_MU20'],  [PhysicsStream], ['RATE:EgammaMuon', 'BW:Egamma', 'BW:Muon'], -1, ['serial',-1,['2g10_loose','mu20'] ]],
-        ['2g10_medium_mu20',         'L1_MU20MU21',        ['L1_2EM7', 'L1_MU20'],  [PhysicsStream], ['RATE:EgammaMuon', 'BW:Egamma', 'BW:Muon'], -1, ['serial',-1,['2g10_medium','mu20'] ]],
+        ['2g10_loose_mu20',          'L1_MU20MU21',    ['L1_2EM7', 'L1_MU20'],  [PhysicsStream], ['RATE:EgammaMuon', 'BW:Egamma', 'BW:Muon'], -1, ['serial',-1,['2g10_loose','mu20'] ]],
+        ['2g10_medium_mu20',         'L1_MU20MU21',    ['L1_2EM7', 'L1_MU20'],  [PhysicsStream], ['RATE:EgammaMuon', 'BW:Egamma', 'BW:Muon'], -1, ['serial',-1,['2g10_medium','mu20'] ]],
 
         # LLP trigger seeded by MUON items
         ['j30_muvtx',                    'L1_2MU10',            [], [PhysicsStream], ['RATE:MuonJet','BW:Muon', 'BW:Jet'], -1],
@@ -3272,15 +3302,15 @@ def setupMenu():
         ['e24_lhmedium_nod0_L1EM20VH_6j15noL1',  'L1_EM20VH', ['L1_EM20VH',''], [PhysicsStream], ['RATE:EgammaJet', 'BW:Egamma', 'BW:Jet'], -1, ['serial',-1,["e24_lhmedium_nod0_L1EM20VH","6j15noL1"] ]],
 
 
-        ['mu26_2j20noL1',  'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MuonJet', 'BW:Muon', 'BW:Jet'], -1, ['serial',-1,["mu26","2j20noL1"] ]],
-        ['mu26_3j20noL1',  'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MuonJet', 'BW:Muon', 'BW:Jet'], -1, ['serial',-1,["mu26","3j20noL1"] ]],
-        ['mu26_4j15noL1',  'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MuonJet', 'BW:Muon', 'BW:Jet'], -1, ['serial',-1,["mu26","4j15noL1"] ]],
-        ['mu26_5j15noL1',  'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MuonJet', 'BW:Muon', 'BW:Jet'], -1, ['serial',-1,["mu26","5j15noL1"] ]],
+        ['mu26_2j20noL1',  'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MuonJet', 'BW:Muon', 'BW:Jet'], -1, ['serial',-1,["mu26","2j20noL1"] ]],
+        ['mu26_3j20noL1',  'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MuonJet', 'BW:Muon', 'BW:Jet'], -1, ['serial',-1,["mu26","3j20noL1"] ]],
+        ['mu26_4j15noL1',  'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MuonJet', 'BW:Muon', 'BW:Jet'], -1, ['serial',-1,["mu26","4j15noL1"] ]],
+        ['mu26_5j15noL1',  'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MuonJet', 'BW:Muon', 'BW:Jet'], -1, ['serial',-1,["mu26","5j15noL1"] ]],
          
-        ['mu24_2j20noL1',  'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MuonJet', 'BW:Muon', 'BW:Jet'], -1, ['serial',-1,["mu24","2j20noL1"] ]],
-        ['mu24_3j20noL1',  'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MuonJet', 'BW:Muon', 'BW:Jet'], -1, ['serial',-1,["mu24","3j20noL1"] ]],
-        ['mu24_4j15noL1',  'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MuonJet', 'BW:Muon', 'BW:Jet'], -1, ['serial',-1,["mu24","4j15noL1"] ]],
-        ['mu24_5j15noL1',  'L1_MU20MU21',  ['L1_MU20',''], [PhysicsStream], ['RATE:MuonJet', 'BW:Muon', 'BW:Jet'], -1, ['serial',-1,["mu24","5j15noL1"] ]],
+        ['mu24_2j20noL1',  'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MuonJet', 'BW:Muon', 'BW:Jet'], -1, ['serial',-1,["mu24","2j20noL1"] ]],
+        ['mu24_3j20noL1',  'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MuonJet', 'BW:Muon', 'BW:Jet'], -1, ['serial',-1,["mu24","3j20noL1"] ]],
+        ['mu24_4j15noL1',  'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MuonJet', 'BW:Muon', 'BW:Jet'], -1, ['serial',-1,["mu24","4j15noL1"] ]],
+        ['mu24_5j15noL1',  'L1_MU20MU21', ['L1_MU20',''], [PhysicsStream], ['RATE:MuonJet', 'BW:Muon', 'BW:Jet'], -1, ['serial',-1,["mu24","5j15noL1"] ]],
 
         
         # VBF triggers
@@ -3422,7 +3452,7 @@ def setupMenu():
         ['beamspot_allTE_trkfast_peb_L1TRT_EMPTY',           'L1_TRT_EMPTY', [], ["BeamSpot"], ['RATE:BeamSpot',  'BW:BeamSpot'], -1],
 
 
-        ['beamspot_allTE_trkfast_peb',           'L1_4J15', [], ["BeamSpot"], ['RATE:BeamSpot',  'BW:BeamSpot'], -1],
+        ['beamspot_allTE_trkfast_peb',           'L1_4J20', [], ["BeamSpot"], ['RATE:BeamSpot',  'BW:BeamSpot'], -1],
 
         ##trkFS --> no selection, add TRT to PEB events        
 
@@ -3433,7 +3463,7 @@ def setupMenu():
 
 # taking this out all together, not needed and even with PS=-1 makes histograms
 
-        ['beamspot_allTE_trkfast_pebTRT',           'L1_4J15', [], ["BeamSpot"], ['RATE:BeamSpot',  'BW:BeamSpot'], -1],
+        ['beamspot_allTE_trkfast_pebTRT',           'L1_4J20', [], ["BeamSpot"], ['RATE:BeamSpot',  'BW:BeamSpot'], -1],
 
 
         ##trkFS --> select good vertices, and write out PEB events
@@ -3445,7 +3475,7 @@ def setupMenu():
 
 
 
-        ['beamspot_activeTE_trkfast_peb',           'L1_4J15', [], ["BeamSpot"], ['RATE:BeamSpot',  'BW:BeamSpot'], -1],
+        ['beamspot_activeTE_trkfast_peb',           'L1_4J20', [], ["BeamSpot"], ['RATE:BeamSpot',  'BW:BeamSpot'], -1],
 
         ##trkFS --> select good vertices, add TRT data to PEB events
 
@@ -3456,7 +3486,7 @@ def setupMenu():
 
 # taking this out all together, not needed and even with PS=-1 makes histograms
 
-        ['beamspot_activeTE_trkfast_pebTRT',           'L1_4J15', [], ["BeamSpot"], ['RATE:BeamSpot',  'BW:BeamSpot'], -1],
+        ['beamspot_activeTE_trkfast_pebTRT',           'L1_4J20', [], ["BeamSpot"], ['RATE:BeamSpot',  'BW:BeamSpot'], -1],
 
         ##trkFS --> online beam-spot determination
 
@@ -3480,10 +3510,10 @@ def setupMenu():
 
     if TriggerFlags.doFTK():
         TriggerFlags.BeamspotSlice.signatures = TriggerFlags.BeamspotSlice.signatures() + [                                                                 
-            ['beamspot_idperf_FTK_L14J15_FTK',      'L1_4J15_FTK', [], ["BeamSpot"], ['RATE:BeamSpot',  'BW:BeamSpot'], -1],
-            ['beamspot_trkFS_FTK_L14J15_FTK',       'L1_4J15_FTK', [], ["BeamSpot"], ['RATE:BeamSpot',  'BW:BeamSpot'], -1],
-            ['beamspot_trkFS_FTKRefit_L14J15_FTK',  'L1_4J15_FTK', [], ["BeamSpot"], ['RATE:BeamSpot', 'BW:BeamSpot'], -1],
-            ['beamspot_idperf_FTKRefit_L14J15_FTK', 'L1_4J15_FTK', [], ["BeamSpot"], ['RATE:BeamSpot', 'BW:BeamSpot'], -1],       
+            ['beamspot_idperf_FTK_L14J20_FTK',      'L1_4J20_FTK', [], ["BeamSpot"], ['RATE:BeamSpot',  'BW:BeamSpot'], -1],
+            ['beamspot_trkFS_FTK_L14J20_FTK',       'L1_4J20_FTK', [], ["BeamSpot"], ['RATE:BeamSpot',  'BW:BeamSpot'], -1],
+            ['beamspot_trkFS_FTKRefit_L14J20_FTK',  'L1_4J20_FTK', [], ["BeamSpot"], ['RATE:BeamSpot', 'BW:BeamSpot'], -1],
+            ['beamspot_idperf_FTKRefit_L14J20_FTK', 'L1_4J20_FTK', [], ["BeamSpot"], ['RATE:BeamSpot', 'BW:BeamSpot'], -1],
             ]
 
 
@@ -3822,6 +3852,14 @@ def setupMenu():
 
         ['mb_sptrk_pt2_L1MBTS_2',                     'L1_MBTS_2',                     [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1],
 
+        ['mb_sp_vetospmbts2in_L1AFP_A_OR_C',                     'L1_AFP_A_OR_C',               [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1],
+        ['mb_sp_vetospmbts2in_L1AFP_A_AND_C',                     'L1_AFP_A_AND_C',               [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1],
+        ['mb_sp_vetospmbts2in_L1AFP_A',                     'L1_AFP_A',               [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1],
+        ['mb_sp_vetospmbts2in_L1AFP_C',                     'L1_AFP_C',               [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1],
+        ['mb_sp_vetosp_L1AFP_A_AND_C',                     'L1_AFP_A_AND_C',               [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1],
+
+        ['mb_sp_L1RD0_FILLED',                     'L1_RD0_FILLED',               [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1],
+        
         ]
         
     TriggerFlags.CalibSlice.signatures   = [
@@ -3995,6 +4033,7 @@ def setupMenu():
         ['noalg_L1EM15VH_3EM7',    'L1_EM15VH_3EM7',    [], [PhysicsStream], ['RATE:SeededStreamers', 'BW:Egamma'], -1],
         ['noalg_L1EM7',            'L1_EM7',            [], [PhysicsStream], ['RATE:SeededStreamers', 'BW:Egamma'], -1],
         ['noalg_L1EM3',            'L1_EM3',            [], [PhysicsStream], ['RATE:SeededStreamers', 'BW:Egamma'], -1],
+        ['noalg_mb_L1EM3',         'L1_EM3',            [], ['MinBias'], ['RATE:SeededStreamers', 'BW:Egamma'], -1],
         ['noalg_L12EM3',           'L1_2EM3',           [], [PhysicsStream], ['RATE:SeededStreamers', 'BW:Egamma'], -1],
 
         # Muon streamers
@@ -4012,8 +4051,8 @@ def setupMenu():
         ['noalg_L1MU11_EMPTY',      'L1_MU11_EMPTY',      [], [PhysicsStream], ['RATE:SeededStreamers', 'BW:Muon'], -1],
         ['noalg_L1MU4_UNPAIRED_ISO', 'L1_MU4_UNPAIRED_ISO', [], [PhysicsStream], ['RATE:SeededStreamers', 'BW:Muon'], -1],
 
-        ['noalg_L1MU20_FIRSTEMPTY', 'L1_MU20_FIRSTEMPTY', [], [PhysicsStream], ['RATE:SeededStreamers', 'BW:Muon'], -1],
-        ['noalg_L1MU21_FIRSTEMPTY', 'L1_MU21_FIRSTEMPTY', [], [PhysicsStream], ['RATE:SeededStreamers', 'BW:Muon'], -1],
+        ['noalg_L1MU20_FIRSTEMPTY',     'L1_MU20_FIRSTEMPTY', [], [PhysicsStream], ['RATE:SeededStreamers', 'BW:Muon'], -1],
+        ['noalg_L1MU21_FIRSTEMPTY',     'L1_MU21_FIRSTEMPTY', [], [PhysicsStream], ['RATE:SeededStreamers', 'BW:Muon'], -1],
         ['noalg_L1MU20MU21_FIRSTEMPTY', 'L1_MU20MU21_FIRSTEMPTY', [], [PhysicsStream], ['RATE:SeededStreamers', 'BW:Muon'], -1],
         
         ['noalg_mb_L1TE5',  'L1_TE5', [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1],
@@ -4062,7 +4101,8 @@ def setupMenu():
         ['noalg_L1MJJ-100', 'L1_MJJ-100', [], [PhysicsStream], ["RATE:L1TopoStreamers", "BW:Other"], -1],  
 
         # Chains for Week1 menu (ATR-11119)
-        ['noalg_L1MU4',   'L1_MU4',  [], [PhysicsStream, 'express'], ["RATE:SeededStreamers", "BW:Muon"], -1 ],
+        ['noalg_L1MU4',   'L1_MU4',  [], [PhysicsStream, 'express'], ["RATE:SeededStreamers", "BW:Muon"], -1 ], #AFP request
+        ['noalg_mb_L1MU4', 'L1_MU4',  [], ['MinBias'], ["RATE:SeededStreamers", "BW:Muon"], -1 ], #AFP request
         ['noalg_L1MU6',   'L1_MU6',  [], [PhysicsStream,'express'], ["RATE:SeededStreamers", "BW:Muon"], -1 ],
         ['noalg_L1J50',   'L1_J50',  [], [PhysicsStream], ["RATE:SeededStreamers", "BW:Jet"], -1 ],
 
@@ -4101,6 +4141,19 @@ def setupMenu():
         ['noalg_larcells_L1LAR-EM',                'L1_LAR-EM',           [], ['LArCells'],     ["RATE:SeededStreamers", "BW:Other"], -1], 
         ['noalg_larcells_L1LAR-J',                 'L1_LAR-J',            [], ['LArCells'],     ["RATE:SeededStreamers", "BW:Other"], -1], 
         ['noalg_L1Calo_EMPTY',            'L1_Calo_EMPTY',       [], ['L1Calo'],     ["RATE:SeededStreamers", "BW:Other"], -1], 
+      
+        ['noalg_l1calo_L1J75',         'L1_J75', [], ['L1Calo'], ["RATE:SeededStreamers", "BW:Other"], -1],
+        ['noalg_l1calo_L1J100',        'L1_J100', [], ['L1Calo'], ["RATE:SeededStreamers", "BW:Other"], -1],
+        ['noalg_l1calo_L1J120',        'L1_J120', [], ['L1Calo'], ["RATE:SeededStreamers", "BW:Other"], -1],
+        ['noalg_l1calo_L1J5031ETA49',  'L1_J50.31ETA49', [], ['L1Calo'], ["RATE:SeededStreamers", "BW:Other"], -1],
+        ['noalg_l1calo_L1J7531ETA49',  'L1_J75.31ETA49', [], ['L1Calo'], ["RATE:SeededStreamers", "BW:Other"], -1],
+        ['noalg_l1calo_L1J10031ETA49', 'L1_J100.31ETA49', [], ['L1Calo'], ["RATE:SeededStreamers", "BW:Other"], -1],
+        ['noalg_l1calo_L1EM7',         'L1_EM7', [], ['L1Calo'], ["RATE:SeededStreamers", "BW:Other"], -1],
+        ['noalg_l1calo_L1EM12',        'L1_EM12', [], ['L1Calo'], ["RATE:SeededStreamers", "BW:Other"], -1],
+        ['noalg_l1calo_L1EM15',        'L1_EM15', [], ['L1Calo'], ["RATE:SeededStreamers", "BW:Other"], -1],
+        ['noalg_l1calo_L1TAU8',        'L1_TAU8', [], ['L1Calo'], ["RATE:SeededStreamers", "BW:Other"], -1],
+        ['noalg_l1calo_L1TAU12',       'L1_TAU12', [], ['L1Calo'], ["RATE:SeededStreamers", "BW:Other"], -1],
+        ['noalg_l1calo_L1TAU20',       'L1_TAU20', [], ['L1Calo'], ["RATE:SeededStreamers", "BW:Other"], -1],
 
         ['noalg_l1topo_L12EM3',   'L1_2EM3',    [], ['L1Topo'],    ["RATE:SeededStreamers", "BW:Other"], -1],
         ['noalg_l1topo_L12MU4',   'L1_2MU4',    [], ['L1Topo'],    ["RATE:SeededStreamers", "BW:Other"], -1],
@@ -4282,10 +4335,10 @@ def setupMenu():
         ['noalg_L1AFP_A_AND_C',                      'L1_AFP_A_AND_C',               [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1],
         ['noalg_L1AFP_A_AND_C_MBTS_2',                      'L1_AFP_A_AND_C_MBTS_2',               [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1],
 
-        ['noalg_L1AFP_A_OR_C_EM3',                  'L1_AFP_A_OR_C_EM3',                  [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1],
-        ['noalg_L1AFP_A_AND_C_EM3',                  'L1_AFP_A_AND_C_EM3',                  [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1],
-        ['noalg_L1AFP_A_OR_C_MU4',                        'L1_AFP_A_OR_C_MU4',                  [],  ['MinBias'], [ 'RATE:MinBias','BW:MinBias'], -1],
-        ['noalg_L1AFP_A_AND_C_MU4',                        'L1_AFP_A_AND_C_MU4',                  [],  ['MinBias'], [ 'RATE:MinBias','BW:MinBias'], -1],
+        ['noalg_L1EM3_AFP_A_OR_C',                  'L1_EM3_AFP_A_OR_C',                  [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1],
+        ['noalg_L1EM3_AFP_A_AND_C',                  'L1_EM3_AFP_A_AND_C',                  [], ['MinBias'], ["BW:MinBias", "RATE:MinBias"], -1],
+        ['noalg_L1MU4_AFP_A_OR_C',                        'L1_MU4_AFP_A_OR_C',                  [],  ['MinBias'], [ 'RATE:MinBias','BW:MinBias'], -1],
+        ['noalg_L1MU4_AFP_A_AND_C',                        'L1_MU4_AFP_A_AND_C',                  [],  ['MinBias'], [ 'RATE:MinBias','BW:MinBias'], -1],
 
         ['noalg_L1AFP_A_OR_C_TE5',                        'L1_AFP_A_OR_C_TE5',                  [],  ['MinBias'], [ 'RATE:MinBias','BW:MinBias'], -1],
         ['noalg_L1AFP_A_AND_C_TE5',                        'L1_AFP_A_AND_C_TE5',                  [],  ['MinBias'], [ 'RATE:MinBias','BW:MinBias'], -1],
@@ -4296,9 +4349,9 @@ def setupMenu():
         ['noalg_L1AFP_A_OR_C_EMPTY',                        'L1_AFP_A_OR_C_EMPTY',                  [],  ['MinBias'], [ 'RATE:MinBias','BW:MinBias'], -1],
         ['noalg_L1AFP_A_OR_C_FIRSTEMPTY',                        'L1_AFP_A_OR_C_FIRSTEMPTY',                  [],  ['MinBias'], [ 'RATE:MinBias','BW:MinBias'], -1],
 
-        ['noalg_L1AFP_A_AND_C_SPECTOF_J50',                        'L1_AFP_A_AND_C_SPECTOF_J50',                  [],  ['MinBias'], [ 'RATE:MinBias','BW:MinBias'], -1],
-        ['noalg_L1AFP_A_AND_C_SPECTOF_J75',                        'L1_AFP_A_AND_C_SPECTOF_J75',                  [],  ['MinBias'], [ 'RATE:MinBias','BW:MinBias'], -1],
-        ['noalg_L1AFP_A_AND_C_SPECTOF_J100',                        'L1_AFP_A_AND_C_SPECTOF_J100',                  [],  ['MinBias'], [ 'RATE:MinBias','BW:MinBias'], -1],
+        ['noalg_L1AFP_A_AND_C_SPECTOF_J50',                        'L1_AFP_A_AND_C_SPECTOF_J50',                  [],  [PhysicsStream], [ 'RATE:MinBias','BW:MinBias'], -1],
+        ['noalg_L1AFP_A_AND_C_SPECTOF_J75',                        'L1_AFP_A_AND_C_SPECTOF_J75',                  [],  [PhysicsStream], [ 'RATE:MinBias','BW:MinBias'], -1],
+        ['noalg_L1AFP_A_AND_C_SPECTOF_J100',                        'L1_AFP_A_AND_C_SPECTOF_J100',                  [],  [PhysicsStream], [ 'RATE:MinBias','BW:MinBias'], -1],
 
         ['noalg_L1MBTS_2',                        'L1_MBTS_2',                  [],  ['MinBias'], [ 'RATE:MinBias','BW:MinBias'], -1],
 
@@ -4363,7 +4416,8 @@ def setupMenu():
         #L1Calo requested streamers
 	['noalg_L1J100',  'L1_J100',   [], [PhysicsStream], ["RATE:SeededStreamers", "BW:Jet"], -1],
 	['noalg_L1J100.31ETA49',  'L1_J100.31ETA49',   [], [PhysicsStream], ["RATE:SeededStreamers", "BW:Jet"], -1 ], 
-	['noalg_L1J12',  'L1_J12',   [], [PhysicsStream], ["RATE:SeededStreamers", "BW:Jet"], -1 ], 
+        ['noalg_L1J12',  'L1_J12',   [], [PhysicsStream], ["RATE:SeededStreamers", "BW:Jet"], -1 ],
+        ['noalg_mb_L1J12',  'L1_J12',   [], ['MinBias'], ["RATE:SeededStreamers", "BW:Jet"], -1 ],
 	['noalg_L1J120',  'L1_J120',   [], [PhysicsStream], ["RATE:SeededStreamers", "BW:Jet"], -1],
 	['noalg_L1J15',  'L1_J15',   [], [PhysicsStream], ["RATE:SeededStreamers", "BW:Jet"], -1 ],
 	['noalg_L1J15.31ETA49',  'L1_J15.31ETA49',   [], [PhysicsStream], ["RATE:SeededStreamers", "BW:Jet"], -1 ],
@@ -4442,6 +4496,7 @@ def setupMenu():
         ['eb_high_L1RD2_FILLED',              'L1_RD2_FILLED',             [], ['EnhancedBias'], ["RATE:EnhancedBias", "BW:Detector"], -1],
         ]
 
+
     ###############################################################
     #################################################################
     signatureList=[]
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/SignatureDicts.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/SignatureDicts.py
index f1fd71b62b1077be40d12c74c26391cc4181d286..ec00f1d6c47ef6acf7ad868c68f70c784862a0d5 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/menu/SignatureDicts.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/SignatureDicts.py
@@ -18,6 +18,7 @@ SliceIDDict = {
     'MET'     : 'xe',
     'XS'      : 'xs',
     'TE'      : 'te',
+    'AFP'     : 'afp',
     'MinBias' : 'mb',
     'HeavyIon' : 'hi',
     'Cosmic'  : 'cosmic',
@@ -204,14 +205,14 @@ MuonChainParts = {
     'IDinfo'         : [],
     'isoInfo'        : ['iloose', 'imedium', 'itight', 'ivarloose', 'ivarmedium','icalo','iloosecalo','imediumcalo','iloosems', 'ivarloosecalo', 'ivarmediumcalo'],
     'reccalibInfo'   : ['msonly', 'l2msonly', 'l2idonly', 'nomucomb', 'idperf','muoncalib', 'mucombTag','muL2', 'mgonly'],
-    'trkInfo'        : ['fasttr', 'hlttr', 'ftk', 'IDT'],
+    'trkInfo'        : ['fasttr', 'hlttr', 'IDT'],
     'hypoInfo'       : [],
-    'FSinfo'         : ['ftkFS', 'nscan03', 'l2nscan03', 'nscan05', 'l2nscan05', 'JpsimumuFS', 'JpsimumuL2','calotag'],
+    'FSinfo'         : ['FTKFS', 'nscan03', 'l2nscan03', 'nscan05', 'l2nscan05', 'JpsimumuFS', 'JpsimumuL2','calotag'],
     'L2IDAlg'        : ['L2Star','IdScan','FTK','FTKRefit'],
     'L2SAAlg'        : ['muFast', 'l2muonSA',],
     'L2CBAlg'        : ['muComb',],
     'EFAlg'          : ['SuperEF'],
-    'addInfo'        : ['cosmicEF', 'cosmic','IdTest','fsperf', 'ds1', 'ds2','ds3', 'r1extr', 'perf', 'noEF','10invm30','pt2','z10','llns','noComb','zROItest','invm1'],
+    'addInfo'        : ['cosmicEF', 'cosmic','IdTest','fsperf', 'ds1', 'ds2','ds3', 'r1extr', 'perf', 'noEF','10invm30','pt2','z10','llns','noComb','zROItest','invm1','inTimeRoI','dRl1'],
     'overlapRemoval' : ['wOvlpRm', 'noOvlpRm', 'noMuCombOvlpRm'],
     'topo'           : AllowedTopos_mu,
     'flavour'        : ['hf'],
@@ -493,6 +494,33 @@ CombinedChainParts_Default['chainParts'] = ['g','mu'],
 CombinedChainParts_Default['trigType'] =['g','mu']
 CombinedChainParts_Default['topo'] = []
 
+#==========================================================
+# AFP
+#==========================================================
+# ---- AFP Dictinary of all allowed Values ----
+AFPChainParts = {
+    'signature'      : ['AFP'],
+    'L1item'         : '',
+    'chainPartName'  : '',
+    'multiplicity'   : '',
+    'trigType'       : ['afp'],
+    'threshold'      : '',
+    'extra'          : [],
+    'addInfo'        : []
+    }
+# ---- AFPDictinary of default Values ----
+AFPChainParts_Default = {
+    'signature'      : ['AFP'],
+    'L1item'         : '',
+    'chainPartName'  : '',
+    'multiplicity'   : '',
+    'trigType'       : ['afp'],
+    'threshold'      : '',
+    'extra'          : '',
+    'addInfo'        : []
+    }
+
+
 #==========================================================
 # MinBias chains
 #==========================================================
@@ -877,6 +905,8 @@ def getSignatureInformation(signature):
         return [XSChainParts_Default, XSChainParts]
     if signature == "TE":
         return [TEChainParts_Default, TEChainParts]
+    if signature == "AFP":
+        return [AFPChainParts_Default, AFPChainParts]
     if signature == "MinBias":
         return [MinBiasChainParts_Default, MinBiasChainParts]
     if signature == "HeavyIon":
@@ -901,7 +931,6 @@ def getSignatureInformation(signature):
 
 def getBasePattern():
     import re
-    import itertools
     # possibleTT = '|'.join(allowedSignaturePropertiesAndValues['trigType'])
     #print 'SignatureDicts.py: Allowed values for triType in base pattern', SliceIDDict.values()
     allTrigTypes = SliceIDDict.values()
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/SliceFlags.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/SliceFlags.py
index 552e49cbeb1726c4b90be1a6e0f178914e2f4863..ea6ae25cccc547c02e90bd3efb171cfc209ebe5e 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/menu/SliceFlags.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/SliceFlags.py
@@ -1,21 +1,22 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-import TriggerMenu.egamma.EgammaSliceFlags
-import TriggerMenu.jet.JetSliceFlags
-import TriggerMenu.bjet.BjetSliceFlags
-import TriggerMenu.muon.MuonSliceFlags
-import TriggerMenu.met.METSliceFlags
-import TriggerMenu.tau.TauSliceFlags
-import TriggerMenu.bphysics.BphysicsSliceFlags
-import TriggerMenu.minbias.MinBiasSliceFlags
-import TriggerMenu.heavyion.HeavyIonSliceFlags
-import TriggerMenu.combined.CombinedSliceFlags
-import TriggerMenu.calibcosmicmon.CosmicSliceFlags
-import TriggerMenu.calibcosmicmon.CalibSliceFlags
-import TriggerMenu.calibcosmicmon.StreamingSliceFlags
-import TriggerMenu.calibcosmicmon.MonitorSliceFlags
-import TriggerMenu.calibcosmicmon.BeamspotSliceFlags
-import TriggerMenu.calibcosmicmon.EnhancedBiasSliceFlags
-import TriggerMenu.test.TestSliceFlags
+import TriggerMenu.egamma.EgammaSliceFlags                  # noqa: F401
+import TriggerMenu.jet.JetSliceFlags                        # noqa: F401
+import TriggerMenu.bjet.BjetSliceFlags                      # noqa: F401
+import TriggerMenu.muon.MuonSliceFlags                      # noqa: F401
+import TriggerMenu.met.METSliceFlags                        # noqa: F401
+import TriggerMenu.tau.TauSliceFlags                        # noqa: F401
+import TriggerMenu.bphysics.BphysicsSliceFlags              # noqa: F401
+import TriggerMenu.afp.AFPSliceFlags                        # noqa: F401
+import TriggerMenu.minbias.MinBiasSliceFlags                # noqa: F401
+import TriggerMenu.heavyion.HeavyIonSliceFlags              # noqa: F401
+import TriggerMenu.combined.CombinedSliceFlags              # noqa: F401
+import TriggerMenu.calibcosmicmon.CosmicSliceFlags          # noqa: F401
+import TriggerMenu.calibcosmicmon.CalibSliceFlags           # noqa: F401
+import TriggerMenu.calibcosmicmon.StreamingSliceFlags       # noqa: F401
+import TriggerMenu.calibcosmicmon.MonitorSliceFlags         # noqa: F401
+import TriggerMenu.calibcosmicmon.BeamspotSliceFlags        # noqa: F401
+import TriggerMenu.calibcosmicmon.EnhancedBiasSliceFlags    # noqa: F401
+import TriggerMenu.test.TestSliceFlags                      # noqa: F401
 
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/StreamInfo.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/StreamInfo.py
index f6f4da0b10d02b54a70d2595533f83017399f1b0..0c91e2d9b4259469b737428ecc06fa51e955198b 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/menu/StreamInfo.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/StreamInfo.py
@@ -18,7 +18,8 @@ physicsStreams = ['Main',
                   'Bphysics',
                   'Combined',
                   'Muon', 
-                  'Met', 'Jet', 'Tau', 
+                  'Met', 'Jet', 'Tau',
+                  'AFP',
                   'MinBias',
                   'ZeroBias',
                   'TauOverlay',
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/simpleExpress.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/simpleExpress.py
index 5aa9b6634ef47e8cab3f9b98fbb74c38cac73d12..381d56181cc36100ad88f7df19d50b0f80f8c6aa 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/menu/simpleExpress.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/simpleExpress.py
@@ -45,3 +45,10 @@ ExpressNamesPPV4= {
     'mu24_tight'               :   1,
     }
 
+ExpressNamesPPV5 = {
+}
+ExpressNamesPPV6 = {
+}
+ExpressNamesPPV7 = {
+}
+
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/met/METSliceFlags.py b/Trigger/TriggerCommon/TriggerMenu/python/met/METSliceFlags.py
index f0a0c95920d6053434f0bd149672e74078e5acc7..ef098a8e112344520a7ac33a4d862a9ae871b6f9 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/met/METSliceFlags.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/met/METSliceFlags.py
@@ -2,10 +2,8 @@
 
 """ MET slice specific flags  """
 
- 
-from AthenaCommon.Logging import logging
-from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer, jobproperties
-from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper, AllowedList
+from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer
+from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper
 
 # create container
 __author__  = 'T. Bold'
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/met/MissingETDef.py b/Trigger/TriggerCommon/TriggerMenu/python/met/MissingETDef.py
index 5176b6052b208790a3831b50185dd6a0920a5fa9..7a2ec158ba5a89b79392424d53f052767099eb1e 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/met/MissingETDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/met/MissingETDef.py
@@ -19,8 +19,7 @@ from TrigEFMissingET.TrigEFMissingETConfig import (EFMissingET_Fex_2sidednoiseSu
                                                    EFMissingET_Fex_topoClustersPS, 
                                                    EFMissingET_Fex_topoClustersPUC)
 
-from TrigL2MissingET.TrigL2MissingETConfig import (L2CaloMissingET_Fex_ReadL2L1,
-                                                   L2MissingET_Fex)
+from TrigL2MissingET.TrigL2MissingETConfig import L2MissingET_Fex
 
 from TrigMissingETHypo.TrigMissingETHypoConfig import (EFMetHypoJetsXE,
                                                        EFMetHypoTrackAndJetsXE,
@@ -30,16 +29,13 @@ from TrigMissingETHypo.TrigMissingETHypoConfig import (EFMetHypoJetsXE,
                                                        EFMetHypoTCXE,
                                                        EFMetHypoTE,
                                                        EFMetHypoXE, 
-                                                       EFMetHypoXS_2sided,
-                                                       L2MetHypoFEBXE,
-                                                       L2MetHypoXE)
+                                                       EFMetHypoXS_2sided)
 
 from TrigMissingETMuon.TrigMissingETMuonConfig import (EFTrigMissingETMuon_Fex,
                                                        EFTrigMissingETMuon_Fex_Jets,
                                                        EFTrigMissingETMuon_Fex_topocl,
                                                        EFTrigMissingETMuon_Fex_topoclPS,
                                                        EFTrigMissingETMuon_Fex_topoclPUC,
-                                                       L2CaloTrigMissingETMuon_Fex,
                                                        L2TrigMissingETMuon_Fex)
 
 from TrigGenericAlgs.TrigGenericAlgsConf import PESA__DummyUnseededAllTEAlgo
@@ -110,8 +106,7 @@ class L2EFChain_met(L2EFChainDef):
         calibration = self.chainPart['calib']
         jetCalib    = self.chainPart['jetCalib']
         L2recoAlg   = self.chainPart['L2recoAlg']
-        EFrecoAlg   = self.chainPart['EFrecoAlg']        
-        L2muon      = self.chainPart['L2muonCorr']
+        EFrecoAlg   = self.chainPart['EFrecoAlg']
         EFmuon      = self.chainPart['EFmuonCorr']
         addInfo     = self.chainPart["addInfo"]
 
@@ -140,18 +135,6 @@ class L2EFChain_met(L2EFChainDef):
         ##L1 MET 
         theL2Fex     = L2MissingET_Fex()
         theL2MuonFex = L2TrigMissingETMuon_Fex()
-        
-        ##FEB MET at L2
-#        theL2FEBL1Check  =  L2CaloMissingET_Fex_ReadL2L1()
-        
-#        theL2FEBMuonFex  =  L2CaloTrigMissingETMuon_Fex() 
-
-        mucorr=  '_wMu' if L2muon else '' 
-        if L2recoAlg=="L2FS":
-            theL2MuonHypo  =  L2MetHypoFEBXE(name='L2MetHypo_xe%d%s_FEB'%(threshold,mucorr),l2_thr=threshold*GeV)
-        else:            
-            theL2MuonHypo  =  L2MetHypoXE('L2MetHypo_xe_noL2%s' %mucorr,l2_thr=threshold*GeV)
-
 
         mucorr=  '_wMu' if EFmuon else ''          
         ##MET with topo-cluster
@@ -241,11 +224,6 @@ class L2EFChain_met(L2EFChainDef):
         # Obtaining the needed jet TEs from the jet code
         #----------------------------------------------------
         from TriggerJobOpts.TriggerFlags import TriggerFlags
-        #if "v6" in TriggerFlags.triggerMenuSetup() or "v5" in TriggerFlags.triggerMenuSetup():
-        #    chain = ['j0_lcw', '',  [], ["Main"], ['RATE:SingleJet', 'BW:Jet'], -1]
-        #else:
-        #    chain = ['j0', '',  [], ["Main"], ['RATE:SingleJet', 'BW:Jet'], -1]
-        # chain = ['j0_lcw', '',  [], ["Main"], ['RATE:SingleJet', 'BW:Jet'], -1]
 
         chain = ['j0_{0}_{1}'.format(calibration, jetCalib), '', [], ["Main"], ['RATE:SingleJet', 'BW:Jet'], -1]
 
@@ -296,16 +274,6 @@ class L2EFChain_met(L2EFChainDef):
             self.L2sequenceList += [[ self.l2_input_tes,              [theL2Fex],                      'L2_xe_step1']]
             ##Moun Correction to L1 MET
             self.L2sequenceList += [[ ['L2_xe_step1', muonSeed],  [theL2MuonFex],                  'L2_xe_step2']]
-            
-            # ##FEB Met
-            # self.L2sequenceList += [[ 'L2_xe_step2',                 [theL2FEBL1Check],               'L2_xe_step3']]
-
-            # if L2recoAlg=="l2fsperf":
-            #     #Only execute Muon FEB MET and muon correction
-            #     self.L2sequenceList += [[ ['L2_xe_step3',muonSeed],   [theL2FEBMuonFex], 'L2_xe_step4']]            
-            # if L2recoAlg=="L2FS":
-            #     #Hypo on FEB MET
-            #     self.L2sequenceList += [[ ['L2_xe_step3',muonSeed],   [theL2FEBMuonFex,theL2MuonHypo], 'L2_xe_step4']]
 
         # --- EF ---                
 
@@ -395,8 +363,6 @@ class L2EFChain_met(L2EFChainDef):
         if L2recoAlg=="l2fsperf" or  L2recoAlg=="L2FS" :
             self.L2signatureList += [ [['L2_xe_step1']] ]
             self.L2signatureList += [ [['L2_xe_step2']] ]
-#            self.L2signatureList += [ [['L2_xe_step3']] ]
-#            self.L2signatureList += [ [['L2_xe_step4']] ]
 
         if EFrecoAlg=="trkmht" :
             self.EFsignatureList += [ [['EF_xe_step0']] ]   
@@ -413,13 +379,10 @@ class L2EFChain_met(L2EFChainDef):
         if L2recoAlg=="l2fsperf" or  L2recoAlg=="L2FS" :
             self.TErenamingDict['L2_xe_step1']= mergeRemovingOverlap('L2_', self.sig_id_noMult+'_step1')
             self.TErenamingDict['L2_xe_step2']= mergeRemovingOverlap('L2_', self.sig_id_noMult+'_step2')
-#            self.TErenamingDict['L2_xe_step3']= mergeRemovingOverlap('L2_', self.sig_id_noMult+'_step3')
-#            self.TErenamingDict['L2_xe_step4']= mergeRemovingOverlap('L2_', self.sig_id_noMult+'_step4')
 
         if EFrecoAlg=='trkmht':
             self.TErenamingDict['EF_xe_step0']= mergeRemovingOverlap('EF_', self.sig_id_noMult+"_step0")                                                                    
-  
-            
+              
         self.TErenamingDict['EF_xe_step1']= mergeRemovingOverlap('EF_', self.sig_id_noMult+'_step1')
         if "FStracks" in addInfo:
             self.TErenamingDict['EF_xe_step2']= mergeRemovingOverlap('EF_', self.sig_id_noMult+"_step2")
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/met/generateMETChainDefs.py b/Trigger/TriggerCommon/TriggerMenu/python/met/generateMETChainDefs.py
index 3a527ed414847aa3c9e92f80db111b62e73d6731..4ff7b1a0f18979c3e73c8bff089383fa23685202 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/met/generateMETChainDefs.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/met/generateMETChainDefs.py
@@ -9,10 +9,10 @@ from AthenaCommon.Logging import logging
 logging.getLogger().info("Importing %s",__name__)
 
 
-from TriggerMenu.met.MissingETDef import *
+from TriggerMenu.met.MissingETDef import L2EFChain_met
 
 from TriggerJobOpts.TriggerFlags import TriggerFlags
-from TriggerMenu.menu.MenuUtils import *
+from TriggerMenu.menu.MenuUtils import splitChainDict,mergeChainDefs
 
 
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/minbias/MinBiasDef.py b/Trigger/TriggerCommon/TriggerMenu/python/minbias/MinBiasDef.py
index 9b6800064936c2f87b89b1df2cb6003d7933f09e..849bdb5a6ea9833aa8ffc46862e638d56d320fcc 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/minbias/MinBiasDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/minbias/MinBiasDef.py
@@ -10,22 +10,14 @@ logging.getLogger().info("Importing %s",__name__)
 
 logMinBiasDef = logging.getLogger("TriggerMenu.minbias.MinBiasDef")
 
-from AthenaCommon import CfgGetter
-from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+from AthenaCommon.SystemOfUnits import GeV
 
-import re
+from TriggerMenu.menu.HltConfig import L2EFChainDef,mergeRemovingOverlap
 
-from TriggerJobOpts.TriggerFlags            import TriggerFlags
-
-from TriggerMenu.minbias.MinBiasSliceFlags  import MinBiasSliceFlags
-
-from TriggerMenu.menu.HltConfig import *
-
-from TrigGenericAlgs.TrigGenericAlgsConf import PESA__DummyUnseededAllTEAlgo
-
-#theTrigEFIDInsideOut_FullScan = TrigEFIDSequence("FullScan","fullScan")
-
-from TrigT2MinBias.TrigT2MinBiasConfig import *
+from TrigT2MinBias.TrigT2MinBiasConfig import (MbMbtsHypo,L2MbMbtsFex,L2MbSpFex,L2MbSpFex_SCTNoiseSup,L2MbSpFex_ncb,
+                                               L2MbSpHypo_blayer,L2MbSpHypo_veto,L2MbSpFex_noPix,L2MbSpMhNoPixHypo_hip,
+                                               L2MbSpFex_BLayer,L2MbSpHypo_ncb,L2MbSpHypo,L2MbSpHypo_PT,
+                                               L2MbMbtsHypo_PT,L2MbZdcFex_LG,L2MbZdcHypo_PT,L2MbZdcFex_HG,trigT2MinBiasProperties)
 from InDetTrigRecExample.EFInDetConfig import TrigEFIDSequence
 #fexes.efid = TrigEFIDSequence("minBias","minBias","InsideOut").getSequence()
 #fexes.efid2P = TrigEFIDSequence("minBias2P","minBias2","InsideOutLowPt").getSequence()
@@ -35,20 +27,19 @@ efid = TrigEFIDSequence("minBias","minBias","InsideOut").getSequence()
 efid_heavyIon = TrigEFIDSequence("heavyIonFS","heavyIonFS","InsideOut").getSequence()
 efid2P = TrigEFIDSequence("minBias2P","minBias2","InsideOutLowPt").getSequence()
 
-from TrigMinBias.TrigMinBiasConfig import *
-
+from TrigMinBias.TrigMinBiasConfig import (EFMbTrkFex,EFMbTrkHypoExclusiveLoose,EFMbTrkHypoExclusiveTight,EFMbTrkHypo,
+                                           EFMbVxFex,MbVxHypo,MbTrkHypo)
 
 from TrigGenericAlgs.TrigGenericAlgsConf import PESA__DummyUnseededAllTEAlgo as DummyRoI
 from TrigGenericAlgs.TrigGenericAlgsConf import PrescaleAlgo
 dummyRoI=DummyRoI(name='MinBiasDummyRoI', createRoIDescriptors = True, NumberOfOutputTEs=1)
 terminateAlgo = PrescaleAlgo('terminateAlgo')
 
-
 # for HI
 from TrigHIHypo.TrigHIHypoConfig import HIEFTrackHypo_AtLeastOneTrack
 atLeastOneTrack = HIEFTrackHypo_AtLeastOneTrack(name='HIEFTrackHypo_AtLeastOneTrack')
 
-from TrigHIHypo.TrigHIHypoConfig import *
+from TrigHIHypo.TrigHIHypoConfig import HIL2VtxMultHypo
 #hypos.update(hi_hypos)
 
 #L2 pileup suppression
@@ -326,7 +317,6 @@ class L2EFChain_MB(L2EFChainDef):
             chainSuffix = "idperf"
             if not doHeavyIon:
                 theEFFex1 =  efid
-                theEFFex2 =  efid2P
             else:
                 theEFFex1 =  efid_heavyIon
 
@@ -351,9 +341,6 @@ class L2EFChain_MB(L2EFChainDef):
 
 ###########################
     def setup_mb_perf(self):
-        doHeavyIon=False
-        if 'ion' in self.chainPart['extra']:
-            doHeavyIon=True
 
         ########## L2 algos ##################
         if "perf" in self.chainPart['recoAlg']:
@@ -399,9 +386,6 @@ class L2EFChain_MB(L2EFChainDef):
 
 ###########################
     def setup_mb_zdcperf(self):
-        doHeavyIon=False
-        if 'ion' in self.chainPart['extra']:
-            doHeavyIon=True
 
         ########## L2 algos ##################
         if "zdcperf" in self.chainPart['recoAlg']:
@@ -438,9 +422,6 @@ class L2EFChain_MB(L2EFChainDef):
 
 ###########################
     def setup_mb_mbts(self):
-        doHeavyIon=False
-        if 'ion' in self.chainPart['extra']:
-            doHeavyIon=True
 
         theL2Fex  = L2MbMbtsFex
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/minbias/MinBiasSliceFlags.py b/Trigger/TriggerCommon/TriggerMenu/python/minbias/MinBiasSliceFlags.py
index 216ca7caa7cb0d52bd37e7e4c024357ce06dffe3..6c8b9a7567d6eae9160a187535a350c95b3ba104 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/minbias/MinBiasSliceFlags.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/minbias/MinBiasSliceFlags.py
@@ -2,10 +2,8 @@
 
 """ MinBias slice specific flags  """
 
-from AthenaCommon.Logging import logging
-from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer, jobproperties
-from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper, AllowedList
-from TriggerMenu.menu.TriggerPythonConfig import TriggerPythonConfig
+from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer
+from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper
 
 __author__  = 'R. Kwee, B. Demirkoz, T.Bold, T.Kohno, W. H. Bell'
 __version__="$Revision: 1.18 $"
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/minbias/generateMinBiasChainDefs.py b/Trigger/TriggerCommon/TriggerMenu/python/minbias/generateMinBiasChainDefs.py
index 49d40473f3143de0b39bcb2a4685e050d037b7d5..18f811026fc8de85af1f1be24d76cec38b8e6759 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/minbias/generateMinBiasChainDefs.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/minbias/generateMinBiasChainDefs.py
@@ -9,8 +9,8 @@ from AthenaCommon.Logging import logging
 logging.getLogger().info("Importing %s",__name__)
 
 
-from TriggerMenu.minbias.MinBiasDef import *
-from TriggerMenu.menu.MenuUtils import *
+from TriggerMenu.minbias.MinBiasDef import L2EFChain_MB
+from TriggerMenu.menu.MenuUtils import splitChainDict,mergeChainDefs
 
 
 MinBias = []
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDef.py b/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDef.py
index c903c593a6b8c21f90059d8da48e5e7704d7fa87..f4df4145910d094d3b4adf1cbaccc9c83164781c 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDef.py
@@ -11,7 +11,7 @@ logging.getLogger().info("Importing %s",__name__)
 
 log = logging.getLogger("TriggerMenu.muon.MuonDef")
 
-from TriggerMenu.menu.HltConfig import *
+from TriggerMenu.menu.HltConfig import mergeRemovingOverlap,L2EFChainDef
 
 from TrigInDetConf.TrigInDetSequence import TrigInDetSequence
 from InDetTrigRecExample.EFInDetConfig import TrigEFIDSequence
@@ -72,10 +72,22 @@ class L2EFChain_mu(L2EFChainDef):
     if 'AFP' in self.L2InputTE:
       self.L2InputTE = self.L2InputTE.replace("AFP_C_","")
     if self.L2InputTE:      # cut of L1_, _EMPTY,..., & multiplicity
-      self.L2InputTE = self.L2InputTE.replace("L1_","")
-      self.L2InputTE = self.L2InputTE.split("_")[0]
-      self.L2InputTE = self.L2InputTE[1:] if self.L2InputTE[0].isdigit() else self.L2InputTE
-    
+      if "dRl1" in self.chainPart['addInfo']:
+        #the dRl1 acts on a list of L1 RoIs, so we need to treat each item in the list separately
+        #then recreate the list with proper thresholds
+        #would probably be easier to just use ['MU6','MU6'] in the menu, but this way it's consistent 
+        tmpL2InputTE = []
+        for l1Thr in self.L2InputTE:
+          l1Thr = l1Thr.replace("L1_","")
+          l1Thr = l1Thr.split("_")[0]
+          l1Thr = l1Thr[1:] if l1Thr.isdigit() else l1Thr 
+          tmpL2InputTE.append(l1Thr)
+        self.L2InputTE = tmpL2InputTE
+      else:
+        self.L2InputTE = self.L2InputTE.replace("L1_","")
+        self.L2InputTE = self.L2InputTE.split("_")[0]
+        self.L2InputTE = self.L2InputTE[1:] if self.L2InputTE[0].isdigit() else self.L2InputTE
+      
     # --- used to configure hypos for FS muon chains
     self.allMuThrs=AllMuons
 
@@ -89,7 +101,7 @@ class L2EFChain_mu(L2EFChainDef):
     self.doOvlpRm = False
     if "nscan" in self.chainName or "bTau" in self.chainName :
       self.doOvlpRm = False
-    elif "ftkFS" in self.chainPart['FSinfo']:
+    elif "FTKFS" in self.chainPart['FSinfo']:
       self.setup_muXX_noL1FTK()
     elif (self.mult > 1) & ('wOvlpRm' in self.ovlpRm):
       self.doOvlpRm = True
@@ -106,6 +118,7 @@ class L2EFChain_mu(L2EFChainDef):
           and not self.chainPart['hypoInfo'] \
           and not self.chainPart['reccalibInfo'] \
           and "cosmicEF" not in self.chainPart['addInfo'] \
+          and not "dRl1" in self.chainPart['addInfo'] \
           and not self.thisIsBphysChain :
       self.setup_muXX_ID()
     elif "muL2" in self.chainPart['reccalibInfo']:
@@ -116,8 +129,10 @@ class L2EFChain_mu(L2EFChainDef):
       self.setup_muXX_NS()
     elif "calotag" in self.chainPart['FSinfo']:
       self.setup_muXX_calotag_noL1()
-    elif self.chainPart['extra'] or "JpsimumuFS" in self.chainPart['FSinfo']:
+    elif "noL1" in self.chainPart['extra'] or "JpsimumuFS" in self.chainPart['FSinfo']:
       self.setup_muXX_noL1()
+    elif "dRl1" in self.chainPart['addInfo']:
+      self.setup_muXX_dR()
     elif self.chainPart['reccalibInfo'] == "idperf":
       self.setup_muXX_idperf()
     elif self.chainPart['reccalibInfo'] == "l2msonly"  and "cosmicEF" not in self.chainPart['addInfo'] :
@@ -341,7 +356,7 @@ class L2EFChain_mu(L2EFChainDef):
       EFinputTE = 'L2_mu_hypo2'
 
       # Run also FTK tracking
-    if self.chainPart['trkInfo'] == "ftk":
+    if "FTK" in self.chainPart['L2IDAlg']:
       from TrigInDetConf.TrigInDetFTKSequence import TrigInDetFTKSequence
       
       [ftktrkfast, ftktrkprec] = TrigInDetFTKSequence("Muon","muonIso",sequenceFlavour=["PT"]).getSequence()    
@@ -481,7 +496,7 @@ class L2EFChain_mu(L2EFChainDef):
       self.L2signatureList += [ [['L2_mu_step2']*self.mult] ]
       self.L2signatureList += [ [['L2_mu_hypo2']*self.mult] ]
      
-    if self.chainPart['trkInfo'] == 'ftk':
+    if "FTK" in self.chainPart['L2IDAlg']:
       self.L2signatureList += [ [['L2_mu_step3']*self.mult] ]
       self.L2signatureList += [ [['L2_mu_step4']*self.mult] ] 
       self.L2signatureList += [ [['L2_mu_hypo3']*self.mult] ] 
@@ -519,7 +534,7 @@ class L2EFChain_mu(L2EFChainDef):
       'EF_mu_step1': mergeRemovingOverlap('EF_EFIDInsideOut_', self.chainPartNameNoMult+'_'+self.L2InputTE),
       'EF_mu_step2': mergeRemovingOverlap('EF_SuperEF_',   self.chainPartNameNoMult+'_'+self.L2InputTE),
       }    
-    if self.chainPart['trkInfo'] == "ftk":
+    if "FTK" in self.chainPart['L2IDAlg']:
       self.TErenamingDict.update({'L2_mu_step3': mergeRemovingOverlap('EF_ftkfex_',self.chainPartNameNoMult+'_'+self.L2InputTE),
                                   'L2_mu_step4': mergeRemovingOverlap('EF_ftkiso_',self.chainPartNameNoMult+'_'+self.L2InputTE),
                                   'L2_mu_hypo3': mergeRemovingOverlap('EF_ftkhypo_',self.chainPartNameNoMult+'_'+self.L2InputTE),
@@ -1089,27 +1104,31 @@ class L2EFChain_mu(L2EFChainDef):
 
     from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFExtrapolatorMultiHypoConfig, TrigMuonEFExtrapolatorHypoConfig
 
+    if "dRl1" in self.chainPart['addInfo']:
+      Nmuons=len(self.allMuThrs)-1
+    else:
+      Nmuons=len(self.allMuThrs)
     ##Use list of muon threshold in the chain to correctly configure the FS hypos
     
     if "JpsimumuFS" in self.chainPart['FSinfo']:
       theTrigMuonEFSA_FS_Hypo = TrigMuonEFExtrapolatorMultiHypoConfig('Muon','0GeV','0GeV')
       hypocut='0GeV_0GeV'    
     else:
-      if len(self.allMuThrs) == 0:
+      if Nmuons == 0:
         log.error("The list of allMuonThreshold is empty for a noL1 chain! It should never happen")
 
-      if len(self.allMuThrs) == 1:
+      if Nmuons == 1:
     	  theTrigMuonEFSA_FS_Hypo = TrigMuonEFExtrapolatorHypoConfig('Muon', '0GeV')
     	  hypocut = '0GeV'
 
-      elif len(self.allMuThrs) == 2:
+      elif Nmuons == 2:
     	  theTrigMuonEFSA_FS_Hypo = TrigMuonEFExtrapolatorMultiHypoConfig('Muon', '0GeV','0GeV')
     	  hypocut = '0GeV_0GeV'
 
-      elif len(self.allMuThrs) == 3:
+      elif Nmuons == 3:
     	  theTrigMuonEFSA_FS_Hypo = TrigMuonEFExtrapolatorMultiHypoConfig('Muon', '0GeV','0GeV','0GeV')
     	  hypocut = '0GeV_0GeV_0GeV'
-      elif len(self.allMuThrs) == 4:
+      elif Nmuons == 4:
          theTrigMuonEFSA_FS_Hypo = TrigMuonEFExtrapolatorMultiHypoConfig('Muon', '0GeV','0GeV','0GeV','0GeV')
          hypocut = '0GeV_0GeV_0GeV_0GeV'
       else:
@@ -1339,10 +1358,19 @@ class L2EFChain_mu(L2EFChainDef):
 
       }
 
+  #################################################################################################
+  #################################################################################################
 
+  def setup_muXX_dR(self):
+    
+    from TrigGenericAlgs.TrigGenericAlgsConfig import OverlapRemovalConfig
+    OverlapRemoval_algo = OverlapRemovalConfig('OvlRem', MinCentDist = 1)
+    
+    self.L2sequenceList += [[self.L2InputTE,
+                             [OverlapRemoval_algo],
+                             'L2_OvlRem_dRl1']]
 
-
-
+    self.L2signatureList += [ [['L2_OvlRem_dRl1']] ]
 
   #################################################################################################
   #################################################################################################
@@ -1360,7 +1388,7 @@ class L2EFChain_mu(L2EFChainDef):
     multiplicity = str(self.mult)
     hypocut = 'opposite'
     hypocutEF = multiplicity+"_"+threshold
-    seed = self.allMuThrs[0]
+    #seed = self.allMuThrs[0]
     theCTAlg = CfgGetter.getAlgorithm("TrigMuSuperEF_CTonly")
     from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonCaloTagHypoConfig
     theTrigMuonCT_FS_Hypo = TrigMuonCaloTagHypoConfig('MuonCT', threshold, int(multiplicity),  self.allMuThrs[0])
@@ -1376,7 +1404,7 @@ class L2EFChain_mu(L2EFChainDef):
     inputTEfromL2 = "placeHolderTE"
     ########### Sequence List ##############
     if "0eta010" in self.chainPart['etaRange'] or "0eta500" in self.chainPart["etaRange"]:
-      seed = '0eta0'
+      #seed = '0eta0'
       from TrigGenericAlgs.TrigGenericAlgsConf import PESA__DummyUnseededAllTEAlgo
       from TrigMuonEF.TrigMuonEFConfig import TrigMuonEFFSRoiMakerUnseededConfig, TrigMuonEFFSRoiMakerConfig
       if "0eta010" in self.chainPart['etaRange']:
@@ -1390,7 +1418,7 @@ class L2EFChain_mu(L2EFChainDef):
         return
       
       theEFRoIMakerCT = TrigMuonEFFSRoiMakerConfig("TrigMuonEFFSRoiMakerCT", RoISizeEta=0.1)
-      combinedMuonTE=inputTEfromL2[0]
+
       self.EFsequenceList += [["",
                               [PESA__DummyUnseededAllTEAlgo("EFDummyAlgo")],
                                'EF_CT_seed']]
@@ -2219,9 +2247,6 @@ class L2EFChain_mu(L2EFChainDef):
     from TrigInDetConf.TrigInDetSequence import TrigInDetSequence
     [trkfast, trkprec] = TrigInDetSequence("Muon", "muon", "IDTrig").getSequence()
 
-    from TrigmuRoI.TrigmuRoIConfig import TrigmuRoIConfig
-    Roimaker = TrigmuRoIConfig("TrigMuRoIMGonly")
-
     ########### EF algos  #################
     print self.chainPart['EFAlg']
     if 'SuperEF' in self.chainPart['EFAlg']:
@@ -2236,19 +2261,35 @@ class L2EFChain_mu(L2EFChainDef):
 
     from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFCombinerHypoConfig
     theTrigMuonEFCombinerHypoConfig = TrigMuonEFCombinerHypoConfig(EFRecoAlgName,EFCombinerThresh)
-    self.EFsequenceList += [[ '' , [Roimaker], 'EF_mu_step2a' ]]
-    self.EFsequenceList += [[ 'EF_mu_step2a' , trkfast+trkprec, 'EF_mu_step2b']]
+
+    # L1 seeded from RoiMaker (seed from L1Topo) or Muon L1 Trigger + HLT chains configuration
+    if "inTimeRoI" not in self.chainPart['addInfo']:
+      from TrigmuRoI.TrigmuRoIConfig import TrigmuRoIConfig
+      Roimaker = TrigmuRoIConfig("TrigMuRoIMGonly")
+      self.EFsequenceList += [[ '' , [Roimaker], 'EF_mu_step2a' ]]
+      self.EFsequenceList += [[ 'EF_mu_step2a' , trkfast+trkprec, 'EF_mu_step2b']]
+    else:
+      self.EFsequenceList += [[ self.L2InputTE , trkfast+trkprec, 'EF_mu_step2b']]
     self.EFsequenceList += [[ 'EF_mu_step2b' , [theEFAlg], 'EF_mu_step2']]
     self.EFsequenceList += [[ 'EF_mu_step2'  , [theTrigMuonEFCombinerHypoConfig], 'EF_mu_step3']]
-    self.EFsignatureList += [ [['EF_mu_step2a']] ]
+
+    if "inTimeRoI" not in self.chainPart['addInfo']:
+      self.EFsignatureList += [ [['EF_mu_step2a']] ]
     self.EFsignatureList += [ [['EF_mu_step2b']] ]
     self.EFsignatureList += [ [['EF_mu_step2']] ]
     self.EFsignatureList += [ [['EF_mu_step3']] ]
 
-    self.TErenamingDict = {
-      'EF_mu_step2a': mergeRemovingOverlap('EF_SuperEF_MGOnly_L1x',  self.L2InputTE ),
-      'EF_mu_step2b': mergeRemovingOverlap('EF_SuperEF_MGOnly_',  '2b' + self.L2InputTE ),
-      'EF_mu_step2':  mergeRemovingOverlap('EF_SuperEF_MGOnly',  self.chainPartNameNoMult),
-      'EF_mu_step3':  mergeRemovingOverlap('EF_SuperEFHypo_MGOnly',  self.chainPartNameNoMult)
+    if "inTimeRoI" not in self.chainPart['addInfo']:
+      self.TErenamingDict = {
+        'EF_mu_step2a': mergeRemovingOverlap('EF_SuperEF_MGOnly_L1x',  self.L2InputTE ),
+        'EF_mu_step2b': mergeRemovingOverlap('EF_SuperEF_MGOnly_',  '2b' + self.L2InputTE ),
+        'EF_mu_step2':  mergeRemovingOverlap('EF_SuperEF_MGOnly',  self.chainPartNameNoMult),
+        'EF_mu_step3':  mergeRemovingOverlap('EF_SuperEFHypo_MGOnly',  self.chainPartNameNoMult)
+      }
+    else:
+      self.TErenamingDict = {
+        'EF_mu_step2b': mergeRemovingOverlap('EF_SuperEF_MGOnly_inTimeRoI_',  '2b' + self.L2InputTE ),
+        'EF_mu_step2':  mergeRemovingOverlap('EF_SuperEF_MGOnly_inTimeRoI',  self.chainPartNameNoMult),
+        'EF_mu_step3':  mergeRemovingOverlap('EF_SuperEFHypo_MGOnly_inTimeRoI',  self.chainPartNameNoMult)
       }
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDefIdTest.py b/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDefIdTest.py
index 172ee62cdb85cf362dd694cf5b13869d9a04f486..c090baffa1371a0687e3853c5c6e460015c71297 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDefIdTest.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonDefIdTest.py
@@ -10,9 +10,7 @@ logging.getLogger().info("Importing %s",__name__)
 
 logMuonDef = logging.getLogger("TriggerMenu.muon.MuonDef")
 
-from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-import re
-from TriggerMenu.menu.HltConfig import *
+from TriggerMenu.menu.HltConfig import mergeRemovingOverlap,L2EFChainDef
 
 
 #-----------------------------------
@@ -388,7 +386,7 @@ class L2EFChain_mu(L2EFChainDef):
     theTrigEFIDInsideOutMerged_Muon     = TrigEFIDSequence("Muon","muon","InsideOutMerged")
     theTrigEFIDInsideOut_Muon = TrigEFIDSequence("Muon","muon")          # ---> this is Run1 tracking - keep it here
     #theTrigEFIDInsideOut_Muon_MergedDP = TrigEFIDSequence("Muon","muon","DataPrep")
-    theTrigEFIDOutsideInTRTOnly_Muon = TrigEFIDSequence("Muon","muon","TRTOnly")
+    #theTrigEFIDOutsideInTRTOnly_Muon = TrigEFIDSequence("Muon","muon","TRTOnly")
 
     from TrigMuonHypo.TrigMuonHypoConfig import TrigMuonEFExtrapolatorHypoConfig
     theTrigMuonEFExtrapolatorHypoConfig = TrigMuonEFExtrapolatorHypoConfig(EFRecoAlgName, EFExtrapolatorThresh)
@@ -566,7 +564,7 @@ class L2EFChain_mu(L2EFChainDef):
     from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_Muon
     theTrigFastTrackFinder_Muon = TrigFastTrackFinder_Muon()
     theTrigEFIDInsideOutMerged_Muon = TrigEFIDSequence("Muon","muon","InsideOutMerged").getSequence()
-    theTrigEFIDInsideOut_Muon = TrigEFIDSequence("Muon","muon","InsideOut").getSequence()
+    #theTrigEFIDInsideOut_Muon = TrigEFIDSequence("Muon","muon","InsideOut").getSequence() for the fallback on line 605
 
     from TrigMuonEF.TrigMuonEFConfig import TrigMuonEFRoiAggregatorConfig
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonSliceFlags.py b/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonSliceFlags.py
index f921110469b6bc310239816039c7250f70178306..47bc256ee358e138147a4074d69e2a6dec413c23 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonSliceFlags.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/muon/MuonSliceFlags.py
@@ -2,8 +2,8 @@
 
 """ Muon slice specific flags  """
 
-from AthenaCommon.JobProperties         import JobProperty, JobPropertyContainer, jobproperties
-from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper, AllowedList
+from AthenaCommon.JobProperties         import JobProperty, JobPropertyContainer
+from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper
 
 __author__  = 'T. Bold, B.Demirkoz'
 __version__="$Revision: 1.46 $"
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/muon/generateMuonChainDefs.py b/Trigger/TriggerCommon/TriggerMenu/python/muon/generateMuonChainDefs.py
index 062400d76f9a3ace8cd44e62d70fe80820137cc6..3b01619fc63cda8238ab7f7640abeeb18c11c4e8 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/muon/generateMuonChainDefs.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/muon/generateMuonChainDefs.py
@@ -7,9 +7,12 @@ __author__  = 'M.Woudstra, Y.Nakahama, K.Nagano'
 __doc__="Definition of muon chains as used v4- menu" 
 
 from AthenaCommon.Logging import logging
-logging.getLogger().info("Importing %s",__name__)
+log = logging.getLogger( 'TriggerMenu.muon.generateMuonChainDefs.py' )
+log.info("Importing %s",__name__)
 
 from TriggerMenu.muon.MuonDef import L2EFChain_mu as L2EFChain_mu
+import traceback
+
 try:
     from TriggerMenu.muon.MuonDefIdTest import L2EFChain_mu as L2EFChain_mu_IdTest
 except:
@@ -17,7 +20,7 @@ except:
     log.info(traceback.print_exc())
 
 
-from TriggerMenu.menu.MenuUtils import *
+from TriggerMenu.menu.MenuUtils import splitChainDict,mergeChainDefs
 
 ###########################################################################
 ###########################################################################
@@ -117,7 +120,7 @@ def _modifyTEinChainDef(theChainDef,chainDict):
 
 def _addTopoInfo(theChainDef,chainDict,doAtL2AndEF=True):
 
-    maxL2SignatureIndex = -1
+    # maxL2SignatureIndex = -1
     # for signatureIndex,signature in enumerate(theChainDef.signatureList):
     #     if signature['listOfTriggerElements'][0][0:2] == "L2":
     #         maxL2SignatureIndex = max(maxL2SignatureIndex,signatureIndex)
@@ -158,11 +161,7 @@ def _AsymmChainConfig(theChainDef,chainDict):
             maxL2SignatureIndex = max(maxL2SignatureIndex,signatureIndex)
     
     inputTEsL2 = theChainDef.signatureList[maxL2SignatureIndex]['listOfTriggerElements'] 
-    inputTEsEF = theChainDef.signatureList[-1]['listOfTriggerElements']
-
-    L2ChainName = "L2_" + chainDict['chainName']
-    EFChainName = "EF_" + chainDict['chainName']
-    HLTChainName = "HLT_" + chainDict['chainName']   
+    inputTEsEF = theChainDef.signatureList[-1]['listOfTriggerElements']  
 
     idmultiArr = []
     listOfChainDicts = splitChainDict(chainDict)
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/tau/TauDef.py b/Trigger/TriggerCommon/TriggerMenu/python/tau/TauDef.py
index 98baa1ef530cc725120090e0653cc0ce25c1eee8..ad40a9180b5fdfaa6c04c76052caaa19dba51bd9 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/tau/TauDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/tau/TauDef.py
@@ -10,7 +10,6 @@ from AthenaCommon.Logging import logging
 logging.getLogger().info("Importing %s",__name__)
 log = logging.getLogger(__name__)
 
-from InDetTrigParticleCreation.InDetTrigParticleCreationConf import InDet__TrigVertexxAODCnv 
 from InDetTrigRecExample.EFInDetConfig import TrigEFIDInsideOut_Tau
 from TrigCaloRec.TrigCaloRecConfig import TrigCaloCellMaker_tau, TrigCaloClusterMaker_topo
 from TrigFTK_RecAlgs.TrigFTK_RecAlgs_Config import TrigFTK_VxPrimary_EF
@@ -294,8 +293,6 @@ class L2EFChain_tau(L2EFChainDef):
     def setup_tauChain(self):
 
         threshold   = self.chainPart['threshold']
-        calibration = self.chainPart['calib']
-        recoAlg     = self.chainPart['recoAlg'] 
         selection   = self.chainPart['selection']
         preselection= self.chainPart['preselection']
         idperf      = "idperf" in self.chainPart['trkInfo']
@@ -396,8 +393,6 @@ class L2EFChain_tau(L2EFChainDef):
     def setup_tauChainRunOne(self):
         
         threshold   = self.chainPart['threshold']
-        calibration = self.chainPart['calib']
-        recoAlg     = self.chainPart['recoAlg']
         selection   = self.chainPart['selection']
         preselection= self.chainPart['preselection']
         idperf      = "idperf" in self.chainPart['trkInfo']
@@ -474,8 +469,6 @@ class L2EFChain_tau(L2EFChainDef):
     def setup_tauChainTwoStep(self):
 
         threshold   = self.chainPart['threshold']
-        calibration = self.chainPart['calib']
-        recoAlg     = self.chainPart['recoAlg'] 
         selection   = self.chainPart['selection']
         preselection= self.chainPart['preselection']
         idperf      = "idperf" in self.chainPart['trkInfo']
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/tau/TauDefIdTest.py b/Trigger/TriggerCommon/TriggerMenu/python/tau/TauDefIdTest.py
index a7254eecdb42b70031e8935be586108c9ac43474..4f035879bb7379ae088e3fb67b858e021f427408 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/tau/TauDefIdTest.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/tau/TauDefIdTest.py
@@ -121,8 +121,6 @@ class L2EFChain_tau(L2EFChainDef):
     def setup_tauChain(self):
 
         threshold   = self.chainPart['threshold']
-        calibration = self.chainPart['calib']
-        recoAlg     = self.chainPart['recoAlg'] 
         selection   = self.chainPart['selection']
         preselection= self.chainPart['preselection']
         idperf      = "idperf" in self.chainPart['trkInfo']
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/tau/TauSliceFlags.py b/Trigger/TriggerCommon/TriggerMenu/python/tau/TauSliceFlags.py
index 32e809dfc4b065523bb0e8ec1e85d2a5fa441e51..164db119f1bfe6cc0dfc4d48cfc1e46bb75a12d2 100755
--- a/Trigger/TriggerCommon/TriggerMenu/python/tau/TauSliceFlags.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/tau/TauSliceFlags.py
@@ -2,11 +2,8 @@
 
 """ Tau slice specific flags  """
 
-
- 
-from AthenaCommon.Logging import logging
-from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer, jobproperties
-from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper, AllowedList
+from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer
+from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper
 
 __author__  = ''
 __version__="$Revision: 1.34 $"
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/test/TestDef.py b/Trigger/TriggerCommon/TriggerMenu/python/test/TestDef.py
index 4cd0ceb786a722e62ca1ac1cb47cf3f465f67245..73dcca1893061389116a996277c7895316c43e6d 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/test/TestDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/test/TestDef.py
@@ -9,12 +9,7 @@ from AthenaCommon.Logging import logging
 logging.getLogger().info("Importing %s",__name__)
 log = logging.getLogger( 'TriggerMenu.test.TestDef' )
 
-from TriggerMenu.menu.HltConfig import *
-
-from AthenaCommon.Include import include
-from AthenaCommon.SystemOfUnits import GeV
-from TriggerJobOpts.TriggerFlags  import TriggerFlags
-
+from TriggerMenu.menu.HltConfig import L2EFChainDef,mergeRemovingOverlap
 
 ###################################################################################
 
@@ -28,9 +23,7 @@ def getInputTEfromL1Item(item):
 class L2EFChain_test(L2EFChainDef):
 
     def __init__(self, chainDict):
-        mlog = logging.getLogger( 'TestDef.py:L2EFChain_TestTemplate' )
-
-        self.L2sequenceList   = []
+ 
         self.EFsequenceList   = []
         self.L2signatureList  = []
         self.EFsignatureList  = []
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/test/TestSliceFlags.py b/Trigger/TriggerCommon/TriggerMenu/python/test/TestSliceFlags.py
index a85bf29d4c7b34e8e02c696af862b02ea18bdaf0..0db18ea6f09e5af665af1d4d3563599344577f17 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/test/TestSliceFlags.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/test/TestSliceFlags.py
@@ -2,10 +2,8 @@
 
 """ MinBias slice specific flags  """
 
-from AthenaCommon.Logging import logging
-from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer, jobproperties
-from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper, AllowedList
-from TriggerMenu.menu.TriggerPythonConfig import TriggerPythonConfig
+from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer
+from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper
 
 __author__  = 'M. Backes'
 __version__=""
@@ -21,9 +19,6 @@ class signatures(JobProperty):
     StoredValue   = [
         ]
 
-
-    
-    
 _flags.append(signatures)
 
 # create container
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/test/generateTestChainDefs.py b/Trigger/TriggerCommon/TriggerMenu/python/test/generateTestChainDefs.py
index 92b0b9b0a3449108288aeaadcd363efb04b1c610..a7e0df44203721c51a111c8d9a67ad9cdf5c9d67 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/test/generateTestChainDefs.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/test/generateTestChainDefs.py
@@ -11,17 +11,16 @@ logging.getLogger().info("Importing %s",__name__)
 
 from TriggerMenu.test.TestDef import L2EFChain_test as L2EFChain_test
 
-from TriggerMenu.menu.MenuUtils import *
+from TriggerMenu.menu.MenuUtils import splitChainDict
 TestChains = []
 
 ##########################################################################################
 ##########################################################################################
 
 def generateChainDefs(chainDict):
-    chainParts = chainDict['chainParts']
-    
+   
     listOfChainDicts = splitChainDict(chainDict)
-    listOfChainDefs = []
+
     subChainDict = listOfChainDicts[0] # take only the first
     TestChain = L2EFChain_test(subChainDict)
             
diff --git a/Trigger/TriggerCommon/TriggerMenu/scripts/addPS.py b/Trigger/TriggerCommon/TriggerMenu/scripts/addPS.py
index 5a56b64f3856c9d0c57c3f6bc06a1ddaa154b099..fcc53b52e178db7dfea6fd39350b5e8308458cf8 100755
--- a/Trigger/TriggerCommon/TriggerMenu/scripts/addPS.py
+++ b/Trigger/TriggerCommon/TriggerMenu/scripts/addPS.py
@@ -4,7 +4,6 @@
 import os, sys
 import xml.etree.cElementTree as ET
 import logging
-import math
 
 logging.basicConfig(level=logging.INFO,
                     format='%(asctime)s %(levelname)s %(message)s')
@@ -148,7 +147,7 @@ class PSRule:
             if target_lumi > self.scd_min_lumi:
                 #make this completely independent
                 #get PS at snd_min_lumi
-                scd_ps = self.scd_min_lumi/current_lumi*self.factor
+                #scd_ps = self.scd_min_lumi/current_lumi*self.factor
                 if (self.scd_factor==0):
                     ret_prescale = self.scd_value
                 else:
diff --git a/Trigger/TriggerCommon/TriggerMenu/scripts/checkL1items.py b/Trigger/TriggerCommon/TriggerMenu/scripts/checkL1items.py
index f335bb36aae5b301ee7097c4a5e3826663e92d56..2e9f7682b0d1d207e45a4e4bd8238306018d14b0 100644
--- a/Trigger/TriggerCommon/TriggerMenu/scripts/checkL1items.py
+++ b/Trigger/TriggerCommon/TriggerMenu/scripts/checkL1items.py
@@ -9,7 +9,7 @@
 """
 
 import importlib
-import sys, re
+import sys
 
 tag = "pp_v6"
 if len(sys.argv) > 1:
diff --git a/Trigger/TriggerCommon/TriggerMenu/scripts/checkTigherThanPrimary.py b/Trigger/TriggerCommon/TriggerMenu/scripts/checkTigherThanPrimary.py
index c48403285ddf296b129e2036b70f3622993abe92..53f3db3bc7a897f8720888ec41b668c5d2e418e3 100644
--- a/Trigger/TriggerCommon/TriggerMenu/scripts/checkTigherThanPrimary.py
+++ b/Trigger/TriggerCommon/TriggerMenu/scripts/checkTigherThanPrimary.py
@@ -9,7 +9,7 @@
 """
 
 import importlib
-import sys, re, os
+import sys, re
 from TriggerJobOpts.TriggerFlags					import TriggerFlags
 
 def_maxlumi = 20000
diff --git a/Trigger/TriggerCommon/TriggerMenu/scripts/compareHLTXML.py b/Trigger/TriggerCommon/TriggerMenu/scripts/compareHLTXML.py
index 87276edc3b1b9c4b755f11a1b270cccb47464ade..26c4e887f27f8addf192c0e005b189dd4ed88e5b 100755
--- a/Trigger/TriggerCommon/TriggerMenu/scripts/compareHLTXML.py
+++ b/Trigger/TriggerCommon/TriggerMenu/scripts/compareHLTXML.py
@@ -8,7 +8,6 @@
 
 import xml.etree.cElementTree as ET
 import sys
-import string
 
 class Ddict(dict):
     def __init__(self, default=None):
@@ -190,7 +189,10 @@ def chain_input_comparisons(chain_input_info):
             if len(mismatch) > 0:
                 diff_input_info[j] = [chain_input_info[i][j] , chain_input_info[k][j], "Differences in TE elements with index: %s" % mismatch]
                 found_input_diff = True
-            
+
+    if found_input_diff:
+        print "Found a diff in the inputs"
+    
     for i in diff_input_info.keys():
         print "*** Chain: %s %s" % (i, diff_input_info[i][2])
         print "***  from ==>"
diff --git a/Trigger/TriggerCommon/TriggerMenu/scripts/compareLVL1XML.py b/Trigger/TriggerCommon/TriggerMenu/scripts/compareLVL1XML.py
index 597a4d81526c2b122c45af1869989c6c911108cb..58efb2b849282e7bf9712ab665364ef031f92900 100755
--- a/Trigger/TriggerCommon/TriggerMenu/scripts/compareLVL1XML.py
+++ b/Trigger/TriggerCommon/TriggerMenu/scripts/compareLVL1XML.py
@@ -4,9 +4,7 @@
 
 import xml.etree.cElementTree as ET
 import sys
-import string
-import ROOT
-from ROOT import *
+from ROOT import TH1F,TFile
 
 output_file = TFile("L1Summary.root","recreate")
 allItems = TH1F("AllItems", "AllItems", 512, 0, 512)
diff --git a/Trigger/TriggerCommon/TriggerMenu/scripts/compareRuleBookXML.py b/Trigger/TriggerCommon/TriggerMenu/scripts/compareRuleBookXML.py
index 0857f81cf2cba32707dd034b9830200daf1f80ea..f7cbfb53a9ca10f98b8b376b83b2a9235e115169 100755
--- a/Trigger/TriggerCommon/TriggerMenu/scripts/compareRuleBookXML.py
+++ b/Trigger/TriggerCommon/TriggerMenu/scripts/compareRuleBookXML.py
@@ -79,7 +79,6 @@ def readPsFile(fname):
             
         return items
 
-    import xml.dom.minidom as dom
     import xml.etree.cElementTree as et
     
     xdoc   = et.parse(fname)
diff --git a/Trigger/TriggerCommon/TriggerMenu/scripts/compare_rulebook_xml.py b/Trigger/TriggerCommon/TriggerMenu/scripts/compare_rulebook_xml.py
index 8d356c869e6e594458940e778cb1decf807fc9d1..ba5bf21cb104423352224c525e2051647f988fdf 100755
--- a/Trigger/TriggerCommon/TriggerMenu/scripts/compare_rulebook_xml.py
+++ b/Trigger/TriggerCommon/TriggerMenu/scripts/compare_rulebook_xml.py
@@ -3,9 +3,7 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 import sys
-import os
 import commands
-import time
 import xml.etree.cElementTree as ET
 
 
@@ -42,7 +40,7 @@ class TriggerRule:
         input_list = line.strip(' \n').split(';')
 
         if len(input_list) < 3:
-            log.warning('Skip incorrectly formatted input line: %s' % line)
+            print "Skip incorrectly formatted input line:", line
             return False
 
         self.trigger_name = input_list[0].strip()
diff --git a/Trigger/TriggerCommon/TriggerMenu/scripts/dumpMenu.py b/Trigger/TriggerCommon/TriggerMenu/scripts/dumpMenu.py
index 018b711ce61530d8bf3fd97da90371c23c367fac..e6e929da04c5ecf0fac4deadc8fe91bf69166a8f 100755
--- a/Trigger/TriggerCommon/TriggerMenu/scripts/dumpMenu.py
+++ b/Trigger/TriggerCommon/TriggerMenu/scripts/dumpMenu.py
@@ -1,7 +1,6 @@
 #!/usr/bin/env python
 
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-import os, sys
 
 ## from AthenaCommon.AppMgr import ToolSvc
 ## from AthenaCommon.Include import include
@@ -10,20 +9,19 @@ import os, sys
 
 from TriggerMenu.menu.Lvl1 import Lvl1
 from TriggerMenu.menu.Lvl1Flags import Lvl1Flags
-from TriggerMenu.menu.TriggerPythonConfig import *
+from TriggerMenu.menu.TriggerPythonConfig import TriggerPythonConfig
 from TriggerJobOpts.TriggerFlags import TriggerFlags
 from AthenaCommon.Logging import logging
 
-from TriggerMenu.bjet.BjetSliceFlags import *
-from TriggerMenu.bphysics.BphysicsSliceFlags import *
-from TriggerMenu.menu.CombinedSliceFlags import *
-from TriggerMenu.menu.CommonSliceFlags import *
-from TriggerMenu.egamma.EgammaSliceFlags import *
-from TriggerMenu.jet.JetSliceFlags import *
-from TriggerMenu.met.METSliceFlags import *
-from TriggerMenu.minbias.MinBiasSliceFlags import *
-from TriggerMenu.muon.MuonSliceFlags import *
-from TriggerMenu.tau.TauSliceFlags import *
+from TriggerMenu.bjet.BjetSliceFlags import BjetSliceFlags
+from TriggerMenu.bphysics.BphysicsSliceFlags import BphysicsSliceFlags
+from TriggerMenu.menu.CombinedSliceFlags import CombinedSliceFlags
+from TriggerMenu.egamma.EgammaSliceFlags import EgammaSliceFlags
+from TriggerMenu.jet.JetSliceFlags import JetSliceFlags
+from TriggerMenu.met.METSliceFlags import METSliceFlags
+from TriggerMenu.minbias.MinBiasSliceFlags import MinBiasSliceFlags
+from TriggerMenu.muon.MuonSliceFlags import MuonSliceFlags
+from TriggerMenu.tau.TauSliceFlags import TauSliceFlags
 
 l1thresholds_in_1e31 = [
     'MU4', 'MU6', 'MU10', 'MU11', 'MU20', 'MU40',
@@ -176,6 +174,8 @@ def print2(m, offset=''):
 
 def printSignatures(slice):
     print2('TriggerFlags.%s.signatures = [' % slice, offset)
+    names = []
+    sigs = []
     exec 'sigs = %sFlags.signatures.allowedValues.allowedList' % slice
     exec 'names = %sFlags.signatures.StoredValue' % slice
     for name in names:
@@ -197,6 +197,7 @@ def printSignatures(slice):
 
 def printL1Thresholds():
     print2('Lvl1Flags.thresholds = [', offset)
+    thrs = []
     exec 'thrs = Lvl1Flags.thresholds.allowedValues.allowedList'
     str = ''
     for i, thr in enumerate(thrs):
@@ -213,6 +214,7 @@ def printL1Thresholds():
     
 def printL1Items():
     print2('Lvl1Flags.items = [', offset)
+    items = []
     exec 'items = Lvl1Flags.items.allowedValues.allowedList'
     str = ''
     for i, item in enumerate(items):
diff --git a/Trigger/TriggerCommon/TriggerMenu/scripts/dumpXMLInfo_RuleBook.py b/Trigger/TriggerCommon/TriggerMenu/scripts/dumpXMLInfo_RuleBook.py
index f32a2a21ac9c43eb0c0b5eadbc3e3a8775b5c399..76bfe6adfbb07bb201318ef81c9f871abc207b92 100755
--- a/Trigger/TriggerCommon/TriggerMenu/scripts/dumpXMLInfo_RuleBook.py
+++ b/Trigger/TriggerCommon/TriggerMenu/scripts/dumpXMLInfo_RuleBook.py
@@ -4,7 +4,6 @@
 
 import xml.etree.cElementTree as ET
 import sys
-import string
 
 menu_name = []
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/scripts/fineTune_ES.py b/Trigger/TriggerCommon/TriggerMenu/scripts/fineTune_ES.py
index 53ad41c5942009c1aca0cf8d48831ad4119af364..4dcaa3e170525bc5381883e98b2f17d760c5bfc2 100755
--- a/Trigger/TriggerCommon/TriggerMenu/scripts/fineTune_ES.py
+++ b/Trigger/TriggerCommon/TriggerMenu/scripts/fineTune_ES.py
@@ -4,11 +4,8 @@
 
 import sys
 import os
-import commands
-import time
 import xml.etree.cElementTree as ET
 
-
 #-----------------------------------------------------------------------------
 # Create and configure option parser
 #
@@ -226,15 +223,15 @@ def Calculate_ES_Prescale(chain, PS, PT):
 
     if chain in read_bw.keys() :
     
-        rate = read_rates[chain][0]
+        #rate = read_rates[chain][0]
         cor_rate = corrected_rate[chain][0]
-        PT_contribution = rate - cor_rate
+        #PT_contribution = rate - cor_rate
         
         target_rate = float(read_bw_file(options.bw_file)[chain])
         
         EF_Chain = chain
         EF_Prescale = read_rates[EF_Chain][1]
-        EF_Rate = read_rates[EF_Chain][0]
+        #EF_Rate = read_rates[EF_Chain][0]
         
         L2_Chain = read_rates[EF_Chain][2]
         L2_Prescale = read_rates[L2_Chain][1]
diff --git a/Trigger/TriggerCommon/TriggerMenu/scripts/fineTune_cooking.py b/Trigger/TriggerCommon/TriggerMenu/scripts/fineTune_cooking.py
index ad8cdbb5c6526a8ab5da307f8bef1b0d565c0cf1..c4f45d93814b5dfc55924eded65bbcdbc93b699e 100755
--- a/Trigger/TriggerCommon/TriggerMenu/scripts/fineTune_cooking.py
+++ b/Trigger/TriggerCommon/TriggerMenu/scripts/fineTune_cooking.py
@@ -4,11 +4,8 @@
 
 import sys
 import os
-import commands
-import time
 import xml.etree.cElementTree as ET
 
-
 #-----------------------------------------------------------------------------
 # Create and configure option parser
 #
@@ -283,22 +280,22 @@ def Calculate_BW_Prescale(PS, chain, lumiP):
         
                     target_rate = float(read_bw_prescale[EF_chain])
 
-                    rate = read_rates[chain][0]
+                    #rate = read_rates[chain][0]
                     cor_rate = corrected_rate[chain][0]
-                    PT_contribution = rate - cor_rate
+                    #PT_contribution = rate - cor_rate
         
                     EF_Chain = EF_chain
                     EF_Prescale = read_rates[EF_Chain][1]
-                    EF_Rate = read_rates[EF_Chain][0]
+                    #EF_Rate = read_rates[EF_Chain][0]
                     
                     L2_Chain = read_rates[EF_Chain][2]
                     L2_Prescale = read_rates[L2_Chain][1]
-                    L2_Rate = read_rates[L2_Chain][0]
-                    L2_Corrected_Rate = corrected_rate[L2_Chain][0]
+                    #L2_Rate = read_rates[L2_Chain][0]
+                    #L2_Corrected_Rate = corrected_rate[L2_Chain][0]
                     
                     L1_Chain = read_rates[L2_Chain][2]
                     L1_Prescale = read_rates[L1_Chain][1]
-                    L1_Rate = read_rates[L1_Chain][0]
+                    #L1_Rate = read_rates[L1_Chain][0]
                                         
                     total_rate =  L1_Prescale* L2_Prescale* EF_Prescale* cor_rate
                     
@@ -331,19 +328,19 @@ def Calculate_L2_PT_Prescale(chain, PS):
             PT_prescale=1
             return PT_prescale
 
-        rate = read_rates[chain][0]
-        cor_rate = corrected_rate[chain][0]
-        PT_contribution = rate - cor_rate
+        #rate = read_rates[chain][0]
+        #cor_rate = corrected_rate[chain][0]
+        #PT_contribution = rate - cor_rate
         
         target_rate = float(read_l2_pt_bw[chain])
         
         L2_Chain = chain
-        L2_Prescale = read_rates[L2_Chain][1]
-        L2_Rate = read_rates[L2_Chain][0]
-        L2_Corrected_Rate = corrected_rate[L2_Chain][0]
+        #L2_Prescale = read_rates[L2_Chain][1]
+        #L2_Rate = read_rates[L2_Chain][0]
+        #L2_Corrected_Rate = corrected_rate[L2_Chain][0]
         
         L1_Chain = read_rates[L2_Chain][2]
-        L1_Prescale = read_rates[L1_Chain][1]
+        #L1_Prescale = read_rates[L1_Chain][1]
         L1_Rate = read_rates[L1_Chain][0]
 
         total_rate_scale = options.lumi * L1_Rate / (lumi_xml_ref * PS[L1_Chain])
@@ -370,24 +367,24 @@ def Calculate_EF_PT_Prescale(chain, PS):
             PT_prescale=1
             return PT_prescale
 
-        rate = read_rates[chain][0]
-        cor_rate = corrected_rate[chain][0]
-        PT_contribution = rate - cor_rate
+        #rate = read_rates[chain][0]
+        #cor_rate = corrected_rate[chain][0]
+        #PT_contribution = rate - cor_rate
         
         target_rate = float(read_ef_pt_bw[chain])
         
         EF_Chain = chain
-        EF_Prescale = read_rates[EF_Chain][1]
-        EF_Rate = read_rates[EF_Chain][0]
+        #EF_Prescale = read_rates[EF_Chain][1]
+        #EF_Rate = read_rates[EF_Chain][0]
         
         L2_Chain = read_rates[EF_Chain][2]
         L2_Prescale = read_rates[L2_Chain][1]
-        L2_Rate = read_rates[L2_Chain][0]
+        #L2_Rate = read_rates[L2_Chain][0]
         L2_Corrected_Rate = corrected_rate[L2_Chain][0]
         
         L1_Chain = read_rates[L2_Chain][2]
         L1_Prescale = read_rates[L1_Chain][1]
-        L1_Rate = read_rates[L1_Chain][0]
+        #L1_Rate = read_rates[L1_Chain][0]
         
 
         total_rate_noPT_L2 =  L1_Prescale* L2_Prescale* L2_Corrected_Rate
@@ -417,15 +414,15 @@ def Calculate_ES_Prescale(chain, PS, PT):
 
     if chain in read_es_bw.keys() :
     
-        rate = read_rates[chain][0]
+        #rate = read_rates[chain][0]
         cor_rate = corrected_rate[chain][0]
-        PT_contribution = rate - cor_rate
+        #PT_contribution = rate - cor_rate
         
         target_rate = float(read_es_bw[chain])
         
         EF_Chain = chain
         EF_Prescale = read_rates[EF_Chain][1]
-        EF_Rate = read_rates[EF_Chain][0]
+        #EF_Rate = read_rates[EF_Chain][0]
         
         L2_Chain = read_rates[EF_Chain][2]
         L2_Prescale = read_rates[L2_Chain][1]
diff --git a/Trigger/TriggerCommon/TriggerMenu/scripts/generateChainDef.py b/Trigger/TriggerCommon/TriggerMenu/scripts/generateChainDef.py
index ccc2c16175a881ae6c713321a5b9283b471ffaac..7d86a00504e81c1b2c21f4761cea9d109d176f9e 100755
--- a/Trigger/TriggerCommon/TriggerMenu/scripts/generateChainDef.py
+++ b/Trigger/TriggerCommon/TriggerMenu/scripts/generateChainDef.py
@@ -2,11 +2,8 @@
 
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-import os, sys
-import re
 import xml.dom.minidom
 
-
 HypoTypes = (
     'TrigBjetHypo', 
     'TrigLeptonJetHypo', 
@@ -153,7 +150,7 @@ class ChainList:
             if c.chain_name == chain_name:
                 return c
         return None
-    def findL2ChainSeedingEF(efchain):
+    def findL2ChainSeedingEF(self, efchain):
         for c in self.L2List:
             if c.chain_name == efchain.lower_chain_name:
                 return c
@@ -284,7 +281,6 @@ class L2EFChainDef:
     def dumpSeqDef(self):
         print """
     def defineSequences(self):"""
-        seq_types = []
         tes = []
         for sig in self.l2chain.signatures+self.efchain.signatures:
             for te in sig:
diff --git a/Trigger/TriggerCommon/TriggerMenu/scripts/generateL1Menu.py b/Trigger/TriggerCommon/TriggerMenu/scripts/generateL1Menu.py
index 11d5583e8bfeb4186555e4f4163f602287daca6c..b3a477b3f31d37bfd9364e50ad18094392f8b6b7 100755
--- a/Trigger/TriggerCommon/TriggerMenu/scripts/generateL1Menu.py
+++ b/Trigger/TriggerCommon/TriggerMenu/scripts/generateL1Menu.py
@@ -71,9 +71,6 @@ def readL1MenuFromXML(menu="LVL1config_Physics_pp_v6.xml"):
 
 
 def findUnneededRun2():
-    from TriggerJobOpts.TriggerFlags import TriggerFlags as TF
-    from TriggerMenu.l1.Lvl1Flags import Lvl1Flags
-    
     menus = ['Physics_pp_v6']
 
     for menu in menus:
@@ -85,10 +82,8 @@ def findUnneededRun2():
 
 
 def findRequiredItemsFromXML():
-    from TriggerJobOpts.TriggerFlags import TriggerFlags as TF
-    from TriggerMenu.l1.Lvl1Flags import Lvl1Flags
     
-    menus = ['Physics_pp_v7','MC_pp_v7','Physics_pp_v6','MC_pp_v6']
+    menus = ['Physics_pp_v7','MC_pp_v7','Physics_pp_v6','MC_pp_v6', 'MC_PhaseII']
 
     from TriggerMenu.l1.XMLReader import L1MenuXMLReader
 
@@ -136,11 +131,8 @@ def findFreeCTPIDs(menu):
     [menus,allItems,allThrs] = load(f)
 
     TF.triggerMenuSetup = menu
-    tpcl1 = TriggerConfigLVL1( outputFile = TF.outputLVL1configFile() )
 
     print set(Lvl1Flags.CtpIdMap().keys()) - allItems
-
-
     
 def main():
     printCabling = False
@@ -157,6 +149,7 @@ def main():
         generateL1Menu(menu="MC_pp_v7",doFTK=FTKFlag)
         generateL1Menu(menu="Physics_pp_v6",doFTK=FTKFlag)
         generateL1Menu(menu="MC_pp_v6",doFTK=FTKFlag)
+        generateL1Menu(menu="MC_PhaseII",doFTK=FTKFlag)
 #        generateL1Menu(menu="LS1_v1" )
         #generateL1Menu(menu="DC14")
 #        generateL1Menu(menu="Physics_HI_v3")  # currently disabled since not defined in JobProp
diff --git a/Trigger/TriggerCommon/TriggerMenu/scripts/generateL1TopoMenu.py b/Trigger/TriggerCommon/TriggerMenu/scripts/generateL1TopoMenu.py
index 0816e89251fa2813c7669869117a1b45b7ed70a7..44ec0bf66b4c6cb4bc88f9cfb820da0f9a53d4ea 100755
--- a/Trigger/TriggerCommon/TriggerMenu/scripts/generateL1TopoMenu.py
+++ b/Trigger/TriggerCommon/TriggerMenu/scripts/generateL1TopoMenu.py
@@ -4,7 +4,6 @@
 
 from TriggerJobOpts.TriggerFlags import TriggerFlags as TF
 from TriggerMenu.TriggerConfigL1Topo import TriggerConfigL1Topo
-from TriggerMenu.l1topo.L1TopoFlags import L1TopoFlags
 
 def generateL1TopoMenu(menu):
 
@@ -38,9 +37,10 @@ def main():
         generateL1TopoMenu(menu="MC_HI_v4")
         generateL1TopoMenu(menu="LS1_v1" )
         generateL1TopoMenu(menu="DC14")
+        generateL1TopoMenu(menu="MC_PhaseII")
         return 0
 
-    if sys.argv[1] in ["Physics_HI_v4", "MC_HI_v4", "Physics_HI_v3", "MC_HI_v3", "LS1_v1", "DC14","Physics_pp_v7", "MC_pp_v7","Physics_pp_v6", "MC_pp_v6"]: # explicit names for TMXML nightly
+    if sys.argv[1] in ["Physics_HI_v4", "MC_HI_v4", "Physics_HI_v3", "MC_HI_v3", "LS1_v1", "DC14","Physics_pp_v7", "MC_pp_v7","Physics_pp_v6", "MC_pp_v6", "MC_PhaseII"]: # explicit names for TMXML nightly
         generateL1TopoMenu(menu=sys.argv[1])
         return 0
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/scripts/makeNewRulebook.py b/Trigger/TriggerCommon/TriggerMenu/scripts/makeNewRulebook.py
index 5d71663281502f8e1fb76c0303e8bce434889c51..562b88bb8a3840e1624142fca51c7a875f966680 100644
--- a/Trigger/TriggerCommon/TriggerMenu/scripts/makeNewRulebook.py
+++ b/Trigger/TriggerCommon/TriggerMenu/scripts/makeNewRulebook.py
@@ -4,9 +4,7 @@
 # usage python makeNewRulebook.py ../rules/InitialBeam_HI_rulebook.txt rel_1 Physics_HI_v
 
 import sys
-import os
 import commands
-import time
 import xml.etree.cElementTree as ET
 
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/scripts/makeNewRulebook_menuConsistent.py b/Trigger/TriggerCommon/TriggerMenu/scripts/makeNewRulebook_menuConsistent.py
index 5ea4c75ef6ae0657ab9d3ba0034e61d8521dbeae..71d24f2b9bc567b2dfcc334255a939133a5a782b 100644
--- a/Trigger/TriggerCommon/TriggerMenu/scripts/makeNewRulebook_menuConsistent.py
+++ b/Trigger/TriggerCommon/TriggerMenu/scripts/makeNewRulebook_menuConsistent.py
@@ -3,9 +3,7 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 import sys
-import os
 import commands
-import time
 import xml.etree.cElementTree as ET
 
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/scripts/moveDisabledChains.py b/Trigger/TriggerCommon/TriggerMenu/scripts/moveDisabledChains.py
index 3cf550466499b6bb7c7896c7e66d13a32585c169..3af46f2dfce42d622815b1a88c2d1c1dcd2bfa41 100644
--- a/Trigger/TriggerCommon/TriggerMenu/scripts/moveDisabledChains.py
+++ b/Trigger/TriggerCommon/TriggerMenu/scripts/moveDisabledChains.py
@@ -9,7 +9,7 @@
 """
 
 import importlib
-import sys, re, os
+import sys, re
 
 tag = "pp_v7"
 if len(sys.argv) > 1:
diff --git a/Trigger/TriggerCommon/TriggerMenu/scripts/oldScripts/printLVL1XML.py b/Trigger/TriggerCommon/TriggerMenu/scripts/oldScripts/printLVL1XML.py
index fbe7529922213e57c9dfb1dcb9e629fb6cb2064e..c8ad7ee25cc66257f8cd13aeea6192f510312930 100755
--- a/Trigger/TriggerCommon/TriggerMenu/scripts/oldScripts/printLVL1XML.py
+++ b/Trigger/TriggerCommon/TriggerMenu/scripts/oldScripts/printLVL1XML.py
@@ -4,9 +4,7 @@
 
 import xml.etree.cElementTree as ET
 import sys
-import string
-import ROOT
-from ROOT import *
+from ROOT import TH1F,TFile
 
 output_file = TFile("L1Summary.root","recreate")
 allItems = TH1F("AllItems", "AllItems", 256, 0, 256)
diff --git a/Trigger/TriggerCommon/TriggerMenu/scripts/oldScripts/trigconf_dumphltchain.py b/Trigger/TriggerCommon/TriggerMenu/scripts/oldScripts/trigconf_dumphltchain.py
index dd4d1f14477ad0b0f4301e90e5a4f691698c1baa..e868a854a4e0097755afee2120192f52c0628a47 100755
--- a/Trigger/TriggerCommon/TriggerMenu/scripts/oldScripts/trigconf_dumphltchain.py
+++ b/Trigger/TriggerCommon/TriggerMenu/scripts/oldScripts/trigconf_dumphltchain.py
@@ -2,7 +2,7 @@
 
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-import os, sys
+import sys
 import xml.dom.minidom
 
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/scripts/oldScripts/trigconf_find_related.py b/Trigger/TriggerCommon/TriggerMenu/scripts/oldScripts/trigconf_find_related.py
index d41a93556cb8d132688f1ae5bd1d6d977d6b30f0..2c379f21d00c61b7b352e7d28b95c4a721fd6d3c 100755
--- a/Trigger/TriggerCommon/TriggerMenu/scripts/oldScripts/trigconf_find_related.py
+++ b/Trigger/TriggerCommon/TriggerMenu/scripts/oldScripts/trigconf_find_related.py
@@ -2,7 +2,7 @@
 
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-import os, sys
+import sys
 import xml.dom.minidom
 
 
diff --git a/Trigger/TriggerCommon/TriggerMenu/scripts/plotItem.py b/Trigger/TriggerCommon/TriggerMenu/scripts/plotItem.py
index c13cc428e6c7ba0cafcd933e2fc8907c8dc9a350..06480401b98750e81f45cb8650a0418682e68397 100755
--- a/Trigger/TriggerCommon/TriggerMenu/scripts/plotItem.py
+++ b/Trigger/TriggerCommon/TriggerMenu/scripts/plotItem.py
@@ -2,7 +2,7 @@
 
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-import sys, os, commands
+import os, commands
 import matplotlib.pyplot as plt
 import TriggerClasses
 
@@ -27,7 +27,7 @@ class plotter:
             return repr(self.value)
 
     def setValues(self, PS):
-        nLumi = len(PS['Lumi'])
+        #nLumi = len(PS['Lumi'])
         
         try:
             self.EFPS = PS['EFPS']
diff --git a/Trigger/TriggerCommon/TriggerMenu/scripts/printL1CableMap.py b/Trigger/TriggerCommon/TriggerMenu/scripts/printL1CableMap.py
index c962ea66c873a375e7526eb7403a6cbab28127ce..006f5fda03bc24c11d4dc956cb7b5471c4d097b4 100755
--- a/Trigger/TriggerCommon/TriggerMenu/scripts/printL1CableMap.py
+++ b/Trigger/TriggerCommon/TriggerMenu/scripts/printL1CableMap.py
@@ -2,7 +2,7 @@
 
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-import os, sys
+import sys
 import xml.etree.cElementTree as ET
 
 class ThrInfo:
@@ -55,7 +55,6 @@ def printMap(m, logic_string):
                     thrs.append(v)
             for bit in range(31):
                 thrdata = ''
-                used = ''
                 for thr in thrs:
                     if thr.includesBit(bit):
                         thrdata = str(thr)
diff --git a/Trigger/TriggerCommon/TriggerMenu/scripts/pyflakesMenu.sh b/Trigger/TriggerCommon/TriggerMenu/scripts/pyflakesMenu.sh
index dac992a3ac4163a5cd4500837919a1d922983262..6a5f0e380f47ef30f31f2d4da9a10d977587818d 100755
--- a/Trigger/TriggerCommon/TriggerMenu/scripts/pyflakesMenu.sh
+++ b/Trigger/TriggerCommon/TriggerMenu/scripts/pyflakesMenu.sh
@@ -1,5 +1,3 @@
 #!/usr/bin/env sh
 echo $PYPATH
 flake8 --ignore=E,W `find $PYPATH -name '*.py'`
-
-exit 0
diff --git a/Trigger/TriggerCommon/TriggerMenu/scripts/read_RuleBook.py b/Trigger/TriggerCommon/TriggerMenu/scripts/read_RuleBook.py
index df23d38f0578999034d6cb9ad1ee0aa92b0ac795..26a7f3b0106ff8877acb117bca9951ec3ea87ea3 100755
--- a/Trigger/TriggerCommon/TriggerMenu/scripts/read_RuleBook.py
+++ b/Trigger/TriggerCommon/TriggerMenu/scripts/read_RuleBook.py
@@ -4,8 +4,6 @@
 
 import sys
 import os
-import commands
-import time
 
 #-----------------------------------------------------------------------------
 # Create and configure option parser
diff --git a/Trigger/TriggerCommon/TriggerMenu/scripts/testRulebook.py b/Trigger/TriggerCommon/TriggerMenu/scripts/testRulebook.py
index 076e51a49f6b12302fbbfb881894046f317b4e7b..57197638ebb3598b2544e4ccc167f07323ae8b23 100644
--- a/Trigger/TriggerCommon/TriggerMenu/scripts/testRulebook.py
+++ b/Trigger/TriggerCommon/TriggerMenu/scripts/testRulebook.py
@@ -2,10 +2,10 @@
 
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-import sys, os, commands
+import os, commands
 import TriggerClasses
 import logging
-from operator import itemgetter, attrgetter
+from operator import attrgetter
 import xml.etree.cElementTree as ET
 
 def checkFormat(file_path, trigger_rules = {}):
@@ -36,7 +36,7 @@ def checkFormat(file_path, trigger_rules = {}):
         logging.error("Failed to read %s lines: \n" % len(badlines))
         for line in badlines:
             logging.error("%s\n" % line.strip())
-        lgogging.error("Found %s duplicate entries: \n" % len(duplicates))
+        logging.error("Found %s duplicate entries: \n" % len(duplicates))
         for dup in duplicates:
             logging.error("%s\n" % dup.strip())
             
diff --git a/Trigger/TriggerCommon/TriggerMenu/share/generate.py b/Trigger/TriggerCommon/TriggerMenu/share/generate.py
index 9e07b5138fc2ee6b8635cb3ad9fb1acd810d3948..320f213fc844dd06d92acc545d1381ed181ceec1 100755
--- a/Trigger/TriggerCommon/TriggerMenu/share/generate.py
+++ b/Trigger/TriggerCommon/TriggerMenu/share/generate.py
@@ -1,16 +1,15 @@
 #!/bin/env python
 
-from AthenaCommon.AthenaCommonFlags import jobproperties 
-from AthenaCommon.GlobalFlags import jobproperties
-
-jobproperties.print_JobProperties('tree&value')
+from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+from AthenaCommon.GlobalFlags import globalflags
 
+athenaCommonFlags.print_JobProperties('tree&value')
 
 from TriggerMenu.menu.GenerateMenu import GenerateMenu
 
 g = GenerateMenu()
 g.generate()
 
-jobproperties.AthenaCommonFlags.EvtMax=0
+athenaCommonFlags.EvtMax=0
 
-jobproperties.print_JobProperties('tree&value')
+globalflags.print_JobProperties('tree&value')
diff --git a/Trigger/TriggerCommon/TriggerMenuXML/CMakeLists.txt b/Trigger/TriggerCommon/TriggerMenuXML/CMakeLists.txt
index 02c80c54176997c849fbc09f902d3502e142b822..5c2a544d718c766031260ed79eaaf4f454a64546 100644
--- a/Trigger/TriggerCommon/TriggerMenuXML/CMakeLists.txt
+++ b/Trigger/TriggerCommon/TriggerMenuXML/CMakeLists.txt
@@ -108,13 +108,6 @@ atlas_install_xmls( data/*.xml )
 
 # List of menus to be created:
 
-atlas_build_trigger_menu( Physics_pp_v6 )
-atlas_build_trigger_menu( Physics_pp_v6_tight_physics_prescale )
-atlas_build_trigger_menu( MC_pp_v6 )
-atlas_build_trigger_menu( MC_pp_v6_loose_mc_prescale )
-atlas_build_trigger_menu( MC_pp_v6_tight_mc_prescale )
-atlas_build_trigger_menu( MC_pp_v6_tightperf_mc_prescale )
-
 atlas_build_trigger_menu( Physics_pp_v7 )
 atlas_build_trigger_menu( Physics_pp_v7_tight_physics_prescale )
 atlas_build_trigger_menu( MC_pp_v7 )
@@ -129,3 +122,5 @@ atlas_build_trigger_menu( MC_HI_v3_tight_mc_prescale )
 atlas_build_trigger_menu( Physics_HI_v4 )
 atlas_build_trigger_menu( MC_HI_v4 )
 atlas_build_trigger_menu( MC_HI_v4_tight_mc_prescale )
+
+atlas_build_trigger_menu( MC_PhaseII )
diff --git a/Trigger/TriggerCommon/TriggerMenuXML/data/L1Topoconfig_MC_PhaseII.xml b/Trigger/TriggerCommon/TriggerMenuXML/data/L1Topoconfig_MC_PhaseII.xml
new file mode 100644
index 0000000000000000000000000000000000000000..e7eeb1eb916e964d04dc9e0a6a04becb09e534fd
--- /dev/null
+++ b/Trigger/TriggerCommon/TriggerMenuXML/data/L1Topoconfig_MC_PhaseII.xml
@@ -0,0 +1,2140 @@
+<?xml version="1.0" ?>
+<TOPO_MENU menu_name="Topo_pp_vX" menu_version="1">
+  <!--File is generated by TriggerMenu-->
+  <!--No. L1Topo algos defined: 85-->
+  <OutputList>
+    <Output algname="INVM_AJ_HighMass" triggerline="900INVM9999-AJ30s6-AJ20s6,800INVM9999-AJ30s6-AJ20s6,700INVM9999-AJ30s6-AJ20s6,500INVM9999-AJ30s6-AJ20s6" algoId="0" module="0" fpga="0" firstbit="0" clock="0"/>
+    <Output algname="INVM_AJ_LowMass" triggerline="400INVM9999-AJ30s6-AJ20s6,300INVM9999-AJ30s6-AJ20s6,200INVM9999-AJ30s6-AJ20s6,100INVM9999-AJ30s6-AJ20s6" algoId="1" module="0" fpga="0" firstbit="4" clock="0"/>
+    <Output algname="HT150-J20s5.ETA31" triggerline="HT150-J20s5.ETA31" algoId="25" module="0" fpga="0" firstbit="9" clock="0"/>
+    <Output algname="HT190-J15s5.ETA21" triggerline="HT190-J15s5.ETA21" algoId="26" module="0" fpga="0" firstbit="10" clock="0"/>
+    <Output algname="05MINDPHI-EM12s6-XE0" triggerline="05MINDPHI-EM12s6-XE0" algoId="35" module="0" fpga="0" firstbit="14" clock="0"/>
+    <Output algname="05MINDPHI-EM15s6-XE0" triggerline="05MINDPHI-EM15s6-XE0" algoId="36" module="0" fpga="0" firstbit="0" clock="1"/>
+    <Output algname="25MT-EM12s6-XE0" triggerline="25MT-EM12s6-XE0" algoId="37" module="0" fpga="0" firstbit="1" clock="1"/>
+    <Output algname="35MT-EM15s6-XE0" triggerline="35MT-EM15s6-XE0" algoId="38" module="0" fpga="0" firstbit="3" clock="1"/>
+    <Output algname="10MINDPHI-J20s2-XE50" triggerline="10MINDPHI-J20s2-XE50" algoId="39" module="0" fpga="0" firstbit="6" clock="1"/>
+    <Output algname="100RATIO-0MATCH-TAU30si2-EMall" triggerline="100RATIO-0MATCH-TAU30si2-EMall" algoId="62" module="0" fpga="0" firstbit="7" clock="1"/>
+    <Output algname="NOT-0MATCH-TAU30si2-EMall" triggerline="NOT-0MATCH-TAU30si2-EMall" algoId="63" module="0" fpga="0" firstbit="8" clock="1"/>
+    <Output algname="LAR-EM50s1" triggerline="LAR-EM50s1" algoId="72" module="0" fpga="0" firstbit="9" clock="1"/>
+    <Output algname="LAR-J100s1" triggerline="LAR-J100s1" algoId="73" module="0" fpga="0" firstbit="10" clock="1"/>
+    <Output algname="NOT-02MATCH-EM10s1-AJj15all.ETA49" triggerline="NOT-02MATCH-EM10s1-AJj15all.ETA49" algoId="58" module="0" fpga="0" firstbit="11" clock="1"/>
+    <Output algname="15MINDPHI-EM12s6-XE0" triggerline="15MINDPHI-EM12s6-XE0" algoId="75" module="0" fpga="0" firstbit="14" clock="1"/>
+    <Output algname="15MINDPHI-EM15s6-XE0" triggerline="15MINDPHI-EM15s6-XE0" algoId="76" module="0" fpga="0" firstbit="15" clock="1"/>
+    <Output algname="35MT-EM12s6-XE0" triggerline="35MT-EM12s6-XE0" algoId="77" module="0" fpga="0" firstbit="13" clock="1"/>
+    <Output algname="1DISAMB-EM15his2-TAU12abi-J25ab" triggerline="1DISAMB-EM15his2-TAU12abi-J25ab" algoId="67" module="0" fpga="1" firstbit="2" clock="0"/>
+    <Output algname="1DISAMB-J25ab-0DR28-EM15his2-TAU12abi" triggerline="1DISAMB-J25ab-0DR28-EM15his2-TAU12abi" algoId="69" module="0" fpga="1" firstbit="3" clock="0"/>
+    <Output algname="2INVM9-2MU6ab" triggerline="2INVM9-2MU6ab" algoId="8" module="0" fpga="1" firstbit="4" clock="0"/>
+    <Output algname="2INVM8-ONEBARREL-MU6ab-MU4ab" triggerline="2INVM8-ONEBARREL-MU6ab-MU4ab" algoId="49" module="0" fpga="1" firstbit="6" clock="0"/>
+    <Output algname="5DETA99-5DPHI99-MU6ab-MU4ab" triggerline="5DETA99-5DPHI99-MU6ab-MU4ab" algoId="20" module="0" fpga="1" firstbit="8" clock="0"/>
+    <Output algname="5DETA99-5DPHI99-2MU6ab" triggerline="5DETA99-5DPHI99-2MU6ab" algoId="21" module="0" fpga="1" firstbit="9" clock="0"/>
+    <Output algname="1DISAMB-TAU20abi-TAU12abi-J25ab" triggerline="1DISAMB-TAU20abi-TAU12abi-J25ab" algoId="68" module="0" fpga="1" firstbit="10" clock="0"/>
+    <Output algname="0DR28-MU10ab-TAU12abi" triggerline="0DR28-MU10ab-TAU12abi" algoId="22" module="0" fpga="1" firstbit="11" clock="0"/>
+    <Output algname="0DETA20-0DPHI20-TAU20abi-TAU12abi" triggerline="0DETA20-0DPHI20-TAU20abi-TAU12abi" algoId="52" module="0" fpga="1" firstbit="12" clock="0"/>
+    <Output algname="DISAMB-0DR28-EM15his2-TAU12abi" triggerline="DISAMB-0DR28-EM15his2-TAU12abi" algoId="78" module="0" fpga="1" firstbit="15" clock="0"/>
+    <Output algname="DISAMB-30INVM-EM20his2-TAU12ab" triggerline="DISAMB-30INVM-EM20his2-TAU12ab" algoId="83" module="0" fpga="1" firstbit="0" clock="1"/>
+    <Output algname="400INVM9999-AJ30s6.ETA31-AJ20s6.31ETA49" triggerline="400INVM9999-AJ30s6.ETA31-AJ20s6.31ETA49" algoId="84" module="0" fpga="0" firstbit="15" clock="0"/>
+    <Output algname="0DR22-2MU6ab" triggerline="0DR22-2MU6ab" algoId="17" module="0" fpga="1" firstbit="4" clock="1"/>
+    <Output algname="7INVM15-2MU4ab" triggerline="7INVM15-2MU4ab" algoId="9" module="0" fpga="1" firstbit="5" clock="1"/>
+    <Output algname="0DR22-MU6ab-MU4ab" triggerline="0DR22-MU6ab-MU4ab" algoId="18" module="0" fpga="1" firstbit="6" clock="1"/>
+    <Output algname="0DR15-2MU4ab" triggerline="0DR15-2MU4ab" algoId="13" module="0" fpga="1" firstbit="7" clock="1"/>
+    <Output algname="0DR24-2MU4ab" triggerline="0DR24-2MU4ab" algoId="16" module="0" fpga="1" firstbit="8" clock="1"/>
+    <Output algname="0DR15-2MU6ab" triggerline="0DR15-2MU6ab" algoId="19" module="0" fpga="1" firstbit="9" clock="1"/>
+    <Output algname="2INVM9-2MU4ab" triggerline="2INVM9-2MU4ab" algoId="3" module="0" fpga="1" firstbit="10" clock="1"/>
+    <Output algname="2INVM9-MU6ab-MU4ab" triggerline="2INVM9-MU6ab-MU4ab" algoId="6" module="0" fpga="1" firstbit="11" clock="1"/>
+    <Output algname="INVM_EMs6" triggerline="1INVM5-EMs1-EMs6,1INVM5-EM7s1-EMs6,1INVM5-EM12s1-EMs6" algoId="31" module="0" fpga="0" firstbit="11" clock="0"/>
+    <Output algname="05MINDPHI-AJj10s6-XE0" triggerline="05MINDPHI-AJj10s6-XE0" algoId="32" module="1" fpga="0" firstbit="0" clock="0"/>
+    <Output algname="10MINDPHI-AJj10s6-XE0" triggerline="10MINDPHI-AJj10s6-XE0" algoId="33" module="1" fpga="0" firstbit="1" clock="0"/>
+    <Output algname="15MINDPHI-AJj10s6-XE0" triggerline="15MINDPHI-AJj10s6-XE0" algoId="34" module="1" fpga="0" firstbit="2" clock="0"/>
+    <Output algname="0DR04-MU4ab-CJ15ab" triggerline="0DR04-MU4ab-CJ15ab" algoId="43" module="1" fpga="0" firstbit="3" clock="0"/>
+    <Output algname="0DR04-MU4ab-CJ20ab" triggerline="0DR04-MU4ab-CJ20ab" algoId="47" module="1" fpga="0" firstbit="4" clock="0"/>
+    <Output algname="0DR04-MU4ab-CJ30ab" triggerline="0DR04-MU4ab-CJ30ab" algoId="44" module="1" fpga="0" firstbit="5" clock="0"/>
+    <Output algname="0DR04-MU6ab-CJ20ab" triggerline="0DR04-MU6ab-CJ20ab" algoId="45" module="1" fpga="0" firstbit="6" clock="0"/>
+    <Output algname="0DR04-MU6ab-CJ25ab" triggerline="0DR04-MU6ab-CJ25ab" algoId="46" module="1" fpga="0" firstbit="7" clock="0"/>
+    <Output algname="10MINDPHI-CJ20ab-XE50" triggerline="10MINDPHI-CJ20ab-XE50" algoId="41" module="1" fpga="0" firstbit="8" clock="0"/>
+    <Output algname="0DR24-2CMU4ab" triggerline="0DR24-2CMU4ab" algoId="50" module="1" fpga="0" firstbit="9" clock="0"/>
+    <Output algname="MULT-CMU4ab" triggerline="MULT-CMU4ab[0],MULT-CMU4ab[1]" algoId="64" module="1" fpga="0" firstbit="11" clock="0"/>
+    <Output algname="MULT-CMU6ab" triggerline="MULT-CMU6ab[0],MULT-CMU6ab[1]" algoId="65" module="1" fpga="0" firstbit="13" clock="0"/>
+    <Output algname="0DETA04-EM8abi-MU10ab" triggerline="0DETA04-EM8abi-MU10ab" algoId="53" module="1" fpga="0" firstbit="3" clock="1"/>
+    <Output algname="0DPHI03-EM8abi-MU10ab" triggerline="0DPHI03-EM8abi-MU10ab" algoId="55" module="1" fpga="0" firstbit="6" clock="1"/>
+    <Output algname="0DETA04-EM15abi-MUab" triggerline="0DETA04-EM15abi-MUab" algoId="54" module="1" fpga="0" firstbit="4" clock="1"/>
+    <Output algname="0DPHI03-EM15abi-MUab" triggerline="0DPHI03-EM15abi-MUab" algoId="56" module="1" fpga="0" firstbit="8" clock="1"/>
+    <Output algname="0DR24-CMU4ab-MU4ab" triggerline="0DR24-CMU4ab-MU4ab" algoId="51" module="1" fpga="0" firstbit="5" clock="1"/>
+    <Output algname="2INVM8-CMU4ab-MU4ab" triggerline="2INVM8-CMU4ab-MU4ab" algoId="48" module="1" fpga="0" firstbit="7" clock="1"/>
+    <Output algname="0DR25-TAU20abi-TAU12abi" triggerline="0DR25-TAU20abi-TAU12abi" algoId="24" module="1" fpga="1" firstbit="10" clock="1"/>
+    <Output algname="10MINDPHI-AJ20s2-XE50" triggerline="10MINDPHI-AJ20s2-XE50" algoId="79" module="1" fpga="0" firstbit="9" clock="1"/>
+    <Output algname="LATE-MU10s1" triggerline="LATE-MU10s1" algoId="80" module="1" fpga="0" firstbit="10" clock="1"/>
+    <Output algname="1DISAMB-J25ab-0DR25-TAU20abi-TAU12abi" triggerline="1DISAMB-J25ab-0DR25-TAU20abi-TAU12abi" algoId="71" module="1" fpga="1" firstbit="11" clock="1"/>
+    <Output algname="10MINDPHI-J20s2-XE30" triggerline="10MINDPHI-J20s2-XE30" algoId="42" module="0" fpga="0" firstbit="5" clock="1"/>
+    <Output algname="KF-XE-AJall" triggerline="KF-XE40-AJall,KF-XE50-AJall,KF-XE55-AJall,KF-XE60-AJall,KF-XE65-AJall,KF-XE75-AJall" algoId="74" module="1" fpga="1" firstbit="0" clock="0"/>
+    <Output algname="0MATCH-4AJ20.ETA31-4AJj15.ETA31" triggerline="0MATCH-4AJ20.ETA31-4AJj15.ETA31" algoId="57" module="1" fpga="1" firstbit="6" clock="0"/>
+    <Output algname="HT190-AJ15all.ETA21" triggerline="HT190-AJ15all.ETA21" algoId="27" module="1" fpga="1" firstbit="7" clock="0"/>
+    <Output algname="HT150-AJ20all.ETA31" triggerline="HT150-AJ20all.ETA31" algoId="28" module="1" fpga="1" firstbit="8" clock="0"/>
+    <Output algname="HT150-AJj15all.ETA49" triggerline="HT150-AJj15all.ETA49" algoId="29" module="1" fpga="1" firstbit="9" clock="0"/>
+    <Output algname="HT20-AJj15all.ETA49" triggerline="HT20-AJj15all.ETA49" algoId="30" module="1" fpga="1" firstbit="10" clock="0"/>
+    <Output algname="SC111-CJ15ab.ETA26" triggerline="SC111-CJ15ab.ETA26" algoId="81" module="1" fpga="0" firstbit="11" clock="1"/>
+    <Output algname="SC85-CJ15ab.ETA26" triggerline="SC85-CJ15ab.ETA26" algoId="82" module="1" fpga="0" firstbit="12" clock="1"/>
+    <Output algname="05RATIO-XE0-HT0-AJj15all.ETA49" triggerline="05RATIO-XE0-HT0-AJj15all.ETA49" algoId="59" module="1" fpga="1" firstbit="13" clock="0"/>
+    <Output algname="90RATIO2-XE0-HT0-AJj15all.ETA49" triggerline="90RATIO2-XE0-HT0-AJj15all.ETA49" algoId="60" module="1" fpga="1" firstbit="15" clock="0"/>
+    <Output algname="250RATIO2-XE0-HT0-AJj15all.ETA49" triggerline="250RATIO2-XE0-HT0-AJj15all.ETA49" algoId="61" module="1" fpga="1" firstbit="0" clock="1"/>
+    <Output algname="10MINDPHI-J20ab-XE50" triggerline="10MINDPHI-J20ab-XE50" algoId="40" module="1" fpga="1" firstbit="1" clock="1"/>
+    <Output algname="0DR28-TAU20abi-TAU12abi" triggerline="0DR28-TAU20abi-TAU12abi" algoId="23" module="1" fpga="1" firstbit="2" clock="1"/>
+    <Output algname="1DISAMB-J25ab-0DR28-TAU20abi-TAU12abi" triggerline="1DISAMB-J25ab-0DR28-TAU20abi-TAU12abi" algoId="70" module="1" fpga="1" firstbit="3" clock="1"/>
+    <Output algname="1DISAMB-TAU12abi-J25ab" triggerline="1DISAMB-TAU12abi-J25ab" algoId="66" module="1" fpga="1" firstbit="4" clock="1"/>
+    <Output algname="0DR10-MU10ab-MU6ab" triggerline="0DR10-MU10ab-MU6ab" algoId="11" module="1" fpga="1" firstbit="5" clock="1"/>
+    <Output algname="2DR99-2MU4ab" triggerline="2DR99-2MU4ab" algoId="10" module="1" fpga="1" firstbit="6" clock="1"/>
+    <Output algname="0DR34-2MU4ab" triggerline="0DR34-2MU4ab" algoId="15" module="1" fpga="1" firstbit="7" clock="1"/>
+    <Output algname="2DR15-2MU6ab" triggerline="2DR15-2MU6ab" algoId="12" module="1" fpga="1" firstbit="8" clock="1"/>
+    <Output algname="0DR15-MU6ab-MU4ab" triggerline="0DR15-MU6ab-MU4ab" algoId="14" module="1" fpga="1" firstbit="9" clock="1"/>
+    <Output algname="8INVM15-MU6ab-MU4ab" triggerline="8INVM15-MU6ab-MU4ab" algoId="4" module="1" fpga="1" firstbit="12" clock="1"/>
+    <Output algname="8INVM15-2MU6ab" triggerline="8INVM15-2MU6ab" algoId="7" module="1" fpga="1" firstbit="13" clock="1"/>
+    <Output algname="2INVM8-2MU4ab" triggerline="2INVM8-2MU4ab" algoId="2" module="1" fpga="1" firstbit="14" clock="1"/>
+    <Output algname="2INVM8-MU6ab-MU4ab" triggerline="2INVM8-MU6ab-MU4ab" algoId="5" module="1" fpga="1" firstbit="15" clock="1"/>
+  </OutputList>
+
+  <TopoConfig>
+  </TopoConfig>
+
+  <SortAlgo type="ClusterNoSort" name="EMall" output="EMall" algoId="0">
+    <Fixed>
+      <Input name="ClusterTobArray" value="EmTobArray"/>
+      <Output name="TobArrayOut" value="EMall"/>
+      <Generic name="InputWidth" value=":InputWidthEM:"/>
+      <Generic name="OutputWidth" value=":InputWidthEM:"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="IsoMask" value="0"/>
+    </Variable>
+  </SortAlgo>
+
+  <SortAlgo type="ClusterSelect" name="TAUabi" output="TAUabi" algoId="1">
+    <Fixed>
+      <Input name="ClusterTobArray" value="TauTobArray"/>
+      <Output name="TobArrayOut" value="TAUabi"/>
+      <Generic name="InputWidth" value=":InputWidthTAU:"/>
+      <Generic name="InputWidth1stStage" value=":InputWidth1stStageSelectTAU:"/>
+      <Generic name="OutputWidth" value=":OutputWidthSelectTAU:"/>
+      <Generic name="DoIsoCut" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET" value="24"/>
+      <Parameter pos="1" name="IsoMask" value="2"/>
+      <Parameter pos="2" name="MinEta" value="0"/>
+      <Parameter pos="3" name="MaxEta" value="49"/>
+    </Variable>
+  </SortAlgo>
+
+  <SortAlgo type="ClusterSelect" name="EMabi" output="EMabi" algoId="2">
+    <Fixed>
+      <Input name="ClusterTobArray" value="EmTobArray"/>
+      <Output name="TobArrayOut" value="EMabi"/>
+      <Generic name="InputWidth" value=":InputWidthEM:"/>
+      <Generic name="InputWidth1stStage" value=":InputWidth1stStageSelectEM:"/>
+      <Generic name="OutputWidth" value=":OutputWidthSelectEM:"/>
+      <Generic name="DoIsoCut" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET" value="16"/>
+      <Parameter pos="1" name="IsoMask" value="2"/>
+      <Parameter pos="2" name="MinEta" value="0"/>
+      <Parameter pos="3" name="MaxEta" value="49"/>
+    </Variable>
+  </SortAlgo>
+
+  <SortAlgo type="ClusterSelect" name="TAUab" output="TAUab" algoId="4">
+    <Fixed>
+      <Input name="ClusterTobArray" value="TauTobArray"/>
+      <Output name="TobArrayOut" value="TAUab"/>
+      <Generic name="InputWidth" value=":InputWidthTAU:"/>
+      <Generic name="InputWidth1stStage" value=":InputWidth1stStageSelectTAU:"/>
+      <Generic name="OutputWidth" value=":OutputWidthSelectTAU:"/>
+      <Generic name="DoIsoCut" value="0"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET" value="24"/>
+      <Parameter pos="1" name="IsoMask" value="0"/>
+      <Parameter pos="2" name="MinEta" value="0"/>
+      <Parameter pos="3" name="MaxEta" value="49"/>
+    </Variable>
+  </SortAlgo>
+
+  <SortAlgo type="ClusterSort" name="EMs" output="EMs" algoId="5">
+    <Fixed>
+      <Input name="ClusterTobArray" value="EmTobArray"/>
+      <Output name="TobArrayOut" value="EMs"/>
+      <Generic name="InputWidth" value=":InputWidthEM:"/>
+      <Generic name="InputWidth1stStage" value=":InputWidth1stStageSortEM:"/>
+      <Generic name="OutputWidth" value=":OutputWidthSortEM:"/>
+      <Generic name="DoIsoCut" value="0"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="IsoMask" value="0"/>
+      <Parameter pos="1" name="MinEta" value="0"/>
+      <Parameter pos="2" name="MaxEta" value="49"/>
+    </Variable>
+  </SortAlgo>
+
+  <SortAlgo type="ClusterSort" name="EMshi" output="EMshi" algoId="6">
+    <Fixed>
+      <Input name="ClusterTobArray" value="EmTobArray"/>
+      <Output name="TobArrayOut" value="EMshi"/>
+      <Generic name="InputWidth" value=":InputWidthEM:"/>
+      <Generic name="InputWidth1stStage" value=":InputWidth1stStageSortEM:"/>
+      <Generic name="OutputWidth" value=":OutputWidthSortEM:"/>
+      <Generic name="DoIsoCut" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="IsoMask" value="3"/>
+      <Parameter pos="1" name="MinEta" value="0"/>
+      <Parameter pos="2" name="MaxEta" value="49"/>
+    </Variable>
+  </SortAlgo>
+
+  <SortAlgo type="ClusterSort" name="TAUsi" output="TAUsi" algoId="7">
+    <Fixed>
+      <Input name="ClusterTobArray" value="TauTobArray"/>
+      <Output name="TobArrayOut" value="TAUsi"/>
+      <Generic name="InputWidth" value=":InputWidthTAU:"/>
+      <Generic name="InputWidth1stStage" value=":InputWidth1stStageSortTAU:"/>
+      <Generic name="OutputWidth" value=":OutputWidthSortTAU:"/>
+      <Generic name="DoIsoCut" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="IsoMask" value="2"/>
+      <Parameter pos="1" name="MinEta" value="0"/>
+      <Parameter pos="2" name="MaxEta" value="49"/>
+    </Variable>
+  </SortAlgo>
+
+  <SortAlgo type="JetNoSort" name="AJall" output="AJall" algoId="8">
+    <Fixed>
+      <Input name="JetTobArray" value="JetTobArray"/>
+      <Output name="TobArrayOut" value="AJall"/>
+      <Generic name="InputWidth" value=":InputWidthJET:"/>
+      <Generic name="OutputWidth" value=":InputWidthJET:"/>
+      <Generic name="JetSize" value=":DefaultJetSize:"/>
+    </Fixed>
+    <Variable>
+    </Variable>
+  </SortAlgo>
+
+  <SortAlgo type="JetNoSort" name="AJjall" output="AJjall" algoId="9">
+    <Fixed>
+      <Input name="JetTobArray" value="JetTobArray"/>
+      <Output name="TobArrayOut" value="AJjall"/>
+      <Generic name="InputWidth" value=":InputWidthJET:"/>
+      <Generic name="OutputWidth" value=":InputWidthJET:"/>
+      <Generic name="JetSize" value="1"/>
+    </Fixed>
+    <Variable>
+    </Variable>
+  </SortAlgo>
+
+  <SortAlgo type="JetNoSortMatch" name="AJMatchall" output="AJMatchall" algoId="10">
+    <Fixed>
+      <Input name="JetTobArray" value="JetTobArray"/>
+      <Output name="TobArrayOut" value="AJMatchall"/>
+      <Generic name="InputWidth" value=":InputWidthJET:"/>
+      <Generic name="OutputWidth" value=":InputWidthJET:"/>
+      <Generic name="JetSize" value="2"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="15"/>
+      <Parameter pos="1" name="MinET2" value="20"/>
+    </Variable>
+  </SortAlgo>
+
+  <SortAlgo type="JetSelect" name="Jab" output="Jab" algoId="11">
+    <Fixed>
+      <Input name="JetTobArray" value="JetTobArray"/>
+      <Output name="TobArrayOut" value="Jab"/>
+      <Generic name="InputWidth" value=":InputWidthJET:"/>
+      <Generic name="InputWidth1stStage" value=":InputWidth1stStageSelectJET:"/>
+      <Generic name="OutputWidth" value=":OutputWidthSelectJET:"/>
+      <Generic name="JetSize" value="2"/>
+      <Generic name="DoEtaCut" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET" value="20"/>
+      <Parameter pos="1" name="MinEta" value="0"/>
+      <Parameter pos="2" name="MaxEta" value="31"/>
+    </Variable>
+  </SortAlgo>
+
+  <SortAlgo type="JetSelect" name="CJab" output="CJab" algoId="12">
+    <Fixed>
+      <Input name="JetTobArray" value="JetTobArray"/>
+      <Output name="TobArrayOut" value="CJab"/>
+      <Generic name="InputWidth" value=":InputWidthJET:"/>
+      <Generic name="InputWidth1stStage" value=":InputWidth1stStageSelectJET:"/>
+      <Generic name="OutputWidth" value=":OutputWidthSelectJET:"/>
+      <Generic name="JetSize" value="2"/>
+      <Generic name="DoEtaCut" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET" value="15"/>
+      <Parameter pos="1" name="MinEta" value="0"/>
+      <Parameter pos="2" name="MaxEta" value="26"/>
+    </Variable>
+  </SortAlgo>
+
+  <SortAlgo type="JetSort" name="AJjs" output="AJjs" algoId="13">
+    <Fixed>
+      <Input name="JetTobArray" value="JetTobArray"/>
+      <Output name="TobArrayOut" value="AJjs"/>
+      <Generic name="InputWidth" value=":InputWidthJET:"/>
+      <Generic name="InputWidth1stStage" value=":InputWidth1stStageSortJET:"/>
+      <Generic name="OutputWidth" value=":OutputWidthSortJET:"/>
+      <Generic name="JetSize" value="1"/>
+      <Generic name="DoEtaCut" value="0"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinEta" value="0"/>
+      <Parameter pos="1" name="MaxEta" value="49"/>
+    </Variable>
+  </SortAlgo>
+
+  <SortAlgo type="JetSort" name="AJs" output="AJs" algoId="14">
+    <Fixed>
+      <Input name="JetTobArray" value="JetTobArray"/>
+      <Output name="TobArrayOut" value="AJs"/>
+      <Generic name="InputWidth" value=":InputWidthJET:"/>
+      <Generic name="InputWidth1stStage" value=":InputWidth1stStageSortJET:"/>
+      <Generic name="OutputWidth" value=":OutputWidthSortJET:"/>
+      <Generic name="JetSize" value="2"/>
+      <Generic name="DoEtaCut" value="0"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinEta" value="0"/>
+      <Parameter pos="1" name="MaxEta" value="49"/>
+    </Variable>
+  </SortAlgo>
+
+  <SortAlgo type="JetSort" name="Js" output="Js" algoId="15">
+    <Fixed>
+      <Input name="JetTobArray" value="JetTobArray"/>
+      <Output name="TobArrayOut" value="Js"/>
+      <Generic name="InputWidth" value=":InputWidthJET:"/>
+      <Generic name="InputWidth1stStage" value=":InputWidth1stStageSortJET:"/>
+      <Generic name="OutputWidth" value=":OutputWidthSortJET:"/>
+      <Generic name="JetSize" value="2"/>
+      <Generic name="DoEtaCut" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinEta" value="0"/>
+      <Parameter pos="1" name="MaxEta" value="31"/>
+    </Variable>
+  </SortAlgo>
+
+  <SortAlgo type="METNoSort" name="XENoSort" output="XENoSort" algoId="16">
+    <Fixed>
+      <Input name="MetTobArray" value="MetTobArray"/>
+      <Output name="TobArrayOut" value="XENoSort"/>
+      <Generic name="InputWidth" value=":InputWidthMET:"/>
+      <Generic name="OutputWidth" value=":OutputWidthMET:"/>
+    </Fixed>
+    <Variable>
+    </Variable>
+  </SortAlgo>
+
+  <SortAlgo type="MetSort" name="XE" output="XE" algoId="17">
+    <Fixed>
+      <Input name="MetTobArray" value="MetTobArray"/>
+      <Output name="TobArrayOut" value="XE"/>
+      <Generic name="InputWidth" value=":InputWidthMET:"/>
+      <Generic name="OutputWidth" value=":OutputWidthMET:"/>
+    </Fixed>
+    <Variable>
+    </Variable>
+  </SortAlgo>
+
+  <SortAlgo type="MuonSelect" name="MUab" output="MUab" algoId="18">
+    <Fixed>
+      <Input name="MuonTobArray" value="MuonTobArray"/>
+      <Output name="TobArrayOut" value="MUab"/>
+      <Generic name="InputWidth" value=":InputWidthMU:"/>
+      <Generic name="InputWidth1stStage" value=":InputWidth1stStageSelectMU:"/>
+      <Generic name="OutputWidth" value=":OutputWidthSelectMU:"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET" value="3"/>
+      <Parameter pos="1" name="MinEta" value="0"/>
+      <Parameter pos="2" name="MaxEta" value="25"/>
+    </Variable>
+  </SortAlgo>
+
+  <SortAlgo type="MuonSelect" name="CMUab" output="CMUab" algoId="19">
+    <Fixed>
+      <Input name="MuonTobArray" value="MuonTobArray"/>
+      <Output name="TobArrayOut" value="CMUab"/>
+      <Generic name="InputWidth" value=":InputWidthMU:"/>
+      <Generic name="InputWidth1stStage" value=":InputWidth1stStageSelectMU:"/>
+      <Generic name="OutputWidth" value=":OutputWidthSelectMU:"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET" value="3"/>
+      <Parameter pos="1" name="MinEta" value="0"/>
+      <Parameter pos="2" name="MaxEta" value="10"/>
+    </Variable>
+  </SortAlgo>
+
+  <SortAlgo type="MuonSort_1BC" name="LMUs" output="LMUs" algoId="20">
+    <Fixed>
+      <Input name="LateMuonTobArray" value="LateMuonTobArray"/>
+      <Output name="TobArrayOut" value="LMUs"/>
+      <Generic name="InputWidth" value=":InputWidthMU:"/>
+      <Generic name="OutputWidth" value=":OutputWidthSortMU:"/>
+      <Generic name="nDelayedMuons" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinEta" value="0"/>
+      <Parameter pos="1" name="MaxEta" value="25"/>
+    </Variable>
+  </SortAlgo>
+
+  <DecisionAlgo type="InvariantMassInclusive1" name="INVM_AJ_HighMass" algoId="0">
+    <Fixed>
+      <Input name="Tob" value="AJs" position="0"/>
+      <Output name="Results" bits="4">
+        <Bit selection="0" name="900INVM9999-AJ30s6-AJ20s6"/>
+        <Bit selection="1" name="800INVM9999-AJ30s6-AJ20s6"/>
+        <Bit selection="2" name="700INVM9999-AJ30s6-AJ20s6"/>
+        <Bit selection="3" name="500INVM9999-AJ30s6-AJ20s6"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSortJET:"/>
+      <Generic name="MaxTob" value="6"/>
+      <Generic name="NumResultBits" value="4"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" selection="0" value="30"/>
+      <Parameter pos="1" name="MinET2" selection="0" value="20"/>
+      <Parameter pos="2" name="MinMSqr" selection="0" value="810000"/>
+      <Parameter pos="3" name="MaxMSqr" selection="0" value="99980001"/>
+      <Parameter pos="4" name="MinET1" selection="1" value="30"/>
+      <Parameter pos="5" name="MinET2" selection="1" value="20"/>
+      <Parameter pos="6" name="MinMSqr" selection="1" value="640000"/>
+      <Parameter pos="7" name="MaxMSqr" selection="1" value="99980001"/>
+      <Parameter pos="8" name="MinET1" selection="2" value="30"/>
+      <Parameter pos="9" name="MinET2" selection="2" value="20"/>
+      <Parameter pos="10" name="MinMSqr" selection="2" value="490000"/>
+      <Parameter pos="11" name="MaxMSqr" selection="2" value="99980001"/>
+      <Parameter pos="12" name="MinET1" selection="3" value="30"/>
+      <Parameter pos="13" name="MinET2" selection="3" value="20"/>
+      <Parameter pos="14" name="MinMSqr" selection="3" value="250000"/>
+      <Parameter pos="15" name="MaxMSqr" selection="3" value="99980001"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="InvariantMassInclusive1" name="INVM_AJ_LowMass" algoId="1">
+    <Fixed>
+      <Input name="Tob" value="AJs" position="0"/>
+      <Output name="Results" bits="4">
+        <Bit selection="0" name="400INVM9999-AJ30s6-AJ20s6"/>
+        <Bit selection="1" name="300INVM9999-AJ30s6-AJ20s6"/>
+        <Bit selection="2" name="200INVM9999-AJ30s6-AJ20s6"/>
+        <Bit selection="3" name="100INVM9999-AJ30s6-AJ20s6"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSortJET:"/>
+      <Generic name="MaxTob" value="6"/>
+      <Generic name="NumResultBits" value="4"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" selection="0" value="30"/>
+      <Parameter pos="1" name="MinET2" selection="0" value="20"/>
+      <Parameter pos="2" name="MinMSqr" selection="0" value="160000"/>
+      <Parameter pos="3" name="MaxMSqr" selection="0" value="99980001"/>
+      <Parameter pos="4" name="MinET1" selection="1" value="30"/>
+      <Parameter pos="5" name="MinET2" selection="1" value="20"/>
+      <Parameter pos="6" name="MinMSqr" selection="1" value="90000"/>
+      <Parameter pos="7" name="MaxMSqr" selection="1" value="99980001"/>
+      <Parameter pos="8" name="MinET1" selection="2" value="30"/>
+      <Parameter pos="9" name="MinET2" selection="2" value="20"/>
+      <Parameter pos="10" name="MinMSqr" selection="2" value="40000"/>
+      <Parameter pos="11" name="MaxMSqr" selection="2" value="99980001"/>
+      <Parameter pos="12" name="MinET1" selection="3" value="30"/>
+      <Parameter pos="13" name="MinET2" selection="3" value="20"/>
+      <Parameter pos="14" name="MinMSqr" selection="3" value="10000"/>
+      <Parameter pos="15" name="MaxMSqr" selection="3" value="99980001"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="JetHT" name="HT150-J20s5.ETA31" algoId="25">
+    <Fixed>
+      <Input name="Tob" value="Js" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="HT150-J20s5.ETA31"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSortJET:"/>
+      <Generic name="MaxTob" value="5"/>
+      <Generic name="NumRegisters" value="0"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET" value="20"/>
+      <Parameter pos="1" name="MinEta" value="0"/>
+      <Parameter pos="2" name="MaxEta" value="31"/>
+      <Parameter pos="3" name="MinHt" value="150"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="JetHT" name="HT190-J15s5.ETA21" algoId="26">
+    <Fixed>
+      <Input name="Tob" value="Js" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="HT190-J15s5.ETA21"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSortJET:"/>
+      <Generic name="MaxTob" value="5"/>
+      <Generic name="NumRegisters" value="0"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET" value="15"/>
+      <Parameter pos="1" name="MinEta" value="0"/>
+      <Parameter pos="2" name="MaxEta" value="21"/>
+      <Parameter pos="3" name="MinHt" value="190"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="MinDeltaPhiIncl2" name="05MINDPHI-EM12s6-XE0" algoId="35">
+    <Fixed>
+      <Input name="Tob1" value="EMs" position="0"/>
+      <Input name="Tob2" value="XE" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="05MINDPHI-EM12s6-XE0"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSortEM:"/>
+      <Generic name="InputWidth2" value="1"/>
+      <Generic name="MaxTob1" value="6"/>
+      <Generic name="MaxTob2" value="1"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="24"/>
+      <Parameter pos="1" name="MinET2" value="0"/>
+      <Parameter pos="2" name="DeltaPhiMin" selection="0" value="5"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="MinDeltaPhiIncl2" name="05MINDPHI-EM15s6-XE0" algoId="36">
+    <Fixed>
+      <Input name="Tob1" value="EMs" position="0"/>
+      <Input name="Tob2" value="XE" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="05MINDPHI-EM15s6-XE0"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSortEM:"/>
+      <Generic name="InputWidth2" value="1"/>
+      <Generic name="MaxTob1" value="6"/>
+      <Generic name="MaxTob2" value="1"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="30"/>
+      <Parameter pos="1" name="MinET2" value="0"/>
+      <Parameter pos="2" name="DeltaPhiMin" selection="0" value="5"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="TransverseMassInclusive1" name="25MT-EM12s6-XE0" algoId="37">
+    <Fixed>
+      <Input name="Tob1" value="EMs" position="0"/>
+      <Input name="Tob2" value="XE" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="25MT-EM12s6-XE0"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSortEM:"/>
+      <Generic name="MaxTob" value="6"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="24"/>
+      <Parameter pos="1" name="MinET2" value="0"/>
+      <Parameter pos="2" name="MinMTSqr" value="625"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="TransverseMassInclusive1" name="35MT-EM15s6-XE0" algoId="38">
+    <Fixed>
+      <Input name="Tob1" value="EMs" position="0"/>
+      <Input name="Tob2" value="XE" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="35MT-EM15s6-XE0"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSortEM:"/>
+      <Generic name="MaxTob" value="6"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="30"/>
+      <Parameter pos="1" name="MinET2" value="0"/>
+      <Parameter pos="2" name="MinMTSqr" value="1225"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="MinDeltaPhiIncl2" name="10MINDPHI-J20s2-XE50" algoId="39">
+    <Fixed>
+      <Input name="Tob1" value="Js" position="0"/>
+      <Input name="Tob2" value="XE" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="10MINDPHI-J20s2-XE50"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSortJET:"/>
+      <Generic name="InputWidth2" value="1"/>
+      <Generic name="MaxTob1" value="2"/>
+      <Generic name="MaxTob2" value="1"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="20"/>
+      <Parameter pos="1" name="MinET2" value="50"/>
+      <Parameter pos="2" name="DeltaPhiMin" selection="0" value="10"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="RatioMatch" name="100RATIO-0MATCH-TAU30si2-EMall" algoId="62">
+    <Fixed>
+      <Input name="Tob1" value="TAUsi" position="0"/>
+      <Input name="Tob2" value="EMall" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="100RATIO-0MATCH-TAU30si2-EMall"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSortTAU:"/>
+      <Generic name="InputWidth2" value=":InputWidthEM:"/>
+      <Generic name="MaxTob1" value="2"/>
+      <Generic name="MaxTob2" value=":InputWidthEM:"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="60"/>
+      <Parameter pos="1" name="MinET2" value="0"/>
+      <Parameter pos="2" name="Ratio" selection="0" value="100"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="NotMatch" name="NOT-0MATCH-TAU30si2-EMall" algoId="63">
+    <Fixed>
+      <Input name="Tob1" value="TAUsi" position="0"/>
+      <Input name="Tob2" value="EMall" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="NOT-0MATCH-TAU30si2-EMall"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSortTAU:"/>
+      <Generic name="InputWidth2" value=":InputWidthEM:"/>
+      <Generic name="MaxTob1" value="2"/>
+      <Generic name="MaxTob2" value=":InputWidthEM:"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="60"/>
+      <Parameter pos="1" name="MinET2" value="0"/>
+      <Parameter pos="2" name="EtaMin1" value="0"/>
+      <Parameter pos="3" name="EtaMax1" value="49"/>
+      <Parameter pos="4" name="EtaMin2" value="0"/>
+      <Parameter pos="5" name="EtaMax2" value="49"/>
+      <Parameter pos="6" name="DRCut" value="0"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="LAr" name="LAR-EM50s1" algoId="72">
+    <Fixed>
+      <Input name="Tob" value="EMs" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="LAR-EM50s1"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSortEM:"/>
+      <Generic name="MaxTob" value="1"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET" value="40"/>
+      <Parameter pos="1" name="EtaMin" value="0"/>
+      <Parameter pos="2" name="EtaMax" value="15"/>
+      <Parameter pos="3" name="PhiMin" value="16"/>
+      <Parameter pos="4" name="PhiMax" value="23"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="LAr" name="LAR-J100s1" algoId="73">
+    <Fixed>
+      <Input name="Tob" value="Js" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="LAR-J100s1"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSortJET:"/>
+      <Generic name="MaxTob" value="1"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET" value="100"/>
+      <Parameter pos="1" name="EtaMin" value="0"/>
+      <Parameter pos="2" name="EtaMax" value="14"/>
+      <Parameter pos="3" name="PhiMin" value="16"/>
+      <Parameter pos="4" name="PhiMax" value="23"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="NotMatch" name="NOT-02MATCH-EM10s1-AJj15all.ETA49" algoId="58">
+    <Fixed>
+      <Input name="Tob1" value="EMs" position="0"/>
+      <Input name="Tob2" value="AJjall" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="NOT-02MATCH-EM10s1-AJj15all.ETA49"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSortEM:"/>
+      <Generic name="InputWidth2" value=":InputWidthJET:"/>
+      <Generic name="MaxTob1" value="1"/>
+      <Generic name="MaxTob2" value=":InputWidthJET:"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="20"/>
+      <Parameter pos="1" name="MinET2" value="15"/>
+      <Parameter pos="2" name="EtaMin1" value="0"/>
+      <Parameter pos="3" name="EtaMax1" value="49"/>
+      <Parameter pos="4" name="EtaMin2" value="0"/>
+      <Parameter pos="5" name="EtaMax2" value="49"/>
+      <Parameter pos="6" name="DRCut" value="4"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="MinDeltaPhiIncl2" name="15MINDPHI-EM12s6-XE0" algoId="75">
+    <Fixed>
+      <Input name="Tob1" value="EMs" position="0"/>
+      <Input name="Tob2" value="XE" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="15MINDPHI-EM12s6-XE0"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSortEM:"/>
+      <Generic name="InputWidth2" value="1"/>
+      <Generic name="MaxTob1" value="6"/>
+      <Generic name="MaxTob2" value="1"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="24"/>
+      <Parameter pos="1" name="MinET2" value="0"/>
+      <Parameter pos="2" name="DeltaPhiMin" selection="0" value="15"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="MinDeltaPhiIncl2" name="15MINDPHI-EM15s6-XE0" algoId="76">
+    <Fixed>
+      <Input name="Tob1" value="EMs" position="0"/>
+      <Input name="Tob2" value="XE" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="15MINDPHI-EM15s6-XE0"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSortEM:"/>
+      <Generic name="InputWidth2" value="1"/>
+      <Generic name="MaxTob1" value="6"/>
+      <Generic name="MaxTob2" value="1"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="30"/>
+      <Parameter pos="1" name="MinET2" value="0"/>
+      <Parameter pos="2" name="DeltaPhiMin" selection="0" value="15"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="TransverseMassInclusive1" name="35MT-EM12s6-XE0" algoId="77">
+    <Fixed>
+      <Input name="Tob1" value="EMs" position="0"/>
+      <Input name="Tob2" value="XE" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="35MT-EM12s6-XE0"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSortEM:"/>
+      <Generic name="MaxTob" value="6"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="24"/>
+      <Parameter pos="1" name="MinET2" value="0"/>
+      <Parameter pos="2" name="MinMTSqr" value="1225"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DisambiguationIncl3" name="1DISAMB-EM15his2-TAU12abi-J25ab" algoId="67">
+    <Fixed>
+      <Input name="Tob1" value="EMshi" position="0"/>
+      <Input name="Tob2" value="TAUabi" position="1"/>
+      <Input name="Tob3" value="Jab" position="2"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="1DISAMB-EM15his2-TAU12abi-J25ab"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSortEM:"/>
+      <Generic name="InputWidth2" value=":OutputWidthSelectTAU:"/>
+      <Generic name="InputWidth3" value=":OutputWidthSelectJET:"/>
+      <Generic name="MaxTob1" value="2"/>
+      <Generic name="MaxTob2" value=":OutputWidthSelectTAU:"/>
+      <Generic name="MaxTob3" value=":OutputWidthSelectJET:"/>
+      <Generic name="NumResultBits" value="1"/>
+      <Generic name="ApplyDR" value="0"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" selection="0" value="30"/>
+      <Parameter pos="1" name="MinET2" selection="0" value="24"/>
+      <Parameter pos="2" name="MinET3" selection="0" value="25"/>
+      <Parameter pos="3" name="DisambDRSqr" selection="0" value="1"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DisambiguationDRIncl3" name="1DISAMB-J25ab-0DR28-EM15his2-TAU12abi" algoId="69">
+    <Fixed>
+      <Input name="Tob1" value="EMshi" position="0"/>
+      <Input name="Tob2" value="TAUabi" position="1"/>
+      <Input name="Tob3" value="Jab" position="2"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="1DISAMB-J25ab-0DR28-EM15his2-TAU12abi"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSortEM:"/>
+      <Generic name="InputWidth2" value=":OutputWidthSelectTAU:"/>
+      <Generic name="InputWidth3" value=":OutputWidthSelectJET:"/>
+      <Generic name="MaxTob1" value="2"/>
+      <Generic name="MaxTob2" value=":OutputWidthSelectTAU:"/>
+      <Generic name="MaxTob3" value=":OutputWidthSelectJET:"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" selection="0" value="30"/>
+      <Parameter pos="1" name="MinET2" selection="0" value="24"/>
+      <Parameter pos="2" name="MinET3" selection="0" value="25"/>
+      <Parameter pos="3" name="DisambDRSqrMin" selection="0" value="0"/>
+      <Parameter pos="4" name="DisambDRSqrMax" selection="0" value="784"/>
+      <Parameter pos="5" name="DisambDRSqr" selection="0" value="1"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="InvariantMassInclusive1" name="2INVM9-2MU6ab" algoId="8">
+    <Fixed>
+      <Input name="Tob" value="MUab" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="2INVM9-2MU6ab"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob" value=":OutputWidthSelectMU:"/>
+      <Generic name="RequireOneBarrel" value="0"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="5"/>
+      <Parameter pos="1" name="MinET2" value="5"/>
+      <Parameter pos="2" name="MinMSqr" value="4"/>
+      <Parameter pos="3" name="MaxMSqr" value="81"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="InvariantMassInclusive1" name="2INVM8-ONEBARREL-MU6ab-MU4ab" algoId="49">
+    <Fixed>
+      <Input name="Tob" value="MUab" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="2INVM8-ONEBARREL-MU6ab-MU4ab"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob" value=":OutputWidthSelectMU:"/>
+      <Generic name="RequireOneBarrel" value="1"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="5"/>
+      <Parameter pos="1" name="MinET2" value="3"/>
+      <Parameter pos="2" name="MinMSqr" value="4"/>
+      <Parameter pos="3" name="MaxMSqr" value="64"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DeltaEtaPhiIncl1" name="5DETA99-5DPHI99-MU6ab-MU4ab" algoId="20">
+    <Fixed>
+      <Input name="Tob" value="MUab" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="5DETA99-5DPHI99-MU6ab-MU4ab"/>
+      </Output>
+      <Generic name="NumResultBits" value="1"/>
+      <Generic name="InputWidth" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob" value=":OutputWidthSelectMU:"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="5"/>
+      <Parameter pos="1" name="MinET2" value="3"/>
+      <Parameter pos="2" name="MinDeltaEta" value="5"/>
+      <Parameter pos="3" name="MaxDeltaEta" value="99"/>
+      <Parameter pos="4" name="MinDeltaPhi" value="5"/>
+      <Parameter pos="5" name="MaxDeltaPhi" value="99"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DeltaEtaPhiIncl1" name="5DETA99-5DPHI99-2MU6ab" algoId="21">
+    <Fixed>
+      <Input name="Tob" value="MUab" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="5DETA99-5DPHI99-2MU6ab"/>
+      </Output>
+      <Generic name="NumResultBits" value="1"/>
+      <Generic name="InputWidth" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob" value=":OutputWidthSelectMU:"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="5"/>
+      <Parameter pos="1" name="MinET2" value="5"/>
+      <Parameter pos="2" name="MinDeltaEta" value="5"/>
+      <Parameter pos="3" name="MaxDeltaEta" value="99"/>
+      <Parameter pos="4" name="MinDeltaPhi" value="5"/>
+      <Parameter pos="5" name="MaxDeltaPhi" value="99"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DisambiguationIncl3" name="1DISAMB-TAU20abi-TAU12abi-J25ab" algoId="68">
+    <Fixed>
+      <Input name="Tob1" value="TAUabi" position="0"/>
+      <Input name="Tob2" value="TAUabi" position="1"/>
+      <Input name="Tob3" value="Jab" position="2"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="1DISAMB-TAU20abi-TAU12abi-J25ab"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSelectTAU:"/>
+      <Generic name="InputWidth2" value=":OutputWidthSelectTAU:"/>
+      <Generic name="InputWidth3" value=":OutputWidthSelectJET:"/>
+      <Generic name="MaxTob1" value=":OutputWidthSelectTAU:"/>
+      <Generic name="MaxTob2" value=":OutputWidthSelectTAU:"/>
+      <Generic name="MaxTob3" value=":OutputWidthSelectTAU:"/>
+      <Generic name="NumResultBits" value="1"/>
+      <Generic name="ApplyDR" value="0"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" selection="0" value="40"/>
+      <Parameter pos="1" name="MinET2" selection="0" value="24"/>
+      <Parameter pos="2" name="MinET3" selection="0" value="25"/>
+      <Parameter pos="3" name="DisambDRSqr" selection="0" value="1"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DeltaRSqrIncl2" name="0DR28-MU10ab-TAU12abi" algoId="22">
+    <Fixed>
+      <Input name="Tob1" value="MUab" position="0"/>
+      <Input name="Tob2" value="TAUabi" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="0DR28-MU10ab-TAU12abi"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSelectMU:"/>
+      <Generic name="InputWidth2" value=":OutputWidthSelectTAU:"/>
+      <Generic name="MaxTob1" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob2" value=":OutputWidthSelectTAU:"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" selection="0" value="9"/>
+      <Parameter pos="1" name="MinET2" selection="0" value="24"/>
+      <Parameter pos="2" name="DeltaRMin" selection="0" value="0"/>
+      <Parameter pos="3" name="DeltaRMax" selection="0" value="784"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DeltaEtaPhiIncl1" name="0DETA20-0DPHI20-TAU20abi-TAU12abi" algoId="52">
+    <Fixed>
+      <Input name="Tob" value="TAUabi" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="0DETA20-0DPHI20-TAU20abi-TAU12abi"/>
+      </Output>
+      <Generic name="NumResultBits" value="1"/>
+      <Generic name="InputWidth" value=":OutputWidthSelectTAU:"/>
+      <Generic name="MaxTob" value=":OutputWidthSelectTAU:"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" selection="0" value="40"/>
+      <Parameter pos="1" name="MinET2" selection="0" value="24"/>
+      <Parameter pos="2" name="MinDeltaEta" selection="0" value="0"/>
+      <Parameter pos="3" name="MaxDeltaEta" selection="0" value="20"/>
+      <Parameter pos="4" name="MinDeltaPhi" selection="0" value="0"/>
+      <Parameter pos="5" name="MaxDeltaPhi" selection="0" value="20"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DisambiguationDRIncl2" name="DISAMB-0DR28-EM15his2-TAU12abi" algoId="78">
+    <Fixed>
+      <Input name="Tob1" value="EMshi" position="0"/>
+      <Input name="Tob2" value="TAUabi" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="DISAMB-0DR28-EM15his2-TAU12abi"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSortEM:"/>
+      <Generic name="InputWidth2" value=":OutputWidthSelectTAU:"/>
+      <Generic name="MaxTob1" value="2"/>
+      <Generic name="MaxTob2" value=":OutputWidthSelectTAU:"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" selection="0" value="30"/>
+      <Parameter pos="1" name="MinET2" selection="0" value="24"/>
+      <Parameter pos="2" name="DisambDRSqrMin" selection="0" value="0"/>
+      <Parameter pos="3" name="DisambDRSqrMax" selection="0" value="784"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DisambiguationInvmIncl2" name="DISAMB-30INVM-EM20his2-TAU12ab" algoId="83">
+    <Fixed>
+      <Input name="Tob1" value="EMshi" position="0"/>
+      <Input name="Tob2" value="TAUab" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="DISAMB-30INVM-EM20his2-TAU12ab"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSortEM:"/>
+      <Generic name="InputWidth2" value=":OutputWidthSelectTAU:"/>
+      <Generic name="MaxTob1" value="2"/>
+      <Generic name="MaxTob2" value=":OutputWidthSelectTAU:"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="40"/>
+      <Parameter pos="1" name="MinET2" value="24"/>
+      <Parameter pos="2" name="MinMSqr" value="900"/>
+      <Parameter pos="3" name="MaxMSqr" value="99980001"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="InvariantMassInclusive2" name="400INVM9999-AJ30s6.ETA31-AJ20s6.31ETA49" algoId="84">
+    <Fixed>
+      <Input name="Tob1" value="AJs" position="0"/>
+      <Input name="Tob2" value="AJs" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="400INVM9999-AJ30s6.ETA31-AJ20s6.31ETA49"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSortJET:"/>
+      <Generic name="InputWidth2" value=":OutputWidthSortJET:"/>
+      <Generic name="MaxTob1" value="6"/>
+      <Generic name="MaxTob2" value="6"/>
+      <Generic name="NumResultBits" value="1"/>
+      <Generic name="ApplyEtaCut" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="30"/>
+      <Parameter pos="1" name="MinET2" value="20"/>
+      <Parameter pos="2" name="MinMSqr" value="160000"/>
+      <Parameter pos="3" name="MaxMSqr" value="99980001"/>
+      <Parameter pos="4" name="MinEta1" value="0"/>
+      <Parameter pos="5" name="MaxEta1" value="31"/>
+      <Parameter pos="6" name="MinEta2" value="31"/>
+      <Parameter pos="7" name="MaxEta2" value="49"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DeltaRSqrIncl1" name="0DR22-2MU6ab" algoId="17">
+    <Fixed>
+      <Input name="Tob" value="MUab" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="0DR22-2MU6ab"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob" value=":OutputWidthSelectMU:"/>
+      <Generic name="RequireOneBarrel" value="0"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="5"/>
+      <Parameter pos="1" name="MinET2" value="5"/>
+      <Parameter pos="2" name="DeltaRMin" value="0"/>
+      <Parameter pos="3" name="DeltaRMax" value="484"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="InvariantMassInclusive1" name="7INVM15-2MU4ab" algoId="9">
+    <Fixed>
+      <Input name="Tob" value="MUab" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="7INVM15-2MU4ab"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob" value=":OutputWidthSelectMU:"/>
+      <Generic name="RequireOneBarrel" value="0"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="3"/>
+      <Parameter pos="1" name="MinET2" value="3"/>
+      <Parameter pos="2" name="MinMSqr" value="49"/>
+      <Parameter pos="3" name="MaxMSqr" value="225"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DeltaRSqrIncl1" name="0DR22-MU6ab-MU4ab" algoId="18">
+    <Fixed>
+      <Input name="Tob" value="MUab" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="0DR22-MU6ab-MU4ab"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob" value=":OutputWidthSelectMU:"/>
+      <Generic name="RequireOneBarrel" value="0"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="5"/>
+      <Parameter pos="1" name="MinET2" value="3"/>
+      <Parameter pos="2" name="DeltaRMin" value="0"/>
+      <Parameter pos="3" name="DeltaRMax" value="484"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DeltaRSqrIncl1" name="0DR15-2MU4ab" algoId="13">
+    <Fixed>
+      <Input name="Tob" value="MUab" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="0DR15-2MU4ab"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob" value=":OutputWidthSelectMU:"/>
+      <Generic name="RequireOneBarrel" value="0"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="3"/>
+      <Parameter pos="1" name="MinET2" value="3"/>
+      <Parameter pos="2" name="DeltaRMin" value="0"/>
+      <Parameter pos="3" name="DeltaRMax" value="225"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DeltaRSqrIncl1" name="0DR24-2MU4ab" algoId="16">
+    <Fixed>
+      <Input name="Tob" value="MUab" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="0DR24-2MU4ab"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob" value=":OutputWidthSelectMU:"/>
+      <Generic name="RequireOneBarrel" value="0"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="3"/>
+      <Parameter pos="1" name="MinET2" value="3"/>
+      <Parameter pos="2" name="DeltaRMin" value="0"/>
+      <Parameter pos="3" name="DeltaRMax" value="576"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DeltaRSqrIncl1" name="0DR15-2MU6ab" algoId="19">
+    <Fixed>
+      <Input name="Tob" value="MUab" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="0DR15-2MU6ab"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob" value=":OutputWidthSelectMU:"/>
+      <Generic name="RequireOneBarrel" value="0"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="5"/>
+      <Parameter pos="1" name="MinET2" value="5"/>
+      <Parameter pos="2" name="DeltaRMin" value="0"/>
+      <Parameter pos="3" name="DeltaRMax" value="225"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="InvariantMassInclusive1" name="2INVM9-2MU4ab" algoId="3">
+    <Fixed>
+      <Input name="Tob" value="MUab" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="2INVM9-2MU4ab"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob" value=":OutputWidthSelectMU:"/>
+      <Generic name="RequireOneBarrel" value="0"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="3"/>
+      <Parameter pos="1" name="MinET2" value="3"/>
+      <Parameter pos="2" name="MinMSqr" value="4"/>
+      <Parameter pos="3" name="MaxMSqr" value="81"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="InvariantMassInclusive1" name="2INVM9-MU6ab-MU4ab" algoId="6">
+    <Fixed>
+      <Input name="Tob" value="MUab" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="2INVM9-MU6ab-MU4ab"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob" value=":OutputWidthSelectMU:"/>
+      <Generic name="RequireOneBarrel" value="0"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="5"/>
+      <Parameter pos="1" name="MinET2" value="3"/>
+      <Parameter pos="2" name="MinMSqr" value="4"/>
+      <Parameter pos="3" name="MaxMSqr" value="81"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="InvariantMassInclusive2" name="INVM_EMs6" algoId="31">
+    <Fixed>
+      <Input name="Tob1" value="EMs" position="0"/>
+      <Input name="Tob2" value="EMs" position="1"/>
+      <Output name="Results" bits="3">
+        <Bit selection="0" name="1INVM5-EMs1-EMs6"/>
+        <Bit selection="1" name="1INVM5-EM7s1-EMs6"/>
+        <Bit selection="2" name="1INVM5-EM12s1-EMs6"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSortEM:"/>
+      <Generic name="InputWidth2" value=":OutputWidthSortEM:"/>
+      <Generic name="MaxTob1" value="1"/>
+      <Generic name="MaxTob2" value=":OutputWidthSortEM:"/>
+      <Generic name="NumResultBits" value="3"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" selection="0" value="0"/>
+      <Parameter pos="1" name="MinET2" selection="0" value="0"/>
+      <Parameter pos="2" name="MinMSqr" selection="0" value="4"/>
+      <Parameter pos="3" name="MaxMSqr" selection="0" value="100"/>
+      <Parameter pos="4" name="MinET1" selection="1" value="14"/>
+      <Parameter pos="5" name="MinET2" selection="1" value="0"/>
+      <Parameter pos="6" name="MinMSqr" selection="1" value="4"/>
+      <Parameter pos="7" name="MaxMSqr" selection="1" value="100"/>
+      <Parameter pos="8" name="MinET1" selection="2" value="24"/>
+      <Parameter pos="9" name="MinET2" selection="2" value="0"/>
+      <Parameter pos="10" name="MinMSqr" selection="2" value="4"/>
+      <Parameter pos="11" name="MaxMSqr" selection="2" value="100"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="MinDeltaPhiIncl2" name="05MINDPHI-AJj10s6-XE0" algoId="32">
+    <Fixed>
+      <Input name="Tob1" value="AJjs" position="0"/>
+      <Input name="Tob2" value="XE" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="05MINDPHI-AJj10s6-XE0"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSortJET:"/>
+      <Generic name="InputWidth2" value="1"/>
+      <Generic name="MaxTob1" value="6"/>
+      <Generic name="MaxTob2" value="1"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="10"/>
+      <Parameter pos="1" name="MinET2" value="0"/>
+      <Parameter pos="2" name="DeltaPhiMin" selection="0" value="5"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="MinDeltaPhiIncl2" name="10MINDPHI-AJj10s6-XE0" algoId="33">
+    <Fixed>
+      <Input name="Tob1" value="AJjs" position="0"/>
+      <Input name="Tob2" value="XE" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="10MINDPHI-AJj10s6-XE0"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSortJET:"/>
+      <Generic name="InputWidth2" value="1"/>
+      <Generic name="MaxTob1" value="6"/>
+      <Generic name="MaxTob2" value="1"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="10"/>
+      <Parameter pos="1" name="MinET2" value="0"/>
+      <Parameter pos="2" name="DeltaPhiMin" selection="0" value="10"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="MinDeltaPhiIncl2" name="15MINDPHI-AJj10s6-XE0" algoId="34">
+    <Fixed>
+      <Input name="Tob1" value="AJjs" position="0"/>
+      <Input name="Tob2" value="XE" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="15MINDPHI-AJj10s6-XE0"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSortJET:"/>
+      <Generic name="InputWidth2" value="1"/>
+      <Generic name="MaxTob1" value="6"/>
+      <Generic name="MaxTob2" value="1"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="10"/>
+      <Parameter pos="1" name="MinET2" value="0"/>
+      <Parameter pos="2" name="DeltaPhiMin" selection="0" value="15"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DeltaRSqrIncl2" name="0DR04-MU4ab-CJ15ab" algoId="43">
+    <Fixed>
+      <Input name="Tob1" value="MUab" position="0"/>
+      <Input name="Tob2" value="CJab" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="0DR04-MU4ab-CJ15ab"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSelectMU:"/>
+      <Generic name="InputWidth2" value=":OutputWidthSelectJET:"/>
+      <Generic name="MaxTob1" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob2" value=":OutputWidthSelectJET:"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" selection="0" value="3"/>
+      <Parameter pos="1" name="MinET2" selection="0" value="15"/>
+      <Parameter pos="2" name="DeltaRMin" selection="0" value="0"/>
+      <Parameter pos="3" name="DeltaRMax" selection="0" value="16"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DeltaRSqrIncl2" name="0DR04-MU4ab-CJ20ab" algoId="47">
+    <Fixed>
+      <Input name="Tob1" value="MUab" position="0"/>
+      <Input name="Tob2" value="CJab" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="0DR04-MU4ab-CJ20ab"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSelectMU:"/>
+      <Generic name="InputWidth2" value=":OutputWidthSelectJET:"/>
+      <Generic name="MaxTob1" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob2" value=":OutputWidthSelectJET:"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" selection="0" value="3"/>
+      <Parameter pos="1" name="MinET2" selection="0" value="20"/>
+      <Parameter pos="2" name="DeltaRMin" selection="0" value="0"/>
+      <Parameter pos="3" name="DeltaRMax" selection="0" value="16"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DeltaRSqrIncl2" name="0DR04-MU4ab-CJ30ab" algoId="44">
+    <Fixed>
+      <Input name="Tob1" value="MUab" position="0"/>
+      <Input name="Tob2" value="CJab" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="0DR04-MU4ab-CJ30ab"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSelectMU:"/>
+      <Generic name="InputWidth2" value=":OutputWidthSelectJET:"/>
+      <Generic name="MaxTob1" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob2" value=":OutputWidthSelectJET:"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" selection="0" value="3"/>
+      <Parameter pos="1" name="MinET2" selection="0" value="30"/>
+      <Parameter pos="2" name="DeltaRMin" selection="0" value="0"/>
+      <Parameter pos="3" name="DeltaRMax" selection="0" value="16"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DeltaRSqrIncl2" name="0DR04-MU6ab-CJ20ab" algoId="45">
+    <Fixed>
+      <Input name="Tob1" value="MUab" position="0"/>
+      <Input name="Tob2" value="CJab" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="0DR04-MU6ab-CJ20ab"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSelectMU:"/>
+      <Generic name="InputWidth2" value=":OutputWidthSelectJET:"/>
+      <Generic name="MaxTob1" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob2" value=":OutputWidthSelectJET:"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" selection="0" value="5"/>
+      <Parameter pos="1" name="MinET2" selection="0" value="20"/>
+      <Parameter pos="2" name="DeltaRMin" selection="0" value="0"/>
+      <Parameter pos="3" name="DeltaRMax" selection="0" value="16"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DeltaRSqrIncl2" name="0DR04-MU6ab-CJ25ab" algoId="46">
+    <Fixed>
+      <Input name="Tob1" value="MUab" position="0"/>
+      <Input name="Tob2" value="CJab" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="0DR04-MU6ab-CJ25ab"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSelectMU:"/>
+      <Generic name="InputWidth2" value=":OutputWidthSelectJET:"/>
+      <Generic name="MaxTob1" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob2" value=":OutputWidthSelectJET:"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" selection="0" value="5"/>
+      <Parameter pos="1" name="MinET2" selection="0" value="25"/>
+      <Parameter pos="2" name="DeltaRMin" selection="0" value="0"/>
+      <Parameter pos="3" name="DeltaRMax" selection="0" value="16"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="MinDeltaPhiIncl2" name="10MINDPHI-CJ20ab-XE50" algoId="41">
+    <Fixed>
+      <Input name="Tob1" value="CJab" position="0"/>
+      <Input name="Tob2" value="XE" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="10MINDPHI-CJ20ab-XE50"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSelectJET:"/>
+      <Generic name="InputWidth2" value="1"/>
+      <Generic name="MaxTob1" value=":OutputWidthSelectJET:"/>
+      <Generic name="MaxTob2" value="1"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="20"/>
+      <Parameter pos="1" name="MinET2" value="50"/>
+      <Parameter pos="2" name="DeltaPhiMin" selection="0" value="10"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DeltaRSqrIncl1" name="0DR24-2CMU4ab" algoId="50">
+    <Fixed>
+      <Input name="Tob" value="CMUab" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="0DR24-2CMU4ab"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob" value=":OutputWidthSelectMU:"/>
+      <Generic name="RequireOneBarrel" value="0"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="3"/>
+      <Parameter pos="1" name="MinET2" value="3"/>
+      <Parameter pos="2" name="DeltaRMin" value="0"/>
+      <Parameter pos="3" name="DeltaRMax" value="576"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="Multiplicity" name="MULT-CMU4ab" algoId="64">
+    <Fixed>
+      <Input name="Tob" value="CMUab" position="0"/>
+      <Output name="Results" bits="2">
+        <Bit selection="0" name="MULT-CMU4ab[0]"/>
+        <Bit selection="1" name="MULT-CMU4ab[1]"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSelectMU:"/>
+      <Generic name="NumResultBits" value="2"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET" value="2"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="Multiplicity" name="MULT-CMU6ab" algoId="65">
+    <Fixed>
+      <Input name="Tob" value="CMUab" position="0"/>
+      <Output name="Results" bits="2">
+        <Bit selection="0" name="MULT-CMU6ab[0]"/>
+        <Bit selection="1" name="MULT-CMU6ab[1]"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSelectMU:"/>
+      <Generic name="NumResultBits" value="2"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET" value="4"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DeltaEtaIncl2" name="0DETA04-EM8abi-MU10ab" algoId="53">
+    <Fixed>
+      <Input name="Tob1" value="EMabi" position="0"/>
+      <Input name="Tob2" value="MUab" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="0DETA04-EM8abi-MU10ab"/>
+      </Output>
+      <Generic name="NumResultBits" value="1"/>
+      <Generic name="InputWidth1" value=":OutputWidthSelectEM:"/>
+      <Generic name="InputWidth2" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob1" value=":OutputWidthSelectEM:"/>
+      <Generic name="MaxTob2" value=":OutputWidthSelectMU:"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" selection="0" value="16"/>
+      <Parameter pos="1" name="MinET2" selection="0" value="9"/>
+      <Parameter pos="2" name="MinDeltaEta" selection="0" value="0"/>
+      <Parameter pos="3" name="MaxDeltaEta" selection="0" value="4"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DeltaPhiIncl2" name="0DPHI03-EM8abi-MU10ab" algoId="55">
+    <Fixed>
+      <Input name="Tob1" value="EMabi" position="0"/>
+      <Input name="Tob2" value="MUab" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="0DPHI03-EM8abi-MU10ab"/>
+      </Output>
+      <Generic name="NumResultBits" value="1"/>
+      <Generic name="InputWidth1" value=":OutputWidthSelectEM:"/>
+      <Generic name="InputWidth2" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob1" value=":OutputWidthSelectEM:"/>
+      <Generic name="MaxTob2" value=":OutputWidthSelectMU:"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" selection="0" value="16"/>
+      <Parameter pos="1" name="MinET2" selection="0" value="9"/>
+      <Parameter pos="2" name="MinDeltaPhi" selection="0" value="0"/>
+      <Parameter pos="3" name="MaxDeltaPhi" selection="0" value="3"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DeltaEtaIncl2" name="0DETA04-EM15abi-MUab" algoId="54">
+    <Fixed>
+      <Input name="Tob1" value="EMabi" position="0"/>
+      <Input name="Tob2" value="MUab" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="0DETA04-EM15abi-MUab"/>
+      </Output>
+      <Generic name="NumResultBits" value="1"/>
+      <Generic name="InputWidth1" value=":OutputWidthSelectEM:"/>
+      <Generic name="InputWidth2" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob1" value=":OutputWidthSelectEM:"/>
+      <Generic name="MaxTob2" value=":OutputWidthSelectMU:"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" selection="0" value="30"/>
+      <Parameter pos="1" name="MinET2" selection="0" value="0"/>
+      <Parameter pos="2" name="MinDeltaEta" selection="0" value="0"/>
+      <Parameter pos="3" name="MaxDeltaEta" selection="0" value="4"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DeltaPhiIncl2" name="0DPHI03-EM15abi-MUab" algoId="56">
+    <Fixed>
+      <Input name="Tob1" value="EMabi" position="0"/>
+      <Input name="Tob2" value="MUab" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="0DPHI03-EM15abi-MUab"/>
+      </Output>
+      <Generic name="NumResultBits" value="1"/>
+      <Generic name="InputWidth1" value=":OutputWidthSelectEM:"/>
+      <Generic name="InputWidth2" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob1" value=":OutputWidthSelectEM:"/>
+      <Generic name="MaxTob2" value=":OutputWidthSelectMU:"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" selection="0" value="30"/>
+      <Parameter pos="1" name="MinET2" selection="0" value="0"/>
+      <Parameter pos="2" name="MinDeltaPhi" selection="0" value="0"/>
+      <Parameter pos="3" name="MaxDeltaPhi" selection="0" value="3"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DeltaRSqrIncl2" name="0DR24-CMU4ab-MU4ab" algoId="51">
+    <Fixed>
+      <Input name="Tob1" value="CMUab" position="0"/>
+      <Input name="Tob2" value="MUab" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="0DR24-CMU4ab-MU4ab"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSelectMU:"/>
+      <Generic name="InputWidth2" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob1" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob2" value=":OutputWidthSelectMU:"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="3"/>
+      <Parameter pos="1" name="MinET2" value="3"/>
+      <Parameter pos="2" name="DeltaRMin" value="0"/>
+      <Parameter pos="3" name="DeltaRMax" value="576"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="InvariantMassInclusive2" name="2INVM8-CMU4ab-MU4ab" algoId="48">
+    <Fixed>
+      <Input name="Tob1" value="CMUab" position="0"/>
+      <Input name="Tob2" value="MUab" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="2INVM8-CMU4ab-MU4ab"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSelectMU:"/>
+      <Generic name="InputWidth2" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob1" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob2" value=":OutputWidthSelectMU:"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="3"/>
+      <Parameter pos="1" name="MinET2" value="3"/>
+      <Parameter pos="2" name="MinMSqr" value="4"/>
+      <Parameter pos="3" name="MaxMSqr" value="64"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DeltaRSqrIncl1" name="0DR25-TAU20abi-TAU12abi" algoId="24">
+    <Fixed>
+      <Input name="Tob" value="TAUabi" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="0DR25-TAU20abi-TAU12abi"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSelectTAU:"/>
+      <Generic name="MaxTob" value=":OutputWidthSelectTAU:"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="40"/>
+      <Parameter pos="1" name="MinET2" value="24"/>
+      <Parameter pos="2" name="DeltaRMin" value="0"/>
+      <Parameter pos="3" name="DeltaRMax" value="625"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="MinDeltaPhiIncl2" name="10MINDPHI-AJ20s2-XE50" algoId="79">
+    <Fixed>
+      <Input name="Tob1" value="AJs" position="0"/>
+      <Input name="Tob2" value="XE" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="10MINDPHI-AJ20s2-XE50"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSortJET:"/>
+      <Generic name="InputWidth2" value="1"/>
+      <Generic name="MaxTob1" value="2"/>
+      <Generic name="MaxTob2" value="1"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="20"/>
+      <Parameter pos="1" name="MinET2" value="50"/>
+      <Parameter pos="2" name="DeltaPhiMin" selection="0" value="10"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="EtCut" name="LATE-MU10s1" algoId="80">
+    <Fixed>
+      <Input name="Tob" value="LMUs" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="LATE-MU10s1"/>
+      </Output>
+      <Generic name="InputWidth" value=":NumberOfDelayedMuons:"/>
+      <Generic name="MaxTob" value="1"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET" value="9"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DisambiguationDRIncl3" name="1DISAMB-J25ab-0DR25-TAU20abi-TAU12abi" algoId="71">
+    <Fixed>
+      <Input name="Tob1" value="TAUabi" position="0"/>
+      <Input name="Tob2" value="TAUabi" position="1"/>
+      <Input name="Tob3" value="Jab" position="2"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="1DISAMB-J25ab-0DR25-TAU20abi-TAU12abi"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSelectTAU:"/>
+      <Generic name="InputWidth2" value=":OutputWidthSelectTAU:"/>
+      <Generic name="InputWidth3" value=":OutputWidthSelectJET:"/>
+      <Generic name="MaxTob1" value=":OutputWidthSelectTAU:"/>
+      <Generic name="MaxTob2" value=":OutputWidthSelectTAU:"/>
+      <Generic name="MaxTob3" value=":OutputWidthSelectJET:"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" selection="0" value="40"/>
+      <Parameter pos="1" name="MinET2" selection="0" value="24"/>
+      <Parameter pos="2" name="MinET3" selection="0" value="25"/>
+      <Parameter pos="3" name="DisambDRSqrMin" selection="0" value="0"/>
+      <Parameter pos="4" name="DisambDRSqrMax" selection="0" value="625"/>
+      <Parameter pos="5" name="DisambDRSqr" selection="0" value="1"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="MinDeltaPhiIncl2" name="10MINDPHI-J20s2-XE30" algoId="42">
+    <Fixed>
+      <Input name="Tob1" value="Js" position="0"/>
+      <Input name="Tob2" value="XE" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="10MINDPHI-J20s2-XE30"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSortJET:"/>
+      <Generic name="InputWidth2" value="1"/>
+      <Generic name="MaxTob1" value="2"/>
+      <Generic name="MaxTob2" value="1"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="20"/>
+      <Parameter pos="1" name="MinET2" value="30"/>
+      <Parameter pos="2" name="DeltaPhiMin" selection="0" value="10"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="KalmanMETCorrection" name="KF-XE-AJall" algoId="74">
+    <Fixed>
+      <Input name="Tob1" value="XENoSort" position="0"/>
+      <Input name="Tob2" value="AJall" position="1"/>
+      <Output name="Results" bits="6">
+        <Bit selection="0" name="KF-XE40-AJall"/>
+        <Bit selection="1" name="KF-XE50-AJall"/>
+        <Bit selection="2" name="KF-XE55-AJall"/>
+        <Bit selection="3" name="KF-XE60-AJall"/>
+        <Bit selection="4" name="KF-XE65-AJall"/>
+        <Bit selection="5" name="KF-XE75-AJall"/>
+      </Output>
+      <Generic name="InputWidth" value=":InputWidthJET:"/>
+      <Generic name="NumResultBits" value="6"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET" value="0"/>
+      <Parameter pos="1" name="KFXE" selection="0" value="40"/>
+      <Parameter pos="2" name="KFXE" selection="1" value="50"/>
+      <Parameter pos="3" name="KFXE" selection="2" value="55"/>
+      <Parameter pos="4" name="KFXE" selection="3" value="60"/>
+      <Parameter pos="5" name="KFXE" selection="4" value="65"/>
+      <Parameter pos="6" name="KFXE" selection="5" value="75"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="MultiplicityCustom" name="0MATCH-4AJ20.ETA31-4AJj15.ETA31" algoId="57">
+    <Fixed>
+      <Input name="Tob" value="AJMatchall" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="0MATCH-4AJ20.ETA31-4AJj15.ETA31"/>
+      </Output>
+      <Generic name="InputWidth" value=":InputWidthJET:"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET" value="0"/>
+      <Parameter pos="1" name="MinEta" value="0"/>
+      <Parameter pos="2" name="MaxEta" value="31"/>
+      <Parameter pos="3" name="MinMultiplicity" value="4"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="JetHT" name="HT190-AJ15all.ETA21" algoId="27">
+    <Fixed>
+      <Input name="Tob" value="AJall" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="HT190-AJ15all.ETA21"/>
+      </Output>
+      <Generic name="InputWidth" value=":InputWidthJET:"/>
+      <Generic name="MaxTob" value=":InputWidthJET:"/>
+      <Generic name="NumRegisters" value="2"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET" value="15"/>
+      <Parameter pos="1" name="MinEta" value="0"/>
+      <Parameter pos="2" name="MaxEta" value="21"/>
+      <Parameter pos="3" name="MinHt" value="190"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="JetHT" name="HT150-AJ20all.ETA31" algoId="28">
+    <Fixed>
+      <Input name="Tob" value="AJall" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="HT150-AJ20all.ETA31"/>
+      </Output>
+      <Generic name="InputWidth" value=":InputWidthJET:"/>
+      <Generic name="MaxTob" value=":InputWidthJET:"/>
+      <Generic name="NumRegisters" value="2"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET" value="20"/>
+      <Parameter pos="1" name="MinEta" value="0"/>
+      <Parameter pos="2" name="MaxEta" value="31"/>
+      <Parameter pos="3" name="MinHt" value="150"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="JetHT" name="HT150-AJj15all.ETA49" algoId="29">
+    <Fixed>
+      <Input name="Tob" value="AJjall" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="HT150-AJj15all.ETA49"/>
+      </Output>
+      <Generic name="InputWidth" value=":InputWidthJET:"/>
+      <Generic name="MaxTob" value=":InputWidthJET:"/>
+      <Generic name="NumRegisters" value="2"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET" value="15"/>
+      <Parameter pos="1" name="MinEta" value="0"/>
+      <Parameter pos="2" name="MaxEta" value="49"/>
+      <Parameter pos="3" name="MinHt" value="150"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="JetHT" name="HT20-AJj15all.ETA49" algoId="30">
+    <Fixed>
+      <Input name="Tob" value="AJjall" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="HT20-AJj15all.ETA49"/>
+      </Output>
+      <Generic name="InputWidth" value=":InputWidthJET:"/>
+      <Generic name="MaxTob" value=":InputWidthJET:"/>
+      <Generic name="NumRegisters" value="2"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET" value="15"/>
+      <Parameter pos="1" name="MinEta" value="0"/>
+      <Parameter pos="2" name="MaxEta" value="49"/>
+      <Parameter pos="3" name="MinHt" value="20"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="SimpleCone" name="SC111-CJ15ab.ETA26" algoId="81">
+    <Fixed>
+      <Input name="Tob" value="CJab" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="SC111-CJ15ab.ETA26"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSelectJET:"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET" value="15"/>
+      <Parameter pos="1" name="MinSumET" value="111"/>
+      <Parameter pos="2" name="MaxRSqr" value="100"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="SimpleCone" name="SC85-CJ15ab.ETA26" algoId="82">
+    <Fixed>
+      <Input name="Tob" value="CJab" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="SC85-CJ15ab.ETA26"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSelectJET:"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET" value="15"/>
+      <Parameter pos="1" name="MinSumET" value="85"/>
+      <Parameter pos="2" name="MaxRSqr" value="100"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="Ratio" name="05RATIO-XE0-HT0-AJj15all.ETA49" algoId="59">
+    <Fixed>
+      <Input name="Tob1" value="XE" position="0"/>
+      <Input name="Tob2" value="AJjall" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="05RATIO-XE0-HT0-AJj15all.ETA49"/>
+      </Output>
+      <Generic name="InputWidth1" value="1"/>
+      <Generic name="InputWidth2" value=":InputWidthJET:"/>
+      <Generic name="MaxTob1" value="1"/>
+      <Generic name="MaxTob2" value=":InputWidthJET:"/>
+      <Generic name="NumResultBits" value="1"/>
+      <Generic name="isXE2" value="0"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET2" value="15"/>
+      <Parameter pos="1" name="EtaMin" value="0"/>
+      <Parameter pos="2" name="EtaMax" value="49"/>
+      <Parameter pos="3" name="MinET1" value="0"/>
+      <Parameter pos="4" name="HT" value="0"/>
+      <Parameter pos="5" name="Ratio" value="5"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="Ratio" name="90RATIO2-XE0-HT0-AJj15all.ETA49" algoId="60">
+    <Fixed>
+      <Input name="Tob1" value="XE" position="0"/>
+      <Input name="Tob2" value="AJjall" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="90RATIO2-XE0-HT0-AJj15all.ETA49"/>
+      </Output>
+      <Generic name="InputWidth1" value="1"/>
+      <Generic name="InputWidth2" value=":InputWidthJET:"/>
+      <Generic name="MaxTob1" value="1"/>
+      <Generic name="MaxTob2" value=":InputWidthJET:"/>
+      <Generic name="NumResultBits" value="1"/>
+      <Generic name="isXE2" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET2" value="15"/>
+      <Parameter pos="1" name="EtaMin" value="0"/>
+      <Parameter pos="2" name="EtaMax" value="49"/>
+      <Parameter pos="3" name="MinET1" value="0"/>
+      <Parameter pos="4" name="HT" value="0"/>
+      <Parameter pos="5" name="Ratio" value="90"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="Ratio" name="250RATIO2-XE0-HT0-AJj15all.ETA49" algoId="61">
+    <Fixed>
+      <Input name="Tob1" value="XE" position="0"/>
+      <Input name="Tob2" value="AJjall" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="250RATIO2-XE0-HT0-AJj15all.ETA49"/>
+      </Output>
+      <Generic name="InputWidth1" value="1"/>
+      <Generic name="InputWidth2" value=":InputWidthJET:"/>
+      <Generic name="MaxTob1" value="1"/>
+      <Generic name="MaxTob2" value=":InputWidthJET:"/>
+      <Generic name="NumResultBits" value="1"/>
+      <Generic name="isXE2" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET2" value="15"/>
+      <Parameter pos="1" name="EtaMin" value="0"/>
+      <Parameter pos="2" name="EtaMax" value="49"/>
+      <Parameter pos="3" name="MinET1" value="0"/>
+      <Parameter pos="4" name="HT" value="0"/>
+      <Parameter pos="5" name="Ratio" value="250"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="MinDeltaPhiIncl2" name="10MINDPHI-J20ab-XE50" algoId="40">
+    <Fixed>
+      <Input name="Tob1" value="Jab" position="0"/>
+      <Input name="Tob2" value="XE" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="10MINDPHI-J20ab-XE50"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSelectJET:"/>
+      <Generic name="InputWidth2" value="1"/>
+      <Generic name="MaxTob1" value=":OutputWidthSelectJET:"/>
+      <Generic name="MaxTob2" value="1"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="20"/>
+      <Parameter pos="1" name="MinET2" value="50"/>
+      <Parameter pos="2" name="DeltaPhiMin" selection="0" value="10"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DeltaRSqrIncl1" name="0DR28-TAU20abi-TAU12abi" algoId="23">
+    <Fixed>
+      <Input name="Tob" value="TAUabi" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="0DR28-TAU20abi-TAU12abi"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSelectTAU:"/>
+      <Generic name="MaxTob" value=":OutputWidthSelectTAU:"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="40"/>
+      <Parameter pos="1" name="MinET2" value="24"/>
+      <Parameter pos="2" name="DeltaRMin" value="0"/>
+      <Parameter pos="3" name="DeltaRMax" value="784"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DisambiguationDRIncl3" name="1DISAMB-J25ab-0DR28-TAU20abi-TAU12abi" algoId="70">
+    <Fixed>
+      <Input name="Tob1" value="TAUabi" position="0"/>
+      <Input name="Tob2" value="TAUabi" position="1"/>
+      <Input name="Tob3" value="Jab" position="2"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="1DISAMB-J25ab-0DR28-TAU20abi-TAU12abi"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSelectTAU:"/>
+      <Generic name="InputWidth2" value=":OutputWidthSelectTAU:"/>
+      <Generic name="InputWidth3" value=":OutputWidthSelectJET:"/>
+      <Generic name="MaxTob1" value=":OutputWidthSelectTAU:"/>
+      <Generic name="MaxTob2" value=":OutputWidthSelectTAU:"/>
+      <Generic name="MaxTob3" value=":OutputWidthSelectJET:"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" selection="0" value="40"/>
+      <Parameter pos="1" name="MinET2" selection="0" value="24"/>
+      <Parameter pos="2" name="MinET3" selection="0" value="25"/>
+      <Parameter pos="3" name="DisambDRSqrMin" selection="0" value="0"/>
+      <Parameter pos="4" name="DisambDRSqrMax" selection="0" value="784"/>
+      <Parameter pos="5" name="DisambDRSqr" selection="0" value="1"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DisambiguationIncl2" name="1DISAMB-TAU12abi-J25ab" algoId="66">
+    <Fixed>
+      <Input name="Tob1" value="TAUabi" position="0"/>
+      <Input name="Tob2" value="Jab" position="1"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="1DISAMB-TAU12abi-J25ab"/>
+      </Output>
+      <Generic name="InputWidth1" value=":OutputWidthSelectTAU:"/>
+      <Generic name="InputWidth2" value=":OutputWidthSelectJET:"/>
+      <Generic name="MaxTob1" value=":OutputWidthSelectTAU:"/>
+      <Generic name="MaxTob2" value=":OutputWidthSelectJET:"/>
+      <Generic name="NumResultBits" value="1"/>
+      <Generic name="ClusterOnly" value="0"/>
+      <Generic name="ApplyDR" value="0"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="24"/>
+      <Parameter pos="1" name="MinET2" value="25"/>
+      <Parameter pos="2" name="DisambDRSqrMin" value="1"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DeltaRSqrIncl1" name="0DR10-MU10ab-MU6ab" algoId="11">
+    <Fixed>
+      <Input name="Tob" value="MUab" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="0DR10-MU10ab-MU6ab"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob" value=":OutputWidthSelectMU:"/>
+      <Generic name="RequireOneBarrel" value="0"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="9"/>
+      <Parameter pos="1" name="MinET2" value="5"/>
+      <Parameter pos="2" name="DeltaRMin" value="0"/>
+      <Parameter pos="3" name="DeltaRMax" value="100"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DeltaRSqrIncl1" name="2DR99-2MU4ab" algoId="10">
+    <Fixed>
+      <Input name="Tob" value="MUab" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="2DR99-2MU4ab"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob" value=":OutputWidthSelectMU:"/>
+      <Generic name="RequireOneBarrel" value="0"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="3"/>
+      <Parameter pos="1" name="MinET2" value="3"/>
+      <Parameter pos="2" name="DeltaRMin" value="4"/>
+      <Parameter pos="3" name="DeltaRMax" value="9801"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DeltaRSqrIncl1" name="0DR34-2MU4ab" algoId="15">
+    <Fixed>
+      <Input name="Tob" value="MUab" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="0DR34-2MU4ab"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob" value=":OutputWidthSelectMU:"/>
+      <Generic name="RequireOneBarrel" value="0"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="3"/>
+      <Parameter pos="1" name="MinET2" value="3"/>
+      <Parameter pos="2" name="DeltaRMin" value="0"/>
+      <Parameter pos="3" name="DeltaRMax" value="1156"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DeltaRSqrIncl1" name="2DR15-2MU6ab" algoId="12">
+    <Fixed>
+      <Input name="Tob" value="MUab" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="2DR15-2MU6ab"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob" value=":OutputWidthSelectMU:"/>
+      <Generic name="RequireOneBarrel" value="0"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="5"/>
+      <Parameter pos="1" name="MinET2" value="5"/>
+      <Parameter pos="2" name="DeltaRMin" value="4"/>
+      <Parameter pos="3" name="DeltaRMax" value="225"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="DeltaRSqrIncl1" name="0DR15-MU6ab-MU4ab" algoId="14">
+    <Fixed>
+      <Input name="Tob" value="MUab" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="0DR15-MU6ab-MU4ab"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob" value=":OutputWidthSelectMU:"/>
+      <Generic name="RequireOneBarrel" value="0"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="5"/>
+      <Parameter pos="1" name="MinET2" value="3"/>
+      <Parameter pos="2" name="DeltaRMin" value="0"/>
+      <Parameter pos="3" name="DeltaRMax" value="225"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="InvariantMassInclusive1" name="8INVM15-MU6ab-MU4ab" algoId="4">
+    <Fixed>
+      <Input name="Tob" value="MUab" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="8INVM15-MU6ab-MU4ab"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob" value=":OutputWidthSelectMU:"/>
+      <Generic name="RequireOneBarrel" value="0"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="5"/>
+      <Parameter pos="1" name="MinET2" value="3"/>
+      <Parameter pos="2" name="MinMSqr" value="64"/>
+      <Parameter pos="3" name="MaxMSqr" value="225"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="InvariantMassInclusive1" name="8INVM15-2MU6ab" algoId="7">
+    <Fixed>
+      <Input name="Tob" value="MUab" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="8INVM15-2MU6ab"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob" value=":OutputWidthSelectMU:"/>
+      <Generic name="RequireOneBarrel" value="0"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="5"/>
+      <Parameter pos="1" name="MinET2" value="5"/>
+      <Parameter pos="2" name="MinMSqr" value="64"/>
+      <Parameter pos="3" name="MaxMSqr" value="225"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="InvariantMassInclusive1" name="2INVM8-2MU4ab" algoId="2">
+    <Fixed>
+      <Input name="Tob" value="MUab" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="2INVM8-2MU4ab"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob" value=":OutputWidthSelectMU:"/>
+      <Generic name="RequireOneBarrel" value="0"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="3"/>
+      <Parameter pos="1" name="MinET2" value="3"/>
+      <Parameter pos="2" name="MinMSqr" value="4"/>
+      <Parameter pos="3" name="MaxMSqr" value="64"/>
+    </Variable>
+  </DecisionAlgo>
+
+  <DecisionAlgo type="InvariantMassInclusive1" name="2INVM8-MU6ab-MU4ab" algoId="5">
+    <Fixed>
+      <Input name="Tob" value="MUab" position="0"/>
+      <Output name="Results" bits="1">
+        <Bit selection="0" name="2INVM8-MU6ab-MU4ab"/>
+      </Output>
+      <Generic name="InputWidth" value=":OutputWidthSelectMU:"/>
+      <Generic name="MaxTob" value=":OutputWidthSelectMU:"/>
+      <Generic name="RequireOneBarrel" value="0"/>
+      <Generic name="NumResultBits" value="1"/>
+    </Fixed>
+    <Variable>
+      <Parameter pos="0" name="MinET1" value="5"/>
+      <Parameter pos="1" name="MinET2" value="3"/>
+      <Parameter pos="2" name="MinMSqr" value="4"/>
+      <Parameter pos="3" name="MaxMSqr" value="64"/>
+    </Variable>
+  </DecisionAlgo>
+
+</TOPO_MENU>
diff --git a/Trigger/TriggerCommon/TriggerMenuXML/data/LVL1config_MC_PhaseII.xml b/Trigger/TriggerCommon/TriggerMenuXML/data/LVL1config_MC_PhaseII.xml
new file mode 100644
index 0000000000000000000000000000000000000000..c618c72b6808e44b77f389e34b8e953336886546
--- /dev/null
+++ b/Trigger/TriggerCommon/TriggerMenuXML/data/LVL1config_MC_PhaseII.xml
@@ -0,0 +1,7861 @@
+<?xml version="1.0"?>
+<!DOCTYPE LVL1Config SYSTEM "LVL1config.dtd">
+<LVL1Config name="MC_PhaseII" ctpVersion="4" l1Version="1">
+  <!--File is generated by TriggerMenu-->
+  <!--No. L1 thresholds defined: 287-->
+  <!--No. L1 items defined: 497-->
+  <TriggerMenu name="MC_PhaseII" phase="lumi">
+    <TriggerItem ctpid="0" partition="1" name="L1_EM3" complex_deadtime="0" definition="(EM3[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM3_x1" triggerthreshold="EM3"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="1" partition="1" name="L1_EM7" complex_deadtime="0" definition="(EM7[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM7_x1" triggerthreshold="EM7"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="2" partition="1" name="L1_EM12" complex_deadtime="0" definition="(EM12[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM12_x1" triggerthreshold="EM12"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="3" partition="1" name="L1_EM8VH" complex_deadtime="0" definition="(EM8VH[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM8VH_x1" triggerthreshold="EM8VH"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="4" partition="1" name="L1_EM10VH" complex_deadtime="0" definition="(EM10VH[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM10VH_x1" triggerthreshold="EM10VH"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="5" partition="1" name="L1_EM15VHI_2TAU12IM_4J12" complex_deadtime="0" definition="(EM15VHI[x1]&amp;HA12IM[x2]&amp;J12[x4]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM15VHI_x1" triggerthreshold="EM15VHI"/>
+        <TriggerCondition multi="2" name="HA12IM_x2" triggerthreshold="HA12IM"/>
+        <TriggerCondition multi="4" name="J12_x4" triggerthreshold="J12"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="6" partition="1" name="L1_EM15" complex_deadtime="0" definition="(EM15[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM15_x1" triggerthreshold="EM15"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="7" partition="1" name="L1_EM15VH" complex_deadtime="0" definition="(EM15VH[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM15VH_x1" triggerthreshold="EM15VH"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="8" partition="1" name="L1_EM18VHI" complex_deadtime="0" definition="(EM18VHI[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM18VHI_x1" triggerthreshold="EM18VHI"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="9" partition="1" name="L1_EM20VH" complex_deadtime="0" definition="(EM20VH[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM20VH_x1" triggerthreshold="EM20VH"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="10" partition="1" name="L1_EM20VHI" complex_deadtime="0" definition="(EM20VHI[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM20VHI_x1" triggerthreshold="EM20VHI"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="11" partition="1" name="L1_EM22VHI" complex_deadtime="0" definition="(EM22VHI[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM22VHI_x1" triggerthreshold="EM22VHI"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="12" partition="1" name="L1_EM3_EMPTY" complex_deadtime="0" definition="(EM3[x1]&amp;BGRP0&amp;BGRP3)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM3_x1" triggerthreshold="EM3"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP3"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="13" partition="1" name="L1_EM7_EMPTY" complex_deadtime="0" definition="(EM7[x1]&amp;BGRP0&amp;BGRP3)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM7_x1" triggerthreshold="EM7"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP3"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="14" partition="1" name="L1_MU4" complex_deadtime="0" definition="(MU4[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10001000" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU4_x1" triggerthreshold="MU4"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="15" partition="1" name="L1_MU6" complex_deadtime="0" definition="(MU6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU6_x1" triggerthreshold="MU6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="16" partition="1" name="L1_MU10" complex_deadtime="0" definition="(MU10[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10001000" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU10_x1" triggerthreshold="MU10"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="17" partition="1" name="L1_MU21" complex_deadtime="0" definition="((MU20[x1]|MU21[x1])&amp;BGRP0&amp;BGRP1)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <OR>
+          <TriggerCondition multi="1" name="MU20_x1" triggerthreshold="MU20"/>
+          <TriggerCondition multi="1" name="MU21_x1" triggerthreshold="MU21"/>
+        </OR>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="18" partition="1" name="L1_MU20" complex_deadtime="0" definition="(MU20[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10001000" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU20_x1" triggerthreshold="MU20"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="19" partition="1" name="L1_MU4_EMPTY" complex_deadtime="0" definition="(MU4[x1]&amp;BGRP0&amp;BGRP3)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU4_x1" triggerthreshold="MU4"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP3"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="20" partition="1" name="L1_MU4_FIRSTEMPTY" complex_deadtime="0" definition="(MU4[x1]&amp;BGRP0&amp;BGRP6)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU4_x1" triggerthreshold="MU4"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP6"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="21" partition="1" name="L1_MU11_EMPTY" complex_deadtime="0" definition="(MU11[x1]&amp;BGRP0&amp;BGRP3)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU11_x1" triggerthreshold="MU11"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP3"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="22" partition="1" name="L1_MU4_UNPAIRED_ISO" complex_deadtime="0" definition="(MU4[x1]&amp;BGRP0&amp;BGRP4)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU4_x1" triggerthreshold="MU4"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP4"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="23" partition="1" name="L1_2EM3" complex_deadtime="0" definition="(EM3[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="2" name="EM3_x2" triggerthreshold="EM3"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="24" partition="1" name="L1_2EM7" complex_deadtime="0" definition="(EM7[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="2" name="EM7_x2" triggerthreshold="EM7"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="25" partition="1" name="L1_2EM10VH" complex_deadtime="0" definition="(EM10VH[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="2" name="EM10VH_x2" triggerthreshold="EM10VH"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="26" partition="1" name="L1_EM20VH_3J20" complex_deadtime="0" definition="(EM20VH[x1]&amp;J20[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM20VH_x1" triggerthreshold="EM20VH"/>
+        <TriggerCondition multi="3" name="J20_x3" triggerthreshold="J20"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="27" partition="1" name="L1_2EM15" complex_deadtime="0" definition="(EM15[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="2" name="EM15_x2" triggerthreshold="EM15"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="28" partition="1" name="L1_2EM15VH" complex_deadtime="0" definition="(EM15VH[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="2" name="EM15VH_x2" triggerthreshold="EM15VH"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="29" partition="1" name="L1_EM7_2EM3" complex_deadtime="0" definition="(EM7[x1]&amp;EM3[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM7_x1" triggerthreshold="EM7"/>
+        <TriggerCondition multi="2" name="EM3_x2" triggerthreshold="EM3"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="30" partition="1" name="L1_EM12_2EM3" complex_deadtime="0" definition="(EM12[x1]&amp;EM3[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM12_x1" triggerthreshold="EM12"/>
+        <TriggerCondition multi="2" name="EM3_x2" triggerthreshold="EM3"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="31" partition="1" name="L1_EM15VH_3EM7" complex_deadtime="0" definition="(EM15VH[x1]&amp;EM7[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM15VH_x1" triggerthreshold="EM15VH"/>
+        <TriggerCondition multi="3" name="EM7_x3" triggerthreshold="EM7"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="32" partition="1" name="L1_2MU4" complex_deadtime="0" definition="(MU4[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="2" name="MU4_x2" triggerthreshold="MU4"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="33" partition="1" name="L1_2MU6" complex_deadtime="0" definition="(MU6[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="2" name="MU6_x2" triggerthreshold="MU6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="34" partition="1" name="L1_2MU10" complex_deadtime="0" definition="(MU10[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="2" name="MU10_x2" triggerthreshold="MU10"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="35" partition="1" name="L1_2MU20_OVERLAY" complex_deadtime="0" definition="(MU20[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10000010" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="2" name="MU20_x2" triggerthreshold="MU20"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="36" partition="1" name="L1_MU10_2MU6" complex_deadtime="0" definition="(MU10[x1]&amp;MU6[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU10_x1" triggerthreshold="MU10"/>
+        <TriggerCondition multi="2" name="MU6_x2" triggerthreshold="MU6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="37" partition="1" name="L1_MU11_2MU6" complex_deadtime="0" definition="(MU11[x1]&amp;MU6[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU11_x1" triggerthreshold="MU11"/>
+        <TriggerCondition multi="2" name="MU6_x2" triggerthreshold="MU6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="38" partition="1" name="L1_3MU4" complex_deadtime="0" definition="(MU4[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="3" name="MU4_x3" triggerthreshold="MU4"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="39" partition="1" name="L1_MU6_2MU4" complex_deadtime="0" definition="(MU6[x1]&amp;MU4[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU6_x1" triggerthreshold="MU6"/>
+        <TriggerCondition multi="2" name="MU4_x2" triggerthreshold="MU4"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="40" partition="1" name="L1_3MU6" complex_deadtime="0" definition="(MU6[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="3" name="MU6_x3" triggerthreshold="MU6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="41" partition="1" name="L1_4J15.0ETA25" complex_deadtime="0" definition="(J15.0ETA25[x4]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="4" name="J15.0ETA25_x4" triggerthreshold="J15.0ETA25"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="42" partition="1" name="L1_EM15I_MU4" complex_deadtime="0" definition="(EM15[x1]&amp;EM8I[x1]&amp;MU4[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM15_x1" triggerthreshold="EM15"/>
+        <TriggerCondition multi="1" name="EM8I_x1" triggerthreshold="EM8I"/>
+        <TriggerCondition multi="1" name="MU4_x1" triggerthreshold="MU4"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="43" partition="1" name="L1_2EM8VH_MU10" complex_deadtime="0" definition="(EM8VH[x2]&amp;MU10[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="2" name="EM8VH_x2" triggerthreshold="EM8VH"/>
+        <TriggerCondition multi="1" name="MU10_x1" triggerthreshold="MU10"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="44" partition="1" name="L1_EM15VH_MU10" complex_deadtime="0" definition="(EM15VH[x1]&amp;MU10[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM15VH_x1" triggerthreshold="EM15VH"/>
+        <TriggerCondition multi="1" name="MU10_x1" triggerthreshold="MU10"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="45" partition="1" name="L1_TAU12" complex_deadtime="0" definition="(HA12[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA12_x1" triggerthreshold="HA12"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="46" partition="1" name="L1_4MU4" complex_deadtime="0" definition="(MU4[x4]&amp;BGRP0&amp;BGRP1)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="4" name="MU4_x4" triggerthreshold="MU4"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="47" partition="1" name="L1_TAU12IM" complex_deadtime="0" definition="(HA12IM[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA12IM_x1" triggerthreshold="HA12IM"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="48" partition="1" name="L1_TE15.0ETA24" complex_deadtime="0" definition="(TE15.0ETA24[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="TE15.0ETA24_x1" triggerthreshold="TE15.0ETA24"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="49" partition="1" name="L1_TAU20" complex_deadtime="0" definition="(HA20[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA20_x1" triggerthreshold="HA20"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="50" partition="1" name="L1_EM12_W-MT25" complex_deadtime="0" definition="(25MT-EM12s6-XE0[x1]&amp;EM12[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="25MT-EM12s6-XE0_x1" triggerthreshold="25MT-EM12s6-XE0"/>
+        <TriggerCondition multi="1" name="EM12_x1" triggerthreshold="EM12"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="51" partition="1" name="L1_TAU20IM" complex_deadtime="0" definition="(HA20IM[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA20IM_x1" triggerthreshold="HA20IM"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="52" partition="1" name="L1_TAU100" complex_deadtime="0" definition="(HA100[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA100_x1" triggerthreshold="HA100"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="53" partition="1" name="L1_TAU30" complex_deadtime="0" definition="(HA30[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA30_x1" triggerthreshold="HA30"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="54" partition="1" name="L1_TAU40" complex_deadtime="0" definition="(HA40[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA40_x1" triggerthreshold="HA40"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="55" partition="1" name="L1_TAU60" complex_deadtime="0" definition="(HA60[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA60_x1" triggerthreshold="HA60"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="56" partition="1" name="L1_TAU8" complex_deadtime="0" definition="(HA8[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA8_x1" triggerthreshold="HA8"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="57" partition="1" name="L1_TAU8_EMPTY" complex_deadtime="0" definition="(HA8[x1]&amp;BGRP0&amp;BGRP3)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA8_x1" triggerthreshold="HA8"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP3"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="58" partition="1" name="L1_TAU20IM_2TAU12IM" complex_deadtime="0" definition="(HA20IM[x1]&amp;HA12IM[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA20IM_x1" triggerthreshold="HA20IM"/>
+        <TriggerCondition multi="2" name="HA12IM_x2" triggerthreshold="HA12IM"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="59" partition="1" name="L1_TAU20_2TAU12" complex_deadtime="0" definition="(HA20[x1]&amp;HA12[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA20_x1" triggerthreshold="HA20"/>
+        <TriggerCondition multi="2" name="HA12_x2" triggerthreshold="HA12"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="60" partition="1" name="L1_EM15VHI_2TAU12IM" complex_deadtime="0" definition="(EM15VHI[x1]&amp;HA12IM[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM15VHI_x1" triggerthreshold="EM15VHI"/>
+        <TriggerCondition multi="2" name="HA12IM_x2" triggerthreshold="HA12IM"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="61" partition="1" name="L1_EM15VHI_2TAU12IM_J25_3J12" complex_deadtime="0" definition="(EM15VHI[x1]&amp;HA12IM[x2]&amp;J25[x1]&amp;J12[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM15VHI_x1" triggerthreshold="EM15VHI"/>
+        <TriggerCondition multi="2" name="HA12IM_x2" triggerthreshold="HA12IM"/>
+        <TriggerCondition multi="1" name="J25_x1" triggerthreshold="J25"/>
+        <TriggerCondition multi="3" name="J12_x3" triggerthreshold="J12"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="62" partition="1" name="L1_EM15VHI_TAU40_2TAU15" complex_deadtime="0" definition="(EM15VHI[x1]&amp;HA40[x1]&amp;HA15[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM15VHI_x1" triggerthreshold="EM15VHI"/>
+        <TriggerCondition multi="1" name="HA40_x1" triggerthreshold="HA40"/>
+        <TriggerCondition multi="2" name="HA15_x2" triggerthreshold="HA15"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="63" partition="1" name="L1_MU10_TAU12IM" complex_deadtime="0" definition="(MU10[x1]&amp;HA12IM[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU10_x1" triggerthreshold="MU10"/>
+        <TriggerCondition multi="1" name="HA12IM_x1" triggerthreshold="HA12IM"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="64" partition="1" name="L1_MU10_TAU12IM_J25_2J12" complex_deadtime="0" definition="(MU10[x1]&amp;HA12IM[x1]&amp;J25[x1]&amp;J12[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU10_x1" triggerthreshold="MU10"/>
+        <TriggerCondition multi="1" name="HA12IM_x1" triggerthreshold="HA12IM"/>
+        <TriggerCondition multi="1" name="J25_x1" triggerthreshold="J25"/>
+        <TriggerCondition multi="2" name="J12_x2" triggerthreshold="J12"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="65" partition="1" name="L1_EM7_MU10" complex_deadtime="0" definition="(EM7[x1]&amp;MU10[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM7_x1" triggerthreshold="EM7"/>
+        <TriggerCondition multi="1" name="MU10_x1" triggerthreshold="MU10"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="66" partition="1" name="L1_MU6_EMPTY" complex_deadtime="0" definition="(MU6[x1]&amp;BGRP0&amp;BGRP3)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU6_x1" triggerthreshold="MU6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP3"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="67" partition="1" name="L1_MU10_TAU20IM" complex_deadtime="0" definition="(MU10[x1]&amp;HA20IM[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU10_x1" triggerthreshold="MU10"/>
+        <TriggerCondition multi="1" name="HA20IM_x1" triggerthreshold="HA20IM"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="68" partition="1" name="L1_XE10" complex_deadtime="0" definition="(XE10[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="XE10_x1" triggerthreshold="XE10"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="69" partition="1" name="L1_EM20VHI_TAU20IM_2TAU20_J25_3J20" complex_deadtime="0" definition="(EM20VHI[x1]&amp;HA20IM[x1]&amp;HA20[x2]&amp;J25[x1]&amp;J20[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM20VHI_x1" triggerthreshold="EM20VHI"/>
+        <TriggerCondition multi="1" name="HA20IM_x1" triggerthreshold="HA20IM"/>
+        <TriggerCondition multi="2" name="HA20_x2" triggerthreshold="HA20"/>
+        <TriggerCondition multi="1" name="J25_x1" triggerthreshold="J25"/>
+        <TriggerCondition multi="3" name="J20_x3" triggerthreshold="J20"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="70" partition="1" name="L1_TAU20IM_2TAU12IM_J25_2J20_3J12" complex_deadtime="0" definition="(HA20IM[x1]&amp;HA12IM[x2]&amp;J25[x1]&amp;J20[x2]&amp;J12[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA20IM_x1" triggerthreshold="HA20IM"/>
+        <TriggerCondition multi="2" name="HA12IM_x2" triggerthreshold="HA12IM"/>
+        <TriggerCondition multi="1" name="J25_x1" triggerthreshold="J25"/>
+        <TriggerCondition multi="2" name="J20_x2" triggerthreshold="J20"/>
+        <TriggerCondition multi="3" name="J12_x3" triggerthreshold="J12"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="71" partition="1" name="L1_J25_2J20_3J12_BOX-TAU20ITAU12I" complex_deadtime="0" definition="(J25[x1]&amp;J20[x2]&amp;J12[x3]&amp;0DETA20-0DPHI20-TAU20abi-TAU12abi[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J25_x1" triggerthreshold="J25"/>
+        <TriggerCondition multi="2" name="J20_x2" triggerthreshold="J20"/>
+        <TriggerCondition multi="3" name="J12_x3" triggerthreshold="J12"/>
+        <TriggerCondition multi="1" name="0DETA20-0DPHI20-TAU20abi-TAU12abi_x1" triggerthreshold="0DETA20-0DPHI20-TAU20abi-TAU12abi"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="72" partition="1" name="L1_DR-MU10TAU12I_TAU12I-J25" complex_deadtime="0" definition="(0DR28-MU10ab-TAU12abi[x1]&amp;1DISAMB-TAU12abi-J25ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="0DR28-MU10ab-TAU12abi_x1" triggerthreshold="0DR28-MU10ab-TAU12abi"/>
+        <TriggerCondition multi="1" name="1DISAMB-TAU12abi-J25ab_x1" triggerthreshold="1DISAMB-TAU12abi-J25ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="73" partition="1" name="L1_MU10_TAU12I-J25" complex_deadtime="0" definition="(MU10[x1]&amp;1DISAMB-TAU12abi-J25ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU10_x1" triggerthreshold="MU10"/>
+        <TriggerCondition multi="1" name="1DISAMB-TAU12abi-J25ab_x1" triggerthreshold="1DISAMB-TAU12abi-J25ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="74" partition="1" name="L1_TAU20IM_2J20_XE45" complex_deadtime="0" definition="(HA20IM[x1]&amp;J20[x2]&amp;XE45[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA20IM_x1" triggerthreshold="HA20IM"/>
+        <TriggerCondition multi="2" name="J20_x2" triggerthreshold="J20"/>
+        <TriggerCondition multi="1" name="XE45_x1" triggerthreshold="XE45"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="75" partition="1" name="L1_J15.31ETA49_UNPAIRED_ISO" complex_deadtime="0" definition="(J15.31ETA49[x1]&amp;BGRP0&amp;BGRP4)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J15.31ETA49_x1" triggerthreshold="J15.31ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP4"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="76" partition="1" name="L1_TAU60_DR-TAU20ITAU12I" complex_deadtime="0" definition="(HA60[x1]&amp;0DR28-TAU20abi-TAU12abi[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA60_x1" triggerthreshold="HA60"/>
+        <TriggerCondition multi="1" name="0DR28-TAU20abi-TAU12abi_x1" triggerthreshold="0DR28-TAU20abi-TAU12abi"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="77" partition="1" name="L1_EM12_W-MT35_XS30_W-15DPHI-JXE-0_W-15DPHI-EMXE" complex_deadtime="0" definition="(35MT-EM12s6-XE0[x1]&amp;EM12[x1]&amp;XS30[x1]&amp;15MINDPHI-AJj10s6-XE0[x1]&amp;15MINDPHI-EM12s6-XE0[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="35MT-EM12s6-XE0_x1" triggerthreshold="35MT-EM12s6-XE0"/>
+        <TriggerCondition multi="1" name="EM12_x1" triggerthreshold="EM12"/>
+        <TriggerCondition multi="1" name="XS30_x1" triggerthreshold="XS30"/>
+        <TriggerCondition multi="1" name="15MINDPHI-AJj10s6-XE0_x1" triggerthreshold="15MINDPHI-AJj10s6-XE0"/>
+        <TriggerCondition multi="1" name="15MINDPHI-EM12s6-XE0_x1" triggerthreshold="15MINDPHI-EM12s6-XE0"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="78" partition="1" name="L1_EM15VHI_2TAU12IM_XE35" complex_deadtime="0" definition="(EM15VHI[x1]&amp;HA12IM[x2]&amp;XE35[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM15VHI_x1" triggerthreshold="EM15VHI"/>
+        <TriggerCondition multi="2" name="HA12IM_x2" triggerthreshold="HA12IM"/>
+        <TriggerCondition multi="1" name="XE35_x1" triggerthreshold="XE35"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="79" partition="1" name="L1_EM12_W-MT35_XS40_W-05DPHI-JXE-0_W-05DPHI-EMXE" complex_deadtime="0" definition="(35MT-EM12s6-XE0[x1]&amp;EM12[x1]&amp;XS40[x1]&amp;05MINDPHI-AJj10s6-XE0[x1]&amp;05MINDPHI-EM12s6-XE0[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="35MT-EM12s6-XE0_x1" triggerthreshold="35MT-EM12s6-XE0"/>
+        <TriggerCondition multi="1" name="EM12_x1" triggerthreshold="EM12"/>
+        <TriggerCondition multi="1" name="XS40_x1" triggerthreshold="XS40"/>
+        <TriggerCondition multi="1" name="05MINDPHI-AJj10s6-XE0_x1" triggerthreshold="05MINDPHI-AJj10s6-XE0"/>
+        <TriggerCondition multi="1" name="05MINDPHI-EM12s6-XE0_x1" triggerthreshold="05MINDPHI-EM12s6-XE0"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="80" partition="1" name="L1_EM12_W-MT35_W-90RO2-XEHT-0_W-15DPHI-JXE-0_W-15DPHI-EMXE" complex_deadtime="0" definition="(35MT-EM12s6-XE0[x1]&amp;EM12[x1]&amp;90RATIO2-XE0-HT0-AJj15all.ETA49[x1]&amp;15MINDPHI-AJj10s6-XE0[x1]&amp;15MINDPHI-EM12s6-XE0[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="35MT-EM12s6-XE0_x1" triggerthreshold="35MT-EM12s6-XE0"/>
+        <TriggerCondition multi="1" name="EM12_x1" triggerthreshold="EM12"/>
+        <TriggerCondition multi="1" name="90RATIO2-XE0-HT0-AJj15all.ETA49_x1" triggerthreshold="90RATIO2-XE0-HT0-AJj15all.ETA49"/>
+        <TriggerCondition multi="1" name="15MINDPHI-AJj10s6-XE0_x1" triggerthreshold="15MINDPHI-AJj10s6-XE0"/>
+        <TriggerCondition multi="1" name="15MINDPHI-EM12s6-XE0_x1" triggerthreshold="15MINDPHI-EM12s6-XE0"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="81" partition="1" name="L1_MU10_TAU12IM_XE35" complex_deadtime="0" definition="(MU10[x1]&amp;HA12IM[x1]&amp;XE35[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU10_x1" triggerthreshold="MU10"/>
+        <TriggerCondition multi="1" name="HA12IM_x1" triggerthreshold="HA12IM"/>
+        <TriggerCondition multi="1" name="XE35_x1" triggerthreshold="XE35"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="82" partition="1" name="L1_TE15" complex_deadtime="0" definition="(TE15[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="TE15_x1" triggerthreshold="TE15"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="83" partition="1" name="L1_TAU20IM_2TAU12IM_XE35" complex_deadtime="0" definition="(HA20IM[x1]&amp;HA12IM[x2]&amp;XE35[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA20IM_x1" triggerthreshold="HA20IM"/>
+        <TriggerCondition multi="2" name="HA12IM_x2" triggerthreshold="HA12IM"/>
+        <TriggerCondition multi="1" name="XE35_x1" triggerthreshold="XE35"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="84" partition="1" name="L1_TAU20_2TAU12_XE35" complex_deadtime="0" definition="(HA20[x1]&amp;HA12[x2]&amp;XE35[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA20_x1" triggerthreshold="HA20"/>
+        <TriggerCondition multi="2" name="HA12_x2" triggerthreshold="HA12"/>
+        <TriggerCondition multi="1" name="XE35_x1" triggerthreshold="XE35"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="85" partition="1" name="L1_XE30" complex_deadtime="0" definition="(XE30[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="XE30_x1" triggerthreshold="XE30"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="86" partition="1" name="L1_TAU20IM_FTK" complex_deadtime="0" definition="(HA20IM[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA20IM_x1" triggerthreshold="HA20IM"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="87" partition="1" name="L1_MU4_J12" complex_deadtime="0" definition="(MU4[x1]&amp;J12[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU4_x1" triggerthreshold="MU4"/>
+        <TriggerCondition multi="1" name="J12_x1" triggerthreshold="J12"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="88" partition="1" name="L1_MU6_J20" complex_deadtime="0" definition="(MU6[x1]&amp;J20[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU6_x1" triggerthreshold="MU6"/>
+        <TriggerCondition multi="1" name="J20_x1" triggerthreshold="J20"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="89" partition="1" name="L1_MU6_J40" complex_deadtime="0" definition="(MU6[x1]&amp;J40[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU6_x1" triggerthreshold="MU6"/>
+        <TriggerCondition multi="1" name="J40_x1" triggerthreshold="J40"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="90" partition="1" name="L1_MU6_J75" complex_deadtime="0" definition="(MU6[x1]&amp;J75[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU6_x1" triggerthreshold="MU6"/>
+        <TriggerCondition multi="1" name="J75_x1" triggerthreshold="J75"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="91" partition="1" name="L1_J12" complex_deadtime="0" definition="(J12[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:111|HF:111">
+      <AND>
+        <TriggerCondition multi="1" name="J12_x1" triggerthreshold="J12"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="92" partition="1" name="L1_J15" complex_deadtime="0" definition="(J15[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J15_x1" triggerthreshold="J15"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="93" partition="1" name="L1_J20" complex_deadtime="0" definition="(J20[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J20_x1" triggerthreshold="J20"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="94" partition="1" name="L1_J25" complex_deadtime="0" definition="(J25[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J25_x1" triggerthreshold="J25"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="95" partition="1" name="L1_J30" complex_deadtime="0" definition="(J30[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J30_x1" triggerthreshold="J30"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="96" partition="1" name="L1_J40" complex_deadtime="0" definition="(J40[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J40_x1" triggerthreshold="J40"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="97" partition="1" name="L1_J50" complex_deadtime="0" definition="(J50[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J50_x1" triggerthreshold="J50"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="98" partition="1" name="L1_J75" complex_deadtime="0" definition="(J75[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J75_x1" triggerthreshold="J75"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="99" partition="1" name="L1_J85" complex_deadtime="0" definition="(J85[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J85_x1" triggerthreshold="J85"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="100" partition="1" name="L1_J100" complex_deadtime="0" definition="(J100[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J100_x1" triggerthreshold="J100"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="101" partition="1" name="L1_J120" complex_deadtime="0" definition="(J120[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J120_x1" triggerthreshold="J120"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="102" partition="1" name="L1_J400" complex_deadtime="0" definition="(J400[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J400_x1" triggerthreshold="J400"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="103" partition="1" name="L1_J20.31ETA49" complex_deadtime="0" definition="(J20.31ETA49[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J20.31ETA49_x1" triggerthreshold="J20.31ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="104" partition="1" name="L1_J30.31ETA49" complex_deadtime="0" definition="(J30.31ETA49[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J30.31ETA49_x1" triggerthreshold="J30.31ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="105" partition="1" name="L1_J50.31ETA49" complex_deadtime="0" definition="(J50.31ETA49[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J50.31ETA49_x1" triggerthreshold="J50.31ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="106" partition="1" name="L1_J75.31ETA49" complex_deadtime="0" definition="(J75.31ETA49[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J75.31ETA49_x1" triggerthreshold="J75.31ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="107" partition="1" name="L1_J100.31ETA49" complex_deadtime="0" definition="(J100.31ETA49[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J100.31ETA49_x1" triggerthreshold="J100.31ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="108" partition="1" name="L1_XE65" complex_deadtime="0" definition="(XE65[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="XE65_x1" triggerthreshold="XE65"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="109" partition="1" name="L1_J15.31ETA49" complex_deadtime="0" definition="(J15.31ETA49[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J15.31ETA49_x1" triggerthreshold="J15.31ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="110" partition="1" name="L1_J20.28ETA31" complex_deadtime="0" definition="(J20.28ETA31[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J20.28ETA31_x1" triggerthreshold="J20.28ETA31"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="111" partition="1" name="L1_J12_EMPTY" complex_deadtime="0" definition="(J12[x1]&amp;BGRP0&amp;BGRP3)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J12_x1" triggerthreshold="J12"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP3"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="112" partition="1" name="L1_J12_FIRSTEMPTY" complex_deadtime="0" definition="(J12[x1]&amp;BGRP0&amp;BGRP6)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J12_x1" triggerthreshold="J12"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP6"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="113" partition="1" name="L1_J12_UNPAIRED_ISO" complex_deadtime="0" definition="(J12[x1]&amp;BGRP0&amp;BGRP4)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J12_x1" triggerthreshold="J12"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP4"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="114" partition="1" name="L1_J12_UNPAIRED_NONISO" complex_deadtime="0" definition="(J12[x1]&amp;BGRP0&amp;BGRP5)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J12_x1" triggerthreshold="J12"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP5"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="115" partition="1" name="L1_J12_ABORTGAPNOTCALIB" complex_deadtime="0" definition="(J12[x1]&amp;BGRP0&amp;BGRP8)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J12_x1" triggerthreshold="J12"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP8"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="116" partition="1" name="L1_J30_EMPTY" complex_deadtime="0" definition="(J30[x1]&amp;BGRP0&amp;BGRP3)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J30_x1" triggerthreshold="J30"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP3"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="117" partition="1" name="L1_J30_FIRSTEMPTY" complex_deadtime="0" definition="(J30[x1]&amp;BGRP0&amp;BGRP6)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J30_x1" triggerthreshold="J30"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP6"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="118" partition="1" name="L1_J30.31ETA49_EMPTY" complex_deadtime="0" definition="(J30.31ETA49[x1]&amp;BGRP0&amp;BGRP3)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J30.31ETA49_x1" triggerthreshold="J30.31ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP3"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="119" partition="1" name="L1_J30.31ETA49_UNPAIRED_ISO" complex_deadtime="0" definition="(J30.31ETA49[x1]&amp;BGRP0&amp;BGRP4)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J30.31ETA49_x1" triggerthreshold="J30.31ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP4"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="120" partition="1" name="L1_J30.31ETA49_UNPAIRED_NONISO" complex_deadtime="0" definition="(J30.31ETA49[x1]&amp;BGRP0&amp;BGRP5)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J30.31ETA49_x1" triggerthreshold="J30.31ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP5"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="121" partition="1" name="L1_J50_UNPAIRED_ISO" complex_deadtime="0" definition="(J50[x1]&amp;BGRP0&amp;BGRP4)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J50_x1" triggerthreshold="J50"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP4"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="122" partition="1" name="L1_J50_UNPAIRED_NONISO" complex_deadtime="0" definition="(J50[x1]&amp;BGRP0&amp;BGRP5)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J50_x1" triggerthreshold="J50"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP5"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="123" partition="1" name="L1_J50_ABORTGAPNOTCALIB" complex_deadtime="0" definition="(J50[x1]&amp;BGRP0&amp;BGRP8)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J50_x1" triggerthreshold="J50"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP8"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="124" partition="1" name="L1_EM12_W-MT35_W-250RO2-XEHT-0_W-05DPHI-JXE-0_W-05DPHI-EMXE" complex_deadtime="0" definition="(35MT-EM12s6-XE0[x1]&amp;EM12[x1]&amp;250RATIO2-XE0-HT0-AJj15all.ETA49[x1]&amp;05MINDPHI-AJj10s6-XE0[x1]&amp;05MINDPHI-EM12s6-XE0[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="35MT-EM12s6-XE0_x1" triggerthreshold="35MT-EM12s6-XE0"/>
+        <TriggerCondition multi="1" name="EM12_x1" triggerthreshold="EM12"/>
+        <TriggerCondition multi="1" name="250RATIO2-XE0-HT0-AJj15all.ETA49_x1" triggerthreshold="250RATIO2-XE0-HT0-AJj15all.ETA49"/>
+        <TriggerCondition multi="1" name="05MINDPHI-AJj10s6-XE0_x1" triggerthreshold="05MINDPHI-AJj10s6-XE0"/>
+        <TriggerCondition multi="1" name="05MINDPHI-EM12s6-XE0_x1" triggerthreshold="05MINDPHI-EM12s6-XE0"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="125" partition="1" name="L1_J20_J20.31ETA49" complex_deadtime="0" definition="(J20[x1]&amp;J20.31ETA49[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J20_x1" triggerthreshold="J20"/>
+        <TriggerCondition multi="1" name="J20.31ETA49_x1" triggerthreshold="J20.31ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="126" partition="1" name="L1_3J15" complex_deadtime="0" definition="(J15[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="3" name="J15_x3" triggerthreshold="J15"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="127" partition="1" name="L1_3J20" complex_deadtime="0" definition="(J20[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="3" name="J20_x3" triggerthreshold="J20"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="128" partition="1" name="L1_3J40" complex_deadtime="0" definition="(J40[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="3" name="J40_x3" triggerthreshold="J40"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="129" partition="1" name="L1_3J15.0ETA25" complex_deadtime="0" definition="(J15.0ETA25[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="3" name="J15.0ETA25_x3" triggerthreshold="J15.0ETA25"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="130" partition="1" name="L1_3J50" complex_deadtime="0" definition="(J50[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="3" name="J50_x3" triggerthreshold="J50"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="131" partition="1" name="L1_4J15" complex_deadtime="0" definition="(J15[x4]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="4" name="J15_x4" triggerthreshold="J15"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="132" partition="1" name="L1_4J20" complex_deadtime="0" definition="(J20[x4]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="4" name="J20_x4" triggerthreshold="J20"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="133" partition="1" name="L1_J75_XE50" complex_deadtime="0" definition="(J75[x1]&amp;XE50[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J75_x1" triggerthreshold="J75"/>
+        <TriggerCondition multi="1" name="XE50_x1" triggerthreshold="XE50"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="134" partition="1" name="L1_XE75" complex_deadtime="0" definition="(XE75[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="XE75_x1" triggerthreshold="XE75"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="135" partition="1" name="L1_6J15" complex_deadtime="0" definition="(J15[x6]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="6" name="J15_x6" triggerthreshold="J15"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="136" partition="1" name="L1_J75_3J20" complex_deadtime="0" definition="(J75[x1]&amp;J20[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J75_x1" triggerthreshold="J75"/>
+        <TriggerCondition multi="3" name="J20_x3" triggerthreshold="J20"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="137" partition="1" name="L1_J30.0ETA49_2J20.0ETA49" complex_deadtime="0" definition="(J30.0ETA49[x1]&amp;J20.0ETA49[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J30.0ETA49_x1" triggerthreshold="J30.0ETA49"/>
+        <TriggerCondition multi="2" name="J20.0ETA49_x2" triggerthreshold="J20.0ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="138" partition="1" name="L1_TE10" complex_deadtime="0" definition="(TE10[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="TE10_x1" triggerthreshold="TE10"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="139" partition="1" name="L1_EM15_W-MT35_W-250RO2-XEHT-0_W-15DPHI-JXE-0_W-15DPHI-EM15XE" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;250RATIO2-XE0-HT0-AJj15all.ETA49[x1]&amp;15MINDPHI-AJj10s6-XE0[x1]&amp;15MINDPHI-EM15s6-XE0[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="35MT-EM15s6-XE0_x1" triggerthreshold="35MT-EM15s6-XE0"/>
+        <TriggerCondition multi="1" name="EM15_x1" triggerthreshold="EM15"/>
+        <TriggerCondition multi="1" name="250RATIO2-XE0-HT0-AJj15all.ETA49_x1" triggerthreshold="250RATIO2-XE0-HT0-AJj15all.ETA49"/>
+        <TriggerCondition multi="1" name="15MINDPHI-AJj10s6-XE0_x1" triggerthreshold="15MINDPHI-AJj10s6-XE0"/>
+        <TriggerCondition multi="1" name="15MINDPHI-EM15s6-XE0_x1" triggerthreshold="15MINDPHI-EM15s6-XE0"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="140" partition="1" name="L1_5J15.0ETA25" complex_deadtime="0" definition="(J15.0ETA25[x5]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="5" name="J15.0ETA25_x5" triggerthreshold="J15.0ETA25"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="141" partition="1" name="L1_2J15_XE55" complex_deadtime="0" definition="(J15[x2]&amp;XE55[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="2" name="J15_x2" triggerthreshold="J15"/>
+        <TriggerCondition multi="1" name="XE55_x1" triggerthreshold="XE55"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="142" partition="1" name="L1_J40_XE50" complex_deadtime="0" definition="(J40[x1]&amp;XE50[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J40_x1" triggerthreshold="J40"/>
+        <TriggerCondition multi="1" name="XE50_x1" triggerthreshold="XE50"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="143" partition="1" name="L1_TE25" complex_deadtime="0" definition="(TE25[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="TE25_x1" triggerthreshold="TE25"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="144" partition="1" name="L1_XE35" complex_deadtime="0" definition="(XE35[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="XE35_x1" triggerthreshold="XE35"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="145" partition="1" name="L1_XE40" complex_deadtime="0" definition="(XE40[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="XE40_x1" triggerthreshold="XE40"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="146" partition="1" name="L1_XE45" complex_deadtime="0" definition="(XE45[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="XE45_x1" triggerthreshold="XE45"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="147" partition="1" name="L1_XE50" complex_deadtime="0" definition="(XE50[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="XE50_x1" triggerthreshold="XE50"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="148" partition="1" name="L1_XE55" complex_deadtime="0" definition="(XE55[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="XE55_x1" triggerthreshold="XE55"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="149" partition="1" name="L1_XE60" complex_deadtime="0" definition="(XE60[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="XE60_x1" triggerthreshold="XE60"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="150" partition="1" name="L1_XE70" complex_deadtime="0" definition="(XE70[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="XE70_x1" triggerthreshold="XE70"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="151" partition="1" name="L1_XE80" complex_deadtime="0" definition="(XE80[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="XE80_x1" triggerthreshold="XE80"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="152" partition="1" name="L1_XS20" complex_deadtime="0" definition="(XS20[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="XS20_x1" triggerthreshold="XS20"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="153" partition="1" name="L1_XS30" complex_deadtime="0" definition="(XS30[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="XS30_x1" triggerthreshold="XS30"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="154" partition="1" name="L1_EM12_XS20" complex_deadtime="0" definition="(EM12[x1]&amp;XS20[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM12_x1" triggerthreshold="EM12"/>
+        <TriggerCondition multi="1" name="XS20_x1" triggerthreshold="XS20"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="155" partition="1" name="L1_EM15_XS30" complex_deadtime="0" definition="(EM15[x1]&amp;XS30[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM15_x1" triggerthreshold="EM15"/>
+        <TriggerCondition multi="1" name="XS30_x1" triggerthreshold="XS30"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="156" partition="1" name="L1_XE150" complex_deadtime="0" definition="(XE150[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="XE150_x1" triggerthreshold="XE150"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="157" partition="1" name="L1_TE30" complex_deadtime="0" definition="(TE30[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="TE30_x1" triggerthreshold="TE30"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="158" partition="1" name="L1_TE40" complex_deadtime="0" definition="(TE40[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="TE40_x1" triggerthreshold="TE40"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="159" partition="1" name="L1_TE70" complex_deadtime="0" definition="(TE70[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="TE70_x1" triggerthreshold="TE70"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="160" partition="1" name="L1_TE30.0ETA24" complex_deadtime="0" definition="(TE30.0ETA24[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="TE30.0ETA24_x1" triggerthreshold="TE30.0ETA24"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="161" partition="1" name="L1_BCM_Wide_UNPAIRED_NONISO" complex_deadtime="0" definition="(BCM_Wide[x1]&amp;BGRP0&amp;BGRP5)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="BCM_Wide_x1" triggerthreshold="BCM_Wide"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP5"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="162" partition="1" name="L1_BCM_AC_CA_UNPAIRED_ISO" complex_deadtime="0" definition="((BCM_AtoC[x1]|BCM_CtoA[x1])&amp;BGRP0&amp;BGRP4)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <OR>
+          <TriggerCondition multi="1" name="BCM_AtoC_x1" triggerthreshold="BCM_AtoC"/>
+          <TriggerCondition multi="1" name="BCM_CtoA_x1" triggerthreshold="BCM_CtoA"/>
+        </OR>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP4"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="163" partition="1" name="L1_BCM_AC_UNPAIRED_ISO" complex_deadtime="0" definition="(BCM_AtoC[x1]&amp;BGRP0&amp;BGRP4)" trigger_type="10100000" monitor="LF:000|HF:111">
+      <AND>
+        <TriggerCondition multi="1" name="BCM_AtoC_x1" triggerthreshold="BCM_AtoC"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP4"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="164" partition="1" name="L1_MBTS_1_EMPTY" complex_deadtime="0" definition="((MBTS_A[x1]|MBTS_C[x1])&amp;BGRP0&amp;BGRP3)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <OR>
+          <TriggerCondition multi="1" name="MBTS_A_x1" triggerthreshold="MBTS_A"/>
+          <TriggerCondition multi="1" name="MBTS_C_x1" triggerthreshold="MBTS_C"/>
+        </OR>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP3"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="165" partition="1" name="L1_MBTS_1_UNPAIRED_ISO" complex_deadtime="0" definition="((MBTS_A[x1]|MBTS_C[x1])&amp;BGRP0&amp;BGRP4)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <OR>
+          <TriggerCondition multi="1" name="MBTS_A_x1" triggerthreshold="MBTS_A"/>
+          <TriggerCondition multi="1" name="MBTS_C_x1" triggerthreshold="MBTS_C"/>
+        </OR>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP4"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="166" partition="1" name="L1_MBTS_2_EMPTY" complex_deadtime="0" definition="((MBTS_A[x2]|MBTS_C[x2]|MBTS_A[x1])&amp;(MBTS_A[x2]|MBTS_C[x2]|MBTS_C[x1])&amp;BGRP0&amp;BGRP3)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <OR>
+          <TriggerCondition multi="2" name="MBTS_A_x2" triggerthreshold="MBTS_A"/>
+          <TriggerCondition multi="2" name="MBTS_C_x2" triggerthreshold="MBTS_C"/>
+          <TriggerCondition multi="1" name="MBTS_A_x1" triggerthreshold="MBTS_A"/>
+        </OR>
+        <OR>
+          <TriggerCondition multi="2" name="MBTS_A_x2" triggerthreshold="MBTS_A"/>
+          <TriggerCondition multi="2" name="MBTS_C_x2" triggerthreshold="MBTS_C"/>
+          <TriggerCondition multi="1" name="MBTS_C_x1" triggerthreshold="MBTS_C"/>
+        </OR>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP3"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="167" partition="1" name="L1_MBTS_2_UNPAIRED_ISO" complex_deadtime="0" definition="((MBTS_A[x2]|MBTS_C[x2]|MBTS_A[x1])&amp;(MBTS_A[x2]|MBTS_C[x2]|MBTS_C[x1])&amp;BGRP0&amp;BGRP4)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <OR>
+          <TriggerCondition multi="2" name="MBTS_A_x2" triggerthreshold="MBTS_A"/>
+          <TriggerCondition multi="2" name="MBTS_C_x2" triggerthreshold="MBTS_C"/>
+          <TriggerCondition multi="1" name="MBTS_A_x1" triggerthreshold="MBTS_A"/>
+        </OR>
+        <OR>
+          <TriggerCondition multi="2" name="MBTS_A_x2" triggerthreshold="MBTS_A"/>
+          <TriggerCondition multi="2" name="MBTS_C_x2" triggerthreshold="MBTS_C"/>
+          <TriggerCondition multi="1" name="MBTS_C_x1" triggerthreshold="MBTS_C"/>
+        </OR>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP4"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="168" partition="1" name="L1_MBTS_1_1_EMPTY" complex_deadtime="0" definition="(MBTS_A[x1]&amp;MBTS_C[x1]&amp;BGRP0&amp;BGRP3)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MBTS_A_x1" triggerthreshold="MBTS_A"/>
+        <TriggerCondition multi="1" name="MBTS_C_x1" triggerthreshold="MBTS_C"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP3"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="169" partition="1" name="L1_MBTS_1_1_UNPAIRED_ISO" complex_deadtime="0" definition="(MBTS_A[x1]&amp;MBTS_C[x1]&amp;BGRP0&amp;BGRP4)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MBTS_A_x1" triggerthreshold="MBTS_A"/>
+        <TriggerCondition multi="1" name="MBTS_C_x1" triggerthreshold="MBTS_C"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP4"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="170" partition="1" name="L1_AFP_A_BGRP0" complex_deadtime="0" definition="(AFP_NSA[x1]&amp;AFP_FSA_SIT[x1]&amp;BGRP0)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="AFP_NSA_x1" triggerthreshold="AFP_NSA"/>
+        <TriggerCondition multi="1" name="AFP_FSA_SIT_x1" triggerthreshold="AFP_FSA_SIT"/>
+        <InternalTrigger name="BGRP0"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="171" partition="1" name="L1_DPHI-AJ20s2XE50" complex_deadtime="0" definition="(10MINDPHI-AJ20s2-XE50[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="10MINDPHI-AJ20s2-XE50_x1" triggerthreshold="10MINDPHI-AJ20s2-XE50"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="172" partition="1" name="L1_EM18VHI_3J20" complex_deadtime="0" definition="(EM18VHI[x1]&amp;J20[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM18VHI_x1" triggerthreshold="EM18VHI"/>
+        <TriggerCondition multi="3" name="J20_x3" triggerthreshold="J20"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="173" partition="1" name="L1_MU10_3J20" complex_deadtime="0" definition="(MU10[x1]&amp;J20[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU10_x1" triggerthreshold="MU10"/>
+        <TriggerCondition multi="3" name="J20_x3" triggerthreshold="J20"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="174" partition="1" name="L1_AFP_A_SPECTOF_BGRP0" complex_deadtime="0" definition="(AFP_FSA_TOF[x1]&amp;BGRP0)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="AFP_FSA_TOF_x1" triggerthreshold="AFP_FSA_TOF"/>
+        <InternalTrigger name="BGRP0"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="175" partition="1" name="L1_2J50_XE40" complex_deadtime="0" definition="(J50[x2]&amp;XE50[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="2" name="J50_x2" triggerthreshold="J50"/>
+        <TriggerCondition multi="1" name="XE50_x1" triggerthreshold="XE50"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="176" partition="1" name="L1_J40_XE60" complex_deadtime="0" definition="(J40[x1]&amp;XE60[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J40_x1" triggerthreshold="J40"/>
+        <TriggerCondition multi="1" name="XE60_x1" triggerthreshold="XE60"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="177" partition="1" name="L1_J40.0ETA25_XE50" complex_deadtime="0" definition="(J40.0ETA25[x1]&amp;XE50[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J40.0ETA25_x1" triggerthreshold="J40.0ETA25"/>
+        <TriggerCondition multi="1" name="XE50_x1" triggerthreshold="XE50"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="178" partition="1" name="L1_BPH-2M8-2MU4" complex_deadtime="0" definition="(2INVM8-2MU4ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="2INVM8-2MU4ab_x1" triggerthreshold="2INVM8-2MU4ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="179" partition="1" name="L1_BPH-8M15-MU6MU4" complex_deadtime="0" definition="(8INVM15-MU6ab-MU4ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="8INVM15-MU6ab-MU4ab_x1" triggerthreshold="8INVM15-MU6ab-MU4ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="180" partition="1" name="L1_BPH-8M15-2MU6" complex_deadtime="0" definition="(8INVM15-2MU6ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="8INVM15-2MU6ab_x1" triggerthreshold="8INVM15-2MU6ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="181" partition="1" name="L1_J40.0ETA25_2J15.31ETA49" complex_deadtime="0" definition="(J40.0ETA25[x1]&amp;J15.31ETA49[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J40.0ETA25_x1" triggerthreshold="J40.0ETA25"/>
+        <TriggerCondition multi="2" name="J15.31ETA49_x2" triggerthreshold="J15.31ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="182" partition="1" name="L1_J40.0ETA25_2J25_J20.31ETA49" complex_deadtime="0" definition="(J40.0ETA25[x1]&amp;J25[x2]&amp;J20.31ETA49[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J40.0ETA25_x1" triggerthreshold="J40.0ETA25"/>
+        <TriggerCondition multi="2" name="J25_x2" triggerthreshold="J25"/>
+        <TriggerCondition multi="1" name="J20.31ETA49_x1" triggerthreshold="J20.31ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="183" partition="1" name="L1_AFP_C_BGRP0" complex_deadtime="0" definition="(AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]&amp;BGRP0)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="AFP_NSC_x1" triggerthreshold="AFP_NSC"/>
+        <TriggerCondition multi="1" name="AFP_FSC_SIT_x1" triggerthreshold="AFP_FSC_SIT"/>
+        <InternalTrigger name="BGRP0"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="184" partition="1" name="L1_3J15.0ETA25_XE40" complex_deadtime="0" definition="(J15.0ETA25[x3]&amp;XE40[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="3" name="J15.0ETA25_x3" triggerthreshold="J15.0ETA25"/>
+        <TriggerCondition multi="1" name="XE40_x1" triggerthreshold="XE40"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="185" partition="1" name="L1_MBTS_4_A_UNPAIRED_ISO" complex_deadtime="0" definition="(MBTS_A[x4]&amp;BGRP0&amp;BGRP4)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="4" name="MBTS_A_x4" triggerthreshold="MBTS_A"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP4"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="186" partition="1" name="L1_MBTS_4_C_UNPAIRED_ISO" complex_deadtime="0" definition="(MBTS_C[x4]&amp;BGRP0&amp;BGRP4)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="4" name="MBTS_C_x4" triggerthreshold="MBTS_C"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP4"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="187" partition="1" name="L1_XE300" complex_deadtime="0" definition="(XE300[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="XE300_x1" triggerthreshold="XE300"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="188" partition="1" name="L1_RD1_BGRP10" complex_deadtime="0" definition="(RNDM1&amp;BGRP0&amp;BGRP10)" trigger_type="10000010" monitor="LF:000|HF:000">
+      <AND>
+        <InternalTrigger name="RNDM1"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP10"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="189" partition="1" name="L1_AFP_C_SPECTOF_BGRP0" complex_deadtime="0" definition="(AFP_FSC_TOF[x1]&amp;BGRP0)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="AFP_FSC_TOF_x1" triggerthreshold="AFP_FSC_TOF"/>
+        <InternalTrigger name="BGRP0"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="190" partition="1" name="L1_AFP_A_OR_C_UNPAIRED_ISO" complex_deadtime="0" definition="(((AFP_NSA[x1]&amp;AFP_FSA_SIT[x1])|(AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]))&amp;BGRP0&amp;BGRP4)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <OR>
+          <AND>
+            <TriggerCondition multi="1" name="AFP_NSA_x1" triggerthreshold="AFP_NSA"/>
+            <TriggerCondition multi="1" name="AFP_FSA_SIT_x1" triggerthreshold="AFP_FSA_SIT"/>
+          </AND>
+          <AND>
+            <TriggerCondition multi="1" name="AFP_NSC_x1" triggerthreshold="AFP_NSC"/>
+            <TriggerCondition multi="1" name="AFP_FSC_SIT_x1" triggerthreshold="AFP_FSC_SIT"/>
+          </AND>
+        </OR>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP4"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="191" partition="1" name="L1_AFP_A_OR_C_UNPAIRED_NONISO" complex_deadtime="0" definition="(((AFP_NSA[x1]&amp;AFP_FSA_SIT[x1])|(AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]))&amp;BGRP0&amp;BGRP5)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <OR>
+          <AND>
+            <TriggerCondition multi="1" name="AFP_NSA_x1" triggerthreshold="AFP_NSA"/>
+            <TriggerCondition multi="1" name="AFP_FSA_SIT_x1" triggerthreshold="AFP_FSA_SIT"/>
+          </AND>
+          <AND>
+            <TriggerCondition multi="1" name="AFP_NSC_x1" triggerthreshold="AFP_NSC"/>
+            <TriggerCondition multi="1" name="AFP_FSC_SIT_x1" triggerthreshold="AFP_FSC_SIT"/>
+          </AND>
+        </OR>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP5"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="192" partition="1" name="L1_AFP_A_OR_C_EMPTY" complex_deadtime="0" definition="(((AFP_NSA[x1]&amp;AFP_FSA_SIT[x1])|(AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]))&amp;BGRP0&amp;BGRP3)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <OR>
+          <AND>
+            <TriggerCondition multi="1" name="AFP_NSA_x1" triggerthreshold="AFP_NSA"/>
+            <TriggerCondition multi="1" name="AFP_FSA_SIT_x1" triggerthreshold="AFP_FSA_SIT"/>
+          </AND>
+          <AND>
+            <TriggerCondition multi="1" name="AFP_NSC_x1" triggerthreshold="AFP_NSC"/>
+            <TriggerCondition multi="1" name="AFP_FSC_SIT_x1" triggerthreshold="AFP_FSC_SIT"/>
+          </AND>
+        </OR>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP3"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="193" partition="1" name="L1_AFP_A_OR_C_FIRSTEMPTY" complex_deadtime="0" definition="(((AFP_NSA[x1]&amp;AFP_FSA_SIT[x1])|(AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]))&amp;BGRP0&amp;BGRP6)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <OR>
+          <AND>
+            <TriggerCondition multi="1" name="AFP_NSA_x1" triggerthreshold="AFP_NSA"/>
+            <TriggerCondition multi="1" name="AFP_FSA_SIT_x1" triggerthreshold="AFP_FSA_SIT"/>
+          </AND>
+          <AND>
+            <TriggerCondition multi="1" name="AFP_NSC_x1" triggerthreshold="AFP_NSC"/>
+            <TriggerCondition multi="1" name="AFP_FSC_SIT_x1" triggerthreshold="AFP_FSC_SIT"/>
+          </AND>
+        </OR>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP6"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="194" partition="1" name="L1_MBTS_4_A" complex_deadtime="0" definition="(MBTS_A[x4]&amp;BGRP0&amp;BGRP1)" trigger_type="10100000" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="4" name="MBTS_A_x4" triggerthreshold="MBTS_A"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="195" partition="1" name="L1_MBTS_4_C" complex_deadtime="0" definition="(MBTS_C[x4]&amp;BGRP0&amp;BGRP1)" trigger_type="10100000" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="4" name="MBTS_C_x4" triggerthreshold="MBTS_C"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="196" partition="1" name="L1_MBTS_1_BGRP9" complex_deadtime="0" definition="((MBTS_A[x1]|MBTS_C[x1])&amp;BGRP0&amp;BGRP9)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <OR>
+          <TriggerCondition multi="1" name="MBTS_A_x1" triggerthreshold="MBTS_A"/>
+          <TriggerCondition multi="1" name="MBTS_C_x1" triggerthreshold="MBTS_C"/>
+        </OR>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP9"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="197" partition="1" name="L1_MBTS_2_BGRP9" complex_deadtime="0" definition="((MBTS_A[x2]|MBTS_C[x2]|MBTS_A[x1])&amp;(MBTS_A[x2]|MBTS_C[x2]|MBTS_C[x1])&amp;BGRP0&amp;BGRP9)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <OR>
+          <TriggerCondition multi="2" name="MBTS_A_x2" triggerthreshold="MBTS_A"/>
+          <TriggerCondition multi="2" name="MBTS_C_x2" triggerthreshold="MBTS_C"/>
+          <TriggerCondition multi="1" name="MBTS_A_x1" triggerthreshold="MBTS_A"/>
+        </OR>
+        <OR>
+          <TriggerCondition multi="2" name="MBTS_A_x2" triggerthreshold="MBTS_A"/>
+          <TriggerCondition multi="2" name="MBTS_C_x2" triggerthreshold="MBTS_C"/>
+          <TriggerCondition multi="1" name="MBTS_C_x1" triggerthreshold="MBTS_C"/>
+        </OR>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP9"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="198" partition="1" name="L1_MBTS_1_BGRP11" complex_deadtime="0" definition="((MBTS_A[x1]|MBTS_C[x1])&amp;BGRP0&amp;BGRP11)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <OR>
+          <TriggerCondition multi="1" name="MBTS_A_x1" triggerthreshold="MBTS_A"/>
+          <TriggerCondition multi="1" name="MBTS_C_x1" triggerthreshold="MBTS_C"/>
+        </OR>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP11"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="199" partition="1" name="L1_MBTS_2_BGRP11" complex_deadtime="0" definition="((MBTS_A[x2]|MBTS_C[x2]|MBTS_A[x1])&amp;(MBTS_A[x2]|MBTS_C[x2]|MBTS_C[x1])&amp;BGRP0&amp;BGRP11)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <OR>
+          <TriggerCondition multi="2" name="MBTS_A_x2" triggerthreshold="MBTS_A"/>
+          <TriggerCondition multi="2" name="MBTS_C_x2" triggerthreshold="MBTS_C"/>
+          <TriggerCondition multi="1" name="MBTS_A_x1" triggerthreshold="MBTS_A"/>
+        </OR>
+        <OR>
+          <TriggerCondition multi="2" name="MBTS_A_x2" triggerthreshold="MBTS_A"/>
+          <TriggerCondition multi="2" name="MBTS_C_x2" triggerthreshold="MBTS_C"/>
+          <TriggerCondition multi="1" name="MBTS_C_x1" triggerthreshold="MBTS_C"/>
+        </OR>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP11"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="200" partition="1" name="L1_RD0_FILLED" complex_deadtime="0" definition="(RNDM0&amp;BGRP0&amp;BGRP1)" trigger_type="10000001" monitor="LF:000|HF:000">
+      <AND>
+        <InternalTrigger name="RNDM0"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="201" partition="1" name="L1_RD0_UNPAIRED_ISO" complex_deadtime="0" definition="(RNDM0&amp;BGRP0&amp;BGRP4)" trigger_type="10000001" monitor="LF:000|HF:000">
+      <AND>
+        <InternalTrigger name="RNDM0"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP4"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="202" partition="1" name="L1_RD0_EMPTY" complex_deadtime="0" definition="(RNDM0&amp;BGRP0&amp;BGRP3)" trigger_type="10000001" monitor="LF:000|HF:000">
+      <AND>
+        <InternalTrigger name="RNDM0"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP3"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="203" partition="1" name="L1_RD1_FILLED" complex_deadtime="0" definition="(RNDM1&amp;BGRP0&amp;BGRP1)" trigger_type="10000001" monitor="LF:000|HF:000">
+      <AND>
+        <InternalTrigger name="RNDM1"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="204" partition="1" name="L1_RD1_EMPTY" complex_deadtime="0" definition="(RNDM1&amp;BGRP0&amp;BGRP3)" trigger_type="10000010" monitor="LF:000|HF:000">
+      <AND>
+        <InternalTrigger name="RNDM1"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP3"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="205" partition="1" name="L1_RD2_FILLED" complex_deadtime="0" definition="(RNDM2&amp;BGRP0&amp;BGRP1)" trigger_type="10000001" monitor="LF:000|HF:000">
+      <AND>
+        <InternalTrigger name="RNDM2"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="206" partition="1" name="L1_RD2_EMPTY" complex_deadtime="0" definition="(RNDM2&amp;BGRP0&amp;BGRP3)" trigger_type="10000001" monitor="LF:000|HF:000">
+      <AND>
+        <InternalTrigger name="RNDM2"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP3"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="207" partition="1" name="L1_RD3_FILLED" complex_deadtime="0" definition="(RNDM3&amp;BGRP0&amp;BGRP1)" trigger_type="10000001" monitor="LF:000|HF:000">
+      <AND>
+        <InternalTrigger name="RNDM3"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="208" partition="1" name="L1_RD3_EMPTY" complex_deadtime="0" definition="(RNDM3&amp;BGRP0&amp;BGRP3)" trigger_type="10000001" monitor="LF:000|HF:000">
+      <AND>
+        <InternalTrigger name="RNDM3"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP3"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="209" partition="1" name="L1_RD0_FIRSTEMPTY" complex_deadtime="0" definition="(RNDM0&amp;BGRP0&amp;BGRP6)" trigger_type="10000001" monitor="LF:000|HF:000">
+      <AND>
+        <InternalTrigger name="RNDM0"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP6"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="210" partition="1" name="L1_RD0_BGRP9" complex_deadtime="0" definition="(RNDM0&amp;BGRP0&amp;BGRP9)" trigger_type="10000001" monitor="LF:000|HF:000">
+      <AND>
+        <InternalTrigger name="RNDM0"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP9"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="211" partition="1" name="L1_RD0_BGRP11" complex_deadtime="0" definition="(RNDM0&amp;BGRP0&amp;BGRP11)" trigger_type="10000001" monitor="LF:000|HF:000">
+      <AND>
+        <InternalTrigger name="RNDM0"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP11"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="212" partition="1" name="L1_LUCID" complex_deadtime="0" definition="((LUCID_A[x1]|LUCID_C[x1])&amp;BGRP0&amp;BGRP1)" trigger_type="10100000" monitor="LF:111|HF:000">
+      <AND>
+        <OR>
+          <TriggerCondition multi="1" name="LUCID_A_x1" triggerthreshold="LUCID_A"/>
+          <TriggerCondition multi="1" name="LUCID_C_x1" triggerthreshold="LUCID_C"/>
+        </OR>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="213" partition="1" name="L1_LUCID_EMPTY" complex_deadtime="0" definition="((LUCID_A[x1]|LUCID_C[x1])&amp;BGRP0&amp;BGRP3)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <OR>
+          <TriggerCondition multi="1" name="LUCID_A_x1" triggerthreshold="LUCID_A"/>
+          <TriggerCondition multi="1" name="LUCID_C_x1" triggerthreshold="LUCID_C"/>
+        </OR>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP3"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="214" partition="1" name="L1_LUCID_UNPAIRED_ISO" complex_deadtime="0" definition="((LUCID_A[x1]|LUCID_C[x1])&amp;BGRP0&amp;BGRP4)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <OR>
+          <TriggerCondition multi="1" name="LUCID_A_x1" triggerthreshold="LUCID_A"/>
+          <TriggerCondition multi="1" name="LUCID_C_x1" triggerthreshold="LUCID_C"/>
+        </OR>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP4"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="215" partition="1" name="L1_LUCID_A_C_EMPTY" complex_deadtime="0" definition="(LUCID_A[x1]&amp;LUCID_C[x1]&amp;BGRP0&amp;BGRP3)" trigger_type="10100000" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="LUCID_A_x1" triggerthreshold="LUCID_A"/>
+        <TriggerCondition multi="1" name="LUCID_C_x1" triggerthreshold="LUCID_C"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP3"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="216" partition="1" name="L1_LUCID_A_C_UNPAIRED_ISO" complex_deadtime="0" definition="(LUCID_A[x1]&amp;LUCID_C[x1]&amp;BGRP0&amp;BGRP4)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="LUCID_A_x1" triggerthreshold="LUCID_A"/>
+        <TriggerCondition multi="1" name="LUCID_C_x1" triggerthreshold="LUCID_C"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP4"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="217" partition="1" name="L1_LUCID_A_C_UNPAIRED_NONISO" complex_deadtime="0" definition="(LUCID_A[x1]&amp;LUCID_C[x1]&amp;BGRP0&amp;BGRP5)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="LUCID_A_x1" triggerthreshold="LUCID_A"/>
+        <TriggerCondition multi="1" name="LUCID_C_x1" triggerthreshold="LUCID_C"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP5"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="218" partition="1" name="L1_TRT_FILLED" complex_deadtime="0" definition="(NIMTRT[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="11000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="NIMTRT_x1" triggerthreshold="NIMTRT"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="219" partition="1" name="L1_TRT_EMPTY" complex_deadtime="0" definition="(NIMTRT[x1]&amp;BGRP0&amp;BGRP3)" trigger_type="11000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="NIMTRT_x1" triggerthreshold="NIMTRT"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP3"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="220" partition="1" name="L1_TGC_BURST" complex_deadtime="0" definition="(NIMTGC[x1]&amp;BGRP0)" trigger_type="11000000" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="NIMTGC_x1" triggerthreshold="NIMTGC"/>
+        <InternalTrigger name="BGRP0"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="221" partition="1" name="L1_LHCF" complex_deadtime="0" definition="(NIMLHCF[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="11000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="NIMLHCF_x1" triggerthreshold="NIMLHCF"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="222" partition="1" name="L1_BCM_Wide_BGRP0" complex_deadtime="0" definition="(BCM_Wide[x1]&amp;BGRP0)" trigger_type="10100000" monitor="LF:000|HF:111">
+      <AND>
+        <TriggerCondition multi="1" name="BCM_Wide_x1" triggerthreshold="BCM_Wide"/>
+        <InternalTrigger name="BGRP0"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="223" partition="1" name="L1_BCM_AC_CA_BGRP0" complex_deadtime="0" definition="((BCM_AtoC[x1]|BCM_CtoA[x1])&amp;BGRP0)" trigger_type="10100000" monitor="LF:000|HF:111">
+      <AND>
+        <OR>
+          <TriggerCondition multi="1" name="BCM_AtoC_x1" triggerthreshold="BCM_AtoC"/>
+          <TriggerCondition multi="1" name="BCM_CtoA_x1" triggerthreshold="BCM_CtoA"/>
+        </OR>
+        <InternalTrigger name="BGRP0"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="224" partition="1" name="L1_BCM_Wide_EMPTY" complex_deadtime="0" definition="(BCM_Wide[x1]&amp;BGRP0&amp;BGRP3)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="BCM_Wide_x1" triggerthreshold="BCM_Wide"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP3"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="225" partition="1" name="L1_BCM_Wide_UNPAIRED_ISO" complex_deadtime="0" definition="(BCM_Wide[x1]&amp;BGRP0&amp;BGRP4)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="BCM_Wide_x1" triggerthreshold="BCM_Wide"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP4"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="226" partition="1" name="L1_MBTS_1" complex_deadtime="0" definition="((MBTS_A[x1]|MBTS_C[x1])&amp;BGRP0&amp;BGRP1)" trigger_type="10100000" monitor="LF:111|HF:111">
+      <AND>
+        <OR>
+          <TriggerCondition multi="1" name="MBTS_A_x1" triggerthreshold="MBTS_A"/>
+          <TriggerCondition multi="1" name="MBTS_C_x1" triggerthreshold="MBTS_C"/>
+        </OR>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="227" partition="1" name="L1_MBTS_2" complex_deadtime="0" definition="((MBTS_A[x2]|MBTS_C[x2]|MBTS_A[x1])&amp;(MBTS_A[x2]|MBTS_C[x2]|MBTS_C[x1])&amp;BGRP0&amp;BGRP1)" trigger_type="10100000" monitor="LF:111|HF:111">
+      <AND>
+        <OR>
+          <TriggerCondition multi="2" name="MBTS_A_x2" triggerthreshold="MBTS_A"/>
+          <TriggerCondition multi="2" name="MBTS_C_x2" triggerthreshold="MBTS_C"/>
+          <TriggerCondition multi="1" name="MBTS_A_x1" triggerthreshold="MBTS_A"/>
+        </OR>
+        <OR>
+          <TriggerCondition multi="2" name="MBTS_A_x2" triggerthreshold="MBTS_A"/>
+          <TriggerCondition multi="2" name="MBTS_C_x2" triggerthreshold="MBTS_C"/>
+          <TriggerCondition multi="1" name="MBTS_C_x1" triggerthreshold="MBTS_C"/>
+        </OR>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="228" partition="1" name="L1_MBTS_1_1" complex_deadtime="0" definition="(MBTS_A[x1]&amp;MBTS_C[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10100000" monitor="LF:111|HF:111">
+      <AND>
+        <TriggerCondition multi="1" name="MBTS_A_x1" triggerthreshold="MBTS_A"/>
+        <TriggerCondition multi="1" name="MBTS_C_x1" triggerthreshold="MBTS_C"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="229" partition="1" name="L1_BCM_CA_UNPAIRED_ISO" complex_deadtime="0" definition="(BCM_CtoA[x1]&amp;BGRP0&amp;BGRP4)" trigger_type="10100000" monitor="LF:000|HF:111">
+      <AND>
+        <TriggerCondition multi="1" name="BCM_CtoA_x1" triggerthreshold="BCM_CtoA"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP4"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="230" partition="1" name="L1_BCM_AC_UNPAIRED_NONISO" complex_deadtime="0" definition="(BCM_AtoC[x1]&amp;BGRP0&amp;BGRP5)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="BCM_AtoC_x1" triggerthreshold="BCM_AtoC"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP5"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="231" partition="1" name="L1_BCM_CA_UNPAIRED_NONISO" complex_deadtime="0" definition="(BCM_CtoA[x1]&amp;BGRP0&amp;BGRP5)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="BCM_CtoA_x1" triggerthreshold="BCM_CtoA"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP5"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="232" partition="1" name="L1_BCM_AC_ABORTGAPNOTCALIB" complex_deadtime="0" definition="(BCM_AtoC[x1]&amp;BGRP0&amp;BGRP8)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="BCM_AtoC_x1" triggerthreshold="BCM_AtoC"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP8"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="233" partition="1" name="L1_BCM_CA_ABORTGAPNOTCALIB" complex_deadtime="0" definition="(BCM_CtoA[x1]&amp;BGRP0&amp;BGRP8)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="BCM_CtoA_x1" triggerthreshold="BCM_CtoA"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP8"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="234" partition="1" name="L1_BCM_Wide_ABORTGAPNOTCALIB" complex_deadtime="0" definition="(BCM_Wide[x1]&amp;BGRP0&amp;BGRP8)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="BCM_Wide_x1" triggerthreshold="BCM_Wide"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP8"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="235" partition="1" name="L1_BCM_AC_CALIB" complex_deadtime="0" definition="(BCM_AtoC[x1]&amp;BGRP0&amp;BGRP2)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="BCM_AtoC_x1" triggerthreshold="BCM_AtoC"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP2"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="236" partition="1" name="L1_BCM_CA_CALIB" complex_deadtime="0" definition="(BCM_CtoA[x1]&amp;BGRP0&amp;BGRP2)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="BCM_CtoA_x1" triggerthreshold="BCM_CtoA"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP2"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="237" partition="1" name="L1_BCM_Wide_CALIB" complex_deadtime="0" definition="(BCM_Wide[x1]&amp;BGRP0&amp;BGRP2)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="BCM_Wide_x1" triggerthreshold="BCM_Wide"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP2"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="238" partition="1" name="L1_BTAG-MU4J15" complex_deadtime="0" definition="(0DR04-MU4ab-CJ15ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="0DR04-MU4ab-CJ15ab_x1" triggerthreshold="0DR04-MU4ab-CJ15ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="239" partition="1" name="L1_BTAG-MU4J30" complex_deadtime="0" definition="(0DR04-MU4ab-CJ30ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="0DR04-MU4ab-CJ30ab_x1" triggerthreshold="0DR04-MU4ab-CJ30ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="240" partition="1" name="L1_ZB" complex_deadtime="0" definition="(ZB_EM15[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000010" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="ZB_EM15_x1" triggerthreshold="ZB_EM15"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="241" partition="1" name="L1_BPTX0_BGRP0" complex_deadtime="0" definition="(BPTX0[x1]&amp;BGRP0)" trigger_type="10000001" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="BPTX0_x1" triggerthreshold="BPTX0"/>
+        <InternalTrigger name="BGRP0"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="242" partition="1" name="L1_BPTX1_BGRP0" complex_deadtime="0" definition="(BPTX1[x1]&amp;BGRP0)" trigger_type="10000001" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="BPTX1_x1" triggerthreshold="BPTX1"/>
+        <InternalTrigger name="BGRP0"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="243" partition="1" name="L1_BTAG-MU6J20" complex_deadtime="0" definition="(0DR04-MU6ab-CJ20ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="0DR04-MU6ab-CJ20ab_x1" triggerthreshold="0DR04-MU6ab-CJ20ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="244" partition="1" name="L1_BTAG-MU6J25" complex_deadtime="0" definition="(0DR04-MU6ab-CJ25ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="0DR04-MU6ab-CJ25ab_x1" triggerthreshold="0DR04-MU6ab-CJ25ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="245" partition="1" name="L1_J40_XE50_DPHI-J20s2XE50" complex_deadtime="0" definition="(J40[x1]&amp;XE50[x1]&amp;10MINDPHI-J20s2-XE50[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J40_x1" triggerthreshold="J40"/>
+        <TriggerCondition multi="1" name="XE50_x1" triggerthreshold="XE50"/>
+        <TriggerCondition multi="1" name="10MINDPHI-J20s2-XE50_x1" triggerthreshold="10MINDPHI-J20s2-XE50"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="246" partition="1" name="L1_3J15_BTAG-MU4J15" complex_deadtime="0" definition="(J15[x3]&amp;0DR04-MU4ab-CJ15ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="3" name="J15_x3" triggerthreshold="J15"/>
+        <TriggerCondition multi="1" name="0DR04-MU4ab-CJ15ab_x1" triggerthreshold="0DR04-MU4ab-CJ15ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="247" partition="1" name="L1_3J15_BTAG-MU4J30" complex_deadtime="0" definition="(J15[x3]&amp;0DR04-MU4ab-CJ30ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="3" name="J15_x3" triggerthreshold="J15"/>
+        <TriggerCondition multi="1" name="0DR04-MU4ab-CJ30ab_x1" triggerthreshold="0DR04-MU4ab-CJ30ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="248" partition="1" name="L1_3J15_BTAG-MU6J25" complex_deadtime="0" definition="(J15[x3]&amp;0DR04-MU6ab-CJ25ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="3" name="J15_x3" triggerthreshold="J15"/>
+        <TriggerCondition multi="1" name="0DR04-MU6ab-CJ25ab_x1" triggerthreshold="0DR04-MU6ab-CJ25ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="249" partition="1" name="L1_3J20_BTAG-MU4J20" complex_deadtime="0" definition="(J20[x3]&amp;0DR04-MU4ab-CJ20ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="3" name="J20_x3" triggerthreshold="J20"/>
+        <TriggerCondition multi="1" name="0DR04-MU4ab-CJ20ab_x1" triggerthreshold="0DR04-MU4ab-CJ20ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="250" partition="1" name="L1_EM15_W-MT35_W-250RO2-XEHT-0_W-05DPHI-JXE-0_W-05DPHI-EM15XE" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;250RATIO2-XE0-HT0-AJj15all.ETA49[x1]&amp;05MINDPHI-AJj10s6-XE0[x1]&amp;05MINDPHI-EM15s6-XE0[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="35MT-EM15s6-XE0_x1" triggerthreshold="35MT-EM15s6-XE0"/>
+        <TriggerCondition multi="1" name="EM15_x1" triggerthreshold="EM15"/>
+        <TriggerCondition multi="1" name="250RATIO2-XE0-HT0-AJj15all.ETA49_x1" triggerthreshold="250RATIO2-XE0-HT0-AJj15all.ETA49"/>
+        <TriggerCondition multi="1" name="05MINDPHI-AJj10s6-XE0_x1" triggerthreshold="05MINDPHI-AJj10s6-XE0"/>
+        <TriggerCondition multi="1" name="05MINDPHI-EM15s6-XE0_x1" triggerthreshold="05MINDPHI-EM15s6-XE0"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="251" partition="1" name="L1_J40_DPHI-J20s2XE50" complex_deadtime="0" definition="(J40[x1]&amp;10MINDPHI-J20s2-XE50[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J40_x1" triggerthreshold="J40"/>
+        <TriggerCondition multi="1" name="10MINDPHI-J20s2-XE50_x1" triggerthreshold="10MINDPHI-J20s2-XE50"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="252" partition="1" name="L1_J40_DPHI-J20XE50" complex_deadtime="0" definition="(J40[x1]&amp;10MINDPHI-J20ab-XE50[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J40_x1" triggerthreshold="J40"/>
+        <TriggerCondition multi="1" name="10MINDPHI-J20ab-XE50_x1" triggerthreshold="10MINDPHI-J20ab-XE50"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="253" partition="1" name="L1_J40_DPHI-CJ20XE50" complex_deadtime="0" definition="(J40[x1]&amp;10MINDPHI-CJ20ab-XE50[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J40_x1" triggerthreshold="J40"/>
+        <TriggerCondition multi="1" name="10MINDPHI-CJ20ab-XE50_x1" triggerthreshold="10MINDPHI-CJ20ab-XE50"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="254" partition="1" name="L1_TAU40_2TAU20IM" complex_deadtime="0" definition="(HA40[x1]&amp;HA20IM[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA40_x1" triggerthreshold="HA40"/>
+        <TriggerCondition multi="2" name="HA20IM_x2" triggerthreshold="HA20IM"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="255" partition="1" name="L1_MU10_2J15_J20" complex_deadtime="0" definition="(MU10[x1]&amp;J15[x2]&amp;J20[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU10_x1" triggerthreshold="MU10"/>
+        <TriggerCondition multi="2" name="J15_x2" triggerthreshold="J15"/>
+        <TriggerCondition multi="1" name="J20_x1" triggerthreshold="J20"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="256" partition="1" name="L1_MU11" complex_deadtime="0" definition="(MU11[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU11_x1" triggerthreshold="MU11"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="257" partition="1" name="L1_MU4_J20_XE30_DPHI-J20s2XE30" complex_deadtime="0" definition="(MU4[x1]&amp;J20[x1]&amp;XE30[x1]&amp;10MINDPHI-J20s2-XE30[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU4_x1" triggerthreshold="MU4"/>
+        <TriggerCondition multi="1" name="J20_x1" triggerthreshold="J20"/>
+        <TriggerCondition multi="1" name="XE30_x1" triggerthreshold="XE30"/>
+        <TriggerCondition multi="1" name="10MINDPHI-J20s2-XE30_x1" triggerthreshold="10MINDPHI-J20s2-XE30"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="258" partition="1" name="L1_HT190-J15.ETA21" complex_deadtime="0" definition="(HT190-AJ15all.ETA21[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HT190-AJ15all.ETA21_x1" triggerthreshold="HT190-AJ15all.ETA21"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="259" partition="1" name="L1_HT190-J15s5.ETA21" complex_deadtime="0" definition="(HT190-J15s5.ETA21[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HT190-J15s5.ETA21_x1" triggerthreshold="HT190-J15s5.ETA21"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="260" partition="1" name="L1_HT150-J20.ETA31" complex_deadtime="0" definition="(HT150-AJ20all.ETA31[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HT150-AJ20all.ETA31_x1" triggerthreshold="HT150-AJ20all.ETA31"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="261" partition="1" name="L1_HT150-J20s5.ETA31" complex_deadtime="0" definition="(HT150-J20s5.ETA31[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HT150-J20s5.ETA31_x1" triggerthreshold="HT150-J20s5.ETA31"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="262" partition="1" name="L1_JPSI-1M5" complex_deadtime="0" definition="(1INVM5-EMs1-EMs6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="1INVM5-EMs1-EMs6_x1" triggerthreshold="1INVM5-EMs1-EMs6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="263" partition="1" name="L1_JPSI-1M5-EM7" complex_deadtime="0" definition="(1INVM5-EM7s1-EMs6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="1INVM5-EM7s1-EMs6_x1" triggerthreshold="1INVM5-EM7s1-EMs6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="264" partition="1" name="L1_JPSI-1M5-EM12" complex_deadtime="0" definition="(1INVM5-EM12s1-EMs6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="1INVM5-EM12s1-EMs6_x1" triggerthreshold="1INVM5-EM12s1-EMs6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="265" partition="1" name="L1_KF-XE40" complex_deadtime="0" definition="(KF-XE40-AJall[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="KF-XE40-AJall_x1" triggerthreshold="KF-XE40-AJall"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="266" partition="1" name="L1_KF-XE50" complex_deadtime="0" definition="(KF-XE50-AJall[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="KF-XE50-AJall_x1" triggerthreshold="KF-XE50-AJall"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="267" partition="1" name="L1_KF-XE55" complex_deadtime="0" definition="(KF-XE55-AJall[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="KF-XE55-AJall_x1" triggerthreshold="KF-XE55-AJall"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="268" partition="1" name="L1_KF-XE60" complex_deadtime="0" definition="(KF-XE60-AJall[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="KF-XE60-AJall_x1" triggerthreshold="KF-XE60-AJall"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="269" partition="1" name="L1_KF-XE65" complex_deadtime="0" definition="(KF-XE65-AJall[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="KF-XE65-AJall_x1" triggerthreshold="KF-XE65-AJall"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="270" partition="1" name="L1_KF-XE75" complex_deadtime="0" definition="(KF-XE75-AJall[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="KF-XE75-AJall_x1" triggerthreshold="KF-XE75-AJall"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="271" partition="1" name="L1_2MU4_J20_XE30_DPHI-J20s2XE30" complex_deadtime="0" definition="(MU4[x2]&amp;J20[x1]&amp;XE30[x1]&amp;10MINDPHI-J20s2-XE30[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="2" name="MU4_x2" triggerthreshold="MU4"/>
+        <TriggerCondition multi="1" name="J20_x1" triggerthreshold="J20"/>
+        <TriggerCondition multi="1" name="XE30_x1" triggerthreshold="XE30"/>
+        <TriggerCondition multi="1" name="10MINDPHI-J20s2-XE30_x1" triggerthreshold="10MINDPHI-J20s2-XE30"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="272" partition="1" name="L1_HT150-J20s5.ETA31_MJJ-400" complex_deadtime="0" definition="(HT150-J20s5.ETA31[x1]&amp;400INVM9999-AJ30s6-AJ20s6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HT150-J20s5.ETA31_x1" triggerthreshold="HT150-J20s5.ETA31"/>
+        <TriggerCondition multi="1" name="400INVM9999-AJ30s6-AJ20s6_x1" triggerthreshold="400INVM9999-AJ30s6-AJ20s6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="273" partition="1" name="L1_HT150-J20s5.ETA31_MJJ-400-CF" complex_deadtime="0" definition="(HT150-J20s5.ETA31[x1]&amp;400INVM9999-AJ30s6.ETA31-AJ20s6.31ETA49[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HT150-J20s5.ETA31_x1" triggerthreshold="HT150-J20s5.ETA31"/>
+        <TriggerCondition multi="1" name="400INVM9999-AJ30s6.ETA31-AJ20s6.31ETA49_x1" triggerthreshold="400INVM9999-AJ30s6.ETA31-AJ20s6.31ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="274" partition="1" name="L1_EM15_W-MT35_XS60_W-15DPHI-JXE-0_W-15DPHI-EM15XE" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;XS60[x1]&amp;15MINDPHI-AJj10s6-XE0[x1]&amp;15MINDPHI-EM15s6-XE0[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="35MT-EM15s6-XE0_x1" triggerthreshold="35MT-EM15s6-XE0"/>
+        <TriggerCondition multi="1" name="EM15_x1" triggerthreshold="EM15"/>
+        <TriggerCondition multi="1" name="XS60_x1" triggerthreshold="XS60"/>
+        <TriggerCondition multi="1" name="15MINDPHI-AJj10s6-XE0_x1" triggerthreshold="15MINDPHI-AJj10s6-XE0"/>
+        <TriggerCondition multi="1" name="15MINDPHI-EM15s6-XE0_x1" triggerthreshold="15MINDPHI-EM15s6-XE0"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="275" partition="1" name="L1_EM15_W-MT35_XS60_W-05DPHI-JXE-0_W-05DPHI-EM15XE" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;XS60[x1]&amp;05MINDPHI-AJj10s6-XE0[x1]&amp;05MINDPHI-EM15s6-XE0[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="35MT-EM15s6-XE0_x1" triggerthreshold="35MT-EM15s6-XE0"/>
+        <TriggerCondition multi="1" name="EM15_x1" triggerthreshold="EM15"/>
+        <TriggerCondition multi="1" name="XS60_x1" triggerthreshold="XS60"/>
+        <TriggerCondition multi="1" name="05MINDPHI-AJj10s6-XE0_x1" triggerthreshold="05MINDPHI-AJj10s6-XE0"/>
+        <TriggerCondition multi="1" name="05MINDPHI-EM15s6-XE0_x1" triggerthreshold="05MINDPHI-EM15s6-XE0"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="276" partition="1" name="L1_AFP_A_OR_C" complex_deadtime="0" definition="(((AFP_NSA[x1]&amp;AFP_FSA_SIT[x1])|(AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]))&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <OR>
+          <AND>
+            <TriggerCondition multi="1" name="AFP_NSA_x1" triggerthreshold="AFP_NSA"/>
+            <TriggerCondition multi="1" name="AFP_FSA_SIT_x1" triggerthreshold="AFP_FSA_SIT"/>
+          </AND>
+          <AND>
+            <TriggerCondition multi="1" name="AFP_NSC_x1" triggerthreshold="AFP_NSC"/>
+            <TriggerCondition multi="1" name="AFP_FSC_SIT_x1" triggerthreshold="AFP_FSC_SIT"/>
+          </AND>
+        </OR>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="277" partition="1" name="L1_W-05RO-XEHT-0" complex_deadtime="0" definition="(05RATIO-XE0-HT0-AJj15all.ETA49[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="05RATIO-XE0-HT0-AJj15all.ETA49_x1" triggerthreshold="05RATIO-XE0-HT0-AJj15all.ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="278" partition="1" name="L1_MU10_2J20" complex_deadtime="0" definition="(MU10[x1]&amp;J20[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU10_x1" triggerthreshold="MU10"/>
+        <TriggerCondition multi="2" name="J20_x2" triggerthreshold="J20"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="279" partition="1" name="L1_W-90RO2-XEHT-0" complex_deadtime="0" definition="(90RATIO2-XE0-HT0-AJj15all.ETA49[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="90RATIO2-XE0-HT0-AJj15all.ETA49_x1" triggerthreshold="90RATIO2-XE0-HT0-AJj15all.ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="280" partition="1" name="L1_W-250RO2-XEHT-0" complex_deadtime="0" definition="(250RATIO2-XE0-HT0-AJj15all.ETA49[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="250RATIO2-XE0-HT0-AJj15all.ETA49_x1" triggerthreshold="250RATIO2-XE0-HT0-AJj15all.ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="281" partition="1" name="L1_W-HT20-JJ15.ETA49" complex_deadtime="0" definition="(HT20-AJj15all.ETA49[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HT20-AJj15all.ETA49_x1" triggerthreshold="HT20-AJj15all.ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="282" partition="1" name="L1_W-NOMATCH" complex_deadtime="0" definition="(NOT-02MATCH-EM10s1-AJj15all.ETA49[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="NOT-02MATCH-EM10s1-AJj15all.ETA49_x1" triggerthreshold="NOT-02MATCH-EM10s1-AJj15all.ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="283" partition="1" name="L1_AFP_A" complex_deadtime="0" definition="(AFP_NSA[x1]&amp;AFP_FSA_SIT[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="AFP_NSA_x1" triggerthreshold="AFP_NSA"/>
+        <TriggerCondition multi="1" name="AFP_FSA_SIT_x1" triggerthreshold="AFP_FSA_SIT"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="284" partition="1" name="L1_EM15_W-MT35_XS40_W-15DPHI-JXE-0_W-15DPHI-EM15XE" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;XS40[x1]&amp;15MINDPHI-AJj10s6-XE0[x1]&amp;15MINDPHI-EM15s6-XE0[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="35MT-EM15s6-XE0_x1" triggerthreshold="35MT-EM15s6-XE0"/>
+        <TriggerCondition multi="1" name="EM15_x1" triggerthreshold="EM15"/>
+        <TriggerCondition multi="1" name="XS40_x1" triggerthreshold="XS40"/>
+        <TriggerCondition multi="1" name="15MINDPHI-AJj10s6-XE0_x1" triggerthreshold="15MINDPHI-AJj10s6-XE0"/>
+        <TriggerCondition multi="1" name="15MINDPHI-EM15s6-XE0_x1" triggerthreshold="15MINDPHI-EM15s6-XE0"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="285" partition="1" name="L1_EM15_W-MT35_XS40_W-05DPHI-JXE-0_W-05DPHI-EM15XE" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;XS40[x1]&amp;05MINDPHI-AJj10s6-XE0[x1]&amp;05MINDPHI-EM15s6-XE0[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="35MT-EM15s6-XE0_x1" triggerthreshold="35MT-EM15s6-XE0"/>
+        <TriggerCondition multi="1" name="EM15_x1" triggerthreshold="EM15"/>
+        <TriggerCondition multi="1" name="XS40_x1" triggerthreshold="XS40"/>
+        <TriggerCondition multi="1" name="05MINDPHI-AJj10s6-XE0_x1" triggerthreshold="05MINDPHI-AJj10s6-XE0"/>
+        <TriggerCondition multi="1" name="05MINDPHI-EM15s6-XE0_x1" triggerthreshold="05MINDPHI-EM15s6-XE0"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="286" partition="1" name="L1_EM15_W-MT35" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="35MT-EM15s6-XE0_x1" triggerthreshold="35MT-EM15s6-XE0"/>
+        <TriggerCondition multi="1" name="EM15_x1" triggerthreshold="EM15"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="287" partition="1" name="L1_EM12_W-MT35_XS50" complex_deadtime="0" definition="(35MT-EM12s6-XE0[x1]&amp;EM12[x1]&amp;XS50[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="35MT-EM12s6-XE0_x1" triggerthreshold="35MT-EM12s6-XE0"/>
+        <TriggerCondition multi="1" name="EM12_x1" triggerthreshold="EM12"/>
+        <TriggerCondition multi="1" name="XS50_x1" triggerthreshold="XS50"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="288" partition="1" name="L1_EM15_W-MT35_XS60" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;XS60[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="35MT-EM15s6-XE0_x1" triggerthreshold="35MT-EM15s6-XE0"/>
+        <TriggerCondition multi="1" name="EM15_x1" triggerthreshold="EM15"/>
+        <TriggerCondition multi="1" name="XS60_x1" triggerthreshold="XS60"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="289" partition="1" name="L1_EM10VH_W-MT35_XS50" complex_deadtime="0" definition="(35MT-EM12s6-XE0[x1]&amp;EM10VH[x1]&amp;XS50[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="35MT-EM12s6-XE0_x1" triggerthreshold="35MT-EM12s6-XE0"/>
+        <TriggerCondition multi="1" name="EM10VH_x1" triggerthreshold="EM10VH"/>
+        <TriggerCondition multi="1" name="XS50_x1" triggerthreshold="XS50"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="290" partition="1" name="L1_EM15VH_W-MT35_XS60" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15VH[x1]&amp;XS60[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="35MT-EM15s6-XE0_x1" triggerthreshold="35MT-EM15s6-XE0"/>
+        <TriggerCondition multi="1" name="EM15VH_x1" triggerthreshold="EM15VH"/>
+        <TriggerCondition multi="1" name="XS60_x1" triggerthreshold="XS60"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="291" partition="1" name="L1_EM20VH_W-MT35_XS60" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM20VH[x1]&amp;XS60[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="35MT-EM15s6-XE0_x1" triggerthreshold="35MT-EM15s6-XE0"/>
+        <TriggerCondition multi="1" name="EM20VH_x1" triggerthreshold="EM20VH"/>
+        <TriggerCondition multi="1" name="XS60_x1" triggerthreshold="XS60"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="292" partition="1" name="L1_EM22VHI_W-MT35_XS40" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM22VHI[x1]&amp;XS40[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="35MT-EM15s6-XE0_x1" triggerthreshold="35MT-EM15s6-XE0"/>
+        <TriggerCondition multi="1" name="EM22VHI_x1" triggerthreshold="EM22VHI"/>
+        <TriggerCondition multi="1" name="XS40_x1" triggerthreshold="XS40"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="293" partition="1" name="L1_EM12_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE_W-90RO2-XEHT-0" complex_deadtime="0" definition="(25MT-EM12s6-XE0[x1]&amp;EM12[x1]&amp;15MINDPHI-AJj10s6-XE0[x1]&amp;15MINDPHI-EM12s6-XE0[x1]&amp;90RATIO2-XE0-HT0-AJj15all.ETA49[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="25MT-EM12s6-XE0_x1" triggerthreshold="25MT-EM12s6-XE0"/>
+        <TriggerCondition multi="1" name="EM12_x1" triggerthreshold="EM12"/>
+        <TriggerCondition multi="1" name="15MINDPHI-AJj10s6-XE0_x1" triggerthreshold="15MINDPHI-AJj10s6-XE0"/>
+        <TriggerCondition multi="1" name="15MINDPHI-EM12s6-XE0_x1" triggerthreshold="15MINDPHI-EM12s6-XE0"/>
+        <TriggerCondition multi="1" name="90RATIO2-XE0-HT0-AJj15all.ETA49_x1" triggerthreshold="90RATIO2-XE0-HT0-AJj15all.ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="294" partition="1" name="L1_EM12_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE_XS20" complex_deadtime="0" definition="(25MT-EM12s6-XE0[x1]&amp;EM12[x1]&amp;15MINDPHI-AJj10s6-XE0[x1]&amp;15MINDPHI-EM12s6-XE0[x1]&amp;XS20[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="25MT-EM12s6-XE0_x1" triggerthreshold="25MT-EM12s6-XE0"/>
+        <TriggerCondition multi="1" name="EM12_x1" triggerthreshold="EM12"/>
+        <TriggerCondition multi="1" name="15MINDPHI-AJj10s6-XE0_x1" triggerthreshold="15MINDPHI-AJj10s6-XE0"/>
+        <TriggerCondition multi="1" name="15MINDPHI-EM12s6-XE0_x1" triggerthreshold="15MINDPHI-EM12s6-XE0"/>
+        <TriggerCondition multi="1" name="XS20_x1" triggerthreshold="XS20"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="295" partition="1" name="L1_EM22VHIM" complex_deadtime="0" definition="(EM22VHIM[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM22VHIM_x1" triggerthreshold="EM22VHIM"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="296" partition="1" name="L1_BPH-2M8-2MU4_BPH-0DR15-2MU4" complex_deadtime="0" definition="(2INVM8-2MU4ab[x1]&amp;0DR15-2MU4ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="2INVM8-2MU4ab_x1" triggerthreshold="2INVM8-2MU4ab"/>
+        <TriggerCondition multi="1" name="0DR15-2MU4ab_x1" triggerthreshold="0DR15-2MU4ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="297" partition="1" name="L1_BPH-7M15-2MU4_BPH-0DR24-2MU4" complex_deadtime="0" definition="(7INVM15-2MU4ab[x1]&amp;0DR24-2MU4ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="7INVM15-2MU4ab_x1" triggerthreshold="7INVM15-2MU4ab"/>
+        <TriggerCondition multi="1" name="0DR24-2MU4ab_x1" triggerthreshold="0DR24-2MU4ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="298" partition="1" name="L1_BPH-2M8-MU6MU4_BPH-0DR15-MU6MU4" complex_deadtime="0" definition="(2INVM8-MU6ab-MU4ab[x1]&amp;0DR15-MU6ab-MU4ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="2INVM8-MU6ab-MU4ab_x1" triggerthreshold="2INVM8-MU6ab-MU4ab"/>
+        <TriggerCondition multi="1" name="0DR15-MU6ab-MU4ab_x1" triggerthreshold="0DR15-MU6ab-MU4ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="299" partition="1" name="L1_BPH-8M15-MU6MU4_BPH-0DR22-MU6MU4" complex_deadtime="0" definition="(8INVM15-MU6ab-MU4ab[x1]&amp;0DR22-MU6ab-MU4ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="8INVM15-MU6ab-MU4ab_x1" triggerthreshold="8INVM15-MU6ab-MU4ab"/>
+        <TriggerCondition multi="1" name="0DR22-MU6ab-MU4ab_x1" triggerthreshold="0DR22-MU6ab-MU4ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="300" partition="1" name="L1_BPH-2M9-2MU6_BPH-2DR15-2MU6" complex_deadtime="0" definition="(2INVM9-2MU6ab[x1]&amp;2DR15-2MU6ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="2INVM9-2MU6ab_x1" triggerthreshold="2INVM9-2MU6ab"/>
+        <TriggerCondition multi="1" name="2DR15-2MU6ab_x1" triggerthreshold="2DR15-2MU6ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="301" partition="1" name="L1_BPH-8M15-2MU6_BPH-0DR22-2MU6" complex_deadtime="0" definition="(8INVM15-2MU6ab[x1]&amp;0DR22-2MU6ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="8INVM15-2MU6ab_x1" triggerthreshold="8INVM15-2MU6ab"/>
+        <TriggerCondition multi="1" name="0DR22-2MU6ab_x1" triggerthreshold="0DR22-2MU6ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="302" partition="1" name="L1_MU6MU4-BO" complex_deadtime="0" definition="(MULT-CMU4ab[x2]&amp;MULT-CMU6ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="2" name="MULT-CMU4ab_x2" triggerthreshold="MULT-CMU4ab"/>
+        <TriggerCondition multi="1" name="MULT-CMU6ab_x1" triggerthreshold="MULT-CMU6ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="303" partition="1" name="L1_2MU4-B" complex_deadtime="0" definition="(MU4[x2]&amp;MULT-CMU4ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="2" name="MU4_x2" triggerthreshold="MU4"/>
+        <TriggerCondition multi="1" name="MULT-CMU4ab_x1" triggerthreshold="MULT-CMU4ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="304" partition="1" name="L1_2MU6-B" complex_deadtime="0" definition="(MU6[x2]&amp;MULT-CMU6ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="2" name="MU6_x2" triggerthreshold="MU6"/>
+        <TriggerCondition multi="1" name="MULT-CMU6ab_x1" triggerthreshold="MULT-CMU6ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="305" partition="1" name="L1_J15.0ETA25_2J15.31ETA49" complex_deadtime="0" definition="(J15.0ETA25[x1]&amp;J15.31ETA49[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J15.0ETA25_x1" triggerthreshold="J15.0ETA25"/>
+        <TriggerCondition multi="2" name="J15.31ETA49_x2" triggerthreshold="J15.31ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="306" partition="1" name="L1_BPH-2M8-2MU4-B_BPH-0DR15-2MU4" complex_deadtime="0" definition="(2INVM8-CMU4ab-MU4ab[x1]&amp;0DR15-2MU4ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="2INVM8-CMU4ab-MU4ab_x1" triggerthreshold="2INVM8-CMU4ab-MU4ab"/>
+        <TriggerCondition multi="1" name="0DR15-2MU4ab_x1" triggerthreshold="0DR15-2MU4ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="307" partition="1" name="L1_BPH-7M15-2MU4_BPH-0DR24-2MU4-B" complex_deadtime="0" definition="(7INVM15-2MU4ab[x1]&amp;0DR24-2MU4ab[x1]&amp;MULT-CMU4ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="7INVM15-2MU4ab_x1" triggerthreshold="7INVM15-2MU4ab"/>
+        <TriggerCondition multi="1" name="0DR24-2MU4ab_x1" triggerthreshold="0DR24-2MU4ab"/>
+        <TriggerCondition multi="1" name="MULT-CMU4ab_x1" triggerthreshold="MULT-CMU4ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="308" partition="1" name="L1_AFP_C" complex_deadtime="0" definition="(AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="AFP_NSC_x1" triggerthreshold="AFP_NSC"/>
+        <TriggerCondition multi="1" name="AFP_FSC_SIT_x1" triggerthreshold="AFP_FSC_SIT"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="309" partition="1" name="L1_AFP_A_AND_C_MBTS_2" complex_deadtime="0" definition="(AFP_NSA[x1]&amp;AFP_FSA_SIT[x1]&amp;AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]&amp;(MBTS_A[x2]|MBTS_C[x2]|MBTS_A[x1])&amp;(MBTS_A[x2]|MBTS_C[x2]|MBTS_C[x1])&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="AFP_NSA_x1" triggerthreshold="AFP_NSA"/>
+        <TriggerCondition multi="1" name="AFP_FSA_SIT_x1" triggerthreshold="AFP_FSA_SIT"/>
+        <TriggerCondition multi="1" name="AFP_NSC_x1" triggerthreshold="AFP_NSC"/>
+        <TriggerCondition multi="1" name="AFP_FSC_SIT_x1" triggerthreshold="AFP_FSC_SIT"/>
+        <OR>
+          <TriggerCondition multi="2" name="MBTS_A_x2" triggerthreshold="MBTS_A"/>
+          <TriggerCondition multi="2" name="MBTS_C_x2" triggerthreshold="MBTS_C"/>
+          <TriggerCondition multi="1" name="MBTS_A_x1" triggerthreshold="MBTS_A"/>
+        </OR>
+        <OR>
+          <TriggerCondition multi="2" name="MBTS_A_x2" triggerthreshold="MBTS_A"/>
+          <TriggerCondition multi="2" name="MBTS_C_x2" triggerthreshold="MBTS_C"/>
+          <TriggerCondition multi="1" name="MBTS_C_x1" triggerthreshold="MBTS_C"/>
+        </OR>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="310" partition="1" name="L1_BPH-7M15-2MU4_BPH-0DR24-2MU4-BO" complex_deadtime="0" definition="(7INVM15-2MU4ab[x1]&amp;0DR24-2CMU4ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="7INVM15-2MU4ab_x1" triggerthreshold="7INVM15-2MU4ab"/>
+        <TriggerCondition multi="1" name="0DR24-2CMU4ab_x1" triggerthreshold="0DR24-2CMU4ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="311" partition="1" name="L1_BPH-2M8-MU6MU4-B_BPH-0DR15-MU6MU4" complex_deadtime="0" definition="(2INVM8-ONEBARREL-MU6ab-MU4ab[x1]&amp;0DR15-MU6ab-MU4ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="2INVM8-ONEBARREL-MU6ab-MU4ab_x1" triggerthreshold="2INVM8-ONEBARREL-MU6ab-MU4ab"/>
+        <TriggerCondition multi="1" name="0DR15-MU6ab-MU4ab_x1" triggerthreshold="0DR15-MU6ab-MU4ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="312" partition="1" name="L1_2MU4-BO" complex_deadtime="0" definition="(MULT-CMU4ab[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="2" name="MULT-CMU4ab_x2" triggerthreshold="MULT-CMU4ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="313" partition="1" name="L1_2MU6-BO" complex_deadtime="0" definition="(MULT-CMU6ab[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="2" name="MULT-CMU6ab_x2" triggerthreshold="MULT-CMU6ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="314" partition="1" name="L1_MU6_2MU4-B" complex_deadtime="0" definition="(MU6[x1]&amp;MU4[x2]&amp;MULT-CMU4ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU6_x1" triggerthreshold="MU6"/>
+        <TriggerCondition multi="2" name="MU4_x2" triggerthreshold="MU4"/>
+        <TriggerCondition multi="1" name="MULT-CMU4ab_x1" triggerthreshold="MULT-CMU4ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="315" partition="1" name="L1_DY-DR-2MU4" complex_deadtime="0" definition="(2DR99-2MU4ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="2DR99-2MU4ab_x1" triggerthreshold="2DR99-2MU4ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="316" partition="1" name="L1_EM15VH_2EM8VH_MU6" complex_deadtime="0" definition="(EM15VH[x1]&amp;EM8VH[x2]&amp;MU6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM15VH_x1" triggerthreshold="EM15VH"/>
+        <TriggerCondition multi="2" name="EM8VH_x2" triggerthreshold="EM8VH"/>
+        <TriggerCondition multi="1" name="MU6_x1" triggerthreshold="MU6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="317" partition="1" name="L1_AFP_A_OR_C_MBTS_2" complex_deadtime="0" definition="(((AFP_NSA[x1]&amp;AFP_FSA_SIT[x1])|(AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]))&amp;(MBTS_A[x2]|MBTS_C[x2]|MBTS_A[x1])&amp;(MBTS_A[x2]|MBTS_C[x2]|MBTS_C[x1])&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <OR>
+          <AND>
+            <TriggerCondition multi="1" name="AFP_NSA_x1" triggerthreshold="AFP_NSA"/>
+            <TriggerCondition multi="1" name="AFP_FSA_SIT_x1" triggerthreshold="AFP_FSA_SIT"/>
+          </AND>
+          <AND>
+            <TriggerCondition multi="1" name="AFP_NSC_x1" triggerthreshold="AFP_NSC"/>
+            <TriggerCondition multi="1" name="AFP_FSC_SIT_x1" triggerthreshold="AFP_FSC_SIT"/>
+          </AND>
+        </OR>
+        <OR>
+          <TriggerCondition multi="2" name="MBTS_A_x2" triggerthreshold="MBTS_A"/>
+          <TriggerCondition multi="2" name="MBTS_C_x2" triggerthreshold="MBTS_C"/>
+          <TriggerCondition multi="1" name="MBTS_A_x1" triggerthreshold="MBTS_A"/>
+        </OR>
+        <OR>
+          <TriggerCondition multi="2" name="MBTS_A_x2" triggerthreshold="MBTS_A"/>
+          <TriggerCondition multi="2" name="MBTS_C_x2" triggerthreshold="MBTS_C"/>
+          <TriggerCondition multi="1" name="MBTS_C_x1" triggerthreshold="MBTS_C"/>
+        </OR>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="318" partition="1" name="L1_DY-BOX-2MU6" complex_deadtime="0" definition="(5DETA99-5DPHI99-2MU6ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="5DETA99-5DPHI99-2MU6ab_x1" triggerthreshold="5DETA99-5DPHI99-2MU6ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="319" partition="1" name="L1_LFV-MU" complex_deadtime="0" definition="(0DR10-MU10ab-MU6ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="0DR10-MU10ab-MU6ab_x1" triggerthreshold="0DR10-MU10ab-MU6ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="320" partition="1" name="L1_LFV-EM8I" complex_deadtime="0" definition="(0DETA04-EM8abi-MU10ab[x1]&amp;0DPHI03-EM8abi-MU10ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="0DETA04-EM8abi-MU10ab_x1" triggerthreshold="0DETA04-EM8abi-MU10ab"/>
+        <TriggerCondition multi="1" name="0DPHI03-EM8abi-MU10ab_x1" triggerthreshold="0DPHI03-EM8abi-MU10ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="321" partition="1" name="L1_LFV-EM15I" complex_deadtime="0" definition="(0DETA04-EM15abi-MUab[x1]&amp;0DPHI03-EM15abi-MUab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="0DETA04-EM15abi-MUab_x1" triggerthreshold="0DETA04-EM15abi-MUab"/>
+        <TriggerCondition multi="1" name="0DPHI03-EM15abi-MUab_x1" triggerthreshold="0DPHI03-EM15abi-MUab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="322" partition="1" name="L1_EM12_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE" complex_deadtime="0" definition="(25MT-EM12s6-XE0[x1]&amp;EM12[x1]&amp;15MINDPHI-AJj10s6-XE0[x1]&amp;15MINDPHI-EM12s6-XE0[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="25MT-EM12s6-XE0_x1" triggerthreshold="25MT-EM12s6-XE0"/>
+        <TriggerCondition multi="1" name="EM12_x1" triggerthreshold="EM12"/>
+        <TriggerCondition multi="1" name="15MINDPHI-AJj10s6-XE0_x1" triggerthreshold="15MINDPHI-AJj10s6-XE0"/>
+        <TriggerCondition multi="1" name="15MINDPHI-EM12s6-XE0_x1" triggerthreshold="15MINDPHI-EM12s6-XE0"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="323" partition="1" name="L1_DPHI-J20s2XE50" complex_deadtime="0" definition="(10MINDPHI-J20s2-XE50[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="10MINDPHI-J20s2-XE50_x1" triggerthreshold="10MINDPHI-J20s2-XE50"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="324" partition="1" name="L1_DPHI-J20XE50" complex_deadtime="0" definition="(10MINDPHI-J20ab-XE50[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="10MINDPHI-J20ab-XE50_x1" triggerthreshold="10MINDPHI-J20ab-XE50"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="325" partition="1" name="L1_DPHI-CJ20XE50" complex_deadtime="0" definition="(10MINDPHI-CJ20ab-XE50[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="10MINDPHI-CJ20ab-XE50_x1" triggerthreshold="10MINDPHI-CJ20ab-XE50"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="326" partition="1" name="L1_MJJ-900" complex_deadtime="0" definition="(900INVM9999-AJ30s6-AJ20s6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="900INVM9999-AJ30s6-AJ20s6_x1" triggerthreshold="900INVM9999-AJ30s6-AJ20s6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="327" partition="1" name="L1_MJJ-800" complex_deadtime="0" definition="(800INVM9999-AJ30s6-AJ20s6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="800INVM9999-AJ30s6-AJ20s6_x1" triggerthreshold="800INVM9999-AJ30s6-AJ20s6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="328" partition="1" name="L1_MJJ-700" complex_deadtime="0" definition="(700INVM9999-AJ30s6-AJ20s6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="700INVM9999-AJ30s6-AJ20s6_x1" triggerthreshold="700INVM9999-AJ30s6-AJ20s6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="329" partition="1" name="L1_MJJ-400" complex_deadtime="0" definition="(400INVM9999-AJ30s6-AJ20s6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="400INVM9999-AJ30s6-AJ20s6_x1" triggerthreshold="400INVM9999-AJ30s6-AJ20s6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="330" partition="1" name="L1_MU4_J50_XE40" complex_deadtime="0" definition="(MU4[x1]&amp;J50[x1]&amp;XE40[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU4_x1" triggerthreshold="MU4"/>
+        <TriggerCondition multi="1" name="J50_x1" triggerthreshold="J50"/>
+        <TriggerCondition multi="1" name="XE40_x1" triggerthreshold="XE40"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="331" partition="1" name="L1_2MU4_J40_XE20" complex_deadtime="0" definition="(MU4[x2]&amp;J40[x1]&amp;XE20[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="2" name="MU4_x2" triggerthreshold="MU4"/>
+        <TriggerCondition multi="1" name="J40_x1" triggerthreshold="J40"/>
+        <TriggerCondition multi="1" name="XE20_x1" triggerthreshold="XE20"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="332" partition="1" name="L1_LFV-MU6" complex_deadtime="0" definition="(0DR15-2MU6ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="0DR15-2MU6ab_x1" triggerthreshold="0DR15-2MU6ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="333" partition="1" name="L1_MJJ-100" complex_deadtime="0" definition="(100INVM9999-AJ30s6-AJ20s6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="100INVM9999-AJ30s6-AJ20s6_x1" triggerthreshold="100INVM9999-AJ30s6-AJ20s6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="334" partition="1" name="L1_HT150-JJ15.ETA49" complex_deadtime="0" definition="(HT150-AJj15all.ETA49[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HT150-AJj15all.ETA49_x1" triggerthreshold="HT150-AJj15all.ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="335" partition="1" name="L1_J25.0ETA23_2J15.31ETA49" complex_deadtime="0" definition="(J25.0ETA23[x1]&amp;J15.31ETA49[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J25.0ETA23_x1" triggerthreshold="J25.0ETA23"/>
+        <TriggerCondition multi="2" name="J15.31ETA49_x2" triggerthreshold="J15.31ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="336" partition="1" name="L1_J4-MATCH" complex_deadtime="0" definition="(0MATCH-4AJ20.ETA31-4AJj15.ETA31[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="0MATCH-4AJ20.ETA31-4AJj15.ETA31_x1" triggerthreshold="0MATCH-4AJ20.ETA31-4AJj15.ETA31"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="337" partition="1" name="L1_DR25-TAU20ITAU12I" complex_deadtime="0" definition="(0DR25-TAU20abi-TAU12abi[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="0DR25-TAU20abi-TAU12abi_x1" triggerthreshold="0DR25-TAU20abi-TAU12abi"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="338" partition="1" name="L1_LLP-RO" complex_deadtime="0" definition="(100RATIO-0MATCH-TAU30si2-EMall[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="100RATIO-0MATCH-TAU30si2-EMall_x1" triggerthreshold="100RATIO-0MATCH-TAU30si2-EMall"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="339" partition="1" name="L1_LLP-NOMATCH" complex_deadtime="0" definition="(NOT-0MATCH-TAU30si2-EMall[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="NOT-0MATCH-TAU30si2-EMall_x1" triggerthreshold="NOT-0MATCH-TAU30si2-EMall"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="340" partition="1" name="L1_DR-MU10TAU12I" complex_deadtime="0" definition="(0DR28-MU10ab-TAU12abi[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="0DR28-MU10ab-TAU12abi_x1" triggerthreshold="0DR28-MU10ab-TAU12abi"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="341" partition="1" name="L1_TAU30_EMPTY" complex_deadtime="0" definition="(HA30[x1]&amp;BGRP0&amp;BGRP3)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA30_x1" triggerthreshold="HA30"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP3"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="342" partition="1" name="L1_2EM15VHI" complex_deadtime="0" definition="(EM15VHI[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="2" name="EM15VHI_x2" triggerthreshold="EM15VHI"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="343" partition="1" name="L1_TAU30_UNPAIRED_ISO" complex_deadtime="0" definition="(HA30[x1]&amp;BGRP0&amp;BGRP4)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA30_x1" triggerthreshold="HA30"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP4"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="344" partition="1" name="L1_EM15_W-MT35_W-05DPHI-JXE-0_W-05DPHI-EM15XE_XS30" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;05MINDPHI-AJj10s6-XE0[x1]&amp;05MINDPHI-EM15s6-XE0[x1]&amp;XS30[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="35MT-EM15s6-XE0_x1" triggerthreshold="35MT-EM15s6-XE0"/>
+        <TriggerCondition multi="1" name="EM15_x1" triggerthreshold="EM15"/>
+        <TriggerCondition multi="1" name="05MINDPHI-AJj10s6-XE0_x1" triggerthreshold="05MINDPHI-AJj10s6-XE0"/>
+        <TriggerCondition multi="1" name="05MINDPHI-EM15s6-XE0_x1" triggerthreshold="05MINDPHI-EM15s6-XE0"/>
+        <TriggerCondition multi="1" name="XS30_x1" triggerthreshold="XS30"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="345" partition="1" name="L1_EM15TAU12I-J25" complex_deadtime="0" definition="(1DISAMB-EM15his2-TAU12abi-J25ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="1DISAMB-EM15his2-TAU12abi-J25ab_x1" triggerthreshold="1DISAMB-EM15his2-TAU12abi-J25ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="346" partition="1" name="L1_DR-EM15TAU12I-J25" complex_deadtime="0" definition="(1DISAMB-J25ab-0DR28-EM15his2-TAU12abi[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="1DISAMB-J25ab-0DR28-EM15his2-TAU12abi_x1" triggerthreshold="1DISAMB-J25ab-0DR28-EM15his2-TAU12abi"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="347" partition="1" name="L1_TAU20ITAU12I-J25" complex_deadtime="0" definition="(1DISAMB-TAU20abi-TAU12abi-J25ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="1DISAMB-TAU20abi-TAU12abi-J25ab_x1" triggerthreshold="1DISAMB-TAU20abi-TAU12abi-J25ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="348" partition="1" name="L1_DR-TAU20ITAU12I" complex_deadtime="0" definition="(0DR28-TAU20abi-TAU12abi[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="0DR28-TAU20abi-TAU12abi_x1" triggerthreshold="0DR28-TAU20abi-TAU12abi"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="349" partition="1" name="L1_BOX-TAU20ITAU12I" complex_deadtime="0" definition="(0DETA20-0DPHI20-TAU20abi-TAU12abi[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="0DETA20-0DPHI20-TAU20abi-TAU12abi_x1" triggerthreshold="0DETA20-0DPHI20-TAU20abi-TAU12abi"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="350" partition="1" name="L1_DR-TAU20ITAU12I-J25" complex_deadtime="0" definition="(1DISAMB-J25ab-0DR28-TAU20abi-TAU12abi[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="1DISAMB-J25ab-0DR28-TAU20abi-TAU12abi_x1" triggerthreshold="1DISAMB-J25ab-0DR28-TAU20abi-TAU12abi"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="351" partition="1" name="L1_LAR-EM" complex_deadtime="0" definition="(LAR-EM50s1[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10010000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="LAR-EM50s1_x1" triggerthreshold="LAR-EM50s1"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="352" partition="1" name="L1_LAR-J" complex_deadtime="0" definition="(LAR-J100s1[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10010000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="LAR-J100s1_x1" triggerthreshold="LAR-J100s1"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="353" partition="1" name="L1_DR-EM15TAU12I" complex_deadtime="0" definition="(DISAMB-0DR28-EM15his2-TAU12abi[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="DISAMB-0DR28-EM15his2-TAU12abi_x1" triggerthreshold="DISAMB-0DR28-EM15his2-TAU12abi"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="354" partition="1" name="L1_LATE-MU10_XE50" complex_deadtime="0" definition="(LATE-MU10s1[x1]&amp;XE50[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="LATE-MU10s1_x1" triggerthreshold="LATE-MU10s1"/>
+        <TriggerCondition multi="1" name="XE50_x1" triggerthreshold="XE50"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="355" partition="1" name="L1_LATE-MU10_J50" complex_deadtime="0" definition="(LATE-MU10s1[x1]&amp;J50[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="LATE-MU10s1_x1" triggerthreshold="LATE-MU10s1"/>
+        <TriggerCondition multi="1" name="J50_x1" triggerthreshold="J50"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="356" partition="1" name="L1_SC111-CJ15" complex_deadtime="0" definition="(SC111-CJ15ab.ETA26[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="SC111-CJ15ab.ETA26_x1" triggerthreshold="SC111-CJ15ab.ETA26"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="357" partition="1" name="L1_SC85-CJ15" complex_deadtime="0" definition="(SC85-CJ15ab.ETA26[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="SC85-CJ15ab.ETA26_x1" triggerthreshold="SC85-CJ15ab.ETA26"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="358" partition="1" name="L1_MU6_MJJ-200" complex_deadtime="0" definition="(MU6[x1]&amp;200INVM9999-AJ30s6-AJ20s6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU6_x1" triggerthreshold="MU6"/>
+        <TriggerCondition multi="1" name="200INVM9999-AJ30s6-AJ20s6_x1" triggerthreshold="200INVM9999-AJ30s6-AJ20s6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="359" partition="1" name="L1_MU6_MJJ-300" complex_deadtime="0" definition="(MU6[x1]&amp;300INVM9999-AJ30s6-AJ20s6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU6_x1" triggerthreshold="MU6"/>
+        <TriggerCondition multi="1" name="300INVM9999-AJ30s6-AJ20s6_x1" triggerthreshold="300INVM9999-AJ30s6-AJ20s6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="360" partition="1" name="L1_MU6_MJJ-400" complex_deadtime="0" definition="(MU6[x1]&amp;400INVM9999-AJ30s6-AJ20s6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU6_x1" triggerthreshold="MU6"/>
+        <TriggerCondition multi="1" name="400INVM9999-AJ30s6-AJ20s6_x1" triggerthreshold="400INVM9999-AJ30s6-AJ20s6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="361" partition="1" name="L1_MU6_MJJ-500" complex_deadtime="0" definition="(MU6[x1]&amp;500INVM9999-AJ30s6-AJ20s6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU6_x1" triggerthreshold="MU6"/>
+        <TriggerCondition multi="1" name="500INVM9999-AJ30s6-AJ20s6_x1" triggerthreshold="500INVM9999-AJ30s6-AJ20s6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="362" partition="1" name="L1_J30_2J20_4J20.0ETA49_MJJ-400" complex_deadtime="0" definition="(J30[x1]&amp;J20[x2]&amp;J20.0ETA49[x4]&amp;400INVM9999-AJ30s6-AJ20s6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J30_x1" triggerthreshold="J30"/>
+        <TriggerCondition multi="2" name="J20_x2" triggerthreshold="J20"/>
+        <TriggerCondition multi="4" name="J20.0ETA49_x4" triggerthreshold="J20.0ETA49"/>
+        <TriggerCondition multi="1" name="400INVM9999-AJ30s6-AJ20s6_x1" triggerthreshold="400INVM9999-AJ30s6-AJ20s6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="363" partition="1" name="L1_J30_2J20_4J20.0ETA49_MJJ-700" complex_deadtime="0" definition="(J30[x1]&amp;J20[x2]&amp;J20.0ETA49[x4]&amp;700INVM9999-AJ30s6-AJ20s6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J30_x1" triggerthreshold="J30"/>
+        <TriggerCondition multi="2" name="J20_x2" triggerthreshold="J20"/>
+        <TriggerCondition multi="4" name="J20.0ETA49_x4" triggerthreshold="J20.0ETA49"/>
+        <TriggerCondition multi="1" name="700INVM9999-AJ30s6-AJ20s6_x1" triggerthreshold="700INVM9999-AJ30s6-AJ20s6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="364" partition="1" name="L1_J30_2J20_4J20.0ETA49_MJJ-800" complex_deadtime="0" definition="(J30[x1]&amp;J20[x2]&amp;J20.0ETA49[x4]&amp;800INVM9999-AJ30s6-AJ20s6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J30_x1" triggerthreshold="J30"/>
+        <TriggerCondition multi="2" name="J20_x2" triggerthreshold="J20"/>
+        <TriggerCondition multi="4" name="J20.0ETA49_x4" triggerthreshold="J20.0ETA49"/>
+        <TriggerCondition multi="1" name="800INVM9999-AJ30s6-AJ20s6_x1" triggerthreshold="800INVM9999-AJ30s6-AJ20s6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="365" partition="1" name="L1_J30_2J20_4J20.0ETA49_MJJ-900" complex_deadtime="0" definition="(J30[x1]&amp;J20[x2]&amp;J20.0ETA49[x4]&amp;900INVM9999-AJ30s6-AJ20s6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J30_x1" triggerthreshold="J30"/>
+        <TriggerCondition multi="2" name="J20_x2" triggerthreshold="J20"/>
+        <TriggerCondition multi="4" name="J20.0ETA49_x4" triggerthreshold="J20.0ETA49"/>
+        <TriggerCondition multi="1" name="900INVM9999-AJ30s6-AJ20s6_x1" triggerthreshold="900INVM9999-AJ30s6-AJ20s6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="366" partition="1" name="L1_3J20_4J20.0ETA49_MJJ-400" complex_deadtime="0" definition="(J20[x3]&amp;J20.0ETA49[x4]&amp;400INVM9999-AJ30s6-AJ20s6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="3" name="J20_x3" triggerthreshold="J20"/>
+        <TriggerCondition multi="4" name="J20.0ETA49_x4" triggerthreshold="J20.0ETA49"/>
+        <TriggerCondition multi="1" name="400INVM9999-AJ30s6-AJ20s6_x1" triggerthreshold="400INVM9999-AJ30s6-AJ20s6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="367" partition="1" name="L1_3J20_4J20.0ETA49_MJJ-700" complex_deadtime="0" definition="(J20[x3]&amp;J20.0ETA49[x4]&amp;700INVM9999-AJ30s6-AJ20s6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="3" name="J20_x3" triggerthreshold="J20"/>
+        <TriggerCondition multi="4" name="J20.0ETA49_x4" triggerthreshold="J20.0ETA49"/>
+        <TriggerCondition multi="1" name="700INVM9999-AJ30s6-AJ20s6_x1" triggerthreshold="700INVM9999-AJ30s6-AJ20s6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="368" partition="1" name="L1_3J20_4J20.0ETA49_MJJ-800" complex_deadtime="0" definition="(J20[x3]&amp;J20.0ETA49[x4]&amp;800INVM9999-AJ30s6-AJ20s6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="3" name="J20_x3" triggerthreshold="J20"/>
+        <TriggerCondition multi="4" name="J20.0ETA49_x4" triggerthreshold="J20.0ETA49"/>
+        <TriggerCondition multi="1" name="800INVM9999-AJ30s6-AJ20s6_x1" triggerthreshold="800INVM9999-AJ30s6-AJ20s6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="369" partition="1" name="L1_3J20_4J20.0ETA49_MJJ-900" complex_deadtime="0" definition="(J20[x3]&amp;J20.0ETA49[x4]&amp;900INVM9999-AJ30s6-AJ20s6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="3" name="J20_x3" triggerthreshold="J20"/>
+        <TriggerCondition multi="4" name="J20.0ETA49_x4" triggerthreshold="J20.0ETA49"/>
+        <TriggerCondition multi="1" name="900INVM9999-AJ30s6-AJ20s6_x1" triggerthreshold="900INVM9999-AJ30s6-AJ20s6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="370" partition="1" name="L1_XE35_MJJ-200" complex_deadtime="0" definition="(XE35[x1]&amp;200INVM9999-AJ30s6-AJ20s6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="XE35_x1" triggerthreshold="XE35"/>
+        <TriggerCondition multi="1" name="200INVM9999-AJ30s6-AJ20s6_x1" triggerthreshold="200INVM9999-AJ30s6-AJ20s6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="371" partition="1" name="L1_EM7_FIRSTEMPTY" complex_deadtime="0" definition="(EM7[x1]&amp;BGRP0&amp;BGRP6)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM7_x1" triggerthreshold="EM7"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP6"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="372" partition="1" name="L1_RD0_ABORTGAPNOTCALIB" complex_deadtime="0" definition="(RNDM0&amp;BGRP0&amp;BGRP8)" trigger_type="10000001" monitor="LF:000|HF:000">
+      <AND>
+        <InternalTrigger name="RNDM0"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP8"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="373" partition="1" name="L1_3J25.0ETA23" complex_deadtime="0" definition="(J25.0ETA23[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="3" name="J25.0ETA23_x3" triggerthreshold="J25.0ETA23"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="374" partition="1" name="L1_TE20" complex_deadtime="0" definition="(TE20[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="TE20_x1" triggerthreshold="TE20"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="375" partition="1" name="L1_TE10.0ETA24" complex_deadtime="0" definition="(TE10.0ETA24[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="TE10.0ETA24_x1" triggerthreshold="TE10.0ETA24"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="376" partition="1" name="L1_TE20.0ETA24" complex_deadtime="0" definition="(TE20.0ETA24[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="TE20.0ETA24_x1" triggerthreshold="TE20.0ETA24"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="377" partition="1" name="L1_MU10_TAU20IM_J25_2J20" complex_deadtime="0" definition="(MU10[x1]&amp;HA20IM[x1]&amp;J25[x1]&amp;J20[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU10_x1" triggerthreshold="MU10"/>
+        <TriggerCondition multi="1" name="HA20IM_x1" triggerthreshold="HA20IM"/>
+        <TriggerCondition multi="1" name="J25_x1" triggerthreshold="J25"/>
+        <TriggerCondition multi="2" name="J20_x2" triggerthreshold="J20"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="378" partition="1" name="L1_EM15VHI_TAU20IM_2TAU15_J25_2J20_3J15" complex_deadtime="0" definition="(EM15VHI[x1]&amp;HA20IM[x1]&amp;HA15[x2]&amp;J25[x1]&amp;J20[x2]&amp;J15[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM15VHI_x1" triggerthreshold="EM15VHI"/>
+        <TriggerCondition multi="1" name="HA20IM_x1" triggerthreshold="HA20IM"/>
+        <TriggerCondition multi="2" name="HA15_x2" triggerthreshold="HA15"/>
+        <TriggerCondition multi="1" name="J25_x1" triggerthreshold="J25"/>
+        <TriggerCondition multi="2" name="J20_x2" triggerthreshold="J20"/>
+        <TriggerCondition multi="3" name="J15_x3" triggerthreshold="J15"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="379" partition="1" name="L1_AFP_A_AND_C_J12" complex_deadtime="0" definition="(AFP_NSA[x1]&amp;AFP_FSA_SIT[x1]&amp;AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]&amp;J12[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="AFP_NSA_x1" triggerthreshold="AFP_NSA"/>
+        <TriggerCondition multi="1" name="AFP_FSA_SIT_x1" triggerthreshold="AFP_FSA_SIT"/>
+        <TriggerCondition multi="1" name="AFP_NSC_x1" triggerthreshold="AFP_NSC"/>
+        <TriggerCondition multi="1" name="AFP_FSC_SIT_x1" triggerthreshold="AFP_FSC_SIT"/>
+        <TriggerCondition multi="1" name="J12_x1" triggerthreshold="J12"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="380" partition="1" name="L1_J12_BGRP12" complex_deadtime="0" definition="(J12[x1]&amp;BGRP0&amp;BGRP12)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J12_x1" triggerthreshold="J12"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP12"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="381" partition="1" name="L1_J30.31ETA49_BGRP12" complex_deadtime="0" definition="(J30.31ETA49[x1]&amp;BGRP0&amp;BGRP12)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J30.31ETA49_x1" triggerthreshold="J30.31ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP12"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="382" partition="1" name="L1_MU6_J30.0ETA49_2J20.0ETA49" complex_deadtime="0" definition="(MU6[x1]&amp;J30.0ETA49[x1]&amp;J20.0ETA49[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU6_x1" triggerthreshold="MU6"/>
+        <TriggerCondition multi="1" name="J30.0ETA49_x1" triggerthreshold="J30.0ETA49"/>
+        <TriggerCondition multi="2" name="J20.0ETA49_x2" triggerthreshold="J20.0ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="383" partition="1" name="L1_4J20.0ETA49" complex_deadtime="0" definition="(J20.0ETA49[x4]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="4" name="J20.0ETA49_x4" triggerthreshold="J20.0ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="384" partition="1" name="L1_EM15_W-MT35_W-05DPHI-JXE-0_W-05DPHI-EM15XE" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;05MINDPHI-AJj10s6-XE0[x1]&amp;05MINDPHI-EM15s6-XE0[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="35MT-EM15s6-XE0_x1" triggerthreshold="35MT-EM15s6-XE0"/>
+        <TriggerCondition multi="1" name="EM15_x1" triggerthreshold="EM15"/>
+        <TriggerCondition multi="1" name="05MINDPHI-AJj10s6-XE0_x1" triggerthreshold="05MINDPHI-AJj10s6-XE0"/>
+        <TriggerCondition multi="1" name="05MINDPHI-EM15s6-XE0_x1" triggerthreshold="05MINDPHI-EM15s6-XE0"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="385" partition="1" name="L1_EM18VHI_MJJ-300" complex_deadtime="0" definition="(EM18VHI[x1]&amp;300INVM9999-AJ30s6-AJ20s6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM18VHI_x1" triggerthreshold="EM18VHI"/>
+        <TriggerCondition multi="1" name="300INVM9999-AJ30s6-AJ20s6_x1" triggerthreshold="300INVM9999-AJ30s6-AJ20s6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="386" partition="1" name="L1_DR25-TAU20ITAU12I-J25" complex_deadtime="0" definition="(1DISAMB-J25ab-0DR25-TAU20abi-TAU12abi[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="1DISAMB-J25ab-0DR25-TAU20abi-TAU12abi_x1" triggerthreshold="1DISAMB-J25ab-0DR25-TAU20abi-TAU12abi"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="387" partition="1" name="L1_30M-EM20ITAU12" complex_deadtime="0" definition="(DISAMB-30INVM-EM20his2-TAU12ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="DISAMB-30INVM-EM20his2-TAU12ab_x1" triggerthreshold="DISAMB-30INVM-EM20his2-TAU12ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="388" partition="1" name="L1_TAU8_UNPAIRED_ISO" complex_deadtime="0" definition="(HA8[x1]&amp;BGRP0&amp;BGRP4)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA8_x1" triggerthreshold="HA8"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP4"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="389" partition="1" name="L1_EM7_UNPAIRED_ISO" complex_deadtime="0" definition="(EM7[x1]&amp;BGRP0&amp;BGRP4)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM7_x1" triggerthreshold="EM7"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP4"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="390" partition="1" name="L1_RD2_BGRP12" complex_deadtime="0" definition="(RNDM2&amp;BGRP0&amp;BGRP12)" trigger_type="10000001" monitor="LF:000|HF:000">
+      <AND>
+        <InternalTrigger name="RNDM2"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP12"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="391" partition="1" name="L1_TAU8_FIRSTEMPTY" complex_deadtime="0" definition="(HA8[x1]&amp;BGRP0&amp;BGRP6)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA8_x1" triggerthreshold="HA8"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP6"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="392" partition="1" name="L1_EM24VHI" complex_deadtime="0" definition="(EM24VHI[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM24VHI_x1" triggerthreshold="EM24VHI"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="393" partition="1" name="L1_LHCF_UNPAIRED_ISO" complex_deadtime="0" definition="(NIMLHCF[x1]&amp;BGRP0&amp;BGRP4)" trigger_type="11000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="NIMLHCF_x1" triggerthreshold="NIMLHCF"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP4"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="394" partition="1" name="L1_LHCF_EMPTY" complex_deadtime="0" definition="(NIMLHCF[x1]&amp;BGRP0&amp;BGRP3)" trigger_type="11000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="NIMLHCF_x1" triggerthreshold="NIMLHCF"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP3"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="395" partition="1" name="L1_EM15VH_2EM10VH_3EM7" complex_deadtime="0" definition="(EM15VH[x1]&amp;EM10VH[x2]&amp;EM7[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM15VH_x1" triggerthreshold="EM15VH"/>
+        <TriggerCondition multi="2" name="EM10VH_x2" triggerthreshold="EM10VH"/>
+        <TriggerCondition multi="3" name="EM7_x3" triggerthreshold="EM7"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="396" partition="1" name="L1_EM15VH_3EM8VH" complex_deadtime="0" definition="(EM15VH[x1]&amp;EM8VH[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM15VH_x1" triggerthreshold="EM15VH"/>
+        <TriggerCondition multi="3" name="EM8VH_x3" triggerthreshold="EM8VH"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="397" partition="1" name="L1_MJJ-400-CF" complex_deadtime="0" definition="(400INVM9999-AJ30s6.ETA31-AJ20s6.31ETA49[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="400INVM9999-AJ30s6.ETA31-AJ20s6.31ETA49_x1" triggerthreshold="400INVM9999-AJ30s6.ETA31-AJ20s6.31ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="398" partition="1" name="L1_TAU25IM_2TAU20IM_2J25_3J20" complex_deadtime="0" definition="(HA25IM[x1]&amp;HA20IM[x2]&amp;J25[x2]&amp;J20[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA25IM_x1" triggerthreshold="HA25IM"/>
+        <TriggerCondition multi="2" name="HA20IM_x2" triggerthreshold="HA20IM"/>
+        <TriggerCondition multi="2" name="J25_x2" triggerthreshold="J25"/>
+        <TriggerCondition multi="3" name="J20_x3" triggerthreshold="J20"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="399" partition="1" name="L1_EM8I_MU10" complex_deadtime="0" definition="(EM8I[x1]&amp;MU10[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM8I_x1" triggerthreshold="EM8I"/>
+        <TriggerCondition multi="1" name="MU10_x1" triggerthreshold="MU10"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="400" partition="1" name="L1_2EM20VH" complex_deadtime="0" definition="(EM20VH[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="2" name="EM20VH_x2" triggerthreshold="EM20VH"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="401" partition="1" name="L1_EM15VH_3EM10VH" complex_deadtime="0" definition="(EM15VH[x1]&amp;EM10VH[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM15VH_x1" triggerthreshold="EM15VH"/>
+        <TriggerCondition multi="3" name="EM10VH_x3" triggerthreshold="EM10VH"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="402" partition="1" name="L1_EM24VHIM" complex_deadtime="0" definition="(EM24VHIM[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM24VHIM_x1" triggerthreshold="EM24VHIM"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="403" partition="1" name="L1_MU6_3MU4" complex_deadtime="0" definition="(MU6[x1]&amp;MU4[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU6_x1" triggerthreshold="MU6"/>
+        <TriggerCondition multi="3" name="MU4_x3" triggerthreshold="MU4"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="404" partition="1" name="L1_2MU6_3MU4" complex_deadtime="0" definition="(MU6[x2]&amp;MU4[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="2" name="MU6_x2" triggerthreshold="MU6"/>
+        <TriggerCondition multi="3" name="MU4_x3" triggerthreshold="MU4"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="405" partition="1" name="L1_BGRP9" complex_deadtime="0" definition="(RNDM0&amp;BGRP0&amp;BGRP9)" trigger_type="10000001" monitor="LF:000|HF:000">
+      <AND>
+        <InternalTrigger name="RNDM0"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP9"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="406" partition="1" name="L1_MU21_FIRSTEMPTY" complex_deadtime="0" definition="((MU20[x1]|MU21[x1])&amp;BGRP0&amp;BGRP6)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <OR>
+          <TriggerCondition multi="1" name="MU20_x1" triggerthreshold="MU20"/>
+          <TriggerCondition multi="1" name="MU21_x1" triggerthreshold="MU21"/>
+        </OR>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP6"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="407" partition="1" name="L1_TE5" complex_deadtime="0" definition="(TE5[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="TE5_x1" triggerthreshold="TE5"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="408" partition="1" name="L1_TAU20IM_2TAU12IM_4J12" complex_deadtime="0" definition="(HA20IM[x1]&amp;HA12IM[x2]&amp;J12[x4]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA20IM_x1" triggerthreshold="HA20IM"/>
+        <TriggerCondition multi="2" name="HA12IM_x2" triggerthreshold="HA12IM"/>
+        <TriggerCondition multi="4" name="J12_x4" triggerthreshold="J12"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="409" partition="1" name="L1_TE25.0ETA24" complex_deadtime="0" definition="(TE25.0ETA24[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="TE25.0ETA24_x1" triggerthreshold="TE25.0ETA24"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="410" partition="1" name="L1_TE5.0ETA24" complex_deadtime="0" definition="(TE5.0ETA24[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="TE5.0ETA24_x1" triggerthreshold="TE5.0ETA24"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="411" partition="1" name="L1_EM20VH_FIRSTEMPTY" complex_deadtime="0" definition="(EM20VH[x1]&amp;BGRP0&amp;BGRP6)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM20VH_x1" triggerthreshold="EM20VH"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP6"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="412" partition="1" name="L1_EM22VHI_FIRSTEMPTY" complex_deadtime="0" definition="(EM22VHI[x1]&amp;BGRP0&amp;BGRP6)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM22VHI_x1" triggerthreshold="EM22VHI"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP6"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="413" partition="1" name="L1_MU20_FIRSTEMPTY" complex_deadtime="0" definition="(MU20[x1]&amp;BGRP0&amp;BGRP6)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU20_x1" triggerthreshold="MU20"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP6"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="414" partition="1" name="L1_J100_FIRSTEMPTY" complex_deadtime="0" definition="(J100[x1]&amp;BGRP0&amp;BGRP6)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J100_x1" triggerthreshold="J100"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP6"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="415" partition="1" name="L1_J100.31ETA49_FIRSTEMPTY" complex_deadtime="0" definition="(J100.31ETA49[x1]&amp;BGRP0&amp;BGRP6)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J100.31ETA49_x1" triggerthreshold="J100.31ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP6"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="416" partition="1" name="L1_HT150-JJ15.ETA49_MJJ-400" complex_deadtime="0" definition="(HT150-AJj15all.ETA49[x1]&amp;400INVM9999-AJ30s6-AJ20s6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HT150-AJj15all.ETA49_x1" triggerthreshold="HT150-AJj15all.ETA49"/>
+        <TriggerCondition multi="1" name="400INVM9999-AJ30s6-AJ20s6_x1" triggerthreshold="400INVM9999-AJ30s6-AJ20s6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="417" partition="1" name="L1_TE70.0ETA24" complex_deadtime="0" definition="(TE70.0ETA24[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="TE70.0ETA24_x1" triggerthreshold="TE70.0ETA24"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="418" partition="1" name="L1_TE40.0ETA24" complex_deadtime="0" definition="(TE40.0ETA24[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="TE40.0ETA24_x1" triggerthreshold="TE40.0ETA24"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="419" partition="1" name="L1_ZDC_A" complex_deadtime="0" definition="(ZDC_A[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10100000" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="ZDC_A_x1" triggerthreshold="ZDC_A"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="420" partition="1" name="L1_ZDC_C" complex_deadtime="0" definition="(ZDC_C[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10100000" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="ZDC_C_x1" triggerthreshold="ZDC_C"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="421" partition="1" name="L1_ZDC_AND" complex_deadtime="0" definition="(ZDC_AND[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10100000" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="ZDC_AND_x1" triggerthreshold="ZDC_AND"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="422" partition="1" name="L1_ZDC_A_C" complex_deadtime="0" definition="(ZDC_A[x1]&amp;ZDC_C[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="ZDC_A_x1" triggerthreshold="ZDC_A"/>
+        <TriggerCondition multi="1" name="ZDC_C_x1" triggerthreshold="ZDC_C"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="423" partition="1" name="L1_EM15VHI" complex_deadtime="0" definition="(EM15VHI[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM15VHI_x1" triggerthreshold="EM15VHI"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="424" partition="1" name="L1_EM15I" complex_deadtime="0" definition="(EM15[x1]&amp;EM8I[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM15_x1" triggerthreshold="EM15"/>
+        <TriggerCondition multi="1" name="EM8I_x1" triggerthreshold="EM8I"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="425" partition="1" name="L1_3J35.0ETA23" complex_deadtime="0" definition="(J35.0ETA23[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="3" name="J35.0ETA23_x3" triggerthreshold="J35.0ETA23"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="426" partition="1" name="L1_BPH-2M9-2MU4_BPH-0DR15-2MU4" complex_deadtime="0" definition="(2INVM9-2MU4ab[x1]&amp;0DR15-2MU4ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="2INVM9-2MU4ab_x1" triggerthreshold="2INVM9-2MU4ab"/>
+        <TriggerCondition multi="1" name="0DR15-2MU4ab_x1" triggerthreshold="0DR15-2MU4ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="427" partition="1" name="L1_BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4" complex_deadtime="0" definition="(2INVM9-MU6ab-MU4ab[x1]&amp;0DR15-MU6ab-MU4ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="2INVM9-MU6ab-MU4ab_x1" triggerthreshold="2INVM9-MU6ab-MU4ab"/>
+        <TriggerCondition multi="1" name="0DR15-MU6ab-MU4ab_x1" triggerthreshold="0DR15-MU6ab-MU4ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="428" partition="1" name="L1_MU20_J40" complex_deadtime="0" definition="(MU20[x1]&amp;J40[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU20_x1" triggerthreshold="MU20"/>
+        <TriggerCondition multi="1" name="J40_x1" triggerthreshold="J40"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="429" partition="1" name="L1_TAU40_2TAU12IM_XE40" complex_deadtime="0" definition="(HA40[x1]&amp;HA12IM[x2]&amp;XE40[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA40_x1" triggerthreshold="HA40"/>
+        <TriggerCondition multi="2" name="HA12IM_x2" triggerthreshold="HA12IM"/>
+        <TriggerCondition multi="1" name="XE40_x1" triggerthreshold="XE40"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="430" partition="1" name="L1_MU11_TAU20IM" complex_deadtime="0" definition="(MU11[x1]&amp;HA20IM[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU11_x1" triggerthreshold="MU11"/>
+        <TriggerCondition multi="1" name="HA20IM_x1" triggerthreshold="HA20IM"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="431" partition="1" name="L1_EM20VH_3EM10VH" complex_deadtime="0" definition="(EM20VH[x1]&amp;EM10VH[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM20VH_x1" triggerthreshold="EM20VH"/>
+        <TriggerCondition multi="3" name="EM10VH_x3" triggerthreshold="EM10VH"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="432" partition="1" name="L1_EM20VH_2EM10VH_3EM8VH" complex_deadtime="0" definition="(EM20VH[x1]&amp;EM10VH[x2]&amp;EM8VH[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM20VH_x1" triggerthreshold="EM20VH"/>
+        <TriggerCondition multi="2" name="EM10VH_x2" triggerthreshold="EM10VH"/>
+        <TriggerCondition multi="3" name="EM8VH_x3" triggerthreshold="EM8VH"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="433" partition="1" name="L1_MU20_XE30" complex_deadtime="0" definition="(MU20[x1]&amp;XE30[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU20_x1" triggerthreshold="MU20"/>
+        <TriggerCondition multi="1" name="XE30_x1" triggerthreshold="XE30"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="434" partition="1" name="L1_MU4_2EM3_J20_XE30_DPHI-J20s2XE30" complex_deadtime="0" definition="(MU4[x1]&amp;EM3[x2]&amp;J20[x1]&amp;XE30[x1]&amp;10MINDPHI-J20s2-XE30[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU4_x1" triggerthreshold="MU4"/>
+        <TriggerCondition multi="2" name="EM3_x2" triggerthreshold="EM3"/>
+        <TriggerCondition multi="1" name="J20_x1" triggerthreshold="J20"/>
+        <TriggerCondition multi="1" name="XE30_x1" triggerthreshold="XE30"/>
+        <TriggerCondition multi="1" name="10MINDPHI-J20s2-XE30_x1" triggerthreshold="10MINDPHI-J20s2-XE30"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="435" partition="1" name="L1_3EM3_J40_XE50_DPHI-J20s2XE50" complex_deadtime="0" definition="(EM3[x3]&amp;J40[x1]&amp;XE50[x1]&amp;10MINDPHI-J20s2-XE50[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="3" name="EM3_x3" triggerthreshold="EM3"/>
+        <TriggerCondition multi="1" name="J40_x1" triggerthreshold="J40"/>
+        <TriggerCondition multi="1" name="XE50_x1" triggerthreshold="XE50"/>
+        <TriggerCondition multi="1" name="10MINDPHI-J20s2-XE50_x1" triggerthreshold="10MINDPHI-J20s2-XE50"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="436" partition="1" name="L1_AFP_A_OR_C_J12" complex_deadtime="0" definition="(((AFP_NSA[x1]&amp;AFP_FSA_SIT[x1])|(AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]))&amp;J12[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <OR>
+          <AND>
+            <TriggerCondition multi="1" name="AFP_NSA_x1" triggerthreshold="AFP_NSA"/>
+            <TriggerCondition multi="1" name="AFP_FSA_SIT_x1" triggerthreshold="AFP_FSA_SIT"/>
+          </AND>
+          <AND>
+            <TriggerCondition multi="1" name="AFP_NSC_x1" triggerthreshold="AFP_NSC"/>
+            <TriggerCondition multi="1" name="AFP_FSC_SIT_x1" triggerthreshold="AFP_FSC_SIT"/>
+          </AND>
+        </OR>
+        <TriggerCondition multi="1" name="J12_x1" triggerthreshold="J12"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="437" partition="1" name="L1_EM3_AFP_A_AND_C" complex_deadtime="0" definition="(AFP_NSA[x1]&amp;AFP_FSA_SIT[x1]&amp;AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]&amp;EM3[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="AFP_NSA_x1" triggerthreshold="AFP_NSA"/>
+        <TriggerCondition multi="1" name="AFP_FSA_SIT_x1" triggerthreshold="AFP_FSA_SIT"/>
+        <TriggerCondition multi="1" name="AFP_NSC_x1" triggerthreshold="AFP_NSC"/>
+        <TriggerCondition multi="1" name="AFP_FSC_SIT_x1" triggerthreshold="AFP_FSC_SIT"/>
+        <TriggerCondition multi="1" name="EM3_x1" triggerthreshold="EM3"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="438" partition="1" name="L1_EM3_AFP_A_OR_C" complex_deadtime="0" definition="(((AFP_NSA[x1]&amp;AFP_FSA_SIT[x1])|(AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]))&amp;EM3[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <OR>
+          <AND>
+            <TriggerCondition multi="1" name="AFP_NSA_x1" triggerthreshold="AFP_NSA"/>
+            <TriggerCondition multi="1" name="AFP_FSA_SIT_x1" triggerthreshold="AFP_FSA_SIT"/>
+          </AND>
+          <AND>
+            <TriggerCondition multi="1" name="AFP_NSC_x1" triggerthreshold="AFP_NSC"/>
+            <TriggerCondition multi="1" name="AFP_FSC_SIT_x1" triggerthreshold="AFP_FSC_SIT"/>
+          </AND>
+        </OR>
+        <TriggerCondition multi="1" name="EM3_x1" triggerthreshold="EM3"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="439" partition="1" name="L1_MU4_AFP_A_AND_C" complex_deadtime="0" definition="(AFP_NSA[x1]&amp;AFP_FSA_SIT[x1]&amp;AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]&amp;MU4[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="AFP_NSA_x1" triggerthreshold="AFP_NSA"/>
+        <TriggerCondition multi="1" name="AFP_FSA_SIT_x1" triggerthreshold="AFP_FSA_SIT"/>
+        <TriggerCondition multi="1" name="AFP_NSC_x1" triggerthreshold="AFP_NSC"/>
+        <TriggerCondition multi="1" name="AFP_FSC_SIT_x1" triggerthreshold="AFP_FSC_SIT"/>
+        <TriggerCondition multi="1" name="MU4_x1" triggerthreshold="MU4"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="440" partition="1" name="L1_MU4_AFP_A_OR_C" complex_deadtime="0" definition="(((AFP_NSA[x1]&amp;AFP_FSA_SIT[x1])|(AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]))&amp;MU4[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <OR>
+          <AND>
+            <TriggerCondition multi="1" name="AFP_NSA_x1" triggerthreshold="AFP_NSA"/>
+            <TriggerCondition multi="1" name="AFP_FSA_SIT_x1" triggerthreshold="AFP_FSA_SIT"/>
+          </AND>
+          <AND>
+            <TriggerCondition multi="1" name="AFP_NSC_x1" triggerthreshold="AFP_NSC"/>
+            <TriggerCondition multi="1" name="AFP_FSC_SIT_x1" triggerthreshold="AFP_FSC_SIT"/>
+          </AND>
+        </OR>
+        <TriggerCondition multi="1" name="MU4_x1" triggerthreshold="MU4"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="441" partition="1" name="L1_AFP_A_AND_C_TE5" complex_deadtime="0" definition="(AFP_NSA[x1]&amp;AFP_FSA_SIT[x1]&amp;AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]&amp;TE5[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="AFP_NSA_x1" triggerthreshold="AFP_NSA"/>
+        <TriggerCondition multi="1" name="AFP_FSA_SIT_x1" triggerthreshold="AFP_FSA_SIT"/>
+        <TriggerCondition multi="1" name="AFP_NSC_x1" triggerthreshold="AFP_NSC"/>
+        <TriggerCondition multi="1" name="AFP_FSC_SIT_x1" triggerthreshold="AFP_FSC_SIT"/>
+        <TriggerCondition multi="1" name="TE5_x1" triggerthreshold="TE5"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="442" partition="1" name="L1_AFP_A_OR_C_TE5" complex_deadtime="0" definition="(((AFP_NSA[x1]&amp;AFP_FSA_SIT[x1])|(AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]))&amp;TE5[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <OR>
+          <AND>
+            <TriggerCondition multi="1" name="AFP_NSA_x1" triggerthreshold="AFP_NSA"/>
+            <TriggerCondition multi="1" name="AFP_FSA_SIT_x1" triggerthreshold="AFP_FSA_SIT"/>
+          </AND>
+          <AND>
+            <TriggerCondition multi="1" name="AFP_NSC_x1" triggerthreshold="AFP_NSC"/>
+            <TriggerCondition multi="1" name="AFP_FSC_SIT_x1" triggerthreshold="AFP_FSC_SIT"/>
+          </AND>
+        </OR>
+        <TriggerCondition multi="1" name="TE5_x1" triggerthreshold="TE5"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="443" partition="1" name="L1_AFP_A_AND_C_J50" complex_deadtime="0" definition="(AFP_NSA[x1]&amp;AFP_FSA_SIT[x1]&amp;AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]&amp;J50[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="AFP_NSA_x1" triggerthreshold="AFP_NSA"/>
+        <TriggerCondition multi="1" name="AFP_FSA_SIT_x1" triggerthreshold="AFP_FSA_SIT"/>
+        <TriggerCondition multi="1" name="AFP_NSC_x1" triggerthreshold="AFP_NSC"/>
+        <TriggerCondition multi="1" name="AFP_FSC_SIT_x1" triggerthreshold="AFP_FSC_SIT"/>
+        <TriggerCondition multi="1" name="J50_x1" triggerthreshold="J50"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="444" partition="1" name="L1_AFP_A_AND_C_SPECTOF_J50" complex_deadtime="0" definition="(AFP_FSA_TOF[x1]&amp;AFP_FSC_TOF[x1]&amp;J50[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="AFP_FSA_TOF_x1" triggerthreshold="AFP_FSA_TOF"/>
+        <TriggerCondition multi="1" name="AFP_FSC_TOF_x1" triggerthreshold="AFP_FSC_TOF"/>
+        <TriggerCondition multi="1" name="J50_x1" triggerthreshold="J50"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="445" partition="1" name="L1_AFP_A_AND_C_J75" complex_deadtime="0" definition="(AFP_NSA[x1]&amp;AFP_FSA_SIT[x1]&amp;AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]&amp;J75[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="AFP_NSA_x1" triggerthreshold="AFP_NSA"/>
+        <TriggerCondition multi="1" name="AFP_FSA_SIT_x1" triggerthreshold="AFP_FSA_SIT"/>
+        <TriggerCondition multi="1" name="AFP_NSC_x1" triggerthreshold="AFP_NSC"/>
+        <TriggerCondition multi="1" name="AFP_FSC_SIT_x1" triggerthreshold="AFP_FSC_SIT"/>
+        <TriggerCondition multi="1" name="J75_x1" triggerthreshold="J75"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="446" partition="1" name="L1_AFP_A_AND_C_SPECTOF_J75" complex_deadtime="0" definition="(AFP_FSA_TOF[x1]&amp;AFP_FSC_TOF[x1]&amp;J75[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="AFP_FSA_TOF_x1" triggerthreshold="AFP_FSA_TOF"/>
+        <TriggerCondition multi="1" name="AFP_FSC_TOF_x1" triggerthreshold="AFP_FSC_TOF"/>
+        <TriggerCondition multi="1" name="J75_x1" triggerthreshold="J75"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="447" partition="1" name="L1_AFP_A_AND_C_J100" complex_deadtime="0" definition="(AFP_NSA[x1]&amp;AFP_FSA_SIT[x1]&amp;AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]&amp;J100[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="AFP_NSA_x1" triggerthreshold="AFP_NSA"/>
+        <TriggerCondition multi="1" name="AFP_FSA_SIT_x1" triggerthreshold="AFP_FSA_SIT"/>
+        <TriggerCondition multi="1" name="AFP_NSC_x1" triggerthreshold="AFP_NSC"/>
+        <TriggerCondition multi="1" name="AFP_FSC_SIT_x1" triggerthreshold="AFP_FSC_SIT"/>
+        <TriggerCondition multi="1" name="J100_x1" triggerthreshold="J100"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="448" partition="1" name="L1_AFP_A_AND_C" complex_deadtime="0" definition="(AFP_NSA[x1]&amp;AFP_FSA_SIT[x1]&amp;AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="AFP_NSA_x1" triggerthreshold="AFP_NSA"/>
+        <TriggerCondition multi="1" name="AFP_FSA_SIT_x1" triggerthreshold="AFP_FSA_SIT"/>
+        <TriggerCondition multi="1" name="AFP_NSC_x1" triggerthreshold="AFP_NSC"/>
+        <TriggerCondition multi="1" name="AFP_FSC_SIT_x1" triggerthreshold="AFP_FSC_SIT"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="449" partition="1" name="L1_2MU4_J40_XE50" complex_deadtime="0" definition="(MU4[x2]&amp;J40[x1]&amp;XE50[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="2" name="MU4_x2" triggerthreshold="MU4"/>
+        <TriggerCondition multi="1" name="J40_x1" triggerthreshold="J40"/>
+        <TriggerCondition multi="1" name="XE50_x1" triggerthreshold="XE50"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="450" partition="1" name="L1_2MU4_J20_XE40_DPHI-J20s2XE30" complex_deadtime="0" definition="(MU4[x2]&amp;J20[x1]&amp;XE40[x1]&amp;10MINDPHI-J20s2-XE30[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="2" name="MU4_x2" triggerthreshold="MU4"/>
+        <TriggerCondition multi="1" name="J20_x1" triggerthreshold="J20"/>
+        <TriggerCondition multi="1" name="XE40_x1" triggerthreshold="XE40"/>
+        <TriggerCondition multi="1" name="10MINDPHI-J20s2-XE30_x1" triggerthreshold="10MINDPHI-J20s2-XE30"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="451" partition="1" name="L1_2MU4_J20_XE50_DPHI-J20s2XE30" complex_deadtime="0" definition="(MU4[x2]&amp;J20[x1]&amp;XE50[x1]&amp;10MINDPHI-J20s2-XE30[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="2" name="MU4_x2" triggerthreshold="MU4"/>
+        <TriggerCondition multi="1" name="J20_x1" triggerthreshold="J20"/>
+        <TriggerCondition multi="1" name="XE50_x1" triggerthreshold="XE50"/>
+        <TriggerCondition multi="1" name="10MINDPHI-J20s2-XE30_x1" triggerthreshold="10MINDPHI-J20s2-XE30"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="452" partition="1" name="L1_MU4_J30_XE40_DPHI-J20s2XE30" complex_deadtime="0" definition="(MU4[x1]&amp;J30[x1]&amp;XE40[x1]&amp;10MINDPHI-J20s2-XE30[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU4_x1" triggerthreshold="MU4"/>
+        <TriggerCondition multi="1" name="J30_x1" triggerthreshold="J30"/>
+        <TriggerCondition multi="1" name="XE40_x1" triggerthreshold="XE40"/>
+        <TriggerCondition multi="1" name="10MINDPHI-J20s2-XE30_x1" triggerthreshold="10MINDPHI-J20s2-XE30"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="453" partition="1" name="L1_MU4_J50_XE50_DPHI-J20s2XE30" complex_deadtime="0" definition="(MU4[x1]&amp;J50[x1]&amp;XE50[x1]&amp;10MINDPHI-J20s2-XE30[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU4_x1" triggerthreshold="MU4"/>
+        <TriggerCondition multi="1" name="J50_x1" triggerthreshold="J50"/>
+        <TriggerCondition multi="1" name="XE50_x1" triggerthreshold="XE50"/>
+        <TriggerCondition multi="1" name="10MINDPHI-J20s2-XE30_x1" triggerthreshold="10MINDPHI-J20s2-XE30"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="454" partition="1" name="L1_MU4_XE60" complex_deadtime="0" definition="(MU4[x1]&amp;XE60[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU4_x1" triggerthreshold="MU4"/>
+        <TriggerCondition multi="1" name="XE60_x1" triggerthreshold="XE60"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="455" partition="1" name="L1_2MU4_XE60" complex_deadtime="0" definition="(MU4[x2]&amp;XE60[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="2" name="MU4_x2" triggerthreshold="MU4"/>
+        <TriggerCondition multi="1" name="XE60_x1" triggerthreshold="XE60"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="456" partition="1" name="L1_AFP_A_AND_C_SPECTOF" complex_deadtime="0" definition="(AFP_FSA_TOF[x1]&amp;AFP_FSC_TOF[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="AFP_FSA_TOF_x1" triggerthreshold="AFP_FSA_TOF"/>
+        <TriggerCondition multi="1" name="AFP_FSC_TOF_x1" triggerthreshold="AFP_FSC_TOF"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="457" partition="1" name="L1_AFP_A_AND_C_SPECTOF_J100" complex_deadtime="0" definition="(AFP_FSA_TOF[x1]&amp;AFP_FSC_TOF[x1]&amp;J100[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="AFP_FSA_TOF_x1" triggerthreshold="AFP_FSA_TOF"/>
+        <TriggerCondition multi="1" name="AFP_FSC_TOF_x1" triggerthreshold="AFP_FSC_TOF"/>
+        <TriggerCondition multi="1" name="J100_x1" triggerthreshold="J100"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="458" partition="1" name="L1_TAU60_2TAU40" complex_deadtime="0" definition="(HA60[x1]&amp;HA40[x2]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA60_x1" triggerthreshold="HA60"/>
+        <TriggerCondition multi="2" name="HA40_x2" triggerthreshold="HA40"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="459" partition="1" name="L1_AFP_NSA_BGRP0" complex_deadtime="0" definition="(AFP_NSA[x1]&amp;BGRP0)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="AFP_NSA_x1" triggerthreshold="AFP_NSA"/>
+        <InternalTrigger name="BGRP0"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="460" partition="1" name="L1_AFP_NSC_BGRP0" complex_deadtime="0" definition="(AFP_NSC[x1]&amp;BGRP0)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="AFP_NSC_x1" triggerthreshold="AFP_NSC"/>
+        <InternalTrigger name="BGRP0"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="461" partition="1" name="L1_AFP_FSA_SIT_BGRP0" complex_deadtime="0" definition="(AFP_FSA_SIT[x1]&amp;BGRP0)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="AFP_FSA_SIT_x1" triggerthreshold="AFP_FSA_SIT"/>
+        <InternalTrigger name="BGRP0"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="462" partition="1" name="L1_AFP_FSC_SIT_BGRP0" complex_deadtime="0" definition="(AFP_FSC_SIT[x1]&amp;BGRP0)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="AFP_FSC_SIT_x1" triggerthreshold="AFP_FSC_SIT"/>
+        <InternalTrigger name="BGRP0"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="463" partition="2" name="L1_RD2_BGRP14" complex_deadtime="0" definition="(RNDM2&amp;BGRP0&amp;BGRP14)" trigger_type="0001" monitor="LF:000|HF:000">
+      <AND>
+        <InternalTrigger name="RNDM2"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP14"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="464" partition="3" name="L1_RD3_BGRP15" complex_deadtime="0" definition="(RNDM3&amp;BGRP0&amp;BGRP15)" trigger_type="0001" monitor="LF:000|HF:000">
+      <AND>
+        <InternalTrigger name="RNDM3"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP15"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="465" partition="1" name="L1_J40.0ETA25_2J30_J20.31ETA49" complex_deadtime="0" definition="(J40.0ETA25[x1]&amp;J30[x2]&amp;J20.31ETA49[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J40.0ETA25_x1" triggerthreshold="J40.0ETA25"/>
+        <TriggerCondition multi="2" name="J30_x2" triggerthreshold="J30"/>
+        <TriggerCondition multi="1" name="J20.31ETA49_x1" triggerthreshold="J20.31ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="467" partition="1" name="L1_TAU8_UNPAIRED_NONISO" complex_deadtime="0" definition="(HA8[x1]&amp;BGRP0&amp;BGRP5)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA8_x1" triggerthreshold="HA8"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP5"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="468" partition="1" name="L1_EM7_UNPAIRED_NONISO" complex_deadtime="0" definition="(EM7[x1]&amp;BGRP0&amp;BGRP5)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM7_x1" triggerthreshold="EM7"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP5"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="469" partition="1" name="L1_MU4_UNPAIRED_NONISO" complex_deadtime="0" definition="(MU4[x1]&amp;BGRP0&amp;BGRP5)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU4_x1" triggerthreshold="MU4"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP5"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="480" partition="1" name="L1_J85_3J30" complex_deadtime="0" definition="(J85[x1]&amp;J30[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J85_x1" triggerthreshold="J85"/>
+        <TriggerCondition multi="3" name="J30_x3" triggerthreshold="J30"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="482" partition="1" name="L1_MU10_TAU12IM_3J12" complex_deadtime="0" definition="(MU10[x1]&amp;HA12IM[x1]&amp;J12[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU10_x1" triggerthreshold="MU10"/>
+        <TriggerCondition multi="1" name="HA12IM_x1" triggerthreshold="HA12IM"/>
+        <TriggerCondition multi="3" name="J12_x3" triggerthreshold="J12"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="483" partition="1" name="L1_EM7_MU20" complex_deadtime="0" definition="(EM7[x1]&amp;MU20[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM7_x1" triggerthreshold="EM7"/>
+        <TriggerCondition multi="1" name="MU20_x1" triggerthreshold="MU20"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="484" partition="1" name="L1_EM8VH_MU20" complex_deadtime="0" definition="(EM8VH[x1]&amp;MU20[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM8VH_x1" triggerthreshold="EM8VH"/>
+        <TriggerCondition multi="1" name="MU20_x1" triggerthreshold="MU20"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="485" partition="1" name="L1_EM7_MU11" complex_deadtime="0" definition="(EM7[x1]&amp;MU11[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10001000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="EM7_x1" triggerthreshold="EM7"/>
+        <TriggerCondition multi="1" name="MU11_x1" triggerthreshold="MU11"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="487" partition="1" name="L1_BPH-8M15-MU6MU4_BPH-0DR22-MU6MU4-B" complex_deadtime="0" definition="(8INVM15-MU6ab-MU4ab[x1]&amp;0DR22-MU6ab-MU4ab[x1]&amp;MULT-CMU4ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="8INVM15-MU6ab-MU4ab_x1" triggerthreshold="8INVM15-MU6ab-MU4ab"/>
+        <TriggerCondition multi="1" name="0DR22-MU6ab-MU4ab_x1" triggerthreshold="0DR22-MU6ab-MU4ab"/>
+        <TriggerCondition multi="1" name="MULT-CMU4ab_x1" triggerthreshold="MULT-CMU4ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="488" partition="1" name="L1_BPH-8M15-MU6MU4_BPH-0DR22-MU6MU4-BO" complex_deadtime="0" definition="(8INVM15-MU6ab-MU4ab[x1]&amp;0DR22-MU6ab-MU4ab[x1]&amp;MULT-CMU4ab[x2]&amp;MULT-CMU6ab[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="8INVM15-MU6ab-MU4ab_x1" triggerthreshold="8INVM15-MU6ab-MU4ab"/>
+        <TriggerCondition multi="1" name="0DR22-MU6ab-MU4ab_x1" triggerthreshold="0DR22-MU6ab-MU4ab"/>
+        <TriggerCondition multi="2" name="MULT-CMU4ab_x2" triggerthreshold="MULT-CMU4ab"/>
+        <TriggerCondition multi="1" name="MULT-CMU6ab_x1" triggerthreshold="MULT-CMU6ab"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="489" partition="1" name="L1_ALFA_B7L1U" complex_deadtime="0" definition="(ALFA_B7L1U[x1]&amp;BGRP0)" trigger_type="11000000" monitor="LF:001|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="ALFA_B7L1U_x1" triggerthreshold="ALFA_B7L1U"/>
+        <InternalTrigger name="BGRP0"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="490" partition="1" name="L1_ALFA_B7L1L" complex_deadtime="0" definition="(ALFA_B7L1L[x1]&amp;BGRP0)" trigger_type="11000000" monitor="LF:001|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="ALFA_B7L1L_x1" triggerthreshold="ALFA_B7L1L"/>
+        <InternalTrigger name="BGRP0"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="491" partition="1" name="L1_ALFA_A7L1U" complex_deadtime="0" definition="(ALFA_A7L1U[x1]&amp;BGRP0)" trigger_type="11000000" monitor="LF:001|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="ALFA_A7L1U_x1" triggerthreshold="ALFA_A7L1U"/>
+        <InternalTrigger name="BGRP0"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="492" partition="1" name="L1_ALFA_A7L1L" complex_deadtime="0" definition="(ALFA_A7L1L[x1]&amp;BGRP0)" trigger_type="11000000" monitor="LF:001|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="ALFA_A7L1L_x1" triggerthreshold="ALFA_A7L1L"/>
+        <InternalTrigger name="BGRP0"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="493" partition="1" name="L1_ALFA_A7R1U" complex_deadtime="0" definition="(ALFA_A7R1U[x1]&amp;BGRP0)" trigger_type="11000000" monitor="LF:001|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="ALFA_A7R1U_x1" triggerthreshold="ALFA_A7R1U"/>
+        <InternalTrigger name="BGRP0"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="494" partition="1" name="L1_ALFA_A7R1L" complex_deadtime="0" definition="(ALFA_A7R1L[x1]&amp;BGRP0)" trigger_type="11000000" monitor="LF:001|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="ALFA_A7R1L_x1" triggerthreshold="ALFA_A7R1L"/>
+        <InternalTrigger name="BGRP0"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="495" partition="1" name="L1_ALFA_B7R1U" complex_deadtime="0" definition="(ALFA_B7R1U[x1]&amp;BGRP0)" trigger_type="11000000" monitor="LF:001|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="ALFA_B7R1U_x1" triggerthreshold="ALFA_B7R1U"/>
+        <InternalTrigger name="BGRP0"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="496" partition="1" name="L1_ALFA_B7R1L" complex_deadtime="0" definition="(ALFA_B7R1L[x1]&amp;BGRP0)" trigger_type="11000000" monitor="LF:001|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="ALFA_B7R1L_x1" triggerthreshold="ALFA_B7R1L"/>
+        <InternalTrigger name="BGRP0"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="497" partition="1" name="L1_MU21_FTK" complex_deadtime="0" definition="((MU20[x1]|MU21[x1])&amp;BGRP0&amp;BGRP1)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <OR>
+          <TriggerCondition multi="1" name="MU20_x1" triggerthreshold="MU20"/>
+          <TriggerCondition multi="1" name="MU21_x1" triggerthreshold="MU21"/>
+        </OR>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="498" partition="1" name="L1_MU21_TAU12IM_FTK" complex_deadtime="0" definition="((MU20[x1]|MU21[x1])&amp;HA12IM[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <OR>
+          <TriggerCondition multi="1" name="MU20_x1" triggerthreshold="MU20"/>
+          <TriggerCondition multi="1" name="MU21_x1" triggerthreshold="MU21"/>
+        </OR>
+        <TriggerCondition multi="1" name="HA12IM_x1" triggerthreshold="HA12IM"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="499" partition="1" name="L1_MU6_FTK" complex_deadtime="0" definition="(MU6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU6_x1" triggerthreshold="MU6"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="500" partition="1" name="L1_MU20_FTK" complex_deadtime="0" definition="(MU20[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="MU20_x1" triggerthreshold="MU20"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="501" partition="1" name="L1_TAU12IM_FTK" complex_deadtime="0" definition="(HA12IM[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA12IM_x1" triggerthreshold="HA12IM"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="502" partition="1" name="L1_TAU20IM_2TAU12IM_J25_2J20_3J12_FTK" complex_deadtime="0" definition="(HA20IM[x1]&amp;HA12IM[x2]&amp;J25[x1]&amp;J20[x2]&amp;J12[x3]&amp;BGRP0&amp;BGRP1)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="HA20IM_x1" triggerthreshold="HA20IM"/>
+        <TriggerCondition multi="2" name="HA12IM_x2" triggerthreshold="HA12IM"/>
+        <TriggerCondition multi="1" name="J25_x1" triggerthreshold="J25"/>
+        <TriggerCondition multi="2" name="J20_x2" triggerthreshold="J20"/>
+        <TriggerCondition multi="3" name="J12_x3" triggerthreshold="J12"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="503" partition="1" name="L1_DR-TAU20ITAU12I-J25_FTK" complex_deadtime="0" definition="(1DISAMB-J25ab-0DR28-TAU20abi-TAU12abi[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="1DISAMB-J25ab-0DR28-TAU20abi-TAU12abi_x1" triggerthreshold="1DISAMB-J25ab-0DR28-TAU20abi-TAU12abi"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="504" partition="1" name="L1_4J15_FTK" complex_deadtime="0" definition="(J15[x4]&amp;BGRP0&amp;BGRP1)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="4" name="J15_x4" triggerthreshold="J15"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="505" partition="1" name="L1_4J15.0ETA25_FTK" complex_deadtime="0" definition="(J15.0ETA25[x4]&amp;BGRP0&amp;BGRP1)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="4" name="J15.0ETA25_x4" triggerthreshold="J15.0ETA25"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="506" partition="1" name="L1_J15_FTK" complex_deadtime="0" definition="(J15[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J15_x1" triggerthreshold="J15"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="507" partition="1" name="L1_J40_FTK" complex_deadtime="0" definition="(J40[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J40_x1" triggerthreshold="J40"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="508" partition="1" name="L1_J100_FTK" complex_deadtime="0" definition="(J100[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10100000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J100_x1" triggerthreshold="J100"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="511" partition="1" name="L1_CALREQ2" complex_deadtime="0" definition="(CAL2[x1]&amp;BGRP0&amp;BGRP2)" trigger_type="00110100" monitor="LF:111|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="CAL2_x1" triggerthreshold="CAL2"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP2"/>
+      </AND>
+    </TriggerItem>
+  </TriggerMenu>
+  <PrescaleSet name="MC_PhaseII_default_prescale" type="Physics" menuPartition="0">
+    <Prescale ctpid="0" cut="000001" value="1"/>
+    <Prescale ctpid="1" cut="000001" value="1"/>
+    <Prescale ctpid="2" cut="000001" value="1"/>
+    <Prescale ctpid="3" cut="000001" value="1"/>
+    <Prescale ctpid="4" cut="000001" value="1"/>
+    <Prescale ctpid="5" cut="000001" value="1"/>
+    <Prescale ctpid="6" cut="000001" value="1"/>
+    <Prescale ctpid="7" cut="000001" value="1"/>
+    <Prescale ctpid="8" cut="000001" value="1"/>
+    <Prescale ctpid="9" cut="000001" value="1"/>
+    <Prescale ctpid="10" cut="000001" value="1"/>
+    <Prescale ctpid="11" cut="000001" value="1"/>
+    <Prescale ctpid="12" cut="000001" value="1"/>
+    <Prescale ctpid="13" cut="000001" value="1"/>
+    <Prescale ctpid="14" cut="000001" value="1"/>
+    <Prescale ctpid="15" cut="000001" value="1"/>
+    <Prescale ctpid="16" cut="000001" value="1"/>
+    <Prescale ctpid="17" cut="000001" value="1"/>
+    <Prescale ctpid="18" cut="000001" value="1"/>
+    <Prescale ctpid="19" cut="000001" value="1"/>
+    <Prescale ctpid="20" cut="000001" value="1"/>
+    <Prescale ctpid="21" cut="000001" value="1"/>
+    <Prescale ctpid="22" cut="000001" value="1"/>
+    <Prescale ctpid="23" cut="000001" value="1"/>
+    <Prescale ctpid="24" cut="000001" value="1"/>
+    <Prescale ctpid="25" cut="000001" value="1"/>
+    <Prescale ctpid="26" cut="000001" value="1"/>
+    <Prescale ctpid="27" cut="000001" value="1"/>
+    <Prescale ctpid="28" cut="000001" value="1"/>
+    <Prescale ctpid="29" cut="000001" value="1"/>
+    <Prescale ctpid="30" cut="000001" value="1"/>
+    <Prescale ctpid="31" cut="000001" value="1"/>
+    <Prescale ctpid="32" cut="000001" value="1"/>
+    <Prescale ctpid="33" cut="000001" value="1"/>
+    <Prescale ctpid="34" cut="000001" value="1"/>
+    <Prescale ctpid="35" cut="000001" value="1"/>
+    <Prescale ctpid="36" cut="000001" value="1"/>
+    <Prescale ctpid="37" cut="000001" value="1"/>
+    <Prescale ctpid="38" cut="000001" value="1"/>
+    <Prescale ctpid="39" cut="000001" value="1"/>
+    <Prescale ctpid="40" cut="000001" value="1"/>
+    <Prescale ctpid="41" cut="000001" value="1"/>
+    <Prescale ctpid="42" cut="000001" value="1"/>
+    <Prescale ctpid="43" cut="000001" value="1"/>
+    <Prescale ctpid="44" cut="000001" value="1"/>
+    <Prescale ctpid="45" cut="000001" value="1"/>
+    <Prescale ctpid="46" cut="000001" value="1"/>
+    <Prescale ctpid="47" cut="000001" value="1"/>
+    <Prescale ctpid="48" cut="000001" value="1"/>
+    <Prescale ctpid="49" cut="000001" value="1"/>
+    <Prescale ctpid="50" cut="000001" value="1"/>
+    <Prescale ctpid="51" cut="000001" value="1"/>
+    <Prescale ctpid="52" cut="000001" value="1"/>
+    <Prescale ctpid="53" cut="000001" value="1"/>
+    <Prescale ctpid="54" cut="000001" value="1"/>
+    <Prescale ctpid="55" cut="000001" value="1"/>
+    <Prescale ctpid="56" cut="000001" value="1"/>
+    <Prescale ctpid="57" cut="000001" value="1"/>
+    <Prescale ctpid="58" cut="000001" value="1"/>
+    <Prescale ctpid="59" cut="000001" value="1"/>
+    <Prescale ctpid="60" cut="000001" value="1"/>
+    <Prescale ctpid="61" cut="000001" value="1"/>
+    <Prescale ctpid="62" cut="000001" value="1"/>
+    <Prescale ctpid="63" cut="000001" value="1"/>
+    <Prescale ctpid="64" cut="000001" value="1"/>
+    <Prescale ctpid="65" cut="000001" value="1"/>
+    <Prescale ctpid="66" cut="000001" value="1"/>
+    <Prescale ctpid="67" cut="000001" value="1"/>
+    <Prescale ctpid="68" cut="000001" value="1"/>
+    <Prescale ctpid="69" cut="000001" value="1"/>
+    <Prescale ctpid="70" cut="000001" value="1"/>
+    <Prescale ctpid="71" cut="000001" value="1"/>
+    <Prescale ctpid="72" cut="000001" value="1"/>
+    <Prescale ctpid="73" cut="000001" value="1"/>
+    <Prescale ctpid="74" cut="000001" value="1"/>
+    <Prescale ctpid="75" cut="000001" value="1"/>
+    <Prescale ctpid="76" cut="000001" value="1"/>
+    <Prescale ctpid="77" cut="000001" value="1"/>
+    <Prescale ctpid="78" cut="000001" value="1"/>
+    <Prescale ctpid="79" cut="000001" value="1"/>
+    <Prescale ctpid="80" cut="000001" value="1"/>
+    <Prescale ctpid="81" cut="000001" value="1"/>
+    <Prescale ctpid="82" cut="000001" value="1"/>
+    <Prescale ctpid="83" cut="000001" value="1"/>
+    <Prescale ctpid="84" cut="000001" value="1"/>
+    <Prescale ctpid="85" cut="000001" value="1"/>
+    <Prescale ctpid="86" cut="000001" value="1"/>
+    <Prescale ctpid="87" cut="000001" value="1"/>
+    <Prescale ctpid="88" cut="000001" value="1"/>
+    <Prescale ctpid="89" cut="000001" value="1"/>
+    <Prescale ctpid="90" cut="000001" value="1"/>
+    <Prescale ctpid="91" cut="000001" value="1"/>
+    <Prescale ctpid="92" cut="000001" value="1"/>
+    <Prescale ctpid="93" cut="000001" value="1"/>
+    <Prescale ctpid="94" cut="000001" value="1"/>
+    <Prescale ctpid="95" cut="000001" value="1"/>
+    <Prescale ctpid="96" cut="000001" value="1"/>
+    <Prescale ctpid="97" cut="000001" value="1"/>
+    <Prescale ctpid="98" cut="000001" value="1"/>
+    <Prescale ctpid="99" cut="000001" value="1"/>
+    <Prescale ctpid="100" cut="000001" value="1"/>
+    <Prescale ctpid="101" cut="000001" value="1"/>
+    <Prescale ctpid="102" cut="000001" value="1"/>
+    <Prescale ctpid="103" cut="000001" value="1"/>
+    <Prescale ctpid="104" cut="000001" value="1"/>
+    <Prescale ctpid="105" cut="000001" value="1"/>
+    <Prescale ctpid="106" cut="000001" value="1"/>
+    <Prescale ctpid="107" cut="000001" value="1"/>
+    <Prescale ctpid="108" cut="000001" value="1"/>
+    <Prescale ctpid="109" cut="000001" value="1"/>
+    <Prescale ctpid="110" cut="000001" value="1"/>
+    <Prescale ctpid="111" cut="000001" value="1"/>
+    <Prescale ctpid="112" cut="000001" value="1"/>
+    <Prescale ctpid="113" cut="000001" value="1"/>
+    <Prescale ctpid="114" cut="000001" value="1"/>
+    <Prescale ctpid="115" cut="000001" value="1"/>
+    <Prescale ctpid="116" cut="000001" value="1"/>
+    <Prescale ctpid="117" cut="000001" value="1"/>
+    <Prescale ctpid="118" cut="000001" value="1"/>
+    <Prescale ctpid="119" cut="000001" value="1"/>
+    <Prescale ctpid="120" cut="000001" value="1"/>
+    <Prescale ctpid="121" cut="000001" value="1"/>
+    <Prescale ctpid="122" cut="000001" value="1"/>
+    <Prescale ctpid="123" cut="000001" value="1"/>
+    <Prescale ctpid="124" cut="000001" value="1"/>
+    <Prescale ctpid="125" cut="000001" value="1"/>
+    <Prescale ctpid="126" cut="000001" value="1"/>
+    <Prescale ctpid="127" cut="000001" value="1"/>
+    <Prescale ctpid="128" cut="000001" value="1"/>
+    <Prescale ctpid="129" cut="000001" value="1"/>
+    <Prescale ctpid="130" cut="000001" value="1"/>
+    <Prescale ctpid="131" cut="000001" value="1"/>
+    <Prescale ctpid="132" cut="000001" value="1"/>
+    <Prescale ctpid="133" cut="000001" value="1"/>
+    <Prescale ctpid="134" cut="000001" value="1"/>
+    <Prescale ctpid="135" cut="000001" value="1"/>
+    <Prescale ctpid="136" cut="000001" value="1"/>
+    <Prescale ctpid="137" cut="000001" value="1"/>
+    <Prescale ctpid="138" cut="000001" value="1"/>
+    <Prescale ctpid="139" cut="000001" value="1"/>
+    <Prescale ctpid="140" cut="000001" value="1"/>
+    <Prescale ctpid="141" cut="000001" value="1"/>
+    <Prescale ctpid="142" cut="000001" value="1"/>
+    <Prescale ctpid="143" cut="000001" value="1"/>
+    <Prescale ctpid="144" cut="000001" value="1"/>
+    <Prescale ctpid="145" cut="000001" value="1"/>
+    <Prescale ctpid="146" cut="000001" value="1"/>
+    <Prescale ctpid="147" cut="000001" value="1"/>
+    <Prescale ctpid="148" cut="000001" value="1"/>
+    <Prescale ctpid="149" cut="000001" value="1"/>
+    <Prescale ctpid="150" cut="000001" value="1"/>
+    <Prescale ctpid="151" cut="000001" value="1"/>
+    <Prescale ctpid="152" cut="000001" value="1"/>
+    <Prescale ctpid="153" cut="000001" value="1"/>
+    <Prescale ctpid="154" cut="000001" value="1"/>
+    <Prescale ctpid="155" cut="000001" value="1"/>
+    <Prescale ctpid="156" cut="000001" value="1"/>
+    <Prescale ctpid="157" cut="000001" value="1"/>
+    <Prescale ctpid="158" cut="000001" value="1"/>
+    <Prescale ctpid="159" cut="000001" value="1"/>
+    <Prescale ctpid="160" cut="000001" value="1"/>
+    <Prescale ctpid="161" cut="000001" value="1"/>
+    <Prescale ctpid="162" cut="000001" value="1"/>
+    <Prescale ctpid="163" cut="000001" value="1"/>
+    <Prescale ctpid="164" cut="000001" value="1"/>
+    <Prescale ctpid="165" cut="000001" value="1"/>
+    <Prescale ctpid="166" cut="000001" value="1"/>
+    <Prescale ctpid="167" cut="000001" value="1"/>
+    <Prescale ctpid="168" cut="000001" value="1"/>
+    <Prescale ctpid="169" cut="000001" value="1"/>
+    <Prescale ctpid="170" cut="000001" value="1"/>
+    <Prescale ctpid="171" cut="000001" value="1"/>
+    <Prescale ctpid="172" cut="000001" value="1"/>
+    <Prescale ctpid="173" cut="000001" value="1"/>
+    <Prescale ctpid="174" cut="000001" value="1"/>
+    <Prescale ctpid="175" cut="000001" value="1"/>
+    <Prescale ctpid="176" cut="000001" value="1"/>
+    <Prescale ctpid="177" cut="000001" value="1"/>
+    <Prescale ctpid="178" cut="000001" value="1"/>
+    <Prescale ctpid="179" cut="000001" value="1"/>
+    <Prescale ctpid="180" cut="000001" value="1"/>
+    <Prescale ctpid="181" cut="000001" value="1"/>
+    <Prescale ctpid="182" cut="000001" value="1"/>
+    <Prescale ctpid="183" cut="000001" value="1"/>
+    <Prescale ctpid="184" cut="000001" value="1"/>
+    <Prescale ctpid="185" cut="000001" value="1"/>
+    <Prescale ctpid="186" cut="000001" value="1"/>
+    <Prescale ctpid="187" cut="000001" value="1"/>
+    <Prescale ctpid="188" cut="000001" value="1"/>
+    <Prescale ctpid="189" cut="000001" value="1"/>
+    <Prescale ctpid="190" cut="000001" value="1"/>
+    <Prescale ctpid="191" cut="000001" value="1"/>
+    <Prescale ctpid="192" cut="000001" value="1"/>
+    <Prescale ctpid="193" cut="000001" value="1"/>
+    <Prescale ctpid="194" cut="000001" value="1"/>
+    <Prescale ctpid="195" cut="000001" value="1"/>
+    <Prescale ctpid="196" cut="000001" value="1"/>
+    <Prescale ctpid="197" cut="000001" value="1"/>
+    <Prescale ctpid="198" cut="000001" value="1"/>
+    <Prescale ctpid="199" cut="000001" value="1"/>
+    <Prescale ctpid="200" cut="000001" value="1"/>
+    <Prescale ctpid="201" cut="000001" value="1"/>
+    <Prescale ctpid="202" cut="000001" value="1"/>
+    <Prescale ctpid="203" cut="000001" value="1"/>
+    <Prescale ctpid="204" cut="000001" value="1"/>
+    <Prescale ctpid="205" cut="000001" value="1"/>
+    <Prescale ctpid="206" cut="000001" value="1"/>
+    <Prescale ctpid="207" cut="000001" value="1"/>
+    <Prescale ctpid="208" cut="000001" value="1"/>
+    <Prescale ctpid="209" cut="000001" value="1"/>
+    <Prescale ctpid="210" cut="000001" value="1"/>
+    <Prescale ctpid="211" cut="000001" value="1"/>
+    <Prescale ctpid="212" cut="000001" value="1"/>
+    <Prescale ctpid="213" cut="000001" value="1"/>
+    <Prescale ctpid="214" cut="000001" value="1"/>
+    <Prescale ctpid="215" cut="000001" value="1"/>
+    <Prescale ctpid="216" cut="000001" value="1"/>
+    <Prescale ctpid="217" cut="000001" value="1"/>
+    <Prescale ctpid="218" cut="000001" value="1"/>
+    <Prescale ctpid="219" cut="000001" value="1"/>
+    <Prescale ctpid="220" cut="000001" value="1"/>
+    <Prescale ctpid="221" cut="000001" value="1"/>
+    <Prescale ctpid="222" cut="000001" value="1"/>
+    <Prescale ctpid="223" cut="000001" value="1"/>
+    <Prescale ctpid="224" cut="000001" value="1"/>
+    <Prescale ctpid="225" cut="000001" value="1"/>
+    <Prescale ctpid="226" cut="000001" value="1"/>
+    <Prescale ctpid="227" cut="000001" value="1"/>
+    <Prescale ctpid="228" cut="000001" value="1"/>
+    <Prescale ctpid="229" cut="000001" value="1"/>
+    <Prescale ctpid="230" cut="000001" value="1"/>
+    <Prescale ctpid="231" cut="000001" value="1"/>
+    <Prescale ctpid="232" cut="000001" value="1"/>
+    <Prescale ctpid="233" cut="000001" value="1"/>
+    <Prescale ctpid="234" cut="000001" value="1"/>
+    <Prescale ctpid="235" cut="000001" value="1"/>
+    <Prescale ctpid="236" cut="000001" value="1"/>
+    <Prescale ctpid="237" cut="000001" value="1"/>
+    <Prescale ctpid="238" cut="000001" value="1"/>
+    <Prescale ctpid="239" cut="000001" value="1"/>
+    <Prescale ctpid="240" cut="000001" value="1"/>
+    <Prescale ctpid="241" cut="000001" value="1"/>
+    <Prescale ctpid="242" cut="000001" value="1"/>
+    <Prescale ctpid="243" cut="000001" value="1"/>
+    <Prescale ctpid="244" cut="000001" value="1"/>
+    <Prescale ctpid="245" cut="000001" value="1"/>
+    <Prescale ctpid="246" cut="000001" value="1"/>
+    <Prescale ctpid="247" cut="000001" value="1"/>
+    <Prescale ctpid="248" cut="000001" value="1"/>
+    <Prescale ctpid="249" cut="000001" value="1"/>
+    <Prescale ctpid="250" cut="000001" value="1"/>
+    <Prescale ctpid="251" cut="000001" value="1"/>
+    <Prescale ctpid="252" cut="000001" value="1"/>
+    <Prescale ctpid="253" cut="000001" value="1"/>
+    <Prescale ctpid="254" cut="000001" value="1"/>
+    <Prescale ctpid="255" cut="000001" value="1"/>
+    <Prescale ctpid="256" cut="000001" value="1"/>
+    <Prescale ctpid="257" cut="000001" value="1"/>
+    <Prescale ctpid="258" cut="000001" value="1"/>
+    <Prescale ctpid="259" cut="000001" value="1"/>
+    <Prescale ctpid="260" cut="000001" value="1"/>
+    <Prescale ctpid="261" cut="000001" value="1"/>
+    <Prescale ctpid="262" cut="000001" value="1"/>
+    <Prescale ctpid="263" cut="000001" value="1"/>
+    <Prescale ctpid="264" cut="000001" value="1"/>
+    <Prescale ctpid="265" cut="000001" value="1"/>
+    <Prescale ctpid="266" cut="000001" value="1"/>
+    <Prescale ctpid="267" cut="000001" value="1"/>
+    <Prescale ctpid="268" cut="000001" value="1"/>
+    <Prescale ctpid="269" cut="000001" value="1"/>
+    <Prescale ctpid="270" cut="000001" value="1"/>
+    <Prescale ctpid="271" cut="000001" value="1"/>
+    <Prescale ctpid="272" cut="000001" value="1"/>
+    <Prescale ctpid="273" cut="000001" value="1"/>
+    <Prescale ctpid="274" cut="000001" value="1"/>
+    <Prescale ctpid="275" cut="000001" value="1"/>
+    <Prescale ctpid="276" cut="000001" value="1"/>
+    <Prescale ctpid="277" cut="000001" value="1"/>
+    <Prescale ctpid="278" cut="000001" value="1"/>
+    <Prescale ctpid="279" cut="000001" value="1"/>
+    <Prescale ctpid="280" cut="000001" value="1"/>
+    <Prescale ctpid="281" cut="000001" value="1"/>
+    <Prescale ctpid="282" cut="000001" value="1"/>
+    <Prescale ctpid="283" cut="000001" value="1"/>
+    <Prescale ctpid="284" cut="000001" value="1"/>
+    <Prescale ctpid="285" cut="000001" value="1"/>
+    <Prescale ctpid="286" cut="000001" value="1"/>
+    <Prescale ctpid="287" cut="000001" value="1"/>
+    <Prescale ctpid="288" cut="000001" value="1"/>
+    <Prescale ctpid="289" cut="000001" value="1"/>
+    <Prescale ctpid="290" cut="000001" value="1"/>
+    <Prescale ctpid="291" cut="000001" value="1"/>
+    <Prescale ctpid="292" cut="000001" value="1"/>
+    <Prescale ctpid="293" cut="000001" value="1"/>
+    <Prescale ctpid="294" cut="000001" value="1"/>
+    <Prescale ctpid="295" cut="000001" value="1"/>
+    <Prescale ctpid="296" cut="000001" value="1"/>
+    <Prescale ctpid="297" cut="000001" value="1"/>
+    <Prescale ctpid="298" cut="000001" value="1"/>
+    <Prescale ctpid="299" cut="000001" value="1"/>
+    <Prescale ctpid="300" cut="000001" value="1"/>
+    <Prescale ctpid="301" cut="000001" value="1"/>
+    <Prescale ctpid="302" cut="000001" value="1"/>
+    <Prescale ctpid="303" cut="000001" value="1"/>
+    <Prescale ctpid="304" cut="000001" value="1"/>
+    <Prescale ctpid="305" cut="000001" value="1"/>
+    <Prescale ctpid="306" cut="000001" value="1"/>
+    <Prescale ctpid="307" cut="000001" value="1"/>
+    <Prescale ctpid="308" cut="000001" value="1"/>
+    <Prescale ctpid="309" cut="000001" value="1"/>
+    <Prescale ctpid="310" cut="000001" value="1"/>
+    <Prescale ctpid="311" cut="000001" value="1"/>
+    <Prescale ctpid="312" cut="000001" value="1"/>
+    <Prescale ctpid="313" cut="000001" value="1"/>
+    <Prescale ctpid="314" cut="000001" value="1"/>
+    <Prescale ctpid="315" cut="000001" value="1"/>
+    <Prescale ctpid="316" cut="000001" value="1"/>
+    <Prescale ctpid="317" cut="000001" value="1"/>
+    <Prescale ctpid="318" cut="000001" value="1"/>
+    <Prescale ctpid="319" cut="000001" value="1"/>
+    <Prescale ctpid="320" cut="000001" value="1"/>
+    <Prescale ctpid="321" cut="000001" value="1"/>
+    <Prescale ctpid="322" cut="000001" value="1"/>
+    <Prescale ctpid="323" cut="000001" value="1"/>
+    <Prescale ctpid="324" cut="000001" value="1"/>
+    <Prescale ctpid="325" cut="000001" value="1"/>
+    <Prescale ctpid="326" cut="000001" value="1"/>
+    <Prescale ctpid="327" cut="000001" value="1"/>
+    <Prescale ctpid="328" cut="000001" value="1"/>
+    <Prescale ctpid="329" cut="000001" value="1"/>
+    <Prescale ctpid="330" cut="000001" value="1"/>
+    <Prescale ctpid="331" cut="000001" value="1"/>
+    <Prescale ctpid="332" cut="000001" value="1"/>
+    <Prescale ctpid="333" cut="000001" value="1"/>
+    <Prescale ctpid="334" cut="000001" value="1"/>
+    <Prescale ctpid="335" cut="000001" value="1"/>
+    <Prescale ctpid="336" cut="000001" value="1"/>
+    <Prescale ctpid="337" cut="000001" value="1"/>
+    <Prescale ctpid="338" cut="000001" value="1"/>
+    <Prescale ctpid="339" cut="000001" value="1"/>
+    <Prescale ctpid="340" cut="000001" value="1"/>
+    <Prescale ctpid="341" cut="000001" value="1"/>
+    <Prescale ctpid="342" cut="000001" value="1"/>
+    <Prescale ctpid="343" cut="000001" value="1"/>
+    <Prescale ctpid="344" cut="000001" value="1"/>
+    <Prescale ctpid="345" cut="000001" value="1"/>
+    <Prescale ctpid="346" cut="000001" value="1"/>
+    <Prescale ctpid="347" cut="000001" value="1"/>
+    <Prescale ctpid="348" cut="000001" value="1"/>
+    <Prescale ctpid="349" cut="000001" value="1"/>
+    <Prescale ctpid="350" cut="000001" value="1"/>
+    <Prescale ctpid="351" cut="000001" value="1"/>
+    <Prescale ctpid="352" cut="000001" value="1"/>
+    <Prescale ctpid="353" cut="000001" value="1"/>
+    <Prescale ctpid="354" cut="000001" value="1"/>
+    <Prescale ctpid="355" cut="000001" value="1"/>
+    <Prescale ctpid="356" cut="000001" value="1"/>
+    <Prescale ctpid="357" cut="000001" value="1"/>
+    <Prescale ctpid="358" cut="000001" value="1"/>
+    <Prescale ctpid="359" cut="000001" value="1"/>
+    <Prescale ctpid="360" cut="000001" value="1"/>
+    <Prescale ctpid="361" cut="000001" value="1"/>
+    <Prescale ctpid="362" cut="000001" value="1"/>
+    <Prescale ctpid="363" cut="000001" value="1"/>
+    <Prescale ctpid="364" cut="000001" value="1"/>
+    <Prescale ctpid="365" cut="000001" value="1"/>
+    <Prescale ctpid="366" cut="000001" value="1"/>
+    <Prescale ctpid="367" cut="000001" value="1"/>
+    <Prescale ctpid="368" cut="000001" value="1"/>
+    <Prescale ctpid="369" cut="000001" value="1"/>
+    <Prescale ctpid="370" cut="000001" value="1"/>
+    <Prescale ctpid="371" cut="000001" value="1"/>
+    <Prescale ctpid="372" cut="000001" value="1"/>
+    <Prescale ctpid="373" cut="000001" value="1"/>
+    <Prescale ctpid="374" cut="000001" value="1"/>
+    <Prescale ctpid="375" cut="000001" value="1"/>
+    <Prescale ctpid="376" cut="000001" value="1"/>
+    <Prescale ctpid="377" cut="000001" value="1"/>
+    <Prescale ctpid="378" cut="000001" value="1"/>
+    <Prescale ctpid="379" cut="000001" value="1"/>
+    <Prescale ctpid="380" cut="000001" value="1"/>
+    <Prescale ctpid="381" cut="000001" value="1"/>
+    <Prescale ctpid="382" cut="000001" value="1"/>
+    <Prescale ctpid="383" cut="000001" value="1"/>
+    <Prescale ctpid="384" cut="000001" value="1"/>
+    <Prescale ctpid="385" cut="000001" value="1"/>
+    <Prescale ctpid="386" cut="000001" value="1"/>
+    <Prescale ctpid="387" cut="000001" value="1"/>
+    <Prescale ctpid="388" cut="000001" value="1"/>
+    <Prescale ctpid="389" cut="000001" value="1"/>
+    <Prescale ctpid="390" cut="000001" value="1"/>
+    <Prescale ctpid="391" cut="000001" value="1"/>
+    <Prescale ctpid="392" cut="000001" value="1"/>
+    <Prescale ctpid="393" cut="000001" value="1"/>
+    <Prescale ctpid="394" cut="000001" value="1"/>
+    <Prescale ctpid="395" cut="000001" value="1"/>
+    <Prescale ctpid="396" cut="000001" value="1"/>
+    <Prescale ctpid="397" cut="000001" value="1"/>
+    <Prescale ctpid="398" cut="000001" value="1"/>
+    <Prescale ctpid="399" cut="000001" value="1"/>
+    <Prescale ctpid="400" cut="000001" value="1"/>
+    <Prescale ctpid="401" cut="000001" value="1"/>
+    <Prescale ctpid="402" cut="000001" value="1"/>
+    <Prescale ctpid="403" cut="000001" value="1"/>
+    <Prescale ctpid="404" cut="000001" value="1"/>
+    <Prescale ctpid="405" cut="000001" value="1"/>
+    <Prescale ctpid="406" cut="000001" value="1"/>
+    <Prescale ctpid="407" cut="000001" value="1"/>
+    <Prescale ctpid="408" cut="000001" value="1"/>
+    <Prescale ctpid="409" cut="000001" value="1"/>
+    <Prescale ctpid="410" cut="000001" value="1"/>
+    <Prescale ctpid="411" cut="000001" value="1"/>
+    <Prescale ctpid="412" cut="000001" value="1"/>
+    <Prescale ctpid="413" cut="000001" value="1"/>
+    <Prescale ctpid="414" cut="000001" value="1"/>
+    <Prescale ctpid="415" cut="000001" value="1"/>
+    <Prescale ctpid="416" cut="000001" value="1"/>
+    <Prescale ctpid="417" cut="000001" value="1"/>
+    <Prescale ctpid="418" cut="000001" value="1"/>
+    <Prescale ctpid="419" cut="000001" value="1"/>
+    <Prescale ctpid="420" cut="000001" value="1"/>
+    <Prescale ctpid="421" cut="000001" value="1"/>
+    <Prescale ctpid="422" cut="000001" value="1"/>
+    <Prescale ctpid="423" cut="000001" value="1"/>
+    <Prescale ctpid="424" cut="000001" value="1"/>
+    <Prescale ctpid="425" cut="000001" value="1"/>
+    <Prescale ctpid="426" cut="000001" value="1"/>
+    <Prescale ctpid="427" cut="000001" value="1"/>
+    <Prescale ctpid="428" cut="000001" value="1"/>
+    <Prescale ctpid="429" cut="000001" value="1"/>
+    <Prescale ctpid="430" cut="000001" value="1"/>
+    <Prescale ctpid="431" cut="000001" value="1"/>
+    <Prescale ctpid="432" cut="000001" value="1"/>
+    <Prescale ctpid="433" cut="000001" value="1"/>
+    <Prescale ctpid="434" cut="000001" value="1"/>
+    <Prescale ctpid="435" cut="000001" value="1"/>
+    <Prescale ctpid="436" cut="000001" value="1"/>
+    <Prescale ctpid="437" cut="000001" value="1"/>
+    <Prescale ctpid="438" cut="000001" value="1"/>
+    <Prescale ctpid="439" cut="000001" value="1"/>
+    <Prescale ctpid="440" cut="000001" value="1"/>
+    <Prescale ctpid="441" cut="000001" value="1"/>
+    <Prescale ctpid="442" cut="000001" value="1"/>
+    <Prescale ctpid="443" cut="000001" value="1"/>
+    <Prescale ctpid="444" cut="000001" value="1"/>
+    <Prescale ctpid="445" cut="000001" value="1"/>
+    <Prescale ctpid="446" cut="000001" value="1"/>
+    <Prescale ctpid="447" cut="000001" value="1"/>
+    <Prescale ctpid="448" cut="000001" value="1"/>
+    <Prescale ctpid="449" cut="000001" value="1"/>
+    <Prescale ctpid="450" cut="000001" value="1"/>
+    <Prescale ctpid="451" cut="000001" value="1"/>
+    <Prescale ctpid="452" cut="000001" value="1"/>
+    <Prescale ctpid="453" cut="000001" value="1"/>
+    <Prescale ctpid="454" cut="000001" value="1"/>
+    <Prescale ctpid="455" cut="000001" value="1"/>
+    <Prescale ctpid="456" cut="000001" value="1"/>
+    <Prescale ctpid="457" cut="000001" value="1"/>
+    <Prescale ctpid="458" cut="000001" value="1"/>
+    <Prescale ctpid="459" cut="000001" value="1"/>
+    <Prescale ctpid="460" cut="000001" value="1"/>
+    <Prescale ctpid="461" cut="000001" value="1"/>
+    <Prescale ctpid="462" cut="000001" value="1"/>
+    <Prescale ctpid="463" cut="000001" value="1"/>
+    <Prescale ctpid="464" cut="000001" value="1"/>
+    <Prescale ctpid="465" cut="000001" value="1"/>
+    <Prescale ctpid="466" cut="-000001" value="-1"/>
+    <Prescale ctpid="467" cut="000001" value="1"/>
+    <Prescale ctpid="468" cut="000001" value="1"/>
+    <Prescale ctpid="469" cut="000001" value="1"/>
+    <Prescale ctpid="470" cut="-000001" value="-1"/>
+    <Prescale ctpid="471" cut="-000001" value="-1"/>
+    <Prescale ctpid="472" cut="-000001" value="-1"/>
+    <Prescale ctpid="473" cut="-000001" value="-1"/>
+    <Prescale ctpid="474" cut="-000001" value="-1"/>
+    <Prescale ctpid="475" cut="-000001" value="-1"/>
+    <Prescale ctpid="476" cut="-000001" value="-1"/>
+    <Prescale ctpid="477" cut="-000001" value="-1"/>
+    <Prescale ctpid="478" cut="-000001" value="-1"/>
+    <Prescale ctpid="479" cut="-000001" value="-1"/>
+    <Prescale ctpid="480" cut="000001" value="1"/>
+    <Prescale ctpid="481" cut="-000001" value="-1"/>
+    <Prescale ctpid="482" cut="000001" value="1"/>
+    <Prescale ctpid="483" cut="000001" value="1"/>
+    <Prescale ctpid="484" cut="000001" value="1"/>
+    <Prescale ctpid="485" cut="000001" value="1"/>
+    <Prescale ctpid="486" cut="-000001" value="-1"/>
+    <Prescale ctpid="487" cut="000001" value="1"/>
+    <Prescale ctpid="488" cut="000001" value="1"/>
+    <Prescale ctpid="489" cut="000001" value="1"/>
+    <Prescale ctpid="490" cut="000001" value="1"/>
+    <Prescale ctpid="491" cut="000001" value="1"/>
+    <Prescale ctpid="492" cut="000001" value="1"/>
+    <Prescale ctpid="493" cut="000001" value="1"/>
+    <Prescale ctpid="494" cut="000001" value="1"/>
+    <Prescale ctpid="495" cut="000001" value="1"/>
+    <Prescale ctpid="496" cut="000001" value="1"/>
+    <Prescale ctpid="497" cut="000001" value="1"/>
+    <Prescale ctpid="498" cut="000001" value="1"/>
+    <Prescale ctpid="499" cut="000001" value="1"/>
+    <Prescale ctpid="500" cut="000001" value="1"/>
+    <Prescale ctpid="501" cut="000001" value="1"/>
+    <Prescale ctpid="502" cut="000001" value="1"/>
+    <Prescale ctpid="503" cut="000001" value="1"/>
+    <Prescale ctpid="504" cut="000001" value="1"/>
+    <Prescale ctpid="505" cut="000001" value="1"/>
+    <Prescale ctpid="506" cut="000001" value="1"/>
+    <Prescale ctpid="507" cut="000001" value="1"/>
+    <Prescale ctpid="508" cut="000001" value="1"/>
+    <Prescale ctpid="509" cut="-000001" value="-1"/>
+    <Prescale ctpid="510" cut="-000001" value="-1"/>
+    <Prescale ctpid="511" cut="000001" value="1"/>
+  </PrescaleSet>
+  <TriggerCounterList>
+    <TriggerCounter name="1AFP_FSA_LOG" type="CTPIN">
+      <TriggerCondition name="1AFP_FSA_LOG" triggerthreshold="AFP_FSA_LOG" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1AFP_FSA_SIT" type="CTPIN">
+      <TriggerCondition name="1AFP_FSA_SIT" triggerthreshold="AFP_FSA_SIT" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1AFP_FSA_TOF" type="CTPIN">
+      <TriggerCondition name="1AFP_FSA_TOF" triggerthreshold="AFP_FSA_TOF" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1AFP_FSC_LOG" type="CTPIN">
+      <TriggerCondition name="1AFP_FSC_LOG" triggerthreshold="AFP_FSC_LOG" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1AFP_FSC_SIT" type="CTPIN">
+      <TriggerCondition name="1AFP_FSC_SIT" triggerthreshold="AFP_FSC_SIT" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1AFP_FSC_TOF" type="CTPIN">
+      <TriggerCondition name="1AFP_FSC_TOF" triggerthreshold="AFP_FSC_TOF" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1AFP_NSA" type="CTPIN">
+      <TriggerCondition name="1AFP_NSA" triggerthreshold="AFP_NSA" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1AFP_NSC" type="CTPIN">
+      <TriggerCondition name="1AFP_NSC" triggerthreshold="AFP_NSC" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1BCM_AtoC" type="CTPIN">
+      <TriggerCondition name="1BCM_AtoC" triggerthreshold="BCM_AtoC" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1BCM_Comb" type="CTPIN">
+      <TriggerCondition name="1BCM_Comb" triggerthreshold="BCM_Comb" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2BCM_Comb" type="CTPIN">
+      <TriggerCondition name="2BCM_Comb" triggerthreshold="BCM_Comb" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3BCM_Comb" type="CTPIN">
+      <TriggerCondition name="3BCM_Comb" triggerthreshold="BCM_Comb" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4BCM_Comb" type="CTPIN">
+      <TriggerCondition name="4BCM_Comb" triggerthreshold="BCM_Comb" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5BCM_Comb" type="CTPIN">
+      <TriggerCondition name="5BCM_Comb" triggerthreshold="BCM_Comb" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6BCM_Comb" type="CTPIN">
+      <TriggerCondition name="6BCM_Comb" triggerthreshold="BCM_Comb" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7BCM_Comb" type="CTPIN">
+      <TriggerCondition name="7BCM_Comb" triggerthreshold="BCM_Comb" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1BCM_CtoA" type="CTPIN">
+      <TriggerCondition name="1BCM_CtoA" triggerthreshold="BCM_CtoA" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1BCM_Wide" type="CTPIN">
+      <TriggerCondition name="1BCM_Wide" triggerthreshold="BCM_Wide" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1BPTX0" type="CTPIN">
+      <TriggerCondition name="1BPTX0" triggerthreshold="BPTX0" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1BPTX1" type="CTPIN">
+      <TriggerCondition name="1BPTX1" triggerthreshold="BPTX1" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1CAL0" type="CTPIN">
+      <TriggerCondition name="1CAL0" triggerthreshold="CAL0" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1CAL1" type="CTPIN">
+      <TriggerCondition name="1CAL1" triggerthreshold="CAL1" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1CAL2" type="CTPIN">
+      <TriggerCondition name="1CAL2" triggerthreshold="CAL2" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1EM10VH" type="CTPIN">
+      <TriggerCondition name="1EM10VH" triggerthreshold="EM10VH" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2EM10VH" type="CTPIN">
+      <TriggerCondition name="2EM10VH" triggerthreshold="EM10VH" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3EM10VH" type="CTPIN">
+      <TriggerCondition name="3EM10VH" triggerthreshold="EM10VH" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4EM10VH" type="CTPIN">
+      <TriggerCondition name="4EM10VH" triggerthreshold="EM10VH" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5EM10VH" type="CTPIN">
+      <TriggerCondition name="5EM10VH" triggerthreshold="EM10VH" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6EM10VH" type="CTPIN">
+      <TriggerCondition name="6EM10VH" triggerthreshold="EM10VH" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7EM10VH" type="CTPIN">
+      <TriggerCondition name="7EM10VH" triggerthreshold="EM10VH" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1EM12" type="CTPIN">
+      <TriggerCondition name="1EM12" triggerthreshold="EM12" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2EM12" type="CTPIN">
+      <TriggerCondition name="2EM12" triggerthreshold="EM12" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3EM12" type="CTPIN">
+      <TriggerCondition name="3EM12" triggerthreshold="EM12" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4EM12" type="CTPIN">
+      <TriggerCondition name="4EM12" triggerthreshold="EM12" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5EM12" type="CTPIN">
+      <TriggerCondition name="5EM12" triggerthreshold="EM12" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6EM12" type="CTPIN">
+      <TriggerCondition name="6EM12" triggerthreshold="EM12" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7EM12" type="CTPIN">
+      <TriggerCondition name="7EM12" triggerthreshold="EM12" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1EM15" type="CTPIN">
+      <TriggerCondition name="1EM15" triggerthreshold="EM15" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2EM15" type="CTPIN">
+      <TriggerCondition name="2EM15" triggerthreshold="EM15" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3EM15" type="CTPIN">
+      <TriggerCondition name="3EM15" triggerthreshold="EM15" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4EM15" type="CTPIN">
+      <TriggerCondition name="4EM15" triggerthreshold="EM15" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5EM15" type="CTPIN">
+      <TriggerCondition name="5EM15" triggerthreshold="EM15" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6EM15" type="CTPIN">
+      <TriggerCondition name="6EM15" triggerthreshold="EM15" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7EM15" type="CTPIN">
+      <TriggerCondition name="7EM15" triggerthreshold="EM15" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1EM15VH" type="CTPIN">
+      <TriggerCondition name="1EM15VH" triggerthreshold="EM15VH" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2EM15VH" type="CTPIN">
+      <TriggerCondition name="2EM15VH" triggerthreshold="EM15VH" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3EM15VH" type="CTPIN">
+      <TriggerCondition name="3EM15VH" triggerthreshold="EM15VH" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4EM15VH" type="CTPIN">
+      <TriggerCondition name="4EM15VH" triggerthreshold="EM15VH" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5EM15VH" type="CTPIN">
+      <TriggerCondition name="5EM15VH" triggerthreshold="EM15VH" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6EM15VH" type="CTPIN">
+      <TriggerCondition name="6EM15VH" triggerthreshold="EM15VH" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7EM15VH" type="CTPIN">
+      <TriggerCondition name="7EM15VH" triggerthreshold="EM15VH" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1EM15VHI" type="CTPIN">
+      <TriggerCondition name="1EM15VHI" triggerthreshold="EM15VHI" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2EM15VHI" type="CTPIN">
+      <TriggerCondition name="2EM15VHI" triggerthreshold="EM15VHI" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3EM15VHI" type="CTPIN">
+      <TriggerCondition name="3EM15VHI" triggerthreshold="EM15VHI" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4EM15VHI" type="CTPIN">
+      <TriggerCondition name="4EM15VHI" triggerthreshold="EM15VHI" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5EM15VHI" type="CTPIN">
+      <TriggerCondition name="5EM15VHI" triggerthreshold="EM15VHI" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6EM15VHI" type="CTPIN">
+      <TriggerCondition name="6EM15VHI" triggerthreshold="EM15VHI" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7EM15VHI" type="CTPIN">
+      <TriggerCondition name="7EM15VHI" triggerthreshold="EM15VHI" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1EM18VHI" type="CTPIN">
+      <TriggerCondition name="1EM18VHI" triggerthreshold="EM18VHI" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2EM18VHI" type="CTPIN">
+      <TriggerCondition name="2EM18VHI" triggerthreshold="EM18VHI" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3EM18VHI" type="CTPIN">
+      <TriggerCondition name="3EM18VHI" triggerthreshold="EM18VHI" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4EM18VHI" type="CTPIN">
+      <TriggerCondition name="4EM18VHI" triggerthreshold="EM18VHI" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5EM18VHI" type="CTPIN">
+      <TriggerCondition name="5EM18VHI" triggerthreshold="EM18VHI" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6EM18VHI" type="CTPIN">
+      <TriggerCondition name="6EM18VHI" triggerthreshold="EM18VHI" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7EM18VHI" type="CTPIN">
+      <TriggerCondition name="7EM18VHI" triggerthreshold="EM18VHI" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1EM20VH" type="CTPIN">
+      <TriggerCondition name="1EM20VH" triggerthreshold="EM20VH" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2EM20VH" type="CTPIN">
+      <TriggerCondition name="2EM20VH" triggerthreshold="EM20VH" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3EM20VH" type="CTPIN">
+      <TriggerCondition name="3EM20VH" triggerthreshold="EM20VH" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4EM20VH" type="CTPIN">
+      <TriggerCondition name="4EM20VH" triggerthreshold="EM20VH" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5EM20VH" type="CTPIN">
+      <TriggerCondition name="5EM20VH" triggerthreshold="EM20VH" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6EM20VH" type="CTPIN">
+      <TriggerCondition name="6EM20VH" triggerthreshold="EM20VH" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7EM20VH" type="CTPIN">
+      <TriggerCondition name="7EM20VH" triggerthreshold="EM20VH" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1EM20VHI" type="CTPIN">
+      <TriggerCondition name="1EM20VHI" triggerthreshold="EM20VHI" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2EM20VHI" type="CTPIN">
+      <TriggerCondition name="2EM20VHI" triggerthreshold="EM20VHI" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3EM20VHI" type="CTPIN">
+      <TriggerCondition name="3EM20VHI" triggerthreshold="EM20VHI" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4EM20VHI" type="CTPIN">
+      <TriggerCondition name="4EM20VHI" triggerthreshold="EM20VHI" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5EM20VHI" type="CTPIN">
+      <TriggerCondition name="5EM20VHI" triggerthreshold="EM20VHI" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6EM20VHI" type="CTPIN">
+      <TriggerCondition name="6EM20VHI" triggerthreshold="EM20VHI" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7EM20VHI" type="CTPIN">
+      <TriggerCondition name="7EM20VHI" triggerthreshold="EM20VHI" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1EM22VHI" type="CTPIN">
+      <TriggerCondition name="1EM22VHI" triggerthreshold="EM22VHI" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2EM22VHI" type="CTPIN">
+      <TriggerCondition name="2EM22VHI" triggerthreshold="EM22VHI" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3EM22VHI" type="CTPIN">
+      <TriggerCondition name="3EM22VHI" triggerthreshold="EM22VHI" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4EM22VHI" type="CTPIN">
+      <TriggerCondition name="4EM22VHI" triggerthreshold="EM22VHI" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5EM22VHI" type="CTPIN">
+      <TriggerCondition name="5EM22VHI" triggerthreshold="EM22VHI" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6EM22VHI" type="CTPIN">
+      <TriggerCondition name="6EM22VHI" triggerthreshold="EM22VHI" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7EM22VHI" type="CTPIN">
+      <TriggerCondition name="7EM22VHI" triggerthreshold="EM22VHI" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1EM22VHIM" type="CTPIN">
+      <TriggerCondition name="1EM22VHIM" triggerthreshold="EM22VHIM" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2EM22VHIM" type="CTPIN">
+      <TriggerCondition name="2EM22VHIM" triggerthreshold="EM22VHIM" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3EM22VHIM" type="CTPIN">
+      <TriggerCondition name="3EM22VHIM" triggerthreshold="EM22VHIM" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4EM22VHIM" type="CTPIN">
+      <TriggerCondition name="4EM22VHIM" triggerthreshold="EM22VHIM" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5EM22VHIM" type="CTPIN">
+      <TriggerCondition name="5EM22VHIM" triggerthreshold="EM22VHIM" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6EM22VHIM" type="CTPIN">
+      <TriggerCondition name="6EM22VHIM" triggerthreshold="EM22VHIM" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7EM22VHIM" type="CTPIN">
+      <TriggerCondition name="7EM22VHIM" triggerthreshold="EM22VHIM" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1EM24VHI" type="CTPIN">
+      <TriggerCondition name="1EM24VHI" triggerthreshold="EM24VHI" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2EM24VHI" type="CTPIN">
+      <TriggerCondition name="2EM24VHI" triggerthreshold="EM24VHI" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3EM24VHI" type="CTPIN">
+      <TriggerCondition name="3EM24VHI" triggerthreshold="EM24VHI" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4EM24VHI" type="CTPIN">
+      <TriggerCondition name="4EM24VHI" triggerthreshold="EM24VHI" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5EM24VHI" type="CTPIN">
+      <TriggerCondition name="5EM24VHI" triggerthreshold="EM24VHI" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6EM24VHI" type="CTPIN">
+      <TriggerCondition name="6EM24VHI" triggerthreshold="EM24VHI" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7EM24VHI" type="CTPIN">
+      <TriggerCondition name="7EM24VHI" triggerthreshold="EM24VHI" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1EM24VHIM" type="CTPIN">
+      <TriggerCondition name="1EM24VHIM" triggerthreshold="EM24VHIM" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2EM24VHIM" type="CTPIN">
+      <TriggerCondition name="2EM24VHIM" triggerthreshold="EM24VHIM" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3EM24VHIM" type="CTPIN">
+      <TriggerCondition name="3EM24VHIM" triggerthreshold="EM24VHIM" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4EM24VHIM" type="CTPIN">
+      <TriggerCondition name="4EM24VHIM" triggerthreshold="EM24VHIM" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5EM24VHIM" type="CTPIN">
+      <TriggerCondition name="5EM24VHIM" triggerthreshold="EM24VHIM" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6EM24VHIM" type="CTPIN">
+      <TriggerCondition name="6EM24VHIM" triggerthreshold="EM24VHIM" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7EM24VHIM" type="CTPIN">
+      <TriggerCondition name="7EM24VHIM" triggerthreshold="EM24VHIM" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1EM3" type="CTPIN">
+      <TriggerCondition name="1EM3" triggerthreshold="EM3" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1EM3" type="CTPMON">
+      <TriggerCondition name="1EM3" triggerthreshold="EM3" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2EM3" type="CTPIN">
+      <TriggerCondition name="2EM3" triggerthreshold="EM3" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3EM3" type="CTPIN">
+      <TriggerCondition name="3EM3" triggerthreshold="EM3" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4EM3" type="CTPIN">
+      <TriggerCondition name="4EM3" triggerthreshold="EM3" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5EM3" type="CTPIN">
+      <TriggerCondition name="5EM3" triggerthreshold="EM3" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6EM3" type="CTPIN">
+      <TriggerCondition name="6EM3" triggerthreshold="EM3" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7EM3" type="CTPIN">
+      <TriggerCondition name="7EM3" triggerthreshold="EM3" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1EM7" type="CTPIN">
+      <TriggerCondition name="1EM7" triggerthreshold="EM7" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2EM7" type="CTPIN">
+      <TriggerCondition name="2EM7" triggerthreshold="EM7" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3EM7" type="CTPIN">
+      <TriggerCondition name="3EM7" triggerthreshold="EM7" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4EM7" type="CTPIN">
+      <TriggerCondition name="4EM7" triggerthreshold="EM7" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5EM7" type="CTPIN">
+      <TriggerCondition name="5EM7" triggerthreshold="EM7" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6EM7" type="CTPIN">
+      <TriggerCondition name="6EM7" triggerthreshold="EM7" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7EM7" type="CTPIN">
+      <TriggerCondition name="7EM7" triggerthreshold="EM7" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1EM8I" type="CTPIN">
+      <TriggerCondition name="1EM8I" triggerthreshold="EM8I" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2EM8I" type="CTPIN">
+      <TriggerCondition name="2EM8I" triggerthreshold="EM8I" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3EM8I" type="CTPIN">
+      <TriggerCondition name="3EM8I" triggerthreshold="EM8I" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4EM8I" type="CTPIN">
+      <TriggerCondition name="4EM8I" triggerthreshold="EM8I" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5EM8I" type="CTPIN">
+      <TriggerCondition name="5EM8I" triggerthreshold="EM8I" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6EM8I" type="CTPIN">
+      <TriggerCondition name="6EM8I" triggerthreshold="EM8I" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7EM8I" type="CTPIN">
+      <TriggerCondition name="7EM8I" triggerthreshold="EM8I" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1EM8VH" type="CTPIN">
+      <TriggerCondition name="1EM8VH" triggerthreshold="EM8VH" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2EM8VH" type="CTPIN">
+      <TriggerCondition name="2EM8VH" triggerthreshold="EM8VH" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3EM8VH" type="CTPIN">
+      <TriggerCondition name="3EM8VH" triggerthreshold="EM8VH" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4EM8VH" type="CTPIN">
+      <TriggerCondition name="4EM8VH" triggerthreshold="EM8VH" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5EM8VH" type="CTPIN">
+      <TriggerCondition name="5EM8VH" triggerthreshold="EM8VH" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6EM8VH" type="CTPIN">
+      <TriggerCondition name="6EM8VH" triggerthreshold="EM8VH" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7EM8VH" type="CTPIN">
+      <TriggerCondition name="7EM8VH" triggerthreshold="EM8VH" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1HA100" type="CTPIN">
+      <TriggerCondition name="1HA100" triggerthreshold="HA100" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2HA100" type="CTPIN">
+      <TriggerCondition name="2HA100" triggerthreshold="HA100" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3HA100" type="CTPIN">
+      <TriggerCondition name="3HA100" triggerthreshold="HA100" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4HA100" type="CTPIN">
+      <TriggerCondition name="4HA100" triggerthreshold="HA100" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5HA100" type="CTPIN">
+      <TriggerCondition name="5HA100" triggerthreshold="HA100" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6HA100" type="CTPIN">
+      <TriggerCondition name="6HA100" triggerthreshold="HA100" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7HA100" type="CTPIN">
+      <TriggerCondition name="7HA100" triggerthreshold="HA100" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1HA12" type="CTPIN">
+      <TriggerCondition name="1HA12" triggerthreshold="HA12" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2HA12" type="CTPIN">
+      <TriggerCondition name="2HA12" triggerthreshold="HA12" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3HA12" type="CTPIN">
+      <TriggerCondition name="3HA12" triggerthreshold="HA12" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4HA12" type="CTPIN">
+      <TriggerCondition name="4HA12" triggerthreshold="HA12" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5HA12" type="CTPIN">
+      <TriggerCondition name="5HA12" triggerthreshold="HA12" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6HA12" type="CTPIN">
+      <TriggerCondition name="6HA12" triggerthreshold="HA12" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7HA12" type="CTPIN">
+      <TriggerCondition name="7HA12" triggerthreshold="HA12" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1HA12IL" type="CTPIN">
+      <TriggerCondition name="1HA12IL" triggerthreshold="HA12IL" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2HA12IL" type="CTPIN">
+      <TriggerCondition name="2HA12IL" triggerthreshold="HA12IL" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3HA12IL" type="CTPIN">
+      <TriggerCondition name="3HA12IL" triggerthreshold="HA12IL" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4HA12IL" type="CTPIN">
+      <TriggerCondition name="4HA12IL" triggerthreshold="HA12IL" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5HA12IL" type="CTPIN">
+      <TriggerCondition name="5HA12IL" triggerthreshold="HA12IL" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6HA12IL" type="CTPIN">
+      <TriggerCondition name="6HA12IL" triggerthreshold="HA12IL" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7HA12IL" type="CTPIN">
+      <TriggerCondition name="7HA12IL" triggerthreshold="HA12IL" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1HA12IM" type="CTPIN">
+      <TriggerCondition name="1HA12IM" triggerthreshold="HA12IM" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2HA12IM" type="CTPIN">
+      <TriggerCondition name="2HA12IM" triggerthreshold="HA12IM" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3HA12IM" type="CTPIN">
+      <TriggerCondition name="3HA12IM" triggerthreshold="HA12IM" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4HA12IM" type="CTPIN">
+      <TriggerCondition name="4HA12IM" triggerthreshold="HA12IM" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5HA12IM" type="CTPIN">
+      <TriggerCondition name="5HA12IM" triggerthreshold="HA12IM" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6HA12IM" type="CTPIN">
+      <TriggerCondition name="6HA12IM" triggerthreshold="HA12IM" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7HA12IM" type="CTPIN">
+      <TriggerCondition name="7HA12IM" triggerthreshold="HA12IM" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1HA12IT" type="CTPIN">
+      <TriggerCondition name="1HA12IT" triggerthreshold="HA12IT" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2HA12IT" type="CTPIN">
+      <TriggerCondition name="2HA12IT" triggerthreshold="HA12IT" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3HA12IT" type="CTPIN">
+      <TriggerCondition name="3HA12IT" triggerthreshold="HA12IT" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4HA12IT" type="CTPIN">
+      <TriggerCondition name="4HA12IT" triggerthreshold="HA12IT" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5HA12IT" type="CTPIN">
+      <TriggerCondition name="5HA12IT" triggerthreshold="HA12IT" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6HA12IT" type="CTPIN">
+      <TriggerCondition name="6HA12IT" triggerthreshold="HA12IT" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7HA12IT" type="CTPIN">
+      <TriggerCondition name="7HA12IT" triggerthreshold="HA12IT" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1HA15" type="CTPIN">
+      <TriggerCondition name="1HA15" triggerthreshold="HA15" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2HA15" type="CTPIN">
+      <TriggerCondition name="2HA15" triggerthreshold="HA15" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3HA15" type="CTPIN">
+      <TriggerCondition name="3HA15" triggerthreshold="HA15" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4HA15" type="CTPIN">
+      <TriggerCondition name="4HA15" triggerthreshold="HA15" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5HA15" type="CTPIN">
+      <TriggerCondition name="5HA15" triggerthreshold="HA15" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6HA15" type="CTPIN">
+      <TriggerCondition name="6HA15" triggerthreshold="HA15" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7HA15" type="CTPIN">
+      <TriggerCondition name="7HA15" triggerthreshold="HA15" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1HA20" type="CTPIN">
+      <TriggerCondition name="1HA20" triggerthreshold="HA20" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2HA20" type="CTPIN">
+      <TriggerCondition name="2HA20" triggerthreshold="HA20" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3HA20" type="CTPIN">
+      <TriggerCondition name="3HA20" triggerthreshold="HA20" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4HA20" type="CTPIN">
+      <TriggerCondition name="4HA20" triggerthreshold="HA20" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5HA20" type="CTPIN">
+      <TriggerCondition name="5HA20" triggerthreshold="HA20" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6HA20" type="CTPIN">
+      <TriggerCondition name="6HA20" triggerthreshold="HA20" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7HA20" type="CTPIN">
+      <TriggerCondition name="7HA20" triggerthreshold="HA20" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1HA20IL" type="CTPIN">
+      <TriggerCondition name="1HA20IL" triggerthreshold="HA20IL" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2HA20IL" type="CTPIN">
+      <TriggerCondition name="2HA20IL" triggerthreshold="HA20IL" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3HA20IL" type="CTPIN">
+      <TriggerCondition name="3HA20IL" triggerthreshold="HA20IL" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4HA20IL" type="CTPIN">
+      <TriggerCondition name="4HA20IL" triggerthreshold="HA20IL" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5HA20IL" type="CTPIN">
+      <TriggerCondition name="5HA20IL" triggerthreshold="HA20IL" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6HA20IL" type="CTPIN">
+      <TriggerCondition name="6HA20IL" triggerthreshold="HA20IL" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7HA20IL" type="CTPIN">
+      <TriggerCondition name="7HA20IL" triggerthreshold="HA20IL" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1HA20IM" type="CTPIN">
+      <TriggerCondition name="1HA20IM" triggerthreshold="HA20IM" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2HA20IM" type="CTPIN">
+      <TriggerCondition name="2HA20IM" triggerthreshold="HA20IM" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3HA20IM" type="CTPIN">
+      <TriggerCondition name="3HA20IM" triggerthreshold="HA20IM" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4HA20IM" type="CTPIN">
+      <TriggerCondition name="4HA20IM" triggerthreshold="HA20IM" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5HA20IM" type="CTPIN">
+      <TriggerCondition name="5HA20IM" triggerthreshold="HA20IM" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6HA20IM" type="CTPIN">
+      <TriggerCondition name="6HA20IM" triggerthreshold="HA20IM" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7HA20IM" type="CTPIN">
+      <TriggerCondition name="7HA20IM" triggerthreshold="HA20IM" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1HA20IT" type="CTPIN">
+      <TriggerCondition name="1HA20IT" triggerthreshold="HA20IT" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2HA20IT" type="CTPIN">
+      <TriggerCondition name="2HA20IT" triggerthreshold="HA20IT" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3HA20IT" type="CTPIN">
+      <TriggerCondition name="3HA20IT" triggerthreshold="HA20IT" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4HA20IT" type="CTPIN">
+      <TriggerCondition name="4HA20IT" triggerthreshold="HA20IT" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5HA20IT" type="CTPIN">
+      <TriggerCondition name="5HA20IT" triggerthreshold="HA20IT" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6HA20IT" type="CTPIN">
+      <TriggerCondition name="6HA20IT" triggerthreshold="HA20IT" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7HA20IT" type="CTPIN">
+      <TriggerCondition name="7HA20IT" triggerthreshold="HA20IT" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1HA25" type="CTPIN">
+      <TriggerCondition name="1HA25" triggerthreshold="HA25" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2HA25" type="CTPIN">
+      <TriggerCondition name="2HA25" triggerthreshold="HA25" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3HA25" type="CTPIN">
+      <TriggerCondition name="3HA25" triggerthreshold="HA25" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4HA25" type="CTPIN">
+      <TriggerCondition name="4HA25" triggerthreshold="HA25" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5HA25" type="CTPIN">
+      <TriggerCondition name="5HA25" triggerthreshold="HA25" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6HA25" type="CTPIN">
+      <TriggerCondition name="6HA25" triggerthreshold="HA25" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7HA25" type="CTPIN">
+      <TriggerCondition name="7HA25" triggerthreshold="HA25" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1HA25IM" type="CTPIN">
+      <TriggerCondition name="1HA25IM" triggerthreshold="HA25IM" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2HA25IM" type="CTPIN">
+      <TriggerCondition name="2HA25IM" triggerthreshold="HA25IM" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3HA25IM" type="CTPIN">
+      <TriggerCondition name="3HA25IM" triggerthreshold="HA25IM" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4HA25IM" type="CTPIN">
+      <TriggerCondition name="4HA25IM" triggerthreshold="HA25IM" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5HA25IM" type="CTPIN">
+      <TriggerCondition name="5HA25IM" triggerthreshold="HA25IM" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6HA25IM" type="CTPIN">
+      <TriggerCondition name="6HA25IM" triggerthreshold="HA25IM" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7HA25IM" type="CTPIN">
+      <TriggerCondition name="7HA25IM" triggerthreshold="HA25IM" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1HA30" type="CTPIN">
+      <TriggerCondition name="1HA30" triggerthreshold="HA30" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2HA30" type="CTPIN">
+      <TriggerCondition name="2HA30" triggerthreshold="HA30" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3HA30" type="CTPIN">
+      <TriggerCondition name="3HA30" triggerthreshold="HA30" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4HA30" type="CTPIN">
+      <TriggerCondition name="4HA30" triggerthreshold="HA30" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5HA30" type="CTPIN">
+      <TriggerCondition name="5HA30" triggerthreshold="HA30" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6HA30" type="CTPIN">
+      <TriggerCondition name="6HA30" triggerthreshold="HA30" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7HA30" type="CTPIN">
+      <TriggerCondition name="7HA30" triggerthreshold="HA30" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1HA40" type="CTPIN">
+      <TriggerCondition name="1HA40" triggerthreshold="HA40" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2HA40" type="CTPIN">
+      <TriggerCondition name="2HA40" triggerthreshold="HA40" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3HA40" type="CTPIN">
+      <TriggerCondition name="3HA40" triggerthreshold="HA40" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4HA40" type="CTPIN">
+      <TriggerCondition name="4HA40" triggerthreshold="HA40" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5HA40" type="CTPIN">
+      <TriggerCondition name="5HA40" triggerthreshold="HA40" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6HA40" type="CTPIN">
+      <TriggerCondition name="6HA40" triggerthreshold="HA40" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7HA40" type="CTPIN">
+      <TriggerCondition name="7HA40" triggerthreshold="HA40" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1HA60" type="CTPIN">
+      <TriggerCondition name="1HA60" triggerthreshold="HA60" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2HA60" type="CTPIN">
+      <TriggerCondition name="2HA60" triggerthreshold="HA60" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3HA60" type="CTPIN">
+      <TriggerCondition name="3HA60" triggerthreshold="HA60" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4HA60" type="CTPIN">
+      <TriggerCondition name="4HA60" triggerthreshold="HA60" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5HA60" type="CTPIN">
+      <TriggerCondition name="5HA60" triggerthreshold="HA60" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6HA60" type="CTPIN">
+      <TriggerCondition name="6HA60" triggerthreshold="HA60" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7HA60" type="CTPIN">
+      <TriggerCondition name="7HA60" triggerthreshold="HA60" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1HA8" type="CTPIN">
+      <TriggerCondition name="1HA8" triggerthreshold="HA8" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2HA8" type="CTPIN">
+      <TriggerCondition name="2HA8" triggerthreshold="HA8" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3HA8" type="CTPIN">
+      <TriggerCondition name="3HA8" triggerthreshold="HA8" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4HA8" type="CTPIN">
+      <TriggerCondition name="4HA8" triggerthreshold="HA8" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5HA8" type="CTPIN">
+      <TriggerCondition name="5HA8" triggerthreshold="HA8" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6HA8" type="CTPIN">
+      <TriggerCondition name="6HA8" triggerthreshold="HA8" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7HA8" type="CTPIN">
+      <TriggerCondition name="7HA8" triggerthreshold="HA8" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1J100" type="CTPIN">
+      <TriggerCondition name="1J100" triggerthreshold="J100" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2J100" type="CTPIN">
+      <TriggerCondition name="2J100" triggerthreshold="J100" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3J100" type="CTPIN">
+      <TriggerCondition name="3J100" triggerthreshold="J100" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="1J100.31ETA49" type="CTPIN">
+      <TriggerCondition name="1J100.31ETA49" triggerthreshold="J100.31ETA49" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2J100.31ETA49" type="CTPIN">
+      <TriggerCondition name="2J100.31ETA49" triggerthreshold="J100.31ETA49" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3J100.31ETA49" type="CTPIN">
+      <TriggerCondition name="3J100.31ETA49" triggerthreshold="J100.31ETA49" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="1J12" type="CTPIN">
+      <TriggerCondition name="1J12" triggerthreshold="J12" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2J12" type="CTPIN">
+      <TriggerCondition name="2J12" triggerthreshold="J12" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3J12" type="CTPIN">
+      <TriggerCondition name="3J12" triggerthreshold="J12" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4J12" type="CTPIN">
+      <TriggerCondition name="4J12" triggerthreshold="J12" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5J12" type="CTPIN">
+      <TriggerCondition name="5J12" triggerthreshold="J12" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6J12" type="CTPIN">
+      <TriggerCondition name="6J12" triggerthreshold="J12" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7J12" type="CTPIN">
+      <TriggerCondition name="7J12" triggerthreshold="J12" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1J120" type="CTPIN">
+      <TriggerCondition name="1J120" triggerthreshold="J120" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2J120" type="CTPIN">
+      <TriggerCondition name="2J120" triggerthreshold="J120" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3J120" type="CTPIN">
+      <TriggerCondition name="3J120" triggerthreshold="J120" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="1J15" type="CTPIN">
+      <TriggerCondition name="1J15" triggerthreshold="J15" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2J15" type="CTPIN">
+      <TriggerCondition name="2J15" triggerthreshold="J15" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3J15" type="CTPIN">
+      <TriggerCondition name="3J15" triggerthreshold="J15" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4J15" type="CTPIN">
+      <TriggerCondition name="4J15" triggerthreshold="J15" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5J15" type="CTPIN">
+      <TriggerCondition name="5J15" triggerthreshold="J15" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6J15" type="CTPIN">
+      <TriggerCondition name="6J15" triggerthreshold="J15" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7J15" type="CTPIN">
+      <TriggerCondition name="7J15" triggerthreshold="J15" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1J15.0ETA25" type="CTPIN">
+      <TriggerCondition name="1J15.0ETA25" triggerthreshold="J15.0ETA25" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2J15.0ETA25" type="CTPIN">
+      <TriggerCondition name="2J15.0ETA25" triggerthreshold="J15.0ETA25" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3J15.0ETA25" type="CTPIN">
+      <TriggerCondition name="3J15.0ETA25" triggerthreshold="J15.0ETA25" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4J15.0ETA25" type="CTPIN">
+      <TriggerCondition name="4J15.0ETA25" triggerthreshold="J15.0ETA25" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5J15.0ETA25" type="CTPIN">
+      <TriggerCondition name="5J15.0ETA25" triggerthreshold="J15.0ETA25" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6J15.0ETA25" type="CTPIN">
+      <TriggerCondition name="6J15.0ETA25" triggerthreshold="J15.0ETA25" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7J15.0ETA25" type="CTPIN">
+      <TriggerCondition name="7J15.0ETA25" triggerthreshold="J15.0ETA25" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1J15.31ETA49" type="CTPIN">
+      <TriggerCondition name="1J15.31ETA49" triggerthreshold="J15.31ETA49" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2J15.31ETA49" type="CTPIN">
+      <TriggerCondition name="2J15.31ETA49" triggerthreshold="J15.31ETA49" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3J15.31ETA49" type="CTPIN">
+      <TriggerCondition name="3J15.31ETA49" triggerthreshold="J15.31ETA49" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="1J20" type="CTPIN">
+      <TriggerCondition name="1J20" triggerthreshold="J20" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2J20" type="CTPIN">
+      <TriggerCondition name="2J20" triggerthreshold="J20" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3J20" type="CTPIN">
+      <TriggerCondition name="3J20" triggerthreshold="J20" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4J20" type="CTPIN">
+      <TriggerCondition name="4J20" triggerthreshold="J20" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5J20" type="CTPIN">
+      <TriggerCondition name="5J20" triggerthreshold="J20" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6J20" type="CTPIN">
+      <TriggerCondition name="6J20" triggerthreshold="J20" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7J20" type="CTPIN">
+      <TriggerCondition name="7J20" triggerthreshold="J20" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1J20.28ETA31" type="CTPIN">
+      <TriggerCondition name="1J20.28ETA31" triggerthreshold="J20.28ETA31" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2J20.28ETA31" type="CTPIN">
+      <TriggerCondition name="2J20.28ETA31" triggerthreshold="J20.28ETA31" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3J20.28ETA31" type="CTPIN">
+      <TriggerCondition name="3J20.28ETA31" triggerthreshold="J20.28ETA31" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="1J20.31ETA49" type="CTPIN">
+      <TriggerCondition name="1J20.31ETA49" triggerthreshold="J20.31ETA49" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2J20.31ETA49" type="CTPIN">
+      <TriggerCondition name="2J20.31ETA49" triggerthreshold="J20.31ETA49" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3J20.31ETA49" type="CTPIN">
+      <TriggerCondition name="3J20.31ETA49" triggerthreshold="J20.31ETA49" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="1J25" type="CTPIN">
+      <TriggerCondition name="1J25" triggerthreshold="J25" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2J25" type="CTPIN">
+      <TriggerCondition name="2J25" triggerthreshold="J25" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3J25" type="CTPIN">
+      <TriggerCondition name="3J25" triggerthreshold="J25" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4J25" type="CTPIN">
+      <TriggerCondition name="4J25" triggerthreshold="J25" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5J25" type="CTPIN">
+      <TriggerCondition name="5J25" triggerthreshold="J25" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6J25" type="CTPIN">
+      <TriggerCondition name="6J25" triggerthreshold="J25" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7J25" type="CTPIN">
+      <TriggerCondition name="7J25" triggerthreshold="J25" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1J25.0ETA23" type="CTPIN">
+      <TriggerCondition name="1J25.0ETA23" triggerthreshold="J25.0ETA23" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2J25.0ETA23" type="CTPIN">
+      <TriggerCondition name="2J25.0ETA23" triggerthreshold="J25.0ETA23" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3J25.0ETA23" type="CTPIN">
+      <TriggerCondition name="3J25.0ETA23" triggerthreshold="J25.0ETA23" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4J25.0ETA23" type="CTPIN">
+      <TriggerCondition name="4J25.0ETA23" triggerthreshold="J25.0ETA23" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5J25.0ETA23" type="CTPIN">
+      <TriggerCondition name="5J25.0ETA23" triggerthreshold="J25.0ETA23" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6J25.0ETA23" type="CTPIN">
+      <TriggerCondition name="6J25.0ETA23" triggerthreshold="J25.0ETA23" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7J25.0ETA23" type="CTPIN">
+      <TriggerCondition name="7J25.0ETA23" triggerthreshold="J25.0ETA23" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1J30" type="CTPIN">
+      <TriggerCondition name="1J30" triggerthreshold="J30" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2J30" type="CTPIN">
+      <TriggerCondition name="2J30" triggerthreshold="J30" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3J30" type="CTPIN">
+      <TriggerCondition name="3J30" triggerthreshold="J30" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4J30" type="CTPIN">
+      <TriggerCondition name="4J30" triggerthreshold="J30" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5J30" type="CTPIN">
+      <TriggerCondition name="5J30" triggerthreshold="J30" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6J30" type="CTPIN">
+      <TriggerCondition name="6J30" triggerthreshold="J30" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7J30" type="CTPIN">
+      <TriggerCondition name="7J30" triggerthreshold="J30" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1J30.31ETA49" type="CTPIN">
+      <TriggerCondition name="1J30.31ETA49" triggerthreshold="J30.31ETA49" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2J30.31ETA49" type="CTPIN">
+      <TriggerCondition name="2J30.31ETA49" triggerthreshold="J30.31ETA49" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3J30.31ETA49" type="CTPIN">
+      <TriggerCondition name="3J30.31ETA49" triggerthreshold="J30.31ETA49" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="1J35.0ETA23" type="CTPIN">
+      <TriggerCondition name="1J35.0ETA23" triggerthreshold="J35.0ETA23" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2J35.0ETA23" type="CTPIN">
+      <TriggerCondition name="2J35.0ETA23" triggerthreshold="J35.0ETA23" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3J35.0ETA23" type="CTPIN">
+      <TriggerCondition name="3J35.0ETA23" triggerthreshold="J35.0ETA23" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="1J40" type="CTPIN">
+      <TriggerCondition name="1J40" triggerthreshold="J40" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2J40" type="CTPIN">
+      <TriggerCondition name="2J40" triggerthreshold="J40" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3J40" type="CTPIN">
+      <TriggerCondition name="3J40" triggerthreshold="J40" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4J40" type="CTPIN">
+      <TriggerCondition name="4J40" triggerthreshold="J40" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5J40" type="CTPIN">
+      <TriggerCondition name="5J40" triggerthreshold="J40" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6J40" type="CTPIN">
+      <TriggerCondition name="6J40" triggerthreshold="J40" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7J40" type="CTPIN">
+      <TriggerCondition name="7J40" triggerthreshold="J40" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1J40.0ETA25" type="CTPIN">
+      <TriggerCondition name="1J40.0ETA25" triggerthreshold="J40.0ETA25" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2J40.0ETA25" type="CTPIN">
+      <TriggerCondition name="2J40.0ETA25" triggerthreshold="J40.0ETA25" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3J40.0ETA25" type="CTPIN">
+      <TriggerCondition name="3J40.0ETA25" triggerthreshold="J40.0ETA25" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="1J400" type="CTPIN">
+      <TriggerCondition name="1J400" triggerthreshold="J400" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2J400" type="CTPIN">
+      <TriggerCondition name="2J400" triggerthreshold="J400" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3J400" type="CTPIN">
+      <TriggerCondition name="3J400" triggerthreshold="J400" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="1J50" type="CTPIN">
+      <TriggerCondition name="1J50" triggerthreshold="J50" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2J50" type="CTPIN">
+      <TriggerCondition name="2J50" triggerthreshold="J50" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3J50" type="CTPIN">
+      <TriggerCondition name="3J50" triggerthreshold="J50" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="1J50.31ETA49" type="CTPIN">
+      <TriggerCondition name="1J50.31ETA49" triggerthreshold="J50.31ETA49" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2J50.31ETA49" type="CTPIN">
+      <TriggerCondition name="2J50.31ETA49" triggerthreshold="J50.31ETA49" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3J50.31ETA49" type="CTPIN">
+      <TriggerCondition name="3J50.31ETA49" triggerthreshold="J50.31ETA49" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="1J75" type="CTPIN">
+      <TriggerCondition name="1J75" triggerthreshold="J75" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2J75" type="CTPIN">
+      <TriggerCondition name="2J75" triggerthreshold="J75" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3J75" type="CTPIN">
+      <TriggerCondition name="3J75" triggerthreshold="J75" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="1J75.31ETA49" type="CTPIN">
+      <TriggerCondition name="1J75.31ETA49" triggerthreshold="J75.31ETA49" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2J75.31ETA49" type="CTPIN">
+      <TriggerCondition name="2J75.31ETA49" triggerthreshold="J75.31ETA49" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3J75.31ETA49" type="CTPIN">
+      <TriggerCondition name="3J75.31ETA49" triggerthreshold="J75.31ETA49" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="1J85" type="CTPIN">
+      <TriggerCondition name="1J85" triggerthreshold="J85" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2J85" type="CTPIN">
+      <TriggerCondition name="2J85" triggerthreshold="J85" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3J85" type="CTPIN">
+      <TriggerCondition name="3J85" triggerthreshold="J85" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="1LUCID_A" type="CTPIN">
+      <TriggerCondition name="1LUCID_A" triggerthreshold="LUCID_A" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1LUCID_C" type="CTPIN">
+      <TriggerCondition name="1LUCID_C" triggerthreshold="LUCID_C" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_A" type="CTPIN">
+      <TriggerCondition name="1MBTS_A" triggerthreshold="MBTS_A" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_A" type="CTPMON">
+      <TriggerCondition name="1MBTS_A" triggerthreshold="MBTS_A" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2MBTS_A" type="CTPIN">
+      <TriggerCondition name="2MBTS_A" triggerthreshold="MBTS_A" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3MBTS_A" type="CTPIN">
+      <TriggerCondition name="3MBTS_A" triggerthreshold="MBTS_A" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4MBTS_A" type="CTPIN">
+      <TriggerCondition name="4MBTS_A" triggerthreshold="MBTS_A" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5MBTS_A" type="CTPIN">
+      <TriggerCondition name="5MBTS_A" triggerthreshold="MBTS_A" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6MBTS_A" type="CTPIN">
+      <TriggerCondition name="6MBTS_A" triggerthreshold="MBTS_A" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7MBTS_A" type="CTPIN">
+      <TriggerCondition name="7MBTS_A" triggerthreshold="MBTS_A" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_A0" type="CTPIN">
+      <TriggerCondition name="1MBTS_A0" triggerthreshold="MBTS_A0" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_A1" type="CTPIN">
+      <TriggerCondition name="1MBTS_A1" triggerthreshold="MBTS_A1" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_A10" type="CTPIN">
+      <TriggerCondition name="1MBTS_A10" triggerthreshold="MBTS_A10" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_A12" type="CTPIN">
+      <TriggerCondition name="1MBTS_A12" triggerthreshold="MBTS_A12" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_A14" type="CTPIN">
+      <TriggerCondition name="1MBTS_A14" triggerthreshold="MBTS_A14" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_A2" type="CTPIN">
+      <TriggerCondition name="1MBTS_A2" triggerthreshold="MBTS_A2" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_A3" type="CTPIN">
+      <TriggerCondition name="1MBTS_A3" triggerthreshold="MBTS_A3" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_A4" type="CTPIN">
+      <TriggerCondition name="1MBTS_A4" triggerthreshold="MBTS_A4" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_A5" type="CTPIN">
+      <TriggerCondition name="1MBTS_A5" triggerthreshold="MBTS_A5" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_A6" type="CTPIN">
+      <TriggerCondition name="1MBTS_A6" triggerthreshold="MBTS_A6" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_A7" type="CTPIN">
+      <TriggerCondition name="1MBTS_A7" triggerthreshold="MBTS_A7" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_A8" type="CTPIN">
+      <TriggerCondition name="1MBTS_A8" triggerthreshold="MBTS_A8" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_C" type="CTPIN">
+      <TriggerCondition name="1MBTS_C" triggerthreshold="MBTS_C" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_C" type="CTPMON">
+      <TriggerCondition name="1MBTS_C" triggerthreshold="MBTS_C" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2MBTS_C" type="CTPIN">
+      <TriggerCondition name="2MBTS_C" triggerthreshold="MBTS_C" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3MBTS_C" type="CTPIN">
+      <TriggerCondition name="3MBTS_C" triggerthreshold="MBTS_C" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4MBTS_C" type="CTPIN">
+      <TriggerCondition name="4MBTS_C" triggerthreshold="MBTS_C" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5MBTS_C" type="CTPIN">
+      <TriggerCondition name="5MBTS_C" triggerthreshold="MBTS_C" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6MBTS_C" type="CTPIN">
+      <TriggerCondition name="6MBTS_C" triggerthreshold="MBTS_C" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7MBTS_C" type="CTPIN">
+      <TriggerCondition name="7MBTS_C" triggerthreshold="MBTS_C" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_C0" type="CTPIN">
+      <TriggerCondition name="1MBTS_C0" triggerthreshold="MBTS_C0" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_C1" type="CTPIN">
+      <TriggerCondition name="1MBTS_C1" triggerthreshold="MBTS_C1" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_C10" type="CTPIN">
+      <TriggerCondition name="1MBTS_C10" triggerthreshold="MBTS_C10" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_C12" type="CTPIN">
+      <TriggerCondition name="1MBTS_C12" triggerthreshold="MBTS_C12" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_C14" type="CTPIN">
+      <TriggerCondition name="1MBTS_C14" triggerthreshold="MBTS_C14" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_C2" type="CTPIN">
+      <TriggerCondition name="1MBTS_C2" triggerthreshold="MBTS_C2" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_C3" type="CTPIN">
+      <TriggerCondition name="1MBTS_C3" triggerthreshold="MBTS_C3" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_C4" type="CTPIN">
+      <TriggerCondition name="1MBTS_C4" triggerthreshold="MBTS_C4" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_C5" type="CTPIN">
+      <TriggerCondition name="1MBTS_C5" triggerthreshold="MBTS_C5" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_C6" type="CTPIN">
+      <TriggerCondition name="1MBTS_C6" triggerthreshold="MBTS_C6" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_C7" type="CTPIN">
+      <TriggerCondition name="1MBTS_C7" triggerthreshold="MBTS_C7" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MBTS_C8" type="CTPIN">
+      <TriggerCondition name="1MBTS_C8" triggerthreshold="MBTS_C8" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MU10" type="CTPIN">
+      <TriggerCondition name="1MU10" triggerthreshold="MU10" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2MU10" type="CTPIN">
+      <TriggerCondition name="2MU10" triggerthreshold="MU10" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3MU10" type="CTPIN">
+      <TriggerCondition name="3MU10" triggerthreshold="MU10" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4MU10" type="CTPIN">
+      <TriggerCondition name="4MU10" triggerthreshold="MU10" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5MU10" type="CTPIN">
+      <TriggerCondition name="5MU10" triggerthreshold="MU10" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6MU10" type="CTPIN">
+      <TriggerCondition name="6MU10" triggerthreshold="MU10" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7MU10" type="CTPIN">
+      <TriggerCondition name="7MU10" triggerthreshold="MU10" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MU11" type="CTPIN">
+      <TriggerCondition name="1MU11" triggerthreshold="MU11" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2MU11" type="CTPIN">
+      <TriggerCondition name="2MU11" triggerthreshold="MU11" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3MU11" type="CTPIN">
+      <TriggerCondition name="3MU11" triggerthreshold="MU11" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4MU11" type="CTPIN">
+      <TriggerCondition name="4MU11" triggerthreshold="MU11" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5MU11" type="CTPIN">
+      <TriggerCondition name="5MU11" triggerthreshold="MU11" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6MU11" type="CTPIN">
+      <TriggerCondition name="6MU11" triggerthreshold="MU11" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7MU11" type="CTPIN">
+      <TriggerCondition name="7MU11" triggerthreshold="MU11" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MU20" type="CTPIN">
+      <TriggerCondition name="1MU20" triggerthreshold="MU20" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2MU20" type="CTPIN">
+      <TriggerCondition name="2MU20" triggerthreshold="MU20" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3MU20" type="CTPIN">
+      <TriggerCondition name="3MU20" triggerthreshold="MU20" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4MU20" type="CTPIN">
+      <TriggerCondition name="4MU20" triggerthreshold="MU20" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5MU20" type="CTPIN">
+      <TriggerCondition name="5MU20" triggerthreshold="MU20" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6MU20" type="CTPIN">
+      <TriggerCondition name="6MU20" triggerthreshold="MU20" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7MU20" type="CTPIN">
+      <TriggerCondition name="7MU20" triggerthreshold="MU20" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MU21" type="CTPIN">
+      <TriggerCondition name="1MU21" triggerthreshold="MU21" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2MU21" type="CTPIN">
+      <TriggerCondition name="2MU21" triggerthreshold="MU21" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3MU21" type="CTPIN">
+      <TriggerCondition name="3MU21" triggerthreshold="MU21" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4MU21" type="CTPIN">
+      <TriggerCondition name="4MU21" triggerthreshold="MU21" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5MU21" type="CTPIN">
+      <TriggerCondition name="5MU21" triggerthreshold="MU21" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6MU21" type="CTPIN">
+      <TriggerCondition name="6MU21" triggerthreshold="MU21" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7MU21" type="CTPIN">
+      <TriggerCondition name="7MU21" triggerthreshold="MU21" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MU4" type="CTPIN">
+      <TriggerCondition name="1MU4" triggerthreshold="MU4" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2MU4" type="CTPIN">
+      <TriggerCondition name="2MU4" triggerthreshold="MU4" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3MU4" type="CTPIN">
+      <TriggerCondition name="3MU4" triggerthreshold="MU4" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4MU4" type="CTPIN">
+      <TriggerCondition name="4MU4" triggerthreshold="MU4" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5MU4" type="CTPIN">
+      <TriggerCondition name="5MU4" triggerthreshold="MU4" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6MU4" type="CTPIN">
+      <TriggerCondition name="6MU4" triggerthreshold="MU4" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7MU4" type="CTPIN">
+      <TriggerCondition name="7MU4" triggerthreshold="MU4" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1MU6" type="CTPIN">
+      <TriggerCondition name="1MU6" triggerthreshold="MU6" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="2MU6" type="CTPIN">
+      <TriggerCondition name="2MU6" triggerthreshold="MU6" multi="2"/>
+    </TriggerCounter>
+    <TriggerCounter name="3MU6" type="CTPIN">
+      <TriggerCondition name="3MU6" triggerthreshold="MU6" multi="3"/>
+    </TriggerCounter>
+    <TriggerCounter name="4MU6" type="CTPIN">
+      <TriggerCondition name="4MU6" triggerthreshold="MU6" multi="4"/>
+    </TriggerCounter>
+    <TriggerCounter name="5MU6" type="CTPIN">
+      <TriggerCondition name="5MU6" triggerthreshold="MU6" multi="5"/>
+    </TriggerCounter>
+    <TriggerCounter name="6MU6" type="CTPIN">
+      <TriggerCondition name="6MU6" triggerthreshold="MU6" multi="6"/>
+    </TriggerCounter>
+    <TriggerCounter name="7MU6" type="CTPIN">
+      <TriggerCondition name="7MU6" triggerthreshold="MU6" multi="7"/>
+    </TriggerCounter>
+    <TriggerCounter name="1NIML1A" type="CTPIN">
+      <TriggerCondition name="1NIML1A" triggerthreshold="NIML1A" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1NIMLHCF" type="CTPIN">
+      <TriggerCondition name="1NIMLHCF" triggerthreshold="NIMLHCF" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1NIMRPC" type="CTPIN">
+      <TriggerCondition name="1NIMRPC" triggerthreshold="NIMRPC" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1NIMTGC" type="CTPIN">
+      <TriggerCondition name="1NIMTGC" triggerthreshold="NIMTGC" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1NIMTRT" type="CTPIN">
+      <TriggerCondition name="1NIMTRT" triggerthreshold="NIMTRT" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1TE10" type="CTPIN">
+      <TriggerCondition name="1TE10" triggerthreshold="TE10" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1TE10.0ETA24" type="CTPIN">
+      <TriggerCondition name="1TE10.0ETA24" triggerthreshold="TE10.0ETA24" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1TE15" type="CTPIN">
+      <TriggerCondition name="1TE15" triggerthreshold="TE15" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1TE15.0ETA24" type="CTPIN">
+      <TriggerCondition name="1TE15.0ETA24" triggerthreshold="TE15.0ETA24" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1TE20" type="CTPIN">
+      <TriggerCondition name="1TE20" triggerthreshold="TE20" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1TE20.0ETA24" type="CTPIN">
+      <TriggerCondition name="1TE20.0ETA24" triggerthreshold="TE20.0ETA24" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1TE25" type="CTPIN">
+      <TriggerCondition name="1TE25" triggerthreshold="TE25" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1TE25.0ETA24" type="CTPIN">
+      <TriggerCondition name="1TE25.0ETA24" triggerthreshold="TE25.0ETA24" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1TE30" type="CTPIN">
+      <TriggerCondition name="1TE30" triggerthreshold="TE30" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1TE30.0ETA24" type="CTPIN">
+      <TriggerCondition name="1TE30.0ETA24" triggerthreshold="TE30.0ETA24" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1TE40" type="CTPIN">
+      <TriggerCondition name="1TE40" triggerthreshold="TE40" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1TE40.0ETA24" type="CTPIN">
+      <TriggerCondition name="1TE40.0ETA24" triggerthreshold="TE40.0ETA24" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1TE5" type="CTPIN">
+      <TriggerCondition name="1TE5" triggerthreshold="TE5" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1TE5.0ETA24" type="CTPIN">
+      <TriggerCondition name="1TE5.0ETA24" triggerthreshold="TE5.0ETA24" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1TE70" type="CTPIN">
+      <TriggerCondition name="1TE70" triggerthreshold="TE70" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1TE70.0ETA24" type="CTPIN">
+      <TriggerCondition name="1TE70.0ETA24" triggerthreshold="TE70.0ETA24" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1XE10" type="CTPIN">
+      <TriggerCondition name="1XE10" triggerthreshold="XE10" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1XE150" type="CTPIN">
+      <TriggerCondition name="1XE150" triggerthreshold="XE150" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1XE20" type="CTPIN">
+      <TriggerCondition name="1XE20" triggerthreshold="XE20" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1XE25" type="CTPIN">
+      <TriggerCondition name="1XE25" triggerthreshold="XE25" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1XE30" type="CTPIN">
+      <TriggerCondition name="1XE30" triggerthreshold="XE30" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1XE300" type="CTPIN">
+      <TriggerCondition name="1XE300" triggerthreshold="XE300" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1XE35" type="CTPIN">
+      <TriggerCondition name="1XE35" triggerthreshold="XE35" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1XE40" type="CTPIN">
+      <TriggerCondition name="1XE40" triggerthreshold="XE40" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1XE45" type="CTPIN">
+      <TriggerCondition name="1XE45" triggerthreshold="XE45" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1XE50" type="CTPIN">
+      <TriggerCondition name="1XE50" triggerthreshold="XE50" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1XE55" type="CTPIN">
+      <TriggerCondition name="1XE55" triggerthreshold="XE55" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1XE60" type="CTPIN">
+      <TriggerCondition name="1XE60" triggerthreshold="XE60" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1XE65" type="CTPIN">
+      <TriggerCondition name="1XE65" triggerthreshold="XE65" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1XE70" type="CTPIN">
+      <TriggerCondition name="1XE70" triggerthreshold="XE70" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1XE75" type="CTPIN">
+      <TriggerCondition name="1XE75" triggerthreshold="XE75" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1XE80" type="CTPIN">
+      <TriggerCondition name="1XE80" triggerthreshold="XE80" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1XS20" type="CTPIN">
+      <TriggerCondition name="1XS20" triggerthreshold="XS20" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1XS30" type="CTPIN">
+      <TriggerCondition name="1XS30" triggerthreshold="XS30" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1XS40" type="CTPIN">
+      <TriggerCondition name="1XS40" triggerthreshold="XS40" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1XS45" type="CTPIN">
+      <TriggerCondition name="1XS45" triggerthreshold="XS45" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1XS50" type="CTPIN">
+      <TriggerCondition name="1XS50" triggerthreshold="XS50" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1XS55" type="CTPIN">
+      <TriggerCondition name="1XS55" triggerthreshold="XS55" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1XS60" type="CTPIN">
+      <TriggerCondition name="1XS60" triggerthreshold="XS60" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1XS65" type="CTPIN">
+      <TriggerCondition name="1XS65" triggerthreshold="XS65" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1ZB_EM15" type="CTPIN">
+      <TriggerCondition name="1ZB_EM15" triggerthreshold="ZB_EM15" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1ZDC_A" type="CTPIN">
+      <TriggerCondition name="1ZDC_A" triggerthreshold="ZDC_A" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1ZDC_AND" type="CTPIN">
+      <TriggerCondition name="1ZDC_AND" triggerthreshold="ZDC_AND" multi="1"/>
+    </TriggerCounter>
+    <TriggerCounter name="1ZDC_C" type="CTPIN">
+      <TriggerCondition name="1ZDC_C" triggerthreshold="ZDC_C" multi="1"/>
+    </TriggerCounter>
+  </TriggerCounterList>
+  <TriggerThresholdList>
+    <TriggerThreshold active="1" bitnum="1" id="1" mapping="2" name="ALFA_B7R1L" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="2" range_end="2" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="2" mapping="3" name="ALFA_A7R1L" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="3" range_end="3" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="3" mapping="4" name="ALFA_A7L1L" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="4" range_end="4" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="4" mapping="5" name="ALFA_B7L1L" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="5" range_end="5" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="5" mapping="8" name="ALFA2_B7R1L" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="8" range_end="8" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="6" mapping="9" name="ALFA2_A7R1L" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="9" range_end="9" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="7" mapping="10" name="ALFA2_A7L1L" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="10" range_end="10" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="8" mapping="11" name="ALFA2_B7L1L" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="11" range_end="11" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="9" mapping="14" name="ALFA3_B7R1L" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="14" range_end="14" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="10" mapping="15" name="ALFA3_A7R1L" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="15" range_end="15" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="11" mapping="16" name="ALFA3_A7L1L" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="16" range_end="16" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="12" mapping="17" name="ALFA3_B7L1L" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="17" range_end="17" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="13" mapping="20" name="ALFA4_B7R1L" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="20" range_end="20" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="14" mapping="21" name="ALFA4_A7R1L" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="21" range_end="21" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="15" mapping="22" name="ALFA4_A7L1L" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="22" range_end="22" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="16" mapping="23" name="ALFA4_B7L1L" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="23" range_end="23" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="17" mapping="34" name="ALFA_B7R1U" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="2" range_end="2" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="18" mapping="35" name="ALFA_A7R1U" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="3" range_end="3" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="19" mapping="36" name="ALFA_A7L1U" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="4" range_end="4" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="20" mapping="37" name="ALFA_B7L1U" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="5" range_end="5" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="21" mapping="40" name="ALFA2_B7R1U" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="8" range_end="8" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="22" mapping="41" name="ALFA2_A7R1U" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="9" range_end="9" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="23" mapping="42" name="ALFA2_A7L1U" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="10" range_end="10" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="24" mapping="43" name="ALFA2_B7L1U" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="11" range_end="11" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="25" mapping="46" name="ALFA3_B7R1U" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="14" range_end="14" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="26" mapping="47" name="ALFA3_A7R1U" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="15" range_end="15" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="27" mapping="48" name="ALFA3_A7L1U" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="16" range_end="16" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="28" mapping="49" name="ALFA3_B7L1U" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="17" range_end="17" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="29" mapping="52" name="ALFA4_B7R1U" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="20" range_end="20" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="30" mapping="53" name="ALFA4_A7R1U" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="21" range_end="21" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="31" mapping="54" name="ALFA4_A7L1U" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="22" range_end="22" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="32" mapping="55" name="ALFA4_B7L1U" type="ALFA" input="ctpcore" version="1">
+      <Cable connector="CON0" input="CTPCORE" name="ALFA">
+        <Signal range_begin="23" range_end="23" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="33" mapping="0" name="BCM_AtoC" type="BCM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="BCM_AtoCfull" phimin="0" phimax="64" priority="0" thresholdval="40" type="BCM" window="0"/>
+      <Cable connector="CON1" input="SLOT9" name="CTPCAL">
+        <Signal range_begin="0" range_end="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="34" mapping="1" name="BCM_CtoA" type="BCM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="BCM_CtoAfull" phimin="0" phimax="64" priority="0" thresholdval="40" type="BCM" window="0"/>
+      <Cable connector="CON1" input="SLOT9" name="CTPCAL">
+        <Signal range_begin="1" range_end="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="35" mapping="2" name="BCM_Wide" type="BCM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="BCM_Widefull" phimin="0" phimax="64" priority="0" thresholdval="40" type="BCM" window="0"/>
+      <Cable connector="CON1" input="SLOT9" name="CTPCAL">
+        <Signal range_begin="2" range_end="2"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="36" mapping="0" name="BCM_Comb" type="BCMCMB" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="BCM_Combfull" phimin="0" phimax="64" priority="0" thresholdval="40" type="BCMCMB" window="0"/>
+      <Cable connector="CON1" input="SLOT9" name="CTPCAL">
+        <Signal range_begin="3" range_end="5"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="37" mapping="0" name="BPTX0" type="BPTX" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="BPTX0full" phimin="0" phimax="64" priority="0" thresholdval="40" type="BPTX" window="0"/>
+      <Cable connector="CON1" input="SLOT9" name="CTPCAL">
+        <Signal range_begin="17" range_end="17"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="38" mapping="1" name="BPTX1" type="BPTX" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="BPTX1full" phimin="0" phimax="64" priority="0" thresholdval="40" type="BPTX" window="0"/>
+      <Cable connector="CON1" input="SLOT9" name="CTPCAL">
+        <Signal range_begin="18" range_end="18"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="39" mapping="0" name="CAL0" type="CALREQ" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="CAL0full" phimin="0" phimax="64" priority="0" thresholdval="40" type="CALREQ" window="0"/>
+      <Cable connector="CON1" input="SLOT9" name="CTPCAL">
+        <Signal range_begin="28" range_end="28"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="40" mapping="1" name="CAL1" type="CALREQ" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="CAL1full" phimin="0" phimax="64" priority="0" thresholdval="40" type="CALREQ" window="0"/>
+      <Cable connector="CON1" input="SLOT9" name="CTPCAL">
+        <Signal range_begin="29" range_end="29"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="41" mapping="2" name="CAL2" type="CALREQ" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="CAL2full" phimin="0" phimax="64" priority="0" thresholdval="40" type="CALREQ" window="0"/>
+      <Cable connector="CON1" input="SLOT9" name="CTPCAL">
+        <Signal range_begin="30" range_end="30"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="42" mapping="0" name="EM3" type="EM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00000" name="EM3full" phimin="0" phimax="64" priority="1" thresholdval="3" type="EM" window="0"/>
+      <Cable connector="CON0" input="SLOT7" name="EM1">
+        <Signal range_begin="0" range_end="2"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="43" mapping="1" name="EM7" type="EM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00000" name="EM7full" phimin="0" phimax="64" priority="1" thresholdval="7" type="EM" window="0"/>
+      <Cable connector="CON0" input="SLOT7" name="EM1">
+        <Signal range_begin="3" range_end="5"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="44" mapping="2" name="EM8VH" type="EM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00001" name="EM8VHfull" phimin="0" phimax="64" priority="1" thresholdval="9" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-25" etamax="-18" had_isolation="63" had_veto="99" isobits="00001" name="EM8VHfull" phimin="0" phimax="64" priority="2" thresholdval="8" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-18" etamax="-15" had_isolation="63" had_veto="99" isobits="00001" name="EM8VHfull" phimin="0" phimax="64" priority="2" thresholdval="7" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-15" etamax="-14" had_isolation="63" had_veto="99" isobits="00001" name="EM8VHfull" phimin="0" phimax="64" priority="2" thresholdval="5" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-14" etamax="-11" had_isolation="63" had_veto="99" isobits="00001" name="EM8VHfull" phimin="0" phimax="64" priority="2" thresholdval="6" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-11" etamax="-8" had_isolation="63" had_veto="99" isobits="00001" name="EM8VHfull" phimin="0" phimax="64" priority="2" thresholdval="7" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-8" etamax="0" had_isolation="63" had_veto="99" isobits="00001" name="EM8VHfull" phimin="0" phimax="64" priority="2" thresholdval="9" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="0" etamax="8" had_isolation="63" had_veto="99" isobits="00001" name="EM8VHfull" phimin="0" phimax="64" priority="2" thresholdval="9" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="8" etamax="11" had_isolation="63" had_veto="99" isobits="00001" name="EM8VHfull" phimin="0" phimax="64" priority="2" thresholdval="7" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="11" etamax="14" had_isolation="63" had_veto="99" isobits="00001" name="EM8VHfull" phimin="0" phimax="64" priority="2" thresholdval="6" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="14" etamax="15" had_isolation="63" had_veto="99" isobits="00001" name="EM8VHfull" phimin="0" phimax="64" priority="2" thresholdval="5" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="15" etamax="18" had_isolation="63" had_veto="99" isobits="00001" name="EM8VHfull" phimin="0" phimax="64" priority="2" thresholdval="7" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="18" etamax="25" had_isolation="63" had_veto="99" isobits="00001" name="EM8VHfull" phimin="0" phimax="64" priority="2" thresholdval="8" type="EM" window="0"/>
+      <Cable connector="CON0" input="SLOT7" name="EM1">
+        <Signal range_begin="6" range_end="8"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="45" mapping="3" name="EM8I" type="EM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00010" name="EM8Ifull" phimin="0" phimax="64" priority="1" thresholdval="8" type="EM" window="0"/>
+      <Cable connector="CON0" input="SLOT7" name="EM1">
+        <Signal range_begin="9" range_end="11"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="46" mapping="4" name="EM10VH" type="EM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00001" name="EM10VHfull" phimin="0" phimax="64" priority="1" thresholdval="11" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-25" etamax="-18" had_isolation="63" had_veto="99" isobits="00001" name="EM10VHfull" phimin="0" phimax="64" priority="2" thresholdval="10" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-18" etamax="-15" had_isolation="63" had_veto="99" isobits="00001" name="EM10VHfull" phimin="0" phimax="64" priority="2" thresholdval="9" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-15" etamax="-14" had_isolation="63" had_veto="99" isobits="00001" name="EM10VHfull" phimin="0" phimax="64" priority="2" thresholdval="7" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-14" etamax="-11" had_isolation="63" had_veto="99" isobits="00001" name="EM10VHfull" phimin="0" phimax="64" priority="2" thresholdval="8" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-11" etamax="-8" had_isolation="63" had_veto="99" isobits="00001" name="EM10VHfull" phimin="0" phimax="64" priority="2" thresholdval="9" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-8" etamax="0" had_isolation="63" had_veto="99" isobits="00001" name="EM10VHfull" phimin="0" phimax="64" priority="2" thresholdval="11" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="0" etamax="8" had_isolation="63" had_veto="99" isobits="00001" name="EM10VHfull" phimin="0" phimax="64" priority="2" thresholdval="11" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="8" etamax="11" had_isolation="63" had_veto="99" isobits="00001" name="EM10VHfull" phimin="0" phimax="64" priority="2" thresholdval="9" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="11" etamax="14" had_isolation="63" had_veto="99" isobits="00001" name="EM10VHfull" phimin="0" phimax="64" priority="2" thresholdval="8" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="14" etamax="15" had_isolation="63" had_veto="99" isobits="00001" name="EM10VHfull" phimin="0" phimax="64" priority="2" thresholdval="7" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="15" etamax="18" had_isolation="63" had_veto="99" isobits="00001" name="EM10VHfull" phimin="0" phimax="64" priority="2" thresholdval="9" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="18" etamax="25" had_isolation="63" had_veto="99" isobits="00001" name="EM10VHfull" phimin="0" phimax="64" priority="2" thresholdval="10" type="EM" window="0"/>
+      <Cable connector="CON0" input="SLOT7" name="EM1">
+        <Signal range_begin="12" range_end="14"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="47" mapping="5" name="EM12" type="EM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00000" name="EM12full" phimin="0" phimax="64" priority="1" thresholdval="12" type="EM" window="0"/>
+      <Cable connector="CON0" input="SLOT7" name="EM1">
+        <Signal range_begin="15" range_end="17"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="48" mapping="6" name="EM15" type="EM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00000" name="EM15full" phimin="0" phimax="64" priority="1" thresholdval="15" type="EM" window="0"/>
+      <Cable connector="CON0" input="SLOT7" name="EM1">
+        <Signal range_begin="18" range_end="20"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="49" mapping="7" name="EM15VH" type="EM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00001" name="EM15VHfull" phimin="0" phimax="64" priority="1" thresholdval="17" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-25" etamax="-17" had_isolation="63" had_veto="99" isobits="00001" name="EM15VHfull" phimin="0" phimax="64" priority="2" thresholdval="16" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-17" etamax="-15" had_isolation="63" had_veto="99" isobits="00001" name="EM15VHfull" phimin="0" phimax="64" priority="2" thresholdval="15" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-15" etamax="-14" had_isolation="63" had_veto="99" isobits="00001" name="EM15VHfull" phimin="0" phimax="64" priority="2" thresholdval="13" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-14" etamax="-12" had_isolation="63" had_veto="99" isobits="00001" name="EM15VHfull" phimin="0" phimax="64" priority="2" thresholdval="14" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-12" etamax="-9" had_isolation="63" had_veto="99" isobits="00001" name="EM15VHfull" phimin="0" phimax="64" priority="2" thresholdval="15" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-9" etamax="-7" had_isolation="63" had_veto="99" isobits="00001" name="EM15VHfull" phimin="0" phimax="64" priority="2" thresholdval="16" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-7" etamax="0" had_isolation="63" had_veto="99" isobits="00001" name="EM15VHfull" phimin="0" phimax="64" priority="2" thresholdval="17" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="0" etamax="7" had_isolation="63" had_veto="99" isobits="00001" name="EM15VHfull" phimin="0" phimax="64" priority="2" thresholdval="17" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="7" etamax="9" had_isolation="63" had_veto="99" isobits="00001" name="EM15VHfull" phimin="0" phimax="64" priority="2" thresholdval="16" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="9" etamax="12" had_isolation="63" had_veto="99" isobits="00001" name="EM15VHfull" phimin="0" phimax="64" priority="2" thresholdval="15" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="12" etamax="14" had_isolation="63" had_veto="99" isobits="00001" name="EM15VHfull" phimin="0" phimax="64" priority="2" thresholdval="14" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="14" etamax="15" had_isolation="63" had_veto="99" isobits="00001" name="EM15VHfull" phimin="0" phimax="64" priority="2" thresholdval="13" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="15" etamax="17" had_isolation="63" had_veto="99" isobits="00001" name="EM15VHfull" phimin="0" phimax="64" priority="2" thresholdval="15" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="17" etamax="25" had_isolation="63" had_veto="99" isobits="00001" name="EM15VHfull" phimin="0" phimax="64" priority="2" thresholdval="16" type="EM" window="0"/>
+      <Cable connector="CON0" input="SLOT7" name="EM1">
+        <Signal range_begin="21" range_end="23"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="50" mapping="8" name="EM15VHI" type="EM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00100" name="EM15VHIfull" phimin="0" phimax="64" priority="1" thresholdval="17" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-25" etamax="-17" had_isolation="63" had_veto="99" isobits="00100" name="EM15VHIfull" phimin="0" phimax="64" priority="2" thresholdval="16" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-17" etamax="-15" had_isolation="63" had_veto="99" isobits="00100" name="EM15VHIfull" phimin="0" phimax="64" priority="2" thresholdval="14" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-15" etamax="-14" had_isolation="63" had_veto="99" isobits="00100" name="EM15VHIfull" phimin="0" phimax="64" priority="2" thresholdval="12" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-14" etamax="-13" had_isolation="63" had_veto="99" isobits="00100" name="EM15VHIfull" phimin="0" phimax="64" priority="2" thresholdval="13" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-13" etamax="-11" had_isolation="63" had_veto="99" isobits="00100" name="EM15VHIfull" phimin="0" phimax="64" priority="2" thresholdval="14" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-11" etamax="-8" had_isolation="63" had_veto="99" isobits="00100" name="EM15VHIfull" phimin="0" phimax="64" priority="2" thresholdval="15" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-8" etamax="-7" had_isolation="63" had_veto="99" isobits="00100" name="EM15VHIfull" phimin="0" phimax="64" priority="2" thresholdval="16" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-7" etamax="0" had_isolation="63" had_veto="99" isobits="00100" name="EM15VHIfull" phimin="0" phimax="64" priority="2" thresholdval="17" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="0" etamax="7" had_isolation="63" had_veto="99" isobits="00100" name="EM15VHIfull" phimin="0" phimax="64" priority="2" thresholdval="17" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="7" etamax="8" had_isolation="63" had_veto="99" isobits="00100" name="EM15VHIfull" phimin="0" phimax="64" priority="2" thresholdval="16" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="8" etamax="11" had_isolation="63" had_veto="99" isobits="00100" name="EM15VHIfull" phimin="0" phimax="64" priority="2" thresholdval="15" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="11" etamax="13" had_isolation="63" had_veto="99" isobits="00100" name="EM15VHIfull" phimin="0" phimax="64" priority="2" thresholdval="14" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="13" etamax="14" had_isolation="63" had_veto="99" isobits="00100" name="EM15VHIfull" phimin="0" phimax="64" priority="2" thresholdval="13" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="14" etamax="15" had_isolation="63" had_veto="99" isobits="00100" name="EM15VHIfull" phimin="0" phimax="64" priority="2" thresholdval="12" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="15" etamax="17" had_isolation="63" had_veto="99" isobits="00100" name="EM15VHIfull" phimin="0" phimax="64" priority="2" thresholdval="14" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="17" etamax="25" had_isolation="63" had_veto="99" isobits="00100" name="EM15VHIfull" phimin="0" phimax="64" priority="2" thresholdval="16" type="EM" window="0"/>
+      <Cable connector="CON1" input="SLOT7" name="EM2">
+        <Signal range_begin="0" range_end="2"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="51" mapping="9" name="EM18VHI" type="EM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00100" name="EM18VHIfull" phimin="0" phimax="64" priority="1" thresholdval="20" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-25" etamax="-17" had_isolation="63" had_veto="99" isobits="00100" name="EM18VHIfull" phimin="0" phimax="64" priority="2" thresholdval="19" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-17" etamax="-15" had_isolation="63" had_veto="99" isobits="00100" name="EM18VHIfull" phimin="0" phimax="64" priority="2" thresholdval="17" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-15" etamax="-14" had_isolation="63" had_veto="99" isobits="00100" name="EM18VHIfull" phimin="0" phimax="64" priority="2" thresholdval="15" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-14" etamax="-13" had_isolation="63" had_veto="99" isobits="00100" name="EM18VHIfull" phimin="0" phimax="64" priority="2" thresholdval="16" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-13" etamax="-11" had_isolation="63" had_veto="99" isobits="00100" name="EM18VHIfull" phimin="0" phimax="64" priority="2" thresholdval="17" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-11" etamax="-8" had_isolation="63" had_veto="99" isobits="00100" name="EM18VHIfull" phimin="0" phimax="64" priority="2" thresholdval="18" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-8" etamax="-7" had_isolation="63" had_veto="99" isobits="00100" name="EM18VHIfull" phimin="0" phimax="64" priority="2" thresholdval="19" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-7" etamax="0" had_isolation="63" had_veto="99" isobits="00100" name="EM18VHIfull" phimin="0" phimax="64" priority="2" thresholdval="20" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="0" etamax="7" had_isolation="63" had_veto="99" isobits="00100" name="EM18VHIfull" phimin="0" phimax="64" priority="2" thresholdval="20" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="7" etamax="8" had_isolation="63" had_veto="99" isobits="00100" name="EM18VHIfull" phimin="0" phimax="64" priority="2" thresholdval="19" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="8" etamax="11" had_isolation="63" had_veto="99" isobits="00100" name="EM18VHIfull" phimin="0" phimax="64" priority="2" thresholdval="18" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="11" etamax="13" had_isolation="63" had_veto="99" isobits="00100" name="EM18VHIfull" phimin="0" phimax="64" priority="2" thresholdval="17" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="13" etamax="14" had_isolation="63" had_veto="99" isobits="00100" name="EM18VHIfull" phimin="0" phimax="64" priority="2" thresholdval="16" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="14" etamax="15" had_isolation="63" had_veto="99" isobits="00100" name="EM18VHIfull" phimin="0" phimax="64" priority="2" thresholdval="15" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="15" etamax="17" had_isolation="63" had_veto="99" isobits="00100" name="EM18VHIfull" phimin="0" phimax="64" priority="2" thresholdval="17" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="17" etamax="25" had_isolation="63" had_veto="99" isobits="00100" name="EM18VHIfull" phimin="0" phimax="64" priority="2" thresholdval="19" type="EM" window="0"/>
+      <Cable connector="CON1" input="SLOT7" name="EM2">
+        <Signal range_begin="3" range_end="5"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="52" mapping="10" name="EM20VH" type="EM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00001" name="EM20VHfull" phimin="0" phimax="64" priority="1" thresholdval="22" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-25" etamax="-17" had_isolation="63" had_veto="99" isobits="00001" name="EM20VHfull" phimin="0" phimax="64" priority="2" thresholdval="21" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-17" etamax="-15" had_isolation="63" had_veto="99" isobits="00001" name="EM20VHfull" phimin="0" phimax="64" priority="2" thresholdval="19" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-15" etamax="-14" had_isolation="63" had_veto="99" isobits="00001" name="EM20VHfull" phimin="0" phimax="64" priority="2" thresholdval="17" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-14" etamax="-13" had_isolation="63" had_veto="99" isobits="00001" name="EM20VHfull" phimin="0" phimax="64" priority="2" thresholdval="18" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-13" etamax="-11" had_isolation="63" had_veto="99" isobits="00001" name="EM20VHfull" phimin="0" phimax="64" priority="2" thresholdval="19" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-11" etamax="-8" had_isolation="63" had_veto="99" isobits="00001" name="EM20VHfull" phimin="0" phimax="64" priority="2" thresholdval="20" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-8" etamax="-7" had_isolation="63" had_veto="99" isobits="00001" name="EM20VHfull" phimin="0" phimax="64" priority="2" thresholdval="21" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-7" etamax="0" had_isolation="63" had_veto="99" isobits="00001" name="EM20VHfull" phimin="0" phimax="64" priority="2" thresholdval="22" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="0" etamax="7" had_isolation="63" had_veto="99" isobits="00001" name="EM20VHfull" phimin="0" phimax="64" priority="2" thresholdval="22" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="7" etamax="8" had_isolation="63" had_veto="99" isobits="00001" name="EM20VHfull" phimin="0" phimax="64" priority="2" thresholdval="21" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="8" etamax="11" had_isolation="63" had_veto="99" isobits="00001" name="EM20VHfull" phimin="0" phimax="64" priority="2" thresholdval="20" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="11" etamax="13" had_isolation="63" had_veto="99" isobits="00001" name="EM20VHfull" phimin="0" phimax="64" priority="2" thresholdval="19" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="13" etamax="14" had_isolation="63" had_veto="99" isobits="00001" name="EM20VHfull" phimin="0" phimax="64" priority="2" thresholdval="18" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="14" etamax="15" had_isolation="63" had_veto="99" isobits="00001" name="EM20VHfull" phimin="0" phimax="64" priority="2" thresholdval="17" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="15" etamax="17" had_isolation="63" had_veto="99" isobits="00001" name="EM20VHfull" phimin="0" phimax="64" priority="2" thresholdval="19" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="17" etamax="25" had_isolation="63" had_veto="99" isobits="00001" name="EM20VHfull" phimin="0" phimax="64" priority="2" thresholdval="21" type="EM" window="0"/>
+      <Cable connector="CON1" input="SLOT7" name="EM2">
+        <Signal range_begin="6" range_end="8"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="53" mapping="11" name="EM20VHI" type="EM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00100" name="EM20VHIfull" phimin="0" phimax="64" priority="1" thresholdval="22" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-25" etamax="-17" had_isolation="63" had_veto="99" isobits="00100" name="EM20VHIfull" phimin="0" phimax="64" priority="2" thresholdval="21" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-17" etamax="-15" had_isolation="63" had_veto="99" isobits="00100" name="EM20VHIfull" phimin="0" phimax="64" priority="2" thresholdval="19" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-15" etamax="-14" had_isolation="63" had_veto="99" isobits="00100" name="EM20VHIfull" phimin="0" phimax="64" priority="2" thresholdval="17" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-14" etamax="-13" had_isolation="63" had_veto="99" isobits="00100" name="EM20VHIfull" phimin="0" phimax="64" priority="2" thresholdval="18" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-13" etamax="-11" had_isolation="63" had_veto="99" isobits="00100" name="EM20VHIfull" phimin="0" phimax="64" priority="2" thresholdval="19" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-11" etamax="-8" had_isolation="63" had_veto="99" isobits="00100" name="EM20VHIfull" phimin="0" phimax="64" priority="2" thresholdval="20" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-8" etamax="-7" had_isolation="63" had_veto="99" isobits="00100" name="EM20VHIfull" phimin="0" phimax="64" priority="2" thresholdval="21" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-7" etamax="0" had_isolation="63" had_veto="99" isobits="00100" name="EM20VHIfull" phimin="0" phimax="64" priority="2" thresholdval="22" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="0" etamax="7" had_isolation="63" had_veto="99" isobits="00100" name="EM20VHIfull" phimin="0" phimax="64" priority="2" thresholdval="22" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="7" etamax="8" had_isolation="63" had_veto="99" isobits="00100" name="EM20VHIfull" phimin="0" phimax="64" priority="2" thresholdval="21" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="8" etamax="11" had_isolation="63" had_veto="99" isobits="00100" name="EM20VHIfull" phimin="0" phimax="64" priority="2" thresholdval="20" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="11" etamax="13" had_isolation="63" had_veto="99" isobits="00100" name="EM20VHIfull" phimin="0" phimax="64" priority="2" thresholdval="19" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="13" etamax="14" had_isolation="63" had_veto="99" isobits="00100" name="EM20VHIfull" phimin="0" phimax="64" priority="2" thresholdval="18" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="14" etamax="15" had_isolation="63" had_veto="99" isobits="00100" name="EM20VHIfull" phimin="0" phimax="64" priority="2" thresholdval="17" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="15" etamax="17" had_isolation="63" had_veto="99" isobits="00100" name="EM20VHIfull" phimin="0" phimax="64" priority="2" thresholdval="19" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="17" etamax="25" had_isolation="63" had_veto="99" isobits="00100" name="EM20VHIfull" phimin="0" phimax="64" priority="2" thresholdval="21" type="EM" window="0"/>
+      <Cable connector="CON1" input="SLOT7" name="EM2">
+        <Signal range_begin="9" range_end="11"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="54" mapping="12" name="EM22VHI" type="EM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00100" name="EM22VHIfull" phimin="0" phimax="64" priority="1" thresholdval="24" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-25" etamax="-17" had_isolation="63" had_veto="99" isobits="00100" name="EM22VHIfull" phimin="0" phimax="64" priority="2" thresholdval="23" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-17" etamax="-15" had_isolation="63" had_veto="99" isobits="00100" name="EM22VHIfull" phimin="0" phimax="64" priority="2" thresholdval="21" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-15" etamax="-14" had_isolation="63" had_veto="99" isobits="00100" name="EM22VHIfull" phimin="0" phimax="64" priority="2" thresholdval="19" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-14" etamax="-13" had_isolation="63" had_veto="99" isobits="00100" name="EM22VHIfull" phimin="0" phimax="64" priority="2" thresholdval="20" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-13" etamax="-11" had_isolation="63" had_veto="99" isobits="00100" name="EM22VHIfull" phimin="0" phimax="64" priority="2" thresholdval="21" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-11" etamax="-8" had_isolation="63" had_veto="99" isobits="00100" name="EM22VHIfull" phimin="0" phimax="64" priority="2" thresholdval="22" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-8" etamax="-7" had_isolation="63" had_veto="99" isobits="00100" name="EM22VHIfull" phimin="0" phimax="64" priority="2" thresholdval="23" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-7" etamax="0" had_isolation="63" had_veto="99" isobits="00100" name="EM22VHIfull" phimin="0" phimax="64" priority="2" thresholdval="24" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="0" etamax="7" had_isolation="63" had_veto="99" isobits="00100" name="EM22VHIfull" phimin="0" phimax="64" priority="2" thresholdval="24" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="7" etamax="8" had_isolation="63" had_veto="99" isobits="00100" name="EM22VHIfull" phimin="0" phimax="64" priority="2" thresholdval="23" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="8" etamax="11" had_isolation="63" had_veto="99" isobits="00100" name="EM22VHIfull" phimin="0" phimax="64" priority="2" thresholdval="22" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="11" etamax="13" had_isolation="63" had_veto="99" isobits="00100" name="EM22VHIfull" phimin="0" phimax="64" priority="2" thresholdval="21" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="13" etamax="14" had_isolation="63" had_veto="99" isobits="00100" name="EM22VHIfull" phimin="0" phimax="64" priority="2" thresholdval="20" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="14" etamax="15" had_isolation="63" had_veto="99" isobits="00100" name="EM22VHIfull" phimin="0" phimax="64" priority="2" thresholdval="19" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="15" etamax="17" had_isolation="63" had_veto="99" isobits="00100" name="EM22VHIfull" phimin="0" phimax="64" priority="2" thresholdval="21" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="17" etamax="25" had_isolation="63" had_veto="99" isobits="00100" name="EM22VHIfull" phimin="0" phimax="64" priority="2" thresholdval="23" type="EM" window="0"/>
+      <Cable connector="CON1" input="SLOT7" name="EM2">
+        <Signal range_begin="12" range_end="14"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="55" mapping="13" name="EM22VHIM" type="EM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="01000" name="EM22VHIMfull" phimin="0" phimax="64" priority="1" thresholdval="24" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-25" etamax="-17" had_isolation="63" had_veto="99" isobits="01000" name="EM22VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="23" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-17" etamax="-15" had_isolation="63" had_veto="99" isobits="01000" name="EM22VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="21" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-15" etamax="-14" had_isolation="63" had_veto="99" isobits="01000" name="EM22VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="19" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-14" etamax="-13" had_isolation="63" had_veto="99" isobits="01000" name="EM22VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="20" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-13" etamax="-11" had_isolation="63" had_veto="99" isobits="01000" name="EM22VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="21" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-11" etamax="-8" had_isolation="63" had_veto="99" isobits="01000" name="EM22VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="22" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-8" etamax="-7" had_isolation="63" had_veto="99" isobits="01000" name="EM22VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="23" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-7" etamax="0" had_isolation="63" had_veto="99" isobits="01000" name="EM22VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="24" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="0" etamax="7" had_isolation="63" had_veto="99" isobits="01000" name="EM22VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="24" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="7" etamax="8" had_isolation="63" had_veto="99" isobits="01000" name="EM22VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="23" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="8" etamax="11" had_isolation="63" had_veto="99" isobits="01000" name="EM22VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="22" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="11" etamax="13" had_isolation="63" had_veto="99" isobits="01000" name="EM22VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="21" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="13" etamax="14" had_isolation="63" had_veto="99" isobits="01000" name="EM22VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="20" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="14" etamax="15" had_isolation="63" had_veto="99" isobits="01000" name="EM22VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="19" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="15" etamax="17" had_isolation="63" had_veto="99" isobits="01000" name="EM22VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="21" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="17" etamax="25" had_isolation="63" had_veto="99" isobits="01000" name="EM22VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="23" type="EM" window="0"/>
+      <Cable connector="CON1" input="SLOT7" name="EM2">
+        <Signal range_begin="15" range_end="17"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="56" mapping="14" name="EM24VHI" type="EM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00100" name="EM24VHIfull" phimin="0" phimax="64" priority="1" thresholdval="24" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-25" etamax="-17" had_isolation="63" had_veto="99" isobits="00100" name="EM24VHIfull" phimin="0" phimax="64" priority="2" thresholdval="25" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-17" etamax="-15" had_isolation="63" had_veto="99" isobits="00100" name="EM24VHIfull" phimin="0" phimax="64" priority="2" thresholdval="23" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-15" etamax="-14" had_isolation="63" had_veto="99" isobits="00100" name="EM24VHIfull" phimin="0" phimax="64" priority="2" thresholdval="21" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-14" etamax="-13" had_isolation="63" had_veto="99" isobits="00100" name="EM24VHIfull" phimin="0" phimax="64" priority="2" thresholdval="22" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-13" etamax="-11" had_isolation="63" had_veto="99" isobits="00100" name="EM24VHIfull" phimin="0" phimax="64" priority="2" thresholdval="23" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-11" etamax="-8" had_isolation="63" had_veto="99" isobits="00100" name="EM24VHIfull" phimin="0" phimax="64" priority="2" thresholdval="24" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-8" etamax="-7" had_isolation="63" had_veto="99" isobits="00100" name="EM24VHIfull" phimin="0" phimax="64" priority="2" thresholdval="25" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-7" etamax="0" had_isolation="63" had_veto="99" isobits="00100" name="EM24VHIfull" phimin="0" phimax="64" priority="2" thresholdval="26" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="0" etamax="7" had_isolation="63" had_veto="99" isobits="00100" name="EM24VHIfull" phimin="0" phimax="64" priority="2" thresholdval="26" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="7" etamax="8" had_isolation="63" had_veto="99" isobits="00100" name="EM24VHIfull" phimin="0" phimax="64" priority="2" thresholdval="25" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="8" etamax="11" had_isolation="63" had_veto="99" isobits="00100" name="EM24VHIfull" phimin="0" phimax="64" priority="2" thresholdval="24" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="11" etamax="13" had_isolation="63" had_veto="99" isobits="00100" name="EM24VHIfull" phimin="0" phimax="64" priority="2" thresholdval="23" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="13" etamax="14" had_isolation="63" had_veto="99" isobits="00100" name="EM24VHIfull" phimin="0" phimax="64" priority="2" thresholdval="22" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="14" etamax="15" had_isolation="63" had_veto="99" isobits="00100" name="EM24VHIfull" phimin="0" phimax="64" priority="2" thresholdval="21" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="15" etamax="17" had_isolation="63" had_veto="99" isobits="00100" name="EM24VHIfull" phimin="0" phimax="64" priority="2" thresholdval="23" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="17" etamax="25" had_isolation="63" had_veto="99" isobits="00100" name="EM24VHIfull" phimin="0" phimax="64" priority="2" thresholdval="25" type="EM" window="0"/>
+      <Cable connector="CON1" input="SLOT7" name="EM2">
+        <Signal range_begin="18" range_end="20"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="57" mapping="15" name="EM24VHIM" type="EM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="01000" name="EM24VHIMfull" phimin="0" phimax="64" priority="1" thresholdval="24" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-25" etamax="-17" had_isolation="63" had_veto="99" isobits="01000" name="EM24VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="25" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-17" etamax="-15" had_isolation="63" had_veto="99" isobits="01000" name="EM24VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="23" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-15" etamax="-14" had_isolation="63" had_veto="99" isobits="01000" name="EM24VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="21" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-14" etamax="-13" had_isolation="63" had_veto="99" isobits="01000" name="EM24VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="22" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-13" etamax="-11" had_isolation="63" had_veto="99" isobits="01000" name="EM24VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="23" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-11" etamax="-8" had_isolation="63" had_veto="99" isobits="01000" name="EM24VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="24" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-8" etamax="-7" had_isolation="63" had_veto="99" isobits="01000" name="EM24VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="25" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-7" etamax="0" had_isolation="63" had_veto="99" isobits="01000" name="EM24VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="26" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="0" etamax="7" had_isolation="63" had_veto="99" isobits="01000" name="EM24VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="26" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="7" etamax="8" had_isolation="63" had_veto="99" isobits="01000" name="EM24VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="25" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="8" etamax="11" had_isolation="63" had_veto="99" isobits="01000" name="EM24VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="24" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="11" etamax="13" had_isolation="63" had_veto="99" isobits="01000" name="EM24VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="23" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="13" etamax="14" had_isolation="63" had_veto="99" isobits="01000" name="EM24VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="22" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="14" etamax="15" had_isolation="63" had_veto="99" isobits="01000" name="EM24VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="21" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="15" etamax="17" had_isolation="63" had_veto="99" isobits="01000" name="EM24VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="23" type="EM" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="17" etamax="25" had_isolation="63" had_veto="99" isobits="01000" name="EM24VHIMfull" phimin="0" phimax="64" priority="2" thresholdval="25" type="EM" window="0"/>
+      <Cable connector="CON1" input="SLOT7" name="EM2">
+        <Signal range_begin="21" range_end="23"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="58" mapping="0" name="J12" type="JET" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="J12full" phimin="0" phimax="64" priority="0" thresholdval="1023" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-31" etamax="31" had_isolation="63" had_veto="63" name="J12full" phimin="0" phimax="64" priority="1" thresholdval="12" type="JET" window="8" windowSize="LARGE"/>
+      <Cable connector="CON0" input="SLOT8" name="JET1">
+        <Signal range_begin="0" range_end="2"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="59" mapping="1" name="J15" type="JET" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="J15full" phimin="0" phimax="64" priority="0" thresholdval="1023" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-31" etamax="31" had_isolation="63" had_veto="63" name="J15full" phimin="0" phimax="64" priority="1" thresholdval="15" type="JET" window="8" windowSize="LARGE"/>
+      <Cable connector="CON0" input="SLOT8" name="JET1">
+        <Signal range_begin="3" range_end="5"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="60" mapping="2" name="J15.0ETA25" type="JET" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="J15.0ETA25full" phimin="0" phimax="64" priority="0" thresholdval="1023" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-25" etamax="25" had_isolation="63" had_veto="63" name="J15.0ETA25full" phimin="0" phimax="64" priority="1" thresholdval="15" type="JET" window="8" windowSize="LARGE"/>
+      <Cable connector="CON0" input="SLOT8" name="JET1">
+        <Signal range_begin="6" range_end="8"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="61" mapping="3" name="J20" type="JET" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="J20full" phimin="0" phimax="64" priority="0" thresholdval="1023" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-31" etamax="31" had_isolation="63" had_veto="63" name="J20full" phimin="0" phimax="64" priority="1" thresholdval="20" type="JET" window="8" windowSize="LARGE"/>
+      <Cable connector="CON0" input="SLOT8" name="JET1">
+        <Signal range_begin="9" range_end="11"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="62" mapping="4" name="J25" type="JET" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="J25full" phimin="0" phimax="64" priority="0" thresholdval="1023" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-31" etamax="31" had_isolation="63" had_veto="63" name="J25full" phimin="0" phimax="64" priority="1" thresholdval="25" type="JET" window="8" windowSize="LARGE"/>
+      <Cable connector="CON0" input="SLOT8" name="JET1">
+        <Signal range_begin="12" range_end="14"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="63" mapping="5" name="J25.0ETA23" type="JET" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="J25.0ETA23full" phimin="0" phimax="64" priority="0" thresholdval="1023" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-23" etamax="23" had_isolation="63" had_veto="63" name="J25.0ETA23full" phimin="0" phimax="64" priority="1" thresholdval="25" type="JET" window="8" windowSize="LARGE"/>
+      <Cable connector="CON0" input="SLOT8" name="JET1">
+        <Signal range_begin="15" range_end="17"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="64" mapping="6" name="J30" type="JET" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="J30full" phimin="0" phimax="64" priority="0" thresholdval="1023" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-31" etamax="31" had_isolation="63" had_veto="63" name="J30full" phimin="0" phimax="64" priority="1" thresholdval="30" type="JET" window="8" windowSize="LARGE"/>
+      <Cable connector="CON0" input="SLOT8" name="JET1">
+        <Signal range_begin="18" range_end="20"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="65" mapping="7" name="J40" type="JET" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="J40full" phimin="0" phimax="64" priority="0" thresholdval="1023" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-31" etamax="31" had_isolation="63" had_veto="63" name="J40full" phimin="0" phimax="64" priority="1" thresholdval="40" type="JET" window="8" windowSize="LARGE"/>
+      <Cable connector="CON0" input="SLOT8" name="JET1">
+        <Signal range_begin="21" range_end="23"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="66" mapping="8" name="J20.0ETA49" type="JET" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="J20.0ETA49full" phimin="0" phimax="64" priority="0" thresholdval="1023" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="J20.0ETA49full" phimin="0" phimax="64" priority="1" thresholdval="20" type="JET" window="8" windowSize="LARGE"/>
+      <Cable connector="CON0" input="SLOT8" name="JET1">
+        <Signal range_begin="24" range_end="26"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="67" mapping="9" name="J30.0ETA49" type="JET" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="J30.0ETA49full" phimin="0" phimax="64" priority="0" thresholdval="1023" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="J30.0ETA49full" phimin="0" phimax="64" priority="1" thresholdval="30" type="JET" window="8" windowSize="LARGE"/>
+      <Cable connector="CON0" input="SLOT8" name="JET1">
+        <Signal range_begin="27" range_end="29"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="2" id="68" mapping="10" name="J35.0ETA23" type="JET" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="J35.0ETA23full" phimin="0" phimax="64" priority="0" thresholdval="1023" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-23" etamax="23" had_isolation="63" had_veto="63" name="J35.0ETA23full" phimin="0" phimax="64" priority="1" thresholdval="35" type="JET" window="8" windowSize="LARGE"/>
+      <Cable connector="CON1" input="SLOT8" name="JET2">
+        <Signal range_begin="0" range_end="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="2" id="69" mapping="11" name="J40.0ETA25" type="JET" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="J40.0ETA25full" phimin="0" phimax="64" priority="0" thresholdval="1023" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-25" etamax="25" had_isolation="63" had_veto="63" name="J40.0ETA25full" phimin="0" phimax="64" priority="1" thresholdval="40" type="JET" window="8" windowSize="LARGE"/>
+      <Cable connector="CON1" input="SLOT8" name="JET2">
+        <Signal range_begin="2" range_end="3"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="2" id="70" mapping="12" name="J20.28ETA31" type="JET" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="J20.28ETA31full" phimin="0" phimax="64" priority="0" thresholdval="1023" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-31" etamax="-28" had_isolation="63" had_veto="63" name="J20.28ETA31full" phimin="0" phimax="64" priority="1" thresholdval="20" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="28" etamax="31" had_isolation="63" had_veto="63" name="J20.28ETA31full" phimin="0" phimax="64" priority="1" thresholdval="20" type="JET" window="8" windowSize="LARGE"/>
+      <Cable connector="CON1" input="SLOT8" name="JET2">
+        <Signal range_begin="4" range_end="5"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="2" id="71" mapping="13" name="J50" type="JET" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="J50full" phimin="0" phimax="64" priority="0" thresholdval="1023" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-31" etamax="31" had_isolation="63" had_veto="63" name="J50full" phimin="0" phimax="64" priority="1" thresholdval="50" type="JET" window="8" windowSize="LARGE"/>
+      <Cable connector="CON1" input="SLOT8" name="JET2">
+        <Signal range_begin="6" range_end="7"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="2" id="72" mapping="14" name="J75" type="JET" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="J75full" phimin="0" phimax="64" priority="0" thresholdval="1023" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-31" etamax="31" had_isolation="63" had_veto="63" name="J75full" phimin="0" phimax="64" priority="1" thresholdval="75" type="JET" window="8" windowSize="LARGE"/>
+      <Cable connector="CON1" input="SLOT8" name="JET2">
+        <Signal range_begin="8" range_end="9"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="2" id="73" mapping="15" name="J85" type="JET" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="J85full" phimin="0" phimax="64" priority="0" thresholdval="1023" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-31" etamax="31" had_isolation="63" had_veto="63" name="J85full" phimin="0" phimax="64" priority="1" thresholdval="85" type="JET" window="8" windowSize="LARGE"/>
+      <Cable connector="CON1" input="SLOT8" name="JET2">
+        <Signal range_begin="10" range_end="11"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="2" id="74" mapping="16" name="J100" type="JET" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="J100full" phimin="0" phimax="64" priority="0" thresholdval="1023" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-31" etamax="31" had_isolation="63" had_veto="63" name="J100full" phimin="0" phimax="64" priority="1" thresholdval="100" type="JET" window="8" windowSize="LARGE"/>
+      <Cable connector="CON1" input="SLOT8" name="JET2">
+        <Signal range_begin="12" range_end="13"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="2" id="75" mapping="17" name="J120" type="JET" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="J120full" phimin="0" phimax="64" priority="0" thresholdval="1023" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-31" etamax="31" had_isolation="63" had_veto="63" name="J120full" phimin="0" phimax="64" priority="1" thresholdval="120" type="JET" window="8" windowSize="LARGE"/>
+      <Cable connector="CON1" input="SLOT8" name="JET2">
+        <Signal range_begin="14" range_end="15"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="2" id="76" mapping="18" name="J400" type="JET" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="J400full" phimin="0" phimax="64" priority="0" thresholdval="1023" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-31" etamax="31" had_isolation="63" had_veto="63" name="J400full" phimin="0" phimax="64" priority="1" thresholdval="400" type="JET" window="8" windowSize="LARGE"/>
+      <Cable connector="CON1" input="SLOT8" name="JET2">
+        <Signal range_begin="16" range_end="17"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="2" id="77" mapping="19" name="J15.31ETA49" type="JET" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="J15.31ETA49full" phimin="0" phimax="64" priority="0" thresholdval="1023" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="-31" had_isolation="63" had_veto="63" name="J15.31ETA49full" phimin="0" phimax="64" priority="1" thresholdval="15" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="31" etamax="49" had_isolation="63" had_veto="63" name="J15.31ETA49full" phimin="0" phimax="64" priority="1" thresholdval="15" type="JET" window="8" windowSize="LARGE"/>
+      <Cable connector="CON1" input="SLOT8" name="JET2">
+        <Signal range_begin="18" range_end="19"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="2" id="78" mapping="20" name="J20.31ETA49" type="JET" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="J20.31ETA49full" phimin="0" phimax="64" priority="0" thresholdval="1023" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="-31" had_isolation="63" had_veto="63" name="J20.31ETA49full" phimin="0" phimax="64" priority="1" thresholdval="20" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="31" etamax="49" had_isolation="63" had_veto="63" name="J20.31ETA49full" phimin="0" phimax="64" priority="1" thresholdval="20" type="JET" window="8" windowSize="LARGE"/>
+      <Cable connector="CON1" input="SLOT8" name="JET2">
+        <Signal range_begin="20" range_end="21"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="2" id="79" mapping="21" name="J30.31ETA49" type="JET" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="J30.31ETA49full" phimin="0" phimax="64" priority="0" thresholdval="1023" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="-31" had_isolation="63" had_veto="63" name="J30.31ETA49full" phimin="0" phimax="64" priority="1" thresholdval="30" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="31" etamax="49" had_isolation="63" had_veto="63" name="J30.31ETA49full" phimin="0" phimax="64" priority="1" thresholdval="30" type="JET" window="8" windowSize="LARGE"/>
+      <Cable connector="CON1" input="SLOT8" name="JET2">
+        <Signal range_begin="22" range_end="23"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="2" id="80" mapping="22" name="J50.31ETA49" type="JET" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="J50.31ETA49full" phimin="0" phimax="64" priority="0" thresholdval="1023" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="-31" had_isolation="63" had_veto="63" name="J50.31ETA49full" phimin="0" phimax="64" priority="1" thresholdval="50" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="31" etamax="49" had_isolation="63" had_veto="63" name="J50.31ETA49full" phimin="0" phimax="64" priority="1" thresholdval="50" type="JET" window="8" windowSize="LARGE"/>
+      <Cable connector="CON1" input="SLOT8" name="JET2">
+        <Signal range_begin="24" range_end="25"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="2" id="81" mapping="23" name="J75.31ETA49" type="JET" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="J75.31ETA49full" phimin="0" phimax="64" priority="0" thresholdval="1023" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="-31" had_isolation="63" had_veto="63" name="J75.31ETA49full" phimin="0" phimax="64" priority="1" thresholdval="75" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="31" etamax="49" had_isolation="63" had_veto="63" name="J75.31ETA49full" phimin="0" phimax="64" priority="1" thresholdval="75" type="JET" window="8" windowSize="LARGE"/>
+      <Cable connector="CON1" input="SLOT8" name="JET2">
+        <Signal range_begin="26" range_end="27"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="2" id="82" mapping="24" name="J100.31ETA49" type="JET" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="J100.31ETA49full" phimin="0" phimax="64" priority="0" thresholdval="1023" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="-31" had_isolation="63" had_veto="63" name="J100.31ETA49full" phimin="0" phimax="64" priority="1" thresholdval="100" type="JET" window="8" windowSize="LARGE"/>
+      <TriggerThresholdValue em_isolation="63" etamin="31" etamax="49" had_isolation="63" had_veto="63" name="J100.31ETA49full" phimin="0" phimax="64" priority="1" thresholdval="100" type="JET" window="8" windowSize="LARGE"/>
+      <Cable connector="CON1" input="SLOT8" name="JET2">
+        <Signal range_begin="28" range_end="29"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="83" mapping="0" name="LUCID_A" type="LUCID" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="LUCID_Afull" phimin="0" phimax="64" priority="0" thresholdval="650" type="LUCID" window="0"/>
+      <Cable connector="CON1" input="SLOT9" name="CTPCAL">
+        <Signal range_begin="19" range_end="19"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="84" mapping="1" name="LUCID_C" type="LUCID" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="LUCID_Cfull" phimin="0" phimax="64" priority="0" thresholdval="650" type="LUCID" window="0"/>
+      <Cable connector="CON1" input="SLOT9" name="CTPCAL">
+        <Signal range_begin="20" range_end="20"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="85" mapping="0" name="MBTS_A" type="MBTS" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A0full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A10full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A11full" phimin="0" phimax="64" priority="0" thresholdval="0" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A12full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A13full" phimin="0" phimax="64" priority="0" thresholdval="0" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A14full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A15full" phimin="0" phimax="64" priority="0" thresholdval="0" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A1full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A2full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A3full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A4full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A5full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A6full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A7full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A8full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A9full" phimin="0" phimax="64" priority="0" thresholdval="0" type="MBTSSI" window="0"/>
+      <Cable connector="CON2" input="SLOT9" name="NIM1">
+        <Signal range_begin="16" range_end="18"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="86" mapping="1" name="MBTS_C" type="MBTS" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C0full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C10full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C11full" phimin="0" phimax="64" priority="0" thresholdval="0" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C12full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C13full" phimin="0" phimax="64" priority="0" thresholdval="0" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C14full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C15full" phimin="0" phimax="64" priority="0" thresholdval="0" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C1full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C2full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C3full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C4full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C5full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C6full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C7full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C8full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C9full" phimin="0" phimax="64" priority="0" thresholdval="0" type="MBTSSI" window="0"/>
+      <Cable connector="CON3" input="SLOT9" name="NIM2">
+        <Signal range_begin="16" range_end="18"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="87" mapping="0" name="MBTS_A0" type="MBTSSI" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A0full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <Cable connector="CON2" input="SLOT9" name="NIM1">
+        <Signal range_begin="0" range_end="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="88" mapping="1" name="MBTS_A1" type="MBTSSI" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A1full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <Cable connector="CON2" input="SLOT9" name="NIM1">
+        <Signal range_begin="1" range_end="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="89" mapping="2" name="MBTS_A2" type="MBTSSI" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A2full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <Cable connector="CON2" input="SLOT9" name="NIM1">
+        <Signal range_begin="2" range_end="2"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="90" mapping="3" name="MBTS_A3" type="MBTSSI" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A3full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <Cable connector="CON2" input="SLOT9" name="NIM1">
+        <Signal range_begin="3" range_end="3"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="91" mapping="4" name="MBTS_A4" type="MBTSSI" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A4full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <Cable connector="CON2" input="SLOT9" name="NIM1">
+        <Signal range_begin="4" range_end="4"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="92" mapping="5" name="MBTS_A5" type="MBTSSI" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A5full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <Cable connector="CON2" input="SLOT9" name="NIM1">
+        <Signal range_begin="5" range_end="5"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="93" mapping="6" name="MBTS_A6" type="MBTSSI" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A6full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <Cable connector="CON2" input="SLOT9" name="NIM1">
+        <Signal range_begin="6" range_end="6"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="94" mapping="7" name="MBTS_A7" type="MBTSSI" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A7full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <Cable connector="CON2" input="SLOT9" name="NIM1">
+        <Signal range_begin="7" range_end="7"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="95" mapping="8" name="MBTS_A8" type="MBTSSI" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A8full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <Cable connector="CON2" input="SLOT9" name="NIM1">
+        <Signal range_begin="8" range_end="8"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="96" mapping="9" name="MBTS_A10" type="MBTSSI" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A10full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <Cable connector="CON2" input="SLOT9" name="NIM1">
+        <Signal range_begin="9" range_end="9"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="97" mapping="10" name="MBTS_A12" type="MBTSSI" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A12full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <Cable connector="CON2" input="SLOT9" name="NIM1">
+        <Signal range_begin="10" range_end="10"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="98" mapping="11" name="MBTS_A14" type="MBTSSI" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_A14full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <Cable connector="CON2" input="SLOT9" name="NIM1">
+        <Signal range_begin="11" range_end="11"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="99" mapping="12" name="MBTS_C0" type="MBTSSI" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C0full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <Cable connector="CON3" input="SLOT9" name="NIM2">
+        <Signal range_begin="0" range_end="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="100" mapping="13" name="MBTS_C1" type="MBTSSI" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C1full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <Cable connector="CON3" input="SLOT9" name="NIM2">
+        <Signal range_begin="1" range_end="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="101" mapping="14" name="MBTS_C2" type="MBTSSI" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C2full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <Cable connector="CON3" input="SLOT9" name="NIM2">
+        <Signal range_begin="2" range_end="2"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="102" mapping="15" name="MBTS_C3" type="MBTSSI" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C3full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <Cable connector="CON3" input="SLOT9" name="NIM2">
+        <Signal range_begin="3" range_end="3"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="103" mapping="16" name="MBTS_C4" type="MBTSSI" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C4full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <Cable connector="CON3" input="SLOT9" name="NIM2">
+        <Signal range_begin="4" range_end="4"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="104" mapping="17" name="MBTS_C5" type="MBTSSI" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C5full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <Cable connector="CON3" input="SLOT9" name="NIM2">
+        <Signal range_begin="5" range_end="5"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="105" mapping="18" name="MBTS_C6" type="MBTSSI" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C6full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <Cable connector="CON3" input="SLOT9" name="NIM2">
+        <Signal range_begin="6" range_end="6"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="106" mapping="19" name="MBTS_C7" type="MBTSSI" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C7full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <Cable connector="CON3" input="SLOT9" name="NIM2">
+        <Signal range_begin="7" range_end="7"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="107" mapping="20" name="MBTS_C8" type="MBTSSI" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C8full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <Cable connector="CON3" input="SLOT9" name="NIM2">
+        <Signal range_begin="8" range_end="8"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="108" mapping="21" name="MBTS_C10" type="MBTSSI" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C10full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <Cable connector="CON3" input="SLOT9" name="NIM2">
+        <Signal range_begin="9" range_end="9"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="109" mapping="22" name="MBTS_C12" type="MBTSSI" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C12full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <Cable connector="CON3" input="SLOT9" name="NIM2">
+        <Signal range_begin="10" range_end="10"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="110" mapping="23" name="MBTS_C14" type="MBTSSI" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MBTS_C14full" phimin="0" phimax="64" priority="0" thresholdval="100" type="MBTSSI" window="0"/>
+      <Cable connector="CON3" input="SLOT9" name="NIM2">
+        <Signal range_begin="11" range_end="11"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="111" mapping="0" name="MU4" type="MUON" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MU4full" phimin="0" phimax="64" priority="0" thresholdval="4" type="MUON" window="0"/>
+      <Cable connector="CON0" input="SLOT9" name="MUCTPI">
+        <Signal range_begin="1" range_end="3"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="112" mapping="1" name="MU6" type="MUON" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MU6full" phimin="0" phimax="64" priority="0" thresholdval="6" type="MUON" window="0"/>
+      <Cable connector="CON0" input="SLOT9" name="MUCTPI">
+        <Signal range_begin="4" range_end="6"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="113" mapping="2" name="MU10" type="MUON" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MU10full" phimin="0" phimax="64" priority="0" thresholdval="10" type="MUON" window="0"/>
+      <Cable connector="CON0" input="SLOT9" name="MUCTPI">
+        <Signal range_begin="7" range_end="9"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="114" mapping="3" name="MU11" type="MUON" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MU11full" phimin="0" phimax="64" priority="0" thresholdval="11" type="MUON" window="0"/>
+      <Cable connector="CON0" input="SLOT9" name="MUCTPI">
+        <Signal range_begin="10" range_end="12"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="115" mapping="4" name="MU20" type="MUON" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MU20full" phimin="0" phimax="64" priority="0" thresholdval="20" type="MUON" window="0"/>
+      <Cable connector="CON0" input="SLOT9" name="MUCTPI">
+        <Signal range_begin="13" range_end="15"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="116" mapping="5" name="MU21" type="MUON" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="MU21full" phimin="0" phimax="64" priority="0" thresholdval="21" type="MUON" window="0"/>
+      <Cable connector="CON0" input="SLOT9" name="MUCTPI">
+        <Signal range_begin="16" range_end="18"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="117" mapping="0" name="NIML1A" type="NIM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="NIML1Afull" phimin="0" phimax="64" priority="0" thresholdval="40" type="NIM" window="0"/>
+      <Cable connector="CON2" input="SLOT9" name="NIM1">
+        <Signal range_begin="19" range_end="19"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="118" mapping="1" name="NIMLHCF" type="NIM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="NIMLHCFfull" phimin="0" phimax="64" priority="0" thresholdval="40" type="NIM" window="0"/>
+      <Cable connector="CON2" input="SLOT9" name="NIM1">
+        <Signal range_begin="20" range_end="20"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="119" mapping="2" name="AFP_NSC" type="NIM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="AFP_NSCfull" phimin="0" phimax="64" priority="0" thresholdval="50" type="NIM" window="0"/>
+      <Cable connector="CON2" input="SLOT9" name="NIM1">
+        <Signal range_begin="21" range_end="21"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="120" mapping="3" name="AFP_NSA" type="NIM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="AFP_NSAfull" phimin="0" phimax="64" priority="0" thresholdval="50" type="NIM" window="0"/>
+      <Cable connector="CON2" input="SLOT9" name="NIM1">
+        <Signal range_begin="22" range_end="22"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="121" mapping="4" name="AFP_FSA_SIT" type="NIM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="AFP_FSA_SITfull" phimin="0" phimax="64" priority="0" thresholdval="50" type="NIM" window="0"/>
+      <Cable connector="CON2" input="SLOT9" name="NIM1">
+        <Signal range_begin="23" range_end="23"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="122" mapping="5" name="AFP_FSA_TOF" type="NIM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="AFP_FSA_TOFfull" phimin="0" phimax="64" priority="0" thresholdval="50" type="NIM" window="0"/>
+      <Cable connector="CON2" input="SLOT9" name="NIM1">
+        <Signal range_begin="24" range_end="24"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="123" mapping="6" name="AFP_FSA_LOG" type="NIM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="AFP_FSA_LOGfull" phimin="0" phimax="64" priority="0" thresholdval="50" type="NIM" window="0"/>
+      <Cable connector="CON2" input="SLOT9" name="NIM1">
+        <Signal range_begin="25" range_end="25"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="124" mapping="7" name="AFP_FSC_SIT" type="NIM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="AFP_FSC_SITfull" phimin="0" phimax="64" priority="0" thresholdval="50" type="NIM" window="0"/>
+      <Cable connector="CON2" input="SLOT9" name="NIM1">
+        <Signal range_begin="26" range_end="26"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="125" mapping="8" name="AFP_FSC_LOG" type="NIM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="AFP_FSC_LOGfull" phimin="0" phimax="64" priority="0" thresholdval="50" type="NIM" window="0"/>
+      <Cable connector="CON2" input="SLOT9" name="NIM1">
+        <Signal range_begin="27" range_end="27"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="126" mapping="9" name="AFP_FSC_TOF" type="NIM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="AFP_FSC_TOFfull" phimin="0" phimax="64" priority="0" thresholdval="50" type="NIM" window="0"/>
+      <Cable connector="CON2" input="SLOT9" name="NIM1">
+        <Signal range_begin="28" range_end="28"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="127" mapping="12" name="NIMTGC" type="NIM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="NIMTGCfull" phimin="0" phimax="64" priority="0" thresholdval="40" type="NIM" window="0"/>
+      <Cable connector="CON3" input="SLOT9" name="NIM2">
+        <Signal range_begin="19" range_end="19"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="128" mapping="13" name="NIMRPC" type="NIM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="NIMRPCfull" phimin="0" phimax="64" priority="0" thresholdval="40" type="NIM" window="0"/>
+      <Cable connector="CON3" input="SLOT9" name="NIM2">
+        <Signal range_begin="20" range_end="20"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="129" mapping="14" name="NIMTRT" type="NIM" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="NIMTRTfull" phimin="0" phimax="64" priority="0" thresholdval="40" type="NIM" window="0"/>
+      <Cable connector="CON3" input="SLOT9" name="NIM2">
+        <Signal range_begin="21" range_end="21"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="130" mapping="0" name="HA8" type="TAU" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00000" name="HA8full" phimin="0" phimax="64" priority="1" thresholdval="8" type="TAU" window="0"/>
+      <Cable connector="CON2" input="SLOT7" name="TAU1">
+        <Signal range_begin="0" range_end="2"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="131" mapping="1" name="HA12" type="TAU" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00000" name="HA12full" phimin="0" phimax="64" priority="1" thresholdval="12" type="TAU" window="0"/>
+      <Cable connector="CON2" input="SLOT7" name="TAU1">
+        <Signal range_begin="3" range_end="5"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="132" mapping="2" name="HA12IL" type="TAU" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00001" name="HA12ILfull" phimin="0" phimax="64" priority="1" thresholdval="12" type="TAU" window="0"/>
+      <Cable connector="CON2" input="SLOT7" name="TAU1">
+        <Signal range_begin="6" range_end="8"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="133" mapping="3" name="HA12IM" type="TAU" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00010" name="HA12IMfull" phimin="0" phimax="64" priority="1" thresholdval="12" type="TAU" window="0"/>
+      <Cable connector="CON2" input="SLOT7" name="TAU1">
+        <Signal range_begin="9" range_end="11"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="134" mapping="4" name="HA12IT" type="TAU" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00100" name="HA12ITfull" phimin="0" phimax="64" priority="1" thresholdval="12" type="TAU" window="0"/>
+      <Cable connector="CON2" input="SLOT7" name="TAU1">
+        <Signal range_begin="12" range_end="14"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="135" mapping="5" name="HA15" type="TAU" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00000" name="HA15full" phimin="0" phimax="64" priority="1" thresholdval="15" type="TAU" window="0"/>
+      <Cable connector="CON2" input="SLOT7" name="TAU1">
+        <Signal range_begin="15" range_end="17"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="136" mapping="6" name="HA20" type="TAU" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00000" name="HA20full" phimin="0" phimax="64" priority="1" thresholdval="20" type="TAU" window="0"/>
+      <Cable connector="CON2" input="SLOT7" name="TAU1">
+        <Signal range_begin="18" range_end="20"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="137" mapping="7" name="HA20IL" type="TAU" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00001" name="HA20ILfull" phimin="0" phimax="64" priority="1" thresholdval="20" type="TAU" window="0"/>
+      <Cable connector="CON2" input="SLOT7" name="TAU1">
+        <Signal range_begin="21" range_end="23"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="138" mapping="8" name="HA20IM" type="TAU" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00010" name="HA20IMfull" phimin="0" phimax="64" priority="1" thresholdval="20" type="TAU" window="0"/>
+      <Cable connector="CON3" input="SLOT7" name="TAU2">
+        <Signal range_begin="0" range_end="2"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="139" mapping="9" name="HA20IT" type="TAU" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00100" name="HA20ITfull" phimin="0" phimax="64" priority="1" thresholdval="20" type="TAU" window="0"/>
+      <Cable connector="CON3" input="SLOT7" name="TAU2">
+        <Signal range_begin="3" range_end="5"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="140" mapping="10" name="HA25" type="TAU" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00000" name="HA25full" phimin="0" phimax="64" priority="1" thresholdval="25" type="TAU" window="0"/>
+      <Cable connector="CON3" input="SLOT7" name="TAU2">
+        <Signal range_begin="6" range_end="8"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="141" mapping="11" name="HA25IM" type="TAU" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00010" name="HA25IMfull" phimin="0" phimax="64" priority="1" thresholdval="25" type="TAU" window="0"/>
+      <Cable connector="CON3" input="SLOT7" name="TAU2">
+        <Signal range_begin="9" range_end="11"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="142" mapping="12" name="HA30" type="TAU" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00000" name="HA30full" phimin="0" phimax="64" priority="1" thresholdval="30" type="TAU" window="0"/>
+      <Cable connector="CON3" input="SLOT7" name="TAU2">
+        <Signal range_begin="12" range_end="14"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="143" mapping="13" name="HA40" type="TAU" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00000" name="HA40full" phimin="0" phimax="64" priority="1" thresholdval="40" type="TAU" window="0"/>
+      <Cable connector="CON3" input="SLOT7" name="TAU2">
+        <Signal range_begin="15" range_end="17"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="144" mapping="14" name="HA60" type="TAU" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00000" name="HA60full" phimin="0" phimax="64" priority="1" thresholdval="60" type="TAU" window="0"/>
+      <Cable connector="CON3" input="SLOT7" name="TAU2">
+        <Signal range_begin="18" range_end="20"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="3" id="145" mapping="15" name="HA100" type="TAU" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="99" isobits="00000" name="HA100full" phimin="0" phimax="64" priority="1" thresholdval="100" type="TAU" window="0"/>
+      <Cable connector="CON3" input="SLOT7" name="TAU2">
+        <Signal range_begin="21" range_end="23"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="146" mapping="0" name="TE5" type="TE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="TE5full" phimin="0" phimax="64" priority="0" thresholdval="5" type="TE" window="0"/>
+      <Cable connector="CON2" input="SLOT8" name="EN1">
+        <Signal range_begin="0" range_end="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="147" mapping="1" name="TE10" type="TE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="TE10full" phimin="0" phimax="64" priority="0" thresholdval="10" type="TE" window="0"/>
+      <Cable connector="CON2" input="SLOT8" name="EN1">
+        <Signal range_begin="1" range_end="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="148" mapping="2" name="TE15" type="TE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="TE15full" phimin="0" phimax="64" priority="0" thresholdval="15" type="TE" window="0"/>
+      <Cable connector="CON2" input="SLOT8" name="EN1">
+        <Signal range_begin="2" range_end="2"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="149" mapping="3" name="TE20" type="TE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="TE20full" phimin="0" phimax="64" priority="0" thresholdval="20" type="TE" window="0"/>
+      <Cable connector="CON2" input="SLOT8" name="EN1">
+        <Signal range_begin="3" range_end="3"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="150" mapping="4" name="TE25" type="TE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="TE25full" phimin="0" phimax="64" priority="0" thresholdval="25" type="TE" window="0"/>
+      <Cable connector="CON2" input="SLOT8" name="EN1">
+        <Signal range_begin="4" range_end="4"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="151" mapping="5" name="TE30" type="TE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="TE30full" phimin="0" phimax="64" priority="0" thresholdval="30" type="TE" window="0"/>
+      <Cable connector="CON2" input="SLOT8" name="EN1">
+        <Signal range_begin="5" range_end="5"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="152" mapping="6" name="TE40" type="TE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="TE40full" phimin="0" phimax="64" priority="0" thresholdval="40" type="TE" window="0"/>
+      <Cable connector="CON2" input="SLOT8" name="EN1">
+        <Signal range_begin="6" range_end="6"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="153" mapping="7" name="TE70" type="TE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="TE70full" phimin="0" phimax="64" priority="0" thresholdval="70" type="TE" window="0"/>
+      <Cable connector="CON2" input="SLOT8" name="EN1">
+        <Signal range_begin="7" range_end="7"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="154" mapping="8" name="TE5.0ETA24" type="TE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="TE5.0ETA24full" phimin="0" phimax="64" priority="0" thresholdval="32767" type="TE" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-24" etamax="24" had_isolation="63" had_veto="63" name="TE5.0ETA24full" phimin="0" phimax="64" priority="1" thresholdval="5" type="TE" window="0"/>
+      <Cable connector="CON3" input="SLOT8" name="EN2">
+        <Signal range_begin="0" range_end="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="155" mapping="9" name="TE10.0ETA24" type="TE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="TE10.0ETA24full" phimin="0" phimax="64" priority="0" thresholdval="32767" type="TE" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-24" etamax="24" had_isolation="63" had_veto="63" name="TE10.0ETA24full" phimin="0" phimax="64" priority="1" thresholdval="10" type="TE" window="0"/>
+      <Cable connector="CON3" input="SLOT8" name="EN2">
+        <Signal range_begin="1" range_end="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="156" mapping="10" name="TE15.0ETA24" type="TE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="TE15.0ETA24full" phimin="0" phimax="64" priority="0" thresholdval="32767" type="TE" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-24" etamax="24" had_isolation="63" had_veto="63" name="TE15.0ETA24full" phimin="0" phimax="64" priority="1" thresholdval="15" type="TE" window="0"/>
+      <Cable connector="CON3" input="SLOT8" name="EN2">
+        <Signal range_begin="2" range_end="2"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="157" mapping="11" name="TE20.0ETA24" type="TE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="TE20.0ETA24full" phimin="0" phimax="64" priority="0" thresholdval="32767" type="TE" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-24" etamax="24" had_isolation="63" had_veto="63" name="TE20.0ETA24full" phimin="0" phimax="64" priority="1" thresholdval="20" type="TE" window="0"/>
+      <Cable connector="CON3" input="SLOT8" name="EN2">
+        <Signal range_begin="3" range_end="3"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="158" mapping="12" name="TE25.0ETA24" type="TE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="TE25.0ETA24full" phimin="0" phimax="64" priority="0" thresholdval="32767" type="TE" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-24" etamax="24" had_isolation="63" had_veto="63" name="TE25.0ETA24full" phimin="0" phimax="64" priority="1" thresholdval="25" type="TE" window="0"/>
+      <Cable connector="CON3" input="SLOT8" name="EN2">
+        <Signal range_begin="4" range_end="4"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="159" mapping="13" name="TE30.0ETA24" type="TE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="TE30.0ETA24full" phimin="0" phimax="64" priority="0" thresholdval="32767" type="TE" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-24" etamax="24" had_isolation="63" had_veto="63" name="TE30.0ETA24full" phimin="0" phimax="64" priority="1" thresholdval="30" type="TE" window="0"/>
+      <Cable connector="CON3" input="SLOT8" name="EN2">
+        <Signal range_begin="5" range_end="5"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="160" mapping="14" name="TE40.0ETA24" type="TE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="TE40.0ETA24full" phimin="0" phimax="64" priority="0" thresholdval="32767" type="TE" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-24" etamax="24" had_isolation="63" had_veto="63" name="TE40.0ETA24full" phimin="0" phimax="64" priority="1" thresholdval="40" type="TE" window="0"/>
+      <Cable connector="CON3" input="SLOT8" name="EN2">
+        <Signal range_begin="6" range_end="6"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="161" mapping="15" name="TE70.0ETA24" type="TE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="TE70.0ETA24full" phimin="0" phimax="64" priority="0" thresholdval="32767" type="TE" window="0"/>
+      <TriggerThresholdValue em_isolation="63" etamin="-24" etamax="24" had_isolation="63" had_veto="63" name="TE70.0ETA24full" phimin="0" phimax="64" priority="1" thresholdval="70" type="TE" window="0"/>
+      <Cable connector="CON3" input="SLOT8" name="EN2">
+        <Signal range_begin="7" range_end="7"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="162" mapping="0" name="900INVM9999-AJ30s6-AJ20s6" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="0" range_end="0" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="163" mapping="1" name="800INVM9999-AJ30s6-AJ20s6" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="1" range_end="1" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="164" mapping="2" name="700INVM9999-AJ30s6-AJ20s6" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="2" range_end="2" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="165" mapping="3" name="500INVM9999-AJ30s6-AJ20s6" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="3" range_end="3" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="166" mapping="4" name="400INVM9999-AJ30s6-AJ20s6" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="4" range_end="4" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="167" mapping="5" name="300INVM9999-AJ30s6-AJ20s6" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="5" range_end="5" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="168" mapping="6" name="200INVM9999-AJ30s6-AJ20s6" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="6" range_end="6" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="169" mapping="7" name="100INVM9999-AJ30s6-AJ20s6" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="7" range_end="7" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="170" mapping="9" name="HT150-J20s5.ETA31" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="9" range_end="9" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="171" mapping="10" name="HT190-J15s5.ETA21" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="10" range_end="10" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="172" mapping="11" name="1INVM5-EMs1-EMs6" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="11" range_end="11" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="173" mapping="12" name="1INVM5-EM7s1-EMs6" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="12" range_end="12" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="174" mapping="13" name="1INVM5-EM12s1-EMs6" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="13" range_end="13" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="175" mapping="14" name="05MINDPHI-EM12s6-XE0" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="14" range_end="14" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="176" mapping="15" name="400INVM9999-AJ30s6.ETA31-AJ20s6.31ETA49" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="15" range_end="15" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="177" mapping="18" name="1DISAMB-EM15his2-TAU12abi-J25ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="18" range_end="18" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="178" mapping="19" name="1DISAMB-J25ab-0DR28-EM15his2-TAU12abi" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="19" range_end="19" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="179" mapping="20" name="2INVM9-2MU6ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="20" range_end="20" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="180" mapping="22" name="2INVM8-ONEBARREL-MU6ab-MU4ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="22" range_end="22" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="181" mapping="24" name="5DETA99-5DPHI99-MU6ab-MU4ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="24" range_end="24" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="182" mapping="25" name="5DETA99-5DPHI99-2MU6ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="25" range_end="25" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="183" mapping="26" name="1DISAMB-TAU20abi-TAU12abi-J25ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="26" range_end="26" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="184" mapping="27" name="0DR28-MU10ab-TAU12abi" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="27" range_end="27" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="185" mapping="28" name="0DETA20-0DPHI20-TAU20abi-TAU12abi" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="28" range_end="28" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="186" mapping="31" name="DISAMB-0DR28-EM15his2-TAU12abi" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="31" range_end="31" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="187" mapping="32" name="05MINDPHI-EM15s6-XE0" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="0" range_end="0" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="188" mapping="33" name="25MT-EM12s6-XE0" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="1" range_end="1" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="189" mapping="35" name="35MT-EM15s6-XE0" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="3" range_end="3" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="190" mapping="37" name="10MINDPHI-J20s2-XE30" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="5" range_end="5" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="191" mapping="38" name="10MINDPHI-J20s2-XE50" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="6" range_end="6" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="192" mapping="39" name="100RATIO-0MATCH-TAU30si2-EMall" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="7" range_end="7" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="193" mapping="40" name="NOT-0MATCH-TAU30si2-EMall" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="8" range_end="8" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="194" mapping="41" name="LAR-EM50s1" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="9" range_end="9" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="195" mapping="42" name="LAR-J100s1" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="10" range_end="10" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="196" mapping="43" name="NOT-02MATCH-EM10s1-AJj15all.ETA49" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="11" range_end="11" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="197" mapping="45" name="35MT-EM12s6-XE0" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="13" range_end="13" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="198" mapping="46" name="15MINDPHI-EM12s6-XE0" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="14" range_end="14" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="199" mapping="47" name="15MINDPHI-EM15s6-XE0" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="15" range_end="15" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="200" mapping="48" name="DISAMB-30INVM-EM20his2-TAU12ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="16" range_end="16" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="201" mapping="52" name="0DR22-2MU6ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="20" range_end="20" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="202" mapping="53" name="7INVM15-2MU4ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="21" range_end="21" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="203" mapping="54" name="0DR22-MU6ab-MU4ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="22" range_end="22" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="204" mapping="55" name="0DR15-2MU4ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="23" range_end="23" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="205" mapping="56" name="0DR24-2MU4ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="24" range_end="24" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="206" mapping="57" name="0DR15-2MU6ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="25" range_end="25" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="207" mapping="58" name="2INVM9-2MU4ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="26" range_end="26" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="208" mapping="59" name="2INVM9-MU6ab-MU4ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON1" input="CTPCORE" name="TOPO1">
+        <Signal range_begin="27" range_end="27" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="209" mapping="64" name="05MINDPHI-AJj10s6-XE0" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="0" range_end="0" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="210" mapping="65" name="10MINDPHI-AJj10s6-XE0" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="1" range_end="1" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="211" mapping="66" name="15MINDPHI-AJj10s6-XE0" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="2" range_end="2" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="212" mapping="67" name="0DR04-MU4ab-CJ15ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="3" range_end="3" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="213" mapping="68" name="0DR04-MU4ab-CJ20ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="4" range_end="4" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="214" mapping="69" name="0DR04-MU4ab-CJ30ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="5" range_end="5" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="215" mapping="70" name="0DR04-MU6ab-CJ20ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="6" range_end="6" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="216" mapping="71" name="0DR04-MU6ab-CJ25ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="7" range_end="7" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="217" mapping="72" name="10MINDPHI-CJ20ab-XE50" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="8" range_end="8" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="218" mapping="73" name="0DR24-2CMU4ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="9" range_end="9" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="2" id="219" mapping="75" name="MULT-CMU4ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="11" range_end="12" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="2" id="220" mapping="77" name="MULT-CMU6ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="13" range_end="14" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="221" mapping="80" name="KF-XE40-AJall" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="16" range_end="16" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="222" mapping="81" name="KF-XE50-AJall" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="17" range_end="17" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="223" mapping="82" name="KF-XE55-AJall" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="18" range_end="18" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="224" mapping="83" name="KF-XE60-AJall" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="19" range_end="19" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="225" mapping="84" name="KF-XE65-AJall" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="20" range_end="20" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="226" mapping="85" name="KF-XE75-AJall" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="21" range_end="21" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="227" mapping="86" name="0MATCH-4AJ20.ETA31-4AJj15.ETA31" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="22" range_end="22" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="228" mapping="87" name="HT190-AJ15all.ETA21" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="23" range_end="23" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="229" mapping="88" name="HT150-AJ20all.ETA31" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="24" range_end="24" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="230" mapping="89" name="HT150-AJj15all.ETA49" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="25" range_end="25" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="231" mapping="90" name="HT20-AJj15all.ETA49" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="26" range_end="26" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="232" mapping="93" name="05RATIO-XE0-HT0-AJj15all.ETA49" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="29" range_end="29" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="233" mapping="95" name="90RATIO2-XE0-HT0-AJj15all.ETA49" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="31" range_end="31" clock="0"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="234" mapping="99" name="0DETA04-EM8abi-MU10ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="3" range_end="3" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="235" mapping="100" name="0DETA04-EM15abi-MUab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="4" range_end="4" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="236" mapping="101" name="0DR24-CMU4ab-MU4ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="5" range_end="5" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="237" mapping="102" name="0DPHI03-EM8abi-MU10ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="6" range_end="6" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="238" mapping="103" name="2INVM8-CMU4ab-MU4ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="7" range_end="7" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="239" mapping="104" name="0DPHI03-EM15abi-MUab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="8" range_end="8" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="240" mapping="105" name="10MINDPHI-AJ20s2-XE50" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="9" range_end="9" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="241" mapping="106" name="LATE-MU10s1" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="10" range_end="10" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="242" mapping="107" name="SC111-CJ15ab.ETA26" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="11" range_end="11" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="243" mapping="108" name="SC85-CJ15ab.ETA26" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="12" range_end="12" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="244" mapping="112" name="250RATIO2-XE0-HT0-AJj15all.ETA49" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="16" range_end="16" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="245" mapping="113" name="10MINDPHI-J20ab-XE50" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="17" range_end="17" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="246" mapping="114" name="0DR28-TAU20abi-TAU12abi" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="18" range_end="18" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="247" mapping="115" name="1DISAMB-J25ab-0DR28-TAU20abi-TAU12abi" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="19" range_end="19" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="248" mapping="116" name="1DISAMB-TAU12abi-J25ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="20" range_end="20" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="249" mapping="117" name="0DR10-MU10ab-MU6ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="21" range_end="21" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="250" mapping="118" name="2DR99-2MU4ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="22" range_end="22" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="251" mapping="119" name="0DR34-2MU4ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="23" range_end="23" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="252" mapping="120" name="2DR15-2MU6ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="24" range_end="24" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="253" mapping="121" name="0DR15-MU6ab-MU4ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="25" range_end="25" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="254" mapping="122" name="0DR25-TAU20abi-TAU12abi" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="26" range_end="26" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="255" mapping="123" name="1DISAMB-J25ab-0DR25-TAU20abi-TAU12abi" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="27" range_end="27" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="256" mapping="124" name="8INVM15-MU6ab-MU4ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="28" range_end="28" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="257" mapping="125" name="8INVM15-2MU6ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="29" range_end="29" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="258" mapping="126" name="2INVM8-2MU4ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="30" range_end="30" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="259" mapping="127" name="2INVM8-MU6ab-MU4ab" type="TOPO" input="ctpcore" version="1">
+      <Cable connector="CON2" input="CTPCORE" name="TOPO2">
+        <Signal range_begin="31" range_end="31" clock="1"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="260" mapping="0" name="XE10" type="XE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="XE10full" phimin="0" phimax="64" priority="0" thresholdval="10" type="XE" window="0"/>
+      <Cable connector="CON2" input="SLOT8" name="EN1">
+        <Signal range_begin="8" range_end="8"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="261" mapping="1" name="XE20" type="XE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="XE20full" phimin="0" phimax="64" priority="0" thresholdval="20" type="XE" window="0"/>
+      <Cable connector="CON2" input="SLOT8" name="EN1">
+        <Signal range_begin="9" range_end="9"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="262" mapping="2" name="XE25" type="XE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="XE25full" phimin="0" phimax="64" priority="0" thresholdval="25" type="XE" window="0"/>
+      <Cable connector="CON2" input="SLOT8" name="EN1">
+        <Signal range_begin="10" range_end="10"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="263" mapping="3" name="XE30" type="XE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="XE30full" phimin="0" phimax="64" priority="0" thresholdval="30" type="XE" window="0"/>
+      <Cable connector="CON2" input="SLOT8" name="EN1">
+        <Signal range_begin="11" range_end="11"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="264" mapping="4" name="XE35" type="XE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="XE35full" phimin="0" phimax="64" priority="0" thresholdval="35" type="XE" window="0"/>
+      <Cable connector="CON2" input="SLOT8" name="EN1">
+        <Signal range_begin="12" range_end="12"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="265" mapping="5" name="XE40" type="XE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="XE40full" phimin="0" phimax="64" priority="0" thresholdval="40" type="XE" window="0"/>
+      <Cable connector="CON2" input="SLOT8" name="EN1">
+        <Signal range_begin="13" range_end="13"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="266" mapping="6" name="XE45" type="XE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="XE45full" phimin="0" phimax="64" priority="0" thresholdval="45" type="XE" window="0"/>
+      <Cable connector="CON2" input="SLOT8" name="EN1">
+        <Signal range_begin="14" range_end="14"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="267" mapping="7" name="XE50" type="XE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="XE50full" phimin="0" phimax="64" priority="0" thresholdval="50" type="XE" window="0"/>
+      <Cable connector="CON2" input="SLOT8" name="EN1">
+        <Signal range_begin="15" range_end="15"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="268" mapping="8" name="XE55" type="XE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="XE55full" phimin="0" phimax="64" priority="0" thresholdval="55" type="XE" window="0"/>
+      <Cable connector="CON3" input="SLOT8" name="EN2">
+        <Signal range_begin="8" range_end="8"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="269" mapping="9" name="XE60" type="XE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="XE60full" phimin="0" phimax="64" priority="0" thresholdval="60" type="XE" window="0"/>
+      <Cable connector="CON3" input="SLOT8" name="EN2">
+        <Signal range_begin="9" range_end="9"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="270" mapping="10" name="XE65" type="XE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="XE65full" phimin="0" phimax="64" priority="0" thresholdval="65" type="XE" window="0"/>
+      <Cable connector="CON3" input="SLOT8" name="EN2">
+        <Signal range_begin="10" range_end="10"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="271" mapping="11" name="XE70" type="XE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="XE70full" phimin="0" phimax="64" priority="0" thresholdval="70" type="XE" window="0"/>
+      <Cable connector="CON3" input="SLOT8" name="EN2">
+        <Signal range_begin="11" range_end="11"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="272" mapping="12" name="XE75" type="XE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="XE75full" phimin="0" phimax="64" priority="0" thresholdval="75" type="XE" window="0"/>
+      <Cable connector="CON3" input="SLOT8" name="EN2">
+        <Signal range_begin="12" range_end="12"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="273" mapping="13" name="XE80" type="XE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="XE80full" phimin="0" phimax="64" priority="0" thresholdval="80" type="XE" window="0"/>
+      <Cable connector="CON3" input="SLOT8" name="EN2">
+        <Signal range_begin="13" range_end="13"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="274" mapping="14" name="XE150" type="XE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="XE150full" phimin="0" phimax="64" priority="0" thresholdval="150" type="XE" window="0"/>
+      <Cable connector="CON3" input="SLOT8" name="EN2">
+        <Signal range_begin="14" range_end="14"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="275" mapping="15" name="XE300" type="XE" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="XE300full" phimin="0" phimax="64" priority="0" thresholdval="300" type="XE" window="0"/>
+      <Cable connector="CON3" input="SLOT8" name="EN2">
+        <Signal range_begin="15" range_end="15"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="276" mapping="0" name="XS20" type="XS" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="XS20full" phimin="0" phimax="64" priority="0" thresholdval="20" type="XS" window="0"/>
+      <Cable connector="CON2" input="SLOT8" name="EN1">
+        <Signal range_begin="16" range_end="16"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="277" mapping="1" name="XS30" type="XS" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="XS30full" phimin="0" phimax="64" priority="0" thresholdval="30" type="XS" window="0"/>
+      <Cable connector="CON2" input="SLOT8" name="EN1">
+        <Signal range_begin="17" range_end="17"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="278" mapping="2" name="XS40" type="XS" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="XS40full" phimin="0" phimax="64" priority="0" thresholdval="40" type="XS" window="0"/>
+      <Cable connector="CON2" input="SLOT8" name="EN1">
+        <Signal range_begin="18" range_end="18"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="279" mapping="3" name="XS45" type="XS" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="XS45full" phimin="0" phimax="64" priority="0" thresholdval="45" type="XS" window="0"/>
+      <Cable connector="CON2" input="SLOT8" name="EN1">
+        <Signal range_begin="19" range_end="19"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="280" mapping="4" name="XS50" type="XS" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="XS50full" phimin="0" phimax="64" priority="0" thresholdval="50" type="XS" window="0"/>
+      <Cable connector="CON2" input="SLOT8" name="EN1">
+        <Signal range_begin="20" range_end="20"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="281" mapping="5" name="XS55" type="XS" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="XS55full" phimin="0" phimax="64" priority="0" thresholdval="55" type="XS" window="0"/>
+      <Cable connector="CON2" input="SLOT8" name="EN1">
+        <Signal range_begin="21" range_end="21"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="282" mapping="6" name="XS60" type="XS" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="XS60full" phimin="0" phimax="64" priority="0" thresholdval="60" type="XS" window="0"/>
+      <Cable connector="CON2" input="SLOT8" name="EN1">
+        <Signal range_begin="22" range_end="22"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="283" mapping="7" name="XS65" type="XS" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="XS65full" phimin="0" phimax="64" priority="0" thresholdval="65" type="XS" window="0"/>
+      <Cable connector="CON2" input="SLOT8" name="EN1">
+        <Signal range_begin="23" range_end="23"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="284" mapping="0" name="ZB_EM15" type="ZB" input="ctpin" seed="EM15" seed_multi="1" bcdelay="3564" version="1">
+      <Cable connector="CON0" input="SLOT7" name="EM1">
+        <Signal range_begin="30" range_end="30"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="285" mapping="0" name="ZDC_A" type="ZDC" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="ZDC_Afull" phimin="0" phimax="64" priority="0" thresholdval="250" type="ZDC" window="0"/>
+      <Cable connector="CON1" input="SLOT9" name="CTPCAL">
+        <Signal range_begin="25" range_end="25"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="286" mapping="1" name="ZDC_C" type="ZDC" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="ZDC_Cfull" phimin="0" phimax="64" priority="0" thresholdval="250" type="ZDC" window="0"/>
+      <Cable connector="CON1" input="SLOT9" name="CTPCAL">
+        <Signal range_begin="26" range_end="26"/>
+      </Cable>
+    </TriggerThreshold>
+    <TriggerThreshold active="1" bitnum="1" id="287" mapping="2" name="ZDC_AND" type="ZDC" input="ctpin" version="1">
+      <TriggerThresholdValue em_isolation="63" etamin="-49" etamax="49" had_isolation="63" had_veto="63" name="ZDC_ANDfull" phimin="0" phimax="64" priority="0" thresholdval="250" type="ZDC" window="0"/>
+      <Cable connector="CON1" input="SLOT9" name="CTPCAL">
+        <Signal range_begin="27" range_end="27"/>
+      </Cable>
+    </TriggerThreshold>
+  </TriggerThresholdList>
+  <Random name0="Random0" cut0="1" name1="Random1" cut1="1" name2="Random2" cut2="1" name3="Random3" cut3="1"/>
+  <BunchGroupSet name="MC" menuPartition="0">
+    <BunchGroup internalNumber="0" name="BCRVeto">
+      <Bunch bunchNumber="1"/>
+    </BunchGroup>
+    <BunchGroup internalNumber="1" name="Paired">
+      <Bunch bunchNumber="1"/>
+    </BunchGroup>
+    <BunchGroup internalNumber="2" name="CalReq"/>
+    <BunchGroup internalNumber="3" name="Empty"/>
+    <BunchGroup internalNumber="4" name="IsolatedUnpaired"/>
+    <BunchGroup internalNumber="5" name="NonIsolatedUnpaired"/>
+    <BunchGroup internalNumber="6" name="EmptyAfterPaired"/>
+    <BunchGroup internalNumber="7" name="InTrain">
+      <Bunch bunchNumber="1"/>
+    </BunchGroup>
+    <BunchGroup internalNumber="8" name="AbortGapNotCalReq"/>
+    <BunchGroup internalNumber="9" name="VdM"/>
+    <BunchGroup internalNumber="10" name="ALFA"/>
+    <BunchGroup internalNumber="11" name="EmptyBeforePaired"/>
+    <BunchGroup internalNumber="12" name="EmptyAndPaired"/>
+    <BunchGroup internalNumber="13" name="NotUsed"/>
+    <BunchGroup internalNumber="14" name="NotUsed"/>
+    <BunchGroup internalNumber="15" name="NotUsed"/>
+  </BunchGroupSet>
+  <PrescaledClock clock1="10" clock2="100" name="psc01"/>
+  <CaloInfo name="CaloInfo" global_em_scale="2" global_jet_scale="1">
+    <METSignificance xeMin="11" xeMax="63" teSqrtMin="4" teSqrtMax="63" xsSigmaScale="1150" xsSigmaOffset="1640"/>
+    <Isolation thrtype="HAIsoForEMthr">
+      <Parametrization isobit="1" offset="-2" slope="230" mincut="10" upperlimit="50" etamin="-49" etamax="49" priority="0"/>
+      <Parametrization isobit="2" offset="0" slope="0" mincut="0" upperlimit="0" etamin="-49" etamax="49" priority="0"/>
+      <Parametrization isobit="3" offset="-2" slope="230" mincut="10" upperlimit="50" etamin="-49" etamax="49" priority="0"/>
+      <Parametrization isobit="4" offset="-2" slope="230" mincut="10" upperlimit="50" etamin="-49" etamax="49" priority="0"/>
+      <Parametrization isobit="5" offset="-2" slope="230" mincut="10" upperlimit="50" etamin="-49" etamax="49" priority="0"/>
+    </Isolation>
+    <Isolation thrtype="EMIsoForEMthr">
+      <Parametrization isobit="1" offset="0" slope="0" mincut="0" upperlimit="0" etamin="-49" etamax="49" priority="0"/>
+      <Parametrization isobit="2" offset="-18" slope="80" mincut="20" upperlimit="50" etamin="-49" etamax="49" priority="0"/>
+      <Parametrization isobit="3" offset="-18" slope="80" mincut="20" upperlimit="50" etamin="-49" etamax="49" priority="0"/>
+      <Parametrization isobit="4" offset="-20" slope="80" mincut="10" upperlimit="50" etamin="-49" etamax="49" priority="0"/>
+      <Parametrization isobit="5" offset="-18" slope="80" mincut="15" upperlimit="50" etamin="-49" etamax="49" priority="0"/>
+    </Isolation>
+    <Isolation thrtype="EMIsoForTAUthr">
+      <Parametrization isobit="1" offset="30" slope="100" mincut="0" upperlimit="60" etamin="-49" etamax="49" priority="0"/>
+      <Parametrization isobit="2" offset="20" slope="100" mincut="0" upperlimit="60" etamin="-49" etamax="49" priority="0"/>
+      <Parametrization isobit="3" offset="15" slope="100" mincut="0" upperlimit="60" etamin="-49" etamax="49" priority="0"/>
+      <Parametrization isobit="4" offset="40" slope="0" mincut="0" upperlimit="124" etamin="-49" etamax="49" priority="0"/>
+      <Parametrization isobit="5" offset="30" slope="100" mincut="0" upperlimit="60" etamin="-49" etamax="49" priority="0"/>
+    </Isolation>
+    <MinimumTOBPt thrtype="EM" ptmin="3" etamin="-49" etamax="49" priority="0"/>
+    <MinimumTOBPt thrtype="TAU" ptmin="8" etamin="-49" etamax="49" priority="0"/>
+    <MinimumTOBPt thrtype="JETS" window="4" ptmin="12" etamin="-49" etamax="49" priority="0"/>
+    <MinimumTOBPt thrtype="JETL" window="8" ptmin="12" etamin="-49" etamax="49" priority="0"/>
+  </CaloInfo>
+  <MuctpiInfo name="muctpi" low_pt="1" high_pt="1" max_cand="13"/>
+</LVL1Config>
diff --git a/Trigger/TriggerCommon/TriggerMenuXML/data/LVL1config_MC_pp_v7.xml b/Trigger/TriggerCommon/TriggerMenuXML/data/LVL1config_MC_pp_v7.xml
index 4c842330a290fc9cd80a4f362f9104dffb3d81ca..b4664b48545da538d64e981b2c7e8ca30b6f9b4f 100644
--- a/Trigger/TriggerCommon/TriggerMenuXML/data/LVL1config_MC_pp_v7.xml
+++ b/Trigger/TriggerCommon/TriggerMenuXML/data/LVL1config_MC_pp_v7.xml
@@ -3,7 +3,7 @@
 <LVL1Config name="MC_pp_v7" ctpVersion="4" l1Version="1">
   <!--File is generated by TriggerMenu-->
   <!--No. L1 thresholds defined: 287-->
-  <!--No. L1 items defined: 495-->
+  <!--No. L1 items defined: 496-->
   <TriggerMenu name="MC_pp_v7" phase="lumi">
     <TriggerItem ctpid="0" partition="1" name="L1_EM3" complex_deadtime="0" definition="(EM3[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:111|HF:000">
       <AND>
@@ -1964,11 +1964,13 @@
         <InternalTrigger name="BGRP1"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="250" partition="1" name="L1_J40.0ETA25_2J30_J20.31ETA49" complex_deadtime="0" definition="(J40.0ETA25[x1]&amp;J30[x2]&amp;J20.31ETA49[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="250" partition="1" name="L1_EM15_W-MT35_W-250RO2-XEHT-0_W-05DPHI-JXE-0_W-05DPHI-EM15XE" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;250RATIO2-XE0-HT0-AJj15all.ETA49[x1]&amp;05MINDPHI-AJj10s6-XE0[x1]&amp;05MINDPHI-EM15s6-XE0[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
       <AND>
-        <TriggerCondition multi="1" name="J40.0ETA25_x1" triggerthreshold="J40.0ETA25"/>
-        <TriggerCondition multi="2" name="J30_x2" triggerthreshold="J30"/>
-        <TriggerCondition multi="1" name="J20.31ETA49_x1" triggerthreshold="J20.31ETA49"/>
+        <TriggerCondition multi="1" name="35MT-EM15s6-XE0_x1" triggerthreshold="35MT-EM15s6-XE0"/>
+        <TriggerCondition multi="1" name="EM15_x1" triggerthreshold="EM15"/>
+        <TriggerCondition multi="1" name="250RATIO2-XE0-HT0-AJj15all.ETA49_x1" triggerthreshold="250RATIO2-XE0-HT0-AJj15all.ETA49"/>
+        <TriggerCondition multi="1" name="05MINDPHI-AJj10s6-XE0_x1" triggerthreshold="05MINDPHI-AJj10s6-XE0"/>
+        <TriggerCondition multi="1" name="05MINDPHI-EM15s6-XE0_x1" triggerthreshold="05MINDPHI-EM15s6-XE0"/>
         <InternalTrigger name="BGRP0"/>
         <InternalTrigger name="BGRP1"/>
       </AND>
@@ -2148,24 +2150,24 @@
         <InternalTrigger name="BGRP1"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="274" partition="1" name="L1_EM15_W-MT35_W-250RO2-XEHT-0_W-05DPHI-JXE-0_W-05DPHI-EM15XE" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;250RATIO2-XE0-HT0-AJj15all.ETA49[x1]&amp;05MINDPHI-AJj10s6-XE0[x1]&amp;05MINDPHI-EM15s6-XE0[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="274" partition="1" name="L1_EM15_W-MT35_XS60_W-15DPHI-JXE-0_W-15DPHI-EM15XE" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;XS60[x1]&amp;15MINDPHI-AJj10s6-XE0[x1]&amp;15MINDPHI-EM15s6-XE0[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
       <AND>
         <TriggerCondition multi="1" name="35MT-EM15s6-XE0_x1" triggerthreshold="35MT-EM15s6-XE0"/>
         <TriggerCondition multi="1" name="EM15_x1" triggerthreshold="EM15"/>
-        <TriggerCondition multi="1" name="250RATIO2-XE0-HT0-AJj15all.ETA49_x1" triggerthreshold="250RATIO2-XE0-HT0-AJj15all.ETA49"/>
-        <TriggerCondition multi="1" name="05MINDPHI-AJj10s6-XE0_x1" triggerthreshold="05MINDPHI-AJj10s6-XE0"/>
-        <TriggerCondition multi="1" name="05MINDPHI-EM15s6-XE0_x1" triggerthreshold="05MINDPHI-EM15s6-XE0"/>
+        <TriggerCondition multi="1" name="XS60_x1" triggerthreshold="XS60"/>
+        <TriggerCondition multi="1" name="15MINDPHI-AJj10s6-XE0_x1" triggerthreshold="15MINDPHI-AJj10s6-XE0"/>
+        <TriggerCondition multi="1" name="15MINDPHI-EM15s6-XE0_x1" triggerthreshold="15MINDPHI-EM15s6-XE0"/>
         <InternalTrigger name="BGRP0"/>
         <InternalTrigger name="BGRP1"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="275" partition="1" name="L1_EM15_W-MT35_XS60_W-15DPHI-JXE-0_W-15DPHI-EM15XE" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;XS60[x1]&amp;15MINDPHI-AJj10s6-XE0[x1]&amp;15MINDPHI-EM15s6-XE0[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="275" partition="1" name="L1_EM15_W-MT35_XS60_W-05DPHI-JXE-0_W-05DPHI-EM15XE" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;XS60[x1]&amp;05MINDPHI-AJj10s6-XE0[x1]&amp;05MINDPHI-EM15s6-XE0[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
       <AND>
         <TriggerCondition multi="1" name="35MT-EM15s6-XE0_x1" triggerthreshold="35MT-EM15s6-XE0"/>
         <TriggerCondition multi="1" name="EM15_x1" triggerthreshold="EM15"/>
         <TriggerCondition multi="1" name="XS60_x1" triggerthreshold="XS60"/>
-        <TriggerCondition multi="1" name="15MINDPHI-AJj10s6-XE0_x1" triggerthreshold="15MINDPHI-AJj10s6-XE0"/>
-        <TriggerCondition multi="1" name="15MINDPHI-EM15s6-XE0_x1" triggerthreshold="15MINDPHI-EM15s6-XE0"/>
+        <TriggerCondition multi="1" name="05MINDPHI-AJj10s6-XE0_x1" triggerthreshold="05MINDPHI-AJj10s6-XE0"/>
+        <TriggerCondition multi="1" name="05MINDPHI-EM15s6-XE0_x1" triggerthreshold="05MINDPHI-EM15s6-XE0"/>
         <InternalTrigger name="BGRP0"/>
         <InternalTrigger name="BGRP1"/>
       </AND>
@@ -2237,18 +2239,7 @@
         <InternalTrigger name="BGRP1"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="284" partition="1" name="L1_EM15_W-MT35_XS60_W-05DPHI-JXE-0_W-05DPHI-EM15XE" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;XS60[x1]&amp;05MINDPHI-AJj10s6-XE0[x1]&amp;05MINDPHI-EM15s6-XE0[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
-      <AND>
-        <TriggerCondition multi="1" name="35MT-EM15s6-XE0_x1" triggerthreshold="35MT-EM15s6-XE0"/>
-        <TriggerCondition multi="1" name="EM15_x1" triggerthreshold="EM15"/>
-        <TriggerCondition multi="1" name="XS60_x1" triggerthreshold="XS60"/>
-        <TriggerCondition multi="1" name="05MINDPHI-AJj10s6-XE0_x1" triggerthreshold="05MINDPHI-AJj10s6-XE0"/>
-        <TriggerCondition multi="1" name="05MINDPHI-EM15s6-XE0_x1" triggerthreshold="05MINDPHI-EM15s6-XE0"/>
-        <InternalTrigger name="BGRP0"/>
-        <InternalTrigger name="BGRP1"/>
-      </AND>
-    </TriggerItem>
-    <TriggerItem ctpid="285" partition="1" name="L1_EM15_W-MT35_XS40_W-15DPHI-JXE-0_W-15DPHI-EM15XE" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;XS40[x1]&amp;15MINDPHI-AJj10s6-XE0[x1]&amp;15MINDPHI-EM15s6-XE0[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="284" partition="1" name="L1_EM15_W-MT35_XS40_W-15DPHI-JXE-0_W-15DPHI-EM15XE" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;XS40[x1]&amp;15MINDPHI-AJj10s6-XE0[x1]&amp;15MINDPHI-EM15s6-XE0[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
       <AND>
         <TriggerCondition multi="1" name="35MT-EM15s6-XE0_x1" triggerthreshold="35MT-EM15s6-XE0"/>
         <TriggerCondition multi="1" name="EM15_x1" triggerthreshold="EM15"/>
@@ -2259,26 +2250,26 @@
         <InternalTrigger name="BGRP1"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="286" partition="1" name="L1_EM15_W-MT35" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="285" partition="1" name="L1_EM15_W-MT35_XS40_W-05DPHI-JXE-0_W-05DPHI-EM15XE" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;XS40[x1]&amp;05MINDPHI-AJj10s6-XE0[x1]&amp;05MINDPHI-EM15s6-XE0[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
       <AND>
         <TriggerCondition multi="1" name="35MT-EM15s6-XE0_x1" triggerthreshold="35MT-EM15s6-XE0"/>
         <TriggerCondition multi="1" name="EM15_x1" triggerthreshold="EM15"/>
+        <TriggerCondition multi="1" name="XS40_x1" triggerthreshold="XS40"/>
+        <TriggerCondition multi="1" name="05MINDPHI-AJj10s6-XE0_x1" triggerthreshold="05MINDPHI-AJj10s6-XE0"/>
+        <TriggerCondition multi="1" name="05MINDPHI-EM15s6-XE0_x1" triggerthreshold="05MINDPHI-EM15s6-XE0"/>
         <InternalTrigger name="BGRP0"/>
         <InternalTrigger name="BGRP1"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="287" partition="1" name="L1_EM15_W-MT35_XS40_W-05DPHI-JXE-0_W-05DPHI-EM15XE" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;XS40[x1]&amp;05MINDPHI-AJj10s6-XE0[x1]&amp;05MINDPHI-EM15s6-XE0[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="286" partition="1" name="L1_EM15_W-MT35" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
       <AND>
         <TriggerCondition multi="1" name="35MT-EM15s6-XE0_x1" triggerthreshold="35MT-EM15s6-XE0"/>
         <TriggerCondition multi="1" name="EM15_x1" triggerthreshold="EM15"/>
-        <TriggerCondition multi="1" name="XS40_x1" triggerthreshold="XS40"/>
-        <TriggerCondition multi="1" name="05MINDPHI-AJj10s6-XE0_x1" triggerthreshold="05MINDPHI-AJj10s6-XE0"/>
-        <TriggerCondition multi="1" name="05MINDPHI-EM15s6-XE0_x1" triggerthreshold="05MINDPHI-EM15s6-XE0"/>
         <InternalTrigger name="BGRP0"/>
         <InternalTrigger name="BGRP1"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="288" partition="1" name="L1_EM12_W-MT35_XS50" complex_deadtime="0" definition="(35MT-EM12s6-XE0[x1]&amp;EM12[x1]&amp;XS50[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="287" partition="1" name="L1_EM12_W-MT35_XS50" complex_deadtime="0" definition="(35MT-EM12s6-XE0[x1]&amp;EM12[x1]&amp;XS50[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
       <AND>
         <TriggerCondition multi="1" name="35MT-EM12s6-XE0_x1" triggerthreshold="35MT-EM12s6-XE0"/>
         <TriggerCondition multi="1" name="EM12_x1" triggerthreshold="EM12"/>
@@ -2287,7 +2278,7 @@
         <InternalTrigger name="BGRP1"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="289" partition="1" name="L1_EM15_W-MT35_XS60" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;XS60[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="288" partition="1" name="L1_EM15_W-MT35_XS60" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;XS60[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
       <AND>
         <TriggerCondition multi="1" name="35MT-EM15s6-XE0_x1" triggerthreshold="35MT-EM15s6-XE0"/>
         <TriggerCondition multi="1" name="EM15_x1" triggerthreshold="EM15"/>
@@ -2296,7 +2287,7 @@
         <InternalTrigger name="BGRP1"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="290" partition="1" name="L1_EM10VH_W-MT35_XS50" complex_deadtime="0" definition="(35MT-EM12s6-XE0[x1]&amp;EM10VH[x1]&amp;XS50[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="289" partition="1" name="L1_EM10VH_W-MT35_XS50" complex_deadtime="0" definition="(35MT-EM12s6-XE0[x1]&amp;EM10VH[x1]&amp;XS50[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
       <AND>
         <TriggerCondition multi="1" name="35MT-EM12s6-XE0_x1" triggerthreshold="35MT-EM12s6-XE0"/>
         <TriggerCondition multi="1" name="EM10VH_x1" triggerthreshold="EM10VH"/>
@@ -2305,7 +2296,7 @@
         <InternalTrigger name="BGRP1"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="291" partition="1" name="L1_EM15VH_W-MT35_XS60" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15VH[x1]&amp;XS60[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="290" partition="1" name="L1_EM15VH_W-MT35_XS60" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15VH[x1]&amp;XS60[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
       <AND>
         <TriggerCondition multi="1" name="35MT-EM15s6-XE0_x1" triggerthreshold="35MT-EM15s6-XE0"/>
         <TriggerCondition multi="1" name="EM15VH_x1" triggerthreshold="EM15VH"/>
@@ -2314,7 +2305,7 @@
         <InternalTrigger name="BGRP1"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="292" partition="1" name="L1_EM20VH_W-MT35_XS60" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM20VH[x1]&amp;XS60[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="291" partition="1" name="L1_EM20VH_W-MT35_XS60" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM20VH[x1]&amp;XS60[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
       <AND>
         <TriggerCondition multi="1" name="35MT-EM15s6-XE0_x1" triggerthreshold="35MT-EM15s6-XE0"/>
         <TriggerCondition multi="1" name="EM20VH_x1" triggerthreshold="EM20VH"/>
@@ -2323,7 +2314,7 @@
         <InternalTrigger name="BGRP1"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="293" partition="1" name="L1_EM22VHI_W-MT35_XS40" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM22VHI[x1]&amp;XS40[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="292" partition="1" name="L1_EM22VHI_W-MT35_XS40" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM22VHI[x1]&amp;XS40[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
       <AND>
         <TriggerCondition multi="1" name="35MT-EM15s6-XE0_x1" triggerthreshold="35MT-EM15s6-XE0"/>
         <TriggerCondition multi="1" name="EM22VHI_x1" triggerthreshold="EM22VHI"/>
@@ -2332,7 +2323,7 @@
         <InternalTrigger name="BGRP1"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="294" partition="1" name="L1_EM12_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE_W-90RO2-XEHT-0" complex_deadtime="0" definition="(25MT-EM12s6-XE0[x1]&amp;EM12[x1]&amp;15MINDPHI-AJj10s6-XE0[x1]&amp;15MINDPHI-EM12s6-XE0[x1]&amp;90RATIO2-XE0-HT0-AJj15all.ETA49[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="293" partition="1" name="L1_EM12_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE_W-90RO2-XEHT-0" complex_deadtime="0" definition="(25MT-EM12s6-XE0[x1]&amp;EM12[x1]&amp;15MINDPHI-AJj10s6-XE0[x1]&amp;15MINDPHI-EM12s6-XE0[x1]&amp;90RATIO2-XE0-HT0-AJj15all.ETA49[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
       <AND>
         <TriggerCondition multi="1" name="25MT-EM12s6-XE0_x1" triggerthreshold="25MT-EM12s6-XE0"/>
         <TriggerCondition multi="1" name="EM12_x1" triggerthreshold="EM12"/>
@@ -2343,6 +2334,17 @@
         <InternalTrigger name="BGRP1"/>
       </AND>
     </TriggerItem>
+    <TriggerItem ctpid="294" partition="1" name="L1_EM12_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE_XS20" complex_deadtime="0" definition="(25MT-EM12s6-XE0[x1]&amp;EM12[x1]&amp;15MINDPHI-AJj10s6-XE0[x1]&amp;15MINDPHI-EM12s6-XE0[x1]&amp;XS20[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="25MT-EM12s6-XE0_x1" triggerthreshold="25MT-EM12s6-XE0"/>
+        <TriggerCondition multi="1" name="EM12_x1" triggerthreshold="EM12"/>
+        <TriggerCondition multi="1" name="15MINDPHI-AJj10s6-XE0_x1" triggerthreshold="15MINDPHI-AJj10s6-XE0"/>
+        <TriggerCondition multi="1" name="15MINDPHI-EM12s6-XE0_x1" triggerthreshold="15MINDPHI-EM12s6-XE0"/>
+        <TriggerCondition multi="1" name="XS20_x1" triggerthreshold="XS20"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
     <TriggerItem ctpid="295" partition="1" name="L1_EM22VHIM" complex_deadtime="0" definition="(EM22VHIM[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
       <AND>
         <TriggerCondition multi="1" name="EM22VHIM_x1" triggerthreshold="EM22VHIM"/>
@@ -2586,13 +2588,12 @@
         <InternalTrigger name="BGRP1"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="322" partition="1" name="L1_EM12_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE_XS20" complex_deadtime="0" definition="(25MT-EM12s6-XE0[x1]&amp;EM12[x1]&amp;15MINDPHI-AJj10s6-XE0[x1]&amp;15MINDPHI-EM12s6-XE0[x1]&amp;XS20[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="322" partition="1" name="L1_EM12_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE" complex_deadtime="0" definition="(25MT-EM12s6-XE0[x1]&amp;EM12[x1]&amp;15MINDPHI-AJj10s6-XE0[x1]&amp;15MINDPHI-EM12s6-XE0[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
       <AND>
         <TriggerCondition multi="1" name="25MT-EM12s6-XE0_x1" triggerthreshold="25MT-EM12s6-XE0"/>
         <TriggerCondition multi="1" name="EM12_x1" triggerthreshold="EM12"/>
         <TriggerCondition multi="1" name="15MINDPHI-AJj10s6-XE0_x1" triggerthreshold="15MINDPHI-AJj10s6-XE0"/>
         <TriggerCondition multi="1" name="15MINDPHI-EM12s6-XE0_x1" triggerthreshold="15MINDPHI-EM12s6-XE0"/>
-        <TriggerCondition multi="1" name="XS20_x1" triggerthreshold="XS20"/>
         <InternalTrigger name="BGRP0"/>
         <InternalTrigger name="BGRP1"/>
       </AND>
@@ -2749,12 +2750,13 @@
         <InternalTrigger name="BGRP4"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="344" partition="1" name="L1_EM12_W-MT25_W-15DPHI-JXE-0_W-15DPHI-EMXE" complex_deadtime="0" definition="(25MT-EM12s6-XE0[x1]&amp;EM12[x1]&amp;15MINDPHI-AJj10s6-XE0[x1]&amp;15MINDPHI-EM12s6-XE0[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="344" partition="1" name="L1_EM15_W-MT35_W-05DPHI-JXE-0_W-05DPHI-EM15XE_XS30" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;05MINDPHI-AJj10s6-XE0[x1]&amp;05MINDPHI-EM15s6-XE0[x1]&amp;XS30[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
       <AND>
-        <TriggerCondition multi="1" name="25MT-EM12s6-XE0_x1" triggerthreshold="25MT-EM12s6-XE0"/>
-        <TriggerCondition multi="1" name="EM12_x1" triggerthreshold="EM12"/>
-        <TriggerCondition multi="1" name="15MINDPHI-AJj10s6-XE0_x1" triggerthreshold="15MINDPHI-AJj10s6-XE0"/>
-        <TriggerCondition multi="1" name="15MINDPHI-EM12s6-XE0_x1" triggerthreshold="15MINDPHI-EM12s6-XE0"/>
+        <TriggerCondition multi="1" name="35MT-EM15s6-XE0_x1" triggerthreshold="35MT-EM15s6-XE0"/>
+        <TriggerCondition multi="1" name="EM15_x1" triggerthreshold="EM15"/>
+        <TriggerCondition multi="1" name="05MINDPHI-AJj10s6-XE0_x1" triggerthreshold="05MINDPHI-AJj10s6-XE0"/>
+        <TriggerCondition multi="1" name="05MINDPHI-EM15s6-XE0_x1" triggerthreshold="05MINDPHI-EM15s6-XE0"/>
+        <TriggerCondition multi="1" name="XS30_x1" triggerthreshold="XS30"/>
         <InternalTrigger name="BGRP0"/>
         <InternalTrigger name="BGRP1"/>
       </AND>
@@ -3073,13 +3075,12 @@
         <InternalTrigger name="BGRP1"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="384" partition="1" name="L1_EM15_W-MT35_W-05DPHI-JXE-0_W-05DPHI-EM15XE_XS30" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;05MINDPHI-AJj10s6-XE0[x1]&amp;05MINDPHI-EM15s6-XE0[x1]&amp;XS30[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="384" partition="1" name="L1_EM15_W-MT35_W-05DPHI-JXE-0_W-05DPHI-EM15XE" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;05MINDPHI-AJj10s6-XE0[x1]&amp;05MINDPHI-EM15s6-XE0[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
       <AND>
         <TriggerCondition multi="1" name="35MT-EM15s6-XE0_x1" triggerthreshold="35MT-EM15s6-XE0"/>
         <TriggerCondition multi="1" name="EM15_x1" triggerthreshold="EM15"/>
         <TriggerCondition multi="1" name="05MINDPHI-AJj10s6-XE0_x1" triggerthreshold="05MINDPHI-AJj10s6-XE0"/>
         <TriggerCondition multi="1" name="05MINDPHI-EM15s6-XE0_x1" triggerthreshold="05MINDPHI-EM15s6-XE0"/>
-        <TriggerCondition multi="1" name="XS30_x1" triggerthreshold="XS30"/>
         <InternalTrigger name="BGRP0"/>
         <InternalTrigger name="BGRP1"/>
       </AND>
@@ -3314,12 +3315,10 @@
         <InternalTrigger name="BGRP6"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="416" partition="1" name="L1_EM15_W-MT35_W-05DPHI-JXE-0_W-05DPHI-EM15XE" complex_deadtime="0" definition="(35MT-EM15s6-XE0[x1]&amp;EM15[x1]&amp;05MINDPHI-AJj10s6-XE0[x1]&amp;05MINDPHI-EM15s6-XE0[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="416" partition="1" name="L1_HT150-JJ15.ETA49_MJJ-400" complex_deadtime="0" definition="(HT150-AJj15all.ETA49[x1]&amp;400INVM9999-AJ30s6-AJ20s6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
       <AND>
-        <TriggerCondition multi="1" name="35MT-EM15s6-XE0_x1" triggerthreshold="35MT-EM15s6-XE0"/>
-        <TriggerCondition multi="1" name="EM15_x1" triggerthreshold="EM15"/>
-        <TriggerCondition multi="1" name="05MINDPHI-AJj10s6-XE0_x1" triggerthreshold="05MINDPHI-AJj10s6-XE0"/>
-        <TriggerCondition multi="1" name="05MINDPHI-EM15s6-XE0_x1" triggerthreshold="05MINDPHI-EM15s6-XE0"/>
+        <TriggerCondition multi="1" name="HT150-AJj15all.ETA49_x1" triggerthreshold="HT150-AJj15all.ETA49"/>
+        <TriggerCondition multi="1" name="400INVM9999-AJ30s6-AJ20s6_x1" triggerthreshold="400INVM9999-AJ30s6-AJ20s6"/>
         <InternalTrigger name="BGRP0"/>
         <InternalTrigger name="BGRP1"/>
       </AND>
@@ -3493,7 +3492,7 @@
         <InternalTrigger name="BGRP1"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="437" partition="1" name="L1_AFP_A_AND_C_EM3" complex_deadtime="0" definition="(AFP_NSA[x1]&amp;AFP_FSA_SIT[x1]&amp;AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]&amp;EM3[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="437" partition="1" name="L1_EM3_AFP_A_AND_C" complex_deadtime="0" definition="(AFP_NSA[x1]&amp;AFP_FSA_SIT[x1]&amp;AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]&amp;EM3[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
       <AND>
         <TriggerCondition multi="1" name="AFP_NSA_x1" triggerthreshold="AFP_NSA"/>
         <TriggerCondition multi="1" name="AFP_FSA_SIT_x1" triggerthreshold="AFP_FSA_SIT"/>
@@ -3504,7 +3503,7 @@
         <InternalTrigger name="BGRP1"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="438" partition="1" name="L1_AFP_A_OR_C_EM3" complex_deadtime="0" definition="(((AFP_NSA[x1]&amp;AFP_FSA_SIT[x1])|(AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]))&amp;EM3[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="438" partition="1" name="L1_EM3_AFP_A_OR_C" complex_deadtime="0" definition="(((AFP_NSA[x1]&amp;AFP_FSA_SIT[x1])|(AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]))&amp;EM3[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
       <AND>
         <OR>
           <AND>
@@ -3521,7 +3520,7 @@
         <InternalTrigger name="BGRP1"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="439" partition="1" name="L1_AFP_A_AND_C_MU4" complex_deadtime="0" definition="(AFP_NSA[x1]&amp;AFP_FSA_SIT[x1]&amp;AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]&amp;MU4[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="439" partition="1" name="L1_MU4_AFP_A_AND_C" complex_deadtime="0" definition="(AFP_NSA[x1]&amp;AFP_FSA_SIT[x1]&amp;AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]&amp;MU4[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
       <AND>
         <TriggerCondition multi="1" name="AFP_NSA_x1" triggerthreshold="AFP_NSA"/>
         <TriggerCondition multi="1" name="AFP_FSA_SIT_x1" triggerthreshold="AFP_FSA_SIT"/>
@@ -3532,7 +3531,7 @@
         <InternalTrigger name="BGRP1"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="440" partition="1" name="L1_AFP_A_OR_C_MU4" complex_deadtime="0" definition="(((AFP_NSA[x1]&amp;AFP_FSA_SIT[x1])|(AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]))&amp;MU4[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="440" partition="1" name="L1_MU4_AFP_A_OR_C" complex_deadtime="0" definition="(((AFP_NSA[x1]&amp;AFP_FSA_SIT[x1])|(AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]))&amp;MU4[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
       <AND>
         <OR>
           <AND>
@@ -3752,10 +3751,19 @@
         <InternalTrigger name="BGRP0"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="463" partition="1" name="L1_HT150-JJ15.ETA49_MJJ-400" complex_deadtime="0" definition="(HT150-AJj15all.ETA49[x1]&amp;400INVM9999-AJ30s6-AJ20s6[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="465" partition="1" name="L1_J40.0ETA25_2J30_J20.31ETA49" complex_deadtime="0" definition="(J40.0ETA25[x1]&amp;J30[x2]&amp;J20.31ETA49[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
       <AND>
-        <TriggerCondition multi="1" name="HT150-AJj15all.ETA49_x1" triggerthreshold="HT150-AJj15all.ETA49"/>
-        <TriggerCondition multi="1" name="400INVM9999-AJ30s6-AJ20s6_x1" triggerthreshold="400INVM9999-AJ30s6-AJ20s6"/>
+        <TriggerCondition multi="1" name="J40.0ETA25_x1" triggerthreshold="J40.0ETA25"/>
+        <TriggerCondition multi="2" name="J30_x2" triggerthreshold="J30"/>
+        <TriggerCondition multi="1" name="J20.31ETA49_x1" triggerthreshold="J20.31ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="466" partition="1" name="L1_LATE-MU10_XE40" complex_deadtime="0" definition="(LATE-MU10s1[x1]&amp;XE40[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="LATE-MU10s1_x1" triggerthreshold="LATE-MU10s1"/>
+        <TriggerCondition multi="1" name="XE40_x1" triggerthreshold="XE40"/>
         <InternalTrigger name="BGRP0"/>
         <InternalTrigger name="BGRP1"/>
       </AND>
@@ -3946,9 +3954,9 @@
         <InternalTrigger name="BGRP1"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="504" partition="1" name="L1_4J15_FTK" complex_deadtime="0" definition="(J15[x4]&amp;BGRP0&amp;BGRP1)" trigger_type="10100000" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="504" partition="1" name="L1_4J20_FTK" complex_deadtime="0" definition="(J20[x4]&amp;BGRP0&amp;BGRP1)" trigger_type="10100000" monitor="LF:000|HF:000">
       <AND>
-        <TriggerCondition multi="4" name="J15_x4" triggerthreshold="J15"/>
+        <TriggerCondition multi="4" name="J20_x4" triggerthreshold="J20"/>
         <InternalTrigger name="BGRP0"/>
         <InternalTrigger name="BGRP1"/>
       </AND>
@@ -4453,10 +4461,10 @@
     <Prescale ctpid="460" cut="000001" value="1"/>
     <Prescale ctpid="461" cut="000001" value="1"/>
     <Prescale ctpid="462" cut="000001" value="1"/>
-    <Prescale ctpid="463" cut="000001" value="1"/>
+    <Prescale ctpid="463" cut="-000001" value="-1"/>
     <Prescale ctpid="464" cut="-000001" value="-1"/>
-    <Prescale ctpid="465" cut="-000001" value="-1"/>
-    <Prescale ctpid="466" cut="-000001" value="-1"/>
+    <Prescale ctpid="465" cut="000001" value="1"/>
+    <Prescale ctpid="466" cut="000001" value="1"/>
     <Prescale ctpid="467" cut="000001" value="1"/>
     <Prescale ctpid="468" cut="000001" value="1"/>
     <Prescale ctpid="469" cut="000001" value="1"/>
diff --git a/Trigger/TriggerCommon/TriggerMenuXML/data/LVL1config_Physics_pp_v7.xml b/Trigger/TriggerCommon/TriggerMenuXML/data/LVL1config_Physics_pp_v7.xml
index 6f3672b5bdeaaae2297ee5eec3b8893169185d5c..2f9a2fd1859398349a8e6c0f319e0174c5349fe1 100644
--- a/Trigger/TriggerCommon/TriggerMenuXML/data/LVL1config_Physics_pp_v7.xml
+++ b/Trigger/TriggerCommon/TriggerMenuXML/data/LVL1config_Physics_pp_v7.xml
@@ -3,7 +3,7 @@
 <LVL1Config name="Physics_pp_v7" ctpVersion="4" l1Version="1">
   <!--File is generated by TriggerMenu-->
   <!--No. L1 thresholds defined: 287-->
-  <!--No. L1 items defined: 496-->
+  <!--No. L1 items defined: 498-->
   <TriggerMenu name="Physics_pp_v7" phase="lumi">
     <TriggerItem ctpid="0" partition="1" name="L1_EM3" complex_deadtime="0" definition="(EM3[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:111|HF:000">
       <AND>
@@ -3492,7 +3492,7 @@
         <InternalTrigger name="BGRP1"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="437" partition="1" name="L1_AFP_A_AND_C_EM3" complex_deadtime="0" definition="(AFP_NSA[x1]&amp;AFP_FSA_SIT[x1]&amp;AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]&amp;EM3[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="437" partition="1" name="L1_EM3_AFP_A_AND_C" complex_deadtime="0" definition="(AFP_NSA[x1]&amp;AFP_FSA_SIT[x1]&amp;AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]&amp;EM3[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
       <AND>
         <TriggerCondition multi="1" name="AFP_NSA_x1" triggerthreshold="AFP_NSA"/>
         <TriggerCondition multi="1" name="AFP_FSA_SIT_x1" triggerthreshold="AFP_FSA_SIT"/>
@@ -3503,7 +3503,7 @@
         <InternalTrigger name="BGRP1"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="438" partition="1" name="L1_AFP_A_OR_C_EM3" complex_deadtime="0" definition="(((AFP_NSA[x1]&amp;AFP_FSA_SIT[x1])|(AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]))&amp;EM3[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="438" partition="1" name="L1_EM3_AFP_A_OR_C" complex_deadtime="0" definition="(((AFP_NSA[x1]&amp;AFP_FSA_SIT[x1])|(AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]))&amp;EM3[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
       <AND>
         <OR>
           <AND>
@@ -3520,7 +3520,7 @@
         <InternalTrigger name="BGRP1"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="439" partition="1" name="L1_AFP_A_AND_C_MU4" complex_deadtime="0" definition="(AFP_NSA[x1]&amp;AFP_FSA_SIT[x1]&amp;AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]&amp;MU4[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="439" partition="1" name="L1_MU4_AFP_A_AND_C" complex_deadtime="0" definition="(AFP_NSA[x1]&amp;AFP_FSA_SIT[x1]&amp;AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]&amp;MU4[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
       <AND>
         <TriggerCondition multi="1" name="AFP_NSA_x1" triggerthreshold="AFP_NSA"/>
         <TriggerCondition multi="1" name="AFP_FSA_SIT_x1" triggerthreshold="AFP_FSA_SIT"/>
@@ -3531,7 +3531,7 @@
         <InternalTrigger name="BGRP1"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="440" partition="1" name="L1_AFP_A_OR_C_MU4" complex_deadtime="0" definition="(((AFP_NSA[x1]&amp;AFP_FSA_SIT[x1])|(AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]))&amp;MU4[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="440" partition="1" name="L1_MU4_AFP_A_OR_C" complex_deadtime="0" definition="(((AFP_NSA[x1]&amp;AFP_FSA_SIT[x1])|(AFP_NSC[x1]&amp;AFP_FSC_SIT[x1]))&amp;MU4[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
       <AND>
         <OR>
           <AND>
@@ -3765,6 +3765,23 @@
         <InternalTrigger name="BGRP15"/>
       </AND>
     </TriggerItem>
+    <TriggerItem ctpid="465" partition="1" name="L1_J40.0ETA25_2J30_J20.31ETA49" complex_deadtime="0" definition="(J40.0ETA25[x1]&amp;J30[x2]&amp;J20.31ETA49[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000100" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="J40.0ETA25_x1" triggerthreshold="J40.0ETA25"/>
+        <TriggerCondition multi="2" name="J30_x2" triggerthreshold="J30"/>
+        <TriggerCondition multi="1" name="J20.31ETA49_x1" triggerthreshold="J20.31ETA49"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
+    <TriggerItem ctpid="466" partition="1" name="L1_LATE-MU10_XE40" complex_deadtime="0" definition="(LATE-MU10s1[x1]&amp;XE40[x1]&amp;BGRP0&amp;BGRP1)" trigger_type="10000000" monitor="LF:000|HF:000">
+      <AND>
+        <TriggerCondition multi="1" name="LATE-MU10s1_x1" triggerthreshold="LATE-MU10s1"/>
+        <TriggerCondition multi="1" name="XE40_x1" triggerthreshold="XE40"/>
+        <InternalTrigger name="BGRP0"/>
+        <InternalTrigger name="BGRP1"/>
+      </AND>
+    </TriggerItem>
     <TriggerItem ctpid="467" partition="1" name="L1_TAU8_UNPAIRED_NONISO" complex_deadtime="0" definition="(HA8[x1]&amp;BGRP0&amp;BGRP5)" trigger_type="10000100" monitor="LF:000|HF:000">
       <AND>
         <TriggerCondition multi="1" name="HA8_x1" triggerthreshold="HA8"/>
@@ -3951,9 +3968,9 @@
         <InternalTrigger name="BGRP1"/>
       </AND>
     </TriggerItem>
-    <TriggerItem ctpid="504" partition="1" name="L1_4J15_FTK" complex_deadtime="0" definition="(J15[x4]&amp;BGRP0&amp;BGRP1)" trigger_type="10100000" monitor="LF:000|HF:000">
+    <TriggerItem ctpid="504" partition="1" name="L1_4J20_FTK" complex_deadtime="0" definition="(J20[x4]&amp;BGRP0&amp;BGRP1)" trigger_type="10100000" monitor="LF:000|HF:000">
       <AND>
-        <TriggerCondition multi="4" name="J15_x4" triggerthreshold="J15"/>
+        <TriggerCondition multi="4" name="J20_x4" triggerthreshold="J20"/>
         <InternalTrigger name="BGRP0"/>
         <InternalTrigger name="BGRP1"/>
       </AND>
@@ -4460,8 +4477,8 @@
     <Prescale ctpid="462" cut="000001" value="1"/>
     <Prescale ctpid="463" cut="000001" value="1"/>
     <Prescale ctpid="464" cut="000001" value="1"/>
-    <Prescale ctpid="465" cut="-000001" value="-1"/>
-    <Prescale ctpid="466" cut="-000001" value="-1"/>
+    <Prescale ctpid="465" cut="000001" value="1"/>
+    <Prescale ctpid="466" cut="000001" value="1"/>
     <Prescale ctpid="467" cut="000001" value="1"/>
     <Prescale ctpid="468" cut="000001" value="1"/>
     <Prescale ctpid="469" cut="000001" value="1"/>
diff --git a/Trigger/TriggerRelease/python/Modifiers.py b/Trigger/TriggerRelease/python/Modifiers.py
index 8fc2f252d2c2ad03a93a31699608b322d33bfaa2..3979d035f2ac401f28798d9acd3b1b577bd79b8d 100644
--- a/Trigger/TriggerRelease/python/Modifiers.py
+++ b/Trigger/TriggerRelease/python/Modifiers.py
@@ -1649,6 +1649,14 @@ class LumiRegionZmax168(_modifier):
         from AthenaCommon.SystemOfUnits import mm 
         RegSelSvc.DeltaZ = 168* mm
 
+class useDynamicAlignFolders(_modifier):
+    """
+    enable the new (2016-) alignment scheme
+    """
+    def preSetup(self):
+        from AtlasGeoModel.InDetGMJobProperties import GeometryFlags;
+        GeometryFlags.useDynamicAlignFolders.set_Value_and_Lock(True)
+
     
 ###############################################################
 # Modifiers believed to be obsolete.
diff --git a/Trigger/TriggerRelease/share/runHLT_standalone.py b/Trigger/TriggerRelease/share/runHLT_standalone.py
index c212057ca5d576b0964118b9b75229a741e6a456..9c9e5c775590900d661c064f1fe35abbfccde21a 100755
--- a/Trigger/TriggerRelease/share/runHLT_standalone.py
+++ b/Trigger/TriggerRelease/share/runHLT_standalone.py
@@ -120,7 +120,10 @@ menuMap={
          'PhysicsV1':       ('Physics_pp_v1',           'TriggerMenuXML/LVL1config_Physics_pp_v1.xml'),
          'MCV1':            ('MC_pp_v1',                'TriggerMenuXML/LVL1config_Physics_pp_v1.xml'),
          'CosmicPPV1':      ('Physics_pp_v1_cosmics_prescale','TriggerMenuXML/LVL1config_Physics_pp_v1.xml'),
-}
+
+         #Upgrade menus:       menu name                   L1 xml file
+         'MCPhaseII':       ('MC_PhaseII',           'TriggerMenuXML/LVL1config_MC_PhaseII.xml'),
+         }
 
 # Useful in job options beyond our control to always run the latest menu via 'testCurrentMenu=True'
 menuMap['CurrentMenu'] = menuMap['PhysicsV6']
@@ -253,6 +256,7 @@ else:           # More data modifiers
                                 #'ignoreL1Vetos',  #also run L2 prescaled and disabled L1 items
                                 #'disablePixels',
                                 #'disableSCTBarrel',
+                                'useDynamicAlignFolders',
     ]
 
 #make some more common trig cost operations easier to setup