diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/BTagTool.h b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/BTagTool.h
index 4754175d437dc623c7cae51366c41b64cdeef5cb..616e72d709f9bc6cf8887c71cda33eb1372be5da 100755
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/BTagTool.h
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/BTagTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /* **************************************************************************
@@ -71,7 +71,7 @@ namespace Analysis
 
       /** Main routines specific to an ATHENA algorithm */
       StatusCode initialize();
-      StatusCode tagJet(xAOD::Jet&, xAOD::BTagging*, const xAOD::Vertex* vtx = 0);
+      StatusCode tagJet(const xAOD::Jet*, xAOD::BTagging*, const xAOD::Vertex* vtx = 0);
       StatusCode tagJet(const xAOD::JetContainer * jetContainer, xAOD::BTaggingContainer * btaggingContainer);
       StatusCode finalize();
       void finalizeHistos();
diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/IBTagTool.h b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/IBTagTool.h
index 09af271dc7c8197eeb00413105cc97dc5da2c8cc..32960b47d047d34918a94c387fd3abbd6e29c142 100755
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/IBTagTool.h
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/IBTagTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /* **************************************************************************
@@ -45,7 +45,7 @@ class IBTagTool : virtual public IAlgTool
        static const InterfaceID& interfaceID() { return IID_IBTagTool; };
 
        virtual StatusCode initialize() = 0;
-       virtual StatusCode tagJet(xAOD::Jet&, xAOD::BTagging*, const xAOD::Vertex* vtx = 0) = 0;
+       virtual StatusCode tagJet(const xAOD::Jet*, xAOD::BTagging*, const xAOD::Vertex* vtx = 0) = 0;
        virtual StatusCode tagJet(const xAOD::JetContainer * jetContainer, xAOD::BTaggingContainer * btaggingContainer) = 0;
        virtual StatusCode finalize() = 0;
        virtual void finalizeHistos() = 0;
diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/JetBTaggerTool.h b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/JetBTaggerTool.h
index 024d1eb1221dffd273b87d4955fecca447520d17..bdc2999ab2e989d9271f2393a9f1ba064f93d3ea 100644
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/JetBTaggerTool.h
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/JetBTaggerTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef BTAGGING_JETBTAGGERTOOL_HH
@@ -26,7 +26,6 @@ namespace Analysis{
 class IBTagTool;
 class IBTagTrackAssociation;
 class IBTagSecVertexing;
-class IBTagJetPtScaling;
 
 class  JetBTaggerTool: 
   virtual public asg::AsgTool, 
@@ -49,12 +48,10 @@ class  JetBTaggerTool:
   Gaudi::Property<SG::WriteDecorHandleKey<xAOD::JetContainer> >m_jetBTaggingLinkName{this,"JetContainerName","","Element link form jet to BTagging container"};
   SG::WriteHandleKey<xAOD::BTaggingContainer> m_BTaggingCollectionName { this, "BTaggingCollectionName", "", "Output BTagging container"} ;
 
-  // FIXME: mutable
-  mutable ToolHandle< IBTagTool > m_bTagTool; 
+  ToolHandle< IBTagTool > m_bTagTool; 
   ToolHandle< IBTagTrackAssociation > m_BTagTrackAssocTool;
   ToolHandle< IBTagSecVertexing > m_bTagSecVtxTool;
   bool m_augment;
-  bool m_PtRescale;
   ServiceHandle<MagField::IMagFieldSvc> m_magFieldSvc;
 
 };
diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/BTagTool.cxx b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/BTagTool.cxx
index 67cae2c01cfa093761a3916fb50530cc11b12849..ea20aec3fbbf3978489481c4e29f28c6a72a72df 100755
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/BTagTool.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/BTagTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -83,10 +83,11 @@ namespace Analysis {
   }
 
 
-  StatusCode BTagTool::tagJet(xAOD::Jet& jetToTag, xAOD::BTagging* BTag, const xAOD::Vertex* vtx) {
+  StatusCode BTagTool::tagJet(const xAOD::Jet* jetToTag, xAOD::BTagging* BTag, const xAOD::Vertex* vtx) {
+
+    ATH_MSG_VERBOSE("#BTAG# (p, E) of original Jet: (" << jetToTag->px() << ", " << jetToTag->py() << ", "
+		    << jetToTag->pz() << "; " << jetToTag->e() << ") MeV");
 
-    ATH_MSG_VERBOSE("#BTAG# (p, E) of original Jet: (" << jetToTag.px() << ", " << jetToTag.py() << ", "
-		    << jetToTag.pz() << "; " << jetToTag.e() << ") MeV");
     m_nAllJets++;
 
     /* ----------------------------------------------------------------------------------- */
