diff --git a/Event/xAOD/xAODForward/Root/AFPClusterAlgID.cxx b/Event/xAOD/xAODForward/Root/AFPClusterAlgID.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..d29878e24dc849def4ff02b58d8335b98255e466
--- /dev/null
+++ b/Event/xAOD/xAODForward/Root/AFPClusterAlgID.cxx
@@ -0,0 +1,18 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * @file   AFPClusterAlgID.h
+ * @author Grzegorz Gach <grzegorz.gach@cern.ch>
+ * @date   2017-04-14
+ * 
+ * @brief  Definitions of identification numbers of pixel clustering algorithms
+ * 
+ */
+
+#include "xAODForward/AFPClusterAlgID.h"
+
+const int xAOD::AFPClusterAlgID::singleHit = 0;
+const int xAOD::AFPClusterAlgID::nearestNeighbour = 1;
+
diff --git a/Event/xAOD/xAODForward/Root/AFPDefs.cxx b/Event/xAOD/xAODForward/Root/AFPDefs.cxx
deleted file mode 100644
index 650d1b76ca09025dec9a324cf76e42e46da8bf23..0000000000000000000000000000000000000000
--- a/Event/xAOD/xAODForward/Root/AFPDefs.cxx
+++ /dev/null
@@ -1,37 +0,0 @@
-// This file's extension implies that it's C, but it's really -*- C++ -*-.
-/*
- * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
- */
-// $Id$
-/**
- * @file xAODForward/AFPDefs.cxx
- * @author scott snyder <snyder@bnl.gov>
- * @date Jun, 2017
- * @brief Provide definitions for constants.
- *
- * A name defined in class scope like
- *   static const int foo = 1;
- *
- * still needs a separate definition if it is ever bound to a reference.
- * This can cause link failures, but often only in debug builds.
- * See <https://stackoverflow.com/questions/5391973/undefined-reference-to-static-const-int>
- */
-
-#include "xAODForward/AFPClusterAlgID.h"
-#include "xAODForward/AFPPixelLayerID.h"
-#include "xAODForward/AFPStationID.h"
-
-// These are all initialized in the headers; can't repeat it here.
-
-
-const int xAOD::AFPClusterAlgID::singleHit;
-const int xAOD::AFPClusterAlgID::nearestNeighbour;
-const int xAOD::AFPPixelLayerID::firstFromIP;
-const int xAOD::AFPPixelLayerID::secondFromIP;
-const int xAOD::AFPPixelLayerID::thirdFromIP;
-const int xAOD::AFPPixelLayerID::fourthFromIP;
-const int xAOD::AFPStationID::farA;
-const int xAOD::AFPStationID::nearA;
-const int xAOD::AFPStationID::nearC;
-const int xAOD::AFPStationID::farC;
-
diff --git a/Event/xAOD/xAODForward/Root/AFPPixelLayerID.cxx b/Event/xAOD/xAODForward/Root/AFPPixelLayerID.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..a34c447c5a947802540270be979c1c75a3174091
--- /dev/null
+++ b/Event/xAOD/xAODForward/Root/AFPPixelLayerID.cxx
@@ -0,0 +1,18 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * @file   AFPPixelLayerID.cxx
+ * @author Grzegorz Gach <grzegorz.gach@cern.ch>
+ * @date   2017-10-02
+ * 
+ * @brief  Definitions of silicon layers (tracking) identification numbers in an AFP station.
+ */
+
+#include "xAODForward/AFPPixelLayerID.h"
+
+const int xAOD::AFPPixelLayerID::firstFromIP = 0;
+const int xAOD::AFPPixelLayerID::secondFromIP = 1;
+const int xAOD::AFPPixelLayerID::thirdFromIP = 2;
+const int xAOD::AFPPixelLayerID::fourthFromIP = 3;
diff --git a/Event/xAOD/xAODForward/Root/AFPProtonAuxContainer_v1.cxx b/Event/xAOD/xAODForward/Root/AFPProtonAuxContainer_v1.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..0507ac058849e459d7836ab54c8eff74b83cb1b5
--- /dev/null
+++ b/Event/xAOD/xAODForward/Root/AFPProtonAuxContainer_v1.cxx
@@ -0,0 +1,31 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * @file   AFPProtonAuxContainer_v1.cxx
+ * @author Krzysztof Cieśla <krzysztof.marcin.ciesla@cern.ch>
+ * @date   2018-04-05
+ * 
+ * @brief  Implementation file for class AFPProtonAuxContainer_v1
+ * 
+ */
+
+
+// Local include(s):
+#include <xAODForward/versions/AFPProtonAuxContainer_v1.h>
+
+namespace xAOD {
+
+  AFPProtonAuxContainer_v1::AFPProtonAuxContainer_v1() : AuxContainerBase() {
+    AUX_VARIABLE(px);
+    AUX_VARIABLE(py);
+    AUX_VARIABLE(pz);
+    AUX_VARIABLE(e);
+    AUX_VARIABLE(side);
+    AUX_VARIABLE(chi2);
+    AUX_VARIABLE(methodID);
+    AUX_VARIABLE(afpTrackLinks);
+  }
+
+} // namespace xAOD
diff --git a/Event/xAOD/xAODForward/Root/AFPProton_v1.cxx b/Event/xAOD/xAODForward/Root/AFPProton_v1.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..ebf6469c883307fd17682b9d12ec842939c3ad98
--- /dev/null
+++ b/Event/xAOD/xAODForward/Root/AFPProton_v1.cxx
@@ -0,0 +1,156 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * @file   AFPProton_v1.cxx
+ * @author Krzysztof Cieśla <krzysztof.marcin.ciesla@cern.ch>
+ * @date   2018-04-05
+ * 
+ * @brief  Implementation file of the AFPProton_v1 class.
+ * 
+ */
+
+// xAOD include(s):
+#include "xAODCore/AuxStoreAccessorMacros.h"
+
+// Local include(s):
+#include "xAODForward/versions/AFPProton_v1.h"
+
+namespace xAOD {
+
+   AFPProton_v1::AFPProton_v1() : IParticle() {}
+
+   double AFPProton_v1::pt() const {
+
+      return p4().Pt();
+   }
+
+   double AFPProton_v1::eta() const {
+
+      return p4().Eta();
+   }
+
+   double AFPProton_v1::phi() const {
+
+      return p4().Phi();
+   }
+
+   double AFPProton_v1::m() const {
+
+      return p4().M();
+   }
+
+   AUXSTORE_PRIMITIVE_GETTER_WITH_CAST( AFPProton_v1, float, double, e )
+
+   double AFPProton_v1::rapidity() const {
+
+      return p4().Rapidity();
+   }
+
+   AFPProton_v1::FourMom_t AFPProton_v1::p4() const {
+
+      FourMom_t p4;
+      p4.SetPxPyPzE( px(), py(), pz(), e() );
+
+      return p4;
+   }
+
+   Type::ObjectType AFPProton_v1::type() const {
+
+      return Type::Particle;
+   }
+
+   AUXSTORE_PRIMITIVE_GETTER( AFPProton_v1, float, px )
+   AUXSTORE_PRIMITIVE_GETTER( AFPProton_v1, float, py )
+   AUXSTORE_PRIMITIVE_GETTER( AFPProton_v1, float, pz )
+
+   void AFPProton_v1::setPxPyPzE( float px, float py, float pz, float e ) {
+
+      setPx( px );
+      setPy( py );
+      setPz( pz );
+      setE( e );
+
+      return;
+   }
+
+   void AFPProton_v1::setPx( float value ) {
+
+      static const Accessor< float > acc( "px" );
+      acc( *this ) = value;
+      return;
+   }
+
+   void AFPProton_v1::setPy( float value ) {
+
+      static const Accessor< float > acc( "py" );
+      acc( *this ) = value;
+      return;
+   }
+
+   void AFPProton_v1::setPz( float value ) {
+
+      static const Accessor< float > acc( "pz" );
+      acc( *this ) = value;
+      return;
+   }
+
+   void AFPProton_v1::setE( float value ) {
+
+      static const Accessor< float > acc( "e" );
+      acc( *this ) = value;
+      return;
+   }
+
+   AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( AFPProton_v1, float, chi2, setChi2 )
+   AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( AFPProton_v1, int, side, setSide )
+   AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( AFPProton_v1, int, methodID,
+                                         setMethodID )
+
+   AUXSTORE_OBJECT_SETTER_AND_GETTER( AFPProton_v1,
+                                      std::vector< AFPProton_v1::AFPTrackLink_t >,
+                                      afpTrackLinks, setAFPTrackLinks )
+
+   /// Helper variable
+   static const
+   SG::AuxElement::Accessor< std::vector< AFPProton_v1::AFPTrackLink_t > >
+   tracksAcc( "afpTrackLinks" );
+
+   void AFPProton_v1::addAFPTrackLink( const AFPTrackLink_t& newTrack ) {
+
+      tracksAcc( *this ).push_back( newTrack );
+      return;
+   }
+
+   size_t AFPProton_v1::nTracks() const {
+
+      // Check if the links are available:
+      if( ! tracksAcc.isAvailable( *this ) ) {
+         return 0;
+      }
+
+      return tracksAcc( *this ).size();
+   }
+
+   const AFPTrack* AFPProton_v1::track( size_t index ) const {
+
+      // Check if the links are available:
+      if( ! tracksAcc.isAvailable( *this ) ) {
+         return nullptr;
+      }
+
+      // Use the at(...) function so the code would throw an exception if an
+      // impossible index is requested:
+      auto link = tracksAcc( *this ).at( index );
+
+      // Check if the link can be de-referenced:
+      if( ! link.isValid() ) {
+         return nullptr;
+      }
+
+      // Return the pointer:
+      return *link;
+   }
+
+} // namespace xAOD
diff --git a/Event/xAOD/xAODForward/Root/AFPSiHitAuxContainer_v2.cxx b/Event/xAOD/xAODForward/Root/AFPSiHitAuxContainer_v2.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..8226bc00de69a56f648a61d91aac7121ac1caba2
--- /dev/null
+++ b/Event/xAOD/xAODForward/Root/AFPSiHitAuxContainer_v2.cxx
@@ -0,0 +1,30 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * @file   AFPSiHitAuxContainer_v2.cxx
+ * @author Grzegorz Gach <grzegorz.gach@cern.ch>
+ * @date   2017-04-26
+ * 
+ * @brief  Implementation file for class AFPSiHitAuxContainer_v2
+ * 
+ */
+
+
+// Local include(s):
+#include "xAODForward/versions/AFPSiHitAuxContainer_v2.h"
+ 
+namespace xAOD {
+ 
+  AFPSiHitAuxContainer_v2::AFPSiHitAuxContainer_v2()
+    : AuxContainerBase() {
+    AUX_VARIABLE( depositedCharge );
+    AUX_VARIABLE( timeOverThreshold );
+    AUX_VARIABLE( stationID );
+    AUX_VARIABLE( pixelLayerID );
+    AUX_VARIABLE( pixelRowIDChip );
+    AUX_VARIABLE( pixelColIDChip );
+  }
+ 
+} // namespace xAOD
diff --git a/Event/xAOD/xAODForward/Root/AFPSiHit_v1.cxx b/Event/xAOD/xAODForward/Root/AFPSiHit_v1.cxx
index e07e1464aa172829ab1a9e778b7dae9f5c264ed8..62115de52bb320a4e33acae9f194ff85ae54333f 100644
--- a/Event/xAOD/xAODForward/Root/AFPSiHit_v1.cxx
+++ b/Event/xAOD/xAODForward/Root/AFPSiHit_v1.cxx
@@ -16,7 +16,7 @@
 #include "xAODCore/AuxStoreAccessorMacros.h"
 
 // Local include(s):
-#include "xAODForward/AFPTrackContainer.h"
+#include "xAODForward/versions/AFPTrackContainer_v1.h"
 #include "xAODForward/versions/AFPSiHit_v1.h"
 
 
@@ -27,7 +27,6 @@ namespace xAOD
 
   AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPSiHit_v1, float, depositedCharge, setDepositedCharge)
   AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPSiHit_v1, float, timeOverThreshold, setTimeOverThreshold)
-  //  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPSiHit_v1, float, discriminator, setDiscriminator)
   AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPSiHit_v1, int, stationID, setStationID)
   AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPSiHit_v1, int, pixelLayerID, setPixelLayerID)
   AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPSiHit_v1, int, pixelRowIDChip, setPixelRowIDChip)
