22 if (
version_ == pc_lut_version)
return;
25 if (pc_lut_version == 0)
26 coord_lut_dir =
"ph_lut_v1";
27 else if (pc_lut_version == 1)
28 coord_lut_dir =
"ph_lut_v2";
31 <<
"Trying to use EMTF pc_lut_version = " << pc_lut_version <<
", does not exist!";
34 std::string coord_lut_path =
"L1Trigger/L1TMuon/data/emtf_luts/" + coord_lut_dir +
"/";
47 <<
"Expected ph_init_neighbor_ to get " << 2*6*61 <<
" values, " 53 <<
"Expected ph_disp_neighbor_ to get " << 2*6*61 <<
" values, " 59 <<
"Expected th_init_neighbor_ to get " << 2*6*61 <<
" values, " 65 <<
"Expected th_disp_neighbor_ to get " << 2*6*61 <<
" values, " 71 <<
"Expected th_lut_neighbor_ to get " << 2*6*61*128 <<
" values, " 77 <<
"Expected th_corr_lut_neighbor_ to get " << 2*6*7*128 <<
" values, " 85 0, 0, 5, 5, 5, 5, 2, 2, 2, 2, 0
89 <<
"Expected ph_patt_corr_ to get " << 11 <<
" values, " 94 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0
98 <<
"Expected ph_patt_corr_sign_ to get " << 11 <<
" values, " 103 39,57,76,39,58,76,41,60,79,
104 95,114,132,95,114,133,98,116,135,
105 38,76,113,39,58,76,95,114,132,
106 38,76,113,39,58,76,95,114,132,
107 38,76,113,38,57,76,95,113,132,
108 21,21,23,1,21,1,21,1,20
112 <<
"Expected ph_zone_offset_ to get " << 6*9 <<
" values, " 119 39, 57, 76, 39, 58, 76, 41, 60, 79, 39, 57, 76, 21, 21, 23, 21,
120 95, 114, 132, 95, 114, 133, 98, 116, 135, 95, 114, 132, 0, 0, 0, 0,
121 38, 76, 113, 39, 58, 76, 95, 114, 132, 1, 21, 0, 0, 0, 0, 0,
122 38, 76, 113, 39, 58, 76, 95, 114, 132, 1, 21, 0, 0, 0, 0, 0,
123 38, 76, 113, 38, 57, 76, 95, 113, 132, 1, 20, 0, 0, 0, 0, 0
127 <<
"Expected ph_init_hard_ to get " << 5*16 <<
" values, " 136 size_t index = (fw_endcap * 6 + fw_sector) * 61 + pc_lut_id;
141 size_t index = (fw_endcap * 6 + fw_sector) * 61 + pc_lut_id;
146 size_t index = (fw_endcap * 6 + fw_sector) * 61 + pc_lut_id;
151 size_t index = (fw_endcap * 6 + fw_sector) * 61 + pc_lut_id;
156 int pc_lut_id2 = pc_lut_id;
159 if ((9 <= pc_lut_id2 && pc_lut_id2 < 12) || (25 <= pc_lut_id2 && pc_lut_id2 < 28))
162 if (pc_lut_id2 == 15)
165 size_t index = ((fw_endcap * 6 + fw_sector) * 61 + pc_lut_id2) * 128 + pc_wire_id;
170 int pc_lut_id2 = pc_lut_id;
173 if ((9 <= pc_lut_id2 && pc_lut_id2 < 12) || (25 <= pc_lut_id2 && pc_lut_id2 < 28))
176 if (pc_lut_id2 == 15)
179 if (pc_lut_id2 <= 3) {
181 }
else if (pc_lut_id2 == 12) {
183 }
else if (16 <= pc_lut_id2 && pc_lut_id2 < 19) {
187 <<
"get_th_corr_lut(): out of range pc_lut_id: " << pc_lut_id;
190 size_t index = ((fw_endcap * 6 + fw_sector) * 7 + pc_lut_id2) * 128 + pc_wire_strip_id;
203 size_t index = pc_station * 9 + pc_chamber;
208 size_t index = fw_station * 16 + fw_cscid;
215 std::ifstream infile;
219 while (infile >> buf) {
220 buf = (buf == -999) ? 0 : buf;
std::vector< uint32_t > ph_zone_offset_
std::vector< uint32_t > th_corr_lut_neighbor_
uint32_t get_ph_patt_corr_sign(int pattern) const
void read(unsigned pc_lut_version)
std::vector< uint32_t > th_disp_neighbor_
uint32_t get_th_init(int fw_endcap, int fw_sector, int pc_lut_id) const
std::vector< uint32_t > ph_patt_corr_
std::vector< uint32_t > ph_init_hard_
uint32_t get_th_disp(int fw_endcap, int fw_sector, int pc_lut_id) const
uint32_t get_ph_disp(int fw_endcap, int fw_sector, int pc_lut_id) const
std::vector< uint32_t > ph_patt_corr_sign_
std::vector< uint32_t > th_init_neighbor_
uint32_t get_ph_zone_offset(int pc_station, int pc_chamber) const
std::vector< uint32_t > ph_disp_neighbor_
uint32_t get_ph_patt_corr(int pattern) const
uint32_t get_th_lut(int fw_endcap, int fw_sector, int pc_lut_id, int pc_wire_id) const
std::vector< uint32_t > ph_init_neighbor_
uint32_t get_ph_init_hard(int fw_station, int fw_cscid) const
void read_file(const std::string &filename, std::vector< uint32_t > &vec)
uint32_t get_ph_init(int fw_endcap, int fw_sector, int pc_lut_id) const
uint32_t get_th_corr_lut(int fw_endcap, int fw_sector, int pc_lut_id, int pc_wire_strip_id) const
std::vector< uint32_t > th_lut_neighbor_