17 : base_class(name, svc){
26 return StatusCode::SUCCESS;
40 ATH_MSG_ERROR(
"Non-RD53 readout technologies not supported!");
48 if (std::abs(
m_idHelper->barrel_ec(
id)) == 2) {
71 ATH_MSG_ERROR(
"Non-RD53 readout technologies not supported!");
75 uint32_t col =
getColumn(diodeId, wafer_id, element);
76 uint32_t row =
getRow(diodeId, wafer_id, element);
93 if (row > rowsPerFE - 3 && col < columnsPerFE - 2) {
96 if (col > columnsPerFE - 3 && row < rowsPerFE - 2) {
100 if (row > rowsPerFE - 3 && col > columnsPerFE - 3) {
103 }
else if (FEs != 1) {
104 ATH_MSG_WARNING(
"Module with a number of circuits which is not 1 or 4.");
111 uint32_t FE,uint32_t row,uint32_t column)
const{
121 ATH_MSG_ERROR(
"Non-RD53 readout technologies not supported!");
131 if (row >= rowsPerFE || column >= columnsPerFE || FE >= FEs) {
132 ATH_MSG_DEBUG(
"Illegal pixel requested OfflineID: " << std::hex << offlineId << std::dec <<
" FE: " << FE <<
" row: " << row <<
" column: " << column);
133 ATH_MSG_DEBUG(
"Limits are: FE < " << FEs <<
", row < " << rowsPerFE <<
", column < " << columnsPerFE);
139 unsigned int phi_index{}, eta_index{};
141 phi_index = 2 * rowsPerFE - 1 - row;
146 eta_index = 2 * columnsPerFE - 1 - column;
155 int module_phi =
m_idHelper->phi_module(offlineId);
156 if (module_phi % 2 == 0) {
157 phi_index = FEsPerRow * rowsPerFE - phi_index - 1;
158 ATH_MSG_DEBUG(
"Even disk module found, phi module: " << module_phi <<
" swapped phi index to : " << phi_index);
161 return m_idHelper->pixel_id(offlineId, phi_index, eta_index);
167 return getFE(diodeId, offlineId, element);
186 unsigned int phi_index =
m_idHelper->phi_index(diodeId);
187 unsigned int eta_index =
m_idHelper->eta_index(diodeId);
191 int module_phi =
m_idHelper->phi_module(offlineId);
192 if (module_phi % 2 == 0) {
193 phi_index = FEsPerRow * rowsPerFE - phi_index - 1;
200 unsigned int FErow =
static_cast<unsigned int>(std::floor(phi_index / rowsPerFE));
201 unsigned int FEcol =
static_cast<unsigned int>(std::floor(eta_index / columnsPerFE));
214 return getColumn(diodeId, offlineId, element);
224 ATH_MSG_ERROR(
"Non-RD53 readout technologies not supported!");
228 unsigned int eta_index =
m_idHelper->eta_index(diodeId);
232 unsigned int column{};
233 if (eta_index >= columnsPerFE) {
234 column = 2 * columnsPerFE - eta_index - 1;
241 if (column >= columnsPerFE) {
242 ATH_MSG_WARNING(
"Computed column number exceeds maximum value: col = " << column <<
" (max = " << columnsPerFE <<
")");
243 ATH_MSG_INFO(
"diodeId = "<<diodeId<<
", offlineId= "<<offlineId);
254 return getRow(diodeId, offlineId, element);
270 unsigned int phi_index =
m_idHelper->phi_index(diodeId);
275 int module_phi =
m_idHelper->phi_module(offlineId);
276 if (module_phi % 2 == 0) {
277 phi_index = FEsPerRow * rowsPerFE - phi_index - 1;
284 if (phi_index >= rowsPerFE) {
285 row = 2 * rowsPerFE - phi_index - 1;
292 if (row >= rowsPerFE) {
293 ATH_MSG_WARNING(
"Computed row number exceeds maximum value: row = " << row <<
"(max = " << rowsPerFE <<
")");
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
This is an Identifier helper class for the Pixel subdetector.
This is a "hash" representation of an Identifier.
virtual PixelModuleType getModuleType(Identifier id) const override final
ServiceHandle< StoreGateSvc > m_detStore
const PixelDetectorManager * m_detManager
virtual StatusCode initialize() override final
virtual PixelDiodeType getDiodeType(Identifier id) const override final
virtual uint32_t getColumn(Identifier diodeId, Identifier offlineId) const override final
Gaudi::Property< std::string > m_detectorName
virtual Identifier getPixelId(Identifier offlineId, uint32_t FE, uint32_t row, uint32_t column) const override final
PixelReadoutManager(const std::string &name, ISvcLocator *svc)
const PixelID * m_idHelper
virtual uint32_t getRow(Identifier diodeId, Identifier offlineId) const override final
virtual uint32_t getFE(Identifier diodeId, Identifier offlineId) const override final
virtual Identifier getPixelIdfromHash(IdentifierHash offlineIdHash, uint32_t FE, uint32_t row, uint32_t column) const override final
Gaudi::Property< std::string > m_pixelIDName
Class used to describe the design of a module (diode segmentation and readout scheme)
PixelReadoutTechnology getReadoutTechnology() const
int numberOfCircuitsPerRow() const
Number of circuits per row:
int rowsPerCircuit() const
Number of cell rows per circuit:
int numberOfCircuits() const
Total number of circuits:
int columnsPerCircuit() const
Number of cell columns per circuit:
Class to hold geometrical description of a silicon detector element.
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
virtual Identifier identify() const override final
identifier of this detector element (inline)
std::string PixelModuleTypeName(const PixelModuleType &t)
std::string PixelDiodeTypeName(const PixelDiodeType &t)
constexpr uint32_t invalidColumn
constexpr uint32_t invalidRow
constexpr uint32_t invalidFrontEnd