diff --git a/Event/xAOD/xAODForward/Root/AFPSiHit_v2.cxx b/Event/xAOD/xAODForward/Root/AFPSiHit_v2.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..382f8212aef9fa0367ed9fe90ad3a07521a04dd2
--- /dev/null
+++ b/Event/xAOD/xAODForward/Root/AFPSiHit_v2.cxx
@@ -0,0 +1,63 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * @file   AFPSiHit_v2.cxx
+ * @author Grzegorz Gach <grzegorz.gach@cern.ch>
+ * @date   2017-04-26
+ * 
+ * @brief  Implementation file of the AFPSiHit_v2 class.
+ * 
+ */
+
+
+// xAOD include(s):
+#include "xAODCore/AuxStoreAccessorMacros.h"
+
+// Local include(s):
+#include "xAODForward/versions/AFPSiHit_v2.h"
+
+
+namespace xAOD
+{
+  AFPSiHit_v2::AFPSiHit_v2() : SG::AuxElement()
+  { }
+
+  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPSiHit_v2, float, depositedCharge, setDepositedCharge)
+  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPSiHit_v2, float, timeOverThreshold, setTimeOverThreshold)
+  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPSiHit_v2, int, stationID, setStationID)
+  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPSiHit_v2, int, pixelLayerID, setPixelLayerID)
+  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPSiHit_v2, int, pixelRowIDChip, setPixelRowIDChip)
+  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPSiHit_v2, int, pixelColIDChip, setPixelColIDChip)
+  
+  void AFPSiHit_v2::toPersistent() {
+  }
+  
+  int AFPSiHit_v2::pixelHorizID() const
+  {
+    // use pixel rows because detectors are rotated and subtract
+    // from 336, because the axis is reversed
+    return 336 - pixelRowIDChip();
+  }
+
+  void AFPSiHit_v2::setPixelHorizID(const int horizontalID) 
+  {
+    // use pixel rows because detectors are rotated and subtract
+    // from 336, because the axis is reversed
+    setPixelRowIDChip (336 - horizontalID);
+  }
+
+
+  int AFPSiHit_v2::pixelVertID() const
+  {
+    // use pixel columns because detectors are rotated
+    return pixelColIDChip();
+  }
+
+  void AFPSiHit_v2::setPixelVertID(const int verticalID) 
+  {
+    // use pixel columns because detectors are rotated
+    setPixelColIDChip (verticalID);
+  }
+} // end xAOD
diff --git a/Event/xAOD/xAODForward/Root/AFPStationID.cxx b/Event/xAOD/xAODForward/Root/AFPStationID.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..cd6c6b850ffab20be1eafcf99795011b69c545e7
--- /dev/null
+++ b/Event/xAOD/xAODForward/Root/AFPStationID.cxx
@@ -0,0 +1,18 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * @file   AFPStationID.cxx
+ * @author Grzegorz Gach <grzegorz.gach@cern.ch>
+ * @date   2017-10-02
+ * 
+ * @brief  Definitions of AFP stations identification numbers.
+ */
+
+#include "xAODForward/AFPStationID.h"
+
+const int xAOD::AFPStationID::farA = 0;
+const int xAOD::AFPStationID::nearA = 1;
+const int xAOD::AFPStationID::nearC = 2;
+const int xAOD::AFPStationID::farC = 3;
diff --git a/Event/xAOD/xAODForward/Root/AFPToFHitAuxContainer_v1.cxx b/Event/xAOD/xAODForward/Root/AFPToFHitAuxContainer_v1.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..47612c177cab76adf13bff661c9fdcc5d5748459
--- /dev/null
+++ b/Event/xAOD/xAODForward/Root/AFPToFHitAuxContainer_v1.cxx
@@ -0,0 +1,22 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+// Local include(s):
+#include "xAODForward/versions/AFPToFHitAuxContainer_v1.h"
+ 
+namespace xAOD {
+ 
+  AFPToFHitAuxContainer_v1::AFPToFHitAuxContainer_v1()
+    : AuxContainerBase() {   
+    AUX_VARIABLE( stationID );
+    AUX_VARIABLE( time );
+    AUX_VARIABLE( hptdcChannel );
+    AUX_VARIABLE( barInTrainID );
+    AUX_VARIABLE( trainID );
+    AUX_VARIABLE( pulseLength );
+    AUX_VARIABLE( hptdcID );
+  }
+ 
+} // namespace xAOD
diff --git a/Event/xAOD/xAODForward/Root/AFPToFHit_v1.cxx b/Event/xAOD/xAODForward/Root/AFPToFHit_v1.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..56f849b81ead1fc505747d30ecfd8daf6556a845
--- /dev/null
+++ b/Event/xAOD/xAODForward/Root/AFPToFHit_v1.cxx
@@ -0,0 +1,25 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// xAOD include(s):
+#include "xAODCore/AuxStoreAccessorMacros.h"
+
+// Local include(s):
+#include "xAODForward/versions/AFPToFHit_v1.h"
+//#include "xAODForward/AFPTrackContainer.h"
+
+
+namespace xAOD
+{
+  AFPToFHit_v1::AFPToFHit_v1() : SG::AuxElement()
+  { }
+
+  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPToFHit_v1, int, stationID, setStationID)
+  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPToFHit_v1, float, time, setTime)
+  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPToFHit_v1, int, hptdcChannel, setHptdcChannel)
+  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPToFHit_v1, int, barInTrainID, setBarInTrainID)
+  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPToFHit_v1, int, trainID, setTrainID)
+  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPToFHit_v1, float, pulseLength, setPulseLength)
+  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPToFHit_v1, int, hptdcID, setHptdcID)  
+}
diff --git a/Event/xAOD/xAODForward/Root/AFPTrackAuxContainer_v2.cxx b/Event/xAOD/xAODForward/Root/AFPTrackAuxContainer_v2.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..0aa5be37a92a46534793f709bc0aedd3fe28b42f
--- /dev/null
+++ b/Event/xAOD/xAODForward/Root/AFPTrackAuxContainer_v2.cxx
@@ -0,0 +1,36 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * @file   AFPTrackAuxContainer_v2.cxx
+ * @author Grzegorz Gach <grzegorz.gach@cern.ch>
+ * @date   2017-04-26
+ * 
+ * @brief  Implementation file for class xAOD::AFPTrackAuxContainer_v2
+ * 
+ */
+
+
+// Local include(s):
+#include "xAODForward/versions/AFPTrackAuxContainer_v2.h"
+ 
+namespace xAOD {
+ 
+  AFPTrackAuxContainer_v2::AFPTrackAuxContainer_v2()
+    : AuxContainerBase() {
+    
+    AUX_VARIABLE( stationID );
+    AUX_VARIABLE( xLocal );
+    AUX_VARIABLE( yLocal );
+    AUX_VARIABLE( zLocal );
+    AUX_VARIABLE( xSlope );
+    AUX_VARIABLE( ySlope );
+    AUX_VARIABLE( nHoles );
+    AUX_VARIABLE( nClusters );
+    AUX_VARIABLE( chi2 );
+    AUX_VARIABLE( algID );
+    AUX_VARIABLE( clusters );
+  }
+ 
+} // namespace xAOD
diff --git a/Event/xAOD/xAODForward/Root/AFPTrackRecoAlgID.cxx b/Event/xAOD/xAODForward/Root/AFPTrackRecoAlgID.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..3bce1c686ca6eb8d25c3a09d9530b4cdc35af0ac
--- /dev/null
+++ b/Event/xAOD/xAODForward/Root/AFPTrackRecoAlgID.cxx
@@ -0,0 +1,17 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * @file   AFPTrackRecoAlgID.cxx
+ * @author Grzegorz Gach <grzegorz.gach@cern.ch>
+ * @date   2017-10-07
+ * 
+ * @brief  Definitions of identification numbers of track reconstruction algorithms
+ * 
+ */
+
+#include "xAODForward/AFPTrackRecoAlgID.h"
+
+const int xAOD::AFPTrackRecoAlgID::basicKalman = 0;
+
diff --git a/Event/xAOD/xAODForward/Root/AFPTrack_v1.cxx b/Event/xAOD/xAODForward/Root/AFPTrack_v1.cxx
index 850135dd4ef616204b38ab9180fb7c6df4bf6e4c..6223ee1dc5d05476c508a0adfbdd4afb0a36d8b8 100644
--- a/Event/xAOD/xAODForward/Root/AFPTrack_v1.cxx
+++ b/Event/xAOD/xAODForward/Root/AFPTrack_v1.cxx
@@ -16,7 +16,7 @@
 #include "xAODCore/AuxStoreAccessorMacros.h"
 
 // Local include(s):
-#include "xAODForward/AFPSiHitContainer.h"
+#include "xAODForward/versions/AFPSiHitContainer_v1.h"
 #include "xAODForward/versions/AFPTrack_v1.h"
 
 namespace xAOD
diff --git a/Event/xAOD/xAODForward/Root/AFPTrack_v2.cxx b/Event/xAOD/xAODForward/Root/AFPTrack_v2.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..4e0b466bc858c7d4eedaf43192c22cc214e582a0
--- /dev/null
+++ b/Event/xAOD/xAODForward/Root/AFPTrack_v2.cxx
@@ -0,0 +1,53 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * @file   AFPTrack_v2.cxx
+ * @author Grzegorz Gach <grzegorz.gach@cern.ch>
+ * @date   2017-04-26
+ * 
+ * @brief  Implementation file for class xAOD::AFPTrack_v2
+ * 
+ */
+
+
+// xAOD include(s):
+#include "xAODCore/AuxStoreAccessorMacros.h"
+
+// Local include(s):
+#include "xAODForward/versions/AFPSiHitsClusterContainer_v1.h"
+#include "xAODForward/versions/AFPTrack_v2.h"
+
+namespace xAOD
+{
+  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPTrack_v2, int, stationID, setStationID)
+  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPTrack_v2, float, xLocal, setXLocal)
+  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPTrack_v2, float, yLocal, setYLocal)
+  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPTrack_v2, float, zLocal, setZLocal)
+  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPTrack_v2, float, xSlope, setXSlope)
+  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPTrack_v2, float, ySlope, setYSlope)
+  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPTrack_v2, int, nHoles, setNHoles)
+  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPTrack_v2, int, nClusters, setNClusters)
+  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPTrack_v2, float, chi2, setChi2)
+  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPTrack_v2, int, algID, setAlgID)
+
+  AUXSTORE_OBJECT_SETTER_AND_GETTER (AFPTrack_v2, std::vector< AFPTrack_v2::AFPClusterLink_t >, clusters, setClusters)
+  static SG::AuxElement::Accessor< std::vector<AFPTrack_v2::AFPClusterLink_t> > clustersAcc( "clusters" );
+
+  void AFPTrack_v2::addCluster( const AFPClusterLink_t& link )
+  {
+    clustersAcc( *this ).push_back( link );
+  }
+
+  void AFPTrack_v2::toPersistent() {
+    // Prepare the clusters links for persistification:
+    if( clustersAcc.isAvailableWritable( *this ) ) {
+      std::vector<AFPTrack_v2::AFPClusterLink_t>::iterator end = clustersAcc( *this ).end();
+      for(std::vector<AFPTrack_v2::AFPClusterLink_t>::iterator itr = clustersAcc( *this ).begin(); itr != end; ++itr )
+	itr->toPersistent();
+
+    }
+  }
+  
+}
diff --git a/Event/xAOD/xAODForward/Root/dict/ContainerProxies.cxx b/Event/xAOD/xAODForward/Root/dict/ContainerProxies.cxx
index 4a64c456336ebaac1b8f8ed99bd060d668b5158d..ddaa1bcc8d04e77d393f2c12eaa07b160d95a16e 100644
--- a/Event/xAOD/xAODForward/Root/dict/ContainerProxies.cxx
+++ b/Event/xAOD/xAODForward/Root/dict/ContainerProxies.cxx
@@ -9,8 +9,12 @@
 #include "xAODForward/versions/ALFADataContainer_v1.h"
 #include "xAODForward/versions/AFPDataContainer_v1.h"
 #include "xAODForward/versions/AFPSiHitContainer_v1.h"
+#include "xAODForward/versions/AFPSiHitContainer_v2.h"
+#include "xAODForward/versions/AFPToFHitContainer_v1.h"
 #include "xAODForward/versions/AFPSiHitsClusterContainer_v1.h"
 #include "xAODForward/versions/AFPTrackContainer_v1.h"
+#include "xAODForward/versions/AFPTrackContainer_v2.h"
+#include "xAODForward/versions/AFPProtonContainer_v1.h"
 #include "xAODForward/versions/ZdcModuleContainer_v1.h"
 #include "xAODForward/versions/MBTSModuleContainer_v1.h"
 #include "xAODForward/versions/ForwardEventInfoContainer_v1.h"
@@ -18,9 +22,13 @@
 // Set up the collection proxies:
 ADD_NS_DV_PROXY( xAOD, ALFADataContainer_v1 );
 ADD_NS_DV_PROXY( xAOD, AFPDataContainer_v1 );
+ADD_NS_DV_PROXY( xAOD, AFPSiHitContainer_v2 );
 ADD_NS_DV_PROXY( xAOD, AFPSiHitContainer_v1 );
+ADD_NS_DV_PROXY( xAOD, AFPToFHitContainer_v1 );
 ADD_NS_DV_PROXY( xAOD, AFPSiHitsClusterContainer_v1 );
 ADD_NS_DV_PROXY( xAOD, AFPTrackContainer_v1 );
+ADD_NS_DV_PROXY( xAOD, AFPTrackContainer_v2 );
+ADD_NS_DV_PROXY( xAOD, AFPProtonContainer_v1 );
 ADD_NS_DV_PROXY( xAOD, ZdcModuleContainer_v1 );
 ADD_NS_DV_PROXY( xAOD, MBTSModuleContainer_v1 );
 ADD_NS_DV_PROXY( xAOD, ForwardEventInfoContainer_v1 );
diff --git a/Event/xAOD/xAODForward/Root/xAODForwardCLIDs.cxx b/Event/xAOD/xAODForward/Root/xAODForwardCLIDs.cxx
index 990e36fb40e1d50354e095995a472825f7b0a1eb..ecef5014c4bb8a17b57ebe493b27e25d57624503 100644
--- a/Event/xAOD/xAODForward/Root/xAODForwardCLIDs.cxx
+++ b/Event/xAOD/xAODForward/Root/xAODForwardCLIDs.cxx
@@ -15,7 +15,11 @@
 
 #include "xAODForward/AFPSiHitContainer.h"
 #include "xAODForward/AFPSiHitAuxContainer.h"
+#include "xAODForward/AFPToFHitContainer.h"
+#include "xAODForward/AFPToFHitAuxContainer.h"
 #include "xAODForward/AFPSiHitsClusterContainer.h"
 #include "xAODForward/AFPSiHitsClusterAuxContainer.h"
 #include "xAODForward/AFPTrackContainer.h"
 #include "xAODForward/AFPTrackAuxContainer.h"
+#include "xAODForward/AFPProtonContainer.h"
+#include "xAODForward/AFPProtonAuxContainer.h"
diff --git a/Event/xAOD/xAODForward/xAODForward/AFPClusterAlgID.h b/Event/xAOD/xAODForward/xAODForward/AFPClusterAlgID.h
index 34e1ce0e41021ec1c0890abb2e567c9c7b64f9d9..d6d5b611132cce6d1cde8864a33bd892820534fb 100644
--- a/Event/xAOD/xAODForward/xAODForward/AFPClusterAlgID.h
+++ b/Event/xAOD/xAODForward/xAODForward/AFPClusterAlgID.h
@@ -44,8 +44,8 @@ namespace xAOD
   class AFPClusterAlgID
   {
   public:
-    static const int singleHit = 0; ///< Single hit algorithm
-    static const int nearestNeighbour = 1; ///< Nearest neighbour algorithm
+    static const int singleHit; ///< Single hit algorithm
+    static const int nearestNeighbour; ///< Nearest neighbour algorithm
   };
 
 }
diff --git a/Event/xAOD/xAODForward/xAODForward/AFPPixelLayerID.h b/Event/xAOD/xAODForward/xAODForward/AFPPixelLayerID.h
index 93a357c38e1e2878d18a69168cefb316cae5e0e1..abc77686f0a82d67a88f45d948edab2f00991f6c 100644
--- a/Event/xAOD/xAODForward/xAODForward/AFPPixelLayerID.h
+++ b/Event/xAOD/xAODForward/xAODForward/AFPPixelLayerID.h
@@ -57,10 +57,10 @@ namespace xAOD
   class AFPPixelLayerID
   {
   public:
-    static const int firstFromIP = 0; ///< the silicon layer closest to the interaction point
-    static const int secondFromIP = 1; ///< the second silicon layer counting from the interaction point
-    static const int thirdFromIP = 2; ///< the third silicon layer counting from the interaction point
-    static const int fourthFromIP = 3; ///< the fourth (last) silicon layer counting from the interaction point
+    static const int firstFromIP; ///< the silicon layer closest to the interaction point
+    static const int secondFromIP; ///< the second silicon layer counting from the interaction point
+    static const int thirdFromIP; ///< the third silicon layer counting from the interaction point
+    static const int fourthFromIP; ///< the fourth (last) silicon layer counting from the interaction point
   };
 
 }
