Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:12:25

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 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 https://mozilla.org/MPL/2.0/.
0008 
0009 ///////////////////////////////////////////////////////////////////
0010 // Seed.hpp Acts project
0011 ///////////////////////////////////////////////////////////////////
0012 
0013 #pragma once
0014 
0015 #include <list>
0016 
0017 namespace Acts::Legacy {
0018 
0019 template <typename SpacePoint>
0020 class Seed {
0021   /////////////////////////////////////////////////////////////////////////////////
0022   // Public methods:
0023   /////////////////////////////////////////////////////////////////////////////////
0024 
0025  public:
0026   Seed();
0027   Seed(const SpacePoint* /*b*/, const SpacePoint* /*m*/,
0028        const SpacePoint* /*u*/, const double /*vertex*/);
0029   Seed(const Seed& /*s*/);
0030   Seed& operator=(const Seed& /*s*/);
0031   virtual ~Seed();
0032   void erase();
0033   void add(const SpacePoint*& /*sp*/);
0034   void setZVertex(const double& /*z*/);
0035   const std::list<const SpacePoint*>& spacePoints() const;
0036   const double& zVertex() const;
0037 
0038   /////////////////////////////////////////////////////////////////////////////////
0039   // Protected data members
0040   /////////////////////////////////////////////////////////////////////////////////
0041 
0042  protected:
0043   std::list<const SpacePoint*> m_spacepoints;
0044   double m_zvertex = 0;
0045 };
0046 
0047 /// @cond
0048 
0049 /////////////////////////////////////////////////////////////////////////////////
0050 // Inline methods
0051 /////////////////////////////////////////////////////////////////////////////////
0052 
0053 template <typename SpacePoint>
0054 inline const std::list<const SpacePoint*>& Seed<SpacePoint>::spacePoints()
0055     const {
0056   return this->m_spacepoints;
0057 }
0058 
0059 template <typename SpacePoint>
0060 inline void Seed<SpacePoint>::erase() {
0061   m_spacepoints.erase(m_spacepoints.begin(), m_spacepoints.end());
0062 }
0063 
0064 template <typename SpacePoint>
0065 inline void Seed<SpacePoint>::add(const SpacePoint*& p) {
0066   m_spacepoints.push_back(p);
0067 }
0068 
0069 template <typename SpacePoint>
0070 inline void Seed<SpacePoint>::setZVertex(const double& z) {
0071   m_zvertex = z;
0072 }
0073 
0074 template <typename SpacePoint>
0075 inline const double& Seed<SpacePoint>::zVertex() const {
0076   return m_zvertex;
0077 }
0078 
0079 ///////////////////////////////////////////////////////////////////////////////
0080 // Constructors
0081 ///////////////////////////////////////////////////////////////////////////////
0082 
0083 template <typename SpacePoint>
0084 Seed<SpacePoint>::Seed(const Seed<SpacePoint>& s) {
0085   m_spacepoints = s.spacePoints();
0086   m_zvertex = s.zVertex();
0087 }
0088 
0089 template <typename SpacePoint>
0090 Seed<SpacePoint>& Seed<SpacePoint>::operator=(const Seed<SpacePoint>& s) {
0091   m_spacepoints = s.spacePoints();
0092   m_zvertex = s.zVertex();
0093   return *this;
0094 }
0095 
0096 template <typename SpacePoint>
0097 Seed<SpacePoint>::Seed() = default;
0098 
0099 template <typename SpacePoint>
0100 Seed<SpacePoint>::Seed(const SpacePoint* b, const SpacePoint* m,
0101                        const SpacePoint* u, const double vertex) {
0102   m_zvertex = vertex;
0103   m_spacepoints.push_back(b);
0104   m_spacepoints.push_back(m);
0105   m_spacepoints.push_back(u);
0106 }
0107 
0108 template <typename SpacePoint>
0109 Seed<SpacePoint>::~Seed() = default;
0110 
0111 /// @endcond
0112 
0113 }  // namespace Acts::Legacy