Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:20:29

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   void set_max_driftlength(double val) { _max_driftlength = val; }
0052   void set_CM_halfwidth(double val) { _CM_halfwidth = val; }
0053   void set_tpc_tzero(double tz) { _tpc_tzero = tz; }
0054   void set_sampa_tzero_bias(double tzb) { _sampa_tzero_bias = tzb; }
0055 
0056   double get_tpc_tzero() const { return _tpc_tzero; }
0057   double get_sampa_tzero_bias() const { return _sampa_tzero_bias; }
0058   double get_max_driftlength() { return _max_driftlength; }
0059   double get_CM_halfwidth() { return _CM_halfwidth; }
0060   double get_drift_velocity() const { return _drift_velocity; }
0061 
0062   Acts::Vector3 getGlobalPosition(
0063       TrkrDefs::cluskey key,
0064       TrkrCluster* cluster) const;
0065 
0066   Acts::Vector3 getGlobalPositionTpc(
0067       TrkrDefs::cluskey key,
0068       TrkrCluster* cluster) const;
0069 
0070   Acts::Vector3 getGlobalPositionTpc(
0071       const TrkrDefs::hitsetkey& hitsetkey, const TrkrDefs::hitkey& hitkey, const float& phi, const float& rad,
0072       const float& clockPeriod) const;
0073 
0074   Surface get_tpc_surface_from_coords(
0075       TrkrDefs::hitsetkey hitsetkey,
0076       Acts::Vector3 world,
0077       TrkrDefs::subsurfkey& subsurfkey) const ;
0078 
0079   Acts::Transform3 makeAffineTransform(Acts::Vector3 rotation, Acts::Vector3 translation) const;
0080 
0081   Acts::Vector2 getLocalCoords(TrkrDefs::cluskey key, TrkrCluster* cluster) const;
0082   Acts::Vector2 getLocalCoords(TrkrDefs::cluskey key, TrkrCluster* cluster, short int crossing) const;
0083 
0084  private:
0085   ActsTrackingGeometry m_tGeometry;
0086   ActsSurfaceMaps m_surfMaps;
0087   double _drift_velocity = 8.0e-3;  // cm/ns
0088   double _max_driftlength = 102.235;  // cm
0089   double _CM_halfwidth = 0.28;  // cm
0090   double _tpc_tzero = 0.0;  // ns
0091   double _sampa_tzero_bias = 0.0;  // ns
0092 };
0093 
0094 #endif