Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:55:28

0001 #ifndef L1TMuonEndCap_SectorProcessorLUT_h
0002 #define L1TMuonEndCap_SectorProcessorLUT_h
0003 
0004 #include <cstdint>
0005 #include <string>
0006 #include <vector>
0007 
0008 class SectorProcessorLUT {
0009 public:
0010   explicit SectorProcessorLUT();
0011   ~SectorProcessorLUT();
0012 
0013   void read(bool pc_lut_data, int pc_lut_version);
0014 
0015   uint32_t get_ph_init(int fw_endcap, int fw_sector, int pc_lut_id) const;
0016 
0017   uint32_t get_ph_disp(int fw_endcap, int fw_sector, int pc_lut_id) const;
0018 
0019   uint32_t get_th_init(int fw_endcap, int fw_sector, int pc_lut_id) const;
0020 
0021   uint32_t get_th_disp(int fw_endcap, int fw_sector, int pc_lut_id) const;
0022 
0023   uint32_t get_th_lut(int fw_endcap, int fw_sector, int pc_lut_id, int pc_wire_id) const;
0024 
0025   uint32_t get_th_corr_lut(int fw_endcap, int fw_sector, int pc_lut_id, int pc_wire_strip_id) const;
0026 
0027   uint32_t get_ph_patt_corr(int pattern) const;
0028 
0029   uint32_t get_ph_patt_corr_sign(int pattern) const;
0030 
0031   uint32_t get_ph_zone_offset(int pc_station, int pc_chamber) const;
0032 
0033   uint32_t get_ph_init_hard(int fw_station, int fw_cscid) const;
0034 
0035   uint32_t get_cppf_lut_id(
0036       int rpc_region, int rpc_sector, int rpc_station, int rpc_ring, int rpc_subsector, int rpc_roll) const;
0037 
0038   uint32_t get_cppf_ph_lut(int rpc_region,
0039                            int rpc_sector,
0040                            int rpc_station,
0041                            int rpc_ring,
0042                            int rpc_subsector,
0043                            int rpc_roll,
0044                            int halfstrip,
0045                            bool is_neighbor) const;
0046 
0047   uint32_t get_cppf_th_lut(
0048       int rpc_region, int rpc_sector, int rpc_station, int rpc_ring, int rpc_subsector, int rpc_roll) const;
0049 
0050 private:
0051   void read_file(const std::string& filename, std::vector<uint32_t>& vec);
0052 
0053   void read_cppf_file(const std::string& filename, std::vector<uint32_t>& vec1, std::vector<uint32_t>& vec2, bool local);
0054 
0055   std::vector<uint32_t> ph_init_neighbor_;
0056   std::vector<uint32_t> ph_disp_neighbor_;
0057   std::vector<uint32_t> th_init_neighbor_;
0058   std::vector<uint32_t> th_disp_neighbor_;
0059   std::vector<uint32_t> th_lut_neighbor_;
0060   std::vector<uint32_t> th_corr_lut_neighbor_;
0061 
0062   std::vector<uint32_t> ph_patt_corr_;
0063   std::vector<uint32_t> ph_patt_corr_sign_;
0064   std::vector<uint32_t> ph_zone_offset_;
0065   std::vector<uint32_t> ph_init_hard_;
0066 
0067   std::vector<uint32_t> cppf_ph_lut_;
0068   std::vector<uint32_t> cppf_th_lut_;
0069 
0070   int version_;  // init: 0xFFFFFFFF
0071 };
0072 
0073 #endif