Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:18:10

0001 #ifndef TRACKBASE_SPACEPOINT_H
0002 #define TRACKBASE_SPACEPOINT_H
0003 
0004 #include <memory>
0005 #include <optional>
0006 #include "trackbase/TrkrDefs.h"
0007 
0008 #include <Acts/Geometry/GeometryIdentifier.hpp>
0009 #include <Acts/Seeding/Seed.hpp>
0010 
0011 /**
0012  * A struct for Acts to take cluster information for seeding
0013  */
0014 struct SpacePoint
0015 {
0016   TrkrDefs::cluskey m_clusKey;
0017   double m_x;
0018   double m_y;
0019   double m_z;
0020   double m_r;
0021   Acts::GeometryIdentifier m_geoId;
0022   double m_varianceR;
0023   double m_varianceZ;
0024   std::optional<double> m_t;
0025 
0026   TrkrDefs::cluskey Id() const { return m_clusKey; }
0027 
0028   /// These are needed by Acts
0029   double x() const { return m_x; }
0030   double y() const { return m_y; }
0031   double z() const { return m_z; }
0032   double r() const { return m_r; }
0033    std::optional<double> t() const { return m_t; }
0034   double varianceR() const { return m_varianceR; }
0035   double varianceZ() const { return m_varianceZ; }
0036 };
0037 
0038 /// This is needed by the Acts seedfinder
0039 inline bool operator==(SpacePoint a, SpacePoint b)
0040 {
0041   return (a.m_clusKey == b.m_clusKey);
0042 }
0043 
0044 using SpacePointPtr = std::unique_ptr<SpacePoint>;
0045 using SeedContainer = std::vector<Acts::Seed<SpacePoint>>;
0046 
0047 #endif