diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/createDeadModuleList.C b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/createDeadModuleList.C
index db50c21da20c9ba66fb0681f24a8104aece25739..58c04eea6468ffb62d4ab4f437c7f339736e0bde 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/createDeadModuleList.C
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/createDeadModuleList.C
@@ -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 <vector>
@@ -24,7 +24,7 @@ std::vector< std::pair< std::string, std::vector<int> > > pixelMapping;
 std::vector< std::pair< int, std::vector<int> > > hashMapping;
 std::string getDCSIDFromPosition (int barrel_ec, int layer, int module_phi, int module_eta);
 int getHashFromPosition (int barrel_ec, int layer, int module_phi, int module_eta);
-std::vector<int> getPositionFromDCSID (std::string module_name);
+std::vector<int> getPositionFromDCSID (const std::string& module_name);
 
 std::vector<std::string> &splitter(const std::string &s, char delim, std::vector<std::string> &elems) {
   std::stringstream ss(s);
@@ -329,13 +329,13 @@ int main(int argc, char* argv[]){
   pyFile << "badModulesList=[]" << std::endl;
 
   std::map<int, std::vector<std::string> >::const_iterator iter;
-  for(iter = deadModuleList.begin(); iter != deadModuleList.end(); iter++){
+  for(iter = deadModuleList.begin(); iter != deadModuleList.end(); ++iter){
     if( (iter->second).size() < 1) continue;
     int LB = iter->first;
     pyFile << "runLumiList.append([" << runNumber << ", " << LB << "])" << std::endl;
     pyFile << "badModulesList.append([";
     std::vector<std::string>::const_iterator module_iter;
-    for(module_iter = (iter->second).begin(); module_iter != (iter->second).end(); module_iter++){
+    for(module_iter = (iter->second).begin(); module_iter != (iter->second).end(); ++module_iter){
       std::string moduleID = *module_iter;
       std::vector<int> position = getPositionFromDCSID(moduleID);
       int barrel = position[0];
@@ -549,7 +549,7 @@ int getHashFromPosition (int barrel_ec, int layer, int module_phi, int module_et
   return 0;
 }
 
-std::vector<int> getPositionFromDCSID (std::string module_name){
+std::vector<int> getPositionFromDCSID (const std::string& module_name){
   for(unsigned int ii = 0; ii < pixelMapping.size(); ii++) {
     if (pixelMapping[ii].first == module_name)
       return pixelMapping[ii].second;
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/hackNoiseMapsForStudyCP.C b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/hackNoiseMapsForStudyCP.C
index 0b21e69cae2e734f0c14fc8d2df9c7d644e783b3..d62c85fbe89cd40433db1a374439b6eeb1ea0d46 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/hackNoiseMapsForStudyCP.C
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/hackNoiseMapsForStudyCP.C
@@ -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<vector>
@@ -26,7 +26,7 @@
 
 std::vector< std::pair< std::string, std::vector<int> > > pixelMapping;
 std::string getDCSIDFromPosition (int barrel_ec, int layer, int module_phi, int module_eta);
-std::vector<int> getPositionFromDCSID (std::string module_name);
+std::vector<int> getPositionFromDCSID (const std::string& module_name);
 
 double ComputeMuChip(TH2D* modhisto, int chip)
 {
@@ -999,7 +999,7 @@ std::string getDCSIDFromPosition (int barrel_ec, int layer, int module_phi, int
   return std::string("Error!");
 }
 
-std::vector<int> getPositionFromDCSID (std::string module_name){
+std::vector<int> getPositionFromDCSID (const std::string& module_name){
   for(unsigned int ii = 0; ii < pixelMapping.size(); ii++) {
     if (pixelMapping[ii].first == module_name)
     return pixelMapping[ii].second;
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/makeInactiveModuleList.C b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/makeInactiveModuleList.C
index 44a6b879d2cc01cba430d18b3a952eddd3630c99..179bb46531b56efc986cc9bfc6d7929825a881dc 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/makeInactiveModuleList.C
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/makeInactiveModuleList.C
@@ -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<vector>
@@ -347,7 +347,7 @@ int getHashFromPosition (int barrel_ec, int layer, int module_phi, int module_et
   return 0;
 }
 
-std::vector<int> getPositionFromDCSID (std::string module_name){
+std::vector<int> getPositionFromDCSID (const std::string& module_name){
   for(unsigned int ii = 0; ii < m_pixelMapping.size(); ii++) {
     if (m_pixelMapping[ii].first == module_name)
       return m_pixelMapping[ii].second;
@@ -365,7 +365,7 @@ std::vector<int> getChannelFromHashID (int hashid){
   return m_channelMapping[1].second;
 }
 
-void make_pyfile(std::string srun, std::string stag_name, int npush_back, std::vector<std::string> vsmodule, std::vector<int> vLB_start, std::vector<int> vLB_end, bool flag_first){
+void make_pyfile(const std::string& srun, const std::string& stag_name, int npush_back, const std::vector<std::string>& vsmodule, const std::vector<int>& vLB_start, const std::vector<int>& vLB_end, bool flag_first){
   std::string spyfilename = "./PixMapOverlay_run" + srun;
   spyfilename += ".py";
   std::ofstream pyFile;
@@ -455,9 +455,9 @@ void make_pyfile(std::string srun, std::string stag_name, int npush_back, std::v
       }else{
 	pyFile << "                  [" << srun << ", " << *it_LBstart << ", " << (*it_LBend + 1)<< ", " << channel << "]]" << std::endl;
       }//(i != (npush_back-1))
-      it_smodule++;
-      it_LBstart++;
-      it_LBend++;
+      ++it_smodule;
+      ++it_LBstart;
+      ++it_LBend;
     }//for(int i=0; i<npush_back; i++)
 
     pyFile << "nIOVs = len(badModulesList)" << std::endl;
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/updateDeadMaps.C b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/updateDeadMaps.C
index c91ca07b729f9bfc34c350b129527f2cbbdc8bbe..b82461fb9ac87903fcd58e38fb439e66ff417036 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/updateDeadMaps.C
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/updateDeadMaps.C
@@ -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<vector>
@@ -22,7 +22,7 @@
 
 std::vector< std::pair< std::string, std::vector<int> > > pixelMapping;
 std::string getDCSIDFromPosition (int barrel_ec, int layer, int module_phi, int module_eta);
-std::vector<int> getPositionFromDCSID (std::string module_name);
+std::vector<int> getPositionFromDCSID (const std::string& module_name);
 
 std::vector<std::string> &splitter(const std::string &s, char delim, std::vector<std::string> &elems) {
   std::stringstream ss(s);
@@ -808,7 +808,7 @@ std::string getDCSIDFromPosition (int barrel_ec, int layer, int module_phi, int
   return std::string("Error!");
 }
 
-std::vector<int> getPositionFromDCSID (std::string module_name){
+std::vector<int> getPositionFromDCSID (const std::string& module_name){
   for(unsigned int ii = 0; ii < pixelMapping.size(); ii++) {
     if (pixelMapping[ii].first == module_name)
     return pixelMapping[ii].second;
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/updateNoiseMaps.C b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/updateNoiseMaps.C
index a85f8801e746fb137070958c1258cdb0a4ad3195..2ae8e6e2966e2aba0a493eb4e592d0eb0dd785bd 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/updateNoiseMaps.C
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/updateNoiseMaps.C
@@ -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<vector>
@@ -24,7 +24,7 @@
 
 std::vector< std::pair< std::string, std::vector<int> > > pixelMapping;
 std::string getDCSIDFromPosition (int barrel_ec, int layer, int module_phi, int module_eta);
-std::vector<int> getPositionFromDCSID (std::string module_name);
+std::vector<int> getPositionFromDCSID (const std::string& module_name);
 
 std::vector<std::string> &splitter(const std::string &s, char delim, std::vector<std::string> &elems) {
   std::stringstream ss(s);
@@ -892,7 +892,7 @@ std::string getDCSIDFromPosition (int barrel_ec, int layer, int module_phi, int
   return std::string("Error!");
 }
 
-std::vector<int> getPositionFromDCSID (std::string module_name){
+std::vector<int> getPositionFromDCSID (const std::string& module_name){
   for(unsigned int ii = 0; ii < pixelMapping.size(); ii++) {
     if (pixelMapping[ii].first == module_name)
     return pixelMapping[ii].second;
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Macro/PlotCs.C b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Macro/PlotCs.C
index 74c0d2285f576f8843899bfbfa2f1438d00a42b9..e32af0a91e4447073da7bcc5c345b0a92bb542eb 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Macro/PlotCs.C
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Macro/PlotCs.C
@@ -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
 */
 
 {
@@ -75,7 +75,8 @@ TCanvas *c1 = new TCanvas(parameter.c_str(),"",5);
 c1->SetLeftMargin(0.14);
 int iglobal = 0;
 
-for(int ifile = 0;  ifile < filenames.size(); ifile++){
+size_t nfilenames = filenames.size();
+for(int ifile = 0;  ifile < nfilenames; ++ifile){
 	for(int iCS = 0; iCS < maxcs; iCS++){
 		iglobal++;
 		TFile *file = TFile::Open((filenames[ifile] + ".root").c_str());
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Macro/PlotFits.C b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Macro/PlotFits.C
index cf049b4353e5160772e9a8b904b33533af163a3e..c44bd42a670e3cae248bc9311382f1e996a2a2c8 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Macro/PlotFits.C
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Macro/PlotFits.C
@@ -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
 */
 
 {
@@ -87,7 +87,8 @@ if(G4){
 }
 
 
-for(int ics = 0; ics < clustersizes.size(); ics++){
+size_t nclustersizes = clustersizes.size();
+for(int ics = 0; ics < nclustersizes; ics++){
 	for(int ibin = 0;  ibin < bins.size(); ibin++){
 		iglobal++;
 		TFile *file = TFile::Open((filenames[0] + ".root").c_str());
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Macro/PlotOmega.C b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Macro/PlotOmega.C
index cf8889a794026cc71ad87cb1f187394eaaf89b55..4195810af461b3f7e12e4eb68ebaf2b208fd3f86 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Macro/PlotOmega.C
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Macro/PlotOmega.C
@@ -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
 */
 
 {
@@ -60,7 +60,8 @@ std::ostringstream histoname;
 TCanvas *c1 = new TCanvas(parameter.c_str(),"",5);
 c1->SetLeftMargin(0.14);
 
-for(int ifile = 0;  ifile < filenames.size(); ifile++){
+size_t nfilenames = filenames.size();
+for(int ifile = 0;  ifile < nfilenames; ifile++){
 	TFile *file = TFile::Open((filenames[ifile] + ".root").c_str());
 	file->cd();
 	TDirectory *pippo = (TDirectory *)gDirectory->Get("ChargeInterpolation");
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/TJetNet.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/TJetNet.cxx
index a097c096a48277712160625c37e57a72aabb8a2a..e97c90e1066b0d748f507ef47e2d4a369cda959e 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/TJetNet.cxx
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/TJetNet.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 "TJetNet.h"
@@ -19,30 +19,29 @@ ClassImp( TJetNet )
 //Constructors
 //______________________________________________________________________________
 TJetNet::TJetNet()
+  : m_LayerCount(0),
+    m_pLayers(0),
+    m_pInputTrainSet(nullptr),
+    m_pOutputTrainSet(nullptr),
+    m_pInputTestSet(nullptr),
+    m_pOutputTestSet(nullptr),
+    m_TrainSetCnt(0),
+    m_TestSetCnt(0),
+    m_Epochs(0),
+    m_CurrentEpoch(0),
+    m_IsInitialized(kFalse),
+    m_InitLocked(kFALSE),
+    m_NormalizeOutput(false)
 {
-  // Default Constructor
-  mTestSetCnt = 0;
-  mTrainSetCnt = 0;
-  mLayerCount = 0;
-  
-  mNormalizeOutput=false;
-  
-  mpLayers = 0;
-
-  mIsInitialized = kFALSE;
-  mInitLocked = kFALSE;
-
-  mpInputTrainSet = 0;
-  mpInputTestSet = 0;
-  mpOutputTrainSet = 0;
-  mpOutputTestSet = 0;
-
-  mEpochs = 0;
-  mCurrentEpoch = 0;
 }
 //______________________________________________________________________________
 TJetNet::TJetNet( Int_t aTestCount, Int_t aTrainCount,
 	 const Int_t aLayersCnt, const Int_t* aLayers )
+#ifdef _DEBUG
+  : m_Debug (kTRUE)
+#else
+  : m_Debug (kFALSE)
+#endif
 {
   // Creates neural network with aLayersCnt number of layers,
   // aTestCount number of patterns for the test set,
@@ -50,59 +49,55 @@ TJetNet::TJetNet( Int_t aTestCount, Int_t aTrainCount,
   // aLayers contains the information for number of the units in the different layers
 
   int i;
-  mDebug = kFALSE;
-#ifdef _DEBUG
-  mDebug = kTRUE;
-#endif
   
-  if( mDebug ){ std::cout << "=====> Entering TJetNet::TJetNet(...)" << std::endl; }
+  if( m_Debug ){ std::cout << "=====> Entering TJetNet::TJetNet(...)" << std::endl; }
 
-  mTestSetCnt  = aTestCount;
-  mTrainSetCnt = aTrainCount;
-  mLayerCount  = aLayersCnt; // Get the number of layers
+  m_TestSetCnt  = aTestCount;
+  m_TrainSetCnt = aTrainCount;
+  m_LayerCount  = aLayersCnt; // Get the number of layers
   
-  if( mLayerCount > 0 )
+  if( m_LayerCount > 0 )
   {  
-   //Perform deep copy of the array holding Layers count
-    mpLayers = new Int_t[ mLayerCount ];
-    for( i = 0; i < mLayerCount; ++i )
+    //Perform deep copy of the array holding Layers count
+    m_pLayers = new Int_t[ m_LayerCount ];
+    for( i = 0; i < m_LayerCount; ++i )
     {
-      mpLayers[ i ] = aLayers[ i ];
+      m_pLayers[ i ] = aLayers[ i ];
     }
   }
 
-  mInputDim = mpLayers[ 0 ];
-  mOutputDim = mpLayers[ mLayerCount - 1 ];
-  mHiddenLayerDim = mLayerCount-2;
+  m_InputDim = m_pLayers[ 0 ];
+  m_OutputDim = m_pLayers[ m_LayerCount - 1 ];
+  m_HiddenLayerDim = m_LayerCount-2;
   
 
-  mIsInitialized = kFALSE;
-  mInitLocked = kFALSE;
+  m_IsInitialized = kFALSE;
+  m_InitLocked = kFALSE;
 
-  mpInputTrainSet  = new TNeuralDataSet( mTrainSetCnt, GetInputDim() );
-  mpInputTestSet = new TNeuralDataSet( mTestSetCnt, GetInputDim() );
-  mpOutputTrainSet = new TNeuralDataSet( mTrainSetCnt, GetOutputDim() );
-  mpOutputTestSet = new TNeuralDataSet( mTestSetCnt, GetOutputDim() );
+  m_pInputTrainSet  = new TNeuralDataSet( m_TrainSetCnt, GetInputDim() );
+  m_pInputTestSet = new TNeuralDataSet( m_TestSetCnt, GetInputDim() );
+  m_pOutputTrainSet = new TNeuralDataSet( m_TrainSetCnt, GetOutputDim() );
+  m_pOutputTestSet = new TNeuralDataSet( m_TestSetCnt, GetOutputDim() );
   
-  mNormalizeOutput=false;
+  m_NormalizeOutput=false;
 
-  menActFunction=afSigmoid;
+  m_enActFunction=afSigmoid;
 
   SetEpochs( -1 );
 
-  if( mDebug ){ std::cout << "=====> Leaving TJetNet::TJetNet(...)" << std::endl; }
+  if( m_Debug ){ std::cout << "=====> Leaving TJetNet::TJetNet(...)" << std::endl; }
 }
 //______________________________________________________________________________
 TJetNet::~TJetNet( void )
 {
   // Default destructor
-  if( mDebug ){ std::cout << "=====> Entering TJetNet::~TJetNet(...)" << std::endl; }
-  delete [] mpLayers;
-  delete mpInputTestSet;
-  delete mpInputTrainSet;
-  delete mpOutputTestSet;
-  delete mpOutputTrainSet;
-  if( mDebug ){ std::cout << "=====> Leaving TJetNet::~TJetNet(...)" << std::endl; }
+  if( m_Debug ){ std::cout << "=====> Entering TJetNet::~TJetNet(...)" << std::endl; }
+  delete [] m_pLayers;
+  delete m_pInputTestSet;
+  delete m_pInputTrainSet;
+  delete m_pOutputTestSet;
+  delete m_pOutputTrainSet;
+  if( m_Debug ){ std::cout << "=====> Leaving TJetNet::~TJetNet(...)" << std::endl; }
 }
 //______________________________________________________________________________
 //by Giacinto Piacquadio (18-02-2008)
@@ -125,24 +120,24 @@ TTrainedNetwork* TJetNet::createTrainedNetwork() const
 
   for (Int_t o=0;o<nHidden+1;++o)
   {
-     int sizeActualLayer=(o<nHidden)?nHiddenLayerSize[o]:nOutput;
-     int sizePreviousLayer=(o==0)?nInput:nHiddenLayerSize[o-1];
-     thresholdVectors.push_back(new TVectorD(sizeActualLayer));
-     weightMatrices.push_back(new TMatrixD(sizePreviousLayer,sizeActualLayer));
+    int sizeActualLayer=(o<nHidden)?nHiddenLayerSize[o]:nOutput;
+    int sizePreviousLayer=(o==0)?nInput:nHiddenLayerSize[o-1];
+    thresholdVectors.push_back(new TVectorD(sizeActualLayer));
+    weightMatrices.push_back(new TMatrixD(sizePreviousLayer,sizeActualLayer));
   }
 
   for (Int_t o=0;o<nHidden+1;++o)
   {
 
-    if (mDebug)
-    if (o<nHidden)
-    {
-      cout << " Iterating on hidden layer n.: " << o << endl;
-    }
-    else
-    {
-      cout << " Considering output layer " << endl;
-    }
+    if (m_Debug)
+      if (o<nHidden)
+      {
+        cout << " Iterating on hidden layer n.: " << o << endl;
+      }
+      else
+      {
+        cout << " Considering output layer " << endl;
+      }
     
     int sizeActualLayer=(o<nHidden)?nHiddenLayerSize[o]:nOutput;
 
@@ -150,21 +145,21 @@ TTrainedNetwork* TJetNet::createTrainedNetwork() const
     {
       if (o<nHidden)
       {
-	if (mDebug)
-	cout << " To hidden node: " << s << endl;
+	if (m_Debug)
+          cout << " To hidden node: " << s << endl;
       }
       else
       {
-	if (mDebug)
-	cout << " To output node: " << s << endl;
+	if (m_Debug)
+          cout << " To output node: " << s << endl;
       }
       if (o==0)
       {
 	for (Int_t p=0;p<nInput;++p)
 	{
-	  if (mDebug)
-	  cout << " W from inp nod: " << p << "weight: " <<
-	    GetWeight(o+1,s+1,p+1) << endl;
+	  if (m_Debug)
+            cout << " W from inp nod: " << p << "weight: " <<
+              GetWeight(o+1,s+1,p+1) << endl;
 	  weightMatrices[o]->operator() (p,s) = GetWeight(o+1,s+1,p+1);
         }
       }
@@ -172,16 +167,16 @@ TTrainedNetwork* TJetNet::createTrainedNetwork() const
       {
 	for (Int_t p=0;p<nHiddenLayerSize[o-1];++p)
 	{
-	  if (mDebug)
-	  cout << " W from lay : " << o-1 << " nd: " << 
-	    p << " weight: " <<
-	    GetWeight(o+1,s+1,p+1) << endl;
+	  if (m_Debug)
+            cout << " W from lay : " << o-1 << " nd: " << 
+              p << " weight: " <<
+              GetWeight(o+1,s+1,p+1) << endl;
 	  weightMatrices[o]->operator() (p,s)=GetWeight(o+1,s+1,p+1);
 	}
       }
-      if (mDebug)
-      cout << " Threshold for node " << s << " : " << 
-	GetThreshold(o+1,s+1) << endl;
+      if (m_Debug)
+        cout << " Threshold for node " << s << " : " << 
+          GetThreshold(o+1,s+1) << endl;
       thresholdVectors[o]->operator() (s) = GetThreshold(o+1,s+1);
     }
   }
@@ -189,7 +184,7 @@ TTrainedNetwork* TJetNet::createTrainedNetwork() const
   bool linearOutput=false;
   if (this->GetActivationFunction(nHidden)==4) 
   {
-//    cout << " Creating TTrainedNetwork with linear output function" << endl;
+    //    cout << " Creating TTrainedNetwork with linear output function" << endl;
     linearOutput=true;
   }
 
@@ -200,9 +195,9 @@ TTrainedNetwork* TJetNet::createTrainedNetwork() const
 			nHiddenLayerSize,
 			thresholdVectors,
 			weightMatrices,
-			menActFunction,
+			m_enActFunction,
                         linearOutput,
-                        mNormalizeOutput);
+                        m_NormalizeOutput);
 						
   return trainedNetwork;
 
@@ -303,11 +298,11 @@ void TJetNet::Print( void )
   Int_t i;
 
   std::cout << "TJetNet" << std::endl;
-  std::cout << "Number of layers: " << mLayerCount << std::endl;
+  std::cout << "Number of layers: " << m_LayerCount << std::endl;
 
-  for( i = 0; i < mLayerCount; i++ )
+  for( i = 0; i < m_LayerCount; i++ )
   {
-      std::cout << "\t\tNumber of units in layer " << i << " : " <<  mpLayers[ i ] << std::endl;
+    std::cout << "\t\tNumber of units in layer " << i << " : " <<  m_pLayers[ i ] << std::endl;
   }
 
   std::cout << "Epochs: " << GetEpochs() << std::endl;
@@ -334,32 +329,32 @@ Double_t TJetNet::Test( void )
   for( Int_t iPattern = 0; iPattern < NPatterns; iPattern++ )
   {
 
-      for( Int_t i = 0; i < GetInputDim(); i++ )
-      {
-	JNDAT1.OIN[ i ] = float ( GetInputTestSet( iPattern, i ) );
-      }
+    for( Int_t i = 0; i < GetInputDim(); i++ )
+    {
+      JNDAT1.OIN[ i ] = float ( GetInputTestSet( iPattern, i ) );
+    }
 
-      NWJNWGT.OWGT = GetEventWeightTestSet( iPattern );
+    NWJNWGT.OWGT = GetEventWeightTestSet( iPattern );
 
-      JNTEST();
+    JNTEST();
 
-      for( Int_t j = 0; j < GetOutputDim(); j++ )
-      {
-	fMeanError+= NWJNWGT.OWGT * 
-	  std::pow(JNDAT1.OUT[ j ]-float( GetOutputTestSet( iPattern, j )),2)/(float)GetOutputDim();
-      }
+    for( Int_t j = 0; j < GetOutputDim(); j++ )
+    {
+      fMeanError+= NWJNWGT.OWGT * 
+        std::pow(JNDAT1.OUT[ j ]-float( GetOutputTestSet( iPattern, j )),2)/(float)GetOutputDim();
+    }
 
 
 
-      if( mDebug ) std::cout << "Testing [ " << iPattern << " ] - "  << JNDAT1.OIN[ 0 ] 
-			     << " => " << JNDAT1.OUT[ 0 ] << std::endl;
+    if( m_Debug ) std::cout << "Testing [ " << iPattern << " ] - "  << JNDAT1.OIN[ 0 ] 
+                           << " => " << JNDAT1.OUT[ 0 ] << std::endl;
 
-    }
+  }
 
   fMeanError/=2.*NPatterns;
 
-  if (mDebug)
-  std::cout << " Test error: " << fMeanError << endl;
+  if (m_Debug)
+    std::cout << " Test error: " << fMeanError << endl;
 
   return fMeanError;
 }
@@ -410,98 +405,98 @@ Double_t TJetNet::TestBTAG( void )
   for( Int_t iPattern = 0; iPattern < NPatterns; iPattern++ )
   {
 
-      for( Int_t i = 0; i < GetInputDim(); i++ )
+    for( Int_t i = 0; i < GetInputDim(); i++ )
+    {
+      if (!test)
       {
-        if (!test)
-        {
-          JNDAT1.OIN[ i ] = float ( GetInputTestSet( iPattern, i ) );
-          NWJNWGT.OWGT = GetEventWeightTestSet( iPattern );
-        }
-        else
-        {
-          JNDAT1.OIN[ i ] = float (GetInputTrainSet( iPattern, i ) );
-          NWJNWGT.OWGT = GetEventWeightTrainSet( iPattern );
-        }
-
+        JNDAT1.OIN[ i ] = float ( GetInputTestSet( iPattern, i ) );
+        NWJNWGT.OWGT = GetEventWeightTestSet( iPattern );
       }
+      else
+      {
+        JNDAT1.OIN[ i ] = float (GetInputTrainSet( iPattern, i ) );
+        NWJNWGT.OWGT = GetEventWeightTrainSet( iPattern );
+      }
+
+    }
 
-      JNTEST();
+    JNTEST();
 
-      int active=0;
-      for( Int_t j = 0; j < GetOutputDim(); j++ )
+    int active=0;
+    for( Int_t j = 0; j < GetOutputDim(); j++ )
+    {
+      if (!test)
       {
-        if (!test)
-        {
-          fMeanError+= NWJNWGT.OWGT * 
-              std::pow(JNDAT1.OUT[ j ]-float( GetOutputTestSet( iPattern, j )),2)/(float)GetOutputDim();
-        }
-        else
-        {
-           fMeanError+= NWJNWGT.OWGT * 
-               std::pow(JNDAT1.OUT[ j ]-float( GetOutputTrainSet( iPattern, j )),2)/(float)GetOutputDim();
-        }
+        fMeanError+= NWJNWGT.OWGT * 
+          std::pow(JNDAT1.OUT[ j ]-float( GetOutputTestSet( iPattern, j )),2)/(float)GetOutputDim();
+      }
+      else
+      {
+        fMeanError+= NWJNWGT.OWGT * 
+          std::pow(JNDAT1.OUT[ j ]-float( GetOutputTrainSet( iPattern, j )),2)/(float)GetOutputDim();
+      }
         
 
-//        std::cout << " j " <<  j << " is " << GetOutputTestSet( iPattern, j) << std::endl;
+      //        std::cout << " j " <<  j << " is " << GetOutputTestSet( iPattern, j) << std::endl;
 
-        if (!test)
+      if (!test)
+      {
+        if (fabs(float( GetOutputTestSet( iPattern, j)) - 1) < 1e-4)
         {
-          if (fabs(float( GetOutputTestSet( iPattern, j)) - 1) < 1e-4)
-          {
-            active = j;
-          }
+          active = j;
         }
-        else
+      }
+      else
+      {
+        if (fabs(float( GetOutputTrainSet( iPattern, j)) - 1) < 1e-4)
         {
-          if (fabs(float( GetOutputTrainSet( iPattern, j)) - 1) < 1e-4)
-          {
-            active = j;
-          }
+          active = j;
         }
       }
+    }
 
-//      if (mDebug) std::cout << " active is: " << active << std::endl;
+    //      if (m_Debug) std::cout << " active is: " << active << std::endl;
 
-//      if (mDebug) std::cout << " filling histograms " << std::endl;
+    //      if (m_Debug) std::cout << " filling histograms " << std::endl;
 
-      if (JNDAT1.OUT[ 0 ] + JNDAT1.OUT[ 1 ] >= 0)
-      {
-        histoEfficienciesC[active]->Fill( JNDAT1.OUT[ 0 ] / 
-                                          ( JNDAT1.OUT[ 0 ] + JNDAT1.OUT[ 1 ]),
-                                          NWJNWGT.OWGT);
+    if (JNDAT1.OUT[ 0 ] + JNDAT1.OUT[ 1 ] >= 0)
+    {
+      histoEfficienciesC[active]->Fill( JNDAT1.OUT[ 0 ] / 
+                                        ( JNDAT1.OUT[ 0 ] + JNDAT1.OUT[ 1 ]),
+                                        NWJNWGT.OWGT);
                                                                                 
-//        if( mDebug ) std::cout << "Filled: " << JNDAT1.OUT[ 0 ] / 
-//                         ( JNDAT1.OUT[ 0 ] + JNDAT1.OUT[ 2 ]) << std::endl;
+      //        if( m_Debug ) std::cout << "Filled: " << JNDAT1.OUT[ 0 ] / 
+      //                         ( JNDAT1.OUT[ 0 ] + JNDAT1.OUT[ 2 ]) << std::endl;
       
-      }
-      else
-      {
-        std::cout << " Filled 0 " << std::endl;
-        histoEfficienciesC[active]->Fill( 0 );
-      }
+    }
+    else
+    {
+      std::cout << " Filled 0 " << std::endl;
+      histoEfficienciesC[active]->Fill( 0 );
+    }
       
         
-      if (JNDAT1.OUT[ 0 ] + JNDAT1.OUT[ 2 ] >= 0)
-      {
-        histoEfficienciesL[active]->Fill( JNDAT1.OUT[ 0 ] / 
-                                          ( JNDAT1.OUT[ 0 ] + JNDAT1.OUT[ 2 ]),
-                                          NWJNWGT.OWGT);
-//        if( mDebug ) std::cout << "Filled: " << JNDAT1.OUT[ 0 ] / 
-//                         ( JNDAT1.OUT[ 0 ] + JNDAT1.OUT[ 1 ]) << std::endl;
+    if (JNDAT1.OUT[ 0 ] + JNDAT1.OUT[ 2 ] >= 0)
+    {
+      histoEfficienciesL[active]->Fill( JNDAT1.OUT[ 0 ] / 
+                                        ( JNDAT1.OUT[ 0 ] + JNDAT1.OUT[ 2 ]),
+                                        NWJNWGT.OWGT);
+      //        if( m_Debug ) std::cout << "Filled: " << JNDAT1.OUT[ 0 ] / 
+      //                         ( JNDAT1.OUT[ 0 ] + JNDAT1.OUT[ 1 ]) << std::endl;
       
-     }
-      else
-      {
-        std::cout << " Filled 0 " << std::endl;
-        histoEfficienciesL[active]->Fill( 0 );
-      }
+    }
+    else
+    {
+      std::cout << " Filled 0 " << std::endl;
+      histoEfficienciesL[active]->Fill( 0 );
+    }
 
-      if( mDebug ) std::cout << "Testing [ " << iPattern << " ] - "  << JNDAT1.OIN[ 0 ] 
-                             << " => " << JNDAT1.OUT[ 0 ] << std::endl;
+    if( m_Debug ) std::cout << "Testing [ " << iPattern << " ] - "  << JNDAT1.OIN[ 0 ] 
+                           << " => " << JNDAT1.OUT[ 0 ] << std::endl;
       
   }// finish patterns
   
-  if (mDebug) std::cout << " Finished patterns... " << std::endl;
+  if (m_Debug) std::cout << " Finished patterns... " << std::endl;
   
   TFile* newFile=new TFile("test.root","recreate");
   histoEfficienciesL[0]->Write();
@@ -530,13 +525,13 @@ Double_t TJetNet::TestBTAG( void )
     }
     
       
-    if (mDebug) std::cout << " 1 " << std::endl;
+    if (m_Debug) std::cout << " 1 " << std::endl;
     
     Double_t allb=(*myVectorHistos)[0]->GetEntries();
     Double_t allc=(*myVectorHistos)[1]->GetEntries();
     Double_t allu=(*myVectorHistos)[2]->GetEntries();
     
-    if (mDebug) std::cout << " allb " << allb << std::endl;
+    if (m_Debug) std::cout << " allb " << allb << std::endl;
 
     Double_t allbsofar=0;
     
@@ -556,14 +551,14 @@ Double_t TJetNet::TestBTAG( void )
  
       for (int r=0;r<eff.size();r++)
       {
-        if (mDebug) std::cout << " actual eff: " << allbsofar / allb << std::endl;
+        if (m_Debug) std::cout << " actual eff: " << allbsofar / allb << std::endl;
 
         if ((!ok_eff[r]) && allbsofar / allb > eff[r])
         {
           binN_Eff[r]=s;
           ok_eff[r]=true;
-          if (mDebug) std::cout << " bin: " << s << " eff: " << allbsofar / allb << std::endl;
-//          std::cout << " Cut value: " << (*myVectorHistos)[0]->GetBinCenter(s) << std::endl;
+          if (m_Debug) std::cout << " bin: " << s << " eff: " << allbsofar / allb << std::endl;
+          //          std::cout << " Cut value: " << (*myVectorHistos)[0]->GetBinCenter(s) << std::endl;
         }
         else if (allbsofar / allb <= eff[r])
         {
@@ -581,7 +576,7 @@ Double_t TJetNet::TestBTAG( void )
 
       std::cout << " check: " << (double)(*myVectorHistos)[0]->Integral((*myVectorHistos)[0]->GetNbinsX()-binN_Eff[r],
                                                                         (*myVectorHistos)[1]->GetNbinsX()+1)
-          / (double)allb;
+        / (double)allb;
       
       double effc=(*myVectorHistos)[1]->Integral((*myVectorHistos)[0]->GetNbinsX()-binN_Eff[r],
                                                  (*myVectorHistos)[1]->GetNbinsX()+1);
@@ -603,20 +598,20 @@ Double_t TJetNet::TestBTAG( void )
     std::cout << std::endl;
   }
   
-   for( Int_t j = 0; j < GetOutputDim(); j++ )
-    {
-      delete histoEfficienciesC[j];
-      delete histoEfficienciesL[j];
-    }
+  for( Int_t j = 0; j < GetOutputDim(); j++ )
+  {
+    delete histoEfficienciesC[j];
+    delete histoEfficienciesL[j];
+  }
    
 
   fMeanError/=2.*NPatterns;
 
-  if (mDebug)
-  std::cout << " Test error: " << fMeanError << endl;
+  if (m_Debug)
+    std::cout << " Test error: " << fMeanError << endl;
 
   return fMeanError;
-  }
+}
 
 
 //______________________________________________________________________________
@@ -637,11 +632,11 @@ Double_t TJetNet::Train( void )
   if (updatesPerEpoch*patternsPerUpdate<1./2.*NPatterns) 
   {
     cout << "Using only: " << updatesPerEpoch*patternsPerUpdate << 
-        " patterns on available: " << NPatterns << endl;
+      " patterns on available: " << NPatterns << endl;
   } else if (updatesPerEpoch*patternsPerUpdate>NPatterns) 
   {
     cout << " Trying to use " << updatesPerEpoch*patternsPerUpdate << 
-        " patterns, but available: " << NPatterns << endl;
+      " patterns, but available: " << NPatterns << endl;
     return -100;
   }
   
@@ -676,26 +671,26 @@ void TJetNet::Init( void )
 {
   // Initializes the neuaral network
   Int_t i;
-  JNDAT1.MSTJN[ 0 ] = mLayerCount; // Set the number of layers
+  JNDAT1.MSTJN[ 0 ] = m_LayerCount; // Set the number of layers
 
   // Set the number of nodes for each layer
-  for( i = 0; i < mLayerCount; i++ )
+  for( i = 0; i < m_LayerCount; i++ )
   {
-    if ( mDebug ) std::cout << "Layer " << i + 1 << " has " << mpLayers[ i ] << " units." << std::endl; 
-    JNDAT1.MSTJN[ 9 + i ] = mpLayers[ i ]; 
+    if ( m_Debug ) std::cout << "Layer " << i + 1 << " has " << m_pLayers[ i ] << " units." << std::endl; 
+    JNDAT1.MSTJN[ 9 + i ] = m_pLayers[ i ]; 
   }
    
   cout << " calling JNINIT " << endl;
   JNINIT();
 
-  if (mNormalizeOutput)  
+  if (m_NormalizeOutput)  
   {
     std::cout << " Setting to normalize output nodes: POTT nodes " << std::endl;
-    SetPottsUnits(mpLayers[mLayerCount-1]); 
+    SetPottsUnits(m_pLayers[m_LayerCount-1]); 
   }
   
   cout << " finishing calling JNINIT " << endl;
-  mIsInitialized = kTRUE;
+  m_IsInitialized = kTRUE;
 }
 //______________________________________________________________________________
 Int_t TJetNet::Epoch( void )
@@ -703,78 +698,78 @@ Int_t TJetNet::Epoch( void )
   // Initiate one train/test step the network. 
 
   Double_t aTrain, aTest;
-  if ( mCurrentEpoch < mEpochs )
+  if ( m_CurrentEpoch < m_Epochs )
   {
-      mCurrentEpoch++;
-      aTrain = Train();
+    m_CurrentEpoch++;
+    aTrain = Train();
 
-      //      if (mCurrentEpoch%2)
+    //      if (m_CurrentEpoch%2)
 
-      //      std::cout << " Calls to MSTJN: " << GetMSTJN(6) << 
-      //	std::endl;
+    //      std::cout << " Calls to MSTJN: " << GetMSTJN(6) << 
+    //	std::endl;
 
-      if ( mDebug ) 
-      {
+    if ( m_Debug ) 
+    {
 
 
-	std::cout << "[ " << mCurrentEpoch << " ] Train: " << aTrain << std::endl;
-      }
-      if ( ( mCurrentEpoch % 2 ) == 0 )
-      {
-	  aTest = Test();
-	  //	  if ( mDebug )
-	  std::cout << "[" << mCurrentEpoch << "]: " << GetPARJN(8) << " ";
-	  std::cout << "Test: " << aTest << std::endl;
-      }
+      std::cout << "[ " << m_CurrentEpoch << " ] Train: " << aTrain << std::endl;
+    }
+    if ( ( m_CurrentEpoch % 2 ) == 0 )
+    {
+      aTest = Test();
+      //	  if ( m_Debug )
+      std::cout << "[" << m_CurrentEpoch << "]: " << GetPARJN(8) << " ";
+      std::cout << "Test: " << aTest << std::endl;
+    }
   }
-  return mCurrentEpoch;
+  return m_CurrentEpoch;
 }
 //______________________________________________________________________________
 void TJetNet::SetInputTrainSet( Int_t aPatternInd, Int_t aInputInd, Double_t aValue )
 {
   // Changes the value of the cell corresponding to unit aInputInd in pattern aPatternInd into INPUT TRAIN set
-  mpInputTrainSet->SetData( aPatternInd, aInputInd, aValue );
+  m_pInputTrainSet->SetData( aPatternInd, aInputInd, aValue );
 }
 //______________________________________________________________________________
 void TJetNet::SetOutputTrainSet( Int_t aPatternInd, Int_t aOutputInd, Double_t aValue )
 {
   // Changes the value of the cell corresponding to unit aInputInd in pattern aPatternInd into OUTPUT TRAIN set
-  mpOutputTrainSet->SetData( aPatternInd, aOutputInd, aValue );
+  m_pOutputTrainSet->SetData( aPatternInd, aOutputInd, aValue );
 }
 //______________________________________________________________________________
 void TJetNet::SetInputTestSet( Int_t aPatternInd, Int_t aInputInd, Double_t aValue )
 {
   // Changes the value of the cell corresponding to unit aInputInd in pattern aPatternInd into INPUT TEST set
-  mpInputTestSet->SetData( aPatternInd, aInputInd, aValue );
+  m_pInputTestSet->SetData( aPatternInd, aInputInd, aValue );
 }
 //______________________________________________________________________________
 Double_t TJetNet::GetOutputTrainSet( Int_t aPatternInd, Int_t aOutputInd )
 {
   // Returns the value of the cell corresponding to unit aInputInd in pattern aPatternInd into OUTPUT TRAIN set
-  return mpOutputTrainSet->GetData( aPatternInd, aOutputInd );
+  return m_pOutputTrainSet->GetData( aPatternInd, aOutputInd );
 }
 //______________________________________________________________________________
 void TJetNet::SetEventWeightTrainSet( Int_t aPatternInd, Double_t aValue )
 {
-  mpInputTrainSet->SetEventWeight(aPatternInd,aValue);
+  m_pInputTrainSet->SetEventWeight(aPatternInd,aValue);
 }
 //______________________________________________________________________________
 
 void TJetNet::SetEventWeightTestSet( Int_t aPatternInd, Double_t aValue )
 {
-  mpInputTestSet->SetEventWeight(aPatternInd,aValue);
+  m_pInputTestSet->SetEventWeight(aPatternInd,aValue);
 }
 //______________________________________________________________________________
 Double_t TJetNet::GetInputTestSet( Int_t aPatternInd, Int_t aInputInd )
 {
   // Returns the value of the cell corresponding to unit aInputInd in pattern aPatternInd into INPUT TEST set
-  return mpInputTestSet->GetData( aPatternInd, aInputInd );
+  return m_pInputTestSet->GetData( aPatternInd, aInputInd );
 }
 //______________________________________________________________________________
 Double_t TJetNet::GetOutputTestSet( Int_t aPatternInd, Int_t aOutputInd )
 {
   // Returns the value of the cell corresponding to unit aInputInd in pattern aPatternInd into OUTPUT TEST set
-  return mpOutputTestSet->GetData( aPatternInd, aOutputInd );
+  return m_pOutputTestSet->GetData( aPatternInd, aOutputInd );
 }
 //______________________________________________________________________________
 void  TJetNet::SaveDataAscii( TString aFileName )
@@ -787,30 +782,30 @@ void  TJetNet::SaveDataAscii( TString aFileName )
   out.open( aFileName );
 
   //Write the number of layers, including the input and output
-  out << mLayerCount << std::endl;
+  out << m_LayerCount << std::endl;
 
   // Write into the file the number of units in input, hidden and output layers  
-  for ( i = 0; i < mLayerCount; i++ ) out << mpLayers[ i ] << " ";
+  for ( i = 0; i < m_LayerCount; i++ ) out << m_pLayers[ i ] << " ";
   out << std::endl;
 
   // Write the size of Train and Test sets 
-  out << mTrainSetCnt << " " << mTestSetCnt << std::endl;
+  out << m_TrainSetCnt << " " << m_TestSetCnt << std::endl;
 
   // Dump the Train set : Input1 Input2 ... InputN Output1 Output2 ... OutputN
-  for ( i = 0; i < mTrainSetCnt; i++ )
+  for ( i = 0; i < m_TrainSetCnt; i++ )
   {
     out << GetInputTrainSet( i, 0 );
-    for( j = 1; j < mpLayers[ 0 ]; j++ ) out << " " << GetInputTrainSet( i, j );
-    for( j = 0; j < mpLayers[ mLayerCount - 1 ]; j++ ) out << " " << GetOutputTrainSet( i, j );
+    for( j = 1; j < m_pLayers[ 0 ]; j++ ) out << " " << GetInputTrainSet( i, j );
+    for( j = 0; j < m_pLayers[ m_LayerCount - 1 ]; j++ ) out << " " << GetOutputTrainSet( i, j );
     out << std::endl;
   }
 
  // Dump the Test set : Input1 Input2 ... InputN Output1 Output2 ... OutputN
-  for ( i = 0; i < mTestSetCnt; i++ )
+  for ( i = 0; i < m_TestSetCnt; i++ )
   {
     out << GetInputTestSet( i, 0 );
-    for( j = 1; j < mpLayers[ 0 ]; j++ ) out << " " << GetInputTestSet( i, j );
-    for( j = 0; j < mpLayers[ mLayerCount - 1 ]; j++ ) out << " " << GetOutputTestSet( i, j );
+    for( j = 1; j < m_pLayers[ 0 ]; j++ ) out << " " << GetInputTestSet( i, j );
+    for( j = 0; j < m_pLayers[ m_LayerCount - 1 ]; j++ ) out << " " << GetOutputTestSet( i, j );
     out << std::endl;
   }
   // Close the file
@@ -831,54 +826,54 @@ void  TJetNet::LoadDataAscii( TString aFileName )
   bFlag = Bool_t( in.is_open() );
   if ( in )
   { 
-    in >> mLayerCount;
-    if( mDebug ){ std::cout << "Layers Count Set to " << mLayerCount << std::endl;}
+    in >> m_LayerCount;
+    if( m_Debug ){ std::cout << "Layers Count Set to " << m_LayerCount << std::endl;}
     i = 0;
 
-    delete [] mpLayers;
-    mpLayers = new Int_t[ mLayerCount ];
+    delete [] m_pLayers;
+    m_pLayers = new Int_t[ m_LayerCount ];
 
-    if( mDebug ){ std::cout << "Updating the Layers Nodes Counters..." << std::endl; }
-    while( ( i < mLayerCount ) && ( !in.eof() ) )
+    if( m_Debug ){ std::cout << "Updating the Layers Nodes Counters..." << std::endl; }
+    while( ( i < m_LayerCount ) && ( !in.eof() ) )
     {
-      in >> mpLayers[ i ];
-      if( mDebug ){ std::cout << "Layer [ " << i + 1 << " ] has " << mpLayers[ i ] << " units" << std::endl; }
+      in >> m_pLayers[ i ];
+      if( m_Debug ){ std::cout << "Layer [ " << i + 1 << " ] has " << m_pLayers[ i ] << " units" << std::endl; }
       i++;
     }
 
-    mInputDim = mpLayers[ 0 ];
-    mOutputDim = mpLayers[ mLayerCount - 1 ];
-    mHiddenLayerDim = mLayerCount-2;
+    m_InputDim = m_pLayers[ 0 ];
+    m_OutputDim = m_pLayers[ m_LayerCount - 1 ];
+    m_HiddenLayerDim = m_LayerCount-2;
 
     //Get the patterns count per line 
-    iPatternLength = mInputDim + mOutputDim;
-    if( mDebug ){ std::cout << "Patterns per line = " << iPatternLength << std::endl; } 
-    in >> mTrainSetCnt;
-    if( mDebug ){ std::cout << "Train Set has " << mTrainSetCnt << " patterns." << std::endl; }
-    in >> mTestSetCnt;
-    if( mDebug ){ std::cout << "Test Set has " << mTestSetCnt << " patterns." << std::endl; }
+    iPatternLength = m_InputDim + m_OutputDim;
+    if( m_Debug ){ std::cout << "Patterns per line = " << iPatternLength << std::endl; } 
+    in >> m_TrainSetCnt;
+    if( m_Debug ){ std::cout << "Train Set has " << m_TrainSetCnt << " patterns." << std::endl; }
+    in >> m_TestSetCnt;
+    if( m_Debug ){ std::cout << "Test Set has " << m_TestSetCnt << " patterns." << std::endl; }
     
-    delete mpInputTestSet;
-    delete mpInputTrainSet;
-    delete mpOutputTestSet;
-    delete mpOutputTrainSet;
+    delete m_pInputTestSet;
+    delete m_pInputTrainSet;
+    delete m_pOutputTestSet;
+    delete m_pOutputTrainSet;
     
-    mpInputTrainSet  = new TNeuralDataSet( mTrainSetCnt, GetInputDim() );
-    mpInputTestSet   = new TNeuralDataSet( mTestSetCnt, GetInputDim() );
-    mpOutputTrainSet = new TNeuralDataSet( mTrainSetCnt, GetOutputDim() );
-    mpOutputTestSet  = new TNeuralDataSet( mTestSetCnt, GetOutputDim() );
+    m_pInputTrainSet  = new TNeuralDataSet( m_TrainSetCnt, GetInputDim() );
+    m_pInputTestSet   = new TNeuralDataSet( m_TestSetCnt, GetInputDim() );
+    m_pOutputTrainSet = new TNeuralDataSet( m_TrainSetCnt, GetOutputDim() );
+    m_pOutputTestSet  = new TNeuralDataSet( m_TestSetCnt, GetOutputDim() );
 
     i = 0;
     j = 0;
     
-    while( ( i < ( mTrainSetCnt + mTestSetCnt ) ) && ( !in.eof() ) )
+    while( ( i < ( m_TrainSetCnt + m_TestSetCnt ) ) && ( !in.eof() ) )
     {
       j = 0;
       while( ( j < iPatternLength ) && ( !in.eof() ) )
       {
-	if( i < mTrainSetCnt )
+	if( i < m_TrainSetCnt )
 	{
-	  if( j < mInputDim )
+	  if( j < m_InputDim )
 	  {
 	    //Train Input Set
 	    in >> tmp;
@@ -887,15 +882,15 @@ void  TJetNet::LoadDataAscii( TString aFileName )
 	  else 
 	  {
 	    //Train Output Set 
-	    m = j - mInputDim;
+	    m = j - m_InputDim;
 	    in >> tmp;
 	    SetOutputTrainSet( i, m, tmp );
 	  }
 	}
 	else
 	{
-	  l = i - mTrainSetCnt;
-	  if( j < mInputDim )
+	  l = i - m_TrainSetCnt;
+	  if( j < m_InputDim )
 	    {
 	      //Test Input Set
 	      in >> tmp;
@@ -904,7 +899,7 @@ void  TJetNet::LoadDataAscii( TString aFileName )
           else
 	    {
 	      //Test Output Set
-	      m = j - mInputDim;
+	      m = j - m_InputDim;
 	      in >> tmp;
 	      SetOutputTestSet( l, m, tmp );
 	    }
@@ -993,7 +988,7 @@ void TJetNet::SelectiveFields( Int_t aLayerA, Int_t aNodeA1, Int_t aNodeA2, Int_
   // JetNet Selective Fields
   Int_t tmp, i1, i2, j1, j2;
 
-  if( ( aLayerA > 0 ) && ( aLayerA < mLayerCount ) )
+  if( ( aLayerA > 0 ) && ( aLayerA < m_LayerCount ) )
   {
     i1 = TMath::Abs( aNodeA1 ); 
     i2 = TMath::Abs( aNodeA2 );
@@ -1014,8 +1009,8 @@ void TJetNet::SelectiveFields( Int_t aLayerA, Int_t aNodeA1, Int_t aNodeA2, Int_
       i2 = i1;
     }//if
 
-    if( ( i1 < mpLayers[ aLayerA ] ) && ( i2 < mpLayers[ aLayerA ] ) && 
-	( j1 < mpLayers[ aLayerA - 1 ] ) && ( j2 < mpLayers[ aLayerA - 1 ] ) )
+    if( ( i1 < m_pLayers[ aLayerA ] ) && ( i2 < m_pLayers[ aLayerA ] ) && 
+	( j1 < m_pLayers[ aLayerA - 1 ] ) && ( j2 < m_pLayers[ aLayerA - 1 ] ) )
     {
       JNSEFI( aLayerA, i1, i2, j1, j2, aSwitch );
     }//if
@@ -1027,25 +1022,25 @@ void TJetNet::Reinitialize( void )
   //Initializes the settings of the network
     Int_t i;
     
-   mLayerCount = JNDAT1.MSTJN[ 0 ]; // Set the number of layers
+   m_LayerCount = JNDAT1.MSTJN[ 0 ]; // Set the number of layers
    
-   delete [] mpLayers;
-   mpLayers = new Int_t[ mLayerCount ];
+   delete [] m_pLayers;
+   m_pLayers = new Int_t[ m_LayerCount ];
    
   // Set the number of nodes for each layer
-  for( i = 0; i < mLayerCount; i++ )
+  for( i = 0; i < m_LayerCount; i++ )
   {
-    mpLayers[ i ] = JNDAT1.MSTJN[ 9 + i ]; 
+    m_pLayers[ i ] = JNDAT1.MSTJN[ 9 + i ]; 
   }
   
-  mpInputTrainSet  = new TNeuralDataSet( mTrainSetCnt, GetInputDim() );
-  mpInputTestSet   = new TNeuralDataSet( mTestSetCnt, GetInputDim() );
-  mpOutputTrainSet = new TNeuralDataSet( mTrainSetCnt, GetOutputDim() );
-  mpOutputTestSet  = new TNeuralDataSet( mTestSetCnt, GetOutputDim() );
+  m_pInputTrainSet  = new TNeuralDataSet( m_TrainSetCnt, GetInputDim() );
+  m_pInputTestSet   = new TNeuralDataSet( m_TestSetCnt, GetInputDim() );
+  m_pOutputTrainSet = new TNeuralDataSet( m_TrainSetCnt, GetOutputDim() );
+  m_pOutputTestSet  = new TNeuralDataSet( m_TestSetCnt, GetOutputDim() );
 
-  mInputDim = mpLayers[ 0 ];
-  mOutputDim = mpLayers[ mLayerCount - 1 ];
-  mHiddenLayerDim = mLayerCount-2;
+  m_InputDim = m_pLayers[ 0 ];
+  m_OutputDim = m_pLayers[ m_LayerCount - 1 ];
+  m_HiddenLayerDim = m_LayerCount-2;
 
 
 }  
@@ -1053,23 +1048,23 @@ void TJetNet::Reinitialize( void )
 void TJetNet::Normalize( void )
 {
   // Normilizes Inputs (both test and train)
-  mpInputTrainSet->Normalize();
-  mpInputTestSet->Normalize();
+  m_pInputTrainSet->Normalize();
+  m_pInputTestSet->Normalize();
 }
 //______________________________________________________________________________
 void TJetNet::Randomize( void )
 {
   // Randomizes Inputs and Outputs of both train and test sets
-  mpInputTrainSet->Randomize();
-  mpInputTestSet->Randomize();
-  mpOutputTrainSet->Randomize();
-  mpOutputTestSet->Randomize();
+  m_pInputTrainSet->Randomize();
+  m_pInputTestSet->Randomize();
+  m_pOutputTrainSet->Randomize();
+  m_pOutputTestSet->Randomize();
 }
 //______________________________________________________________________________
 Int_t TJetNet::GetUnitCount( Int_t aLayer )
 { 
   // Returns the number of the units in specfic layer
-  if( ( aLayer > -1 ) && ( aLayer < mLayerCount ) ) 
+  if( ( aLayer > -1 ) && ( aLayer < m_LayerCount ) ) 
     return JNDAT1.MSTJN[ 9 + aLayer ]; 
 }
 //______________________________________________________________________________
@@ -1077,65 +1072,65 @@ void TJetNet::SetUpdatesPerEpoch( Int_t aValue )
 { 
   // Sets the number of the updates per epoch
   JNDAT1.MSTJN[ 8 ] = aValue; 
-  if( !mInitLocked ) this->Init();
+  if( !m_InitLocked ) this->Init();
 }
 //______________________________________________________________________________
 void TJetNet::SetUpdatingProcedure( Int_t aValue )
 {  
   // Set specific weights update function
   JNDAT1.MSTJN[ 4 ] = aValue; 
-  if( !mInitLocked ) this->Init();
+  if( !m_InitLocked ) this->Init();
 }
 //______________________________________________________________________________
 void TJetNet::SetErrorMeasure( Int_t aValue )
 {  
   JNDAT1.MSTJN[ 3 ] = aValue; 
-  if( !mInitLocked ) this->Init();
+  if( !m_InitLocked ) this->Init();
 }
 //______________________________________________________________________________
 void TJetNet::SetActivationFunction( Int_t aValue )
 { 
   // Set the kind of activation function used
   JNDAT1.MSTJN[ 2 ] = aValue; 
-  if( !mInitLocked ) this->Init();
+  if( !m_InitLocked ) this->Init();
 }
 //______________________________________________________________________________
 void TJetNet::SetActivationFunction( Int_t aValue, Int_t layerN )//layer 0 is first hidden layer
 { 
   // Set the kind of activation function used
   JNDAT2.IGFN[ layerN ] = aValue; 
-  if( !mInitLocked ) this->Init();
+  if( !m_InitLocked ) this->Init();
 }
 //______________________________________________________________________________
 void TJetNet::SetPatternsPerUpdate( Int_t aValue )
 { 
   JNDAT1.MSTJN[ 1 ] = aValue; 
-  if( !mInitLocked ) this->Init();
+  if( !m_InitLocked ) this->Init();
 }
 //______________________________________________________________________________
 void TJetNet::SetLearningRate( Double_t aValue )
 { 
   // Change the Learning Rate
   JNDAT1.PARJN[ 0 ] = aValue; 
-  if( !mInitLocked ) this->Init();
+  if( !m_InitLocked ) this->Init();
 }
 //______________________________________________________________________________
 void TJetNet::SetMomentum( Double_t aValue )
 { 
   JNDAT1.PARJN[ 1 ] = aValue; 
-  if( !mInitLocked ) this->Init();
+  if( !m_InitLocked ) this->Init();
 }
 //______________________________________________________________________________
 void TJetNet::SetInitialWeightsWidth( Double_t aValue )
 { 
   JNDAT1.PARJN[ 3 ] = aValue; 
-  if( !mInitLocked ) this->Init();
+  if( !m_InitLocked ) this->Init();
 }
 //______________________________________________________________________________
 void TJetNet::SetLearningRateDecrease( Double_t aValue )
 { 
   JNDAT1.PARJN[ 10 ] = aValue; 
-  if( !mInitLocked ) this->Init();
+  if( !m_InitLocked ) this->Init();
 }
 //______________________________________________________________________________
 void TJetNet::SetPottsUnits(Int_t aValue)
@@ -1145,7 +1140,7 @@ void TJetNet::SetPottsUnits(Int_t aValue)
 //_____________________________________________________________________________
 void TJetNet::NormalizeOutput(bool isTrue)
 {
-  mNormalizeOutput=isTrue;
+  m_NormalizeOutput=isTrue;
 }
 //______________________________________________________________________________
 Int_t TJetNet::GetUpdatesPerEpoch( void )
@@ -1232,15 +1227,15 @@ void TJetNet::Shuffle( Bool_t aShuffleTrainSet, Bool_t aShuffleTestSet )
   if ( aShuffleTrainSet )
   {
     
-    mpInputTrainSet->Shuffle( Seed );
-    mpOutputTrainSet->Shuffle( Seed );
+    m_pInputTrainSet->Shuffle( Seed );
+    m_pOutputTrainSet->Shuffle( Seed );
   }
   //Shuffle Test Set
   if ( aShuffleTestSet )
   {
     Seed = ts.GetSec();
-    mpInputTestSet->Shuffle( Seed );
-    mpOutputTestSet->Shuffle( Seed );
+    m_pInputTestSet->Shuffle( Seed );
+    m_pOutputTestSet->Shuffle( Seed );
   }
 
   return;
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/TJetNet.h b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/TJetNet.h
index 1fae718e19eceec3d7a079dbccfa04545b1574f2..b68b839ce36d0a3d6e2a5810811d144ecff6401f 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/TJetNet.h
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/TJetNet.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
 */
 
 /* 
@@ -12,8 +12,8 @@
 
 
 
-#ifndef __TJETNET_
-#define __TJETNET_
+#ifndef PIXELCALIBALGS_TJETNET_H
+#define PIXELCALIBALGS_TJETNET_H
 
 //______________________________________________________________________________
 //
@@ -49,12 +49,12 @@ class TJetNet : public TObject
   
   void Print( void );
   
-  Int_t GetTrainSetCnt( void ) const { return mTrainSetCnt; };
-  Int_t GetTestSetCnt( void ) const { return mTestSetCnt; };
-  Int_t GetInputDim( void ) const { return mpLayers[ 0 ]; };
+  Int_t GetTrainSetCnt( void ) const { return m_TrainSetCnt; };
+  Int_t GetTestSetCnt( void ) const { return m_TestSetCnt; };
+  Int_t GetInputDim( void ) const { return m_pLayers[ 0 ]; };
   Int_t GetHiddenLayerDim( void ) const { return mHiddenLayerDim; };
-  Int_t GetHiddenLayerSize(Int_t number) const { return mpLayers[ number ]; };
-  Int_t GetOutputDim( void ) const { return mpLayers[ mLayerCount - 1 ]; };
+  Int_t GetHiddenLayerSize(Int_t number) const { return m_pLayers[ number ]; };
+  Int_t GetOutputDim( void ) const { return m_pLayers[ m_LayerCount - 1 ]; };
 
   void SetInputTrainSet( Int_t aPatternInd, Int_t aInputInd, Double_t aValue );
   void SetOutputTrainSet( Int_t aPatternInd, Int_t aOutputInd, Double_t aValue );
@@ -75,8 +75,8 @@ class TJetNet : public TObject
   Double_t GetWeight( Int_t aLayerInd, Int_t aNodeInd, Int_t aConnectedNodeInd ) const; 
   Double_t GetThreshold( Int_t aLayerInd, Int_t aNodeInd) const;
 
-  Int_t GetEpochs( void ) { return mEpochs; };
-  void SetEpochs( const Int_t aEpochs ) { mEpochs = aEpochs; mCurrentEpoch = 0; };
+  Int_t GetEpochs( void ) { return m_Epochs; };
+  void SetEpochs( const Int_t aEpochs ) { m_Epochs = aEpochs; m_CurrentEpoch = 0; };
   void Init( void );
 
   Double_t Train( void );
@@ -102,7 +102,7 @@ class TJetNet : public TObject
 
   void writeNetworkInfo(Int_t typeOfInfo = 0);
 
-  Int_t GetLayerCount( void ){ return mLayerCount; };
+  Int_t GetLayerCount( void ){ return m_LayerCount; };
   //Number of layers in NN
   Int_t GetUnitCount( Int_t aLayer );
   //Number of units in NN  
@@ -134,8 +134,8 @@ class TJetNet : public TObject
     Double_t GetLearningRateDecrease( void );
     Int_t GetPottsUnits();
     
-    void LockInit( void ){ mInitLocked = kTRUE; };
-    void UnlockInit( void ){ mInitLocked = kFALSE; };
+    void LockInit( void ){ m_InitLocked = kTRUE; };
+    void UnlockInit( void ){ m_InitLocked = kFALSE; };
     Int_t GetMSTJN( Int_t aIndex );
     Double_t GetPARJN( Int_t aIndex );
     void SetMSTJN( Int_t aIndex, Int_t aValue );
@@ -167,27 +167,27 @@ private:
 
 
 
-  TActivationFunction menActFunction;
+  TActivationFunction m_enActFunction;
 
-  Int_t  mLayerCount; // Number of Layers (including the input and output)
-  Int_t* mpLayers; //! Array which contains the number of units in each layer 
+  Int_t  m_LayerCount; // Number of Layers (including the input and output)
+  Int_t* m_pLayers; //! Array which contains the number of units in each layer 
 
-  TNeuralDataSet* mpInputTrainSet;
-  TNeuralDataSet* mpOutputTrainSet;
-  TNeuralDataSet* mpInputTestSet;
-  TNeuralDataSet* mpOutputTestSet;
+  TNeuralDataSet* m_pInputTrainSet;
+  TNeuralDataSet* m_pOutputTrainSet;
+  TNeuralDataSet* m_pInputTestSet;
+  TNeuralDataSet* m_pOutputTestSet;
 
-  Int_t mTrainSetCnt, mTestSetCnt; // Size of Train and Test set
+  Int_t m_TrainSetCnt, m_TestSetCnt; // Size of Train and Test set
 
-  Int_t mInputDim; // Number of the elements in intput layer
-  Int_t mHiddenLayerDim; // Number of Hidden Layers
-  Int_t mOutputDim; // Number of outputs
-  Int_t mEpochs;    // Epochs
-  Int_t mCurrentEpoch;    // Current epoch
-  Bool_t mDebug; // Debug Flag
-  Bool_t mIsInitialized;
-  Bool_t mInitLocked;
-  Bool_t mNormalizeOutput;
+  Int_t m_InputDim; // Number of the elements in intput layer
+  Int_t m_HiddenLayerDim; // Number of Hidden Layers
+  Int_t m_OutputDim; // Number of outputs
+  Int_t m_Epochs;    // Epochs
+  Int_t m_CurrentEpoch;    // Current epoch
+  Bool_t m_Debug; // Debug Flag
+  Bool_t m_IsInitialized;
+  Bool_t m_InitLocked;
+  Bool_t m_NormalizeOutput;
 
 
   ClassDef( TJetNet, 1 )
@@ -196,23 +196,23 @@ private:
 inline void TJetNet::SetOutputTestSet( Int_t aPatternInd, Int_t aOutputInd, Double_t aValue )
 {
   // Changes the value of the cell corresponding to unit aInputInd in pattern aPatternInd into OUTPUT TEST set
-  mpOutputTestSet->SetData( aPatternInd, aOutputInd, aValue );
+  m_pOutputTestSet->SetData( aPatternInd, aOutputInd, aValue );
 }
 //______________________________________________________________________________
 inline Double_t TJetNet::GetInputTrainSet( Int_t aPatternInd, Int_t aInputInd )
 {
   // Returns the value of the cell corresponding to unit aInputInd in pattern aPatternInd into INPUT TRAIN set
-  return mpInputTrainSet->GetData( aPatternInd, aInputInd );
+  return m_pInputTrainSet->GetData( aPatternInd, aInputInd );
 }
 //______________________________________________________________________________
 inline Double_t TJetNet::GetEventWeightTrainSet( Int_t aPatternInd )
 {
-  return mpInputTrainSet->GetEventWeight( aPatternInd);
+  return m_pInputTrainSet->GetEventWeight( aPatternInd);
 }
 //______________________________________________________________________________
 inline Double_t TJetNet::GetEventWeightTestSet( Int_t aPatternInd )
 {
-  return mpInputTestSet->GetEventWeight( aPatternInd);
+  return m_pInputTestSet->GetEventWeight( aPatternInd);
 }
 
 #endif
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/TTrainedNetwork.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/TTrainedNetwork.cxx
index bc1390dcf30621d00485327f97e9c71fc74b10df..ab3922e10fe143d2f30efffdb3d5ef158140217b 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/TTrainedNetwork.cxx
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/TTrainedNetwork.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 "TTrainedNetwork.h"
@@ -11,13 +11,13 @@
 using namespace std;
 
 TTrainedNetwork::TTrainedNetwork()
+  : m_nInput(0),
+    m_nHidden(0),
+    m_nOutput(0),
+    m_ActivationFunction(1),
+    m_LinearOutput(false),
+    m_NormalizeOutput (false)
 {
-  mnInput=0;
-  mnHidden=0;
-  mnOutput=0;
-  mActivationFunction=1;
-  mLinearOutput=false;
-  mNormalizeOutput=false;
 }
 
 TTrainedNetwork::TTrainedNetwork(Int_t nInput,
@@ -29,23 +29,22 @@ TTrainedNetwork::TTrainedNetwork(Int_t nInput,
                                  Int_t activationFunction,
                                  bool linearOutput,
                                  bool normalizeOutput)
+  : m_nInput (nInput),
+    m_nHidden (nHidden),
+    m_nOutput (nOutput),
+    m_nHiddenLayerSize (nHiddenLayerSize),
+    m_ThresholdVectors (thresholdVectors),
+    m_WeightMatrices (weightMatrices),
+    m_ActivationFunction (activationFunction),
+    m_LinearOutput (linearOutput),
+    m_NormalizeOutput (normalizeOutput)
 {
-
-  mnInput=nInput;
-  mnHidden=nHidden;
-  mnOutput=nOutput;
-  mnHiddenLayerSize=nHiddenLayerSize;
-  mThresholdVectors=thresholdVectors;
-  mWeightMatrices=weightMatrices;
-  mActivationFunction=activationFunction;
-  mLinearOutput=linearOutput;
-  mNormalizeOutput=normalizeOutput;
 }
 
 TTrainedNetwork::~TTrainedNetwork()
 {
-  std::vector<TVectorD*>::const_iterator vectBegin=mThresholdVectors.begin();
-  std::vector<TVectorD*>::const_iterator vectEnd=mThresholdVectors.end();
+  std::vector<TVectorD*>::const_iterator vectBegin=m_ThresholdVectors.begin();
+  std::vector<TVectorD*>::const_iterator vectEnd=m_ThresholdVectors.end();
 
   for (std::vector<TVectorD*>::const_iterator vectIter=vectBegin;
        vectIter!=vectEnd;
@@ -54,8 +53,8 @@ TTrainedNetwork::~TTrainedNetwork()
     delete *vectIter;
   }
 
-  std::vector<TMatrixD*>::const_iterator matrixBegin=mWeightMatrices.begin();
-  std::vector<TMatrixD*>::const_iterator matrixEnd=mWeightMatrices.end();
+  std::vector<TMatrixD*>::const_iterator matrixBegin=m_WeightMatrices.begin();
+  std::vector<TMatrixD*>::const_iterator matrixEnd=m_WeightMatrices.end();
 
   for (std::vector<TMatrixD*>::const_iterator matrixIter=matrixBegin;
        matrixIter!=matrixEnd;
@@ -70,8 +69,8 @@ void TTrainedNetwork::setNewWeights(std::vector<TVectorD*> & thresholdVectors,
 				    std::vector<TMatrixD*> & weightMatrices)
 {
 
-  std::vector<TVectorD*>::const_iterator vectBegin=mThresholdVectors.begin();
-  std::vector<TVectorD*>::const_iterator vectEnd=mThresholdVectors.end();
+  std::vector<TVectorD*>::const_iterator vectBegin=m_ThresholdVectors.begin();
+  std::vector<TVectorD*>::const_iterator vectEnd=m_ThresholdVectors.end();
 
   for (std::vector<TVectorD*>::const_iterator vectIter=vectBegin;
        vectIter!=vectEnd;
@@ -80,8 +79,8 @@ void TTrainedNetwork::setNewWeights(std::vector<TVectorD*> & thresholdVectors,
     delete *vectIter;
   }
 
-  std::vector<TMatrixD*>::const_iterator matrixBegin=mWeightMatrices.begin();
-  std::vector<TMatrixD*>::const_iterator matrixEnd=mWeightMatrices.end();
+  std::vector<TMatrixD*>::const_iterator matrixBegin=m_WeightMatrices.begin();
+  std::vector<TMatrixD*>::const_iterator matrixEnd=m_WeightMatrices.end();
 
   for (std::vector<TMatrixD*>::const_iterator matrixIter=matrixBegin;
        matrixIter!=matrixEnd;
@@ -90,11 +89,11 @@ void TTrainedNetwork::setNewWeights(std::vector<TVectorD*> & thresholdVectors,
     delete *matrixIter;
   }
 
-  mThresholdVectors.clear();
-  mWeightMatrices.clear();
+  m_ThresholdVectors.clear();
+  m_WeightMatrices.clear();
 
-  mThresholdVectors=thresholdVectors;
-  mWeightMatrices=weightMatrices;
+  m_ThresholdVectors=thresholdVectors;
+  m_WeightMatrices=weightMatrices;
 
 }
 
@@ -104,21 +103,21 @@ std::vector<Double_t>  TTrainedNetwork::calculateOutputValues(std::vector<Double
   std::vector<Double_t> result;
 
   //now calculate the value using:
-  TVectorD** resultVector=new TVectorD*[mnHidden+1];
+  TVectorD** resultVector=new TVectorD*[m_nHidden+1];
   
 
-  if ((int)input.size()!=mnInput)
+  if ((int)input.size()!=m_nInput)
   {
-    std::cout << " Input size: " << input.size() << " doesn't match with network: " << mnInput << std::endl;
+    std::cout << " Input size: " << input.size() << " doesn't match with network: " << m_nInput << std::endl;
     delete[] resultVector;
     return result;
   }
   
-  for (Int_t o=0;o<mnHidden+1;++o)
+  for (Int_t o=0;o<m_nHidden+1;++o)
   {
 
-    int sizeActualLayer=(o<mnHidden)?mnHiddenLayerSize[o]:mnOutput;
-//    int sizePreviousLayer=(o==0)?mnInput:mnHiddenLayerSize[o-1];
+    int sizeActualLayer=(o<m_nHidden)?m_nHiddenLayerSize[o]:m_nOutput;
+//    int sizePreviousLayer=(o==0)?m_nInput:m_nHiddenLayerSize[o-1];
 
     resultVector[o]=new TVectorD(sizeActualLayer);
     
@@ -127,20 +126,20 @@ std::vector<Double_t>  TTrainedNetwork::calculateOutputValues(std::vector<Double
       Double_t nodeValue=0.;
       if (o==0)
       {
-        for (Int_t p=0;p<mnInput;++p)
+        for (Int_t p=0;p<m_nInput;++p)
         {
-          nodeValue+=mWeightMatrices[o]->operator() (p,s)*input[p];
+          nodeValue+=m_WeightMatrices[o]->operator() (p,s)*input[p];
         }
       }
       else
       {
-        for (Int_t p=0;p<mnHiddenLayerSize[o-1];++p)
+        for (Int_t p=0;p<m_nHiddenLayerSize[o-1];++p)
         {
-          nodeValue+=mWeightMatrices[o]->operator() (p,s)*resultVector[o-1]->operator()(p);
+          nodeValue+=m_WeightMatrices[o]->operator() (p,s)*resultVector[o-1]->operator()(p);
         }
       }
-      nodeValue+=mThresholdVectors[o]->operator() (s);
-      if (o!=mnHidden || (!mLinearOutput))
+      nodeValue+=m_ThresholdVectors[o]->operator() (s);
+      if (o!=m_nHidden || (!m_LinearOutput))
       {
         resultVector[o]->operator()(s) = sigmoid(nodeValue);
       }
@@ -153,30 +152,30 @@ std::vector<Double_t>  TTrainedNetwork::calculateOutputValues(std::vector<Double
   
   double sumLastLayer=0;
 
-  if (mNormalizeOutput)
+  if (m_NormalizeOutput)
   {
-    for (Int_t i=0;i<mnOutput;i++)
+    for (Int_t i=0;i<m_nOutput;i++)
     {
-      sumLastLayer+=resultVector[mnHidden]->operator()(i);
+      sumLastLayer+=resultVector[m_nHidden]->operator()(i);
     }
   }
   
 
-  for (Int_t i=0;i<mnOutput;i++)
+  for (Int_t i=0;i<m_nOutput;i++)
   {
-    if (!mNormalizeOutput)
+    if (!m_NormalizeOutput)
     {
-      result.push_back(resultVector[mnHidden]->operator()(i));
+      result.push_back(resultVector[m_nHidden]->operator()(i));
     }
     else
     {
-      result.push_back(resultVector[mnHidden]->operator()(i)/sumLastLayer);
+      result.push_back(resultVector[m_nHidden]->operator()(i)/sumLastLayer);
     }
   }
 
-  for (Int_t o=0;o<mnHidden+1;++o)
+  for (Int_t o=0;o<m_nHidden+1;++o)
   {
-    //int sizeActualLayer=(o<mnHidden)?mnHiddenLayerSize[o]:mnOutput;
+    //int sizeActualLayer=(o<m_nHidden)?m_nHiddenLayerSize[o]:m_nOutput;
     delete resultVector[o];
   }
   delete[] resultVector;
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/TTrainedNetwork.h b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/TTrainedNetwork.h
index 7f41505357b28c5d3f9041ec21cfa5cbe6dbcf59..5a128bcf4e644a9a4c3267ddc60073528fbb091d 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/TTrainedNetwork.h
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/TTrainedNetwork.h
@@ -1,9 +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
 */
 
-#ifndef __TTrainedNetwork_
-#define __TTrainedNetwork_
+#ifndef PIXELCALIBALGS_TTRAINEDNETWORK_H
+#define PIXELCALIBALGS_TTRAINEDNETWORK_H
 
 #include "TObject.h"
 #include "TMatrixD.h"
@@ -39,44 +39,44 @@ class TTrainedNetwork : public TObject
   void setNewWeights(std::vector<TVectorD*> & thresholdVectors,
 		     std::vector<TMatrixD*> & weightMatrices);
 
-  Int_t getnInput() const {return mnInput;};
+  Int_t getnInput() const {return m_nInput;};
 
-  Int_t getnHidden() const {return mnHidden;};
+  Int_t getnHidden() const {return m_nHidden;};
 
-  Int_t getnOutput() const {return mnOutput;};
+  Int_t getnOutput() const {return m_nOutput;};
 
-  const std::vector<Int_t> &  getnHiddenLayerSize() const {return mnHiddenLayerSize;};
+  const std::vector<Int_t> &  getnHiddenLayerSize() const {return m_nHiddenLayerSize;};
 
-  Int_t getActivationFunction() const {return mActivationFunction;};
+  Int_t getActivationFunction() const {return m_ActivationFunction;};
 
-  const std::vector<TVectorD*> & getThresholdVectors() const {return mThresholdVectors;};
+  const std::vector<TVectorD*> & getThresholdVectors() const {return m_ThresholdVectors;};
 
-  const std::vector<TMatrixD*> & weightMatrices() const {return mWeightMatrices;};
+  const std::vector<TMatrixD*> & weightMatrices() const {return m_WeightMatrices;};
 
   std::vector<Double_t> calculateOutputValues(std::vector<Double_t> & input) const;
 
-  bool getIfLinearOutput() const { return mLinearOutput; };
+  bool getIfLinearOutput() const { return m_LinearOutput; };
 
-  bool getIfNormalizeOutput() const { return mNormalizeOutput; };
+  bool getIfNormalizeOutput() const { return m_NormalizeOutput; };
 
  private:
 
-  Int_t mnInput;
-  Int_t mnHidden;
-  Int_t mnOutput;
+  Int_t m_nInput;
+  Int_t m_nHidden;
+  Int_t m_nOutput;
 
-  std::vector<Int_t> mnHiddenLayerSize;
-  //Int_t* mnHiddenLayerSize;
+  std::vector<Int_t> m_nHiddenLayerSize;
+  //Int_t* m_nHiddenLayerSize;
 
-  std::vector<TVectorD*> mThresholdVectors;
-  std::vector<TMatrixD*> mWeightMatrices;
-  //  TVectorD** mThresholdVectors;
-  //  TMatrixD** mWeightMatrices;
-  Int_t mActivationFunction;
+  std::vector<TVectorD*> m_ThresholdVectors;
+  std::vector<TMatrixD*> m_WeightMatrices;
+  //  TVectorD** m_ThresholdVectors;
+  //  TMatrixD** m_WeightMatrices;
+  Int_t m_ActivationFunction;
 
-  bool mLinearOutput;
+  bool m_LinearOutput;
 
-  bool mNormalizeOutput;
+  bool m_NormalizeOutput;
 
   Double_t sigmoid(Double_t x) const { return 1./(1.+exp(-2*x)); };
 
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/number/readOutput.h b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/number/readOutput.h
index 79bbc3de8b43cf632931a9b38f65614d2afe7f9a..2fb1b4a90c2e6463cb42b8404a26b7a7254b5339 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/number/readOutput.h
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/number/readOutput.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
 */
 
 //////////////////////////////////////////////////////////
@@ -62,9 +62,9 @@ public :
    virtual Int_t    Cut(Long64_t entry);
    virtual Int_t    GetEntry(Long64_t entry);
    virtual Long64_t LoadTree(Long64_t entry);
-   virtual void     Init(TTree *tree);
+           void     Init(TTree *tree);
    virtual void     Loop();
-   virtual Bool_t   Notify();
+           Bool_t   Notify();
    virtual void     Show(Long64_t entry = -1);
 };
 
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/validation/RIOs.h b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/validation/RIOs.h
index ae3ebdc3073506e19c14660349dab2d52545c8ca..ad2eae07a61a4edb7a211ab329a07c9ee9ca2f29 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/validation/RIOs.h
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/validation/RIOs.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
 */
 
 //////////////////////////////////////////////////////////
@@ -142,9 +142,9 @@ public :
    virtual Int_t    Cut(Long64_t entry);
    virtual Int_t    GetEntry(Long64_t entry);
    virtual Long64_t LoadTree(Long64_t entry);
-   virtual void     Init(TTree *tree);
+           void     Init(TTree *tree);
    virtual void     Loop();
-   virtual Bool_t   Notify();
+           Bool_t   Notify();
    virtual void     Show(Long64_t entry = -1);
 };
 
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/validation/writeNtuple.C b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/validation/writeNtuple.C
index 724dc0e713f9d963700e9e4b0d45523826295116..893b9c7cbfed3cae80a7f3b90b62fa1c53982c24 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/validation/writeNtuple.C
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/validation/writeNtuple.C
@@ -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
 */
 
 #define writeNtuple_cxx
@@ -806,7 +806,7 @@ void writeNtuple::Loop(  int nParticlesTraining, bool useTrackEstimate, TString
 	float PixTrkThetaI   = theta  ;
 
 
-	double eta;
+	double eta = 0;
         if( ClusterPixBarrelEC == 0  ){
 	  
           if(theta > M_PI / 2 ) theta -= M_PI;
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/validation/writeNtuple.h b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/validation/writeNtuple.h
index 0027d895e6a4d29bb1e2c503160cecad54e1da79..4d7c2151cd4a7b2b393427a363c989e1b2e08d36 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/validation/writeNtuple.h
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/validation/writeNtuple.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
 */
 
 //////////////////////////////////////////////////////////
@@ -140,13 +140,15 @@ public :
    TString  m_pathWeightsWithoutTracks;
 
    writeNtuple(TTree *tree=0);
+   writeNtuple (const writeNtuple&) = delete;
+   writeNtuple& operator= (const writeNtuple&) = delete;
    virtual ~writeNtuple();
    virtual Int_t    Cut(Long64_t entry);
    virtual Int_t    GetEntry(Long64_t entry);
    virtual Long64_t LoadTree(Long64_t entry);
-   virtual void     Init(TTree *tree);
+           void     Init(TTree *tree);
    virtual void     Loop(int nParticlesTraining, bool useTrackEstimate, TString outFileName);
-   virtual Bool_t   Notify();
+           Bool_t   Notify();
    virtual void     Show(Long64_t entry = -1);
    virtual void     FillClusterInfo(int clus);
    virtual void     InitializeVectors();
@@ -208,6 +210,10 @@ writeNtuple::writeNtuple(TTree *tree)
 */
 
 writeNtuple::writeNtuple(TTree *tree)
+  : m_PixChargeList(nullptr),
+    m_nPixelHits(0),
+    m_nTRTHits(0),
+    m_nSCTHits(0)
 {
 // if parameter tree is not specified (or zero), connect the file
 // used to generate this class and read the Tree.
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/DepletionDepthCalibration.h b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/DepletionDepthCalibration.h
index b2af81c62846e3a8e922344e2dc53327f6299a4b..7bbf5e308d25e524b1cb80a6dc384066586b2e9b 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/DepletionDepthCalibration.h
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/DepletionDepthCalibration.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 DepletionDepthCalibration_h
@@ -15,14 +15,16 @@ namespace PixelCalib{
 class DepletionDepthCalibration{
 
 public :
-	DepletionDepthCalibration(int layer = 0, std::string cosmicORbeam = "beam");
+	DepletionDepthCalibration(int layer = 0, const std::string& cosmicORbeam = "beam");
 	virtual ~DepletionDepthCalibration(){};
+        DepletionDepthCalibration (const DepletionDepthCalibration&) = delete;
+        DepletionDepthCalibration& operator= (const DepletionDepthCalibration&) = delete;
 	bool Fill(Int_t Layer,Int_t EtaModule, Int_t PhiModule,
 			Double_t ClusterSize, Double_t Eta);
 	int Analyze(std::ofstream &logfile);
 	int Write();
 	int Read();
-	void PlotValidation(TCanvas *c1, std::string outname);
+	void PlotValidation(TCanvas *c1, const std::string& outname);
 	
 private:
 
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/LorentzAngleCalibration.h b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/LorentzAngleCalibration.h
index eac4da1b8b866e66468629ceeb7b4aa4439e8517..e1cf22b40a5fd99cd474d749ca090ae1800faffc 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/LorentzAngleCalibration.h
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/LorentzAngleCalibration.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 LorentzAngleCalibration_h
@@ -15,14 +15,16 @@ namespace PixelCalib{
 class LorentzAngleCalibration{
 
 public :
-	LorentzAngleCalibration(int layer = 0, std::string cosmicORbeam="beam");
+	LorentzAngleCalibration(int layer = 0, const std::string& cosmicORbeam="beam");
 	virtual ~LorentzAngleCalibration(){};
+        LorentzAngleCalibration (const LorentzAngleCalibration&) = delete;
+        LorentzAngleCalibration& operator= (const LorentzAngleCalibration&) = delete;
 	bool Fill(Int_t Layer, Int_t EtaModule, Int_t PhiModule,
 			Double_t ClusterSize, Double_t Angle);
 	int Analyze(std::ofstream &logfile);
 	int Write();
 	int Read();
-	void PlotValidation(TCanvas *c1, std::string outname);
+	void PlotValidation(TCanvas *c1, const std::string& outname);
 	
 private:
 	int m_curLayer;
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/OfflineCalibrationLoop.h b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/OfflineCalibrationLoop.h
index 15bde0789c346631734b88048c59d515e8216efb..9778dd0bb810258243ebed1d5044362c8c016154 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/OfflineCalibrationLoop.h
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/OfflineCalibrationLoop.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 OfflineCalibrationLoop_h
@@ -22,14 +22,14 @@ class OfflineCalibrationLoop: public PixelNtupleTracks {
 
 public :
 	// Modified stuff
-	OfflineCalibrationLoop(std::string starting_tag,
-				std::string input,
-				std::string final_tag,
-				std::string collection = "Validation/CombinedInDetTracks");
+	OfflineCalibrationLoop(const std::string& starting_tag,
+                               const std::string& input,
+                               const std::string& final_tag,
+                               const std::string& collection = "Validation/CombinedInDetTracks");
 	virtual ~OfflineCalibrationLoop();
 	void Iterate(long maxentries);
-	void ReadHistoFile(std::string input);
-	void Analyze(std::string reference, std::string reference_tag);
+	void ReadHistoFile(const std::string& input);
+	void Analyze(const std::string& reference, const std::string& reference_tag);
 
 private:
 
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelChargeInterpolationHistograms.h b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelChargeInterpolationHistograms.h
index b3f42d7c8b523fe3a24b2863ae028e7a2a029e5e..b593b980989da7776284184469aadfef47a6dd52 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelChargeInterpolationHistograms.h
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelChargeInterpolationHistograms.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 PixelChargeInterpolationHistograms_h
@@ -20,7 +20,7 @@ class PixelChargeInterpolationParameters;
 class PixelChargeInterpolationHistograms{
 
 public :
-	PixelChargeInterpolationHistograms(std::string tag,
+	PixelChargeInterpolationHistograms(const std::string& tag,
 					const PixelChargeInterpolationParameters &model);
 	
 	virtual ~PixelChargeInterpolationHistograms();
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelChargeInterpolationPlot.h b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelChargeInterpolationPlot.h
index d50b3f53c41fb13f207b8e6255852157e85882e7..c2be7d096b165861d08df077087f46b3b68c83e7 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelChargeInterpolationPlot.h
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelChargeInterpolationPlot.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 PixelChargeInterpolationPlot_h
@@ -23,9 +23,9 @@ public :
   PixelChargeInterpolationPlot(const PixelChargeInterpolationParameters &parameters, bool oneconst = false);
 	virtual ~PixelChargeInterpolationPlot();
 	void AddReference(const PixelChargeInterpolationParameters &parameters,
-			std::string title = "Reference", int color = 0,
-			std::string drawopt = "HIST"); 
-	void Plot(const std::string output);
+                          const std::string& title = "Reference", int color = 0,
+                          const std::string& drawopt = "HIST"); 
+	void Plot(const std::string& output);
 	void Write();
 	
 private:
@@ -50,16 +50,16 @@ private:
 	bool m_oneconst;
 
 	// utility methods!
-	void PlotDirection(std::string filename, std::string direction = "phi");
+	void PlotDirection(const std::string& filename, const std::string& direction = "phi");
 
-	void DrawOneHisto(TH1F *histo, std::string direction = "phi",float maximum = 0);
-	void DrawHistoMarkers(TH1F* histo, std::string options  = "P0same",  int goodj = 0);
+	void DrawOneHisto(TH1F *histo, const std::string& direction = "phi",float maximum = 0);
+	void DrawHistoMarkers(TH1F* histo, const std::string& options  = "P0same",  int goodj = 0);
 	void DrawLayerLegend(float xlegend, float ylegend);
-	void DrawAxis(float y1, float y2, float x1, float x2, std::string direction = "phi");
+	void DrawAxis(float y1, float y2, float x1, float x2, const std::string& direction = "phi");
 
 	std::vector < TH1F*> *HistogramsFromConstants(
 			const PixelChargeInterpolationParameters &parameters,
-			std::string direction = "phi", int color = 1, std::string title = "");
+			const std::string& direction = "phi", int color = 1, const std::string& title = "");
 };
 
 }
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelChargeInterpolationValidation.h b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelChargeInterpolationValidation.h
index 90cbea9d877ce58ce8e173300617151559054fef..8aa25673a41f9c706aaaba6793f28658fba6dd37 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelChargeInterpolationValidation.h
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelChargeInterpolationValidation.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 PixelChargeInterpolationValidation_h
@@ -21,7 +21,7 @@ class PixelChargeInterpolationValidation{
 
 public:
 	
-	PixelChargeInterpolationValidation(std::string tag,
+	PixelChargeInterpolationValidation(const std::string& tag,
 			const PixelChargeInterpolationParameters &model);
 	
 	virtual ~PixelChargeInterpolationValidation();
@@ -35,7 +35,7 @@ public:
 	int Write(TDirectory *file = 0);
 	int Read(TDirectory *file = 0);
 
-	void WriteErrorsFile(std::string name);
+	void WriteErrorsFile(const std::string& name);
 
 private:
 
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelClusterOnTrackErrorPlot.h b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelClusterOnTrackErrorPlot.h
index 0613d1136cd9cfe9d644d6dc877e3fb991d6ed7b..a72bf111e482ec8e492bedb1d1db4ee67aa95e59 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelClusterOnTrackErrorPlot.h
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelClusterOnTrackErrorPlot.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 PixelClusterOnTrackErrorPlot_h
@@ -24,9 +24,9 @@ public :
 			bool oneconst = false);
 	virtual ~PixelClusterOnTrackErrorPlot();
 	void AddReference(PixelClusterOnTrackErrorData &parameters,
-			std::string title = "Reference", int color = 0,
-			std::string drawopt = "HIST"); 
-	void Plot(const std::string output);
+                          const std::string& title = "Reference", int color = 0,
+                          const std::string& drawopt = "HIST"); 
+	void Plot(const std::string& output);
 	void Write();
 	
 private:
@@ -50,16 +50,16 @@ private:
 	bool m_oneconst;
 
 	// utility methods!
-	void PlotDirection(std::string filename, std::string direction = "phi");
+	void PlotDirection(const std::string& filename, const std::string& direction = "phi");
 
-	void DrawOneHisto(TH1F *histo, std::string direction = "phi",float maximum = 0);
-	void DrawHistoMarkers(TH1F* histo, int divider, std::string options  = "Psame",  int goodj = 0);
+	void DrawOneHisto(TH1F *histo, const std::string& direction = "phi",float maximum = 0);
+	void DrawHistoMarkers(TH1F* histo, int divider, const std::string& options  = "Psame",  int goodj = 0);
 	void DrawLayerLegend(float xlegend, float ylegend);
-	void DrawAxis(float y1, float y2, float x1, float x2, std::string direction = "phi");
+	void DrawAxis(float y1, float y2, float x1, float x2, const std::string& direction = "phi");
 
 	std::vector < TH1F*> *HistogramsFromConstants(
 			PixelClusterOnTrackErrorData &parameters,
-			std::string direction = "phi", int color = 1, std::string title = "");
+			const std::string& direction = "phi", int color = 1, const std::string& title = "");
 };
 
 }
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelConvert.h b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelConvert.h
index dac1fa0cd4199221d83d164226cbcb7636c732f8..a13764e001ea2e73ee4f7168fca7058c3e9cc20e 100755
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelConvert.h
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelConvert.h
@@ -1,9 +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
 */
 
-#ifndef __PIXEL_CONVERT_H__
-#define __PIXEL_CONVERT_H__
+#ifndef PIXELCALIBALGS_PIXELCONVERT_H
+#define PIXELCALIBALGS_PIXELCONVERT_H
 
 #include <string>
 #include <sstream>
@@ -57,7 +57,7 @@ namespace PixelConvert {
 			    int phi,
 			    int eta);
 
-  int UnpackOfflineID(std::string offlineID,
+  int UnpackOfflineID(const std::string& offlineID,
 		      int& system,
 		      int& subSystem,
 		      int& endcap,
@@ -86,11 +86,11 @@ namespace PixelConvert {
 		  int phi,
 		  int eta);
 
-  std::string OnlineID(std::string offlineID);
+  std::string OnlineID(const std::string& offlineID);
 
   std::string OnlineID(int hashID);
 
-  std::string OnlineIDfromDCSID(std::string DCSID);
+  std::string OnlineIDfromDCSID(const std::string& DCSID);
 
   /*
     OFFLINE ID
@@ -113,7 +113,7 @@ namespace PixelConvert {
     hash ID.
    */
 
-  int OfflineID(std::string onlineID,
+  int OfflineID(const std::string& onlineID,
 	       int& system, 
 	       int& subSystem, 
 	       int& endcap, 
@@ -121,7 +121,7 @@ namespace PixelConvert {
 	       int& phi,
 	       int& eta);
 
-  std::string OfflineID(std::string onlineID);
+  std::string OfflineID(const std::string& onlineID);
 
   int OfflineID(int hashID,
 	       int& system, 
@@ -151,7 +151,7 @@ namespace PixelConvert {
     check is performed. 
    */
 
-  int HashID(std::string ID);
+  int HashID(const std::string& ID);
 
   int HashID(int system,
 	     int subSystem,
@@ -182,9 +182,9 @@ namespace PixelConvert {
      case the range cheching fails.
 
   */
-  std::string DCSID(std::string OnlineID);
+  std::string DCSID(const std::string& OnlineID);
 
-  int ReadMap(const std::string filename);
+  int ReadMap(const std::string& filename);
   unsigned int GetID(const unsigned int moduleID);
 
 }
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelNtupleTracks.h b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelNtupleTracks.h
index a6a835cb00bb222240064c03922cd033929e3729..cbe7255b0ff6f6da6728cd9dff2d23cfda7c517a 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelNtupleTracks.h
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelNtupleTracks.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
 */
 
 //////////////////////////////////////////////////////////
@@ -275,9 +275,9 @@ class PixelNtupleTracks {
 		virtual ~PixelNtupleTracks();
 		virtual Int_t    GetEntry(Long64_t entry);
 		virtual Long64_t LoadTree(Long64_t entry);
-		virtual void     Init(TTree *tree);
+                        void     Init(TTree *tree);
 		virtual void     Loop();
-		virtual Bool_t   Notify();
+                        Bool_t   Notify();
 		virtual void     Show(Long64_t entry = -1);
 
 	// inline Functions to access variables: Maybe should be moved to PixelNtupleTracks??
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelRIOs.h b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelRIOs.h
index 4726cda1b282acdb4dbc5d3fc69f4101cf73db52..bd5e0d151ee96b4eeef220002b7021a67748588c 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelRIOs.h
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelRIOs.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 PixelRIOs_h
@@ -195,14 +195,14 @@ public :
    TBranch        *b_NotAssociated_ParticlePt;   //!
    TBranch        *b_NotAssociated_Flag;   //!
 
-   PixelRIOs(std::string starting_tag,
-				std::string input,
-				std::string final_tag,
-				std::string collection = "Validation/PixelRIOs");
+   PixelRIOs(const std::string& starting_tag,
+             const std::string& input,
+             const std::string& final_tag,
+             const std::string& collection = "Validation/PixelRIOs");
    virtual ~PixelRIOs();
    virtual void     Iterate(long nentries);
-   void ReadHistoFile(std::string input);
-   void Analyze(std::string reference, std::string reference_tag);
+   void ReadHistoFile(const std::string& input);
+   void Analyze(const std::string& reference, const std::string& reference_tag);
 
 private:
 
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelResidualHistograms.h b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelResidualHistograms.h
index 7fd64214645e5726fb6706893fd0dc1ee1d3ca5f..74467bed54510aa0eac3b351604b229b903c41eb 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelResidualHistograms.h
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelResidualHistograms.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 PixelResidualHistograms_h
@@ -21,8 +21,8 @@ class PixelResidualHistograms;
 class PixelResidualHistograms{
 
 public:
-	PixelResidualHistograms(const std::string name,
-			   const std::string title,
+	PixelResidualHistograms(const std::string& name,
+			   const std::string& title,
 			   double limits,
 			   int nbins,
 			   const std::vector< std::vector < float > > &binnage,
@@ -30,16 +30,16 @@ public:
 	
 	virtual ~PixelResidualHistograms();
 
-	void SetAxisTitle(std::string title);
+	void SetAxisTitle(const std::string& title);
 	
-	void Fill(float residual, std::vector< float > parameters);
+	void Fill(float residual, const std::vector< float >& parameters);
 
 	int Write(bool writebins = false);
 	int Read();
 
 	TH1D* GetHisto(const int i) const;
-	TProfile* GetMeanProfile(const std::string binname);
-	TProfile* GetRMSProfile(const std::string binname);
+	TProfile* GetMeanProfile(const std::string& binname);
+	TProfile* GetRMSProfile(const std::string& binname);
 	TProfile* GetProfile(const int binnumber, bool RMS = false, bool savebins = false);
 
 	TH1D *GetGlobalHisto();
@@ -48,7 +48,7 @@ public:
 			  int marker,
 			  float labely = 0,
 			  std::vector <TCanvas *> *canvasvector = 0,
-			  std::string name = "");
+			  const std::string& name = "");
 
 	//const std::vector< std::string > *GetBinsNames() const;
 	//const std::vector < float > *GetBins(const std::string binname) const;
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/RadDamage/HamburgModel/data_processing.cpp b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/RadDamage/HamburgModel/data_processing.cpp
index 2a414138dc92a6397573aa9e9f816d81272b29ee..a9bd2e3f101cdaeb8796a33aa8d4f2164c338531 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/RadDamage/HamburgModel/data_processing.cpp
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/RadDamage/HamburgModel/data_processing.cpp
@@ -262,6 +262,12 @@ Sensor::Sensor( double a, double b, int c, double d, double e)	//Constructordefi
   Temperature=c;
   Nacceptor_reversible=d;
   Nneutral_reversible=e;
+
+  volume= 0.135;
+  Ndonor_stable_donorremoval=donorremovalfraction*fabs(Nacceptor-Ndonor);
+  Ndonor_const=Ndonor-Ndonor_stable_donorremoval;
+  Nacceptor_stable_reverseannealing=0;
+  Nacceptor_stable_constdamage=0;
 }
 
 Sensor::Sensor()	//Constructordefinition
@@ -337,7 +343,7 @@ vector<double> Sensor::get_powerconsumption() const
   return powerconsumption;
 }
 
-void Sensor::irradiate(leakage_current_consts leconsts, Annealing_constants constants,long int phi, float t, long double totalDose)
+void Sensor::irradiate(leakage_current_consts leconsts, const Annealing_constants& constants,long int phi, float t, long double totalDose)
 {
   //t=t*3600;                                                                     //conversion from hours to seconds
   double a=1e-30;
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/DepletionDepthCalibration.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/DepletionDepthCalibration.cxx
index 0ba9265c8dffbf03bc1cead07f9f1bcf520c862e..d7e5849161e11a447d1abb6e6accefd0459b58a7 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/DepletionDepthCalibration.cxx
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/DepletionDepthCalibration.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
 */
 
 #ifndef DepletionDepthCalibration_C
@@ -20,7 +20,7 @@
 
 namespace PixelCalib{
 
-DepletionDepthCalibration::DepletionDepthCalibration(int layer,std::string cosmicORbeam):
+DepletionDepthCalibration::DepletionDepthCalibration(int layer,const std::string& cosmicORbeam):
 	m_curLayer(layer),m_curType(cosmicORbeam){
 	
   m_EtaModule = 0;
@@ -213,7 +213,7 @@ int DepletionDepthCalibration::Analyze(std::ofstream &logfile){
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
-void DepletionDepthCalibration::PlotValidation(TCanvas *c1, std::string outname){
+void DepletionDepthCalibration::PlotValidation(TCanvas *c1, const std::string& outname){
 
 	int nmodules = m_DepletionDepth0->GetNrows();
 	TH1D *graph0 = new TH1D( (m_layername + "DepletionDepth0Histo").c_str(),
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/LorentzAngleCalibration.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/LorentzAngleCalibration.cxx
index 4a172b8bf67497398c922d852eb0d48b8f4bbe9f..2511b86d0f0f0740878aca4598e9709507b4973e 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/LorentzAngleCalibration.cxx
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/LorentzAngleCalibration.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
 */
 
 #ifndef LorentzAngleCalibration_C
@@ -21,7 +21,7 @@
 
 namespace PixelCalib{
 
-LorentzAngleCalibration::LorentzAngleCalibration(int layer,std::string cosmicORbeam):
+LorentzAngleCalibration::LorentzAngleCalibration(int layer,const std::string& cosmicORbeam):
 	m_curLayer(layer),m_curType(cosmicORbeam){
 
 	if(m_curType != "cosmic") m_curType = "beam";
@@ -193,7 +193,7 @@ int LorentzAngleCalibration::Analyze(std::ofstream &logfile){
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
-void LorentzAngleCalibration::PlotValidation(TCanvas *c1, std::string outname){
+void LorentzAngleCalibration::PlotValidation(TCanvas *c1, const std::string& outname){
 
 	int nmodules = m_LorentzAngle0->GetNrows();
 	TH1D *graph0 = new TH1D( (m_layername + "LorentzAngle0Histo").c_str(),
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/OfflineCalibrationLoop.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/OfflineCalibrationLoop.cxx
index cf39fb62e43a73ce9edf6e0b33865fc324df24f2..7274a46b879364ea23f50bd98323f14867206503 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/OfflineCalibrationLoop.cxx
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/OfflineCalibrationLoop.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
 */
 
 #ifndef OfflineCalibrationLoop_cxx
@@ -22,10 +22,10 @@
 
 namespace PixelCalib{
 
-OfflineCalibrationLoop::OfflineCalibrationLoop(std::string starting_tag,
-						std::string input,
-						std::string final_tag,
-						std::string collection):
+OfflineCalibrationLoop::OfflineCalibrationLoop(const std::string& starting_tag,
+                                               const std::string& input,
+                                               const std::string& final_tag,
+                                               const std::string& collection):
 			PixelNtupleTracks(input,collection),
 			m_timer(0), m_Calibration(0), m_Validation(0),
 			m_StartingTag(starting_tag), m_FinalTag(final_tag){
@@ -83,7 +83,7 @@ OfflineCalibrationLoop::~OfflineCalibrationLoop(){
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
-void OfflineCalibrationLoop::ReadHistoFile(std::string input){
+void OfflineCalibrationLoop::ReadHistoFile(const std::string& input){
 
 	m_timer->Start();
 
@@ -234,7 +234,8 @@ void OfflineCalibrationLoop::Iterate(long maxentries){
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
-void OfflineCalibrationLoop::Analyze(std::string reference,std::string reference_tag){
+void OfflineCalibrationLoop::Analyze(const std::string& reference,
+                                     const std::string& reference_tag){
 
 	m_timer->Start();
 
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelChargeInterpolationHistograms.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelChargeInterpolationHistograms.cxx
index 769818b3aa0172f389b0e20e2a7a8778649f17f0..52afd84b0d95f9c21cb4adb82cb698c4f66fa5b0 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelChargeInterpolationHistograms.cxx
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelChargeInterpolationHistograms.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
 */
 
 #ifndef PixelChargeInterpolationHistograms_C
@@ -27,7 +27,7 @@
 
 namespace PixelCalib{
 
-PixelChargeInterpolationHistograms::PixelChargeInterpolationHistograms(std::string tag,
+PixelChargeInterpolationHistograms::PixelChargeInterpolationHistograms(const std::string& tag,
 		const PixelChargeInterpolationParameters &model):
 	m_tag(tag),
 	m_parameters(0),
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelChargeInterpolationPlot.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelChargeInterpolationPlot.cxx
index 2839d55975d6bc13e292f2d279852482bfc40b82..6f35c00e79bf6130f5d6e7e5be5e99f208922731 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelChargeInterpolationPlot.cxx
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelChargeInterpolationPlot.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
 */
 
 #ifndef PixelChargeInterpolationPlot_cxx
@@ -79,7 +79,7 @@ PixelChargeInterpolationPlot::~PixelChargeInterpolationPlot(){
 
 void PixelChargeInterpolationPlot::AddReference(
 		const PixelChargeInterpolationParameters &parameters,
-		std::string title, int color, std::string drawopt){
+		const std::string& title, int color, const std::string& drawopt){
 
 	std::vector < TH1F* > *histoX = HistogramsFromConstants(parameters,"phi",color,title);
 	std::vector < TH1F* > *histoY = HistogramsFromConstants(parameters,"eta",color,title);
@@ -95,7 +95,7 @@ void PixelChargeInterpolationPlot::AddReference(
 
 //////////////////////////////////////////////////////////////////////////////////////////
 	
-void PixelChargeInterpolationPlot::Plot(const std::string output){
+void PixelChargeInterpolationPlot::Plot(const std::string& output){
 
 
 	PlotDirection(output, "phi");
@@ -107,7 +107,7 @@ void PixelChargeInterpolationPlot::Plot(const std::string output){
 
 std::vector < TH1F* > *PixelChargeInterpolationPlot::HistogramsFromConstants(
 			const PixelChargeInterpolationParameters &parameters,
-			std::string direction, int color, std::string title){
+			const std::string& direction, int color, const std::string& title){
 
 	std::vector <TH1F*> *histo = new std::vector <TH1F*>();
 	std::vector<float> anglebins;
@@ -207,7 +207,8 @@ std::vector < TH1F* > *PixelChargeInterpolationPlot::HistogramsFromConstants(
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
-void PixelChargeInterpolationPlot::PlotDirection( std::string filename, std::string direction){
+void PixelChargeInterpolationPlot::PlotDirection( const std::string& filename,
+                                                  const std::string& direction){
 
 	std::vector < std::vector < TH1F* > > *RefHistos = 0;
 	std::vector < TH1F* > *histograms = 0;
@@ -289,7 +290,7 @@ void PixelChargeInterpolationPlot::PlotDirection( std::string filename, std::str
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
-void PixelChargeInterpolationPlot::DrawOneHisto(TH1F* histo, std::string direction, float maximum){
+void PixelChargeInterpolationPlot::DrawOneHisto(TH1F* histo, const std::string& direction, float maximum){
 
 
 	// play with the histo
@@ -335,7 +336,7 @@ void PixelChargeInterpolationPlot::DrawOneHisto(TH1F* histo, std::string directi
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
-void PixelChargeInterpolationPlot::DrawHistoMarkers(TH1F* histo, std::string options, int goodj){
+void PixelChargeInterpolationPlot::DrawHistoMarkers(TH1F* histo, const std::string& options, int goodj){
 
 	int startmarker = 21;
 	TH1F *markers = (TH1F *)histo->Clone();
@@ -390,7 +391,7 @@ void PixelChargeInterpolationPlot::DrawLayerLegend(float xlegend,float ylegend){
 //////////////////////////////////////////////////////////////////////////////////////////
 
 
-void PixelChargeInterpolationPlot::DrawAxis(float y1, float y2, float x1, float x2, std::string direction){
+void PixelChargeInterpolationPlot::DrawAxis(float y1, float y2, float x1, float x2, const std::string& direction){
 	
 	float stdtextsize = 0.05;
 	int stdfont = 42;
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelChargeInterpolationValidation.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelChargeInterpolationValidation.cxx
index e367ce9048bd0ee1d78869d593803fdef4c9cde9..3ce344e405727231ab9eb299ea1f0b4c65321fd8 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelChargeInterpolationValidation.cxx
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelChargeInterpolationValidation.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
 */
 
 #ifndef PixelChargeInterpolationValidation_C
@@ -27,7 +27,7 @@ static const int NCLUSSIZES = 10;
 namespace PixelCalib{
 
 
-PixelChargeInterpolationValidation::PixelChargeInterpolationValidation(std::string tag,
+PixelChargeInterpolationValidation::PixelChargeInterpolationValidation(const std::string& tag,
 					const PixelChargeInterpolationParameters &model):
 	m_eta(0), 
 	m_phi(0), 
@@ -535,7 +535,7 @@ int PixelChargeInterpolationValidation::Write(TDirectory *writedir){
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
-void PixelChargeInterpolationValidation::WriteErrorsFile(std::string name){
+void PixelChargeInterpolationValidation::WriteErrorsFile(const std::string& name){
 
 	// Let's write resolutions into text file (see:
 	// void PixelClusterOnTrackErrorData::Print(std::string file) const
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelClusterOnTrackErrorPlot.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelClusterOnTrackErrorPlot.cxx
index 26b5244cd2f8724582c56827ab585aceeaa940ce..aa587653862b8142f1b17f1d25c9aabec44cca96 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelClusterOnTrackErrorPlot.cxx
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelClusterOnTrackErrorPlot.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
 */
 
 #ifndef PixelClusterOnTrackErrorPlot_cxx
@@ -76,7 +76,7 @@ PixelClusterOnTrackErrorPlot::~PixelClusterOnTrackErrorPlot(){
 
 void PixelClusterOnTrackErrorPlot::AddReference(
 		PixelClusterOnTrackErrorData &parameters,
-		std::string title, int color, std::string drawopt){
+		const std::string& title, int color, const std::string& drawopt){
 
 	std::vector < TH1F* > *histoX = HistogramsFromConstants(parameters,"phi",color,title);
 	std::vector < TH1F* > *histoY = HistogramsFromConstants(parameters,"eta",color,title);
@@ -91,7 +91,7 @@ void PixelClusterOnTrackErrorPlot::AddReference(
 
 //////////////////////////////////////////////////////////////////////////////////////////
 	
-void PixelClusterOnTrackErrorPlot::Plot(const std::string output){
+void PixelClusterOnTrackErrorPlot::Plot(const std::string& output){
 
 
 	PlotDirection(output, "phi");
@@ -103,7 +103,7 @@ void PixelClusterOnTrackErrorPlot::Plot(const std::string output){
 
 std::vector < TH1F* > *PixelClusterOnTrackErrorPlot::HistogramsFromConstants(
 			PixelClusterOnTrackErrorData &parameters,
-			std::string direction, int color, std::string title){
+			const std::string& direction, int color, const std::string& title){
 
 	std::vector <TH1F*> *histo = new std::vector <TH1F*>();
 	std::vector<float> anglebins;
@@ -209,7 +209,8 @@ std::vector < TH1F* > *PixelClusterOnTrackErrorPlot::HistogramsFromConstants(
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
-void PixelClusterOnTrackErrorPlot::PlotDirection( std::string filename, std::string direction){
+void PixelClusterOnTrackErrorPlot::PlotDirection( const std::string& filename,
+                                                  const std::string& direction){
 
 	std::vector < std::vector < TH1F* > > *RefHistos = 0;
 	std::vector < TH1F* > *histograms = 0;
@@ -281,7 +282,7 @@ void PixelClusterOnTrackErrorPlot::PlotDirection( std::string filename, std::str
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
-void PixelClusterOnTrackErrorPlot::DrawOneHisto(TH1F* histo, std::string direction, float maximum){
+void PixelClusterOnTrackErrorPlot::DrawOneHisto(TH1F* histo, const std::string& direction, float maximum){
 
 
 	// play with the histo
@@ -328,7 +329,7 @@ void PixelClusterOnTrackErrorPlot::DrawOneHisto(TH1F* histo, std::string directi
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
-void PixelClusterOnTrackErrorPlot::DrawHistoMarkers(TH1F* histo, int divider, std::string options, int goodj){
+void PixelClusterOnTrackErrorPlot::DrawHistoMarkers(TH1F* histo, int divider, const std::string& options, int goodj){
 
 	int startmarker = 21;
 	TH1F *markers = (TH1F *)histo->Clone();
@@ -369,7 +370,7 @@ void PixelClusterOnTrackErrorPlot::DrawLayerLegend(float xlegend,float ylegend){
 //////////////////////////////////////////////////////////////////////////////////////////
 
 
-void PixelClusterOnTrackErrorPlot::DrawAxis(float y1, float y2, float x1, float x2, std::string direction){
+void PixelClusterOnTrackErrorPlot::DrawAxis(float y1, float y2, float x1, float x2, const std::string& direction){
 	
 	std::string axtitle = "";
 	double* axbins = 0;
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelConvert.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelConvert.cxx
index 687579850ff4a532c8a1921727d524414a9a394e..a204a1dc9fa6745a99256c6b8a091c1913af5364 100755
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelConvert.cxx
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelConvert.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 "PixelCalibAlgs/PixelConvert.h"
@@ -26,7 +26,7 @@ namespace PixelConvert {
     return s.str();
   }
 
-  int UnpackOfflineID(std::string offlineID,
+  int UnpackOfflineID(const std::string& offlineID,
 		       int& system,
 		       int& subSystem,
 		       int& endcap,
@@ -121,7 +121,7 @@ namespace PixelConvert {
     return s.str();
   }
 
-  std::string OnlineID(std::string offlineID) {
+  std::string OnlineID(const std::string& offlineID) {
     int system;
     int subSystem;
     int endcap;
@@ -143,7 +143,7 @@ namespace PixelConvert {
   }
 
 
-  int OfflineID(std::string onlineID,
+  int OfflineID(const std::string& onlineID,
 		int& system, 
 		int& subSystem, 
 		int& endcap, 
@@ -246,7 +246,7 @@ namespace PixelConvert {
       else return 1;
   }
 
-  std::string OfflineID(std::string onlineID) {
+  std::string OfflineID(const std::string& onlineID) {
     int system, subSystem, endcap, layer, phi, eta;
     if ( OfflineID(onlineID,system,subSystem,endcap,layer,phi,eta) )
       return PackOfflineID(system,subSystem,endcap,layer,phi,eta);
@@ -278,7 +278,7 @@ namespace PixelConvert {
     return PackOfflineID(system,subSystem,endcap,layer,phi,eta);
   }
 
-  int HashID(std::string ID) {
+  int HashID(const std::string& ID) {
     int system, subSystem, endcap, layer, phi, eta;
     int success;
     if ( ID.at(0)=='[' ) // already offline ID
@@ -310,7 +310,7 @@ namespace PixelConvert {
       +    ((     eta& 0xf)<<13);
   }
 
-  std::string DCSID(std::string OnlineID) {
+  std::string DCSID(const std::string& OnlineID) {
     std::string ID=OnlineID, newID(Error);
     size_t pos=0;
     char ch;
@@ -358,7 +358,7 @@ namespace PixelConvert {
     return ID;
   }
 
-  std::string OnlineIDfromDCSID(std::string DCSID) {
+  std::string OnlineIDfromDCSID(const std::string& DCSID) {
     std::string ID=DCSID, newID(Error);
     size_t pos=0;
     while ( (pos=ID.find('_',pos))!=std::string::npos ) ID.replace(pos,1,"-");
@@ -399,7 +399,7 @@ namespace PixelConvert {
    * file named as in the string datafile initialized above.
    */
 
-  int ReadMap(const std::string filename ) {
+  int ReadMap(const std::string& filename ) {
     std::cerr << "INFO: Opening data file " << filename << std::endl; 
     std::ifstream f(filename.c_str());
     if ( !f.good() ) {
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelRIOs.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelRIOs.cxx
index b22cec24aaac8708b80b10e53676982cd197ddcf..5e20e278cb244c7afe177ad94e8759aef547fddd 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelRIOs.cxx
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelRIOs.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
 */
 
 #ifndef PixelRIOs_cxx
@@ -21,10 +21,10 @@
 namespace PixelCalib{
 
 
-PixelRIOs::PixelRIOs(std::string starting_tag,
-						std::string input,
-						std::string final_tag,
-						std::string collection):
+PixelRIOs::PixelRIOs(const std::string& starting_tag,
+                     const std::string& input,
+                     const std::string& final_tag,
+                     const std::string& collection):
       b_event_number(nullptr),
       b_number_cluster_per_event(nullptr),
       b_type_of_trigger(nullptr),
@@ -150,9 +150,10 @@ PixelRIOs::PixelRIOs(std::string starting_tag,
                         std::ifstream myfile(input.c_str());
 			if (myfile.is_open()){
 				for(;;){
-					getline(myfile,input);
+                                        std::string line;
+					getline(myfile,line);
 					if(myfile.eof()) break;
-					clusters_tree->AddFile(input.c_str());
+					clusters_tree->AddFile(line.c_str());
 				}
 				myfile.close();
 			}else{
@@ -387,7 +388,7 @@ PixelRIOs::~PixelRIOs(){
 
 /////////////////////////////////////////////////////////////////////////////////////////////
 
-void PixelRIOs::ReadHistoFile(std::string input){
+void PixelRIOs::ReadHistoFile(const std::string& input){
 
 	m_timer->Start();
 
@@ -505,7 +506,8 @@ void PixelRIOs::Iterate(long maxentries){
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
-void PixelRIOs::Analyze(std::string reference,std::string reference_tag){
+void PixelRIOs::Analyze(const std::string& reference,
+                        const std::string& reference_tag){
 
 	m_timer->Start();
 
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelResidualHistograms.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelResidualHistograms.cxx
index 3c94ef136909aa92c8360ae4c0f67b7b1b13058d..c6acce9b1af03c635d447f1b4ac54afa166a1918 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelResidualHistograms.cxx
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelResidualHistograms.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
 */
 
 #ifndef PixelResidualHistograms_C
@@ -22,8 +22,8 @@
 
 namespace PixelCalib{
 
-PixelResidualHistograms::PixelResidualHistograms(std::string name,
-				       std::string title,
+PixelResidualHistograms::PixelResidualHistograms(const std::string& name,
+				       const std::string& title,
 				       double limits,
 				       int nbins,
 				       const std::vector< std::vector < float > > &binnage,
@@ -65,13 +65,13 @@ PixelResidualHistograms::~PixelResidualHistograms(){
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
-void PixelResidualHistograms::Fill(float residual, std::vector< float > parameters){
+void PixelResidualHistograms::Fill(float residual, const std::vector< float >& parameters){
 	m_HistogramsVector->Fill(residual,1,parameters);
 }
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
-void PixelResidualHistograms::SetAxisTitle(std::string title){
+void PixelResidualHistograms::SetAxisTitle(const std::string& title){
 
 	m_axisName = title;
 	for(unsigned int i = 0 ; i < m_HistogramsVector->GetNhistos() ; i++)
@@ -134,7 +134,7 @@ TH1D* PixelResidualHistograms::GetHisto(int i) const{
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
-TProfile* PixelResidualHistograms::GetMeanProfile(const std::string binname){
+TProfile* PixelResidualHistograms::GetMeanProfile(const std::string& binname){
 
 	for(unsigned int i = 0; i < m_binnames.size(); i++)
 		if(m_binnames[i] == binname) return GetProfile(i,false);
@@ -144,7 +144,7 @@ TProfile* PixelResidualHistograms::GetMeanProfile(const std::string binname){
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
-TProfile* PixelResidualHistograms::GetRMSProfile(const std::string binname){
+TProfile* PixelResidualHistograms::GetRMSProfile(const std::string& binname){
 
 	for(unsigned int i = 0; i < m_binnames.size(); i++)
 		if(m_binnames[i] == binname) return GetProfile(i,true);
@@ -282,7 +282,7 @@ TProfile* PixelResidualHistograms::GetProfile(const int binnumber, bool RMS, boo
 //////////////////////////////////////////////////////////////////////////////////////////
 
 std::vector <TCanvas*> *PixelResidualHistograms::DrawProfiles(int color, int marker, float labely,
-		std::vector <TCanvas*> *canvasvector, std::string name ){
+		std::vector <TCanvas*> *canvasvector, const std::string& name ){
 
 	SetAtlasStyle();	
 	std::string drawoptions = "Psame";
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonDiTauEfficiencyTool.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonDiTauEfficiencyTool.cxx
index d17a101916ac495d13205ce2529970da3c15a122..fc8abe8d96f04e04358125e49dfe13ef68085eb7 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonDiTauEfficiencyTool.cxx
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonDiTauEfficiencyTool.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
 */
 
 // Framework include(s):
@@ -16,12 +16,12 @@
 using namespace TauAnalysisTools;
 
 //______________________________________________________________________________
-CommonDiTauEfficiencyTool::CommonDiTauEfficiencyTool(std::string sName)
+CommonDiTauEfficiencyTool::CommonDiTauEfficiencyTool(const std::string& sName)
   : CommonEfficiencyTool( sName )
-  , m_fX(&DiTauPt)
-  , m_fY(&DiTauEta)
-  , m_bSFIsAvailable(false)
-  , m_bSFIsAvailableChecked(false)
+  , m_fDiX(&DiTauPt)
+  , m_fDiY(&DiTauEta)
+  , m_bDiSFIsAvailable(false)
+  , m_bDiSFIsAvailableChecked(false)
 {
 }
 
@@ -107,7 +107,7 @@ CP::CorrectionCode CommonDiTauEfficiencyTool::getEfficiencyScaleFactor(const xAO
   Get scale factor from getEfficiencyScaleFactor and decorate it to the
   tau. Note that this can only be done if the variable name is not already used,
   e.g. if the variable was already decorated on a previous step (enured by the
-  m_bSFIsAvailableChecked check).
+  m_bDiSFIsAvailableChecked check).
 
   Technical note: cannot use `static SG::AuxElement::Decorator` as we will have
   multiple instances of this tool with different decoration names.
@@ -117,18 +117,18 @@ CP::CorrectionCode CommonDiTauEfficiencyTool::applyEfficiencyScaleFactor(const x
 {
   double dSf = 0.;
 
-  if (!m_bSFIsAvailableChecked)
+  if (!m_bDiSFIsAvailableChecked)
   {
-    m_bSFIsAvailable = xDiTau.isAvailable< double >(m_sVarName);
-    // m_bSFIsAvailable = xDiTau.isAvailable< double >("bliblablubb");
-    m_bSFIsAvailableChecked = true;
-    if (m_bSFIsAvailable)
+    m_bDiSFIsAvailable = xDiTau.isAvailable< double >(m_sVarName);
+    // m_bDiSFIsAvailable = xDiTau.isAvailable< double >("bliblablubb");
+    m_bDiSFIsAvailableChecked = true;
+    if (m_bDiSFIsAvailable)
     {
       ATH_MSG_DEBUG(m_sVarName << " decoration is available on first ditau processed, switched of applyEfficiencyScaleFactor for further ditaus.");
       ATH_MSG_DEBUG("If an application of efficiency scale factors needs to be redone, please pass a shallow copy of the original ditau.");
     }
   }
-  if (m_bSFIsAvailable)
+  if (m_bDiSFIsAvailable)
     return CP::CorrectionCode::Ok;
 
   // retreive scale factor
@@ -146,8 +146,8 @@ void CommonDiTauEfficiencyTool::ReadInputs(TFile* fFile)
   m_mSF->clear();
 
   // initialize function pointer
-  m_fX = &DiTauPt;
-  m_fY = &DiTauEta;
+  m_fDiX = &DiTauPt;
+  m_fDiY = &DiTauEta;
 
   TKey *kKey;
   TIter itNext(fFile->GetListOfKeys());
@@ -201,8 +201,8 @@ CP::CorrectionCode CommonDiTauEfficiencyTool::getValue(const std::string& sHistN
   tTupleObjectFunc tTuple = (*m_mSF)[sHistName];
 
   // get pt and eta (for x and y axis respectively)
-  double dPt = m_fX(xDiTau);
-  double dEta = m_fY(xDiTau);
+  double dPt = m_fDiX(xDiTau);
+  double dEta = m_fDiY(xDiTau);
 
   // finally obtain efficiency scale factor from TH1F/TH1D/TF1, by calling the
   // function pointer stored in the tuple from the scale factor map
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonEfficiencyTool.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonEfficiencyTool.cxx
index bd4e3628aec659c2c7d07163210e2b31e29f50ab..fb10f4cc8aa46e414e408582b87568171390f23c 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonEfficiencyTool.cxx
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonEfficiencyTool.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
 */
 
 // Framework include(s):
@@ -64,7 +64,7 @@ using namespace TauAnalysisTools;
 */
 
 //______________________________________________________________________________
-CommonEfficiencyTool::CommonEfficiencyTool(std::string sName)
+CommonEfficiencyTool::CommonEfficiencyTool(const std::string& sName)
   : asg::AsgTool( sName )
   , m_mSF(0)
   , m_sSystematicSet(0)
@@ -78,8 +78,6 @@ CommonEfficiencyTool::CommonEfficiencyTool(std::string sName)
   , m_bPtTauEtaCalibIsAvailable(false)
   , m_bPtTauEtaCalibIsAvailableIsChecked(false)
 {
-  m_mSystematics = {};
-
   declareProperty( "InputFilePath",       m_sInputFilePath       = "" );
   declareProperty( "VarName",             m_sVarName             = "" );
   declareProperty( "WP",                  m_sWP                  = "" );
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonSmearingTool.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonSmearingTool.cxx
index c3dccae02d22b2d55b46d321ef916b397a4bfd87..27a70722e36eadce03eaacb6fba7adc114e5437a 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonSmearingTool.cxx
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonSmearingTool.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
 */
 
 // Framework include(s):
@@ -67,7 +67,7 @@ using namespace TauAnalysisTools;
 */
 
 //______________________________________________________________________________
-CommonSmearingTool::CommonSmearingTool(std::string sName)
+CommonSmearingTool::CommonSmearingTool(const std::string& sName)
   : asg::AsgMetadataTool( sName )
   , m_mSF(0)
   , m_sSystematicSet(0)
@@ -85,8 +85,6 @@ CommonSmearingTool::CommonSmearingTool(std::string sName)
   , m_bPtTauEtaCalibIsAvailable(false)
   , m_bPtTauEtaCalibIsAvailableIsChecked(false)
 {
-  m_mSystematics = {};
-
   declareProperty("InputFilePath",       m_sInputFilePath       = "" );
   declareProperty("SkipTruthMatchCheck", m_bSkipTruthMatchCheck = false );
   declareProperty("ApplyFading",         m_bApplyFading         = true );
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/SelectionCuts.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/SelectionCuts.cxx
index 0d95c5ffb065fc62b2b5d27623198b2d12c18d79..29958ae6bf57c0b3052c3d96dac8f98bb69b7827 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/SelectionCuts.cxx
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/SelectionCuts.cxx
@@ -15,7 +15,7 @@
 using namespace TauAnalysisTools;
 
 //______________________________________________________________________________
-SelectionCut::SelectionCut(std::string sName, TauAnalysisTools::TauSelectionTool* tTST)
+SelectionCut::SelectionCut(const std::string& sName, TauAnalysisTools::TauSelectionTool* tTST)
   : m_sName(sName)
   , m_hHistCutPre(0)
   , m_hHistCut(0)
@@ -533,9 +533,9 @@ bool SelectionCutBDTEleScore::accept(const xAOD::TauJet& xTau,
 //____________________________SelectionCutEleBDTWP______________________________
 //______________________________________________________________________________
 SelectionCutEleBDTWP::SelectionCutEleBDTWP(TauSelectionTool* tTST)
-  : SelectionCut("CutEleBDTWP", tTST)
+  : SelectionCut("CutEleBDTWP", tTST),
+    m_sEleBDTDecorationName ("BDTEleScoreSigTrans")
 {
-  m_sEleBDTDecorationName = "BDTEleScoreSigTrans";
   m_hHistCutPre = CreateControlPlot("hEleBDTWP_pre","EleBDTWP_pre;; events",6,-.5,5.5);
   m_hHistCut = CreateControlPlot("hEleBDTWP_cut","EleBDTWP_cut;; events",6,-.5,5.5);
   // only proceed if histograms are defined
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyContJetIDTool.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyContJetIDTool.cxx
index d900144703510875267a84179469151c2f0a51f8..785493d3acdb9a4faf6557b13c581109ee99fdc7 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyContJetIDTool.cxx
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyContJetIDTool.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 "TauAnalysisTools/TauEfficiencyContJetIDTool.h"
@@ -9,7 +9,7 @@ using namespace TauAnalysisTools;
 
 //==================================PUBLIC-PART=================================
 //______________________________________________________________________________
-TauEfficiencyContJetIDTool::TauEfficiencyContJetIDTool(std::string sName) :
+TauEfficiencyContJetIDTool::TauEfficiencyContJetIDTool(const std::string& sName) :
   CommonEfficiencyTool(sName)
 {
   m_sSystematicSet = new CP::SystematicSet();
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyEleIDTool.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyEleIDTool.cxx
index 5df222c39955158e3baa4bd7384415f2ad829e08..3b5bb820618e9e3863b5868deb6840b03d4240c9 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyEleIDTool.cxx
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyEleIDTool.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 "TauAnalysisTools/TauEfficiencyEleIDTool.h"
@@ -9,7 +9,7 @@ using namespace TauAnalysisTools;
 
 //=================================PUBLIC-PART==================================
 //______________________________________________________________________________
-TauEfficiencyEleIDTool::TauEfficiencyEleIDTool(std::string sName)
+TauEfficiencyEleIDTool::TauEfficiencyEleIDTool(const std::string& sName)
   : CommonEfficiencyTool(sName)
   , m_sWorkingPoint_1p("")
   , m_sWorkingPoint_3p("")
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyJetIDTool.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyJetIDTool.cxx
index cf770cf38f5cd19b73788db500ceeef425107537..40a72e993c45bf6b4e3ef710ab32ed14106b563d 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyJetIDTool.cxx
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyJetIDTool.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 "TauAnalysisTools/TauEfficiencyJetIDTool.h"
@@ -9,7 +9,7 @@ using namespace TauAnalysisTools;
 
 //=================================PUBLIC-PART==================================
 //______________________________________________________________________________
-TauEfficiencyJetIDTool::TauEfficiencyJetIDTool(std::string sName)
+TauEfficiencyJetIDTool::TauEfficiencyJetIDTool(const std::string& sName)
   : CommonEfficiencyTool(sName)
 {
 }
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyTriggerTool.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyTriggerTool.cxx
index 8b9fe6965e6310c2bb1bf0cf275eb4d28be85048..cd3e68f2433d82e110c8fc1cccdfde71b1f2b468 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyTriggerTool.cxx
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyTriggerTool.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
 */
 
 // Framework include(s):
@@ -18,7 +18,7 @@
 using namespace TauAnalysisTools;
 
 //______________________________________________________________________________
-TauEfficiencyTriggerTool::TauEfficiencyTriggerTool(std::string sName)
+TauEfficiencyTriggerTool::TauEfficiencyTriggerTool(const std::string& sName)
   : CommonEfficiencyTool ( sName )
   , m_ePeriod(PeriodUnknown)
 {
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauSelectionTool.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauSelectionTool.cxx
index 71a0017c49586acf7fd2add1318103677cc5aea4..24a6b5f0b7c65287e5e7d050bfb98edadddf1a8f 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauSelectionTool.cxx
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauSelectionTool.cxx
@@ -577,7 +577,7 @@ void TauSelectionTool::FillValueVector(std::vector<T>& vRegion, U tVal)
 
 //______________________________________________________________________________
 template<typename T>
-void TauSelectionTool::PrintConfigRegion(std::string sCutName, std::vector<T>& vRegion)
+void TauSelectionTool::PrintConfigRegion(const std::string& sCutName, std::vector<T>& vRegion)
 {
   unsigned int iNumRegion = vRegion.size()/2;
   for( unsigned int iRegion = 0; iRegion < iNumRegion; iRegion++ )
@@ -588,7 +588,7 @@ void TauSelectionTool::PrintConfigRegion(std::string sCutName, std::vector<T>& v
 
 //______________________________________________________________________________
 template<typename T>
-void TauSelectionTool::PrintConfigValue(std::string sCutName, std::vector<T>& vRegion)
+void TauSelectionTool::PrintConfigValue(const std::string& sCutName, std::vector<T>& vRegion)
 {
   for (auto tVal : vRegion)
     ATH_MSG_DEBUG( sCutName<<": " << tVal );
@@ -596,13 +596,13 @@ void TauSelectionTool::PrintConfigValue(std::string sCutName, std::vector<T>& vR
 
 //______________________________________________________________________________
 template<typename T>
-void TauSelectionTool::PrintConfigValue(std::string sCutName, T& tVal)
+void TauSelectionTool::PrintConfigValue(const std::string& sCutName, T& tVal)
 {
   ATH_MSG_DEBUG( sCutName<<": " << tVal );
 }
 
 //______________________________________________________________________________
-int TauSelectionTool::convertStrToJetIDWP(std::string sJetIDWP)
+int TauSelectionTool::convertStrToJetIDWP(const std::string& sJetIDWP)
 {
   if (sJetIDWP == "JETIDNONE") return int(JETIDNONE);
   else if (sJetIDWP == "JETIDBDTVERYLOOSE") return int(JETIDBDTVERYLOOSE); // new in rel21 
@@ -626,7 +626,7 @@ int TauSelectionTool::convertStrToJetIDWP(std::string sJetIDWP)
 }
 
 //______________________________________________________________________________
-int TauSelectionTool::convertStrToEleBDTWP(std::string sEleBDTWP)
+int TauSelectionTool::convertStrToEleBDTWP(const std::string& sEleBDTWP)
 {
   if (sEleBDTWP == "ELEIDNONE") return int(ELEIDNONE);
   else if (sEleBDTWP == "ELEIDBDTLOOSE") return int(ELEIDBDTLOOSE);
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/CommonDiTauEfficiencyTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/CommonDiTauEfficiencyTool.h
index 5b49cdfbb7ddc95965252b8a4f06d0379a303541..515ce0922fd05254a627d7261be2c5fddc332d66 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/CommonDiTauEfficiencyTool.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/CommonDiTauEfficiencyTool.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 TAUANALYSISTOOLS_COMMONDITAUEFFICIENCYTOOL_H
@@ -43,7 +43,7 @@ class CommonDiTauEfficiencyTool
 
 public:
 
-  CommonDiTauEfficiencyTool(std::string sName);
+  CommonDiTauEfficiencyTool(const std::string& sName);
 
   ~CommonDiTauEfficiencyTool();
 
@@ -53,8 +53,8 @@ public:
   virtual CP::CorrectionCode getEfficiencyScaleFactor(const xAOD::DiTauJet& xDiTau, double& dEfficiencyScaleFactor);
   virtual CP::CorrectionCode applyEfficiencyScaleFactor(const xAOD::DiTauJet& xDiTau);
 
-  double (*m_fX)(const xAOD::DiTauJet& xDiTau);
-  double (*m_fY)(const xAOD::DiTauJet& xDiTau);
+  double (*m_fDiX)(const xAOD::DiTauJet& xDiTau);
+  double (*m_fDiY)(const xAOD::DiTauJet& xDiTau);
 
   void ReadInputs(TFile* fFile);
 
@@ -65,8 +65,8 @@ public:
 
   e_TruthMatchedParticleType checkTruthMatch(const xAOD::DiTauJet& xDiTau) const;
 
-  bool m_bSFIsAvailable;
-  bool m_bSFIsAvailableChecked;
+  bool m_bDiSFIsAvailable;
+  bool m_bDiSFIsAvailableChecked;
 
 };
 } // namespace TauAnalysisTools
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/CommonEfficiencyTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/CommonEfficiencyTool.h
index 21798c2234853d53e8624e015c7b8e06914ececd..07b50b0d7dbab3207768be61f5ae3c923a708b24 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/CommonEfficiencyTool.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/CommonEfficiencyTool.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 TAUANALYSISTOOLS_COMMONEFFICIENCYTOOL_H
@@ -51,7 +51,7 @@ class CommonEfficiencyTool
 
 public:
 
-  CommonEfficiencyTool(std::string sName);
+  CommonEfficiencyTool(const std::string& sName);
 
   ~CommonEfficiencyTool();
 
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/CommonSmearingTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/CommonSmearingTool.h
index 12c5a93dc25c19a34b0668367ea58a727c328a0c..49972953448661d6c5af512ed68c697a20f59f13 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/CommonSmearingTool.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/CommonSmearingTool.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 TAUANALYSISTOOLS_COMMONSMEARINGTOOL_H
@@ -54,7 +54,7 @@ class CommonSmearingTool
 
 public:
 
-  CommonSmearingTool(std::string sName);
+  CommonSmearingTool(const std::string& sName);
 
   ~CommonSmearingTool();
 
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/SelectionCuts.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/SelectionCuts.h
index 16e46d5eb08ee63e44d773aa15d4cc85959eb226..3c933e70d2b9e1b1c4efd10f474d380390ef117c 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/SelectionCuts.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/SelectionCuts.h
@@ -37,7 +37,7 @@ class SelectionCut
 {
 
 public:
-  SelectionCut(std::string sName, TauAnalysisTools::TauSelectionTool* tTST);
+  SelectionCut(const std::string& sName, TauAnalysisTools::TauSelectionTool* tTST);
   virtual ~SelectionCut();
 
   void writeControlHistograms();
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyContJetIDTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyContJetIDTool.h
index 75969092792b06f0b5dc10810b08efc71a179c2f..c92096c3468341373cdf907d58c9d57010fd7f6a 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyContJetIDTool.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyContJetIDTool.h
@@ -1,7 +1,7 @@
 // Dear emacs, this is -*- c++ -*-
 
 /*
-  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 TAUANALYSISTOOLS_TAUEFFICIENCYCONTJETIDTOOL_H
@@ -30,7 +30,7 @@ class TauEfficiencyContJetIDTool : public CommonEfficiencyTool
 
 public:
 
-  TauEfficiencyContJetIDTool(std::string sName);
+  TauEfficiencyContJetIDTool(const std::string& sName);
 
   ~TauEfficiencyContJetIDTool();
 
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyEleIDTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyEleIDTool.h
index 0c4e0cc733830495ab2e1909bb30afa6594b703e..2beb55f7ce3d8f05bcabf7df9519ecf725dbf6d4 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyEleIDTool.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyEleIDTool.h
@@ -1,7 +1,7 @@
 // Dear emacs, this is -*- c++ -*-
 
 /*
-  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 TAUANALYSISTOOLS_TAUEFFICIENCYELEIDTOOL_H
@@ -30,7 +30,7 @@ class TauEfficiencyEleIDTool : public CommonEfficiencyTool
 
 public:
 
-  TauEfficiencyEleIDTool(std::string sName);
+  TauEfficiencyEleIDTool(const std::string& sName);
 
   virtual ~TauEfficiencyEleIDTool();
 
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyJetIDTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyJetIDTool.h
index c9bf8705f9a7eaa536ee2027a35ea5a442eabd74..e1a9aa59e1d8d0e576628b7a50fabcb4a43842b4 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyJetIDTool.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyJetIDTool.h
@@ -1,7 +1,7 @@
 // Dear emacs, this is -*- c++ -*-
 
 /*
-  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 TAUANALYSISTOOLS_TAUEFFICIENCYJETIDTOOL_H
@@ -30,7 +30,7 @@ class TauEfficiencyJetIDTool : public CommonEfficiencyTool
 
 public:
 
-  TauEfficiencyJetIDTool(std::string sName);
+  TauEfficiencyJetIDTool(const std::string& sName);
 
   virtual ~TauEfficiencyJetIDTool();
 
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyTriggerTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyTriggerTool.h
index bf112f16cdf3ecb9291da70179916d32cb3e964c..a0bad5ac78462dde60324e14b9bd918a133a76af 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyTriggerTool.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyTriggerTool.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 TAUANALYSISTOOLS_TAUEFFICIENCYTRIGGERTOOL_H
@@ -51,7 +51,7 @@ class TauEfficiencyTriggerTool
 
 public:
 
-  TauEfficiencyTriggerTool(std::string sName);
+  TauEfficiencyTriggerTool(const std::string& sName);
 
   StatusCode initialize();
 
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSelectionTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSelectionTool.h
index e9d8d7c725e09c6c15e0e5e41bedf9c3e2565da0..3c249a52823f58b8d7bafc36b6a8edc9398343d7 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSelectionTool.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSelectionTool.h
@@ -132,11 +132,11 @@ private:
   template<typename T, typename U>
   void FillValueVector(std::vector<T>& vRegion, U tVal);
   template<typename T>
-  void PrintConfigRegion(std::string sCutName, std::vector<T>& vRegion);
+  void PrintConfigRegion(const std::string& sCutName, std::vector<T>& vRegion);
   template<typename T>
-  void PrintConfigValue(std::string sCutName, std::vector<T>& vRegion);
+  void PrintConfigValue(const std::string& sCutName, std::vector<T>& vRegion);
   template<typename T>
-  void PrintConfigValue(std::string sCutName, T& sVal);
+  void PrintConfigValue(const std::string& sCutName, T& sVal);
 
   // bitmask of tau selection cuts
   int m_iSelectionCuts;
@@ -200,8 +200,8 @@ private:
   std::map<SelectionCuts, TauAnalysisTools::SelectionCut*> m_cMap;
 
   void setupCutFlowHistogram();
-  int convertStrToJetIDWP(std::string sJetIDWP);
-  int convertStrToEleBDTWP(std::string sEleBDTWP);
+  int convertStrToJetIDWP(const std::string& sJetIDWP);
+  int convertStrToEleBDTWP(const std::string& sEleBDTWP);
   std::string convertJetIDWPToStr(int iJetIDWP);
   std::string convertEleBDTWPToStr(int iEleBDTWP);
 
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/Root/CacheGlobalMemory.cxx b/Trigger/TrigAnalysis/TrigDecisionTool/Root/CacheGlobalMemory.cxx
index 12d1f83744682cc6b2af7d56c1eed586699db119..9725b0beeab133dbd6d0229325f9b8101dc76d2a 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/Root/CacheGlobalMemory.cxx
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/Root/CacheGlobalMemory.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
 */
 
 /**********************************************************************************
@@ -86,10 +86,11 @@ const Trig::ChainGroup* Trig::CacheGlobalMemory::createChainGroup(const std::vec
   // create a proper key
   std::vector< std::string > key=Trig::keyWrap(triggerNames);
 
-  if (m_chainGroups.find(key)==m_chainGroups.end()) {
-    m_chainGroups[key]=new ChainGroup( key, *this );
-    updateChainGroup(m_chainGroups[key]);
-    m_chainGroupsRef[key]=m_chainGroups[key];
+  auto res = m_chainGroups.try_emplace (key, nullptr);
+  if (res.second) {
+    res.first->second = new ChainGroup( key, *this );
+    updateChainGroup(res.first->second);
+    m_chainGroupsRef[key] = res.first->second;
   }
   // this overwrites the pointer in the map each time in case the alias needs defining
   if (alias!="") {
@@ -205,7 +206,7 @@ void Trig::CacheGlobalMemory::update(const TrigConf::HLTChainList* confChains,
     }
     //
     std::map<std::string, std::vector<std::string> >::iterator mstIt;
-    for (mstIt=m_streams.begin(); mstIt != m_streams.end(); mstIt++) {      
+    for (mstIt=m_streams.begin(); mstIt != m_streams.end(); ++mstIt) {
       const std::string alias("STREAM_"+mstIt->first);
       std::vector< std::string > key_alias=Trig::keyWrap(Trig::convertStringToVector(alias));
       ChGrIt preIt = m_chainGroupsRef.find(key_alias);
@@ -220,7 +221,7 @@ void Trig::CacheGlobalMemory::update(const TrigConf::HLTChainList* confChains,
       }
       
     }
-    for (mstIt=m_groups.begin(); mstIt != m_groups.end(); mstIt++) {
+    for (mstIt=m_groups.begin(); mstIt != m_groups.end(); ++mstIt) {
       const std::string alias("GROUP_"+mstIt->first);
       std::vector< std::string > key_alias=Trig::keyWrap(Trig::convertStringToVector(alias));
       ChGrIt preIt = m_chainGroupsRef.find(key_alias);
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/Root/ChainGroup.cxx b/Trigger/TrigAnalysis/TrigDecisionTool/Root/ChainGroup.cxx
index fadc62c56ff29b57c59659ab192cab9fdf9c2964..5ebf66333df47af96fd8dc381a701a8c1c5feb31 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/Root/ChainGroup.cxx
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/Root/ChainGroup.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
 */
 
 /**********************************************************************************
@@ -222,7 +222,7 @@ bool Trig::ChainGroup::isPassed(unsigned int condition) const
 	std::vector<std::string> triggers = getListOfTriggers();
         const std::vector<std::string>& express_names = expressStream->linkColNames();
 	std::vector<std::string>::const_iterator p1, p2;
-        for (p1=triggers.begin(); p1!=triggers.end(); p1++) {
+        for (p1=triggers.begin(); p1!=triggers.end(); ++p1) {
           for (p2=express_names.begin(); p2!=express_names.end(); ++p2) {
             if ( (*p1) == (*p2) ) {
 	      //essentially implements a OR across all triggers in the CG (as is done upstream)
@@ -642,7 +642,7 @@ Trig::ChainGroup::update(const TrigConf::HLTChainList* confChains,
    if (!(confChains && confItems) ) return;
 
    for(std::vector< std::string >::const_iterator it = m_patterns.begin();
-       it != m_patterns.end(); it++) {
+       it != m_patterns.end(); ++it) {
       // find chains matching pattern     
       boost::regex compiled(*it);
       boost::cmatch what;
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/ChainGroup.h b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/ChainGroup.h
index 3eb835c032574e4026c75478a7bbb1cbe04f3611..e0d518468eb19b2721dab8baea749238300ab19d 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/ChainGroup.h
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/ChainGroup.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 TRIGGER_DECISION_TOOL_CHAIN_GROUP_H
@@ -128,9 +128,9 @@ namespace Trig {
       template<class CONTAINER>
       std::vector< TrigCompositeUtils::LinkInfo<CONTAINER> > features(EventPtr_t eventStore,
                 unsigned int condition = TrigDefs::Physics,
-                const std::string container = "",
+                const std::string& container = "",
                 const unsigned int featureCollectionMode = TrigDefs::oneFeaturePerLeg,
-                const std::string featureName = "feature") const;
+                const std::string& featureName = "feature") const;
 
       // 
       const std::vector< std::string >& patterns() const {return m_patterns;}
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/ChainGroup.icc b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/ChainGroup.icc
index 55c63dd2345e2c4f11d12606eaa1ac1f67f0f7a4..b707eb4989cbe99b4958f1313ffb5b614a108868 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/ChainGroup.icc
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/ChainGroup.icc
@@ -1,7 +1,7 @@
 template<class CONTAINER>
 std::vector< TrigCompositeUtils::LinkInfo<CONTAINER> > Trig::ChainGroup::features(EventPtr_t eventStore,
-        unsigned int condition, const std::string container,
-        const unsigned int featureCollectionMode, const std::string featureName) const {
+        unsigned int condition, const std::string& container,
+        const unsigned int featureCollectionMode, const std::string& featureName) const {
 
 
   bool errState = false;
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionAccess.h b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionAccess.h
index 22bb65723c3f0d1453778e44617f8b28116c141d..edfd8d0342cbb66dd5380502788b7da08847a7c1 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionAccess.h
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionAccess.h
@@ -1,7 +1,7 @@
 // -*- c++ -*-
 
 /*
-  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 TRIGGER_DECISION_TOOL_DecisionAccess_H
@@ -117,9 +117,9 @@ namespace Trig {
     template<class CONTAINER>
     std::vector< TrigCompositeUtils::LinkInfo<CONTAINER> > features(const Trig::ChainGroup* group,
                                                                     const unsigned int condition = TrigDefs::Physics,
-                                                                    const std::string container = "",
+                                                                    const std::string& container = "",
                                                                     const unsigned int featureCollectionMode = TrigDefs::oneFeaturePerLeg,
-                                                                    const std::string featureName = "feature") const;
+                                                                    const std::string& featureName = "feature") const;
 
     /**
      * @brief Runs 3+. Returns features related to given chain
@@ -133,9 +133,9 @@ namespace Trig {
     template<class CONTAINER>
     std::vector< TrigCompositeUtils::LinkInfo<CONTAINER> > features(const std::string& chainName = "HLT_.*",
                                                                     const unsigned int condition = TrigDefs::Physics,
-                                                                    const std::string container = "",
+                                                                    const std::string& container = "",
                                                                     const unsigned int featureCollectionMode = TrigDefs::oneFeaturePerLeg,
-                                                                    const std::string featureName = "feature") const;
+                                                                    const std::string& featureName = "feature") const;
 
     /**
      * @brief gives back feature matching (by seeding relation)
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionAccess.icc b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionAccess.icc
index f19fc60cb2dfcd9f527443358641d934a1436ce8..13b59e5bd8235f79d4e283842d3c371db63ce102 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionAccess.icc
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/DecisionAccess.icc
@@ -46,9 +46,9 @@ const std::vector<Trig::Feature<T> > Trig::DecisionAccess::ancestors(const HLT::
 template<class CONTAINER>
 std::vector< TrigCompositeUtils::LinkInfo<CONTAINER> > Trig::DecisionAccess::features(const Trig::ChainGroup* group,
                                                                   const unsigned int condition,
-                                                                  const std::string container,
+                                                                  const std::string& container,
                                                                   const unsigned int featureCollectionMode,
-                                                                  const std::string featureName) const {
+                                                                  const std::string& featureName) const {
   // const TrigCompositeUtils::DecisionContainer* terminusNode = SG::get(m_HLTSummaryKeyIn/*, context*/);
   return group->features<CONTAINER>(cgm()->store(), condition, container, featureCollectionMode, featureName);
 }
@@ -56,9 +56,9 @@ std::vector< TrigCompositeUtils::LinkInfo<CONTAINER> > Trig::DecisionAccess::fea
 template<class CONTAINER>
 std::vector< TrigCompositeUtils::LinkInfo<CONTAINER> > Trig::DecisionAccess::features(const std::string& chainName,
                                                                   const unsigned int condition,
-                                                                  const std::string container,
+                                                                  const std::string& container,
                                                                   const unsigned int featureCollectionMode,
-                                                                  const std::string featureName) const {
+                                                                  const std::string& featureName) const {
   const Trig::ChainGroup *g = cgm()->createChainGroup(Trig::convertStringToVector(chainName));
   return features<CONTAINER>(g, condition, container, featureCollectionMode, featureName);
 }