diff --git a/Control/AthenaExamples/AthExThinning/src/AthExDecayCnv.cxx b/Control/AthenaExamples/AthExThinning/src/AthExDecayCnv.cxx
index 0367aca083b2e09db10bca5adaf1083377b8d3a0..0e9a749888f90acad492e5841d5fea773e320f61 100644
--- a/Control/AthenaExamples/AthExThinning/src/AthExDecayCnv.cxx
+++ b/Control/AthenaExamples/AthExThinning/src/AthExDecayCnv.cxx
@@ -66,7 +66,7 @@ AthExDecay* AthExDecayCnv::createTransient()
 
    if ( compareClassGuid(p1_guid) ) {
 
-     // using auto_ptr ensures deletion of the persistent object
+     // using unique_ptr ensures deletion of the persistent object
      std::unique_ptr<AthExDecay_p1> persObj( poolReadObject<AthExDecay_p1>() );
      AthExDecayCnv_p1 cnv;
      transObj = cnv.createTransient( persObj.get(), msg );
diff --git a/Control/AthenaExamples/AthExThinning/src/AthExElephantinoCnv.cxx b/Control/AthenaExamples/AthExThinning/src/AthExElephantinoCnv.cxx
index 0819305d2bfaf9949488925c95d7a73e64ef09d0..14cf744e0c11d261a85ee1061d71074806c83c1b 100644
--- a/Control/AthenaExamples/AthExThinning/src/AthExElephantinoCnv.cxx
+++ b/Control/AthenaExamples/AthExThinning/src/AthExElephantinoCnv.cxx
@@ -66,7 +66,7 @@ AthExElephantino* AthExElephantinoCnv::createTransient()
 
    if ( compareClassGuid(p1_guid) ) {
 
-     // using auto_ptr ensures deletion of the persistent object
+     // using unique_ptr ensures deletion of the persistent object
      std::unique_ptr<AthExElephantino_p1> persObj( poolReadObject<AthExElephantino_p1>() );
      AthExElephantinoCnv_p1 cnv;
      transObj = cnv.createTransient( persObj.get(), msg );
diff --git a/Control/AthenaExamples/AthExThinning/src/AthExFatObjectCnv.cxx b/Control/AthenaExamples/AthExThinning/src/AthExFatObjectCnv.cxx
index 80822a3b7f1d247c54fec0e8f7be2a01b559ca9f..1245752004465f6a70e0a6e0bdf098d6c87c5b66 100644
--- a/Control/AthenaExamples/AthExThinning/src/AthExFatObjectCnv.cxx
+++ b/Control/AthenaExamples/AthExThinning/src/AthExFatObjectCnv.cxx
@@ -66,7 +66,7 @@ AthExFatObject* AthExFatObjectCnv::createTransient()
 
    if ( compareClassGuid(p1_guid) ) {
 
-     // using auto_ptr ensures deletion of the persistent object
+     // using unique_ptr ensures deletion of the persistent object
      std::unique_ptr<AthExFatObject_p1> persObj( poolReadObject<AthExFatObject_p1>() );
      AthExFatObjectCnv_p1 cnv;
      transObj = cnv.createTransient( persObj.get(), msg );
diff --git a/Control/AthenaMonitoring/share/hist_file_dump.py b/Control/AthenaMonitoring/share/hist_file_dump.py
index 19ca96707f4d88ca7d7d23727740db3a502bcd40..0ab7bcaaa5e6fbdc5fec09af8f275f4f9c9c48f1 100755
--- a/Control/AthenaMonitoring/share/hist_file_dump.py
+++ b/Control/AthenaMonitoring/share/hist_file_dump.py
@@ -8,6 +8,14 @@ import argparse
 import zlib
 import json
 
+def fixprecision(x):
+    import math
+    if not isinstance(x, float):
+        return x
+    else:
+        mantissa, exponent = math.frexp(x)
+        return float(str(mantissa)[:16]) * 2**exponent
+
 def jsonfixup(instr):
     instr = instr.Data()
     j=json.loads(instr)
@@ -15,9 +23,11 @@ def jsonfixup(instr):
     for badkey in ('fTsumw', 'fTsumwx', 'fTsumw2', 'fTsumwx2', 'fTsumwy', 'fTsumwy2', 'fTsumwxy',
                    'fTsumwz', 'fTsumwz2', 'fTsumwxz', 'fTsumwyz' ):
         if badkey in j:
-            if isinstance(j[badkey], float):
-                j[badkey] = float(str(j[badkey])[:8])
+            j[badkey] = fixprecision(j[badkey])
             #print(type(j["fTsumwx"]))
+    for badkey in ('fSumw2',):
+        if badkey in j:
+            j[badkey] = [fixprecision(_) for _ in j[badkey]]
     # the following ignores small layout fluctuations in TTrees
     if 'fBranches' in j:
         for branch in j['fBranches']['arr']:
diff --git a/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/HistogramFiller.h b/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/HistogramFiller.h
index 29a0f9ff2bb9de2b39f2cd4d4d1360ca44d29af6..4dbe227460919869f1615d37de3cad086efc5b44 100644
--- a/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/HistogramFiller.h
+++ b/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/HistogramFiller.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef AthenaMonitoringKernel_HistogramFiller_h
@@ -28,9 +28,7 @@ namespace Monitored {
     HistogramFiller(const HistogramDef& histDef, std::shared_ptr<IHistogramProvider> histogramProvider)
       : m_mutex(std::make_shared<std::mutex>()),
         m_histDef(new HistogramDef(histDef)),
-        m_histogramProvider(histogramProvider),
-        m_monWeight(nullptr),
-        m_monCutMask(nullptr) {}
+        m_histogramProvider(histogramProvider) {}
     /**
      * @brief Copy constructor
      *
@@ -59,7 +57,7 @@ namespace Monitored {
 
     /**
      * @brief clone filler for actual filling
-     * Note that this operation is very chip as the this class is effectively a flyweight
+     * Note that this operation is very cheap as the this class is effectively a flyweight
      */
     virtual HistogramFiller* clone() const = 0;
 
@@ -102,8 +100,8 @@ namespace Monitored {
     std::pair<size_t, std::function<bool(size_t)>> getCutMaskFunc() {
       std::function<bool(size_t)> cutMaskValue = [] (size_t){ return true; }; // default is true
       size_t maskSize = 1;
-      const std::vector<double> cutMaskVector{m_monCutMask ? m_monCutMask->getVectorRepresentation() : std::vector<double>{}};
       if ( m_monCutMask != nullptr ) {
+        const std::vector<double> cutMaskVector{m_monCutMask->getVectorRepresentation()};
         maskSize = cutMaskVector.size();
         if (maskSize == 1) {
           if (!cutMaskVector[0]) {
@@ -122,8 +120,8 @@ namespace Monitored {
     std::shared_ptr<HistogramDef> m_histDef;
     std::shared_ptr<IHistogramProvider> m_histogramProvider;
     std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>> m_monVariables;
-    Monitored::IMonitoredVariable* m_monWeight; // bare pointer instead of reference as it can be null
-    Monitored::IMonitoredVariable* m_monCutMask;
+    Monitored::IMonitoredVariable* m_monWeight{nullptr}; // bare pointer instead of reference as it can be null
+    Monitored::IMonitoredVariable* m_monCutMask{nullptr};
     
   private:
     HistogramFiller& operator=(HistogramFiller const&) = delete;
diff --git a/Control/AthenaMonitoringKernel/CMakeLists.txt b/Control/AthenaMonitoringKernel/CMakeLists.txt
index 7558cdab6760833c8645c39b03b488cd00b7c736..09784e40b820cba40b2ae7d6f1ab49230ee91f87 100644
--- a/Control/AthenaMonitoringKernel/CMakeLists.txt
+++ b/Control/AthenaMonitoringKernel/CMakeLists.txt
@@ -13,8 +13,16 @@ atlas_depends_on_subdirs(
         AtlasTest/TestTools
 )
 
+# Options to steer cmake configuation:
+option(VALGRIND "Enable valgrind dependency for profiling" OFF)
+
 # External dependencies:
 find_package( nlohmann_json )
+if (${VALGRIND})
+   find_package( valgrind REQUIRED )
+   add_compile_definitions(ATHMON_VALGRIND)
+   set( _extra_includes ${VALGRIND_INCLUDE_DIRS})
+endif()
 
 atlas_add_library(
     AthenaMonitoringKernelLib
@@ -46,6 +54,7 @@ foreach ( test_file ${CXX_TEST_FILES} )
     file( MAKE_DIRECTORY ${rundir} )
     atlas_add_test( ${name}
         SOURCES ${test_file}
+        INCLUDE_DIRS ${_extra_includes}
         LINK_LIBRARIES TestTools AthenaMonitoringKernelLib nlohmann_json
         ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share"
         POST_EXEC_SCRIPT nopost.sh
diff --git a/Control/AthenaMonitoringKernel/share/GenericMonPerf.txt b/Control/AthenaMonitoringKernel/share/GenericMonPerf.txt
new file mode 100644
index 0000000000000000000000000000000000000000..9fe26a0cb394d670a057a0b21d69ce1b0fc2cd74
--- /dev/null
+++ b/Control/AthenaMonitoringKernel/share/GenericMonPerf.txt
@@ -0,0 +1,17 @@
+// -*- C -*-
+// startup script for GenericMonTool tests
+
+ApplicationMgr.DLLs += { "StoreGate", "AthenaMonitoringKernel" };
+ApplicationMgr.ExtSvc += { "ClassIDSvc" };
+ApplicationMgr.ExtSvc += { "StoreGateSvc", "StoreGateSvc/DetectorStore", "StoreGateSvc/HistoryStore" };
+ApplicationMgr.ExtSvc += { "ActiveStoreSvc" };
+ApplicationMgr.ExtSvc += { "ToolSvc" };
+ApplicationMgr.ExtSvc += { "THistSvc/THistSvc" };
+AuditorSvc.Auditors  += { "AlgContextAuditor"};
+StoreGateSvc.ActivateHistory = false;
+THistSvc.Output= {"EXPERT DATAFILE='expert-monitoring.root' OPT='RECREATE'" };
+ToolSvc.MonTool.HistPath="TestGroup";
+ToolSvc.MonTool.Histograms =  {'{"alias": "Eta", "allvars": ["Eta"], "convention": "", "merge": "", "path": "EXPERT", "title": "#eta of Clusters; #eta; number of RoIs", "treeDef": "", "type": "TH1F", "weight": "", "cutMask": "", "xarray": [], "xbins": 50, "xlabels": [], "xmax": 2.50, "xmin": -2.50, "xvar": "Eta", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": "", "Sumw2": false, "kLBNHistoryDepth": 0, "kAddBinsDynamically": false, "kRebinAxes": false, "kCanRebin": false, "kVec": false, "kVecUO": false, "kCumulative": false}'};
+ToolSvc.MonTool.Histograms += {'{"alias": "Phi", "allvars": ["Phi"], "convention": "", "merge": "", "path": "EXPERT", "title": "#phi of Clusters; #phi; number of RoIs", "treeDef": "", "type": "TH1F", "weight": "", "cutMask": "", "xarray": [], "xbins": 63, "xlabels": [], "xmax": 3.15, "xmin": -3.15, "xvar": "Phi", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": "", "Sumw2": false, "kLBNHistoryDepth": 0, "kAddBinsDynamically": false, "kRebinAxes": false, "kCanRebin": false, "kVec": false, "kVecUO": false, "kCumulative": false}'};
+ToolSvc.MonTool.Histograms += {'{"alias": "pt", "allvars": ["pt"], "convention": "", "merge": "", "path": "EXPERT", "title": "pt; pt; transverse momentum", "treeDef": "", "type": "TH1F", "weight": "Weight", "cutMask": "", "xarray": [], "xbins": 10, "xlabels": [], "xmax": 10, "xmin": 0, "xvar": "pt", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": "", "Sumw2": false, "kLBNHistoryDepth": 0, "kAddBinsDynamically": false, "kRebinAxes": false, "kCanRebin": false, "kVec": false, "kVecUO": false, "kCumulative": false}'};
+ToolSvc.MonTool.Histograms += {'{"alias": "Phi_vs_Eta", "allvars": ["Eta", "Phi"], "convention": "", "merge": "", "path": "EXPERT", "title": "#eta vs #phi of Clusters; #eta; #phi; number of RoIs", "treeDef": "", "type": "TH2F", "weight": "", "cutMask": "", "xarray": [], "xbins": 50, "xlabels": [], "xmax": 2.5, "xmin": -2.5, "xvar": "Eta", "yarray": [], "ybins": 63, "ylabels": [], "ymax": 3.15, "ymin": -3.15, "yvar": "Phi", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": "", "Sumw2": false, "kLBNHistoryDepth": 0, "kAddBinsDynamically": false, "kRebinAxes": false, "kCanRebin": false, "kVec": false, "kVecUO": false, "kCumulative": false}'};
diff --git a/Control/AthenaMonitoringKernel/src/GenericMonitoringTool.cxx b/Control/AthenaMonitoringKernel/src/GenericMonitoringTool.cxx
index c9c3a35d8f58b225002cc95f23fca3bab8b0d746..9430a4d56831569191d3b66f3d788952486adfed 100644
--- a/Control/AthenaMonitoringKernel/src/GenericMonitoringTool.cxx
+++ b/Control/AthenaMonitoringKernel/src/GenericMonitoringTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include <map>
@@ -112,31 +112,32 @@ namespace Monitored {
 
 std::vector<std::shared_ptr<HistogramFiller>> GenericMonitoringTool::getHistogramsFillers(const std::vector<std::reference_wrapper<IMonitoredVariable>>& monitoredVariables) const {
 
-
   // stage 1: get candidate fillers (assume generally we get only a few variables)
   std::vector<const HistogramFiller*> candidates;
   for (const auto& monValue : monitoredVariables) {
     const auto& match = m_fillerMap.find(monValue.get().name());
     if (match != m_fillerMap.end()) {
+      candidates.reserve(candidates.size() + match->second.size());
       for (const auto& i : match->second) {
         candidates.push_back(i.get());
       }
     }
-  } 
-  // dedup vector
+  }
+  // dedup vector (yes, this is faster than using std::set above)
   std::sort(candidates.begin(), candidates.end());
   candidates.erase(std::unique(candidates.begin(), candidates.end()), candidates.end());
 
   // stage 2: refine for fillers that have all variables set
   std::vector<std::shared_ptr<HistogramFiller>> result;
   result.reserve(candidates.size());
+  std::vector<std::reference_wrapper<IMonitoredVariable>> variables;
+  variables.reserve(3); // enough for all current fillers
+
   for (const auto& filler : candidates) {
     // Find the associated monitored variable for each histogram's variable(s)
     const auto& fillerVariables = filler->histogramVariablesNames();
 
-    std::vector<std::reference_wrapper<IMonitoredVariable>> variables;
-    variables.reserve(3); // enough for all current fillers
-
+    variables.clear();
     for (const auto& fillerVariable : fillerVariables) {
       for (const auto& monValue : monitoredVariables) {
         if (fillerVariable.compare(monValue.get().name()) == 0) {
@@ -160,8 +161,8 @@ std::vector<std::shared_ptr<HistogramFiller>> GenericMonitoringTool::getHistogra
 
     // Find the cutMask variable in the list of monitored variables
     const auto& fillerCutMask = filler->histogramCutMaskName();
-    Monitored::IMonitoredVariable* cutmask = nullptr;
-    if ( fillerCutMask != "" ) {
+    Monitored::IMonitoredVariable* cutmask(nullptr);
+    if ( not fillerCutMask.empty() ) {
       for (const auto& monValue : monitoredVariables) {
         if (fillerCutMask.compare(monValue.get().name()) == 0) {
           cutmask = &monValue.get();
diff --git a/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFiller1D.h b/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFiller1D.h
index 73d068324446ad7a29bcb98de621203d0d1edd32..32e71e50ead1a1c79d06714dc987d361db80af94 100644
--- a/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFiller1D.h
+++ b/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFiller1D.h
@@ -14,6 +14,7 @@
 #include "GaudiKernel/MsgStream.h"
 
 namespace Monitored {
+
   /**
    * @brief Filler for plain 1D histograms
    */
@@ -29,66 +30,85 @@ namespace Monitored {
 
     virtual unsigned fill() override {
       if (m_monVariables.size() != 1) { return 0; }
-      size_t varVecSize = m_monVariables.at(0).get().size();
-
-      // handling of the cutmask
-      auto cutMaskValuePair = getCutMaskFunc();
-      if (cutMaskValuePair.first == 0) { return 0; }
-      if (ATH_UNLIKELY(cutMaskValuePair.first > 1 && cutMaskValuePair.first != varVecSize)) {
-        MsgStream log(Athena::getMessageSvc(), "HistogramFiller1D");
-        log << MSG::ERROR << "CutMask does not match the size of plotted variable: " 
-            << cutMaskValuePair.first << " " << varVecSize << endmsg;
-      }
-      auto cutMaskAccessor = cutMaskValuePair.second;
-
-      std::function<double(size_t)> weightValue = [] (size_t ){ return 1.0; };  // default is always 1.0
-      const std::vector<double> weightVector{m_monWeight ? m_monWeight->getVectorRepresentation() : std::vector<double>{}};
-      if ( m_monWeight != nullptr ) {
-        if (weightVector.size() == 1) {
-          weightValue = [=](size_t){ return weightVector[0]; };
-        } else {
-          weightValue = [&](size_t i){ return weightVector[i]; };
-          if (ATH_UNLIKELY(weightVector.size() != varVecSize)) {
-            MsgStream log(Athena::getMessageSvc(), "HistogramFiller1D");
-            log << MSG::ERROR << "Weight does not match the size of plotted variable: " 
-                << weightVector.size() << " " << varVecSize << endmsg;
-          }
+      const IMonitoredVariable& var = m_monVariables.at(0).get();
+
+      std::function<bool(size_t)> cutMaskAccessor;
+      if (m_monCutMask) {
+        // handling of the cutmask
+        auto cutMaskValuePair = getCutMaskFunc();
+        if (cutMaskValuePair.first == 0) { return 0; }
+        if (ATH_UNLIKELY(cutMaskValuePair.first > 1 && cutMaskValuePair.first != var.size())) {
+          MsgStream log(Athena::getMessageSvc(), "HistogramFiller1D");
+          log << MSG::ERROR << "CutMask does not match the size of plotted variable: "
+              << cutMaskValuePair.first << " " << var.size() << endmsg;
         }
+        cutMaskAccessor = cutMaskValuePair.second;
       }
 
-      if ( not m_monVariables.at(0).get().hasStringRepresentation() ) {
-        const auto valuesVector{m_monVariables.at(0).get().getVectorRepresentation()};
-        fill( std::size( valuesVector), [&](size_t i){ return valuesVector[i]; }, weightValue, cutMaskAccessor );
-        return std::size( valuesVector );
-      } else {
-        const auto valuesVector{m_monVariables.at(0).get().getStringVectorRepresentation()};
-        fill( std::size( valuesVector ), [&](size_t i){ return valuesVector[i].c_str(); }, weightValue, cutMaskAccessor );
-        return std::size( valuesVector );
+      if (m_monWeight) {
+        const std::vector<double> weightVector{m_monWeight->getVectorRepresentation()};
+        auto weightAccessor = [&](size_t i){ return weightVector[i]; };
+
+        if (ATH_UNLIKELY(weightVector.size() != var.size())) {
+          MsgStream log(Athena::getMessageSvc(), "HistogramFiller1D");
+          log << MSG::ERROR << "Weight does not match the size of plotted variable: "
+              << weightVector.size() << " " << var.size() << endmsg;
+        }
+        // Need to fill here while weightVector is still in scope
+        if (not m_monCutMask) return fill(var, weightAccessor, detail::noCut);
+        else                  return fill(var, weightAccessor, cutMaskAccessor);
       }
+
+      if (not m_monCutMask) return fill(var, detail::noWeight, detail::noCut);
+      else                  return fill(var, detail::noWeight, cutMaskAccessor);
     }
 
   protected:
+    /**
+     * Helper to extract double/string representation from MonitoredVariable.
+     * Forward remaining template parameters to fill function below.
+     */
+    template<typename ...Fs>
+    unsigned fill(const IMonitoredVariable& var , Fs... f) {
+      if (not var.hasStringRepresentation()) {
+        const auto valuesVector{var.getVectorRepresentation()};
+        return fill( std::size(valuesVector), [&](size_t i){ return valuesVector[i]; }, f...);
+      } else {
+        const auto valuesVector{var.getStringVectorRepresentation()};
+        return fill( std::size(valuesVector), [&](size_t i){ return valuesVector[i].c_str(); }, f...);
+      }
+    }
 
-    // The following method takes the length of the vector of values and three functions as arguments:
-    // a function that returns a value, one that returns a weight, and one that functions as a cut mask
-    // template allows us to support both floating point and string variable fill calls
-    template<typename F1, typename F2, typename F3>
-    void fill( size_t n, F1 f1, F2 f2, F3 f3 ) {
+    /**
+     * Helper to fill both double and string-valued variables
+     *
+     * @param n  size of the vector to fill
+     * @param v  accessor for values in vector
+     * @param w  weight accessor
+     * @param c  cut mask accessor
+     *
+     * If weight and/or cut are not needed use a lambda expression (instead of std::function)
+     * as this will allow the compiler to produce more optimal code.
+     */
+    template<typename V, typename W, typename C>
+    unsigned fill( size_t n, V v, W w, C c) {
 
       std::scoped_lock lock(*m_mutex);
+      int fills = 0;
       TH1* histogram = this->histogram<TH1>();
       for ( size_t i = 0; i < n; ++i ) {
-        if (f3(i)) {
-          const auto& x = f1(i);
+        if (c(i)) {
+          const auto& x = v(i);
           // In case re-binning occurs need to take the OH lock for online (no-op offline)
           if ( ATH_UNLIKELY(histogram->GetXaxis()->CanExtend() and
                             detail::fillWillRebinHistogram(histogram->GetXaxis(), x)) ) {
             oh_scoped_lock_histogram lock;
-            histogram->Fill( x, f2(i) );
+            fills += histogram->Fill( x, w(i) );
           }
-          else histogram->Fill( x, f2(i) );
+          else fills += histogram->Fill( x, w(i) );
         }
       }
+      return fills;
     }
   };
 }
diff --git a/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFillerUtils.h b/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFillerUtils.h
index 93fdea431b15d5c22efb8ebbfc6f7ada359f4273..1703ecba5a37be21672d120f525fdbaf602d8017 100644
--- a/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFillerUtils.h
+++ b/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFillerUtils.h
@@ -16,6 +16,11 @@ namespace Monitored {
   enum Axis {X = 0, Y, Z};
 
   namespace detail {
+
+    /** Default cuts and weights used in fillers */
+    auto noWeight = [](size_t){ return 1.0; };
+    auto noCut = [](size_t){ return true; };
+
     /** Convert axis to ROOT-compatible character */
     constexpr std::array axis_name{"X", "Y", "Z"};
     constexpr std::array axis_bit{TH1::kXaxis, TH1::kYaxis, TH1::kZaxis};
diff --git a/Control/AthenaMonitoringKernel/test/GenericMonPerf_test.cxx b/Control/AthenaMonitoringKernel/test/GenericMonPerf_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..e1e2453d627008707528d5414331e3a8d329dba6
--- /dev/null
+++ b/Control/AthenaMonitoringKernel/test/GenericMonPerf_test.cxx
@@ -0,0 +1,198 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * Performance tests of monitoring framework
+ *
+ * To profile:
+ *   1) cmake -DVALGRIND=ON ...
+ *   2) adjust the CALLGRIND_ macros below to target the relevant code
+ *   3) valgrind --tool=callgrind --collect-jumps=yes --trace-children=no --instr-atstart=no GenericMonPerf_test.exe
+ */
+
+#include <chrono>
+#include <iomanip>
+#include <iostream>
+#include <sstream>
+
+#include "AthenaKernel/errorcheck.h"
+#include "AthenaKernel/getMessageSvc.h"
+#include "CxxUtils/checker_macros.h"
+#include "CxxUtils/ubsan_suppress.h"
+#include "GaudiKernel/ITHistSvc.h"
+#include "GaudiKernel/MsgStream.h"
+#include "TestTools/expect.h"
+#include "TestTools/initGaudi.h"
+
+#include "AthenaMonitoringKernel/GenericMonitoringTool.h"
+#include "AthenaMonitoringKernel/Monitored.h"
+
+#include "TInterpreter.h"
+#include "TMath.h"
+
+#include "boost/program_options.hpp"
+
+#ifdef ATHMON_VALGRIND
+#include "valgrind/callgrind.h"
+#else
+#define CALLGRIND_START_INSTRUMENTATION
+#define CALLGRIND_STOP_INSTRUMENTATION
+#endif
+
+ATLAS_NO_CHECK_FILE_THREAD_SAFETY;
+
+ITHistSvc* histSvc{nullptr};
+size_t RUNS;
+
+void resetHists()
+{
+  for (const std::string& name : histSvc->getHists()) {
+    TH1* h(nullptr);
+    histSvc->getHist(name, h).ignore();
+    if (h) h->Reset();
+  }
+}
+
+/**
+ * Time func executing N times and calculate mean/stddev over R runs
+ */
+template <typename F>
+std::string timeit(const F& func, size_t N = 10000)
+{
+  std::vector<int> times;
+  times.reserve(RUNS);
+  for (size_t r = 0; r < RUNS; ++r) {
+    resetHists();
+    auto t0 = std::chrono::high_resolution_clock::now();
+    for (size_t i = 0; i < N; ++i) {
+      func();
+    }
+    auto t1 = std::chrono::high_resolution_clock::now();
+    times.push_back(std::chrono::duration_cast<std::chrono::microseconds>(t1 - t0).count());
+  }
+  std::ostringstream oss;
+  oss << std::fixed << std::setprecision(0) << TMath::Mean(times.begin(), times.end()) << " +- "
+      << TMath::StdDev(times.begin(), times.end()) << " us";
+
+  return oss.str();
+}
+
+/**
+ * Time function f1 and f2, cross-check #fills on histogram h
+ */
+template <typename F1, typename F2>
+void timeboth(const F1& f1, const F2& f2, const TH1* h, const std::string title)
+{
+  auto t1 = timeit(f1);
+  int fills = h->GetEntries();
+  auto t2 = timeit(f2);
+  VALUE(h->GetEntries()) EXPECTED(fills);
+
+  std::cout << std::left << std::setw(30) << title << "MON: " << std::setw(20) << t1 << " ROOT: " << t2
+            << std::endl;
+}
+
+void fillFromScalar(ToolHandle<GenericMonitoringTool>& monTool)
+{
+  auto mon = [&]() {
+    auto eta = Monitored::Scalar<double>("Eta", -0.2);
+    auto group = Monitored::Group(monTool, eta);
+  };
+
+  TH1* h(nullptr);
+  histSvc->getHist("/EXPERT/TestGroup/Eta", h).ignore();
+  auto root = [&]() {
+    h->Fill(-0.2);
+  };
+  timeboth(mon, root, h, "fillFromScalar");
+}
+
+void fillFromMultipleScalars(ToolHandle<GenericMonitoringTool>& monTool)
+{
+  auto mon = [&]() {
+    auto eta = Monitored::Scalar<double>("Eta", -0.2);
+    auto phi = Monitored::Scalar<double>("Phi", 0.1);
+    auto group = Monitored::Group(monTool, eta, phi);
+  };
+
+  TH1* h1(nullptr);
+  TH1* h2(nullptr);
+  TH2* h3(nullptr);
+  histSvc->getHist("/EXPERT/TestGroup/Eta", h1).ignore();
+  histSvc->getHist("/EXPERT/TestGroup/Phi", h2).ignore();
+  histSvc->getHist("/EXPERT/TestGroup/Phi_vs_Eta", h3).ignore();
+  auto root = [&]() {
+    h1->Fill(-0.2);
+    h2->Fill(0.1);
+    h3->Fill(-0.2, 0.1);
+  };
+  timeboth(mon, root, h3, "fillFromMultipleScalars");
+}
+
+void fillFromCollection(ToolHandle<GenericMonitoringTool>& monTool)
+{
+  std::vector<double> v = {1.0, 3.2, -0.2, 0.3, 1.2};
+  auto mon = [&]() {
+    auto eta = Monitored::Collection("Eta", v);
+    auto group = Monitored::Group(monTool, eta);
+  };
+
+  TH1* h(nullptr);
+  histSvc->getHist("/EXPERT/TestGroup/Eta", h).ignore();
+  auto root = [&]() {
+    for (double d : v) h->Fill(d);
+  };
+  timeboth(mon, root, h, "fillFromCollection");
+}
+
+int main(int argc, char** argv)
+{
+  namespace po = boost::program_options;
+
+  po::options_description desc("Allowed options");
+  desc.add_options()("help,h", "help message")("runs,r", po::value<size_t>(&RUNS)->default_value(1),
+                                               "number of runs");
+
+  po::variables_map vm;
+  po::store(po::parse_command_line(argc, argv, desc), vm);
+  po::notify(vm);
+  if (vm.count("help")) {
+    std::cout << desc << std::endl;
+    return 1;
+  }
+
+  CxxUtils::ubsan_suppress([]() { TInterpreter::Instance(); });
+  ISvcLocator* pSvcLoc;
+  if (!Athena_test::initGaudi("GenericMonPerf.txt", pSvcLoc)) {
+    std::cerr << "ERROR This test can not be run" << std::endl;
+    return -1;
+  }
+  MsgStream log(Athena::getMessageSvc(), "GenericMonPerf_test");
+
+  CHECK_WITH_CONTEXT(pSvcLoc->service("THistSvc", histSvc, true), "GenericMonPerf_test", -1);
+
+  ISvcManager* svcmgr = dynamic_cast<ISvcManager*>(pSvcLoc);
+  svcmgr->startServices().ignore();
+
+  ToolHandle<GenericMonitoringTool> monTool("GenericMonitoringTool/MonTool");
+  CHECK_WITH_CONTEXT(monTool.retrieve(), "GenericMonPerf_test", -1);
+
+  log << MSG::INFO << "Histograms defined: " << histSvc->getHists() << endmsg;
+
+  fillFromScalar(monTool);
+
+  CALLGRIND_START_INSTRUMENTATION;
+  fillFromMultipleScalars(monTool);
+  CALLGRIND_STOP_INSTRUMENTATION;
+
+  fillFromCollection(monTool);
+
+  // Make sure that THistSvc gets finalized.
+  // Otherwise, the output file will get closed while global dtors are running,
+  // which can lead to crashes.
+  svcmgr->stopServices().ignore();
+  svcmgr->finalizeServices().ignore();
+
+  return 0;
+}
diff --git a/DataQuality/DataQualityInterfaces/src/HanConfig.cxx b/DataQuality/DataQualityInterfaces/src/HanConfig.cxx
index f977dbc4dd4f3f90eb84c834e0feda5a4d8fd88f..ae6006db339f1e4d1c771496006a3ac78c39e8dd 100644
--- a/DataQuality/DataQualityInterfaces/src/HanConfig.cxx
+++ b/DataQuality/DataQualityInterfaces/src/HanConfig.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // **********************************************************************
@@ -629,7 +629,7 @@ GetAlgorithmConfiguration( HanConfigAssessor* dqpar, const std::string& algID,
 //         absAlgRefName += algRefName;
 //         std::string algRefFile( m_refConfig.GetStringAttribute(refID,"file") );
 //         if( algRefFile != "" ) {
-//           std::auto_ptr<TFile> infile( TFile::Open(algRefFile.c_str()) );
+//           std::unique_ptr<TFile> infile( TFile::Open(algRefFile.c_str()) );
 //           TKey* key = getObjKey( infile.get(), absAlgRefName );
 //           if( key == 0 ) {
 //             std::cerr << "HanConfig::AssessmentVisitorBase::GetAlgorithmConfiguration: "
@@ -876,7 +876,6 @@ Visit( const MiniConfigTreeNode* node ) const
       std::string absObjPath("");
       
       refFile = SplitReference( m_refConfig.GetStringAttribute(refID,"location"), refFile);
-      //std::auto_ptr<TFile> infile( TFile::Open(refFile.c_str()) );
       std::shared_ptr<TFile> infile( GetROOTFile(refFile) );
       TDirectory* basedir(0);
       TDirectory* dir(0);
diff --git a/Database/APR/ImplicitCollection/src/ImplicitCollection.cpp b/Database/APR/ImplicitCollection/src/ImplicitCollection.cpp
index 82e5bc8d413e085173debdaf09128e142e921d5a..2e05fcf0177065276b8b8dae169ec8dca8a5ac0a 100755
--- a/Database/APR/ImplicitCollection/src/ImplicitCollection.cpp
+++ b/Database/APR/ImplicitCollection/src/ImplicitCollection.cpp
@@ -174,7 +174,7 @@ namespace pool {
                                std::string )
    {
       // iterator object supporting the collection query interface
-      std::auto_ptr<ImplicitCollectionIterator>
+      std::unique_ptr<ImplicitCollectionIterator>
 	 iterquery( new ImplicitCollectionIterator( *m_container, m_description ) );
       iterquery->setCondition( primaryQuery );
       iterquery->execute();
diff --git a/Database/APR/RelationalCollection/src/RelationalCollectionDataEditor.cpp b/Database/APR/RelationalCollection/src/RelationalCollectionDataEditor.cpp
index 4990a0d53262edb7a56e82ecbbbc6b266a086201..e008a9be58746334871702fd72e1fbf880752988 100755
--- a/Database/APR/RelationalCollection/src/RelationalCollectionDataEditor.cpp
+++ b/Database/APR/RelationalCollection/src/RelationalCollectionDataEditor.cpp
@@ -284,7 +284,7 @@ getUniqueRowID( )
    if( !fragmentData.hasAllocatedIds() ) {
 
       if( !m_rowIDSession ) {
-         auto_ptr<coral::ConnectionService> connectionService( new coral::ConnectionService() );
+         unique_ptr<coral::ConnectionService> connectionService( new coral::ConnectionService() );
 	 //cout << ">>>>>>>   Timeout=" << connectionService->configuration().connectionTimeOut() << endl;
          m_rowIDSession = connectionService->connect( m_description.connection(), coral::Update );
       }
@@ -295,7 +295,7 @@ getUniqueRowID( )
       m_whereDataForCollectionNameInHeadersTable->begin()->data<std::string>() = fragmentName;
       coral::ITable& headersTable = m_rowIDSession->nominalSchema().tableHandle( RelationalCollectionNames::nameOfCollectionHeadersTable() );
 
-      std::auto_ptr<coral::IQuery> query( headersTable.newQuery() );
+      std::unique_ptr<coral::IQuery> query( headersTable.newQuery() );
       query->addToOutputList( RelationalCollectionNames::writtenRecordsVariableInCollectionHeadersTable() );
       query->defineOutputType( RelationalCollectionNames::writtenRecordsVariableInCollectionHeadersTable(), "unsigned int" );
       query->setCondition( m_whereClauseForCollectionNameInHeadersTable, *m_whereDataForCollectionNameInHeadersTable );
diff --git a/Database/TPTools/TPTools/TPIntVectorCnv_p2.h b/Database/TPTools/TPTools/TPIntVectorCnv_p2.h
index ebca49dbad81ecacd5ba3f1bfee6bf8eb00e8cd1..7f55703693aa6dd295bf5bd9996c6c8f87c08bc9 100644
--- a/Database/TPTools/TPTools/TPIntVectorCnv_p2.h
+++ b/Database/TPTools/TPTools/TPIntVectorCnv_p2.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef T_ATHENAPOOLTPINTVECTORCNV_H
@@ -185,7 +185,7 @@ public:
       @return the created transient object
   */
   virtual TRANS* createTransient(const Pers_t* persObj, MsgStream &log) {
-     std::auto_ptr<TRANS>	trans(new TRANS());
+     std::unique_ptr<TRANS>	trans(new TRANS());
      persToTrans(persObj, trans.get(), log);
      return(trans.release());
   }
diff --git a/DetectorDescription/DetDescrCond/DetDescrCondAthenaPool/src/AlignableTransformContainerCnv.cxx b/DetectorDescription/DetDescrCond/DetDescrCondAthenaPool/src/AlignableTransformContainerCnv.cxx
index 131686ff8a7b9dc0bbc4841b4d62d2748cb8c3ec..fd95a65c33e0f342f2470bba5a2ce5addf2ddf0c 100644
--- a/DetectorDescription/DetDescrCond/DetDescrCondAthenaPool/src/AlignableTransformContainerCnv.cxx
+++ b/DetectorDescription/DetDescrCond/DetDescrCondAthenaPool/src/AlignableTransformContainerCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -25,9 +25,9 @@ AlignableTransform_TRANS* AlignableTransformContainerCnv::createTransient() {
     static pool::Guid   p1_guid("BA1A841C-8D92-45AE-9AD1-9AF7A1736844");
     static pool::Guid   p0_guid("E779C6B5-3F2A-473E-B35E-6CCB345E0665");
     if( compareClassGuid(p1_guid) ) {
-        // using auto_ptr ensures deletion of the persistent object
+        // using unique_ptr ensures deletion of the persistent object
         if (log.level()<=MSG::DEBUG) log << MSG::DEBUG << "AlignableTransformContainer read p1" << endmsg;
-        std::auto_ptr< AlignableTransform_p1 > col_vect( poolReadObject< AlignableTransform_p1 >() );
+        std::unique_ptr< AlignableTransform_p1 > col_vect( poolReadObject< AlignableTransform_p1 >() );
         AlignableTransformCnv_p1 cnv;
         return cnv.createTransient( col_vect.get(), log );
     }
diff --git a/Event/EventBookkeeperAthenaPool/src/EventBookkeeperCnv.cxx b/Event/EventBookkeeperAthenaPool/src/EventBookkeeperCnv.cxx
index 50d0831b11217a94285f2ea73ecdc1884f31ab05..6cbfa8d9ac38c09c86652fd67ebf49fb0ec6600f 100644
--- a/Event/EventBookkeeperAthenaPool/src/EventBookkeeperCnv.cxx
+++ b/Event/EventBookkeeperAthenaPool/src/EventBookkeeperCnv.cxx
@@ -22,12 +22,12 @@ EventBookkeeper* EventBookkeeperCnv::createTransient() {
   static pool::Guid   p1_guid("A1550FE9-B52A-451D-A2B8-3B09E046A481");
   static pool::Guid   p2_guid("EACBE9F1-84F1-4A51-9303-A39619FE965A");
   if( compareClassGuid(p1_guid) ) {
-    // using auto_ptr ensures deletion of the persistent object
+    // using unique_ptr ensures deletion of the persistent object
     std::unique_ptr< EventBookkeeper_p1 > col_vect( poolReadObject< EventBookkeeper_p1 >() );
     return m_TPConverterP1.createTransient( col_vect.get(), log );
   }
   else if( compareClassGuid(p2_guid) ) {
-    // using auto_ptr ensures deletion of the persistent object
+    // using unique_ptr ensures deletion of the persistent object
     std::unique_ptr< EventBookkeeper_p2 > col_vect( poolReadObject< EventBookkeeper_p2 >() );
     return m_TPConverter.createTransient( col_vect.get(), log );
   }
diff --git a/Event/EventBookkeeperAthenaPool/src/EventBookkeeperCollectionCnv.cxx b/Event/EventBookkeeperAthenaPool/src/EventBookkeeperCollectionCnv.cxx
index e5682733a8b01e24f19d622564e48968397e1870..bdc4be58f40bd2c5b39e9171fed1f30b97df93a5 100644
--- a/Event/EventBookkeeperAthenaPool/src/EventBookkeeperCollectionCnv.cxx
+++ b/Event/EventBookkeeperAthenaPool/src/EventBookkeeperCollectionCnv.cxx
@@ -23,12 +23,12 @@ EventBookkeeperCollection* EventBookkeeperCollectionCnv::createTransient() {
   static pool::Guid   p1_guid("461506EA-7376-448C-A4AF-640654D313C3");
   static pool::Guid   p2_guid("4CB34AE0-ECE5-404B-8CB7-B2E20F509DBE");
   if( compareClassGuid(p1_guid) ) {
-    // using auto_ptr ensures deletion of the persistent object
+    // using unique_ptr ensures deletion of the persistent object
     std::unique_ptr< EventBookkeeperCollection_p1 > col_vect( poolReadObject< EventBookkeeperCollection_p1 >() );
     return m_TPConverterP1.createTransient( col_vect.get(), log );
   }
   else if( compareClassGuid(p2_guid) ) {
-    // using auto_ptr ensures deletion of the persistent object
+    // using unique_ptr ensures deletion of the persistent object
     std::unique_ptr< EventBookkeeperCollection_p2 > col_vect( poolReadObject< EventBookkeeperCollection_p2 >() );
     return m_TPConverter.createTransient( col_vect.get(), log );
   }
diff --git a/Event/EventBookkeeperAthenaPool/src/SkimDecisionCnv.cxx b/Event/EventBookkeeperAthenaPool/src/SkimDecisionCnv.cxx
index 37993a852bc8d5d518c1831c20fbfaa8eb7ea39a..f0c6f3d19942006b9125af955c8bb363d2b22247 100644
--- a/Event/EventBookkeeperAthenaPool/src/SkimDecisionCnv.cxx
+++ b/Event/EventBookkeeperAthenaPool/src/SkimDecisionCnv.cxx
@@ -22,7 +22,7 @@ SkimDecision* SkimDecisionCnv::createTransient() {
   //p1_guid matches the number in EventBookkeeperTPCnv/selection.xtml and is generated with uuidgen | tr "[:lower:]" "[:upper:]"
   static pool::Guid   p1_guid("61CEDFF0-46DD-42BD-B43A-12F850D3752E"); 
   if( compareClassGuid(p1_guid) ) {
-    // using auto_ptr ensures deletion of the persistent object
+    // using unique_ptr ensures deletion of the persistent object
     std::unique_ptr< SkimDecision_p1 > col_vect( poolReadObject< SkimDecision_p1 >() );
     return m_TPConverter.createTransient( col_vect.get(), log );
   }
diff --git a/Event/EventBookkeeperAthenaPool/src/SkimDecisionCollectionCnv.cxx b/Event/EventBookkeeperAthenaPool/src/SkimDecisionCollectionCnv.cxx
index e202e32d88e3fcce42c191f77967e4a1d9d26e5c..1f9ea453f013c521f58454ad41d68a91697d3ec2 100644
--- a/Event/EventBookkeeperAthenaPool/src/SkimDecisionCollectionCnv.cxx
+++ b/Event/EventBookkeeperAthenaPool/src/SkimDecisionCollectionCnv.cxx
@@ -22,7 +22,7 @@ SkimDecisionCollection* SkimDecisionCollectionCnv::createTransient() {
   //p1_guid matches the number in EventBookkeeperTPCnv/selection.xtml and is generated with uuidgen | tr "[:lower:]" "[:upper:]"
   static pool::Guid   p1_guid("5705559E-F062-4F15-A220-78A8542EFBF3");
   if( compareClassGuid(p1_guid) ) {
-    // using auto_ptr ensures deletion of the persistent object
+    // using unique_ptr ensures deletion of the persistent object
     std::unique_ptr< SkimDecisionCollection_p1 > col_vect( poolReadObject< SkimDecisionCollection_p1 >() );
     return m_TPConverter.createTransient( col_vect.get(), log );
   }
diff --git a/Event/EventCommonAthenaPool/src/INav4MomAssocsCnv.cxx b/Event/EventCommonAthenaPool/src/INav4MomAssocsCnv.cxx
index 9862e27c9b29707d4aa9a78a596123be2e3dad82..5636c16bfae0ba27be64d1d4d8b3e47476a4e457 100755
--- a/Event/EventCommonAthenaPool/src/INav4MomAssocsCnv.cxx
+++ b/Event/EventCommonAthenaPool/src/INav4MomAssocsCnv.cxx
@@ -67,17 +67,17 @@ INav4MomAssocs* INav4MomAssocsCnv::createTransient()
   static pool::Guid p3_guid("455AEE6B-9834-4E72-8F81-2532A52E3BE7");
 
   if( compareClassGuid(p3_guid) ) {
-    // using auto_ptr ensures deletion of the persistent object
+    // using unique_ptr ensures deletion of the persistent object
     std::unique_ptr<INav4MomAssocs_p3> persObj( poolReadObject<INav4MomAssocs_p3>() );
     transObj =  m_tpConverter_p3.createTransient( persObj.get(), log );
   }
   else if ( compareClassGuid(p2_guid) ) {
-    // using auto_ptr ensures deletion of the persistent object
+    // using unique_ptr ensures deletion of the persistent object
     std::unique_ptr<INav4MomAssocs_p2> persObj( poolReadObject<INav4MomAssocs_p2>() );
     transObj = m_tpConverter_p2.createTransient( persObj.get(), log );
   }
   else if( compareClassGuid(p1_guid) ) {
-    // using auto_ptr ensures deletion of the persistent object
+    // using unique_ptr ensures deletion of the persistent object
     std::unique_ptr<INav4MomAssocs_p1> persObj( poolReadObject<INav4MomAssocs_p1>() );
     INav4MomAssocsCnv_p1 cnv( m_storeGate );
     transObj = cnv.createTransient( persObj.get(), log );
diff --git a/Event/EventCommonAthenaPool/src/INav4MomLinkContainerCnv.cxx b/Event/EventCommonAthenaPool/src/INav4MomLinkContainerCnv.cxx
index c1e6e7f5d12ceeb1d5716511d0e10ad1f1d49883..399baf05e825e7ec25bac8069bb8aa085654a04b 100644
--- a/Event/EventCommonAthenaPool/src/INav4MomLinkContainerCnv.cxx
+++ b/Event/EventCommonAthenaPool/src/INav4MomLinkContainerCnv.cxx
@@ -45,7 +45,7 @@ INav4MomLinkContainer* INav4MomLinkContainerCnv::createTransient()
 
   if( compareClassGuid(p1_guid) )
     {
-      // using auto_ptr ensures deletion of the persistent object
+      // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< INav4MomLinkContainer_PERS > col_vect( poolReadObject< INav4MomLinkContainer_PERS >() );
       return m_TPConverter.createTransient( col_vect.get(), log );
     }
diff --git a/Event/EventCommonAthenaPool/src/IParticleLinkContainerCnv.cxx b/Event/EventCommonAthenaPool/src/IParticleLinkContainerCnv.cxx
index 5871bb7d19dce594a5eb910b6c6d27f8279e22eb..29ca3d5636a0bebf6524279f24900fd4525ae5f0 100644
--- a/Event/EventCommonAthenaPool/src/IParticleLinkContainerCnv.cxx
+++ b/Event/EventCommonAthenaPool/src/IParticleLinkContainerCnv.cxx
@@ -52,7 +52,7 @@ IParticleLinkContainer* IParticleLinkContainerCnv::createTransient()
 
   if( compareClassGuid(p1_guid) )
     {
-      // using auto_ptr ensures deletion of the persistent object
+      // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< IParticleLinkContainer_PERS > col_vect( poolReadObject< IParticleLinkContainer_PERS >() );
       return m_TPConverter.createTransient( col_vect.get(), log );
     }
diff --git a/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventAthenaPool/src/AFP_TDLocRecoEvCollectionCnv.cxx b/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventAthenaPool/src/AFP_TDLocRecoEvCollectionCnv.cxx
index 4091cfb3c5300b41dcea8c9ecb40a2bbdd09fcf0..5ba3301317bf815d75f9d1149b9ebb9bf102378f 100644
--- a/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventAthenaPool/src/AFP_TDLocRecoEvCollectionCnv.cxx
+++ b/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventAthenaPool/src/AFP_TDLocRecoEvCollectionCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "AFP_EventTPCnv/AFP_TDLocRecoEvCollectionCnv_p1.h"
@@ -26,7 +26,7 @@ AFP_TDLocRecoEvCollection* AFP_TDLocRecoEvCollectionCnv::createTransient() {
     static const pool::Guid p1_guid ("3149C8A8-DEED-4922-8705-1D727A280B9E");
     
     if( this->compareClassGuid(p1_guid)) {
-         std::auto_ptr< AFP_TDLocRecoEvCollection_p1 >   col_vect( this->poolReadObject< AFP_TDLocRecoEvCollection_p1 >() );
+         std::unique_ptr< AFP_TDLocRecoEvCollection_p1 >   col_vect( this->poolReadObject< AFP_TDLocRecoEvCollection_p1 >() );
         trans_cont = TPConverter_p1.createTransient( col_vect.get(), mlog );
     }
  
diff --git a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelByteStreamErrors.h b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelByteStreamErrors.h
index 6cc69039f86e8eacfd2380cb8d8cb1ff71509d6a..6a987c7926813beeb997bfc97bd64e2a4f240f1e 100644
--- a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelByteStreamErrors.h
+++ b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/PixelByteStreamErrors.h
@@ -10,14 +10,18 @@
 namespace PixelByteStreamErrors {
 
   //!< Possible errors in pixel data decoding, exactl clone of definition in: PixelConditionsTools/IPixelByteStreamErrorsTool.h, the later will be removed
-  enum ErrorType {TimeOut=0, firstErrType=TimeOut, BCID=1, LVL1ID=2, Preamble=3, Trailer=4,
-		  Flagged=5, DisableFE=6, ROD=7, Decoding=8, Invalid=9, LinkMaskedByPPC=10, Limit=11, lastErrType=Limit, ErrorsNumber=lastErrType+1 };
+  enum PixelErrorsEnum {TimeOut=0, firstErrType=TimeOut, BCID, LVL1ID, Preamble, Trailer,
+			Flagged, DisableFE, BadFE, ROD, Decoding, Invalid, LinkMaskedByPPC, Limit, TruncatedROB, MaskedROB, lastErrType=MaskedROB, ErrorsNumber=lastErrType+1 };
+
 
   //!< @brief helper to be used in clients to fetch error information
   inline bool hasError(IDCInDetBSErrContainer::ErrorCode errWord,  PixelErrorsEnum errType ) { return errWord & (1<<errType); }
 
-  //!< @brief helper to set the error: @example errors[hashId] = addError( errors[hashId], PixelByteStreamErrors::Invalid ) 
-  inline IDCInDetBSErrContainer::ErrorCode addError(IDCInDetBSErrContainer::ErrorCode errWord,  PixelErrorsEnum errType ) { return errWord | (1<<errType); }
+  //!< @brief helper to set the error: @example errors[hashId] = addError( errors[hashId], PixelByteStreamErrors::Invalid )
+  inline void addError(IDCInDetBSErrContainer::ErrorCode& errWord,  PixelErrorsEnum errType ) { errWord |= (1<<errType); }
+
+  //!< @brief for cases when error doe snot need to be accumulated
+  inline IDCInDetBSErrContainer::ErrorCode makeError( PixelErrorsEnum errType ) { return (1<<errType); }
 }
 
 
diff --git a/InnerDetector/InDetDetDescr/InDetIdentifier/src/SCT_ID.cxx b/InnerDetector/InDetDetDescr/InDetIdentifier/src/SCT_ID.cxx
index e841daf1259df0425220b520a91f7999b794b038..8e1411ec4e8f8997af467e64dd2f06406b6e56db 100644
--- a/InnerDetector/InDetDetDescr/InDetIdentifier/src/SCT_ID.cxx
+++ b/InnerDetector/InDetDetDescr/InDetIdentifier/src/SCT_ID.cxx
@@ -21,7 +21,7 @@ namespace{
   const IdentifierHash invalidHash;
   const std::array<IdentifierHash, 5> invalidHashes{invalidHash, invalidHash, invalidHash,
   invalidHash, invalidHash};
-  std::function< IdentifierHash(const IdentifierHash &)>
+  const std::function< IdentifierHash(const IdentifierHash &)>
   invalidHashFunc = ([](const IdentifierHash &){return IdentifierHash{};});
 }
 
diff --git a/InnerDetector/InDetDetDescr/InDetIdentifier/test/SCT_ID_test.cxx b/InnerDetector/InDetDetDescr/InDetIdentifier/test/SCT_ID_test.cxx
index 2d095b213c760a0f35be6a50e3cdfd9070e3a94b..68068a95e713afda297a496dcc2dc5f0d77e475c 100644
--- a/InnerDetector/InDetDetDescr/InDetIdentifier/test/SCT_ID_test.cxx
+++ b/InnerDetector/InDetDetDescr/InDetIdentifier/test/SCT_ID_test.cxx
@@ -58,6 +58,10 @@ BOOST_AUTO_TEST_SUITE(SCT_ID_Test)
     //the following case doesn't generate any error, even with 'checks on'
     const auto nonsenseIdentifier = sctId.module_id(0,3,3,0);//eta=0 modules don't exist in the barrel
     BOOST_TEST_MESSAGE("Module (0,3,3,0) : "<<nonsenseIdentifier<<", which is nonsense.");//but this doesn't prevent it generating a number
+    // These tests fail an assertion in debug builds.
+    // Even with assertions disabled, they involve undefined behavior --- the
+    // assertion protects against out-of-bounds array access.
+#if 0
     boost::test_tools::output_test_stream output;
     BOOST_TEST_MESSAGE("Check nonsense identifiers without and with checks turned on");
     auto nonsenseIdentifier2 = Identifier{};
@@ -73,6 +77,7 @@ BOOST_AUTO_TEST_SUITE(SCT_ID_Test)
     //put messages outside the cout capture block
     BOOST_TEST_MESSAGE("These invalid identifiers were returned : "<<nonsenseIdentifier2<<", "<<nonsenseIdentifier3<<", so be careful!");
     BOOST_CHECK( output.is_equal( rangeError ) );
+#endif
     //check wafer Identifier for side 0
     const auto barrelWaferId0 = sctId.wafer_id(0,3,3,-1,0);
     //which is just the same as the module Id...
diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.cxx b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.cxx
index cd1b22de22b41f949bb10eea24848e575dd3fdf1..9f7643ca2b45e4bc90e18c46c0fb25950be34f26 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.cxx
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "PixelRawDataProvider.h"
@@ -37,18 +37,22 @@ StatusCode PixelRawDataProvider::initialize() {
     return StatusCode::FAILURE;
   } else
     ATH_MSG_INFO("Retrieved service " << m_robDataProvider);
- 
+
   // Get PixelRawDataProviderTool
   if (m_rawDataTool.retrieve().isFailure()) {
     ATH_MSG_FATAL("Failed to retrieve tool " << m_rawDataTool);
     return StatusCode::FAILURE;
   } else
     ATH_MSG_INFO("Retrieved tool " << m_rawDataTool);
- 
-  ATH_CHECK(detStore()->retrieve(m_pixel_id, "PixelID"));
 
+  ATH_CHECK(detStore()->retrieve(m_pixel_id, "PixelID"));
   ATH_CHECK( m_rdoContainerKey.initialize() );
-  ATH_CHECK( m_rdoCacheKey.initialize(!m_rdoCacheKey.key().empty()) );
+
+  ATH_CHECK( m_rdoCacheKey.initialize( SG::AllowEmpty ) );
+
+  ATH_CHECK( m_bsErrorsKey.initialize() );
+  ATH_CHECK( m_bsErrorsCacheKey.initialize( SG::AllowEmpty ) );
+
 
   if (m_roiSeeded) {
     ATH_CHECK( m_roiCollectionKey.initialize() );
@@ -72,18 +76,18 @@ StatusCode PixelRawDataProvider::execute() {
 #endif
 
   // now create the container and register the collections
- 
+
 
   // write into StoreGate
-  bool ExternalCacheMode = !m_rdoCacheKey.key().empty();
+
   SG::WriteHandle<PixelRDO_Container> rdoContainer(m_rdoContainerKey);
-  if(!ExternalCacheMode) rdoContainer = std::make_unique<PixelRDO_Container>(m_pixel_id->wafer_hash_max()); 
+  if( m_rdoCacheKey.empty() ) rdoContainer = std::make_unique<PixelRDO_Container>(m_pixel_id->wafer_hash_max());
   else{
     SG::UpdateHandle<PixelRDO_Cache> updateh(m_rdoCacheKey);
     if( ! updateh.isValid() ) {
       ATH_MSG_FATAL("Failure to retrieve cache " << m_rdoCacheKey.key());
       return StatusCode::FAILURE;
-    }    
+    }
     rdoContainer = std::make_unique<PixelRDO_Container>(updateh.ptr());
     ATH_MSG_DEBUG("Created container " << m_rdoContainerKey.key() << " using external cache " << m_rdoCacheKey.key());
   }
@@ -93,7 +97,7 @@ StatusCode PixelRawDataProvider::execute() {
   //m_robDataProvider->print_robmap();
 
   // ask ROBDataProviderSvc for the vector of ROBFragment for all Pixel ROBIDs
-  std::vector<uint32_t> listOfRobs; 
+  std::vector<uint32_t> listOfRobs;
 
   if (!m_roiSeeded) {
     ATH_MSG_DEBUG("No RoI seed, fetching all ROBs");
@@ -103,7 +107,7 @@ StatusCode PixelRawDataProvider::execute() {
      ATH_MSG_DEBUG("RoI seed, fetching regions infromation");
      SG::ReadHandle<TrigRoiDescriptorCollection> roiCollection(m_roiCollectionKey);
      ATH_CHECK(roiCollection.isValid());
-     
+
      TrigRoiDescriptorCollection::const_iterator roi = roiCollection->begin();
      TrigRoiDescriptorCollection::const_iterator roiE = roiCollection->end();
      TrigRoiDescriptor superRoI;//add all RoIs to a super-RoI
@@ -112,7 +116,7 @@ StatusCode PixelRawDataProvider::execute() {
      for (; roi!=roiE; ++roi) {
        superRoI.push_back(*roi);
      }
-     m_regionSelector->DetROBIDListUint( PIXEL, 
+     m_regionSelector->DetROBIDListUint( PIXEL,
 					 superRoI,
 					 listOfRobs);
   }
@@ -126,21 +130,34 @@ StatusCode PixelRawDataProvider::execute() {
 #endif
 
   std::unique_ptr<DummyPixelRDO> tempcont;
-  if(ExternalCacheMode) tempcont = std::make_unique<DummyPixelRDO> (rdoContainer.ptr());
+  if( not m_rdoCacheKey.empty() ) tempcont = std::make_unique<DummyPixelRDO> (rdoContainer.ptr());
 
   IPixelRDO_Container *containerInterface = tempcont ? static_cast< IPixelRDO_Container* >(tempcont.get()) :
          static_cast< IPixelRDO_Container* >(rdoContainer.ptr());
+
+  std::unique_ptr<IDCInDetBSErrContainer> decodingErrors;
+  if ( not m_bsErrorsCacheKey.empty() ) {
+    SG::UpdateHandle<IDCInDetBSErrContainer_Cache> bsErrorsCacheHandle( m_bsErrorsCacheKey );
+    decodingErrors = std::make_unique<IDCInDetBSErrContainer>( bsErrorsCacheHandle.ptr() );
+  } else {
+    decodingErrors = std::make_unique<IDCInDetBSErrContainer>( m_pixel_id->wafer_hash_max(), std::numeric_limits<int>::min() );
+  }
+
+
   // ask PixelRawDataProviderTool to decode it and to fill the IDC
-  // TODO: temporarily unused errors container
-  IDCInDetBSErrContainer decodingErrors(0, std::numeric_limits<int>::min()); // we will use IDC Errors from elswhere
-  if (m_rawDataTool->convert(listOfRobf,  containerInterface, decodingErrors).isFailure())
+  if (m_rawDataTool->convert(listOfRobf,  containerInterface, *decodingErrors).isFailure())
     ATH_MSG_ERROR("BS conversion into RDOs failed");
 
+
+
   if(tempcont) ATH_CHECK(tempcont->MergeToRealContainer(rdoContainer.ptr()));
+
+  SG::WriteHandle<IDCInDetBSErrContainer> bsErrorsHandle(m_bsErrorsKey);
+  ATH_CHECK( bsErrorsHandle.record( std::move( decodingErrors ) ) );
+
 #ifdef PIXEL_DEBUG
     ATH_MSG_DEBUG("Number of Collections in IDC " << rdoContainer->numberOfCollections());
 #endif
 
   return StatusCode::SUCCESS;
 }
-
diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.h b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.h
index 94caa17924045e0a44f623fbbb8b95f29ab503d9..53cc29f06c6a862a4f2182d61f191b875cc938e4 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.h
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -56,8 +56,10 @@ private:
   SG::ReadHandleKey<TrigRoiDescriptorCollection> m_roiCollectionKey     { this, "RoIs", "", "If RoI driven unpacking to be used, this is the key"};
   SG::WriteHandleKey<PixelRDO_Container> m_rdoContainerKey              { this, "RDOKey", "PixelRDOs"};
   SG::UpdateHandleKey<PixelRDO_Cache> m_rdoCacheKey;
+  SG::WriteHandleKey<IDCInDetBSErrContainer> m_bsErrorsKey              { this, "BSErrorsKey", "PixBSErr"};  
   SG::UpdateHandleKey<IDCInDetBSErrContainer_Cache> m_bsErrorsCacheKey;
   SG::ReadCondHandleKey<PixelCablingCondData> m_condCablingKey          { this, "PixelCablingCondData", "PixelCablingCondData", "Pixel cabling key"};
+
 };
 
 #endif
diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx
index 9eaa339c84cd8b0088ab60c0c4a24fd307675005..37de08749e66246ceb7e5fd8ba72d7d1958ce509 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "PixelRodDecoder.h"
@@ -10,7 +10,7 @@
 #include "ExtractCondensedIBLhits.h"
 #include "PixelByteStreamModuleMask.h"
 #include "eformat/SourceIdentifier.h"
-
+#include "PixelConditionsData/PixelByteStreamErrors.h"
 #include <iostream>
 #include <string>
 #include <fstream>
@@ -100,7 +100,7 @@ StatusCode PixelRodDecoder::finalize() {
 
 //---------------------------------------------------------------------------------------------------- fillCixollection
 StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRDO_Container* rdoIdc,
-					    IDCInDetBSErrContainer& /*decodingErrors*/,
+					    IDCInDetBSErrContainer& decodingErrors,
                                             std::vector<IdentifierHash>* vecHash) const
 {
 #ifdef PIXEL_DEBUG
@@ -137,12 +137,14 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
       ATH_MSG_DEBUG( "ROB status word for robid 0x"<< std::hex << robId << " is non-zero 0x"
 		     << (*rob_status) << std::dec);
 
-      if (((*rob_status) >> 27) & 0x1) {
+      if (((*rob_status) >> 27) & 0x1) { // TODO: find source of thse constants
+	addRODError( robId, PixelByteStreamErrors::TruncatedROB, decodingErrors );
 	ATH_MSG_DEBUG("ROB status word for robid 0x"<< std::hex << robId << std::dec <<" indicates data truncation.");
 	return StatusCode::RECOVERABLE;
       }
 
       if (((*rob_status) >> 31) & 0x1) {
+	addRODError( robId, PixelByteStreamErrors::MaskedROB, decodingErrors );
 	ATH_MSG_DEBUG( "ROB status word for robid 0x"<< std::hex << robId<< std::dec <<" indicates resource was masked off.");
 	return StatusCode::RECOVERABLE;
       }
@@ -151,6 +153,7 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
 
 
   unsigned int errorcode = 0;
+  int bsErrCode = 0; // new BS Errors handling
   // m_errors->reset(); // reset the collection of errors
 
   StatusCode sc = StatusCode::SUCCESS;
@@ -273,6 +276,7 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
 	generalwarning("In ROB 0x" << std::hex << robId << ": Unexpected link header found: 0x" << std::hex << rawDataWord
 		       << ", data corruption" << std::dec);
 	m_errors->addDecodingError();
+	PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Decoding );
       }
       else {
 	ATH_MSG_DEBUG( "Header decoding starts" );
@@ -292,7 +296,6 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
       }
 
       errorcode = 0; // reset errorcode
-
       // Keep track of IDs for previous fragment before decoding the new values
       prevLVL1ID = mLVL1ID;
       prevBCID = mBCID;
@@ -311,7 +314,10 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
 	linkNum_IBLheader = decodeModule_IBL(rawDataWord);   // decode IBL FE number on the S-Link (range [0,7], as 8 FEs are connected to 1 S-Link in IBL) and the S-Link number itself: n
 
 
-	if (decodeFeI4Bflag_IBL(rawDataWord)) m_errors->addFlaggedError(); // decode FeI4B flag bit: F
+	if (decodeFeI4Bflag_IBL(rawDataWord)) {
+	  m_errors->addFlaggedError(); // decode FeI4B flag bit: F
+	  PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Flagged );
+	}
 
 
 	fe_IBLheader = extractFefromLinkNum(linkNum_IBLheader);
@@ -403,14 +409,22 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
 	if (headererror != 0) { // only treatment for header errors now, FIXME
 	  sc = StatusCode::RECOVERABLE;
 	  errorcode = errorcode | (headererror << 20); //encode error as HHHHMMMMMMMMFFFFFFFFTTTT for header, flagword, trailer errors
-	  if (headererror & (1 << 3))
+	  if (headererror & (1 << 3)) {
 	    m_errors->addPreambleError();
-	  if (headererror & (1 << 2))
+	    PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Preamble );
+	  }
+	  if (headererror & (1 << 2)) {
 	    m_errors->addTimeOutError();
-	  if (headererror & (1 << 1))
+	    PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::TimeOut );
+	  }
+	  if (headererror & (1 << 1)) {
 	    m_errors->addLVL1IDError();
-	  if (headererror & (1 << 0))
+	    PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::LVL1ID );
+	  }
+	  if (headererror & (1 << 0)) {
 	    m_errors->addBCIDError();
+	    PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::BCID );
+	  }
 	}
       }
 
@@ -430,7 +444,7 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
       offlineIdHash = m_pixel_id->wafer_hash(pixCabling->find_entry_onoff(onlineId));
 
       if (offlineIdHash != previous_offlineIdHash) {
-	m_errors->addRead(offlineIdHash);
+	m_errors->addRead(offlineIdHash); // TODO: understand this better, it seems like an additiona, transient flag denoting that the module wasdecoded for this event
 	mBCID_offset = mBCID;   // set BCID offset if this is first LVL1A
       }
       mLVL1A = mBCID - mBCID_offset;   // calculate the LVL1A
@@ -447,7 +461,7 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
       if (offlineIdHash == 0xffffffff) {   // if link (module) online identifier (ROBID and link number) not found by mapping
 	generalwarning("In ROB 0x" << std::hex << robId << ", FE: 0x" << mLink
 		       << ": Unknown OnlineId identifier in FE header - not found by mapping" << std::dec);
-	m_errors->addDecodingError();
+	m_errors->addDecodingError();  // TODO Decoding error not associated wiht any hashID. Handle that somehow
 	link_start = false;   // resetting link (module) header found flag
 	continue;   // skip this word and process next one
       }
@@ -538,6 +552,7 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
 			     << ": Interruption of IBL condensed words - hit(s) ignored (current dataword: 0x"
 			     << std::hex << rawDataWord << std::dec << ")");
 	      m_errors->addDecodingError();
+	      PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Decoding );
 	      countHitCondensedWords = 0;
 	    }
 	    // IBL non-condensed Hit Words decoding:
@@ -564,6 +579,7 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
 	    generalwarning("In ROB 0x" << std::hex << robId << ", FE: 0x" << mLink
 			   << ": IBL/DBM hit word 0x" << rawDataWord << " not recognised" << std::dec);
 	    m_errors->addDecodingError();
+	    PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Decoding );
 	    continue;
 	  }
 
@@ -584,6 +600,7 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
 			     << ": Interruption of IBL condensed words - hit(s) ignored (current dataword: 0x"
 			     << std::hex << rawDataWord << std::dec << ")");
 	      m_errors->addDecodingError();
+	      PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Decoding );
 	      countHitCondensedWords = 0;
 	    }
 	  //Pixel Hit Words decoding:
@@ -693,6 +710,7 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
 				 << (tot[i] >> 4) << ", ToT2 = 0x" << (tot[i] & 0xF) << ", row = "
 				 << std::dec << row[i] << " col = " << col[i] << std::dec);
 		  m_errors->addInvalidIdentifier();
+		  PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Invalid );
 		  continue;
 		}
 		IBLtot[0] = divideHits(tot[i], 4, 7); // corresponds to (col, row)
@@ -736,7 +754,7 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
 				   << ": Illegal IBL row number for second ToT field, hit word 0x"
 				   << rawDataWord << " decodes to row = " << std::dec << row[i]+1 << " col = " << col[i]
 				   << " (ToT1 = 0x" << std::hex << IBLtot[0] << " ToT2 = 0x" << IBLtot[1] << ")");
-
+		    PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Invalid );
 		    m_errors->addInvalidIdentifier();
 		    continue;
 		  }
@@ -760,6 +778,7 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
 				     << (tot[i] >> 4) << ", ToT2 = 0x" << (tot[i] & 0xF) << ", row = "
 				     << std::dec << row[i] << " col = " << col[i] << std::dec);
 		      m_errors->addInvalidIdentifier();
+		      PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Invalid );
 		      continue;
 		    }
 
@@ -777,6 +796,7 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
 			       << rawDataWord << " decodes to row = " << std::dec << row[i] << " col = " << col[i]
 			       << " (ToT1 = 0x" << std::hex << (tot[i] >> 4) << " ToT2 = 0x" << (tot[i] & 0xF) << ")");
 		m_errors->addInvalidIdentifier();
+		PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Invalid );
 		continue;
 	      }
 	    } // end of the else from the condition "(tot[i] & 0xF0) == 0xF", corresponding to an invalid tot sent by the ROD
@@ -791,6 +811,7 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
 			  << ": Illegal pixelId - row = " << std::dec << mRow << ", col = " << mColumn
 			  << ", dataword = 0x" << std::hex << rawDataWord << std::dec);
 	    m_errors->addInvalidIdentifier();
+	    PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Invalid );
 	    continue;
 	  }
 	  // Now the Collection is there for sure. Create RDO and push it into Collection.
@@ -806,6 +827,7 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
 	generalwarning("In ROB = 0x" << std::hex << robId << ", link 0x" << mLink
 		       << ": Unexpected hit dataword: " << rawDataWord << " - hit ignored");
 	m_errors->addDecodingError();
+	PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Decoding );
 	continue;
       }
       break;
@@ -821,12 +843,13 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
 	generalwarning("In ROB = 0x" << std::hex << robId << ", link 0x" << mLink
 		       << ": Unexpected trailer found: 0x" << std::hex << rawDataWord << ", data corruption");
 	m_errors->addDecodingError();
+	PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Decoding );
 	continue;
       }
       previous_offlineIdHash = offlineIdHash;  // save offlineId for next header;
       link_start = false;   // resetting link (module) header found flag
       are_4condensed_words = false;
-      m_errors->setModuleFragmentSize(offlineIdHash, nwords_in_module_fragment);
+      m_errors->setModuleFragmentSize(offlineIdHash, nwords_in_module_fragment); // TODO understand what this is used for, and why moduel fragment size is handled by errors tool
 
       // Trailer decoding and error handling
       if (isIBLModule || isDBMModule) { // decode IBL/DBM Trailer word: 010nnnnnECPplbzhvMMMMMMMMMMxxxxx
@@ -846,38 +869,55 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
 	errorcode = errorcode | trailererror_noC;
 
 	// Add errors to errorsvc
-	if (trailererror & (1 << 8)) // time out error bit => E
+	if (trailererror & (1 << 8)) { // time out error bit => E
 	  m_errors->addTimeOutError();
-	if (trailererror & (1 << 7)) // condensed mode bit => W
+	  PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::TimeOut );
+	}
+	if (trailererror & (1 << 7))  // condensed mode bit => W
 	  if (!receivedCondensedWords) {
 	    generalwarning("In ROB 0x" << std::hex << robId << ", link 0x" << mLink
 			   << ": condensed mode bit is set, but no condensed words received" << std::dec);
 	  }
-	if (trailererror & (1 << 6)) // link masked by PPC => P
+	if (trailererror & (1 << 6)) {// link masked by PPC => P
 	  m_errors->addLinkMaskedByPPC();
-	if (trailererror & (1 << 5)) // preamble error bit => p
+	  PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::LinkMaskedByPPC );
+	}
+	if (trailererror & (1 << 5)) { // preamble error bit => p
 	  m_errors->addPreambleError();
-	if (trailererror & (1 << 4)) // LVL1 error bit => l
+	  PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Preamble );
+	}
+	if (trailererror & (1 << 4)) { // LVL1 error bit => l
 	  m_errors->addLVL1IDError();
-	if (trailererror & (1 << 3)) // BCID error bit => b
+	  PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::LVL1ID );
+	}
+	if (trailererror & (1 << 3)) {// BCID error bit => b
 	  m_errors->addBCIDError();
-	if (trailererror & (1 << 2)) // trailer error bit => z
+	  PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::BCID );
+	}
+	if (trailererror & (1 << 2)) { // trailer error bit => z
 	  m_errors->addTrailerError();
-	if (trailererror & (1 << 1)) // header/trailer limit error=> h
+	  PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Trailer );
+	}
+	if (trailererror & (1 << 1)) { // header/trailer limit error=> h
 	  m_errors->addLimitError();
-	if (trailererror & (1 << 0)) // data overflow error=> v
+	  PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Limit );
+	}
+	if (trailererror & (1 << 0)) { // data overflow error=> v
 	  m_errors->addInvalidIdentifier();
+	  PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Invalid );
+	}
 
 	// Write the error word to the service
 	if (offlineIdHash != 0xffffffff && errorcode) {
 	  m_errors->setFeErrorCode(offlineIdHash, (mLink & 0x1), errorcode);
 
 	  // Check if error code is already set for this wafer
-	  uint32_t existing_code = m_errors->getModuleErrors(offlineIdHash);
+	  uint32_t existing_code = m_errors->getModuleErrors(offlineIdHash); // TODO Verify if this ever happens
 	  if (existing_code) {
 	    errorcode = existing_code | errorcode;
 	  }
 	  m_errors->setModuleErrors(offlineIdHash, errorcode);
+	  decodingErrors.setOrDrop( offlineIdHash, bsErrCode );
 	}
 
 
@@ -921,11 +961,17 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
 	    m_errors->addTrailerError();
 	  if (trailererror & (1 << 0))
 	    m_errors->addTrailerError();
+	  // TODO, above looks like a bug, compared to previous meaning of trailer error bits. For the sake of consistency reproduce it.
+	  if ( trailererror & 0xf ) {
+	    PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Trailer );
+	  }
+
 	}
       }
-      if ( offlineIdHash != 0xffffffff ) // now write the error word to the service
+      if ( offlineIdHash != 0xffffffff ) { // now write the error word to the service
 	m_errors->setModuleErrors(offlineIdHash, errorcode);
-
+	decodingErrors.setOrDrop( offlineIdHash, bsErrCode );
+      }
       break;
 
 
@@ -1021,12 +1067,14 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
 	    m_errors->addFlaggedError();
 	  if (FEFlags & (1 << 0))
 	    m_errors->addFlaggedError();
+	  if ( MCCFlags & 0xff or FEFlags & 0xff )
+	    PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Flagged );
 	  m_errors->setFeErrorCode(offlineIdHash, fe_number, errorcode);
 
 	} else {
 	  m_errors->addDisabledFEError();
-	  m_errors->addBadFE(offlineIdHash,(rawDataWord & 0x0F000000) >> 24);
-
+	  m_errors->addBadFE(offlineIdHash,(rawDataWord & 0x0F000000) >> 24); // TODO check what is this needed for
+	  PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::BadFE );
 	  ATH_MSG_DEBUG( "Disabled Pixel chip " << ((rawDataWord & 0x0F000000) >> 24) );
 
 	}
@@ -1044,6 +1092,7 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, IPixelRD
       generalwarning("In ROB 0x" << std::hex << robId << ", FE 0x" << mLink
 		     << ": Unknown word type found, 0x" << std::hex << rawDataWord << std::dec << ", ignoring");
       m_errors->addDecodingError();
+      PixelByteStreamErrors::addError( bsErrCode, PixelByteStreamErrors::Decoding );
 
     } // end of switch
   }   // end of loop over ROD
@@ -1607,6 +1656,15 @@ void PixelRodDecoder::addRODError(uint32_t robid, uint32_t robStatus) const {
   return;
 }
 
+void PixelRodDecoder::addRODError(const uint32_t robid, const IDCInDetBSErrContainer::ErrorCode ec, IDCInDetBSErrContainer& errorsCollection) const {
+  const std::deque<Identifier> offlineIdList = SG::ReadCondHandle<PixelCablingCondData>( m_condCablingKey )->find_entry_offlineList( robid );
+  for ( const Identifier& id: offlineIdList ) {
+    IdentifierHash idHash = m_pixel_id->wafer_hash(id);
+    errorsCollection.setOrDrop(idHash, ec);
+  }
+}
+
+
 uint32_t PixelRodDecoder::treatmentFEFlagInfo(unsigned int serviceCode, unsigned int serviceCodeCounter) const {
 
   unsigned int etc = 0, l1req = 0;
diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.h b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.h
index 42181c88ab20e154ca3381aa9228a683cd459db8..09439d944bb1b77eb126458d168af01c2d4dd57b 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.h
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.h
@@ -124,6 +124,8 @@ class PixelRodDecoder : virtual public IPixelRodDecoder, public AthAlgTool {
 
     void addRODError(uint32_t rodid, uint32_t robStatus) const;
 
+
+
     bool CheckLinkStart(const bool Link_start, const int rodId, const unsigned int mLink, const unsigned int mBCID, const unsigned int mLVL1ID, const int LVL1A);
 
     uint32_t treatmentFEFlagInfo(unsigned int serviceCode, unsigned int serviceCodeCounter) const;
@@ -151,7 +153,8 @@ class PixelRodDecoder : virtual public IPixelRodDecoder, public AthAlgTool {
     SG::ReadCondHandleKey<PixelHitDiscCnfgData> m_condHitDiscCnfgKey
     {this, "PixelHitDiscCnfgData", "PixelHitDiscCnfgData", "Pixel FEI4 HitDiscConfig key"};
 
-
+    //!< adds given ErrorCode to all hasIDs for given ROB
+    void addRODError(uint32_t robid, IDCInDetBSErrContainer::ErrorCode, IDCInDetBSErrContainer& errorsCollection) const;
 
 };
 
diff --git a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArAutoCorrCompleteCnv.cxx b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArAutoCorrCompleteCnv.cxx
index c5fa65758662df0df8cacc21bd17c3b29115e089..8648f2a3f1f1be1c06e94122e8be7b85d662c137 100755
--- a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArAutoCorrCompleteCnv.cxx
+++ b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArAutoCorrCompleteCnv.cxx
@@ -29,7 +29,7 @@ LArAutoCorrCompleteCnv::createTransient ()
     static pool::Guid   p1_guid("FA16A69D-241E-40F3-B710-77A95937E394");
     static pool::Guid   p0_guid("4E7E36E9-2121-4327-88C5-8A516D6D6D2A");
     if( compareClassGuid(p1_guid) ) {
-        // using auto_ptr ensures deletion of the persistent object
+        // using unique_ptr ensures deletion of the persistent object
         std::unique_ptr< LArAutoCorrSubset_p1 > col_vect( poolReadObject< LArAutoCorrSubset_p1 >() );
         MsgStream log(msgSvc(), "LArAutoCorrCompleteCnv" ); 
         //log << MSG::INFO << "Reading LArAutoCorrSubset_p1" << endmsg; 
diff --git a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArAutoCorrMCCnv.cxx b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArAutoCorrMCCnv.cxx
index 5badd3305ef3d769f9ce0d3c9844a056d6f3065e..17757f9d1a7d9029220391e544706f3dd3327415 100755
--- a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArAutoCorrMCCnv.cxx
+++ b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArAutoCorrMCCnv.cxx
@@ -30,7 +30,7 @@ LArAutoCorrMCCnv::createTransient ()
     static pool::Guid   p1_guid("FA16A69D-241E-40F3-B710-77A95937E394");
     static pool::Guid   p0_guid("4E7E36E9-2121-4327-88C5-8A516D6D6D2A");
     if( compareClassGuid(p1_guid) ) {
-        // using auto_ptr ensures deletion of the persistent object
+        // using unique_ptr ensures deletion of the persistent object
         std::unique_ptr< LArAutoCorrSubset_p1 > col_vect( poolReadObject< LArAutoCorrSubset_p1 >() );
         MsgStream log(msgSvc(), "LArAutoCorrMCCnv" ); 
         //log << MSG::INFO << "Reading LArAutoCorrSubset_p1" << endmsg; 
diff --git a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArCaliWaveContainerCnv.cxx b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArCaliWaveContainerCnv.cxx
index aa4ddcb8f68169587a4d97ed6d9e48f3c1605a5f..3c50543cae32010ededb4ff6e3c01185dc86be07 100644
--- a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArCaliWaveContainerCnv.cxx
+++ b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArCaliWaveContainerCnv.cxx
@@ -36,7 +36,7 @@ LArCaliWaveContainerCnv::createTransient ()
 	static pool::Guid   p0_guid("ECB4AD6C-FF3A-4255-A0E3-7BD566B96A77");
 	
     if( compareClassGuid(p2_guid) ) {
-        // using auto_ptr ensures deletion of the persistent object
+        // using unique_ptr ensures deletion of the persistent object
         std::unique_ptr< LArCaliWaveSubset_p2 > col_vect( poolReadObject< LArCaliWaveSubset_p2 >() );
         log << MSG::DEBUG << "READING LArCaliWaveSubset_p2" << endmsg; 
 		LArCaliWaveTransType* transObj = TPconverter2.createTransient( col_vect.get(), log );
@@ -44,7 +44,7 @@ LArCaliWaveContainerCnv::createTransient ()
         return transObj;
     }    
 	else if( compareClassGuid(p1_guid) ) {
-        // using auto_ptr ensures deletion of the persistent object
+        // using unique_ptr ensures deletion of the persistent object
         std::unique_ptr< LArCaliWaveSubset_p1 > col_vect( poolReadObject< LArCaliWaveSubset_p1 >() );
         log << MSG::DEBUG << "READING LArCaliWaveSubset_p1" << endmsg; 
 		LArCaliWaveTransType* transObj = TPconverter1.createTransient( col_vect.get(), log );
diff --git a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArDSPThresholdsCompleteCnv.cxx b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArDSPThresholdsCompleteCnv.cxx
index 5ae031f9e5e51c91aaa4e2b1b4a88e7593361910..33f64661f6dd3d6109299570c6453799b487964e 100644
--- a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArDSPThresholdsCompleteCnv.cxx
+++ b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArDSPThresholdsCompleteCnv.cxx
@@ -26,7 +26,7 @@ LArConditionsSubset<LArDSPThresholdsP>*
 LArDSPThresholdsCompleteCnv::createTransient () {
     static pool::Guid   p0_guid("09607438-09CC-4E40-A1E2-23F0B021DF3D");
     if( compareClassGuid(p0_guid) ) {
-        // using auto_ptr ensures deletion of the persistent object
+        // using unique_ptr ensures deletion of the persistent object
         std::unique_ptr< LArDSPThresholdsSubset_p1 > col_vect( poolReadObject< LArDSPThresholdsSubset_p1 >() );
         MsgStream log(msgSvc(), "LArDSPThresholdsCompleteCnv" ); 
         //log << MSG::INFO << "Reading LArDSPThresholdsSubset_p1" << endmsg; 
diff --git a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArMphysOverMcalCompleteCnv.cxx b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArMphysOverMcalCompleteCnv.cxx
index 9a09236e7e2e1d0ef48c0d25347ad7174068f281..7065882ba4dc87e7e756654f5b04e80d16f057dc 100644
--- a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArMphysOverMcalCompleteCnv.cxx
+++ b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArMphysOverMcalCompleteCnv.cxx
@@ -25,7 +25,7 @@ LArMphysOverMcalCompleteCnv::createTransient ()
   if (p) 
     return p;
   else if( compareClassGuid(p1_guid) ) {
-    // using auto_ptr ensures deletion of the persistent object
+    // using unique_ptr ensures deletion of the persistent object
     std::unique_ptr< LArMphysOverMcalSubset_p1 > col_vect( poolReadObject< LArMphysOverMcalSubset_p1 >() );
     MsgStream log(msgSvc(), "LArMphysOverMcalCompleteCnv" ); 
     //log << MSG::INFO << "Reading LArMphysOverMcalSubset_p1" << endmsg; 
diff --git a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArMphysOverMcalMCCnv.cxx b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArMphysOverMcalMCCnv.cxx
index dfd101d91bcc12271006c09688388b42e4db18f9..c74eab59f10a0446fbb0ca6c784b9e8737e65962 100644
--- a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArMphysOverMcalMCCnv.cxx
+++ b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArMphysOverMcalMCCnv.cxx
@@ -25,7 +25,7 @@ LArMphysOverMcalMCCnv::createTransient ()
   if (p) 
     return p;
   else if( compareClassGuid(p1_guid) ) {
-    // using auto_ptr ensures deletion of the persistent object
+    // using unique_ptr ensures deletion of the persistent object
     std::unique_ptr< LArMphysOverMcalSubset_p1 > col_vect( poolReadObject< LArMphysOverMcalSubset_p1 >() );
     MsgStream log(msgSvc(), "LArMphysOverMcalMCCnv" ); 
     //log << MSG::INFO << "Reading LArMphysOverMcalSubset_p1" << endmsg; 
diff --git a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArOFCBinCompleteCnv.cxx b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArOFCBinCompleteCnv.cxx
index d0830192cd5b2f4bcfa278a50f0e312f23b6d2da..470ef99fc28325e9d2fb923332702fdcf08f0456 100644
--- a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArOFCBinCompleteCnv.cxx
+++ b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArOFCBinCompleteCnv.cxx
@@ -21,7 +21,7 @@ LArOFCBinPersType* LArOFCBinCompleteCnv::createPersistent (LArOFCBinTransType* t
 LArOFCBinTransType* LArOFCBinCompleteCnv::createTransient () {
   static pool::Guid p1_guid("E7E2E993-4AF2-4782-9B8B-7668434CBAEC");
   if( compareClassGuid(p1_guid) ) {
-    // using auto_ptr ensures deletion of the persistent object
+    // using unique_ptr ensures deletion of the persistent object
     std::unique_ptr<LArOFCBinPersType> col_vect( poolReadObject<LArOFCBinPersType>() );
     MsgStream log(msgSvc(), "LArOFCBinCompleteCnv" ); 
     //log << MSG::INFO << "Reading LArOFCBinSubset_p1" << endmsg; 
diff --git a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArOFCCompleteCnv.cxx b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArOFCCompleteCnv.cxx
index beda74b599d5dd0a22687d7fc985d1291631a38e..3bee7f5c7bba8f9eec3386e4fa1ec02ed85bf6c9 100755
--- a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArOFCCompleteCnv.cxx
+++ b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArOFCCompleteCnv.cxx
@@ -29,7 +29,7 @@ LArOFCCompleteCnv::createTransient () {
     static pool::Guid   p0_guid("3E5389EF-D163-4099-91D9-D3F0EE06C1CD");
 
     if( compareClassGuid(p1_guid) ) {
-        // using auto_ptr ensures deletion of the persistent object
+        // using unique_ptr ensures deletion of the persistent object
         std::unique_ptr< LArOFCSubset_p1 > col_vect( poolReadObject< LArOFCSubset_p1 >() );
         MsgStream log(msgSvc(), "LArOFCCompleteCnv" ); 
         //log << MSG::INFO << "Reading LArOFCSubset_p1" << endmsg; 
diff --git a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArPedestalCompleteCnv.cxx b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArPedestalCompleteCnv.cxx
index 99c3145c8df336c0408972791f5c9747882fab12..3d76300f171d5b1da3c6167421c212cc6caf94b5 100755
--- a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArPedestalCompleteCnv.cxx
+++ b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArPedestalCompleteCnv.cxx
@@ -31,14 +31,14 @@ LArPedestalCompleteCnv::createTransient ()
     static pool::Guid   p0_guid("E17191DD-4C0A-4B1A-AE49-7D587C6BE3EE");
 
     if (compareClassGuid(p2_guid)) {
-      // using auto_ptr ensures deletion of the persistent object
+      // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< LArPedestalSubset_p2 > col_vect( poolReadObject< LArPedestalSubset_p2 >() );
       MsgStream log(msgSvc(), "LArPedestalCompleteCnv" ); 
       //log << MSG::INFO << "Reading LArPedestalSubset_p1" << endmsg; 
       return TPconverter2.createTransient( col_vect.get(), log );
     }
     else if( compareClassGuid(p1_guid) ) {
-        // using auto_ptr ensures deletion of the persistent object
+        // using unique_ptr ensures deletion of the persistent object
         std::unique_ptr< LArPedestalSubset_p1 > col_vect( poolReadObject< LArPedestalSubset_p1 >() );
         MsgStream log(msgSvc(), "LArPedestalCompleteCnv" ); 
         //log << MSG::INFO << "Reading LArPedestalSubset_p1" << endmsg; 
diff --git a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArPedestalMCCnv.cxx b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArPedestalMCCnv.cxx
index 0625543c13ff621fc9210945c9c183ed7351b993..4629f6d3b44a8f2c56a3162b48c4480da0d552f6 100644
--- a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArPedestalMCCnv.cxx
+++ b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArPedestalMCCnv.cxx
@@ -30,7 +30,7 @@ LArPedestalMCCnv::createTransient ()
     static pool::Guid   p1_guid("3891D5E0-82D1-45AB-97B1-CE4CF25D6E16");
     static pool::Guid   p0_guid("C147EFC8-5283-4DAE-AD20-0E2CB79E54B6");
     if( compareClassGuid(p1_guid) ) {
-        // using auto_ptr ensures deletion of the persistent object
+        // using unique_ptr ensures deletion of the persistent object
         std::unique_ptr< LArPedestalMC_p1 > col_vect( poolReadObject< LArPedestalMC_p1 >() );
         MsgStream log(msgSvc(), "LArPedestalMCCnv" ); 
         //log << MSG::INFO << "Reading LArPedestalMC_p1" << endmsg; 
diff --git a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArPhysWaveContainerCnv.cxx b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArPhysWaveContainerCnv.cxx
index 2e8afdc5473ddaebace2ff302be6329e76d1b714..8e8f1d93f67a573890af13fd2e6c0d4278ca0cb9 100644
--- a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArPhysWaveContainerCnv.cxx
+++ b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArPhysWaveContainerCnv.cxx
@@ -32,7 +32,7 @@ LArPhysWaveContainerCnv::createTransient ()
     static pool::Guid   p1_guid("87E436E2-6FF4-42D3-BC70-6650C076E589");
 	static pool::Guid   p0_guid("C1108D27-6D30-41E8-892D-2AB127B868C9");
 	if( compareClassGuid(p1_guid) ) {
-        // using auto_ptr ensures deletion of the persistent object
+        // using unique_ptr ensures deletion of the persistent object
         std::unique_ptr< LArPhysWaveSubset_p1 > col_vect( poolReadObject< LArPhysWaveSubset_p1 >() );
         log << MSG::DEBUG << "READING LArPhysWaveSubset_p1" << endmsg; 
 		LArPhysWaveTransType* transObj = TPconverter1.createTransient( col_vect.get(), log );
diff --git a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArRampCompleteCnv.cxx b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArRampCompleteCnv.cxx
index 235cf0b1eb9011a52b30964a61a9d84c598eb751..053856099354826d94aeabc1fceeb20a6153a69a 100755
--- a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArRampCompleteCnv.cxx
+++ b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArRampCompleteCnv.cxx
@@ -29,7 +29,7 @@ LArRampCompleteCnv::createTransient ()
     static pool::Guid   p1_guid("BB629283-BDF5-4FA8-93F4-5D8C2F201364");
     static pool::Guid   p0_guid("4019776D-D528-4401-9CBD-7956C4B00607");
     if( compareClassGuid(p1_guid) ) {
-        // using auto_ptr ensures deletion of the persistent object
+        // using unique_ptr ensures deletion of the persistent object
         std::unique_ptr< LArRampSubset_p1 > col_vect( poolReadObject< LArRampSubset_p1 >() );
         MsgStream log(msgSvc(), "LArRampCompleteCnv" ); 
         //log << MSG::INFO << "Reading LArRampSubset_p1" << endmsg; 
diff --git a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArRampMCCnv.cxx b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArRampMCCnv.cxx
index 197958dd0370c28780c6bfc39e3eb3e0505b49d3..d3208b88615df376ac0e09d3307955b5d4caf1ef 100755
--- a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArRampMCCnv.cxx
+++ b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArRampMCCnv.cxx
@@ -30,7 +30,7 @@ LArRampMCCnv::createTransient ()
     static pool::Guid   p1_guid("BB629283-BDF5-4FA8-93F4-5D8C2F201364");
     static pool::Guid   p0_guid("4019776D-D528-4401-9CBD-7956C4B00607");
     if( compareClassGuid(p1_guid) ) {
-        // using auto_ptr ensures deletion of the persistent object
+        // using unique_ptr ensures deletion of the persistent object
         std::unique_ptr< LArRampSubset_p1 > col_vect( poolReadObject< LArRampSubset_p1 >() );
         MsgStream log(msgSvc(), "LArRampMCCnv" ); 
         //log << MSG::INFO << "Reading LArRampSubset_p1" << endmsg; 
diff --git a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArShape32MCCnv.cxx b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArShape32MCCnv.cxx
index f8a550e49a109315507dce278bf8050d73a0dcbe..c212fba61a178d54d54b0de1ef4d7a2fef6045aa 100755
--- a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArShape32MCCnv.cxx
+++ b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArShape32MCCnv.cxx
@@ -52,7 +52,7 @@ LArShape32MCCnv::createTransient ()
     static pool::Guid   p0_guid("055CF2F5-08D0-4EAA-B154-8CE5B1A599E7");
     MsgStream log(msgSvc(), "LArShape32MCCnv" ); 
     if( compareClassGuid(p1_guid) ) {  
-        // using auto_ptr ensures deletion of the persistent object
+        // using unique_ptr ensures deletion of the persistent object
         std::unique_ptr< LArShapeSubset_p1 > col_vect( poolReadObject< LArShapeSubset_p1 >() );
         //
         log << MSG::DEBUG << "Reading LArShapeSubset_p1" << endmsg; 
diff --git a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArShapeCompleteCnv.cxx b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArShapeCompleteCnv.cxx
index 42e63138863864de6e72be6c59979a7f7491ad4b..c8542f19dedb80e5653cacb6f499d649d08524f5 100755
--- a/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArShapeCompleteCnv.cxx
+++ b/LArCalorimeter/LArCnv/LArCondAthenaPool/src/LArShapeCompleteCnv.cxx
@@ -57,19 +57,9 @@ LArShapeCompleteCnv::createTransient ()
   } 
   else if( compareClassGuid(p1_guid) ) {  
     log << MSG::ERROR << "Sorry if you really want to read LArShapeSubset_p1 you will need to provide a legacy converter" << endmsg;
-    // using auto_ptr ensures deletion of the persistent object
-    //std::auto_ptr< LArShapeSubset_p1 > col_vect( poolReadObject< LArShapeSubset_p1 >() );
-    //log << MSG::DEBUG << "Reading LArShapeSubset_p1" << endmsg; 
-    //return TPconverter1.createTransient( col_vect.get(), log );
   }
   else if( compareClassGuid(p0_guid) ) {
     log << MSG::ERROR << "Sorry if you really want to read the very old LArShapeSubset you will need to provide a legacy converter" << endmsg;
-    // subset from before TP separation
-    //log << MSG::DEBUG << "Reading LArShapeSubset (original)" << endmsg; 
-    //std::auto_ptr< LArConditionsSubset<LArShapeP> > subset ( poolReadObject< LArConditionsSubset<LArShapeP> >() );
-    // Here we must convert from LArShapeP to LArShapeP1
-    //log << MSG::VERBOSE << "subset ptr " << subset.get() << endmsg; 
-    //return (createTransient(subset.get()));
   } 
   throw std::runtime_error("Unsupported persistent version of LArShapeCompleteCnv");
 }
diff --git a/LArCalorimeter/LArConfiguration/python/LArMonitoringConfig.py b/LArCalorimeter/LArConfiguration/python/LArMonitoringConfig.py
index c477905c4d334d205e3155114e688d4fb423726e..f4ae4b2a6325b701f7e88db2b29f858ec99dcaca 100644
--- a/LArCalorimeter/LArConfiguration/python/LArMonitoringConfig.py
+++ b/LArCalorimeter/LArConfiguration/python/LArMonitoringConfig.py
@@ -23,6 +23,8 @@ def LArMonitoringConfig(inputFlags):
 
     # algos which can run in ESD but not AOD:
     if inputFlags.DQ.Environment != 'AOD':
+        from LumiBlockComps.BunchCrossingCondAlgConfig import BunchCrossingCondAlgCfg
+        acc.merge(BunchCrossingCondAlgCfg(inputFlags))
         acc.merge(LArCollisionTimeMonConfig(inputFlags))
 
     # and others on RAW data only
diff --git a/LArCalorimeter/LArMonitoring/python/LArCollisionTimeMonAlg.py b/LArCalorimeter/LArMonitoring/python/LArCollisionTimeMonAlg.py
index fb8c06d31ed3bc09048ccceedd39bd7206e0c1ef..b1528cf2a8d5aa1981d051ca268ba841f082bd5b 100644
--- a/LArCalorimeter/LArMonitoring/python/LArCollisionTimeMonAlg.py
+++ b/LArCalorimeter/LArMonitoring/python/LArCollisionTimeMonAlg.py
@@ -39,10 +39,6 @@ def LArCollisionTimeMonConfigCore(helper, algoinstance,inputFlags):
     timeUnit = Units.picosecond
     larCollTimeMonAlg.TimeUnit = timeUnit
 
-    from TrigBunchCrossingTool.BunchCrossingTool import BunchCrossingTool
-    larCollTimeMonAlg.BunchCrossingTool = BunchCrossingTool()
-
-
     collTimeGroup = helper.addGroup(
         larCollTimeMonAlg,
         collTimeGroupName,
@@ -257,6 +253,9 @@ if __name__=='__main__':
     cfg.merge(LArCollisionTimeCfg(ConfigFlags))
     cfg.getEventAlgo("LArCollisionTimeAlg").cutIteration=False
 
+    from LumiBlockComps.BunchCrossingCondAlgConfig import BunchCrossingCondAlgCfg
+    cfg.merge(BunchCrossingCondAlgCfg(ConfigFlags))
+
     import AthenaCommon.SystemOfUnits as Units
     collmon=LArCollisionTimeMonConfig(ConfigFlags)
     collmon.getEventAlgo("larCollTimeMonAlg").timeDiffCut=5.0*Units.nanosecond
diff --git a/LArCalorimeter/LArMonitoring/share/LArMonitoring_jobOption.py b/LArCalorimeter/LArMonitoring/share/LArMonitoring_jobOption.py
index 83d460188ae2e704c90e76990aecb7b85b521579..44223f9c775ad97b0aa884d8f6a8a83dae17d998 100644
--- a/LArCalorimeter/LArMonitoring/share/LArMonitoring_jobOption.py
+++ b/LArCalorimeter/LArMonitoring/share/LArMonitoring_jobOption.py
@@ -6,6 +6,8 @@ from AthenaMonitoring.DQMonFlags import DQMonFlags
 
 #Add colltime algo to sequence
 
+from LumiBlockComps.BunchCrossingCondAlgDefault import BunchCrossingCondAlgDefault
+BunchCrossingCondAlgDefault()
 from LArMonitoring.LArCollisionTimeMonAlg import LArCollisionTimeMonConfigOld
 topSequence +=LArCollisionTimeMonConfigOld(DQMonFlags)
 
diff --git a/LArCalorimeter/LArMonitoring/src/LArCollisionTimeMonAlg.cxx b/LArCalorimeter/LArMonitoring/src/LArCollisionTimeMonAlg.cxx
index f0776f9f3ea1099fc82bfb0858875cc70666441e..dcbf1671d13e0f0fb016bc4340df945bc81f684f 100755
--- a/LArCalorimeter/LArMonitoring/src/LArCollisionTimeMonAlg.cxx
+++ b/LArCalorimeter/LArMonitoring/src/LArCollisionTimeMonAlg.cxx
@@ -18,10 +18,6 @@
 
 #include "LArCollisionTimeMonAlg.h"
 
-
-#include "TrigAnalysisInterfaces/IBunchCrossingTool.h"
-
-
 using namespace std;
 
 
@@ -30,10 +26,7 @@ using namespace std;
 /*---------------------------------------------------------*/
 LArCollisionTimeMonAlg::LArCollisionTimeMonAlg( const std::string& name, ISvcLocator* pSvcLocator )
   : AthMonitorAlgorithm(name,pSvcLocator)
-  , m_bunchCrossingTool("Trig::TrigConfBunchCrossingTool/BunchCrossingTool")
-{
-   declareProperty("BunchCrossingTool",m_bunchCrossingTool);
-}
+{}
 
 /*---------------------------------------------------------*/
 LArCollisionTimeMonAlg::~LArCollisionTimeMonAlg()
@@ -45,7 +38,7 @@ LArCollisionTimeMonAlg::initialize() {
 
   //init handlers
   ATH_CHECK( m_LArCollisionTimeKey.initialize() );
-
+  ATH_CHECK( m_bunchCrossingKey.initialize());
   return AthMonitorAlgorithm::initialize();
 }
 
@@ -83,13 +76,20 @@ LArCollisionTimeMonAlg::fillHistograms( const EventContext& ctx ) const
   // luminosity block number
   lumi_block = event_info->lumiBlock();
 
+  SG::ReadCondHandle<BunchCrossingCondData> bcidHdl(m_bunchCrossingKey,ctx);
+  if (!bcidHdl.isValid()) {
+     ATH_MSG_WARNING( "Unable to retrieve BunchCrossing conditions object" );
+     return StatusCode::SUCCESS;
+  }
+  const BunchCrossingCondData* bcData=*bcidHdl;
 
-  if(m_bunchCrossingTool->bcType(bunch_crossing_id) == Trig::IBunchCrossingTool::Empty) {
+  if (!bcData->isFilled(bunch_crossing_id)) {
     ATH_MSG_INFO("BCID: "<<bunch_crossing_id<<" empty ? not filling the coll. time" );
     return StatusCode::SUCCESS; // not filling anything in empty bunches
   }
   
-  int bcid_distance = m_bunchCrossingTool->distanceFromFront(bunch_crossing_id, Trig::IBunchCrossingTool::BunchCrossings);
+  const int bcid_distance = bcData->distanceFromFront(bunch_crossing_id, BunchCrossingCondData::BunchCrossings);
+//m_bunchCrossingTool->distanceFromFront(bunch_crossing_id, Trig::IBunchCrossingTool::BunchCrossings);
   ATH_MSG_DEBUG("BCID distance: "<<bcid_distance );
 
   // Retrieve LArCollision Timing information
diff --git a/LArCalorimeter/LArMonitoring/src/LArCollisionTimeMonAlg.h b/LArCalorimeter/LArMonitoring/src/LArCollisionTimeMonAlg.h
index 1e276371bbcf392bbba83a2ed20673fa653b4916..93639beae827dfce8a6268989de44471c0781af7 100755
--- a/LArCalorimeter/LArMonitoring/src/LArCollisionTimeMonAlg.h
+++ b/LArCalorimeter/LArMonitoring/src/LArCollisionTimeMonAlg.h
@@ -17,15 +17,12 @@
 #include "StoreGate/ReadHandleKey.h"
 #include "LArRecEvent/LArCollisionTime.h"
 #include "GaudiKernel/SystemOfUnits.h"
+#include "LumiBlockData/BunchCrossingCondData.h"
 
 #include <string>
 #include <vector>
 
 
-namespace Trig {
-class IBunchCrossingTool;
-}
-
 
 class LArCollisionTimeMonAlg: public AthMonitorAlgorithm
 {
@@ -62,8 +59,7 @@ class LArCollisionTimeMonAlg: public AthMonitorAlgorithm
   //containers' handles
   SG::ReadHandleKey<LArCollisionTime> m_LArCollisionTimeKey{this, "Key", "LArCollisionTime", "Key for the LArCollisionTime data"};
 
-  //tools handles
-  ToolHandle<Trig::IBunchCrossingTool> m_bunchCrossingTool;
+  SG::ReadCondHandleKey<BunchCrossingCondData> m_bunchCrossingKey{this, "BunchCrossingKey", "BunchCrossingData", "Key BunchCrossing CDO" };
 
 };
 
diff --git a/LumiBlock/LumiBlockComps/CMakeLists.txt b/LumiBlock/LumiBlockComps/CMakeLists.txt
index 5973e8c3ae7acb2b0a6bd3275c16608dac131b30..331f60a56d46c9f1b1addeea392d9cd440ebdb74 100644
--- a/LumiBlock/LumiBlockComps/CMakeLists.txt
+++ b/LumiBlock/LumiBlockComps/CMakeLists.txt
@@ -54,7 +54,7 @@ if( NOT XAOD_ANALYSIS )
 endif()
 atlas_add_library( LumiBlockCompsLib
    LumiBlockComps/*.h src/*.h Root/*.cxx
-   src/CreateLumiBlockCollectionFromFile.cxx src/ILumiCalcSvc.cxx src/xAOD2NtupLumiSvc.cxx
+   src/CreateLumiBlockCollectionFromFile.cxx src/xAOD2NtupLumiSvc.cxx
    ${extra_srcs}
    PUBLIC_HEADERS LumiBlockComps
    INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
diff --git a/MuonSpectrometer/MuonSimEvent/MuonSimEvent/MMSimHit.h b/MuonSpectrometer/MuonSimEvent/MuonSimEvent/MMSimHit.h
index 80d37ae3b694c446c9c9c2530d2176de17168a0d..0f1ac2e2fd78181db0c01ab9495a3413a1e8880d 100644
--- a/MuonSpectrometer/MuonSimEvent/MuonSimEvent/MMSimHit.h
+++ b/MuonSpectrometer/MuonSimEvent/MuonSimEvent/MMSimHit.h
@@ -1,9 +1,9 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MUONSIMEVENT_MMSimHit_H
-#define MUONSIMEVENT_MMSimHit_H 1
+#define MUONSIMEVENT_MMSimHit_H
 
 #include "GeoPrimitives/GeoPrimitives.h"
 #include "GeneratorObjects/HepMcParticleLink.h"
@@ -21,14 +21,10 @@ class MMSimHit {
   MMSimHit();
 
   // Destructor:
-  virtual ~MMSimHit();
+  virtual ~MMSimHit()=default;
    MMSimHit(HitID id, double time, const Amg::Vector3D& position, const int particleEncoding, const double kineticEnergy, const Amg::Vector3D& direction, const double depositEnergy, const int trackNumber);
       MMSimHit(HitID id, double time, const Amg::Vector3D& position, const int particleEncoding, const double kineticEnergy, const Amg::Vector3D& direction, const double depositEnergy, const HepMcParticleLink hmpl);
- 
-  //
-  // member functions
-  //
-  
+
   //postStep globalTime
   double  globalTime()    const { return (double) m_globalTime; }
   
@@ -86,4 +82,4 @@ inline double MMSimHit::meanTime() const
 inline float hitTime(const MMSimHit& hit)
 { return (float) hit.meanTime(); }	
 
-#endif
+#endif // MUONSIMEVENT_MMSimHit_H
diff --git a/MuonSpectrometer/MuonSimEvent/MuonSimEvent/MuonSimEventDict.h b/MuonSpectrometer/MuonSimEvent/MuonSimEvent/MuonSimEventDict.h
index e7173c51d30b5c9d9755c6fe5def28e6a30b11d8..4b5407c10169b1fa24ca44353aea4e33744cd2b5 100644
--- a/MuonSpectrometer/MuonSimEvent/MuonSimEvent/MuonSimEventDict.h
+++ b/MuonSpectrometer/MuonSimEvent/MuonSimEvent/MuonSimEventDict.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MUONSIMEVENT_MUONSIMEVENTDICT_H
@@ -9,7 +9,8 @@
 #include "MuonSimEvent/MDTSimHitCollection.h"
 #include "MuonSimEvent/RPCSimHitCollection.h"
 #include "MuonSimEvent/TGCSimHitCollection.h"
-#include "MuonSimEvent/GenericMuonSimHitCollection.h"
 #include "MuonSimEvent/sTGCSimHitCollection.h"
+#include "MuonSimEvent/MMSimHitCollection.h"
+#include "MuonSimEvent/GenericMuonSimHitCollection.h"
 
 #endif
diff --git a/MuonSpectrometer/MuonSimEvent/src/MMSimHit.cxx b/MuonSpectrometer/MuonSimEvent/src/MMSimHit.cxx
index b8b7df50120933a9071a4450e6c87c0fb53204c0..6983019c2550f2350c86013ae7a7a7be41f52025 100644
--- a/MuonSpectrometer/MuonSimEvent/src/MMSimHit.cxx
+++ b/MuonSpectrometer/MuonSimEvent/src/MMSimHit.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "MuonSimEvent/MMSimHit.h"
@@ -15,11 +15,6 @@ MMSimHit::MMSimHit():
 {
 }
 /*******************************************************************************/
-//virtual destructor required by Pool
-MMSimHit::~MMSimHit()
-{
-}
-/*******************************************************************************/
 MMSimHit::MMSimHit(HitID id, double time, 
                                      const Amg::Vector3D& position,
                                      const int particleEncoding,
diff --git a/MuonSpectrometer/MuonSimEvent/src/MuonSimEventDict_dict_fix.old b/MuonSpectrometer/MuonSimEvent/src/MuonSimEventDict_dict_fix.old
deleted file mode 100644
index 341a9ac3d51a0e839b782cb42b80209328af2524..0000000000000000000000000000000000000000
--- a/MuonSpectrometer/MuonSimEvent/src/MuonSimEventDict_dict_fix.old
+++ /dev/null
@@ -1,939 +0,0 @@
-// Generated at Mon Aug 15 18:21:39 2005. Do not modify it
-
-#ifdef _WIN32
-#pragma warning ( disable : 4786 )
-#ifndef LCGDICT_STRING 
-#include <string> // Included here since it is sensitive to private->public trick
-#endif
-#endif
-#define private public
-#define protected public
-#include "../MuonSimEvent/MuonSimEventDict.h"
-#undef private
-#undef protected
-#include "ReflectionBuilder/ReflectionBuilder.h"
-#include "ReflectionBuilder/CollectionProxy.h"
-#include <typeinfo>
-using namespace seal::reflect;
-
-//------Dictionary for class TGCSimHit -------------------------------
-class TGCSimHit_dict { 
-  public:
-  TGCSimHit_dict();
-  static void* constructor_2268( void*, const std::vector<void*>& );
-  static void* constructor_2269( void* );
-  static void  destructor( void* o ) { ((TGCSimHit*)o)->~TGCSimHit(); }
-  static void* constructor_2271( void*, const std::vector<void*>& );
-  static void* constructor_2272( void*, const std::vector<void*>& );
-  static void* method_2273( void* );
-  static void* method_2274( void* );
-  static void* method_2275( void* );
-  static void* method_2276( void* );
-  static void* method_2277( void* );
-  static void* operator_2278( void*, const std::vector<void*>& );
-  static void* method_2279( void* );
-  static void* method_2280( void* );
-  static void* method_2281( void* );
-  static void* method_2282( void* );
-};
-TGCSimHit_dict::TGCSimHit_dict() {
-  ClassBuilder _c_("TGCSimHit", "", typeid(TGCSimHit), sizeof(TGCSimHit),std::vector<const std::type_info*>(), false, NOCONTAINER, 0, PUBLIC | VIRTUAL);
-  _c_.addField("m_TGCid", "int", "", (size_t)(&((TGCSimHit*)64)->m_TGCid)-64, PRIVATE );
-  _c_.addField("m_globalTime", "float", "", (size_t)(&((TGCSimHit*)64)->m_globalTime)-64, PRIVATE );
-  _c_.addField("m_localPosition", "Hep3Vector", "", (size_t)(&((TGCSimHit*)64)->m_localPosition)-64, PRIVATE );
-  _c_.addField("m_localDireCos", "Hep3Vector", "", (size_t)(&((TGCSimHit*)64)->m_localDireCos)-64, PRIVATE );
-  _c_.addField("m_partLink", "HepMcParticleLink", "", (size_t)(&((TGCSimHit*)64)->m_partLink)-64, PRIVATE );
-  _c_.addMethod("TGCSimHit", "", "TGCSimHit", "TGCSimHit&", constructor_2268, PUBLIC);
-  _c_.addMethod("TGCSimHit", "", "TGCSimHit", constructor_2269, PUBLIC);
-  _c_.addMethod("~TGCSimHit", "", destructor, PUBLIC | VIRTUAL);
-  _c_.addMethod("TGCSimHit", "", "TGCSimHit", "int; double; CLHEP::Hep3Vector&; CLHEP::Hep3Vector&", constructor_2271, PUBLIC);
-  _c_.addMethod("TGCSimHit", "", "TGCSimHit", "int; double; CLHEP::Hep3Vector&; CLHEP::Hep3Vector&; int", constructor_2272, PUBLIC);
-  _c_.addMethod("globalTime", "", "double", method_2273, PUBLIC);
-  _c_.addMethod("localPosition", "", "CLHEP::Hep3Vector&", method_2274, PUBLIC);
-  _c_.addMethod("localDireCos", "", "CLHEP::Hep3Vector&", method_2275, PUBLIC);
-  _c_.addMethod("TGCid", "", "int", method_2276, PUBLIC);
-  _c_.addMethod("print", "", "std::basic_string<char>", method_2277, PUBLIC);
-  _c_.addMethod("<", "", "bool", "TGCSimHit&", operator_2278, PUBLIC);
-  _c_.addMethod("meanTime", "", "double", method_2279, PUBLIC);
-  _c_.addMethod("trackNumber", "", "int", method_2280, PUBLIC);
-  _c_.addMethod("particleLink", "", "HepMcParticleLink&", method_2281, PUBLIC);
-  _c_.addMethod("setGlobalTime", "" , "" , "double" , method_2282, PUBLIC);
-  _c_.build();
-}
-
-//------Stub functions for class TGCSimHit -------------------------------
-void* TGCSimHit_dict::constructor_2268( void* mem, const std::vector<void*>& arg) {
-  return ::new(mem) TGCSimHit(*(const TGCSimHit*)arg[0]);
-}
-
-void* TGCSimHit_dict::constructor_2269( void* mem) {
-  return ::new(mem) TGCSimHit();
-}
-
-void* TGCSimHit_dict::constructor_2271( void* mem, const std::vector<void*>& arg) {
-  return ::new(mem) TGCSimHit(*(int*)arg[0],
-                              *(double*)arg[1],
-                              *(const CLHEP::Hep3Vector*)arg[2],
-                              *(const CLHEP::Hep3Vector*)arg[3]);
-}
-
-void* TGCSimHit_dict::constructor_2272( void* mem, const std::vector<void*>& arg) {
-  return ::new(mem) TGCSimHit(*(int*)arg[0],
-                              *(double*)arg[1],
-                              *(const CLHEP::Hep3Vector*)arg[2],
-                              *(const CLHEP::Hep3Vector*)arg[3],
-                              *(const int*)arg[4]);
-}
-
-void* TGCSimHit_dict::method_2273( void* o)
-{
-  static double ret;
-  ret = ((const TGCSimHit*)o)->globalTime();
-  return &ret;
-}
-
-void* TGCSimHit_dict::method_2274( void* o)
-{
-  return (void*)&((const TGCSimHit*)o)->localPosition();
-}
-
-void* TGCSimHit_dict::method_2275( void* o)
-{
-  return (void*)&((const TGCSimHit*)o)->localDireCos();
-}
-
-void* TGCSimHit_dict::method_2276( void* o)
-{
-  static int ret;
-  ret = ((const TGCSimHit*)o)->TGCid();
-  return &ret;
-}
-
-void* TGCSimHit_dict::method_2277( void* o)
-{
-  return new std::basic_string<char>(((const TGCSimHit*)o)->print());
-}
-
-void* TGCSimHit_dict::operator_2278( void* o, const std::vector<void*>& arg)
-{
-  static bool ret;
-  ret = ((const TGCSimHit*)o)->operator <(*(const TGCSimHit*)arg[0]);
-  return &ret;
-}
-
-void* TGCSimHit_dict::method_2279( void* o)
-{
-  static double ret;
-  ret = ((const TGCSimHit*)o)->meanTime();
-  return &ret;
-}
-
-void* TGCSimHit_dict::method_2280( void* o)
-{
-  static int ret;
-  ret = ((const TGCSimHit*)o)->trackNumber();
-  return &ret;
-}
-
-void* TGCSimHit_dict::method_2281( void* o)
-{
-  return (void*)&((const TGCSimHit*)o)->particleLink();
-}
-
-void* TGCSimHit_dict::method_2282( void* o)
-{
-  return (void*)&((const TGCSimHit*)o)->setGlobalTime(*(double*)arg[0]);
-}
-
-//------Dictionary for class RPCSimHit -------------------------------
-class RPCSimHit_dict { 
-  public:
-  RPCSimHit_dict();
-  static void* constructor_2320( void*, const std::vector<void*>& );
-  static void* constructor_2321( void* );
-  static void  destructor( void* o ) { ((RPCSimHit*)o)->~RPCSimHit(); }
-  static void* constructor_2323( void*, const std::vector<void*>& );
-  static void* constructor_2324( void*, const std::vector<void*>& );
-  static void* method_2325( void* );
-  static void* method_2326( void* );
-  static void* method_2327( void* );
-  static void* method_2328( void* );
-  static void* operator_2329( void*, const std::vector<void*>& );
-  static void* method_2330( void* );
-  static void* method_2331( void* );
-  static void* method_2332( void* );
-  static void* method_2333( void* );
-};
-RPCSimHit_dict::RPCSimHit_dict() {
-  ClassBuilder _c_("RPCSimHit", "", typeid(RPCSimHit), sizeof(RPCSimHit),std::vector<const std::type_info*>(), false, NOCONTAINER, 0, PUBLIC | VIRTUAL);
-  _c_.addField("m_RPCid", "int", "", (size_t)(&((RPCSimHit*)64)->m_RPCid)-64, PRIVATE );
-  _c_.addField("m_globalTime", "float", "", (size_t)(&((RPCSimHit*)64)->m_globalTime)-64, PRIVATE );
-  _c_.addField("m_localPosition", "Hep3Vector", "", (size_t)(&((RPCSimHit*)64)->m_localPosition)-64, PRIVATE );
-  _c_.addField("m_partLink", "HepMcParticleLink", "", (size_t)(&((RPCSimHit*)64)->m_partLink)-64, PRIVATE );
-  _c_.addMethod("RPCSimHit", "", "RPCSimHit", "RPCSimHit&", constructor_2320, PUBLIC);
-  _c_.addMethod("RPCSimHit", "", "RPCSimHit", constructor_2321, PUBLIC);
-  _c_.addMethod("~RPCSimHit", "", destructor, PUBLIC | VIRTUAL);
-  _c_.addMethod("RPCSimHit", "", "RPCSimHit", "int; double; CLHEP::Hep3Vector&", constructor_2323, PUBLIC);
-  _c_.addMethod("RPCSimHit", "", "RPCSimHit", "int; double; CLHEP::Hep3Vector&; int", constructor_2324, PUBLIC);
-  _c_.addMethod("globalTime", "", "double", method_2325, PUBLIC);
-  _c_.addMethod("localPosition", "", "CLHEP::Hep3Vector&", method_2326, PUBLIC);
-  _c_.addMethod("RPCid", "", "int", method_2327, PUBLIC);
-  _c_.addMethod("print", "", "std::basic_string<char>", method_2328, PUBLIC);
-  _c_.addMethod("<", "", "bool", "RPCSimHit&", operator_2329, PUBLIC);
-  _c_.addMethod("meanTime", "", "double", method_2330, PUBLIC);
-  _c_.addMethod("trackNumber", "", "int", method_2331, PUBLIC);
-  _c_.addMethod("particleLink", "", "HepMcParticleLink&", method_2332, PUBLIC);
-  _c_.addMethod("setGlobalTime", "" , "" , "double" , method_2333, PUBLIC);
-  _c_.build();
-}
-
-//------Stub functions for class RPCSimHit -------------------------------
-void* RPCSimHit_dict::constructor_2320( void* mem, const std::vector<void*>& arg) {
-  return ::new(mem) RPCSimHit(*(const RPCSimHit*)arg[0]);
-}
-
-void* RPCSimHit_dict::constructor_2321( void* mem) {
-  return ::new(mem) RPCSimHit();
-}
-
-void* RPCSimHit_dict::constructor_2323( void* mem, const std::vector<void*>& arg) {
-  return ::new(mem) RPCSimHit(*(int*)arg[0],
-                              *(double*)arg[1],
-                              *(const CLHEP::Hep3Vector*)arg[2]);
-}
-
-void* RPCSimHit_dict::constructor_2324( void* mem, const std::vector<void*>& arg) {
-  return ::new(mem) RPCSimHit(*(int*)arg[0],
-                              *(double*)arg[1],
-                              *(const CLHEP::Hep3Vector*)arg[2],
-                              *(const int*)arg[3]);
-}
-
-void* RPCSimHit_dict::method_2325( void* o)
-{
-  static double ret;
-  ret = ((const RPCSimHit*)o)->globalTime();
-  return &ret;
-}
-
-void* RPCSimHit_dict::method_2326( void* o)
-{
-  return (void*)&((const RPCSimHit*)o)->localPosition();
-}
-
-void* RPCSimHit_dict::method_2327( void* o)
-{
-  static int ret;
-  ret = ((const RPCSimHit*)o)->RPCid();
-  return &ret;
-}
-
-void* RPCSimHit_dict::method_2328( void* o)
-{
-  return new std::basic_string<char>(((const RPCSimHit*)o)->print());
-}
-
-void* RPCSimHit_dict::operator_2329( void* o, const std::vector<void*>& arg)
-{
-  static bool ret;
-  ret = ((const RPCSimHit*)o)->operator <(*(const RPCSimHit*)arg[0]);
-  return &ret;
-}
-
-void* RPCSimHit_dict::method_2330( void* o)
-{
-  static double ret;
-  ret = ((const RPCSimHit*)o)->meanTime();
-  return &ret;
-}
-
-void* RPCSimHit_dict::method_2331( void* o)
-{
-  static int ret;
-  ret = ((const RPCSimHit*)o)->trackNumber();
-  return &ret;
-}
-
-void* RPCSimHit_dict::method_2332( void* o)
-{
-  return (void*)&((const RPCSimHit*)o)->particleLink();
-}
-
-void* RPCSimHit_dict::method_2333( void* o)
-{
-  return (void*)&((const RPCSimHit*)o)->setGlobalTime(*(double*)arg[0]);
-}
-
-//------Dictionary for class MDTSimHit -------------------------------
-class MDTSimHit_dict { 
-  public:
-  MDTSimHit_dict();
-  static void* constructor_2372( void*, const std::vector<void*>& );
-  static void* constructor_2373( void* );
-  static void  destructor( void* o ) { ((MDTSimHit*)o)->~MDTSimHit(); }
-  static void* constructor_2375( void*, const std::vector<void*>& );
-  static void* constructor_2376( void*, const std::vector<void*>& );
-  static void* method_2377( void* );
-  static void* method_2378( void* );
-  static void* method_2379( void* );
-  static void* method_2380( void* );
-  static void* method_2381( void* );
-  static void* operator_2382( void*, const std::vector<void*>& );
-  static void* method_2383( void* );
-  static void* method_2384( void* );
-  static void* method_2385( void* );
-  static void* method_2386( void* );
-};
-MDTSimHit_dict::MDTSimHit_dict() {
-  ClassBuilder _c_("MDTSimHit", "", typeid(MDTSimHit), sizeof(MDTSimHit),std::vector<const std::type_info*>(), false, NOCONTAINER, 0, PUBLIC | VIRTUAL);
-  _c_.addField("m_MDTid", "int", "", (size_t)(&((MDTSimHit*)64)->m_MDTid)-64, PRIVATE );
-  _c_.addField("m_globalTime", "float", "", (size_t)(&((MDTSimHit*)64)->m_globalTime)-64, PRIVATE );
-  _c_.addField("m_driftRadius", "float", "", (size_t)(&((MDTSimHit*)64)->m_driftRadius)-64, PRIVATE );
-  _c_.addField("m_localPosition", "Hep3Vector", "", (size_t)(&((MDTSimHit*)64)->m_localPosition)-64, PRIVATE );
-  _c_.addField("m_partLink", "HepMcParticleLink", "", (size_t)(&((MDTSimHit*)64)->m_partLink)-64, PRIVATE );
-  _c_.addMethod("MDTSimHit", "", "MDTSimHit", "MDTSimHit&", constructor_2372, PUBLIC);
-  _c_.addMethod("MDTSimHit", "", "MDTSimHit", constructor_2373, PUBLIC);
-  _c_.addMethod("~MDTSimHit", "", destructor, PUBLIC | VIRTUAL);
-  _c_.addMethod("MDTSimHit", "", "MDTSimHit", "int; double; double; CLHEP::Hep3Vector&", constructor_2375, PUBLIC);
-  _c_.addMethod("MDTSimHit", "", "MDTSimHit", "int; double; double; CLHEP::Hep3Vector&; int", constructor_2376, PUBLIC);
-  _c_.addMethod("globalTime", "", "double", method_2377, PUBLIC);
-  _c_.addMethod("driftRadius", "", "double", method_2378, PUBLIC);
-  _c_.addMethod("localPosition", "", "CLHEP::Hep3Vector&", method_2379, PUBLIC);
-  _c_.addMethod("MDTid", "", "int", method_2380, PUBLIC);
-  _c_.addMethod("print", "", "std::basic_string<char>", method_2381, PUBLIC);
-  _c_.addMethod("<", "", "bool", "MDTSimHit&", operator_2382, PUBLIC);
-  _c_.addMethod("meanTime", "", "double", method_2383, PUBLIC);
-  _c_.addMethod("trackNumber", "", "int", method_2384, PUBLIC);
-  _c_.addMethod("particleLink", "", "HepMcParticleLink&", method_2385, PUBLIC);
-  _c_.addMethod("setGlobalTime", "" , "" , "double" , method_2386, PUBLIC);
-  _c_.build();
-}
-
-//------Stub functions for class MDTSimHit -------------------------------
-void* MDTSimHit_dict::constructor_2372( void* mem, const std::vector<void*>& arg) {
-  return ::new(mem) MDTSimHit(*(const MDTSimHit*)arg[0]);
-}
-
-void* MDTSimHit_dict::constructor_2373( void* mem) {
-  return ::new(mem) MDTSimHit();
-}
-
-void* MDTSimHit_dict::constructor_2375( void* mem, const std::vector<void*>& arg) {
-  return ::new(mem) MDTSimHit(*(int*)arg[0],
-                              *(double*)arg[1],
-                              *(double*)arg[2],
-                              *(const CLHEP::Hep3Vector*)arg[3]);
-}
-
-void* MDTSimHit_dict::constructor_2376( void* mem, const std::vector<void*>& arg) {
-  return ::new(mem) MDTSimHit(*(int*)arg[0],
-                              *(double*)arg[1],
-                              *(double*)arg[2],
-                              *(const CLHEP::Hep3Vector*)arg[3],
-                              *(const int*)arg[4]);
-}
-
-void* MDTSimHit_dict::method_2377( void* o)
-{
-  static double ret;
-  ret = ((const MDTSimHit*)o)->globalTime();
-  return &ret;
-}
-
-void* MDTSimHit_dict::method_2378( void* o)
-{
-  static double ret;
-  ret = ((const MDTSimHit*)o)->driftRadius();
-  return &ret;
-}
-
-void* MDTSimHit_dict::method_2379( void* o)
-{
-  return (void*)&((const MDTSimHit*)o)->localPosition();
-}
-
-void* MDTSimHit_dict::method_2380( void* o)
-{
-  static int ret;
-  ret = ((const MDTSimHit*)o)->MDTid();
-  return &ret;
-}
-
-void* MDTSimHit_dict::method_2381( void* o)
-{
-  return new std::basic_string<char>(((const MDTSimHit*)o)->print());
-}
-
-void* MDTSimHit_dict::operator_2382( void* o, const std::vector<void*>& arg)
-{
-  static bool ret;
-  ret = ((const MDTSimHit*)o)->operator <(*(const MDTSimHit*)arg[0]);
-  return &ret;
-}
-
-void* MDTSimHit_dict::method_2383( void* o)
-{
-  static double ret;
-  ret = ((const MDTSimHit*)o)->meanTime();
-  return &ret;
-}
-
-void* MDTSimHit_dict::method_2384( void* o)
-{
-  static int ret;
-  ret = ((const MDTSimHit*)o)->trackNumber();
-  return &ret;
-}
-
-void* MDTSimHit_dict::method_2385( void* o)
-{
-  return (void*)&((const MDTSimHit*)o)->particleLink();
-}
-
-void* MDTSimHit_dict::method_2385( void* o)
-{
-  return (void*)&((const MDTSimHit*)o)->setGlobalTime(*(double*)arg[0]);
-}
-
-//------Dictionary for class CSCSimHit -------------------------------
-class CSCSimHit_dict { 
-  public:
-  CSCSimHit_dict();
-  static void* constructor_2508( void*, const std::vector<void*>& );
-  static void* constructor_2509( void* );
-  static void  destructor( void* o ) { ((CSCSimHit*)o)->~CSCSimHit(); }
-  static void* constructor_2511( void*, const std::vector<void*>& );
-  static void* constructor_2512( void*, const std::vector<void*>& );
-  static void* method_2513( void* );
-  static void* method_2514( void* );
-  static void* method_2515( void* );
-  static void* method_2516( void* );
-  static void* method_2517( void* );
-  static void* method_2518( void* );
-  static void* method_2519( void* );
-  static void* operator_2520( void*, const std::vector<void*>& );
-  static void* method_2521( void* );
-  static void* method_2522( void* );
-  static void* method_2523( void* );
-  static void* method_2524( void* );
-};
-CSCSimHit_dict::CSCSimHit_dict() {
-  ClassBuilder _c_("CSCSimHit", "", typeid(CSCSimHit), sizeof(CSCSimHit),std::vector<const std::type_info*>(), false, NOCONTAINER, 0, PUBLIC | VIRTUAL);
-  _c_.addField("m_CSCid", "int", "", (size_t)(&((CSCSimHit*)64)->m_CSCid)-64, PRIVATE );
-  _c_.addField("m_globalTime", "float", "", (size_t)(&((CSCSimHit*)64)->m_globalTime)-64, PRIVATE );
-  _c_.addField("m_energyDeposit", "float", "", (size_t)(&((CSCSimHit*)64)->m_energyDeposit)-64, PRIVATE );
-  _c_.addField("m_hitStart", "Hep3Vector", "", (size_t)(&((CSCSimHit*)64)->m_hitStart)-64, PRIVATE );
-  _c_.addField("m_hitEnd", "Hep3Vector", "", (size_t)(&((CSCSimHit*)64)->m_hitEnd)-64, PRIVATE );
-  _c_.addField("m_particleID", "int", "", (size_t)(&((CSCSimHit*)64)->m_particleID)-64, PRIVATE );
-  _c_.addField("m_partLink", "HepMcParticleLink", "", (size_t)(&((CSCSimHit*)64)->m_partLink)-64, PRIVATE );
-  _c_.addMethod("CSCSimHit", "", "CSCSimHit", "CSCSimHit&", constructor_2508, PUBLIC);
-  _c_.addMethod("CSCSimHit", "", "CSCSimHit", constructor_2509, PUBLIC);
-  _c_.addMethod("~CSCSimHit", "", destructor, PUBLIC | VIRTUAL);
-  _c_.addMethod("CSCSimHit", "", "CSCSimHit", "int; double; double; CLHEP::Hep3Vector&; CLHEP::Hep3Vector&; int", constructor_2511, PUBLIC);
-  _c_.addMethod("CSCSimHit", "", "CSCSimHit", "int; double; double; CLHEP::Hep3Vector&; CLHEP::Hep3Vector&; int; int", constructor_2512, PUBLIC);
-  _c_.addMethod("globalTime", "", "double", method_2513, PUBLIC);
-  _c_.addMethod("energyDeposit", "", "double", method_2514, PUBLIC);
-  _c_.addMethod("getHitStart", "", "CLHEP::Hep3Vector&", method_2515, PUBLIC);
-  _c_.addMethod("getHitEnd", "", "CLHEP::Hep3Vector&", method_2516, PUBLIC);
-  _c_.addMethod("particleID", "", "int", method_2517, PUBLIC);
-  _c_.addMethod("CSCid", "", "int", method_2518, PUBLIC);
-  _c_.addMethod("print", "", "std::basic_string<char>", method_2519, PUBLIC);
-  _c_.addMethod("<", "", "bool", "CSCSimHit&", operator_2520, PUBLIC);
-  _c_.addMethod("meanTime", "", "double", method_2521, PUBLIC);
-  _c_.addMethod("trackNumber", "", "int", method_2522, PUBLIC);
-  _c_.addMethod("particleLink", "", "HepMcParticleLink&", method_2523, PUBLIC);
-  _c_.addMethod("setGlobalTime", "" , "" , "double" , method_2524, PUBLIC);
-  _c_.build();
-}
-
-//------Stub functions for class CSCSimHit -------------------------------
-void* CSCSimHit_dict::constructor_2508( void* mem, const std::vector<void*>& arg) {
-  return ::new(mem) CSCSimHit(*(const CSCSimHit*)arg[0]);
-}
-
-void* CSCSimHit_dict::constructor_2509( void* mem) {
-  return ::new(mem) CSCSimHit();
-}
-
-void* CSCSimHit_dict::constructor_2511( void* mem, const std::vector<void*>& arg) {
-  return ::new(mem) CSCSimHit(*(int*)arg[0],
-                              *(double*)arg[1],
-                              *(double*)arg[2],
-                              *(const CLHEP::Hep3Vector*)arg[3],
-                              *(const CLHEP::Hep3Vector*)arg[4],
-                              *(int*)arg[5]);
-}
-
-void* CSCSimHit_dict::constructor_2512( void* mem, const std::vector<void*>& arg) {
-  return ::new(mem) CSCSimHit(*(int*)arg[0],
-                              *(double*)arg[1],
-                              *(double*)arg[2],
-                              *(const CLHEP::Hep3Vector*)arg[3],
-                              *(const CLHEP::Hep3Vector*)arg[4],
-                              *(int*)arg[5],
-                              *(const int*)arg[6]);
-}
-
-void* CSCSimHit_dict::method_2513( void* o)
-{
-  static double ret;
-  ret = ((const CSCSimHit*)o)->globalTime();
-  return &ret;
-}
-
-void* CSCSimHit_dict::method_2514( void* o)
-{
-  static double ret;
-  ret = ((const CSCSimHit*)o)->energyDeposit();
-  return &ret;
-}
-
-void* CSCSimHit_dict::method_2515( void* o)
-{
-  return (void*)&((const CSCSimHit*)o)->getHitStart();
-}
-
-void* CSCSimHit_dict::method_2516( void* o)
-{
-  return (void*)&((const CSCSimHit*)o)->getHitEnd();
-}
-
-void* CSCSimHit_dict::method_2517( void* o)
-{
-  static int ret;
-  ret = ((const CSCSimHit*)o)->particleID();
-  return &ret;
-}
-
-void* CSCSimHit_dict::method_2518( void* o)
-{
-  static int ret;
-  ret = ((const CSCSimHit*)o)->CSCid();
-  return &ret;
-}
-
-void* CSCSimHit_dict::method_2519( void* o)
-{
-  return new std::basic_string<char>(((const CSCSimHit*)o)->print());
-}
-
-void* CSCSimHit_dict::operator_2520( void* o, const std::vector<void*>& arg)
-{
-  static bool ret;
-  ret = ((const CSCSimHit*)o)->operator <(*(const CSCSimHit*)arg[0]);
-  return &ret;
-}
-
-void* CSCSimHit_dict::method_2521( void* o)
-{
-  static double ret;
-  ret = ((const CSCSimHit*)o)->meanTime();
-  return &ret;
-}
-
-void* CSCSimHit_dict::method_2522( void* o)
-{
-  static int ret;
-  ret = ((const CSCSimHit*)o)->trackNumber();
-  return &ret;
-}
-
-void* CSCSimHit_dict::method_2523( void* o)
-{
-  return (void*)&((const CSCSimHit*)o)->particleLink();
-}
-
-void* CSCSimHit_dict::method_2524( void* o)
-{
-  return (void*)&((const CSCSimHit*)o)->setGlobalTime(*(double*)arg[0]);
-}
-
-//------Dictionary for class vector<RPCSimHit*,std::allocator<RPCSimHit*> > -------------------------------
-class std__vector_RPCSimHitp__dict { 
-  public:
-  std__vector_RPCSimHitp__dict();
-  static int tobase_4657(void*);
-  static void* method_4674( void* );
-  static void* method_4677( void* );
-  static void* method_4678( void* );
-  static void* method_4679( void* );
-  static void* method_4680( void* );
-  static void* method_4685( void* );
-  static void* method_4686( void* );
-  static void* method_4687( void* );
-  static void* method_4688( void* );
-  static void* operator_4689( void*, const std::vector<void*>& );
-  static void* operator_4690( void*, const std::vector<void*>& );
-  static void  method_4691( void*, const std::vector<void*>& );
-  static void* method_4692( void*, const std::vector<void*>& );
-  static void* method_4693( void*, const std::vector<void*>& );
-  static void* constructor_4694( void*, const std::vector<void*>& );
-  static void* constructor_4695( void*, const std::vector<void*>& );
-  static void* constructor_4696( void*, const std::vector<void*>& );
-  static void* constructor_4697( void*, const std::vector<void*>& );
-  static void  destructor( void* o ) { ((std::vector<RPCSimHit*>*)o)->~vector(); }
-  static void* operator_4699( void*, const std::vector<void*>& );
-  static void  method_4700( void*, const std::vector<void*>& );
-  static void  method_4701( void*, const std::vector<void*>& );
-  static void  method_4702( void*, const std::vector<void*>& );
-  static void* method_4703( void* );
-  static void* method_4704( void* );
-  static void* method_4705( void* );
-  static void* method_4706( void* );
-  static void  method_4707( void*, const std::vector<void*>& );
-  static void  method_4708( void*, const std::vector<void*>& );
-  static void* method_4709( void*, const std::vector<void*>& );
-//  static void* method_4710( void*, const std::vector<void*>& );
-  static void  method_4711( void*, const std::vector<void*>& );
-  static void  method_4712( void*, const std::vector<void*>& );
-  static void  method_4713( void* );
-  static void* method_4714( void*, const std::vector<void*>& );
-  static void* method_4715( void*, const std::vector<void*>& );
-  static void  method_4716( void*, const std::vector<void*>& );
-  static void  method_4717( void*, const std::vector<void*>& );
-  static void  method_4718( void* );
-  static void* constructor_x9( void* );
-  static void* method_x11( void*, const std::vector<void*>& ); 
-  static void* method_x12( void*, const std::vector<void*>& ); 
-  static void* method_x13( void*, const std::vector<void*>& ); 
-};
-std__vector_RPCSimHitp__dict::std__vector_RPCSimHitp__dict() {
-  ClassBuilder _c_("std::vector<RPCSimHit*>", "", typeid(std::vector<RPCSimHit*>), sizeof(std::vector<RPCSimHit*>),std::vector<const std::type_info*>(), false, VECTOR, 0, PUBLIC);
-  _c_.addSuperClass("std::_Vector_base<RPCSimHit*,std::allocator<RPCSimHit*> >", 0, tobase_4657);
-  _c_.addMethod("get_allocator", "", "std::allocator<RPCSimHit*>", method_4674, PUBLIC);
-  _c_.addMethod("begin", "", "__gnu_cxx::__normal_iterator<RPCSimHit**,std::vector<RPCSimHit*> >", method_4677, PUBLIC);
-  _c_.addMethod("begin", "", "__gnu_cxx::__normal_iterator<RPCSimHit* const*,std::vector<RPCSimHit*> >", method_4678, PUBLIC);
-  _c_.addMethod("end", "", "__gnu_cxx::__normal_iterator<RPCSimHit**,std::vector<RPCSimHit*> >", method_4679, PUBLIC);
-  _c_.addMethod("end", "", "__gnu_cxx::__normal_iterator<RPCSimHit* const*,std::vector<RPCSimHit*> >", method_4680, PUBLIC);
-  _c_.addMethod("size", "", "unsigned int", method_4685, PUBLIC);
-  _c_.addMethod("max_size", "", "unsigned int", method_4686, PUBLIC);
-  _c_.addMethod("capacity", "", "unsigned int", method_4687, PUBLIC);
-  _c_.addMethod("empty", "", "bool", method_4688, PUBLIC);
-  _c_.addMethod("[]", "", "RPCSimHit*&", "unsigned int", operator_4689, PUBLIC);
-  _c_.addMethod("[]", "", "RPCSimHit*&", "unsigned int", operator_4690, PUBLIC);
-  _c_.addMethod("_M_range_check", "", "unsigned int", method_4691, PUBLIC);
-  _c_.addMethod("at", "", "RPCSimHit*&", "unsigned int", method_4692, PUBLIC);
-  _c_.addMethod("at", "", "RPCSimHit*&", "unsigned int", method_4693, PUBLIC);
-  _c_.addMethod("vector", "", "std::vector<RPCSimHit*>", "std::allocator<RPCSimHit*>&=", constructor_4694, PUBLIC);
-  _c_.addMethod("vector", "", "std::vector<RPCSimHit*>", "unsigned int; RPCSimHit*&; std::allocator<RPCSimHit*>&=", constructor_4695, PUBLIC);
-  _c_.addMethod("vector", "", "std::vector<RPCSimHit*>", "unsigned int", constructor_4696, PUBLIC);
-  _c_.addMethod("vector", "", "std::vector<RPCSimHit*>", "std::vector<RPCSimHit*>&", constructor_4697, PUBLIC);
-  _c_.addMethod("~vector", "", destructor, PUBLIC);
-  _c_.addMethod("=", "", "std::vector<RPCSimHit*>&", "std::vector<RPCSimHit*>&", operator_4699, PUBLIC);
-  _c_.addMethod("reserve", "", "unsigned int", method_4700, PUBLIC);
-  _c_.addMethod("assign", "", "unsigned int; RPCSimHit*&", method_4701, PUBLIC);
-  _c_.addMethod("_M_fill_assign", "", "unsigned int; RPCSimHit*&", method_4702, PUBLIC);
-  _c_.addMethod("front", "", "RPCSimHit*&", method_4703, PUBLIC);
-  _c_.addMethod("front", "", "RPCSimHit*&", method_4704, PUBLIC);
-  _c_.addMethod("back", "", "RPCSimHit*&", method_4705, PUBLIC);
-  _c_.addMethod("back", "", "RPCSimHit*&", method_4706, PUBLIC);
-  _c_.addMethod("push_back", "", "RPCSimHit*&", method_4707, PUBLIC);
-  _c_.addMethod("swap", "", "std::vector<RPCSimHit*>&", method_4708, PUBLIC);
-  _c_.addMethod("insert", "", "__gnu_cxx::__normal_iterator<RPCSimHit**,std::vector<RPCSimHit*> >", "__gnu_cxx::__normal_iterator<RPCSimHit**,std::vector<RPCSimHit*> >; RPCSimHit*&", method_4709, PUBLIC);
-//  _c_.addMethod("insert", "", "__gnu_cxx::__normal_iterator<RPCSimHit**,std::vector<RPCSimHit*> >", "__gnu_cxx::__normal_iterator<RPCSimHit**,std::vector<RPCSimHit*> >", method_4710, PUBLIC);
-  _c_.addMethod("insert", "", "__gnu_cxx::__normal_iterator<RPCSimHit**,std::vector<RPCSimHit*> >; unsigned int; RPCSimHit*&", method_4711, PUBLIC);
-  _c_.addMethod("_M_fill_insert", "", "__gnu_cxx::__normal_iterator<RPCSimHit**,std::vector<RPCSimHit*> >; unsigned int; RPCSimHit*&", method_4712, PUBLIC);
-  _c_.addMethod("pop_back", "", method_4713, PUBLIC);
-  _c_.addMethod("erase", "", "__gnu_cxx::__normal_iterator<RPCSimHit**,std::vector<RPCSimHit*> >", "__gnu_cxx::__normal_iterator<RPCSimHit**,std::vector<RPCSimHit*> >", method_4714, PUBLIC);
-  _c_.addMethod("erase", "", "__gnu_cxx::__normal_iterator<RPCSimHit**,std::vector<RPCSimHit*> >", "__gnu_cxx::__normal_iterator<RPCSimHit**,std::vector<RPCSimHit*> >; __gnu_cxx::__normal_iterator<RPCSimHit**,std::vector<RPCSimHit*> >", method_4715, PUBLIC);
-  _c_.addMethod("resize", "", "unsigned int; RPCSimHit*&", method_4716, PUBLIC);
-  _c_.addMethod("resize", "", "unsigned int", method_4717, PUBLIC);
-  _c_.addMethod("clear", "", method_4718, PUBLIC);
-  _c_.addMethod("vector", "", "std::vector<RPCSimHit*>", constructor_x9, PUBLIC);
-  _c_.addMethod("writeData", "", "void*", "std::vector<void*>", method_x11);
-  _c_.addMethod("readData", "", "void*", "std::vector<void*>", method_x12);
-  _c_.addMethod("createCollFuncTable", "", "void*", "std::vector<void*>", method_x13);
-  _c_.build();
-}
-
-int std__vector_RPCSimHitp__dict::tobase_4657( void* o ) {
-  return (size_t)(std::_Vector_base<RPCSimHit*,std::allocator<RPCSimHit*> >*)(std::vector<RPCSimHit*>*)o - (size_t)(std::vector<RPCSimHit*>*)o;
-}
-
-//------Stub functions for class vector<RPCSimHit*,std::allocator<RPCSimHit*> > -------------------------------
-void* std__vector_RPCSimHitp__dict::method_4674( void* o)
-{
-  return new std::allocator<RPCSimHit*>(((const std::vector<RPCSimHit*>*)o)->get_allocator());
-}
-
-void* std__vector_RPCSimHitp__dict::method_4677( void* o)
-{
-  return new __gnu_cxx::__normal_iterator<RPCSimHit**,std::vector<RPCSimHit*> >(((std::vector<RPCSimHit*>*)o)->begin());
-}
-
-void* std__vector_RPCSimHitp__dict::method_4678( void* o)
-{
-  return new __gnu_cxx::__normal_iterator<RPCSimHit* const*,std::vector<RPCSimHit*> >(((const std::vector<RPCSimHit*>*)o)->begin());
-}
-
-void* std__vector_RPCSimHitp__dict::method_4679( void* o)
-{
-  return new __gnu_cxx::__normal_iterator<RPCSimHit**,std::vector<RPCSimHit*> >(((std::vector<RPCSimHit*>*)o)->end());
-}
-
-void* std__vector_RPCSimHitp__dict::method_4680( void* o)
-{
-  return new __gnu_cxx::__normal_iterator<RPCSimHit* const*,std::vector<RPCSimHit*> >(((const std::vector<RPCSimHit*>*)o)->end());
-}
-
-void* std__vector_RPCSimHitp__dict::method_4685( void* o)
-{
-  static unsigned int ret;
-  ret = ((const std::vector<RPCSimHit*>*)o)->size();
-  return &ret;
-}
-
-void* std__vector_RPCSimHitp__dict::method_4686( void* o)
-{
-  static unsigned int ret;
-  ret = ((const std::vector<RPCSimHit*>*)o)->max_size();
-  return &ret;
-}
-
-void* std__vector_RPCSimHitp__dict::method_4687( void* o)
-{
-  static unsigned int ret;
-  ret = ((const std::vector<RPCSimHit*>*)o)->capacity();
-  return &ret;
-}
-
-void* std__vector_RPCSimHitp__dict::method_4688( void* o)
-{
-  static bool ret;
-  ret = ((const std::vector<RPCSimHit*>*)o)->empty();
-  return &ret;
-}
-
-void* std__vector_RPCSimHitp__dict::operator_4689( void* o, const std::vector<void*>& arg)
-{
-  return (void*)&((std::vector<RPCSimHit*>*)o)->operator [](*(unsigned int*)arg[0]);
-}
-
-void* std__vector_RPCSimHitp__dict::operator_4690( void* o, const std::vector<void*>& arg)
-{
-  return (void*)&((const std::vector<RPCSimHit*>*)o)->operator [](*(unsigned int*)arg[0]);
-}
-
-void std__vector_RPCSimHitp__dict::method_4691( void* o, const std::vector<void*>& arg)
-{
-  ((const std::vector<RPCSimHit*>*)o)->_M_range_check(*(unsigned int*)arg[0]);
-}
-
-void* std__vector_RPCSimHitp__dict::method_4692( void* o, const std::vector<void*>& arg)
-{
-  return (void*)&((std::vector<RPCSimHit*>*)o)->at(*(unsigned int*)arg[0]);
-}
-
-void* std__vector_RPCSimHitp__dict::method_4693( void* o, const std::vector<void*>& arg)
-{
-  return (void*)&((const std::vector<RPCSimHit*>*)o)->at(*(unsigned int*)arg[0]);
-}
-
-void* std__vector_RPCSimHitp__dict::constructor_4694( void* mem, const std::vector<void*>& arg) {
-  if ( arg.size() == 0 ) {
-    return ::new(mem) std::vector<RPCSimHit*>();
-  }
-  else if ( arg.size() == 1 ) { 
-    return ::new(mem) std::vector<RPCSimHit*>(*(const std::allocator<RPCSimHit*>*)arg[0]);
-  }
-  return 0;
-}
-
-void* std__vector_RPCSimHitp__dict::constructor_4695( void* mem, const std::vector<void*>& arg) {
-  if ( arg.size() == 2 ) {
-    return ::new(mem) std::vector<RPCSimHit*>(*(unsigned int*)arg[0],
-                                            *(RPCSimHit* const*)arg[1]);
-  }
-  else if ( arg.size() == 3 ) { 
-    return ::new(mem) std::vector<RPCSimHit*>(*(unsigned int*)arg[0],
-                                            *(RPCSimHit* const*)arg[1],
-                                            *(const std::allocator<RPCSimHit*>*)arg[2]);
-  }
-  return 0;
-}
-
-void* std__vector_RPCSimHitp__dict::constructor_4696( void* mem, const std::vector<void*>& arg) {
-  return ::new(mem) std::vector<RPCSimHit*>(*(unsigned int*)arg[0]);
-}
-
-void* std__vector_RPCSimHitp__dict::constructor_4697( void* mem, const std::vector<void*>& arg) {
-  return ::new(mem) std::vector<RPCSimHit*>(*(const std::vector<RPCSimHit*>*)arg[0]);
-}
-
-void* std__vector_RPCSimHitp__dict::operator_4699( void* o, const std::vector<void*>& arg)
-{
-  return (void*)&((std::vector<RPCSimHit*>*)o)->operator =(*(const std::vector<RPCSimHit*>*)arg[0]);
-}
-
-void std__vector_RPCSimHitp__dict::method_4700( void* o, const std::vector<void*>& arg)
-{
-  ((std::vector<RPCSimHit*>*)o)->reserve(*(unsigned int*)arg[0]);
-}
-
-void std__vector_RPCSimHitp__dict::method_4701( void* o, const std::vector<void*>& arg)
-{
-  ((std::vector<RPCSimHit*>*)o)->assign(*(unsigned int*)arg[0],
-                                        *(RPCSimHit* const*)arg[1]);
-}
-
-void std__vector_RPCSimHitp__dict::method_4702( void* o, const std::vector<void*>& arg)
-{
-  ((std::vector<RPCSimHit*>*)o)->_M_fill_assign(*(unsigned int*)arg[0],
-                                                *(RPCSimHit* const*)arg[1]);
-}
-
-void* std__vector_RPCSimHitp__dict::method_4703( void* o)
-{
-  return (void*)&((std::vector<RPCSimHit*>*)o)->front();
-}
-
-void* std__vector_RPCSimHitp__dict::method_4704( void* o)
-{
-  return (void*)&((const std::vector<RPCSimHit*>*)o)->front();
-}
-
-void* std__vector_RPCSimHitp__dict::method_4705( void* o)
-{
-  return (void*)&((std::vector<RPCSimHit*>*)o)->back();
-}
-
-void* std__vector_RPCSimHitp__dict::method_4706( void* o)
-{
-  return (void*)&((const std::vector<RPCSimHit*>*)o)->back();
-}
-
-void std__vector_RPCSimHitp__dict::method_4707( void* o, const std::vector<void*>& arg)
-{
-  ((std::vector<RPCSimHit*>*)o)->push_back(*(RPCSimHit* const*)arg[0]);
-}
-
-void std__vector_RPCSimHitp__dict::method_4708( void* o, const std::vector<void*>& arg)
-{
-  ((std::vector<RPCSimHit*>*)o)->swap(*(std::vector<RPCSimHit*>*)arg[0]);
-}
-
-void* std__vector_RPCSimHitp__dict::method_4709( void* o, const std::vector<void*>& arg)
-{
-  return new __gnu_cxx::__normal_iterator<RPCSimHit**,std::vector<RPCSimHit*> >(((std::vector<RPCSimHit*>*)o)->insert(*(__gnu_cxx::__normal_iterator<RPCSimHit**,std::vector<RPCSimHit*> >*)arg[0],
-                                                                                                                      *(RPCSimHit* const*)arg[1]));
-}
-
-//void* std__vector_RPCSimHitp__dict::method_4710( void* o, const std::vector<void*>& arg)
-//{
-//  return new __gnu_cxx::__normal_iterator<RPCSimHit**,std::vector<RPCSimHit*> >(((std::vector<RPCSimHit*>*)o)->insert(*(__gnu_cxx::__normal_iterator<RPCSimHit**,std::vector<RPCSimHit*> >*)arg[0]));
-//}
-
-void std__vector_RPCSimHitp__dict::method_4711( void* o, const std::vector<void*>& arg)
-{
-  ((std::vector<RPCSimHit*>*)o)->insert(*(__gnu_cxx::__normal_iterator<RPCSimHit**,std::vector<RPCSimHit*> >*)arg[0],
-                                        *(unsigned int*)arg[1],
-                                        *(RPCSimHit* const*)arg[2]);
-}
-
-void std__vector_RPCSimHitp__dict::method_4712( void* o, const std::vector<void*>& arg)
-{
-  ((std::vector<RPCSimHit*>*)o)->_M_fill_insert(*(__gnu_cxx::__normal_iterator<RPCSimHit**,std::vector<RPCSimHit*> >*)arg[0],
-                                                *(unsigned int*)arg[1],
-                                                *(RPCSimHit* const*)arg[2]);
-}
-
-void std__vector_RPCSimHitp__dict::method_4713( void* o)
-{
-  ((std::vector<RPCSimHit*>*)o)->pop_back();
-}
-
-void* std__vector_RPCSimHitp__dict::method_4714( void* o, const std::vector<void*>& arg)
-{
-  return new __gnu_cxx::__normal_iterator<RPCSimHit**,std::vector<RPCSimHit*> >(((std::vector<RPCSimHit*>*)o)->erase(*(__gnu_cxx::__normal_iterator<RPCSimHit**,std::vector<RPCSimHit*> >*)arg[0]));
-}
-
-void* std__vector_RPCSimHitp__dict::method_4715( void* o, const std::vector<void*>& arg)
-{
-  return new __gnu_cxx::__normal_iterator<RPCSimHit**,std::vector<RPCSimHit*> >(((std::vector<RPCSimHit*>*)o)->erase(*(__gnu_cxx::__normal_iterator<RPCSimHit**,std::vector<RPCSimHit*> >*)arg[0],
-                                                                                                                     *(__gnu_cxx::__normal_iterator<RPCSimHit**,std::vector<RPCSimHit*> >*)arg[1]));
-}
-
-void std__vector_RPCSimHitp__dict::method_4716( void* o, const std::vector<void*>& arg)
-{
-  ((std::vector<RPCSimHit*>*)o)->resize(*(unsigned int*)arg[0],
-                                        *(RPCSimHit* const*)arg[1]);
-}
-
-void std__vector_RPCSimHitp__dict::method_4717( void* o, const std::vector<void*>& arg)
-{
-  ((std::vector<RPCSimHit*>*)o)->resize(*(unsigned int*)arg[0]);
-}
-
-void std__vector_RPCSimHitp__dict::method_4718( void* o)
-{
-  ((std::vector<RPCSimHit*>*)o)->clear();
-}
-
-void* std__vector_RPCSimHitp__dict::constructor_x9( void* mem) {
-  return ::new(mem) std::vector<RPCSimHit*>();
-}
-
-void* std__vector_RPCSimHitp__dict::method_x11( void* o, const std::vector<void*>& args)
-{
-  std::vector<RPCSimHit*>* v = (std::vector<RPCSimHit*>*)o;
-  size_t n = v->size();
-  ((void (*)(size_t&, const std::vector<void*>&))args[1])(n, args);
-  for(std::vector<RPCSimHit*>::iterator i = v->begin(); i != v->end(); i++) {
-    ((void (*)(const void*, const std::vector<void*>&))args[2])(&(*i), args);
-  }
-  return 0;
-}
-
-void* std__vector_RPCSimHitp__dict::method_x12( void* o, const std::vector<void*>& args)
-{
-  std::vector<RPCSimHit*>* v = (std::vector<RPCSimHit*>*)o;
-  size_t n = *(size_t*)args[1];
-  if (n > 0) {
-    v->resize(n);
-    for(size_t i = 0; i < n; i++) {
-      ((void (*)(const void*, const std::vector<void*>&))args[2])(&(*v)[i], args);
-    }
-  }
-  return 0;
-}
-
-void* std__vector_RPCSimHitp__dict::method_x13( void*, const std::vector<void*>&)
-{
-  return seal::reflect::Proxy<std::vector<RPCSimHit*> >::generate();
-}
-
-
-//---------  Bootstrap for building classes ------
-
-namespace {
-  struct Dictionaries {
-    Dictionaries() {
-      TGCSimHit_dict();
-      RPCSimHit_dict();
-      MDTSimHit_dict();
-      CSCSimHit_dict();
-      Class::resolvePending();
-    }
-  };
-  static Dictionaries instance;
-}
-
-//---------  Capabilities specification ------
-
-
-// This file has been generated by lcgdict with the --capabilities option
-static  const char* clnames[] = {
-//--Begin AtlasSealCLHEPDictFix
-    "LCGDict/TGCSimHit",
-    "LCGDict/RPCSimHit",
-    "LCGDict/MDTSimHit",
-    "LCGDict/CSCSimHit"
-//--End   AtlasSealCLHEPDict
-//--Final End
-};
-
-extern "C" void SEAL_CAPABILITIES (const char**& names, int& n )
-{ 
-  names = clnames;
-  n = sizeof(clnames)/sizeof(char*);
-}
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataMonAlg.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataMonAlg.cxx
index 4c022c8b368020ec7d7fa561281bb8dc12e96d56..7fddc04504fd79ded8974c749a845cd58e5b77a0 100755
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataMonAlg.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataMonAlg.cxx
@@ -838,7 +838,6 @@ StatusCode MdtRawDataMonAlg::fillMDTSummaryHistograms( const MDTSummaryHistogram
 	    auto sector = Monitored::Collection("sector",thisVects.sector);
 	    auto stationEta = Monitored::Collection("stEta_"+region[iregion]+"_"+layer[ilayer]+"_phi"+std::to_string(stationPhi+1), thisVects.stationEta); 
 	    
-	    const auto& tvec = std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>>{lb_mon, sector};
 	    fill("MdtMonitor", lb_mon, sector);
 	    
 	    auto adc_mon =  Monitored::Collection("adc_mon", thisVects.adc_mon); 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/util/OverlapRemovalTesterLegacy.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/util/OverlapRemovalTesterLegacy.cxx
index 05e42fd6dd671a39eff22feb8c65527b919aafcf..b25566654eeca23812d3ed501edbe25677ac3444 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/util/OverlapRemovalTesterLegacy.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/util/OverlapRemovalTesterLegacy.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 /// @file OverlapRemovalTesterLegacy.cxx
 /// @brief Contains RootCore testing code for the legacy OverlapRemovalTool.
@@ -151,7 +151,7 @@ int main( int argc, char* argv[] )
   // Open the input file
   const TString fileName = argv[ 1 ];
   Info(APP_NAME, "Opening file: %s", fileName.Data());
-  std::auto_ptr<TFile> ifile(TFile::Open(fileName, "READ"));
+  std::unique_ptr<TFile> ifile(TFile::Open(fileName, "READ"));
   CHECK( ifile.get() );
 
   // Create a TEvent object
diff --git a/PhysicsAnalysis/AnalysisCommon/CPAnalysisExamples/util/CPToolTester.cxx b/PhysicsAnalysis/AnalysisCommon/CPAnalysisExamples/util/CPToolTester.cxx
index 746999cd4faef796eb56fb623af081eac428f07e..9cdde840b0502493b0217d72386986ad79580fa0 100644
--- a/PhysicsAnalysis/AnalysisCommon/CPAnalysisExamples/util/CPToolTester.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/CPAnalysisExamples/util/CPToolTester.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // $Id: CPToolTester.cxx 300804 2014-06-04 16:49:29Z krasznaa $
@@ -52,7 +52,7 @@ int main( int argc, char* argv[] ) {
    // Open the input file:
    const TString fileName = argv[ 1 ];
    Info( APP_NAME, "Opening file: %s", fileName.Data() );
-   std::auto_ptr< TFile > ifile( TFile::Open( fileName, "READ" ) );
+   std::unique_ptr< TFile > ifile( TFile::Open( fileName, "READ" ) );
    CHECK( ifile.get() );
 
    // Create a TEvent object:
diff --git a/PhysicsAnalysis/AnalysisCommon/FsrUtils/util/FsrPhotonToolTester.cxx b/PhysicsAnalysis/AnalysisCommon/FsrUtils/util/FsrPhotonToolTester.cxx
index 142d93a9c3724e130b15eb50a09b674ce2e02fde..45a7fe314b552d294555cbc8c8f292503d22fc23 100644
--- a/PhysicsAnalysis/AnalysisCommon/FsrUtils/util/FsrPhotonToolTester.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/FsrUtils/util/FsrPhotonToolTester.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // ROOT include(s)
@@ -66,7 +66,7 @@ int main( int argc, char* argv[] )
    // Open the input file
    const TString fileName = argv[ 1 ];
    Info(APP_NAME, "Opening file: %s", fileName.Data());
-   std::auto_ptr<TFile> ifile(TFile::Open(fileName, "READ"));
+   std::unique_ptr<TFile> ifile(TFile::Open(fileName, "READ"));
    CHECK( ifile.get() );
 
    // Create a TEvent object
diff --git a/PhysicsAnalysis/AnalysisCommon/IsolationSelection/util/testIsolationCloseByCorrectionTool.cxx b/PhysicsAnalysis/AnalysisCommon/IsolationSelection/util/testIsolationCloseByCorrectionTool.cxx
index 74cfbaf738e2c3ed4c9527413c1c83b08489e7f2..bfbbaff4ebc7547888589da9d134df695c67d898 100644
--- a/PhysicsAnalysis/AnalysisCommon/IsolationSelection/util/testIsolationCloseByCorrectionTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/IsolationSelection/util/testIsolationCloseByCorrectionTool.cxx
@@ -1,5 +1,5 @@
 /*
- Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+ Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
  */
 
 #ifndef CPANALYSISEXAMPLES_ERRORCHECK_H
@@ -86,7 +86,7 @@ int main(int argc, char** argv) {
     }
 
     Info(APP_NAME, "Opening file: %s", fileName.Data());
-    std::auto_ptr<TFile> ifile(TFile::Open(fileName, "READ"));
+    std::unique_ptr<TFile> ifile(TFile::Open(fileName, "READ"));
     ifile.get();
     // Create a TEvent object:
     xAOD::TEvent event(xAOD::TEvent::kClassAccess);
diff --git a/PhysicsAnalysis/AnalysisCommon/IsolationSelection/util/testIsolationSelectionTool.cxx b/PhysicsAnalysis/AnalysisCommon/IsolationSelection/util/testIsolationSelectionTool.cxx
index 40344f5c5d3711fc989def9fdc7103c317ed535d..360a3d8432f8ff3f64729a8e9c14aafed4e60a84 100644
--- a/PhysicsAnalysis/AnalysisCommon/IsolationSelection/util/testIsolationSelectionTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/IsolationSelection/util/testIsolationSelectionTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // $Id: testIsolationSelectionTool.cxx 788099 2016-12-05 15:12:00Z dzhang $
@@ -68,7 +68,7 @@ int main( int argc, char* argv[] ) {
   // Open the input file:
   const TString fileName = argv[ 1 ];
   Info( APP_NAME, "Opening file: %s", fileName.Data() );
-  std::auto_ptr< TFile > ifile( TFile::Open( fileName, "READ" ) );
+  std::unique_ptr< TFile > ifile( TFile::Open( fileName, "READ" ) );
   CHECK( ifile.get() );
 
   // Create a TEvent object:
diff --git a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/CorrectionTool.icc b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/CorrectionTool.icc
index 4528e1909b09af051a9b086557956e6517541de0..45e5119a6cd43b17ac253879756029af475edf66 100644
--- a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/CorrectionTool.icc
+++ b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/CorrectionTool.icc
@@ -24,7 +24,7 @@ namespace CP {
 
       // Choose a smart pointer type according to the standard used:
 #if __cplusplus < 201100
-      std::auto_ptr< xAODObjectType > myobject( new xAODObjectType );
+      std::unique_ptr< xAODObjectType > myobject( new xAODObjectType );
 #else
       std::unique_ptr< xAODObjectType > myobject( new xAODObjectType );
 #endif // C++11
diff --git a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerEventAthenaPool/src/LVL1_ROICnv.cxx b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerEventAthenaPool/src/LVL1_ROICnv.cxx
index 5318e26999d696cce9e815352d83bcb2d179914f..3fe59c81b0d7e37c70f971f747890075a714cd55 100755
--- a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerEventAthenaPool/src/LVL1_ROICnv.cxx
+++ b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerEventAthenaPool/src/LVL1_ROICnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -26,7 +26,7 @@ LVL1_ROI* LVL1_ROICnv::createTransient() {
 
   if( this->compareClassGuid( p1_guid ) ) {
 
-    std::auto_ptr< LVL1_ROI_p1 > pers_ref( this->poolReadObject< LVL1_ROI_p1 >() );
+    std::unique_ptr< LVL1_ROI_p1 > pers_ref( this->poolReadObject< LVL1_ROI_p1 >() );
     MsgStream log( this->msgSvc(), "LVL1_ROICnv" );
     return TPConverter.createTransient( pers_ref.get(), log );
 
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/testEgChargeCorr.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/testEgChargeCorr.cxx
index 97927cfc19ff8166c6977be34f9c6dfe33079cdd..123a93c656d6f26d26196018bc85f420d91476a8 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/testEgChargeCorr.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/testEgChargeCorr.cxx
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
  */
 
 // System include(s):
@@ -60,7 +60,7 @@ int main( int argc, char* argv[] ) {
     const TString corrFileName = argv[ 2 ];
 
     Info( APP_NAME, "Opening file: %s", fileName.Data() );
-    std::auto_ptr< TFile > ifile( TFile::Open( fileName, "READ" ) );
+    std::unique_ptr< TFile > ifile( TFile::Open( fileName, "READ" ) );
     CHECK( ifile.get() );
 
     // Create a TEvent object:
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/testEgEfficiencyCorr.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/testEgEfficiencyCorr.cxx
index bfe01308e164669e561823f519f4de90ea4b72e9..eb09791da927f9aa8256b7b470449eed5927f9d0 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/testEgEfficiencyCorr.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/testEgEfficiencyCorr.cxx
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
  */
 
 // System include(s):
@@ -45,7 +45,7 @@ int main( int argc, char* argv[] ) {
     // Open the input file:
     const TString fileName = argv[ 1 ];
     MSG_INFO("Opening file: " << fileName.Data() );
-    std::auto_ptr< TFile > ifile( TFile::Open( fileName, "READ" ) );
+    std::unique_ptr< TFile > ifile( TFile::Open( fileName, "READ" ) );
     CHECK( ifile.get() );
 
     // Create a TEvent object:
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/testEgEfficiencyCorrFwd.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/testEgEfficiencyCorrFwd.cxx
index bde38008ed68888e5f54393e7de18ed6e5ae6866..2bbcc0f8c37f3c529eb7bf973d6d308469c86328 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/testEgEfficiencyCorrFwd.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/testEgEfficiencyCorrFwd.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // System include(s):
@@ -45,7 +45,7 @@ int main( int argc, char* argv[] ) {
   // Open the input file:
   const TString fileName = argv[ 1 ];
   MSG_INFO("Opening file: " << fileName.Data() );
-  std::auto_ptr< TFile > ifile( TFile::Open( fileName, "READ" ) );
+  std::unique_ptr< TFile > ifile( TFile::Open( fileName, "READ" ) );
   CHECK( ifile.get() );
 
   // Create a TEvent object:
diff --git a/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/util/TestIsolationCorrections.cxx b/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/util/TestIsolationCorrections.cxx
index bf7f79442b1fef715d7d6bf0b0bef5d257df4e03..68146fd7c66d6fbe7622111f4a2d0f266740fbc4 100644
--- a/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/util/TestIsolationCorrections.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/util/TestIsolationCorrections.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // System include(s):
@@ -60,7 +60,7 @@ int main( int argc, char* argv[] ) {
    // Open the input file:
    const TString fileName = argv[ 1 ];
    Info( APP_NAME, "Opening file: %s", fileName.Data() );
-   std::auto_ptr< TFile > ifile( TFile::Open( fileName, "READ" ) );
+   std::unique_ptr< TFile > ifile( TFile::Open( fileName, "READ" ) );
    CHECK( ifile.get() );
    
    // Create a TEvent object:
diff --git a/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/util/TestxAODPhotonAlg.cxx b/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/util/TestxAODPhotonAlg.cxx
index 06f8ddf3fb65377f7fbd41acb27999a1e15afe32..c6ec289bb52202890dcca1de06306dd2a4e4f58f 100644
--- a/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/util/TestxAODPhotonAlg.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/util/TestxAODPhotonAlg.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // System include(s):
@@ -60,7 +60,7 @@ int main( int argc, char* argv[] ) {
    // Open the input file:
    const TString fileName = argv[ 1 ];
    Info( APP_NAME, "Opening file: %s", fileName.Data() );
-   std::auto_ptr< TFile > ifile( TFile::Open( fileName, "READ" ) );
+   std::unique_ptr< TFile > ifile( TFile::Open( fileName, "READ" ) );
    CHECK( ifile.get() );
 
    // Create a TEvent object:
diff --git a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/CMakeLists.txt b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/CMakeLists.txt
index aca0a23453ad31c8997b7d81963e69ba59724330..eff8d7da7fc8d2bca63f23142e93b2ea4813b5a9 100644
--- a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/CMakeLists.txt
+++ b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/CMakeLists.txt
@@ -8,3 +8,19 @@ atlas_subdir( PyAnalysisUtils )
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
 
+atlas_add_test( flake8
+                SCRIPT flake8 --select=ATL,F,E7,E9,W6 ${CMAKE_CURRENT_SOURCE_DIR}/python
+                POST_EXEC_SCRIPT nopost.sh )
+
+atlas_add_test( root_pickle_test
+                SCRIPT python ${CMAKE_CURRENT_SOURCE_DIR}/test/root_pickle_t.py )
+
+atlas_add_test( pydraw_test
+                SCRIPT python ${CMAKE_CURRENT_SOURCE_DIR}/test/pydraw_t.py )
+
+atlas_add_test( interpolate_test
+                SCRIPT python -m PyAnalysisUtils.interpolate )
+
+atlas_add_test( combo_test
+                SCRIPT python -m PyAnalysisUtils.combo )
+
diff --git a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/PDG.py b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/PDG.py
index 0deb463cc6524da4164675b430fff83b93312422..0e85d739c0bdbfd30a6e7cafe074fab8c8751df2 100755
--- a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/PDG.py
+++ b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/PDG.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #
 # $Id: PDG.py,v 1.5 2009-01-26 03:05:43 ssnyder Exp $
@@ -7,6 +7,8 @@
 # Purpose: Define PDG ID codes.
 #
 
+from __future__ import print_function
+
 """
 This module contains names for the various PDG particle ID codes.
 The names are the same as in EventKernel/PdtPdg.h.
@@ -16,7 +18,6 @@ back to printable strings, and a function pdgid_to_name to do this
 conversion.  Similarly, root_names and pdgid_to_root_name translate to
 strings with root markup.
 """
-from __future__ import print_function
 
 # Table to translate from PDG IDs to printable strings.
 pdgid_names = {}
@@ -29,7 +30,8 @@ def pdgid_to_name (id):
     """Convert a PDG ID to a printable string.
     """
     name = pdgid_names.get(id)
-    if not name: name = repr(id)
+    if not name:
+        name = str(id)
     return name
 
 
@@ -37,7 +39,8 @@ def pdgid_to_root_name (id):
     """Convert a PDG ID to a string with root markup.
     """
     name = root_names.get(id)
-    if not name: name = repr(id)
+    if not name:
+        name = str(id)
     return name
 
 
@@ -604,17 +607,19 @@ def _fill_dicts():
     import string
     pdgid_names.clear()
     root_names.clear()
+    global _pdgtable
     for line in _pdgtable.split ('\n'):
         line = line.strip()
-        if len(line) == 0 or line[0] == '#': continue
+        if len(line) == 0 or line[0] == '#':
+            continue
         ll = line.split('=', 1)
         if len(ll) < 2:
-            print('bad line', line)
+            print ('bad line', line)
             continue
         mname = string.strip(ll[0])
         ll = ll[1].split()
         if len(ll) < 1:
-            print('bad line', line)
+            print ('bad line', line)
             continue
         id = ll[0]
         pname = None
@@ -627,13 +632,13 @@ def _fill_dicts():
             id = int(id)
         except ValueError:
             id = globals().get(id)
-            if id == None:
-                print('bad line', line)
+            if id is None:
+                print ('bad line', line)
                 continue
 
-        if pname == None:
+        if pname is None:
             pname = mname
-        if rname == None:
+        if rname is None:
             rname = pname
 
         globals()[mname] = id
diff --git a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/combo.py b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/combo.py
index bf762765c5efbc470ae51115037e4761288d2254..62aa4ca4d92c1f14d58e23cb7351597246d1a4f7 100755
--- a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/combo.py
+++ b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/combo.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #
 # $Id: combo.py,v 1.3 2005-05-12 16:36:59 ssnyder Exp $
@@ -7,6 +7,8 @@
 # Purpose: Generators for combinations and permutations.
 #
 
+from __future__ import print_function
+
 """Generators for combinations and permutations.
 
 This module contains functions for
@@ -59,7 +61,7 @@ Differences in ordering are considered significant.
 For example, all_combinations([1,2,3],2) will yield both [1,2] and [2,1].
 
 >>> for c in all_combinations(['l','o','v','e'],2):
-...   print ''.join(c)
+...   print (''.join(c))
 lo
 lv
 le
@@ -73,7 +75,8 @@ el
 eo
 ev
 """
-    if n==0: yield []
+    if n==0:
+        yield []
     else:
         for i in range(len(items)):
             for cc in all_combinations(items[:i]+items[i+1:],n-1):
@@ -83,7 +86,7 @@ def combinations(items, n):
     """Yields all unique subsequences of length n from items.
 
 >>> for uc in combinations(['l','o','v','e'],2):
-...   print ''.join(uc)
+...   print (''.join(uc))
 lo
 lv
 le
@@ -91,7 +94,8 @@ ov
 oe
 ve
 """
-    if n==0: yield []
+    if n==0:
+        yield []
     else:
         for i in range(len(items)):
             for cc in combinations(items[i+1:],n-1):
@@ -102,7 +106,7 @@ def selections(items, n):
 items, where any given item may be picked multiple times.
 
 >>> for s in selections(['l','o','v','e'],2):
-...   print ''.join(s)
+...   print (''.join(s))
 ll
 lo
 lv
@@ -120,7 +124,8 @@ eo
 ev
 ee
 """
-    if n==0: yield []
+    if n==0:
+        yield []
     else:
         for i in range(len(items)):
             for ss in selections(items, n-1):
@@ -131,7 +136,7 @@ def permutations(items):
 Equivalent to all_combinations(items,len(items)).
 
 >>> for p in permutations(['l','o','v','e']):
-...   print ''.join(p)
+...   print (''.join(p))
 love
 loev
 lvoe
@@ -163,11 +168,12 @@ evol
 __test__ = {}
 __test__['tests'] = """
 >>> # Permutations of 'love'
->>> print map(''.join, list(permutations('done')))
+>>> print (list(map(''.join, list(permutations('done')))))
 ['done', 'doen', 'dnoe', 'dneo', 'deon', 'deno', 'odne', 'oden', 'onde', 'oned', 'oedn', 'oend', 'ndoe', 'ndeo', 'node', 'noed', 'nedo', 'neod', 'edon', 'edno', 'eodn', 'eond', 'endo', 'enod']
 """
 
 
 if __name__ == "__main__":
+    print ('PyAnalysisUtils/combo.py test')
     import doctest
     doctest.testmod()
diff --git a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/draw_obj.py b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/draw_obj.py
index 4154cddcb5de40a384cf4ff84fcbe8876ba4d41e..8579ca28388abe950a433769d751ddbca4f0218d 100755
--- a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/draw_obj.py
+++ b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/draw_obj.py
@@ -1,7 +1,6 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #
-# $Id: draw_obj.py,v 1.4 2007-01-11 07:11:47 ssnyder Exp $
 # File: draw_obj.py
 # Created: sss, 2004.
 # Purpose: Helpers for drawing ROOT objects.
@@ -55,9 +54,7 @@ get_pad() returns the pad currently being used for drawing.
 from __future__ import division
 
 
-from past.utils import old_div
-from builtins import object
-from ROOT import gROOT, TCanvas, TVirtualPad, TIter, TH1, TH2
+from ROOT import gROOT, TCanvas, TVirtualPad, TH1, TH2
 import string
 
 
@@ -89,8 +86,8 @@ class _options(object):
         self.linecolors = 0
         self.other = ""
 
-        options = string.replace (options, ',', ' ')
-        for o in string.split (options):
+        options = options.replace (',', ' ')
+        for o in options.split():
             lo = string.lower (o)
             if lo in ["merge", "same", "norm", "logy", 'linecolors']:
                 setattr (self, lo, 1)
@@ -133,9 +130,9 @@ Returns:
 """
     global _samecount
 
-    if min != None:
+    if min is not None:
         obj.SetMinimum (min)
-    if max != None:
+    if max is not None:
         obj.SetMaximum (max)
         
     op = _options (options)
@@ -179,14 +176,15 @@ Returns:
         if op.norm:
             h = h.Clone()
             intg =  h.Integral()
-            if intg == 0: intg = 1
+            if intg == 0:
+                intg = 1
             h.Scale (1. / intg)
-            if max != None:
+            if max is not None:
                 h.SetMaximum (max)
 
         # Special handling for 1D histograms.
         # If SAME was specified, rescale the vertical axis, if needed.
-        if rescale_p and max == None:
+        if rescale_p and max is None:
             # Find the first hist already plotted.
             hfirst = None
             for obj in pad.GetListOfPrimitives():
@@ -212,7 +210,7 @@ Returns:
         if op.color >= 0:
             hh.SetLineColor (op.color)
         elif op.linecolors and _samecount >= 4:
-            hh.SetLineColor (old_div(_samecount, 4) + 1)
+            hh.SetLineColor (_samecount//4 + 1)
         if op.fill >= 0:
             hh.SetFillColor (op.fill)
         obj = hh
diff --git a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/interpolate.py b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/interpolate.py
index efd215772fb4e0a0158a854e7ed4f5e0a7883871..3d270ebbb2c1da9a2576784185681b3bf436e35c 100755
--- a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/interpolate.py
+++ b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/interpolate.py
@@ -1,17 +1,17 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #
-# $Id: interpolate.py,v 1.1 2005-05-06 22:44:58 ssnyder Exp $
 # File: interpolate.py
 # Created: sss, 2004.
 # Purpose: Polynomial interpolation in a table.
 #
 
+from __future__ import print_function
+
 """
 Polynomial interpolation in a table.
 This is a python version of CaloClusterCorrection/interpolate.
 """
-from __future__ import division
 
 # Helper: do a binary search in a table.
 # Note: these are slightly different than the standard python definition
@@ -19,16 +19,15 @@ from __future__ import division
 # This results in different behavior for the case that a key exactly
 # matching x is present in the table.  As it's done here, it matches
 # the result of the C++ lower_bound function, used in the C++ implementation.
-from past.builtins import cmp
-from builtins import range
-from past.utils import old_div
 def _bisect (a, x, lo=0, hi=None):
     if hi is None:
         hi = len(a)
     while lo < hi:
         mid = (lo+hi)//2
-        if cmp(x,a[mid]) <= 0: hi = mid
-        else: lo = mid+1
+        if x <= a[mid]:
+            hi = mid
+        else:
+            lo = mid+1
     return lo
 
 # Helper: do a binary search in a 2D table.
@@ -37,8 +36,10 @@ def _bisect2 (a, x, xcol, lo=0, hi=None):
         hi = len(a)
     while lo < hi:
         mid = (lo+hi)//2
-        if cmp(x,a[mid][xcol]) <= 0: hi = mid
-        else: lo = mid+1
+        if x <= a[mid][xcol]:
+            hi = mid
+        else:
+            lo = mid+1
     return lo
 
 
@@ -71,7 +72,8 @@ def interpolate (points, x, degree, ycol=1, regions=[], xcol=0):
   The method used is Newtonian interpolation.
   Based on the cernlib routine divdif.
   """
-    assert(len (points) >= 2 and degree >= 1)
+    if len (points) < 2 or degree < 1:
+        raise Exception ('bad args!')
     degree = min (degree, len (points) - 1)
     
 
@@ -90,7 +92,7 @@ def interpolate (points, x, degree, ycol=1, regions=[], xcol=0):
     # If we end up using degree+2 points, we'll do two interpolations
     # of degree degree and average them.
     npts = degree + 2 - (degree%2)
-    l = 0
+    l = 0  # noqa: E741
     t = []
     d = []
 
@@ -102,7 +104,7 @@ def interpolate (points, x, degree, ycol=1, regions=[], xcol=0):
     extrahi = 0
     
     # Starting point index, not considering edges or boundaries.
-    ilo = ix - old_div(npts,2)
+    ilo = ix - npts // 2
 
     # Make sure this point is within the array range and has not
     # crossed a region boundary.
@@ -172,14 +174,15 @@ def interpolate (points, x, degree, ycol=1, regions=[], xcol=0):
     # SUPPLEMENTED BY AN EXTRA LINE IF *EXTRA* IS TRUE.
     for l in range(0, degree):
         if extra:
-            d[degree+1] = old_div((d[degree+1]-d[degree-1]),(t[degree+1]-t[degree-1-l]))
+            d[degree+1] = (d[degree+1]-d[degree-1]) / (t[degree+1]-t[degree-1-l])
         for i in range (degree, l, -1):
-            d[i] = old_div((d[i]-d[i-1]),(t[i]-t[i-1-l]))
+            d[i] = (d[i]-d[i-1]) / (t[i]-t[i-1-l])
 
     # EVALUATE THE NEWTON INTERPOLATION FORMULA AT X, AVERAGING TWO VALUES
     # OF LAST DIFFERENCE IF *EXTRA* IS TRUE.
     sum = d[degree]
-    if extra: sum=0.5*(sum+d[degree+1])
+    if extra:
+        sum=0.5*(sum+d[degree+1])
     for j in range (degree-1, -1, -1):
         sum = d[j] + (x - t[j]) * sum
 
@@ -253,5 +256,6 @@ __test__['tests'] = """
 
 
 if __name__ == "__main__":
+    print ('PyAnalysisUtils/interpolate.py test')
     import doctest
     doctest.testmod()
diff --git a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/normphi.py b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/normphi.py
index ac02715aa65973d79c0f1b313128b02ca6e19e44..2edb6ba4b8a45e96e56a9774f7ced3f514b2d7ff 100755
--- a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/normphi.py
+++ b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/normphi.py
@@ -1,7 +1,6 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #
-# $Id: normphi.py,v 1.1 2005-05-06 22:44:58 ssnyder Exp $
 # File: normphi.py
 # Created: sss, 2004.
 # Purpose: Normalize an angle to within the range -pi...pi.
@@ -20,8 +19,10 @@ This is intended for use only when the initial angle is already
 close to being within the range.
 """
     
-    while phi < -pi: phi += 2*pi
-    while phi >  pi: phi -= 2*pi
+    while phi < -pi:
+        phi += 2*pi
+    while phi >  pi:
+        phi -= 2*pi
     return phi
 
 
diff --git a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/pydraw.py b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/pydraw.py
index 35e27f40ebac6eabf62f4aaa6dfea468e1699d7a..02fe314a62842a1aa57a6921b4af6668789cb46c 100644
--- a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/pydraw.py
+++ b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/pydraw.py
@@ -1,12 +1,13 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #
-# $Id: pydraw.py,v 1.3 2009-02-24 03:22:49 ssnyder Exp $
 # File: pydraw.py
 # Created: sss, a while ago.  Added to ATLAS repository, Dec 2008
 # Purpose: Interactive python commands for plotting from a tuple-like object.
 #
 
+from __future__ import print_function
+
 """Interactive python commands for plotting from a tuple-like object.
 This module provides in python functionality similar to TTree::Draw
 and TTree::Scan.  The major conceptual differences are:
@@ -318,25 +319,20 @@ Bugs/stuff missing
      
  
 """
-from __future__ import print_function
-
 
 
-from future import standard_library
-standard_library.install_aliases()
-from builtins import str
-from builtins import range
-from builtins import object
 import sys
 import string
 import tokenize
 import token
 import copy
-import exceptions
 import ROOT
-import cppyy
-import types
-from io import StringIO
+import cppyy # noqa: F401
+import six
+if six.PY2:
+    from StringIO import StringIO #pragma: NO COVER
+else:
+    from io import StringIO #pragma: NO COVER
 from PyAnalysisUtils.draw_obj import draw_obj, get_canvas
 
 
@@ -344,7 +340,7 @@ try:
     ScatterH2 = ROOT.RootUtils.ScatterH2
 except AttributeError: #pragma: NO COVER
     ScatterH2 = ROOT.TH2F #pragma: NO COVER
-    print("WARNING: RootUtils::ScatterH2 not available; using TH2F instead") #pragma: NO COVER
+    print ("WARNING: RootUtils::ScatterH2 not available; using TH2F instead") #pragma: NO COVER
 
 
 try:
@@ -369,7 +365,7 @@ _globals = sys.modules['__main__'].__dict__
 
 
 # Characters that are legal in identifiers.
-_idchars = string.letters + string.digits + '_'
+_idchars = string.ascii_letters + string.digits + '_'
 
 # This is what's used as the event formal argument in the generated functions.
 _evtvar = '_ev'
@@ -382,9 +378,9 @@ def _sanitize_hname(s):
 
     Root does bad things if you put / in a histogram name, so we remove them.
     Examples:
-    >>> print _sanitize_hname('foo')
+    >>> print (_sanitize_hname('foo'))
     foo
-    >>> print _sanitize_hname('foo/bar')
+    >>> print (_sanitize_hname('foo/bar'))
     foo DIV bar
     """
     return s.replace ('/', ' DIV ')
@@ -400,8 +396,12 @@ def _untokenize (tokens):
     It also tries not to add unneeded spaces.
 
     Examples:
-    >>> from tokenize import *
-    >>> from StringIO import StringIO
+    >>> from tokenize import generate_tokens, untokenize
+    >>> import six
+    >>> if six.PY2:
+    ...     from StringIO import StringIO
+    ... else:
+    ...     from io import StringIO
     >>> def untokenize1(tt):
     ...   tt=list(tt)
     ...   if tt[-1][0]==0: tt=tt[:-1]
@@ -420,7 +420,7 @@ def _untokenize (tokens):
     toks_append = toks.append
     for tok in tokens:
         toknum, tokval = tok[:2]
-        tokval = string.strip (tokval)
+        tokval = tokval.strip()
         if toknum in (token.NAME, token.NUMBER):
             if lastname:
                 tokval = ' ' + tokval
@@ -472,8 +472,8 @@ def _find_outer (haystack, needle, ignore_delim = False):
         if tnum != token.STRING and not pend and val == needle:
             col1 = a[1]
             col2 = b[1]
-            return (string.strip (haystack[:col1]),
-                    string.strip (haystack[col2:]))
+            return (haystack[:col1].strip(),
+                    haystack[col2:].strip())
         if not ignore_delim:
             if val == '(':
                 pend.append (')')
@@ -503,9 +503,9 @@ def _split_outer (haystack, needle):
     out = []
     while True:
         (head, tail) = _find_outer (haystack, needle)
-        head = string.strip (head)
+        head = head.strip()
         out.append (head)
-        if tail == None:
+        if tail is None:
             break
         else:
             haystack = tail
@@ -543,7 +543,7 @@ class AthenaLoopWrapper(object):
 """
     def __init__ (self, app=None):
         from AthenaPython import PyAthena                  #pragma: NO COVER
-        if app == None:                                    #pragma: NO COVER
+        if app is None:                                    #pragma: NO COVER
             from AthenaCommon.AppMgr import theApp         #pragma: NO COVER
             app = theApp                                   #pragma: NO COVER
         self._app = app                                    #pragma: NO COVER
@@ -555,15 +555,16 @@ class AthenaLoopWrapper(object):
         """Call f(i,tree) on rows [looplo, loophi)"""
         loophi = min (loophi, self._app.size())            #pragma: NO COVER
         getentry = self._app.seekEvent                     #pragma: NO COVER
-        for i in range(looplo, loophi):                   #pragma: NO COVER
+        for i in range(looplo, loophi):                    #pragma: NO COVER
             getentry(i)                                    #pragma: NO COVER
             f(i, self)                                     #pragma: NO COVER
         return                                             #pragma: NO COVER
 
 
     def __getattr__ (self, v):
-        if not v.startswith('_'): return self._sg[v]       #pragma: NO COVER
-        raise AttributeError                               #pragma: NO COVER
+        if not v.startswith('_'):                          #pragma: NO COVER
+                return self._sg[v]                         #pragma: NO COVER
+        raise AttributeError()                             #pragma: NO COVER
 
 
 class _Loopvar(object):
@@ -664,13 +665,13 @@ class Draw_Cmd(object):
         # ??? Don't split at spaces in delimiters.
         # _find_outer doesn't really work for this since it operates
         # on the tokenized string, in which whitespace doesn't appear.
-        if self.histspec == None:
+        if self.histspec is None:
             self.histspec = []
         else:
             self.histspec = self.histspec.split ()
 
         # Gotta have something.
-        s = string.strip (s)
+        s = s.strip()
         if not s:
             self.errstr = "Empty draw string."
             return
@@ -744,22 +745,23 @@ class Draw_Cmd(object):
 
             pos = tail.find (':')
             pos2 = tail.find (']')
-            if pos2 < 0: pos2 = len (tail)
+            if pos2 < 0:
+                    pos2 = len (tail) #pragma: NO COVER
             if pos < 0:
-                slo = string.strip (tail[:pos2])
+                slo = tail[:pos2].strip()
                 if len (slo) > 0:
                     lo = int (eval (slo, g))
                 hi = lo + 1
             else:
-                slo = string.strip (tail[:pos])
+                slo = tail[:pos].strip()
                 if len (slo) > 0:
                     lo = int (eval (slo, g))
-                shi = string.strip (tail[pos+1:pos2])
+                shi = tail[pos+1:pos2].strip()
                 if len (shi) > 0:
                     hi = int (eval (shi, g))
 
         if tuple[0] == '(' and tuple[-1] == ')':
-            tuple = string.strip (tuple[1:-1])
+            tuple = tuple[1:-1].strip()
         self.tuple = tuple
         self.lo = lo
         self.hi = hi
@@ -874,7 +876,7 @@ class Draw_Cmd(object):
         pos = 0
         while 1:
             (s1, s2) = _find_outer (s[pos:], '$', True)
-            if s2 == None:
+            if s2 is None:
                 break
             snew = None
             if len(s2) > 0:
@@ -886,10 +888,10 @@ class Draw_Cmd(object):
                        s1.endswith (' or') or
                        s1.endswith ('not'))):
                     snew = self._mung_n (s1, s2)
-                elif s2[0] in string.letters:
+                elif s2[0] in string.ascii_letters:
                     snew = self._mung_loop (s1, s2)
             s = s[:pos]
-            if snew == None:
+            if snew is None:
                 snew = s1 + '$' + s2
                 pos = pos + len(s1)+1
             s = s + snew
@@ -939,21 +941,20 @@ class Draw_Cmd(object):
 
         sel = self.sel
         if self._limdict:
-            limsel = string.join (["len(%s)>=%d" % (self._iddict[p[0]], p[1])
-                                   for p in list(self._limdict.items())],
-                                  " and ")
+            limsel = ' and '.join (["len(%s)>=%d" % (self._iddict[p[0]], p[1])
+                                    for p in self._limdict.items()])
             if not sel:
                 sel = limsel
             else:
                 sel = limsel + " and (" + sel + ")"
 
         ftext = "def _loopfunc(_i, %s%s):\n" % (_evtvar, extargs)
-        for (id1, id2) in list(self._iddict.items()):
+        for (id1, id2) in sorted(self._iddict.items()):
             ftext += "  %s = %s.%s\n" % (id2, _evtvar, id1)
         indent = 2
 
-        for (i,l) in list(self._loopdict.items()):
-            ids = l.get_ids()
+        for (i,l) in sorted(self._loopdict.items()):
+            ids = sorted(l.get_ids())
             assert (not not ids)
             if len(ids) == 1:
                 vars = l.itname (ids[0])
@@ -978,7 +979,7 @@ class Draw_Cmd(object):
         ftext += ' '*indent + "%s\n" % payload
 
         if _debug:
-            print(ftext)
+            print (ftext)
         
         return ftext
 
@@ -998,31 +999,31 @@ def _get_bins (args, ndim, axis):
     NDIM is 1 or 2, and AXIS is 0 or 1, for the x or y axis.
 
     Examples:
-    >>> import pydraw
+    >>> from PyAnalysisUtils import pydraw
     >>> pydraw._globals = globals()
     >>> import ROOT
     >>> ROOT.gPad.Range(0, 1,2,3)
     >>> b = _get_bins (["50", "10", "100"], 1, 0)
-    >>> print b.nbins, b.lo, b.hi, b.rebin
+    >>> print (b.nbins, b.lo, b.hi, b.rebin)
     50 10.0 100.0 0
     >>> b = _get_bins ([], 1, 0)
-    >>> print b.nbins, b.lo, b.hi, b.rebin
+    >>> print (b.nbins, b.lo, b.hi, b.rebin)
     50 0 1 1
     >>> b = _get_bins (["!", "10"], 1, 0)
-    >>> print b.nbins, b.lo, b.hi, b.rebin
+    >>> print (b.nbins, b.lo, b.hi, b.rebin)
     50 10.0 11.0 1
     >>> b = _get_bins (["!", "!", "10"], 1, 0)
-    >>> print b.nbins, b.lo, b.hi, b.rebin
+    >>> print (b.nbins, b.lo, b.hi, b.rebin)
     50 0 10.0 0
     >>> scale = 10
     >>> b = _get_bins (["50", "0", "2*scale"], 1, 0)
-    >>> print b.nbins, b.lo, b.hi, b.rebin
+    >>> print (b.nbins, b.lo, b.hi, b.rebin)
     50 0.0 20.0 0
     >>> b = _get_bins ([], 2, 0)
-    >>> print b.nbins, b.lo, b.hi, b.rebin
+    >>> print (b.nbins, b.lo, b.hi, b.rebin)
     50 0.0 2.0 1
     >>> b = _get_bins ([], 2, 1)
-    >>> print b.nbins, b.lo, b.hi, b.rebin
+    >>> print (b.nbins, b.lo, b.hi, b.rebin)
     50 1.0 3.0 1
     >>> b = _get_bins ([], 2, 2)
     Traceback (most recent call last):
@@ -1087,12 +1088,12 @@ def _get_hist (ndim, args, hname, htitle):
     # Look for drawing options.
     options = ''
     for i in range (0, len(args)):
-        if args[i][0] in string.letters:
+        if args[i][0] in string.ascii_letters:
             for j in range (i, len(args)):
                 if ndim == 2 and args[j].lower() == "prof":
                     profile = 1
                     args[j] = ''
-            options = string.join (args[i:])
+            options = ' '.join (args[i:])
             break
 
     # Delete any old object of the same name.
@@ -1104,7 +1105,7 @@ def _get_hist (ndim, args, hname, htitle):
         # the object, so IsOnHeap might return false for it.)
         # Force the issue by doing a C++ delete directly.
         ROOT.gROOT.ProcessLine ("delete (%s*)%d" %
-                                (hold.__class__.__name__,
+                                (hold.__class__.__cppname__,
                                  ROOT.AddressOf(hold)[0]))
 
     # Create the histogram.
@@ -1141,17 +1142,15 @@ def draw (arg):
     # Initial parsing of the arguments.
     c = Draw_Cmd (arg)
     if c.errstr:
-        print(c.errstr)
+        print (c.errstr)
         return False
 
     # Construct the expression to use to fill the histogram.
     if len (c.exprs) == 1:
         ndim = 1
-        expr = c.exprs[0]
         payload = "_hfill (%s)" % c.exprs[0]
     else:
         ndim = 2
-        expr = '%s:%s' % (c.exprs[0], c.exprs[1])
         payload = "_hfill ((%s),(%s))" % (c.exprs[0], c.exprs[1])
         
     # Construct the histogram title.
@@ -1161,13 +1160,13 @@ def draw (arg):
 
     # Make the histogram.
     # If it's `!', then we just use the last one.
-    if len(c.histspec) >= 1 and c.histspec[0] == "!" and last_hist != None:
+    if len(c.histspec) >= 1 and c.histspec[0] == "!" and last_hist is not None:
         hist = last_hist
-        options = string.join (c.histspec[1:])
+        options = ' '.join (c.histspec[1:])
     elif len(c.histspec) >= 1 and c.histspec[0][:2] == '>>':
         hname = c.histspec[0][2:]
         hist = _globals.get (hname)
-        options = string.join (c.histspec[1:])
+        options = ' '.join (c.histspec[1:])
     else:
         (hist, options) = _get_hist (ndim, c.histspec,
                                      _sanitize_hname(c.tuple+'.'+c.expr_orig), htitle)
@@ -1180,7 +1179,7 @@ def draw (arg):
     g = copy.copy (_globals)
     g['_hfill'] = hist.Fill
     ftext = c._make_func (payload, ', _hfill = _hfill')
-    exec(ftext, g)
+    exec (ftext, g)
 
     # Execute the loop over the data.
     c.tuple_o.loop (g['_loopfunc'], c.lo, c.hi)
@@ -1203,11 +1202,11 @@ def _scan_print (i, *args):
     
     s = '%6d' % i
     for a in args:
-        if type(a) == int or type(a) == int:
+        if isinstance(a, six.integer_types):
             s += ' %8d' % a
         else:
             s += ' %8g' % a
-    print(s)
+    print (s)
     return
 
 
@@ -1221,7 +1220,7 @@ def scan (arg):
     # Initial parsing of the arguments.
     c = Draw_Cmd (arg)
     if c.errstr:
-        print(c.errstr)
+        print (c.errstr)
         return False
 
     payload = "_print (_i, %s)" % \
@@ -1232,7 +1231,7 @@ def scan (arg):
     g = copy.copy (_globals)
     g['_print'] = _scan_print
     ftext = c._make_func (payload, ', _print = _print')
-    exec(ftext, g)
+    exec (ftext, g)
 
     # Execute the loop over the data.
     c.tuple_o.loop (g['_loopfunc'], c.lo, c.hi)
@@ -1250,7 +1249,7 @@ def loop (arg):
     # Initial parsing of the arguments.
     c = Draw_Cmd (arg)
     if c.errstr:
-        print(c.errstr)
+        print (c.errstr)
         return False
 
     payload = "(%s,)" % ','.join (c.exprs)
@@ -1259,7 +1258,7 @@ def loop (arg):
     # It will be defined as _loopfunc in g.
     g = copy.copy (_globals)
     ftext = c._make_func (payload)
-    exec(ftext, g)
+    exec (ftext, g)
 
     # Execute the loop over the data.
     c.tuple_o.loop (g['_loopfunc'], c.lo, c.hi)
@@ -1283,7 +1282,7 @@ def cmd (s):
     See the header comments for the command syntax.
     """
 
-    ssplit = string.split (s, maxsplit=1)
+    ssplit = s.split (None, 1)
 
     if len(ssplit) < 2:
         return False
@@ -1317,9 +1316,10 @@ def _excepthook (exctype, value, traceb):
     """Exception hook used by pydraw to process drawing commands."""
 
     # If it's a syntax error, try interpreting as a drawing command.
-    if isinstance (value, exceptions.SyntaxError):
+    if isinstance (value, SyntaxError):
         val = value.text
-        if val[-1] == '\n': val = val[:-1]
+        if val[-1] == '\n':
+                val = val[:-1] #pragma: NO COVER
         if cmd (val):
             # Success --- update root stuff and return.
             # (This will swallow the original syntax error.)
@@ -1336,7 +1336,7 @@ def cmdhook():
     # Store the old value of the exception hook (only if we haven't
     # done so already).
     global _orig_ehook
-    if _orig_ehook == None:
+    if _orig_ehook is None:
         _orig_ehook = sys.excepthook
 
     # Install our handler.
@@ -1357,7 +1357,7 @@ def cmdhook():
 #     ScatterH2 = ROOT.RootUtils.ScatterH2
 # except AttributeError:
 #     ScatterH2 = ROOT.TH2F
-#     print "WARNING: RootUtils::ScatterH2 not available; using TH2F instead"
+#     print ("WARNING: RootUtils::ScatterH2 not available; using TH2F instead")
 
 # kCanRebin = ROOT.TH1.kCanRebin
 
@@ -1395,7 +1395,7 @@ def cmdhook():
 #             return
 #         return fill
 #     def flush (self):
-#         #print self.i, self.xarr
+#         #print (self.i, self.xarr)
 #         self.filln (self.i[0], self.xarr, self.warr)
 #         self.i[0] = 0
 #         return
diff --git a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/root_pickle.py b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/root_pickle.py
index 5fe0f906875d2e3ac01925f1ef343a329cdaa514..4066eb3048d7d731acb4eda3c39424138d0af8a6 100755
--- a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/root_pickle.py
+++ b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/root_pickle.py
@@ -1,13 +1,14 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #
-# $Id: root_pickle.py,v 1.5 2007-01-11 07:11:47 ssnyder Exp $
 # File: root_pickle.py
 # Created: sss, 2004.
 # Purpose: Pickle python data into a root file, preserving references
 #          to root objects.
 #
 
+from __future__ import print_function
+
 """Pickle python data into a root file, preserving references to root objects.
 
 This module allows pickling python
@@ -69,15 +70,12 @@ The following additional notes apply.
    mean that you need to keep the root file open.  Pass use_proxy=0
    to disable this behavior.
 """
-from __future__ import print_function
 
-from future import standard_library
-standard_library.install_aliases()
-from builtins import object
-from io import StringIO
 import pickle
 import ROOT
 import sys
+import six
+from six.moves import intern
 
 def _getdir():
     if hasattr (ROOT.TDirectory, 'CurrentDirectory'):
@@ -88,41 +86,156 @@ def _getdir():
 def _setdir (d):
     ROOT.TDirectory.cd (d)
 
+
+#
+# This stuff was originally written in terms of an stringIO stream.
+# But with py3, i couldn't find a better way of getting bytes objects
+# into and out of a TString.
+#
 # Argh!  We can't store NULs in TObjStrings.
 # But pickle protocols > 0 are binary protocols, and will get corrupted
 # if we truncate at a NUL.
 # So, when we save the pickle data, make the mappings:
 #  0x00 -> 0xff 0x01
 #  0xff -> 0xff 0xfe
-def _protect (s):
-    return s.replace ('\377', '\377\376').replace ('\000', '\377\001')
-def _restore (s):
-    return s.replace ('\377\001', '\000').replace ('\377\376', '\377')
-
-
-class IO_Wrapper(object):
-    def __init__ (self):
-        return self.reopen()
-
-    def write (self, s):
-        return self.__s.write (_protect (s))
-
-    def read (self, i):
-        return self.__s.read (i)
-
-    def readline (self):
-        return self.__s.readline ()
-
-    def getvalue (self):
-        return self.__s.getvalue()
-
-    def setvalue (self, s):
-        self.__s = StringIO (_restore (s))
-        return
-
-    def reopen (self):
-        self.__s = StringIO()
-        return
+# ... This may actually be obsolete --- looks like we can have NULs
+# in TObjString now, if we access the TString direectly.  But retain
+# for compatibility with existing pickles.
+# 
+
+
+if six.PY2:
+    from StringIO import StringIO
+    def _protect (s):
+        return s.replace ('\377', '\377\376').replace ('\000', '\377\001')
+    def _restore (s):
+        return s.replace ('\377\001', '\000').replace ('\377\376', '\377')
+
+
+    class Write_Wrapper:
+        def __init__ (self):
+            return self.reopen()
+
+        def write (self, s):
+            return self.__s.write (_protect (s))
+
+        def getvalue (self):
+            return ROOT.TObjString (self.__s.getvalue())
+
+        def reopen (self):
+            self.__s = StringIO()
+            return
+
+
+    class Read_Wrapper:
+        def __init__ (self):
+            return self.reopen()
+
+        def read (self, i):
+            return self.__s.read (i)
+
+        def readline (self):
+            return self.__s.readline ()
+
+        def setvalue (self, s):
+            self.__s = StringIO (_restore (s.GetName()))
+            return
+
+        def reopen (self):
+            self.__s = StringIO()
+            return
+
+
+else:
+    class Write_Wrapper:
+        def __init__ (self):
+            return self.reopen()
+
+        def write (self, s):
+            ss = self._str
+            log = []
+            for c in s:
+                code = c
+                if code == 0xff:
+                    ss.Append (0xff)
+                    ss.Append (0xfe)
+                    log.append (0xff)
+                    log.append (0xfe)
+                elif code == 0x00:
+                    ss.Append (0xff)
+                    ss.Append (0x01)
+                    log.append (0xff)
+                    log.append (0x01)
+                else:
+                    ss.Append (code)
+                    log.append (code)
+            return
+
+        def getvalue (self):
+            return self._s
+
+        def reopen (self):
+            self._s = ROOT.TObjString()
+            self._str = self._s.String()
+            return
+
+
+    class Read_Wrapper:
+        def __init__ (self):
+            return self.reopen()
+
+
+        def read (self, i):
+            out = []
+            slen = len(self._str)
+            while i != 0 and self._pos < slen:
+                c = ord(self._str[self._pos])
+                if c == 0xff:
+                    self._pos += 1
+                    if self._pos >= slen:
+                        break
+                    c = ord(self._str[self._pos])
+                    if c == 0x01:
+                        c = 0x00
+                    elif c == 0xfe:
+                        c = 0xff
+                out.append (c)
+                self._pos += 1
+                i -= 1
+            return bytes(out)
+
+
+        def readline (self):
+            out = []
+            slen = len(self._str)
+            while self._pos < slen:
+                c = ord(self._str[self._pos])
+                if c == 0xff:
+                    self._pos += 1
+                    if self._pos >= slen:
+                        break
+                    c = ord(self._str[self._pos])
+                    if c == 0x01:
+                        c = 0x00
+                    elif c == 0xfe:
+                        c = 0xff
+                out.append (c)
+                self._pos += 1
+                if c == 10:
+                    break
+            return bytes(out)
+
+
+        def setvalue (self, s):
+            self._s = s
+            self._str = self._s.String()
+            self._pos = 0
+            return
+
+
+        def reopen (self):
+            self.setvalue (ROOT.TObjString())
+            return
 
 
 class Pickler(object):
@@ -135,7 +248,7 @@ Root objects.
 """
         self.__file = file
         self.__keys = file.GetListOfKeys()
-        self.__io = IO_Wrapper()
+        self.__io = Write_Wrapper()
         self.__pickle = pickle.Pickler (self.__io, proto)
         self.__pickle.persistent_id = self._persistent_id
         self.__pmap = {}
@@ -144,12 +257,13 @@ Root objects.
 
     def dump (self, o, key=None):
         """Write a pickled representation of o to the open TFile."""
-        if key == None: key = '_pickle'
+        if key is None:
+            key = '_pickle'
         dir = _getdir()
         try:
             self.__file.cd()
             self.__pickle.dump (o)
-            s = ROOT.TObjString (self.__io.getvalue())
+            s = self.__io.getvalue()
             self.__io.reopen()
             s.Write (key)
             self.__file.Flush()
@@ -223,32 +337,31 @@ class Root_Proxy (object):
     __slots__ = ('__f', '__pid', '__o')
     def __init__ (self, f, pid):
         self.__f = f
-        self.__pid = sys.intern(pid)
+        self.__pid = intern(pid)
         self.__o = None
         return
     def __getattr__ (self, a):
-        if self.__o == None:
+        if self.__o is None:
             self.__o = self.__f.Get (self.__pid)
             if self.__o.__class__.__module__ != 'ROOT':
                 self.__o.__class__.__module__ = 'ROOT'
         return getattr (self.__o, a)
     def __obj (self):
-        if self.__o == None:
+        if self.__o is None:
             self.__o = self.__f.Get (self.__pid)
             if self.__o.__class__.__module__ != 'ROOT':
                 self.__o.__class__.__module__ = 'ROOT'
         return self.__o
-class Unpickler(object):
+class Unpickler (pickle.Unpickler):
     def __init__ (self, file, use_proxy = True, use_hash = False):
         """Create a root unpickler.
 FILE should be a Root TFile.
 """
         self.__use_proxy = use_proxy
         self.__file = file
-        self.__io = IO_Wrapper()
-        self.__unpickle = pickle.Unpickler (self.__io)
-        self.__unpickle.persistent_load = self._persistent_load
-        self.__unpickle.find_global = self._find_class
+        self.__io = Read_Wrapper()
+        pickle.Unpickler.__init__ (self, self.__io)
+
         self.__n = 0
         xsave.add (file)
 
@@ -278,7 +391,7 @@ FILE should be a Root TFile.
                     cy = 9999
                 ret = htab.get ((nm,cy), None)
                 if not ret:
-                    print("did't find", nm, cy, len(htab))
+                    print ("did't find", nm, cy, len(htab))
                     return oget (nm0)
                 #ctx = ROOT.TDirectory.TContext (file)
                 ret = ret.ReadObj()
@@ -290,44 +403,47 @@ FILE should be a Root TFile.
 
     def load (self, key=None):
         """Read a pickled object representation from the open file."""
-        if key == None: key = '_pickle'
+        if key is None:
+            key = '_pickle'
         o = None
-        if _compat_hooks: save = _compat_hooks[0]()
+        if _compat_hooks:
+            save = _compat_hooks[0]()
         try:
             self.__n += 1
             s = self.__file.Get (key + ';%d' % self.__n)
-            self.__io.setvalue (s.GetName())
-            o = self.__unpickle.load()
+            self.__io.setvalue (s)
+            o = pickle.Unpickler.load(self)
             self.__io.reopen ()
         finally:
-            if _compat_hooks: save = _compat_hooks[1](save)
+            if _compat_hooks:
+                save = _compat_hooks[1](save)
         return o
     
-    def _persistent_load (self, pid):
+    def persistent_load (self, pid):
         if self.__use_proxy:
             o = Root_Proxy (self.__file, pid)
         else:
             o = self.__file.Get (pid)
-        #print 'load ', pid, o
+        #print ('load ', pid, o)
         xsave.add(o)
         return o
 
 
-    def _find_class (self, module, name):
+    def find_class (self, module, name):
         try:
             try:
                 __import__(module)
                 mod = sys.modules[module]
             except ImportError:
-                print("Making dummy module %s" % (module))
-                class DummyModule(object):
+                print ("Making dummy module %s" % (module))
+                class DummyModule:
                     pass
                 mod = DummyModule()
                 sys.modules[module] = mod
             klass = getattr(mod, name)
             return klass
         except AttributeError:
-            print("Making dummy class %s.%s" % (module, name))
+            print ("Making dummy class %s.%s" % (module, name))
             mod = sys.modules[module]
             class Dummy(object):
                 pass
@@ -343,6 +459,7 @@ If this is set, then hooks[0] is called before loading,
 and hooks[1] is called after loading.  hooks[1] is called with
 the return value of hooks[0] as an argument.  This is useful
 for backwards compatibility in some situations."""
+    global _compat_hooks
     _compat_hooks = hooks
     return
 
diff --git a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/rtime.py b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/rtime.py
index b8b758de0230e1fa866dacf80005d9c16bed5817..3e076cd44a7d6540414c839e62a39079c94e4c9a 100755
--- a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/rtime.py
+++ b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/rtime.py
@@ -1,5 +1,4 @@
-from __future__ import print_function
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #
 # $Id: rtime.py,v 1.1 2005-05-06 22:44:59 ssnyder Exp $
@@ -8,6 +7,8 @@ from __future__ import print_function
 # Purpose: Measure the execution time of a function.
 #
 
+from __future__ import print_function
+
 import resource
 
 
@@ -21,8 +22,8 @@ Print a report of the CPU time taken.
         ret = fn (*args, **kw)
     finally:
         ru1 = resource.getrusage (resource.RUSAGE_SELF)
-        print("utime: %f, stime: %f" % (ru1.ru_utime-ru0.ru_utime,
-                                        ru1.ru_stime-ru0.ru_stime))
+        print ("utime: %f, stime: %f" % (ru1.ru_utime-ru0.ru_utime,
+                                         ru1.ru_stime-ru0.ru_stime))
     return ret
 
     
diff --git a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/style.py b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/style.py
index a3f73ff5315da16ef078c1e6c669493b8ccf8719..eb19358dbb19d68cf54e4d909311472a76db0da3 100755
--- a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/style.py
+++ b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/style.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #
 # $Id: style.py,v 1.1 2005-05-11 19:47:29 ssnyder Exp $
@@ -26,7 +26,7 @@ def style():
     s.SetOptStat (1110)
 
     # title size
-    s.SetOptFit(0o111)
+    s.SetOptFit(111)
     s.SetTitleFont(42)
     s.SetTitleH(0.09)
     s.SetTitleX(0.1)
diff --git a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/truth.py b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/truth.py
index 203bdf300fa91485c96a7d18ccb0134fb9897cd3..ec70c662112e5a7d65a9c9f2e05be7dc70bec1c8 100755
--- a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/truth.py
+++ b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/python/truth.py
@@ -1,22 +1,19 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #
-# $Id: truth.py,v 1.4 2007-08-02 22:21:56 ssnyder Exp $
 # File: truth.py
 # Created: sss, March 2005.
 # Purpose: Dump out MC truth information.
 #
 
+from __future__ import print_function
+
 """Dump out MC truth information.
 
 This module contains the function dump_truth which will dump out the
 truth information for the current event in a tabular format.
 """
-from __future__ import division
-from __future__ import print_function
 
-from past.utils import old_div
-from builtins import object
 from PyAnalysisUtils import PDG
 from PyParticleTools import PyParticleTools
 import sys
@@ -25,9 +22,10 @@ def do_decay (t, n):
     """Return the barcode number for decay N of truth particle T
 as a string.  Return an empty string if there's no such decay.
 """
-    if t.nDecay() <= n: return ''
+    if t.nDecay() <= n:
+        return ''
     bc = t.child(n).genParticle().barcode()
-    return repr(bc)
+    return str(bc)
 
 class _Truthtmp(object):
     pass
@@ -39,16 +37,17 @@ def dump_one_truth (t, f=sys.stdout):
     d.da1 = do_decay(t, 0)
     d.da2 = do_decay(t, 1)
     d.da3 = do_decay(t, 2)
-    d.pt = old_div(t.pt(),1000)
+    d.pt = t.pt()/1000
     d.eta = t.eta()
     d.phi = t.phi()
-    d.m = old_div(t.m(),1000)
-    d.px = old_div(t.px(),1000)
-    d.py = old_div(t.py(),1000)
-    d.pz = old_div(t.pz(),1000)
-    d.e = old_div(t.e(),1000)
-    print("%(bc)3d %(name)-4s %(da1)4s %(da2)4s %(da3)4s %(pt)6.1f %(eta)5.2f %(phi)5.2f %(m)5.1f %(px)6.1f %(py)6.1f %(pz)6.1f %(e)6.1f" % d.__dict__, file=f)
-    if t.nDecay() > 3: print("  (more than 3 decays)", file=f)
+    d.m = t.m()/1000
+    d.px = t.px()/1000
+    d.py = t.py()/1000
+    d.pz = t.pz()/1000
+    d.e = t.e()/1000
+    print ("%(bc)3d %(name)-4s %(da1)4s %(da2)4s %(da3)4s %(pt)6.1f %(eta)5.2f %(phi)5.2f %(m)5.1f %(px)6.1f %(py)6.1f %(pz)6.1f %(e)6.1f" % d.__dict__, file=f)
+    if t.nDecay() > 3:
+        print ("  (more than 3 decays)", file=f)
 
 
 def dump_truth(f=sys.stdout, sgkey="SpclMC", maxn=None):
@@ -61,9 +60,9 @@ This is followed by the particle type, and then by the barcode numbers
 of any decay daughters (up to 3).  This is followed by the four-momentum
 in two versions: first as pt, eta, phi, m and then as px, py, pz, e.
 """
-    l = [p for p in PyParticleTools.getTruthParticles (sgkey)]
-    if maxn != None:
-        l = l[:maxn]
-    for t in l:
+    parts = [p for p in PyParticleTools.getTruthParticles (sgkey)]
+    if maxn is not None:
+        parts = parts[:maxn]
+    for t in parts:
         dump_one_truth (t, f)
     return
diff --git a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/share/combo_test.ref b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/share/combo_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..1e356602d1a78b9750c5c68ee5c4534fa10feb31
--- /dev/null
+++ b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/share/combo_test.ref
@@ -0,0 +1 @@
+PyAnalysisUtils/combo.py test
diff --git a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/share/interpolate_test.ref b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/share/interpolate_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..cb15e7403376b692c7fdcfb92fb003ab0048c08a
--- /dev/null
+++ b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/share/interpolate_test.ref
@@ -0,0 +1 @@
+PyAnalysisUtils/interpolate.py test
diff --git a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/share/pydraw_test.ref b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/share/pydraw_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..0d05093e58be4874e7baa57592bd138ca5db3aef
--- /dev/null
+++ b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/share/pydraw_test.ref
@@ -0,0 +1,2 @@
+Info in <TCanvas::MakeDefCanvas>:  created default TCanvas with name c1
+
diff --git a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/share/root_pickle_test.ref b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/share/root_pickle_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..352a08f60d008d5f69d81988d32241c04b859057
--- /dev/null
+++ b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/share/root_pickle_test.ref
@@ -0,0 +1 @@
+PyAnalysisUtils/root_pickle_t
diff --git a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/test/PyAnalysisUtils.xml b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/test/PyAnalysisUtils.xml
deleted file mode 100755
index 2892a2f82f1b6358c4f95444a06f43d0257d3ec0..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/test/PyAnalysisUtils.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0"?>
-<atn>
-   <TEST name="PyAnalysisUtils" type="makecheck">
-      <package>PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/</package>
-      <author> scott snyder </author>
-      <mailto> snyder@bnl.gov </mailto>
-      <expectations>
-         <errorMessage>Athena exited abnormally</errorMessage>
-         <errorMessage>differ</errorMessage>
-         <warningMessage> # WARNING_MESSAGE : post.sh> ERROR</warningMessage>
-         <successMessage>check ok</successMessage>
-         <returnValue>0</returnValue>
-      </expectations>
-   </TEST>
-</atn>
diff --git a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/test/pydraw_t.py b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/test/pydraw_t.py
index ca8ac86491652649db93d8bbffb51f558dfc3305..beda5748ef78c55dd2c4b2faddb1c0b73819bc81 100644
--- a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/test/pydraw_t.py
+++ b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/test/pydraw_t.py
@@ -1,19 +1,20 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #
-# $Id: pydraw_t.py,v 1.3 2009-02-24 03:22:49 ssnyder Exp $
 # File: pydraw_t.py
 # Created: Dec, 2008
 # Purpose: Regression tests for pydraw.py
 #
 
+from __future__ import print_function
+
 
 import sys
 
 
 def maxrep(x):
-    if x == sys.maxint:
-        return 'maxint'
+    if x == sys.maxsize:
+        return 'maxsize'
     return x
 
 
@@ -21,7 +22,7 @@ class Tree_Test:
     def GetEntries (self):
         return 10
     def GetEntry (self, i):
-        print 'GetEntry', i
+        print ('GetEntry', i)
         return
 
 
@@ -29,6 +30,7 @@ class Loop_Test:
     def  __init__ (self):
         self.foo = []
         self.bar = []
+        self.baz = []
         self.fee = 0
         return
     def loop (self, f, lo, hi):
@@ -37,6 +39,7 @@ class Loop_Test:
         for i in range(lo, hi):
             self.foo = [i*10+j for j in range(5)]
             self.bar = [i*10+j for j in range(5,10)]
+            self.baz = [x + 0.5 for x in self.bar]
             self.fee = i+0.5
             f(i, self)
         return
@@ -55,27 +58,27 @@ def _regr_parserange():
     >>> from PyAnalysisUtils.pydraw import Draw_Cmd
     >>> tt = Loop_Test()
     >>> c = Draw_Cmd ("tt.foo")
-    >>> print c.errstr, c.tuple, c.lo, maxrep(c.hi)
-    None tt 0 maxint
+    >>> print (c.errstr, c.tuple, c.lo, maxrep(c.hi))
+    None tt 0 maxsize
     >>> c = Draw_Cmd ("tt[10].foo")
-    >>> print c.errstr, c.tuple, c.lo, c.hi
+    >>> print (c.errstr, c.tuple, c.lo, c.hi)
     None tt 10 11
     >>> c = Draw_Cmd ("tt[10:].foo")
-    >>> print c.errstr, c.tuple, c.lo, maxrep(c.hi)
-    None tt 10 maxint
+    >>> print (c.errstr, c.tuple, c.lo, maxrep(c.hi))
+    None tt 10 maxsize
     >>> c = Draw_Cmd ("tt[:10].foo")
-    >>> print c.errstr, c.tuple, c.lo, c.hi
+    >>> print (c.errstr, c.tuple, c.lo, c.hi)
     None tt 0 10
     >>> c = Draw_Cmd ("tt[10:20].foo")
-    >>> print c.errstr, c.tuple, c.lo, c.hi
+    >>> print (c.errstr, c.tuple, c.lo, c.hi)
     None tt 10 20
     >>> ten = 10
     >>> twenty = 20
     >>> c = Draw_Cmd ("tt[ten:twenty].foo")
-    >>> print c.errstr, c.tuple, c.lo, c.hi
+    >>> print (c.errstr, c.tuple, c.lo, c.hi)
     None tt 10 20
     >>> c = Draw_Cmd ("(tt)[ten:twenty].foo")
-    >>> print c.errstr, c.tuple, c.lo, c.hi
+    >>> print (c.errstr, c.tuple, c.lo, c.hi)
     None tt 10 20
     """
 
@@ -87,46 +90,46 @@ def _regr_tupleparse():
     >>> from PyAnalysisUtils.pydraw import Draw_Cmd
     >>> tt = Loop_Test()
     >>> c = Draw_Cmd ("tt.foo")
-    >>> print c.errstr, c.tuple, c.lo, maxrep(c.hi), c.histspec, c.exprs, c.sel, c.stmts
-    None tt 0 maxint [] ['_e_foo'] None []
+    >>> print (c.errstr, c.tuple, c.lo, maxrep(c.hi), c.histspec, c.exprs, c.sel, c.stmts)
+    None tt 0 maxsize [] ['_e_foo'] None []
     >>> c = Draw_Cmd ("tt.foo:fee; bar")
-    >>> print c.errstr, c.tuple, c.lo, maxrep(c.hi), c.histspec, c.exprs, c.sel, c.stmts
-    None tt 0 maxint ['bar'] ['_e_foo', '_e_fee'] None []
+    >>> print (c.errstr, c.tuple, c.lo, maxrep(c.hi), c.histspec, c.exprs, c.sel, c.stmts)
+    None tt 0 maxsize ['bar'] ['_e_foo', '_e_fee'] None []
     >>> c = Draw_Cmd ("")
-    >>> print c.errstr
+    >>> print (c.errstr)
     Empty draw string.
     >>> c = Draw_Cmd ("tt")
-    >>> print c.errstr
+    >>> print (c.errstr)
     Missing period in tuple specification.
     >>> c = Draw_Cmd ("tt.a=b@d=c@foo; bar fee")
-    >>> print c.errstr, c.tuple, c.lo, maxrep(c.hi), c.histspec, c.exprs, c.sel, c.stmts
-    None tt 0 maxint ['bar', 'fee'] ['_e_foo'] None ['a=b', 'd=c']
+    >>> print (c.errstr, c.tuple, c.lo, maxrep(c.hi), c.histspec, c.exprs, c.sel, c.stmts)
+    None tt 0 maxsize ['bar', 'fee'] ['_e_foo'] None ['a=b', 'd=c']
     >>> c = Draw_Cmd ("tt.foo if bee==1")
-    >>> print c.errstr, c.tuple, c.lo, maxrep(c.hi), c.histspec, c.exprs, c.sel, c.stmts
-    None tt 0 maxint [] ['_e_foo'] bee==1 []
+    >>> print (c.errstr, c.tuple, c.lo, maxrep(c.hi), c.histspec, c.exprs, c.sel, c.stmts)
+    None tt 0 maxsize [] ['_e_foo'] bee==1 []
     >>> c = Draw_Cmd ("tt.[f in foo if f.x()] if bee==1")
-    >>> print c.errstr, c.tuple, c.lo, maxrep(c.hi), c.histspec, c.exprs, c.sel, c.stmts
-    None tt 0 maxint [] ['[f in _e_foo if f.x()]'] bee==1 []
+    >>> print (c.errstr, c.tuple, c.lo, maxrep(c.hi), c.histspec, c.exprs, c.sel, c.stmts)
+    None tt 0 maxsize [] ['[f in _e_foo if f.x()]'] bee==1 []
     >>> c = Draw_Cmd ("xx.bar")
-    >>> print c.errstr
+    >>> print (c.errstr)
     Can't find sample xx
     >>> c = Draw_Cmd ("tt[1/0].foo")
-    >>> print c.errstr
-    integer division or modulo by zero
+    >>> print (c.errstr.replace('integer ', '').replace ('or modulo ', ''))
+    division by zero
     >>> yy = 1
     >>> c = Draw_Cmd ("yy.bar")
-    >>> print c.errstr
+    >>> print (c.errstr)
     Sample yy doesn't have a correct interface.
     >>> zz = Tree_Test()
     >>> c = Draw_Cmd ("zz.bar")
-    >>> print c.errstr, c.tuple_o.__class__
-    None PyAnalysisUtils.pydraw.TreeLoopWrapper
+    >>> print (c.errstr, c.tuple_o.__class__.__name__)
+    None TreeLoopWrapper
     >>> c = Draw_Cmd ("tt.foo$i:bar$i if bar$i>0")
-    >>> print c.sel, c.sel_orig, c.exprs, c.expr_orig
+    >>> print (c.sel, c.sel_orig, c.exprs, c.expr_orig)
     _it_i_bar>0 bar$i>0 ['_it_i_foo', '_it_i_bar'] foo$i:bar$i
     >>> c = Draw_Cmd ("tt.foo; bar   baz")
-    >>> print c.errstr, c.tuple, c.lo, maxrep(c.hi), c.histspec, c.exprs, c.sel, c.stmts
-    None tt 0 maxint ['bar', 'baz'] ['_e_foo'] None []
+    >>> print (c.errstr, c.tuple, c.lo, maxrep(c.hi), c.histspec, c.exprs, c.sel, c.stmts)
+    None tt 0 maxsize ['bar', 'baz'] ['_e_foo'] None []
     """
 
 
@@ -136,15 +139,14 @@ def _regr_mung_id():
     >>> tt = Loop_Test()
     >>> from PyAnalysisUtils.pydraw import Draw_Cmd
     >>> c = Draw_Cmd ("tt.foo")
-    >>> print c._mung_id ("foo")
+    >>> print (c._mung_id ("foo"))
     _e_foo
-    >>> print c._mung_id ("bar")
+    >>> print (c._mung_id ("bar"))
     _e_bar
-    >>> print c._mung_id ("foo")
+    >>> print (c._mung_id ("foo"))
     _e_foo
-    >>> from test.test_support import sortdict
-    >>> print sortdict (c._iddict)
-    {'bar': '_e_bar', 'foo': '_e_foo'}
+    >>> print (sorted (c._iddict.items()))
+    [('bar', '_e_bar'), ('foo', '_e_foo')]
     """
 
 
@@ -155,28 +157,27 @@ def _regr_mung_index():
     >>> tt = Loop_Test()
     >>> from PyAnalysisUtils.pydraw import Draw_Cmd
     >>> c = Draw_Cmd ("tt.foo")
-    >>> print c._mung_index ("foo", "2"), c.errstr
+    >>> print (c._mung_index ("foo", "2"), c.errstr)
     _e_foo[1] None
-    >>> print c._mung_index ("foo", "x"), c.errstr
+    >>> print (c._mung_index ("foo", "x"), c.errstr)
      Bad index
     >>> c.errstr = None
-    >>> print c._mung_index ("foo", "0"), c.errstr
+    >>> print (c._mung_index ("foo", "0"), c.errstr)
      Bad index
     >>> c.errstr = None
-    >>> print c._mung_index ("...", "2"), c.errstr
+    >>> print (c._mung_index ("...", "2"), c.errstr)
      Bad index
     >>> c.errstr = None
-    >>> from test.test_support import sortdict
-    >>> print sortdict (c._limdict)
-    {'foo': 2}
-    >>> print c._mung_index ("foo", "3"), c.errstr
+    >>> print (sorted (c._limdict.items()))
+    [('foo', 2)]
+    >>> print (c._mung_index ("foo", "3"), c.errstr)
     _e_foo[2] None
-    >>> print sortdict (c._limdict)
-    {'foo': 3}
-    >>> print c._mung_index ("foo", "1"), c.errstr
+    >>> print (sorted (c._limdict.items()))
+    [('foo', 3)]
+    >>> print (c._mung_index ("foo", "1"), c.errstr)
     _e_foo[0] None
-    >>> print sortdict (c._limdict)
-    {'foo': 3}
+    >>> print (sorted (c._limdict.items()))
+    [('foo', 3)]
     """
 
 
@@ -187,7 +188,7 @@ def _regr_mung_n():
     >>> tt = Loop_Test()
     >>> from PyAnalysisUtils.pydraw import Draw_Cmd
     >>> c = Draw_Cmd ("tt.foo")
-    >>> print c._mung_n ("abc*", "nfoo+2"), c.errstr
+    >>> print (c._mung_n ("abc*", "nfoo+2"), c.errstr)
     abc* len(_e_foo)+2 None
     """
 
@@ -197,25 +198,25 @@ def _regr_Loopvar():
     >>> from PyAnalysisUtils import pydraw
     >>> from PyAnalysisUtils.pydraw import _Loopvar
     >>> l = _Loopvar ('a')
-    >>> print l.name
+    >>> print (l.name)
     a
-    >>> print l.explicit
+    >>> print (l.explicit)
     0
     >>> l.explicit = 1
-    >>> print l.explicit
+    >>> print (l.explicit)
     1
-    >>> print l.get_ids()
+    >>> print (l.get_ids())
     []
-    >>> print l.itname ('foo')
+    >>> print (l.itname ('foo'))
     _it_a_foo
-    >>> print l.dumname()
+    >>> print (l.dumname())
     _dum_a
-    >>> print l.add_id ('foo')
+    >>> print (l.add_id ('foo'))
     _it_a_foo
-    >>> print l.add_id ('bar')
+    >>> print (l.add_id ('bar'))
     _it_a_bar
-    >>> print l.get_ids()
-    ['foo', 'bar']
+    >>> print (sorted (l.get_ids()))
+    ['bar', 'foo']
     """
 
 
@@ -226,28 +227,27 @@ def _regr_mung_loop():
     >>> tt = Loop_Test()
     >>> from PyAnalysisUtils.pydraw import Draw_Cmd
     >>> c = Draw_Cmd ("tt.foo")
-    >>> print c._mung_loop ('1+foo', 'i+2'), c.errstr
+    >>> print (c._mung_loop ('1+foo', 'i+2'), c.errstr)
     1+_it_i_foo+2 None
-    >>> print c._mung_loop ('1+foo', ''), c.errstr
+    >>> print (c._mung_loop ('1+foo', ''), c.errstr)
      Bad loop var
     >>> c.errstr = None
-    >>> print c._mung_loop ('1+', 'j+2'), c.errstr
+    >>> print (c._mung_loop ('1+', 'j+2'), c.errstr)
     1+_dum_j+2 None
-    >>> print c._mung_loop ('1+bar', 'i+2'), c.errstr
+    >>> print (c._mung_loop ('1+bar', 'i+2'), c.errstr)
     1+_it_i_bar+2 None
-    >>> print c._mung_loop ('1+bar', 'j+2'), c.errstr
+    >>> print (c._mung_loop ('1+bar', 'j+2'), c.errstr)
     1+_it_j_bar+2 None
-    >>> print c._mung_loop ('', 'j'), c.errstr
+    >>> print (c._mung_loop ('', 'j'), c.errstr)
     _dum_j None
-    >>> print c._mung_loop ('l', 'j'), c.errstr
+    >>> print (c._mung_loop ('l', 'j'), c.errstr)
     _it_j_l None
-    >>> ll = c._loopdict.keys()
-    >>> ll.sort()
-    >>> print ll
+    >>> ll = sorted(c._loopdict.keys())
+    >>> print (ll)
     ['i', 'j']
-    >>> print c._loopdict['i'].get_ids(), c._loopdict['i'].explicit
-    ['foo', 'bar'] 0
-    >>> print c._loopdict['j'].get_ids(), c._loopdict['j'].explicit
+    >>> print (sorted(c._loopdict['i'].get_ids()), c._loopdict['i'].explicit)
+    ['bar', 'foo'] 0
+    >>> print (sorted(c._loopdict['j'].get_ids()), c._loopdict['j'].explicit)
     ['bar', 'l'] 1
     """
 
@@ -259,19 +259,19 @@ def _regr_mung_expr_dollar():
     >>> tt = Loop_Test()
     >>> from PyAnalysisUtils.pydraw import Draw_Cmd
     >>> c = Draw_Cmd ("tt.foo")
-    >>> print c._mung_expr_dollar ("1+foo+2"), c.errstr
+    >>> print (c._mung_expr_dollar ("1+foo+2"), c.errstr)
     1+foo+2 None
-    >>> print c._mung_expr_dollar ("1+foo$i+len('$foo')+bar $1+$i+2"), c.errstr
+    >>> print (c._mung_expr_dollar ("1+foo$i+len('$foo')+bar $1+$i+2"), c.errstr)
     1+_it_i_foo+len('$foo')+_e_bar[0]+_dum_i+2 None
-    >>> print c._mung_expr_dollar ("foo$i+($i+2)"), c.errstr
+    >>> print (c._mung_expr_dollar ("foo$i+($i+2)"), c.errstr)
     _it_i_foo+(_dum_i+2) None
-    >>> print c._mung_expr_dollar ("1+$nfoo+bar$n+2"), c.errstr
+    >>> print (c._mung_expr_dollar ("1+$nfoo+bar$n+2"), c.errstr)
     1+ len(_e_foo)+_it_n_bar+2 None
-    >>> print c._mung_expr_dollar ("1+$+2"), c.errstr
+    >>> print (c._mung_expr_dollar ("1+$+2"), c.errstr)
     1+$+2 None
-    >>> print c._mung_expr_dollar (None), c.errstr
+    >>> print (c._mung_expr_dollar (None), c.errstr)
     None None
-    >>> print c._mung_expr_dollar ("cond and $nfoo>0"), c.errstr
+    >>> print (c._mung_expr_dollar ("cond and $nfoo>0"), c.errstr)
     cond and len(_e_foo)>0 None
     """
 
@@ -284,11 +284,11 @@ def _regr_mung_expr_ids():
     >>> tt.foo=[1,2,3,4]
     >>> from PyAnalysisUtils.pydraw import Draw_Cmd
     >>> c = Draw_Cmd ("tt.foo")
-    >>> print c._mung_expr_ids ("1+xyz+2"), c.errstr
+    >>> print (c._mung_expr_ids ("1+xyz+2"), c.errstr)
     1+xyz+2 None
-    >>> print c._mung_expr_ids ("1+foo+2"), c.errstr
+    >>> print (c._mung_expr_ids ("1+foo+2"), c.errstr)
     1+_e_foo+2 None
-    >>> print c._mung_expr_ids (None), c.errstr
+    >>> print (c._mung_expr_ids (None), c.errstr)
     None None
     """
 
@@ -301,9 +301,9 @@ def _regr_mung_expr():
     >>> tt.foo=[1,2,3,4]
     >>> from PyAnalysisUtils.pydraw import Draw_Cmd
     >>> c = Draw_Cmd ("tt.foo")
-    >>> print c._mung_expr ("1+foo+bar$i+2"), c.errstr
+    >>> print (c._mung_expr ("1+foo+bar$i+2"), c.errstr)
     1+_e_foo+_it_i_bar+2 None
-    >>> print c._mung_expr (None), c.errstr
+    >>> print (c._mung_expr (None), c.errstr)
     None None
     """
 
@@ -316,59 +316,59 @@ def _regr_make_func():
     >>> from PyAnalysisUtils.pydraw import Draw_Cmd
     >>> pydraw._debug = True
     >>> c = Draw_Cmd ("tt.asd")
-    >>> print c._make_func ("foo()"), c.errstr
+    >>> print (c._make_func ("foo()"), c.errstr)
     def _loopfunc(_i, _ev):
       foo()
     <BLANKLINE>
     def _loopfunc(_i, _ev):
       foo()
-    None
+     None
     >>> pydraw._debug = False
     >>> c = Draw_Cmd ("tt.bar$i+bar$1+$i+fee$j if fee$j<10")
-    >>> print c._make_func ("foo()"), c.errstr
+    >>> print (c._make_func ("foo()"), c.errstr)
     def _loopfunc(_i, _ev):
-      _e_fee = _ev.fee
       _e_bar = _ev.bar
+      _e_fee = _ev.fee
       for (_dum_i,_it_i_bar) in enumerate(_e_bar):
         for _it_j_fee in _e_fee:
           if (len(_e_bar)>=1 and (_it_j_fee<10)):
             foo()
-    None
+     None
     >>> c = Draw_Cmd ("tt.ele=_ev.xx@ele[0]")
-    >>> print c._make_func ("foo()"), c.errstr
+    >>> print (c._make_func ("foo()"), c.errstr)
     def _loopfunc(_i, _ev):
       ele=_ev.xx
       foo()
-    None
+     None
     >>> c = Draw_Cmd ("tt.foo$10")
-    >>> print c._make_func ("foo()"), c.errstr
+    >>> print (c._make_func ("foo()"), c.errstr)
     def _loopfunc(_i, _ev):
       _e_foo = _ev.foo
       if (len(_e_foo)>=10):
         foo()
-    None
+     None
     >>> c = Draw_Cmd ("tt.foo$i+bar$i")
-    >>> print c._make_func ("foo()"), c.errstr
+    >>> print (c._make_func ("foo()"), c.errstr)
     def _loopfunc(_i, _ev):
-      _e_foo = _ev.foo
       _e_bar = _ev.bar
-      for (_it_i_foo,_it_i_bar) in zip(_e_foo,_e_bar):
+      _e_foo = _ev.foo
+      for (_it_i_bar,_it_i_foo) in zip(_e_bar,_e_foo):
         foo()
-    None
+     None
     >>> c = Draw_Cmd ("tt.foo$i if ($i%2)==0 and max(bar)<10")
-    >>> print c._make_func ("foo()"), c.errstr
+    >>> print (c._make_func ("foo()"), c.errstr)
     def _loopfunc(_i, _ev):
-      _e_foo = _ev.foo
       _e_bar = _ev.bar
+      _e_foo = _ev.foo
       for (_dum_i,_it_i_foo) in enumerate(_e_foo):
         if ((_dum_i%2)==0 and max(_e_bar)<10):
           foo()
-    None
+     None
     """
 
 
 def floop(i, e):
-    print 'floop', i, e.__class__.__name__
+    print ('floop', i, e.__class__.__name__)
     return
 
 def _regr_tree_loop_wrapper():
@@ -410,43 +410,42 @@ def _regr_get_hist():
     >>> pydraw._globals = globals()
     >>> from PyAnalysisUtils.pydraw import _get_hist
     >>> (h, opt) = _get_hist (1, ['50','0','10'], "tmp1", "tmp2")
-    >>> print h.__class__.__name__, h.GetName(), h.GetTitle()
+    >>> print (h.__class__.__name__, h.GetName(), h.GetTitle())
     TH1F tmp1 tmp2
-    >>> print h.GetXaxis().GetNbins(), h.GetXaxis().GetXmin(), \
-        h.GetXaxis().GetXmax(), bool (pydraw._hasCanRebin (h))
+    >>> print (h.GetXaxis().GetNbins(), h.GetXaxis().GetXmin(), h.GetXaxis().GetXmax(), bool (pydraw._hasCanRebin (h)))
     50 0.0 10.0 False
-    >>> print opt
+    >>> print (opt)
     <BLANKLINE>
     >>> (h, opt) = _get_hist (1, [], "tmp1", "tmp2")
-    >>> print h.__class__.__name__, h.GetName(), h.GetTitle()
+    >>> print (h.__class__.__name__, h.GetName(), h.GetTitle())
     TH1F tmp1 tmp2
-    >>> print h.GetXaxis().GetNbins(), h.GetXaxis().GetXmin(), \
-        h.GetXaxis().GetXmax(), bool (pydraw._hasCanRebin (h))
+    >>> print (h.GetXaxis().GetNbins(), h.GetXaxis().GetXmin(), \
+        h.GetXaxis().GetXmax(), bool (pydraw._hasCanRebin (h)))
     50 0.0 1.0 True
-    >>> print opt
+    >>> print (opt)
     <BLANKLINE>
     >>> (h, opt) = _get_hist (2, ['50','0','10','10','2','5','fooopt'], "tmp1", "tmp2")
-    >>> print h.__class__.__name__, h.GetName(), h.GetTitle()
-    RootUtils::ScatterH2 tmp1 tmp2
-    >>> print h.GetXaxis().GetNbins(), h.GetXaxis().GetXmin(), \
-        h.GetXaxis().GetXmax(), bool (pydraw._hasCanRebin (h))
+    >>> print (h.__class__.__name__, h.GetName(), h.GetTitle())
+    ScatterH2 tmp1 tmp2
+    >>> print (h.GetXaxis().GetNbins(), h.GetXaxis().GetXmin(), \
+        h.GetXaxis().GetXmax(), bool (pydraw._hasCanRebin (h)))
     50 0.0 10.0 False
-    >>> print h.GetYaxis().GetNbins(), h.GetYaxis().GetXmin(), \
-        h.GetYaxis().GetXmax(), bool (h.scatter())
+    >>> print (h.GetYaxis().GetNbins(), h.GetYaxis().GetXmin(), \
+        h.GetYaxis().GetXmax(), bool (h.scatter()))
     10 2.0 5.0 True
-    >>> print opt
+    >>> print (opt)
     fooopt
     >>> del h
     >>> (h, opt) = _get_hist (2, ['50','0','10','10','2','5','fooopt','prof'], "tmp1", "tmp2")
-    >>> print h.__class__.__name__, h.GetName(), h.GetTitle()
+    >>> print (h.__class__.__name__, h.GetName(), h.GetTitle())
     TProfile tmp1 tmp2
-    >>> print h.GetXaxis().GetNbins(), h.GetXaxis().GetXmin(), \
-        h.GetXaxis().GetXmax(), bool (pydraw._hasCanRebin (h))
+    >>> print (h.GetXaxis().GetNbins(), h.GetXaxis().GetXmin(), \
+        h.GetXaxis().GetXmax(), bool (pydraw._hasCanRebin (h)))
     50 0.0 10.0 False
-    >>> print h.GetYaxis().GetNbins(), h.GetYaxis().GetXmin(), \
-        h.GetYaxis().GetXmax(), h.GetMinimum(), h.GetMaximum()
+    >>> print (h.GetYaxis().GetNbins(), h.GetYaxis().GetXmin(), \
+        h.GetYaxis().GetXmax(), h.GetMinimum(), h.GetMaximum())
     1 0.0 1.0 2.0 5.0
-    >>> print opt
+    >>> print (opt)
     fooopt 
     """
 
@@ -465,11 +464,11 @@ def _regr_draw():
         _hfill (_it_i_foo)
     <BLANKLINE>
     True
-    >>> print pydraw.last_hist.GetName(), pydraw.last_hist.GetTitle()
-    foo$i tt.foo$i
-    >>> print pydraw.last_hist.GetXaxis().GetNbins()
+    >>> print (pydraw.last_hist.GetName(), pydraw.last_hist.GetTitle())
+    tt.foo$i tt.foo$i
+    >>> print (pydraw.last_hist.GetXaxis().GetNbins())
     30
-    >>> print [pydraw.last_hist.GetBinContent(i) for i in range(1,31)]
+    >>> print ([pydraw.last_hist.GetBinContent(i) for i in range(1,31)])
     [5.0, 0.0, 5.0, 0.0, 5.0, 0.0, 5.0, 0.0, 5.0, 0.0, 5.0, 0.0, 5.0, 0.0, 5.0, 0.0, 5.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
     >>> draw("tt.foo$i if ($i%2)==0; 30 0 150")
     def _loopfunc(_i, _ev, _hfill = _hfill):
@@ -479,11 +478,11 @@ def _regr_draw():
           _hfill (_it_i_foo)
     <BLANKLINE>
     True
-    >>> print pydraw.last_hist.GetName(), pydraw.last_hist.GetTitle()
-    foo$i tt.foo$i{($i%2)==0}
-    >>> print pydraw.last_hist.GetXaxis().GetNbins()
+    >>> print (pydraw.last_hist.GetName(), pydraw.last_hist.GetTitle())
+    tt.foo$i tt.foo$i{($i%2)==0}
+    >>> print (pydraw.last_hist.GetXaxis().GetNbins())
     30
-    >>> print [pydraw.last_hist.GetBinContent(i) for i in range(1,31)]
+    >>> print ([pydraw.last_hist.GetBinContent(i) for i in range(1,31)])
     [3.0, 0.0, 3.0, 0.0, 3.0, 0.0, 3.0, 0.0, 3.0, 0.0, 3.0, 0.0, 3.0, 0.0, 3.0, 0.0, 3.0, 0.0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
     >>> h1 = ROOT.TH1F ('h1', 'h1', 40, 0, 120)
     >>> draw("tt.foo$i; >>h1")
@@ -493,11 +492,11 @@ def _regr_draw():
         _hfill (_it_i_foo)
     <BLANKLINE>
     True
-    >>> print id(h1) == id(pydraw.last_hist)
+    >>> print (id(h1) == id(pydraw.last_hist))
     True
-    >>> print pydraw.last_hist.GetXaxis().GetNbins()
+    >>> print (pydraw.last_hist.GetXaxis().GetNbins())
     40
-    >>> print [pydraw.last_hist.GetBinContent(i) for i in range(1,31)]
+    >>> print ([pydraw.last_hist.GetBinContent(i) for i in range(1,31)])
     [3.0, 2.0, 0.0, 2.0, 3.0, 0.0, 1.0, 3.0, 1.0, 0.0, 3.0, 2.0, 0.0, 2.0, 3.0, 0.0, 1.0, 3.0, 1.0, 0.0, 3.0, 2.0, 0.0, 2.0, 3.0, 0.0, 1.0, 3.0, 1.0, 0.0]
     >>> draw("tt.foo$i; !")
     def _loopfunc(_i, _ev, _hfill = _hfill):
@@ -506,42 +505,42 @@ def _regr_draw():
         _hfill (_it_i_foo)
     <BLANKLINE>
     True
-    >>> print id(h1) == id(pydraw.last_hist)
+    >>> print (id(h1) == id(pydraw.last_hist))
     True
-    >>> print pydraw.last_hist.GetXaxis().GetNbins()
+    >>> print (pydraw.last_hist.GetXaxis().GetNbins())
     40
-    >>> print [pydraw.last_hist.GetBinContent(i) for i in range(1,31)]
+    >>> print ([pydraw.last_hist.GetBinContent(i) for i in range(1,31)])
     [6.0, 4.0, 0.0, 4.0, 6.0, 0.0, 2.0, 6.0, 2.0, 0.0, 6.0, 4.0, 0.0, 4.0, 6.0, 0.0, 2.0, 6.0, 2.0, 0.0, 6.0, 4.0, 0.0, 4.0, 6.0, 0.0, 2.0, 6.0, 2.0, 0.0]
     >>> draw("alkskjd")
     Missing period in tuple specification.
     False
     >>> draw("tt.foo$i:bar$i")
     def _loopfunc(_i, _ev, _hfill = _hfill):
-      _e_foo = _ev.foo
       _e_bar = _ev.bar
-      for (_it_i_foo,_it_i_bar) in zip(_e_foo,_e_bar):
+      _e_foo = _ev.foo
+      for (_it_i_bar,_it_i_foo) in zip(_e_bar,_e_foo):
         _hfill ((_it_i_foo),(_it_i_bar))
     <BLANKLINE>
     True
-    >>> print pydraw.last_hist.GetName(), pydraw.last_hist.GetTitle()
-    foo$i:bar$i tt.foo$i:bar$i
-    >>> print pydraw.last_hist.GetXaxis().GetNbins()
+    >>> print (pydraw.last_hist.GetName(), pydraw.last_hist.GetTitle())
+    tt.foo$i:bar$i tt.foo$i:bar$i
+    >>> print (pydraw.last_hist.GetXaxis().GetNbins())
     50
-    >>> print pydraw.last_hist.GetYaxis().GetNbins()
+    >>> print (pydraw.last_hist.GetYaxis().GetNbins())
     50
     >>> draw("tt.foo$i:bar$i; 5 0 150 5 0 150")
     def _loopfunc(_i, _ev, _hfill = _hfill):
-      _e_foo = _ev.foo
       _e_bar = _ev.bar
-      for (_it_i_foo,_it_i_bar) in zip(_e_foo,_e_bar):
+      _e_foo = _ev.foo
+      for (_it_i_bar,_it_i_foo) in zip(_e_bar,_e_foo):
         _hfill ((_it_i_foo),(_it_i_bar))
     <BLANKLINE>
     True
-    >>> print pydraw.last_hist.GetXaxis().GetNbins()
+    >>> print (pydraw.last_hist.GetXaxis().GetNbins())
     5
-    >>> print pydraw.last_hist.GetYaxis().GetNbins()
+    >>> print (pydraw.last_hist.GetYaxis().GetNbins())
     5
-    >>> print [pydraw.last_hist.GetBinContent(i) for i in range(1,26)]
+    >>> print ([pydraw.last_hist.GetBinContent(i) for i in range(1,26)])
     [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 15.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 15.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 15.0, 0.0]
     >>> draw("tt.fee; 10 0 10")
     def _loopfunc(_i, _ev, _hfill = _hfill):
@@ -549,7 +548,7 @@ def _regr_draw():
       _hfill (_e_fee)
     <BLANKLINE>
     True
-    >>> print [pydraw.last_hist.GetBinContent(i) for i in range(0,11)]
+    >>> print ([pydraw.last_hist.GetBinContent(i) for i in range(0,11)])
     [0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]
     """
 
@@ -565,63 +564,63 @@ def _regr_scan():
     >>> scan("asdasd")
     Missing period in tuple specification.
     False
-    >>> scan("tt.foo$i:bar$i")
+    >>> scan("tt.foo$i:baz$i")
     def _loopfunc(_i, _ev, _print = _print):
+      _e_baz = _ev.baz
       _e_foo = _ev.foo
-      _e_bar = _ev.bar
-      for (_it_i_foo,_it_i_bar) in zip(_e_foo,_e_bar):
-        _print (_i, (_it_i_foo),(_it_i_bar))
+      for (_it_i_baz,_it_i_foo) in zip(_e_baz,_e_foo):
+        _print (_i, (_it_i_foo),(_it_i_baz))
     <BLANKLINE>
-         0        0        5
-         0        1        6
-         0        2        7
-         0        3        8
-         0        4        9
-         1       10       15
-         1       11       16
-         1       12       17
-         1       13       18
-         1       14       19
-         2       20       25
-         2       21       26
-         2       22       27
-         2       23       28
-         2       24       29
-         3       30       35
-         3       31       36
-         3       32       37
-         3       33       38
-         3       34       39
-         4       40       45
-         4       41       46
-         4       42       47
-         4       43       48
-         4       44       49
-         5       50       55
-         5       51       56
-         5       52       57
-         5       53       58
-         5       54       59
-         6       60       65
-         6       61       66
-         6       62       67
-         6       63       68
-         6       64       69
-         7       70       75
-         7       71       76
-         7       72       77
-         7       73       78
-         7       74       79
-         8       80       85
-         8       81       86
-         8       82       87
-         8       83       88
-         8       84       89
-         9       90       95
-         9       91       96
-         9       92       97
-         9       93       98
-         9       94       99
+         0        0      5.5
+         0        1      6.5
+         0        2      7.5
+         0        3      8.5
+         0        4      9.5
+         1       10     15.5
+         1       11     16.5
+         1       12     17.5
+         1       13     18.5
+         1       14     19.5
+         2       20     25.5
+         2       21     26.5
+         2       22     27.5
+         2       23     28.5
+         2       24     29.5
+         3       30     35.5
+         3       31     36.5
+         3       32     37.5
+         3       33     38.5
+         3       34     39.5
+         4       40     45.5
+         4       41     46.5
+         4       42     47.5
+         4       43     48.5
+         4       44     49.5
+         5       50     55.5
+         5       51     56.5
+         5       52     57.5
+         5       53     58.5
+         5       54     59.5
+         6       60     65.5
+         6       61     66.5
+         6       62     67.5
+         6       63     68.5
+         6       64     69.5
+         7       70     75.5
+         7       71     76.5
+         7       72     77.5
+         7       73     78.5
+         7       74     79.5
+         8       80     85.5
+         8       81     86.5
+         8       82     87.5
+         8       83     88.5
+         8       84     89.5
+         9       90     95.5
+         9       91     96.5
+         9       92     97.5
+         9       93     98.5
+         9       94     99.5
     True
     >>> scan("tt[0:2].foo$i")
     def _loopfunc(_i, _ev, _print = _print):
@@ -666,9 +665,9 @@ def _regr_loop():
     >>> xsum[0]=0
     >>> loop("tt.sum(foo$i):sum(bar$i)")
     def _loopfunc(_i, _ev):
-      _e_foo = _ev.foo
       _e_bar = _ev.bar
-      for (_it_i_foo,_it_i_bar) in zip(_e_foo,_e_bar):
+      _e_foo = _ev.foo
+      for (_it_i_bar,_it_i_foo) in zip(_e_bar,_e_foo):
         (sum(_it_i_foo),sum(_it_i_bar),)
     <BLANKLINE>
     True
@@ -818,7 +817,7 @@ p.Range(0, 1,2,3)
 
 from PyUtils import coverage
 c = coverage.Coverage ('PyAnalysisUtils.pydraw')
-print ''
+print ('')
 c.doctest_cover ()
 
 #from PyAnalysisUtils import pydraw
diff --git a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/test/root_pickle_t.py b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/test/root_pickle_t.py
index 9b80e304365eab55c02bfe878d27d2cf8f49af6e..3214f9da015ab23c95434522d6559435cd8a7f83 100644
--- a/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/test/root_pickle_t.py
+++ b/PhysicsAnalysis/PyAnalysis/PyAnalysisUtils/test/root_pickle_t.py
@@ -1,12 +1,13 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #
-# $Id$
 # File: root_pickle_t.py
 # Created: Oct, 2012
 # Purpose: Regression tests for root_pickle.py
 #
 
+from __future__ import print_function
+
 
 def _regr_basic():
     """Very basic root_pickle test.
@@ -18,19 +19,13 @@ def _regr_basic():
     >>> root_pickle.dump_root (l1, 'test.root')
     >>> l2 = root_pickle.load_root ('test.root')
     >>> assert len(l2) == 2
-    >>> print [h.GetName() for h in l2]
+    >>> print ([h.GetName() for h in l2])
     ['h1', 'h2']
     >>> import os
     >>> os.remove ('test.root')
 """
     
-
-
-#from PyUtils import coverage
-#c = coverage.Coverage ('PyAnalysisUtils.pydraw')
-#c.doctest_cover ()
-
 import doctest
-print ''
+print ('PyAnalysisUtils/root_pickle_t')
 doctest.testmod()
 
diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/util/SUSYToolsTester.cxx b/PhysicsAnalysis/SUSYPhys/SUSYTools/util/SUSYToolsTester.cxx
index 3c0461697cea314c3374b96b23abe82e835c184e..714dbc897b90d208889f69b62905403b585d5203 100644
--- a/PhysicsAnalysis/SUSYPhys/SUSYTools/util/SUSYToolsTester.cxx
+++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/util/SUSYToolsTester.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // $Id: SUSYToolsTester_opt.cxx 696994 2015-09-26 20:40:26Z khoo $
@@ -210,7 +210,7 @@ int main( int argc, char* argv[] ) {
 est.pool.root",relN,(isData?"Data":"MC"),SUSYx);
   }
   Info( APP_NAME, "Opening file: %s", fileName.Data() );
-  std::auto_ptr< TFile > ifile( TFile::Open( fileName, "READ" ) );
+  std::unique_ptr< TFile > ifile( TFile::Open( fileName, "READ" ) );
   ANA_CHECK( ifile.get() );
 
   // Create a TEvent object:
@@ -234,7 +234,7 @@ est.pool.root",relN,(isData?"Data":"MC"),SUSYx);
 
   // Open up an output file.  Not needed for this example.  If you wish to enable
   // this, please don't forget to add the call to fill towards the end of the code!
-  //std::auto_ptr< TFile > ofile( TFile::Open( "out.root", "RECREATE" ) );
+  //std::unique_ptr< TFile > ofile( TFile::Open( "out.root", "RECREATE" ) );
   //ANA_CHECK( event.writeTo( ofile.get() ) );
 
   // Decide how many events to run over:
diff --git a/Projects/Athena/cmake/PreConfig.cmake.in b/Projects/Athena/cmake/PreConfig.cmake.in
index 3bf7874bda404884e5ef0c53d8460399d1eea31d..7ab85c3097c5fd49b660d0f601f5a8e390892629 100644
--- a/Projects/Athena/cmake/PreConfig.cmake.in
+++ b/Projects/Athena/cmake/PreConfig.cmake.in
@@ -9,15 +9,25 @@ set( ATLAS_FLAKE8 "@ATLAS_FLAKE8@"
 set( ATLAS_PYTHON_CHECKER "@ATLAS_PYTHON_CHECKER@"
    CACHE STRING "Python checker command to run during Python module compilation" )
 
-# Due to the way CMake handles propagation of targets to dependees,
-# any "external" that is used through imported targets in the build need
-# to be imported explicitly here.
+# Figure out whether to use QUIET in the following calls.
 set( _quietFlag )
 if( Athena_FIND_QUIETLY )
   set( _quietFlag QUIET )
 endif()
+
+# Set up the correct version of LCG. While AthenaExternals does this as well,
+# we need to do it explicitly here, to make the following find_package calls
+# find the packages correctly.
+set( LCG_VERSION_POSTFIX @LCG_VERSION_POSTFIX@ )
+find_package( LCG @LCG_VERSION_NUMBER@ REQUIRED EXACT ${_quietFlag} )
+
+# Due to the way CMake handles propagation of targets to dependees,
+# any "external" that is used through imported targets in the build need
+# to be imported explicitly here.
 find_package( Acts ${_quietFlag} COMPONENTS Core )
 find_package( nlohmann_json ${_quietFlag} )
 find_package( Qt5 ${_quietFlag} COMPONENTS Core OpenGL Gui PrintSupport Widgets
    Sql Network )
+
+# Clean up.
 unset( _quietFlag )
diff --git a/Reconstruction/EventShapes/EventShapeAthenaPool/src/EventShapeStoreCnv.cxx b/Reconstruction/EventShapes/EventShapeAthenaPool/src/EventShapeStoreCnv.cxx
index 5b8deedfa48cab535f9de0d9c9ef104996bb7c88..189b92e9be62da38e363eb61b6054bcfe1d94db7 100644
--- a/Reconstruction/EventShapes/EventShapeAthenaPool/src/EventShapeStoreCnv.cxx
+++ b/Reconstruction/EventShapes/EventShapeAthenaPool/src/EventShapeStoreCnv.cxx
@@ -23,7 +23,7 @@ EventShapeStore* EventShapeStoreCnv::createTransient()
   if( compareClassGuid(p1_guid) )
     {
       EventShapeStoreCnv_p1   TPconverter;
-      // using auto_ptr ensures deletion of the persistent object
+      // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr<EventShapeStore_p1> shapestore( poolReadObject< EventShapeStore_p1 >() );
       MsgStream report( msgSvc(), "EventShapeStoreCnv" );
       report << MSG::INFO << "Reading EventShapeStore_p1" << endmsg; 
diff --git a/Reconstruction/HeavyIonRec/HIRecAthenaPool/src/EtaPhiBinsCnv.cxx b/Reconstruction/HeavyIonRec/HIRecAthenaPool/src/EtaPhiBinsCnv.cxx
index 7a176ec039106af2eb78f8c44c92a8c8061a591e..3160c01426b158873784c5593a8fdd77e7759ce6 100755
--- a/Reconstruction/HeavyIonRec/HIRecAthenaPool/src/EtaPhiBinsCnv.cxx
+++ b/Reconstruction/HeavyIonRec/HIRecAthenaPool/src/EtaPhiBinsCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************************
@@ -66,8 +66,8 @@ EtaPhiBins* EtaPhiBinsCnv::createTransient()
 
   } else if ( compareClassGuid(p1_guid) ) {
 
-    // using auto_ptr ensures deletion of the persistent object
-    std::auto_ptr<EtaPhiBins_p1> persObj( poolReadObject<EtaPhiBins_p1>() );
+    // using unique_ptr ensures deletion of the persistent object
+    std::unique_ptr<EtaPhiBins_p1> persObj( poolReadObject<EtaPhiBins_p1>() );
     EtaPhiBinsCnv_p1 cnv;
     transObj = cnv.createTransient( persObj.get(), msg );
   } else {
diff --git a/Reconstruction/Jet/JetAnalysisTools/JetTileCorrection/util/JetTileCorrectionTester.cxx b/Reconstruction/Jet/JetAnalysisTools/JetTileCorrection/util/JetTileCorrectionTester.cxx
index 0b247245a1273a5cdf9589b14d5ddc3c97ad6849..18842873894ed8d16e7d4aee224f13118538af97 100644
--- a/Reconstruction/Jet/JetAnalysisTools/JetTileCorrection/util/JetTileCorrectionTester.cxx
+++ b/Reconstruction/Jet/JetAnalysisTools/JetTileCorrection/util/JetTileCorrectionTester.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /// @file JetTileCorrectionTester.cxx
@@ -82,7 +82,7 @@ int main( int argc, char* argv[] )
   // Open the input file
   const TString fileName = argv[ 1 ];
   Info(APP_NAME, "Opening file: %s", fileName.Data());
-  std::auto_ptr<TFile> ifile(TFile::Open(fileName, "READ"));
+  std::unique_ptr<TFile> ifile(TFile::Open(fileName, "READ"));
   CHECK( ifile.get() );
 
   // Create a TEvent object
diff --git a/Reconstruction/Jet/JetInterface/JetInterface/IJetDecorator.h b/Reconstruction/Jet/JetInterface/JetInterface/IJetDecorator.h
index 55d4ff161a66a80775106e1259683a3910d85fa7..59c07562869c2f8e4b6bb4fe97a19189cbfe13ec 100644
--- a/Reconstruction/Jet/JetInterface/JetInterface/IJetDecorator.h
+++ b/Reconstruction/Jet/JetInterface/JetInterface/IJetDecorator.h
@@ -26,7 +26,6 @@ ASG_TOOL_INTERFACE(IJetDecorator)
 public:
 
   /// Decorate a jet collection without otherwise modifying it.
-  /// Returns 0 for success.
   virtual StatusCode decorate(const xAOD::JetContainer& jets) const = 0;
 
   /// Concrete implementation of the function inherited from IJetModifier.
diff --git a/Reconstruction/Jet/JetMomentTools/Root/JetClusterMomentsTool.cxx b/Reconstruction/Jet/JetMomentTools/Root/JetClusterMomentsTool.cxx
index 5807ef0713e81bb77cdc1946904e9295067e76f2..64682f072574e3676a382a0acbb2dd567a815c13 100644
--- a/Reconstruction/Jet/JetMomentTools/Root/JetClusterMomentsTool.cxx
+++ b/Reconstruction/Jet/JetMomentTools/Root/JetClusterMomentsTool.cxx
@@ -13,7 +13,7 @@ JetClusterMomentsTool::JetClusterMomentsTool(const std::string& name)
 
 StatusCode JetClusterMomentsTool::initialize(){
   if(m_jetContainerName.empty()){
-    ATH_MSG_ERROR("JetBadChanCorrTool needs to have its input jet container name configured!");
+    ATH_MSG_ERROR("JetClusterMomentsTool needs to have its input jet container name configured!");
     return StatusCode::FAILURE;
   }
 
diff --git a/Reconstruction/Jet/JetResolution/util/JERTester.cxx b/Reconstruction/Jet/JetResolution/util/JERTester.cxx
index fd1cf4e4e0b2f24abcf969032972a29d37173fa3..56cc016c7c6aa1e5923cf83a5abfb953f5273220 100644
--- a/Reconstruction/Jet/JetResolution/util/JERTester.cxx
+++ b/Reconstruction/Jet/JetResolution/util/JERTester.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // System include(s)
@@ -62,7 +62,7 @@ int main( int argc, char* argv[] ) {
   // Open the input file
   const TString fileName = argv[1];
   Info(APP_NAME, "Opening file: %s", fileName.Data());
-  std::auto_ptr<TFile> ifile(TFile::Open(fileName, "READ"));
+  std::unique_ptr<TFile> ifile(TFile::Open(fileName, "READ"));
   CHECK( ifile.get() );
 
   // Create a TEvent object
diff --git a/Reconstruction/MET/METUtilities/util/example_METMaker_METSystematicsTool.cxx b/Reconstruction/MET/METUtilities/util/example_METMaker_METSystematicsTool.cxx
index 2018e9c28a4c40b8401d1736085d31093134bd22..149b0bc9eebdd21555bf2d12ec049a7165e6cafe 100644
--- a/Reconstruction/MET/METUtilities/util/example_METMaker_METSystematicsTool.cxx
+++ b/Reconstruction/MET/METUtilities/util/example_METMaker_METSystematicsTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //Author: Russell Smith
@@ -92,7 +92,7 @@ int main( int argc, char* argv[]) {std::cout << __PRETTY_FUNCTION__ << std::endl
   }
 
   //this test file should work.  Feel free to contact me if there is a problem with the file.
-  std::auto_ptr< TFile > ifile( TFile::Open( fileName, "READ" ) );
+  std::unique_ptr< TFile > ifile( TFile::Open( fileName, "READ" ) );
   assert( ifile.get() );
 
   // Create a TEvent object to read from file and a transient store in which to place items
diff --git a/Reconstruction/MET/METUtilities/util/example_rebuildTrackMET.cxx b/Reconstruction/MET/METUtilities/util/example_rebuildTrackMET.cxx
index 7f918b5265fe529f64e745094d52dcc7a3088b55..293cb9d8199c85a6e363658ef9aec7032e08c590 100644
--- a/Reconstruction/MET/METUtilities/util/example_rebuildTrackMET.cxx
+++ b/Reconstruction/MET/METUtilities/util/example_rebuildTrackMET.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //Author: Russell Smith
@@ -87,7 +87,7 @@ int main( int argc, char* argv[]) {std::cout << __PRETTY_FUNCTION__ << std::endl
   }
 
   //this test file should work.  Feel free to contact me if there is a problem with the file.
-  std::auto_ptr< TFile > ifile( TFile::Open( fileName, "READ" ) );
+  std::unique_ptr< TFile > ifile( TFile::Open( fileName, "READ" ) );
   assert( ifile.get() );
 
   // Create a TEvent object to read from file and a transient store in which to place items
diff --git a/Reconstruction/RecoTools/IsolationTool/util/test_isolaitonTool.cxx b/Reconstruction/RecoTools/IsolationTool/util/test_isolaitonTool.cxx
index 00abb9c37a846d4300fe2ec8a67460c27ef1dd78..9d3a04d44e85f7854fbd87584b4ba83df2ae01af 100644
--- a/Reconstruction/RecoTools/IsolationTool/util/test_isolaitonTool.cxx
+++ b/Reconstruction/RecoTools/IsolationTool/util/test_isolaitonTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // Mindlessly copied from CPAnalysisExamples
@@ -76,7 +76,7 @@ int main(int argc, char** argv ){
 
     const TString tag = "t2_";
     Info( APP_NAME, "Opening file: %s", fileName.Data() );
-    std::auto_ptr< TFile > ifile( TFile::Open( fileName, "READ" ) );
+    std::unique_ptr< TFile > ifile( TFile::Open( fileName, "READ" ) );
     ifile.get();
     
     CP::IsolationHelper *m_helperTool = new CP::IsolationHelper("helperTool");
diff --git a/Reconstruction/eflowAthenaPool/src/eflowObjectContainerCnv.cxx b/Reconstruction/eflowAthenaPool/src/eflowObjectContainerCnv.cxx
index 4b7ea7f50e3fafdb45ae9be983b1a3356aecad58..8e4c7a64063f6965128c02211c843f022d446d01 100644
--- a/Reconstruction/eflowAthenaPool/src/eflowObjectContainerCnv.cxx
+++ b/Reconstruction/eflowAthenaPool/src/eflowObjectContainerCnv.cxx
@@ -48,32 +48,32 @@ eflowObjectContainer* eflowObjectContainerCnv::createTransient()
 
   } else if ( compareClassGuid(p1_guid) ) {
 
-    // using auto_ptr ensures deletion of the persistent object
+    // using unique_ptr ensures deletion of the persistent object
     std::unique_ptr<eflowObjectContainer_p1> persObj( poolReadObject<eflowObjectContainer_p1>() );
     eflowObjectContainerCnv_p1 cnv;
     transObj = cnv.createTransient( persObj.get(), eflowStream );
   } else if (compareClassGuid(p2_guid) ) {
     
-    // using auto_ptr ensures deletion of the persistent object
+    // using unique_ptr ensures deletion of the persistent object
     std::unique_ptr<eflowObjectContainer_p2> persObj( poolReadObject<eflowObjectContainer_p2>() );
     eflowObjectContainerCnv_p2 cnv;
     transObj = cnv.createTransient( persObj.get(), eflowStream );
 
   } else if (compareClassGuid(p3_guid) ) {
 
-    // using auto_ptr ensures deletion of the persistent object                                                                                                                                                  
+    // using unique_ptr ensures deletion of the persistent object                                                                                                                                                  
     std::unique_ptr<eflowObjectContainer_p3> persObj( poolReadObject<eflowObjectContainer_p3>() );
     eflowObjectContainerCnv_p3 cnv;
     transObj = cnv.createTransient( persObj.get(), eflowStream );
   } else if (compareClassGuid(p4_guid) ) {
 
-    // using auto_ptr ensures deletion of the persistent object                                                                                                                                                  
+    // using unique_ptr ensures deletion of the persistent object                                                                                                                                                  
     std::unique_ptr<eflowObjectContainer_p4> persObj( poolReadObject<eflowObjectContainer_p4>() );
     eflowObjectContainerCnv_p4 cnv;
     transObj = cnv.createTransient( persObj.get(), eflowStream );
   }  else if (compareClassGuid(p5_guid) ) {
 
-    // using auto_ptr ensures deletion of the persistent object                                                                                                                                                  
+    // using unique_ptr ensures deletion of the persistent object                                                                                                                                                  
     std::unique_ptr<eflowObjectContainer_p5> persObj( poolReadObject<eflowObjectContainer_p5>() );
     eflowObjectContainerCnv_p5 cnv;
     transObj = cnv.createTransient( persObj.get(), eflowStream );
diff --git a/TestBeam/TBEventAthenaPool/src/TBADCRawContCnv.cxx b/TestBeam/TBEventAthenaPool/src/TBADCRawContCnv.cxx
index 9f28e5f99a4c2d349312e331aa308020fc0df17c..f6193d3d00cc9d50b5a219b21257fac4d2dab571 100755
--- a/TestBeam/TBEventAthenaPool/src/TBADCRawContCnv.cxx
+++ b/TestBeam/TBEventAthenaPool/src/TBADCRawContCnv.cxx
@@ -16,7 +16,7 @@ TBADCRawCont* TBADCRawContCnv::createTransient() {
    static pool::Guid   p1_guid("4D0407FD-A534-4595-B5BD-4A8DB797A094");  // GUID of the persistent object
    static pool::Guid   p0_guid("5D407302-FD4E-42BC-A6E5-F5C9ECCDCBF1");  // GUID of the transient object
    if( compareClassGuid(p1_guid) ) {
-      // using auto_ptr ensures deletion of the persistent object
+      // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< TBADCRawCont_p1 > col_vect( poolReadObject< TBADCRawCont_p1 >() );
       return m_TPConverter.createTransient( col_vect.get(), log );
    }
diff --git a/TestBeam/TBEventAthenaPool/src/TBBPCContCnv.cxx b/TestBeam/TBEventAthenaPool/src/TBBPCContCnv.cxx
index 715b5de0733095e7785c97870941f9f0971dd04b..d26961f93b86611858192c46656d702d144ea16a 100755
--- a/TestBeam/TBEventAthenaPool/src/TBBPCContCnv.cxx
+++ b/TestBeam/TBEventAthenaPool/src/TBBPCContCnv.cxx
@@ -16,7 +16,7 @@ TBBPCCont* TBBPCContCnv::createTransient() {
    static pool::Guid   p1_guid("89A09260-F284-4694-8687-3C6C72989A96");  // GUID of the persistent object
    static pool::Guid   p0_guid("05E6C927-F43C-4C2A-B654-C671BF8FDB67");  // GUID of the transient object
    if( compareClassGuid(p1_guid) ) {
-      // using auto_ptr ensures deletion of the persistent object
+      // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< TBBPCCont_p1 > col_vect( poolReadObject< TBBPCCont_p1 >() );
       return m_TPConverter.createTransient( col_vect.get(), log );
    }
diff --git a/TestBeam/TBEventAthenaPool/src/TBEventInfoCnv.cxx b/TestBeam/TBEventAthenaPool/src/TBEventInfoCnv.cxx
index 83fbd4efcdc61d19ea8cbe5ab3f377ad6ae642da..52f940c3a01ee4898dbedfdda86a9ea86ebb8192 100755
--- a/TestBeam/TBEventAthenaPool/src/TBEventInfoCnv.cxx
+++ b/TestBeam/TBEventAthenaPool/src/TBEventInfoCnv.cxx
@@ -16,7 +16,7 @@ TBEventInfo* TBEventInfoCnv::createTransient() {
    static pool::Guid   p1_guid("1E398439-74B3-457E-BC0B-DD69201AE463");  // GUID of the persistent object
    static pool::Guid   p0_guid("1295BE02-D698-43A8-A2BB-76E5ADCBD228");  // GUID of the transient object
    if( compareClassGuid(p1_guid) ) {
-      // using auto_ptr ensures deletion of the persistent object
+      // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< TBEventInfo_p1 > col_vect( poolReadObject< TBEventInfo_p1 >() );
       return m_TPConverter.createTransient( col_vect.get(), log );
    }
diff --git a/TestBeam/TBEventAthenaPool/src/TBMWPCContCnv.cxx b/TestBeam/TBEventAthenaPool/src/TBMWPCContCnv.cxx
index 1ff745787a97d9a793766a84cf99432c342f0be9..39942175a686ac250b35278c7e6ea8a6d456b95a 100755
--- a/TestBeam/TBEventAthenaPool/src/TBMWPCContCnv.cxx
+++ b/TestBeam/TBEventAthenaPool/src/TBMWPCContCnv.cxx
@@ -16,7 +16,7 @@ TBMWPCCont* TBMWPCContCnv::createTransient() {
    static pool::Guid   p1_guid("E1F16B8A-9D8B-4906-83EE-E38EBE63768A");  // GUID of the persistent object
    static pool::Guid   p0_guid("05F6DFD7-EB63-49DB-AA5B-F03BE66365AC");  // GUID of the transient object
    if( compareClassGuid(p1_guid) ) {
-      // using auto_ptr ensures deletion of the persistent object
+      // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< TBMWPCCont_p1 > col_vect( poolReadObject< TBMWPCCont_p1 >() );
       return m_TPConverter.createTransient( col_vect.get(), log );
    }
diff --git a/TestBeam/TBEventAthenaPool/src/TBPhaseCnv.cxx b/TestBeam/TBEventAthenaPool/src/TBPhaseCnv.cxx
index cd06ea7aacabc023a1a692defdf2ccec1ca3586b..599d3aa08394175b6dfe7e8af2a2c4b816ca9cd6 100755
--- a/TestBeam/TBEventAthenaPool/src/TBPhaseCnv.cxx
+++ b/TestBeam/TBEventAthenaPool/src/TBPhaseCnv.cxx
@@ -16,7 +16,7 @@ TBPhase* TBPhaseCnv::createTransient() {
    static pool::Guid   p1_guid("40443E91-053F-41C1-84F8-0A7F03F1DEC4");  // GUID of the persistent object
    static pool::Guid   p0_guid("C044C9BE-E371-4AC3-95ED-CCA05984EDE4");  // GUID of the transient object
    if( compareClassGuid(p1_guid) ) {
-      // using auto_ptr ensures deletion of the persistent object
+      // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< TBPhase_p1 > col_vect( poolReadObject< TBPhase_p1 >() );
       return m_TPConverter.createTransient( col_vect.get(), log );
    }
diff --git a/TestBeam/TBEventAthenaPool/src/TBScintillatorContCnv.cxx b/TestBeam/TBEventAthenaPool/src/TBScintillatorContCnv.cxx
index 100727285dea186c5fe5820b826bc897c48977a3..42bac015a81a2c2a442cd768ffc0ff2c53c910b6 100755
--- a/TestBeam/TBEventAthenaPool/src/TBScintillatorContCnv.cxx
+++ b/TestBeam/TBEventAthenaPool/src/TBScintillatorContCnv.cxx
@@ -16,7 +16,7 @@ TBScintillatorCont* TBScintillatorContCnv::createTransient() {
    static pool::Guid   p1_guid("5887098D-DBFE-4634-92AB-CC9968CCB09A");  // GUID of the persistent object
    static pool::Guid   p0_guid("AE688514-B192-426D-A971-5CD072593272");  // GUID of the transient object
    if( compareClassGuid(p1_guid) ) {
-      // using auto_ptr ensures deletion of the persistent object
+      // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< TBScintillatorCont_p1 > col_vect( poolReadObject< TBScintillatorCont_p1 >() );
       return m_TPConverter.createTransient( col_vect.get(), log );
    }
diff --git a/TestBeam/TBEventAthenaPool/src/TBTDCCnv.cxx b/TestBeam/TBEventAthenaPool/src/TBTDCCnv.cxx
index 3ed04dde441a2b1a0a9b3f95000ea534162e1580..b052cc48f9db2f631ea45327c7aca4656a7eca00 100755
--- a/TestBeam/TBEventAthenaPool/src/TBTDCCnv.cxx
+++ b/TestBeam/TBEventAthenaPool/src/TBTDCCnv.cxx
@@ -16,7 +16,7 @@ TBTDC* TBTDCCnv::createTransient() {
    static pool::Guid   p1_guid("D909CCF6-CE91-4401-98FC-C1C41BD06513");  // GUID of the persistent object
    static pool::Guid   p0_guid("51CEFACC-47E5-4BF1-8BF5-FA48FCA15B43");  // GUID of the transient object
    if( compareClassGuid(p1_guid) ) {
-      // using auto_ptr ensures deletion of the persistent object
+      // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< TBTDC_p1 > col_vect( poolReadObject< TBTDC_p1 >() );
       return m_TPConverter.createTransient( col_vect.get(), log );
    }
diff --git a/TestBeam/TBEventAthenaPool/src/TBTDCRawContCnv.cxx b/TestBeam/TBEventAthenaPool/src/TBTDCRawContCnv.cxx
index 451e3018d77f0aaf170956d5029e6167f4b0f04a..40419ef3008ca9781a3bfa35d57875e3df07be8b 100755
--- a/TestBeam/TBEventAthenaPool/src/TBTDCRawContCnv.cxx
+++ b/TestBeam/TBEventAthenaPool/src/TBTDCRawContCnv.cxx
@@ -16,7 +16,7 @@ TBTDCRawCont* TBTDCRawContCnv::createTransient() {
    static pool::Guid   p1_guid("C05FD0A4-E5AD-41C8-9EA5-2A71378BB247");  // GUID of the persistent object
    static pool::Guid   p0_guid("82D6D14E-49FE-4841-9B39-08D66B9DC7CE");  // GUID of the transient object
    if( compareClassGuid(p1_guid) ) {
-      // using auto_ptr ensures deletion of the persistent object
+      // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< TBTDCRawCont_p1 > col_vect( poolReadObject< TBTDCRawCont_p1 >() );
       return m_TPConverter.createTransient( col_vect.get(), log );
    }
diff --git a/TestBeam/TBEventAthenaPool/src/TBTailCatcherCnv.cxx b/TestBeam/TBEventAthenaPool/src/TBTailCatcherCnv.cxx
index fccf1ac603a5bd0a1a7454b2c5caa46307e69d94..44093eb2d0035f64c5e8c125d46cdc50b6ff0398 100755
--- a/TestBeam/TBEventAthenaPool/src/TBTailCatcherCnv.cxx
+++ b/TestBeam/TBEventAthenaPool/src/TBTailCatcherCnv.cxx
@@ -16,7 +16,7 @@ TBTailCatcher* TBTailCatcherCnv::createTransient() {
    static pool::Guid   p1_guid("B304A3B8-5FC1-415D-AE97-E3E7B6769213");  // GUID of the persistent object
    static pool::Guid   p0_guid("7AA6F3C3-3FF2-4732-B0CB-4ECC32FEF06D");  // GUID of the transient object
    if( compareClassGuid(p1_guid) ) {
-      // using auto_ptr ensures deletion of the persistent object
+      // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< TBTailCatcher_p1 > col_vect( poolReadObject< TBTailCatcher_p1 >() );
       return m_TPConverter.createTransient( col_vect.get(), log );
    }
diff --git a/TestBeam/TBEventAthenaPool/src/TBTrackCnv.cxx b/TestBeam/TBEventAthenaPool/src/TBTrackCnv.cxx
index d89fd7b11d286d983d75c81d9dc933445f627a7d..3e37b7ae9f2d6c1be4500376d53c259c95a25c31 100755
--- a/TestBeam/TBEventAthenaPool/src/TBTrackCnv.cxx
+++ b/TestBeam/TBEventAthenaPool/src/TBTrackCnv.cxx
@@ -16,7 +16,7 @@ TBTrack* TBTrackCnv::createTransient() {
    static pool::Guid   p1_guid("9E50CAA3-CCDF-4BB9-96E9-E376B16963E8");  // GUID of the persistent object
    static pool::Guid   p0_guid("37E880D7-EBCB-4F53-8B14-490A4CEB71BD");  // GUID of the transient object
    if( compareClassGuid(p1_guid) ) {
-      // using auto_ptr ensures deletion of the persistent object
+      // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< TBTrack_p1 > col_vect( poolReadObject< TBTrack_p1 >() );
       return m_TPConverter.createTransient( col_vect.get(), log );
    }
diff --git a/TestBeam/TBEventAthenaPool/src/TBTrackInfoCnv.cxx b/TestBeam/TBEventAthenaPool/src/TBTrackInfoCnv.cxx
index 7c3cbe457e9003270d9ce81a46780bf0a1a45e4f..d702178953575fe42f9755df8adaa45f81484f53 100755
--- a/TestBeam/TBEventAthenaPool/src/TBTrackInfoCnv.cxx
+++ b/TestBeam/TBEventAthenaPool/src/TBTrackInfoCnv.cxx
@@ -16,7 +16,7 @@ TBTrackInfo* TBTrackInfoCnv::createTransient() {
    static pool::Guid   p1_guid("A49F674F-25AD-496B-BEBE-DE1EBEAFE990");  // GUID of the persistent object
    static pool::Guid   p0_guid("5780AB02-D5D1-4537-B682-56CA95927BFB");  // GUID of the transient object
    if( compareClassGuid(p1_guid) ) {
-      // using auto_ptr ensures deletion of the persistent object
+      // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< TBTrackInfo_p1 > col_vect( poolReadObject< TBTrackInfo_p1 >() );
       return m_TPConverter.createTransient( col_vect.get(), log );
    }
diff --git a/TestBeam/TBEventAthenaPool/src/TBTriggerPatternUnitCnv.cxx b/TestBeam/TBEventAthenaPool/src/TBTriggerPatternUnitCnv.cxx
index e057a309cee4ca93a6671475bc46b44625433745..c5a3ba6e101777e1e215c18096143d80bc923b37 100755
--- a/TestBeam/TBEventAthenaPool/src/TBTriggerPatternUnitCnv.cxx
+++ b/TestBeam/TBEventAthenaPool/src/TBTriggerPatternUnitCnv.cxx
@@ -16,7 +16,7 @@ TBTriggerPatternUnit* TBTriggerPatternUnitCnv::createTransient() {
    static pool::Guid   p1_guid("7630C108-3B5F-4ED3-97C8-F3148AF1B84F");  // GUID of the persistent object
    static pool::Guid   p0_guid("0B82A5B3-0808-4B78-B47B-BFE9388EEEEB");  // GUID of the transient object
    if( compareClassGuid(p1_guid) ) {
-      // using auto_ptr ensures deletion of the persistent object
+      // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< TBTriggerPatternUnit_p1 > col_vect( poolReadObject< TBTriggerPatternUnit_p1 >() );
       return m_TPConverter.createTransient( col_vect.get(), log );
    }
diff --git a/TileCalorimeter/TileRecUtils/src/TileRawChannelBuilder.cxx b/TileCalorimeter/TileRecUtils/src/TileRawChannelBuilder.cxx
index 8d9f2e04d046efd5a181ecbb21b58208e06459c1..1e66afd98153d674c63e6a8576fd2fdba8dae54f 100644
--- a/TileCalorimeter/TileRecUtils/src/TileRawChannelBuilder.cxx
+++ b/TileCalorimeter/TileRecUtils/src/TileRawChannelBuilder.cxx
@@ -517,6 +517,13 @@ StatusCode TileRawChannelBuilder::build(const TileDigitsCollection* coll)
     ATH_CHECK( m_rawChannelCnt->push_back (rch) );
   }
 
+  IdentifierHash hash = m_rawChannelCnt->hashFunc().hash(coll->identify());
+  TileRawChannelCollection* rawChannelCollection = m_rawChannelCnt->indexFindPtr(hash);
+  rawChannelCollection->setLvl1Id(coll->getLvl1Id());
+  rawChannelCollection->setLvl1Type(coll->getLvl1Type());
+  rawChannelCollection->setDetEvType(coll->getDetEvType());
+  rawChannelCollection->setRODBCID(coll->getRODBCID());
+
   return StatusCode::SUCCESS;
 }
 
diff --git a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileCosmicMuonContainerCnv.cxx b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileCosmicMuonContainerCnv.cxx
index 94815edb8a4829c93d558fd706281b573b41a415..88b492de06af0f7703efe398cc28c8d5d519dc36 100644
--- a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileCosmicMuonContainerCnv.cxx
+++ b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileCosmicMuonContainerCnv.cxx
@@ -52,13 +52,13 @@ TileCosmicMuonContainer* TileCosmicMuonContainerCnv::createTransient() {
 
   } else if ( compareClassGuid(p1_guid) ) {
 
-    // using auto_ptr ensures deletion of the persistent object
+    // using unique_ptr ensures deletion of the persistent object
     std::unique_ptr<TileCosmicMuonContainer_p1> persObj( poolReadObject<TileCosmicMuonContainer_p1>() );
     TileCosmicMuonContainerCnv_p1 cnv;
     transObj = cnv.createTransient( persObj.get(), msg );
   } else if ( compareClassGuid(p2_guid) ) {
 
-    // using auto_ptr ensures deletion of the persistent object
+    // using unique_ptr ensures deletion of the persistent object
     std::unique_ptr<TileCosmicMuonContainer_p2> persObj( poolReadObject<TileCosmicMuonContainer_p2>() );
     TileCosmicMuonContainerCnv_p2 cnv;
     transObj = cnv.createTransient( persObj.get(), msg );
diff --git a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileL2ContainerCnv.cxx b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileL2ContainerCnv.cxx
index fb32ec058dd98f2d9c0b9c447f9b3ab608fee374..294f99da8da1f35c537d391a81945fa3a594b646 100755
--- a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileL2ContainerCnv.cxx
+++ b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileL2ContainerCnv.cxx
@@ -50,13 +50,13 @@ TileL2Container* TileL2ContainerCnv::createTransient() {
 
   } else if ( compareClassGuid(p1_guid) ) {
 
-    // using auto_ptr ensures deletion of the persistent object
+    // using unique_ptr ensures deletion of the persistent object
     std::unique_ptr<TileL2Container_p1> persObj( poolReadObject<TileL2Container_p1>() );
     TileL2ContainerCnv_p1 cnv;
     transObj = cnv.createTransient( persObj.get(), msg );
   } else if ( compareClassGuid(p2_guid) ) {
 
-    // using auto_ptr ensures deletion of the persistent object
+    // using unique_ptr ensures deletion of the persistent object
     std::unique_ptr<TileL2Container_p2> persObj( poolReadObject<TileL2Container_p2>() );
     TileL2ContainerCnv_p2 cnv;
     transObj = cnv.createTransient( persObj.get(), msg );
diff --git a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileMuContainerCnv.cxx b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileMuContainerCnv.cxx
index e0734ab26ff08630f02dcb188e1ebc23eb671793..bc14aa78c34811f24dd0f10289a6cd7c3acaef89 100755
--- a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileMuContainerCnv.cxx
+++ b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileMuContainerCnv.cxx
@@ -48,7 +48,7 @@ TileMuContainer* TileMuContainerCnv::createTransient() {
 
   } else if ( compareClassGuid(p1_guid) ) {
 
-    // using auto_ptr ensures deletion of the persistent object
+    // using unique_ptr ensures deletion of the persistent object
     std::unique_ptr<TileMuContainer_p1> persObj( poolReadObject<TileMuContainer_p1>() );
     TileMuContainerCnv_p1 cnv;
     transObj = cnv.createTransient( persObj.get(), msg );
diff --git a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileMuonReceiverContainerCnv.cxx b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileMuonReceiverContainerCnv.cxx
index aa58a82a14f7bafbb000a7291af89cad01d67bbb..d03dfc5d4c57b1a1dc1d9e2937e68ed73b3c68e3 100755
--- a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileMuonReceiverContainerCnv.cxx
+++ b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileMuonReceiverContainerCnv.cxx
@@ -47,7 +47,7 @@ TileMuonReceiverContainer* TileMuonReceiverContainerCnv::createTransient() {
     return poolReadObject<TileMuonReceiverContainer>();
 
   } else if ( compareClassGuid(p1_guid) ) {
-    // using auto_ptr ensures deletion of the persistent object
+    // using unique_ptr ensures deletion of the persistent object
     std::unique_ptr<TileMuonReceiverContainer_p1> persObj( poolReadObject<TileMuonReceiverContainer_p1>() );
     TileMuonReceiverContainerCnv_p1 cnv;
     transObj = cnv.createTransient( persObj.get(), msg );
diff --git a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileTTL1ContainerCnv.cxx b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileTTL1ContainerCnv.cxx
index 1aec54f8d3b4073142fbb4d90891705be706acf3..ea5a4c33fdd9fb9bc6d1c9d9ba215c3a6a204e44 100755
--- a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileTTL1ContainerCnv.cxx
+++ b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileTTL1ContainerCnv.cxx
@@ -48,7 +48,7 @@ TileTTL1Container* TileTTL1ContainerCnv::createTransient() {
 
   } else if ( compareClassGuid(p1_guid) ) {
 
-    // using auto_ptr ensures deletion of the persistent object
+    // using unique_ptr ensures deletion of the persistent object
     std::unique_ptr<TileTTL1Container_p1> persObj( poolReadObject<TileTTL1Container_p1>() );
     TileTTL1ContainerCnv_p1 cnv;
     transObj = cnv.createTransient( persObj.get(), msg );
diff --git a/TileCalorimeter/TileSvc/TileSimEventAthenaPool/src/TileHitVectorCnv.cxx b/TileCalorimeter/TileSvc/TileSimEventAthenaPool/src/TileHitVectorCnv.cxx
index 5c1a8ddc673016f4e8b16b8ebe0108b3dc7362d1..7dfa88ca753c927917629d03b60259e71ca07cf0 100755
--- a/TileCalorimeter/TileSvc/TileSimEventAthenaPool/src/TileHitVectorCnv.cxx
+++ b/TileCalorimeter/TileSvc/TileSimEventAthenaPool/src/TileHitVectorCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TileSimEventTPCnv/TileHitVectorCnv_p1.h"
@@ -27,7 +27,7 @@ TileHitVector* TileHitVectorCnv::createTransient() {
 
     if( this->compareClassGuid(p1_guid)) {
 
-        std::auto_ptr< TileHitVector_p1 > col_vect( this->poolReadObject< TileHitVector_p1 >() );
+        std::unique_ptr< TileHitVector_p1 > col_vect( this->poolReadObject< TileHitVector_p1 >() );
         trans_cont = converter_p1.createTransient( col_vect.get(), mlog );
 
     } else if( this->compareClassGuid(p0_guid)) {
diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigDecisionCnv.cxx b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigDecisionCnv.cxx
index bb98579dcc9d10530e279626d42156565b38346a..1cfe1701696f5171c73e1326a8fe87c541cb089c 100755
--- a/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigDecisionCnv.cxx
+++ b/Trigger/TrigEvent/TrigEventAthenaPool/src/TrigDecisionCnv.cxx
@@ -44,7 +44,7 @@ TrigDec::TrigDecision* TrigDecisionCnv::createTransient()
   static pool::Guid p5_guid("DA3DEF39-2401-4A8E-ACD2-851B0DF10AFA");
 
   if ( compareClassGuid(p1_guid) ) {
-    // using auto_ptr ensures deletion of the persistent object
+    // using unique_ptr ensures deletion of the persistent object
     std::unique_ptr< TrigDec::TrigDecision_p1 > col_vect( poolReadObject< TrigDec::TrigDecision_p1 >() );
     TrigDec::TrigDecisionCnv_p1 converter;
     return converter.createTransient( col_vect.get(), log );
diff --git a/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/HLTResultCnv.cxx b/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/HLTResultCnv.cxx
index 636ed3c560e8acdecf76644acdbd1a065ab45af3..9f4beae66b16fa6c73bf85c7d6e09528785ca545 100644
--- a/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/HLTResultCnv.cxx
+++ b/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/HLTResultCnv.cxx
@@ -41,7 +41,7 @@ HLT::HLTResult* HLTResultCnv::createTransient()
   
   if ( compareClassGuid(p1_guid) ) {
     mlog << MSG::DEBUG << "HLTResult::reading p1 persistent object" << endmsg;
-    // using auto_ptr ensures deletion of the persistent object
+    // using unique_ptr ensures deletion of the persistent object
     std::unique_ptr< HLT::HLTResult_p1 > col_vect( poolReadObject< HLT::HLTResult_p1 >() );
     return m_TPConverter->createTransient( col_vect.get(), mlog );
   }
diff --git a/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/Lvl1ResultCnv.cxx b/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/Lvl1ResultCnv.cxx
index 7aec261fec215d8961030016628e1ce77c1ea088..c0ce592833136920413b8536becfabc04c5919cf 100644
--- a/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/Lvl1ResultCnv.cxx
+++ b/Trigger/TrigEvent/TrigSteeringEventAthenaPool/src/Lvl1ResultCnv.cxx
@@ -50,7 +50,7 @@ LVL1CTP::Lvl1Result* Lvl1ResultCnv::createTransient()
 
   if ( compareClassGuid(p1_guid) ) {
     mlog << MSG::DEBUG << "Lvl1Result::createTransient reading p1 persistent object" << endmsg;
-    // using auto_ptr ensures deletion of the persistent object
+    // using unique_ptr ensures deletion of the persistent object
     std::unique_ptr< LVL1CTP::Lvl1Result_p1 > col_vect( poolReadObject< LVL1CTP::Lvl1Result_p1 >() );
     return m_impl->m_TPConverter_p1.createTransient( col_vect.get(), mlog );
   } else if( compareClassGuid(p0_guid) ){
@@ -59,7 +59,7 @@ LVL1CTP::Lvl1Result* Lvl1ResultCnv::createTransient()
     return this->poolReadObject<LVL1CTP::Lvl1Result>();
   } else if ( compareClassGuid(p2_guid) ) {
     mlog << MSG::DEBUG << "Lvl1Result::createTransient reading p2 persistent object" << endmsg;
-    // using auto_ptr ensures deletion of the persistent object
+    // using unique_ptr ensures deletion of the persistent object
     std::unique_ptr< LVL1CTP::Lvl1Result_p2 > col_vect( poolReadObject< LVL1CTP::Lvl1Result_p2 >() );
     return m_impl->m_TPConverter_p2.createTransient( col_vect.get(), mlog );
   }
diff --git a/Trigger/TrigMonitoring/TrigTauMonitoring/python/TrigTauMonitCategory.py b/Trigger/TrigMonitoring/TrigTauMonitoring/python/TrigTauMonitCategory.py
index b3c783d3cb6975fb253479f0666f73dbb8cb8981..02efb6ed1c1fcd441874bf7792efb96b376872c1 100644
--- a/Trigger/TrigMonitoring/TrigTauMonitoring/python/TrigTauMonitCategory.py
+++ b/Trigger/TrigMonitoring/TrigTauMonitoring/python/TrigTauMonitCategory.py
@@ -17,8 +17,10 @@ monitoring_tau_FTK = [
         'tau25_medium1_tracktwo_L1TAU12IM_FTK'
 ] 
 
-monitoring_singleTau = 'tau25_medium1_tracktwo'
+monitoring_singleTau = [
+    'tau25_medium1_tracktwo'
 
+]
 monitoring_tau = [
 	'tau0_perf_ptonly_L1TAU12',
     'tau0_perf_ptonly_L1TAU60',
@@ -56,18 +58,29 @@ monitoring_tau_pp = [
 	'tau160_idperf_tracktwo',
 	'tau160_perf_tracktwo',
 	'tau160_medium1_tracktwo',
-        'tau12_idperf_FTK',
-        'tau12_perf_FTK',
-        'tau12_perf0_FTK',
-        'tau12_perf_FTKNoPrec',
-        'tau12_perf0_FTKNoPrec',
-        'tau12_medium0_FTK',
-        'tau12_medium1_FTK',
-        'tau12_medium0_FTKNoPrec',
-        'tau12_medium1_FTKNoPrec',
-        'tau25_idperf_tracktwo_L1TAU12IM_FTK',
-        'tau25_perf_tracktwo_L1TAU12IM_FTK',
-        'tau25_medium1_tracktwo_L1TAU12IM_FTK'
+    'tau25_idperf_track_L1TAU12IM',
+    'tau25_idperf_tracktwo_L1TAU12IM',
+    'tau25_perf_tracktwo_L1TAU12IM',
+    'tau25_medium1_tracktwo_L1TAU12IM',
+    'tau25_idperf_tracktwoMVA_L1TAU12IM', #new
+    'tau25_perf_tracktwoMVA_L1TAU12IM', #new
+    'tau25_medium1_tracktwoMVA_L1TAU12IM', #new
+    'tau25_verylooseRNN_tracktwoMVA_L1TAU12IM', #new
+    'tau25_looseRNN_tracktwoMVA_L1TAU12IM', #new
+    'tau25_mediumRNN_tracktwoMVA_L1TAU12IM',
+    'tau25_tightRNN_tracktwoMVA_L1TAU12IM', #new
+    'tau25_verylooseRNN_tracktwo_L1TAU12IM', #new
+    'tau25_looseRNN_tracktwo_L1TAU12IM', #new
+    'tau25_mediumRNN_tracktwo_L1TAU12IM', #new
+    'tau25_tightRNN_tracktwo_L1TAU12IM', #new
+    'tau25_medium1_tracktwoEF_L1TAU12IM',
+    'tau160_idperf_track_L1TAU100',
+    'tau0_perf_ptonly_L1TAU100', #new
+    'tau160_idperf_tracktwo_L1TAU100',
+    'tau160_perf_tracktwo_L1TAU100',
+    'tau160_idperf_tracktwoMVA_L1TAU100', #new
+    'tau160_perf_tracktwoMVA_L1TAU100' #new
+
 ]
 
 monitoring_tau_validation = [
diff --git a/Trigger/TrigMonitoring/TrigTauMonitoring/python/TrigTauMonitoringConfig.py b/Trigger/TrigMonitoring/TrigTauMonitoring/python/TrigTauMonitoringConfig.py
index 278be1ac9c70964f2ce831a831e5abb20bc6ebe6..ac57143711f8b7d8e625ff7bd812c8dc7df34b22 100644
--- a/Trigger/TrigMonitoring/TrigTauMonitoring/python/TrigTauMonitoringConfig.py
+++ b/Trigger/TrigMonitoring/TrigTauMonitoring/python/TrigTauMonitoringConfig.py
@@ -30,16 +30,52 @@ def TrigTauMonitoringTool():
 #               'HLT_tau25_perf_ptonly',
         ]
 
-        tau_topo_chains = [
-                'tau35_medium1_tracktwo_tau25_medium1_tracktwo_L1TAU20IM_2TAU12IM',
-                'tau35_medium1_tracktwo_tau25_medium1_tracktwo',
-                'tau35_medium1_tracktwo_tau25_medium1_tracktwo_L1DR-TAU20ITAU12I',
-                'tau35_medium1_tracktwo_tau25_medium1_tracktwo_L1DR-TAU20ITAU12I-J25',
-                'tau35_medium1_tracktwo_tau25_medium1_tracktwo_03dR30',
-                'tau35_medium1_tracktwo_tau25_medium1_tracktwo_03dR30_L1DR-TAU20ITAU12I',
-                'tau35_medium1_tracktwo_tau25_medium1_tracktwo_03dR30_L1DR-TAU20ITAU12I-J25',
-        ]
+#      tau_topo_chains = [
+#               'tau35_medium1_tracktwo_tau25_medium1_tracktwo_L1TAU20IM_2TAU12IM',
+#              'tau35_medium1_tracktwo_tau25_medium1_tracktwo',
+#               'tau35_medium1_tracktwo_tau25_medium1_tracktwo_L1DR-TAU20ITAU12I',
+#               'tau35_medium1_tracktwo_tau25_medium1_tracktwo_L1DR-TAU20ITAU12I-J25',
+#              'tau35_medium1_tracktwo_tau25_medium1_tracktwo_03dR30',
+#              'tau35_medium1_tracktwo_tau25_medium1_tracktwo_03dR30_L1DR-TAU20ITAU12I',
+#              'tau35_medium1_tracktwo_tau25_medium1_tracktwo_03dR30_L1DR-TAU20ITAU12I-J25',
+#      ]
         
+
+
+
+
+
+        MVA_chains = [
+                        'tau25_idperf_tracktwoMVA_L1TAU12IM',
+                        'tau25_perf_tracktwoMVA_L1TAU12IM',
+                        'tau25_verylooseRNN_tracktwoMVA_L1TAU12IM',
+                        'tau25_looseRNN_tracktwoMVA_L1TAU12IM',
+                        'tau25_mediumRNN_tracktwoMVA_L1TAU12IM',
+                        'tau25_tightRNN_tracktwoMVA_L1TAU12IM'
+        ]
+
+        RNN_chains = [
+                        'tau25_looseRNN_tracktwo_L1TAU12IM',
+                        'tau25_mediumRNN_tracktwo_L1TAU12IM',
+                        'tau25_tightRNN_tracktwo_L1TAU12IM',
+                        'tau25_looseRNN_tracktwoMVA_L1TAU12IM',
+                        'tau25_mediumRNN_tracktwoMVA_L1TAU12IM',
+                        'tau25_tightRNN_tracktwoMVA_L1TAU12IM',
+                        'tau35_mediumRNN_tracktwoMVA_L1TAU12IM'
+        ]
+
+        BDTRNN_chains = [
+                'tau25_idperf_tracktwoMVA',
+                'tau25_perf_tracktwoMVA',
+                'tau0_idperf_tracktwoMVA_L1eTAU12',
+                'tau0_idperf_tracktwoMVA_L1eTAU5',
+                'tau25_verylooseRNN_tracktwo_L1TAU12IM',
+                'tau25_looseRNN_tracktwo_L1TAU12IM',
+                'tau25_mediumRNN_tracktwo_L1TAU12IM',
+                'tau25_tightRNN_tracktwo_L1TAU12IM'
+
+        ]
+
         tau_topo_support_chains = [
 
         ]
@@ -55,11 +91,15 @@ def TrigTauMonitoringTool():
 #               'tau25_medium1_tracktwo_ptmin_no0reject_emulate'
 #       ]
 
-        ztt_tau = [
-                'tau25_idperf_tracktwo',
-                'tau25_perf_tracktwo',
-                'tau25_medium1_tracktwo',
+        ztt_RNN_tau = [
+                'tau25_mediumRNN_tracktwoMVA',
         ]
+        ztt_BDT_tau = [
+                'tau25_medium1_tracktwoEF',
+        ]
+        # removed ztt_tau chains
+        # 'tau25_idperf_tracktwo',
+        # 'tau25_perf_tracktwo',
 
         highpt_tau = [
                 'tau80_medium1_tracktwo_L1TAU60',
@@ -82,6 +122,8 @@ def TrigTauMonitoringTool():
         from LumiBlockComps.LuminosityCondAlgDefault import LuminosityCondAlgOnlineDefault
         LuminosityCondAlgOnlineDefault (suffix = 'Online')
 
+
+
         # get the HLT emulation tool from the emulation python config
 #       from TrigTauEmulation.TrigTauEmulationConfig import get_hlt_emulator
 #       HltEmulator = get_hlt_emulator('HltEmulator', emul_hlt_tau, Level1Emulator)
@@ -98,13 +140,15 @@ def TrigTauMonitoringTool():
                                 monitoring_tau          = hltmonList.monitoring_tau,
                                 primary_tau             = full_tau, #[]
                                 prescaled_tau           = [], #tau_track_test, #[],
-                                LowestSingleTau         = hltmonList.monitoring_singleTau, #"tau25_medium1_tracktwo",
+                                LowestSingleTauRNN              = "tau25_mediumRNN_tracktwoMVA", #hltmonList.monitoring_singleTau, #"tau25_medium1_tracktwo",
+                                LowestSingleTauBDT      = "tau25_medium1_tracktwoEF",
                                 Highpt_tau              = highpt_tau,
-                                Ztt_tau                 = ztt_tau,
+                                Ztt_RNN_tau                     = ztt_RNN_tau,
+                                Ztt_BDT_tau                     = ztt_BDT_tau,
                                 EffOffTauPtCut          = 25000.,  #MeV
                                 TurnOnCurves            = True,
                                 TurnOnCurvesDenom       = "Reco", # combined string with combination of "Truth", "Reco" and "Presel". For Truth doTruth=True!
-                                doTruth                 = False,
+                                doTruth                 = True,
                                 doRealZtautauEff        = True,
                                 dodijetFakeTausEff      = True,
                                 doBootstrap             = False,
@@ -115,7 +159,15 @@ def TrigTauMonitoringTool():
 #                               HltEmulationTool        = HltEmulator,
                                 doTrackCurves           = True,
 #                               doTestTracking          = False,
-                                topo_chains                     = tau_topo_chains,
+#                               topo_chains                     = tau_topo_chains,
+                                doL1JetPlots            = False,
+                                doEFTProfiles           = True,
+                                domuCut40               = False,
+                                doEfficiencyRatioPlots = True, #False
+                                doL1TopoLeptonsMonitoringWarnings = False,
+                                trigMVA_chains  = MVA_chains,
+                                trigRNN_chains  = RNN_chains,
+                                trigBDTRNN_chains       = BDTRNN_chains,
                                 topo_support_chains     = tau_topo_support_chains,
                                 doTopoValidation        = False,
                                 L1TriggerCondition      = "Physics", #allowResurrectedDecision, alsoDeactivateTEs, Physics [default]
@@ -130,7 +182,6 @@ def TrigTauMonitoringTool():
                                 AbsPhiMin                       = -1.,
                                 BDTMedium                       = True,
                                 isData                          = (globalflags.DataSource == 'data'));
-
         #from AthenaCommon.AppMgr import ToolSvc
         #ToolSvc += HLTTauMon;
         print (ToolSvc)
diff --git a/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool.cxx b/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool.cxx
old mode 100755
new mode 100644
index cfba7ef87d1652e398b9185014ee0724bb8e79e8..a9c62a03f4758360c928a056471f454a0310830e
--- a/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool.cxx
+++ b/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool.cxx
@@ -14,7 +14,11 @@
 #include "AthenaMonitoring/ManagedMonitorToolTest.h"
 #include "AnalysisUtils/AnalysisMisc.h"
 
+#include "GaudiKernel/MsgStream.h"
 #include "GaudiKernel/StatusCode.h"
+#include "GaudiKernel/ITHistSvc.h"
+#include "GaudiKernel/PropertyMgr.h"
+#include "GaudiKernel/IToolSvc.h"
 #include "StoreGate/StoreGateSvc.h"
 #include "StoreGate/ReadCondHandle.h"
 #include "EventInfo/TriggerInfo.h"
@@ -98,18 +102,21 @@ const float TWOPI=2.0*PI;
 
 
 HLTTauMonTool::HLTTauMonTool(const std::string & type, const std::string & n, const IInterface* parent)
- : IHLTMonTool(type, n, parent),
-   m_l1emulationTool(this),
-   m_lumiBlockMuTool("LumiBlockMuTool/LumiBlockMuTool") // offline mu
-  {
+  : IHLTMonTool(type, n, parent),
+    m_l1emulationTool(this),
+    m_lumiBlockMuTool("LumiBlockMuTool/LumiBlockMuTool") // offline mu
+
+     {
     
-    ATH_MSG_DEBUG("HLTTauMonTool::HLTTauMonTool()");
+   ATH_MSG_DEBUG("HLTTauMonTool::HLTTauMonTool()");
     
     declareProperty("primary_tau",    m_primary_tau);
     declareProperty("monitoring_tau",     m_monitoring_tau);
     declareProperty("prescaled_tau",    m_prescaled_tau);
     declareProperty("Highpt_tau",               m_highpt_tau);
-    declareProperty("Ztt_tau",                  m_ztt_tau);
+  	declareProperty("Ztt_RNN_tau",                  m_ztt_RNN_tau);
+  	declareProperty("Ztt_BDT_tau",                  m_ztt_BDT_tau);
+    //declareProperty("Ztt_tau",                  m_ztt_tau);
     declareProperty("EffOffTauPtCut",     m_effOffTauPtCut=20000.);
     declareProperty("TurnOnCurves",     m_turnOnCurves=true);
     declareProperty("TurnOnCurvesDenom",        m_turnOnCurvesDenom="RecoID");
@@ -124,10 +131,24 @@ HLTTauMonTool::HLTTauMonTool(const std::string & type, const std::string & n, co
     //declareProperty("HltEmulationTool",   m_hltemulationTool,  "Handle to the HLT emulation tool");
     declareProperty("doTrackCurves",            m_doTrackCurves=false, "Efficiency plots of track distributions");
     //declareProperty("doTestTracking",     m_doTestTracking=false);
+  	declareProperty("doEfficiencyRatioPlots",            m_doEfficiencyRatioPlots=false, "Efficiency ratio plots of FTK vs nonFTK LST chains");
     declareProperty("doTopoValidation",         m_doTopoValidation=false);
+  	declareProperty("doL1JetPlots",               m_doL1JetPlots=false);
+  	declareProperty("doEFTProfiles",              m_doEFTProfiles=false);
+  // this feature should not be used on data until the broken tau track link issue is fixed
+	  declareProperty("domuCut40",          m_domuCut40=false);    
+	  declareProperty("doL1TopoLeptonsMonitoringWarnings",  m_doL1TopoLeptonsMonitoringWarnings=false);
+	  //declareProperty("topo_ditau_chains",    m_topo_chains_ditau);
+	  declareProperty("topo_eltau_chains",    m_topo_chains_eltau);
+	  declareProperty("topo_mutau_chains",    m_topo_chains_mutau);
     declareProperty("topo_chains",              m_topo_chains);
+	  declareProperty("trigMVA_chains",    m_trigMVA_chains);
+	  declareProperty("trigRNN_chains",    m_trigRNN_chains);
+	  declareProperty("trigBDTRNN_chains",    m_trigBDTRNN_chains);
     declareProperty("topo_support_chains",      m_topo_support_chains);
-    declareProperty("LowestSingleTau",    m_lowest_singletau="");
+	  declareProperty("LowestSingleTauRNN",                 m_lowest_singletau_RNN="");
+	  declareProperty("LowestSingleTauBDT",                 m_lowest_singletau_BDT="");
+    //declareProperty("LowestSingleTau",    m_lowest_singletau="");
     declareProperty("L1TriggerCondition",   m_L1StringCondition="Physics");
     declareProperty("HLTTriggerCondition",      m_HLTStringCondition="Physics");
     declareProperty("nTrkMax",      m_selection_nTrkMax=-1);
@@ -141,11 +162,17 @@ HLTTauMonTool::HLTTauMonTool(const std::string & type, const std::string & n, co
     declareProperty("BDTMedium",                m_selection_BDT=true);
     declareProperty("isData",                   m_isData=true);
 
-    m_L1TriggerCondition = 0;
-    m_HLTTriggerCondition = 0;
-    m_mu_offline = 0.;
-    m_mu_online = 0;
-    m_tauCont = 0;
+   m_L1TriggerCondition = 0;
+   m_HLTTriggerCondition = 0;
+   m_mu_offline = 0.;
+   m_mu_online = 0;
+   m_tauCont = 0;
+
+   m_counterOfdR0_Topomutau = 0;
+   m_counterOfdR0_Topoeltau = 0;
+   
+
+
 }
 ///////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////
@@ -157,6 +184,7 @@ StatusCode HLTTauMonTool::init() {
  
   if(m_isData) m_truth=false;
   
+
   if (m_emulation) {
     ATH_MSG_INFO("Initializing " << m_l1emulationTool->name());
     ATH_CHECK(m_l1emulationTool.retrieve());
@@ -164,20 +192,18 @@ StatusCode HLTTauMonTool::init() {
     //ATH_CHECK(m_hltemulationTool.retrieve());
   }
 
-  if (m_lumiBlockMuTool.retrieve().isSuccess()) {                                     
-  msg() << MSG::WARNING << "Unable to retrieve LumiBlockMuTool" << endmsg;     
-  } else {                                                                     
-  msg() << MSG::DEBUG << "Successfully retrieved LumiBlockMuTool" << endmsg;
-  }  
-
+  ATH_CHECK(m_lumiBlockMuTool.retrieve());
+  
   m_mu_offline = 0.;
   m_mu_online = 0;
 
   m_tauCont = 0;
 
+       m_LB = -1;
+ 
     // put all trigger names into one arry
     for(std::vector<std::string>::iterator it = m_monitoring_tau.begin(); it != m_monitoring_tau.end(); ++it) {
-        m_trigItems.push_back(*it);
+      m_trigItems.push_back(*it);ATH_MSG_DEBUG("trigItem = "<< (*it));
     }
     for(std::vector<std::string>::iterator it = m_primary_tau.begin(); it != m_primary_tau.end(); ++it) {
         m_trigItems.push_back(*it);
@@ -188,9 +214,21 @@ StatusCode HLTTauMonTool::init() {
     for(std::vector<std::string>::iterator it = m_highpt_tau.begin(); it != m_highpt_tau.end(); ++it) {
       m_trigItemsHighPt.push_back(*it);
     }
-    for(std::vector<std::string>::iterator it = m_ztt_tau.begin(); it != m_ztt_tau.end(); ++it) {
-      m_trigItemsZtt.push_back(*it);
-    }
+    for(std::vector<std::string>::iterator it = m_ztt_RNN_tau.begin(); it != m_ztt_RNN_tau.end(); ++it) {
+    m_trigItemsZtt_RNN.push_back(*it);
+    m_trigItemsZtt.push_back(*it);
+  }
+  for(std::vector<std::string>::iterator it = m_ztt_BDT_tau.begin(); it != m_ztt_BDT_tau.end(); ++it) {
+    m_trigItemsZtt_BDT.push_back(*it);
+    m_trigItemsZtt.push_back(*it);
+  }
+
+  // List of chains of interest for Efficiency Ratio plots between FTK and Reference (i.e. non-FTK/"tracktwo") chains.
+
+  // List of MVA triggers
+
+
+
 
 //  HERE DOESN'T WORK SINCE TDT NOT YET INITIALISED
 //  const Trig::ChainGroup* m_allHLTTauItems = getTDT()->getChainGroup("HLT_.*");
@@ -205,7 +243,6 @@ StatusCode HLTTauMonTool::init() {
     
     if(m_L1StringCondition=="allowResurrectedDecision") m_L1TriggerCondition=TrigDefs::Physics | TrigDefs::allowResurrectedDecision;
     if(m_HLTStringCondition=="allowResurrectedDecision") m_HLTTriggerCondition=TrigDefs::Physics | TrigDefs::allowResurrectedDecision;
-
     ATH_CHECK( m_luminosityCondDataKey.initialize() );
 
     return StatusCode::SUCCESS;
@@ -233,7 +270,15 @@ StatusCode HLTTauMonTool::book()
     }
   }
 
-    for(unsigned int i=0;i<m_trigItems.size(); ++i) addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+m_trigItems[i],run));
+  for(unsigned int i=0;i<m_trigItems.size(); ++i){
+    std::string trigItem=m_trigItems[i];
+    if(m_trigItems[i].find("tau25")!=string::npos && m_trigItems[i].find("L1TAU")!=string::npos){
+      size_t posit=m_trigItems[i].rfind("_");
+      trigItem=m_trigItems[i].substr(0,posit);
+    }
+    ATH_MSG_DEBUG("This is the token: "<<trigItem);
+    addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItem,run));
+  }
     
     ATH_MSG_DEBUG("initialize being called");
     
@@ -286,6 +331,15 @@ StatusCode HLTTauMonTool::fill() {
   m_mu_online = avg_mu;
   ATH_MSG_DEBUG("online mu "<<avg_mu);
 
+  m_muCut40Passed = (!m_domuCut40 || (m_domuCut40 && (m_mu_offline<40.)));
+
+  const xAOD::EventInfo* evtInfo = 0;
+  if( !evtStore()->retrieve(evtInfo, "EventInfo" ).isSuccess() ){
+    ATH_MSG_DEBUG("Failed to retrieve EventInfo container, aborting!");
+    return StatusCode::SUCCESS;
+  }
+ m_LB = evtInfo->lumiBlock();
+
   // fill true taus vectors
   m_true_taus.clear(); 
   m_true_taus_nprong.clear();
@@ -328,7 +382,9 @@ StatusCode HLTTauMonTool::fill() {
   }// end if(m_truth)
 
     // good reco taus
-  m_taus.clear();
+  //m_taus.clear();
+  m_taus_BDT.clear();
+  m_taus_RNN.clear();
   m_tauCont = 0;
   sc = evtStore()->retrieve(m_tauCont, "TauJets");
   if( !sc.isSuccess()  ){
@@ -347,17 +403,18 @@ StatusCode HLTTauMonTool::fill() {
         if(pt_Tau<m_effOffTauPtCut) continue;
         int ntrack_TAU = (*offlinetau)->nTracks();
         if(ntrack_TAU!=1 && ntrack_TAU!=3) continue;
-        bool good_tau = (*offlinetau)->isTau(xAOD::TauJetParameters::JetBDTSigMedium);
-        if(m_selection_BDT && !good_tau) continue;    
+        bool good_tau_BDT = (*offlinetau)->isTau(xAOD::TauJetParameters::JetBDTSigMedium);
+        bool good_tau_RNN = (*offlinetau)->isTau(xAOD::TauJetParameters::JetRNNSigMedium);
         if(!Selection(*offlinetau)) continue;
-        m_taus.push_back( *offlinetau );
+        if( !(good_tau_BDT || good_tau_BDT) ) continue;
+        if (good_tau_BDT) m_taus_BDT.push_back( *offlinetau );
+        if (good_tau_RNN) m_taus_RNN.push_back( *offlinetau );
       }
     }
   } //end if_else !sc.isSuccess() 
 
   for(unsigned int j=0;j<m_trigItems.size();++j)
   {
-
   // test Trigger Before Prescale (TBP) decision:
    std::string trig_item_EF = "HLT_"+m_trigItems.at(j);
    std::string trig_item_L1(LowerChain( trig_item_EF ) );
@@ -375,15 +432,54 @@ StatusCode HLTTauMonTool::fill() {
    if ( getTDT()->isPassed(trig_item_EF,m_HLTTriggerCondition) ) hist("hHLTCounts","HLT/TauMon/Expert")->Fill(m_trigItems.at(j).c_str(),1.);  
     //testL1TopoNavigation(m_trigItems[j]);
     //testPrescaleRetrieval(m_trigItems[j]);
-   sc = fillHistogramsForItem(m_trigItems[j]);
+
+                        bool monRNN (false);
+                        for (unsigned int i=0; i<m_trigRNN_chains.size(); i++) {
+                                if ( m_trigItems[j] == m_trigRNN_chains.at(i) ) {
+                                  monRNN = true;
+                                  break;
+                                }
+                        }
+                        bool monBDT (false);
+                        for (unsigned int i=0; i<m_trigBDTRNN_chains.size(); i++) {
+                                if ( m_trigItems[j] == m_trigBDTRNN_chains.at(i) ) {
+                                  if (!monRNN) monRNN = true;
+                                  if (!monBDT) monBDT = true;
+                                  break;
+                                }
+                        } 
+                        if ( (!monBDT) && (!monRNN) ) monBDT=true; // if the chain is not listed in BDTRNN, but it is also not in RNN, then it is BDT 
+        
+                        std::string goodTauRefType;
+                        if (monRNN) {
+                                goodTauRefType = "RNN";
+                        } else {
+                                goodTauRefType = "BDT";
+                        }
+
+      // muCut on Filling the Histograms
+      if (m_muCut40Passed)
+        {
+	  sc = fillHistogramsForItem(m_trigItems[j], monRNN, monBDT, goodTauRefType);
     if(!sc.isSuccess()){ ATH_MSG_WARNING("Failed at fillHistogramsForItem"); } //return sc;}  
     if(m_doTrackCurves){
-      sc = trackCurves (m_trigItems[j]);
-      if(!sc.isSuccess()){ ATH_MSG_WARNING("Failed trackCurves()"); } //return sc;}
-    }
+            sc = trackCurves (m_trigItems[j], goodTauRefType);
+            if(!sc.isSuccess()){ ATH_MSG_WARNING("Failed trackCurves()"); } //return sc;}
+          }
+    // if(m_doEfficiencyRatioPlots){
+    //      sc = efficiencyRatioPlots (m_trigItems[j], goodTauRefType);
+    //      if(!sc.isSuccess()){ ATH_MSG_WARNING("Failed efficiencyRatioPlots()"); } //return sc;}
+    //    }
+        }
+      else
+        {
+          ATH_MSG_WARNING("Pileup Cut 40 was not passed. Skipped: HistogramsForItem"); 
+        } 
 
-  }
 
+    }
+
+  // do L1TopoLeptons
   for(unsigned int i=0;i<m_topo_chains.size(); ++i){
     setCurrentMonGroup("HLT/TauMon/Expert/TopoDiTau/"+m_topo_chains.at(i));
     std::string chain = "HLT_"+m_topo_chains.at(i);
@@ -463,6 +559,12 @@ StatusCode HLTTauMonTool::fill() {
 
 
 
+
+
+
+  // muCut on filling the histograms
+  if (m_muCut40Passed)
+    {
   if(m_doTopoValidation){
     if(m_topo_chains.size()!=m_topo_support_chains.size()) ATH_MSG_WARNING("List of topo and support chains are different. Skipping!");
     else for(unsigned int topo=0;topo<m_topo_chains.size();topo++){
@@ -478,8 +580,10 @@ StatusCode HLTTauMonTool::fill() {
 
   if(m_RealZtautauEff)
   {
-    sc = RealZTauTauEfficiency();
-    if(!sc.isSuccess()){ ATH_MSG_WARNING("Failed RealZTauTauEfficiency()");} //return sc;}
+          sc = RealZTauTauEfficiency("RNN");
+          if(!sc.isSuccess()){ ATH_MSG_WARNING("Failed RealZTauTauEfficiency() for RNN chains");} //return sc;}
+          sc = RealZTauTauEfficiency("BDT");
+          if(!sc.isSuccess()){ ATH_MSG_WARNING("Failed RealZTauTauEfficiency() for BDT chains");} //return sc;}
   }
 
   if(m_dijetFakeTausEff)
@@ -487,12 +591,19 @@ StatusCode HLTTauMonTool::fill() {
     sc = dijetFakeTausEfficiency();
     if(!sc.isSuccess()){ ATH_MSG_WARNING("Failed dijetFakeTausEfficiency()"); } //return sc;}
   }
-        
+    }
+  else
+    {
+      ATH_MSG_WARNING("Pileup Cut 40 was not passed. Skipped: TopoValidation, Emulation, RealZtautauEff, dijetFakeTausEff."); 
+    }  
+
+
   //if(m_doTestTracking){ sc = test2StepTracking();
   //  if(sc.isFailure()){ ATH_MSG_WARNING("Failed at test2Steptracking. Exiting!"); return StatusCode::FAILURE;}
   //}
   return sc;
   //ATH_MSG_DEBUG(" ====== End fillHists() ====== ");
+
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -525,7 +636,11 @@ void HLTTauMonTool::cloneHistogram2(const std::string name, const std::string fo
 
 
 
-StatusCode HLTTauMonTool::fillHistogramsForItem(const std::string & trigItem){
+
+
+
+
+StatusCode HLTTauMonTool::fillHistogramsForItem(const std::string & trigItem, const bool & monRNN, const bool & monBDT, const std::string & goodTauRefType){
     
   ATH_MSG_DEBUG ("HLTTauMonTool::fillHistogramsForItem " << trigItem);
     
@@ -537,40 +652,75 @@ StatusCode HLTTauMonTool::fillHistogramsForItem(const std::string & trigItem){
     ATH_MSG_DEBUG("L1 chain for "<< trig_item_EF << " not found");
   }
     
+  // protection against AODSLIM that misses HLT tau tracks and HLT clusters, for RNN monitoring
+  bool isAODFULL = evtStore()->contains<xAOD::TauTrackContainer>("HLT_xAOD__TauTrackContainer_TrigTauRecMergedTracks") 
+    && evtStore()->contains<xAOD::CaloClusterContainer>("HLT_xAOD__CaloClusterContainer_TrigCaloClusterMaker");
+
+
   if(trigItem=="Dump"){
 
     const xAOD::EmTauRoIContainer* l1Tau_cont = 0;
+
     if ( !evtStore()->retrieve( l1Tau_cont, "LVL1EmTauRoIs").isSuccess() ){ // retrieve arguments: container type, container key
-      ATH_MSG_WARNING("Failed to retrieve LVL1EmTauRoI container. Exiting.");
+      ATH_MSG_WARNING("Failed to retrieve LVL1EmTauRoI container. Exiting! ");
       return StatusCode::FAILURE;
     } else{
       ATH_MSG_DEBUG("found LVL1EmTauRoI in SG");
     }
+
     xAOD::EmTauRoIContainer::const_iterator itEMTau = l1Tau_cont->begin();
     xAOD::EmTauRoIContainer::const_iterator itEMTau_e = l1Tau_cont->end();
+
+    std::string trigItemShort=trigItem;
+    if(trigItem.find("tau25")!=string::npos && trigItem.find("L1TAU")!=string::npos){
+      size_t posit=trigItem.rfind("_");
+      trigItemShort=trigItem.substr(0,posit);
+    }
+
     for(; itEMTau!=itEMTau_e; ++itEMTau){
       if(!Selection(*itEMTau)) continue;   
-      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/L1RoI");
+      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/L1RoI");
       ATH_CHECK(fillL1Tau(*itEMTau)); 
-      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/L1VsOffline");
-      ATH_CHECK(fillL1TauVsOffline(*itEMTau));
+      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/L1VsOffline");
+      ATH_CHECK(fillL1TauVsOffline(*itEMTau, goodTauRefType));
     }
     const xAOD::TauJetContainer * tauJetCont = 0;
     if( !evtStore()->retrieve(tauJetCont, "HLT_xAOD__TauJetContainer_TrigTauRecMerged").isSuccess() ){
       ATH_MSG_WARNING("Failed to retrieve HLT_xAOD__TauJetContainer_TrigTauRecMerged container. Exiting!");
       return StatusCode::FAILURE;
     }
+
+
+
+
+
+
     xAOD::TauJetContainer::const_iterator CI = tauJetCont->begin(),tauJetCont_end = tauJetCont->end();
+
     for(; CI!=tauJetCont_end; ++CI){
       if(!Selection(*CI)) continue;
-      ATH_CHECK(fillEFTau(*CI, trigItem, "basicVars"));
-      ATH_CHECK(fillEFTau(*CI, trigItem, "1p_NonCorr"));
-      ATH_CHECK(fillEFTau(*CI, trigItem, "mp_NonCorr"));
-      ATH_CHECK(fillEFTau(*CI, trigItem, "1p_muCorr"));
-      ATH_CHECK(fillEFTau(*CI, trigItem, "mp_muCorr"));
-      ATH_CHECK(fillEFTauVsOffline(*CI, trigItem, "basicVars"));
-      ATH_CHECK(fillEFTauVsOffline(*CI, trigItem, "1p_NonCorr"));
-      ATH_CHECK(fillEFTauVsOffline(*CI, trigItem, "mp_NonCorr"));
+      sc = fillEFTau(*CI, trigItem, "basicVars", monRNN, monBDT);
+      if (monBDT) {
+        sc = fillEFTau(*CI, trigItem, "1p_NonCorr", monRNN, monBDT);
+        sc = fillEFTau(*CI, trigItem, "mp_NonCorr", monRNN, monBDT);
+      }
+      if(!sc.isSuccess()){ ATH_MSG_WARNING("Failed to Fill BDT input histograms for fillEFTau(). Exiting!"); return sc;}
+      if(monRNN) {
+        sc = fillEFTau(*CI, trigItem, "RNN_inScalar_1P", monRNN, monBDT);
+        sc = fillEFTau(*CI, trigItem, "RNN_inScalar_3P", monRNN, monBDT);
+        if(isAODFULL) {
+          sc = fillEFTau(*CI, trigItem, "RNN_inTrack", monRNN, monBDT);
+          sc = fillEFTau(*CI, trigItem, "RNN_inCluster", monRNN, monBDT);
+        }
+        sc = fillEFTau(*CI, trigItem, "RNN_out", monRNN, monBDT);
+        if(!sc.isSuccess()){ ATH_MSG_WARNING("Failed to Fill RNN input and output histograms for fillEFTau(). Exiting!"); return sc;}
+      }
+      sc = fillEFTauVsOffline(*CI, trigItem, "basicVars", goodTauRefType);
+      if (monBDT) {
+        sc = fillEFTauVsOffline(*CI, trigItem, "1p_NonCorr", goodTauRefType);
+        sc = fillEFTauVsOffline(*CI, trigItem, "mp_NonCorr", goodTauRefType);
+      }
+      if(!sc.isSuccess()){ ATH_MSG_WARNING("Failed to Fill histograms for fillEFTauVsOffline(). Exiting!"); return sc;}
     }
 
   } else {
@@ -579,6 +729,19 @@ StatusCode HLTTauMonTool::fillHistogramsForItem(const std::string & trigItem){
          
       ATH_MSG_DEBUG ("HLTTauMonTool::fillHistogramsForItem passed " << trig_item_EF);
      
+
+
+
+
+
+
+
+
+
+
+
+
+
       std::vector< uint32_t > tau_roIWord;
       std::vector< float > tau_roi_eta;
       std::vector< float > tau_roi_phi;
@@ -588,7 +751,7 @@ StatusCode HLTTauMonTool::fillHistogramsForItem(const std::string & trigItem){
 
       const xAOD::EmTauRoIContainer* l1Tau_cont = 0;
       if ( !evtStore()->retrieve( l1Tau_cont, "LVL1EmTauRoIs").isSuccess() ){ // retrieve arguments: container type, container key
-        ATH_MSG_WARNING("Failed to retrieve LVL1EmTauRoI container. Exiting.");
+        ATH_MSG_WARNING("Failed to retrieve LVL1EmTauRoI container. Exiting!");
       } else {
         ATH_MSG_DEBUG("found LVL1EmTauRoI in SG");
       }
@@ -640,7 +803,7 @@ StatusCode HLTTauMonTool::fillHistogramsForItem(const std::string & trigItem){
                     return sc;
                   }
                   setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/L1VsOffline");
-                  sc = fillL1TauVsOffline(*itEMTau);
+                  sc = fillL1TauVsOffline(*itEMTau, goodTauRefType);
                   if(!sc.isSuccess()){ 
                     ATH_MSG_WARNING("Failed to fill L1VsOffline histo. Exiting!"); 
                     return sc;
@@ -657,6 +820,12 @@ StatusCode HLTTauMonTool::fillHistogramsForItem(const std::string & trigItem){
         const std::vector< TrigCompositeUtils::LinkInfo<xAOD::TauJetContainer> > features
            = getTDT()->features<xAOD::TauJetContainer>( trig_item_EF, m_HLTTriggerCondition );
 
+        std::string trigItemShort=trigItem;
+        if(trigItem.find("tau25")!=string::npos && trigItem.find("L1TAU")!=string::npos){
+          size_t posit=trigItem.rfind("_");
+          trigItemShort=trigItem.substr(0,posit);
+        }
+
          // L1 Histograms, but looking only at RoIs seeding events passing HLT. Otherwise we are biased to events accepted by other chains
         for(const auto& tauJetLinkInfo : features){
           if (!tauJetLinkInfo.isValid()) {
@@ -689,14 +858,14 @@ StatusCode HLTTauMonTool::fillHistogramsForItem(const std::string & trigItem){
               tau_roi_eta.push_back((*itEMTau)->eta());
               tau_roi_phi.push_back((*itEMTau)->phi());
               ATH_MSG_DEBUG("Found RoI in (" << (*itEMTau)->eta() << "," << (*itEMTau)->phi() <<")");
-              setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/L1RoI");
+              setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/L1RoI");
               sc = fillL1Tau(*itEMTau);
               if(!sc.isSuccess()){
                 ATH_MSG_WARNING("Failed to fill L1RoI histo. Exiting!"); 
                 return sc;
               }
-              setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/L1VsOffline");
-              sc = fillL1TauVsOffline(*itEMTau);
+              setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/L1VsOffline");
+              sc = fillL1TauVsOffline(*itEMTau,goodTauRefType);
               if(!sc.isSuccess()){ 
                 ATH_MSG_WARNING("Failed to fill L1VsOffline histo. Exiting!"); 
                 return sc;
@@ -710,8 +879,10 @@ StatusCode HLTTauMonTool::fillHistogramsForItem(const std::string & trigItem){
 
       // look at triggers seeded by L1_TAU20IM_2TAU12IM to get the jet turn-on
       if(trig_item_EF=="HLT_tau35_medium1_tracktwo_tau25_medium1_tracktwo_L1TAU20IM_2TAU12IM" && getTDT()->isPassed(trig_item_EF,m_HLTTriggerCondition)){
+
         const xAOD::JetContainer * jet_cont = 0;
         if(!evtStore()->retrieve(jet_cont, "AntiKt4LCTopoJets").isSuccess()) {
+
           ATH_MSG_WARNING("Failed to retrieve AntiKt4EMTopoJets container");
           //return StatusCode::FAILURE;
         } else {
@@ -745,7 +916,7 @@ StatusCode HLTTauMonTool::fillHistogramsForItem(const std::string & trigItem){
 
       // end L1 histos
      
-      // HLT histsos ...
+      // HLT histos ...
 
       if (getTDT()->getNavigationFormat() == "TriggerElement") {
 
@@ -755,6 +926,7 @@ StatusCode HLTTauMonTool::fillHistogramsForItem(const std::string & trigItem){
           const std::vector< Trig::Feature<xAOD::TauJetContainer> >  vec_preseltau = comb->get<xAOD::TauJetContainer>("TrigTauRecPreselection",m_HLTTriggerCondition);
           std::vector<Trig::Feature<xAOD::TauJetContainer> >::const_iterator preselCI = vec_preseltau.begin(), preselCI_e = vec_preseltau.end();
           if(preselCI==preselCI_e) {
+
             ATH_MSG_DEBUG("TrigTauPreselection TauJet container EMPTY in " << trig_item_EF);
           }
           if(preselCI!=preselCI_e){
@@ -771,13 +943,15 @@ StatusCode HLTTauMonTool::fillHistogramsForItem(const std::string & trigItem){
                   if(!Selection(*tauItr)) continue;
                   setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/PreselectionTau");
                   ATH_CHECK(fillPreselTau(*tauItr));
+
                   setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/PreselectionVsOffline");
-                  ATH_CHECK(fillPreselTauVsOffline(*tauItr));
+                  ATH_CHECK(fillPreselTauVsOffline(*tauItr, goodTauRefType));
                 }
               }
             }
           }         
 
+
           const std::vector< Trig::Feature<xAOD::TauJetContainer> > vec_HLTtau = comb->get<xAOD::TauJetContainer>("TrigTauRecMerged",m_HLTTriggerCondition);
           std::vector<Trig::Feature<xAOD::TauJetContainer> >::const_iterator efCI = vec_HLTtau.begin(), efCI_e = vec_HLTtau.end();
           if(efCI==efCI_e) {
@@ -789,6 +963,7 @@ StatusCode HLTTauMonTool::fillHistogramsForItem(const std::string & trigItem){
               if(efCI->cptr()->size()==0) {
                 ATH_MSG_DEBUG("item "<< trigItem << ": TauJetContainer with " << efCI->cptr()->size() << " TauJets");
               }
+
               xAOD::TauJetContainer::const_iterator tauItr = efCI->cptr()->begin();
               xAOD::TauJetContainer::const_iterator tauEnd = efCI->cptr()->end();
 
@@ -796,26 +971,42 @@ StatusCode HLTTauMonTool::fillHistogramsForItem(const std::string & trigItem){
                 if(!Selection(*tauItr)) {
                   continue;
                 }
-                ATH_CHECK(fillEFTau(*tauItr, trigItem, "basicVars"));
-                ATH_CHECK(fillEFTau(*tauItr, trigItem, "1p_NonCorr"));
-                ATH_CHECK(fillEFTau(*tauItr, trigItem, "mp_NonCorr"));
-                ATH_CHECK(fillEFTau(*tauItr, trigItem, "1p_muCorr"));
-                ATH_CHECK(fillEFTau(*tauItr, trigItem, "mp_muCorr"));
-                if(m_truth) {
-                  ATH_CHECK(fillEFTauVsTruth(*tauItr, trigItem));
+              if(*tauItr) sc = fillEFTau(*tauItr, trigItem, "basicVars", monRNN, monBDT);
+              if (monBDT) {
+                if(*tauItr) sc = fillEFTau(*tauItr, trigItem, "1p_NonCorr", monRNN, monBDT);
+                if(*tauItr) sc = fillEFTau(*tauItr, trigItem, "mp_NonCorr", monRNN, monBDT);
+              }
+              if(!sc.isSuccess()){ ATH_MSG_WARNING("Failed to Fill BDT input histograms for fillEFTau(). Exiting!"); return sc;}
+              if(monRNN) {
+                if(*tauItr) sc = fillEFTau(*tauItr, trigItem, "RNN_inScalar_1P", monRNN, monBDT);
+                if(*tauItr) sc = fillEFTau(*tauItr, trigItem, "RNN_inScalar_3P", monRNN, monBDT);
+                if(isAODFULL) {
+                  if(*tauItr) sc = fillEFTau(*tauItr, trigItem, "RNN_inTrack", monRNN, monBDT);
+                  if(*tauItr) sc = fillEFTau(*tauItr, trigItem, "RNN_inCluster", monRNN, monBDT);
                 }
-                ATH_CHECK(fillEFTauVsOffline(*tauItr, trigItem, "basicVars"));
-                ATH_CHECK(fillEFTauVsOffline(*tauItr, trigItem, "1p_NonCorr"));
-                ATH_CHECK(fillEFTauVsOffline(*tauItr, trigItem, "mp_NonCorr"));
-              } // for tauItr
-            } // if efCI
-          } // for efCI loop 
-        } // end comb loop
+                if(*tauItr) sc = fillEFTau(*tauItr, trigItem, "RNN_out", monRNN, monBDT);
+                if(!sc.isSuccess()){ ATH_MSG_WARNING("Failed to Fill RNN input and output histograms for fillEFTau(). Exiting!"); return sc;}
+              }
+              if(m_truth) if(*tauItr) sc = fillEFTauVsTruth(*tauItr, trigItem);
+              if(*tauItr) sc = fillEFTauVsOffline(*tauItr, trigItem, "basicVars", goodTauRefType);
+              if (monBDT) {
+                if(*tauItr) sc = fillEFTauVsOffline(*tauItr, trigItem, "1p_NonCorr", goodTauRefType);
+                if(*tauItr) sc = fillEFTauVsOffline(*tauItr, trigItem, "mp_NonCorr", goodTauRefType);
+              }
+              if(!sc.isSuccess()){ ATH_MSG_WARNING("Failed to Fill histograms for fillEFTauVsOffline(). Exiting!"); return sc;}
+            }
+          }
+	}
+	}} else { // TrigComposite
 
-      } else { // TrigComposite
+        std::string trigItemShort=trigItem;
+        if(trigItem.find("tau25")!=string::npos && trigItem.find("L1TAU")!=string::npos){
+          size_t posit=trigItem.rfind("_");
+          trigItemShort=trigItem.substr(0,posit);
+        }
 
         const std::vector< TrigCompositeUtils::LinkInfo<xAOD::TauJetContainer> > featuresPreselect
-           = getTDT()->features<xAOD::TauJetContainer>( trig_item_EF, m_HLTTriggerCondition,"HLT_TrigTauRecMerged_MVA");
+           = getTDT()->features<xAOD::TauJetContainer>( trig_item_EF, m_HLTTriggerCondition,"HLT_TrigTauRecMerged_Presel");
 
         if(featuresPreselect.size() == 0) {
           ATH_MSG_DEBUG("TrigTauPreselection TauJet container EMPTY in " << trig_item_EF);
@@ -830,14 +1021,14 @@ StatusCode HLTTauMonTool::fillHistogramsForItem(const std::string & trigItem){
           const ElementLink<xAOD::TauJetContainer> tauJetEL = tauJetLinkInfo.link;
 
           if(!Selection(*tauJetEL)) continue;
-          setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/PreselectionTau");
+          setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/PreselectionTau");
           ATH_CHECK(fillPreselTau(*tauJetEL));
-          setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/PreselectionVsOffline");
-          ATH_CHECK(fillPreselTauVsOffline(*tauJetEL));
+          setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/PreselectionVsOffline");
+          ATH_CHECK(fillPreselTauVsOffline(*tauJetEL, goodTauRefType));
         } // end comb loop
 
         const std::vector< TrigCompositeUtils::LinkInfo<xAOD::TauJetContainer> > featuresMerged
-           = getTDT()->features<xAOD::TauJetContainer>( trig_item_EF, m_HLTTriggerCondition, "TrigTauRecMerged");    
+           = getTDT()->features<xAOD::TauJetContainer>( trig_item_EF, m_HLTTriggerCondition, "HLT_TrigTauRecMerged_MVA");    
 
         if(featuresMerged.size() == 0) {
           ATH_MSG_DEBUG("TrigTauMerged TauJet container EMPTY in " << trig_item_EF);
@@ -851,21 +1042,52 @@ StatusCode HLTTauMonTool::fillHistogramsForItem(const std::string & trigItem){
           }
           const ElementLink<xAOD::TauJetContainer> tauJetEL = tauJetLinkInfo.link;
           if(!Selection(*tauJetEL)) continue;
-          ATH_CHECK(fillEFTau(*tauJetEL, trigItem, "basicVars"));
-          ATH_CHECK(fillEFTau(*tauJetEL, trigItem, "1p_NonCorr"));
-          ATH_CHECK(fillEFTau(*tauJetEL, trigItem, "mp_NonCorr"));
-          ATH_CHECK(fillEFTau(*tauJetEL, trigItem, "1p_muCorr"));
-          ATH_CHECK(fillEFTau(*tauJetEL, trigItem, "mp_muCorr"));
-          if(m_truth) ATH_CHECK(fillEFTauVsTruth(*tauJetEL, trigItem));
-          ATH_CHECK(fillEFTauVsOffline(*tauJetEL, trigItem, "basicVars"));
-          ATH_CHECK(fillEFTauVsOffline(*tauJetEL, trigItem, "1p_NonCorr"));
-          ATH_CHECK(fillEFTauVsOffline(*tauJetEL, trigItem, "mp_NonCorr"));
+	  if(*tauJetEL) sc = fillEFTau(*tauJetEL, trigItem, "basicVars", monRNN, monBDT);
+	  if (monBDT) {
+	    if(*tauJetEL) sc = fillEFTau(*tauJetEL, trigItem, "1p_NonCorr", monRNN, monBDT);
+	    if(*tauJetEL) sc = fillEFTau(*tauJetEL, trigItem, "mp_NonCorr", monRNN, monBDT);
+	  }
+	  if(!sc.isSuccess()){ ATH_MSG_WARNING("Failed to Fill BDT input histograms for fillEFTau(). Exiting!"); return sc;}
+	  if(monRNN) {
+	    if(*tauJetEL) sc = fillEFTau(*tauJetEL, trigItem, "RNN_inScalar_1P", monRNN, monBDT);
+	    if(*tauJetEL) sc = fillEFTau(*tauJetEL, trigItem, "RNN_inScalar_3P", monRNN, monBDT);
+	    if(isAODFULL) {
+	      if(*tauJetEL) sc = fillEFTau(*tauJetEL, trigItem, "RNN_inTrack", monRNN, monBDT);
+	      if(*tauJetEL) sc = fillEFTau(*tauJetEL, trigItem, "RNN_inCluster", monRNN, monBDT);
+	    }
+	    if(*tauJetEL) sc = fillEFTau(*tauJetEL, trigItem, "RNN_out", monRNN, monBDT);
+	    if(!sc.isSuccess()){ ATH_MSG_WARNING("Failed to Fill RNN input and output histograms for fillEFTau(). Exiting!"); return sc;}
+	  }
+	  if(m_truth) if(*tauJetEL) sc = fillEFTauVsTruth(*tauJetEL, trigItem);
+	  if(*tauJetEL) sc = fillEFTauVsOffline(*tauJetEL, trigItem, "basicVars", goodTauRefType);
+	  if (monBDT) {
+	    if(*tauJetEL) sc = fillEFTauVsOffline(*tauJetEL, trigItem, "1p_NonCorr", goodTauRefType);
+	    if(*tauJetEL) sc = fillEFTauVsOffline(*tauJetEL, trigItem, "mp_NonCorr", goodTauRefType);
+	  }
+	  if(!sc.isSuccess()){ ATH_MSG_WARNING("Failed to Fill histograms for fillEFTauVsOffline(). Exiting!"); return sc;}
+	  
         } // end comb loop
 
       } // TriggerElement or TrigComposite
 
     } // end events passing HLT chain
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
     // L1Topo Tests
     if(trig_item_EF=="HLT_tau35_medium1_tracktwo_tau25_medium1_tracktwo_L1TAU20IM_2TAU12IM" && getTDT()->isPassed(trig_item_EF)){
 
@@ -900,7 +1122,7 @@ StatusCode HLTTauMonTool::fillHistogramsForItem(const std::string & trigItem){
       } else { // TrigComposite
 
         const std::vector< TrigCompositeUtils::LinkInfo<xAOD::TauJetContainer> > features
-           = getTDT()->features<xAOD::TauJetContainer>( trig_item_EF, m_HLTTriggerCondition, "TrigTauRecMerged" );
+           = getTDT()->features<xAOD::TauJetContainer>( trig_item_EF, m_HLTTriggerCondition, "TrigTauRecMerged_MVA" );
 
         for(const auto& tauJetLinkInfo : features){
           if (!tauJetLinkInfo.isValid()) {
@@ -935,31 +1157,38 @@ StatusCode HLTTauMonTool::fillHistogramsForItem(const std::string & trigItem){
     
   if( m_turnOnCurves) {
     if(m_truth){ 
-      sc = TruthTauEfficiency(trigItem, "Truth");
-      if(!sc.isSuccess()){ 
-        ATH_MSG_WARNING("Failed to fill Truth eff curves");
-        //return StatusCode::FAILURE;
-      } 
-      sc = TruthTauEfficiency(trigItem, "Truth+Reco");
-      if(!sc.isSuccess()){ 
-        ATH_MSG_WARNING("Failed to fill Truth+Reco eff curves");
-      }
+      sc = TruthTauEfficiency(trigItem, "Truth", goodTauRefType);
+      if(!sc.isSuccess()){ ATH_MSG_WARNING("Failed to fill Truth eff curves");} //return StatusCode::FAILURE;}
+      sc = TruthTauEfficiency(trigItem, "Truth+Reco", goodTauRefType);
+      if(!sc.isSuccess()){ ATH_MSG_WARNING("Failed to fill Truth+Reco eff curves");} //return StatusCode::FAILURE;}
     }
-    sc = TauEfficiency(trigItem,m_turnOnCurvesDenom);
-    if(!sc.isSuccess()){ 
-      ATH_MSG_WARNING("Failed to fill Reco eff curves"); 
-      //return StatusCode::FAILURE;
-    } 
+
+    sc = TauEfficiency(trigItem,m_turnOnCurvesDenom, goodTauRefType);
+    if(!sc.isSuccess()){ ATH_MSG_WARNING("Failed to fill Reco eff curves"); } //return StatusCode::FAILURE;}
+    //      if(m_truth) sc = TauEfficiencyCombo(trigItem);
+    //      if(sc.isFailure()){ ATH_MSG_WARNING("Failed to fill combo eff curves. Exiting!"); return StatusCode::FAILURE;}
   }  
 
+
+
+
+
+
   if (!sc.isSuccess()) {
     ATH_MSG_WARNING("Could not fill histograms for given item.");
   }
     
   return sc;  
+
 }
 
 
+
+
+
+
+
+
 StatusCode HLTTauMonTool::fillL1Tau(const xAOD::EmTauRoI * aL1Tau){
 
   ATH_MSG_DEBUG("HLTTauMonTool::fillL1Tau");
@@ -1016,6 +1245,9 @@ StatusCode HLTTauMonTool::fillL1Tau(const xAOD::EmTauRoI * aL1Tau){
 
 }
 
+
+
+
 StatusCode HLTTauMonTool::fillL1Jet(const xAOD::JetRoI * aL1Jet){
   hist("hL1JetRoIEta")->Fill(aL1Jet->eta());
   hist("hL1JetRoIPhi")->Fill(aL1Jet->phi());
@@ -1027,6 +1259,8 @@ StatusCode HLTTauMonTool::fillL1Jet(const xAOD::JetRoI * aL1Jet){
   return StatusCode::SUCCESS;
 }
 
+
+
 StatusCode HLTTauMonTool::fillPreselTau(const xAOD::TauJet *aEFTau){
 
     ATH_MSG_DEBUG ("HLTTauMonTool::fillPreselTau");
@@ -1068,7 +1302,7 @@ StatusCode HLTTauMonTool::fillPreselTau(const xAOD::TauJet *aEFTau){
 
 }
 
-StatusCode HLTTauMonTool::fillEFTau(const xAOD::TauJet *aEFTau, const std::string & trigItem, const std::string & BDTinput_type){
+StatusCode HLTTauMonTool::fillEFTau(const xAOD::TauJet *aEFTau, const std::string & trigItem, const std::string & BDTinput_type, const bool & monRNN, const bool & monBDT){
     
  ATH_MSG_DEBUG ("HLTTauMonTool::fillEFTau");
   
@@ -1088,6 +1322,7 @@ StatusCode HLTTauMonTool::fillEFTau(const xAOD::TauJet *aEFTau, const std::strin
   float EMFrac = -1.0;
 //  float PSSFraction = 0;
   float BDTJetScore = 0;
+  float BDTJetScoreSigTrans = 0;
   float innerTrkAvgDist = 0;
   float etOverPtLeadTrk = 0;
   float ipSigLeadTrk = 0;
@@ -1113,6 +1348,7 @@ StatusCode HLTTauMonTool::fillEFTau(const xAOD::TauJet *aEFTau, const std::strin
   float dRmaxCorr = 0;
   float mEflowApproxCorr = 0;
   float ptRatioEflowApproxCorr = 0;
+
   float mu = 0;
 
   int EFnTrack(-1);
@@ -1121,15 +1357,22 @@ StatusCode HLTTauMonTool::fillEFTau(const xAOD::TauJet *aEFTau, const std::strin
   #else
   aEFTau->detail(xAOD::TauJetParameters::nChargedTracks, EFnTrack);
   #endif
-  bool is1P(false), isMP(false);   
+  bool is0P(false),is1P(false), isMP(false);   
+  if(EFnTrack==0) is0P = true;
   if(EFnTrack==1) is1P = true;
   if(EFnTrack>1) isMP = true;
   //Pileup
   mu = m_mu_offline;
 
+  std::string trigItemShort=trigItem;
+  if(trigItem.find("tau25")!=string::npos && trigItem.find("L1TAU")!=string::npos){
+    size_t posit=trigItem.rfind("_");
+    trigItemShort=trigItem.substr(0,posit);
+  }
+
   if(BDTinput_type == "basicVars")
     {
-      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/EFTau");
+      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFTau");
       hist("hEFEt")->Fill(aEFTau->pt()/GeV);
       hist("hEFEta")->Fill(aEFTau->eta());
       int num_vxt = m_mu_online;
@@ -1161,220 +1404,478 @@ StatusCode HLTTauMonTool::fillEFTau(const xAOD::TauJet *aEFTau, const std::strin
       //if(aEFTau->detail(xAOD::TauJetParameters::hadRadius, hadRadius)) hist("hEFHADRadius")->Fill(hadRadius);  
       if(aEFTau->detail(xAOD::TauJetParameters::isolFrac, isoFrac)) hist("hEFIsoFrac")->Fill(isoFrac);
       //if(aEFTau->detail(xAOD::TauJetParameters::PSSFraction, PSSFraction)) hist("hEFPSSFraction")->Fill(PSSFraction);
+
+      if (monBDT) {
   BDTJetScore = aEFTau->discriminant(xAOD::TauJetParameters::TauID::BDTJetScore);
       if( BDTJetScore )
   {
     if(is1P) hist("hScore1p")->Fill(BDTJetScore);
     if(isMP) hist("hScoremp")->Fill(BDTJetScore);
   }
+        BDTJetScoreSigTrans = aEFTau->discriminant(xAOD::TauJetParameters::TauID::BDTJetScoreSigTrans);
+        if( BDTJetScoreSigTrans )
+          {
+            if(is1P) hist("hScoreSigTrans1p")->Fill(BDTJetScoreSigTrans);
+            if(isMP) hist("hScoreSigTransmp")->Fill(BDTJetScoreSigTrans);
+          }
+      } // end of if(monBDT)
+
     }
   else if(BDTinput_type == "1p_NonCorr")
     {
-      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/EFTau/BDT/1p_nonCorrected");
+      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFTau/BDT/1p_nonCorrected");
       if(is1P)
         {
           if(aEFTau->detail(xAOD::TauJetParameters::innerTrkAvgDist, innerTrkAvgDist)) 
       {
         hist("hEFinnerTrkAvgDist1PNCorr")->Fill(innerTrkAvgDist);
+              if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))
+                {
         profile("hEFinnerTrkAvgDist1PNCmu")->Fill(mu, innerTrkAvgDist);
       }
+            }
           if(aEFTau->detail(xAOD::TauJetParameters::etOverPtLeadTrk, etOverPtLeadTrk))
       {
         hist("hEFetOverPtLeadTrk1PNCorr")->Fill(etOverPtLeadTrk);
-        profile("hEFetOverPtLeadTrk1PNCmu")->Fill(mu, etOverPtLeadTrk);
+              if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFetOverPtLeadTrk1PNCmu")->Fill(mu, etOverPtLeadTrk);
       }
           if(aEFTau->detail(xAOD::TauJetParameters::ipSigLeadTrk, ipSigLeadTrk))
       {
         hist("hEFipSigLeadTrk1PNCorr")->Fill(ipSigLeadTrk);
-        profile("hEFipSigLeadTrk1PNCmu")->Fill(mu, ipSigLeadTrk);
+              if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFipSigLeadTrk1PNCmu")->Fill(mu, ipSigLeadTrk);
       }
           if(aEFTau->detail(xAOD::TauJetParameters::SumPtTrkFrac, SumPtTrkFrac))
       {
         hist("hEFSumPtTrkFrac1PNCorr")->Fill(SumPtTrkFrac);
-        profile("hEFSumPtTrkFrac1PNCmu")->Fill(mu, SumPtTrkFrac);
+              if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFSumPtTrkFrac1PNCmu")->Fill(mu, SumPtTrkFrac);
       }
           if(aEFTau->detail(xAOD::TauJetParameters::ChPiEMEOverCaloEME, ChPiEMEOverCaloEME))
       {
         hist("hEFChPiEMEOverCaloEME1PNCorr")->Fill(ChPiEMEOverCaloEME);
-        profile("hEFChPiEMEOverCaloEME1PNCmu")->Fill(mu, ChPiEMEOverCaloEME);
+              if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFChPiEMEOverCaloEME1PNCmu")->Fill(mu, ChPiEMEOverCaloEME);
       }
           if(aEFTau->detail(xAOD::TauJetParameters::EMPOverTrkSysP, EMPOverTrkSysP))
       {
         hist("hEFEMPOverTrkSysP1PNCorr")->Fill(EMPOverTrkSysP);
-        profile("hEFEMPOverTrkSysP1PNCmu")->Fill(mu, EMPOverTrkSysP);
+              if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFEMPOverTrkSysP1PNCmu")->Fill(mu, EMPOverTrkSysP);
       }
           if(aEFTau->detail(xAOD::TauJetParameters::centFrac, centFrac))
       {
         hist("hEFcentFrac1PNCorr")->Fill(centFrac);
-        profile("hEFcentFrac1PNCmu")->Fill(mu, centFrac);
+              if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFcentFrac1PNCmu")->Fill(mu, centFrac);
       }
           if(aEFTau->detail(xAOD::TauJetParameters::ptRatioEflowApprox, ptRatioEflowApprox)) 
       {
         hist("hEFptRatioEflowApprox1PNCorr")->Fill(ptRatioEflowApprox);
-        profile("hEFptRatioEflowApprox1PNCmu")->Fill(mu, ptRatioEflowApprox);
+              if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFptRatioEflowApprox1PNCmu")->Fill(mu, ptRatioEflowApprox);
       }
         }
     }
   else if(BDTinput_type == "mp_NonCorr")
     {
-      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/EFTau/BDT/mp_nonCorrected");
+      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFTau/BDT/mp_nonCorrected");
       if(isMP)
         {
           if(aEFTau->detail(xAOD::TauJetParameters::innerTrkAvgDist, innerTrkAvgDist))
       {
         hist("hEFinnerTrkAvgDistMPNCorr")->Fill(innerTrkAvgDist);
-        profile("hEFinnerTrkAvgDistMPNCmu")->Fill(mu, innerTrkAvgDist);
+              if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFinnerTrkAvgDistMPNCmu")->Fill(mu, innerTrkAvgDist);
       }
           if(aEFTau->detail(xAOD::TauJetParameters::etOverPtLeadTrk, etOverPtLeadTrk))
       {
         hist("hEFetOverPtLeadTrkMPNCorr")->Fill(etOverPtLeadTrk);
-        profile("hEFetOverPtLeadTrkMPNCmu")->Fill(mu, etOverPtLeadTrk);
+              if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFetOverPtLeadTrkMPNCmu")->Fill(mu, etOverPtLeadTrk);
       }
           if(aEFTau->detail(xAOD::TauJetParameters::ChPiEMEOverCaloEME, ChPiEMEOverCaloEME))
       {
         hist("hEFChPiEMEOverCaloEMEMPNCorr")->Fill(ChPiEMEOverCaloEME);
-        profile("hEFChPiEMEOverCaloEMEMPNCmu")->Fill(mu, ChPiEMEOverCaloEME);
+              if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFChPiEMEOverCaloEMEMPNCmu")->Fill(mu, ChPiEMEOverCaloEME);
       }
           if(aEFTau->detail(xAOD::TauJetParameters::EMPOverTrkSysP, EMPOverTrkSysP))
       {
         hist("hEFEMPOverTrkSysPMPNCorr")->Fill(EMPOverTrkSysP);
-        profile("hEFEMPOverTrkSysPMPNCmu")->Fill(mu, EMPOverTrkSysP);
+              if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFEMPOverTrkSysPMPNCmu")->Fill(mu, EMPOverTrkSysP);
       }
           if(aEFTau->detail(xAOD::TauJetParameters::centFrac, centFrac))
       {
         hist("hEFcentFracMPNCorr")->Fill(centFrac);
-        profile("hEFcentFracMPNCmu")->Fill(mu, centFrac);
+              if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFcentFracMPNCmu")->Fill(mu, centFrac);
       }
           if(aEFTau->detail(xAOD::TauJetParameters::ptRatioEflowApprox, ptRatioEflowApprox))
       {
         hist("hEFptRatioEflowApproxMPNCorr")->Fill(ptRatioEflowApprox);
-        profile("hEFptRatioEflowApproxMPNCmu")->Fill(mu, ptRatioEflowApprox);
+              if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFptRatioEflowApproxMPNCmu")->Fill(mu, ptRatioEflowApprox);
       }
           if(aEFTau->detail(xAOD::TauJetParameters::dRmax, dRmax))
       {
         hist("hEFdRmaxMPNCorr")->Fill(dRmax);      
-        profile("hEFdRmaxMPNCmu")->Fill(mu, dRmax);      
+              if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFdRmaxMPNCmu")->Fill(mu, dRmax);      
       }
           if(aEFTau->detail(xAOD::TauJetParameters::massTrkSys, massTrkSys))
       {
         hist("hEFmassTrkSysMPNCorr")->Fill(massTrkSys/GeV);
-        profile("hEFmassTrkSysMPNCmu")->Fill(mu, massTrkSys/GeV);
+              if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFmassTrkSysMPNCmu")->Fill(mu, massTrkSys/GeV);
       }
           if(aEFTau->detail(xAOD::TauJetParameters::trFlightPathSig, trFlightPathSig))
       {
         hist("hEFtrFlightPathSigMPNCorr")->Fill(trFlightPathSig);
-        profile("hEFtrFlightPathSigMPNCmu")->Fill(mu, trFlightPathSig);
+              if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFtrFlightPathSigMPNCmu")->Fill(mu, trFlightPathSig);
       }
           if(aEFTau->detail(xAOD::TauJetParameters::mEflowApprox, mEflowApprox))
       {
         hist("hEFmEflowApproxMPNCorr")->Fill(mEflowApprox);
-        profile("hEFmEflowApproxMPNCmu")->Fill(mu, mEflowApprox);
+              if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFmEflowApproxMPNCmu")->Fill(mu, mEflowApprox);
       }
         }
     }
   else if(BDTinput_type == "1p_muCorr")
     {
-      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/EFTau/BDT/1p_Corrected");
+      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFTau/BDT/1p_Corrected");
       if(is1P)
         {
           if(aEFTau->detail(xAOD::TauJetParameters::innerTrkAvgDistCorrected, innerTrkAvgDistCorr)) 
       {
         hist("hEFinnerTrkAvgDist1PCorr")->Fill(innerTrkAvgDistCorr);
-        profile("hEFinnerTrkAvgDist1PCmu")->Fill(mu, innerTrkAvgDistCorr);
+      if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFinnerTrkAvgDist1PCmu")->Fill(mu, innerTrkAvgDistCorr);
       }
           if(aEFTau->detail(xAOD::TauJetParameters::etOverPtLeadTrkCorrected, etOverPtLeadTrkCorr))
       {
         hist("hEFetOverPtLeadTrk1PCorr")->Fill(etOverPtLeadTrkCorr);
-        profile("hEFetOverPtLeadTrk1PCmu")->Fill(mu, etOverPtLeadTrkCorr);
+      if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFetOverPtLeadTrk1PCmu")->Fill(mu, etOverPtLeadTrkCorr);
       }
           if(aEFTau->detail(xAOD::TauJetParameters::ipSigLeadTrkCorrected, ipSigLeadTrkCorr))
       {
         hist("hEFipSigLeadTrk1PCorr")->Fill(ipSigLeadTrkCorr);
-        profile("hEFipSigLeadTrk1PCmu")->Fill(mu, ipSigLeadTrkCorr);
+      if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFipSigLeadTrk1PCmu")->Fill(mu, ipSigLeadTrkCorr);
       }
           if(aEFTau->detail(xAOD::TauJetParameters::SumPtTrkFracCorrected, SumPtTrkFracCorr)) 
       {
         hist("hEFSumPtTrkFrac1PCorr")->Fill(SumPtTrkFracCorr);
-        profile("hEFSumPtTrkFrac1PCmu")->Fill(mu, SumPtTrkFracCorr);
+      if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFSumPtTrkFrac1PCmu")->Fill(mu, SumPtTrkFracCorr);
       }
     if(aEFTau->detail(xAOD::TauJetParameters::ChPiEMEOverCaloEMECorrected, ChPiEMEOverCaloEMECorr))
       {
         hist("hEFChPiEMEOverCaloEME1PCorr")->Fill(ChPiEMEOverCaloEMECorr);
-        profile("hEFChPiEMEOverCaloEME1PCmu")->Fill(mu, ChPiEMEOverCaloEMECorr);
+      if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFChPiEMEOverCaloEME1PCmu")->Fill(mu, ChPiEMEOverCaloEMECorr);
       }
           if(aEFTau->detail(xAOD::TauJetParameters::EMPOverTrkSysPCorrected, EMPOverTrkSysPCorr)) 
       {
         hist("hEFEMPOverTrkSysP1PCorr")->Fill(EMPOverTrkSysPCorr);
-        profile("hEFEMPOverTrkSysP1PCmu")->Fill(mu, EMPOverTrkSysPCorr);
+      if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFEMPOverTrkSysP1PCmu")->Fill(mu, EMPOverTrkSysPCorr);
       }
           if(aEFTau->detail(xAOD::TauJetParameters::centFracCorrected, centFracCorr))
       {
         hist("hEFcentFrac1PCorr")->Fill(centFracCorr);
-        profile("hEFcentFrac1PCmu")->Fill(mu, centFracCorr);
+      if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFcentFrac1PCmu")->Fill(mu, centFracCorr);
       }
     if(aEFTau->detail(xAOD::TauJetParameters::ptRatioEflowApproxCorrected, ptRatioEflowApproxCorr))
       {
         hist("hEFptRatioEflowApprox1PCorr")->Fill(ptRatioEflowApproxCorr);
-        profile("hEFptRatioEflowApprox1PCmu")->Fill(mu, ptRatioEflowApproxCorr);
+      if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFptRatioEflowApprox1PCmu")->Fill(mu, ptRatioEflowApproxCorr);
       }
         }
     }
   else if(BDTinput_type == "mp_muCorr")
     {
-      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/EFTau/BDT/mp_Corrected");
+      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFTau/BDT/mp_Corrected");
       if(isMP)
         {
           if(aEFTau->detail(xAOD::TauJetParameters::innerTrkAvgDistCorrected, innerTrkAvgDistCorr)) 
       {
         hist("hEFinnerTrkAvgDistMPCorr")->Fill(innerTrkAvgDistCorr);
-        profile("hEFinnerTrkAvgDistMPCmu")->Fill(mu, innerTrkAvgDistCorr);
+      if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFinnerTrkAvgDistMPCmu")->Fill(mu, innerTrkAvgDistCorr);
       }
           if(aEFTau->detail(xAOD::TauJetParameters::etOverPtLeadTrkCorrected, etOverPtLeadTrkCorr))
       {
         hist("hEFetOverPtLeadTrkMPCorr")->Fill(etOverPtLeadTrkCorr);
-        profile("hEFetOverPtLeadTrkMPCmu")->Fill(mu, etOverPtLeadTrkCorr);
+      if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFetOverPtLeadTrkMPCmu")->Fill(mu, etOverPtLeadTrkCorr);
       }
     if(aEFTau->detail(xAOD::TauJetParameters::ChPiEMEOverCaloEMECorrected, ChPiEMEOverCaloEMECorr)) 
       {
         hist("hEFChPiEMEOverCaloEMEMPCorr")->Fill(ChPiEMEOverCaloEMECorr);
-        profile("hEFChPiEMEOverCaloEMEMPCmu")->Fill(mu, ChPiEMEOverCaloEMECorr);
+      if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFChPiEMEOverCaloEMEMPCmu")->Fill(mu, ChPiEMEOverCaloEMECorr);
       }
           if(aEFTau->detail(xAOD::TauJetParameters::EMPOverTrkSysPCorrected, EMPOverTrkSysPCorr)) 
       {
         hist("hEFEMPOverTrkSysPMPCorr")->Fill(EMPOverTrkSysPCorr);     
-        profile("hEFEMPOverTrkSysPMPCmu")->Fill(mu, EMPOverTrkSysPCorr);     
+      if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFEMPOverTrkSysPMPCmu")->Fill(mu, EMPOverTrkSysPCorr);           
       }
     if(aEFTau->detail(xAOD::TauJetParameters::centFracCorrected, centFracCorr))
       {
         hist("hEFcentFracMPCorr")->Fill(centFracCorr);
-        profile("hEFcentFracMPCmu")->Fill(mu, centFracCorr);
+      if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFcentFracMPCmu")->Fill(mu, centFracCorr);
       }
     if(aEFTau->detail(xAOD::TauJetParameters::ptRatioEflowApproxCorrected, ptRatioEflowApproxCorr))
       {
         hist("hEFptRatioEflowApproxMPCorr")->Fill(ptRatioEflowApproxCorr);
-        profile("hEFptRatioEflowApproxMPCmu")->Fill(mu, ptRatioEflowApproxCorr);
+      if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFptRatioEflowApproxMPCmu")->Fill(mu, ptRatioEflowApproxCorr);
       }
           if(aEFTau->detail(xAOD::TauJetParameters::dRmaxCorrected, dRmaxCorr))
       {
         hist("hEFdRmaxMPCorr")->Fill(dRmaxCorr);      
-        profile("hEFdRmaxMPCmu")->Fill(mu, dRmaxCorr);      
+      if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFdRmaxMPCmu")->Fill(mu, dRmaxCorr);      
       }
           if(aEFTau->detail(xAOD::TauJetParameters::massTrkSysCorrected, massTrkSysCorr))
       {
         hist("hEFmassTrkSysMPCorr")->Fill(massTrkSysCorr/GeV);
-        profile("hEFmassTrkSysMPCmu")->Fill(mu, massTrkSysCorr/GeV);
+      if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFmassTrkSysMPCmu")->Fill(mu, massTrkSysCorr/GeV);
       }
           if(aEFTau->detail(xAOD::TauJetParameters::trFlightPathSigCorrected, trFlightPathSigCorr))
       {
         hist("hEFtrFlightPathSigMPCorr")->Fill(trFlightPathSigCorr);
-        profile("hEFtrFlightPathSigMPCmu")->Fill(mu, trFlightPathSigCorr);
+      if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFtrFlightPathSigMPCmu")->Fill(mu, trFlightPathSigCorr);
       }
           if(aEFTau->detail(xAOD::TauJetParameters::mEflowApproxCorrected, mEflowApproxCorr))
       {
         hist("hEFmEflowApproxMPCorr")->Fill(mEflowApproxCorr);
-        profile("hEFmEflowApproxMPCmu")->Fill(mu, mEflowApproxCorr);
+      if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles))  profile("hEFmEflowApproxMPCmu")->Fill(mu, mEflowApproxCorr);
       }
         }
+      }
+  else if(BDTinput_type == "RNN_inScalar_1P")
+    {
+      // RNN Input Variables
+      // Scalars
+      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFTau/RNN/InputScalar1p");
+      if(is1P)
+        {
+          float RNN_scalar_centFrac(-999.);
+          float RNN_scalar_etOverPtLeadTrk(-999.);
+          float RNN_scalar_dRmax(-999.);
+          float RNN_scalar_absipSigLeadTrk(-999.);
+          float RNN_scalar_SumPtTrkFrac(-999.);
+          float RNN_scalar_EMPOverTrkSysP(-999.);
+          float RNN_scalar_ptRatioEflowApprox(-999.);
+          float RNN_scalar_mEflowApprox(-999.);
+          double RNN_scalar_ptDetectorAxis(-999.);
+
+          if (aEFTau->detail(xAOD::TauJetParameters::centFrac, RNN_scalar_centFrac)){
+            RNN_scalar_centFrac = std::min(RNN_scalar_centFrac, 1.0f);
+            hist("hEFRNNInput_Scalar_centFrac_1P")->Fill(RNN_scalar_centFrac);
+          }
+          if (aEFTau->detail(xAOD::TauJetParameters::etOverPtLeadTrk, RNN_scalar_etOverPtLeadTrk)){
+            RNN_scalar_etOverPtLeadTrk = TMath::Log10(std::max(RNN_scalar_etOverPtLeadTrk, 0.1f));
+            hist("hEFRNNInput_Scalar_etOverPtLeadTrk_log_1P")->Fill(RNN_scalar_etOverPtLeadTrk);
+          }
+          if (aEFTau->detail(xAOD::TauJetParameters::dRmax, RNN_scalar_dRmax)){
+            hist("hEFRNNInput_Scalar_dRmax_1P")->Fill(RNN_scalar_dRmax);
+          }
+          if (aEFTau->detail(xAOD::TauJetParameters::ipSigLeadTrk, RNN_scalar_absipSigLeadTrk)){
+            RNN_scalar_absipSigLeadTrk = std::min(TMath::Abs(RNN_scalar_absipSigLeadTrk), 30.0f);
+            hist("hEFRNNInput_Scalar_absipSigLeadTrk_1P")->Fill(RNN_scalar_absipSigLeadTrk);
+          }
+          if (aEFTau->detail(xAOD::TauJetParameters::SumPtTrkFrac, RNN_scalar_SumPtTrkFrac)){
+            hist("hEFRNNInput_Scalar_SumPtTrkFrac_1P")->Fill(RNN_scalar_SumPtTrkFrac);
+          }
+          if (aEFTau->detail(xAOD::TauJetParameters::EMPOverTrkSysP, RNN_scalar_EMPOverTrkSysP)){
+            RNN_scalar_EMPOverTrkSysP = TMath::Log10(std::max(RNN_scalar_EMPOverTrkSysP, 1e-3f));
+            hist("hEFRNNInput_Scalar_EMPOverTrkSysP_log_1P")->Fill(RNN_scalar_EMPOverTrkSysP);
+          }
+          if (aEFTau->detail(xAOD::TauJetParameters::ptRatioEflowApprox, RNN_scalar_ptRatioEflowApprox)){
+            RNN_scalar_ptRatioEflowApprox = std::min(RNN_scalar_ptRatioEflowApprox, 4.0f);
+            hist("hEFRNNInput_Scalar_ptRatioEflowApprox_1P")->Fill(RNN_scalar_ptRatioEflowApprox);
+          }
+          if (aEFTau->detail(xAOD::TauJetParameters::mEflowApprox, RNN_scalar_mEflowApprox)){
+            RNN_scalar_mEflowApprox = TMath::Log10(std::max(RNN_scalar_mEflowApprox, 140.0f));
+            hist("hEFRNNInput_Scalar_mEflowApprox_log_1P")->Fill(RNN_scalar_mEflowApprox);
+          }
+          RNN_scalar_ptDetectorAxis = TMath::Log10(std::min(aEFTau->ptDetectorAxis() / 1000.0, 100.0));
+          hist("hEFRNNInput_Scalar_ptDetectorAxis_log_1P")->Fill(RNN_scalar_ptDetectorAxis);
+        }
+    } 
+  else if(BDTinput_type == "RNN_inScalar_3P")
+    {
+      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFTau/RNN/InputScalar3p");
+      if(isMP) {
+        float RNN_scalar_centFrac(-999.);
+        float RNN_scalar_etOverPtLeadTrk(-999.);
+        float RNN_scalar_dRmax(-999.);
+        float RNN_scalar_trFlightPathSig(-999.);
+        float RNN_scalar_SumPtTrkFrac(-999.);
+        float RNN_scalar_EMPOverTrkSysP(-999.);
+        float RNN_scalar_ptRatioEflowApprox(-999.);
+        float RNN_scalar_mEflowApprox(-999.);
+        double RNN_scalar_ptDetectorAxis(-999.);
+        float RNN_scalar_massTrkSys(-999.);
+
+        if (aEFTau->detail(xAOD::TauJetParameters::centFrac, RNN_scalar_centFrac)){
+          RNN_scalar_centFrac = std::min(RNN_scalar_centFrac, 1.0f);
+          hist("hEFRNNInput_Scalar_centFrac_3P")->Fill(RNN_scalar_centFrac);
+}
+        if (aEFTau->detail(xAOD::TauJetParameters::etOverPtLeadTrk, RNN_scalar_etOverPtLeadTrk)){
+          RNN_scalar_etOverPtLeadTrk = TMath::Log10(std::max(RNN_scalar_etOverPtLeadTrk, 0.1f));
+          hist("hEFRNNInput_Scalar_etOverPtLeadTrk_log_3P")->Fill(RNN_scalar_etOverPtLeadTrk);
+        }
+        if (aEFTau->detail(xAOD::TauJetParameters::dRmax, RNN_scalar_dRmax)){
+          hist("hEFRNNInput_Scalar_dRmax_3P")->Fill(RNN_scalar_dRmax);
+        }
+        if (aEFTau->detail(xAOD::TauJetParameters::trFlightPathSig, RNN_scalar_trFlightPathSig)){
+          RNN_scalar_trFlightPathSig = TMath::Log10(std::max(RNN_scalar_trFlightPathSig, 0.01f));
+          hist("hEFRNNInput_Scalar_trFlightPathSig_log_3P")->Fill(RNN_scalar_trFlightPathSig);
+        }
+        if (aEFTau->detail(xAOD::TauJetParameters::SumPtTrkFrac, RNN_scalar_SumPtTrkFrac)){
+          hist("hEFRNNInput_Scalar_SumPtTrkFrac_3P")->Fill(RNN_scalar_SumPtTrkFrac);
+        }
+        if (aEFTau->detail(xAOD::TauJetParameters::EMPOverTrkSysP, RNN_scalar_EMPOverTrkSysP)){
+          RNN_scalar_EMPOverTrkSysP = TMath::Log10(std::max(RNN_scalar_EMPOverTrkSysP, 1e-3f));
+          hist("hEFRNNInput_Scalar_EMPOverTrkSysP_log_3P")->Fill(RNN_scalar_EMPOverTrkSysP);
+        }
+        if (aEFTau->detail(xAOD::TauJetParameters::ptRatioEflowApprox, RNN_scalar_ptRatioEflowApprox)){
+          RNN_scalar_ptRatioEflowApprox = std::min(RNN_scalar_ptRatioEflowApprox, 4.0f);
+          hist("hEFRNNInput_Scalar_ptRatioEflowApprox_3P")->Fill(RNN_scalar_ptRatioEflowApprox);
+        }
+        if (aEFTau->detail(xAOD::TauJetParameters::mEflowApprox, RNN_scalar_mEflowApprox)){
+          RNN_scalar_mEflowApprox = TMath::Log10(std::max(RNN_scalar_mEflowApprox, 140.0f));
+          hist("hEFRNNInput_Scalar_mEflowApprox_log_3P")->Fill(RNN_scalar_mEflowApprox);
+        }
+        RNN_scalar_ptDetectorAxis = TMath::Log10(std::min(aEFTau->ptDetectorAxis() / 1000.0, 100.0));
+        hist("hEFRNNInput_Scalar_ptDetectorAxis_log_3P")->Fill(RNN_scalar_ptDetectorAxis);
+        if (aEFTau->detail(xAOD::TauJetParameters::massTrkSys, RNN_scalar_massTrkSys)){
+          RNN_scalar_massTrkSys = TMath::Log10(std::max(RNN_scalar_massTrkSys, 140.0f));
+          hist("hEFRNNInput_Scalar_massTrkSys_log_3P")->Fill(RNN_scalar_massTrkSys);
+        }
+      }
+    } 
+  else if( (BDTinput_type == "RNN_inTrack") && monRNN)
+    {
+      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFTau/RNN/InputTrack");
+      // Tracks
+      float RNN_tracks_pt_log(-999.);
+      float RNN_tracks_pt_jetseed_log(-999.);
+      float RNN_tracks_dEta(-999.);
+      float RNN_tracks_dPhi(-999.);
+      float RNN_tracks_z0sinThetaTJVA_abs_log(-999.);
+      float RNN_tracks_d0_abs_log(-999.);
+                        double RNN_tracks_nIBLHitsAndExp(0.);
+                        double RNN_tracks_nPixelHitsPlusDeadSensors(0.);
+                        double RNN_tracks_nSCTHitsPlusDeadSensors(0.);
+
+      if (is1P || isMP) {
+                                std::vector<const xAOD::TauTrack *> tracks;
+                                StatusCode sc = getTracks(aEFTau, tracks);
+                                if(!sc.isSuccess()){ ATH_MSG_WARNING("Failed in getTracks."); return StatusCode::SUCCESS; } //return sc;}  
+
+                                for(std::vector<const xAOD::TauTrack *>::iterator trkItr = tracks.begin(); trkItr != tracks.end(); ++trkItr) {
+
+                            RNN_tracks_pt_log = TMath::Log10( (*trkItr)->pt() );
+                            hist("hEFRNNInput_Track_pt_log")->Fill(RNN_tracks_pt_log);
+                            RNN_tracks_pt_jetseed_log = TMath::Log10( aEFTau->ptJetSeed() );
+                            hist("hEFRNNInput_Track_pt_jetseed_log")->Fill(RNN_tracks_pt_jetseed_log);
+                            RNN_tracks_dEta = (*trkItr)->eta() - aEFTau->eta();
+                            hist("hEFRNNInput_Track_dEta")->Fill(RNN_tracks_dEta);
+                            RNN_tracks_dPhi = (*trkItr)->p4().DeltaPhi(aEFTau->p4());
+                            hist("hEFRNNInput_Track_dPhi")->Fill(RNN_tracks_dPhi);
+                                        RNN_tracks_z0sinThetaTJVA_abs_log = TMath::Log10(TMath::Abs( (*trkItr)->z0sinThetaTJVA(*aEFTau) ));
+                                        hist("hEFRNNInput_Track_z0sinThetaTJVA_abs_log")->Fill(RNN_tracks_z0sinThetaTJVA_abs_log);                                      
+                                        RNN_tracks_d0_abs_log = TMath::Log10( TMath::Abs((*trkItr)->track()->d0()) + 1e-6);
+                                        hist("hEFRNNInput_Track_d0_abs_log")->Fill(RNN_tracks_d0_abs_log);
+
+                                        uint8_t inner_pixel_hits, inner_pixel_exp;
+                                        const auto success1_innerPixel_hits = (*trkItr)->track()->summaryValue(inner_pixel_hits, xAOD::numberOfInnermostPixelLayerHits);
+                                        const auto success2_innerPixel_exp = (*trkItr)->track()->summaryValue(inner_pixel_exp, xAOD::expectInnermostPixelLayerHit);
+                                        if (success1_innerPixel_hits && success2_innerPixel_exp) {
+                                                RNN_tracks_nIBLHitsAndExp =  inner_pixel_exp ? inner_pixel_hits : 1.;
+                                                hist("hEFRNNInput_Track_nIBLHitsAndExp")->Fill(RNN_tracks_nIBLHitsAndExp);
+                                        }
+
+                                        uint8_t pixel_hits, pixel_dead;
+                                        const auto success1_pixel_hits = (*trkItr)->track()->summaryValue(pixel_hits, xAOD::numberOfPixelHits);
+                                        const auto success2_pixel_dead = (*trkItr)->track()->summaryValue(pixel_dead, xAOD::numberOfPixelDeadSensors);
+                                        if (success1_pixel_hits && success2_pixel_dead) {
+                                                RNN_tracks_nPixelHitsPlusDeadSensors =  pixel_hits + pixel_dead;
+                                                hist("hEFRNNInput_Track_nPixelHitsPlusDeadSensors")->Fill(RNN_tracks_nPixelHitsPlusDeadSensors);
+                                        }
+
+                                        uint8_t sct_hits, sct_dead;
+                                        const auto success1_sct_hits = (*trkItr)->track()->summaryValue(sct_hits, xAOD::numberOfSCTHits);
+                                        const auto success2_sct_dead = (*trkItr)->track()->summaryValue(sct_dead, xAOD::numberOfSCTDeadSensors);
+                                        if (success1_sct_hits && success2_sct_dead) {
+                                                RNN_tracks_nSCTHitsPlusDeadSensors =  sct_hits + sct_dead;
+                                                hist("hEFRNNInput_Track_nSCTHitsPlusDeadSensors")->Fill(RNN_tracks_nSCTHitsPlusDeadSensors);
+                                        }
+                                } // end for-loop for tracks
+
+      } // end if(is1P||isMP)
+    }
+  else if( (BDTinput_type == "RNN_inCluster") && monRNN)
+    {
+      // Cluster 
+      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFTau/RNN/InputCluster");
+      float RNN_clusters_et_log(-999.);
+      float RNN_clusters_pt_jetseed_log(-999.);
+      float RNN_clusters_dEta(-999.);
+      float RNN_clusters_dPhi(-999.);
+      double RNN_clusters_SECOND_R(-999.);
+      double RNN_clusters_SECOND_LAMBDA(-999.);
+      double RNN_clusters_CENTER_LAMBDA(-999.);
+
+                        std::vector<const xAOD::CaloCluster *> clusters;
+                        StatusCode sc = getClusters(aEFTau, clusters);
+                        if(!sc.isSuccess()){ ATH_MSG_WARNING("Failed in getClusters."); return StatusCode::SUCCESS;} //return sc;}  
+
+                        for(std::vector<const xAOD::CaloCluster *>::iterator clusItr = clusters.begin(); clusItr != clusters.end(); ++clusItr) {
+                                RNN_clusters_et_log = TMath::Log10( (*clusItr)->et() );
+                                hist("hEFRNNInput_Cluster_et_log")->Fill(RNN_clusters_et_log);
+                                RNN_clusters_pt_jetseed_log = TMath::Log10( aEFTau->ptJetSeed() );
+                                hist("hEFRNNInput_Cluster_pt_jetseed_log")->Fill(RNN_clusters_pt_jetseed_log);
+                                RNN_clusters_dEta = ((*clusItr)->eta() - (aEFTau->eta()));
+                                hist("hEFRNNInput_Cluster_dEta")->Fill(RNN_clusters_dEta);
+                                RNN_clusters_dPhi = (*clusItr)->p4().DeltaPhi(aEFTau->p4());//deltaPhi((*clusItr)->phi(),(aEFTau->phi()));
+                                hist("hEFRNNInput_Cluster_dPhi")->Fill(RNN_clusters_dPhi);
+                                const auto success_SECOND_R = (*clusItr)->retrieveMoment(xAOD::CaloCluster::MomentType::SECOND_R, RNN_clusters_SECOND_R);
+                                if ( (success_SECOND_R) ) {
+                                        RNN_clusters_SECOND_R =TMath::Log10(RNN_clusters_SECOND_R + 0.1);
+                                        hist("hEFRNNInput_Cluster_SECOND_R_log10")->Fill(RNN_clusters_SECOND_R);
+                                }
+                                const auto success_SECOND_LAMBDA = (*clusItr)->retrieveMoment(xAOD::CaloCluster::MomentType::SECOND_LAMBDA, RNN_clusters_SECOND_LAMBDA);
+                                if ( (success_SECOND_LAMBDA) ) {
+                                        RNN_clusters_SECOND_LAMBDA =TMath::Log10(RNN_clusters_SECOND_LAMBDA + 0.1);
+                                        hist("hEFRNNInput_Cluster_SECOND_LAMBDA_log10")->Fill(RNN_clusters_SECOND_LAMBDA);
+                                }
+                                const auto success_CENTER_LAMBDA = (*clusItr)->retrieveMoment(xAOD::CaloCluster::MomentType::CENTER_LAMBDA, RNN_clusters_CENTER_LAMBDA);
+                                if ( (success_CENTER_LAMBDA) ) {
+                                        RNN_clusters_CENTER_LAMBDA =TMath::Log10(RNN_clusters_CENTER_LAMBDA + 1e-6);
+                                        hist("hEFRNNInput_Cluster_CENTER_LAMBDA_log10")->Fill(RNN_clusters_CENTER_LAMBDA);
+                                }
+                        } // end of for loop 
+        }
+  else if(BDTinput_type == "RNN_out")
+    {
+      // RNN Output Variables
+      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFTau/RNN/Output");
+      float RNNJetScore(-999.);
+      float RNNJetScoreSigTrans(-999.);
+      if(aEFTau->hasDiscriminant(xAOD::TauJetParameters::RNNJetScore)) {
+        bool isRNNJetScoreAvailable = aEFTau->isAvailable<float>("RNNJetScore");
+        if (isRNNJetScoreAvailable) {
+          RNNJetScore = aEFTau->discriminant(xAOD::TauJetParameters::RNNJetScore);
+        } else{
+          ATH_MSG_WARNING(" RNNJetScore variable not available.");
+        }
+      } else {
+        ATH_MSG_WARNING(" RNNJetScore discriminant not available.");
+      }
+      if(aEFTau->hasDiscriminant(xAOD::TauJetParameters::RNNJetScoreSigTrans)) {
+        bool isRNNJetScoreSigTransAvailable = aEFTau->isAvailable<float>("RNNJetScoreSigTrans");
+        if (isRNNJetScoreSigTransAvailable) {
+          RNNJetScoreSigTrans = aEFTau->discriminant(xAOD::TauJetParameters::RNNJetScoreSigTrans);
+        } else{
+          ATH_MSG_WARNING(" RNNJetScoreSigTrans variable not available.");
+        }
+      } else {
+        ATH_MSG_WARNING(" RNNJetScoreSigTrans discriminant not available.");
+      }
+                        if (is0P) {
+                    if(RNNJetScore) hist("hEFRNNJetScore_0P")->Fill(RNNJetScore);
+                    if(RNNJetScoreSigTrans) hist("hEFRNNJetScoreSigTrans_0P")->Fill(RNNJetScoreSigTrans);
+                        } else if (is1P) {
+                    if(RNNJetScore) hist("hEFRNNJetScore_1P")->Fill(RNNJetScore);
+                    if(RNNJetScoreSigTrans) hist("hEFRNNJetScoreSigTrans_1P")->Fill(RNNJetScoreSigTrans);
+                        } else if (isMP) {
+                    if(RNNJetScore) hist("hEFRNNJetScore_3P")->Fill(RNNJetScore);
+                    if(RNNJetScoreSigTrans) hist("hEFRNNJetScoreSigTrans_3P")->Fill(RNNJetScoreSigTrans);
+                        }
+
     }
   else
     {
@@ -1384,43 +1885,49 @@ StatusCode HLTTauMonTool::fillEFTau(const xAOD::TauJet *aEFTau, const std::strin
   return StatusCode::SUCCESS;
 }
 
-StatusCode HLTTauMonTool::fillL1TauVsOffline(const xAOD::EmTauRoI *aL1Tau){
+StatusCode HLTTauMonTool::fillL1TauVsOffline(const xAOD::EmTauRoI *aL1Tau, const std::string & goodTauRefType){
 
   ATH_MSG_DEBUG ("HLTTauMonTool::fillL1TauVsOffline");
     
   if(!aL1Tau) {
-        ATH_MSG_WARNING("Invalid EmTauRoI pointer. Exiting");
-        return StatusCode::FAILURE;
+    ATH_MSG_WARNING("Invalid EmTauRoI pointer. Exiting");
+    return StatusCode::FAILURE;
+  }
+
+  std::vector<const xAOD::TauJet *> taus_here;
+  if (goodTauRefType == "RNN") {
+    taus_here = m_taus_RNN;
+  } else {
+    taus_here = m_taus_BDT;
   }
 
   const xAOD::TauJet *aOfflineTau = 0;
   float tmpR = 0.3;
   float eta = aL1Tau->eta();
   float phi = aL1Tau->phi();
-  for(unsigned int t=0;t<m_taus.size();t++){
-    float dR = (float)deltaR(eta,m_taus.at(t)->eta(),phi,m_taus.at(t)->phi());
-  if(dR < tmpR){
+  for(unsigned int t=0;t<taus_here.size();t++){
+    float dR = (float)deltaR(eta,taus_here.at(t)->eta(),phi,taus_here.at(t)->phi());
+    if(dR < tmpR){
       tmpR = dR;
-        aOfflineTau = m_taus.at(t);
-      }
+      aOfflineTau = taus_here.at(t);
+    }
   }
 
   if(aOfflineTau){
-        ATH_MSG_DEBUG("Found an offline TauJet matching L1 EmTauRoI, dR = "<<tmpR);
+    ATH_MSG_DEBUG("Found an offline TauJet matching L1 EmTauRoI, dR = "<<tmpR);
   }else {
-        ATH_MSG_DEBUG("Not found an offline TauJet matching EF tauJet");
-        return StatusCode::SUCCESS;
+    ATH_MSG_DEBUG("Not found an offline TauJet matching EF tauJet");
+    return StatusCode::SUCCESS;
   }
 
   // plots of L1 vs Offline ....
   FillRelDiffHist(hist("hL1EtRatio"), aOfflineTau->pt(), aL1Tau->tauClus(), 0, 1);
 
   return StatusCode::SUCCESS;
-
 }
 
 
-StatusCode HLTTauMonTool::fillPreselTauVsOffline(const xAOD::TauJet *aEFTau){
+StatusCode HLTTauMonTool::fillPreselTauVsOffline(const xAOD::TauJet *aEFTau, const std::string & goodTauRefType){
     
     ATH_MSG_DEBUG ("HLTTauMonTool::fillPreselTauVsOffline");
     
@@ -1428,14 +1935,24 @@ StatusCode HLTTauMonTool::fillPreselTauVsOffline(const xAOD::TauJet *aEFTau){
         ATH_MSG_WARNING("Invalid TauJet pointer. Exiting");
         return StatusCode::FAILURE;
     }
+
+    
+    std::vector<const xAOD::TauJet *> taus_here;
+    if (goodTauRefType == "RNN") {
+      taus_here = m_taus_RNN;
+    } else {
+      taus_here = m_taus_BDT;
+    }
+
+
     
     const xAOD::TauJet *aOfflineTau = 0;
     float tmpR = 0.2;
-    for(unsigned int t=0;t<m_taus.size();t++){
-        float dR = (float)m_taus.at(t)->p4().DeltaR(aEFTau->p4());
+    for(unsigned int t=0;t<taus_here.size();t++){
+        float dR = (float)taus_here.at(t)->p4().DeltaR(aEFTau->p4());
         if(dR < tmpR){ 
                 tmpR = dR; 
-                aOfflineTau = m_taus.at(t);
+                aOfflineTau = taus_here.at(t);
         }
     }
     
@@ -1494,8 +2011,14 @@ StatusCode HLTTauMonTool::fillEFTauVsTruth(const xAOD::TauJet *aEFTau, const std
   }
   }
 
+  std::string trigItemShort=trigItem;
+  if(trigItem.find("tau25")!=string::npos && trigItem.find("L1TAU")!=string::npos){
+    size_t posit=trigItem.rfind("_");
+    trigItemShort=trigItem.substr(0,posit);
+  }
+
   if(truthPt>0.){
-      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/EFVsTruth");
+      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFVsTruth");
       FillRelDiffProfile<float>(profile("hEtRatiovspt"), truthPt, aEFTau->pt(), truthPt/GeV, 0, 1); 
       FillRelDiffProfile<float>(profile("hEtRatiovsmu"), truthPt, aEFTau->pt(), mu, 0, 1);
       FillRelDiffProfile<float>(profile("hEtRatiovsphi"), truthPt, aEFTau->pt(), truthPhi, 0, 1);
@@ -1506,7 +2029,7 @@ StatusCode HLTTauMonTool::fillEFTauVsTruth(const xAOD::TauJet *aEFTau, const std
   return StatusCode::SUCCESS;
 }
 
-StatusCode HLTTauMonTool::fillEFTauVsOffline(const xAOD::TauJet *aEFTau, const std::string & trigItem, const std::string & BDTinput_type)
+StatusCode HLTTauMonTool::fillEFTauVsOffline(const xAOD::TauJet *aEFTau, const std::string & trigItem, const std::string & BDTinput_type, const std::string & goodTauRefType)
 {
   ATH_MSG_DEBUG ("HLTTauMonTool::fillEFTauVsOffline");
   if(!aEFTau)
@@ -1514,6 +2037,14 @@ StatusCode HLTTauMonTool::fillEFTauVsOffline(const xAOD::TauJet *aEFTau, const s
       ATH_MSG_WARNING("Invalid TauJet pointer. Exiting");
       return StatusCode::FAILURE;
     }
+
+  std::vector<const xAOD::TauJet *> taus_here;
+  if (goodTauRefType == "RNN") {
+    taus_here = m_taus_RNN;
+  } else {
+    taus_here = m_taus_BDT;
+  }
+
  
   float innerTrkAvgDist = 0;
   float etOverPtLeadTrk = 0;
@@ -1577,12 +2108,12 @@ StatusCode HLTTauMonTool::fillEFTauVsOffline(const xAOD::TauJet *aEFTau, const s
   const xAOD::TauJet *aOfflineTau = 0;
   float tmpR = 0.2;
   
-  for(unsigned int t=0;t<m_taus.size();t++){
-    float dR = (float)m_taus.at(t)->p4().DeltaR(aEFTau->p4());
+  for(unsigned int t=0;t<taus_here.size();t++){
+    float dR = (float)taus_here.at(t)->p4().DeltaR(aEFTau->p4());
     if(dR < tmpR)
       { 
         tmpR = dR;
-        aOfflineTau = m_taus.at(t);
+        aOfflineTau = taus_here.at(t);
       }
   }
   if(aOfflineTau)
@@ -1597,9 +2128,15 @@ StatusCode HLTTauMonTool::fillEFTauVsOffline(const xAOD::TauJet *aEFTau, const s
   //Pileup
   mu = Pileup();
 
+  std::string trigItemShort=trigItem;
+  if(trigItem.find("tau25")!=string::npos && trigItem.find("L1TAU")!=string::npos){
+    size_t posit=trigItem.rfind("_");
+    trigItemShort=trigItem.substr(0,posit);
+  }
+
   if(BDTinput_type == "basicVars")
     {
-      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/EFVsOffline");
+      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFVsOffline");
 
       //Basic Vars
 
@@ -1693,7 +2230,7 @@ StatusCode HLTTauMonTool::fillEFTauVsOffline(const xAOD::TauJet *aEFTau, const s
     }
   else if(BDTinput_type == "1p_NonCorr")
     {
-      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/EFVsOffline/BDT/1p_nonCorrected");
+      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFVsOffline/BDT/1p_nonCorrected");
       if(is1P)
   {
     if(aEFTau->detail(xAOD::TauJetParameters::innerTrkAvgDist, innerTrkAvgDist) && aOfflineTau->detail(xAOD::TauJetParameters::innerTrkAvgDist, innerTrkAvgDistOff))
@@ -1760,7 +2297,7 @@ StatusCode HLTTauMonTool::fillEFTauVsOffline(const xAOD::TauJet *aEFTau, const s
     }
   else if(BDTinput_type == "mp_NonCorr")
     {
-      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/EFVsOffline/BDT/mp_nonCorrected");
+      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFVsOffline/BDT/mp_nonCorrected");
       if(isMP)
   {
     if(aEFTau->detail(xAOD::TauJetParameters::innerTrkAvgDist, innerTrkAvgDist) && aOfflineTau->detail(xAOD::TauJetParameters::innerTrkAvgDist, innerTrkAvgDistOff))
@@ -2288,7 +2825,7 @@ void HLTTauMonTool::examineTruthTau(const xAOD::TruthParticle& xTruthParticle) c
 }
 
 
-StatusCode HLTTauMonTool::TauEfficiency(const std::string & trigItem, const std::string & TauDenom){
+StatusCode HLTTauMonTool::TauEfficiency(const std::string & trigItem, const std::string & TauDenom, const std::string & goodTauRefType){
   ATH_MSG_DEBUG("Efficiency wrt "<< TauDenom << " for trigItem" << trigItem);
   if(trigItem == "Dump") {ATH_MSG_DEBUG("Not computing efficiencies for Dump"); return StatusCode::SUCCESS;};
 
@@ -2299,6 +2836,13 @@ StatusCode HLTTauMonTool::TauEfficiency(const std::string & trigItem, const std:
   std::vector<bool> good_TauDenom;
   std::vector<TLorentzVector> tlv_tmp;
 
+  std::vector<const xAOD::TauJet *> taus_here;
+  if (goodTauRefType == "RNN") {
+    taus_here = m_taus_RNN;
+  } else {
+    taus_here = m_taus_BDT;
+  }
+
   float mu(Pileup());
   int nvtx(PrimaryVertices());
 
@@ -2316,14 +2860,14 @@ StatusCode HLTTauMonTool::TauEfficiency(const std::string & trigItem, const std:
     bool addToDenom(false);
     if(TauDenom.find("Truth")==std::string::npos || !m_truth) addToDenom = true;
 
-    for(unsigned int t=0;t<m_taus.size();t++){
+    for(unsigned int t=0;t<taus_here.size();t++){
       if(addToDenom){ 
-        tlv_TauDenom.push_back(m_taus.at(t)->p4());
-                                ntrk_TauDenom.push_back(m_taus.at(t)->nTracks());
+        tlv_TauDenom.push_back(taus_here.at(t)->p4());
+                                ntrk_TauDenom.push_back(taus_here.at(t)->nTracks());
                                 good_TauDenom.push_back(true);    
       }
       if(!addToDenom){
-        tlv_tmp.push_back(m_taus.at(t)->p4());
+        tlv_tmp.push_back(taus_here.at(t)->p4());
       }
     }
     
@@ -2395,10 +2939,15 @@ StatusCode HLTTauMonTool::TauEfficiency(const std::string & trigItem, const std:
                 }
   }
 
+  std::string trigItemShort=trigItem;
+  if(trigItem.find("tau25")!=string::npos && trigItem.find("L1TAU")!=string::npos){
+    size_t posit=trigItem.rfind("_");
+    trigItemShort=trigItem.substr(0,posit);
+  }
 
   // loop over taus in denominator and match with L1 and HLT taus:
   for(unsigned int i=0;i<tlv_TauDenom.size();i++){
-    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/TurnOnCurves/RecoEfficiency");
+    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/TurnOnCurves/RecoEfficiency");
     if(!good_TauDenom.at(i)) continue;
     int ntracks = ntrk_TauDenom.at(i);
     float pt = (float)tlv_TauDenom.at(i).Pt();
@@ -2481,12 +3030,12 @@ StatusCode HLTTauMonTool::TauEfficiency(const std::string & trigItem, const std:
   }
 
   // HLT/TauMon/Expert/HLTefficiency plots:
-  for(unsigned int t=0;t<m_taus.size();t++){
-      TLorentzVector TauTLV = m_taus.at(t)->p4();
+  for(unsigned int t=0;t<taus_here.size();t++){
+      TLorentzVector TauTLV = taus_here.at(t)->p4();
       float eta = (float)TauTLV.Eta();
       float phi = (float)TauTLV.Phi();
       float pt = (float)TauTLV.Pt();
-      int ntracks = m_taus.at(t)->nTracks();
+      int ntracks = taus_here.at(t)->nTracks();
 
         //        std::cout<<"HLT"<<trigItem<<std::endl;
         if(trigItem=="tau160_idperf_tracktwo"){
@@ -2498,7 +3047,7 @@ StatusCode HLTTauMonTool::TauEfficiency(const std::string & trigItem, const std:
         }
 
 
-        if(trigItem=="tau25_idperf_tracktwo"){
+        if(trigItemShort=="tau25_idperf_tracktwo"){
     setCurrentMonGroup("HLT/TauMon/Expert/HLTefficiency");
     if( HLTTauMatching("tau25_idperf_tracktwo", TauTLV, 0.2)  ){
       //      hist("hRecoTau25PtDenom")->Fill(pt/GeV);
@@ -2552,7 +3101,7 @@ StatusCode HLTTauMonTool::TauEfficiency(const std::string & trigItem, const std:
       profile("TProfRecoHLT160PtEfficiency_2")->Fill(pt/GeV,0);}
         }
     
-        if(trigItem=="tau25_perf_tracktwo"){
+        if(trigItemShort=="tau25_perf_tracktwo"){
     setCurrentMonGroup("HLT/TauMon/Expert/HLTefficiency");
       if( HLTTauMatching("tau25_perf_tracktwo", TauTLV, 0.2)  ){
         //        hist("hRecoTau25PtDenom_2")->Fill(pt/GeV);
@@ -2905,7 +3454,7 @@ StatusCode HLTTauMonTool::TauEfficiency(const std::string & trigItem, const std:
 // return StatusCode::SUCCESS;
 //}
 
-StatusCode HLTTauMonTool::TruthTauEfficiency(const std::string & trigItem, const std::string & TauCont_type)
+StatusCode HLTTauMonTool::TruthTauEfficiency(const std::string & trigItem, const std::string & TauCont_type, const std::string & goodTauRefType)
 {
   ATH_MSG_DEBUG("Truth Tau Matching to Offline and Online Taus for trigItem" << trigItem);
   
@@ -2922,6 +3471,12 @@ StatusCode HLTTauMonTool::TruthTauEfficiency(const std::string & trigItem, const
   std::vector<bool> truth_matched_to_reco;
   std::vector<bool> truthReco_matched_to_L1;
   std::vector<bool> truthReco_matched_to_hlt;
+  std::vector<const xAOD::TauJet *> taus_here;
+  if (goodTauRefType == "RNN") {
+    taus_here = m_taus_RNN;
+  } else {
+    taus_here = m_taus_BDT;
+  }
 
   for(unsigned int truth=0;truth<m_true_taus.size();truth++){
 
@@ -2943,8 +3498,8 @@ StatusCode HLTTauMonTool::TruthTauEfficiency(const std::string & trigItem, const
           mu = Pileup();
     
     // get list of truth-matched reco taus
-          for(unsigned int t=0;t<m_taus.size();t++){
-              float dR = (float)m_taus.at(t)->p4().DeltaR(TruthTauTLV);
+          for(unsigned int t=0;t<taus_here.size();t++){
+            float dR = (float)taus_here.at(t)->p4().DeltaR(TruthTauTLV);
               if(dR <= 0.2) truth_matched_to_reco.back()=true;
             }
     
@@ -2961,10 +3516,17 @@ StatusCode HLTTauMonTool::TruthTauEfficiency(const std::string & trigItem, const
     if(L1Taumatched && truth_matched_to_reco.back() ) truthReco_matched_to_L1.back()=true;
     if(truth_matched_to_L1.back()) ATH_MSG_DEBUG("L1 tau matched to truth tau");
     if(truthReco_matched_to_L1.back()) ATH_MSG_DEBUG("L1 tau matched to truth+reco tau");     
+
+
+    std::string trigItemShort=trigItem;
+    if(trigItem.find("tau25")!=string::npos && trigItem.find("L1TAU")!=string::npos){
+      size_t posit=trigItem.rfind("_");
+      trigItemShort=trigItem.substr(0,posit);
+    }
     
     if(TauCont_type == "Truth")
             {
-        setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/TurnOnCurves/TruthEfficiency");
+        setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/TurnOnCurves/TruthEfficiency");
         
         //        hist("hTrueTauPtDenom")->Fill(pt/GeV);
         //        if(ntracks == 1) hist("hTrueTauPt1PDenom")->Fill(pt/GeV);
@@ -3016,7 +3578,7 @@ StatusCode HLTTauMonTool::TruthTauEfficiency(const std::string & trigItem, const
       }
     else if(TauCont_type == "Truth+Reco")
             {
-        setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/TurnOnCurves/Truth+RecoEfficiency");
+        setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/TurnOnCurves/Truth+RecoEfficiency");
         
         if(truth_matched_to_reco.back())
     { 
@@ -3317,6 +3879,90 @@ float HLTTauMonTool::Pileup(){
   return Pileup;
 }
 
+
+bool HLTTauMonTool::TrigBiasCheck(){
+  // Check if event fired RNN but no BDT triggers. In that case it introduces bias.
+  // Check if event fired BDT but no RNN triggers. In that case it introduces bias.
+  bool noVeto = false; // Will become true if no bias is introduced. 
+
+  bool fireRNN = false;
+  bool fireBDT = false;
+
+  auto chainGroup = getTDT()->getChainGroup("HLT_.*tau.*");
+  for(auto &trig : chainGroup->getListOfTriggers()) {
+    auto cg =  getTDT()->getChainGroup(trig);
+    if(trig.find("RNN")!=string::npos && cg->isPassed()) fireRNN = true;
+    if(trig.find("medium1")!=string::npos && cg->isPassed()) fireBDT = true;    
+  } 
+
+  noVeto = ( (fireRNN==true && fireBDT==true) ); // we want to veto events where the RNN trig is fired but not the BDT and vice versa.
+  
+  return noVeto;
+}
+
+StatusCode HLTTauMonTool::getTracks(const xAOD::TauJet *aEFTau, std::vector<const xAOD::TauTrack *> &out) {
+  auto tracks = aEFTau->allTracks();
+
+  //Sort by descending pt
+  auto cmp_pt = [](const xAOD::TauTrack *lhs, const xAOD::TauTrack *rhs) {
+    return lhs->pt() > rhs->pt();
+  };
+  std::sort(tracks.begin(), tracks.end(), cmp_pt);
+
+  // Truncate tracks
+  unsigned int max_tracks = 10;
+  if (tracks.size() > max_tracks) {
+    tracks.resize(max_tracks);
+  }
+
+  out = std::move(tracks);
+  return StatusCode::SUCCESS;
+}
+
+StatusCode HLTTauMonTool::getClusters(const xAOD::TauJet *aEFTau, std::vector<const xAOD::CaloCluster *> &out) {
+  std::vector<const xAOD::CaloCluster *> clusters;
+  float max_cluster_dr = 1.0;
+
+  const xAOD::Jet *jet_seed = *(aEFTau->jetLink());
+  if (!jet_seed) {
+    ATH_MSG_ERROR("Tau jet link is invalid.");
+    return StatusCode::FAILURE;
+  }
+
+  for (const auto jc : jet_seed->getConstituents()) {
+    auto cl = dynamic_cast<const xAOD::CaloCluster *>(jc->rawConstituent());
+    if (!cl) {
+      ATH_MSG_ERROR("Calorimeter cluster is invalid.");
+      return StatusCode::FAILURE;
+    }
+
+    // Select clusters in cone centered on the tau detector axis
+    const auto lc_p4 = aEFTau->p4(xAOD::TauJetParameters::DetectorAxis);
+    if (lc_p4.DeltaR(cl->p4()) < max_cluster_dr) {
+      clusters.push_back(cl);
+    }
+  }
+
+  // Sort by descending et
+  auto et_cmp = [](const xAOD::CaloCluster *lhs,
+		   const xAOD::CaloCluster *rhs) {
+    return lhs->et() > rhs->et();
+  };
+  std::sort(clusters.begin(), clusters.end(), et_cmp);
+
+  // Truncate clusters
+  unsigned int max_clusters = 6;
+  if (clusters.size() > max_clusters) {
+    clusters.resize(max_clusters);
+  }
+  out = std::move(clusters);
+
+  return StatusCode::SUCCESS;
+}
+
+
+
+
 ///////////////////////////////////////////////////////////
 // Function to fill relative difference histograms
 ///////////////////////////////////////////////////////////
@@ -3342,8 +3988,7 @@ void HLTTauMonTool::FillRelDiffHist(TH1 * hist, float val1, float val2, float ch
     
 }
 
-template <class T> void HLTTauMonTool::FillRelDiffProfile(TProfile *prof, float val1, float val2, T val3, float checkVal, int checkMode)
-{
+template <class T> void HLTTauMonTool::FillRelDiffProfile(TProfile *prof, float val1, float val2, T val3, float checkVal, int checkMode){
   if(val1 != Analysis::TauDetails::DEFAULT)
     {
       if(val2 != Analysis::TauDetails::DEFAULT)
diff --git a/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool.h b/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool.h
old mode 100755
new mode 100644
index c873182a0b5f58f0dba1a0d838bf31368a3dedea..1ea5ba0a3ae5b99ea85b6e9540d5093b76249272
--- a/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool.h
+++ b/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool.h
@@ -69,7 +69,7 @@ class HLTTauMonTool : public IHLTMonTool {
 //#endif
 
   /// Method fills the histograms for one tau trigger item.
-  StatusCode fillHistogramsForItem(const std::string & trigItem);
+  StatusCode fillHistogramsForItem(const std::string & trigItem, const bool & monRNN, const bool & monBDT, const std::string & goodTauRefType); 
   
  private:
 
@@ -85,11 +85,11 @@ class HLTTauMonTool : public IHLTMonTool {
 
   /// Method filling the EF tau histograms
   StatusCode fillPreselTau(const xAOD::TauJet *aEFTau);
-  StatusCode fillEFTau(const xAOD::TauJet *aEFTau, const std::string & trigItem, const std::string & BDTinput_type);
+  StatusCode fillEFTau(const xAOD::TauJet *aEFTau, const std::string & trigItem, const std::string & BDTinput_type, const bool & monRNN, const bool & monBDT);
   /// Method filling the EF vs Offline tau histograms
-  StatusCode fillEFTauVsOffline(const xAOD::TauJet *aEFTau, const std::string & trigItem, const std::string & BDTinput_type);
-  StatusCode fillPreselTauVsOffline(const xAOD::TauJet *aEFTau);
-  StatusCode fillL1TauVsOffline(const xAOD::EmTauRoI *aEFTau);
+  StatusCode fillEFTauVsOffline(const xAOD::TauJet *aEFTau, const std::string & trigItem, const std::string & BDTinput_type, const std::string & goodTauRefType);
+  StatusCode fillPreselTauVsOffline(const xAOD::TauJet *aEFTau, const std::string & goodTauRefType);
+  StatusCode fillL1TauVsOffline(const xAOD::EmTauRoI *aEFTau, const std::string & goodTauRefType);
   StatusCode fillEFTauVsTruth(const xAOD::TauJet *aEFTau, const std::string & trigItem);  
   StatusCode fillTopoValidation(const std::string & trigItem_topo, const std::string & trigItem_support);
 
@@ -98,20 +98,25 @@ class HLTTauMonTool : public IHLTMonTool {
 
   /// Method for Turn On Curves
   void examineTruthTau(const xAOD::TruthParticle& xTruthParticle) const;
-  StatusCode TruthTauEfficiency(const std::string & trigItem, const std::string & TauCont_type);
+  StatusCode TruthTauEfficiency(const std::string & trigItem, const std::string & TauCont_type, const std::string & goodTauRefType);
   StatusCode RecoTauEfficiency(const std::string & trigItem);
-  StatusCode TauEfficiency(const std::string & trigItem, const std::string & TauDenom);
+  StatusCode TauEfficiency(const std::string & trigItem, const std::string & TauDenom, const std::string & goodTauRefType);
 //  StatusCode TauEfficiencyCombo(const std::string & trigItem);
 
-  StatusCode RealZTauTauEfficiency();
+  StatusCode RealZTauTauEfficiency(const std::string & goodTauRefType);
   StatusCode dijetFakeTausEfficiency();
   StatusCode FTKtest(const std::string & trigItem);
-  StatusCode trackCurves(const std::string & trigItem);
+  StatusCode trackCurves(const std::string & trigItem, const std::string & goodTauRefType);
+  StatusCode efficiencyRatioPlots (const std::string & trigItem, const std::string & goodTauRefType);
+  StatusCode L1TopoLeptons(const std::string & trigItem, const std::string & typeOfChain);
+        StatusCode getTracks(const xAOD::TauJet *aEFTau, std::vector<const xAOD::TauTrack *> &out);
+        StatusCode getClusters(const xAOD::TauJet *aEFTau, std::vector<const xAOD::CaloCluster *> &out);
 
   //Methods for HLT and L1 Matching
   bool HLTTauMatching(const std::string & trigItem, const TLorentzVector & TLV, float DR);
   bool PresTauMatching(const std::string & trigItem, const TLorentzVector & TLV, float DR);
   bool L1TauMatching(const std::string & trigItem, const TLorentzVector & TLV, float DR);
+  bool TrigBiasCheck();
   //  bool  emulate2StepTracking(float RoI_eta, float RoI_phi, bool do2step, bool doReject0trk, float track_pt_min);
   //StatusCode test2StepTracking();
   void testClusterNavigation(const xAOD::TauJet *aEFTau);
@@ -160,12 +165,18 @@ class HLTTauMonTool : public IHLTMonTool {
   bool m_dijetFakeTausEff;
   bool m_doTrackCurves;
   bool m_doTopoValidation;
+  bool m_doL1JetPlots;
+  bool m_doEFTProfiles;
+  bool m_domuCut40; 
+  bool m_doEfficiencyRatioPlots;
+  bool m_doL1TopoLeptonsMonitoringWarnings;
   bool m_bootstrap;
   bool m_isData;
 
   std::vector<TLorentzVector> m_true_taus;
   std::vector<int> m_true_taus_nprong;
-  std::vector<const xAOD::TauJet *> m_taus;
+  std::vector<const xAOD::TauJet *> m_taus_BDT;
+  std::vector<const xAOD::TauJet *> m_taus_RNN;
   const xAOD::TauJetContainer* m_tauCont;
 
   unsigned int m_L1TriggerCondition;
@@ -179,8 +190,11 @@ class HLTTauMonTool : public IHLTMonTool {
   ToolHandle<ILumiBlockMuTool> m_lumiBlockMuTool;
   SG::ReadCondHandleKey<LuminosityCondData> m_luminosityCondDataKey
   { this, "LuminosityCondDataKey", "LuminosityCondDataOnline", "" };
+//  ToolHandle<ILuminosityTool>  m_luminosityToolOnline;
   float m_mu_offline;
   int m_mu_online;
+        int m_LB;
+
 
   ///Name of the trigger items to be monitored.
   ///Set by job options
@@ -188,16 +202,31 @@ class HLTTauMonTool : public IHLTMonTool {
   std::vector<std::string> m_trigItemsAll;
   std::vector<std::string> m_trigItemsHighPt;
   std::vector<std::string> m_trigItemsZtt;
+  std::vector<std::string> m_trigItemsZtt_RNN;
+  std::vector<std::string> m_trigItemsZtt_BDT;
   std::vector<std::string> m_highpt_tau;
-  std::vector<std::string> m_ztt_tau;
+  std::vector<std::string> m_ztt_RNN_tau;
+  std::vector<std::string> m_ztt_BDT_tau;
   std::vector<std::string> m_primary_tau;
   std::vector<std::string> m_monitoring_tau;
   std::vector<std::string> m_prescaled_tau;
   std::vector<std::string> m_emulation_l1_tau;
   std::vector<std::string> m_emulation_hlt_tau;
   std::vector<std::string> m_topo_chains;
+  std::vector<std::string> m_topo_chains_mutau;
+  std::vector<std::string> m_topo_chains_eltau;
   std::vector<std::string> m_topo_support_chains;
-  std::string m_lowest_singletau;
+  std::vector<std::string> m_LST_HLTsel_FTK_chains;
+  std::vector<std::string> m_LST_HLTsel0Prong_FTK_chains;
+  std::vector<std::string> m_LST_HLTsel_FTKNoPrec_chains;
+  std::vector<std::string> m_LST_HLTsel0Prong_FTKNoPrec_chains;
+  std::vector<std::string> m_LST_HLTsel_tracktwo_chains;
+  std::vector<std::string> m_Ratio;
+  std::vector<std::string> m_trigMVA_chains;
+  std::vector<std::string> m_trigRNN_chains;
+  std::vector<std::string> m_trigBDTRNN_chains;
+  std::string m_lowest_singletau_RNN;
+  std::string m_lowest_singletau_BDT;
   //std::string m_lowest_ditau;
   //std::string m_lowest_etau;
   //std::string m_lowest_mutau;
@@ -206,6 +235,22 @@ class HLTTauMonTool : public IHLTMonTool {
   // offline tau pt threshold for efficiency plots as a function of eta, phi, and nvtx
   float m_effOffTauPtCut;
 
+  int m_counterOfdR0_Topomutau;
+  int m_counterOfdR0_Topoeltau;
+
+
+  // EffRatioPlots flags
+  //bool doEffRatioPlots = false;
+  bool m_effRatioChains_Active;
+  //bool do0prongEffRatioPlots = false;
+  bool m_effRatio0ProngChains_Active;
+  //bool doBDTEffRatioPlots = false;
+  bool m_effRatioBDTChains_Active;
+  //bool do0prongBDTEffRatioPlots = false;
+  bool m_effRatio0ProngBDTChains_Active;
+
+  bool m_muCut40Passed;
+
 };
 
 #endif
diff --git a/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool_Ztautau.cxx b/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool_Ztautau.cxx
index adbf979d821327aff7fde867beeae397cdc8edf5..c34857488d18dda238fe62cdd7d6a0d086986401 100644
--- a/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool_Ztautau.cxx
+++ b/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool_Ztautau.cxx
@@ -20,10 +20,20 @@ using namespace std;
 using Athena::Units::GeV;
 
 //--------------------------------------------------------------------------------------
-StatusCode HLTTauMonTool::RealZTauTauEfficiency()
+StatusCode HLTTauMonTool::RealZTauTauEfficiency(const std::string & goodTauRefType)
 {
   ATH_MSG_DEBUG("Real ZTauTau Efficiency");  
 
+  std::vector<const xAOD::TauJet *> taus_here;
+  std::vector<std::string> trigItemsZtt_here;
+  if (goodTauRefType == "RNN") {
+    taus_here = m_taus_RNN;
+    trigItemsZtt_here = m_trigItemsZtt_RNN;
+  } else {
+    taus_here = m_taus_BDT;
+    trigItemsZtt_here = m_trigItemsZtt_BDT;
+  }
+
   // compute eff only for events passing single muon triggers
   if(! ( getTDT()->isPassed("HLT_mu20_iloose_L1MU15") 
 	|| getTDT()->isPassed("HLT_mu20_ivarloose_L1MU15") 
@@ -121,13 +131,18 @@ StatusCode HLTTauMonTool::RealZTauTauEfficiency()
     }
 
   //Tau Selection
-  for(auto recoTau : m_taus)
+  for(auto recoTau : taus_here)
     {
     TLorentzVector TauTLV = recoTau->p4();
     double pt_Tau     = TauTLV.Pt();
     double eta_Tau    = TauTLV.Eta();
     int    ntrack_Tau = recoTau->nTracks();
-    bool   good_Tau   = recoTau->isTau(xAOD::TauJetParameters::JetBDTSigLoose);
+    bool   good_Tau(false);
+    if (goodTauRefType == "RNN") {
+      good_Tau = recoTau->isTau(xAOD::TauJetParameters::JetRNNSigLoose);
+    } else {
+      good_Tau = recoTau->isTau(xAOD::TauJetParameters::JetBDTSigLoose);
+    }
     float  charge_Tau = recoTau->charge();
         
     if(pt_Tau<20000.)                  continue;
@@ -210,8 +225,13 @@ StatusCode HLTTauMonTool::RealZTauTauEfficiency()
 	{
 	  std::string l1_chain(LowerChain("HLT_"+m_trigItemsZtt[i]));
 	  std::string hlt_chain = "HLT_"+m_trigItemsZtt[i];
+          std::string trigItemShort;
+          if(m_trigItemsZtt[i].find("tau25")!=string::npos && m_trigItemsZtt[i].find("L1TAU")!=string::npos){
+            size_t posit=m_trigItemsZtt[i].rfind("_");
+            trigItemShort=m_trigItemsZtt[i].substr(0,posit);
+          }
 
-	  setCurrentMonGroup("HLT/TauMon/Expert/RealZtautauEff/"+m_trigItemsZtt[i]);
+	  setCurrentMonGroup("HLT/TauMon/Expert/RealZtautauEff/"+trigItemShort);
 	  //hist("hRealZttPtDenom")->Fill(Tau_TLV.Pt()/GeV);
 
 	  //L1
diff --git a/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool_bookHistograms.cxx b/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool_bookHistograms.cxx
index 33b1ae391069699f77950d54fa15029a5635163d..b68a423626bf2de0d7c4696e36d14ddea74a4583 100644
--- a/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool_bookHistograms.cxx
+++ b/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool_bookHistograms.cxx
@@ -10,8 +10,31 @@ using namespace std;
 ///////////////////////////////////////////////////////////////////
 void HLTTauMonTool::bookHistogramsForItem(const std::string & trigItem){
     
-    const int nbin_pt = 13;
-    double bins_pt[nbin_pt] = {20.,25.,30.,35.,40.,45.,50.,55.,60.,70.,100.,150.,200.};
+  bool monRNN (false);
+  for (unsigned int j=0; j<m_trigRNN_chains.size(); j++) {
+    if ( trigItem == m_trigRNN_chains.at(j) ) {
+      monRNN = true;
+      break;
+    }
+  }
+  bool monBDT (false);
+  for (unsigned int j=0; j<m_trigBDTRNN_chains.size(); j++) {
+    if ( trigItem == m_trigBDTRNN_chains.at(j) ) {
+      if (!monRNN) monRNN = true;
+      if (!monBDT) monBDT = true;
+      break;
+    }
+  } 
+  if ( (!monBDT) && (!monRNN) ) monBDT=true; // if the chain is not listed in BDTRNN, but it is also not in RNN, then it is BDT 
+
+  std::string trigItemShort=trigItem;
+  if(trigItem.find("tau25")!=string::npos && trigItem.find("L1TAU")!=string::npos){
+    size_t posit=trigItem.rfind("_");
+    trigItemShort=trigItem.substr(0,posit);
+  }
+
+ const int nbin_pt = 13;
+ double bins_pt[nbin_pt] = {20.,25.,30.,35.,40.,45.,50.,55.,60.,70.,100.,150.,200.};
 
 
 //    const int nbin_leppt = 32;
@@ -20,9 +43,10 @@ void HLTTauMonTool::bookHistogramsForItem(const std::string & trigItem){
     double bins_eta[nbin_eta] = {-2.47,-1.52,-1.37,-0.69,0.,0.69,1.37,1.52,2.47};
     const int nbin_nvtx = 6;
     double bins_nvtx[nbin_nvtx] = {0.,5.,10.,15.,20.,25.};
+  for(int i=0;i<nbin_nvtx;i++) bins_nvtx[i] = i*5.;
     const int nbin_mu = 34;
     float bins_mu[nbin_mu] = {0.,2.,4.,6.,8.,10.,12.,14.,16.,18.,20.,22.,24.,26.,28.,30.,32.,34.,36.,38.,40., 42., 44., 44., 46., 48., 50., 52., 54., 56., 58., 60., 62., 72};
-
+  for(int i=0;i<nbin_mu;i++) bins_mu[i] = i*2.;
 
 //    const int nbin_met = 14;
 //    double bins_met[nbin_met] = {0.,5.,10.,20.,25.,30.,35.,40.,45.,50.,60.,70.,100.,150.};
@@ -31,15 +55,15 @@ void HLTTauMonTool::bookHistogramsForItem(const std::string & trigItem){
     
     // define here all histograms
     //L1 Roi
-    addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItem+"/L1RoI",run));
-    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/L1RoI");
+    addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItemShort+"/L1RoI",run));
+    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/L1RoI");
     addHistogram(new TH1F("hL1RoIEta","L1 RoI Eta ; #eta; N RoI",100,-2.6,2.6));
     addHistogram(new TH1F("hL1RoIPhi","L1 RoI Phi ; #phi; N RoI",100,-3.2,3.2));
     
-    addHistogram(new TH2F("hL1EtaVsPhi","L1 RoI Eta vs Phi; #eta; #phi",100,-2.6,2.6,100,-3.2,3.2));
-    addHistogram(new TH1F("hL1RoIisol","L1 RoI Isolation; RoI Isolation Bit; N RoI",10,0.5,9.5));
-    addHistogram(new TH1F("hL1RoIeT","L1 RoI Tau Clust Energy; E_{T}[GeV]; N RoI",260,0.,130.));
-    addHistogram(new TH1F("hL1RoITauClus","L1 RoI Tau Clust Energy; E_{T}[GeV]; N RoI",260,0.,130.));
+  addHistogram(new TH2F("hL1EtaVsPhi","L1 RoI Eta vs Phi; #eta; #phi",100,-2.6,2.6,100,-3.2,3.2));
+  addHistogram(new TH1F("hL1RoIisol","L1 RoI Isolation; RoI Isolation Bit; N RoI",10,0.5,9.5));
+  addHistogram(new TH1F("hL1RoIeT","L1 RoI Tau Clust Energy; E_{T}[GeV]; N RoI",260,0.,130.));
+  addHistogram(new TH1F("hL1RoITauClus","L1 RoI Tau Clust Energy; E_{T}[GeV]; N RoI",260,0.,130.));
     //addHistogram(new TH1F("hL1RoITauClus2","L1 RoI Tau Clust Energy; E_{T}[GeV]; N RoI",200,0.,1000.));
     addHistogram(new TH1F("hL1RoIEMIso","L1 RoI EM Isol ; E_{T}^{EM Isol}[GeV]; N RoI",16,-2,30));
     addHistogram(new TH1F("hL1RoIHadCore","L1 RoI HAD Core ; E_{T}^{HAD}[GeV]; N RoI",16,-2,30));
@@ -48,22 +72,30 @@ void HLTTauMonTool::bookHistogramsForItem(const std::string & trigItem){
     addHistogram(new TH2F("hL1RoITauVsJet","L1 RoI Tau Et vs Jet Et ; Tau E_{T} [GeV]; Jet E_{T} [GeV]",200,0.,100.,200,0.,100));
     addHistogram(new TH2F("hL1RoITauVsJetMismatch","L1 RoI Tau-Jet deta-dphi if Jet Et< Tau Et ; d#eta; d#phi",50,-0.3,0.3,50,-0.3,0.3));
     addHistogram(new TH2F("hL1RoITauVsJetDEt","L1 RoI Tau-Jet dEt if Jet Et< Tau Et ; Tau E_{t}; dE_{T}",200,0.,100.,50,0.,25.));
-    addHistogram(new TH2F("hL1EtVsPhi","L1 RoI Et vs Phi; E_{T}[GeV]; #phi",100,0.,100.,100,-3.2,3.2));
-    addHistogram(new TH2F("hL1EtVsEta","L1 RoI Et vs Eta; E_{T}[GeV]; #eta",100,0.,100.,100,-2.6,2.6));   
+  addHistogram(new TH2F("hL1EtVsPhi","L1 RoI Et vs Phi; E_{T}[GeV]; #phi",100,0.,100.,100,-3.2,3.2));
+  addHistogram(new TH2F("hL1EtVsEta","L1 RoI Et vs Eta; E_{T}[GeV]; #eta",100,0.,100.,100,-2.6,2.6));   
+
+  if (m_doL1JetPlots)
+    { 
+      addHistogram(new TH2F("hL1RoITauVsJet","L1 RoI Tau Et vs Jet Et ; Tau E_{T} [GeV]; Jet E_{T} [GeV]",200,0.,100.,200,0.,100));
+      addHistogram(new TH2F("hL1RoITauVsJetMismatch","L1 RoI Tau-Jet deta-dphi if Jet Et< Tau Et ; d#eta; d#phi",50,-0.3,0.3,50,-0.3,0.3));
+      addHistogram(new TH2F("hL1RoITauVsJetDEt","L1 RoI Tau-Jet dEt if Jet Et< Tau Et ; Tau E_{t}; dE_{T}",200,0.,100.,50,0.,25.));
 
-    addHistogram(new TH1F("hL1JetRoIEta","L1 Jet RoI Eta ; #eta; N RoI",100,-3.2,3.2));
+      addHistogram(new TH1F("hL1JetRoIEta","L1 Jet RoI Eta ; #eta; N RoI",100,-3.2,3.2));
     addHistogram(new TH1F("hL1JetRoIPhi","L1 Jet RoI Phi ; #phi; N RoI",100,-3.2,3.2));
     addHistogram(new TH2F("hL1JetEtaVsPhi","L1 Jet RoI Eta vs Phi; #eta; #phi",100,-3.2,3.2,100,-3.2,3.2));
     addHistogram(new TH1F("hL1JetRoIeT","L1 Jet RoI Energy; E_{T}[GeV]; N RoI",200,0.,100.));
     addHistogram(new TH2F("hL1JetEtVsPhi","L1 Jet RoI Et vs Phi; E_{T}[GeV]; #phi",100,0.,100.,100,-3.2,3.2));
     addHistogram(new TH2F("hL1JetEtVsEta","L1 Jet RoI Et vs Eta; E_{T}[GeV]; #eta",100,0.,100.,100,-3.2,3.2));
-
+    }
     //--------------------
     //Pre-selection Tau
     //--------------------
-    
-    addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItem+"/PreselectionTau",run));
-    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/PreselectionTau");    
+  // no preselection taus for some chains  
+  // tracktwoEFmvaTES catched with tracktwoEF
+  if(trigItem.find("tracktwoMVA")==string::npos && trigItem.find("tracktwoEF")==string::npos && trigItem.find("ptonly")==string::npos) {
+    addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItemShort+"/PreselectionTau",run));
+    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/PreselectionTau");    
     addHistogram(new TH1F("hEFEt","EF Et;E_{T}[GeV];Nevents",40,0.0,100.0));
     addHistogram(new TH1F("hEFEt2","EF Et;E_{T}[GeV];Nevents",100,0.0,1000.0));
     addHistogram(new TH1F("hFTFnTrack","EF number of tracks;number of tracks;Nevents",10,0,10));
@@ -77,12 +109,14 @@ void HLTTauMonTool::bookHistogramsForItem(const std::string & trigItem){
     addHistogram(new TH2F("hEtVsPhi","Et from tau Jet vs #phi; #phi^{EF}; Raw E_{T} [GeV]",
                           32,-3.2,3.2,40,0.0,100.0));
     addHistogram(new TH1F("hFTFnWideTrack","EF number of wide tracks;number of tracks;Nevents",10,0,10));
-    
+  }
+
     //--------------------
     // EF
     //--------------------
-    addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItem+"/EFTau",run));
-    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/EFTau");
+    addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItemShort+"/EFTau",run));
+    ATH_MSG_DEBUG("After adding MonGroup Check21 "<< trigItemShort);
+    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFTau");
     //Basic kinematic variables
     addHistogram(new TH1F("hEFEt","EF Et;E_{T}[GeV];Nevents",50,0.0,100.0));
     addHistogram(new TH1F("hEFEta","EF TrigCaloCluster Eta; #eta ; Nevents",26,-2.6,2.6));
@@ -101,11 +135,14 @@ void HLTTauMonTool::bookHistogramsForItem(const std::string & trigItem){
     addHistogram(new TH1F("hEFIsoFrac", "Iso Fraction at EF; isoFrac at EF; Candidates",50,-0.1,1.1));
     //addHistogram(new TH1F("hEFPSSFraction", "PSS Fraction at EF; PSS at EF; Candidates",50,-0.05,1.1));
     addHistogram(new TH1F("hEFEMFraction", "Em Fraction at EF; EM Fraction at EF; Candidates",50,-0.05,1.1));
+  if (monBDT) {
     addHistogram(new TH1F("hScore1p", "1p BDT Score; HLT BDT Score; Candidates",50,0.,1.));
     addHistogram(new TH1F("hScoremp", "mp BDT Score; HLT BDT Score; Candidates",50,0.,1.));
+    addHistogram(new TH1F("hScoreSigTrans1p", "1p Flattened BDT Score; HLT BDT Score; Candidates",50,0.,1.));
+    addHistogram(new TH1F("hScoreSigTransmp", "mp Flattened BDT Score; HLT BDT Score; Candidates",50,0.,1.));
     //BDT inputs for 1-prong Non-Corrected
-    addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItem+"/EFTau/BDT/1p_nonCorrected",run));
-    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/EFTau/BDT/1p_nonCorrected");
+    addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItemShort+"/EFTau/BDT/1p_nonCorrected",run));
+    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFTau/BDT/1p_nonCorrected");
     addHistogram(new TH1F("hEFinnerTrkAvgDist1PNCorr", "Inner Track Average Distance at EF 1-prong non-corrected; innertrkAvgDist at EF; Candidates",50,-0.05,0.5));
     addHistogram(new TH1F("hEFetOverPtLeadTrk1PNCorr", "Et over Lead Track Pt at EF 1-prong non-corrected; etOverPtLeadTrk at EF; Candidates",51,-0.1,25.0));
     addHistogram(new TH1F("hEFipSigLeadTrk1PNCorr", "IpSigLeadTrk at EF 1-prong non-corrected; ipSigLeadTrk at EF; Candidates",50,-20.0,20.0));
@@ -114,6 +151,8 @@ void HLTTauMonTool::bookHistogramsForItem(const std::string & trigItem){
     addHistogram(new TH1F("hEFEMPOverTrkSysP1PNCorr", "EMPOverTrkSysP at EF 1-prong non-corrected; EMPOverTrkSysP at EF; Candidates", 41,0.0,40.0));
     addHistogram(new TH1F("hEFcentFrac1PNCorr", "Centrality Fraction at EF 1-prong non-corrected; centFrac at EF; Candidates",50,-0.05,1.2));
     addHistogram(new TH1F("hEFptRatioEflowApprox1PNCorr", "ptRatioEflowApprox at EF 1-prong non-corrected; ptRatioEflowApprox at EF; Candidates",50,0.0,2.0));
+    if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles)) // keep the EF TProfiles of lowest single tau or if flag is turned on for the rest of the chains
+      {
     addProfile(new TProfile("hEFinnerTrkAvgDist1PNCmu", "InnerTrkAvgDist at EF vs mu 1-prong non-corrected;Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
     addProfile(new TProfile("hEFetOverPtLeadTrk1PNCmu", "EtOverPtLeadTrk at EF vs mu 1-prong non-corrected;Average interactions per bunch crossing ;",nbin_mu-1,bins_mu));
     addProfile(new TProfile("hEFipSigLeadTrk1PNCmu", "IpSigLeadTrk at EF vs mu 1-prong non-corrected;Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
@@ -122,9 +161,10 @@ void HLTTauMonTool::bookHistogramsForItem(const std::string & trigItem){
     addProfile(new TProfile("hEFEMPOverTrkSysP1PNCmu", "EMPOverTrkSysP at EF vs mu 1-prong non-corrected;Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
     addProfile(new TProfile("hEFcentFrac1PNCmu", "Centrality Fraction at EF vs mu 1-prong non-corrected;Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
     addProfile(new TProfile("hEFptRatioEflowApprox1PNCmu", "ptRatioEflowApprox at EF vs mu 1p non-corrected;Average interactions per bunch crossing ;",nbin_mu-1,bins_mu));
+      }
     //BDT inputs for 3-prong Non-Corrected
-    addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItem+"/EFTau/BDT/mp_nonCorrected",run));
-    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/EFTau/BDT/mp_nonCorrected");
+    addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItemShort+"/EFTau/BDT/mp_nonCorrected",run));
+    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFTau/BDT/mp_nonCorrected");
     addHistogram(new TH1F("hEFinnerTrkAvgDistMPNCorr", "Inner Track Average Distance at EF m-prong non-corrected; innertrkAvgDist at EF; Candidates",50,-0.05,0.5));
     addHistogram(new TH1F("hEFetOverPtLeadTrkMPNCorr", "Et over Lead Track Pt at EF m-prong non-corrected; etOverPtLeadTrk at EF; Candidates",51,-0.1,25.0));
     addHistogram(new TH1F("hEFChPiEMEOverCaloEMEMPNCorr", "ChPiEMEOverCaloEME at EF m-prong non-corrected; ChPiEMEOverCaloEME at EF; Candidates",51,-20.0,20.0));
@@ -135,6 +175,8 @@ void HLTTauMonTool::bookHistogramsForItem(const std::string & trigItem){
     addHistogram(new TH1F("hEFtrFlightPathSigMPNCorr", "TrFlightPathSig at EF m-prong non-corrected; trFlightPathSig at EF; Candidates",50,-20.0,20.0));
     addHistogram(new TH1F("hEFmassTrkSysMPNCorr", "MassTrkSys at EF m-prong non-corrected; MassTrkSys at EF [GeV]; Candidates",50,-0.1,15.0));
     addHistogram(new TH1F("hEFmEflowApproxMPNCorr", "mEflowApprox at EF m-prong non-corrected;  mEflowApprox at EF ; Candidates",61,-0.2,60.2));
+    if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles)) // keep the EF TProfiles of lowest single tau or if flag is turned on for the rest of the chains
+      {
     addProfile(new TProfile("hEFinnerTrkAvgDistMPNCmu", "InnerTrkAvgDist at EF vs mu m-prong non-corrected; Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
     addProfile(new TProfile("hEFetOverPtLeadTrkMPNCmu", "EtOverPtLeadTrk at EF vs mu m-prong non-corrected; Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
     addProfile(new TProfile("hEFChPiEMEOverCaloEMEMPNCmu", "ChPiEMEOverCaloEME at EF vs mu mp non-corrected;Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
@@ -145,9 +187,11 @@ void HLTTauMonTool::bookHistogramsForItem(const std::string & trigItem){
     addProfile(new TProfile("hEFtrFlightPathSigMPNCmu", "TrFlightPathSig at EF vs mu m-prong non-corrected;Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
     addProfile(new TProfile("hEFmassTrkSysMPNCmu", "MassTrkSys at EF vs mu m-prong non-corrected;Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
     addProfile(new TProfile("hEFmEflowApproxMPNCmu", "mEflowApprox at EF vs mu m-prong non-corrected;Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
+      }
+
     //BDT inputs for 1-prong mu-Corrected
-    addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItem+"/EFTau/BDT/1p_Corrected",run));
-    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/EFTau/BDT/1p_Corrected");
+    addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItemShort+"/EFTau/BDT/1p_Corrected",run));
+    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFTau/BDT/1p_Corrected");
     addHistogram(new TH1F("hEFinnerTrkAvgDist1PCorr", "Inner Track Average Distance at EF 1-prong mu-corrected; innertrkAvgDist at EF; Candidates",50,-0.05,0.5));
     addHistogram(new TH1F("hEFetOverPtLeadTrk1PCorr", "Et over Lead Track Pt at EF 1-prong mu-corrected; etOverPtLeadTrk at EF; Candidates",51,-0.1,25.0));
     addHistogram(new TH1F("hEFipSigLeadTrk1PCorr", "IpSigLeadTrk at EF 1-prong mu-corrected; IpSigLeadTrk at EF; Candidates",50,-20.0,20.0));
@@ -156,6 +200,8 @@ void HLTTauMonTool::bookHistogramsForItem(const std::string & trigItem){
     addHistogram(new TH1F("hEFEMPOverTrkSysP1PCorr", "EMPOverTrkSysP at EF 1-prong mu-corrected; EMPOverTrkSysP at EF; Candidates", 41,0.0,40.0));
     addHistogram(new TH1F("hEFcentFrac1PCorr", "Centrality Fraction at EF 1-prong mu-corrected; centFrac at EF; Candidates",50,-0.05,1.2));
     addHistogram(new TH1F("hEFptRatioEflowApprox1PCorr", "ptRatioEflowApprox at EF 1-prong mu-corrected; ptRatioEflowApprox at EF; Candidates",50,0.0,2.0));
+    if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles)) // keep the EF TProfiles of lowest single tau or if flag is turned on for the rest of the chains
+    {
     addProfile(new TProfile("hEFinnerTrkAvgDist1PCmu", "InnerTrkAvgDist at EF vs mu 1-prong mu-corrected;Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
     addProfile(new TProfile("hEFetOverPtLeadTrk1PCmu", "EtOverPtLeadTrk at EF vs mu 1-prong mu-corrected;Average interactions per bunch crossing ;",nbin_mu-1,bins_mu));
     addProfile(new TProfile("hEFipSigLeadTrk1PCmu", "IpSigLeadTrk at EF vs mu 1-prong mu-corrected;Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
@@ -164,9 +210,10 @@ void HLTTauMonTool::bookHistogramsForItem(const std::string & trigItem){
     addProfile(new TProfile("hEFEMPOverTrkSysP1PCmu", "EMPOverTrkSysP at EF vs mu 1-prong mu-corrected;Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
     addProfile(new TProfile("hEFcentFrac1PCmu", "Centrality Fraction at EF vs mu 1-prong mu-corrected;Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
     addProfile(new TProfile("hEFptRatioEflowApprox1PCmu", "ptRatioEflowApprox at EF vs mu 1p mu-corrected;Average interactions per bunch crossing ;",nbin_mu-1,bins_mu));
+    }
     //BDT inputs for 3-prong mu-Corrected
-    addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItem+"/EFTau/BDT/mp_Corrected",run));
-    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/EFTau/BDT/mp_Corrected");
+    addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItemShort+"/EFTau/BDT/mp_Corrected",run));
+    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFTau/BDT/mp_Corrected");
     addHistogram(new TH1F("hEFinnerTrkAvgDistMPCorr", "Inner Track Average Distance at EF m-prong mu-corrected; innertrkAvgDist at EF; Candidates",50,-0.05,0.5));
     addHistogram(new TH1F("hEFetOverPtLeadTrkMPCorr", "Et over Lead Track Pt at EF m-prong mu-corrected; etOverPtLeadTrk at EF; Candidates",51,-0.1,25.0));
     addHistogram(new TH1F("hEFChPiEMEOverCaloEMEMPCorr", "ChPiEMEOverCaloEME at EF m-prong mu-corrected; ChPiEMEOverCaloEME at EF; Candidates", 51,-20.0,20.0));
@@ -177,6 +224,8 @@ void HLTTauMonTool::bookHistogramsForItem(const std::string & trigItem){
     addHistogram(new TH1F("hEFtrFlightPathSigMPCorr", "TrFlightPathSig at EF m-prong mu-corrected; trFlightPathSig at EF; Candidates",50,-20.0,20.0));
     addHistogram(new TH1F("hEFmassTrkSysMPCorr", "MassTrkSys at EF m-prong mu-corrected; massTrkSys at EF [GeV]; Candidates",50,-0.1,15.0));
     addHistogram(new TH1F("hEFmEflowApproxMPCorr", "mEflowApprox at EF m-prong mu-corrected;  mEflowApprox at EF ; Candidates",61,-0.2,60.2));
+    if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles)) // keep the EF TProfiles of lowest single tau or if flag is turned on for the rest of the chains
+    {
     addProfile(new TProfile("hEFinnerTrkAvgDistMPCmu", "InnerTrkAvgDist at EF vs mu m-prong mu-corrected; Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
     addProfile(new TProfile("hEFetOverPtLeadTrkMPCmu", "EtOverPtLeadTrk at EF vs mu m-prong mu-corrected; Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
     addProfile(new TProfile("hEFChPiEMEOverCaloEMEMPCmu", "ChPiEMEOverCaloEME at EF vs mu mp mu-corrected;Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
@@ -187,34 +236,107 @@ void HLTTauMonTool::bookHistogramsForItem(const std::string & trigItem){
     addProfile(new TProfile("hEFtrFlightPathSigMPCmu", "TrFlightPathSig at EF vs mu m-prong mu-corrected;Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
     addProfile(new TProfile("hEFmassTrkSysMPCmu", "MassTrkSys at EF vs mu m-prong mu-corrected;Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
     addProfile(new TProfile("hEFmEflowApproxMPCmu", "mEflowApprox at EF vs mu m-prong mu-corrected;Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
-    
+    }
+  } // end of if(monBDT)
+  // RNN variables
+  if (monRNN) 
+    {
+      // output
+      addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItemShort+"/EFTau/RNN/Output",run));
+      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFTau/RNN/Output");
+      addHistogram(new TH1F("hEFRNNJetScore_0P", "RNNJetScore distribution (0Prong); RNNJetScore; Events",50,-1,1));        
+      addHistogram(new TH1F("hEFRNNJetScore_1P", "RNNJetScore distribution (1Prong); RNNJetScore; Events",50,-1,1));        
+      addHistogram(new TH1F("hEFRNNJetScore_3P", "RNNJetScore distribution (3Prong); RNNJetScore; Events",50,-1,1));        
+      addHistogram(new TH1F("hEFRNNJetScoreSigTrans_0P", "RNNJetScoreSigTrans distribution (0Prong); RNNJetScoreSigTrans; Events",50,0,1));        
+      addHistogram(new TH1F("hEFRNNJetScoreSigTrans_1P", "RNNJetScoreSigTrans distribution (1Prong); RNNJetScoreSigTrans; Events",50,0,1));        
+      addHistogram(new TH1F("hEFRNNJetScoreSigTrans_3P", "RNNJetScoreSigTrans distribution (3Prong); RNNJetScoreSigTrans; Events",50,0,1));        
+
+      // Scalar input variables
+      addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItemShort+"/EFTau/RNN/InputScalar1p",run));
+      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFTau/RNN/InputScalar1p");
+      addHistogram(new TH1F("hEFRNNInput_Scalar_centFrac_1P", "Centrality Fraction (1Prong); centFrac; Events",50,-0.05,1.2));      
+      addHistogram(new TH1F("hEFRNNInput_Scalar_etOverPtLeadTrk_log_1P", "etOverPtLeadTrk log (1Prong); etOverPtLeadTrk_log; Events",60,-3.,3.));  
+      addHistogram(new TH1F("hEFRNNInput_Scalar_dRmax_1P", "max dR of associated tracks (1Prong); dRmax; Events",50,-0.1,0.3));        
+      addHistogram(new TH1F("hEFRNNInput_Scalar_absipSigLeadTrk_1P", "AbsIpSigLeadTrk (1Prong); absipSigLeadTrk; Events",25,0.0,20.0));     
+      addHistogram(new TH1F("hEFRNNInput_Scalar_SumPtTrkFrac_1P", "SumPtTrkFrac (1Prong); SumPtTrkFrac; Events",50,-0.5,1.1));  
+      addHistogram(new TH1F("hEFRNNInput_Scalar_EMPOverTrkSysP_log_1P", "EMPOverTrkSysP log (1Prong); EMPOverTrkSysP_log; Events",50,-5.,3.));  
+      addHistogram(new TH1F("hEFRNNInput_Scalar_ptRatioEflowApprox_1P", "ptRatioEflowApprox (1Prong); ptRatioEflowApprox; Events",50,0.0,2.0)); 
+      addHistogram(new TH1F("hEFRNNInput_Scalar_mEflowApprox_log_1P", "mEflowApprox log (1Prong); mEflowApprox_log; Events",50,0.,5.));//61,-0.2,60.2));      
+      addHistogram(new TH1F("hEFRNNInput_Scalar_ptDetectorAxis_log_1P", "ptDetectorAxis log (1Prong); ptDetectorAxis_log; Events",50,0.,5.));      
+      addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItemShort+"/EFTau/RNN/InputScalar3p",run));
+      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFTau/RNN/InputScalar3p");
+      addHistogram(new TH1F("hEFRNNInput_Scalar_centFrac_3P", "Centrality Fraction (3Prong); centFrac; Events",50,-0.05,1.2));      
+      addHistogram(new TH1F("hEFRNNInput_Scalar_etOverPtLeadTrk_log_3P", "etOverPtLeadTrk log (3Prong); etOverPtLeadTrk_log; Events",60,-3.,3.)); //51,-0.1,25.0));     
+      addHistogram(new TH1F("hEFRNNInput_Scalar_dRmax_3P", "max dR of associated tracks (3Prong); dRmax; Events",50,-0.1,0.3));        
+      addHistogram(new TH1F("hEFRNNInput_Scalar_trFlightPathSig_log_3P", "trFlightPathSig log (3Prong); trFlightPathSig_log; Events",60,-3.,3.)); //50,-20.0,20.0));      
+      addHistogram(new TH1F("hEFRNNInput_Scalar_SumPtTrkFrac_3P", "SumPtTrkFrac (3Prong); SumPtTrkFrac; Events",50,-0.5,1.1));
+      addHistogram(new TH1F("hEFRNNInput_Scalar_EMPOverTrkSysP_log_3P", "EMPOverTrkSysP log (3Prong); EMPOverTrkSysP_log; Events",40,-5.,3.));//41,0.0,40.0));  
+      addHistogram(new TH1F("hEFRNNInput_Scalar_ptRatioEflowApprox_3P", "ptRatioEflowApprox (3Prong); ptRatioEflowApprox; Events",50,0.0,2.0));      
+      addHistogram(new TH1F("hEFRNNInput_Scalar_mEflowApprox_log_3P", "mEflowApprox log (3Prong); mEflowApprox_log; Events",50,0.,5.));//35,0.,7000.));//61,-0.2,60.2));      
+      addHistogram(new TH1F("hEFRNNInput_Scalar_ptDetectorAxis_log_3P", "ptDetectorAxis log (3Prong); ptDetectorAxis_log; Events",50,0.,5.)); //nbin_pt-1,bins_pt));     
+      addHistogram(new TH1F("hEFRNNInput_Scalar_massTrkSys_log_3P", "massTrkSys log (3Prong); massTrkSys_log; Events",50,0.,3.));//50,-0.1,15.0));  
+      // Track input variables
+      addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItemShort+"/EFTau/RNN/InputTrack",run));
+      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFTau/RNN/InputTrack");
+      addHistogram(new TH1F("hEFRNNInput_Track_pt_log", "pt_log ; pt_log; Events",50,2,7));//nbin_pt-1,bins_pt));    
+      addHistogram(new TH1F("hEFRNNInput_Track_pt_jetseed_log", "pt_jetseed_log ; pt_jetseed_log; Events",50,2,7));//nbin_pt-1,bins_pt));    
+      //addHistogram(new TH1F("hEFRNNInput_Track_eta", "eta ; eta; Events",nbin_eta-1,bins_eta));    
+      //addHistogram(new TH1F("hEFRNNInput_Track_phi", "phi ; phi; Events",16,-3.2,3.2));    
+      addHistogram(new TH1F("hEFRNNInput_Track_dEta", "dEta ; dEta; Events",100,-0.5,0.5));//nbin_eta-1,bins_eta));    
+      addHistogram(new TH1F("hEFRNNInput_Track_dPhi", "dPhi ; dPhi; Events",100,-0.5,0.5));
+      addHistogram(new TH1F("hEFRNNInput_Track_d0_abs_log", "d0_abs_log ; d0_abs_log; Events",50,-7.,2.));//50,-5.,5.));
+      addHistogram(new TH1F("hEFRNNInput_Track_z0sinThetaTJVA_abs_log", "z0sinThetaTJVA_abs_log ; z0sinThetaTJVA_abs_log; Events",50,-10,4));//15,-200.,200.));   
+      addHistogram(new TH1F("hEFRNNInput_Track_nIBLHitsAndExp", "nIBLHitsAndExp ; nIBLHitsAndExp; Events",3,0.,3));
+      addHistogram(new TH1F("hEFRNNInput_Track_nPixelHitsPlusDeadSensors", "nPixelHitsPlusDeadSensors ; nPixelHitsPlusDeadSensors; Events",11,0.,11));  
+      addHistogram(new TH1F("hEFRNNInput_Track_nSCTHitsPlusDeadSensors", "nSCTHitsPlusDeadSensors ; nSCTHitsPlusDeadSensors; Events",20,0.,20));     
+      // Cluster input variables
+      addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItemShort+"/EFTau/RNN/InputCluster",run));
+      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFTau/RNN/InputCluster");
+      //addHistogram(new TH1F("hEFRNNInput_Cluster_e", "e ; e; Events",nbin_pt-1,bins_pt));     
+      //addHistogram(new TH1F("hEFRNNInput_Cluster_et", "et ; et; Events",nbin_pt-1,bins_pt));  // or 260,0.,130.    
+      //addHistogram(new TH1F("hEFRNNInput_Cluster_eta", "eta ; eta; Events",nbin_eta-1,bins_eta));
+      //addHistogram(new TH1F("hEFRNNInput_Cluster_phi", "phi ; phi; Events",16,-3.2,3.2));    
+      addHistogram(new TH1F("hEFRNNInput_Cluster_et_log", "et_log ; et_log; Events",30,0.,6.));//nbin_pt-1,bins_pt));  // or 260,0.,130.    
+      addHistogram(new TH1F("hEFRNNInput_Cluster_pt_jetseed_log", "pt_jetseed_log ; pt_jetseed_log; Events",50,2,7));//nbin_pt-1,bins_pt));  // or 260,0.,130.    
+      addHistogram(new TH1F("hEFRNNInput_Cluster_dEta", "dEta ; dEta; Events",100,-0.5,0.5));//nbin_eta-1,bins_eta));
+      addHistogram(new TH1F("hEFRNNInput_Cluster_dPhi", "dPhi ; dPhi; Events",100,-0.5,0.5));    
+      addHistogram(new TH1F("hEFRNNInput_Cluster_SECOND_R_log10", "SECOND_R ; SECOND_R; Events",50,-3.,7.));
+      addHistogram(new TH1F("hEFRNNInput_Cluster_SECOND_LAMBDA_log10", "SECOND_LAMBDA ; SECOND_LAMBDA; Events",50,-3.,7.));      
+      addHistogram(new TH1F("hEFRNNInput_Cluster_CENTER_LAMBDA_log10", "CENTER_LAMBDA ; CENTER_LAMBDA; Events",50,-2.,5.));     
+
+    }
+
+
     //--------------------
     // L1 vs Offline
     //--------------------
     
-    addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItem+"/L1VsOffline",run));
-    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/L1VsOffline");
+    addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItemShort+"/L1VsOffline",run));
+    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/L1VsOffline");
     addHistogram(new TH1F("hL1EtRatio","L1 Et Relative difference; Et relative diff; Et relative diff",50,-0.8,0.8));
     
     //--------------------
     //Pre selection vs Offline
     //--------------------
     
-    addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItem+"/PreselectionVsOffline",run));
-    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/PreselectionVsOffline");
+
+    if(trigItem.find("tracktwoMVA")==string::npos && trigItem.find("tracktwoEF")==string::npos && trigItem.find("ptonly")==string::npos) {   
+    addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItemShort+"/PreselectionVsOffline",run));
+    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/PreselectionVsOffline");
     addHistogram(new TH2F("hPreselvsOffnTrks","nTrks at FTF vs Off; nTrks off; nTrks FTF",10,0,10,10,0,10));
     addHistogram(new TH2F("hPreselvsOffnWideTrks","nWideTrks at FTF vs Off; nWideTrks off; nWideTrks FTF",10,0,10,10,0,10));
     addHistogram(new TH1F("hEFEtRatio","FTF-Offline Et Relative difference; Et relative diff; Et relative diff",50,-0.3,0.3));
     addHistogram(new TH1F("hEtaRatio","FTF-Offline Eta Relative difference; Eta relative diff; Eta relative diff",50,-0.3,0.3));
     addHistogram(new TH1F("hPhiRatio","FTF-Offline Phi Relative difference; Phi relative diff; Phi relative diff",50,-0.05,0.05));
-    
+  }
+
     if(m_truth){
         //----------------
         // EF vs Truth
         //----------------
-        addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItem+"/EFVsTruth",run));
-        setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/EFVsTruth");        
-	addProfile(new TProfile("hEtRatiovspt","Relative difference in Et (EF-Truth)/Truth vs Truth Tau pT;Truth Tau pT;",nbin_pt-1,bins_pt));
+        addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItemShort+"/EFVsTruth",run));
+        setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFVsTruth");        
+        addProfile(new TProfile("hEtRatiovspt","Relative difference in Et (EF-Truth)/Truth vs Truth Tau pT;Truth Tau pT;",nbin_pt-1,bins_pt));
         addProfile(new TProfile("hEtRatiovseta","Relative difference in Et (EF-Truth)/Truth vs Truth Tau eta;Truth Tau #eta;",nbin_eta-1,bins_eta));
         addProfile(new TProfile("hEtRatiovsphi","Relative difference in Et (EF-Truth)/Truth vs Truth Tau phi;Truth Tau #phi;",40,-3.2,3.2));
         addProfile(new TProfile("hEtRatiovsmu","Relative difference in Et (EF-Truth)/Truth vs mu;Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
@@ -223,8 +345,8 @@ void HLTTauMonTool::bookHistogramsForItem(const std::string & trigItem){
    
 //EF vs Offline
     //-------------------
-    addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItem+"/EFVsOffline",run));
-    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/EFVsOffline");   
+    addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItemShort+"/EFVsOffline",run));
+    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFVsOffline");   
     //Basic Kinematic Vars
     addHistogram(new TH1F("hptRatio","Relative difference in pt (EF-Offline)/Offline; pt relative diff;", 100,-0.3,0.3));
     addHistogram(new TH1F("hetaRatio","Relative difference in eta (EF-Offline)/Offline; eta relative diff;", 100,-0.3,0.3));
@@ -240,6 +362,8 @@ void HLTTauMonTool::bookHistogramsForItem(const std::string & trigItem){
     addHistogram(new TH1F("hEtRawRatio","Relative difference in EtRaw;EtRaw relative diff;",50,-0.3,0.3));
     addHistogram(new TH1F("hOffEFEMDiff","Relative difference in EM energy (EF-Offline)/Offline; EM energy relative diff;", 50,-0.1,0.1));
     addHistogram(new TH1F("hOffEFHADDiff","Relative difference in HAD energy (EF-Offline)/Offline; HAD energy relative diff;", 50,-0.1,0.1));
+  if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles)) // keep the EF TProfiles of lowest single tau or if flag is turned on for the rest of the chains
+    {
     //TProfile
     addProfile(new TProfile("hEtRawRatiovspt","Relative difference in EtRaw (EF-Offline)/Offline vs Offline Tau pT;Offline Tau pT;",nbin_pt-1,bins_pt));
     addProfile(new TProfile("hEtRawRatiovseta","Relative difference in EtRaw (EF-Offline)/Offline vs Offline Tau eta;Offline Tau #eta;",nbin_eta-1,bins_eta));
@@ -280,10 +404,10 @@ void HLTTauMonTool::bookHistogramsForItem(const std::string & trigItem){
     //addProfile(new TProfile("hPSSFracRatiovseta","Relative difference in PSSFrac (EF-Offline)/Offline vs Offline Tau eta;Offline Tau #eta;",nbin_eta-1,bins_eta));
     //addProfile(new TProfile("hPSSFracRatiovsphi","Relative difference in PSSFrac (EF-Offline)/Offline vs Offline Tau phi;Offline Tau #phi;",40,-3.2,3.2));
     //addProfile(new TProfile("hPSSFracRatiovsmu","Relative difference in PSSFrac (EF-Offline)/Offline vs mu;Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
-    
+    }    
     //BDT inputs 1p non corrected
-    addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItem+"/EFVsOffline/BDT/1p_nonCorrected",run));
-    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/EFVsOffline/BDT/1p_nonCorrected");
+    addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItemShort+"/EFVsOffline/BDT/1p_nonCorrected",run));
+    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFVsOffline/BDT/1p_nonCorrected");
     addHistogram(new TH1F("hInnerTrkAvgDistRatio1P","Relative diff in innertrkAvgDist (EF-Offline)/Offline; InnerTrkAvgDist 1-prong relative diff;",40,-2.0,2.0));
     addHistogram(new TH1F("hEtOverPtLeadTrkRatio1P","Relative diff in EtOverPtLeadTrk ;EtOverPtLeadTrack 1-prong relative diff;",40,-0.2,0.2));
     addHistogram(new TH1F("hIpSigLeadTrkRatio1P","Relative diff in IpSigLeadTrk (EF-Offline)/Offline; IpSigLeadTrk 1-prong relative diff;",40,-2.0,2.0));
@@ -294,6 +418,8 @@ void HLTTauMonTool::bookHistogramsForItem(const std::string & trigItem){
     addHistogram(new TH1F("hPtRatioEflowApproxRatio1P","Relative diff in ptRatioEflowApprox (EF-Offline)/Offline; ptRatioEflowApprox 1-prong rel diff;", 40,-0.2,0.2));
     addHistogram(new TH1F("hDRmaxRatio1P","Relative diff in DRmax (EF-Offline)/Offline; DRmax 1-prong relative diff;", 40,-2.0,2.0));
     addHistogram(new TH1F("hTopoInvMassRatio1P","Relative diff in TopoInvMass (EF-Offline)/Offline; TopoInvMass 1-prong relative diff;", 40,-1.0,1.0));
+  if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles)) // keep the EF TProfiles of lowest single tau or if flag is turned on for the rest of the chains
+    {
     addProfile(new TProfile("hInnerTrkAvgDistVspt1P","Relative diff in innertrkAvgDist (EF-Off)/Off vs Off Tau pT 1-prong;Offline Tau pT;",nbin_pt-1,bins_pt));
     addProfile(new TProfile("hInnerTrkAvgDistVsmu1P","Rel diff in innertrkAvgDist (EF-Off)/Off vs mu 1-prong;Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
     addProfile(new TProfile("hEtOverPtLeadTrkVspt1P","Relative diff in EtOverPtLeadTrk (EF-Off)/Off vs Off Tau pT 1-prong;Offline Tau pT;",nbin_pt-1,bins_pt));
@@ -314,9 +440,10 @@ void HLTTauMonTool::bookHistogramsForItem(const std::string & trigItem){
     addProfile(new TProfile("hDRmaxVsmu1P","Relative diff in DRmax (EF-Off)/Off vs mu 1-prong;Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
     addProfile(new TProfile("hTopoInvMassVspt1P","Relative diff in TopoInvMass (EF-Off)/Off vs Off Tau pT 1-prong;Offline Tau pT;",nbin_pt-1,bins_pt));
     addProfile(new TProfile("hTopoInvMassVsmu1P","Relative diff in TopoInvMass (EF-Off)/Off vs mu 1-prong;Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
+    }
     //BDT inputs mp non corrected
-    addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItem+"/EFVsOffline/BDT/mp_nonCorrected",run));
-    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/EFVsOffline/BDT/mp_nonCorrected");
+    addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/"+trigItemShort+"/EFVsOffline/BDT/mp_nonCorrected",run));
+    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFVsOffline/BDT/mp_nonCorrected");
     addHistogram(new TH1F("hInnerTrkAvgDistRatioMP","Relative diff in innertrkAvgDist (EF-Offline)/Offline; InnerTrkAvgDist m-prong relative diff;",40,-2.0,2.0));
     addHistogram(new TH1F("hEtOverPtLeadTrkRatioMP","Relative diff in etOverPtLeadTrk (EF-Offline)/Offline; etOverPtLeadTrk m-prong relative diff;",40,-0.2,0.2));
     addHistogram(new TH1F("hChPiEMEOverCaloEMERatioMP","Relative diff in ChPiEMEOverCaloEME (EF-Offline)/Offline; ChPiEMEOverCaloEME m-prong relative diff;",40,-1,1));
@@ -327,6 +454,8 @@ void HLTTauMonTool::bookHistogramsForItem(const std::string & trigItem){
     addHistogram(new TH1F("hTrFlightPathSigRatioMP","Relative diff in TrFlightPathSig (EF-Offline)/Offline; trFlightPathSig m-prong relative diff;", 40,-1.0,1.0));
     addHistogram(new TH1F("hMassTrkSysRatioMP","Relative diff in MassTrkSys (EF-Offline)/Offline; MassTrkSys m-prong relative diff;", 40,-0.5,0.5));
     addHistogram(new TH1F("hMEflowApproxRatioMP","Relative diff in mEflowApprox (EF-Offline)/Offline; mEflowApprox m-prong rel diff;", 40,-0.5,0.5));
+  if ((trigItem == "tau25_medium1_tracktwo") || (m_doEFTProfiles)) // keep the EF TProfiles of lowest single tau or if flag is turned on for the rest of the chains
+    {
     addProfile(new TProfile("hInnerTrkAvgDistVsptMP","Relative diff in innertrkAvgDist (EF-Off)/Off vs Off Tau pT m-prong;Offline Tau pT;",nbin_pt-1,bins_pt));
     addProfile(new TProfile("hInnerTrkAvgDistVsmuMP","Rel diff in innertrkAvgDist (EF-Off)/Off vs mu m-prong;Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
     addProfile(new TProfile("hEtOverPtLeadTrkVsptMP","Relative diff in EtOverPtLeadTrk (EF-Off)/Off vs Off Tau pT m-prong;Offline Tau pT;",nbin_pt-1,bins_pt));
@@ -347,7 +476,7 @@ void HLTTauMonTool::bookHistogramsForItem(const std::string & trigItem){
     addProfile(new TProfile("hMassTrkSysVsmuMP","Relative diff in MassTrkSys (EF-Off)/Off vs mu m-prong;Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
     addProfile(new TProfile("hMEflowApproxVsptMP","Relative diff in mEflowApprox (EF-Off)/Off vs Off Tau pT m-prong;Offline Tau pT;",nbin_pt-1,bins_pt));
     addProfile(new TProfile("hMEflowApproxVsmuMP","Relative diff in mEflowApprox (EF-Off)/Off vs mu m-prong;Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
-    
+    }
     //--------------------
     //Turn On Curves
     //--------------------
@@ -357,64 +486,10 @@ void HLTTauMonTool::bookHistogramsForItem(const std::string & trigItem){
         
         if(m_truth){
             //Truth
-            addMonGroup( new MonGroup(this, "HLT/TauMon/Expert/"+trigItem+"/TurnOnCurves/TruthEfficiency",run) );
-            setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/TurnOnCurves/TruthEfficiency"); 
-	    /*            addHistogram(new TH1F("hTrueTauPtDenom",";Truth p_{T} [GeV];",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTrueTauPt1PDenom",";Truth 1 prong p_{T} [GeV];",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTrueTauPt3PDenom",";Truth 3 prong p_{T} [GeV];",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTrueTauEtaDenom",";#eta;",nbin_eta-1,bins_eta));
-            addHistogram(new TH1F("hTrueTauPhiDenom",";#phi;",16,-3.2,3.2));
-            addHistogram(new TH1F("hTrueTauNTrackDenom",";Number of tracks;",10,0,10));
-            addHistogram(new TH1F("hTrueTauNVtxDenom",";Number of primary vertices;",nbin_nvtx-1,bins_nvtx));
-            addHistogram(new TH1F("hTrueTauMuDenom",";Average interactions per bunch crossing;",nbin_mu-1,bins_mu));*/
-            //addHistogram(new TH2F("hTrueTauEtaVsPhiDenom",";#eta; #phi;",nbin_eta-1,bins_eta,16,-3.2,3.2));
-            
-	    /*
-            addHistogram(new TH1F("hTrueL1PtNum","L1 vs Truth;Truth p_{T} [GeV];",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTrueL1Pt1PNum","L1 vs Truth;Truth 1 prong p_{T} [GeV];",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTrueL1Pt3PNum","L1 vs Truth;Truth 1 prong p_{T} [GeV];",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTrueL1EtaNum","L1 vs Truth; #eta;",nbin_eta-1,bins_eta));
-            addHistogram(new TH1F("hTrueL1PhiNum","L1 vs Truth;#phi;",16,-3.2,3.2));
-            addHistogram(new TH1F("hTrueL1NTrackNum","L1 vs Truth;Number of tracks;",10,0,10));
-            addHistogram(new TH1F("hTrueL1NVtxNum","L1 vs Truth;Number of primary vertices;",nbin_nvtx-1,bins_nvtx));
-            addHistogram(new TH1F("hTrueL1MuNum","L1 vs Truth;Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
-	    */
-            //addHistogram(new TH2F("hTrueL1EtaVsPhiNum","L1 vs Truth;#eta;#phi;",nbin_eta-1,bins_eta,16,-3.2,3.2));
-            
-	    /*
-            addHistogram(new TH1F("hTrueHLTPtNum","HLT vs Truth;Truth p_{T} [GeV];",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTrueHLTPt1PNum","HLT vs Truth;Truth 1 prong p_{T} [GeV];",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTrueHLTPt3PNum","HLT vs Truth;Truth 1 prong p_{T} [GeV];",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTrueHLTEtaNum","HLT vs Truth; #eta;",nbin_eta-1,bins_eta));
-            addHistogram(new TH1F("hTrueHLTPhiNum","HLT vs Truth;#phi;",16,-3.2,3.2));
-            addHistogram(new TH1F("hTrueHLTNTrackNum","HLT vs Truth;Number of tracks;",10,0,10));
-            addHistogram(new TH1F("hTrueHLTNVtxNum","HLT vs Truth;Number of primary vertices;",nbin_nvtx-1,bins_nvtx));
-            addHistogram(new TH1F("hTrueHLTMuNum","HLT vs Truth;Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
-	    */
-            //addHistogram(new TH2F("hTrueHLTEtaVsPhiNum","HLT vs Truth;#eta;#phi;",nbin_eta-1,bins_eta,16,-3.2,3.2));
-            
-	    /*            addHistogram(new TH1F("hTrueL1PtEfficiency","L1 vs Truth Efficiency; Truth p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTrueL1Pt1PEfficiency","L1 vs Truth Efficiency; Truth 1 prong p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTrueL1Pt3PEfficiency","L1 vs Truth Efficiency; Truth 3 prong p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTrueL1EtaEfficiency","L1 vs Truth Efficiency; Truth #eta; Efficiency",nbin_eta-1,bins_eta));
-            addHistogram(new TH1F("hTrueL1PhiEfficiency","L1 vs Truth Efficiency; Truth #phi; Efficiency",16,-3.2,3.2));
-            addHistogram(new TH1F("hTrueL1NTrackEfficiency","L1 vs Truth Efficiency; Number of tracks; Efficiency",10,0,10));
-            addHistogram(new TH1F("hTrueL1NVtxEfficiency","L1 vs Truth Efficiency; Number of primary vertices; Efficiency",nbin_nvtx-1,bins_nvtx));
-            addHistogram(new TH1F("hTrueL1MuEfficiency","L1 vs Truth Efficiency; Average interactions per bunch crossing; Efficiency",nbin_mu-1,bins_mu));
-	    */
-            //addHistogram(new TH2F("hTrueL1EtaVsPhiEfficiency","L1 vs Truth in Eta-Phi; #eta; #phi",nbin_eta-1,bins_eta,16,-3.2,3.2));
-            /*
-            addHistogram(new TH1F("hTrueHLTPtEfficiency","HLT vs Truth Efficiency; Truth p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTrueHLTPt1PEfficiency","HLT vs Truth Efficiency; Truth 1 prong p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTrueHLTPt3PEfficiency","HLT vs Truth Efficiency; Truth 3 prong p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTrueHLTEtaEfficiency","HLT vs Truth Efficiency; Truth #eta; Efficiency",nbin_eta-1,bins_eta));
-            addHistogram(new TH1F("hTrueHLTPhiEfficiency","HLT vs Truth Efficiency; Truth #phi; Efficiency",16,-3.2,3.2));
-            addHistogram(new TH1F("hTrueHLTNTrackEfficiency","HLT vs Truth Efficiency; Number of tracks; Efficiency",10,0,10));
-            addHistogram(new TH1F("hTrueHLTNVtxEfficiency","HLT vs Truth Efficiency; Number of primary vertices; Efficiency",nbin_nvtx-1,bins_nvtx));
-            addHistogram(new TH1F("hTrueHLTMuEfficiency","HLT vs Truth Efficiency; Average interactions per bunch crossing; Efficiency",nbin_mu-1,bins_mu));
-	    */
-            //addHistogram(new TH2F("hTrueHLTEtaVsPhiEfficiency","HLT vs truth in Eta-Phi; #eta; #phi",nbin_eta-1,bins_eta,16,-3.2,3.2));
-            
+            addMonGroup( new MonGroup(this, "HLT/TauMon/Expert/"+trigItemShort+"/TurnOnCurves/TruthEfficiency",run) );
+            setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/TurnOnCurves/TruthEfficiency"); 
+     
+ 
             addProfile(new TProfile("TProfTrueL1PtEfficiency","L1 vs Truth Efficiency; Truth p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
             addProfile(new TProfile("TProfTrueL1Pt1PEfficiency","L1 vs Truth Efficiency; Truth 1 prong p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
             addProfile(new TProfile("TProfTrueL1Pt3PEfficiency","L1 vs Truth Efficiency; Truth 3 prong p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
@@ -435,64 +510,9 @@ void HLTTauMonTool::bookHistogramsForItem(const std::string & trigItem){
             
             
             //Truth+Reco
-            addMonGroup( new MonGroup(this, "HLT/TauMon/Expert/"+trigItem+"/TurnOnCurves/Truth+RecoEfficiency",run) );
-            setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/TurnOnCurves/Truth+RecoEfficiency");            
-	    /*            addHistogram(new TH1F("hTruthRecoTauPtDenom","Truth p_{T} [GeV];",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTruthRecoTauPt1PDenom",";Truth 1 prong p_{T} [GeV];",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTruthRecoTauPt3PDenom",";Truth 3 prong p_{T} [GeV];",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTruthRecoTauEtaDenom",";#eta;",nbin_eta-1,bins_eta));
-            addHistogram(new TH1F("hTruthRecoTauPhiDenom",";#phi;",16,-3.2,3.2));
-            addHistogram(new TH1F("hTruthRecoTauNTrackDenom",";Number of tracks;",10,0,10));
-            addHistogram(new TH1F("hTruthRecoTauNVtxDenom",";Number of primary vertices;",nbin_nvtx-1,bins_nvtx));
-            addHistogram(new TH1F("hTruthRecoTauMuDenom",";Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
-	    */
-            //addHistogram(new TH2F("hTruthRecoTauEtaVsPhiDenom",";#eta;#phi",nbin_eta-1,bins_eta,16,-3.2,3.2));
-            /*
-            addHistogram(new TH1F("hTruthRecoL1PtNum","L1 vs Truth+Reco; Truth p_{T} [GeV];",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTruthRecoL1Pt1PNum","L1 vs Truth+Reco; Truth 1 prong p_{T} [GeV];",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTruthRecoL1Pt3PNum","L1 vs Truth+Reco; Truth 3 prong p_{T} [GeV];",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTruthRecoL1EtaNum","L1 vs Truth+Reco; #eta;",nbin_eta-1,bins_eta));
-            addHistogram(new TH1F("hTruthRecoL1PhiNum","L1 vs Truth+Reco #phi;;",16,-3.2,3.2));
-            addHistogram(new TH1F("hTruthRecoL1NTrackNum","L1 vs Truth+Reco; Number of tracks;",10,0,10));
-            addHistogram(new TH1F("hTruthRecoL1NVtxNum","L1 vs Truth+Reco; Number of primary vertices;",nbin_nvtx-1,bins_nvtx));
-            addHistogram(new TH1F("hTruthRecoL1MuNum","L1 vs Truth+Reco;Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
-	    */
-            //addHistogram(new TH2F("hTruthRecoL1EtaVsPhiNum","L1 vs Truth+Reco;#eta;#phi",nbin_eta-1,bins_eta,16,-3.2,3.2));
-            
-	    /*            addHistogram(new TH1F("hTruthRecoHLTPtNum","HLT vs Truth+Reco; Truth p_{T} [GeV];",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTruthRecoHLTPt1PNum","HLT vs Truth+Reco; Truth 1 prong p_{T} [GeV];",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTruthRecoHLTPt3PNum","HLT vs Truth+Reco; Truth 3 prong p_{T} [GeV];",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTruthRecoHLTEtaNum","HLT vs Truth+Reco; #eta;",nbin_eta-1,bins_eta));
-            addHistogram(new TH1F("hTruthRecoHLTPhiNum","HLT vs Truth+Reco; #phi;",16,-3.2,3.2));
-            addHistogram(new TH1F("hTruthRecoHLTNTrackNum","HLT vs Truth+Reco; Number of tracks;",10,0,10));
-            addHistogram(new TH1F("hTruthRecoHLTNVtxNum","HLT vs Truth+Reco; Number of primary vertices;",nbin_nvtx-1,bins_nvtx));
-            addHistogram(new TH1F("hTruthRecoHLTMuNum","HLT vs Truth+Reco; Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
-	    */
-            //addHistogram(new TH2F("hTruthRecoHLTEtaVsPhiNum","HLT vs Truth+Reco; #eta; #phi",nbin_eta-1,bins_eta,16,-3.2,3.2));
-            
-	    /*
-            addHistogram(new TH1F("hTruthRecoL1PtEfficiency","L1 vs Truth+Reco Efficiency; Truth p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTruthRecoL1Pt1PEfficiency","L1 vs Truth+Reco Efficiency; Truth 1 prong p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTruthRecoL1Pt3PEfficiency","L1 vs Truth+Reco Efficiency; Truth 3 prong p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTruthRecoL1EtaEfficiency","L1 vs Truth+Reco Efficiency; Truth #eta; Efficiency",nbin_eta-1,bins_eta));
-            addHistogram(new TH1F("hTruthRecoL1PhiEfficiency","L1 vs Truth+Reco Efficiency; Truth #phi; Efficiency",16,-3.2,3.2));
-            addHistogram(new TH1F("hTruthRecoL1NTrackEfficiency","L1 vs Truth+Reco Efficiency; Number of tracks; Efficiency",10,0,10));
-            addHistogram(new TH1F("hTruthRecoL1NVtxEfficiency","L1 vs Truth+Reco Efficiency; Number of primary vertices; Efficiency",nbin_nvtx-1,bins_nvtx));
-            addHistogram(new TH1F("hTruthRecoL1MuEfficiency","L1 vs Truth+Reco Efficiency; Average interactions per bunch crossing; Efficiency",nbin_mu-1,bins_mu));
-	    */
-            //addHistogram(new TH2F("hTruthRecoL1EtaVsPhiEfficiency","L1 vs Truth+Reco in Eta-Phi; #eta; #phi",nbin_eta-1,bins_eta,16,-3.2,3.2));
-            
-            /*addHistogram(new TH1F("hTruthRecoHLTPtEfficiency","HLT vs Truth+Reco Efficiency; Truth p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTruthRecoHLTPt1PEfficiency","HLT vs Truth+Reco Efficiency; Truth 1 prong p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTruthRecoHLTPt3PEfficiency","HLT vs Truth+Reco Efficiency; Truth 3 prong p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-            addHistogram(new TH1F("hTruthRecoHLTEtaEfficiency","HLT vs Truth+Reco Efficiency; Truth #eta; Efficiency",nbin_eta-1,bins_eta));
-            addHistogram(new TH1F("hTruthRecoHLTPhiEfficiency","HLT vs Truth+Reco Efficiency; Truth #phi; Efficiency",16,-3.2,3.2));
-            addHistogram(new TH1F("hTruthRecoHLTNTrackEfficiency","HLT vs Truth+Reco Efficiency; Number of tracks; Efficiency",10,0,10));
-            addHistogram(new TH1F("hTruthRecoHLTNVtxEfficiency","HLT vs Truth+Reco Efficiency; Number of primary vertices; Efficiency",nbin_nvtx-1,bins_nvtx));
-            addHistogram(new TH1F("hTruthRecoHLTMuEfficiency","HLT vs Truth+Reco Efficiency; Average interactions per bunch crossing; Efficiency",nbin_mu-1,bins_mu));
-	    */
-            //addHistogram(new TH2F("hTruthRecoHLTEtaVsPhiEfficiency","HLT vs Truth+Reco in  Eta-Phi; #eta; #phi",nbin_eta-1,bins_eta,16,-3.2,3.2));
-            
+            addMonGroup( new MonGroup(this, "HLT/TauMon/Expert/"+trigItemShort+"/TurnOnCurves/Truth+RecoEfficiency",run) );
+            setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/TurnOnCurves/Truth+RecoEfficiency");            
+
             addProfile(new TProfile("TProfTruthRecoL1PtEfficiency","L1 vs Truth+Reco Efficiency; Truth p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
             addProfile(new TProfile("TProfTruthRecoL1Pt1PEfficiency","L1 vs Truth+Reco Efficiency; Truth 1 prong p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
             addProfile(new TProfile("TProfTruthRecoL1Pt3PEfficiency","L1 vs Truth+Reco Efficiency; Truth 3 prong p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
@@ -511,136 +531,13 @@ void HLTTauMonTool::bookHistogramsForItem(const std::string & trigItem){
             addProfile(new TProfile("TProfTruthRecoHLTNVtxEfficiency","HLT vs Truth+Reco Efficiency; Number of primary vertices; Efficiency",nbin_nvtx-1,bins_nvtx));
             addProfile(new TProfile("TProfTruthRecoHLTMuEfficiency","HLT vs Truth+Reco Efficiency; Average interactions per bunch crossing; Efficiency",nbin_mu-1,bins_mu));
             
-//            //--------------------
-//            //Efficiency Histograms for Combined Triggers
-//            //--------------------
-//            
-//            addMonGroup( new MonGroup(this, "HLT/TauMon/Expert/"+trigItem+"/TurnOnCurves/TauComboEfficiency",run) );
-//            setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/TurnOnCurves/TauComboEfficiency");
-//            addHistogram(new TH1F("hCombTauPtDenom",";True Tau p_{T} [GeV];",nbin_pt-1,bins_pt));
-//            addHistogram(new TH1F("hCombL1TauPtNum",";True Tau p_{T} [GeV];",nbin_pt-1,bins_pt));
-//            addHistogram(new TH1F("hCombHLTTauPtNum",";True Tau p_{T} [GeV];",nbin_pt-1,bins_pt));
-//            addHistogram(new TH1F("hCombL1TauPtEfficiency","L1 vs tau+tau Efficiency; True Tau p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-//            addHistogram(new TH1F("hCombHLTTauPtEfficiency","HLT vs tau+tau Efficiency; True Tau p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-//            
-//            addHistogram(new TH1F("hCombelPtDenom",";True el p_{T} [GeV];",nbin_leppt-1,bins_leppt));
-//            addHistogram(new TH1F("hCombL1elPtNum",";True el p_{T} [GeV];",nbin_leppt-1,bins_leppt));
-//            addHistogram(new TH1F("hCombHLTelPtNum",";True el p_{T} [GeV];",nbin_leppt-1,bins_leppt));
-//            addHistogram(new TH1F("hCombL1elPtEfficiency","L1 vs tau+el Efficiency; True el p_{T} [GeV]; Efficiency",nbin_leppt-1,bins_leppt));
-//            addHistogram(new TH1F("hCombHLTelPtEfficiency","HLT vs tau+el Efficiency; True el p_{T} [GeV]; Efficiency",nbin_leppt-1,bins_leppt));
-//            
-//            addHistogram(new TH1F("hCombmuPtDenom",";True mu p_{T} [GeV];",nbin_leppt-1,bins_leppt));
-//            addHistogram(new TH1F("hCombL1muPtNum",";True mu p_{T} [GeV];",nbin_leppt-1,bins_leppt));
-//            addHistogram(new TH1F("hCombHLTmuPtNum",";True mu p_{T} [GeV];",nbin_leppt-1,bins_leppt));
-//            addHistogram(new TH1F("hCombL1muPtEfficiency","L1 vs tau+mu Efficiency; True mu p_{T} [GeV]; Efficiency",nbin_leppt-1,bins_leppt));
-//            addHistogram(new TH1F("hCombHLTmuPtEfficiency","HLT vs tau+mu Efficiency; True mu p_{T} [GeV]; Efficiency",nbin_leppt-1,bins_leppt));
-//            
-//            addHistogram(new TH1F("hCombOffjetPtDenom",";Offline jet mu p_{T} [GeV];",nbin_pt-1,bins_pt));
-//            addHistogram(new TH1F("hCombL1OffjetPtNum",";Offline jet mu p_{T} [GeV];",nbin_pt-1,bins_pt));
-//            addHistogram(new TH1F("hCombHLTOffjetPtNum",";Offline jet mu p_{T} [GeV];",nbin_pt-1,bins_pt));
-//            addHistogram(new TH1F("hCombL1OffjetPtEfficiency","L1 vs tau+OffJet Efficiency; Offline jet p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-//            addHistogram(new TH1F("hCombHLTOffjetPtEfficiency","HLT vs tau+OffJet Efficiency; Offline jet p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-//            
-//            addHistogram(new TH1F("hCombMETDenom",";MET;",nbin_met-1,bins_met));
-//            addHistogram(new TH1F("hCombL1METNum",";MET;",nbin_met-1,bins_met));
-//            addHistogram(new TH1F("hCombHLTMETNum",";MET;",nbin_met-1,bins_met));
-//            addHistogram(new TH1F("hCombL1METEfficiency","L1 vs tau+met Efficiency; MET; Efficiency",nbin_met-1,bins_met));
-//            addHistogram(new TH1F("hCombHLTMETEfficiency","HLT vs tau+met Efficiency; MET; Efficiency",nbin_met-1,bins_met));
-//            
-//            addHistogram(new TH1F("hCombdRDenom","; dR;",nbin_dr-1,bins_dr));
-//            addHistogram(new TH1F("hCombL1dRNum","; dR;",nbin_dr-1,bins_dr));
-//            addHistogram(new TH1F("hCombHLTdRNum","; dR;",nbin_dr-1,bins_dr));
-//            addHistogram(new TH1F("hCombL1dREfficiency","L1 vs dR Efficiency; dR; Efficiency",nbin_dr-1,bins_dr));
-//            addHistogram(new TH1F("hCombHLTdREfficiency","HLT vs dR Efficiency; dR; Efficiency",nbin_dr-1,bins_dr));
-//            
-//            addHistogram(new TH1F("hCombdEtaDenom","; d#eta;",40,0,4.0));
-//            addHistogram(new TH1F("hCombL1dEtaNum","; d#eta;",40,0,4.0));
-//            addHistogram(new TH1F("hCombHLTdEtaNum","; d#eta;",40,0,4.0));
-//            addHistogram(new TH1F("hCombL1dEtaEfficiency","L1 vs dEta Efficiency; d#eta; Efficiency",40,0,4.0));
-//            addHistogram(new TH1F("hCombHLTdEtaEfficiency","HLT vs dEta Efficiency; d#eta; Efficiency",40,0,4.0));
-//            
-//            addHistogram(new TH1F("hCombdPhiDenom","; d#phi;",16,0,3.2));
-//            addHistogram(new TH1F("hCombL1dPhiNum","; d#phi;",16,0,3.2));
-//            addHistogram(new TH1F("hCombHLTdPhiNum","; d#phi;",16,0,3.2));
-//            addHistogram(new TH1F("hCombL1dPhiEfficiency","L1 vs dPhi Efficiency; d#phi; Efficiency",16,0,3.2));
-//            addHistogram(new TH1F("hCombHLTdPhiEfficiency","HLT vs dPhi Efficiency; d#phi; Efficiency",16,0,3.2));
-//            
-//            addProfile(new TProfile("TProfCombL1TauPtEfficiency", "L1 vs tau+tau Efficiency; True Tau p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-//            addProfile(new TProfile("TProfCombHLTTauPtEfficiency", "HLT vs tau+tau Efficiency; True Tau p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-//            addProfile(new TProfile("TProfCombL1elPtEfficiency","L1 vs tau+el Efficiency; True el p_{T} [GeV]; Efficiency",nbin_leppt-1,bins_leppt));
-//            addProfile(new TProfile("TProfCombHLTelPtEfficiency","HLT vs tau+el Efficiency; True el p_{T} [GeV]; Efficiency",nbin_leppt-1,bins_leppt));
-//            addProfile(new TProfile("TProfCombL1muPtEfficiency","L1 vs tau+mu Efficiency; True mu p_{T} [GeV]; Efficiency",nbin_leppt-1,bins_leppt));
-//            addProfile(new TProfile("TProfCombHLTmuPtEfficiency","HLT vs tau+mu Efficiency; True mu p_{T} [GeV]; Efficiency",nbin_leppt-1,bins_leppt));
-//            addProfile(new TProfile("TProfCombL1OffjetPtEfficiency","L1 vs tau+OffJet Efficiency; Offline jet p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-//            addProfile(new TProfile("TProfCombHLTOffjetPtEfficiency","HLT vs tau+OffJet Efficiency; Offline jet p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-//            addProfile(new TProfile("TProfCombL1METEfficiency","L1 vs tau+met Efficiency; MET; Efficiency",nbin_met-1,bins_met));
-//            addProfile(new TProfile("TProfCombHLTMETEfficiency","HLT vs tau+met Efficiency; MET; Efficiency",nbin_met-1,bins_met));
-//            addProfile(new TProfile("TProfCombL1dREfficiency","L1 vs dR Efficiency; dR; Efficiency",nbin_dr-1,bins_dr));
-//            addProfile(new TProfile("TProfCombHLTdREfficiency","HLT vs dR Efficiency; dR; Efficiency",nbin_dr-1,bins_dr));
-//            addProfile(new TProfile("TProfCombL1dEtaEfficiency","L1 vs dEta Efficiency; d#eta; Efficiency",40,0,4.0));
-//            addProfile(new TProfile("TProfCombHLTdEtaEfficiency","HLT vs dEta Efficiency; d#eta; Efficiency",40,0,4.0));
-//            addProfile(new TProfile("TProfCombL1dPhiEfficiency","L1 vs dPhi Efficiency; d#phi; Efficiency",16,0,3.2));
-//            addProfile(new TProfile("TProfCombHLTdPhiEfficiency","HLT vs dPhi Efficiency; d#phi; Efficiency",16,0,3.2));
-            
+
         }
         
         //Reco
-        addMonGroup( new MonGroup(this, "HLT/TauMon/Expert/"+trigItem+"/TurnOnCurves/RecoEfficiency",run) );
-        setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/TurnOnCurves/RecoEfficiency");        
-	/*        addHistogram(new TH1F("hRecoTauPtDenom",";Reco p_{T} [GeV];",nbin_pt-1,bins_pt));
-        addHistogram(new TH1F("hRecoTauPt1PDenom",";Reco 1 prong p_{T} [GeV];",nbin_pt-1,bins_pt));
-        addHistogram(new TH1F("hRecoTauPt3PDenom",";Reco 3 prong p_{T} [GeV];",nbin_pt-1,bins_pt));
-        addHistogram(new TH1F("hRecoTauEtaDenom","; #eta;",nbin_eta-1,bins_eta));
-        addHistogram(new TH1F("hRecoTauPhiDenom","; #phi;",16,-3.2,3.2));
-        addHistogram(new TH1F("hRecoTauNTrackDenom","; Number of tracks;",10,0,10));
-        addHistogram(new TH1F("hRecoTauNVtxDenom","; Number of primary vertices;",nbin_nvtx-1,bins_nvtx));
-        addHistogram(new TH1F("hRecoTauMuDenom","; Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
-        addHistogram(new TH2F("hRecoTauEtaVsPhiDenom","; #eta; #phi",nbin_eta-1,bins_eta,16,-3.2,3.2));
-        */
-	/*
-	  addHistogram(new TH1F("hRecoL1PtNum","L1 vs Reco; Reco p_{T} [GeV];",nbin_pt-1,bins_pt));
-        addHistogram(new TH1F("hRecoL1Pt1PNum","L1 vs Reco; Reco 1 prong p_{T} [GeV];",nbin_pt-1,bins_pt));
-        addHistogram(new TH1F("hRecoL1Pt3PNum","L1 vs Reco; Reco 3 prong p_{T} [GeV];",nbin_pt-1,bins_pt));
-        addHistogram(new TH1F("hRecoL1EtaNum","L1 vs Reco; #eta;",nbin_eta-1,bins_eta));
-        addHistogram(new TH1F("hRecoL1PhiNum","L1 vs Reco; #phi;",16,-3.2,3.2));
-        addHistogram(new TH1F("hRecoL1NTrackNum","L1 vs Reco Number of tracks;",10,0,10));
-        addHistogram(new TH1F("hRecoL1NVtxNum","L1 vs Reco; Number of primary vertices;",nbin_nvtx-1,bins_nvtx));
-        addHistogram(new TH1F("hRecoL1MuNum","L1 vs Reco; Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
-        addHistogram(new TH2F("hRecoL1EtaVsPhiNum","L1 vs Reco; #eta; #phi",nbin_eta-1,bins_eta,16,-3.2,3.2));
-	*/
-        /*
-        addHistogram(new TH1F("hRecoHLTPtNum","HLT vs Reco; Reco p_{T} [GeV];",nbin_pt-1,bins_pt));
-        addHistogram(new TH1F("hRecoHLTPt1PNum","HLT vs Reco; Reco 1 prong p_{T} [GeV];",nbin_pt-1,bins_pt));
-        addHistogram(new TH1F("hRecoHLTPt3PNum","HLT vs Reco; Reco 3 prong p_{T} [GeV];",nbin_pt-1,bins_pt));
-        addHistogram(new TH1F("hRecoHLTEtaNum","HLT vs Reco; #eta;",nbin_eta-1,bins_eta));
-        addHistogram(new TH1F("hRecoHLTPhiNum","HLT vs Reco; #phi;",16,-3.2,3.2));
-        addHistogram(new TH1F("hRecoHLTNTrackNum","HLT vs Reco; Number of tracks;",10,0,10));
-        addHistogram(new TH1F("hRecoHLTNVtxNum","HLT vs Reco; Number of primary vertices;",nbin_nvtx-1,bins_nvtx));
-        addHistogram(new TH1F("hRecoHLTMuNum","HLT vs Reco; Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
-        addHistogram(new TH2F("hRecoHLTEtaVsPhiNum","HLT vs Reco; #eta; #phi",nbin_eta-1,bins_eta,16,-3.2,3.2));
-        */
-	/*
-        addHistogram(new TH1F("hRecoL1PtEfficiency","L1 vs Reco Efficiency; Reco p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-        addHistogram(new TH1F("hRecoL1Pt1PEfficiency","L1 vs Reco Efficiency; Reco 1 prong p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-        addHistogram(new TH1F("hRecoL1Pt3PEfficiency","L1 vs Reco Efficiency; Reco 3 prong p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-        addHistogram(new TH1F("hRecoL1EtaEfficiency","L1 vs Reco Efficiency; Reco #eta; Efficiency",nbin_eta-1,bins_eta));
-        addHistogram(new TH1F("hRecoL1PhiEfficiency","L1 vs Reco Efficiency; Reco #phi; Efficiency",16,-3.2,3.2));
-        addHistogram(new TH1F("hRecoL1NTrackEfficiency","L1 vs Reco Efficiency; Number of tracks; Efficiency",10,0,10));
-        addHistogram(new TH1F("hRecoL1NVtxEfficiency","L1 vs Reco Efficiency; Number of primary vertices; Efficiency",nbin_nvtx-1,bins_nvtx));
-        addHistogram(new TH1F("hRecoL1MuEfficiency","L1 vs Reco Efficiency; Average interactions per bunch crossing; Efficiency",nbin_mu-1,bins_mu));
-        addHistogram(new TH2F("hRecoL1EtaVsPhiEfficiency","L1 vs Reco in Eta-Phi; #eta; #phi",nbin_eta-1,bins_eta,16,-3.2,3.2));
-	*/
-        /*
-        addHistogram(new TH1F("hRecoHLTPtEfficiency","HLT vs Reco Efficiency; Reco p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-        addHistogram(new TH1F("hRecoHLTPt1PEfficiency","HLT vs Reco Efficiency; Reco 1 prong p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-        addHistogram(new TH1F("hRecoHLTPt3PEfficiency","HLT vs Reco Efficiency; Reco 3 prong p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-        addHistogram(new TH1F("hRecoHLTEtaEfficiency","HLT vs Reco Efficiency; Reco #eta; Efficiency",nbin_eta-1,bins_eta));
-        addHistogram(new TH1F("hRecoHLTPhiEfficiency","HLT vs Reco Efficiency; Reco #phi; Efficiency",16,-3.2,3.2));
-        addHistogram(new TH1F("hRecoHLTNTrackEfficiency","HLT vs Reco Efficiency; Number of tracks; Efficiency",10,0,10));
-        addHistogram(new TH1F("hRecoHLTNVtxEfficiency","HLT vs Reco Efficiency; Number of primary vertices; Efficiency",nbin_nvtx-1,bins_nvtx));
-        addHistogram(new TH1F("hRecoHLTMuEfficiency","HLT vs Reco Efficiency; Average interactions per bunch crossing; Efficiency",nbin_mu-1,bins_mu));
-        addHistogram(new TH2F("hRecoHLTEtaVsPhiEfficiency","HLT vs Reco in  Eta-Phi; #eta; #phi",nbin_eta-1,bins_eta,16,-3.2,3.2));
-       */
+        addMonGroup( new MonGroup(this, "HLT/TauMon/Expert/"+trigItemShort+"/TurnOnCurves/RecoEfficiency",run) );
+        setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/TurnOnCurves/RecoEfficiency");        
+
         addProfile(new TProfile("TProfRecoL1PtEfficiency", "L1 Vs Reco Efficiency; Reco p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
         addProfile(new TProfile("TProfRecoL1Pt1PEfficiency", "L1 Vs Reco Efficiency; Reco 1 prong p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
         addProfile(new TProfile("TProfRecoL1Pt3PEfficiency", "L1 Vs Reco Efficiency; Reco 3 prong p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
@@ -651,16 +548,16 @@ void HLTTauMonTool::bookHistogramsForItem(const std::string & trigItem){
         addProfile(new TProfile("TProfRecoL1MuEfficiency", "L1 Vs Reco Efficiency; Average interactions per bunch crossing; Efficiency",nbin_mu-1,bins_mu));
         
 
-
-	double hbins_pt[nbin_pt] = {20.,30.,50.,70.,100.,150.,200., 250., 300., 350.,  400., 500., 600.};
+        double hbins_pt[nbin_pt] = {20.,30.,50.,70.,100.,150.,200., 250., 300., 350.,  400., 500., 600.};
         addProfile(new TProfile("TProfRecoL1HighPtEfficiency", "L1 Vs Reco Efficiency; Reco p_{T} [GeV]; Efficiency",nbin_pt-1,hbins_pt));
         addProfile(new TProfile("TProfRecoL1HighPt1PEfficiency", "L1 Vs Reco Efficiency; Reco 1 prong p_{T} [GeV]; Efficiency",nbin_pt-1,hbins_pt));
         addProfile(new TProfile("TProfRecoL1HighPt3PEfficiency", "L1 Vs Reco Efficiency; Reco 3 prong p_{T} [GeV]; Efficiency",nbin_pt-1,hbins_pt));
 
+
         addProfile(new TProfile("TProfRecoHLTPtEfficiency", "HLT Vs Reco Efficiency; Reco p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-	addProfile(new TProfile("TProfRecoHLTHighPtEfficiency", "HLT Vs Reco Efficiency; Reco p_{T} [GeV]; Efficiency",nbin_pt-1,hbins_pt));
-	addProfile(new TProfile("TProfRecoHLTHighPt1pEfficiency", "HLT Vs Reco Efficiency; Reco p_{T} [GeV]; Efficiency",nbin_pt-1,hbins_pt));
-	addProfile(new TProfile("TProfRecoHLTHighPt3pEfficiency", "HLT Vs Reco Efficiency; Reco p_{T} [GeV]; Efficiency",nbin_pt-1,hbins_pt));
+        addProfile(new TProfile("TProfRecoHLTHighPtEfficiency", "HLT Vs Reco Efficiency; Reco p_{T} [GeV]; Efficiency",nbin_pt-1,hbins_pt));
+        addProfile(new TProfile("TProfRecoHLTHighPt1pEfficiency", "HLT Vs Reco Efficiency; Reco p_{T} [GeV]; Efficiency",nbin_pt-1,hbins_pt));
+        addProfile(new TProfile("TProfRecoHLTHighPt3pEfficiency", "HLT Vs Reco Efficiency; Reco p_{T} [GeV]; Efficiency",nbin_pt-1,hbins_pt));
         addProfile(new TProfile("TProfRecoHLTPt1PEfficiency", "HLT Vs Reco Efficiency; Reco 1 prong p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
         addProfile(new TProfile("TProfRecoHLTPt3PEfficiency", "HLT Vs Reco Efficiency; Reco 3 prong p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
         addProfile(new TProfile("TProfRecoHLTEtaEfficiency", "HLT Vs Reco Efficiency; Reco #eta; Efficiency",nbin_eta-1,bins_eta));
@@ -668,65 +565,71 @@ void HLTTauMonTool::bookHistogramsForItem(const std::string & trigItem){
         addProfile(new TProfile("TProfRecoHLTNTrackEfficiency", "HLT Vs Reco Efficiency; Number of tracks; Efficiency",10,0,10));
         addProfile(new TProfile("TProfRecoHLTNVtxEfficiency", "HLT Vs Reco Efficiency; Number of primary vertices; Efficiency",nbin_nvtx-1,bins_nvtx));
         addProfile(new TProfile("TProfRecoHLTMuEfficiency", "HLT Vs Reco Efficiency; Average interactions per bunch crossing; Efficiency",nbin_mu-1,bins_mu));
-        
-        
+
     }
 
-	if(m_doTrackCurves)
-      {		
-	addMonGroup( new MonGroup(this, "HLT/TauMon/Expert/"+trigItem+"/trackCurves", run));
-	setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/trackCurves"); 
-	addHistogram(new TH2I("hreco_vs_pres_coreTracks","Reco vs preselection tau multiplicity;Number of core tracks of reco tau; Number of core tracks of preselection tau",10,0,10,10,0,10));
-    	addHistogram(new TH2I("hreco_vs_pres_isoTracks","Reco vs preselection tau multiplicity;Number of isolation tracks of reco tau; Number of isolation tracks of preselection tau",10,0,10,10,0,10));
-	addHistogram(new TH1F("hpstau_trk_pt","Preselection tau matched to reco+truth; track p_{T} [GeV]; Nevents",20,0.,100.));
-    	addHistogram(new TH1F("hpstau_trk_eta","Preselection tau matched to reco+truth; track #eta; Nevents",26,-2.6,2.6));
-   	addHistogram(new TH1F("hpstau_trk_phi","Preselection tau matched to reco+truth; track #phi; Nevents",32,-3.2,3.2));
-   	addHistogram(new TH1F("hpstau_trk_d0","Preselection tau matched to reco+truth; track d0[mm]",20,-5.,5.));
-   	addHistogram(new TH1F("hpstau_trk_z0","Preselection tau matched to reco+truth; track z0[mm]",15,-200.,200.));
-   	addHistogram(new TH2F("hpstau_trk_etaphi","Preselection tau matched to reco+truth; #eta ; #phi",26,-2.6,2.6,32,-3.2,3.2));
-	
-	addHistogram(new TH1F("hpstau_trkres_pt","Preselection track Resolution wrt reco;track pt resolution;Nevents",40,-0.4,0.4));
+        if(m_doTrackCurves)
+      {         
+        addMonGroup( new MonGroup(this, "HLT/TauMon/Expert/"+trigItemShort+"/trackCurves", run));
+        setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/trackCurves"); 
+        addHistogram(new TH2I("hreco_vs_pres_coreTracks","Reco vs preselection tau multiplicity;Number of core tracks of reco tau; Number of core tracks of preselection tau",10,0,10,10,0,10));
+        addHistogram(new TH2I("hreco_vs_pres_isoTracks","Reco vs preselection tau multiplicity;Number of isolation tracks of reco tau; Number of isolation tracks of preselection tau",10,0,10,10,0,10));
+        addHistogram(new TH1F("hpstau_trk_pt","Preselection tau matched to reco+truth; track p_{T} [GeV]; Nevents",20,0.,100.));
+        addHistogram(new TH1F("hpstau_trk_eta","Preselection tau matched to reco+truth; track #eta; Nevents",26,-2.6,2.6));
+        addHistogram(new TH1F("hpstau_trk_phi","Preselection tau matched to reco+truth; track #phi; Nevents",32,-3.2,3.2));
+        addHistogram(new TH1F("hpstau_trk_d0","Preselection tau matched to reco+truth; track d0[mm]",20,-5.,5.));
+        addHistogram(new TH1F("hpstau_trk_z0","Preselection tau matched to reco+truth; track z0[mm]",15,-200.,200.));
+        addHistogram(new TH2F("hpstau_trk_etaphi","Preselection tau matched to reco+truth; #eta ; #phi",26,-2.6,2.6,32,-3.2,3.2));
+        
+        addHistogram(new TH1F("hpstau_trkres_pt","Preselection track Resolution wrt reco;track pt resolution;Nevents",40,-0.4,0.4));
         addHistogram(new TH1F("hpstau_trkres_eta","Preselection track Resolution wrt reco;track #eta resolution;Nevents",40,-0.4,0.4));
         addHistogram(new TH1F("hpstau_trkres_phi","Preselection track Resolution wrt reco;track #phi resolution;Nevents",40,-0.4,0.4));
         addHistogram(new TH1F("hpstau_trkres_d0","Preselection track Resolution wrt reco;track d0 resolution;Nevents",40,-0.4,0.4));
         addHistogram(new TH1F("hpstau_trkres_z0","Preselection track Resolution wrt reco;track z0 resolution;Nevents",40,-0.4,0.4));  
 
-	addHistogram(new TH2F("hpstautrk_vs_recotrk_pt","Preselection Vs Reco tracks; Preselection track p_{T} [GeV]; Reco track p_{T}",20,0.,100.,20,0.,100.));
-    	addHistogram(new TH2F("hpstautrk_vs_recotrk_eta","Preselection Vs Reco tracks; Preselection track  #eta; Reco track #eta",26,-2.6,2.6,26,-2.6,2.6));
-   	addHistogram(new TH2F("hpstautrk_vs_recotrk_phi","Preselection Vs Reco tracks; Preselection track  #phi; Reco track #phi",32,-3.2,3.2,26,-2.6,2.6));
-   	addHistogram(new TH2F("hpstautrk_vs_recotrk_d0","Preselection Vs Reco tracks; Preselection track d0[mm]; Reco track",20,-5.,5.,20,-5.,5.));
-   	addHistogram(new TH2F("hpstautrk_vs_recotrk_z0","Preselection Vs Reco tracks; Preselection track z0[mm]; Reco track",15,-200.,200.,15,-200.,200.));
-
-   	addProfile(new TProfile("TProfPresVsRecoPtEfficiency","Preselection Vs Reco Track Efficiency; Reco track p_{T} [GeV]; Efficiency",20,0.,100.));
-	addProfile(new TProfile("TProfPresVsRecoEtaEfficiency","Preselection Vs Reco Track Efficiency; Reco track #eta; Efficiency",26,-2.6,2.6));
-	addProfile(new TProfile("TProfPresVsRecoPhiEfficiency","Preselection Vs Reco Track Efficiency; Reco track #phi; Efficiency",32,-3.2,3.2));
-	addProfile(new TProfile("TProfPresVsRecod0Efficiency","Preselection Vs Reco Track Efficiency; Reco track d0[mm]; Efficiency",20,-5.,5.));
-	addProfile(new TProfile("TProfPresVsRecoz0Efficiency","Preselection Vs Reco Track Efficiency; Reco track z0[mm]; Efficiency",15,-200.,200.));
+        addHistogram(new TH2F("hpstautrk_vs_recotrk_pt","Preselection Vs Reco tracks; Preselection track p_{T} [GeV]; Reco track p_{T}",20,0.,100.,20,0.,100.));
+        addHistogram(new TH2F("hpstautrk_vs_recotrk_eta","Preselection Vs Reco tracks; Preselection track  #eta; Reco track #eta",26,-2.6,2.6,26,-2.6,2.6));
+        addHistogram(new TH2F("hpstautrk_vs_recotrk_phi","Preselection Vs Reco tracks; Preselection track  #phi; Reco track #phi",32,-3.2,3.2,26,-2.6,2.6));
+        addHistogram(new TH2F("hpstautrk_vs_recotrk_d0","Preselection Vs Reco tracks; Preselection track d0[mm]; Reco track",20,-5.,5.,20,-5.,5.));
+        addHistogram(new TH2F("hpstautrk_vs_recotrk_z0","Preselection Vs Reco tracks; Preselection track z0[mm]; Reco track",15,-200.,200.,15,-200.,200.));
+
+        addProfile(new TProfile("TProfPresVsRecoPtEfficiency","Preselection Vs Reco Track Efficiency; Reco track p_{T} [GeV]; Efficiency",20,0.,100.));
+        addProfile(new TProfile("TProfPresVsRecoEtaEfficiency","Preselection Vs Reco Track Efficiency; Reco track #eta; Efficiency",26,-2.6,2.6));
+        addProfile(new TProfile("TProfPresVsRecoPhiEfficiency","Preselection Vs Reco Track Efficiency; Reco track #phi; Efficiency",32,-3.2,3.2));
+        addProfile(new TProfile("TProfPresVsRecod0Efficiency","Preselection Vs Reco Track Efficiency; Reco track d0[mm]; Efficiency",20,-5.,5.));
+        addProfile(new TProfile("TProfPresVsRecoz0Efficiency","Preselection Vs Reco Track Efficiency; Reco track z0[mm]; Efficiency",15,-200.,200.));
       }
 
-	
+        
     
-}
 
+}
 void HLTTauMonTool::bookHistogramsAllItem(){
     
     if(m_RealZtautauEff)
     {
         const int nbin_pt = 11;
-	double bins_pt[nbin_pt] = {20.,25.,30.,35.,40.,45.,50.,60.,70.,100.,150.};
+        double bins_pt[nbin_pt] = {20.,25.,30.,35.,40.,45.,50.,60.,70.,100.,150.};
         
-	for(unsigned int i=0;i<m_trigItemsZtt.size();++i)
-	  {
-            addMonGroup( new MonGroup(this, "HLT/TauMon/Expert/RealZtautauEff/"+m_trigItemsZtt[i],run) );
-            setCurrentMonGroup("HLT/TauMon/Expert/RealZtautauEff/"+m_trigItemsZtt[i]);
+        for(unsigned int i=0;i<m_trigItemsZtt.size();++i)
+          {
+            std::string trigItemShort;
+            if(m_trigItemsZtt[i].find("tau25")!=string::npos){
+              size_t posit=m_trigItemsZtt[i].rfind("_");
+              trigItemShort=m_trigItemsZtt[i].substr(0,posit);
+            }
+            addMonGroup( new MonGroup(this, "HLT/TauMon/Expert/RealZtautauEff/"+trigItemShort,run) );
+            setCurrentMonGroup("HLT/TauMon/Expert/RealZtautauEff/"+trigItemShort);
             //addHistogram(new TH1F("hRealZttPtDenom","Offline Real Tau;Offline Tau p_{T} [GeV];",nbin_pt-1,bins_pt));
             //addHistogram(new TH1F("hRealZttL1PtNum","L1 vs Offline Real Tau; Offline Tau p_{T} [GeV];",nbin_pt-1,bins_pt));
             //addHistogram(new TH1F("hRealZttHLTPtNum","HLT vs Offline Real Tau; Offline Tau p_{T} [GeV];",nbin_pt-1,bins_pt));
             //addHistogram(new TH1F("hRealZttL1PtEfficiency","L1 vs Offline Real Tau Efficiency; Offline Tau p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
             //addHistogram(new TH1F("hRealZttHLTPtEfficiency","HLT vs Offline Real Tau Efficiency; Offline Tau p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-	    addProfile(new TProfile("TProfRealZttL1PtEfficiency", "L1 Vs Offline Real Tau Efficiency; Offline Tau p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
+            addProfile(new TProfile("TProfRealZttL1PtEfficiency", "L1 Vs Offline Real Tau Efficiency; Offline Tau p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
             addProfile(new TProfile("TProfRealZttHLTPtEfficiency", "HLT Vs Offline Real Tau Efficiency; Offline Tau p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-	  }
+
+
+          }
     }
     
     addMonGroup(new MonGroup(this,"HLT/TauMon/Expert",run));
@@ -744,7 +647,8 @@ void HLTTauMonTool::bookHistogramsAllItem(){
         hist("hHLTCountsDebug")->GetXaxis()->SetBinLabel(i+1,m_trigItems.at(i).c_str());
     }
     
-    /*if(m_doTestTracking){
+    /*
+if(m_doTestTracking){
         addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/FTF_track_comparison",run));
         setCurrentMonGroup("HLT/TauMon/Expert/FTF_track_comparison");
         addHistogram(new TH1F("hFTFnTrack_1step","FTF number of tracks;number of tracks;Nevents",10,0,10));
@@ -753,6 +657,7 @@ void HLTTauMonTool::bookHistogramsAllItem(){
         addHistogram(new TH1F("hFTFnWideTrack_2steps","FTF number of tracks;number of tracks;Nevents",10,0,10));
     }*/
 
+
     if(m_dijetFakeTausEff)
       {
         const int nbin_pt = 8;
@@ -761,28 +666,36 @@ void HLTTauMonTool::bookHistogramsAllItem(){
         const int nbin_eta = 9;
         double bins_eta[nbin_eta] = {-2.47,-1.52,-1.37,-0.69,0.,0.69,1.37,1.52,2.47};
 
-        const int nbin_mu = 34;
-        float bins_mu[nbin_mu] = {0.,2.,4.,6.,8.,10.,12.,14.,16.,18.,20.,22.,24.,26.,28.,30.,32.,34.,36.,38.,40., 42., 44., 44., 46., 48., 50., 52., 54., 56., 58., 60., 62., 72};
-	for(unsigned int i=0;i<m_trigItemsHighPt.size();++i)
+      //const int nbin_mu = 34;
+      //float bins_mu[nbin_mu] = {0.,2.,4.,6.,8.,10.,12.,14.,16.,18.,20.,22.,24.,26.,28.,30.,32.,34.,36.,38.,40., 42., 44., 44., 46., 48., 50., 52., 54., 56., 58., 60., 62., 72};
+      const int nbin_mu = 51;
+      float bins_mu[nbin_mu] = {0.,2.,4.,6.,8.,10.,12.,14.,16.,18.,20.,22.,24.,26.,28.,30.,32.,34.,36.,38.,40.,42.,44.,\
+                                46.,48.,50.,52.,54.,56.,58.,60.,62.,64.,66.,68.,70.,72.,74.,76.,78., 80.,82.,84.,86.,88.,90.,92.,94.,96.,98.,100.};
+
+        for(unsigned int i=0;i<m_trigItemsHighPt.size();++i)
           {
           addMonGroup( new MonGroup(this, "HLT/TauMon/Expert/dijetFakeTausEff/"+m_trigItemsHighPt[i],run) );
-	  setCurrentMonGroup("HLT/TauMon/Expert/dijetFakeTausEff/"+m_trigItemsHighPt[i]);
+          setCurrentMonGroup("HLT/TauMon/Expert/dijetFakeTausEff/"+m_trigItemsHighPt[i]);
 
           /* histograms of efficiencies vs. PT, ETA, MU, NTRACKS */
-	  addProfile(new TProfile("TProfDijetFakeTausL1PtEfficiency", "L1 Vs Offline Fake Tau Efficiency; Reco p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-	  addProfile(new TProfile("TProfDijetFakeTausL1EtaEfficiency", "L1 Vs Offline Fake Tau Efficiency; Offline Fake Tau #eta; Efficiency",nbin_eta-1,bins_eta));
-	  addProfile(new TProfile("TProfDijetFakeTausL1MuEfficiency", "L1 Vs Offline Fake Tau Efficiency; Offline Fake Tau <#mu>; Efficiency",nbin_mu-1,bins_mu));
-	  addProfile(new TProfile("TProfDijetFakeTausL1NTracksEfficiency", "L1 Vs Offline Fake Tau Efficiency; Offline Fake Tau nTracks; Efficiency",5,0,5));
-
-	  addProfile(new TProfile("TProfDijetFakeTausHLTPtEfficiency", "HLT Vs Offline Fake Tau Efficiency; Reco p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
-	  addProfile(new TProfile("TProfDijetFakeTausHLTEtaEfficiency", "HLT Vs Offline Fake Tau Efficiency; Offline Fake Tau #eta; Efficiency",nbin_eta-1,bins_eta));
-	  addProfile(new TProfile("TProfDijetFakeTausHLTMuEfficiency", "HLT Vs Offline Fake Tau Efficiency; Offline Fake Tau <#mu>; Efficiency",nbin_mu-1,bins_mu));
-	  addProfile(new TProfile("TProfDijetFakeTausHLTNTracksEfficiency", "HLT Vs Offline Fake Tau Efficiency; Offline Fake Tau nTracks; Efficiency",5,0,5));
-	  }
+          addProfile(new TProfile("TProfDijetFakeTausL1PtEfficiency", "L1 Vs Offline Fake Tau Efficiency; Reco p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
+          addProfile(new TProfile("TProfDijetFakeTausL1EtaEfficiency", "L1 Vs Offline Fake Tau Efficiency; Offline Fake Tau #eta; Efficiency",nbin_eta-1,bins_eta));
+          addProfile(new TProfile("TProfDijetFakeTausL1MuEfficiency", "L1 Vs Offline Fake Tau Efficiency; Offline Fake Tau <#mu>; Efficiency",nbin_mu-1,bins_mu));
+          addProfile(new TProfile("TProfDijetFakeTausL1NTracksEfficiency", "L1 Vs Offline Fake Tau Efficiency; Offline Fake Tau nTracks; Efficiency",5,0,5));
+
+          addProfile(new TProfile("TProfDijetFakeTausHLTPtEfficiency", "HLT Vs Offline Fake Tau Efficiency; Reco p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
+          addProfile(new TProfile("TProfDijetFakeTausHLTEtaEfficiency", "HLT Vs Offline Fake Tau Efficiency; Offline Fake Tau #eta; Efficiency",nbin_eta-1,bins_eta));
+          addProfile(new TProfile("TProfDijetFakeTausHLTMuEfficiency", "HLT Vs Offline Fake Tau Efficiency; Offline Fake Tau <#mu>; Efficiency",nbin_mu-1,bins_mu));
+          addProfile(new TProfile("TProfDijetFakeTausHLTNTracksEfficiency", "HLT Vs Offline Fake Tau Efficiency; Offline Fake Tau nTracks; Efficiency",5,0,5));
+          }
       }//end if(m_dijetFakeTausEff)
 
     std::vector<string> lowest_names;
-    lowest_names.push_back("lowest_singletau");
+  lowest_names.push_back(m_lowest_singletau_RNN);
+  lowest_names.push_back(m_lowest_singletau_BDT);
+ 
+  //lowest_names.push_back("lowest_singletau");
+  //lowest_names.push_back("lowest_singletauMVA");
     //    lowest_names.push_back("lowest_ditau");
     //    lowest_names.push_back("lowest_etau");
     //    lowest_names.push_back("lowest_mutau");
@@ -790,12 +703,14 @@ void HLTTauMonTool::bookHistogramsAllItem(){
     //    lowest_names.push_back("cosmic_chain");
     
     for(unsigned int i=0;i<lowest_names.size();++i){
-        
         addMonGroup(new MonGroup(this,"HLT/TauMon/Shifter/"+lowest_names.at(i)+"/L1RoI",run));
         //addMonGroup(new MonGroup(this,"HLT/TauMon/Shifter/"+lowest_names.at(i)+"/Emulation",run));
         addMonGroup(new MonGroup(this,"HLT/TauMon/Shifter/"+lowest_names.at(i)+"/L1VsOffline",run));
+    if ( lowest_names.at(i).find("RNN")==std::string::npos ) { // not an RNN trigge
+
         addMonGroup(new MonGroup(this,"HLT/TauMon/Shifter/"+lowest_names.at(i)+"/PreselectionTau",run));
         addMonGroup(new MonGroup(this,"HLT/TauMon/Shifter/"+lowest_names.at(i)+"/PreselectionVsOffline",run));
+    }  
         addMonGroup(new MonGroup(this,"HLT/TauMon/Shifter/"+lowest_names.at(i)+"/EFTau",run));
         //      addMonGroup(new MonGroup(this,"HLT/TauMon/Shifter/"+lowest_names.at(i)+"/EFTau/BDT/1p_nonCorrected",run));
         //      addMonGroup(new MonGroup(this,"HLT/TauMon/Shifter/"+lowest_names.at(i)+"/EFTau/BDT/mp_nonCorrected",run));
@@ -806,27 +721,30 @@ void HLTTauMonTool::bookHistogramsAllItem(){
         //      addMonGroup(new MonGroup(this,"HLT/TauMon/Shifter/"+lowest_names.at(i)+"/EFVsOffline/BDT/1p_nonCorrected",run));
         //      addMonGroup(new MonGroup(this,"HLT/TauMon/Shifter/"+lowest_names.at(i)+"/EFVsOffline/BDT/mp_nonCorrected",run));
         addMonGroup(new MonGroup(this,"HLT/TauMon/Shifter/"+lowest_names.at(i)+"/TurnOnCurves",run));
-	addMonGroup(new MonGroup(this,"HLT/TauMon/Shifter/"+lowest_names.at(i)+"/OtherPlots",run));
+  
+
+
+        addMonGroup(new MonGroup(this,"HLT/TauMon/Shifter/"+lowest_names.at(i)+"/OtherPlots",run));
         for(unsigned int j=0;j<m_topo_chains.size(); ++j){
                 addMonGroup(new MonGroup(this,"HLT/TauMon/Shifter/"+lowest_names.at(i)+"/OtherPlots/"+m_topo_chains.at(j),run));
         }
     }
  
     for(unsigned int i=0;i<m_topo_chains.size(); ++i){
-   	addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/TopoDiTau/"+m_topo_chains.at(i),run));
-    	setCurrentMonGroup("HLT/TauMon/Expert/TopoDiTau/"+m_topo_chains.at(i));
+        addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/TopoDiTau/"+m_topo_chains.at(i),run));
+        setCurrentMonGroup("HLT/TauMon/Expert/TopoDiTau/"+m_topo_chains.at(i));
         addProfile(new TProfile("TProfRecoL1_dREfficiency", "dR eff; dR(tau,tau); Efficiency",50,0.,4.));
         addHistogram(new TH1F("hHLTdR", "dR; dR(tau,tau); Events",50,0.,4.));        
     }
 
     if(m_doTopoValidation){
-	addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/TopoValidation",run));
+        addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/TopoValidation",run));
         setCurrentMonGroup("HLT/TauMon/Expert/TopoValidation");
-	addHistogram(new TH1F("hSupportMismatch"," Events passing Topo chain, but not support chain; ;",m_topo_chains.size(),-0.5,m_topo_chains.size()-0.5));
+        addHistogram(new TH1F("hSupportMismatch"," Events passing Topo chain, but not support chain; ;",m_topo_chains.size(),-0.5,m_topo_chains.size()-0.5));
         for(unsigned int i=0;i<m_topo_chains.size(); ++i){
             hist("hSupportMismatch")->GetXaxis()->SetBinLabel(i+1,m_topo_chains.at(i).c_str()); 
         }
-	for(unsigned int i=0;i<m_topo_chains.size(); ++i){    
+        for(unsigned int i=0;i<m_topo_chains.size(); ++i){   
             addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/TopoValidation/"+m_topo_chains.at(i),run));
             setCurrentMonGroup("HLT/TauMon/Expert/TopoValidation/"+m_topo_chains.at(i));
             addHistogram(new TH1F("hDR","dR between all RoIs;  DR;",32,0.,3.2));
@@ -862,9 +780,23 @@ void HLTTauMonTool::bookHistogramsAllItem(){
             addHistogram(new TH1F("hDRBothtaus_noTopo","dR when both RoIs are taus;  DR;",35,0.,3.5));
             addHistogram(new TH1F("hDRBothtausJet_noTopo","dR when both RoIs are taus;  DR;",35,0.,3.5));
             addHistogram(new TH1F("hDRBothtausJetN_noTopo","dR when both RoIs are taus;  DR;",35,0.,3.5));
-	}
+        }
     }
     
+
+
+
+
+
+
+
+
+
+
+
+
+
+
     if(m_emulation){
         addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/Emulation",run));
         setCurrentMonGroup("HLT/TauMon/Expert/Emulation");
@@ -901,9 +833,12 @@ void HLTTauMonTool::bookHistogramsAllItem(){
     double bins_nvtx[nbin_nvtx] = {0.,5.,10.,15.,20.,25.};
     const int nbin_mu = 34;
     float bins_mu[nbin_mu] = {0.,2.,4.,6.,8.,10.,12.,14.,16.,18.,20.,22.,24.,26.,28.,30.,32.,34.,36.,38.,40., 42., 44., 44., 46., 48., 50., 52., 54., 56., 58., 60., 62., 72};
+
     //    const int nbin_mu = 21;
     //    float bins_mu[nbin_mu] = {0.,2.,4.,6.,8.,10.,12.,14.,16.,18.,20.,22.,24.,26.,28.,30.,32.,34.,36.,38.,40.};
 
+
+
     addMonGroup(new MonGroup(this,"HLT/TauMon/Expert/HLTefficiency",run));
     setCurrentMonGroup("HLT/TauMon/Expert/HLTefficiency");
     addProfile(new TProfile("TProfRecoHLT25PtEfficiency", "idperf_tracktwo Vs perf_tracktwo;  p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
@@ -916,6 +851,10 @@ void HLTTauMonTool::bookHistogramsAllItem(){
     addProfile(new TProfile("TProfRecoHLT25NVtxEfficiency", "idperf_tracktwo Vs perf_tracktwo; Number of primary vertices; Efficiency",nbin_nvtx-1,bins_nvtx));
     addProfile(new TProfile("TProfRecoHLT25MuEfficiency", "idperf_tracktwo Vs perf_tracktwo; Average interactions per bunch crossing; Efficiency",nbin_mu-1,bins_mu));
     
+
+
+
+
     addProfile(new TProfile("TProfRecoHLT25PtEfficiency_2", "perf_tracktwo Vs medium1_tracktwo; p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
     addProfile(new TProfile("TProfRecoHLT160PtEfficiency_2", "perf_tracktwo Vs medium1_tracktwo; p_{T} [GeV]; Efficiency",nbin_pt-1,hbins_pt));
     addProfile(new TProfile("TProfRecoHLT25Pt1PEfficiency_2", "perf_tracktwo Vs medium1_tracktwo; 1 prong p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
@@ -927,9 +866,15 @@ void HLTTauMonTool::bookHistogramsAllItem(){
     addProfile(new TProfile("TProfRecoHLT25MuEfficiency_2", "perf_tracktwo Vs medium1_tracktwo; Average interactions per bunch crossing; Efficiency",nbin_mu-1,bins_mu));
 
 
+
+
+
     addProfile(new TProfile("TProfRecoL1_J25PtEfficiency", "TAU20IM_2TAU12IM_3J25_2J20_3J12 vs TAU20IM_2TAU12IM ; p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));    
 
-/*    addHistogram(new TH1F("hRecoHLT25PtNum","idperf_tracktwo Vs perf_tracktwo; p_{T} [GeV];",nbin_pt-1,bins_pt));
+
+
+/*
+    addHistogram(new TH1F("hRecoHLT25PtNum","idperf_tracktwo Vs perf_tracktwo; p_{T} [GeV];",nbin_pt-1,bins_pt));
     addHistogram(new TH1F("hRecoHLT25Pt1PNum","idperf_tracktwo Vs perf_tracktwo;  1 prong p_{T} [GeV];",nbin_pt-1,bins_pt));
     addHistogram(new TH1F("hRecoHLT25Pt3PNum","idperf_tracktwo Vs perf_tracktwo;  3 prong p_{T} [GeV];",nbin_pt-1,bins_pt));
     addHistogram(new TH1F("hRecoHLT25EtaNum","idperf_tracktwo Vs perf_tracktwo; #eta;",nbin_eta-1,bins_eta));
@@ -939,7 +884,8 @@ void HLTTauMonTool::bookHistogramsAllItem(){
     addHistogram(new TH1F("hRecoHLT25MuNum","idperf_tracktwo Vs perf_tracktwo; Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
 */
     addHistogram(new TH2F("hRecoHLT25EtaVsPhiNum","idperf_tracktwo Vs perf_tracktwo; #eta; #phi",nbin_eta-1,bins_eta,16,-3.2,3.2));
-/*    addHistogram(new TH1F("hRecoTau25PtDenom","; p_{T} [GeV];",nbin_pt-1,bins_pt));
+/*
+    addHistogram(new TH1F("hRecoTau25PtDenom","; p_{T} [GeV];",nbin_pt-1,bins_pt));
     addHistogram(new TH1F("hRecoTau25Pt1PDenom","; 1 prong p_{T} [GeV];",nbin_pt-1,bins_pt));
     addHistogram(new TH1F("hRecoTau25Pt3PDenom","; 3 prong p_{T} [GeV];",nbin_pt-1,bins_pt));
     addHistogram(new TH1F("hRecoTau25EtaDenom","; #eta;",nbin_eta-1,bins_eta));
@@ -949,7 +895,8 @@ void HLTTauMonTool::bookHistogramsAllItem(){
     addHistogram(new TH1F("hRecoTau25MuDenom","; Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
 */
     addHistogram(new TH2F("hRecoTau25EtaVsPhiDenom","; #eta; #phi",nbin_eta-1,bins_eta,16,-3.2,3.2));
-/*    addHistogram(new TH1F("hRecoHLT25PtEfficiency","idperf_tracktwo Vs perf_tracktwo Efficiency;  p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
+/*
+    addHistogram(new TH1F("hRecoHLT25PtEfficiency","idperf_tracktwo Vs perf_tracktwo Efficiency;  p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
     addHistogram(new TH1F("hRecoHLT25Pt1PEfficiency","idperf_tracktwo Vs perf_tracktwo Efficiency; 1 prong p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
     addHistogram(new TH1F("hRecoHLT25Pt3PEfficiency","idperf_tracktwo Vs perf_tracktwo Efficiency; 3 prong p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
     addHistogram(new TH1F("hRecoHLT25EtaEfficiency","idperf_tracktwo Vs perf_tracktwo Efficiency;  #eta; Efficiency",nbin_eta-1,bins_eta));
@@ -961,7 +908,8 @@ void HLTTauMonTool::bookHistogramsAllItem(){
     addHistogram(new TH2F("hRecoHLT25EtaVsPhiEfficiency","idperf_tracktwo Vs perf_tracktwo in  Eta-Phi; #eta; #phi",nbin_eta-1,bins_eta,16,-3.2,3.2));
 
 
-/*    addHistogram(new TH1F("hRecoHLT25PtNum_2","perf_tracktwo Vs medium1_tracktwo; p_{T} [GeV];",nbin_pt-1,bins_pt));
+/*
+    addHistogram(new TH1F("hRecoHLT25PtNum_2","perf_tracktwo Vs medium1_tracktwo; p_{T} [GeV];",nbin_pt-1,bins_pt));
     addHistogram(new TH1F("hRecoHLT25Pt1PNum_2","perf_tracktwo Vs medium1_tracktwo;  1 prong p_{T} [GeV];",nbin_pt-1,bins_pt));
     addHistogram(new TH1F("hRecoHLT25Pt3PNum_2","perf_tracktwo Vs medium1_tracktwo;  3 prong p_{T} [GeV];",nbin_pt-1,bins_pt));
     addHistogram(new TH1F("hRecoHLT25EtaNum_2","perf_tracktwo Vs medium1_tracktwo; #eta;",nbin_eta-1,bins_eta));
@@ -971,7 +919,8 @@ void HLTTauMonTool::bookHistogramsAllItem(){
     addHistogram(new TH1F("hRecoHLT25MuNum_2","perf_tracktwo Vs medium1_tracktwo; Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
 */
     addHistogram(new TH2F("hRecoHLT25EtaVsPhiNum_2","perf_tracktwo Vs medium1_tracktwo; #eta; #phi",nbin_eta-1,bins_eta,16,-3.2,3.2));
-/*    addHistogram(new TH1F("hRecoTau25PtDenom_2","; p_{T} [GeV];",nbin_pt-1,bins_pt));
+/*
+    addHistogram(new TH1F("hRecoTau25PtDenom_2","; p_{T} [GeV];",nbin_pt-1,bins_pt));
     addHistogram(new TH1F("hRecoTau25Pt1PDenom_2","; 1 prong p_{T} [GeV];",nbin_pt-1,bins_pt));
     addHistogram(new TH1F("hRecoTau25Pt3PDenom_2","; 3 prong p_{T} [GeV];",nbin_pt-1,bins_pt));
     addHistogram(new TH1F("hRecoTau25EtaDenom_2","; #eta;",nbin_eta-1,bins_eta));
@@ -981,7 +930,8 @@ void HLTTauMonTool::bookHistogramsAllItem(){
     addHistogram(new TH1F("hRecoTau25MuDenom_2","; Average interactions per bunch crossing;",nbin_mu-1,bins_mu));
 */
     addHistogram(new TH2F("hRecoTau25EtaVsPhiDenom_2","; #eta; #phi",nbin_eta-1,bins_eta,16,-3.2,3.2));
-/*    addHistogram(new TH1F("hRecoHLT25PtEfficiency_2","perf_tracktwo Vs medium1_tracktwo Efficiency;  p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
+/*
+    addHistogram(new TH1F("hRecoHLT25PtEfficiency_2","perf_tracktwo Vs medium1_tracktwo Efficiency;  p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
     addHistogram(new TH1F("hRecoHLT25Pt1PEfficiency_2","perf_tracktwo Vs medium1_tracktwo Efficiency; 1 prong p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
     addHistogram(new TH1F("hRecoHLT25Pt3PEfficiency_2","perf_tracktwo Vs medium1_tracktwo Efficiency; 3 prong p_{T} [GeV]; Efficiency",nbin_pt-1,bins_pt));
     addHistogram(new TH1F("hRecoHLT25EtaEfficiency_2","perf_tracktwo Vs medium1_tracktwo Efficiency;  #eta; Efficiency",nbin_eta-1,bins_eta));
@@ -991,4 +941,295 @@ void HLTTauMonTool::bookHistogramsAllItem(){
     addHistogram(new TH1F("hRecoHLT25MuEfficiency_2","perf_tracktwo Vs medium1_tracktwo Efficiency; Average interactions per bunch crossing; Efficiency",nbin_mu-1,bins_mu));
 */
     addHistogram(new TH2F("hRecoHLT25EtaVsPhiEfficiency_2","perf_tracktwo Vs medium1_tracktwo in  Eta-Phi; #eta; #phi",nbin_eta-1,bins_eta,16,-3.2,3.2));
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 }
diff --git a/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool_dijet.cxx b/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool_dijet.cxx
index be8e430cdd04749dd8b98b34ed597f1aa6bc86b4..15b91fe01c96100e0c156e1c3b89df421f1e6654 100644
--- a/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool_dijet.cxx
+++ b/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool_dijet.cxx
@@ -102,7 +102,8 @@ StatusCode HLTTauMonTool::dijetFakeTausEfficiency()
 
   /* match offline tau to subleading jet */
   float dR = 666;
-  for(auto aTau : m_taus)
+  for(auto aTau : m_taus_BDT)
+  //  for(auto aTau : m_truth)
     {
       //const xAOD::TauJet *aTau = m_taus.at(t);
       /* check offline tau quality */
diff --git a/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool_proc.cxx b/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool_proc.cxx
index 3fdecc7d6bb882b5217af99003ec0a641c53381e..55d3a4dcc9a859a172378838dde930eeb2c72761 100644
--- a/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool_proc.cxx
+++ b/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool_proc.cxx
@@ -33,6 +33,13 @@ StatusCode HLTTauMonTool::proc()
 	
         for(unsigned int i=0;i<m_trigItems.size();++i)
 	  {
+
+            std::string trigItemShort=m_trigItems[i];
+            if(m_trigItems[i].find("tau25")!=string::npos && m_trigItems[i].find("L1TAU")!=string::npos){
+              size_t posit=m_trigItems[i].rfind("_");
+              trigItemShort=m_trigItems[i].substr(0,posit);
+            }
+
             if(m_truth && m_turnOnCurves)
 	      {
 		//                setCurrentMonGroup("HLT/TauMon/Expert/"+m_trigItems[i]+"/TurnOnCurves/TruthEfficiency");
@@ -113,7 +120,8 @@ StatusCode HLTTauMonTool::proc()
             }
             if(m_turnOnCurves)
             {
-                setCurrentMonGroup("HLT/TauMon/Expert/"+m_trigItems[i]+"/TurnOnCurves/RecoEfficiency");
+                setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/TurnOnCurves/RecoEfficiency");
+                ATH_MSG_DEBUG("Check01 " << m_trigItems[i]);
 		//                plotUnderOverFlow(hist("hRecoTauPtDenom"));
 		//                plotUnderOverFlow(hist("hRecoTauPt1PDenom"));
 		//                plotUnderOverFlow(hist("hRecoTauPt3PDenom"));
@@ -143,8 +151,8 @@ StatusCode HLTTauMonTool::proc()
 
 	   if (m_doTrackCurves)
 	      {
-	      setCurrentMonGroup("HLT/TauMon/Expert/"+m_trigItems[i]+"/trackCurves");
-		
+	      setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/trackCurves");
+              ATH_MSG_DEBUG("Check02 " << trigItemShort);
 	      plotUnderOverFlow(hist("hpstau_trk_pt"));
               plotUnderOverFlow(hist("hpstau_trk_eta"));
               plotUnderOverFlow(hist("hpstau_trk_phi"));
@@ -158,45 +166,69 @@ StatusCode HLTTauMonTool::proc()
 	      }
 
             
-            setCurrentMonGroup("HLT/TauMon/Expert/"+m_trigItems[i]+"/L1RoI");
+            setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/L1RoI");
+            ATH_MSG_DEBUG("Check03 " << trigItemShort);
             plotUnderOverFlow(hist("hL1RoIEta"));
+            ATH_MSG_DEBUG("Check03.2 " << m_trigItems[i]); 
             plotUnderOverFlow(hist("hL1RoIPhi"));
+            ATH_MSG_DEBUG("Check03.3 " << m_trigItems[i]); 
             plotUnderOverFlow(hist("hL1RoIeT"));
+            ATH_MSG_DEBUG("Check03.4 " << m_trigItems[i]); 
             plotUnderOverFlow(hist("hL1RoIisol"));
+            ATH_MSG_DEBUG("Check03.5 " << m_trigItems[i]); 
             plotUnderOverFlow(hist("hL1RoITauClus"));
+            ATH_MSG_DEBUG("Check03.6 " << m_trigItems[i]); 
             //plotUnderOverFlow(hist("hL1RoITauClus2"));
             plotUnderOverFlow(hist("hL1RoIEMIso"));
+            ATH_MSG_DEBUG("Check03.7 " << m_trigItems[i]); 
             plotUnderOverFlow(hist("hL1RoIHadCore"));
+            ATH_MSG_DEBUG("Check03.8 " << m_trigItems[i]); 
             plotUnderOverFlow(hist("hL1RoIHadIsol"));
-            plotUnderOverFlow(hist("hL1JetRoIEta"));            
-            plotUnderOverFlow(hist("hL1JetRoIPhi"));
-            plotUnderOverFlow(hist("hL1JetRoIeT"));
-
-            setCurrentMonGroup("HLT/TauMon/Expert/"+m_trigItems[i]+"/PreselectionTau");
+            ATH_MSG_DEBUG("Check03.9 " << m_trigItems[i]); 
+            //plotUnderOverFlow(hist("hL1JetRoIEta"));            
+            //plotUnderOverFlow(hist("hL1JetRoIPhi"));
+            //plotUnderOverFlow(hist("hL1JetRoIeT"));
+	    if(m_trigItems[i].find("tracktwoMVA")==string::npos && m_trigItems[i].find("tracktwoEF")==string::npos && m_trigItems[i].find("ptonly")==string::npos) {
+	      
+            setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/PreselectionTau");
+            ATH_MSG_DEBUG("Check04 " << m_trigItems[i]);
             plotUnderOverFlow(hist("hEFEt"));
             plotUnderOverFlow(hist("hEFEt2"));
             plotUnderOverFlow(hist("hFTFnTrack"));
             plotUnderOverFlow(hist("hEta"));
             plotUnderOverFlow(hist("hPhi"));
             plotUnderOverFlow(hist("hFTFnWideTrack"));
+	    }
             //plotUnderOverFlow(hist("hdRmax"));
-            
-            setCurrentMonGroup("HLT/TauMon/Expert/"+m_trigItems[i]+"/EFTau");
+            ATH_MSG_DEBUG("Check03.1 " << m_trigItems[i]);            
+            setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFTau");
+            ATH_MSG_DEBUG("Check05 " << trigItemShort);            
             plotUnderOverFlow(hist("hEFEt"));
+            ATH_MSG_DEBUG("Check05.1 " << trigItemShort);
             plotUnderOverFlow(hist("hEFEta"));
+            ATH_MSG_DEBUG("Check05.2 " << trigItemShort);
             plotUnderOverFlow(hist("hEFPhi"));
+            ATH_MSG_DEBUG("Check05.3 " << trigItemShort);
             plotUnderOverFlow(hist("hEFnTrack"));
+            ATH_MSG_DEBUG("Check05.4 " << trigItemShort);
             plotUnderOverFlow(hist("hEFEtRaw"));
+            ATH_MSG_DEBUG("Check05.5 " << trigItemShort);
             plotUnderOverFlow(hist("hEFnWideTrack"));
+            ATH_MSG_DEBUG("Check05.6 " << trigItemShort);
+
             //plotUnderOverFlow(hist("hEFEMRadius"));
             //plotUnderOverFlow(hist("hEFHADRadius"));
-            plotUnderOverFlow(hist("hEFIsoFrac"));
+            //plotUnderOverFlow(hist("hEFIsoFrac"));
             //plotUnderOverFlow(hist("hEFPSSFraction"));
-            plotUnderOverFlow(hist("hEFEMFraction"));
+            //plotUnderOverFlow(hist("hEFEMFraction"));
+	    if(m_trigItems[i].find("tracktwoMVA")==string::npos && m_trigItems[i].find("tracktwoEF")==string::npos && m_trigItems[i].find("ptonly")==string::npos) {
+	      
             plotUnderOverFlow(hist("hScore1p"));
+            ATH_MSG_DEBUG("Check05.7 " << trigItemShort);
             plotUnderOverFlow(hist("hScoremp"));
-            
-            setCurrentMonGroup("HLT/TauMon/Expert/"+m_trigItems[i]+"/EFTau/BDT/1p_nonCorrected");
+            ATH_MSG_DEBUG("Check05.8 " << trigItemShort);
+            setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFTau/BDT/1p_nonCorrected");
+            ATH_MSG_DEBUG("Check05");
             plotUnderOverFlow(hist("hEFinnerTrkAvgDist1PNCorr"));
             plotUnderOverFlow(hist("hEFetOverPtLeadTrk1PNCorr"));
             plotUnderOverFlow(hist("hEFipSigLeadTrk1PNCorr"));
@@ -206,7 +238,8 @@ StatusCode HLTTauMonTool::proc()
             plotUnderOverFlow(hist("hEFcentFrac1PNCorr"));
             plotUnderOverFlow(hist("hEFptRatioEflowApprox1PNCorr"));
             
-            setCurrentMonGroup("HLT/TauMon/Expert/"+m_trigItems[i]+"/EFTau/BDT/mp_nonCorrected");
+            setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFTau/BDT/mp_nonCorrected");
+            ATH_MSG_DEBUG("Check06");
             plotUnderOverFlow(hist("hEFinnerTrkAvgDistMPNCorr"));
             plotUnderOverFlow(hist("hEFetOverPtLeadTrkMPNCorr"));
             plotUnderOverFlow(hist("hEFChPiEMEOverCaloEMEMPNCorr"));
@@ -218,7 +251,8 @@ StatusCode HLTTauMonTool::proc()
             plotUnderOverFlow(hist("hEFmassTrkSysMPNCorr"));
             plotUnderOverFlow(hist("hEFmEflowApproxMPNCorr"));
             
-            setCurrentMonGroup("HLT/TauMon/Expert/"+m_trigItems[i]+"/EFTau/BDT/1p_Corrected");
+            setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFTau/BDT/1p_Corrected");
+            ATH_MSG_DEBUG("Check07");
             plotUnderOverFlow(hist("hEFinnerTrkAvgDist1PCorr"));
             plotUnderOverFlow(hist("hEFetOverPtLeadTrk1PCorr"));
             plotUnderOverFlow(hist("hEFipSigLeadTrk1PCorr"));
@@ -228,7 +262,8 @@ StatusCode HLTTauMonTool::proc()
             plotUnderOverFlow(hist("hEFcentFrac1PCorr"));
             plotUnderOverFlow(hist("hEFptRatioEflowApprox1PCorr"));
             
-            setCurrentMonGroup("HLT/TauMon/Expert/"+m_trigItems[i]+"/EFTau/BDT/mp_Corrected");
+            setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFTau/BDT/mp_Corrected");
+            ATH_MSG_DEBUG("Check08");
             plotUnderOverFlow(hist("hEFinnerTrkAvgDistMPCorr"));
             plotUnderOverFlow(hist("hEFetOverPtLeadTrkMPCorr"));
             plotUnderOverFlow(hist("hEFChPiEMEOverCaloEMEMPCorr"));
@@ -239,17 +274,21 @@ StatusCode HLTTauMonTool::proc()
             plotUnderOverFlow(hist("hEFtrFlightPathSigMPCorr"));
             plotUnderOverFlow(hist("hEFmassTrkSysMPCorr"));
             plotUnderOverFlow(hist("hEFmEflowApproxMPCorr"));
-            
-            setCurrentMonGroup("HLT/TauMon/Expert/"+m_trigItems[i]+"/L1VsOffline");
+            }
+            setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/L1VsOffline");
+            ATH_MSG_DEBUG("Check09");
             plotUnderOverFlow(hist("hL1EtRatio"));
             
-            
-            setCurrentMonGroup("HLT/TauMon/Expert/"+m_trigItems[i]+"/PreselectionVsOffline");
+            if(m_trigItems[i].find("tracktwoMVA")==string::npos && m_trigItems[i].find("tracktwoEF")==string::npos && m_trigItems[i].find("ptonly")==string::npos) { 
+            setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/PreselectionVsOffline");
+            ATH_MSG_DEBUG("Check10");
             plotUnderOverFlow(hist("hEFEtRatio"));
             plotUnderOverFlow(hist("hEtaRatio"));
             plotUnderOverFlow(hist("hPhiRatio"));
-            
-            setCurrentMonGroup("HLT/TauMon/Expert/"+m_trigItems[i]+"/EFVsOffline");
+            }
+	   	      
+            setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFVsOffline");
+            ATH_MSG_DEBUG("Check11");
             plotUnderOverFlow(hist("hptRatio"));
             plotUnderOverFlow(hist("hetaRatio"));
             plotUnderOverFlow(hist("hphiRatio"));
@@ -262,7 +301,8 @@ StatusCode HLTTauMonTool::proc()
             plotUnderOverFlow(hist("hOffEFEMDiff"));
             plotUnderOverFlow(hist("hOffEFHADDiff"));
             
-            setCurrentMonGroup("HLT/TauMon/Expert/"+m_trigItems[i]+"/EFVsOffline/BDT/1p_nonCorrected");
+            setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFVsOffline/BDT/1p_nonCorrected");
+            ATH_MSG_DEBUG("Check12");
             plotUnderOverFlow(hist("hInnerTrkAvgDistRatio1P"));
             plotUnderOverFlow(hist("hEtOverPtLeadTrkRatio1P"));
             plotUnderOverFlow(hist("hIpSigLeadTrkRatio1P"));
@@ -274,7 +314,8 @@ StatusCode HLTTauMonTool::proc()
             plotUnderOverFlow(hist("hDRmaxRatio1P"));
             plotUnderOverFlow(hist("hTopoInvMassRatio1P"));
             
-            setCurrentMonGroup("HLT/TauMon/Expert/"+m_trigItems[i]+"/EFVsOffline/BDT/mp_nonCorrected");
+            setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/EFVsOffline/BDT/mp_nonCorrected");
+            ATH_MSG_DEBUG("Check13");
             plotUnderOverFlow(hist("hInnerTrkAvgDistRatioMP"));
             plotUnderOverFlow(hist("hEtOverPtLeadTrkRatioMP"));
             plotUnderOverFlow(hist("hChPiEMEOverCaloEMERatioMP"));
@@ -457,6 +498,7 @@ StatusCode HLTTauMonTool::proc()
                 
 */
 		setCurrentMonGroup("HLT/TauMon/Expert/HLTefficiency");
+                ATH_MSG_DEBUG("Check13");
 
                 
 		//plotUnderOverFlow(hist("hHLTdRDenom"));
@@ -468,12 +510,14 @@ StatusCode HLTTauMonTool::proc()
 
     	for(unsigned int i=0;i<m_topo_chains.size(); ++i){ 
         	setCurrentMonGroup("HLT/TauMon/Expert/TopoDiTau/"+m_topo_chains.at(i));  
+                ATH_MSG_DEBUG("Check14");
 		plotUnderOverFlow(hist("hHLTdR"));  
     	}
 
 	if(m_doTopoValidation){
 		for(unsigned int topo=0;topo<m_topo_chains.size();topo++){
 			setCurrentMonGroup("HLT/TauMon/Expert/TopoValidation/"+m_topo_chains.at(topo));
+                        ATH_MSG_DEBUG("Check15");
 			plotUnderOverFlow(hist("hDR"));	
 			plotUnderOverFlow(hist("hDRjets"));
 			plotUnderOverFlow(hist("hDRnoJets"));
@@ -490,7 +534,7 @@ StatusCode HLTTauMonTool::proc()
 
         // clone shifter histograms
         std::vector<string> lowest_names, lowest_trigger_names;
-        lowest_names.push_back("lowest_singletau"); 	lowest_trigger_names.push_back(m_lowest_singletau);
+        lowest_names.push_back("lowest_singletau"); 	lowest_trigger_names.push_back(m_lowest_singletau_RNN);
         //lowest_names.push_back("lowest_ditau"); 	lowest_trigger_names.push_back(m_lowest_ditau);
         //lowest_names.push_back("lowest_etau"); 	lowest_trigger_names.push_back(m_lowest_etau);
         //lowest_names.push_back("lowest_mutau");	lowest_trigger_names.push_back(m_lowest_mutau);
diff --git a/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool_trackCurves.cxx b/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool_trackCurves.cxx
index 36bdf8ada241d9e13bd1198ffb3c2aa7497fb46c..68a7795257740a1501219bccf8805d60e0276365 100644
--- a/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool_trackCurves.cxx
+++ b/Trigger/TrigMonitoring/TrigTauMonitoring/src/HLTTauMonTool_trackCurves.cxx
@@ -1,7 +1,6 @@
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
-
 //  @file HLTTauMonTool_trackCurves.cxx
 //  created by Milena Bajic <milena.bajic@cern.ch>
 #include "TProfile.h"
@@ -9,37 +8,47 @@
 #include "AthenaKernel/Units.h"
 using namespace std;
 using Athena::Units::GeV;
-StatusCode HLTTauMonTool::trackCurves(const std::string & trigItem){
+StatusCode HLTTauMonTool::trackCurves(const std::string & trigItem, const std::string & goodTauRefType){
    
     ATH_MSG_DEBUG ("HLTTauMonTool::doTrackCurves");
-    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItem+"/trackCurves");
+
+    std::string trigItemShort=trigItem;
+    if(trigItem.find("tau25")!=string::npos && trigItem.find("L1TAU")!=string::npos){
+      size_t posit=trigItem.rfind("_");
+      trigItemShort=trigItem.substr(0,posit);
+    }
+
+    setCurrentMonGroup("HLT/TauMon/Expert/"+trigItemShort+"/trackCurves");
    
     std::string trig_item_EF = "HLT_"+trigItem;
     std::string trig_item_L1(LowerChain( trig_item_EF ) );
-
+          std::vector<const xAOD::TauJet *> taus_here;
+                if (goodTauRefType == "RNN") {
+                        taus_here = m_taus_RNN;
+                } else {
+                        taus_here = m_taus_BDT;
+                }
     // Loop over selected offline taus  
-    for(unsigned int t=0;t<m_taus.size();t++){
+    for(unsigned int t=0;t<taus_here.size();t++){
  
         if(m_truth){
             // apply truth matching if doTruth is true
             bool matched(false);
             for(unsigned int truth=0;truth<m_true_taus.size();truth++){
-                if(m_taus.at(t)->p4().DeltaR(m_true_taus.at(truth))<0.2) matched = true;
+                if(taus_here.at(t)->p4().DeltaR(m_true_taus.at(truth))<0.2) matched = true;
             }
             if(!matched) continue;
         }
-		
+                
         bool presmatch = false; //true if reco+truth is matched to preselection
-        const xAOD::TauJet *offlineTau = m_taus.at(t);
+        const xAOD::TauJet *offlineTau = taus_here.at(t);
         const xAOD::TauJet* matchedTau = 0 ;
        
         if (not getTDT()->isPassed(trig_item_EF,m_HLTTriggerCondition)) {
             continue; //presmatch will never be true otherwise anyway
         }   
-
         Trig::FeatureContainer f = ( getTDT()->features(trig_item_EF,m_HLTTriggerCondition) );
         for(const auto& comb: f.getCombinations()) {
-
             // get HLT perselection taus:        
             const std::vector< Trig::Feature<xAOD::TauJetContainer> >  vec_preseltau = comb.get<xAOD::TauJetContainer>("TrigTauRecPreselection", m_HLTTriggerCondition);
            
@@ -65,10 +74,8 @@ StatusCode HLTTauMonTool::trackCurves(const std::string & trigItem){
             continue;
         }
         // TODO: we should also loop and fill plots for precision taus
-
         int EFnTrack(-1),EFnWideTrack(-1);
         int OffnTrack(-1),OffnWideTrack(-1);
-
         #ifndef XAODTAU_VERSIONS_TAUJET_V3_H
         EFnTrack = matchedTau->nTracks();
         EFnWideTrack = matchedTau->nWideTracks();
@@ -83,7 +90,6 @@ StatusCode HLTTauMonTool::trackCurves(const std::string & trigItem){
    
         hist2("hreco_vs_pres_coreTracks")->Fill(OffnTrack, EFnTrack);
         hist2("hreco_vs_pres_isoTracks")->Fill(OffnWideTrack,EFnWideTrack);
-
         // loop over the core (dr<0.2) offline tau tracks, maybe for now good enough, we may add wide tracks too
         if(OffnTrack==0) continue;
         bool validLink(true);
@@ -97,10 +103,8 @@ StatusCode HLTTauMonTool::trackCurves(const std::string & trigItem){
             if(!trklink.isValid()){ ATH_MSG_WARNING("Invalid tau track link"); validLink = false;}
         }
         if(!validLink) continue;
-
         if(m_isData) continue; // track links not working in data!!
         else {
-
           #ifndef XAODTAU_VERSIONS_TAUJET_V3_H
           trackLinks = offlineTau->trackLinks();
           #else
@@ -110,31 +114,25 @@ StatusCode HLTTauMonTool::trackCurves(const std::string & trigItem){
             if(!trklink.isValid()){ ATH_MSG_WARNING("Invalid tau track link"); validLink = false;}
           }
           if(!validLink) continue;
-
         }
-
         for (int recoTrack = 0; recoTrack < OffnTrack; ++recoTrack){
-
             const xAOD::TrackParticle* recotau_trk = 0;
             float recotau_trk_pt(-99.);
             float recotau_trk_eta(-99.);
             float recotau_trk_phi(-99.);
             float recotau_trk_d0(-99.);
             float recotau_trk_z0(-99.);
-
             const xAOD::TrackParticle* pstau_trk_clos = 0;
             float pstau_trk_pt(-99.);
             float pstau_trk_eta(-99.);
             float pstau_trk_phi(-99.);
             float pstau_trk_d0(-99.);
             float pstau_trk_z0(-99.);
-
             #ifndef XAODTAU_VERSIONS_TAUJET_V3_H
             recotau_trk = offlineTau->track(recoTrack);
             #else
             recotau_trk = offlineTau->track(recoTrack)->track();
             #endif
-
             if(recotau_trk){
                recotau_trk_pt = recotau_trk->pt()/GeV;
                recotau_trk_eta = recotau_trk->eta();
@@ -142,26 +140,21 @@ StatusCode HLTTauMonTool::trackCurves(const std::string & trigItem){
                recotau_trk_d0 = recotau_trk->d0();
                recotau_trk_z0 = recotau_trk->z0();
             }
-
             //Now find the closest track
             double dRtracksmin = 9999; 
             int trackIndex(-1);
             for (unsigned int i = 0; i < matchedTau->nTracks(); ++i){
-
                 pstau_trk_eta = matchedTau->track(i)->eta();
                 pstau_trk_phi = matchedTau->track(i)->phi();
                 pstau_trk_pt  = matchedTau->track(i)->pt(); 
-
                 double dRtracks = deltaR (pstau_trk_eta, recotau_trk_eta, pstau_trk_phi, recotau_trk_phi);
                 if (dRtracks < dRtracksmin) {
                    dRtracksmin = dRtracks;
                    trackIndex = i;
                 } 
             } 
-
             bool tracksMatched = false; 
             if ( dRtracksmin  < 0.1 ) {tracksMatched = true;}
-
             if (tracksMatched == false) {
                  //Fill TProfile
                 
@@ -173,7 +166,6 @@ StatusCode HLTTauMonTool::trackCurves(const std::string & trigItem){
                
                 continue; // skip the filling of the next plots if the tracks are not matched
                 }
-
             else {
                 // All the next plots are not filled if the tracks are not matched
            
@@ -184,7 +176,6 @@ StatusCode HLTTauMonTool::trackCurves(const std::string & trigItem){
                 #endif
                 pstau_trk_d0 = pstau_trk_clos->d0();
                 pstau_trk_z0 = pstau_trk_clos->z0();
-
                 // TODO: these 6 plots below are biased because they are filled only for the online tracks matching an offline track.
                 // they should be fill for all the online tracks            
                 hist("hpstau_trk_pt")->Fill(pstau_trk_pt);
@@ -205,7 +196,6 @@ StatusCode HLTTauMonTool::trackCurves(const std::string & trigItem){
                 hist2("hpstautrk_vs_recotrk_phi")->Fill(pstau_trk_phi,recotau_trk_phi);
                 hist2("hpstautrk_vs_recotrk_d0")->Fill(pstau_trk_d0,recotau_trk_d0);
                 hist2("hpstautrk_vs_recotrk_z0")->Fill(pstau_trk_z0,recotau_trk_z0);
-
                 profile("TProfPresVsRecoPtEfficiency")->Fill(recotau_trk_pt, 1);
                 profile("TProfPresVsRecoEtaEfficiency")->Fill(recotau_trk_eta, 1);
                 profile("TProfPresVsRecoPhiEfficiency")->Fill(recotau_trk_phi, 1);
@@ -217,4 +207,3 @@ StatusCode HLTTauMonTool::trackCurves(const std::string & trigItem){
    
     return StatusCode::SUCCESS;
 }
-
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMCPHitsCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMCPHitsCollectionCnv.cxx
index a5385a792e9633a215b47047ee47ae9ca8a00714..ca90ee7e2d27dab8e2d472ce887d28ecf75ced4d 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMCPHitsCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMCPHitsCollectionCnv.cxx
@@ -37,7 +37,7 @@ CMMCPHitsCollection * CMMCPHitsCollectionCnv::createTransient()
   CMMCPHitsCollection *p_collection = 0;
   if( compareClassGuid( tlp1_guid ) )     
     {
-     // using auto_ptr ensures deletion of the persistent object
+     // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< CMMCPHitsCollection_PERS > pers_ref( poolReadObject< CMMCPHitsCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
    
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMEtSumsCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMEtSumsCollectionCnv.cxx
index e0d4328842393f5003eb1e263d089cf1d554e365..9914c53bbf3248c6048245cd947d0080cbf79602 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMEtSumsCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMEtSumsCollectionCnv.cxx
@@ -37,7 +37,7 @@ CMMEtSumsCollection * CMMEtSumsCollectionCnv::createTransient()
   CMMEtSumsCollection *p_collection = 0;
   if( compareClassGuid( tlp1_guid ) )     
     {
-     // using auto_ptr ensures deletion of the persistent object
+     // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< CMMEtSumsCollection_PERS > pers_ref( poolReadObject< CMMEtSumsCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
    
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMJetHitsCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMJetHitsCollectionCnv.cxx
index 7a4b3c4a0c0592b8dc42d880011bdfd70c182827..a1cad083c7027c726cbc541d38f9d6fca32e588a 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMJetHitsCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMJetHitsCollectionCnv.cxx
@@ -37,7 +37,7 @@ CMMJetHitsCollection * CMMJetHitsCollectionCnv::createTransient()
   CMMJetHitsCollection *p_collection = 0;
   if( compareClassGuid( tlp1_guid ) )     
     {
-     // using auto_ptr ensures deletion of the persistent object
+     // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< CMMJetHitsCollection_PERS > pers_ref( poolReadObject< CMMJetHitsCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
       
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMRoICnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMRoICnv.cxx
index f58352f6b11ac48a12a30903c6271f096fcfae59..da096d3b5981b00b31928589cbd80fc89c160efd 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMRoICnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMRoICnv.cxx
@@ -38,7 +38,7 @@ CMMRoI * CMMRoICnv::createTransient()
  
   
   if ( compareClassGuid(p1_guid) ) {
-     // using auto_ptr ensures deletion of the persistent object
+     // using unique_ptr ensures deletion of the persistent object
      std::unique_ptr< CMMRoI_p1 > pers_ref( poolReadObject< CMMRoI_p1 >() );
      return m_TPConverter_p1.createTransient( pers_ref.get(), mlog );
   }
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXCPHitsCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXCPHitsCollectionCnv.cxx
index 6b50a52d2c0b244967f3fc3c113915fc5c99180b..8bc7cea1aecad97969ca4a2d7c88f7ee4c26611b 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXCPHitsCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXCPHitsCollectionCnv.cxx
@@ -37,7 +37,7 @@ CMXCPHitsCollection * CMXCPHitsCollectionCnv::createTransient()
   CMXCPHitsCollection *p_collection = 0;
   if( compareClassGuid( tlp1_guid ) )     
     {
-     // using auto_ptr ensures deletion of the persistent object
+     // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< CMXCPHitsCollection_PERS > pers_ref( poolReadObject< CMXCPHitsCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
    
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXCPTobCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXCPTobCollectionCnv.cxx
index 5ee9f45dac21ba94b71d3c69dc634223f71bc8dd..f3ef4ae3454bfbb2b3798e409a6323cdc54c4b50 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXCPTobCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXCPTobCollectionCnv.cxx
@@ -37,7 +37,7 @@ CMXCPTobCollection * CMXCPTobCollectionCnv::createTransient()
   CMXCPTobCollection *p_collection = 0;
   if( compareClassGuid( tlp1_guid ) )     
     {
-     // using auto_ptr ensures deletion of the persistent object
+     // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< CMXCPTobCollection_PERS > pers_ref( poolReadObject< CMXCPTobCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
    
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXEtSumsCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXEtSumsCollectionCnv.cxx
index 42f58566e0929257b8f2a157ef740f46837efe49..047ae1060bef8c6b3903824f9a3059583c2225c9 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXEtSumsCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXEtSumsCollectionCnv.cxx
@@ -37,7 +37,7 @@ CMXEtSumsCollection * CMXEtSumsCollectionCnv::createTransient()
   CMXEtSumsCollection *p_collection = 0;
   if( compareClassGuid( tlp1_guid ) )     
     {
-     // using auto_ptr ensures deletion of the persistent object
+     // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< CMXEtSumsCollection_PERS > pers_ref( poolReadObject< CMXEtSumsCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
    
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXJetHitsCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXJetHitsCollectionCnv.cxx
index d03f1381c06f5950f40d0bc89294cbd23ca92609..7807e0121105c6e96a5e5213ea3b2df5dfcaa14e 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXJetHitsCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXJetHitsCollectionCnv.cxx
@@ -37,7 +37,7 @@ CMXJetHitsCollection * CMXJetHitsCollectionCnv::createTransient()
   CMXJetHitsCollection *p_collection = 0;
   if( compareClassGuid( tlp1_guid ) )     
     {
-     // using auto_ptr ensures deletion of the persistent object
+     // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< CMXJetHitsCollection_PERS > pers_ref( poolReadObject< CMXJetHitsCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
       
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXJetTobCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXJetTobCollectionCnv.cxx
index 2cc54b3bb5ea7fa5d7ce7908cf4b229aa3753f86..470cf5bdda29cfd16e2d25b2ca482ddc3057e783 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXJetTobCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXJetTobCollectionCnv.cxx
@@ -37,7 +37,7 @@ CMXJetTobCollection * CMXJetTobCollectionCnv::createTransient()
   CMXJetTobCollection *p_collection = 0;
   if( compareClassGuid( tlp1_guid ) )     
     {
-     // using auto_ptr ensures deletion of the persistent object
+     // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< CMXJetTobCollection_PERS > pers_ref( poolReadObject< CMXJetTobCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
       
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXRoICnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXRoICnv.cxx
index 334529ba6fd496a4b4d3fcf3a6288906108272dd..0a8a4cc6380d6ca23e4c0aa9bdad64644a50c957 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXRoICnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXRoICnv.cxx
@@ -40,7 +40,7 @@ CMXRoI * CMXRoICnv::createTransient()
  
   
   if ( compareClassGuid(p1_guid) ) {
-     // using auto_ptr ensures deletion of the persistent object
+     // using unique_ptr ensures deletion of the persistent object
      std::unique_ptr< CMXRoI_p1 > pers_ref( poolReadObject< CMXRoI_p1 >() );
      return m_TPConverter_p1.createTransient( pers_ref.get(), mlog );
   }
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMHitsCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMHitsCollectionCnv.cxx
index e51967b65c3ac76ea417c93467f930336688f028..485f4c1808a2f9b8f426775054cfbcd58d9f3622 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMHitsCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMHitsCollectionCnv.cxx
@@ -37,7 +37,7 @@ CPMHitsCollection * CPMHitsCollectionCnv::createTransient()
   CPMHitsCollection *p_collection = 0;
   if( compareClassGuid( tlp1_guid ) )     
     {
-     // using auto_ptr ensures deletion of the persistent object
+     // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< CPMHitsCollection_PERS > pers_ref( poolReadObject< CPMHitsCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
       
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMRoICollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMRoICollectionCnv.cxx
index 454134848a1c69eab95fb8a68bc2e00dd6630166..317fa826f3c4d628a101cc7e4af9421ca7d96d1f 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMRoICollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMRoICollectionCnv.cxx
@@ -37,7 +37,7 @@ CPMRoICollection * CPMRoICollectionCnv::createTransient()
   CPMRoICollection *p_collection = 0;
   if( compareClassGuid( tlp1_guid ) )     
     {
-           // using auto_ptr ensures deletion of the persistent object
+           // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< CPMRoICollection_PERS > pers_ref( poolReadObject< CPMRoICollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
 
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMTobRoICollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMTobRoICollectionCnv.cxx
index 8f85b06a455d6a68a8d33c27b3bc8d6e14ed8bb5..4fcfcf2d174c0db8bffec8b8526f299504d4ac1c 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMTobRoICollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMTobRoICollectionCnv.cxx
@@ -37,7 +37,7 @@ CPMTobRoICollection * CPMTobRoICollectionCnv::createTransient()
   CPMTobRoICollection *p_collection = 0;
   if( compareClassGuid( tlp1_guid ) )     
     {
-           // using auto_ptr ensures deletion of the persistent object
+           // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< CPMTobRoICollection_PERS > pers_ref( poolReadObject< CPMTobRoICollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
 
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMTowerCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMTowerCollectionCnv.cxx
index 2fe2e83544eb253cd90375827d58c91063d31b4b..fc9ecd9c13ccff312a141f437d65610141bac913 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMTowerCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMTowerCollectionCnv.cxx
@@ -37,7 +37,7 @@ CPMTowerCollection * CPMTowerCollectionCnv::createTransient()
   CPMTowerCollection *p_collection = 0;
   if( compareClassGuid( tlp1_guid ) )     
     {
-     // using auto_ptr ensures deletion of the persistent object
+     // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< CPMTowerCollection_PERS > pers_ref( poolReadObject< CPMTowerCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
    
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMEtSumsCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMEtSumsCollectionCnv.cxx
index 976fe2697c1ade5cd3cc880f4a5850a36b1c5c23..35a86240b0ab4d240b87fe2df68cf428b6ae2390 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMEtSumsCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMEtSumsCollectionCnv.cxx
@@ -37,7 +37,7 @@ JEMEtSumsCollection * JEMEtSumsCollectionCnv::createTransient()
   JEMEtSumsCollection *p_collection = 0;
   if( compareClassGuid( tlp1_guid ) )     
     {
-     // using auto_ptr ensures deletion of the persistent object
+     // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< JEMEtSumsCollection_PERS > pers_ref( poolReadObject< JEMEtSumsCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
    
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMHitsCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMHitsCollectionCnv.cxx
index e92fb38cbf1b3c1d684ee63e546f15d5e1c4d7c6..9a48dc4616f1960eb6c669640aae449facf64e03 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMHitsCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMHitsCollectionCnv.cxx
@@ -37,7 +37,7 @@ JEMHitsCollection * JEMHitsCollectionCnv::createTransient()
   JEMHitsCollection *p_collection = 0;
   if( compareClassGuid( tlp1_guid ) )     
     {
-     // using auto_ptr ensures deletion of the persistent object
+     // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< JEMHitsCollection_PERS > pers_ref( poolReadObject< JEMHitsCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
       
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMRoICollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMRoICollectionCnv.cxx
index 55218c5743781fb6306f7ac5b921aa878da3e6e4..b5a8154d4d645c5af20e696d8220401458f3f2e8 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMRoICollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMRoICollectionCnv.cxx
@@ -37,7 +37,7 @@ JEMRoICollection * JEMRoICollectionCnv::createTransient()
   JEMRoICollection *p_collection = 0;
   if( compareClassGuid( tlp1_guid ) )     
     {
-     // using auto_ptr ensures deletion of the persistent object
+     // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< JEMRoICollection_PERS > pers_ref( poolReadObject< JEMRoICollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
    
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMTobRoICollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMTobRoICollectionCnv.cxx
index 318eba8fd59260ccf80bac6949519425200f6a66..bb99244a0f2cab1f0b463ed42345c7fbbc27edf8 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMTobRoICollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMTobRoICollectionCnv.cxx
@@ -37,7 +37,7 @@ JEMTobRoICollection * JEMTobRoICollectionCnv::createTransient()
   JEMTobRoICollection *p_collection = 0;
   if( compareClassGuid( tlp1_guid ) )     
     {
-     // using auto_ptr ensures deletion of the persistent object
+     // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< JEMTobRoICollection_PERS > pers_ref( poolReadObject< JEMTobRoICollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
    
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JetElementCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JetElementCollectionCnv.cxx
index 565355e61f6c2998fbd3a9031951d1b3fef79df2..6e20e2bbecb8c0a4bf0d51a429626f986cf1827d 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JetElementCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JetElementCollectionCnv.cxx
@@ -38,7 +38,7 @@ JetElementCollection * JetElementCollectionCnv::createTransient()
   JetElementCollection *p_collection = 0;
   if( compareClassGuid( tlp1_guid ) )     
     {
-     // using auto_ptr ensures deletion of the persistent object
+     // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< JetElementCollection_PERS > pers_ref( poolReadObject< JetElementCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
    
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/RODHeaderCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/RODHeaderCollectionCnv.cxx
index d8421974776ade70c26ed78458a1105f8d21c4bf..21dd6bfe637436a495c2d3afdb5e791d662ad610 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/RODHeaderCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/RODHeaderCollectionCnv.cxx
@@ -37,7 +37,7 @@ RODHeaderCollection * RODHeaderCollectionCnv::createTransient()
   RODHeaderCollection *p_collection = 0;
   if( compareClassGuid( tlp1_guid ) )     
     {
-     // using auto_ptr ensures deletion of the persistent object
+     // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< RODHeaderCollection_PERS > pers_ref( poolReadObject< RODHeaderCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
    
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/TriggerTowerCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/TriggerTowerCollectionCnv.cxx
index dfe5ee20bdca4e23ed2a7acdf5253e1d1528ded9..da1ab601db7348ef995860bec76e9d46834ec5c1 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/TriggerTowerCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/TriggerTowerCollectionCnv.cxx
@@ -38,7 +38,7 @@ TriggerTowerCollection * TriggerTowerCollectionCnv::createTransient()
   TriggerTowerCollection *p_collection = 0;
   if( compareClassGuid( tlp1_guid ) )     
     {
-     // using auto_ptr ensures deletion of the persistent object
+     // using unique_ptr ensures deletion of the persistent object
       std::unique_ptr< TriggerTowerCollection_PERS > pers_ref( poolReadObject< TriggerTowerCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );