ATLAS Offline Software
ITkPixLayout.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 /*
5 * Author: Ondra Kovanda, ondrej.kovanda at cern.ch
6 * Date: 04/2024
7 * Description: ITkPix* chip layout template. This aims for a contiguously stored
8 * array of arbitrary type, representing the individual pixels in
9 * ITkPix* chips with a 'physically' motivated (col, row) access
10 */
11 
12 #ifndef ITKPIXLAYOUT_H
13 #define ITKPIXLAYOUT_H
14 
15 #include <array>
16 #include <cstdint>
17 
18 template<class T> class ITkPixLayout{
19 
20  public:
21 
23 
24  T& operator()(const uint16_t col, const uint16_t row){
25 
26  //Columns are stored after one another
27  return m_pixels[ col * 384 + row ];
28 
29  }
30 
31  T operator()(const uint16_t col, const uint16_t row) const {
32 
33  //Columns are stored after one another
34  return m_pixels[ col * 384 + row ];
35 
36  }
37 
38  private:
39 
40  //All chips will allways have 400*384 pixels
41  std::array<T, 153600> m_pixels = {};
42 
43 };
44 
45 #endif
query_example.row
row
Definition: query_example.py:24
ITkPixLayout::operator()
T & operator()(const uint16_t col, const uint16_t row)
Definition: ITkPixLayout.h:24
ITkPixLayout::m_pixels
std::array< T, 153600 > m_pixels
Definition: ITkPixLayout.h:41
ITkPixLayout::operator()
T operator()(const uint16_t col, const uint16_t row) const
Definition: ITkPixLayout.h:31
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
query_example.col
col
Definition: query_example.py:7
ITkPixLayout
Definition: ITkPixLayout.h:18
ITkPixLayout::ITkPixLayout
ITkPixLayout()
Definition: ITkPixLayout.h:22
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35