diff --git a/Reconstruction/tauRecTools/src/TauAxisSetter.cxx b/Reconstruction/tauRecTools/src/TauAxisSetter.cxx
index 4ed82d2f0d16ae17547f4e66e86cdd9f1d1a0098..3deb8f034366af13c3bb9f28c29e2e128d2aa251 100644
--- a/Reconstruction/tauRecTools/src/TauAxisSetter.cxx
+++ b/Reconstruction/tauRecTools/src/TauAxisSetter.cxx
@@ -3,118 +3,113 @@
 */
 
 #ifndef XAOD_ANALYSIS
+
+#include "TauAxisSetter.h"
+#include "tauRecTools/HelperFunctions.h"
+
 #include "xAODTau/TauJetContainer.h"
 #include "xAODTau/TauJetAuxContainer.h"
 #include "xAODTau/TauJet.h"
-
 #include "CaloUtils/CaloVertexedCluster.h"
 
-#include "TauAxisSetter.h"
-#include "tauRecTools/HelperFunctions.h"
 
-/********************************************************************/
+
 TauAxisSetter::TauAxisSetter(const std::string& name) :
 TauRecToolBase(name) {
 }
 
-/********************************************************************/
-TauAxisSetter::~TauAxisSetter() { }
 
-/********************************************************************/
-StatusCode TauAxisSetter::initialize()
-{
-    return StatusCode::SUCCESS;
+
+TauAxisSetter::~TauAxisSetter() { 
 }
 
-/********************************************************************/
-StatusCode TauAxisSetter::execute(xAOD::TauJet& pTau) const
-{
 
-    const xAOD::Jet* pJetSeed = (*pTau.jetLink());
-    if (!pJetSeed) {
-        ATH_MSG_ERROR("Tau jet link is invalid.");
-        return StatusCode::FAILURE;
-    }
 
-    xAOD::JetConstituentVector::const_iterator cItr = pJetSeed->getConstituents().begin();
-    xAOD::JetConstituentVector::const_iterator cItrE = pJetSeed->getConstituents().end();
+StatusCode TauAxisSetter::initialize() {
+  return StatusCode::SUCCESS;
+}
 
-    ///////////////////////////////////////////////////////////////////////////
-    //calculate barycenter
-    TLorentzVector sumAllClusterVector;
-    TLorentzVector tempClusterVector;
-    for (; cItr != cItrE; ++cItr) {
-      tempClusterVector.SetPtEtaPhiE( (*cItr)->pt(), (*cItr)->eta(), (*cItr)->phi(), (*cItr)->e() );
 
-      sumAllClusterVector += tempClusterVector;
-    }
-    TLorentzVector BaryCenter; 
-    BaryCenter.SetPtEtaPhiM(1., sumAllClusterVector.Eta(), sumAllClusterVector.Phi(), 0.);
 
-    ATH_MSG_DEBUG("barycenter:" << BaryCenter.Pt()<< " " << BaryCenter.Eta() << " " << BaryCenter.Phi()  << " " << BaryCenter.E() );
-    
-    ///////////////////////////////////////////////////////////////////////////
-    // calculate detector axis
-    TLorentzVector tauDetectorAxis;
-    // count number of constituents in core cone. could be zero!
-    int nConstituents = 0;
-    for (cItr = pJetSeed->getConstituents().begin(); cItr != cItrE; ++cItr) {
-	tempClusterVector.SetPtEtaPhiE( (*cItr)->pt(), (*cItr)->eta(), (*cItr)->phi(), (*cItr)->e() );
+StatusCode TauAxisSetter::execute(xAOD::TauJet& pTau) const {
 
-	ATH_MSG_VERBOSE("cluster in detector axis loop:" << (*cItr)->pt()<< " " << (*cItr)->eta() << " " << (*cItr)->phi()  << " " << (*cItr)->e() );
-	ATH_MSG_VERBOSE("delta R is " << BaryCenter.DeltaR(tempClusterVector) );
+  const xAOD::Jet* pJetSeed = (*pTau.jetLink());
+  if (!pJetSeed) {
+    ATH_MSG_ERROR("Tau jet link is invalid.");
+    return StatusCode::FAILURE;
+  }
 
-    if (BaryCenter.DeltaR(tempClusterVector) > m_clusterCone) continue;
+  // Barycenter is the sum of cluster p4 in the seed jet
+  TLorentzVector baryonCenter;  
+  
+  xAOD::JetConstituentVector constituents = pJetSeed->getConstituents();
+  for (const xAOD::JetConstituent* constituent : constituents) {
+    TLorentzVector constituentP4;
+    constituentP4.SetPtEtaPhiE(constituent->pt(), constituent->eta(), constituent->phi(), constituent->e());
+    baryonCenter += constituentP4;
+  }
+  
+  ATH_MSG_DEBUG("barycenter (eta, phi): "  << baryonCenter.Eta() << " " << baryonCenter.Phi());
 
-	ElementLink<xAOD::IParticleContainer> linkToCluster;
-	linkToCluster.toContainedElement( *(static_cast<const xAOD::IParticleContainer*> ((*cItr)->rawConstituent()->container())), (*cItr)->rawConstituent() );
-	pTau.addClusterLink(linkToCluster);
+  // Detector axis is the sum of cluster p4 within dR core of the seed jet 
+  TLorentzVector tauDetectorAxis;
+  int nConstituents = 0;
 
-	nConstituents++;
-	tauDetectorAxis += tempClusterVector;
-    }
-    
-    if  ( 0 == nConstituents )
-    {
-	    ATH_MSG_DEBUG("this tau candidate does not have any constituent clusters!");
-	    return StatusCode::FAILURE;
-    }
-    
-    // save values for detector axis.
-    ATH_MSG_DEBUG("detector axis:" << tauDetectorAxis.Pt()<< " " << tauDetectorAxis.Eta() << " " << tauDetectorAxis.Phi()  << " " << tauDetectorAxis.E() );
-    pTau.setP4(tauDetectorAxis.Pt(), tauDetectorAxis.Eta(), tauDetectorAxis.Phi(), pTau.m());
-    pTau.setP4(xAOD::TauJetParameters::DetectorAxis, tauDetectorAxis.Pt(), tauDetectorAxis.Eta(), tauDetectorAxis.Phi(), tauDetectorAxis.M());
-
-    ///////////////////////////////////////////////////////////////////////////
-    // calculate tau intermediate axis (corrected for tau vertex), only used by offline
-    if(m_doVertexCorrection)
-    {
-	TLorentzVector tauInterAxis;
-
-	std::vector<const xAOD::CaloCluster*> clusterList;
-	ATH_CHECK(tauRecTools::GetJetClusterList(pJetSeed, clusterList, m_incShowerSubtr, BaryCenter, m_clusterCone));
-	for (auto cluster : clusterList){
-	  if (pTau.vertexLink())
-	    tauInterAxis += xAOD::CaloVertexedCluster(*cluster, (*pTau.vertexLink())->position()).p4();
-	  else
-	    tauInterAxis += xAOD::CaloVertexedCluster(*cluster).p4();
-	}
-
-	// save values for intermediate axis 
-	ATH_MSG_DEBUG("tau axis:" << tauInterAxis.Pt()<< " " << tauInterAxis.Eta() << " " << tauInterAxis.Phi()  << " " << tauInterAxis.E() );
-        pTau.setP4(tauInterAxis.Pt(), tauInterAxis.Eta(), tauInterAxis.Phi(), pTau.m());
-	pTau.setP4(xAOD::TauJetParameters::IntermediateAxis, tauInterAxis.Pt(), tauInterAxis.Eta(), tauInterAxis.Phi(), tauInterAxis.M());
+  for (const xAOD::JetConstituent* constituent : constituents) {
+    TLorentzVector constituentP4;
+    constituentP4.SetPtEtaPhiE(constituent->pt(), constituent->eta(), constituent->phi(), constituent->e());
     
+    double dR = baryonCenter.DeltaR(constituentP4);
+    if (dR > m_clusterCone) continue;
+
+    ElementLink<xAOD::IParticleContainer> linkToCluster;
+    linkToCluster.toContainedElement(
+      *(static_cast<const xAOD::IParticleContainer*> (constituent->rawConstituent()->container())), 
+      constituent->rawConstituent()
+      );
+    pTau.addClusterLink(linkToCluster);
+
+    tauDetectorAxis += constituentP4;
+    ++nConstituents;
+  }
+
+  if (0 == nConstituents) {
+    ATH_MSG_DEBUG("this tau candidate does not have any constituent clusters!");
+    return StatusCode::FAILURE;
+  }
+
+  ATH_MSG_DEBUG("detector axis:" << tauDetectorAxis.Pt()<< " " << tauDetectorAxis.Eta() << " " << tauDetectorAxis.Phi()  << " " << tauDetectorAxis.E());
+  pTau.setP4(tauDetectorAxis.Pt(), tauDetectorAxis.Eta(), tauDetectorAxis.Phi(), pTau.m());
+  pTau.setP4(xAOD::TauJetParameters::DetectorAxis, tauDetectorAxis.Pt(), tauDetectorAxis.Eta(), tauDetectorAxis.Phi(), tauDetectorAxis.M());
+
+
+  if(m_doVertexCorrection) {
+    // calculate tau intermediate axis (corrected for tau vertex)
+    TLorentzVector tauInterAxis;
+
+    std::vector<const xAOD::CaloCluster*> clusterList;
+    ATH_CHECK(tauRecTools::GetJetClusterList(pJetSeed, clusterList, m_incShowerSubtr, baryonCenter, m_clusterCone));
+    for (auto cluster : clusterList){
+      if (pTau.vertexLink()) {
+        tauInterAxis += xAOD::CaloVertexedCluster(*cluster, (*pTau.vertexLink())->position()).p4();
+      }
+      else {
+        tauInterAxis += xAOD::CaloVertexedCluster(*cluster).p4();
+      }
     }
-    
-    return StatusCode::SUCCESS;
+
+    ATH_MSG_DEBUG("tau axis:" << tauInterAxis.Pt()<< " " << tauInterAxis.Eta() << " " << tauInterAxis.Phi()  << " " << tauInterAxis.E() );
+    pTau.setP4(tauInterAxis.Pt(), tauInterAxis.Eta(), tauInterAxis.Phi(), pTau.m());
+    pTau.setP4(xAOD::TauJetParameters::IntermediateAxis, tauInterAxis.Pt(), tauInterAxis.Eta(), tauInterAxis.Phi(), tauInterAxis.M());
+  }
+
+  return StatusCode::SUCCESS;
 }
 
-//-----------------------------------------------------------------------------
-// Finalize
-//-----------------------------------------------------------------------------
-StatusCode TauAxisSetter::finalize()
-{
+
+
+StatusCode TauAxisSetter::finalize() {
     return StatusCode::SUCCESS;
 }
+
 #endif
diff --git a/Reconstruction/tauRecTools/src/TauAxisSetter.h b/Reconstruction/tauRecTools/src/TauAxisSetter.h
index 836aaed929c99e7d4962af20cb3a784d6461058a..024d90eb51cd6f71f33ba776e275ccf6f2756f57 100644
--- a/Reconstruction/tauRecTools/src/TauAxisSetter.h
+++ b/Reconstruction/tauRecTools/src/TauAxisSetter.h
@@ -12,8 +12,8 @@
  * @brief Set Tau "Detector Axis" and "Intermediate Axis". 
  * 
  *  Note that both axes starts from the barycenter of the cluster associated to the jet seed. 
- *  Then only the 4-vectors of clusters in a cone of dR around these barycenter are summed up, forming the new axis.
- *  For the "Intermediate Axis" the clusters are correct wrt tau vertex in this step (barycenter remains the same).
+ *  Then only the 4-vectors of clusters in a cone of dR around these barycenter are summed up, forming the detector axis.
+ *  For the "Intermediate Axis", the clusters are corrected wrt tau vertex in this step (barycenter remains the same).
  *  Using this procedure, the axes are different from the original jet seed axis.
  * 
  * @author Margar Simonyan
@@ -22,14 +22,24 @@
  */
 
 class TauAxisSetter : public TauRecToolBase {
-public:
-    TauAxisSetter(const std::string& name);
+
+  public:
+    
     ASG_TOOL_CLASS2(TauAxisSetter, TauRecToolBase, ITauToolBase);
+    
+    /** @brief Constructor */ 
+    TauAxisSetter(const std::string& name);
 
+    /** @brief Destructor */
     ~TauAxisSetter();
 
+    /** @brief Initialization of this tool */
     virtual StatusCode initialize() override;
+   
+    /** @brief Execution of this tool */ 
     virtual StatusCode execute(xAOD::TauJet& pTau) const override;
+    
+    /** @brief Finalization of this tool */
     virtual StatusCode finalize() override;
 
 private: