ATLAS Offline Software
Loading...
Searching...
No Matches
InDetDD::PixelDiodeTree::DiodeProxy Struct Reference

Helper class to access parameters of a diode. More...

#include <PixelDiodeTree.h>

Inheritance diagram for InDetDD::PixelDiodeTree::DiodeProxy:
Collaboration diagram for InDetDD::PixelDiodeTree::DiodeProxy:

Public Member Functions

const PixelDiodeTree::Vector2Dwidth () const
 get the width stored for this diode.
const PixelDiodeTree::Vector2DinvWidth () const
 get the inverse of the width of this diode.
unsigned int diodeAttribute () const
 get the attribute associated to this diode (to be interpreted)
unsigned int subMatrixAttribute () const
 get the attribute associated to the sub-matrix of this diode (to be interpreted)
PixelDiodeTree::Vector2D computePosition (const std::array< CellIndexType, 2 > &idx) const
 Compute the position of the diode.
std::array< PixelDiodeTree::CellIndexType, 2 > computeIndex (const Vector2D &pos) const
 Compute the full 2D index (row, column) of the diode in the full diode matrix.
bool isValid () const
 return true if this proxy refers to a valide diode
 operator bool () const
 return true if this proxy refers to a valide diode

Protected Member Functions

 DiodeProxy ()
 DiodeProxy (const PixelDiodeTree *diodeTree, PixelDiodeTree::IndexType subMatrixIdx, PixelDiodeTree::IndexType diodeIdx)
void setInvalid ()

Protected Attributes

const PixelDiodeTreem_diodeTree = nullptr
PixelDiodeTree::IndexType m_subMatrixIdx {}
PixelDiodeTree::IndexType m_diodeIdx {}

Friends

class PixelDiodeTree

Detailed Description

Helper class to access parameters of a diode.

Definition at line 183 of file PixelDiodeTree.h.

Constructor & Destructor Documentation

◆ DiodeProxy() [1/2]

InDetDD::PixelDiodeTree::DiodeProxy::DiodeProxy ( )
inlineprotected

Definition at line 189 of file PixelDiodeTree.h.

189{ }

◆ DiodeProxy() [2/2]

InDetDD::PixelDiodeTree::DiodeProxy::DiodeProxy ( const PixelDiodeTree * diodeTree,
PixelDiodeTree::IndexType subMatrixIdx,
PixelDiodeTree::IndexType diodeIdx )
inlineprotected

Definition at line 190 of file PixelDiodeTree.h.

191 : m_diodeTree(diodeTree), m_subMatrixIdx(subMatrixIdx), m_diodeIdx(diodeIdx) {}
PixelDiodeTree::IndexType m_diodeIdx
PixelDiodeTree::IndexType m_subMatrixIdx

Member Function Documentation

◆ computeIndex()

std::array< PixelDiodeTree::CellIndexType, 2 > InDetDD::PixelDiodeTree::DiodeProxy::computeIndex ( const Vector2D & pos) const
inline

Compute the full 2D index (row, column) of the diode in the full diode matrix.

Definition at line 220 of file PixelDiodeTree.h.

220 {
221 return m_diodeTree->computeIndex(m_subMatrixIdx, m_diodeIdx, pos);
222 }

◆ computePosition()

PixelDiodeTree::Vector2D InDetDD::PixelDiodeTree::DiodeProxy::computePosition ( const std::array< CellIndexType, 2 > & idx) const
inline

Compute the position of the diode.

The origin is typically at the center of the pixel matrix.

Definition at line 216 of file PixelDiodeTree.h.

216 {
217 return m_diodeTree->computePosition(m_subMatrixIdx, m_diodeIdx, idx);
218 }

◆ diodeAttribute()

unsigned int InDetDD::PixelDiodeTree::DiodeProxy::diodeAttribute ( ) const
inline

get the attribute associated to this diode (to be interpreted)

Definition at line 205 of file PixelDiodeTree.h.

205 {
206 assert( static_cast<unsigned int>(m_diodeIdx)<m_diodeTree->m_diodeParam.m_attribute.size());
207 return m_diodeTree->m_diodeParam.m_attribute[m_diodeIdx];
208 }

◆ invWidth()

const PixelDiodeTree::Vector2D & InDetDD::PixelDiodeTree::DiodeProxy::invWidth ( ) const
inline

get the inverse of the width of this diode.

Definition at line 200 of file PixelDiodeTree.h.

200 {
201 assert( static_cast<unsigned int>(m_diodeIdx)<m_diodeTree->m_diodeParam.m_invWidth.size());
202 return m_diodeTree->m_diodeParam.m_invWidth[m_diodeIdx];
203 }

◆ isValid()

bool InDetDD::PixelDiodeTree::DiodeProxy::isValid ( ) const
inline

return true if this proxy refers to a valide diode

Definition at line 224 of file PixelDiodeTree.h.

224{ return m_diodeTree != nullptr; }

◆ operator bool()

InDetDD::PixelDiodeTree::DiodeProxy::operator bool ( ) const
inline

return true if this proxy refers to a valide diode

Definition at line 226 of file PixelDiodeTree.h.

226{ return isValid(); }
bool isValid() const
return true if this proxy refers to a valide diode

◆ setInvalid()

void InDetDD::PixelDiodeTree::DiodeProxy::setInvalid ( )
inlineprotected

Definition at line 192 of file PixelDiodeTree.h.

192{ m_diodeTree=nullptr; }

◆ subMatrixAttribute()

unsigned int InDetDD::PixelDiodeTree::DiodeProxy::subMatrixAttribute ( ) const
inline

get the attribute associated to the sub-matrix of this diode (to be interpreted)

Definition at line 210 of file PixelDiodeTree.h.

210 {
211 assert( static_cast<unsigned int>(m_subMatrixIdx)<m_diodeTree->m_attribute.size());
212 return m_diodeTree->m_attribute[m_subMatrixIdx];
213 }

◆ width()

const PixelDiodeTree::Vector2D & InDetDD::PixelDiodeTree::DiodeProxy::width ( ) const
inline

get the width stored for this diode.

Definition at line 195 of file PixelDiodeTree.h.

195 {
196 assert( static_cast<unsigned int>(m_diodeIdx)<m_diodeTree->m_diodeParam.m_width.size());
197 return m_diodeTree->m_diodeParam.m_width[m_diodeIdx];
198 }

◆ PixelDiodeTree

friend class PixelDiodeTree
friend

Definition at line 184 of file PixelDiodeTree.h.

Member Data Documentation

◆ m_diodeIdx

PixelDiodeTree::IndexType InDetDD::PixelDiodeTree::DiodeProxy::m_diodeIdx {}
protected

Definition at line 188 of file PixelDiodeTree.h.

188{};

◆ m_diodeTree

const PixelDiodeTree* InDetDD::PixelDiodeTree::DiodeProxy::m_diodeTree = nullptr
protected

Definition at line 186 of file PixelDiodeTree.h.

◆ m_subMatrixIdx

PixelDiodeTree::IndexType InDetDD::PixelDiodeTree::DiodeProxy::m_subMatrixIdx {}
protected

Definition at line 187 of file PixelDiodeTree.h.

187{};

The documentation for this struct was generated from the following file: