ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
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. More...
 
const PixelDiodeTree::Vector2DinvWidth () const
 get the inverse of the width of this diode. More...
 
unsigned int diodeAttribute () const
 get the attribute associated to this diode (to be interpreted) More...
 
unsigned int subMatrixAttribute () const
 get the attribute associated to the sub-matrix of this diode (to be interpreted) More...
 
PixelDiodeTree::Vector2D computePosition (const std::array< CellIndexType, 2 > &idx) const
 Compute the position of the diode. More...
 
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. More...
 
bool isValid () const
 return true if this proxy refers to a valide diode More...
 
 operator bool () const
 return true if this proxy refers to a valide diode More...
 

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) {}

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  {
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  {
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());
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());
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(); }

◆ 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());
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());
198  }

Friends And Related Function Documentation

◆ 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.

◆ 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.


The documentation for this struct was generated from the following file:
InDetDD::PixelDiodeTree::DiodeProxy::m_subMatrixIdx
PixelDiodeTree::IndexType m_subMatrixIdx
Definition: PixelDiodeTree.h:187
InDetDD::PixelDiodeTree::DiodeProxy::isValid
bool isValid() const
return true if this proxy refers to a valide diode
Definition: PixelDiodeTree.h:224
InDetDD::PixelDiodeTree::m_diodeParam
DiodeParam m_diodeParam
Definition: PixelDiodeTree.h:383
InDetDD::PixelDiodeTree::DiodeParam::m_width
std::vector< Vector2D > m_width
Definition: PixelDiodeTree.h:44
InDetDD::PixelDiodeTree::DiodeParam::m_attribute
std::vector< AttributeType > m_attribute
Definition: PixelDiodeTree.h:46
InDetDD::PixelDiodeTree::DiodeParam::m_invWidth
std::vector< Vector2D > m_invWidth
Definition: PixelDiodeTree.h:45
InDetDD::PixelDiodeTree::computeIndex
std::array< CellIndexType, 2 > computeIndex(PixelDiodeTree::IndexType sub_matrix_idx, PixelDiodeTree::IndexType diode_idx, const Vector2D &pos) const
Compute the 2D index (row, column) of a certain diode in a certain sub-matrix.
Definition: PixelDiodeTree.h:162
InDetDD::PixelDiodeTree::DiodeProxy::m_diodeTree
const PixelDiodeTree * m_diodeTree
Definition: PixelDiodeTree.h:186
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:16
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
InDetDD::PixelDiodeTree::DiodeProxy::m_diodeIdx
PixelDiodeTree::IndexType m_diodeIdx
Definition: PixelDiodeTree.h:188
InDetDD::PixelDiodeTree::computePosition
Vector2D computePosition(PixelDiodeTree::IndexType sub_matrix_idx, PixelDiodeTree::IndexType diode_idx, const std::array< CellIndexType, 2 > &idx) const
Compute the position of a certain diode in a certain sub-matrix.
Definition: PixelDiodeTree.h:140
InDetDD::PixelDiodeTree::m_attribute
std::vector< AttributeType > m_attribute
Definition: PixelDiodeTree.h:380