ATLAS Offline Software
PixelDiodeMatrix.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // PixelDiodeMatrix.h
8 
9 #ifndef READOUTGEOMETRYBASE_PIXELDIODEMATRIX_H
10 #define READOUTGEOMETRYBASE_PIXELDIODEMATRIX_H
11 
15 
16 #include <memory>
17 
18 namespace InDetDD {
19 
94 
95  public:
96 
98 
100  ~PixelDiodeMatrix() = default;
101 
103  static std::shared_ptr<const PixelDiodeMatrix> construct(double phiWidth, double etaWidth);
104 
110  static std::shared_ptr<const PixelDiodeMatrix> construct(Direction direction, // phi or eta
111  std::shared_ptr<const PixelDiodeMatrix> lowerCell,
112  std::shared_ptr<const PixelDiodeMatrix> middleCells,
113  int numCells,
114  std::shared_ptr<const PixelDiodeMatrix> upperCells);
115 
121  const PixelDiodeMatrix *cellIdOfPosition(const Amg::Vector2D & position, SiCellId & cellId) const;
122 
127  const PixelDiodeMatrix *positionOfCell(const SiCellId & cellId, Amg::Vector2D & position) const;
128 
130  double phiWidth() const;
131 
133  double phiWidthInverse() const;
134 
136  double etaWidth() const;
137 
139  double etaWidthInverse() const;
140 
142  int phiCells() const;
143 
145  int etaCells() const;
146 
148  bool singleCell() const;
149 
151  std::string createDebugStringRepr() const;
152 
153 
154  private:
157 
159  void initialize(double phiWidth, double etaWidth);
160 
166  void initialize(Direction direction, // phi or eta
167  std::shared_ptr<const PixelDiodeMatrix> lowerCell,
168  std::shared_ptr<const PixelDiodeMatrix> middleCells,
169  int numCells,
170  std::shared_ptr<const PixelDiodeMatrix> upperCells);
171 
173  std::string createDebugStringRepr(unsigned int level) const;
174 
175  double m_phiWidth = 0;
176  double m_phiWidthInverse = 0;
177  double m_etaWidth = 0;
178  double m_etaWidthInverse = 0;
179  int m_phiCells = 0;
180  int m_etaCells = 0;
182  int m_numCells = 0; // number of MiddleCells along m_direction direction.
183  std::shared_ptr<const PixelDiodeMatrix> m_lowerCell;
184  std::shared_ptr<const PixelDiodeMatrix> m_middleCells;
185  std::shared_ptr<const PixelDiodeMatrix> m_upperCell;
186  bool m_singleCell = false;
187 
188  };
189 
190  inline double PixelDiodeMatrix::phiWidth() const
191  {
192  return m_phiWidth;
193  }
194 
195  inline double PixelDiodeMatrix::phiWidthInverse() const
196  {
197  return m_phiWidthInverse;
198  }
199 
200  inline double PixelDiodeMatrix::etaWidth() const
201  {
202  return m_etaWidth;
203  }
204 
205  inline double PixelDiodeMatrix::etaWidthInverse() const
206  {
207  return m_etaWidthInverse;
208  }
209 
210  inline int PixelDiodeMatrix::phiCells() const
211  {
212  return m_phiCells;
213  }
214 
215  inline int PixelDiodeMatrix::etaCells() const
216  {
217  return m_etaCells;
218  }
219 
220  inline bool PixelDiodeMatrix::singleCell() const
221  {
222  return m_singleCell;
223  }
224 
225  inline std::string PixelDiodeMatrix::createDebugStringRepr() const
226  {
227  return this->createDebugStringRepr(0);
228  }
229 
230 } // end namespace
231 
232 #endif //READOUTGEOMETRYBASE_PIXELDIODEMATRIX_H
InDetDD::PixelDiodeMatrix::phiWidth
double phiWidth() const
Width in phi (x) direction.
Definition: PixelDiodeMatrix.h:190
InDetDD::PixelDiodeMatrix::phiWidthInverse
double phiWidthInverse() const
Inverse of width in phi (x) direction.
Definition: PixelDiodeMatrix.h:195
TrkDetElementBase.h
InDetDD::PixelDiodeMatrix::m_upperCell
std::shared_ptr< const PixelDiodeMatrix > m_upperCell
Definition: PixelDiodeMatrix.h:185
InDetDD::PixelDiodeMatrix::m_etaCells
int m_etaCells
Definition: PixelDiodeMatrix.h:180
InDetDD::PixelDiodeMatrix::m_singleCell
bool m_singleCell
Definition: PixelDiodeMatrix.h:186
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
InDetDD::PixelDiodeMatrix::etaWidth
double etaWidth() const
Width in eta (y) direction.
Definition: PixelDiodeMatrix.h:200
InDetDD::PixelDiodeMatrix::etaWidthInverse
double etaWidthInverse() const
Inverse of width in eta (y) direction.
Definition: PixelDiodeMatrix.h:205
InDetDD::PixelDiodeMatrix::createDebugStringRepr
std::string createDebugStringRepr() const
Create debug representation.
Definition: PixelDiodeMatrix.h:225
InDetDD::PixelDiodeMatrix::~PixelDiodeMatrix
~PixelDiodeMatrix()=default
Destructor.
InDetDD::PixelDiodeMatrix::construct
static std::shared_ptr< const PixelDiodeMatrix > construct(double phiWidth, double etaWidth)
Construct method for just a single cell.
Definition: PixelDiodeMatrix.cxx:14
InDetDD::PixelDiodeMatrix::PixelDiodeMatrix
PixelDiodeMatrix()
Hidden constructor.
Definition: PixelDiodeMatrix.h:156
InDetDD::PixelDiodeMatrix::phiCells
int phiCells() const
Number of cells in phi (x) direction.
Definition: PixelDiodeMatrix.h:210
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
InDetDD::PixelDiodeMatrix::phiDir
@ phiDir
Definition: PixelDiodeMatrix.h:97
InDetDD::PixelDiodeMatrix::cellIdOfPosition
const PixelDiodeMatrix * cellIdOfPosition(const Amg::Vector2D &position, SiCellId &cellId) const
Return cell Id corresponding to a relative position within the matrix.
Definition: PixelDiodeMatrix.cxx:131
GeoPrimitives.h
InDetDD::PixelDiodeMatrix::m_lowerCell
std::shared_ptr< const PixelDiodeMatrix > m_lowerCell
Definition: PixelDiodeMatrix.h:183
InDetDD::PixelDiodeMatrix::m_phiWidthInverse
double m_phiWidthInverse
Definition: PixelDiodeMatrix.h:176
InDetDD::PixelDiodeMatrix::m_phiCells
int m_phiCells
Definition: PixelDiodeMatrix.h:179
InDetDD::PixelDiodeMatrix::positionOfCell
const PixelDiodeMatrix * positionOfCell(const SiCellId &cellId, Amg::Vector2D &position) const
Return position correspong to cell with relative id withing the matrix.
Definition: PixelDiodeMatrix.cxx:255
InDetDD::PixelDiodeMatrix::m_etaWidth
double m_etaWidth
Definition: PixelDiodeMatrix.h:177
InDetDD::PixelDiodeMatrix::m_phiWidth
double m_phiWidth
Definition: PixelDiodeMatrix.h:175
InDetDD::PixelDiodeMatrix::m_numCells
int m_numCells
Definition: PixelDiodeMatrix.h:182
InDetDD::PixelDiodeMatrix::etaCells
int etaCells() const
Number of cells in eta (y) direction.
Definition: PixelDiodeMatrix.h:215
InDetDD::SiCellId
Definition: SiCellId.h:29
InDetDD::PixelDiodeMatrix::m_middleCells
std::shared_ptr< const PixelDiodeMatrix > m_middleCells
Definition: PixelDiodeMatrix.h:184
InDetDD::PixelDiodeMatrix::initialize
void initialize(double phiWidth, double etaWidth)
Initialize for just a single cell.
Definition: PixelDiodeMatrix.cxx:22
xAOD::TauJetParameters::numCells
@ numCells
Definition: TauDefs.h:171
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
InDetDD::PixelDiodeMatrix::m_direction
Direction m_direction
Definition: PixelDiodeMatrix.h:181
InDetDD::PixelDiodeMatrix::m_etaWidthInverse
double m_etaWidthInverse
Definition: PixelDiodeMatrix.h:178
InDetDD::PixelDiodeMatrix::singleCell
bool singleCell() const
Query wether the matrix is just a single cell.
Definition: PixelDiodeMatrix.h:220
SiCellId.h
InDetDD::PixelDiodeMatrix::Direction
Direction
Definition: PixelDiodeMatrix.h:97
InDetDD::PixelDiodeMatrix
Definition: PixelDiodeMatrix.h:93
InDetDD::PixelDiodeMatrix::etaDir
@ etaDir
Definition: PixelDiodeMatrix.h:97