Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:16:58

0001 #ifndef TRACKBASE_ACTSGEOMETRY_H
0002 #define TRACKBASE_ACTSGEOMETRY_H
0003 
0004 #include "ActsSurfaceMaps.h"
0005 
0006 #include <Acts/Definitions/Units.hpp>
0007 
0008 class TrkrCluster;
0009 
0010 class ActsGeometry
0011 {
0012  public:
0013   ActsGeometry() = default;
0014   ~ActsGeometry() = default;
0015 
0016   void setGeometry(const ActsTrackingGeometry& tGeometry)
0017   {
0018     m_tGeometry = tGeometry;
0019   }
0020 
0021   void setSurfMaps(const ActsSurfaceMaps& surfMaps)
0022   {
0023     m_surfMaps = surfMaps;
0024   }
0025 
0026   //! const accessor
0027   const ActsTrackingGeometry& geometry() const
0028   {
0029     return m_tGeometry;
0030   }
0031 
0032   //! mutable accessor
0033   ActsTrackingGeometry& geometry()
0034   {
0035     return m_tGeometry;
0036   }
0037 
0038   //! const accessor
0039   const ActsSurfaceMaps& maps() const
0040   {
0041     return m_surfMaps;
0042   }
0043 
0044   //! mutable accessor
0045   ActsSurfaceMaps& maps()
0046   {
0047     return m_surfMaps;
0048   }
0049 
0050   void set_drift_velocity(double vd) { _drift_velocity = vd; }
0051 
0052   void set_tpc_tzero(double tz) { _tpc_tzero = tz; }
0053   double get_tpc_tzero() const { return _tpc_tzero; }
0054 
0055   double get_drift_velocity() const { return _drift_velocity; }
0056 
0057   Acts::Vector3 getGlobalPosition(
0058       TrkrDefs::cluskey key,
0059       TrkrCluster* cluster) const;
0060 
0061   Acts::Vector3 getGlobalPositionTpc(
0062       TrkrDefs::cluskey key,
0063       TrkrCluster* cluster) const;
0064 
0065   Acts::Vector3 getGlobalPositionTpc(
0066       const TrkrDefs::hitsetkey& hitsetkey, const TrkrDefs::hitkey& hitkey, const float& phi, const float& rad,
0067       const float& clockPeriod) const;
0068 
0069   Surface get_tpc_surface_from_coords(
0070       TrkrDefs::hitsetkey hitsetkey,
0071       Acts::Vector3 world,
0072       TrkrDefs::subsurfkey& subsurfkey) const ;
0073 
0074   Acts::Transform3 makeAffineTransform(Acts::Vector3 rotation, Acts::Vector3 translation) const;
0075 
0076   Acts::Vector2 getLocalCoords(TrkrDefs::cluskey key, TrkrCluster* cluster) const;
0077   Acts::Vector2 getLocalCoords(TrkrDefs::cluskey key, TrkrCluster* cluster, short int crossing) const;
0078 
0079  private:
0080   ActsTrackingGeometry m_tGeometry;
0081   ActsSurfaceMaps m_surfMaps;
0082   double _drift_velocity = 8.0e-3;  // cm/ns
0083   double _tpc_tzero = 0.0;  // ns
0084 };
0085 
0086 #endif