From 6f4841568091ff43c4143492ada8c477fd4c761f Mon Sep 17 00:00:00 2001
From: Martin Tripiana Gorgojo <martin.tripiana@cern.ch>
Date: Sun, 29 Jan 2017 15:34:37 +0100
Subject: [PATCH] Decorators/accessors consolidation. New trigger helpers.
 Update trigger electron SF. Lots of xsections. (SUSYTools-00-08-41)

	* Change default trigger SF file for single electron chains.

2017-01-27  Zach Marshall <ZLMarshall@lbl.gov>
	* Adding new scripts/CheckDAODCompleteness.py from Bertrand for checking
	that there aren't missing events in your DAODs

2017-01-25 Federico Meloni <federico.meloni@cern.ch>
	* Added some signal xsecs (bffN) and tWZDR

2017-01-25  Zach Marshall <ZLMarshall@lbl.gov>

2017-01-24  Martin Tripiana <tripiana@cern.ch>
	* add missing TT 4body samples to xsection file
	* add new TT grid samples to xsection file

2017-01-24  Zach Marshall <ZLMarshall@lbl.gov>
	* Adding 410225 to the xsec file from XsecSummaryTTbar

2017-01-23  Martin Tripiana <tripiana@cern.ch>
	* Update JES+JMS calib recommendation (ATLSUSYSW-213))
...
(Long ChangeLog diff - truncated)


Former-commit-id: b8e5b70e5182d0306ae95526182ac37a7750b40a
---
 .../SUSYPhys/SUSYTools/Root/Electrons.cxx     |  25 +-
 .../SUSYPhys/SUSYTools/Root/Jets.cxx          |  40 +-
 .../SUSYPhys/SUSYTools/Root/MET.cxx           |  13 +-
 .../SUSYPhys/SUSYTools/Root/Muons.cxx         |  48 +-
 .../SUSYTools/Root/SUSYObjDef_xAOD.cxx        |  31 +-
 .../SUSYPhys/SUSYTools/Root/SUSYToolsInit.cxx |   2 +-
 .../SUSYPhys/SUSYTools/Root/Trigger.cxx       |   7 +
 .../SUSYPhys/SUSYTools/Root/Truth.cxx         |  10 +-
 .../SUSYTools/SUSYTools/SUSYObjDef_xAOD.h     |  60 +-
 .../data/MGPy8EG_A14N23LO_TT_bffN.txt         | 132 ++++
 .../SUSYTools/data/SUSYTools_Default.conf     |   3 +-
 .../mc15_13TeV/MGPy8EG_A14N23LO_C1C1_WW.txt   |  36 +
 .../MGPy8EG_A14N23LO_C1N2N1_GGMHino.txt       |   5 +-
 .../MGPy8EG_A14N23LO_GG_tb_X_Y_Z.txt          |  12 +
 .../mc15_13TeV/MGPy8EG_A14N23LO_TT_bWN.txt    |   1 +
 .../mc15_13TeV/MGPy8EG_A14N_GG_2stepWZ.txt    |  19 +
 .../MGPy8EG_A14N_SM_GG_N2_ZN1_XX_YY_2L.txt    | 104 ++-
 .../mc15_13TeV/MGPy8EG_GG_onestepCC_X_Y_Z.txt | 643 +++++++++---------
 ...raphPythia8EvtGen_A14NNPDF23LO_TT_bffN.txt |   3 +
 ...Pythia8EvtGen_A14NNPDF23LO_TT_directTT.txt |  98 +++
 .../SUSYPhys/SUSYTools/doc/README.rst         |   2 +-
 .../SUSYPhys/SUSYTools/doc/packages.txt       |   4 +-
 .../scripts/CheckDAODCompleteness.py          |  97 +++
 .../SUSYPhys/SUSYTools/src/ApplySUSYTools.cxx |  77 ++-
 .../SUSYTools/util/SUSYToolsTester.cxx        |   4 +-
 25 files changed, 995 insertions(+), 481 deletions(-)
 create mode 100644 PhysicsAnalysis/SUSYPhys/SUSYTools/data/MGPy8EG_A14N23LO_TT_bffN.txt
 create mode 100644 PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_A14N23LO_C1C1_WW.txt
 create mode 100644 PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_A14N23LO_GG_tb_X_Y_Z.txt
 create mode 100755 PhysicsAnalysis/SUSYPhys/SUSYTools/scripts/CheckDAODCompleteness.py

diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Electrons.cxx b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Electrons.cxx
index 4449a5fd9e2..ec45cbe3fbf 100644
--- a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Electrons.cxx
+++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Electrons.cxx
@@ -29,6 +29,13 @@
 
 namespace ST {
 
+  const static SG::AuxElement::Decorator<char>      dec_passSignalID("passSignalID");
+  const static SG::AuxElement::ConstAccessor<char>  acc_passSignalID("passSignalID");
+
+  const static SG::AuxElement::Decorator<float>     dec_z0sinTheta("z0sinTheta");
+  const static SG::AuxElement::ConstAccessor<float> acc_z0sinTheta("z0sinTheta");
+  const static SG::AuxElement::Decorator<float>     dec_d0sig("d0sig");
+  const static SG::AuxElement::ConstAccessor<float> acc_d0sig("d0sig");
 
 StatusCode SUSYObjDef_xAOD::GetElectrons(xAOD::ElectronContainer*& copy, xAOD::ShallowAuxContainer*& copyaux, bool recordSG, const std::string& elekey, const xAOD::ElectronContainer* containerToBeCopied)
 {
@@ -79,7 +86,7 @@ StatusCode SUSYObjDef_xAOD::GetElectrons(xAOD::ElectronContainer*& copy, xAOD::S
     //correct isolation and propagate to signal deco
     for (const auto& electron : *copy) {
       dec_isol(*electron) = m_isoCloseByTool->acceptCorrected(*electron, pVec);
-      if(m_doElIsoSignal) dec_signal(*electron) &= dec_isol(*electron); //add isolation to signal deco if requested
+      if(m_doElIsoSignal) dec_signal(*electron) &= acc_isol(*electron); //add isolation to signal deco if requested
     }
   }
 
@@ -194,9 +201,9 @@ bool SUSYObjDef_xAOD::IsSignalElectron(const xAOD::Electron & input, float etcut
   //overwrite ID selection if forced by user
   if(m_force_noElId) dec_passSignalID(input) = true;
 
-  if (!dec_passSignalID(input)) return false;
+  if (!acc_passSignalID(input)) return false;
 
-  if (!dec_baseline(input)) return false;
+  if (!acc_baseline(input)) return false;
   if (input.p4().Perp2() <= etcut * etcut || input.p4().Perp2() == 0) return false; // eT cut (might be necessary for leading electron to pass trigger)
   if ( etacut==DUMMYDEF ){
     if(fabs(input.eta()) > m_eleEta ) return false;
@@ -209,16 +216,16 @@ bool SUSYObjDef_xAOD::IsSignalElectron(const xAOD::Electron & input, float etcut
     }
   }
 
-  if (dec_d0sig(input) != 0) {
-    if (d0sigcut > 0.0 && fabs(dec_d0sig(input)) > d0sigcut) return false; // transverse IP cut
+  if (acc_d0sig(input) != 0) {
+    if (d0sigcut > 0.0 && fabs(acc_d0sig(input)) > d0sigcut) return false; // transverse IP cut
   }
 
-  if (z0cut > 0.0 && fabs(dec_z0sinTheta(input)) > z0cut) return false; // longitudinal IP cut
+  if (z0cut > 0.0 && fabs(acc_z0sinTheta(input)) > z0cut) return false; // longitudinal IP cut
 
 
-  ATH_MSG_VERBOSE( "IsSignalElectron: " << m_eleId << " " << dec_passSignalID(input) << " d0sig " << dec_d0sig(input) << " z0 sin(theta) " << dec_z0sinTheta(input) );
+  ATH_MSG_VERBOSE( "IsSignalElectron: " << m_eleId << " " << acc_passSignalID(input) << " d0sig " << acc_d0sig(input) << " z0 sin(theta) " << acc_z0sinTheta(input) );
 
-  if (dec_isol(input) || !m_doElIsoSignal) {
+  if (acc_isol(input) || !m_doElIsoSignal) {
     ATH_MSG_VERBOSE( "IsSignalElectron: passed isolation");
   } else return false; //isolation selection with IsoTool
 
@@ -399,7 +406,7 @@ float SUSYObjDef_xAOD::GetTotalElectronSF(const xAOD::ElectronContainer& electro
   float sf(1.);
 
   for (const auto& electron : electrons) {
-    if (dec_signal(*electron) && dec_passOR(*electron)) { sf *= this->GetSignalElecSF(*electron, recoSF, idSF, triggerSF, isoSF, trigExpr); }
+    if (acc_signal(*electron) && acc_passOR(*electron)) { sf *= this->GetSignalElecSF(*electron, recoSF, idSF, triggerSF, isoSF, trigExpr); }
   }
 
   return sf;
diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Jets.cxx b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Jets.cxx
index c9678005905..37c6422c2bb 100644
--- a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Jets.cxx
+++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Jets.cxx
@@ -31,6 +31,19 @@
 
 namespace ST {
 
+  const static SG::AuxElement::Decorator<char>     dec_bad("bad");
+  const static SG::AuxElement::ConstAccessor<char> acc_bad("bad");
+  
+  const static SG::AuxElement::Decorator<char>      dec_passJvt("passJvt");
+  const static SG::AuxElement::ConstAccessor<char>  acc_passJvt("passJvt");
+  const static SG::AuxElement::ConstAccessor<char>  acc_passFJvt("passFJvt");
+  const static SG::AuxElement::Decorator<double>    dec_jvtscalefact("jvtscalefact");    
+  
+  const static SG::AuxElement::Accessor<float> acc_jvt("jvt");
+  
+  const static SG::AuxElement::Decorator<char> dec_bjet("bjet");
+  const static SG::AuxElement::Decorator<char> dec_bjet_jetunc("bjet_jetunc"); //added for JetUncertainties usage
+  const static SG::AuxElement::Decorator<char> dec_bjet_loose("bjet_loose");
 
   StatusCode SUSYObjDef_xAOD::GetJets(xAOD::JetContainer*& copy, xAOD::ShallowAuxContainer*& copyaux, bool recordSG, const std::string& jetkey, const xAOD::JetContainer* containerToBeCopied) 
   {
@@ -142,6 +155,8 @@ namespace ST {
     for (const auto& jet : *copy) {
       ATH_CHECK( this->FillJet(*jet, true, true) );
       //...
+      const static SG::AuxElement::Decorator<int> dec_wtagged("wtagged");
+      const static SG::AuxElement::Decorator<int> dec_ztagged("ztagged");
       if ( doLargeRdecorations ){
 #ifdef XAOD_STANDALONE 
         dec_wtagged(*jet) = m_WTaggerTool->result(*jet);
@@ -270,7 +285,7 @@ namespace ST {
     dec_bjet_loose(input) = false;
     dec_effscalefact(input) = 1.;
 
-    if (!dec_passJvt(input)) {
+    if (!acc_passJvt(input)) {
       dec_baseline(input) = false;
       return StatusCode::SUCCESS;
     }
@@ -322,11 +337,11 @@ namespace ST {
   }
 
   bool SUSYObjDef_xAOD::IsSignalJet(const xAOD::Jet& input, float ptcut, float etacut) const {
-    if ( !dec_baseline(input)  || !dec_passOR(input) ) return false;
+    if ( !acc_baseline(input)  || !acc_passOR(input) ) return false;
 
     if ( input.pt() <= ptcut || fabs(input.eta()) >= etacut) return false;
 
-    bool isgoodjet = !dec_bad(input) && dec_passJvt(input);
+    bool isgoodjet = !acc_bad(input) && acc_passJvt(input);
 
     if (m_debug) {
       float emfrac, hecf, LArQuality, HECQuality, Timing,  fracSamplingMax, NegativeE, AverageLArQF;
@@ -361,7 +376,7 @@ namespace ST {
       ATH_MSG_INFO( "JET AverageLArQF: " << AverageLArQF );
     }
     dec_signal(input) = isgoodjet;
-    ATH_MSG_VERBOSE( "JET isbad?: " << (int) dec_bad(input) );
+    ATH_MSG_VERBOSE( "JET isbad?: " << (int) acc_bad(input) );
 
     return isgoodjet;
   }
@@ -369,18 +384,18 @@ namespace ST {
 
   bool SUSYObjDef_xAOD::IsBadJet(const xAOD::Jet& input) const {
 
-    if ( !dec_passOR(input) ) return false;
+    if ( !acc_passOR(input) ) return false;
 
     float ptcut = 20e3;
-    bool  isPileup = !dec_passJvt(input);
+    bool  isPileup = !acc_passJvt(input);
 
     if ( input.pt() <= ptcut || isPileup ) return false;
 
     dec_bad(input) = !m_jetCleaningTool->keep(input);
 
-    ATH_MSG_VERBOSE( "JET isbad?: " << (int) dec_bad(input) );
+    ATH_MSG_VERBOSE( "JET isbad?: " << (int) acc_bad(input) );
 
-    return dec_bad(input);
+    return acc_bad(input);
   }
 
 
@@ -430,10 +445,11 @@ namespace ST {
         if (!jet->getAttribute("HadronConeExclTruthLabelID", truthlabel)) {
           ATH_MSG_ERROR("Failed to get jet truth label!");
         }
-        ATH_MSG_VERBOSE("This jet is " << (dec_bjet(*jet) ? "" : "not ") << "b-tagged.");
+	const static SG::AuxElement::ConstAccessor<char> acc_bjet("bjet");
+        ATH_MSG_VERBOSE("This jet is " << (acc_bjet(*jet) ? "" : "not ") << "b-tagged.");
         ATH_MSG_VERBOSE("This jet's truth label is " << truthlabel);
 
-        if ( dec_bjet(*jet) ) {
+        if ( acc_bjet(*jet) ) {
           result = m_btagEffTool->getScaleFactor(*jet, sf);
 
           switch (result) {
@@ -465,7 +481,7 @@ namespace ST {
 
       dec_effscalefact(*jet) = sf;
 
-      if( dec_signal(*jet) && dec_passOR(*jet) ) totalSF *= sf; //consider goodjets only 
+      if( acc_signal(*jet) && acc_passOR(*jet) ) totalSF *= sf; //consider goodjets only 
 
     }
 
@@ -521,7 +537,7 @@ namespace ST {
         ATH_MSG_VERBOSE( " Retrieve SF for jet in SUSYTools_xAOD::JVT_SF with value " << sf );
       }
 
-      if( dec_signal(*jet) && dec_passOR(*jet) ) totalSF *= sf; //consider goodjets only 
+      if( acc_signal(*jet) && acc_passOR(*jet) ) totalSF *= sf; //consider goodjets only 
 
     }
 
diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/MET.cxx b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/MET.cxx
index 833dc5a3a8f..a6fadcaa208 100644
--- a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/MET.cxx
+++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/MET.cxx
@@ -19,6 +19,7 @@
 
 namespace ST {
 
+  const static SG::AuxElement::ConstAccessor<char> cacc_baseline("baseline");
 
 StatusCode SUSYObjDef_xAOD::GetMET(xAOD::MissingETContainer &met,
                                    const xAOD::JetContainer* jet,
@@ -62,7 +63,7 @@ StatusCode SUSYObjDef_xAOD::GetMET(xAOD::MissingETContainer &met,
     ATH_MSG_VERBOSE("Build electron MET");
     ConstDataVector<xAOD::ElectronContainer> metelectron(SG::VIEW_ELEMENTS);
     for (const auto& el : *elec) {
-      if (dec_baseline(*el)) {
+      if (cacc_baseline(*el)) {
         bool veto(false);
         if (invis) {
           for (const auto& ipart : *invis) {
@@ -79,7 +80,7 @@ StatusCode SUSYObjDef_xAOD::GetMET(xAOD::MissingETContainer &met,
     ATH_MSG_VERBOSE("Build photon MET");
     ConstDataVector<xAOD::PhotonContainer> metgamma(SG::VIEW_ELEMENTS);
     for (const auto& ph : *gamma) {
-      if (dec_baseline(*ph)) {
+      if (cacc_baseline(*ph)) {
         bool veto(false);
         if (invis) {
           for (const auto& ipart : *invis) {
@@ -96,7 +97,7 @@ StatusCode SUSYObjDef_xAOD::GetMET(xAOD::MissingETContainer &met,
     ATH_MSG_VERBOSE("Build tau MET");
     ConstDataVector<xAOD::TauJetContainer> mettau(SG::VIEW_ELEMENTS);
     for (const auto& tau : *taujet) {
-      if (dec_baseline(*tau)) {
+      if (cacc_baseline(*tau)) {
         bool veto(false);
         if (invis) {
           for (const auto& ipart : *invis) {
@@ -114,7 +115,7 @@ StatusCode SUSYObjDef_xAOD::GetMET(xAOD::MissingETContainer &met,
     ConstDataVector<xAOD::MuonContainer> metmuon(SG::VIEW_ELEMENTS);
     for (const auto& mu : *muon) {
       bool veto(false);
-      if (dec_baseline(*mu)) {
+      if (cacc_baseline(*mu)) {
         if (invis) {
           for (const auto& ipart : *invis) {
             if (ipart == mu) {veto = true; break;}
@@ -179,7 +180,7 @@ StatusCode SUSYObjDef_xAOD::GetTrackMET(xAOD::MissingETContainer &met,
     ATH_MSG_VERBOSE("Build electron MET");
     ConstDataVector<xAOD::ElectronContainer> metelectron(SG::VIEW_ELEMENTS);
     for (const auto& el : *elec) {
-      if (dec_baseline(*el)) metelectron.push_back(el);
+      if (cacc_baseline(*el)) metelectron.push_back(el);
     }
     ATH_CHECK( m_metMaker->rebuildMET(m_eleTerm, xAOD::Type::Electron, &met, metelectron.asDataVector(), metMap) );
   }
@@ -188,7 +189,7 @@ StatusCode SUSYObjDef_xAOD::GetTrackMET(xAOD::MissingETContainer &met,
     ATH_MSG_VERBOSE("Build muon MET");
     ConstDataVector<xAOD::MuonContainer> metmuon(SG::VIEW_ELEMENTS);
     for (const auto& mu : *muon) {
-      if (dec_baseline(*mu)) metmuon.push_back(mu);
+      if (cacc_baseline(*mu)) metmuon.push_back(mu);
     }
     ATH_CHECK( m_metMaker->rebuildMET(m_muonTerm, xAOD::Type::Muon, &met, metmuon.asDataVector(), metMap) );
   }
diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Muons.cxx b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Muons.cxx
index 002c13bfce0..1939c8ba10d 100644
--- a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Muons.cxx
+++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Muons.cxx
@@ -37,6 +37,16 @@
 
 namespace ST {
 
+  const static SG::AuxElement::Decorator<char>      dec_passedHighPtCuts("passedHighPtCuts");
+  const static SG::AuxElement::ConstAccessor<char>  acc_passedHighPtCuts("passedHighPtCuts");
+
+  const static SG::AuxElement::Decorator<char>      dec_passSignalID("passSignalID");
+
+  const static SG::AuxElement::Decorator<float>     dec_z0sinTheta("z0sinTheta");
+  const static SG::AuxElement::ConstAccessor<float> acc_z0sinTheta("z0sinTheta");
+  const static SG::AuxElement::Decorator<float>     dec_d0sig("d0sig");
+  const static SG::AuxElement::ConstAccessor<float> acc_d0sig("d0sig");
+
 StatusCode SUSYObjDef_xAOD::GetMuons(xAOD::MuonContainer*& copy, xAOD::ShallowAuxContainer*& copyaux, bool recordSG, const std::string& muonkey, const xAOD::MuonContainer* containerToBeCopied)
 {
   if (!m_tool_init) {
@@ -106,7 +116,7 @@ StatusCode SUSYObjDef_xAOD::GetMuons(xAOD::MuonContainer*& copy, xAOD::ShallowAu
     //correct isolation and propagate to signal deco
     for (const auto& muon : *copy) {
       dec_isol(*muon) = m_isoCloseByTool->acceptCorrected(*muon, pVec);
-      if(m_doMuIsoSignal) dec_signal(*muon) &= dec_isol(*muon); //add isolation to signal deco if requested
+      if(m_doMuIsoSignal) dec_signal(*muon) &= acc_isol(*muon); //add isolation to signal deco if requested
     }
   }
 
@@ -232,7 +242,7 @@ StatusCode SUSYObjDef_xAOD::FillMuon(xAOD::Muon& input, float ptcut, float etacu
 bool SUSYObjDef_xAOD::IsSignalMuon(const xAOD::Muon & input, float ptcut, float d0sigcut, float z0cut, float etacut) const
 {
 
-  if (!dec_baseline(input)) return false;
+  if (!acc_baseline(input)) return false;
 
   if (input.pt() <= ptcut || input.pt() == 0) return false; // pT cut (might be necessary for leading muon to pass trigger)
   if ( etacut==DUMMYDEF ){
@@ -240,12 +250,12 @@ bool SUSYObjDef_xAOD::IsSignalMuon(const xAOD::Muon & input, float ptcut, float
   }
   else if ( fabs(input.eta()) > etacut ) return false;
 
-  if (z0cut > 0.0 && fabs(dec_z0sinTheta(input)) > z0cut) return false; // longitudinal IP cut
+  if (z0cut > 0.0 && fabs(acc_z0sinTheta(input)) > z0cut) return false; // longitudinal IP cut
   if (dec_d0sig(input) != 0) {
-    if (d0sigcut > 0.0 && fabs(dec_d0sig(input)) > d0sigcut) return false; // transverse IP cut
+    if (d0sigcut > 0.0 && fabs(acc_d0sig(input)) > d0sigcut) return false; // transverse IP cut
   }
 
-  if (dec_isol(input) || !m_doMuIsoSignal) {
+  if (acc_isol(input) || !m_doMuIsoSignal) {
     ATH_MSG_VERBOSE( "IsSignalMuon: passed isolation");
   } else return false; //isolation selection with IsoTool
 
@@ -257,17 +267,17 @@ bool SUSYObjDef_xAOD::IsSignalMuon(const xAOD::Muon & input, float ptcut, float
 
   if (m_muId == 4) { //i.e. HighPt muons
     ATH_MSG_VERBOSE( "IsSignalMuon: mu pt " << input.pt()
-                     << " signal? " << (int) dec_signal(input)
-                     << " isolation? " << (int) dec_isol(input)
-                     << " passedHighPtCuts? " << (int) dec_passedHighPtCuts(input));
+                     << " signal? " << (int) acc_signal(input)
+                     << " isolation? " << (int) acc_isol(input)
+                     << " passedHighPtCuts? " << (int) acc_passedHighPtCuts(input));
   } else {
     ATH_MSG_VERBOSE( "IsSignalMuon: mu pt " << input.pt()
-                     << " signal? " << (int) dec_signal(input)
-                     << " isolation? " << (int) dec_isol(input));
+                     << " signal? " << (int) acc_signal(input)
+                     << " isolation? " << (int) acc_isol(input));
     // Don't show HighPtFlag ... we didn't set it!
   }
 
-  return dec_signal(input);
+  return acc_signal(input);
 }
 
 
@@ -282,15 +292,16 @@ bool SUSYObjDef_xAOD::IsHighPtMuon(const xAOD::Muon& input) const
     return false;
   }
   
-  if (m_muonSelectionTool->passedHighPtCuts(input)) {
-    dec_passedHighPtCuts(input) = true;
-  }
-  return dec_passedHighPtCuts(input);
+  bool isHighPt = m_muonSelectionTool->passedHighPtCuts(input);
+  dec_passedHighPtCuts(input) = isHighPt;
+  return isHighPt;
+  
 }
 
 
 bool SUSYObjDef_xAOD::IsBadMuon(const xAOD::Muon& input, float qopcut) const
 {
+  const static SG::AuxElement::Decorator<char> dec_bad("bad");
   dec_bad(input) = false;
 
   //const xAOD::TrackParticle* track = input.primaryTrackParticle();   //no need for SAF muon special treatment anymore!
@@ -313,12 +324,13 @@ bool SUSYObjDef_xAOD::IsBadMuon(const xAOD::Muon& input, float qopcut) const
 
   dec_bad(input) = isbad;
 
-  ATH_MSG_VERBOSE( "MUON isbad?: " << (int) dec_bad(input) );
-  return dec_bad(input);
+  ATH_MSG_VERBOSE( "MUON isbad?: " << isbad );
+  return isbad;
 }
 
 bool SUSYObjDef_xAOD::IsCosmicMuon(const xAOD::Muon& input, float z0cut, float d0cut) const
 {
+  const static SG::AuxElement::Decorator<char> dec_cosmic("cosmic");
   dec_cosmic(input) = false;
 
   const xAOD::TrackParticle* track;
@@ -493,7 +505,7 @@ double SUSYObjDef_xAOD::GetTotalMuonSF(const xAOD::MuonContainer& muons, const b
 
   ConstDataVector<xAOD::MuonContainer> sfmuons(SG::VIEW_ELEMENTS);
   for (const auto& muon : muons) {
-    if (dec_signal(*muon) && dec_passOR(*muon)) {
+    if (acc_signal(*muon) && acc_passOR(*muon)) {
       sfmuons.push_back(muon);
       if (recoSF || isoSF) { sf *= this->GetSignalMuonSF(*muon, recoSF, isoSF); }
     }
diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/SUSYObjDef_xAOD.cxx b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/SUSYObjDef_xAOD.cxx
index ae61267b048..70e06fa79b1 100644
--- a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/SUSYObjDef_xAOD.cxx
+++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/SUSYObjDef_xAOD.cxx
@@ -286,36 +286,7 @@ SUSYObjDef_xAOD::SUSYObjDef_xAOD( const std::string& name )
 #endif
     //
     m_pmgSHnjetWeighter(""),
-    m_pmgSHnjetWeighterWZ(""),
-    // accessors and decorations
-    dec_baseline("baseline"),
-    dec_signal("signal"),
-    dec_isol("isol"),
-    dec_passJvt("passJvt"),
-    dec_passOR("passOR"),
-    //dec_passBaseID("passBaseID"),
-    dec_passSignalID("passSignalID"),
-    dec_bad("bad"),
-    dec_bjet("bjet"),
-    dec_bjet_jetunc("IsBjet"), //added for JetUncertainties usage
-    dec_bjet_loose("bjet_loose"),
-    dec_cosmic("cosmic"),
-    dec_passedHighPtCuts("passedHighPtCuts"),
-    dec_wtagged("Wtag"),
-    dec_ztagged("Ztag"),
-    dec_trigmatched("trigger_matched"),
-    dec_effscalefact("effscalefact"),
-    dec_trigscalefact("trigscalefact"),
-    dec_jvtscalefact("jvtscalefact"),    
-    dec_z0sinTheta("z0sinTheta"),
-    dec_d0sig("d0sig"),
-    acc_OQ("OQ"),
-    acc_jvt("Jvt"),
-    acc_passFJvt("passFJVT"),
-    acc_truthType("truthType"),
-    acc_truthOrigin("truthOrigin"),
-    acc_bkgTruthOrigin("bkgTruthOrigin"),
-    randomrunnumber("RandomRunNumber")
+    m_pmgSHnjetWeighterWZ("")
 {
   //General settings
   declareProperty( "DataSource", m_dataSource = Undefined );
diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/SUSYToolsInit.cxx b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/SUSYToolsInit.cxx
index ec200ceef6d..064e464ad27 100644
--- a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/SUSYToolsInit.cxx
+++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/SUSYToolsInit.cxx
@@ -166,7 +166,7 @@ StatusCode SUSYObjDef_xAOD::SUSYToolsInit()
     std::string JES_config_file("JES_data2016_data2015_Recommendation_Dec2016.config"); //JES_MC15cRecommendation_May2016.config");
     
     if(m_JMScalib){ //with JMS calibration (if requested)
-      JES_config_file = "JES_MC15cRecommendation_May2016_JMS.config";
+      JES_config_file = "JES_data2016_data2015_Recommendation_Dec2016_JMS.config";
     }
     
 #else
diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Trigger.cxx b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Trigger.cxx
index b1db5e1a5b3..f957cf4c13a 100644
--- a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Trigger.cxx
+++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Trigger.cxx
@@ -11,6 +11,7 @@
 #include "TrigConfInterfaces/ITrigConfigTool.h"
 #include "TrigDecisionTool/TrigDecisionTool.h"
 #include "TriggerMatchingTool/MatchingTool.h"
+#include "TrigDecisionTool/FeatureContainer.h"
 
 #include "xAODTrigMissingET/TrigMissingETContainer.h"
 
@@ -22,6 +23,7 @@
 
 namespace ST {
 
+  const static SG::AuxElement::Decorator<int> dec_trigmatched("trigmatched");
 
 bool SUSYObjDef_xAOD::IsMETTrigPassed(unsigned int runnumber) {
 
@@ -321,5 +323,10 @@ const Trig::ChainGroup* SUSYObjDef_xAOD::GetTrigChainGroup(const std::string& tr
 
   }
 
+  Trig::FeatureContainer SUSYObjDef_xAOD::GetTriggerFeatures(const std::string& chainName, unsigned int condition) const
+  {
+    return m_trigDecTool->features(chainName,condition);
+  }
+
 
 }
diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Truth.cxx b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Truth.cxx
index 81a17423796..4e1bbb558b6 100644
--- a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Truth.cxx
+++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Truth.cxx
@@ -302,18 +302,20 @@ bool SUSYObjDef_xAOD::FindSusyHardProc(const xAOD::TruthEvent *truthE, int& pdgi
 
 bool SUSYObjDef_xAOD::IsTruthBJet(const xAOD::Jet& input) const {
   //Method to set correctly the IsBjet decoration needed by the JetUncertainties tool
-
-  if (dec_signal(input)) {
+  bool isBjet = false;
+  if (acc_signal(input)) {
 
     int truthlabel(-1);
     if (!input.getAttribute("HadronConeExclTruthLabelID", truthlabel)) {
       ATH_MSG_ERROR("Failed to get jet truth label!");
     }
 
-    if (std::abs(truthlabel) == 5) dec_bjet_jetunc(input) = true;
+    isBjet = std::abs(truthlabel) == 5;
+    const static SG::AuxElement::Decorator<char> dec_bjet_jetunc("bjet_jetunc"); //added for JetUncertainties usage
+    dec_bjet_jetunc(input) = isBjet;
 
   }
-  return dec_bjet_jetunc(input);
+  return isBjet;
 }
 
 }
diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/SUSYTools/SUSYObjDef_xAOD.h b/PhysicsAnalysis/SUSYPhys/SUSYTools/SUSYTools/SUSYObjDef_xAOD.h
index 823ff8d48c2..3b3845cccd1 100644
--- a/PhysicsAnalysis/SUSYPhys/SUSYTools/SUSYTools/SUSYObjDef_xAOD.h
+++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/SUSYTools/SUSYObjDef_xAOD.h
@@ -97,6 +97,7 @@ namespace TrigConf {
 namespace Trig {
   class TrigDecisionTool;
   class IMatchingTool;
+  class FeatureContainer;
 }
 
 class IWeightTool;
@@ -280,14 +281,12 @@ namespace ST {
     void TrigMatch(const xAOD::IParticleContainer* v,  const std::string& item) override final;
     void TrigMatch(const std::initializer_list<const xAOD::IParticle*> &v, const std::string& item) override final;
 
+    // Trigger helpers
     float GetTrigPrescale(const std::string&) const override final;
-
     const Trig::ChainGroup* GetTrigChainGroup(const std::string&) const override final;
-
     std::vector<std::string> GetTriggerOR(std::string trigExpr) const;
-
     void GetTriggerTokens(std::string, std::vector<std::string>& , std::vector<std::string>& ) const;
-
+    Trig::FeatureContainer GetTriggerFeatures(const std::string& chainName = "EF_.*", unsigned int condition = TrigDefs::Physics) const;
 
     float GetPileupWeight() override final;
 
@@ -668,40 +667,29 @@ namespace ST {
     asg::AnaToolHandle<IWeightTool> m_pmgSHnjetWeighterWZ;
     //
 
-
-    // accessors and decorations
-    SG::AuxElement::Decorator<char> dec_baseline;
-    SG::AuxElement::Decorator<char> dec_signal;
-    SG::AuxElement::Decorator<char> dec_isol;
-    SG::AuxElement::Decorator<char> dec_passJvt;
-    SG::AuxElement::Decorator<char> dec_passOR;
-    //    SG::AuxElement::Decorator<char> dec_passBaseID;
-    SG::AuxElement::Decorator<char> dec_passSignalID;
-    SG::AuxElement::Decorator<char> dec_bad;
-    SG::AuxElement::Decorator<char> dec_bjet;
-    SG::AuxElement::Decorator<char> dec_bjet_jetunc; //added for JetUncertainties usage
-    SG::AuxElement::Decorator<char> dec_bjet_loose;
-    SG::AuxElement::Decorator<char> dec_cosmic;
-    SG::AuxElement::Decorator<char> dec_passedHighPtCuts;
-    SG::AuxElement::Decorator<int> dec_wtagged;
-    SG::AuxElement::Decorator<int> dec_ztagged;
-    SG::AuxElement::Decorator<int> dec_trigmatched;
-    SG::AuxElement::Decorator<double> dec_effscalefact;
-    SG::AuxElement::Decorator<double> dec_trigscalefact;
-    SG::AuxElement::Decorator<double> dec_jvtscalefact;    
-    SG::AuxElement::Decorator<float> dec_z0sinTheta;
-    SG::AuxElement::Decorator<float> dec_d0sig;
-    
-    SG::AuxElement::Accessor<unsigned int> acc_OQ;
-    SG::AuxElement::Accessor<float>  acc_jvt;
-    SG::AuxElement::Accessor<char>   acc_passFJvt;
-    SG::AuxElement::Accessor<int> acc_truthType;
-    SG::AuxElement::Accessor<int> acc_truthOrigin;
-    SG::AuxElement::Accessor<int> acc_bkgTruthOrigin;
-    SG::AuxElement::Accessor<unsigned int> randomrunnumber;
-
   }; // Class SUSYObjDef_xAOD
 
+  // decorators
+  const static SG::AuxElement::Decorator<char> dec_baseline("baseline");
+  const static SG::AuxElement::Decorator<char> dec_signal("signal");
+  const static SG::AuxElement::Decorator<char> dec_isol("isol");
+  const static SG::AuxElement::Decorator<char> dec_passOR("passOR");
+  //    const static SG::AuxElement::Decorator<char> dec_passBaseID("passBaseID");
+  const static SG::AuxElement::Decorator<double> dec_effscalefact("effscalefact");
+  // const static SG::AuxElement::Decorator<double> dec_trigscalefact("trigscalefact");
+
+  // const accessors for reading decorations that we set
+  const static SG::AuxElement::ConstAccessor<char> acc_baseline("baseline");
+  const static SG::AuxElement::ConstAccessor<char> acc_signal("signal");
+  const static SG::AuxElement::ConstAccessor<char> acc_isol("isol");
+  const static SG::AuxElement::ConstAccessor<char> acc_passOR("passOR");
+  // more decorations that are set externally
+  const static SG::AuxElement::ConstAccessor<unsigned int> acc_OQ("OQ");
+  const static SG::AuxElement::ConstAccessor<int> acc_truthType("truthType");
+  const static SG::AuxElement::ConstAccessor<int> acc_truthOrigin("truthOrigin");
+  const static SG::AuxElement::ConstAccessor<int> acc_bkgTruthOrigin("bkgTruthOrigin");
+  const static SG::AuxElement::ConstAccessor<unsigned int> randomrunnumber("RandomRunNumber");
+
 } // namespace ST
 
 
diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/data/MGPy8EG_A14N23LO_TT_bffN.txt b/PhysicsAnalysis/SUSYPhys/SUSYTools/data/MGPy8EG_A14N23LO_TT_bffN.txt
new file mode 100644
index 00000000000..f14b9c4593c
--- /dev/null
+++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/data/MGPy8EG_A14N23LO_TT_bffN.txt
@@ -0,0 +1,132 @@
+# grid   : pair production of stop1 decaying to a N1. 13 TeV.
+# author : cmerlass@cern.ch (please report any problems
+# date   : 25/01/2017
+# brief  : Based on https://twiki.cern.ch/twiki/bin/view/LHCPhysics/SUSYCrossSections13TeVstopsbottom
+# Filter efficiencies from AMI
+#
+#  DSID                 FS                   CROSSECTION[pb]      K-FACTOR             FILTEREFF            REL.UNCERT          
+   387928               61                   7.6836               1.0                  0.0066624            0.139505            
+   387929               61                   7.6836               1.0                  0.0053356            0.139505            
+   387930               61                   7.6836               1.0                  0.0044461            0.139505            
+   387931               61                   7.6836               1.0                  0.0029297            0.139505            
+   387932               61                   7.6836               1.0                  0.0010945            0.139505            
+   387933               61                   2.1575               1.0                  0.0072006            0.141584            
+   387934               61                   2.1575               1.0                  0.0056962            0.141584            
+   387935               61                   2.1575               1.0                  0.0047191            0.141584            
+   387936               61                   2.1575               1.0                  0.0030751            0.141584            
+   387937               61                   2.1575               1.0                  0.0011279            0.141584            
+   387938               61                   8.51615              1.0                  0.0076558            0.139223            
+   387939               61                   8.51615              1.0                  0.0060246            0.139223            
+   388830               61                   8.51615              1.0                  0.0049143            0.139223            
+   388831               61                   8.51615              1.0                  0.003203             0.139223            
+   388832               61                   8.51615              1.0                  0.001167             0.139223            
+   388833               61                   6.08444              1.0                  0.0080874            0.137957            
+   388834               61                   6.08444              1.0                  0.006354             0.137957            
+   388835               61                   6.08444              1.0                  0.0051353            0.137957            
+   388836               61                   6.08444              1.0                  0.0033035            0.137957            
+   388837               61                   6.08444              1.0                  0.0011907            0.137957            
+   388838               61                   3.78661              1.0                  0.0086203            0.136877            
+   388839               61                   3.78661              1.0                  0.0067572            0.136877            
+   388840               61                   3.78661              1.0                  0.0055334            0.136877            
+   388841               61                   3.78661              1.0                  0.0034816            0.136877            
+   388842               61                   3.78661              1.0                  0.0012341            0.136877            
+   388843               61                   2.43031              1.0                  0.0091509            0.136999            
+   388844               61                   2.43031              1.0                  0.0071341            0.136999            
+   388845               61                   2.43031              1.0                  0.0058212            0.136999            
+   388846               61                   2.43031              1.0                  0.0036623            0.136999            
+   388847               61                   2.43031              1.0                  0.0012778            0.136999            
+   388848               61                   1.83537              1.0                  0.0095495            0.136985            
+   388849               61                   1.83537              1.0                  0.0073424            0.136985            
+   388850               61                   1.83537              1.0                  0.0059381            0.136985            
+   388851               61                   1.83537              1.0                  0.0037221            0.136985            
+   388852               61                   1.83537              1.0                  0.0013081            0.136985            
+   388853               61                   0.948333             1.0                  0.10103              0.134559            
+   388854               61                   0.948333             1.0                  0.0079229            0.134559            
+   388855               61                   0.948333             1.0                  0.006348             0.134559            
+   388856               61                   0.948333             1.0                  0.0039262            0.134559            
+   388857               61                   0.948333             1.0                  0.0013626            0.134559            
+   388858               61                   0.51848              1.0                  0.10676              0.133797            
+   388859               61                   0.51848              1.0                  0.008342             0.133797            
+   388860               61                   0.51848              1.0                  0.0066251            0.133797            
+   388861               61                   0.51848              1.0                  0.0040937            0.133797            
+   388862               61                   0.51848              1.0                  0.0014032            0.133797            
+   388863               61                   0.296128             1.0                  0.11066              0.132687            
+   388864               61                   0.296128             1.0                  0.0086137            0.132687            
+   388865               61                   0.296128             1.0                  0.0069098            0.132687            
+   388866               61                   0.296128             1.0                  0.0042278            0.132687            
+   388867               61                   0.296128             1.0                  0.0014336            0.132687            
+   388868               61                   0.174599             1.0                  0.11513              0.132074            
+   388869               61                   0.174599             1.0                  0.0090103            0.132074            
+   388870               61                   0.174599             1.0                  0.0071503            0.132074            
+   388871               61                   0.174599             1.0                  0.0044145            0.132074            
+   388872               61                   0.174599             1.0                  0.0014716            0.132074            
+   388873               61                   0.107045             1.0                  0.11901              0.129232            
+   388874               61                   0.107045             1.0                  0.0092797            0.129232            
+   388875               61                   0.107045             1.0                  0.0073584            0.129232            
+   388876               61                   0.107045             1.0                  0.0044725            0.129232            
+   388877               61                   0.107045             1.0                  0.0014906            0.129232            
+   389982               61                   1.5949               1.0                  0.10288              0.140595            
+   389983               61                   1.5949               1.0                  0.0022692            0.140595            
+   389984               61                   3.3231               1.0                  0.26477              0.142549            
+   389985               61                   3.3231               1.0                  0.10299              0.142549            
+   389986               61                   3.3231               1.0                  0.0022402            0.142549            
+   389987               61                   8.51615              1.0                  0.26528              0.139223            
+   389988               61                   8.51615              1.0                  0.10255              0.139223            
+   389989               61                   8.51615              1.0                  0.0022104            0.139223            
+   389990               61                   5.60471              1.0                  0.26649              0.138144            
+   389991               61                   5.60471              1.0                  0.10267              0.138144            
+   389992               61                   5.60471              1.0                  0.0021777            0.138144            
+   389993               61                   3.78661              1.0                  0.26642              0.136877            
+   389994               61                   3.78661              1.0                  0.10225              0.136877            
+   389995               61                   3.78661              1.0                  0.0021391            0.136877            
+   389996               61                   2.61162              1.0                  0.26878              0.138477            
+   389997               61                   2.61162              1.0                  0.10165              0.138477            
+   389998               61                   2.61162              1.0                  0.0021208            0.138477            
+   389999               61                   1.83537              1.0                  0.26758              0.136985            
+   390000               61                   1.83537              1.0                  0.10214              0.136985            
+   390001               61                   1.83537              1.0                  0.0020916            0.136985            
+   390002               61                   1.31169              1.0                  0.2675               0.135013            
+   390003               61                   1.31169              1.0                  0.10223              0.135013            
+   390004               61                   1.31169              1.0                  0.0020639            0.135013            
+   390005               61                   0.948333             1.0                  0.27004              0.134559            
+   390006               61                   0.948333             1.0                  0.10146              0.134559            
+   390007               61                   0.948333             1.0                  0.0020294            0.134559            
+   390008               61                   0.697075             1.0                  0.26416              0.133926            
+   390009               61                   0.697075             1.0                  0.1024               0.133926            
+   390010               61                   0.697075             1.0                  0.0020387            0.133926            
+   390011               61                   0.51848              1.0                  0.26958              0.133797            
+   390012               61                   0.51848              1.0                  0.10045              0.133797            
+   390013               61                   0.51848              1.0                  0.0019966            0.133797            
+   390014               61                   0.390303             1.0                  0.27155              0.133443            
+   390015               61                   0.390303             1.0                  0.10293              0.133443            
+   390016               61                   0.390303             1.0                  0.0019936            0.133443            
+   390017               61                   0.296128             1.0                  0.26588              0.132687            
+   390018               61                   0.296128             1.0                  0.0099796            0.132687            
+   390019               61                   0.296128             1.0                  0.0019494            0.132687            
+   390850               61                   1.5949               1.0                  0.21912              0.140595            
+   390851               61                   1.5949               1.0                  0.23771              0.140595            
+   390852               61                   1.5949               1.0                  0.25111              0.140595            
+   390853               61                   8.51615              1.0                  0.26817              0.139223            
+   390854               61                   8.51615              1.0                  0.26006              0.139223            
+   390855               61                   8.51615              1.0                  0.27407              0.139223            
+   390856               61                   8.51615              1.0                  0.28694              0.139223            
+   390857               61                   3.78661              1.0                  0.31539              0.136877            
+   390858               61                   3.78661              1.0                  0.30352              0.136877            
+   390859               61                   3.78661              1.0                  0.31305              0.136877            
+   390860               61                   3.78661              1.0                  0.32442              0.136877            
+   390861               61                   1.83537              1.0                  0.35195              0.136985            
+   390862               61                   1.83537              1.0                  0.33914              0.136985            
+   390863               61                   1.83537              1.0                  0.34578              0.136985            
+   390864               61                   1.83537              1.0                  0.35412              0.136985            
+   390865               61                   0.948333             1.0                  0.38432              0.134559            
+   390866               61                   0.948333             1.0                  0.36697              0.134559            
+   390867               61                   0.948333             1.0                  0.37475              0.134559            
+   390868               61                   0.948333             1.0                  0.38388              0.134559            
+   390869               61                   0.51848              1.0                  0.41403              0.133797            
+   390870               61                   0.51848              1.0                  0.39949              0.133797            
+   390871               61                   0.51848              1.0                  0.39964              0.133797            
+   390872               61                   0.51848              1.0                  0.40558              0.133797            
+   390873               61                   0.296128             1.0                  0.43543              0.132687            
+   390874               61                   0.296128             1.0                  0.41681              0.132687            
+   390875               61                   0.296128             1.0                  0.42049              0.132687            
+   390876               61                   0.296128             1.0                  0.4231               0.132687            
diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/data/SUSYTools_Default.conf b/PhysicsAnalysis/SUSYPhys/SUSYTools/data/SUSYTools_Default.conf
index 1020224f554..093d7edb6e5 100644
--- a/PhysicsAnalysis/SUSYPhys/SUSYTools/data/SUSYTools_Default.conf
+++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/data/SUSYTools_Default.conf
@@ -100,6 +100,7 @@ OR.BtagWP: FixedCutBEff_85
 OR.DoFatJets: false
 OR.EleFatJetDR: 1.
 OR.JetFatJetDR: 1.
+#OR.InputLabel: baseline
 #
 SigLep.RequireIso: true 
 #SigEl.RequireIso: true
@@ -124,7 +125,7 @@ MET.GreedyPhotons: 0
 PRW.MuUncertainty: 0.2
 #
 # Trigger SFs configuration
-Ele.TriggerSFStringSingle: SINGLE_E_2015_e24_lhmedium_L1EM20VH_OR_e60_lhmedium_OR_e120_lhloose_2016_e24_lhtight_nod0_ivarloose_OR_e60_lhmedium_nod0_OR_e140_lhloose_nod0
+Ele.TriggerSFStringSingle: SINGLE_E_2015_e24_lhmedium_L1EM20VH_OR_e60_lhmedium_OR_e120_lhloose_2016_e26_lhtight_nod0_ivarloose_OR_e60_lhmedium_nod0_OR_e140_lhloose_nod0
 Ele.TriggerSFStringDi: DI_E_2015_e12_lhloose_L1EM10VH_2016_e17_lhvloose_nod0
 Ele.TriggerSFStringMixedLepton: DI_E_2015_e17_lhloose_2016_e17_lhloose
 #
diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_A14N23LO_C1C1_WW.txt b/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_A14N23LO_C1C1_WW.txt
new file mode 100644
index 00000000000..f6b897f2f49
--- /dev/null
+++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_A14N23LO_C1C1_WW.txt
@@ -0,0 +1,36 @@
+#SAMPLE     FS   CROSSECTION[pb]     K-FACTOR     FILTEREFF   REL.UNCERT
+393650    157    11.6119      1.00     5.2647E-02    0.0446622  #100p0_1p0
+393651    157    11.6119      1.00     5.1548E-02    0.0446622  #100p0_15p0
+393652    157    11.6119      1.00     4.7104E-02    0.0446622  #100p0_25p0
+393653    157    11.6119      1.00     3.6461E-02    0.0446622  #100p0_50p0
+393654    157    11.6119      1.00     1.9800E-02    0.0446622  #100p0_75p0
+393656    157    2.61231      1.00     5.7929E-02    0.0528865  #150p0_50p0
+393657    157    2.61231      1.00     5.6603E-02    0.0528865  #150p0_65p0
+393658    157    2.61231      1.00     5.2751E-02    0.0528865  #150p0_75p0
+393659    157    2.61231      1.00     3.9846E-02    0.0528865  #150p0_100p0
+393661    157    0.902569     1.00     6.4868E-02    0.0595424  #200p0_1p0
+393662    157    0.902569     1.00     6.3972E-02    0.0595424  #200p0_50p0
+393663    157    0.902569     1.00     6.1268E-02    0.0595424  #200p0_100p0
+393664    157    0.902569     1.00     6.0184E-02    0.0595424  #200p0_115p0
+393665    157    0.902569     1.00     5.5429E-02    0.0595424  #200p0_125p0
+393666    157    0.902569     1.00     4.2754E-02    0.0595424  #200p0_150p0
+393668    157    0.387534     1.00     6.7444E-02    0.0653184  #250p0_1p0
+393670    157    0.387534     1.00     6.6589E-02    0.0653184  #250p0_100p0
+393671    157    0.387534     1.00     6.3534E-02    0.0653184  #250p0_150p0
+393672    157    0.387534     1.00     4.3659E-02    0.0653184  #250p0_200p0
+393674    157    0.190159     1.00     7.1427E-02    0.0706977  #300p0_1p0
+393675    157    0.190159     1.00     7.1455E-02    0.0706977  #300p0_50p0
+393676    157    0.190159     1.00     6.9315E-02    0.0706977  #300p0_100p0
+393677    157    0.190159     1.00     6.8464E-02    0.0706977  #300p0_150p0
+393678    157    0.190159     1.00     6.5195E-02    0.0706977  #300p0_200p0
+393679    157    0.190159     1.00     4.4733E-02    0.0706977  #300p0_250p0
+393681    157    0.0586311    1.00     7.8643E-02    0.080633   #400p0_1p0
+393682    157    0.0586311    1.00     7.7957E-02    0.080633   #400p0_50p0
+393683    157    0.0586311    1.00     7.7315E-02    0.080633   #400p0_100p0
+393684    157    0.0586311    1.00     7.7176E-02    0.080633   #400p0_150p0
+393685    157    0.0586311    1.00     7.3571E-02    0.080633   #400p0_200p0
+393686    157    0.0586311    1.00     6.6160E-02    0.080633   #400p0_300p0
+393687    157    0.0586311    1.00     4.5722E-02    0.080633   #400p0_350p0
+393688    157    0.0221265    1.00     8.5140E-02    0.0880862  #500p0_1p0
+393690    157    0.0221265    1.00     8.1471E-02    0.0880862  #500p0_200p0
+393692    157    0.0221265    1.00     6.6260E-02    0.0880862  #500p0_400p0
diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_A14N23LO_C1N2N1_GGMHino.txt b/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_A14N23LO_C1N2N1_GGMHino.txt
index a60045bb98b..166b6c737ea 100644
--- a/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_A14N23LO_C1N2N1_GGMHino.txt
+++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_A14N23LO_C1N2N1_GGMHino.txt
@@ -3,9 +3,8 @@
 # update :
 # brief  : Based on https://twiki.cern.ch/twiki/bin/view/LHCPhysics/SUSYCrossSections13TeVhino
 # note : for the GGMHinohyy_XX_2G15 samples, an event-level correction must be made (hh: no correction, hH: apply a 2.28E-3 event weight, HH: apply a 5.20E-6 weight)
-# the two 95 GeV datasets (393300, 393310) are awaiting xs calculation
 # format : datasetID   finalState   XS   BF   filterEff   relUncertainty
-393300	-1	-1	1	0.004941	-1
+393300	-1	20.4874	1	0.004941	0.035
 393301	-1	16.7972	1	0.005412	0.0359233
 393302	-1	6.9554	1	0.006657	0.039692
 393303	-1	3.83231	1	0.006996	0.0413612
@@ -15,7 +14,7 @@
 393307	-1	0.0338387	1	0.012900	0.0802572
 393308	-1	0.0146677	1	0.014074	0.0900693
 393309	-1	0.00346143	1	0.015582	0.107618
-393310	-1	-1	1	0.109360	-1
+393310	-1	20.4874	1	0.109360	0.035
 393311	-1	16.7972	1	0.112740	0.0359233
 393312	-1	6.9554	1	0.120870	0.039692
 393313	-1	3.83231	1	0.126600	0.0413612
diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_A14N23LO_GG_tb_X_Y_Z.txt b/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_A14N23LO_GG_tb_X_Y_Z.txt
new file mode 100644
index 00000000000..f8bdd8a920e
--- /dev/null
+++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_A14N23LO_GG_tb_X_Y_Z.txt
@@ -0,0 +1,12 @@
+# date: Jan 25 2017
+## format : datasetID   finalState   XS(pb)   K-factor   filterEff    relUncertainty
+373840  2	 0.0141714504	1.0000	1.0000	0.228925
+373841  2	 0.0016337908	1.0000	1.0000	0.300377
+373842  2	 0.0005919180	1.0000	1.0000	0.339326
+373844  2	 0.0016337908	1.0000	1.0000	0.300377
+373845  2	 0.0005919180	1.0000	1.0000	0.339326
+373846  2	 0.0002190490	1.0000	1.0000	0.385249
+373847  2	 0.0080897603	1.0000	1.0000	0.244372
+373848  2	 0.0027583649	1.0000	1.0000	0.282458
+373849  2	 0.0009802603	1.0000	1.0000	0.319521
+373850  2	 0.0005919180	1.0000	1.0000	0.339326
diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_A14N23LO_TT_bWN.txt b/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_A14N23LO_TT_bWN.txt
index bc481b6ee05..d8de7bbd22a 100644
--- a/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_A14N23LO_TT_bWN.txt
+++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_A14N23LO_TT_bWN.txt
@@ -53,6 +53,7 @@ DSID     FS   CROSSECTION[pb]     K-FACTOR     FILTEREFF   REL.UNCERT
 387987   61       0.107045         1.0          0.638900     0.129232
 387988   61       0.107045         1.0          0.552940     0.129232
 387989   61       0.107045         1.0          0.484290     0.129232
+387990   61       36.3818	   1.0		3.0539E-01   0.142189
 387991   61       1.31169          1.0          0.079369     0.135013
 387992   61       1.31169          1.0          0.060306     0.135013
 387993   61       1.31169          1.0          0.049720     0.135013
diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_A14N_GG_2stepWZ.txt b/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_A14N_GG_2stepWZ.txt
index 57938a0a669..6a177a8e5c7 100644
--- a/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_A14N_GG_2stepWZ.txt
+++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_A14N_GG_2stepWZ.txt
@@ -110,3 +110,22 @@ SAMPLE     FS   CROSSECTION[pb]     K-FACTOR     FILTEREFF   REL.UNCERT
 371308      2      0.0009802603   1.00000000    1.00000000   0.31952110
 371309      2      0.0856417975   1.00000000    1.00000000   0.18481426
 371310      2      0.0459823026   1.00000000    1.00000000   0.19822566
+371311      2      0.0459823026   1.00000000    1.00000000   0.19822566
+371312      2      0.0252601268   1.00000000    1.00000000   0.21096327
+371313      2      0.0252601268   1.00000000    1.00000000   0.21096327
+371314      2      0.0252601268   1.00000000    1.00000000   0.21096327
+371315      2      0.0141714505   1.00000000    1.00000000   0.22892537
+371316      2      0.0141714505   1.00000000    1.00000000   0.22892537
+371317      2      0.0080897601   1.00000000    1.00000000   0.24437219
+371318      2      0.0080897601   1.00000000    1.00000000   0.24437219
+371319      2      0.0046974684   1.00000000    1.00000000   0.26256696
+371320      2      0.0046974684   1.00000000    1.00000000   0.26256696
+371321      2      0.0027583649   1.00000000    1.00000000   0.28245753
+371322      2      0.0005914507   1.00000000    1.00000000   0.34038347
+371323      2      0.0005914507   1.00000000    1.00000000   0.34038347
+371324      2      0.0005914507   1.00000000    1.00000000   0.34038347
+371325      2      0.0005914507   1.00000000    1.00000000   0.34038347
+371326      2      0.0003590692   1.00000000    1.00000000   0.36056504
+371327      2      0.0003590692   1.00000000    1.00000000   0.36056504
+371328      2      0.0003590692   1.00000000    1.00000000   0.36056504
+371329      2      0.0003590692   1.00000000    1.00000000   0.36056504
diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_A14N_SM_GG_N2_ZN1_XX_YY_2L.txt b/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_A14N_SM_GG_N2_ZN1_XX_YY_2L.txt
index c838e8f8823..1b233983cfb 100644
--- a/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_A14N_SM_GG_N2_ZN1_XX_YY_2L.txt
+++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_A14N_SM_GG_N2_ZN1_XX_YY_2L.txt
@@ -1,13 +1,14 @@
-# SignalUncertainties for dilepton edge signal grid SM_GG_N2_ZN1
-# 2L-filter efficiencies applied
+# FilterEff of -1 indicates that the sample is not available in prod.
 SAMPLE     FS   CROSSECTION[pb]     K-FACTOR     FILTEREFF   REL.UNCERT
-372525      2     98.1609998979     1.00000000    0.223040   0.13935352
+372448      2      0.3253876883     1.00000000    0.082330   0.16758000
+372449      2      0.3253876883     1.00000000    0.057625   0.16758000
+372525      2     98.1609998979     1.00000000    0.223130   0.13935352
 372526      2      9.2161817929     1.00000000    0.260290   0.13836910
 372527      2      9.2161817929     1.00000000    0.231070   0.13836910
 372528      2      1.4891045919     1.00000000    0.288420   0.15016704
 372529      2      1.4891045919     1.00000000    0.265670   0.15016704
 372530      2      1.4891045919     1.00000000    0.231630   0.15016704
-372531      2      0.3253876883     1.00000000    0.305960   0.16758000 
+372531      2      0.3253876883     1.00000000    0.305960   0.16758000
 372532      2      0.3253876883     1.00000000    0.293110   0.16758000
 372533      2      0.3253876883     1.00000000    0.268150   0.16758000
 372534      2      0.3253876883     1.00000000    0.229940   0.16758000
@@ -46,15 +47,15 @@ SAMPLE     FS   CROSSECTION[pb]     K-FACTOR     FILTEREFF   REL.UNCERT
 372567      2      0.0141714505     1.00000000    0.335170   0.22892537
 372568      2      0.0141714505     1.00000000    0.323250   0.22892537
 372569      2      0.0141714505     1.00000000    0.304960   0.22892537
-372570      2     98.1609998979     1.00000000    0.197890   0.13935352
+372570      2     98.1609998979     1.00000000    0.197760   0.13935352
 372571      2      9.2161817929     1.00000000    0.201580   0.13836910
 372572      2      1.4891045919     1.00000000    0.200470   0.15016704
 372573      2      0.3253876883     1.00000000    0.202660   0.16758000
-372574      2     98.1609998979     1.00000000    0.180430   0.13935352
+372574      2     98.1609998979     1.00000000    0.178680   0.13935352
 372575      2      9.2161817929     1.00000000    0.182750   0.13836910
 372576      2      1.4891045919     1.00000000    0.180710   0.15016704
 372577      2      0.3253876883     1.00000000    0.183000   0.16758000
-372578      2     98.1609998979     1.00000000    0.155910   0.13935352
+372578      2     98.1609998979     1.00000000    0.156800   0.13935352
 372579      2      9.2161817929     1.00000000    0.160100   0.13836910
 372580      2      1.4891045919     1.00000000    0.157480   0.15016704
 372581      2      0.3253876883     1.00000000    0.159880   0.16758000
@@ -63,18 +64,77 @@ SAMPLE     FS   CROSSECTION[pb]     K-FACTOR     FILTEREFF   REL.UNCERT
 372584      2      1.4891045919     1.00000000    0.111900   0.15016704
 372585      2      1.4891045919     1.00000000    0.082323   0.15016704
 372586      2      1.4891045919     1.00000000    0.057472   0.15016704
-372587      2     98.1609998979     1.00000000    0.143880   0.13935352 
-372588      2     98.1609998979     1.00000000    0.130290   0.13935352 
-372589      2     98.1609998979     1.00000000    0.111850   0.13935352 
-372590      2     98.1609998979     1.00000000    0.081389   0.13935352 
-372591      2     98.1609998979     1.00000000    0.057369   0.13935352 
-372592      2      9.2161817929     1.00000000    0.146390   0.13836910 
-372593      2      9.2161817929     1.00000000    0.131870   0.13836910 
-372594      2      9.2161817929     1.00000000    0.112660   0.13836910 
-372595      2      9.2161817929     1.00000000    0.082100   0.13836910 
-372596      2      9.2161817929     1.00000000    0.057745   0.13836910 
-372597      2      0.3253876883     1.00000000    0.146870   0.16758000 
-372598      2      0.3253876883     1.00000000    0.132250   0.16758000 
-372599      2      0.3253876883     1.00000000    0.112730   0.16758000 
-372448      2      0.3253876883     1.00000000    0.082330   0.16758000 
-372449      2      0.3253876883     1.00000000    0.057625   0.16758000 
+372587      2     98.1609998979     1.00000000    0.143880   0.13935352
+372588      2     98.1609998979     1.00000000    0.130290   0.13935352
+372589      2     98.1609998979     1.00000000    0.111850   0.13935352
+372590      2     98.1609998979     1.00000000    0.081389   0.13935352
+372591      2     98.1609998979     1.00000000    0.057369   0.13935352
+372592      2      9.2161817929     1.00000000    0.146390   0.13836910
+372593      2      9.2161817929     1.00000000    0.131870   0.13836910
+372594      2      9.2161817929     1.00000000    0.112660   0.13836910
+372595      2      9.2161817929     1.00000000    0.082100   0.13836910
+372596      2      9.2161817929     1.00000000    0.057745   0.13836910
+372597      2      0.3253876883     1.00000000    0.146870   0.16758000
+372598      2      0.3253876883     1.00000000    0.132250   0.16758000
+372599      2      0.3253876883     1.00000000    0.112730   0.16758000
+373462      2      0.0080897601     1.00000000    0.563350   0.24437219
+373463      2      0.0027583649     1.00000000    0.625290   0.28245753
+373464      2      0.0027583649     1.00000000    0.609460   0.28245753
+373465      2      0.0009802603     1.00000000    0.660700   0.31952110
+373466      2      0.0009802603     1.00000000    0.664480   0.31952110
+373467      2      0.0009802603     1.00000000    0.659980   0.31952110
+373468      2      0.0009802603     1.00000000    0.653000   0.31952110
+373469      2      0.0009802603     1.00000000    0.648770   0.31952110
+373470      2      0.0009802603     1.00000000    0.642640   0.31952110
+373471      2      0.0009802603     1.00000000    0.630500   0.31952110
+373472      2      0.0009802603     1.00000000    0.626890   0.31952110
+373473      2      0.0003590692     1.00000000    0.671450   0.36056504
+373474      2      0.0003590692     1.00000000    0.665440   0.36056504
+373475      2      0.0003590692     1.00000000    0.662630   0.36056504
+373476      2      0.0003590692     1.00000000    0.660030   0.36056504
+373477      2      0.0003590692     1.00000000    0.655640   0.36056504
+373478      2      0.0003590692     1.00000000    0.649930   0.36056504
+373479      2      0.3253876883     1.00000000    0.492910   0.16758000
+373480      2      0.3253876883     1.00000000    0.493500   0.16758000
+373481      2      0.3253876883     1.00000000    0.493280   0.16758000
+373482      2      0.3253876883     1.00000000    0.494280   0.16758000
+373483      2      0.0856417975     1.00000000    0.525910   0.18481426
+373484      2      0.0856417975     1.00000000    0.504210   0.18481426
+373485      2      0.0856417975     1.00000000    0.498760   0.18481426
+373486      2      0.0856417975     1.00000000    0.499340   0.18481426
+373487      2      0.0856417975     1.00000000    0.499930   0.18481426
+373488      2      0.0856417975     1.00000000    0.500040   0.18481426
+373489      2     98.1609998979     1.00000000    0.358940   0.13935352
+373490      2     98.1609998979     1.00000000    0.359750   0.13935352
+373491      2     98.1609998979     1.00000000    0.363740   0.13935352
+373492      2     98.1609998979     1.00000000    0.364030   0.13935352
+373493      2      9.2161817929     1.00000000    0.438480   0.13836910
+373494      2      9.2161817929     1.00000000    0.436780   0.13836910
+373495      2      9.2161817929     1.00000000    0.445500   0.13836910
+373496      2      9.2161817929     1.00000000    0.441210   0.13836910
+373497      2      1.4891045919     1.00000000    0.474990   0.15016704
+373498      2      1.4891045919     1.00000000    0.475060   0.15016704
+373499      2      1.4891045919     1.00000000    0.476350   0.15016704
+374202      2      1.4891045919     1.00000000    0.483060   0.15016704
+374203      2      0.3253876883     1.00000000    0.493140   0.16758000
+374204      2      0.3253876883     1.00000000    0.494560   0.16758000
+374205      2      0.3253876883     1.00000000    0.494440   0.16758000
+374206      2      0.3253876883     1.00000000    0.500800   0.16758000
+374207      2      0.0856417975     1.00000000    0.529710   0.18481426
+374208      2      0.0856417975     1.00000000    0.499670   0.18481426
+374209      2      0.0856417975     1.00000000    0.500930   0.18481426
+374210      2      0.0856417975     1.00000000    0.498260   0.18481426
+374211      2      0.0856417975     1.00000000    0.502400   0.18481426
+374212      2      0.0856417975     1.00000000   -1.000000   0.18481426
+374213      2     98.1609998979     1.00000000    0.360350   0.13935352
+374214      2     98.1609998979     1.00000000    0.362560   0.13935352
+374215      2     98.1609998979     1.00000000   -1.000000   0.13935352
+374216      2     98.1609998979     1.00000000   -1.000000   0.13935352
+374217      2      9.2161817929     1.00000000    0.445250   0.13836910
+374218      2      9.2161817929     1.00000000    0.442010   0.13836910
+374219      2      9.2161817929     1.00000000    0.447360   0.13836910
+374220      2      9.2161817929     1.00000000   -1.000000   0.13836910
+374221      2      1.4891045919     1.00000000    0.479790   0.15016704
+374222      2      1.4891045919     1.00000000    0.480000   0.15016704
+374223      2      1.4891045919     1.00000000   -1.000000   0.15016704
+374224      2      1.4891045919     1.00000000    0.477500   0.15016704
diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_GG_onestepCC_X_Y_Z.txt b/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_GG_onestepCC_X_Y_Z.txt
index 2f2f2a76090..41cafbb6ab0 100644
--- a/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_GG_onestepCC_X_Y_Z.txt
+++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MGPy8EG_GG_onestepCC_X_Y_Z.txt
@@ -1,306 +1,337 @@
-# date: July 31 2015
-## format : datasetID   finalState   XS(pb)   K-factor   filterEff    relUncertainty
-371500     2     1561.089111328125          1     1     0.14015558362
-371501     2     885.6153564453125          1     1     0.139731377363
-371502     2     345.4959411621094          1     1     0.138730213046
-371503     2     219.48275756835938         1     1     0.140176862478
-371504     2     102.17378234863281         1     1     0.138297706842
-371505     2     69.78768157958984          1     1     0.138973414898
-371506     2     36.071754455566406         1     1     0.138903439045
-371507     2     25.895143508911133         1     1     0.137926280499
-371508     2     14.496330261230469         1     1     0.139214798808
-371509     2     10.745857238769531         1     1     0.13493591547
-371510     2     6.35960578918457           1     1     0.137147203088
-371511     2     4.864090919494629          1     1     0.137702018023
-371512     2     3.031431198120117          1     1     0.142638072371
-371513     2     2.3660974502563477         1     1     0.14538064599
-371514     2     2.3660974502563477         1     1     0.14538064599
-371515     2     1.6807845830917358         1     1     0.148955866694
-371516     2     1.5296400785446167         1     1     0.149978294969
-371517     2     1.2166982889175415         1     1     0.152140974998
-371518     2     0.8070603013038635         1     1     0.156766057014
-371519     2     0.652317464351654          1     1     0.159139737487
-371520     2     0.652317464351654          1     1     0.159139737487
-371521     2     0.48354557156562805        1     1     0.162492290139
-371522     2     0.443156361579895          1     1     0.163735926151
-371523     2     0.3618197441101074         1     1     0.166189879179
-371524     2     0.3618197441101074         1     1     0.166189879179
-371525     2     0.27277830243110657        1     1     0.16991725564
-371526     2     0.2506413161754608         1     1     0.170866250992
-371527     2     0.207025408744812          1     1     0.173211202025
-371528     2     0.207025408744812          1     1     0.173211202025
-371529     2     0.207025408744812          1     1     0.173211202025
-371530     2     0.15845075249671936        1     1     0.176563829184
-371531     2     0.15845075249671936        1     1     0.176563829184
-371532     2     0.12175501883029938        1     1     0.18022249639
-371533     2     0.12175501883029938        1     1     0.18022249639
-371534     2     0.09420723468065262        1     1     0.183622971177
-371535     2     0.09420723468065262        1     1     0.183622971177
-371536     2     0.07322552055120468        1     1     0.187227144837
-371537     2     0.07322552055120468        1     1     0.187227144837
-371538     2     0.07322552055120468        1     1     0.187227144837
-371539     2     0.057097140699625015       1     1     0.192412689328
-371540     2     0.057097140699625015       1     1     0.192412689328
-371541     2     0.0446358248591423         1     1     0.199451357126
-371542     2     0.0446358248591423         1     1     0.199451357126
-371543     2     0.03500567004084587        1     1     0.203531727195
-371544     2     0.03500567004084587        1     1     0.203531727195
-371545     2     0.02762642316520214        1     1     0.208541065454
-371546     2     0.02762642316520214        1     1     0.208541065454
-371547     2     0.02762642316520214        1     1     0.208541065454
-371548     2     0.021863583475351334       1     1     0.21597649157
-371549     2     0.021863583475351334       1     1     0.21597649157
-371550     2     0.017338845878839493       1     1     0.223563447595
-371551     2     0.017338845878839493       1     1     0.223563447595
-371552     2     0.01375182718038559        1     1     0.231025293469
-371553     2     0.01375182718038559        1     1     0.231025293469
-371554     2     0.0109896594658494         1     1     0.236163884401
-371555     2     0.0109896594658494         1     1     0.236163884401
-371556     2     0.0109896594658494         1     1     0.236163884401
-371557     2     0.00878901407122612        1     1     0.242574959993
-371558     2     0.00878901407122612        1     1     0.242574959993
-371559     2     0.0070499032735824585      1     1     0.248536065221
-371560     2     0.0070499032735824585      1     1     0.248536065221
-371561     2     0.005671649239957333       1     1     0.256562232971
-371562     2     0.005671649239957333       1     1     0.256562232971
-371563     2     885.6153564453125          1     1     0.139731377363
-371564     2     424.22491455078125         1     1     0.139433845878
-371565     2     69.78768157958984          1     1     0.138973414898
-371566     2     41.787498474121094         1     1     0.139698162675
-371567     2     25.895143508911133         1     1     0.137926280499
-371568     2     16.444660186767578         1     1     0.139171764255
-371569     2     10.745857238769531         1     1     0.13493591547
-371570     2     7.161779403686523          1     1     0.138059899211
-371571     2     4.864090919494629          1     1     0.137702018023
-371572     2     3.373701333999634          1     1     0.141608789563
-371573     2     2.3660974502563477         1     1     0.14538064599
-371574     2     1.6807845830917358         1     1     0.148955866694
-371575     2     1.2166982889175415         1     1     0.152140974998
-371576     2     0.8859171271324158         1     1     0.155642613769
-371577     2     0.652317464351654          1     1     0.159139737487
-371578     2     0.48354557156562805        1     1     0.162492290139
-371579     2     0.3618197441101074         1     1     0.166189879179
-371580     2     0.27277830243110657        1     1     0.16991725564
-371581     2     0.004575107246637344       1     1     0.263639211655
-371582     2     0.004575107246637344       1     1     0.263639211655
-371583     2     0.004575107246637344       1     1     0.263639211655
-371584     2     0.0036959205754101276      1     1     0.271811902523
-371585     2     0.0036959205754101276      1     1     0.271811902523
-371586     2     0.002984828781336546       1     1     0.278535693884
-371587     2     0.002984828781336546       1     1     0.278535693884
-371588     2     0.00241293222643435        1     1     0.28723320365
-371589     2     0.00241293222643435        1     1     0.28723320365
-371590     2     0.001958052860572934       1     1     0.293550252914
-371591     2     0.001958052860572934       1     1     0.293550252914
-371592     2     0.0015908750938251615      1     1     0.303364604712
-371593     2     0.0015908750938251615      1     1     0.303364604712
-371594     2     0.001297794166021049       1     1     0.311279088259
-371595     2     0.001297794166021049       1     1     0.311279088259
-371596     2     0.0010571714956313372      1     1     0.316299974918
-371597     2     0.0008630946977064013      1     1     0.324231356382
-371598     2     0.0008630946977064013      1     1     0.324231356382
-371599     2     0.0007055102      1     1     0.33329361 
-371600     2     0.0007055102      1     1     0.33329361 
-371601     2     0.0005765615      1     1     0.34094831 
-371602     2     0.0004720384      1     1     0.34801109 
-371603     2     0.0003869576      1     1     0.35837174 
-371604     2     0.0003869576      1     1     0.35837174 
-371605     2     0.0003167813      1     1     0.36634426 
-371606     2     0.0002602757      1     1     0.37615615 
-371607     2     0.1390094457      1     1     0.17856938 
-371608     2     0.0830235908      1     1     0.18527619 
-371609     2     0.0504205708      1     1     0.19541511 
-371610     2     0.0310858735      1     1     0.20727470 
-371611     2     0.1462027851      1     1     0.17767665 
-371612     2     0.0872815938      1     1     0.18480135 
-371613     2     0.0529752725      1     1     0.19463617 
-371614     2     0.0325527025      1     1     0.20516780 
-371615     2     0.0570971425      1     1     0.19241270 
-371616     2     0.0218635836      1     1     0.21597649 
-371617     2     0.0173388453      1     1     0.22356345 
-371618     2     0.0087890140      1     1     0.24257497 
-371650     2     0.3253876864910126         1     1     0.167580008507
-371651     2     0.3253876864910126         1     1     0.167580008507
-371652     2     0.3253876864910126         1     1     0.167580008507
-371653     2     0.3253876864910126         1     1     0.167580008507
-371654     2     0.3253876864910126         1     1     0.167580008507
-371655     2     0.3253876864910126         1     1     0.167580008507
-371656     2     0.3253876864910126         1     1     0.167580008507
-371657     2     0.3253876864910126         1     1     0.167580008507
-371658     2     0.3253876864910126         1     1     0.167580008507
-371659     2     0.3253876864910126         1     1     0.167580008507
-371660     2     0.3253876864910126         1     1     0.167580008507
-371661     2     0.08564179390668869        1     1     0.18481425941
-371662     2     0.08564179390668869        1     1     0.18481425941
-371663     2     0.08564179390668869        1     1     0.18481425941
-371664     2     0.08564179390668869        1     1     0.18481425941
-371665     2     0.08564179390668869        1     1     0.18481425941
-371666     2     0.08564179390668869        1     1     0.18481425941
-371667     2     0.08564179390668869        1     1     0.18481425941
-371668     2     0.08564179390668869        1     1     0.18481425941
-371669     2     0.08564179390668869        1     1     0.18481425941
-371670     2     0.08564179390668869        1     1     0.18481425941
-371671     2     0.08564179390668869        1     1     0.18481425941
-371672     2     0.08564179390668869        1     1     0.18481425941
-371673     2     0.02526012621819973        1     1     0.210963279009
-371674     2     0.02526012621819973        1     1     0.210963279009
-371675     2     0.02526012621819973        1     1     0.210963279009
-371676     2     0.02526012621819973        1     1     0.210963279009
-371677     2     0.02526012621819973        1     1     0.210963279009
-371678     2     0.02526012621819973        1     1     0.210963279009
-371679     2     0.02526012621819973        1     1     0.210963279009
-371680     2     0.02526012621819973        1     1     0.210963279009
-371681     2     0.02526012621819973        1     1     0.210963279009
-371682     2     0.02526012621819973        1     1     0.210963279009
-371683     2     0.02526012621819973        1     1     0.210963279009
-371684     2     0.02526012621819973        1     1     0.210963279009
-371685     2     0.02526012621819973        1     1     0.210963279009
-371686     2     0.008089760318398476       1     1     0.244372189045
-371687     2     0.008089760318398476       1     1     0.244372189045
-371688     2     0.008089760318398476       1     1     0.244372189045
-371689     2     0.008089760318398476       1     1     0.244372189045
-371690     2     0.008089760318398476       1     1     0.244372189045
-371691     2     0.008089760318398476       1     1     0.244372189045
-371692     2     0.008089760318398476       1     1     0.244372189045
-371693     2     0.008089760318398476       1     1     0.244372189045
-371694     2     0.008089760318398476       1     1     0.244372189045
-371695     2     0.008089760318398476       1     1     0.244372189045
-371696     2     0.008089760318398476       1     1     0.244372189045
-371697     2     0.008089760318398476       1     1     0.244372189045
-371698     2     0.008089760318398476       1     1     0.244372189045
-371699     2     0.008089760318398476       1     1     0.244372189045
-371700     2     3577.400634765625          1     1     0.141307726502
-371701     2     3577.400634765625          1     1     0.141307726502
-371702     2     3577.400634765625          1     1     0.141307726502
-371703     2     3577.400634765625          1     1     0.141307726502
-371704     2     3577.400634765625          1     1     0.141307726502
-371705     2     3577.400634765625          1     1     0.141307726502
-371706     2     98.16100311279297          1     1     0.139353513718
-371707     2     98.16100311279297          1     1     0.139353513718
-371708     2     98.16100311279297          1     1     0.139353513718
-371709     2     98.16100311279297          1     1     0.139353513718
-371710     2     98.16100311279297          1     1     0.139353513718
-371711     2     98.16100311279297          1     1     0.139353513718
-371712     2     98.16100311279297          1     1     0.139353513718
-371713     2     98.16100311279297          1     1     0.139353513718
-371714     2     9.216181755065918          1     1     0.138369098306
-371715     2     9.216181755065918          1     1     0.138369098306
-371716     2     9.216181755065918          1     1     0.138369098306
-371717     2     9.216181755065918          1     1     0.138369098306
-371718     2     9.216181755065918          1     1     0.138369098306
-371719     2     9.216181755065918          1     1     0.138369098306
-371720     2     9.216181755065918          1     1     0.138369098306
-371721     2     9.216181755065918          1     1     0.138369098306
-371722     2     9.216181755065918          1     1     0.138369098306
-371723     2     1.4891046285629272         1     1     0.150167047977
-371724     2     1.4891046285629272         1     1     0.150167047977
-371725     2     1.4891046285629272         1     1     0.150167047977
-371726     2     1.4891046285629272         1     1     0.150167047977
-371727     2     1.4891046285629272         1     1     0.150167047977
-371728     2     1.4891046285629272         1     1     0.150167047977
-371729     2     1.4891046285629272         1     1     0.150167047977
-371730     2     1.4891046285629272         1     1     0.150167047977
-371731     2     1.4891046285629272         1     1     0.150167047977
-371732     2     1.4891046285629272         1     1     0.150167047977
-371733     2     0.045982301235198975       1     1     0.198225662112
-371734     2     0.045982301235198975       1     1     0.198225662112
-371735     2     0.045982301235198975       1     1     0.198225662112
-371736     2     0.045982301235198975       1     1     0.198225662112
-371737     2     0.045982301235198975       1     1     0.198225662112
-371738     2     0.045982301235198975       1     1     0.198225662112
-371739     2     0.045982301235198975       1     1     0.198225662112
-371740     2     0.045982301235198975       1     1     0.198225662112
-371741     2     0.045982301235198975       1     1     0.198225662112
-371742     2     0.045982301235198975       1     1     0.198225662112
-371743     2     0.045982301235198975       1     1     0.198225662112
-371744     2     0.045982301235198975       1     1     0.198225662112
-371745     2     0.045982301235198975       1     1     0.198225662112
-371746     2     0.014171450398862362       1     1     0.228925362229
-371747     2     0.014171450398862362       1     1     0.228925362229
-371748     2     0.014171450398862362       1     1     0.228925362229
-371749     2     0.014171450398862362       1     1     0.228925362229
-371750     2     0.014171450398862362       1     1     0.228925362229
-371751     2     0.014171450398862362       1     1     0.228925362229
-371752     2     0.014171450398862362       1     1     0.228925362229
-371753     2     0.014171450398862362       1     1     0.228925362229
-371754     2     0.014171450398862362       1     1     0.228925362229
-371755     2     0.014171450398862362       1     1     0.228925362229
-371756     2     0.014171450398862362       1     1     0.228925362229
-371757     2     0.014171450398862362       1     1     0.228925362229
-371758     2     0.014171450398862362       1     1     0.228925362229
-371759     2     0.014171450398862362       1     1     0.228925362229
-371760     2     0.0027583648916333914      1     1     0.282457530499
-371761     2     0.0027583648916333914      1     1     0.282457530499
-371762     2     0.0027583648916333914      1     1     0.282457530499
-371763     2     0.0027583648916333914      1     1     0.282457530499
-371764     2     0.0027583648916333914      1     1     0.282457530499
-371765     2     0.0027583648916333914      1     1     0.282457530499
-371766     2     0.0027583648916333914      1     1     0.282457530499
-371767     2     0.0027583648916333914      1     1     0.282457530499
-371768     2     0.0027583648916333914      1     1     0.282457530499
-371769     2     0.0027583648916333914      1     1     0.282457530499
-371770     2     0.0027583648916333914      1     1     0.282457530499
-371771     2     0.0027583648916333914      1     1     0.282457530499
-371772     2     0.0027583648916333914      1     1     0.282457530499
-371773     2     0.0027583648916333914      1     1     0.282457530499
-371774     2     0.0027583648916333914      1     1     0.282457530499
-371775     2     0.0009802603162825108      1     1     0.319521099329
-371776     2     0.0009802603162825108      1     1     0.319521099329
-371777     2     0.0009802603162825108      1     1     0.319521099329
-371778     2     0.0009802603162825108      1     1     0.319521099329
-371779     2     0.0009802603162825108      1     1     0.319521099329
-371780     2     0.0009802603162825108      1     1     0.319521099329
-371781     2     0.0009802603162825108      1     1     0.319521099329
-371782     2     0.0009802603162825108      1     1     0.319521099329
-371783     2     0.0009802603162825108      1     1     0.319521099329
-371784     2     0.0009802603162825108      1     1     0.319521099329
-371785     2     0.0009802603162825108      1     1     0.319521099329
-371786     2     0.0009802603162825108      1     1     0.319521099329
-371787     2     0.0009802603162825108      1     1     0.319521099329
-371788     2     0.0009802603162825108      1     1     0.319521099329
-371789     2     0.0009802603162825108      1     1     0.319521099329
-371790     2     0.0009802603162825108      1     1     0.319521099329
-371791     2     0.0046974684      1     1     0.26256696 
-371792     2     0.0046974684      1     1     0.26256696 
-371793     2     0.0046974684      1     1     0.26256696 
-371794     2     0.0046974684      1     1     0.26256696 
-371795     2     0.0046974684      1     1     0.26256696 
-371796     2     0.0046974684      1     1     0.26256696 
-371797     2     0.0046974684      1     1     0.26256696 
-371798     2     0.0046974684      1     1     0.26256696 
-371799     2     0.0046974684      1     1     0.26256696 
-371800     2     0.0046974684      1     1     0.26256696 
-371801     2     0.0046974684      1     1     0.26256696 
-371802     2     0.0046974684      1     1     0.26256696 
-371803     2     0.0046974684      1     1     0.26256696 
-371804     2     0.0046974684      1     1     0.26256696 
-371805     2     0.0016337908      1     1     0.30037747 
-371806     2     0.0016337908      1     1     0.30037747 
-371807     2     0.0016337908      1     1     0.30037747 
-371808     2     0.0016337908      1     1     0.30037747 
-371809     2     0.0016337908      1     1     0.30037747 
-371810     2     0.0016337908      1     1     0.30037747 
-371811     2     0.0016337908      1     1     0.30037747 
-371812     2     0.0016337908      1     1     0.30037747 
-371813     2     0.0016337908      1     1     0.30037747 
-371814     2     0.0016337908      1     1     0.30037747 
-371815     2     0.0016337908      1     1     0.30037747 
-371816     2     0.0016337908      1     1     0.30037747 
-371817     2     0.0016337908      1     1     0.30037747 
-371818     2     0.0016337908      1     1     0.30037747 
-371819     2     0.0005914507      1     1     0.34038347 
-371820     2     0.0005914507      1     1     0.34038347 
-371821     2     0.0005914507      1     1     0.34038347 
-371822     2     0.0005914507      1     1     0.34038347 
-371823     2     0.0005914507      1     1     0.34038347 
-371824     2     0.0005914507      1     1     0.34038347 
-371825     2     0.0005914507      1     1     0.34038347 
-371826     2     0.0005914507      1     1     0.34038347 
-371827     2     0.0005914507      1     1     0.34038347 
-371828     2     0.0005914507      1     1     0.34038347 
-371829     2     0.0005914507      1     1     0.34038347 
-371830     2     0.0005914507      1     1     0.34038347 
-371831     2     0.0005914507      1     1     0.34038347 
-371832     2     0.0005914507      1     1     0.34038347 
-371833     2     0.0005914507      1     1     0.34038347 
-371834     2     0.0005914507      1     1     0.34038347 
+# date: July 31 2015
+## format : datasetID   finalState   XS(pb)   K-factor   filterEff    relUncertainty
+371500     2     1561.089111328125          1     1     0.14015558362
+371501     2     885.6153564453125          1     1     0.139731377363
+371502     2     345.4959411621094          1     1     0.138730213046
+371503     2     219.48275756835938         1     1     0.140176862478
+371504     2     102.17378234863281         1     1     0.138297706842
+371505     2     69.78768157958984          1     1     0.138973414898
+371506     2     36.071754455566406         1     1     0.138903439045
+371507     2     25.895143508911133         1     1     0.137926280499
+371508     2     14.496330261230469         1     1     0.139214798808
+371509     2     10.745857238769531         1     1     0.13493591547
+371510     2     6.35960578918457           1     1     0.137147203088
+371511     2     4.864090919494629          1     1     0.137702018023
+371512     2     3.031431198120117          1     1     0.142638072371
+371513     2     2.3660974502563477         1     1     0.14538064599
+371514     2     2.3660974502563477         1     1     0.14538064599
+371515     2     1.6807845830917358         1     1     0.148955866694
+371516     2     1.5296400785446167         1     1     0.149978294969
+371517     2     1.2166982889175415         1     1     0.152140974998
+371518     2     0.8070603013038635         1     1     0.156766057014
+371519     2     0.652317464351654          1     1     0.159139737487
+371520     2     0.652317464351654          1     1     0.159139737487
+371521     2     0.48354557156562805        1     1     0.162492290139
+371522     2     0.443156361579895          1     1     0.163735926151
+371523     2     0.3618197441101074         1     1     0.166189879179
+371524     2     0.3618197441101074         1     1     0.166189879179
+371525     2     0.27277830243110657        1     1     0.16991725564
+371526     2     0.2506413161754608         1     1     0.170866250992
+371527     2     0.207025408744812          1     1     0.173211202025
+371528     2     0.207025408744812          1     1     0.173211202025
+371529     2     0.207025408744812          1     1     0.173211202025
+371530     2     0.15845075249671936        1     1     0.176563829184
+371531     2     0.15845075249671936        1     1     0.176563829184
+371532     2     0.12175501883029938        1     1     0.18022249639
+371533     2     0.12175501883029938        1     1     0.18022249639
+371534     2     0.09420723468065262        1     1     0.183622971177
+371535     2     0.09420723468065262        1     1     0.183622971177
+371536     2     0.07322552055120468        1     1     0.187227144837
+371537     2     0.07322552055120468        1     1     0.187227144837
+371538     2     0.07322552055120468        1     1     0.187227144837
+371539     2     0.057097140699625015       1     1     0.192412689328
+371540     2     0.057097140699625015       1     1     0.192412689328
+371541     2     0.0446358248591423         1     1     0.199451357126
+371542     2     0.0446358248591423         1     1     0.199451357126
+371543     2     0.03500567004084587        1     1     0.203531727195
+371544     2     0.03500567004084587        1     1     0.203531727195
+371545     2     0.02762642316520214        1     1     0.208541065454
+371546     2     0.02762642316520214        1     1     0.208541065454
+371547     2     0.02762642316520214        1     1     0.208541065454
+371548     2     0.021863583475351334       1     1     0.21597649157
+371549     2     0.021863583475351334       1     1     0.21597649157
+371550     2     0.017338845878839493       1     1     0.223563447595
+371551     2     0.017338845878839493       1     1     0.223563447595
+371552     2     0.01375182718038559        1     1     0.231025293469
+371553     2     0.01375182718038559        1     1     0.231025293469
+371554     2     0.0109896594658494         1     1     0.236163884401
+371555     2     0.0109896594658494         1     1     0.236163884401
+371556     2     0.0109896594658494         1     1     0.236163884401
+371557     2     0.00878901407122612        1     1     0.242574959993
+371558     2     0.00878901407122612        1     1     0.242574959993
+371559     2     0.0070499032735824585      1     1     0.248536065221
+371560     2     0.0070499032735824585      1     1     0.248536065221
+371561     2     0.005671649239957333       1     1     0.256562232971
+371562     2     0.005671649239957333       1     1     0.256562232971
+371563     2     885.6153564453125          1     1     0.139731377363
+371564     2     424.22491455078125         1     1     0.139433845878
+371565     2     69.78768157958984          1     1     0.138973414898
+371566     2     41.787498474121094         1     1     0.139698162675
+371567     2     25.895143508911133         1     1     0.137926280499
+371568     2     16.444660186767578         1     1     0.139171764255
+371569     2     10.745857238769531         1     1     0.13493591547
+371570     2     7.161779403686523          1     1     0.138059899211
+371571     2     4.864090919494629          1     1     0.137702018023
+371572     2     3.373701333999634          1     1     0.141608789563
+371573     2     2.3660974502563477         1     1     0.14538064599
+371574     2     1.6807845830917358         1     1     0.148955866694
+371575     2     1.2166982889175415         1     1     0.152140974998
+371576     2     0.8859171271324158         1     1     0.155642613769
+371577     2     0.652317464351654          1     1     0.159139737487
+371578     2     0.48354557156562805        1     1     0.162492290139
+371579     2     0.3618197441101074         1     1     0.166189879179
+371580     2     0.27277830243110657        1     1     0.16991725564
+371581     2     0.004575107246637344       1     1     0.263639211655
+371582     2     0.004575107246637344       1     1     0.263639211655
+371583     2     0.004575107246637344       1     1     0.263639211655
+371584     2     0.0036959205754101276      1     1     0.271811902523
+371585     2     0.0036959205754101276      1     1     0.271811902523
+371586     2     0.002984828781336546       1     1     0.278535693884
+371587     2     0.002984828781336546       1     1     0.278535693884
+371588     2     0.00241293222643435        1     1     0.28723320365
+371589     2     0.00241293222643435        1     1     0.28723320365
+371590     2     0.001958052860572934       1     1     0.293550252914
+371591     2     0.001958052860572934       1     1     0.293550252914
+371592     2     0.0015908750938251615      1     1     0.303364604712
+371593     2     0.0015908750938251615      1     1     0.303364604712
+371594     2     0.001297794166021049       1     1     0.311279088259
+371595     2     0.001297794166021049       1     1     0.311279088259
+371596     2     0.0010571714956313372      1     1     0.316299974918
+371597     2     0.0008630946977064013      1     1     0.324231356382
+371598     2     0.0008630946977064013      1     1     0.324231356382
+371599     2     0.0007055102      1     1     0.33329361 
+371600     2     0.0007055102      1     1     0.33329361 
+371601     2     0.0005765615      1     1     0.34094831 
+371602     2     0.0004720384      1     1     0.34801109 
+371603     2     0.0003869576      1     1     0.35837174 
+371604     2     0.0003869576      1     1     0.35837174 
+371605     2     0.0003167813      1     1     0.36634426 
+371606     2     0.0002602757      1     1     0.37615615 
+371607     2     0.1390094457      1     1     0.17856938 
+371608     2     0.0830235908      1     1     0.18527619 
+371609     2     0.0504205708      1     1     0.19541511 
+371610     2     0.0310858735      1     1     0.20727470 
+371611     2     0.1462027851      1     1     0.17767665 
+371612     2     0.0872815938      1     1     0.18480135 
+371613     2     0.0529752725      1     1     0.19463617 
+371614     2     0.0325527025      1     1     0.20516780 
+371615     2     0.0570971425      1     1     0.19241270 
+371616     2     0.0218635836      1     1     0.21597649 
+371617     2     0.0173388453      1     1     0.22356345 
+371618     2     0.0087890140      1     1     0.24257497 
+371619     2     0.0001755695      1     1     0.39898959
+371620     2     0.0001437496      1     1     0.40689801
+371621     2     0.0001187077      1     1     0.41590980
+371622     2     0.0002138950      1     1     0.38741380
+371623     2     0.0001755695      1     1     0.39898959
+371624     2     0.0003167813      1     1     0.36634426
+371625     2     0.0001437496      1     1     0.40689801
+371626     2     0.0005765615      1     1     0.34094831
+371627     2     0.0002602757      1     1     0.37615615
+371628     2     0.0010571714      1     1     0.31629998
+371629     2     0.0004720384      1     1     0.34801109
+371630     2     0.0019580528      1     1     0.29355025
+371631     2     0.0008630947      1     1     0.32423135
+371632     2     0.0036959207      1     1     0.27181191
+371633     2     0.0015908751      1     1     0.30336460
+371634     2     0.0070499035      1     1     0.24853606
+371635     2     0.0029848287      1     1     0.27853570
+371636     2     0.0137518269      1     1     0.23102530
+371637     2     0.0056716492      1     1     0.25656224
+371638     2     0.0194382384      1     1     0.21719443
+371639     2     0.0203315589      1     1     0.21776482
+371640     2     0.0000799602      1     1     0.43314445
+371641     2     0.0000657648      1     1     0.44241480
+371642     2     0.0000541064      1     1     0.45268696
+371643     2     0.0000972490      1     1     0.42373661
+371644     2     0.0000799602      1     1     0.43314445
+371645     2     0.0001187077      1     1     0.41590980
+371646     2     0.0002138950      1     1     0.38741380
+371647     2     0.0003869576      1     1     0.35837174
+371648     2     0.0007055102      1     1     0.33329361
+371649     2     0.0012977942      1     1     0.31127909
+371650     2     0.3253876864910126         1     1     0.167580008507
+371651     2     0.3253876864910126         1     1     0.167580008507
+371652     2     0.3253876864910126         1     1     0.167580008507
+371653     2     0.3253876864910126         1     1     0.167580008507
+371654     2     0.3253876864910126         1     1     0.167580008507
+371655     2     0.3253876864910126         1     1     0.167580008507
+371656     2     0.3253876864910126         1     1     0.167580008507
+371657     2     0.3253876864910126         1     1     0.167580008507
+371658     2     0.3253876864910126         1     1     0.167580008507
+371659     2     0.3253876864910126         1     1     0.167580008507
+371660     2     0.3253876864910126         1     1     0.167580008507
+371661     2     0.08564179390668869        1     1     0.18481425941
+371662     2     0.08564179390668869        1     1     0.18481425941
+371663     2     0.08564179390668869        1     1     0.18481425941
+371664     2     0.08564179390668869        1     1     0.18481425941
+371665     2     0.08564179390668869        1     1     0.18481425941
+371666     2     0.08564179390668869        1     1     0.18481425941
+371667     2     0.08564179390668869        1     1     0.18481425941
+371668     2     0.08564179390668869        1     1     0.18481425941
+371669     2     0.08564179390668869        1     1     0.18481425941
+371670     2     0.08564179390668869        1     1     0.18481425941
+371671     2     0.08564179390668869        1     1     0.18481425941
+371672     2     0.08564179390668869        1     1     0.18481425941
+371673     2     0.02526012621819973        1     1     0.210963279009
+371674     2     0.02526012621819973        1     1     0.210963279009
+371675     2     0.02526012621819973        1     1     0.210963279009
+371676     2     0.02526012621819973        1     1     0.210963279009
+371677     2     0.02526012621819973        1     1     0.210963279009
+371678     2     0.02526012621819973        1     1     0.210963279009
+371679     2     0.02526012621819973        1     1     0.210963279009
+371680     2     0.02526012621819973        1     1     0.210963279009
+371681     2     0.02526012621819973        1     1     0.210963279009
+371682     2     0.02526012621819973        1     1     0.210963279009
+371683     2     0.02526012621819973        1     1     0.210963279009
+371684     2     0.02526012621819973        1     1     0.210963279009
+371685     2     0.02526012621819973        1     1     0.210963279009
+371686     2     0.008089760318398476       1     1     0.244372189045
+371687     2     0.008089760318398476       1     1     0.244372189045
+371688     2     0.008089760318398476       1     1     0.244372189045
+371689     2     0.008089760318398476       1     1     0.244372189045
+371690     2     0.008089760318398476       1     1     0.244372189045
+371691     2     0.008089760318398476       1     1     0.244372189045
+371692     2     0.008089760318398476       1     1     0.244372189045
+371693     2     0.008089760318398476       1     1     0.244372189045
+371694     2     0.008089760318398476       1     1     0.244372189045
+371695     2     0.008089760318398476       1     1     0.244372189045
+371696     2     0.008089760318398476       1     1     0.244372189045
+371697     2     0.008089760318398476       1     1     0.244372189045
+371698     2     0.008089760318398476       1     1     0.244372189045
+371699     2     0.008089760318398476       1     1     0.244372189045
+371700     2     3577.400634765625          1     1     0.141307726502
+371701     2     3577.400634765625          1     1     0.141307726502
+371702     2     3577.400634765625          1     1     0.141307726502
+371703     2     3577.400634765625          1     1     0.141307726502
+371704     2     3577.400634765625          1     1     0.141307726502
+371705     2     3577.400634765625          1     1     0.141307726502
+371706     2     98.16100311279297          1     1     0.139353513718
+371707     2     98.16100311279297          1     1     0.139353513718
+371708     2     98.16100311279297          1     1     0.139353513718
+371709     2     98.16100311279297          1     1     0.139353513718
+371710     2     98.16100311279297          1     1     0.139353513718
+371711     2     98.16100311279297          1     1     0.139353513718
+371712     2     98.16100311279297          1     1     0.139353513718
+371713     2     98.16100311279297          1     1     0.139353513718
+371714     2     9.216181755065918          1     1     0.138369098306
+371715     2     9.216181755065918          1     1     0.138369098306
+371716     2     9.216181755065918          1     1     0.138369098306
+371717     2     9.216181755065918          1     1     0.138369098306
+371718     2     9.216181755065918          1     1     0.138369098306
+371719     2     9.216181755065918          1     1     0.138369098306
+371720     2     9.216181755065918          1     1     0.138369098306
+371721     2     9.216181755065918          1     1     0.138369098306
+371722     2     9.216181755065918          1     1     0.138369098306
+371723     2     1.4891046285629272         1     1     0.150167047977
+371724     2     1.4891046285629272         1     1     0.150167047977
+371725     2     1.4891046285629272         1     1     0.150167047977
+371726     2     1.4891046285629272         1     1     0.150167047977
+371727     2     1.4891046285629272         1     1     0.150167047977
+371728     2     1.4891046285629272         1     1     0.150167047977
+371729     2     1.4891046285629272         1     1     0.150167047977
+371730     2     1.4891046285629272         1     1     0.150167047977
+371731     2     1.4891046285629272         1     1     0.150167047977
+371732     2     1.4891046285629272         1     1     0.150167047977
+371733     2     0.045982301235198975       1     1     0.198225662112
+371734     2     0.045982301235198975       1     1     0.198225662112
+371735     2     0.045982301235198975       1     1     0.198225662112
+371736     2     0.045982301235198975       1     1     0.198225662112
+371737     2     0.045982301235198975       1     1     0.198225662112
+371738     2     0.045982301235198975       1     1     0.198225662112
+371739     2     0.045982301235198975       1     1     0.198225662112
+371740     2     0.045982301235198975       1     1     0.198225662112
+371741     2     0.045982301235198975       1     1     0.198225662112
+371742     2     0.045982301235198975       1     1     0.198225662112
+371743     2     0.045982301235198975       1     1     0.198225662112
+371744     2     0.045982301235198975       1     1     0.198225662112
+371745     2     0.045982301235198975       1     1     0.198225662112
+371746     2     0.014171450398862362       1     1     0.228925362229
+371747     2     0.014171450398862362       1     1     0.228925362229
+371748     2     0.014171450398862362       1     1     0.228925362229
+371749     2     0.014171450398862362       1     1     0.228925362229
+371750     2     0.014171450398862362       1     1     0.228925362229
+371751     2     0.014171450398862362       1     1     0.228925362229
+371752     2     0.014171450398862362       1     1     0.228925362229
+371753     2     0.014171450398862362       1     1     0.228925362229
+371754     2     0.014171450398862362       1     1     0.228925362229
+371755     2     0.014171450398862362       1     1     0.228925362229
+371756     2     0.014171450398862362       1     1     0.228925362229
+371757     2     0.014171450398862362       1     1     0.228925362229
+371758     2     0.014171450398862362       1     1     0.228925362229
+371759     2     0.014171450398862362       1     1     0.228925362229
+371760     2     0.0027583648916333914      1     1     0.282457530499
+371761     2     0.0027583648916333914      1     1     0.282457530499
+371762     2     0.0027583648916333914      1     1     0.282457530499
+371763     2     0.0027583648916333914      1     1     0.282457530499
+371764     2     0.0027583648916333914      1     1     0.282457530499
+371765     2     0.0027583648916333914      1     1     0.282457530499
+371766     2     0.0027583648916333914      1     1     0.282457530499
+371767     2     0.0027583648916333914      1     1     0.282457530499
+371768     2     0.0027583648916333914      1     1     0.282457530499
+371769     2     0.0027583648916333914      1     1     0.282457530499
+371770     2     0.0027583648916333914      1     1     0.282457530499
+371771     2     0.0027583648916333914      1     1     0.282457530499
+371772     2     0.0027583648916333914      1     1     0.282457530499
+371773     2     0.0027583648916333914      1     1     0.282457530499
+371774     2     0.0027583648916333914      1     1     0.282457530499
+371775     2     0.0009802603162825108      1     1     0.319521099329
+371776     2     0.0009802603162825108      1     1     0.319521099329
+371777     2     0.0009802603162825108      1     1     0.319521099329
+371778     2     0.0009802603162825108      1     1     0.319521099329
+371779     2     0.0009802603162825108      1     1     0.319521099329
+371780     2     0.0009802603162825108      1     1     0.319521099329
+371781     2     0.0009802603162825108      1     1     0.319521099329
+371782     2     0.0009802603162825108      1     1     0.319521099329
+371783     2     0.0009802603162825108      1     1     0.319521099329
+371784     2     0.0009802603162825108      1     1     0.319521099329
+371785     2     0.0009802603162825108      1     1     0.319521099329
+371786     2     0.0009802603162825108      1     1     0.319521099329
+371787     2     0.0009802603162825108      1     1     0.319521099329
+371788     2     0.0009802603162825108      1     1     0.319521099329
+371789     2     0.0009802603162825108      1     1     0.319521099329
+371790     2     0.0009802603162825108      1     1     0.319521099329
+371791     2     0.0046974684      1     1     0.26256696 
+371792     2     0.0046974684      1     1     0.26256696 
+371793     2     0.0046974684      1     1     0.26256696 
+371794     2     0.0046974684      1     1     0.26256696 
+371795     2     0.0046974684      1     1     0.26256696 
+371796     2     0.0046974684      1     1     0.26256696 
+371797     2     0.0046974684      1     1     0.26256696 
+371798     2     0.0046974684      1     1     0.26256696 
+371799     2     0.0046974684      1     1     0.26256696 
+371800     2     0.0046974684      1     1     0.26256696 
+371801     2     0.0046974684      1     1     0.26256696 
+371802     2     0.0046974684      1     1     0.26256696 
+371803     2     0.0046974684      1     1     0.26256696 
+371804     2     0.0046974684      1     1     0.26256696 
+371805     2     0.0016337908      1     1     0.30037747 
+371806     2     0.0016337908      1     1     0.30037747 
+371807     2     0.0016337908      1     1     0.30037747 
+371808     2     0.0016337908      1     1     0.30037747 
+371809     2     0.0016337908      1     1     0.30037747 
+371810     2     0.0016337908      1     1     0.30037747 
+371811     2     0.0016337908      1     1     0.30037747 
+371812     2     0.0016337908      1     1     0.30037747 
+371813     2     0.0016337908      1     1     0.30037747 
+371814     2     0.0016337908      1     1     0.30037747 
+371815     2     0.0016337908      1     1     0.30037747 
+371816     2     0.0016337908      1     1     0.30037747 
+371817     2     0.0016337908      1     1     0.30037747 
+371818     2     0.0016337908      1     1     0.30037747 
+371819     2     0.0005914507      1     1     0.34038347 
+371820     2     0.0005914507      1     1     0.34038347 
+371821     2     0.0005914507      1     1     0.34038347 
+371822     2     0.0005914507      1     1     0.34038347 
+371823     2     0.0005914507      1     1     0.34038347 
+371824     2     0.0005914507      1     1     0.34038347 
+371825     2     0.0005914507      1     1     0.34038347 
+371826     2     0.0005914507      1     1     0.34038347 
+371827     2     0.0005914507      1     1     0.34038347 
+371828     2     0.0005914507      1     1     0.34038347 
+371829     2     0.0005914507      1     1     0.34038347 
+371830     2     0.0005914507      1     1     0.34038347 
+371831     2     0.0005914507      1     1     0.34038347 
+371832     2     0.0005914507      1     1     0.34038347 
+371833     2     0.0005914507      1     1     0.34038347 
+371834     2     0.0005914507      1     1     0.34038347 
diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MadGraphPythia8EvtGen_A14NNPDF23LO_TT_bffN.txt b/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MadGraphPythia8EvtGen_A14NNPDF23LO_TT_bffN.txt
index 0a8023eec3b..c5804f11958 100644
--- a/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MadGraphPythia8EvtGen_A14NNPDF23LO_TT_bffN.txt
+++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MadGraphPythia8EvtGen_A14NNPDF23LO_TT_bffN.txt
@@ -3,6 +3,9 @@
 # update : 13/01/2017 by Serhan (added new Stop2L MadSpin samples including branching fractions under k-factor column)
 DSID     FS   CROSSECTION[pb]     K-FACTOR     FILTEREFF   REL.UNCERT
 
+390850   61   21.5949             1.0          1.0         0.140595
+390851   61   21.5949             1.0          1.0         0.140595
+390852   61   21.5949             1.0          1.0         0.140595
 390853   61   8.51615             1.0          1.0         0.139223
 390854   61   8.51615             1.0          1.0         0.139223
 390855   61   8.51615             1.0          1.0         0.139223
diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MadGraphPythia8EvtGen_A14NNPDF23LO_TT_directTT.txt b/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MadGraphPythia8EvtGen_A14NNPDF23LO_TT_directTT.txt
index 8565a545944..aed70174dfe 100644
--- a/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MadGraphPythia8EvtGen_A14NNPDF23LO_TT_directTT.txt
+++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/data/mc15_13TeV/MadGraphPythia8EvtGen_A14NNPDF23LO_TT_directTT.txt
@@ -101,6 +101,8 @@ DSID     FS   CROSSECTION[pb]     K-FACTOR     FILTEREFF   REL.UNCERT
 387245  61      1.83537         1.0     0.544240        0.136985
 387246  61      1.83537         1.0     0.655360        0.136985
 387247  61      64.5085         1.0     0.136420        0.144098
+387248  61      36.3818		1.0	1.4843E-01	0.142189
+387249  61      36.3818		1.0	1.4843E-01	0.142189
 388240  61      0.948333        1.0     1.0     	0.134559
 388241  61      0.948333        1.0     1.0     	0.134559
 388242  61      0.51848         1.0     1.0     	0.133797
@@ -133,3 +135,99 @@ DSID     FS   CROSSECTION[pb]     K-FACTOR     FILTEREFF   REL.UNCERT
 388269  61      0.00615134      1.0     1.0		0.162953
 388270  61      0.00615134      1.0     1.0		0.162953
 388271  61      0.00615134      1.0     1.0		0.162953
+389205	61	8.51615		1.0	6.3740E-01	0.139223	
+389206	61	1.83537		1.0	8.7773E-01	0.136985
+389206	61	1.83537		1.0	8.3975E-01	0.136985
+389208	61	0.296128	1.0	1.0	0.132687
+389209	61	0.296128	1.0	1.0	0.132687
+389210	61	0.296128	1.0	1.0	0.132687
+389212	61 	0.174599	1.0	1.0	0.132074
+389213	61	0.107045	1.0	1.0	0.129232
+389214	61	0.107045	1.0	1.0	0.129232
+389216	61	0.0670476	1.0	1.0	0.133429
+389217	61 	0.0431418	1.0	1.0	0.137455
+389218	61 	0.0283338	1.0	1.0	0.14171
+389219	61 	0.0189612	1.0	1.0	0.14702
+389220	61 	0.0189612	1.0	1.0	0.14702
+389221	61 	0.0128895	1.0	1.0	0.152026
+389222	61 	0.0128895	1.0	1.0	0.152026
+389223	61 	0.0128895	1.0	1.0	0.152026
+389224	61 	0.00883465	1.0	1.0	0.157177
+389225	61 	0.00883465	1.0	1.0	0.157177
+389226	61 	0.00883465	1.0	1.0	0.157177
+389227	61 	0.00883465	1.0	1.0	0.157177
+389230	61 	0.00615134	1.0	1.0	0.162953
+389231	61 	0.00615134	1.0	1.0	0.162953
+389232	61 	0.00615134	1.0	1.0	0.162953
+389233	61 	0.00432261	1.0	1.0	0.167859
+389234	61 	0.00432261	1.0	1.0	0.167859
+389235	61 	0.00432261	1.0	1.0	0.167859
+389236	61 	0.00432261	1.0	1.0	0.167859
+389237	61 	0.00432261	1.0	1.0	0.167859
+389238	61 	0.00432261	1.0	1.0	0.167859
+389239	61 	0.00432261	1.0	1.0	0.167859
+389240	61 	0.00432261	1.0	1.0	0.167859
+389241	61 	0.00432261	1.0	1.0	0.167859
+389242	61 	0.00432261	1.0	1.0	0.167859
+389243	61 	0.00432261	1.0	1.0	0.167859
+389244	61 	0.00432261	1.0	1.0	0.167859
+389245	61 	0.00307413	1.0	1.0	0.173377
+389246	61 	0.00307413	1.0	1.0	0.173377
+389247	61 	0.00307413	1.0	1.0	0.173377
+389248	61 	0.00307413	1.0	1.0	0.173377
+389249	61 	0.00307413	1.0	1.0	0.173377
+389250	61 	0.00307413	1.0	1.0	0.173377
+389251	61 	0.00307413	1.0	1.0	0.173377
+389252	61 	0.00307413	1.0	1.0	0.173377
+389253	61 	0.00307413	1.0	1.0	0.173377
+389254	61 	0.00307413	1.0	1.0	0.173377
+389255	61 	0.00307413	1.0	1.0	0.173377
+389256	61 	0.00307413	1.0	1.0	0.173377
+389257	61 	0.00221047	1.0	1.0	0.179259
+389258	61 	0.00221047	1.0	1.0	0.179259
+389259	61 	0.00221047	1.0	1.0	0.179259
+389260	61 	0.00221047	1.0	1.0	0.179259
+389261	61 	0.00221047	1.0	1.0	0.179259
+389262	61 	0.00221047	1.0	1.0	0.179259
+389263	61 	0.00221047	1.0	1.0	0.179259
+389264	61 	0.00221047	1.0	1.0	0.179259
+389265	61 	0.00221047	1.0	1.0	0.179259
+389266	61 	0.00221047	1.0	1.0	0.179259
+389267	61 	0.00221047	1.0	1.0	0.179259
+389268	61 	0.00221047	1.0	1.0	0.179259
+389269	61 	0.00159844	1.0	1.0	0.185209
+389270	61 	0.00159844	1.0	1.0	0.185209
+389271	61 	0.00159844	1.0	1.0	0.185209
+389272	61 	0.00159844	1.0	1.0	0.185209
+389273	61 	0.00159844	1.0	1.0	0.185209
+389274	61 	0.00159844	1.0	1.0	0.185209
+389275	61 	0.00159844	1.0	1.0	0.185209
+389276	61 	0.00159844	1.0	1.0	0.185209
+389277	61 	0.00159844	1.0	1.0	0.185209
+389278	61 	0.00159844	1.0	1.0	0.185209
+389279	61 	0.00159844	1.0	1.0	0.185209
+389280	61 	0.00159844	1.0	1.0	0.185209
+389281	61 	0.0011583	1.0	1.0	0.193006
+389282	61 	0.0011583	1.0	1.0	0.193006
+389283	61 	0.0011583	1.0	1.0	0.193006
+389284	61 	0.0011583	1.0	1.0	0.193006
+389285	61 	0.0011583	1.0	1.0	0.193006
+389286	61 	0.0011583	1.0	1.0	0.193006
+389287	61 	0.0011583	1.0	1.0	0.193006
+389288	61 	0.0011583	1.0	1.0	0.193006
+389289	61 	0.0011583	1.0	1.0	0.193006
+389290	61 	0.0011583	1.0	1.0	0.193006
+389291	61 	0.0011583	1.0	1.0	0.193006
+389292	61 	0.0011583	1.0	1.0	0.193006
+389293	61 	0.000850345	1.0	1.0	0.201604
+389294	61 	0.000850345	1.0	1.0	0.201604
+389295	61 	0.000850345	1.0	1.0	0.201604
+389296	61 	0.000850345	1.0	1.0	0.201604
+389297	61 	0.000850345	1.0	1.0	0.201604
+389298	61 	0.000850345	1.0	1.0	0.201604
+389299	61 	0.000850345	1.0	1.0	0.201604
+389300	61	0.000850345	1.0	1.0	0.201604
+389301	61	0.000850345	1.0	1.0	0.201604
+389302	61	0.000850345	1.0	1.0	0.201604
+389303	61	0.000850345	1.0	1.0	0.201604
+389304	61	0.000850345	1.0	1.0	0.201604
diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/doc/README.rst b/PhysicsAnalysis/SUSYPhys/SUSYTools/doc/README.rst
index 150cba0eab7..fc7be789b21 100644
--- a/PhysicsAnalysis/SUSYPhys/SUSYTools/doc/README.rst
+++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/doc/README.rst
@@ -16,7 +16,7 @@ SUSYTools
 Recommended tags
 ------------------------------------
 
-**Rel 20.7 Samples :**   Base,2.4.25 + SUSYTools-00-08-40
+**Rel 20.7 Samples :**   Base,2.4.25 + SUSYTools-00-08-41
 
 **Rel 20.1 Samples :**   Base,2.3.8 + SUSYTools-00-07-58
 
diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/doc/packages.txt b/PhysicsAnalysis/SUSYPhys/SUSYTools/doc/packages.txt
index 2b887597050..5b111a58f0f 100644
--- a/PhysicsAnalysis/SUSYPhys/SUSYTools/doc/packages.txt
+++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/doc/packages.txt
@@ -1,6 +1,6 @@
 #for running on Base,2.4.25
 #
-# No packages!  Packages listed here should be listed like:
-#atlasoff/PhysicsAnalysis/TauID/TauAnalysisTools/tags/TauAnalysisTools-00-02-22
+# Tau MVA bugfix; see https://its.cern.ch/jira/browse/ATLTAU-1211
+atlasoff/PhysicsAnalysis/TauID/TauAnalysisTools/tags/TauAnalysisTools-00-02-37
 #
 #
diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/scripts/CheckDAODCompleteness.py b/PhysicsAnalysis/SUSYPhys/SUSYTools/scripts/CheckDAODCompleteness.py
new file mode 100755
index 00000000000..1168a9e3798
--- /dev/null
+++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/scripts/CheckDAODCompleteness.py
@@ -0,0 +1,97 @@
+#!/usr/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#################################################################################################################
+# B. Martin - 26/01/2017
+# 
+# This script checks whether a DAOD was produced with the full statistics of the corresponding xAOD.
+# python checkDAODstats.py list.txt
+# where list.txt is a list of MC15 DAODs 
+#
+# Don't forget to setup pyAMI...
+#
+# export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
+# source $ATLAS_LOCAL_ROOT_BASE/user/atlasLocalSetup.sh
+# lsetup pyami
+#
+#################################################################################################################
+
+# argument for the SQL request
+def MakeArg( DSidentifier, InputType):
+
+    arg='-gLiteEntity=\"prodsys_task\" -gLiteQuery=\"SELECT prodsys_task.prodsysIdentifier, prodsys_task.nInputEvents, prodsys_task.nInputEventsUsed, prodsys_task.datasetFK, prodsys_task.identifier WHERE dataset.identifier=\'%s\'\", -processingStep=\"production\" -project=\"mc15_001\" -sql=\"SELECT prodsys_task.prodsysIdentifier, prodsys_task.nInputEvents, prodsys_task.nInputEventsUsed, prodsys_task.datasetFK, prodsys_task.identifier ,\'mc15_001\' as PROJECT,\'production\' as PROCESS, \'prodsys_task\' as AMIENTITYNAME, prodsys_task.identifier as AMIELEMENTID , FROM dataset,prodsys_task WHERE (dataset.identifier IN (SELECT dataset.identifier FROM dataset WHERE dataset.identifier = \'%s\')) AND (dataset.identifier = prodsys_task.datasetFK )\" -stats=\"prodsys_task.%s\"' % (DSidentifier, DSidentifier, InputType)
+
+    return arg
+
+
+from sys import argv
+import pyAMI.client
+
+client = pyAMI.client.Client('atlas')
+
+if len(argv) != 2:
+    print "Error: please pass the script an input file containing a list of MC15 DAODs:"
+    print "CheckDAODCompleteness.py list_of_datasets.txt"
+    exit(0)
+
+print "Reading list of DAODs from file %s" % argv[1]
+
+infile = open(argv[1],"r")
+
+import time
+outfilenom = 'for_reprocessing_'+time.strftime('%y%m%d_%H%M%S')+'.txt'
+outfile = open(outfilenom,'w')
+found_a_file = False
+
+for asample in infile.readlines(): 
+    # Get rid of comments
+    sample = asample.split('#')[0].strip()
+    # Skip blank linkes
+    if ''==sample: continue
+
+    if 'mc15_13TeV' not in sample or '_p' not in sample or not 'merge.DAOD_' in sample:
+        print "unexpected input %s, the script only runs over MC15 DAODs" % sample
+        continue
+
+    # strip mc15_13TeV: if present
+    sample = sample.replace('mc15_13TeV:','')
+
+    print 'Checking sample',sample
+
+    result_DAOD = client.execute(['GetDatasetInfo', '-logicalDatasetName=%s'%sample], format = 'dict_object')
+
+    identifier=result_DAOD.get_rows('Element_Info')[0]['identifier']
+
+    # SQL query to retrieve nInputEvents and nInputEventsUsed for that DAOD
+    nInputEvents_DAOD = int(client.execute(['SearchQuery', MakeArg(identifier,'nInputEvents')], format = 'dict_object').get_rows('Element_Info')[0]['SUM'])
+    nInputEventsUsed_DAOD = int(client.execute(['SearchQuery', MakeArg(identifier,'nInputEventsUsed')], format = 'dict_object').get_rows('Element_Info')[0]['SUM'])
+    
+    # this checks whether some derivation jobs have failed
+    if nInputEventsUsed_DAOD < nInputEvents_DAOD:
+        print "\nWarning: nInputEvents_DAOD = %i, nInputEventsUsed_DAOD = %i, likely some failed derivation jobs\n"%(nInputEvents_DAOD,nInputEventsUsed_DAOD)
+    elif nInputEventsUsed_DAOD > nInputEvents_DAOD:
+        print "\nERROR: INCONSISTENT RESULT, nInputEvents_DAOD = %i, nInputEventsUsed_DAOD = %i\n"%(nInputEvents_DAOD,nInputEventsUsed_DAOD)
+
+    # retrieve number of events in xAOD
+    result_xAOD = client.execute(['GetDatasetProv', '-logicalDatasetName=%s'%sample], format = 'dict_object')
+    nEvents_xAOD = int(result_xAOD.get_rows('node')[1]['events'])
+
+    # this checks whether the derivation job was run over the full xAOD
+    if nInputEvents_DAOD < nEvents_xAOD:
+        print "\nWARNING !!! NOT ALL xAOD EVENTS WERE PROCESSED: number of events in xAOD = %i, number of input events for DAOD = %i"%(nEvents_xAOD,nInputEvents_DAOD)
+        print "This DAOD should be reprocessed (with the same ptag) to pick up the remaining statistics\n"
+        outfile.write(sample+'\n')
+        found_a_file=True
+    elif nInputEvents_DAOD > nEvents_xAOD:
+        print "\nERROR: INCONSISTENT RESULT, number of event in xAOD = %i, number of input events for DAOD = %i\n"%(nEvents_xAOD,nInputEvents_DAOD)
+
+infile.close()
+outfile.close()
+
+if found_a_file:
+    print 'You can find all samples that should be reprocessed in the file',outfilenom
+    print 'Please request derivations for these samples at http://its.cern.ch/jira/browse/ATLSUSYDPD'
+else:
+    import os
+    os.remove( outfilenom )
+
diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/src/ApplySUSYTools.cxx b/PhysicsAnalysis/SUSYPhys/SUSYTools/src/ApplySUSYTools.cxx
index 9f27a7cb048..6e501a548b5 100644
--- a/PhysicsAnalysis/SUSYPhys/SUSYTools/src/ApplySUSYTools.cxx
+++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/src/ApplySUSYTools.cxx
@@ -365,8 +365,9 @@ StatusCode ApplySUSYTools::execute()
 
   const xAOD::VertexContainer* p_Vertices = 0;
   CHECK( evtStore()->retrieve(p_Vertices, "PrimaryVertices") );
+  const xAOD::Vertex* p_PrimVtx = m_objTool->GetPrimVtx();
   float z0PV = -666;
-  if( p_Vertices->size() > 0 ) z0PV = (*p_Vertices)[0]->z();
+  if( p_PrimVtx ) z0PV = p_PrimVtx->z();
   if( doPrint ) ATH_MSG_DEBUG("Got p_Vertices size,z0 = " 
                               <<p_Vertices->size() <<" " <<z0PV);
 
@@ -380,6 +381,18 @@ StatusCode ApplySUSYTools::execute()
 
   if( doPrint ) ATH_MSG_DEBUG("Retrieved all object containers for event " <<m_evtCount);
 
+  // FIXME: Make empty TruthTaus if p_TauJets is empty and not data
+  // Tau code fails in this case!
+  if( !evtStore()->contains<xAOD::TruthParticleContainer>("TruthTaus") &&
+  p_TauJets->size() == 0 && !m_isData ){
+    ATH_MSG_DEBUG("FIXME: TruthTaus hack for empty TauJets.");
+    xAOD::TruthParticleContainer* noTT = new xAOD::TruthParticleContainer;
+    xAOD::TruthParticleAuxContainer* noTTAux = new xAOD::TruthParticleAuxContainer;
+    noTT->setStore( noTTAux );
+    CHECK( evtStore()->record(noTT, "TruthTaus") );
+    CHECK( evtStore()->record(noTTAux, "TruthTausAux.") );
+  }
+
 
   /////////////////////////////////////////////////////////
   // Make shallowCopy for each systematic including Nominal
@@ -463,7 +476,7 @@ StatusCode ApplySUSYTools::execute()
     // setShallowIO writes output as shallow copy
     xAOD::JetContainer* fatjets_nominal(0);
     xAOD::ShallowAuxContainer* fatjets_nominal_aux(0);
-    std::string fatjetcoll = m_FatJetsName; //.substr(0, m_FatJetsName.size()-4);
+    std::string fatjetcoll = m_FatJetsName.substr(0, m_FatJetsName.size()-4);
     CHECK( m_objTool->GetFatJets(fatjets_nominal, fatjets_nominal_aux, true, fatjetcoll, true));
     
     if( doPrint ){
@@ -524,11 +537,12 @@ StatusCode ApplySUSYTools::execute()
       bool issig = m_objTool->IsSignalMuon(*p, m_muPt, m_mud0sig, m_muz0);
       bool iscosmic = m_objTool->IsCosmicMuon(*p, m_muCosmicz0, m_muCosmicd0);
       bool ishi = false;
+      bool isbase = (bool)p->auxdata<char>("baseline");
       if( p->pt() > 4.e3 ) ishi = m_objTool->IsHighPtMuon(*p);
       if( doPrint ) ATH_MSG_DEBUG("Systematic muon pt " <<sysname <<" "
-                                  <<p->pt() <<" " <<iscosmic <<" " 
-                                  <<issig <<" " <<ishi);
-      if( p->auxdata<char>("baseline") ) (*muCutMask)[pIndex] = true;
+                                  <<p->pt() <<"  " <<iscosmic <<" " 
+                                  <<isbase <<" " <<issig <<" " <<ishi);
+      if( isbase ) (*muCutMask)[pIndex] = true;
       ++pIndex;
 
       const xAOD::TrackParticle* trk = 
@@ -539,17 +553,17 @@ StatusCode ApplySUSYTools::execute()
     }
   }
 
+
   // Muons thinning
+  int muonsSize = p_Muons->size();
   CHECK( m_thinningSvc->filter(*p_Muons, *muCutMask, 
                                IThinningSvc::Operator::Or) );
   CHECK( m_thinningSvc->filter(*p_MuonSpecTP, *muSpecCutMask,
                                IThinningSvc::Operator::Or) );
-  for(auto si : m_systInfoMUON){
-    const CP::SystematicSet& sys = si->systset;
-    std::string sysname = sys.name();
-    if( sysname == "" ) sysname = "Nominal";
-    const xAOD::MuonContainer* mus = 0;
-    CHECK( evtStore()->retrieve(mus, m_MuonsName+sysname) );
+  for(auto si : m_systInfoMUON){ const CP::SystematicSet& sys =
+    si->systset; std::string sysname = sys.name(); if( sysname == "" )
+    sysname = "Nominal"; const xAOD::MuonContainer* mus = 0; CHECK(
+    evtStore()->retrieve(mus, m_MuonsName+sysname) );
     CHECK( m_thinningSvc->filter(*mus, *muCutMask,
                                  IThinningSvc::Operator::Or) );
   }
@@ -661,11 +675,15 @@ StatusCode ApplySUSYTools::execute()
     CHECK( evtStore()->record(metaux, METsName+sysname+"Aux.") );
     if( doPrint ) ATH_MSG_DEBUG("Recorded " <<METsName+sysname <<" "
                                 <<METsName+sysname+"Aux.");
-
-    CHECK( m_objTool->GetMET(*met, p_JetsSys, p_ElectronsN, p_MuonsN, 
-                             0, 0, m_doTST, m_doTST).isSuccess() );
-    if( doPrint ) ATH_MSG_DEBUG("MET et " 
-                  <<(*met)["Final"]->met() <<" " <<sysname);
+    // Only redo MET if primary vertex exists
+    if( p_PrimVtx ){
+      CHECK( m_objTool->GetMET(*met, p_JetsSys, p_ElectronsN, p_MuonsN, 
+                               0, 0, m_doTST, m_doTST).isSuccess() );
+      if( doPrint ) ATH_MSG_DEBUG("MET et " 
+                    <<(*met)["Final"]->met() <<" " <<sysname);
+    } else {
+      ATH_MSG_DEBUG("No primary vertex, skipping GetMET");
+    }
   }
 
   // Soft term systematics
@@ -686,11 +704,12 @@ StatusCode ApplySUSYTools::execute()
       CHECK( evtStore()->record(metaux, METsName+sysname+"Aux.") );
       if( doPrint ) ATH_MSG_DEBUG("Recorded " <<METsName+sysname <<" "
                                   <<METsName+sysname+"Aux.");
-
-      CHECK( m_objTool->GetMET(*met, p_JetsN, p_ElectronsN, p_MuonsN, 
-                               0, 0, m_doTST, m_doTST).isSuccess() );
-      if( doPrint ) ATH_MSG_DEBUG("MET et " 
-                    <<(*met)["Final"]->met() <<" " <<sysname);
+      if( p_PrimVtx ){
+        CHECK( m_objTool->GetMET(*met, p_JetsN, p_ElectronsN, p_MuonsN, 
+                                 0, 0, m_doTST, m_doTST).isSuccess() );
+        if( doPrint ) ATH_MSG_DEBUG("MET et " 
+                      <<(*met)["Final"]->met() <<" " <<sysname);
+      }
     }
   } else {
     if( doPrint ) ATH_MSG_DEBUG("Start MET CST systematics");
@@ -707,11 +726,12 @@ StatusCode ApplySUSYTools::execute()
       CHECK( evtStore()->record(metaux, METsName+sysname+"Aux.") );
       if( doPrint ) ATH_MSG_DEBUG("Recorded " <<METsName+sysname <<" "
                                   <<METsName+sysname+"Aux.");
-
-      CHECK( m_objTool->GetMET(*met, p_JetsN, p_ElectronsN, p_MuonsN, 
-                               0, 0, m_doTST, m_doTST).isSuccess() );
-      if( doPrint ) ATH_MSG_DEBUG("MET et " 
-                    <<(*met)["Final"]->met() <<" " <<sysname);
+      if( p_PrimVtx > 0 ){
+        CHECK( m_objTool->GetMET(*met, p_JetsN, p_ElectronsN, p_MuonsN, 
+                                 0, 0, m_doTST, m_doTST).isSuccess() );
+        if( doPrint ) ATH_MSG_DEBUG("MET et " 
+                      <<(*met)["Final"]->met() <<" " <<sysname);
+      }
     }
   }
 
@@ -854,10 +874,11 @@ StatusCode ApplySUSYTools::execute()
     for(const auto& p : *cpPhotons){
       float ptorig = (*p_Photons)[pIndex]->pt();
       CHECK( m_objTool->FillPhoton(*p, m_photonBaselinePt, m_photonEta) );
-      //bool issig = m_objTool->IsSignalPhoton(*p, m_photonPt);
+      bool issig = m_objTool->IsSignalPhoton(*p, m_photonPt);
       if( doPrint ) ATH_MSG_DEBUG("Systematic photon pt " <<sysname <<" "
                                   <<p->pt() <<" " <<ptorig <<" "
-                                  <<(int)p->auxdata<char>("baseline"));
+                                  <<(int)p->auxdata<char>("baseline") <<" "
+                                  <<issig);
       if( p->auxdata<char>("baseline") ){
         if( doPrint && sysname == "Nominal" ){
           ATH_MSG_DEBUG("Accepted Nominal photon pt " <<p->pt());
diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/util/SUSYToolsTester.cxx b/PhysicsAnalysis/SUSYPhys/SUSYTools/util/SUSYToolsTester.cxx
index b57c2c9675c..663fec51ce4 100644
--- a/PhysicsAnalysis/SUSYPhys/SUSYTools/util/SUSYToolsTester.cxx
+++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/util/SUSYToolsTester.cxx
@@ -253,7 +253,8 @@ est.pool.root",relN,(isData?"Data":"MC"),SUSYx);
     m_grl = new GoodRunsListSelectionTool("GoodRunsListSelectionTool");
     std::vector<std::string> myGRLs;
     myGRLs.push_back(PathResolverFindCalibFile("GoodRunsLists/data15_13TeV/20160720/physics_25ns_20.7.xml"));
-    myGRLs.push_back(PathResolverFindCalibFile("GoodRunsLists/data16_13TeV/20160720/physics_25ns_20.7.xml"));
+    myGRLs.push_back(PathResolverFindCalibFile("GoodRunsLists/data16_13TeV/20161101/physics_25ns_20.7.xml"));
+
     ANA_CHECK( m_grl->setProperty("GoodRunsListVec", myGRLs) );
     ANA_CHECK( m_grl->setProperty("PassThrough", false) );
     ANA_CHECK( m_grl->initialize() );
@@ -288,7 +289,6 @@ est.pool.root",relN,(isData?"Data":"MC"),SUSYx);
   ANA_CHECK( objTool.setBoolProperty("METDoTrkSyst", true) );
   ANA_CHECK( objTool.setBoolProperty("METDoCaloSyst", false) );
 
-
   ///////////////////////////////////////////////////////////////////////////////////////////
   ////                                            
   ////       ****     THESE FILES ARE MEANT FOR EXAMPLES OF USAGE ONLY        ****       ////
-- 
GitLab