@@ -198,10 +199,8 @@ namespace Analysis {
 
     xAOD::BTaggingContainer::iterator btagIter=btaggingContainer->begin();
     for (xAOD::JetContainer::const_iterator jetIter = jetContainer->begin(); jetIter != jetContainer->end(); ++jetIter, ++btagIter) {
-      //temporary const_cast
-      xAOD::Jet& jetToTag = const_cast<xAOD::Jet&>( **jetIter );
-      ATH_MSG_VERBOSE("#BTAG# (p, E) of original Jet: (" << jetToTag.px() << ", " << jetToTag.py() << ", "
-		    << jetToTag.pz() << "; " << jetToTag.e() << ") MeV");
+      ATH_MSG_VERBOSE("#BTAG# (p, E) of original Jet: (" << (*jetIter)->px() << ", " << (*jetIter)->py() << ", "
+                    << (*jetIter)->pz() << "; " << (*jetIter)->e() << ") MeV");
       m_nAllJets++;
 
       /* ----------------------------------------------------------------------------------- */
@@ -212,7 +211,7 @@ namespace Analysis {
       ToolHandleArray< ITagTool >::iterator itTagToolsEnd = m_bTagToolHandleArray.end();
       for (  ; itTagTools != itTagToolsEnd; ++itTagTools ) {
         (*itTagTools)->setOrigin(primaryVertex);
-        StatusCode sc = (*itTagTools)->tagJet(jetToTag, *btagIter);
+        StatusCode sc = (*itTagTools)->tagJet(*jetIter, *btagIter);
         if (sc.isFailure()) {
           ATH_MSG_WARNING("#BTAG# failed tagger: " << (*itTagTools).typeAndName() );
         }
diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/JetBTaggerTool.cxx b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/JetBTaggerTool.cxx
index ffaaadabe951b32e0c48c9c780c8e181e4f21bd4..21fa5c70a19c8f0b3b37b1d8ccffa8c61c89c1e3 100644
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/JetBTaggerTool.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/JetBTaggerTool.cxx
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
    */
 
 #include "BTagging/JetBTaggerTool.h"
@@ -34,7 +34,6 @@ namespace Analysis {
     m_BTagTrackAssocTool("Analysis::BTagTrackAssociation", this),
     m_bTagSecVtxTool("Analysis::BTagSecVertexing", this),
     m_augment(false),
-    m_PtRescale(false),
     m_magFieldSvc("AtlasFieldSvc",n)
   {
 
@@ -42,7 +41,6 @@ namespace Analysis {
     declareProperty( "BTagTrackAssocTool", m_BTagTrackAssocTool);
     declareProperty( "BTagSecVertexing", m_bTagSecVtxTool);
     declareProperty( "BTagAugmentation", m_augment, "switch to decide whether to merely extend the BTagging information as opposed to re-tagging from scratch");
-    declareProperty( "BTagJetPtRescale", m_PtRescale, "switch to decide whether to carry out jet pt rescaling (to use calorimeter jet tunings for track jets)");
     declareProperty("MagFieldSvc",    m_magFieldSvc );
   }
 
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/CMakeLists.txt b/PhysicsAnalysis/JetTagging/JetTagTools/CMakeLists.txt
index 8704f6e27a5ef538a8ad052b4898dfd78a4b4953..73eea254f2d64e35a1595ff4c566c57a32c95353 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/CMakeLists.txt
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/CMakeLists.txt
@@ -81,7 +81,7 @@ atlas_add_library( JetTagToolsLib
     src/MV1Tag.cxx src/MV2Tag.cxx
     src/JetFitterVariablesFactory.cxx src/MSVVariablesFactory.cxx
     src/MultiSVTag.cxx src/JetVertexCharge.cxx src/SoftMuonTag.cxx
-    src/ExKtbbTag.cxx src/ExKtbbTagTool.cxx src/MultivariateTagManager.cxx
+    src/ExKtbbTagTool.cxx src/MultivariateTagManager.cxx
     src/DL1Tag.cxx src/TagNtupleDumper.cxx src/RNNIPTag.cxx
 
     PUBLIC_HEADERS JetTagTools
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/IPTag.h b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/IPTag.h
index bd0042092886f4b26eb0f7b53bf9be47fce888f2..d412d25a0727225175d923c265b00be454495bf5 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/IPTag.h
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/IPTag.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef JETTAGTOOLS_IPTAG_H
@@ -55,7 +55,7 @@ namespace Analysis {
 	ElementLink and persistency has to be solved for that. Revisit ... */
     void setOrigin(const xAOD::Vertex* priVtx);
       
-    StatusCode tagJet(xAOD::Jet& jetToTag, xAOD::BTagging * BTag);    
+    StatusCode tagJet(const xAOD::Jet * jetToTag, xAOD::BTagging * BTag);    
 
     /** calculate individual track contribution to the three likelihoods: */
     void trackWeight(std::string jetAuthor, TrackGrade grade, double sa0, double sz0,
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/ITagTool.h b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/ITagTool.h
index 9a9a4560f435f53fd56432ede5751a297312248a..de16714e9b99a0c3273ada5956e95468b0ace418 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/ITagTool.h
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/ITagTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -48,7 +48,7 @@ namespace Analysis
        TrackParticles via navigation. But maybe this is not a very good idea since then
        a JetTag allways have to be created even if the tagging does not work. Think ...
        */
-      virtual StatusCode tagJet(xAOD::Jet& jetToTag, xAOD::BTagging *) = 0;
+      virtual StatusCode tagJet(const xAOD::Jet *, xAOD::BTagging *) = 0;
       
       /** finalize the histos: Normalize other histos and fill the integratedNegativeIP histos.
        This cannot be done in the finalize() of this algtool because the histo service
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/JetFitterTag.h b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/JetFitterTag.h
index 8843ccd83422bd77c8fc0b8a3b814c708f57a7ca..a0b0bc52b79dc2bd061b6ee3b570a8d9fc67ccea 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/JetFitterTag.h
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/JetFitterTag.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 // -*-c++-*- header for JetFitterTag
@@ -72,54 +72,27 @@ namespace Analysis {
     */
     void setOrigin(const xAOD::Vertex*);
       
-    virtual StatusCode tagJet(xAOD::Jet& jetToTag, xAOD::BTagging* BTag);   
+    virtual StatusCode tagJet(const xAOD::Jet* jetToTag, xAOD::BTagging* BTag);   
     
   private:      
 
-    // int augment_with_svinfoplus(JetFitterGenericTagInfo* tag_info, 
-    // 				const xAOD::Jet& jet_with_sv1); 
-    // int augment_with_ipinfoplus(JetFitterGenericTagInfo* tag_info, 
-    // 				const xAOD::Jet& jet_with_ipinfo); 
-    // void get_tagger_weights(IJetFitterTagInfo* generic_vars, 
-    // 			    const xAOD::BTagging&); 
-    // double get_simple_tagger_weights(IJetFitterTagInfo* generic_vars, 
-    // 				     const xAOD::BTagging&); 
-    // std::vector<double> get_likelihood_vector(const xAOD::BTagging&, 
-    // 					      const std::string&) const; 
-    /** This switch is needed to indicate what to do. 
-	The algorithm can be run to produce reference histograms from the
-	given MC files (m_runModus=0) or to work in analysis mode
-	(m_runModus=1) where already made reference histograms are read.
-    */ 
-    
     std::string    m_runModus;          
 
     /** for reference mode: */
 
     bool m_doForcedCalib;
     std::string m_ForcedCalibName;
-    // std::string m_svx_tagger_name; 
     std::string m_ipinfo_tagger_name; 
     std::string m_secVxFinderName;
     std::string m_xAODBaseName;
 
-    // bool m_store_only_base_object; 
-
-    // the GenericTagInfo object will have some duplicate info, 
-    // by default it's removed at the end of the tagging step
-    // bool m_save_temporary_variables; 
-
     // skip light jets with heavy flavor in this cone
     double m_jetPtMinRef; // min cut on jet pT for reference
 
-    // std::vector<std::string> m_supplementalTaggers; 
-    // std::vector<std::string> m_multiweightSupplementalTaggers; 
     std::vector<std::string> m_jetCollectionList; // 
     std::vector<std::string> m_hypothese; // hypotheses: b | c | u
-    // std::map<std::string, std::vector<double> > m_proxy_likelihoods; 
 
     ToolHandle<IJetFitterNtupleWriter> m_ntupleWriter;
-    // ToolHandle<IJetFitterVariablesFactory> m_variablesFactory;
     ToolHandle<IJetFitterClassifierTool> m_classifier;
     
 
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/JetTagUtils.h b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/JetTagUtils.h
index f19db6574660d9fe187c630fe92bff4ec35036c2..e0d25fe89b034d8c594edcef92995766bf573a30 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/JetTagUtils.h
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/JetTagUtils.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef JETTAGTOOLS_JETTAGUTILS
@@ -9,7 +9,7 @@
 
 namespace JetTagUtils{
 
-  std::string getJetAuthor(xAOD::Jet& jetToTag);
+  std::string getJetAuthor(const xAOD::Jet * jetToTag);
 
 }
 
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/JetVertexCharge.h b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/JetVertexCharge.h
index 8b664d68e86d772cc52cb13c76c18321dc4f46d3..9bb931226d697e626903054a2174c632d88ce60c 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/JetVertexCharge.h
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/JetVertexCharge.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -58,7 +58,7 @@ namespace Analysis {
     void finalizeHistos(); 
     
 
-    StatusCode tagJet(xAOD::Jet& jetToTag, xAOD::BTagging* BTag); 
+    StatusCode tagJet(const xAOD::Jet* jetToTag, xAOD::BTagging* BTag); 
 
 
   private:
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/MV1Tag.h b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/MV1Tag.h
index 9de3520300c868a7492b0cbfa9f7be0b1fed45ac..d12efc93131ce874cfb8ec5d3c2d69efb183967c 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/MV1Tag.h
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/MV1Tag.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef JETTAGTOOLS_MV1TAG_H
@@ -43,7 +43,7 @@ namespace Analysis {
 	ElementLink and persistency has to be solved for that. Revisit ... */
     void setOrigin(const xAOD::Vertex* priVtx);
       
-    StatusCode tagJet(xAOD::Jet& jetToTag, xAOD::BTagging* BTag);
+    StatusCode tagJet(const xAOD::Jet* jetToTag, xAOD::BTagging* BTag);
 
     void finalizeHistos() {};
 
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/MultiSVTag.h b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/MultiSVTag.h
index ee4e4b2ad616ec400989cf53657ae2f7d30d9969..fb4686b59427d176bbde5989d9fdbf3864fa9949 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/MultiSVTag.h
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/MultiSVTag.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -33,7 +33,7 @@ namespace Analysis
       StatusCode initialize();
       StatusCode finalize();      
 
-      StatusCode tagJet(xAOD::Jet& jetToTag, xAOD::BTagging * BTag);
+      StatusCode tagJet(const xAOD::Jet* jetToTag, xAOD::BTagging * BTag);
       void setOrigin(const xAOD::Vertex* priVtx);
       void finalizeHistos();
       
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/MultivariateTagManager.h b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/MultivariateTagManager.h
index 2478d1d08502848d87969d79f15c485cb4402868..acb266ee2846de79e155d7ea288e9f30306e3e64 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/MultivariateTagManager.h
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/MultivariateTagManager.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef BTAGTOOL_MULTIVARIATETAGMANAGER_C
@@ -39,7 +39,7 @@ namespace Analysis {
     void setOrigin(const xAOD::Vertex* priVtx);
     void finalizeHistos() {};
 
-    StatusCode tagJet(xAOD::Jet& jetToTag, xAOD::BTagging* BTag);
+    StatusCode tagJet(const xAOD::Jet* jetToTag, xAOD::BTagging* BTag);
 
 
   private:
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/RNNIPTag.h b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/RNNIPTag.h
index bcd122ee35513265af58d012ccdf9914f54baae2..04e9fa057ae1addcebf91cdda6f47575f76bd211 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/RNNIPTag.h
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/RNNIPTag.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef JETTAGTOOLS_RNNIPTAG_H
@@ -68,12 +68,7 @@ namespace Analysis {
   be solved for that. Revisit ... */
     void setOrigin(const xAOD::Vertex* priVtx);
 
-    StatusCode tagJet(xAOD::Jet& jetToTag, xAOD::BTagging * BTag);
-
-    /** calculate individual track contribution to the three likelihoods: */
-    // void trackWeight(std::string jetAuthor, TrackGrade grade,
-    //                  double sa0, double sz0, double & twb, double &
-    //                  twu, double & twc);
+    StatusCode tagJet(const xAOD::Jet* jetToTag, xAOD::BTagging * BTag);
 
     void finalizeHistos() {};
 
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/SVForIPTool.h b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/SVForIPTool.h
index 05940ed6659030d83418bdf4af6a4bbfe37b452d..5a7fde4aaabe091c99acef9637a48bfccd1d945e 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/SVForIPTool.h
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/SVForIPTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef JetTagTools_SVForIPTool_H
@@ -17,23 +17,13 @@
 
 #include "GeoPrimitives/GeoPrimitives.h"
 #include "AthenaBaseComps/AthAlgTool.h"
-#include "xAODJet/Jet.h"
 #include "xAODTracking/Vertex.h"
 #include "xAODTracking/VertexContainer.h"
 #include "xAODBTagging/BTagging.h"
-//#include "TrkTrack/Track.h"
 
 #include <vector>
 #include <string>
 
-// namespace Trk
-// {
-//   class RecVertex;
-// }
-
-//class Jet;
-
-
 namespace Analysis {
 
   static const InterfaceID IID_SVForIPTool("Analysis::SVForIPTool", 1, 0);
@@ -55,7 +45,6 @@ namespace Analysis {
       /**Method to get the B flight direction from the secondary vertex info */
     void getDirectionFromSecondaryVertexInfo(Amg::Vector3D & SvxDirection,
                                              bool & canUseSvxDirection,
-                                             const xAOD::Jet & jetToTag,
                                              xAOD::BTagging * BTag,
                                              const std::string & secVxFinderName,
                                              const xAOD::Vertex & priVtx);
@@ -64,7 +53,6 @@ namespace Analysis {
 
     /**Method to get the tracks from V0 from the secondary vertex info */
     void getTrkFromV0FromSecondaryVertexInfo(std::vector<const xAOD::TrackParticle*> & TrkFromV0,
-                                             const xAOD::Jet & jetToTag,
                                              xAOD::BTagging * BTag,
                                              const std::string & secVxFinderName);
 
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/SVTag.h b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/SVTag.h
index 94f48e322833f3e34fb6068e230f4cf8b28df64f..d2977b41d2f7f0020d21a8f212f06331c43829d4 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/SVTag.h
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/SVTag.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -39,7 +39,7 @@ namespace Analysis
       StatusCode initialize();
       StatusCode finalize();
       
-      StatusCode tagJet(xAOD::Jet& jetToTag, xAOD::BTagging * BTag);    
+      StatusCode tagJet(const xAOD::Jet* jetToTag, xAOD::BTagging * BTag);    
       void setOrigin(const xAOD::Vertex* priVtx);
       void finalizeHistos();
       
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/SoftMuonTag.h b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/SoftMuonTag.h
index ff2798ab57331bdf2780a0cacef0a587ebde8fd8..2b8f7d980b99cb32267f843e9fb096ae72ffdf09 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/SoftMuonTag.h
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/SoftMuonTag.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef JETTAGTOOLS_SOFTMUONTAG_H
@@ -31,7 +31,6 @@
 namespace Trk  { class VxCandidate; }
 namespace Reco { class ITrackToVertex; }
 namespace Trk  { class ITrackToVertexIPEstimator; }
-//class Jet;
 namespace Analysis { class MuonContainer; }
 class AnalysisTools;
 
@@ -60,7 +59,7 @@ namespace Analysis
 	ElementLink and persistency has to be solved for that. Revisit ... */
     void setOrigin(const xAOD::Vertex* priVtx);
       
-    StatusCode tagJet(xAOD::Jet& jetToTag, xAOD::BTagging * BTag);  
+    StatusCode tagJet(const xAOD::Jet* jetToTag, xAOD::BTagging * BTag);  
       
     void finalizeHistos();
       
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/src/IPTag.cxx b/PhysicsAnalysis/JetTagging/JetTagTools/src/IPTag.cxx
index a0357f7ad535fe08076043b26ffe01bb4ac11e5b..0a0786925f6f939ec9aac5738377bd6113191f4e 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/src/IPTag.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/src/IPTag.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "JetTagTools/IPTag.h"
@@ -380,7 +380,7 @@ namespace Analysis {
   }
 
 
-  StatusCode IPTag::tagJet(xAOD::Jet& jetToTag, xAOD::BTagging* BTag) {
+  StatusCode IPTag::tagJet(const xAOD::Jet * jetToTag, xAOD::BTagging* BTag) {
 
     ATH_MSG_VERBOSE("#BTAG# m_impactParameterView = " << m_impactParameterView );
     /** author to know which jet algorithm: */
@@ -395,14 +395,14 @@ namespace Analysis {
     // FF: Disable reference mode running for now
     if( m_runModus == "reference" ) {
       // here we require a jet selection:
-      if( jetToTag.pt()>m_jetPtMinRef && fabs(jetToTag.eta())<2.5 ) {
-	label = xAOD::jetFlavourLabel(&jetToTag);
+      if( jetToTag->pt()>m_jetPtMinRef && fabs(jetToTag->eta())<2.5 ) {
+	label = xAOD::jetFlavourLabel(jetToTag);
 	double deltaRtoClosestB = 999., deltaRtoClosestC = 999., deltaRtoClosestT = 999.;
     	double deltaRmin(0.);
-        if (jetToTag.getAttribute("TruthLabelDeltaR_B",deltaRtoClosestB)) {
+        if (jetToTag->getAttribute("TruthLabelDeltaR_B",deltaRtoClosestB)) {
     	  // for purification: require no b or c quark closer than dR=m_purificationDeltaR
-	  jetToTag.getAttribute("TruthLabelDeltaR_C",deltaRtoClosestC);
-	  jetToTag.getAttribute("TruthLabelDeltaR_T",deltaRtoClosestT);
+	  jetToTag->getAttribute("TruthLabelDeltaR_C",deltaRtoClosestC);
+	  jetToTag->getAttribute("TruthLabelDeltaR_T",deltaRtoClosestT);
     	  deltaRmin = deltaRtoClosestB < deltaRtoClosestC ? deltaRtoClosestB : deltaRtoClosestC;
           deltaRmin = deltaRtoClosestT < deltaRmin ? deltaRtoClosestT : deltaRmin;
         } else {
@@ -437,12 +437,12 @@ namespace Analysis {
     
     if (m_SignWithSvx) {
       m_SVForIPTool->getDirectionFromSecondaryVertexInfo(SvxDirection,canUseSvxDirection,//output
-                                                         jetToTag,BTag,m_secVxFinderName,*m_priVtx);//input
+                                                         BTag,m_secVxFinderName,*m_priVtx);//input
     }
     
     // bad tracks from V0s, conversions, interactions:
     m_SVForIPTool->getTrkFromV0FromSecondaryVertexInfo(TrkFromV0,//output
-                                                       jetToTag,BTag,m_secVxFinderName);//input
+                                                       BTag,m_secVxFinderName);//input
     if (TrkFromV0.size()!=0)  ATH_MSG_DEBUG("#BTAG# TrkFromV0 : number of reconstructed bad tracks: " << TrkFromV0.size());
 
     /** extract the TrackParticles from the jet and apply track selection: */
@@ -480,7 +480,7 @@ namespace Analysis {
         const xAOD::TrackParticle* aTemp = **trkIter;
         nbTrak++;
         if( m_trackSelectorTool->selectTrack(aTemp, sumTrkpT) ) {
-          TrackGrade* theGrade = m_trackGradeFactory->getGrade(*aTemp, jetToTag.p4() );
+          TrackGrade* theGrade = m_trackGradeFactory->getGrade(*aTemp, jetToTag->p4() );
           ATH_MSG_VERBOSE("#BTAG#  result of selectTrack is OK, grade= " << theGrade->gradeString() );
 	  bool tobeUsed = false;
           for(int i=0;i<nbPart;i++) {
@@ -515,7 +515,7 @@ namespace Analysis {
     ATH_MSG_VERBOSE("#BTAG# the z of the primary = " << m_priVtx->position().z());
 
     /** jet direction: */
-    Amg::Vector3D jetDirection(jetToTag.px(),jetToTag.py(),jetToTag.pz());
+    Amg::Vector3D jetDirection(jetToTag->px(),jetToTag->py(),jetToTag->pz());
     Amg::Vector3D unit = jetDirection.unit();
     if (m_SignWithSvx && canUseSvxDirection) {
       unit = SvxDirection.unit();
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/src/JetFitterTag.cxx b/PhysicsAnalysis/JetTagging/JetTagTools/src/JetFitterTag.cxx
index d53a830258caf096a66b7adb890c633cc2b50a17..2fdac3bbbd5349ab29b305f7a1f22e0dd05a1c2e 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/src/JetFitterTag.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/src/JetFitterTag.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /******************************************************
@@ -26,8 +26,6 @@
 
 #include "JetTagTools/JetFitterTag.h"
 
-//#include "JetEvent/Jet.h"
-
 #include "JetTagTools/IJetFitterNtupleWriter.h"
 #include "JetTagTools/IJetFitterClassifierTool.h"
 #include "JetTagTools/IJetFitterVariablesFactory.h"
@@ -35,7 +33,6 @@
 
 #include "CLHEP/Vector/LorentzVector.h"
 
-#
 #include "JetTagTools/JetTagUtils.h"
 #include "ParticleJetTools/JetFlavourInfo.h"
 
@@ -156,7 +153,7 @@ namespace Analysis {
     return StatusCode::SUCCESS;
   }
 
-  StatusCode JetFitterTag::tagJet(xAOD::Jet& jetToTag, xAOD::BTagging* BTag) {
+  StatusCode JetFitterTag::tagJet(const xAOD::Jet* jetToTag, xAOD::BTagging* BTag) {
 
     /** author to know which jet algorithm: */
     std::string jetauthor = JetTagUtils::getJetAuthor(jetToTag);
@@ -165,25 +162,25 @@ namespace Analysis {
       jetauthor = m_ForcedCalibName;
     } 
 
-    double jetpT = jetToTag.pt();
-    double jeteta = jetToTag.eta();
+    double jetpT = jetToTag->pt();
+    double jeteta = jetToTag->eta();
 
     /** for the reference mode we need the true label: */
     std::string pref  = "";
     if (m_runModus == "reference" ) {
       // here we require a jet selection:
-      if (jetToTag.pt()>m_jetPtMinRef && fabs(jetToTag.eta())<2.5 ) {
+      if (jetToTag->pt()>m_jetPtMinRef && fabs(jetToTag->eta())<2.5 ) {
         // and also a truth match:
-	int label = xAOD::jetFlavourLabel(&jetToTag);
+	int label = xAOD::jetFlavourLabel(jetToTag);
 	double deltaRtoClosestB = 999., deltaRtoClosestC = 999.;
-	if (jetToTag.getAttribute("TruthLabelDeltaR_B",deltaRtoClosestB)) {
+	if (jetToTag->getAttribute("TruthLabelDeltaR_B",deltaRtoClosestB)) {
 	  // for purification: require no b or c quark closer
 	  // than dR=m_purificationDeltaR
-	  jetToTag.getAttribute("TruthLabelDeltaR_C",deltaRtoClosestC);
+	  jetToTag->getAttribute("TruthLabelDeltaR_C",deltaRtoClosestC);
 	  double deltaRmin = deltaRtoClosestB < deltaRtoClosestC ? deltaRtoClosestB : deltaRtoClosestC;
           //JBdV 04/05/2006 purify also w.r.t tau
           double deltaRtoClosestT;
-	  jetToTag.getAttribute("TruthLabelDeltaR_T",deltaRtoClosestT);
+	  jetToTag->getAttribute("TruthLabelDeltaR_T",deltaRtoClosestT);
           deltaRmin = deltaRtoClosestT < deltaRmin ? 
 	    deltaRtoClosestT : deltaRmin;
         } else {
@@ -210,10 +207,6 @@ namespace Analysis {
     }
 
     
-    //IJetFitterTagInfo* theVariables = 0;
-    //   m_variablesFactory->getITagInfoObject(jetToTag);
-
- 
     // ====================================
     // ====================================
     // === augment variables here =========
@@ -250,273 +243,10 @@ namespace Analysis {
 	    ATH_MSG_WARNING("#BTAG# jet fitter failed in fillLikelihoodValues");
       } 
 
-
-      // generic tag class supports arbitrary double and int variables 
-      // JetFitterGenericTagInfo* generic_vars = 
-      // 	dynamic_cast<JetFitterGenericTagInfo*>(theVariables); 
-
-      //if (m_svx_tagger_name.size() > 0 && generic_vars){ 
-      // augment_with_svinfoplus(generic_vars, jetToTag); 
-      //}
-      //if (m_ipinfo_tagger_name.size() > 0 && generic_vars){ 
-      //	augment_with_ipinfoplus(generic_vars, jetToTag); 
-      //}
-
-      // this function is a bit of a hack: the single_weight is just there
-      // to accomidate the JetFitterCOMBNN classifier, which takes 
-      // IP3D as a function argument. 
-      // double single_weight = get_simple_tagger_weights(theVariables,*BTag);
-      // get_tagger_weights(theVariables, *BTag); 
-
-      // try { 
-      // 	// this may throw a runtime_error if something is configured wrong
-      // 	m_classifier->fillLikelihoodValues(*theVariables,
-      // 					   jetauthor,
-      // 					   jetToTag.pt(),
-      // 					   jetToTag.eta(),
-      // 					   single_weight);
-
-
-
-      // 	if (generic_vars && !m_save_temporary_variables) { 
-      // 	  // some variables which are used in the NN don't need to be 
-      // 	  // stored, we can safely remove them now. 
-      // 	  generic_vars->clearTemporary(); 
-      // 	}
-      // }
-      // catch (const std::runtime_error e) {
-      // 	std::string warning = "problem tagging jet with " + jetauthor + " (";
-      // 	warning.append( e.what() ); 
-      // 	warning.append("). No tagging will be done."); 
-      // 	ATH_MSG_WARNING(warning); 
-      // }
-      //ELG: what to store not yet defined
-      /*JetTagInfoBase* info_to_store = 0; 
-      if (m_store_only_base_object) {
-        info_to_store = new BaseTagInfo(*theVariables);
-        delete theVariables;
-        theVariables = 0;
-      }
-      else {
-        info_to_store = theVariables;
-      }
-
-      jetToTag.addInfo(info_to_store);
-      */
     } // end if "analysis" block 
     return StatusCode::SUCCESS;
   }
 
-  // int JetFitterTag
-  // ::augment_with_svinfoplus(JetFitterGenericTagInfo* tag_info, 
-  // 			    const xAOD::Jet& jet_with_sv1) { 
-  //   /*const SVInfoPlus* sv_info = dynamic_cast<const SVInfoPlus*>
-  //     (jet_with_sv1.tagInfo(m_svx_tagger_name));
-
-  //   int n_gt_jet = -1;
-  //   int n_gt_svx = -1;
-  //   int n_2t     = -1;
-  //   double mass       = -1;
-  //   double energyfrac = -1;
-  //   double normdist   = -1;
-
-  //   // this tag is often missing if no secondary vertex is constructed
-  //   if (! sv_info){
-  //     // double-check to make sure it's not just misnamed 
-  //     if (dynamic_cast<const BaseTagInfo*>
-  // 	  (jet_with_sv1.tagInfo(m_svx_tagger_name)))
-  // 	throw std::runtime_error
-  // 	  (m_svx_tagger_name + " tagger is stored as a base object."); 
-  //   }
-  //   else { 
-  //     n_gt_jet   = sv_info->getNGTrackInJet(); 	
-  //     n_gt_svx   = sv_info->getNGTrackInSvx(); 	
-  //     n_2t       = sv_info->getN2T(); 		
-  //     mass       = sv_info->getMass(); 		
-  //     energyfrac = sv_info->getEnergyFraction(); 
-  //     normdist   = sv_info->getNormDist();       
-  //   }
-
-  //   // keep track of number of overwrites
-  //   int n_ow = 0; 
-
-  //   const std::string& tn = m_svx_tagger_name; 
-  //   n_ow += tag_info->setTemporaryInt("n_" + tn + "_gt_jet"     , n_gt_jet  );
-  //   n_ow += tag_info->setTemporaryInt("n_" + tn + "_gt_svx"     , n_gt_svx  );
-  //   n_ow += tag_info->setTemporaryInt("n_" + tn + "_2t"         , n_2t      );
-  //   n_ow += tag_info->setTemporaryDouble    (tn + "_mass"       , mass      );
-  //   n_ow += tag_info->setTemporaryDouble    (tn + "_energyfrac" , energyfrac);
-  //   n_ow += tag_info->setTemporaryDouble    (tn + "_normdist"   , normdist  );
-  //   return n_ow;*/
-  //   return 0;
-  // }
-
-  // int JetFitterTag
-  // ::augment_with_ipinfoplus(JetFitterGenericTagInfo* tag_info, 
-  // 			    const xAOD::Jet& jet_with_ipinfo) { 
-  //   /*const IPInfoPlus* ip_info = dynamic_cast<const IPInfoPlus*>
-  //     (jet_with_ipinfo.tagInfo(m_ipinfo_tagger_name));
-
-  //   // TODO: this needs to be filled out more
-  //   int n_ip_tracks = -1; 
-
-  //   // this tag is often missing if no secondary vertex is constructed
-  //   if (! ip_info){
-  //     // double-check to make sure it's not just misnamed 
-  //     if (dynamic_cast<const BaseTagInfo*>
-  // 	  (jet_with_ipinfo.tagInfo(m_ipinfo_tagger_name)))
-  // 	throw std::runtime_error
-  // 	  (m_ipinfo_tagger_name + 
-  // 	   " tagger is stored as a base object, bad bad bad..."); 
-  //   }
-  //   else { 
-  //     n_ip_tracks = ip_info->numTrackInfo(); 
-  //   }
-
-  //   int n_ow = 0; 
-  //   const std::string& tn = m_ipinfo_tagger_name; 
-  //   n_ow += tag_info->setTemporaryInt("n_" + tn + "_tracks", n_ip_tracks  );
-  //   return n_ow;*/
-  //   return 0; 
-  // }
-
-
-  // double JetFitterTag
-  // ::get_simple_tagger_weights(IJetFitterTagInfo* tag_info, 
-  // 			      const xAOD::BTagging& BTag) { 
-  //   JetFitterGenericTagInfo* generic_vars = 
-  //     dynamic_cast<JetFitterGenericTagInfo*>(tag_info); 
-  //   int n_overwrite = 0; 
-  //   if (!generic_vars && m_supplementalTaggers.size() > 1) { 
-  //     std::string warning = "You've given more than one supplemental"
-  // 	" tagger. No room for this using JetFitterTagInfo."
-  // 	" Using first tagger given (" + m_supplementalTaggers.at(0) + ")"
-  // 	" and dropping all others."; 
-  //     ATH_MSG_WARNING(warning); 
-  //     m_supplementalTaggers.erase(m_supplementalTaggers.begin() + 1, 
-  // 				  m_supplementalTaggers.end()); 
-  //   }
-
-  //   double single_weight = 0; 
-  //   for (std::vector<std::string>::const_iterator 
-  // 	   titr = m_supplementalTaggers.begin(); 
-  // 	 titr != m_supplementalTaggers.end(); 
-  // 	 titr++) { 
-      
-  //     const std::vector<double> prob = get_likelihood_vector(BTag, *titr); 
-
-  //     if (prob.size() > 0) {
-  // 	double pb = prob.at(0);
-  // 	double w  = 0.;
-  // 	if (prob.size() == 1) { 
-  // 	  w = pb; 
-  // 	}
-  // 	else {
-  // 	  double pu = prob.at(1);
-  // 	  if (pb <= 0. || pu <= 0.) {
-  // 	  ATH_MSG_WARNING
-  // 	    ("At least one " << *titr << 
-  // 	     " prob. null (or negative !?) for JetFitter"
-  // 	     " : pb,pu = " << pb << " " << pu << 
-  // 	     ", conservatively putting the weight to 0");
-  // 	  } else {
-  // 	    w = log(pb/pu);
-  // 	  }
-  // 	}
-  // 	if (generic_vars) { 
-  // 	  n_overwrite += generic_vars->setTemporaryDouble(*titr,w); 
-  // 	}
-  // 	single_weight = w; 
-  //     }
-	
-  //   }
-  //   if (n_overwrite != 0) { 
-  //     ATH_MSG_WARNING(n_overwrite << " varaibels have been overwritten"
-  // 		      " while filling JetFitterGenericTagInfo"); 
-  //   }
-  //   return single_weight; 
-  // }
-
-  // void JetFitterTag
-  // ::get_tagger_weights(IJetFitterTagInfo* tag_info, 
-  // 		       const xAOD::BTagging& BTag) { 
-
-  //   JetFitterGenericTagInfo* generic_vars = 
-  //     dynamic_cast<JetFitterGenericTagInfo*>(tag_info); 
-
-  //   int n_overwrite = 0; 
-  //   if (!generic_vars && m_multiweightSupplementalTaggers.size() > 0) { 
-  //     std::string warning = "You've given a supplemental"
-  // 	" tagger. No room for this using JetFitterTagInfo."; 
-  //     ATH_MSG_WARNING(warning); 
-  //   }
-  //   if (!generic_vars) return; 
-
-  //   for (std::vector<std::string>::const_iterator 
-  // 	   tagger_itr = m_multiweightSupplementalTaggers.begin(); 
-  // 	 tagger_itr != m_multiweightSupplementalTaggers.end(); 
-  // 	 tagger_itr++) { 
-
-  //     std::vector<double> prob = get_likelihood_vector(BTag,*tagger_itr); 
-  //     if (prob.size() > 0) { 
-  // 	std::string pb_name = *tagger_itr + "_pb"; 
-  // 	double pb = prob.at(0);
-  // 	n_overwrite += generic_vars->setTemporaryDouble(pb_name, pb); 
-  //     }
-  //     if (prob.size() > 1) { 
-  // 	std::string pu_name = *tagger_itr + "_pu"; 
-  // 	double pu = prob.at(1);
-  // 	n_overwrite += generic_vars->setTemporaryDouble(pu_name, pu); 
-  //     }
-  //     if (prob.size() > 2) { 
-  // 	std::string pc_name = *tagger_itr + "_pc"; 
-  // 	double pc = prob.at(2); 
-  // 	n_overwrite += generic_vars->setTemporaryDouble(pc_name, pc); 
-  //     }
-  //     if (prob.size() > 3) { 
-  // 	std::string ptau_name = *tagger_itr + "_ptau"; 
-  // 	double ptau = prob.at(3); 
-  // 	n_overwrite += generic_vars->setTemporaryDouble(ptau_name, ptau); 
-  //     }
-	
-  //   }
-  //   if (n_overwrite != 0) { 
-  //     ATH_MSG_WARNING(n_overwrite << " varaibels have been overwritten"
-  // 		      " while filling JetFitterGenericTagInfo"); 
-  //   }
-  // }
-
-/*  std::vector<double> JetFitterTag
-  ::get_likelihood_vector(const xAOD::Jet& jet, 
-			  const std::string& tag_name) const { 
-    const JetTagInfoBase* pos(jet.tagInfo(tag_name));
-    if (pos==0) {
-      ATH_MSG_WARNING("Could not find tag to combine it with JetFitter."
-		      " Tag name: " << tag_name);
-      return std::vector<double>(); 
-    } else if (!pos->isValid() && m_proxy_likelihoods.count(tag_name)) { 
-      return m_proxy_likelihoods.find(tag_name)->second; 
-    }
-    return pos->tagLikelihood();
-      
-  }*/
-
-  // std::vector<double> JetFitterTag
-  // ::get_likelihood_vector(const xAOD::BTagging& BTag,
-  //                         const std::string& tag_name) const {
-
-  //   std::vector<double> tagLikelihood = std::vector<double>();
-  //   double pb = 0,  pu = 0, pc = 0;
-  //   BTag.variable<double>(tag_name, "pb", pb);
-  //   tagLikelihood.push_back(pb);
-  //   BTag.variable<double>(tag_name, "pu", pu);
-  //   tagLikelihood.push_back(pu);
-  //   //if (m_useCHypo) {
-  //     BTag.variable<double>(tag_name, "pc", pc);
-  //     tagLikelihood.push_back(pc);
-  //   //}
-  //   return tagLikelihood;
-  // }
 }//end namespace
 
   
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/src/JetTagUtils.cxx b/PhysicsAnalysis/JetTagging/JetTagTools/src/JetTagUtils.cxx
index af88eb1ad4954d6828647aaf794b1e37ceac6eb7..e6bf67f0df4a3602107ebabf80806e91950a095a 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/src/JetTagUtils.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/src/JetTagUtils.cxx
@@ -1,10 +1,10 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "JetTagTools/JetTagUtils.h"
 
-std::string JetTagUtils::getJetAuthor(xAOD::Jet& jetToTag) {
+std::string JetTagUtils::getJetAuthor(const xAOD::Jet * jetToTag) {
 
   /** author to know which jet algorithm: */
   std::map<std::string, std::string> fastjetToAltas;
@@ -12,17 +12,17 @@ std::string JetTagUtils::getJetAuthor(xAOD::Jet& jetToTag) {
   fastjetToAltas["antikt"] = "AntiKt";
   fastjetToAltas["camkt"] = "CamKt";
 
-  xAOD::JetAlgorithmType::ID jetAlgID =  jetToTag.getAlgorithmType();
+  xAOD::JetAlgorithmType::ID jetAlgID =  jetToTag->getAlgorithmType();
   //std::string name = xAOD::JetAlgorithmType::algName(jetAlgID);
   std::string name = fastjetToAltas[xAOD::JetAlgorithmType::algName(jetAlgID)];
-  xAOD::JetInput::Type jetAlgType = jetToTag.getInputType();
+  xAOD::JetInput::Type jetAlgType = jetToTag->getInputType();
   std::string type =  xAOD::JetInput::typeName(jetAlgType);
-  std::string size = std::to_string(int(jetToTag.getSizeParameter()*10));
+  std::string size = std::to_string(int(jetToTag->getSizeParameter()*10));
 
   // Special test for HI jet collections
   // (the attribute JetUnsubtractedScaleMomentum is specific to them)
   xAOD::JetFourMom_t v;
-  if ( jetToTag.getAttribute<xAOD::JetFourMom_t>("JetUnsubtractedScaleMomentum",v) ) {
+  if ( jetToTag->getAttribute<xAOD::JetFourMom_t>("JetUnsubtractedScaleMomentum",v) ) {
     type = "HI";
   }
     
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/src/JetVertexCharge.cxx b/PhysicsAnalysis/JetTagging/JetTagTools/src/JetVertexCharge.cxx
index d3258a83038e9527bfd6d6e11bc56b65de6cb05a..7418909e5bce7adb34900753e3b54d0106021579 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/src/JetVertexCharge.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/src/JetVertexCharge.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -155,7 +155,7 @@ namespace Analysis {
 
 
 //////////////////////////////////////////////////////////////////  
-StatusCode JetVertexCharge::tagJet( xAOD::Jet& jetToTag, xAOD::BTagging* BTag) {
+StatusCode JetVertexCharge::tagJet( const xAOD::Jet * jetToTag, xAOD::BTagging* BTag) {
 
 
     //Retrieval of Calibration Condition Data objects
@@ -171,7 +171,7 @@ StatusCode JetVertexCharge::tagJet( xAOD::Jet& jetToTag, xAOD::BTagging* BTag) {
 
     ClearVars();
 
-    m_jet_uPt = jetToTag.pt();
+    m_jet_uPt = jetToTag->pt();
 
     //          computing the JetCharge (JC) 
     //==============================================================
@@ -206,8 +206,8 @@ StatusCode JetVertexCharge::tagJet( xAOD::Jet& jetToTag, xAOD::BTagging* BTag) {
 
       if(denom != 0) m_jc = charge / denom;
       if(denom_all != 0) m_jc_all= charge_all / denom_all;
-      m_jc_jetPt = charge/jetToTag.pt();
-      m_jc_all_jetPt = charge_all/jetToTag.pt();
+      m_jc_jetPt = charge/jetToTag->pt();
+      m_jc_all_jetPt = charge_all/jetToTag->pt();
 
 
     }
@@ -313,7 +313,7 @@ StatusCode JetVertexCharge::tagJet( xAOD::Jet& jetToTag, xAOD::BTagging* BTag) {
          denom += pow( tp->pt(), m_kappa_SV);
       }
       if(denom != 0)  m_svc = charge/denom;
-      m_svc_jetPt = charge/jetToTag.pt();
+      m_svc_jetPt = charge/jetToTag->pt();
 
       m_sv_dist =  svx.pos;
       m_sv_err =  svx.err;
@@ -349,7 +349,7 @@ StatusCode JetVertexCharge::tagJet( xAOD::Jet& jetToTag, xAOD::BTagging* BTag) {
      if(denom != 0) m_tvc = charge/denom;
      m_tv_dist =  tvx.pos;
      m_tv_err =  tvx.err;
-     m_tvc_jetPt = charge/jetToTag.pt();
+     m_tvc_jetPt = charge/jetToTag->pt();
 
 
 
@@ -405,7 +405,7 @@ StatusCode JetVertexCharge::tagJet( xAOD::Jet& jetToTag, xAOD::BTagging* BTag) {
          if( p_corrMu->eta() > 2.7 ) continue;
  
          TLorentzVector muon = p_corrMu->p4();      
-         TLorentzVector jet = jetToTag.p4();      
+         TLorentzVector jet = jetToTag->p4();      
          if( muon.DeltaR( jet ) > 0.3 ) continue;
 
          float chi2=-1; 
@@ -432,7 +432,7 @@ StatusCode JetVertexCharge::tagJet( xAOD::Jet& jetToTag, xAOD::BTagging* BTag) {
      if( myMuon->isolation( iso_save,  xAOD::Iso::IsolationType::ptvarcone40 )) m_mu_iso = iso_save;
 
      TLorentzVector muon = myMuon->p4();      
-     TLorentzVector jet = jetToTag.p4();      
+     TLorentzVector jet = jetToTag->p4();      
      m_mu_ptRel =  muon.P()*sin( muon.Angle(jet.Vect() + muon.Vect()))/1000.; 
      m_mu_ptLong = muon.P()*cos( muon.Angle( jet.Vect() + muon.Vect() ) )/1000.;
      m_mu_jet_dR  = muon.DeltaR( jet );
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/src/MV1Tag.cxx b/PhysicsAnalysis/JetTagging/JetTagTools/src/MV1Tag.cxx
index 7986fef280c7fe771fc8a266dbe80f8bdfb8cb33..92927ec34b12666c1b1d6ff5edd5ff98be2e0d93 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/src/MV1Tag.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/src/MV1Tag.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "JetTagTools/MV1Tag.h"
@@ -80,7 +80,7 @@ namespace Analysis {
   }
 
 
-  StatusCode MV1Tag::tagJet(xAOD::Jet& jetToTag, xAOD::BTagging* BTag) {
+  StatusCode MV1Tag::tagJet(const xAOD::Jet* jetToTag, xAOD::BTagging* BTag) {
 
     /* jet author: */
     std::string author = JetTagUtils::getJetAuthor(jetToTag);
@@ -153,8 +153,8 @@ namespace Analysis {
     }
 
     /* retrieveing weights: */
-    double jpt = jetToTag.pt();
-    double eta = jetToTag.eta();
+    double jpt = jetToTag->pt();
+    double eta = jetToTag->eta();
     double ip3=-9999, sv1=-9999, jfc=-9999;
     if( !BTag->loglikelihoodratio(m_inputIP3DWeightName, ip3) ){
         ATH_MSG_WARNING("#BTAG# tagger weight not found for  " << m_inputIP3DWeightName);
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/src/MultiSVTag.cxx b/PhysicsAnalysis/JetTagging/JetTagTools/src/MultiSVTag.cxx
index 095fe83e6efe38d0aea246234b5d621fdbe8eed7..a2fd28e40aac04a55c2ef54f389065c1273be492 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/src/MultiSVTag.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/src/MultiSVTag.cxx
@@ -1,12 +1,11 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
                            MultiSVTag.cxx
 ***************************************************************************/
 #include "JetTagTools/MultiSVTag.h"
-//#include "JetEvent/Jet.h"
 #include "GaudiKernel/IToolSvc.h"
 #include "Navigation/NavigationToken.h"
 #include "GaudiKernel/ITHistSvc.h"
@@ -84,7 +83,7 @@ namespace Analysis
     return StatusCode::SUCCESS;
   }
 
-  StatusCode MultiSVTag::tagJet(xAOD::Jet& jetToTag, xAOD::BTagging * BTag){
+  StatusCode MultiSVTag::tagJet(const xAOD::Jet* jetToTag, xAOD::BTagging * BTag){
 
     //Retrieval of Calibration Condition Data objects
     SG::ReadCondHandle<JetTagCalibCondData> readCdo(m_readKey);
@@ -157,12 +156,12 @@ namespace Analysis
     m_egammaBDTs.insert( std::make_pair( alias, bdt ) );
 
     //the jet
-    double jeteta = jetToTag.eta(), jetphi = jetToTag.phi(), jetpt = jetToTag.pt();
+    double jeteta = jetToTag->eta(), jetphi = jetToTag->phi(), jetpt = jetToTag->pt();
     m_jetpt = jetpt;
     ATH_MSG_DEBUG("#BTAG# Jet properties : eta = " << jeteta
                   << " phi = " << jetphi << " pT  = " <<jetpt/GeV);
 
-    TLorentzVector jp4; jp4.SetPtEtaPhiM(jetToTag.pt(), jetToTag.eta(), jetToTag.phi(), jetToTag.m());
+    TLorentzVector jp4; jp4.SetPtEtaPhiM(jetToTag->pt(), jetToTag->eta(), jetToTag->phi(), jetToTag->m());
 
     int msv_n = 0;
     int all_trks = 0;
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/src/MultivariateTagManager.cxx b/PhysicsAnalysis/JetTagging/JetTagTools/src/MultivariateTagManager.cxx
index 5a671c3b319213f2d294aab38428fb5c8135d139..fe24797492ef5762be43a28fe7c6674985051912 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/src/MultivariateTagManager.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/src/MultivariateTagManager.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 //////////////////////////////////////////////////////////////////////////////
@@ -98,7 +98,7 @@ namespace Analysis {
   // _______________________________________________________________________
   // MultivariateTagManager functions
 
-  StatusCode MultivariateTagManager::tagJet(xAOD::Jet& jetToTag, xAOD::BTagging* BTag) {
+  StatusCode MultivariateTagManager::tagJet(const xAOD::Jet* jetToTag, xAOD::BTagging* BTag) {
 
     std::string jetauthor = JetTagUtils::getJetAuthor(jetToTag); // determine the jet's channel
     ATH_MSG_DEBUG("#BTAG# Jet author: " << jetauthor );
@@ -108,8 +108,8 @@ namespace Analysis {
           " No likelihood value given back. ");
     }
 
-    double jetpT  = jetToTag.pt();
-    double jeteta = jetToTag.eta();
+    double jetpT  = jetToTag->pt();
+    double jeteta = jetToTag->eta();
 
     // Fill Input Information
     var_map inputs;                  // map of input information
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/src/RNNIPTag.cxx b/PhysicsAnalysis/JetTagging/JetTagTools/src/RNNIPTag.cxx
index d14085d27c11fb922a2e5d84339e5bfa21d5bde4..9f9a36d7624867a82306d78653ac80f759795274 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/src/RNNIPTag.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/src/RNNIPTag.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "JetTagTools/RNNIPTag.h"
@@ -288,7 +288,7 @@ namespace Analysis {
   }
 
 
-  StatusCode RNNIPTag::tagJet(xAOD::Jet& jetToTag, xAOD::BTagging* BTag) {
+  StatusCode RNNIPTag::tagJet(const xAOD::Jet* jetToTag, xAOD::BTagging* BTag) {
 
     /** author to know which jet algorithm: */
     std::string author = JetTagUtils::getJetAuthor(jetToTag);
@@ -299,20 +299,11 @@ namespace Analysis {
     int nbPart = m_trackGradePartitionsDefinition.size();
 
     std::vector<const xAOD::TrackParticle*> TrkFromV0;
-    // Amg::Vector3D SvxDirection;
-    // bool canUseSvxDirection=false;
-
-    // if (m_SignWithSvx) {
-    //   m_SVForIPTool->getDirectionFromSecondaryVertexInfo(
-    //     SvxDirection,canUseSvxDirection,//output
-    //     jetToTag,BTag,m_secVxFinderName,*m_priVtx);//input
-    //   // jetToTag,BTag,m_secVxFinderNameForIPSign,*m_priVtx);//input
-    // }
 
     // bad tracks from V0s, conversions, interactions:
     m_SVForIPTool->getTrkFromV0FromSecondaryVertexInfo(
       TrkFromV0,//output
-      jetToTag,BTag,m_secVxFinderName);//input
+      BTag,m_secVxFinderName);//input
 
     ATH_MSG_VERBOSE("#BTAG# VALERIO TrkFromV0 : number of reconstructed"
                     " bad tracks: " << TrkFromV0.size());
@@ -347,7 +338,7 @@ namespace Analysis {
         nbTrak++;
         if( m_trackSelectorTool->selectTrack(aTemp, sumTrkpT) ) {
           TrackGrade* theGrade = m_trackGradeFactory->getGrade(
-            *aTemp, jetToTag.p4() );
+            *aTemp, jetToTag->p4() );
           ATH_MSG_VERBOSE("#BTAG#  result of selectTrack is OK, grade= "
                           << theGrade->gradeString() );
           bool tobeUsed = false;
@@ -380,7 +371,7 @@ namespace Analysis {
                     m_priVtx->position().z());
 
     /** jet direction: */
-    Amg::Vector3D jetDirection(jetToTag.px(),jetToTag.py(),jetToTag.pz());
+    Amg::Vector3D jetDirection(jetToTag->px(),jetToTag->py(),jetToTag->pz());
 
     /** prepare vectors with all track information: TP links,
      * i.p. significances, track grade, etc */
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/src/SVForIPTool.cxx b/PhysicsAnalysis/JetTagging/JetTagTools/src/SVForIPTool.cxx
index 3dadb3c355c3c73487d9b873b492815cb886d513..4023a267b4586c425b4992fdbe7091b13e6318cc 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/src/SVForIPTool.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/src/SVForIPTool.cxx
@@ -1,23 +1,9 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "JetTagTools/SVForIPTool.h"
 
-//get the bad track info...
-//#include "TrkParticleBase/LinkToTrackParticleBase.h"
-//#include "TrkParticleBase/TrackParticleBase.h"
-
-//#include "VxVertex/VxTrackAtVertex.h"
-//#include "VxJetVertex/TwoTrackVerticesInJet.h"
-//#include "VxSecVertex/VxJetFitterVertexInfo.h"
-//#include "VxVertex/VxCandidate.h"
-//#include "VxJetVertex/VxJetCandidate.h"
-//#include "JetEvent/Jet.h"
-//#include "xAODJet/Jet.h" // in header
-
-//#include "VxVertex/RecVertex.h"
-
 #include "GeoPrimitives/GeoPrimitivesHelpers.h"
 
 namespace Analysis {
@@ -46,26 +32,16 @@ namespace Analysis {
 
   void SVForIPTool::getDirectionFromSecondaryVertexInfo(Amg::Vector3D & SvxDirection,
                                                         bool & canUseSvxDirection,
-                                                        const xAOD::Jet & /*jetToTag*/,
                                                         xAOD::BTagging* BTag,
                                                         const std::string & secVxFinderName,
                                                         const xAOD::Vertex & priVtx)
-                                                        // const Trk::RecVertex & priVtx)
   {
     std::vector< ElementLink< xAOD::VertexContainer > > myVertices;
     BTag->variable<std::vector<ElementLink<xAOD::VertexContainer> > >(secVxFinderName, "vertices", myVertices);
-    // const ISvxAssociation* newSvxAssociation=jetToTag.getAssociation<ISvxAssociation>(secVxFinderName);
     
     if (myVertices.size() == 0) {
       ATH_MSG_DEBUG(" No secondary vertex found for getting the B flight direction (for the IP sign calculation)");
     } else {
-      //const Trk::VxSecVertexInfo* myVertexInfo=newSvxAssociation->vertexInfo();
-     
-      // int n2track = 0;
-      // BTag->variable<int>(secVxFinderName, "n2trackvertices", n2track);
-      // canUseSvxDirection= n2track>=1?true:false;
-      //if (canUseSvxDirection)
-      //{
 	  if (myVertices[0].isValid())
 	    {
 	      canUseSvxDirection=true;
@@ -77,105 +53,18 @@ namespace Analysis {
 	    {
 	      ATH_MSG_WARNING("SVX info seems usable, but no SVX available !!!");
 	    }
-	  //}
     }	
-    /*      else if (secVxFinderName.find("JetFitter") != std::string::npos) // not yet implemented in BTagging/BTagSecVertexing
-	    {
-	    Trk::VxJetCandidate* myVxJetCandidate=dynamic_cast<Trk::VxJetCandidate*>(myVertices[0]);
-	    if (myVxJetCandidate)
-	    {
-	    canUseSvxDirection=true;
-	    const Trk::RecVertexPositions & recVertexPositions=myVxJetCandidate->getRecVertexPositions();
-	    const Amg::VectorX & vertexPosition=recVertexPositions.position();
-	    SvxDirection=Amg::Vector3D(1,1,1);
-	    Amg::setPhi(SvxDirection, vertexPosition[Trk::jet_phi]);
-	    Amg::setTheta(SvxDirection, vertexPosition[Trk::jet_theta]);
-	  
-	    ATH_MSG_VERBOSE(" Get Jet direction from JetFitter: phi: " << vertexPosition[Trk::jet_phi] << 
-	    " theta: " << vertexPosition[Trk::jet_theta]);
-	    }
-	    }*/
-    
   }
   
   
     
   void SVForIPTool::getTrkFromV0FromSecondaryVertexInfo(std::vector<const xAOD::TrackParticle*> & TrkFromV0,
-                                                        const xAOD::Jet & /*jetToTag*/,
 							xAOD::BTagging* BTag,
                                                         const std::string & secVxFinderName)
   {
     std::vector<ElementLink<xAOD::TrackParticleContainer> > TrkFromV0_ELs;
-    //std::vector<const Trk::TrackParticleBase*> TrkBaseFromV0;
-    //const ISvxAssociation* newSvxAssociation=jetToTag.getAssociation<ISvxAssociation>(secVxFinderName);
-    //std::vector< ElementLink< xAOD::VertexContainer > > myVertices;
-    //BTag->variable<std::vector<ElementLink<xAOD::VertexContainer> > >(secVxFinderName, "vertices", myVertices);
-
-    //if (myVertices.size()==0) {
-    //ATH_MSG_DEBUG(" No secondary vertex found for getting the V0s from the secondary vertex finder info");
-    //} else {
       
-      BTag->variable<std::vector<ElementLink<xAOD::TrackParticleContainer> > >(secVxFinderName, "badTracksIP", TrkFromV0_ELs);
-      /* // not yet implemented in BTagging/BTagSecVertexing
-	 else
-	 {
-	 const Trk::VxJetFitterVertexInfo* myJetFitterInfo=dynamic_cast<const Trk::VxJetFitterVertexInfo*>(myVertexInfo);
-	 if (myJetFitterInfo!=0)
-	 {
-	 const Trk::TwoTrackVerticesInJet* twoTrackVerticesInJet=myJetFitterInfo->getTwoTrackVerticesInJet();
-          
-	 if (twoTrackVerticesInJet)
-	 {
-	 const std::vector<const Trk::TrackParticleBase*> & neutralTracksInJet=twoTrackVerticesInJet->getNeutralTrackOfVertices();
-            
-	 std::vector<const Trk::TrackParticleBase*>::const_iterator neutralBegin=neutralTracksInJet.begin();
-	 std::vector<const Trk::TrackParticleBase*>::const_iterator neutralEnd=neutralTracksInJet.end();
-            
-	 for (std::vector<const Trk::TrackParticleBase*>::const_iterator neutralIter=neutralBegin;
-	 neutralIter!=neutralEnd;++neutralIter)
-	 {
-	 const Trk::VxCandidate* v0candPtr=(*neutralIter)->reconstructedVertex();
-              
-	 if (!v0candPtr) {
-	 ATH_MSG_WARNING(" V0 candidate from JetFitter is empy. ");
-	 continue;
-	 }
-              
-	 const Trk::VxTrackAtVertex* firstTrack((*(v0candPtr->vxTrackAtVertex()))[0]);
-	 const Trk::VxTrackAtVertex* secondTrack((*(v0candPtr->vxTrackAtVertex()))[1]);
-	      
-	 if ((!firstTrack)||(!secondTrack))
-	 {
-	 ATH_MSG_WARNING(" Empty track. ");
-	 continue;
-	 }
-              
-	 //going from Link To TrackParticleBase (quite involved...!)
-	 const Trk::ITrackLink* trackLink1=firstTrack->trackOrParticleLink();
-	 const Trk::ITrackLink* trackLink2=secondTrack->trackOrParticleLink();
-              
-	 const Trk::LinkToTrackParticleBase * trkCastedLinkTPBase1=
-	 dynamic_cast<const Trk::LinkToTrackParticleBase *>(trackLink1);
-	      
-	 const Trk::LinkToTrackParticleBase * trkCastedLinkTPBase2=
-	 dynamic_cast<const Trk::LinkToTrackParticleBase *>(trackLink2);
-	      
-	 if ((!trkCastedLinkTPBase1)||(!trkCastedLinkTPBase2))
-	 {
-	 ATH_MSG_WARNING(" JetFitter has Tracks, not TrackParticles... Rejection of V0s impossible...");
-	 continue;
-	 }
-	      
-	 TrkBaseFromV0.push_back(**trkCastedLinkTPBase1);
-	 TrkBaseFromV0.push_back(**trkCastedLinkTPBase2);
-	 }
-	 }
-	 }
-	 }*/
-
-      //}
-  
-
+    BTag->variable<std::vector<ElementLink<xAOD::TrackParticleContainer> > >(secVxFinderName, "badTracksIP", TrkFromV0_ELs);
 
     for (std::vector<ElementLink<xAOD::TrackParticleContainer> >::iterator itr=TrkFromV0_ELs.begin();itr!=TrkFromV0_ELs.end();itr++)
       {
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/src/SVTag.cxx b/PhysicsAnalysis/JetTagging/JetTagTools/src/SVTag.cxx
index 941be1acc3c72b2480422987e7696b8d6aa47d46..2ea44ea7e1503d96290fe652213d909582f27ce7 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/src/SVTag.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/src/SVTag.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -164,7 +164,7 @@ namespace Analysis
     return StatusCode::SUCCESS;
   }
 
-  StatusCode SVTag::tagJet(xAOD::Jet& jetToTag, xAOD::BTagging* BTag) {
+  StatusCode SVTag::tagJet(const xAOD::Jet* jetToTag, xAOD::BTagging* BTag) {
 
     /** author to know which jet algorithm: */
     std::string author = JetTagUtils::getJetAuthor(jetToTag);
@@ -172,7 +172,7 @@ namespace Analysis
     ATH_MSG_VERBOSE("#BTAG# Using jet type " << author << " for calibrations.");
 
     /* The jet */
-    double jeteta = jetToTag.eta(), jetphi = jetToTag.phi(), jetpt = jetToTag.pt();
+    double jeteta = jetToTag->eta(), jetphi = jetToTag->phi(), jetpt = jetToTag->pt();
     ATH_MSG_VERBOSE("#BTAG# Jet properties : eta = " << jeteta
 		    << " phi = " << jetphi << " pT  = " <<jetpt/m_c_mom);
 
@@ -215,7 +215,7 @@ namespace Analysis
 	const xAOD::Vertex* firstVertex = *(myVertices[0]);
 	
 	//FIXME ugly hack to get a Amg::Vector3D out of a CLHEP::HepLorentzVector
-	Amg::Vector3D jetDir(jetToTag.p4().Px(),jetToTag.p4().Py(),jetToTag.p4().Pz());
+	Amg::Vector3D jetDir(jetToTag->p4().Px(),jetToTag->p4().Py(),jetToTag->p4().Pz());
 	const Amg::Vector3D PVposition = m_priVtx->position();
 	const Amg::Vector3D position = firstVertex->position();
 	Amg::Vector3D PvSvDir( position.x() - PVposition.x(),
@@ -249,7 +249,7 @@ namespace Analysis
 	const xAOD::Vertex* myVert  = *myVertices[0];
 	if (m_priVtx) {
 	  distnrm=get3DSignificance(m_priVtx, vecVertices,
-				    Amg::Vector3D(jetToTag.p4().Px(),jetToTag.p4().Py(),jetToTag.p4().Pz()));
+				    Amg::Vector3D(jetToTag->p4().Px(),jetToTag->p4().Py(),jetToTag->p4().Pz()));
 	} else {
 	  ATH_MSG_WARNING("#BTAG# Tagging requested, but no primary vertex supplied.");
 	  distnrm=0.;
@@ -316,17 +316,17 @@ namespace Analysis
     if (m_SVmode != "SV0" ) {
       float ambtotp = ambtot > 0. ? ambtot/(1.+ambtot): 0.;
       float xratiop = xratio > 0. ? (float)pow(xratio,m_expos) : 0.;
-      float trfJetPt=log(jetToTag.pt()/20000.); if(trfJetPt<0.)trfJetPt=0.01; if(trfJetPt>4.8)trfJetPt=4.79;
+      float trfJetPt=log(jetToTag->pt()/20000.); if(trfJetPt<0.)trfJetPt=0.01; if(trfJetPt>4.8)trfJetPt=4.79;
       std::string pref = "";
       if (m_runModus=="reference") {
 	if (jetpt >= m_pTjetmin && fabs(jeteta) <= 2.5) {
-	  int label = xAOD::jetFlavourLabel(&jetToTag);
+	  int label = xAOD::jetFlavourLabel(jetToTag);
 	  double deltaRtoClosestB = 999.;//, deltaRtoClosestC = 999.;
-	  if (jetToTag.getAttribute("TruthLabelDeltaR_B",deltaRtoClosestB)) {
+	  if (jetToTag->getAttribute("TruthLabelDeltaR_B",deltaRtoClosestB)) {
 	    ATH_MSG_VERBOSE("#BTAG# label found : " << label);
 	    // for purification: require no b or c quark closer than dR=m_purificationDeltaR
 	    double deltaRtoClosestC;
-	    jetToTag.getAttribute("TruthLabelDeltaR_C", deltaRtoClosestC);//mcTrueInfo->deltaRMinTo("C");
+	    jetToTag->getAttribute("TruthLabelDeltaR_C", deltaRtoClosestC);//mcTrueInfo->deltaRMinTo("C");
 	    double deltaRmin = deltaRtoClosestB < deltaRtoClosestC ? deltaRtoClosestB : deltaRtoClosestC;
 
 	    if ( (    "B"==m_refType &&   5==label ) ||  // b-jets    
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/src/SoftMuonTag.cxx b/PhysicsAnalysis/JetTagging/JetTagTools/src/SoftMuonTag.cxx
index e47c7f20f650ab4bec850f580678462bdacbfbd9..8647b5c6583c74dc44f3b4999e56f740155c16a0 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/src/SoftMuonTag.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/src/SoftMuonTag.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /********************************************************************
@@ -279,7 +279,7 @@ namespace Analysis
   }
 
 
-  StatusCode SoftMuonTag::tagJet(xAOD::Jet& jetToTag, xAOD::BTagging* BTag) {
+  StatusCode SoftMuonTag::tagJet(const xAOD::Jet* jetToTag, xAOD::BTagging* BTag) {
 
     ATH_MSG_DEBUG( "#BTAG# Starting tagJet");
 
@@ -289,7 +289,7 @@ namespace Analysis
     ATH_MSG_VERBOSE("#BTAG# Using jet type " << author << " for calibrations.");
 
     /* The jet */
-    double jeteta = jetToTag.eta(), jetphi = jetToTag.phi(), jetpt = jetToTag.pt();
+    double jeteta = jetToTag->eta(), jetphi = jetToTag->phi(), jetpt = jetToTag->pt();
     ATH_MSG_DEBUG( "#BTAG# Jet properties : eta = "<<jeteta
 		   <<" phi = "<<jetphi
 		   <<" pT  = "<<jetpt/1.e3 
@@ -430,7 +430,7 @@ namespace Analysis
     
 
       // muon selection here:
-      float dR = jetToTag.p4().DeltaR(tmpMuon->p4());
+      float dR = jetToTag->p4().DeltaR(tmpMuon->p4());
       if(dR>=0.4) continue;
     
 
@@ -457,7 +457,7 @@ namespace Analysis
       tmpMuon->parameter(scatNeighSignif, xAOD::Muon::scatteringNeighbourSignificance);
       ATH_MSG_DEBUG("#BTAG# scatNeighSignif= "<< scatNeighSignif );
       TLorentzVector myjet, mymu;
-      myjet.SetPtEtaPhiM(jetToTag.pt(),jetToTag.eta(),jetToTag.phi(),0);
+      myjet.SetPtEtaPhiM(jetToTag->pt(),jetToTag->eta(),jetToTag->phi(),0);
       mymu.SetPtEtaPhiM(tmpMuon->pt(),tmpMuon->eta(),tmpMuon->phi(),0);
       float pTrel      =myjet.Vect().Perp(mymu.Vect()); // VD: everything MUST be in MeV
       float qOverPratio=(*pMuIDTrack)->qOverP()/(*pMuMSTrack)->qOverP();
@@ -495,7 +495,7 @@ namespace Analysis
 			       position.z() - PVposition.z() );
 	jet_mu_sv_Lxy=sqrt(pow(PvSvDir(0,0),2)+pow(PvSvDir(1,0),2));
 	jet_mu_sv_L3d=sqrt(pow(PvSvDir(0,0),2)+pow(PvSvDir(1,0),2)+pow(PvSvDir(2,0),2));
-	TVector3 jetDir;  jetDir .SetPtEtaPhi(jetToTag.pt(),jetToTag.eta(),jetToTag.phi());
+	TVector3 jetDir;  jetDir .SetPtEtaPhi(jetToTag->pt(),jetToTag->eta(),jetToTag->phi());
 	TVector3 PvSvDIR; PvSvDIR.SetXYZ(position.x() - PVposition.x(),position.y() - PVposition.y(),position.z() - PVposition.z());
 	jet_mu_sv_dR=deltaR(jetDir.Eta(),PvSvDIR.Eta(),jetDir.Phi(),PvSvDIR.Phi());
 	TLorentzVector tlv;
@@ -555,8 +555,8 @@ namespace Analysis
     BTag->auxdata< ElementLink<xAOD::MuonContainer> >("SMT_mu_link")=theLink; 
 
     // #2: Set necessary MVA-input variables
-    m_pt     = jetToTag.pt();
-    m_absEta = fabs(jetToTag.eta());
+    m_pt     = jetToTag->pt();
+    m_absEta = fabs(jetToTag->eta());
 
     /*** Retrieving soft muon variables ***/
     m_sm_dR=jet_mu_dRmin_dR;
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/src/components/JetTagTools_entries.cxx b/PhysicsAnalysis/JetTagging/JetTagTools/src/components/JetTagTools_entries.cxx
index 3659324b42d48ae29c6fd20ae01cb6147a2a2525..a2bd3eb40bf4173c1e31662bf2233cac6e344ff1 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/src/components/JetTagTools_entries.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/src/components/JetTagTools_entries.cxx
@@ -29,7 +29,7 @@
 
 #include "JetTagTools/JetVertexCharge.h"
 
-#include "JetTagTools/ExKtbbTag.h"
+//#include "JetTagTools/ExKtbbTag.h"
 #include "JetTagTools/ExKtbbTagTool.h"
 
 
@@ -58,5 +58,5 @@ DECLARE_COMPONENT( Analysis::MV2Tag )
 
 DECLARE_COMPONENT( Analysis::JetVertexCharge )
 
-DECLARE_COMPONENT( Analysis::ExKtbbTag )
+//DECLARE_COMPONENT( Analysis::ExKtbbTag )
 DECLARE_COMPONENT( Analysis::ExKtbbTagTool )
diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBtagFex.cxx b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBtagFex.cxx
index 00413d410fcc5f69d9b14144c99699581b0b373e..ddf7884ed5eb454a6f09961c96c81c6b0bb7077a 100755
--- a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBtagFex.cxx
+++ b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBtagFex.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 // ************************************************
@@ -226,10 +226,10 @@ HLT::ErrorCode TrigBtagFex::hltExecute(const HLT::TriggerElement* inputTE, HLT::
 
   // Prepare jet tagging - create temporary jet copy 
   auto jetitr=jets->begin();
-  xAOD::Jet jet;
+  auto jet= new xAOD::Jet();
 
   if ( m_jetKey != "GSCJet" ) {
-    jet.makePrivateStore(**jetitr);
+    jet->makePrivateStore(**jetitr);
   } else {
     const xAOD::JetContainer* Splitjets = nullptr;
     if (getFeature(inputTE, Splitjets, "SplitJet") != HLT::OK || Splitjets == nullptr) {
@@ -238,7 +238,7 @@ HLT::ErrorCode TrigBtagFex::hltExecute(const HLT::TriggerElement* inputTE, HLT::
     }
 
     auto splitjetitr=Splitjets->begin();
-    jet.makePrivateStore(**splitjetitr);
+    jet->makePrivateStore(**splitjetitr);
   }
 
   // Prepare jet tagging - create SV output 
@@ -269,10 +269,10 @@ HLT::ErrorCode TrigBtagFex::hltExecute(const HLT::TriggerElement* inputTE, HLT::
       // Link the BTagging object to the jet for track association
       ElementLink< xAOD::BTaggingContainer> linkBTagger;
       linkBTagger.toContainedElement(*trigBTaggingContainer, trigBTagging);
-      jet.setBTaggingLink(linkBTagger);
+      jet->setBTaggingLink(linkBTagger);
 
       std::vector<xAOD::Jet*> jetsList;
-      jetsList.push_back(&jet);
+      jetsList.push_back(jet);
       ATH_MSG_VERBOSE( "#BTAG# Track association tool is not empty" );
       // We must pass the tracks explicitly to the track associator
       jetIsAssociated = m_bTagTrackAssocTool->BTagTrackAssociation_exec(&jetsList, tracks);
@@ -287,13 +287,14 @@ HLT::ErrorCode TrigBtagFex::hltExecute(const HLT::TriggerElement* inputTE, HLT::
     }
 
     // Execute secondary vertexing 
-    StatusCode sc = m_bTagSecVtxTool->BTagSecVtx_exec(jet, trigBTagging, trigVertexContainer, trigBTagVertexContainer, primaryVertex);
+    StatusCode sc = m_bTagSecVtxTool->BTagSecVtx_exec(*jet, trigBTagging, trigVertexContainer, trigBTagVertexContainer, primaryVertex);
     if(sc.isFailure()) {
       if(msgLvl() <= MSG::WARNING) msg() << MSG::WARNING << "#BTAG# Failed to reconstruct sec vtx" << endmsg;
     }
 
     // Tag jet 
-    sc = m_bTagTool->tagJet(jet, trigBTagging, primaryVertex);
+    const xAOD::Jet*  const_jet = jet;
+    sc = m_bTagTool->tagJet(const_jet, trigBTagging, primaryVertex);
     if(sc.isFailure()) {
       if(msgLvl() <= MSG::WARNING) msg() << MSG::WARNING << "#BTAG# Failed in taggers call" << endmsg;
     }
@@ -406,8 +407,8 @@ HLT::ErrorCode TrigBtagFex::hltExecute(const HLT::TriggerElement* inputTE, HLT::
   if( trigBTagging->IP3D_pu() != 0 && trigBTagging->IP3D_pc() != 0 ) m_mon_tag_IP3_cu  = log(( trigBTagging->IP3D_pc() )/( trigBTagging->IP3D_pu() ));
   else m_mon_tag_IP3_cu  = -999.;
 
-  m_mon_jet_pt  =  jet.pt()  ;
-  m_mon_jet_eta =  jet.eta() ;
+  m_mon_jet_pt  =  jet->pt()  ;
+  m_mon_jet_eta =  jet->eta() ;
 
 
   // Dump results 
@@ -450,6 +451,7 @@ HLT::ErrorCode TrigBtagFex::hltExecute(const HLT::TriggerElement* inputTE, HLT::
     if(msgLvl() <= MSG::ERROR) msg() << MSG::ERROR << "OUTPUT - Failed to attach xAOD::BTagVertexContainer" << endmsg;
     return HLT::NAV_ERROR;
   }
+  delete jet;
 
   return HLT::OK;
 }