From 90187e891cdea3adaf0c6cc38327399c7f439bff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A9ter=20Kardos?= <kardospeter1994@hotmail.com>
Date: Tue, 20 Nov 2018 12:12:38 +0100
Subject: [PATCH 1/4] added TrackHit header and data members to Track_v2

---
 Event/TrackEvent/Event/TrackHit.h | 32 +++++++++++++++++++++++++++++++
 Event/TrackEvent/Event/Track_v2.h |  5 ++++-
 2 files changed, 36 insertions(+), 1 deletion(-)
 create mode 100644 Event/TrackEvent/Event/TrackHit.h

diff --git a/Event/TrackEvent/Event/TrackHit.h b/Event/TrackEvent/Event/TrackHit.h
new file mode 100644
index 00000000000..44d9a29f7ec
--- /dev/null
+++ b/Event/TrackEvent/Event/TrackHit.h
@@ -0,0 +1,32 @@
+/*****************************************************************************\
+* (c) Copyright 2018 CERN for the benefit of the LHCb Collaboration           *
+*                                                                             *
+* This software is distributed under the terms of the GNU General Public      *
+* Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   *
+*                                                                             *
+* In applying this licence, CERN does not waive the privileges and immunities *
+* granted to it by virtue of its status as an Intergovernmental Organization  *
+* or submit itself to any jurisdiction.                                       *
+\*****************************************************************************/
+
+#pragma once
+
+#include "GaudiKernel/Point3DTypes.h"
+#include "GaudiKernel/Vector3DTypes.h"
+
+
+namespace LHCb {  
+
+  struct TrackHit {
+    TrackHit() = default;
+    TrackHit(Gaudi::XYZPointF beginPoint, Gaudi::XYZPointF endPoint, float errorx, float errory, int layer) 
+      : beginPoint(beginPoint), endPoint(endPoint), errorx(errorx), errory(errory), layer(layer) {}
+
+    Gaudi::XYZPointF beginPoint;
+    Gaudi::XYZPointF endPoint;
+    float errorx;
+    float errory;
+    int layer;
+  };
+
+} // namespace LHCb
diff --git a/Event/TrackEvent/Event/Track_v2.h b/Event/TrackEvent/Event/Track_v2.h
index bb9da13cede..977438813ec 100644
--- a/Event/TrackEvent/Event/Track_v2.h
+++ b/Event/TrackEvent/Event/Track_v2.h
@@ -17,6 +17,7 @@
 #include "Event/State.h"
 #include "Event/TrackParameters.h"
 #include "Event/TrackTags.h"
+#include "Event/TrackHit.h"
 #include "GaudiKernel/GaudiException.h"
 #include "GaudiKernel/GenericMatrixTypes.h"
 #include "GaudiKernel/Plane3DTypes.h"
@@ -487,9 +488,11 @@ namespace LHCb::Event
       void addToAncestors( const Track& ancestor ) { m_ancestors.push_back( &ancestor ); };
       const std::vector<const Track*> ancestors() const { return m_ancestors; }
 
-    protected:
     public:
       double forwardPatQuality = std::numeric_limits<double>::signaling_NaN();
+      std::vector<LHCb::TrackHit> ftHits;
+      std::vector<LHCb::TrackHit> utHits;
+      std::vector<LHCb::TrackHit> veloHits;
     private:
       Chi2PerDoF                                  m_chi2PerDoF{};
       unsigned int                                m_flags{0};              ///< The variety of track flags
-- 
GitLab


From feef42501fd50b4d19694bd1db4f9b16aff6d7f5 Mon Sep 17 00:00:00 2001
From: Peter Kardos <peter.kardos@cern.ch>
Date: Mon, 26 Nov 2018 17:02:05 +0100
Subject: [PATCH 2/4] Added default initializers to TrackHit

---
 Event/TrackEvent/Event/TrackHit.h | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/Event/TrackEvent/Event/TrackHit.h b/Event/TrackEvent/Event/TrackHit.h
index 44d9a29f7ec..f51ee1af009 100644
--- a/Event/TrackEvent/Event/TrackHit.h
+++ b/Event/TrackEvent/Event/TrackHit.h
@@ -13,20 +13,28 @@
 
 #include "GaudiKernel/Point3DTypes.h"
 #include "GaudiKernel/Vector3DTypes.h"
+#include <limits>
 
