130{
131 const SiDetectorElement *element =
m_detManager->getDetectorElement(offlineId);
132 const PixelModuleDesign *p_design =
static_cast<const PixelModuleDesign *
>(&element->
design());
135 return {};
136 }
137
138
140 unsigned int columnsPerFE = p_design->columnsPerCircuit();
141 unsigned int FEsPerHalfModule = p_design->numberOfCircuits();
142 unsigned int rowsPerFE = 0;
143 int column_row_offset = 0;
145 rowsPerFE = p_design->rowsPerCircuit();
146 column_row_offset = -1;
148
149
151 }
152 }
154 rowsPerFE = p_design->rowsPerCircuit()/2+4;
155 }
156
157
158
159
160
161
162 row =
row + column_row_offset;
164
166 ATH_MSG_DEBUG(
"Illegal pixel requested OfflineID: " << std::hex << offlineId << std::dec <<
" FE: " << FE <<
" row: " << row <<
" column: " << column);
168 return {};
169 }
170
171
172
173
175 switch (moduleType)
176 {
181 }
182 else {
184 }
185 break;
186
190 break;
191
195 break;
196
197 default:
198 if (FE<FEsPerHalfModule) {
200 eta_index = ((columnsPerFE*FEsPerHalfModule)-1)-(column+(FE*columnsPerFE));
201 }
202 else {
204 eta_index = ((FE-FEsPerHalfModule)*columnsPerFE)+column;
205 }
207
208 if ((
m_idHelper->phi_module(offlineId))%2==0) {
210 ATH_MSG_DEBUG(
"Even disk module found, phi module: " <<
m_idHelper->phi_module(offlineId) <<
" swapped phi index to : " << phi_index);
211 }
212 }
213 break;
214 }
215
216 Identifier diodeId =
m_idHelper->pixel_id(offlineId, phi_index, eta_index);
217
218#ifdef PIXEL_DEBUG
219 unsigned int eta_index_max =
m_idHelper->eta_index_max(offlineId);
220 unsigned int phi_index_max =
m_idHelper->phi_index_max(offlineId);
221 if (eta_index>eta_index_max) {
222 ATH_MSG_DEBUG(
"Error! eta_index: " << eta_index <<
" > eta_index_max: " << eta_index_max);
223 }
224 if (phi_index>phi_index_max) {
225 ATH_MSG_DEBUG(
"Error! phi_index: " << phi_index <<
" > phi_index_max: " << phi_index_max);
226 }
227
229 uint32_t check_row =
getRow(diodeId, offlineId) + column_row_offset;
231 if (check_FE!=FE || check_row!=row || check_column!=column) {
232 ATH_MSG_WARNING(
"identify OfflineID: 0x" << std::hex << offlineId << std::dec <<
" FE: " << FE <<
" row: " << row <<
" column: " << column <<
" unequal to:");
233 ATH_MSG_WARNING(
"identify PixelID: 0x" << std::hex << diodeId << std::dec <<
" FE: " << check_FE <<
" row: " << check_row <<
" column: " << check_column);
234 }
235#endif
236
237 return diodeId;
238}
#define ATH_MSG_WARNING(x)
void swap(ElementLinkVector< DOBJ > &lhs, ElementLinkVector< DOBJ > &rhs)