diff --git a/Event/xAOD/xAODForward/xAODForward/AFPProton.h b/Event/xAOD/xAODForward/xAODForward/AFPProton.h
new file mode 100644
index 0000000000000000000000000000000000000000..8d24a360094fc7bba2a07d0dcbd14a8d1aab2034
--- /dev/null
+++ b/Event/xAOD/xAODForward/xAODForward/AFPProton.h
@@ -0,0 +1,14 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef XAODFORWARD_AFPPROTON_H
+#define XAODFORWARD_AFPPROTON_H
+
+#include"xAODForward/versions/AFPProton_v1.h"
+
+namespace xAOD {
+  typedef AFPProton_v1 AFPProton;
+}
+
+#endif
diff --git a/Event/xAOD/xAODForward/xAODForward/AFPProtonAuxContainer.h b/Event/xAOD/xAODForward/xAODForward/AFPProtonAuxContainer.h
new file mode 100644
index 0000000000000000000000000000000000000000..4a27e7c9cc4cd2cabf932446824868ecf04dfebe
--- /dev/null
+++ b/Event/xAOD/xAODForward/xAODForward/AFPProtonAuxContainer.h
@@ -0,0 +1,17 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef XAODFORWARD_AFPPROTONAUXCONTAINER_H
+#define XAODFORWARD_AFPPROTONAUXCONTAINER_H
+
+#include"xAODForward/versions/AFPProtonAuxContainer_v1.h"
+
+namespace xAOD {
+  typedef AFPProtonAuxContainer_v1 AFPProtonAuxContainer;
+}
+
+#include "xAODCore/CLASS_DEF.h"
+CLASS_DEF( xAOD::AFPProtonAuxContainer, 1243311643, 1 )
+
+#endif
diff --git a/Event/xAOD/xAODForward/xAODForward/AFPProtonContainer.h b/Event/xAOD/xAODForward/xAODForward/AFPProtonContainer.h
new file mode 100644
index 0000000000000000000000000000000000000000..87aad661f5d69140dc9fd2a9f59857d5587bfa63
--- /dev/null
+++ b/Event/xAOD/xAODForward/xAODForward/AFPProtonContainer.h
@@ -0,0 +1,17 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef XAODFORWARD_AFPPROTONCONTAINER_H
+#define XAODFORWARD_AFPPROTONCONTAINER_H
+
+#include"xAODForward/versions/AFPProtonContainer_v1.h"
+
+namespace xAOD {
+  typedef AFPProtonContainer_v1 AFPProtonContainer;
+}
+
+#include "xAODCore/CLASS_DEF.h"
+CLASS_DEF( xAOD::AFPProtonContainer, 1125087212, 1 )
+
+#endif
diff --git a/Event/xAOD/xAODForward/xAODForward/AFPSiHit.h b/Event/xAOD/xAODForward/xAODForward/AFPSiHit.h
index ae0c007085e38916a547ce9e35049972f710a290..970c34a1429539fc309844787670268bf5ce3381 100644
--- a/Event/xAOD/xAODForward/xAODForward/AFPSiHit.h
+++ b/Event/xAOD/xAODForward/xAODForward/AFPSiHit.h
@@ -5,15 +5,11 @@
 #ifndef XAODFORWARD_AFPSIHIT_H
 #define XAODFORWARD_AFPSIHIT_H
 
-#include"xAODForward/versions/AFPSiHit_v1.h"
+#include"xAODForward/versions/AFPSiHit_v2.h"
 
 namespace xAOD
 {
-  typedef AFPSiHit_v1 AFPSiHit;
+  typedef AFPSiHit_v2 AFPSiHit;
 }
 
-// // Declare a CLID for the type:
-// #include "xAODCore/CLASS_DEF.h"
-// CLASS_DEF( xAOD::AFPSiHit, 34236312, 1 )
-
 #endif
diff --git a/Event/xAOD/xAODForward/xAODForward/AFPSiHitAuxContainer.h b/Event/xAOD/xAODForward/xAODForward/AFPSiHitAuxContainer.h
index 57c9bd5c91b74bbaff2635248752eb4d479a5f32..e55a632ac110054cbf6a36198a9763c0609498cb 100644
--- a/Event/xAOD/xAODForward/xAODForward/AFPSiHitAuxContainer.h
+++ b/Event/xAOD/xAODForward/xAODForward/AFPSiHitAuxContainer.h
@@ -5,16 +5,14 @@
 #ifndef XAODFORWARD_AFPSIHITAUXCONTAINER_H
 #define XAODFORWARD_AFPSIHITAUXCONTAINER_H
 
-#include"xAODForward/versions/AFPSiHitAuxContainer_v1.h"
+#include"xAODForward/versions/AFPSiHitAuxContainer_v2.h"
 
 namespace xAOD
 {
-  typedef AFPSiHitAuxContainer_v1 AFPSiHitAuxContainer;
+  typedef AFPSiHitAuxContainer_v2 AFPSiHitAuxContainer;
 }
 
 #include "xAODCore/CLASS_DEF.h"
-CLASS_DEF( xAOD::AFPSiHitAuxContainer, 1172018595, 1 )
-
-
+CLASS_DEF( xAOD::AFPSiHitAuxContainer, 1172018595, 2 )
 
 #endif
diff --git a/Event/xAOD/xAODForward/xAODForward/AFPSiHitContainer.h b/Event/xAOD/xAODForward/xAODForward/AFPSiHitContainer.h
index 9447649ff3632c16033b56079efd44d598aab402..a619185f21a48603f653126d7cc882b3d8305c70 100644
--- a/Event/xAOD/xAODForward/xAODForward/AFPSiHitContainer.h
+++ b/Event/xAOD/xAODForward/xAODForward/AFPSiHitContainer.h
@@ -5,14 +5,14 @@
 #ifndef XAODFORWARD_AFPSIHITCONTAINER_H
 #define XAODFORWARD_AFPSIHITCONTAINER_H
 
-#include"xAODForward/versions/AFPSiHitContainer_v1.h"
+#include"xAODForward/versions/AFPSiHitContainer_v2.h"
 
 namespace xAOD
 {
-  typedef AFPSiHitContainer_v1 AFPSiHitContainer;
+  typedef AFPSiHitContainer_v2 AFPSiHitContainer;
 }
 
 #include "xAODCore/CLASS_DEF.h"
-CLASS_DEF( xAOD::AFPSiHitContainer, 1306814364, 1 )
+CLASS_DEF( xAOD::AFPSiHitContainer, 1306814364, 2 )
 
 #endif	// XAODFORWARD_AFPSIHITCONTAINER_H
diff --git a/Event/xAOD/xAODForward/xAODForward/AFPStationID.h b/Event/xAOD/xAODForward/xAODForward/AFPStationID.h
index ed30fdf82f0cde37016c198baff6a9c99b32170e..0f9e1d08b2e1d973a6853aecda1829aecb3cec62 100644
--- a/Event/xAOD/xAODForward/xAODForward/AFPStationID.h
+++ b/Event/xAOD/xAODForward/xAODForward/AFPStationID.h
@@ -46,10 +46,10 @@ namespace xAOD
   class AFPStationID
   {
   public:
-    static const int farA = 0; ///< station with at Z = 217 m
-    static const int nearA = 1; ///< station with at Z = 205 m
-    static const int nearC = 2; ///< station with at Z = -205 m
-    static const int farC = 3; ///< station with at Z = -217 m
+    static const int farA; ///< station with at Z = 217 m
+    static const int nearA; ///< station with at Z = 205 m
+    static const int nearC; ///< station with at Z = -205 m
+    static const int farC; ///< station with at Z = -217 m
   };
 
 }
diff --git a/Event/xAOD/xAODForward/xAODForward/AFPToFHit.h b/Event/xAOD/xAODForward/xAODForward/AFPToFHit.h
new file mode 100644
index 0000000000000000000000000000000000000000..2db64cce214f6e71075194f11b5d58ba3f2f2750
--- /dev/null
+++ b/Event/xAOD/xAODForward/xAODForward/AFPToFHit.h
@@ -0,0 +1,15 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef XAODFORWARD_AFPToFHIT_H
+#define XAODFORWARD_AFPToFHIT_H
+
+#include"xAODForward/versions/AFPToFHit_v1.h"
+
+namespace xAOD
+{
+  typedef AFPToFHit_v1 AFPToFHit;
+}
+
+#endif
diff --git a/Event/xAOD/xAODForward/xAODForward/AFPToFHitAuxContainer.h b/Event/xAOD/xAODForward/xAODForward/AFPToFHitAuxContainer.h
new file mode 100644
index 0000000000000000000000000000000000000000..58166612adebbaaa0c3cb48741c681e648052867
--- /dev/null
+++ b/Event/xAOD/xAODForward/xAODForward/AFPToFHitAuxContainer.h
@@ -0,0 +1,18 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef XAODFORWARD_AFPToFHITAUXCONTAINER_H
+#define XAODFORWARD_AFPToFHITAUXCONTAINER_H
+
+#include"xAODForward/versions/AFPToFHitAuxContainer_v1.h"
+
+namespace xAOD
+{
+  typedef AFPToFHitAuxContainer_v1 AFPToFHitAuxContainer;
+}
+
+#include "xAODCore/CLASS_DEF.h"
+CLASS_DEF( xAOD::AFPToFHitAuxContainer, 1192598913, 1 )
+
+#endif
diff --git a/Event/xAOD/xAODForward/xAODForward/AFPToFHitContainer.h b/Event/xAOD/xAODForward/xAODForward/AFPToFHitContainer.h
new file mode 100644
index 0000000000000000000000000000000000000000..8c5fc9aabedc35fa3548c0b78ccc9ae8af95cfae
--- /dev/null
+++ b/Event/xAOD/xAODForward/xAODForward/AFPToFHitContainer.h
@@ -0,0 +1,18 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef XAODFORWARD_AFPToFHITCONTAINER_H
+#define XAODFORWARD_AFPToFHITCONTAINER_H
+
+#include"xAODForward/versions/AFPToFHitContainer_v1.h"
+
+namespace xAOD
+{
+  typedef AFPToFHitContainer_v1 AFPToFHitContainer;
+}
+
+#include "xAODCore/CLASS_DEF.h"
+CLASS_DEF( xAOD::AFPToFHitContainer, 1307016706, 1 )
+
+#endif	// XAODFORWARD_AFPToFHITCONTAINER_H
diff --git a/Event/xAOD/xAODForward/xAODForward/AFPTrack.h b/Event/xAOD/xAODForward/xAODForward/AFPTrack.h
index 8994746560b15ae907b7c10fd5c7d234ec2546e1..c111e5161ac3e09dde977e64b72657730cda3bd0 100644
--- a/Event/xAOD/xAODForward/xAODForward/AFPTrack.h
+++ b/Event/xAOD/xAODForward/xAODForward/AFPTrack.h
@@ -5,11 +5,11 @@
 #ifndef XAODFORWARD_AFPTRACK_H
 #define XAODFORWARD_AFPTRACK_H
 
-#include"xAODForward/versions/AFPTrack_v1.h"
+#include"xAODForward/versions/AFPTrack_v2.h"
 
 namespace xAOD
 {
-  typedef AFPTrack_v1 AFPTrack;
+  typedef AFPTrack_v2 AFPTrack;
 }
 
 #endif
diff --git a/Event/xAOD/xAODForward/xAODForward/AFPTrackAuxContainer.h b/Event/xAOD/xAODForward/xAODForward/AFPTrackAuxContainer.h
index 14c810194d8f8d30abdadcf4ffc3badec6921508..7d62aec4ce0482aa5e4a4308d804cd1c923c4716 100644
--- a/Event/xAOD/xAODForward/xAODForward/AFPTrackAuxContainer.h
+++ b/Event/xAOD/xAODForward/xAODForward/AFPTrackAuxContainer.h
@@ -5,14 +5,14 @@
 #ifndef XAODFORWARD_AFPTRACKAUXCONTAINER_H
 #define XAODFORWARD_AFPTRACKAUXCONTAINER_H
 
-#include"xAODForward/versions/AFPTrackAuxContainer_v1.h"
+#include"xAODForward/versions/AFPTrackAuxContainer_v2.h"
 
 namespace xAOD
 {
-  typedef AFPTrackAuxContainer_v1 AFPTrackAuxContainer;
+  typedef AFPTrackAuxContainer_v2 AFPTrackAuxContainer;
 }
 
 #include "xAODCore/CLASS_DEF.h"
-CLASS_DEF( xAOD::AFPTrackAuxContainer, 1277654109, 1 )
+CLASS_DEF( xAOD::AFPTrackAuxContainer, 1277654109, 2 )
 
 #endif
diff --git a/Event/xAOD/xAODForward/xAODForward/AFPTrackContainer.h b/Event/xAOD/xAODForward/xAODForward/AFPTrackContainer.h
index 63495b215657e1068408e0396549a7588519a0c1..1bc94796c3efcff02585482d40d31b991b2b88d0 100644
--- a/Event/xAOD/xAODForward/xAODForward/AFPTrackContainer.h
+++ b/Event/xAOD/xAODForward/xAODForward/AFPTrackContainer.h
@@ -5,14 +5,14 @@
 #ifndef XAODFORWARD_AFPTRACKCONTAINER_H
 #define XAODFORWARD_AFPTRACKCONTAINER_H
 
-#include"xAODForward/versions/AFPTrackContainer_v1.h"
+#include"xAODForward/versions/AFPTrackContainer_v2.h"
 
 namespace xAOD
 {
-  typedef AFPTrackContainer_v1 AFPTrackContainer;
+  typedef AFPTrackContainer_v2 AFPTrackContainer;
 }
 
 #include "xAODCore/CLASS_DEF.h"
-CLASS_DEF( xAOD::AFPTrackContainer, 1315753026, 1 )
+CLASS_DEF( xAOD::AFPTrackContainer, 1315753026, 2 )
 
 #endif	// XAODFORWARD_AFPTRACKCONTAINER_H
