Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:21:08

0001 #ifndef TPOT_TPOTMONGEOMETRY_H
0002 #define TPOT_TPOTMONGEOMETRY_H
0003 
0004 #include <micromegas/MicromegasDefs.h>
0005 
0006 #include <cstddef>
0007 #include <string>
0008 #include <vector>
0009 #include <map>
0010 
0011 /// handle simplified TPOT 2D geometry, for histogram representation
0012 /**
0013  * positioning follows the same tile_id order as in coresoftware/simulation/g4simulation/g4micromegas/PHG4MicromegasDetector::setup_tiles
0014  * it is ordered by tile number as defined in MicromegasMapping.cc
0015  */
0016 class MicromegasGeometry
0017 {
0018   public:
0019 
0020   using point_t = std::pair<double, double>;
0021   using point_list_t = std::vector<point_t>;
0022 
0023   /// constructor
0024   MicromegasGeometry();
0025   
0026   //! get number of defined tiles
0027   size_t get_ntiles() const 
0028   { return m_tile_centers.size(); }
0029   
0030   //! get tile center for given tile id
0031   point_t get_tile_center( size_t tile_id )  const 
0032   { return m_tile_centers[tile_id]; }
0033 
0034   //! get detector name for a given tile id
0035   std::string get_detname_sphenix( size_t tile_id ) const
0036   { return m_detnames_sphenix[tile_id]; }
0037   
0038   //! get tile boundaries for a given tile id
0039   point_list_t get_tile_boundaries( size_t /* tile_id */ ) const;
0040 
0041   //! get resist region boundaries for a given tile id
0042   /** there are 4 resistive layer regions for a given tile, each oriented along the strips */
0043   point_list_t get_resist_boundaries( size_t /* tile_id */, size_t /* resist_id */, MicromegasDefs::SegmentationType ) const;
0044 
0045   //! tile definitions
0046   static constexpr double m_tile_length = 54.2; // cm
0047   static constexpr double m_tile_width = 31.6;  // cm
0048 
0049   /// pitch for z views (cm)
0050   static constexpr double m_pitch_z = 0.2;
0051   
0052   /// pitch for phi views (cm)
0053   static constexpr double m_pitch_phi = 0.1;
0054 
0055   //! number of resist sectors
0056   static constexpr int m_nresist = 4;
0057       
0058   private:
0059   
0060   //! tile centers
0061   /** tile centers are ordered by tile_ids as defined in MicromegasMapping.cc */
0062   point_list_t m_tile_centers;
0063 
0064   //! matching detector name
0065   std::vector<std::string> m_detnames_sphenix;
0066   
0067 };
0068 
0069 #endif