-
-namespace LHCb {  
-
+namespace LHCb {
+  
   struct TrackHit {
     TrackHit() = default;
     TrackHit(Gaudi::XYZPointF beginPoint, Gaudi::XYZPointF endPoint, float errorx, float errory, int layer) 
       : beginPoint(beginPoint), endPoint(endPoint), errorx(errorx), errory(errory), layer(layer) {}
 
-    Gaudi::XYZPointF beginPoint;
-    Gaudi::XYZPointF endPoint;
-    float errorx;
-    float errory;
-    int layer;
+    Gaudi::XYZPointF beginPoint = { 
+      std::numeric_limits<float>::signaling_NaN(),
+      std::numeric_limits<float>::signaling_NaN(),
+      std::numeric_limits<float>::signaling_NaN() 
+    };
+    Gaudi::XYZPointF endPoint = { 
+      std::numeric_limits<float>::signaling_NaN(),
+      std::numeric_limits<float>::signaling_NaN(),
+      std::numeric_limits<float>::signaling_NaN() 
+    };
+    float errorx = std::numeric_limits<float>::signaling_NaN();
+    float errory = std::numeric_limits<float>::signaling_NaN();
+    int layer = std::numeric_limits<int>::max();
   };
 
 } // namespace LHCb
-- 
GitLab


From 94e7b7e9419b83d87a83b4caed144be3525ac77d Mon Sep 17 00:00:00 2001
From: Peter Kardos <peter.kardos@cern.ch>
Date: Fri, 30 Nov 2018 12:18:59 +0100
Subject: [PATCH 3/4] added static_assert to test track's size, updated value,
 removed boost_test

---
 Event/TrackEvent/src/Track_v2.cpp            | 5 +++++
 Event/TrackEvent/tests/src/test_track_v2.cpp | 7 -------
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/Event/TrackEvent/src/Track_v2.cpp b/Event/TrackEvent/src/Track_v2.cpp
index bc4396cd79d..58f7ba62577 100644
--- a/Event/TrackEvent/src/Track_v2.cpp
+++ b/Event/TrackEvent/src/Track_v2.cpp
@@ -74,6 +74,11 @@ namespace
 
 namespace LHCb::Event::v2
 {
+    //=============================================================================
+    // Ensure people are aware of changing the Track's size.
+    //=============================================================================
+    static_assert(sizeof(Track) == 224, "You may update this, but make sure to keep the Track's size low.");
+
 
     //=============================================================================
     // Retrieve the probability of chi^2
diff --git a/Event/TrackEvent/tests/src/test_track_v2.cpp b/Event/TrackEvent/tests/src/test_track_v2.cpp
index 00339b1dd8d..03b6c619a51 100644
--- a/Event/TrackEvent/tests/src/test_track_v2.cpp
+++ b/Event/TrackEvent/tests/src/test_track_v2.cpp
@@ -253,10 +253,3 @@ BOOST_AUTO_TEST_CASE(test_track_assignments){
   static_assert(std::is_assignable_v<Track&,Track>);
   static_assert(std::is_nothrow_assignable_v<Track&,Track>);
 }
-
-BOOST_AUTO_TEST_CASE(test_track_object_size){
-  auto tr = Track{};
-  BOOST_CHECK( sizeof(tr)==152 );
-}
-
-
-- 
GitLab


From 225e31c40b8ae01716e69b089124be57c5d5b9c5 Mon Sep 17 00:00:00 2001
From: Peter Kardos <peter.kardos@cern.ch>
Date: Thu, 6 Dec 2018 16:04:07 +0100
Subject: [PATCH 4/4] removed test for track's size

---
 Event/TrackEvent/src/Track_v2.cpp | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/Event/TrackEvent/src/Track_v2.cpp b/Event/TrackEvent/src/Track_v2.cpp
index 58f7ba62577..34ffdcb8b36 100644
--- a/Event/TrackEvent/src/Track_v2.cpp
+++ b/Event/TrackEvent/src/Track_v2.cpp
@@ -74,12 +74,6 @@ namespace
 
 namespace LHCb::Event::v2
 {
-    //=============================================================================
-    // Ensure people are aware of changing the Track's size.
-    //=============================================================================
-    static_assert(sizeof(Track) == 224, "You may update this, but make sure to keep the Track's size low.");
-
-
     //=============================================================================
     // Retrieve the probability of chi^2
     //=============================================================================
-- 
GitLab