Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Seed.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Seed.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 
9 #pragma once
10 
11 #include <limits>
12 #include <vector>
13 
14 #include <boost/container/small_vector.hpp>
15 
16 namespace Acts {
17 template <typename SpacePoint>
18 class Seed {
20  // Public methods:
22 
23  public:
24  Seed(const SpacePoint& b, const SpacePoint& m, const SpacePoint& u,
25  float vertex,
26  float seedQuality = -std::numeric_limits<float>::infinity());
27  Seed(const Seed&) = default;
28  Seed& operator=(const Seed&) = default;
29 
30  const auto& sp() const { return m_spacepoints; }
31  double z() const { return m_zvertex; }
32  float seedQuality() const { return m_seedQuality; }
33 
34  private:
35  boost::container::small_vector<const SpacePoint*, 3> m_spacepoints;
36  float m_zvertex;
38 };
39 
41 // Constructors
43 
44 template <typename SpacePoint>
46  const SpacePoint& u, float vertex, float seedQuality) {
47  m_zvertex = vertex;
48  m_spacepoints.push_back(&b);
49  m_spacepoints.push_back(&m);
50  m_spacepoints.push_back(&u);
51  m_seedQuality = seedQuality;
52 }
53 
54 } // namespace Acts