ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LegacySeed.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file LegacySeed.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2018 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
10 // Seed.hpp Acts project
12 
13 #pragma once
14 #include <list>
15 
16 namespace Acts {
17 namespace Legacy {
18 
19 template <typename SpacePoint>
20 class Seed {
22  // Public methods:
24 
25  public:
26  Seed();
27  Seed(const SpacePoint*, const SpacePoint*, const SpacePoint*, const double);
28  Seed(const Seed&);
29  Seed& operator=(const Seed&);
30  virtual ~Seed();
31  void erase();
32  void add(const SpacePoint*&);
33  void setZVertex(const double&);
34  const std::list<const SpacePoint*>& spacePoints() const;
35  const double& zVertex() const;
36 
38  // Protected data members
40 
41  protected:
42  std::list<const SpacePoint*> m_spacepoints;
43  double m_zvertex;
44 };
45 
47 // Inline methods
49 
50 template <typename SpacePoint>
51 inline const std::list<const SpacePoint*>& Seed<SpacePoint>::spacePoints()
52  const {
53  return this->m_spacepoints;
54 }
55 
56 template <typename SpacePoint>
57 inline void Seed<SpacePoint>::erase() {
58  m_spacepoints.erase(m_spacepoints.begin(), m_spacepoints.end());
59 }
60 
61 template <typename SpacePoint>
62 inline void Seed<SpacePoint>::add(const SpacePoint*& p) {
63  m_spacepoints.push_back(p);
64 }
65 
66 template <typename SpacePoint>
67 inline void Seed<SpacePoint>::setZVertex(const double& z) {
68  m_zvertex = z;
69 }
70 
71 template <typename SpacePoint>
72 inline const double& Seed<SpacePoint>::zVertex() const {
73  return m_zvertex;
74 }
75 
77 // Constructors
79 
80 template <typename SpacePoint>
82  m_spacepoints = s.spacePoints();
83  m_zvertex = s.zVertex();
84 }
85 
86 template <typename SpacePoint>
88  m_spacepoints = s.spacePoints();
89  m_zvertex = s.zVertex();
90  return *this;
91 }
92 
93 template <typename SpacePoint>
95 
96 template <typename SpacePoint>
98  const SpacePoint* u, const double vertex) {
99  m_zvertex = vertex;
100  m_spacepoints.push_back(b);
101  m_spacepoints.push_back(m);
102  m_spacepoints.push_back(u);
103 }
104 
105 template <typename SpacePoint>
107 } // namespace Legacy
108 } // namespace Acts