Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:27:49

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 2018 CERN for the benefit of the Acts project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include <limits>
0012 #include <vector>
0013 
0014 #include <boost/container/small_vector.hpp>
0015 
0016 namespace Acts {
0017 template <typename SpacePoint>
0018 class Seed {
0019   /////////////////////////////////////////////////////////////////////////////////
0020   // Public methods:
0021   /////////////////////////////////////////////////////////////////////////////////
0022 
0023  public:
0024   Seed(const SpacePoint& b, const SpacePoint& m, const SpacePoint& u,
0025        float vertex,
0026        float seedQuality = -std::numeric_limits<float>::infinity());
0027   Seed(const Seed&) = default;
0028   Seed& operator=(const Seed&) = default;
0029 
0030   const auto& sp() const { return m_spacepoints; }
0031   double z() const { return m_zvertex; }
0032   float seedQuality() const { return m_seedQuality; }
0033 
0034  private:
0035   boost::container::small_vector<const SpacePoint*, 3> m_spacepoints;
0036   float m_zvertex;
0037   float m_seedQuality;
0038 };
0039 
0040 ///////////////////////////////////////////////////////////////////////////////
0041 // Constructors
0042 ///////////////////////////////////////////////////////////////////////////////
0043 
0044 template <typename SpacePoint>
0045 Seed<SpacePoint>::Seed(const SpacePoint& b, const SpacePoint& m,
0046                        const SpacePoint& u, float vertex, float seedQuality) {
0047   m_zvertex = vertex;
0048   m_spacepoints.push_back(&b);
0049   m_spacepoints.push_back(&m);
0050   m_spacepoints.push_back(&u);
0051   m_seedQuality = seedQuality;
0052 }
0053 
0054 }  // namespace Acts