Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 #ifndef TRACKBASE_ACTSSURFACEMAPS_H
0002 #define TRACKBASE_ACTSSURFACEMAPS_H
0003 /*!
0004  *  \file       ActsSurfaceMaps.h
0005  *  \brief      maps hitsetids to Acts Surfaces
0006  *  \author Tony Frawley <afrawley@fsu.edu>, Joe Osborn <osbornjd@ornl.gov>, Hugo Pereira Da Costa <hugo.pereira-da-costa@cea.fr>
0007  */
0008 
0009 #include "ActsTrackingGeometry.h"
0010 #include "TrkrDefs.h"
0011 
0012 /// Acts includes to create all necessary definitions
0013 #include <Acts/Definitions/Algebra.hpp>
0014 #include <Acts/Utilities/BinnedArray.hpp>
0015 #include <Acts/Utilities/Logger.hpp>
0016 
0017 namespace Acts
0018 {
0019   class Surface;
0020 }
0021 class TGeoNode;
0022 class TrkrCluster;
0023 
0024 #include <map>
0025 #include <memory>
0026 #include <set>
0027 #include <vector>
0028 
0029 using Surface = std::shared_ptr<const Acts::Surface>;
0030 using SurfaceVec = std::vector<Surface>;
0031 
0032 struct ActsSurfaceMaps
0033 {
0034  public:
0035   ActsSurfaceMaps() = default;
0036 
0037   //! true if given surface corresponds to TPC
0038   bool isTpcSurface(const Acts::Surface* surface) const;
0039 
0040   //! true if given surface corresponds to Micromegas
0041   bool isMicromegasSurface(const Acts::Surface* surface) const;
0042 
0043   Surface getSurface(TrkrDefs::cluskey, TrkrCluster* cluster) const;
0044 
0045   Surface getSiliconSurface(TrkrDefs::hitsetkey hitsetkey) const;
0046 
0047   Surface getTpcSurface(TrkrDefs::hitsetkey hitsetkey,
0048                         TrkrDefs::subsurfkey surfkey) const;
0049 
0050   Surface getMMSurface(TrkrDefs::hitsetkey hitsetkey) const;
0051 
0052   //! map hitset to Surface for the silicon detectors (MVTX and INTT)
0053   std::map<TrkrDefs::hitsetkey, Surface> m_siliconSurfaceMap;
0054 
0055   //! map hitset to surface vector for the TPC
0056   std::map<unsigned int, SurfaceVec> m_tpcSurfaceMap;  // uses layer as key
0057 
0058   //! map hitset to surface vector for the micromegas
0059   std::map<TrkrDefs::hitsetkey, Surface> m_mmSurfaceMap;
0060 
0061   //! map TGeoNode to hitset
0062   std::map<TrkrDefs::hitsetkey, TGeoNode*> m_tGeoNodeMap;
0063 
0064   //! stores all acts volume ids relevant to the TPC
0065   /** it is used to quickly tell if a given Acts Surface belongs to the TPC */
0066   std::set<int> m_tpcVolumeIds;
0067 
0068   //! stores all acts volume ids relevant to the micromegas
0069   /** it is used to quickly tell if a given Acts Surface belongs to micromegas */
0070   std::set<int> m_micromegasVolumeIds;
0071 };
0072 
0073 #endif