diff --git a/Event/xAOD/xAODForward/xAODForward/AFPTrackRecoAlgID.h b/Event/xAOD/xAODForward/xAODForward/AFPTrackRecoAlgID.h
new file mode 100644
index 0000000000000000000000000000000000000000..fb9f99d7558d23cf13f267f8cf3a311110c68780
--- /dev/null
+++ b/Event/xAOD/xAODForward/xAODForward/AFPTrackRecoAlgID.h
@@ -0,0 +1,51 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * @file   AFPTrackRecoAlgID.h
+ * @author Grzegorz Gach <grzegorz.gach@cern.ch>
+ * @date   2017-10-07
+ * 
+ * @brief  Definitions of identification numbers of track reconstruction algorithms
+ * 
+ */
+
+#ifndef XAODFORWARD_AFPTRACKRECOALGID_H
+#define XAODFORWARD_AFPTRACKRECOALGID_H
+
+namespace xAOD
+{
+  
+/**
+ * @brief Helper class to store ID numbers of track reconstruction algorithms.
+ *
+ * This class contains public static const variables which can be used
+ * instead of raw numbers for refering to algorithms used for
+ * track reconstruction. Enum is not used to allow adding new numbers
+ * without the need of modifying the header file.
+ *
+ * An example of usage
+ * @code{.cpp}
+ * xAOD::AFPTrack* track;
+ * if (track->algID() == xAOD::AFPTrackRecoAlgID::basicKalman) {
+ * // do something if basic kalman algorithm is used
+ * }
+ * @endcode
+ * 
+ * Algorithms indexing follows the scheme
+ *
+ * | ID  | Algorithm                                                  | Comments |
+ * | :-: | ---------------------------------------------------------- | -------- |
+ * | 0   | Basic Kalman algorithm (AFP_LocReco/AFPSiDBasicKalmanTool) |          |
+ * 
+ */
+  class AFPTrackRecoAlgID
+  {
+  public:
+    static const int basicKalman; ///< basic Kalman algorithm id=0
+  };
+
+}
+#endif // XAODFORWARD_AFPTRACKRECOALGID_H
+
diff --git a/Event/xAOD/xAODForward/xAODForward/selection.xml b/Event/xAOD/xAODForward/xAODForward/selection.xml
index 186791b4b2d17ac0c9084750d6e42251cc6f028c..f18b32492d208cd03d007978fd0ba6582bc79a40 100644
--- a/Event/xAOD/xAODForward/xAODForward/selection.xml
+++ b/Event/xAOD/xAODForward/xAODForward/selection.xml
@@ -19,6 +19,10 @@
   <class name="xAOD::AFPSiHitContainer_v1" id="6BE5A00E-A13D-4904-9358-CB28D4C57879" />
   <class name="xAOD::AFPSiHitAuxContainer_v1" id="B7C50786-FA4B-4D48-86C3-180EF5E6DE43" />
 
+  <class name="xAOD::AFPSiHit_v2" />
+  <class name="xAOD::AFPSiHitContainer_v2" id="11AC58B6-10C2-4F0B-8E1F-B99E823F274E" />
+  <class name="xAOD::AFPSiHitAuxContainer_v2" id="E14F7E45-B4A5-4DC0-82AB-A1135FFD2C78" />
+
   <class name="xAOD::AFPSiHitsCluster_v1" />
   <class name="xAOD::AFPSiHitsClusterContainer_v1" id="CCBFAFB3-9A9E-486B-AD37-43C0FFB68998" />
   <class name="xAOD::AFPSiHitsClusterAuxContainer_v1" id="1B4F1207-38F5-42ED-BC5B-F9125F845C3F" />
@@ -27,6 +31,27 @@
   <class name="xAOD::AFPTrackContainer_v1" id="EF887FA6-D17C-4D30-A2E6-3F46CA2EB44B" />
   <class name="xAOD::AFPTrackAuxContainer_v1" id="07BAB867-F028-4CCA-829A-3A6B93AD3411" />
 
+  <class name="xAOD::AFPTrack_v2" />
+  <class name="xAOD::AFPTrackContainer_v2" id="2BCE47B1-7C55-48D0-AFA7-01563154AD02" />
+  <class name="xAOD::AFPTrackAuxContainer_v2" id="21E536F5-7B58-4BDE-8CEE-3FF40E355C3F" />
+
+  <class name="xAOD::AFPToFHit_v1" />
+  <class name="xAOD::AFPToFHitContainer_v1" id="AF3603F3-CDC9-4597-B111-155D9BC2E8D1" />
+  <class name="xAOD::AFPToFHitAuxContainer_v1" id="65012075-753E-4F3E-8A37-5BBB66C523D6" />
+
+  <class name="xAOD::AFPProton_v1">
+    <field name="m_p4" transient="true" />
+    <field name="m_p4Cached" transient="true" />
+  </class>
+  <class name="xAOD::AFPProtonContainer_v1" id="D6DBFC87-D5C9-40CD-BFD0-21B19D0ED7AB" />
+  <class name="xAOD::AFPProtonAuxContainer_v1" id="A5E4D2CC-2541-49D8-BAC7-3C5DFD51779B" />
+
+  <read sourceClass="xAOD::AFPProton_v1" version="[1-]"
+        targetClass="xAOD::AFPProton_v1" source="" target="m_p4Cached" >
+    <![CDATA[
+      m_p4Cached = false;
+    ]]>
+  </read>
 
   <!-- ZDC -->
   <class name="xAOD::ZdcModule_v1" />
@@ -58,7 +83,8 @@
   <class name="std::vector<ElementLink<xAOD::ALFADataContainer_v1> >" />
   <class name="std::vector<std::vector<ElementLink<xAOD::ALFADataContainer_v1> > >" />
 
-  <!-- AFP -->
+  <!-- *** AFP *** -->
+  <!-- AFPDataContainer -->
   <class name="DataLink<xAOD::AFPDataContainer_v1>" />
   <class name="std::vector<DataLink<xAOD::AFPDataContainer_v1> >" />
 
@@ -66,6 +92,15 @@
   <class name="std::vector<ElementLink<xAOD::AFPDataContainer_v1> >" />
   <class name="std::vector<std::vector<ElementLink<xAOD::AFPDataContainer_v1> > >" />
 
+  <!-- AFPToFHitContainer -->
+  <class name="DataLink<xAOD::AFPToFHitContainer_v1>" />
+  <class name="std::vector<DataLink<xAOD::AFPToFHitContainer_v1> >" />
+
+  <class name="ElementLink<xAOD::AFPToFHitContainer_v1>" />
+  <class name="std::vector<ElementLink<xAOD::AFPToFHitContainer_v1> >" />
+  <class name="std::vector<std::vector<ElementLink<xAOD::AFPToFHitContainer_v1> > >" />
+
+  <!-- AFPSiHitContainer -->
   <class name="DataLink<xAOD::AFPSiHitContainer_v1>" />
   <class name="std::vector<DataLink<xAOD::AFPSiHitContainer_v1> >" />
  
@@ -73,6 +108,14 @@
   <class name="std::vector<ElementLink<xAOD::AFPSiHitContainer_v1> >" />
   <class name="std::vector<std::vector<ElementLink<xAOD::AFPSiHitContainer_v1> > >" />
 
+  <class name="DataLink<xAOD::AFPSiHitContainer_v2>" />
+  <class name="std::vector<DataLink<xAOD::AFPSiHitContainer_v2> >" />
+ 
+  <class name="ElementLink<xAOD::AFPSiHitContainer_v2>" />
+  <class name="std::vector<ElementLink<xAOD::AFPSiHitContainer_v2> >" />
+  <class name="std::vector<std::vector<ElementLink<xAOD::AFPSiHitContainer_v2> > >" />
+
+  <!-- AFPSiHitsClusterContainer -->
   <class name="DataLink<xAOD::AFPSiHitsClusterContainer_v1>" />
   <class name="std::vector<DataLink<xAOD::AFPSiHitsClusterContainer_v1> >" />
  
@@ -80,6 +123,7 @@
   <class name="std::vector<ElementLink<xAOD::AFPSiHitsClusterContainer_v1> >" />
   <class name="std::vector<std::vector<ElementLink<xAOD::AFPSiHitsClusterContainer_v1> > >" />
 
+  <!-- AFPTrackContainer -->
   <class name="DataLink<xAOD::AFPTrackContainer_v1>" />
   <class name="std::vector<DataLink<xAOD::AFPTrackContainer_v1> >" />
  
@@ -87,7 +131,21 @@
   <class name="std::vector<ElementLink<xAOD::AFPTrackContainer_v1> >" />
   <class name="std::vector<std::vector<ElementLink<xAOD::AFPTrackContainer_v1> > >" />
 
+  <class name="DataLink<xAOD::AFPTrackContainer_v2>" />
+  <class name="std::vector<DataLink<xAOD::AFPTrackContainer_v2> >" />
+ 
+  <class name="ElementLink<xAOD::AFPTrackContainer_v2>" />
+  <class name="std::vector<ElementLink<xAOD::AFPTrackContainer_v2> >" />
+  <class name="std::vector<std::vector<ElementLink<xAOD::AFPTrackContainer_v2> > >" />
   
+  <!-- AFPProtonContainer -->
+  <class name="DataLink<xAOD::AFPProtonContainer_v1>" />
+  <class name="std::vector<DataLink<xAOD::AFPProtonContainer_v1> >" />
+ 
+  <class name="ElementLink<xAOD::AFPProtonContainer_v1>" />
+  <class name="std::vector<ElementLink<xAOD::AFPProtonContainer_v1> >" />
+  <class name="std::vector<std::vector<ElementLink<xAOD::AFPProtonContainer_v1> > >" />
+
   <!-- ZDC -->
   <class name="DataLink<xAOD::ZdcModuleContainer_v1>" />
   <class name="std::vector<DataLink<xAOD::ZdcModuleContainer_v1> >" />
diff --git a/Event/xAOD/xAODForward/xAODForward/versions/AFPProtonAuxContainer_v1.h b/Event/xAOD/xAODForward/xAODForward/versions/AFPProtonAuxContainer_v1.h
new file mode 100644
index 0000000000000000000000000000000000000000..8bae23fa33ccc485dc9205e7b814354f40f5e53d
--- /dev/null
+++ b/Event/xAOD/xAODForward/xAODForward/versions/AFPProtonAuxContainer_v1.h
@@ -0,0 +1,49 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * @file   AFPProtonAuxContainer_v1.h
+ * @author Krzysztof Cieśla <krzysztof.marcin.ciesla@cern.ch>
+ * @date   2018-04-05
+ * 
+ * @brief  Header file for class AFPProtonAuxcontainer_v1
+ * 
+ */
+
+#ifndef XAODFORWARD_VERSIONS_AFPPROTONAUXCONTAINER_V1_H
+#define XAODFORWARD_VERSIONS_AFPPROTONAUXCONTAINER_V1_H
+
+// EDM include(s):
+#include "xAODCore/AuxContainerBase.h"
+
+// Local include(s):
+#include "xAODForward/versions/AFPProton_v1.h"
+
+namespace xAOD {
+
+  class AFPProtonAuxContainer_v1 : public AuxContainerBase
+  {
+  public:
+    AFPProtonAuxContainer_v1();
+
+  private:
+    std::vector<float>  px;
+    std::vector<float>  py;
+    std::vector<float>  pz;
+    std::vector<float>  e;
+  
+    std::vector<float>  chi2;
+    std::vector<int>    side;
+    std::vector<int>    methodID;
+
+    std::vector<std::vector<AFPProton_v1::AFPTrackLink_t> > afpTrackLinks;
+  }; // class AFPProtonAuxContainer_v1
+    
+} // namespace xAOD
+
+// StoreGate registration
+#include "xAODCore/BaseInfo.h"
+SG_BASE( xAOD::AFPProtonAuxContainer_v1, xAOD::AuxContainerBase ); 
+
+#endif
diff --git a/Event/xAOD/xAODForward/xAODForward/versions/AFPProtonContainer_v1.h b/Event/xAOD/xAODForward/xAODForward/versions/AFPProtonContainer_v1.h
new file mode 100644
index 0000000000000000000000000000000000000000..cd42a76fbddcdddd18ec3856923c062d1b009d51
--- /dev/null
+++ b/Event/xAOD/xAODForward/xAODForward/versions/AFPProtonContainer_v1.h
@@ -0,0 +1,29 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * @file   AFPProtonContainer_v1.h
+ * @author Krzysztof Cieśla <krzysztof.marcin.ciesla@cern.ch>
+ * @date   2018-04-05
+ * 
+ * @brief  Header file with typedef for class AFPProtonContainer_v1
+ * 
+ */
+
+#ifndef XAODFORWARD_VERSIONS_AFPPROTONCONTAINER_V1_H
+#define XAODFORWARD_VERSIONS_AFPPROTONCONTAINER_V1_H
+
+// EDM include(s):
+#include "AthContainers/DataVector.h"
+
+// Local include(s):
+#include "xAODForward/versions/AFPProton_v1.h"
+
+namespace xAOD {
+
+    typedef DataVector< AFPProton_v1 > AFPProtonContainer_v1;
+
+} // namespace xAOD
+
+#endif
diff --git a/Event/xAOD/xAODForward/xAODForward/versions/AFPProton_v1.h b/Event/xAOD/xAODForward/xAODForward/versions/AFPProton_v1.h
new file mode 100644
index 0000000000000000000000000000000000000000..6a28636b18be56a2eaf7f2e25f1d571728be0d92
--- /dev/null
+++ b/Event/xAOD/xAODForward/xAODForward/versions/AFPProton_v1.h
@@ -0,0 +1,137 @@
+// Dear emacs, this is -*- c++ -*-
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * @file   AFPProton_v1.h
+ * @author Krzysztof Cieśla <krzysztof.marcin.ciesla@cern.ch>
+ * @date   2018-04-05
+ * 
+ * @brief  Header file for AFPProton_v1 class representing a reconstructed proton measured in AFP detectors.
+ * 
+ */
+
+#ifndef XAODFORWARD_VERSIONS_AFPPROTON_V1_H
+#define XAODFORWARD_VERSIONS_AFPPROTON_V1_H
+
+// EDM include(s):
+#include "AthLinks/ElementLink.h"
+
+// IParticle include:
+#include "xAODBase/IParticle.h"
+
+// Local includes(s):
+#include "xAODForward/AFPTrack.h"
+#include "xAODForward/AFPTrackContainer.h"
+
+namespace xAOD {
+
+   /**
+    * @brief Class representing a proton reconstructed in AFP.
+    *
+    * This class provides information about a reconstucted proton measured in AFP
+    * detectors.
+    */
+   class AFPProton_v1 : public IParticle {
+
+   public:
+      /// Default constructor
+      AFPProton_v1();
+
+      /// Type of the track links
+      typedef ElementLink< AFPTrackContainer > AFPTrackLink_t;
+
+      /// @name IParticle functions
+      /// @{
+
+      /// The transverse momentum (\f$p_T\f$) of the particle
+      virtual double           pt() const;
+      /// The pseudorapidity (\f$\eta\f$) of the particle
+      virtual double           eta() const;
+      /// The azimuthal angle (\f$\phi\f$) of the particle (has range \f$-\pi\f$ to \f$+\pi\f$.)
+      virtual double           phi() const;
+      /// The invariant mass of the particle
+      virtual double           m() const;
+      /// The total energy of the particle
+      virtual double           e() const;
+      /// The true rapidity (y) of the particle
+      virtual double           rapidity() const;
+
+      /// Definition of the 4-momentum type
+      typedef IParticle::FourMom_t FourMom_t;
+
+      /// The full 4-momentum of the particle
+      virtual FourMom_t        p4() const;
+
+      /// The type of the object as a simple enumeration
+      virtual Type::ObjectType type() const;
+
+      /// @}
+
+      /// @name 4-momentum functions
+      /// @{
+
+      /// Get the x-component of the momentum
+      float px() const;
+      /// Get the y-component of the momentum
+      float py() const;
+      /// Get the z-component of the momentum
+      float pz() const;
+
+      /// Set the 4-momentum.
+      void setPxPyPzE( float px, float py, float pz, float e );
+      /// Set the x-component of the momentum
+      void setPx( float px );
+      /// Set the y-component of the momentum
+      void setPy( float py );
+      /// Set the z-component of the momentum
+      void setPz( float pz );
+      /// Set the energy.
+      void setE( float e );
+
+      /// @}
+
+      /// Get the value of @f$\chi^2@f$ function
+      float chi2() const;
+      /// Set the value of @f$\chi^2@f$ function
+      void setChi2( float chi2 );
+
+      /// Get the ATLAS side on which the proton was measured
+      int side() const;
+      /// Set the ATLAS side on which the proton was measured
+      void setSide( int side );
+
+      /// Get the ID of method used to reconstruct the proton
+      int methodID() const;
+      /// Set the ID of method used to reconstruct the proton
+      void setMethodID( int methodID );
+
+      /// @name Associated track handling functions
+      /// @{
+
+      /// Get vector of links to tracks that were used to reconstruct the proton
+      const std::vector< AFPTrackLink_t >& afpTrackLinks() const;
+      /// Set vector of links to tracks used for proton reconstruction
+      void setAFPTrackLinks( const std::vector< AFPTrackLink_t >& newTracksVector );
+      /// Add a link to a tracks used to reconstruct the proton
+      void addAFPTrackLink( const AFPTrackLink_t& newTrack );
+
+      /// Get the number of tracks that were used to reconstruct the proton
+      size_t nTracks() const;
+      /// Get one of the tracks that was used to reconstruct the proton
+      const AFPTrack* track( size_t index ) const;
+
+      /// @}
+
+   }; // class AFPProton_v1
+
+} // namespace xAOD
+
+// Declare the inheritance of the type to StoreGate and DataVector:
+#include "xAODCore/BaseInfo.h"
+SG_BASE( xAOD::AFPProton_v1, xAOD::IParticle );
+#include "AthContainers/DataVector.h"
+DATAVECTOR_BASE( xAOD::AFPProton_v1, xAOD::IParticle );
+
+#endif // XAODFORWARD_VERSIONS_AFPPROTON_V1_H
diff --git a/Event/xAOD/xAODForward/xAODForward/versions/AFPSiHitAuxContainer_v1.h b/Event/xAOD/xAODForward/xAODForward/versions/AFPSiHitAuxContainer_v1.h
index 10e4df2c3df1f92e8839b9d5c3d57eeba47763d5..18915d07142c2be5a34718d03e4e953da4b8b200 100644
--- a/Event/xAOD/xAODForward/xAODForward/versions/AFPSiHitAuxContainer_v1.h
+++ b/Event/xAOD/xAODForward/xAODForward/versions/AFPSiHitAuxContainer_v1.h
@@ -21,7 +21,7 @@
 #include "xAODCore/AuxContainerBase.h"
 
 // local includes
