Analysis Software
Documentation for sPHENIX simulation 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* /*b*/, const SpacePoint* /*m*/,
28  const SpacePoint* /*u*/, const double /*vertex*/);
29  Seed(const Seed& /*s*/);
30  Seed& operator=(const Seed& /*s*/);
31  virtual ~Seed();
32  void erase();
33  void add(const SpacePoint*& /*sp*/);
34  void setZVertex(const double& /*z*/);
35  const std::list<const SpacePoint*>& spacePoints() const;
36  const double& zVertex() const;
37 
39  // Protected data members
41 
42  protected:
43  std::list<const SpacePoint*> m_spacepoints;
44  double m_zvertex = 0;
45 };
46 
48 
50 // Inline methods
52 
53 template <typename SpacePoint>
54 inline const std::list<const SpacePoint*>& Seed<SpacePoint>::spacePoints()
55  const {
56  return this->m_spacepoints;
57 }
58 
59 template <typename SpacePoint>
60 inline void Seed<SpacePoint>::erase() {
61  m_spacepoints.erase(m_spacepoints.begin(), m_spacepoints.end());
62 }
63 
64 template <typename SpacePoint>
65 inline void Seed<SpacePoint>::add(const SpacePoint*& p) {
66  m_spacepoints.push_back(p);
67 }
68 
69 template <typename SpacePoint>
70 inline void Seed<SpacePoint>::setZVertex(const double& z) {
71  m_zvertex = z;
72 }
73 
74 template <typename SpacePoint>
75 inline const double& Seed<SpacePoint>::zVertex() const {
76  return m_zvertex;
77 }
78 
80 // Constructors
82 
83 template <typename SpacePoint>
84 Seed<SpacePoint>::Seed(const Seed<SpacePoint>& s) {
85  m_spacepoints = s.spacePoints();
86  m_zvertex = s.zVertex();
87 }
88 
89 template <typename SpacePoint>
90 Seed<SpacePoint>& Seed<SpacePoint>::operator=(const Seed<SpacePoint>& s) {
91  m_spacepoints = s.spacePoints();
92  m_zvertex = s.zVertex();
93  return *this;
94 }
95 
96 template <typename SpacePoint>
97 Seed<SpacePoint>::Seed() = default;
98 
99 template <typename SpacePoint>
101  const SpacePoint* u, const double vertex) {
102  m_zvertex = vertex;
103  m_spacepoints.push_back(b);
104  m_spacepoints.push_back(m);
105  m_spacepoints.push_back(u);
106 }
107 
108 template <typename SpacePoint>
109 Seed<SpacePoint>::~Seed() = default;
110 
112 
113 } // namespace Legacy
114 } // namespace Acts