-#include "xAODForward/AFPSiHit.h"
+#include "xAODForward/versions/AFPSiHit_v1.h"
 
 
 namespace xAOD {
@@ -44,7 +44,7 @@ namespace xAOD {
     std::vector< int > pixelLayerID;
     std::vector< int > pixelRowIDChip;
     std::vector< int > pixelColIDChip;
-    std::vector< std::vector<AFPSiHit::AFPTrackLink_t> > tracksLinks;
+    std::vector< std::vector<AFPSiHit_v1::AFPTrackLink_t> > tracksLinks;
   }; // class AFPSiHitAuxContainer_v1
 
   
diff --git a/Event/xAOD/xAODForward/xAODForward/versions/AFPSiHitAuxContainer_v2.h b/Event/xAOD/xAODForward/xAODForward/versions/AFPSiHitAuxContainer_v2.h
new file mode 100644
index 0000000000000000000000000000000000000000..47f43483bc2b6fda2441c84dc3ad471d90d91e67
--- /dev/null
+++ b/Event/xAOD/xAODForward/xAODForward/versions/AFPSiHitAuxContainer_v2.h
@@ -0,0 +1,57 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * @file   AFPSiHitAuxContainer_v2.h
+ * @author Grzegorz Gach <grzegorz.gach@cern.ch>
+ * @date   2017-04-26
+ * 
+ * @brief  Header file for class AFPSiHitAuxcontainer_v2
+ * 
+ */
+
+
+#ifndef XAODFORWARD_VERSIONS_AFPSIHITAUXCONTAINER_V2_H
+#define XAODFORWARD_VERSIONS_AFPSIHITAUXCONTAINER_V2_H
+
+#include<vector>
+
+// EDM include(s):
+#include "xAODCore/AuxContainerBase.h"
+
+// local includes
+#include "xAODForward/versions/AFPSiHit_v2.h"
+
+
+namespace xAOD {
+
+  /**
+   * @brief Class storing information of xAOD::AFPSiHit_v2 objects.
+   *
+   * This class actually stores information that is accessed by the xAOD::AFPSiHit_v2.
+   */
+  class AFPSiHitAuxContainer_v2 : public AuxContainerBase {
+ 
+  public:
+    AFPSiHitAuxContainer_v2();
+ 
+  private:
+    std::vector< float > depositedCharge;
+    std::vector< float > timeOverThreshold;
+    std::vector< int > stationID;
+    std::vector< int > pixelLayerID;
+    std::vector< int > pixelRowIDChip;
+    std::vector< int > pixelColIDChip;
+  }; // class AFPSiHitAuxContainer_v2
+
+  
+} // end xAOD namespace
+
+// StoreGate registration
+#include "xAODCore/BaseInfo.h"
+SG_BASE( xAOD::AFPSiHitAuxContainer_v2, xAOD::AuxContainerBase );
+
+
+#endif //  XAODFORWARD_VERSIONS_AFPSIHITAUXCONTAINER_V2_H
+
diff --git a/Event/xAOD/xAODForward/xAODForward/versions/AFPSiHitContainer_v2.h b/Event/xAOD/xAODForward/xAODForward/versions/AFPSiHitContainer_v2.h
new file mode 100644
index 0000000000000000000000000000000000000000..6776b9d5c62a4f880f9435db50daf44c6a9a5f81
--- /dev/null
+++ b/Event/xAOD/xAODForward/xAODForward/versions/AFPSiHitContainer_v2.h
@@ -0,0 +1,30 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * @file   AFPSiHitContainer_v2.h
+ * @author Grzegorz Gach <grzegorz.gach@cern.ch>
+ * @date   2017-04-26
+ * 
+ * @brief  Header file with typedef for class AFPSiHitContainer_v2
+ * 
+ */
+
+
+#ifndef XAODFORWARD_VERSIONS_AFPSIHITCONTAINER_V2_H
+#define XAODFORWARD_VERSIONS_AFPSIHITCONTAINER_V2_H
+
+// EDM include(s):
+#include "AthContainers/DataVector.h"
+
+// Local include(s):
+#include "xAODForward/versions/AFPSiHit_v2.h"
+
+namespace xAOD {
+  typedef DataVector< AFPSiHit_v2 > AFPSiHitContainer_v2;
+}
+ 
+
+#endif //  XAODFORWARD_VERSIONS_AFPSIHITCONTAINER_V2_H
+
diff --git a/Event/xAOD/xAODForward/xAODForward/versions/AFPSiHit_v1.h b/Event/xAOD/xAODForward/xAODForward/versions/AFPSiHit_v1.h
index 1a96cb18fdda8a0dfcc7acc3e3bb6f554c24db47..0c7aaa2ecb7875a7be687180dad129740efc3298 100644
--- a/Event/xAOD/xAODForward/xAODForward/versions/AFPSiHit_v1.h
+++ b/Event/xAOD/xAODForward/xAODForward/versions/AFPSiHit_v1.h
@@ -26,8 +26,7 @@ namespace xAOD {
 
   // forward declaration
   class AFPTrack_v1;
-  typedef AFPTrack_v1 AFPTrack;
-  typedef DataVector< AFPTrack > AFPTrackContainer;
+  typedef DataVector< AFPTrack_v1 > AFPTrackContainer_v1;
 
   /**
    * @brief Class representing a hit in silicon detector.
@@ -40,7 +39,7 @@ namespace xAOD {
   {
   public:
     /// Type of a link to the track
-    typedef ElementLink< AFPTrackContainer > AFPTrackLink_t;
+    typedef ElementLink< AFPTrackContainer_v1 > AFPTrackLink_t;
 
     
     // needed by athenaRoot 
diff --git a/Event/xAOD/xAODForward/xAODForward/versions/AFPSiHit_v2.h b/Event/xAOD/xAODForward/xAODForward/versions/AFPSiHit_v2.h
new file mode 100644
index 0000000000000000000000000000000000000000..d32b1837d1d7bef6e78786d6423f24f65ab5078f
--- /dev/null
+++ b/Event/xAOD/xAODForward/xAODForward/versions/AFPSiHit_v2.h
@@ -0,0 +1,247 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * @file   AFPSiHit_v2.h
+ * @author Grzegorz Gach <grzegorz.gach@cern.ch>
+ * @date   2017-04-26
+ * 
+ * @brief  Header file for AFPSiHit_v2 class representing a hit in AFP track detector.
+ * 
+ */
+
+#ifndef XAODFORWARD_VERSIONS_AFPSIHIT_V2_H
+#define XAODFORWARD_VERSIONS_AFPSIHIT_V2_H
+
+// EDM include(s):
+#include "AthContainers/AuxElement.h"
+#include "AthLinks/ElementLink.h"
+
+// needed for forward declaration
+#include "AthContainers/DataVector.h"
+
+
+namespace xAOD {
+
+  /**
+   * @brief Class representing a hit in silicon detector.
+   * 
+   * This class provides information about a single hit in AFP silicon
+   * detector.
+   */
+  class AFPSiHit_v2 : public SG::AuxElement
+  {
+  public:
+    // needed by athenaRoot 
+    AFPSiHit_v2();
+
+    /** 
+     * @brief Charge deposited in the pixel.
+     * 
+     * Charge deposited in the pixel (amplitude of the signal)
+     * calculated based on the time over threshold. Time over
+     * threshold should be proportional to the deposited charge, but
+     * there may be small deviations.
+     * 
+     * @return charge deposited in the pixel
+     */
+    float depositedCharge() const;
+
+    /** 
+     * @brief Method setting value of the charge deposited in the pixel.
+     * 
+     * @param charge value of the charge deposited in the pixel
+     */
+    void setDepositedCharge(float charge);
+
+    /** 
+     * @brief Time over threshold of signal for a pixel.
+     *
+     * The length of the signal is proportional to the charge
+     * deposited in the pixel. The transformation is configured during
+     * the detector running and requires calibration. This is basic
+     * quantity which is used to reconstruct charge deposited in the
+     * pixel.
+     * 
+     * @return time over threshold of the signal
+     */
+    float timeOverThreshold() const;
+
+    /** 
+     * @brief Method setting value of time over threshold.
+     * 
+     * @param timeOverThreshold value of the time over threshold for a pixel
+     */
+    void setTimeOverThreshold(float timeOverThreshold);
+
+    /**
+     * @brief Index of the station with pixel hit 
+     * 
+     * It is advised to use class xAOD::AFPStationID instead of
+     * integers to process this information. In this class the
+     * numbering scheme is explained.
+     *
+     * @return index of the station (see class xAOD::AFPStationID )
+     */
+    int stationID() const;
+
+    /**
+     * @brief Set index of the station with pixel hit 
+     * 
+     * @copydetails xAOD::AFPSiHit_v2::stationID()
+     *
+     * @param stationID index of the station with the hit
+     */
+    void setStationID(int stationID);
+
+    /** 
+     * @brief Index of the layer of pixels, i.e. the silicon detector, with hit.
+     * 
+     * It is advised to use class xAOD::AFPPixelLayerID instead of
+     * integers to process this information. In this class the
+     * numbering scheme is explained.
+     *
+     * @return index of the pixels layer with hit (see class xAOD::AFPPixelLayerID )
+     */    
+    int pixelLayerID() const;
+
+    /** 
+     * @brief Method setting index of the pixel layer with hit.
+     *
+     * The index of the layer should be set according to the convention  in pixelLayerID()
+     * 
+     * @param layerID index of the pixel layer with hit
+     */
+    void setPixelLayerID(int layerID);
+    
+    /** 
+     * @brief Index of the pixel row in chip coordinate system.
+     *
+     * Index of the row in chip coordinate system. There are 336 rows
+     * numbered from 1. Row number 1 is closest to the LHC centre,
+     * while row 336 is the outermost.
+     * 
+     * @note Rows in chip coordinate system are vertical,
+     * because the chips are mounted rotated by 90 degrees.
+     * 
+     * @return index of the pixel row which is in vertical direction
+     */
+    int pixelRowIDChip() const;
+
+    /** 
+     * @brief Set pixel row index in the chip coordinate system.
+     *
+     * Index of the row in chip coordinate system can have value
+     * between 1 and 336. Row number 1 is closest to the LHC centre,
+     * while row 336 is the outermost.
+     *
+     * @note Rows in chip coordinate system are vertical,
+     * because the chips are mounted rotated by 90 degrees.
+     * 
+     * @param rowID index of pixel row in chip coordinate system to be assigned to the hit
+     */
+    void setPixelRowIDChip(int rowID);
+
+    
+    /** 
+     * @brief Index of the pixel column in chip coordinate system.
+     *
+     * Index of the column in chip coordinate system. There are 80
+     * columns numbered from 1. Column number 1 is the bottom one,
+     * while column 80 is the topmost one.
+     * 
+     * @note Columns in chip coordinate system are horizontal,
+     * because the chips are mounted rotated by 90 degrees.
+     * 
+     * @return index of the pixel column which is in horizontal direction
+     */
+    int pixelColIDChip() const;
+
+    /** 
+     * @brief Set pixel column index in the chip coordinate system.
+     *
+     * Index of the column in chip coordinate system can have value
+     * between 1 and 80. Column number 1 is the bottom one, while
+     * column 80 is the topmost one.
+     *
+     * @note Columns in chip coordinate system are horizontal,
+     * because the chips are mounted rotated by 90 degrees.
+     * 
+     * @param colID index of pixel column in chip coordinate system to be assigned to the hit
+     */
+    void setPixelColIDChip(int colID);
+
+
+    /** 
+     * @brief Index of the pixel along X axis in LHC coordinate system.
+     *
+     * There are 336 pixels in the horizontal direction numbered from
+     * 0. The numbering is according to the LHC coordinate system
+     * i.e. pixel 0 is the outermost pixel and pixel 335 is the
+     * innermost (closest to the LHC centre).
+     *
+     * This method transforms index from the chip coordinate system to
+     * the LHC coordinate system.
+     * 
+     * @return index of the pixel along X axis in LHC coordinate system
+     */
+    int pixelHorizID() const;
+
+    /** 
+     * @brief Set index of the pixel along X axis in LHC coordinate system.
+     *
+     * There are 336 pixels in the horizontal direction numbered from
+     * 0. The numbering is according to the LHC coordinate system
+     * i.e. pixel 0 is the outermost pixel and pixel 335 is the inner
+     * most (closest to the LHC centre).
+     *
+     * This method transforms input from the LHC coordinate system to
+     * the chip coordinate system and saves it.
+     *
+     * @param horizontalID index of pixel along X axis in the LHC coordinate system
+     */
+    void setPixelHorizID(const int horizontalID);
+
+    
+    /** 
+     * @brief Index of the pixel along Y axis in LHC coordinate system.
+     *
+     * There are 80 pixels in the vertical direction numbered from
+     * 0. The numbering is according to the LHC coordinate system
+     * i.e. pixel 0 is the lowest and pixel 79 is the topmost.
+     *
+     * This method transforms index from the chip coordinate system to
+     * the LHC coordinate system.
+     * 
+     * @return index of the pixel along Y axis in LHC coordinate system
+     */
+    int pixelVertID() const;
+
+    /** 
+     * @brief Set index of the pixel along Y axis in LHC coordinate system.
+     *
+     * There are 80 pixels in the horizontal direction numbered from
+     * 0. The numbering is according to the LHC coordinate system
+     * i.e. pixel 0 is the lowest and pixel 79 is the topmost.
+     *
+     * This method transforms input from the LHC coordinate system to
+     * the chip coordinate system and saves it.
+     *
+     * @param verticalID index of pixel along Y axis in the LHC coordinate system
+     */
+    void setPixelVertID(const int verticalID);
+
+    /// Function making sure that the object is ready for persistification i.e. saving
+    void toPersistent();
+  };
+
+
+} // namespace xAOD
+
+// Declare the inheritance of the type to StoreGate:
+#include "xAODCore/BaseInfo.h"
+SG_BASE( xAOD::AFPSiHit_v2, SG::AuxElement );
+
+#endif // XAODFORWARD_VERSIONS_AFPSIHIT_V2_H
+
diff --git a/Event/xAOD/xAODForward/xAODForward/versions/AFPSiHitsClusterAuxContainer_v1.h b/Event/xAOD/xAODForward/xAODForward/versions/AFPSiHitsClusterAuxContainer_v1.h
index 421b3ecec5b78472f57de925115f63e46b7cd12a..2f6082448d84d3265cfd94753d3c3747e5ddc61c 100644
--- a/Event/xAOD/xAODForward/xAODForward/versions/AFPSiHitsClusterAuxContainer_v1.h
+++ b/Event/xAOD/xAODForward/xAODForward/versions/AFPSiHitsClusterAuxContainer_v1.h
@@ -21,8 +21,7 @@
 #include "xAODCore/AuxContainerBase.h"
 
 // local includes
-#include "xAODForward/AFPSiHitsCluster.h"
-
+#include "xAODForward/versions/AFPSiHitsCluster_v1.h"
 
 namespace xAOD {
 
@@ -47,7 +46,7 @@ namespace xAOD {
     std::vector< float > zLocalErr;
     std::vector< float > depositedCharge;
     std::vector< int > nHits;
-    std::vector< std::vector<AFPSiHitsCluster::AFPHitLink_t> > hitsLinks;
+    std::vector< std::vector<AFPSiHitsCluster_v1::AFPHitLink_t> > hitsLinks;
     std::vector< int > clusterAlgID;
 
   }; // class AFPSiHitsClusterAuxContainer_v1
diff --git a/Event/xAOD/xAODForward/xAODForward/versions/AFPSiHitsCluster_v1.h b/Event/xAOD/xAODForward/xAODForward/versions/AFPSiHitsCluster_v1.h
index d56c586559ef600b5b262cc42dd627297dff8e1d..a49624438035d8bbf3b208b0fe2e2067b5965c9d 100644
--- a/Event/xAOD/xAODForward/xAODForward/versions/AFPSiHitsCluster_v1.h
+++ b/Event/xAOD/xAODForward/xAODForward/versions/AFPSiHitsCluster_v1.h
@@ -26,8 +26,8 @@
 #include "xAODForward/AFPPixelLayerID.h"
 
 // xAOD representing hits
-#include "xAODForward/AFPSiHit.h"
-#include "xAODForward/AFPSiHitContainer.h"
+#include "xAODForward/versions/AFPSiHit_v2.h"
+#include "xAODForward/versions/AFPSiHitContainer_v2.h"
 
 namespace xAOD {
 
@@ -36,7 +36,7 @@ namespace xAOD {
   {
   public:
     /// Type of a link to the hit
-    typedef ElementLink< AFPSiHitContainer > AFPHitLink_t;
+    typedef ElementLink< AFPSiHitContainer_v2 > AFPHitLink_t;
 
     /**
      * @brief Index of the station with pixels cluster
diff --git a/Event/xAOD/xAODForward/xAODForward/versions/AFPToFHitAuxContainer_v1.h b/Event/xAOD/xAODForward/xAODForward/versions/AFPToFHitAuxContainer_v1.h
new file mode 100644
index 0000000000000000000000000000000000000000..7e2275846a3d60b864d240cc3a3588f3883466e2
--- /dev/null
+++ b/Event/xAOD/xAODForward/xAODForward/versions/AFPToFHitAuxContainer_v1.h
@@ -0,0 +1,47 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef XAODFORWARD_VERSIONS_AFPToFHITAUXCONTAINER_V1_H
+#define XAODFORWARD_VERSIONS_AFPToFHITAUXCONTAINER_V1_H
+
+#include<vector>
+
+// EDM include(s):
+#include "xAODCore/AuxContainerBase.h"
+
+// local includes
+#include "xAODForward/AFPToFHit.h"
+
+
+namespace xAOD {
+
+  /// @brief Class storing information of xAOD::AFPToFHit_v1 objects.
+  ///
+  /// This class actually stores information that is accessed by the xAOD::AFPToFHit_v1.
+  class AFPToFHitAuxContainer_v1 : public AuxContainerBase {
+ 
+  public:
+    AFPToFHitAuxContainer_v1();
+ 
+  private:
+    std::vector< int > stationID;
+    std::vector< float > time;
+    std::vector< int > hptdcChannel;
+    std::vector< int > barInTrainID;
+    std::vector< int > trainID; 
+    std::vector< float > pulseLength;
+    std::vector< int > hptdcID;
+
+  }; // class AFPToFHitAuxContainer_v1
+
+  
+} // end xAOD namespace
+
+// StoreGate registration
+#include "xAODCore/BaseInfo.h"
+SG_BASE( xAOD::AFPToFHitAuxContainer_v1, xAOD::AuxContainerBase );
+
+
+#endif // XAODFORWARD_VERSIONS_AFPToFHITAUXCONTAINER_V1_H
+
diff --git a/Event/xAOD/xAODForward/xAODForward/versions/AFPToFHitContainer_v1.h b/Event/xAOD/xAODForward/xAODForward/versions/AFPToFHitContainer_v1.h
new file mode 100644
index 0000000000000000000000000000000000000000..63e5c954cc21f2b54a2c30a1815305b9e4e6e61a
--- /dev/null
+++ b/Event/xAOD/xAODForward/xAODForward/versions/AFPToFHitContainer_v1.h
@@ -0,0 +1,20 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+#ifndef XAODFORWARD_VERSIONS_AFPToFHITCONTAINER_V1_H
+#define XAODFORWARD_VERSIONS_AFPToFHITCONTAINER_V1_H
+
+// EDM include(s):
+#include "AthContainers/DataVector.h"
+
+// Local include(s):
+#include "xAODForward/versions/AFPToFHit_v1.h"
+
+namespace xAOD {
+  typedef DataVector< AFPToFHit_v1 > AFPToFHitContainer_v1;
+}
+ 
+
+#endif //  XAODFORWARD_VERSIONS_AFPToFHITCONTAINER_V1_H
diff --git a/Event/xAOD/xAODForward/xAODForward/versions/AFPToFHit_v1.h b/Event/xAOD/xAODForward/xAODForward/versions/AFPToFHit_v1.h
new file mode 100644
index 0000000000000000000000000000000000000000..bbbbc3f7b01db0df38b6396ea8075b0315ef8241
--- /dev/null
+++ b/Event/xAOD/xAODForward/xAODForward/versions/AFPToFHit_v1.h
@@ -0,0 +1,111 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef XAODFORWARD_VERSIONS_AFPToFHIT_V1_H
+#define XAODFORWARD_VERSIONS_AFPToFHIT_V1_H
+
+// EDM include(s):
+#include "AthContainers/AuxElement.h"
+#include "AthLinks/ElementLink.h"
+#include "xAODForward/AFPStationID.h"
+
+// needed for forward declaration
+#include "AthContainers/DataVector.h"
+
+
+namespace xAOD {
+
+  /// @brief Class representing a hit in ToF detector.
+  ///
+  /// This class provides information about a single hit in AFP ToF
+  /// detector.
+  class AFPToFHit_v1 : public SG::AuxElement
+  {
+  public:
+    // needed by athenaRoot 
+    AFPToFHit_v1();
+
+    /// @brief Time of AFP ToF detector hit relative to the reference clock
+    ///
+    /// Time between the signal in AFP ToF detector and reference
+    /// clock tick. The reference clock runs with the 40 MHz rate
+    /// which corresponds to LHC bunch spacing so there should be a
+    /// clock tick that zeros the time measurement for every bunch
+    /// crossing. Time is expressed in nanoseconds.
+    float time() const;
+
+    void setTime(float time);
+
+    /// @brief HPTDC channel number
+    ///
+    /// Information about mapping and more details about High
+    /// Performance/Precision Time to Digital Converter (HPTDC) are
+    /// available at
+    /// https://twiki.cern.ch/twiki/bin/view/Atlas/AFPHPTDC
+    int  hptdcChannel() const;
+
+    void setHptdcChannel(int hptdcChannel);
+
+    /// @brief ID number of the LQBar in a train where hit was detected
+    ///
+    /// The value should be between 0 and 3
+    int barInTrainID() const;
+
+    void setBarInTrainID(const int barInTrainID);
+
+    /// @brief ID number of the train of LQBars (set of 4 bars), where hit was detected
+    ///
+    /// The value should be between 0 and 3
+    int trainID() const;
+
+    void setTrainID(const int barInTrainID);
+
+    /// @brief Lenght of the signal pulse which is proportional to the signal
+    /// amplitude
+    ///
+    /// The returned value is lenght of the signal above
+    /// threshold expressed in nanoseconds. Available values should be
+    /// multiples of 0.521. Pulse lenght of 1 nanosecond corresponds
+    /// roughtly to signal of about 67 mV.
+    float pulseLength() const;
+
+    void setPulseLength(float pulseLength);
+
+    /// Identification number of the HPTDC module.
+    ///
+    /// Detailed documentation of High Performance/Precision Time to
+    /// Digital Converter (HPTDC) is available in
+    /// https://twiki.cern.ch/twiki/bin/view/Atlas/AFPHPTDC
+    int hptdcID() const;
+    
+    void setHptdcID(int hptdcID);
+
+    /// @brief Index of the station with time-of-flight hit
+    ///
+    /// The numbering scheme is the same as in xAOD::AFPStationID. It
+    /// is recommended to use this class instead of bare numbers.
+    int stationID() const;
+
+    void setStationID(int side);
+
+    /// Returns true if ToF hit is in far station on A side
+    bool isSideA() const
+    { return stationID() == xAOD::AFPStationID::farA;}
+
+    /// Returns true if ToF hit is in far station on A side
+    bool isSideC() const
+    { return stationID() == xAOD::AFPStationID::farC;}
+
+    /// Function making sure that the object is ready for persistification i.e. saving - does nothing
+    void toPersistent() {}
+  };
+
+
+} // namespace xAOD
+
+// Declare the inheritance of the type to StoreGate:
+#include "xAODCore/BaseInfo.h"
+SG_BASE( xAOD::AFPToFHit_v1, SG::AuxElement );
+
+#endif // XAODFORWARD_VERSIONS_AFPToFHIT_V1_H
diff --git a/Event/xAOD/xAODForward/xAODForward/versions/AFPTrackAuxContainer_v1.h b/Event/xAOD/xAODForward/xAODForward/versions/AFPTrackAuxContainer_v1.h
index 6337e3d596a45d5a24f57330185642a154b4125d..a93df18c86d47bf24633eee9620823ec0a108dea 100644
--- a/Event/xAOD/xAODForward/xAODForward/versions/AFPTrackAuxContainer_v1.h
+++ b/Event/xAOD/xAODForward/xAODForward/versions/AFPTrackAuxContainer_v1.h
@@ -21,7 +21,7 @@
 #include "xAODCore/AuxContainerBase.h"
 
 // local includes
-#include "xAODForward/AFPTrack.h"
+#include "xAODForward/versions/AFPTrack_v1.h"
 
 
 namespace xAOD {
@@ -46,7 +46,7 @@ namespace xAOD {
     // float zSlope() const;
     std::vector< int > nHoles;
     std::vector< int > nHits;
-    std::vector< std::vector<AFPTrack::AFPHitLink_t> > hits;
+    std::vector< std::vector<AFPTrack_v1::AFPHitLink_t> > hits;
     std::vector< float > chi2;
     std::vector< int > algID;
     
diff --git a/Event/xAOD/xAODForward/xAODForward/versions/AFPTrackAuxContainer_v2.h b/Event/xAOD/xAODForward/xAODForward/versions/AFPTrackAuxContainer_v2.h
new file mode 100644
index 0000000000000000000000000000000000000000..46982273fde41a1313bd4c61fad0f38042888a73
--- /dev/null
+++ b/Event/xAOD/xAODForward/xAODForward/versions/AFPTrackAuxContainer_v2.h
@@ -0,0 +1,63 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * @file   AFPTrackAuxContainer_v2.h
+ * @author Grzegorz Gach <grzegorz.gach@cern.ch>
+ * @date   2017-04-26
+ * 
+ * @brief  Header file for class AFPTrackAuxcontainer
+ * 
+ */
+
+
+#ifndef XAODFORWARD_VERSIONS_AFPTRACKAUXCONTAINER_V2_H
+#define XAODFORWARD_VERSIONS_AFPTRACKAUXCONTAINER_V2_H
+
+#include<vector>
+
+// EDM include(s):
+#include "xAODCore/AuxContainerBase.h"
+
+// local includes
+#include "xAODForward/versions/AFPTrack_v2.h"
+
+
+namespace xAOD {
+
+  /**
+   * @brief Class storing information accessed by xAOD::AFPTrack_v2
+   */
+  class AFPTrackAuxContainer_v2 : public AuxContainerBase {
+ 
+  public:
+    /// Default constructor
+    AFPTrackAuxContainer_v2();
+ 
+  private:
+    
+    std::vector< int > stationID;
+    std::vector< float > xLocal;
+    std::vector< float > yLocal;
+    std::vector< float > zLocal;
+    std::vector< float > xSlope;
+    std::vector< float > ySlope;
+    std::vector< int > nHoles;
+    std::vector< int > nClusters;
+    std::vector< std::vector<AFPTrack_v2::AFPClusterLink_t> > clusters;
+    std::vector< float > chi2;
+    std::vector< int > algID;
+    
+  }; // class AFPTrackAuxContainer_v2
+
+  
+} // end xAOD namespace
+
+// StoreGate registration
+#include "xAODCore/BaseInfo.h"
+SG_BASE( xAOD::AFPTrackAuxContainer_v2, xAOD::AuxContainerBase );
+
+
+#endif //  XAODFORWARD_VERSIONS_AFPTRACKAUXCONTAINER_V2_H
+
diff --git a/Event/xAOD/xAODForward/xAODForward/versions/AFPTrackContainer_v2.h b/Event/xAOD/xAODForward/xAODForward/versions/AFPTrackContainer_v2.h
new file mode 100644
index 0000000000000000000000000000000000000000..ef9f1513d99291f66f30868ce584453cd3924505
--- /dev/null
+++ b/Event/xAOD/xAODForward/xAODForward/versions/AFPTrackContainer_v2.h
@@ -0,0 +1,30 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * @file   AFPTrackContainer_v2.h
+ * @author Grzegorz Gach <grzegorz.gach@cern.ch>
+ * @date   2017-04-26
+ * 
+ * @brief  Header file with typedef for AFPTrackContainer_v2
+ * 
+ */
+
+
+#ifndef XAODFORWARD_VERSIONS_AFPTRACKCONTAINER_V2_H
+#define XAODFORWARD_VERSIONS_AFPTRACKCONTAINER_V2_H
+
+// EDM include(s):
+#include "AthContainers/DataVector.h"
+
+// Local include(s):
+#include "xAODForward/versions/AFPTrack_v2.h"
+
+namespace xAOD {
+  typedef DataVector< AFPTrack_v2 > AFPTrackContainer_v2;
+}
+ 
+
+#endif
+
diff --git a/Event/xAOD/xAODForward/xAODForward/versions/AFPTrack_v1.h b/Event/xAOD/xAODForward/xAODForward/versions/AFPTrack_v1.h
index 27a058a6bcd0250652f1f9632ee9cce806e8f7a3..d6f10fdc1d6fe8fd83be204649320df0cb97da12 100644
--- a/Event/xAOD/xAODForward/xAODForward/versions/AFPTrack_v1.h
+++ b/Event/xAOD/xAODForward/xAODForward/versions/AFPTrack_v1.h
@@ -28,8 +28,7 @@
 namespace xAOD {
   // forward declaration
   class AFPSiHit_v1;
-  typedef AFPSiHit_v1 AFPSiHit;
-  typedef DataVector< AFPSiHit > AFPSiHitContainer;
+  typedef DataVector< AFPSiHit_v1 > AFPSiHitContainer_v1;
 
   /**
    * @brief Class representing a track reconstructed in AFP.
@@ -41,7 +40,7 @@ namespace xAOD {
   {
   public:
     /// Type of a link to the hit
-    typedef ElementLink< AFPSiHitContainer > AFPHitLink_t;
+    typedef ElementLink< AFPSiHitContainer_v1 > AFPHitLink_t;
 
     /** 
      * @brief Index of the station where track was reconstructed.
@@ -81,7 +80,7 @@ namespace xAOD {
     /** 
      * @brief Track position along Y axis in station local coordinate system.
      *
-     * @copydetails xAOD::AFPTrack_v1::xLocal()
+     * @copydetail xAOD::AFPTrack_v1::xLocal()
      */
     float yLocal() const;
 
diff --git a/Event/xAOD/xAODForward/xAODForward/versions/AFPTrack_v2.h b/Event/xAOD/xAODForward/xAODForward/versions/AFPTrack_v2.h
new file mode 100644
index 0000000000000000000000000000000000000000..8b8ad223990ebf4c7836bcb5db3e5225056f32fb
--- /dev/null
+++ b/Event/xAOD/xAODForward/xAODForward/versions/AFPTrack_v2.h
@@ -0,0 +1,266 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * @file   AFPTrack_v2.h
+ * @author Grzegorz Gach <grzegorz.gach@cern.ch>
+ * @date   2017-04-26
+ * 
+ * @brief  Header file for the AFPTrack class
+ * 
+ */
+
+
+#ifndef XAODFORWARD_VERSIONS_AFPTRACK_V2_H
+#define XAODFORWARD_VERSIONS_AFPTRACK_V2_H
+
+// general includes
+#include<vector>
+
+// EDM include(s):
+#include "AthContainers/AuxElement.h"
+#include "AthLinks/ElementLink.h"
+
+#include "xAODForward/versions/AFPSiHitsCluster_v1.h"
+#include "xAODForward/versions/AFPSiHitsClusterContainer_v1.h"
+
+namespace xAOD {
+
+  /**
+   * @brief Class representing a track reconstructed in AFP.
+   * 
+   * This class provides access to the information about tracks that
+   * were reconstructed using AFP information.
+   */
+  class AFPTrack_v2 : public SG::AuxElement
+  {
+  public:
+    /// Type of a link to the cluster
+    typedef ElementLink< AFPSiHitsClusterContainer_v1 > AFPClusterLink_t;
+
+    /** 
+     * @brief Index of the station where track was reconstructed.
+     *
+     * @copydetails xAOD::AFPSiHit_v2::stationID()
+     */  
+    int stationID() const;
+
+    /**
+     * @brief Set index of the station where track was reconstructed.
+     * 
+     * @copydetails xAOD::AFPSiHit_v2::stationID()
+     *
+     * @param stationID index of the station where track was reconstructed
+     */
+    void setStationID (int stationID);
+
+    /** 
+     * @brief Track position along X axis in station local coordinate system.
+     *
+     * This is the position of the beginning of the track i.e. closest
+     * to the interaction point. Usually in the first pixel plane.
+     */
+    float xLocal() const;
+
+    /** 
+     * @brief Set track position along X axis in station local coordinate system.
+     *
+     * @copydetails xAPD::AFPTrack_v2::xLocal()
+     * 
+     * @param newXLocal track coordinate along X axis in station local coordinate system
+     */
+    void setXLocal (float newXLocal);
+  
+    /** 
+     * @brief Track position along Y axis in station local coordinate system.
+     *
+     * @copydetail xAOD::AFPTrack_v2::xLocal()
+     */
+    float yLocal() const;
+
+    /** 
+     * @brief Set track coordinate along Y axis in station local coordinate system.
+     *
+     * @copydetails xAOD::AFPTrack_v2::yLocal()
+     * 
+     * @param newYLocal track position along Y axis in station local coordinate system
+     */
+    void setYLocal (float newYLocal);
+  
+    /** 
+     * @brief Track position along Z axis in station local coordinate system.
+     *
+     * @copydetails xAOD::AFPTrack_v2::xLocal()
+     */
+    float zLocal() const;
+
+    /** 
+     * @brief Set track coordinate along Z axis in station local coordinate system.
+     *
+     * @copydetails xAOD::AFPTrack_v2::zLocal()
+     * 
+     * @param newYLocal track coordinate along Z axis in station local coordinate system
+     */
+    void setZLocal (float newZLocal);
+
+    /** 
+     * @brief Slope of the reconstructed track along X axis in local coordinate system.
+     * 
+     * Difference between X position of the first and last cluster used to
+     * reconstruct track divided by their distance in Z direction.
+     * @f[
+     *   \textrm{xSlope} = \frac{x_{\textrm{end}} - x_{\textrm{begin}}}
+     *                          {z_{\textrm{end}} - z_{\textrm{begin}}}
+     * @f]
+     */
+    float xSlope() const;
+
+    /** 
+     * @brief Set slope of the reconstructed track along X axis in local coordinate system.
+     * 
+     * @copydetails xAOD::AFPTrack_v2::xSlope()
+     * 
+     * @param newXSlope slope of the track along X axis in local coordinate system
+     */
+    void setXSlope (float newXSlope);
+  
+
+    /** 
+     * @brief Slope of the reconstructed track along Y axis in local coordinate system.
+     * 
+     * Difference between Y position of the first and last cluster used to
+     * reconstruct track divided by their distance in Z direction.
+     * @f[
+     *   \textrm{ySlope} = \frac{y_{\textrm{end}} - y_{\textrm{begin}}}
+     *                          {z_{\textrm{end}} - z_{\textrm{begin}}}
+     * @f]
+     */
+    float ySlope() const;
+
+    /** 
+     * @brief Set slope of the reconstructed track along Y axis in local coordinate system.
+     * 
+     * @copydetails xAOD::AFPTrack_v2::ySlope()
+     * 
+     * @param newYSlope slope of the track along Y axis in local coordinate system
+     */
+    void setYSlope (float newYSlope);
+  
+    /** 
+     * @brief Number of empty layers that the track passes through.
+     * 
+     * Number of layers that are expected to be hit, because track
+     * goes through them, but which are considered to be not fired.
+     *
+     * @return Number of empty pixels that the track passes through
+     */
+    int nHoles() const;
+
+    /** 
+     * @brief Set number of empty pixels that the track passes through.
+     * 
+     * @copydetails xAOD::AFPTrack_v2::nHoles()
+     *
+     * @param nHoles number of empty pixels that the track passes through
+     */
+    void setNHoles (int nHoles);
+
+    /** 
+     * @brief Number of clusters used to reconstruct the track.
+     * 
+     * @return number of clusters used to reconstruct the track.
+     */
+    int nClusters() const;
+
+    /** 
+     * @brief Set number of clusters used to reconstruct the track.
+     * 
+     * @param nClusters number of clusters used to reconstruct the track
+     */
+    void setNClusters (int nClusters);
+
+    /** 
+     * @brief Vector of links to clusters that were used to reconstruct the track.
+     * 
+     * This method provides access to the clusters that were used to
+     * reconstruct the track via ElementLink object.
+     *
+     * @note 
+     * * It can be checked if the link is active using method ElementLink::isValid()
+     * * A pointer to the xAOD::AFPSiHitsCluster object can be retrieved using asterisk operator e.g.
+     *   @code{.cpp}
+     *   xAOD::AFPSiHitsCluster* cluster = *(clusters().at(0));
+     *   @endcode
+     * 
+     * @return 
+     */
+    const std::vector<AFPClusterLink_t>& clusters() const;
+
+    /** 
+     * @brief Set vector of links to clusters used for track reconstruction.
+     * 
+     * @param newClustersVector vector of links to clusters used for track reconstruction
+     */
+    void setClusters( const std::vector<AFPClusterLink_t>& newClustersVector );
+
+    /** 
+     * @brief Add a link to a cluster used to reconstruct the track.
+     *
+     * A new link to the cluster is added to the existing vector of links
+     * to the clusters used to reconstruct the track.
+     * 
+     * @param newCluster link to the cluster used to reconstruct the track
+     */
+    void addCluster( const AFPClusterLink_t& newCluster);
+
+    /** 
+     * @brief @f$\chi^2@f$ value of the track fit to the selected clusters.
+     *
+     * This value gives information about how well the fitted track
+     * lays on the selected clusters.
+     * 
+     * @return @f$\chi^2@f$ value of the track fit to the selected clusters
+     */    
+    float chi2() const;
+
+    /** 
+     * @brief Set @f$\chi^2@f$ value of the track fit to the selected clusters.
+     * 
+     * @param newFChi2 @f$\chi^2@f$ value of the track fit to the selected clusters
+     */
+    void setChi2 (float newFChi2);	
+
+    /** 
+     * @brief Identification number of the algorithm used to reconstruct the track.
+     * 
+     * It is advised to use class xAOD::AFPTrackRecoAlgID instead of
+     * integers to process this information. In this class the
+     * numbering scheme is explained.
+     * 
+     * @return identification number of the algorithm used to reconstruct the track (see xAOD::AFPTrackRecoAlgID )
+     */
+    int algID() const;
+
+    /** 
+     * @brief Set reconstruction algorithm identification number.
+     *
+     * @copydetails xAOD::AFPTrack_v2::algID()
+     * 
+     * @param newIAlgID identification number of the algorithm used to reconstruct the track
+     */
+    void setAlgID (int newIAlgID);
+
+    /// Function making sure that the object is ready for persistification i.e. saving
+    void toPersistent();
+  };
+
+}
+
+// Declare the inheritance of the type to StoreGate:
+#include "xAODCore/BaseInfo.h"
+SG_BASE( xAOD::AFPTrack_v2, SG::AuxElement );
+
+     
+#endif
+     
diff --git a/Event/xAOD/xAODForward/xAODForward/xAODForwardDict.h b/Event/xAOD/xAODForward/xAODForward/xAODForwardDict.h
index fb7e04b4f4c028331e827ed4670e8c4cac150361..d60e8c3720897bfef8cf1890e5132935d2ff2810 100644
--- a/Event/xAOD/xAODForward/xAODForward/xAODForwardDict.h
+++ b/Event/xAOD/xAODForward/xAODForward/xAODForwardDict.h
@@ -28,11 +28,20 @@
 #include "xAODForward/versions/AFPDataAuxContainer_v1.h"
 #include "xAODForward/versions/AFPData_v1.h"
 
+#include "xAODForward/AFPToFHitContainer.h"
+#include "xAODForward/AFPToFHitAuxContainer.h"
+#include "xAODForward/versions/AFPToFHitContainer_v1.h"
+#include "xAODForward/versions/AFPToFHitAuxContainer_v1.h"
+#include "xAODForward/versions/AFPToFHit_v1.h"
+
 #include "xAODForward/AFPSiHitContainer.h"
 #include "xAODForward/AFPSiHitAuxContainer.h"
 #include "xAODForward/versions/AFPSiHitContainer_v1.h"
 #include "xAODForward/versions/AFPSiHitAuxContainer_v1.h"
 #include "xAODForward/versions/AFPSiHit_v1.h"
+#include "xAODForward/versions/AFPSiHitContainer_v2.h"
+#include "xAODForward/versions/AFPSiHitAuxContainer_v2.h"
+#include "xAODForward/versions/AFPSiHit_v2.h"
 
 #include "xAODForward/AFPSiHitsClusterContainer.h"
 #include "xAODForward/AFPSiHitsClusterAuxContainer.h"
@@ -45,6 +54,15 @@
 #include "xAODForward/versions/AFPTrackContainer_v1.h"
 #include "xAODForward/versions/AFPTrackAuxContainer_v1.h"
 #include "xAODForward/versions/AFPTrack_v1.h"
+#include "xAODForward/versions/AFPTrackContainer_v2.h"
+#include "xAODForward/versions/AFPTrackAuxContainer_v2.h"
+#include "xAODForward/versions/AFPTrack_v2.h"
+
+#include "xAODForward/AFPProtonContainer.h"
+#include "xAODForward/AFPProtonAuxContainer.h"
+#include "xAODForward/versions/AFPProtonContainer_v1.h"
+#include "xAODForward/versions/AFPProtonAuxContainer_v1.h"
+#include "xAODForward/versions/AFPProton_v1.h"
 
 #include "xAODForward/ZdcModuleContainer.h"
 #include "xAODForward/ZdcModuleAuxContainer.h"
@@ -75,6 +93,13 @@ namespace xAOD
     std::vector<ElementLink<xAOD::AFPDataContainer_v1> > afp_l4;
     std::vector<std::vector<ElementLink<xAOD::AFPDataContainer_v1> > > afp_l5;
 
+    xAOD::AFPToFHitContainer_v1 afpToFHit_c1;
+    DataLink<xAOD::AFPToFHitContainer_v1> afpToFHit_l1;
+    std::vector<DataLink<xAOD::AFPToFHitContainer_v1> > afpToFHit_l2;
+    ElementLink<xAOD::AFPToFHitContainer_v1> afpToFHit_l3;
+    std::vector<ElementLink<xAOD::AFPToFHitContainer_v1> > afpToFHit_l4;
+    std::vector<std::vector<ElementLink<xAOD::AFPToFHitContainer_v1> > > afpToFHit_l5;
+    
     xAOD::AFPSiHitContainer_v1 afpSiHit_c1;
     DataLink<xAOD::AFPSiHitContainer_v1> afpSiHit_l1;
     std::vector<DataLink<xAOD::AFPSiHitContainer_v1> > afpSiHit_l2;
@@ -82,6 +107,13 @@ namespace xAOD
     std::vector<ElementLink<xAOD::AFPSiHitContainer_v1> > afpSiHit_l4;
     std::vector<std::vector<ElementLink<xAOD::AFPSiHitContainer_v1> > > afpSiHit_l5;
 
+    xAOD::AFPSiHitContainer_v2 afpSiHit_c21;
+    DataLink<xAOD::AFPSiHitContainer_v2> afpSiHit_l21;
+    std::vector<DataLink<xAOD::AFPSiHitContainer_v2> > afpSiHit_l22;
+    ElementLink<xAOD::AFPSiHitContainer_v2> afpSiHit_l23;
+    std::vector<ElementLink<xAOD::AFPSiHitContainer_v2> > afpSiHit_l24;
+    std::vector<std::vector<ElementLink<xAOD::AFPSiHitContainer_v2> > > afpSiHit_l25;
+
     xAOD::AFPSiHitsClusterContainer_v1 afpSiHitsContainer_c1;
     DataLink<xAOD::AFPSiHitsClusterContainer_v1> afpSiHitsContainer_l1;
     std::vector<DataLink<xAOD::AFPSiHitsClusterContainer_v1> > afpSiHitsContainer_l2;
@@ -89,6 +121,7 @@ namespace xAOD
     std::vector<ElementLink<xAOD::AFPSiHitsClusterContainer_v1> > afpSiHitsContainer_l4;
     std::vector<std::vector<ElementLink<xAOD::AFPSiHitsClusterContainer_v1> > > afpSiHitsContainer_l5;
 
+
     xAOD::AFPTrackContainer_v1 afpTrack_c1;
     DataLink<xAOD::AFPTrackContainer_v1> afpTrack_l1;
     std::vector<DataLink<xAOD::AFPTrackContainer_v1> > afpTrack_l2;
@@ -96,6 +129,13 @@ namespace xAOD
     std::vector<ElementLink<xAOD::AFPTrackContainer_v1> > afpTrack_l4;
     std::vector<std::vector<ElementLink<xAOD::AFPTrackContainer_v1> > > afpTrack_l5;
 
+    xAOD::AFPProtonContainer_v1 afpProton_c1;
+    DataLink<xAOD::AFPProtonContainer_v1> afpProton_l1;
+    std::vector<DataLink<xAOD::AFPProtonContainer_v1> > afpProton_l2;
+    ElementLink<xAOD::AFPProtonContainer_v1> afpProton_l3;
+    std::vector<ElementLink<xAOD::AFPProtonContainer_v1> > afpProton_l4;
+    std::vector<std::vector<ElementLink<xAOD::AFPProtonContainer_v1> > > afpProton_l5;
+
   };
 
   struct GCCXML_DUMMY_INSTANTIATION_ALFA_XAOD
diff --git a/Event/xAOD/xAODForwardAthenaPool/CMakeLists.txt b/Event/xAOD/xAODForwardAthenaPool/CMakeLists.txt
index c9601da9270b261daabf6a193335ab4b5c0df75e..911634a1081a57d632bd5f33fbc4be5681114231 100644
--- a/Event/xAOD/xAODForwardAthenaPool/CMakeLists.txt
+++ b/Event/xAOD/xAODForwardAthenaPool/CMakeLists.txt
@@ -6,33 +6,47 @@
 atlas_subdir( xAODForwardAthenaPool )
 
 # Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Control/AthContainers
-                          Control/AthenaKernel
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Event/xAOD/xAODForward )
+atlas_depends_on_subdirs(
+   PRIVATE
+   Control/AthContainers
+   Control/AthenaKernel
+   Database/AthenaPOOL/AthenaPoolCnvSvc
+   Database/AthenaPOOL/AthenaPoolUtilities
+   Event/xAOD/xAODForward )
 
 # Component(s) in the package:
 atlas_add_poolcnv_library( xAODForwardAthenaPoolPoolCnv
-                           src/*.cxx
-                           FILES xAODForward/ALFADataContainer.h
-			   xAODForward/ALFADataAuxContainer.h
-			   xAODForward/AFPDataContainer.h
-			   xAODForward/AFPDataAuxContainer.h
-   			   xAODForward/AFPSiHitContainer.h
-			   xAODForward/AFPSiHitAuxContainer.h
-   			   xAODForward/AFPSiHitsClusterContainer.h
-			   xAODForward/AFPSiHitsClusterAuxContainer.h
-   			   xAODForward/AFPTrackContainer.h
-			   xAODForward/AFPTrackAuxContainer.h
-			   xAODForward/ZdcModuleContainer.h
-			   xAODForward/ZdcModuleAuxContainer.h
-			   xAODForward/MBTSModuleContainer.h
-			   xAODForward/MBTSModuleAuxContainer.h
-			   xAODForward/ForwardEventInfoContainer.h
-			   xAODForward/ForwardEventInfoAuxContainer.h
-                           TYPES_WITH_NAMESPACE xAOD::ALFADataContainer xAOD::ALFADataAuxContainer xAOD::AFPDataContainer xAOD::AFPDataAuxContainer xAOD::AFPSiHitContainer xAOD::AFPSiHitAuxContainer xAOD::AFPSiHitsClusterContainer xAOD::AFPSiHitsClusterAuxContainer xAOD::AFPTrackContainer xAOD::AFPTrackAuxContainer xAOD::ZdcModuleContainer xAOD::ZdcModuleAuxContainer xAOD::MBTSModuleContainer xAOD::MBTSModuleAuxContainer xAOD::ForwardEventInfoContainer xAOD::ForwardEventInfoAuxContainer
-                           CNV_PFX xAOD
-                           LINK_LIBRARIES AthContainers AthenaKernel AthenaPoolCnvSvcLib AthenaPoolUtilities xAODForward )
-
+   src/*.h src/*.cxx
+   FILES xAODForward/ALFADataContainer.h
+   xAODForward/ALFADataAuxContainer.h
+   xAODForward/AFPDataContainer.h
+   xAODForward/AFPDataAuxContainer.h
+   xAODForward/AFPSiHitContainer.h
+   xAODForward/AFPSiHitAuxContainer.h
+   xAODForward/AFPToFHitContainer.h
+   xAODForward/AFPToFHitAuxContainer.h
+   xAODForward/AFPSiHitsClusterContainer.h
+   xAODForward/AFPSiHitsClusterAuxContainer.h
+   xAODForward/AFPTrackContainer.h
+   xAODForward/AFPTrackAuxContainer.h
+   xAODForward/AFPProtonContainer.h
+   xAODForward/AFPProtonAuxContainer.h
+   xAODForward/ZdcModuleContainer.h
+   xAODForward/ZdcModuleAuxContainer.h
+   xAODForward/MBTSModuleContainer.h
+   xAODForward/MBTSModuleAuxContainer.h
+   xAODForward/ForwardEventInfoContainer.h
+   xAODForward/ForwardEventInfoAuxContainer.h
+   TYPES_WITH_NAMESPACE xAOD::ALFADataContainer xAOD::ALFADataAuxContainer
+   xAOD::AFPDataContainer xAOD::AFPDataAuxContainer
+   xAOD::AFPSiHitContainer xAOD::AFPSiHitAuxContainer
+   xAOD::AFPToFHitContainer xAOD::AFPToFHitAuxContainer
+   xAOD::AFPSiHitsClusterContainer xAOD::AFPSiHitsClusterAuxContainer
+   xAOD::AFPTrackContainer xAOD::AFPTrackAuxContainer
+   xAOD::AFPProtonContainer xAOD::AFPProtonAuxContainer
+   xAOD::ZdcModuleContainer xAOD::ZdcModuleAuxContainer
+   xAOD::MBTSModuleContainer xAOD::MBTSModuleAuxContainer
+   xAOD::ForwardEventInfoContainer xAOD::ForwardEventInfoAuxContainer
+   CNV_PFX xAOD
+   LINK_LIBRARIES AthContainers AthenaKernel AthenaPoolCnvSvcLib
+   AthenaPoolUtilities xAODForward )
diff --git a/ForwardDetectors/AFP/AFP_Reconstruction/AFP_LocReco/src/AFP_SIDLocReco.cxx b/ForwardDetectors/AFP/AFP_Reconstruction/AFP_LocReco/src/AFP_SIDLocReco.cxx
index 14663c7e6fba77327930b3f25b76381d7f4e9cd3..3f7b5bd8e0329a0826302d32e0a2071375080cc7 100644
--- a/ForwardDetectors/AFP/AFP_Reconstruction/AFP_LocReco/src/AFP_SIDLocReco.cxx
+++ b/ForwardDetectors/AFP/AFP_Reconstruction/AFP_LocReco/src/AFP_SIDLocReco.cxx
@@ -393,7 +393,7 @@ StatusCode AFP_SIDLocReco::ExecuteRecoMethod(const std::string strAlgo, const st
 	    track->setXSlope(iter->x_slope);
 	    track->setYSlope(iter->y_slope);
 	    //			    track->setz_slope	iter->z_slope;
-	    track->setNHits(iter->nHits);
+	    // track->setNHits(iter->nHits);
 	    track->setNHoles(iter->nHoles);
 	    track->setChi2(iter->fChi2);
 
@@ -423,14 +423,14 @@ StatusCode AFP_SIDLocReco::ExecuteRecoMethod(const std::string strAlgo, const st
               if (result < siHitContainer->size()) {
 		ATH_MSG_DEBUG("To the list of hits in a track adding hit "<<result<<"/"<<siHitContainer->size()<<".");
 
-		ElementLink< xAOD::AFPSiHitContainer >* hitLink = new ElementLink< xAOD::AFPSiHitContainer >;
-		hitLink->toIndexedElement(*siHitContainer, result);
-		track->addHit(*hitLink);
+		// ElementLink< xAOD::AFPSiHitContainer >* hitLink = new ElementLink< xAOD::AFPSiHitContainer >;
+		// hitLink->toIndexedElement(*siHitContainer, result);
+		// track->addHit(*hitLink);
 
-		ElementLink< xAOD::AFPTrackContainer >* trackLink = new ElementLink< xAOD::AFPTrackContainer >;
-		trackLink->toIndexedElement(*resultContainer, resultContainer->size() -1);
-		xAOD::AFPSiHit * hit = const_cast<xAOD::AFPSiHit*> (siHitContainer->at(result));
-		hit->addTrackLink(*trackLink);
+		// ElementLink< xAOD::AFPTrackContainer >* trackLink = new ElementLink< xAOD::AFPTrackContainer >;
+		// trackLink->toIndexedElement(*resultContainer, resultContainer->size() -1);
+		// xAOD::AFPSiHit * hit = const_cast<xAOD::AFPSiHit*> (siHitContainer->at(result));
+		// hit->addTrackLink(*trackLink);
 	      }
 	      else
 		ATH_MSG_WARNING("Track hit not found in hits list. HitID: "<<(*hitIter)