ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
InDetDD::PixelDiodeTree::DiodeProxyWithPosition Struct Reference

A diode proxy which caches the position of a diode. More...

#include <PixelDiodeTree.h>

Inheritance diagram for InDetDD::PixelDiodeTree::DiodeProxyWithPosition:
Collaboration diagram for InDetDD::PixelDiodeTree::DiodeProxyWithPosition:

Public Member Functions

 DiodeProxyWithPosition ()
 
 DiodeProxyWithPosition (const PixelDiodeTree *diodeTree, PixelDiodeTree::IndexType subMatrixIdx, PixelDiodeTree::IndexType diodeIdx, Vector2D &&position)
 
const Vector2Dposition () const
 get the cached position of this diode More...
 
double phiWidth () const
 for backward compatibility, return the pitch of a diode in local-x(phi, row) direction More...
 
double etaWidth () const
 for backward compatibility, return the pitch of a diode in local-y(eta, column) direction More...
 
double xPhiMin () const
 for backward compatibility, return the position of the lower edge of the diode in local-x(phi, row) direction. More...
 
double xPhiMax () const
 for backward compatibility, return the position of the lower edge of the diode in local-y(phi, row) direction. More...
 
double xEtaMin () const
 for backward compatibility, return the position of the lower edge of the diode in local-y(eta, column) direction. More...
 
double xEtaMax () const
 for backward compatibility, return the position of the upper edge of the diode in local-y(eta, column) direction. More...
 
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

void setInvalid ()
 

Protected Attributes

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

Friends

class PixelDiodeTree
 

Detailed Description

A diode proxy which caches the position of a diode.

Definition at line 230 of file PixelDiodeTree.h.

Constructor & Destructor Documentation

◆ DiodeProxyWithPosition() [1/2]

InDetDD::PixelDiodeTree::DiodeProxyWithPosition::DiodeProxyWithPosition ( )
inline

Definition at line 232 of file PixelDiodeTree.h.

232 {}

◆ DiodeProxyWithPosition() [2/2]

InDetDD::PixelDiodeTree::DiodeProxyWithPosition::DiodeProxyWithPosition ( const PixelDiodeTree diodeTree,
PixelDiodeTree::IndexType  subMatrixIdx,
PixelDiodeTree::IndexType  diodeIdx,
Vector2D &&  position 
)
inline

Definition at line 233 of file PixelDiodeTree.h.

237  : DiodeProxy{diodeTree, subMatrixIdx, diodeIdx},
238  m_position(std::move(position))
239  {}

Member Function Documentation

◆ computeIndex()

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

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
inlineinherited

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
inlineinherited

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  }

◆ etaWidth()

double InDetDD::PixelDiodeTree::DiodeProxyWithPosition::etaWidth ( ) const
inline

for backward compatibility, return the pitch of a diode in local-y(eta, column) direction

Definition at line 245 of file PixelDiodeTree.h.

245 { return width()[1]; }

◆ invWidth()

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

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
inlineinherited

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
inlineinherited

return true if this proxy refers to a valide diode

Definition at line 226 of file PixelDiodeTree.h.

226 { return isValid(); }

◆ phiWidth()

double InDetDD::PixelDiodeTree::DiodeProxyWithPosition::phiWidth ( ) const
inline

for backward compatibility, return the pitch of a diode in local-x(phi, row) direction

Definition at line 243 of file PixelDiodeTree.h.

243 { return width()[0]; }

◆ position()

const Vector2D& InDetDD::PixelDiodeTree::DiodeProxyWithPosition::position ( ) const
inline

get the cached position of this diode

Definition at line 241 of file PixelDiodeTree.h.

241 { return m_position; }

◆ setInvalid()

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

Definition at line 192 of file PixelDiodeTree.h.

192 { m_diodeTree=nullptr; }

◆ subMatrixAttribute()

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

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
inlineinherited

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  }

◆ xEtaMax()

double InDetDD::PixelDiodeTree::DiodeProxyWithPosition::xEtaMax ( ) const
inline

for backward compatibility, return the position of the upper edge of the diode in local-y(eta, column) direction.

The center postion is cached.

Definition at line 257 of file PixelDiodeTree.h.

257 { return m_position[1]+width()[1]*.5; }

◆ xEtaMin()

double InDetDD::PixelDiodeTree::DiodeProxyWithPosition::xEtaMin ( ) const
inline

for backward compatibility, return the position of the lower edge of the diode in local-y(eta, column) direction.

The center postion is cached.

Definition at line 254 of file PixelDiodeTree.h.

254 { return m_position[1]-width()[1]*.5; }

◆ xPhiMax()

double InDetDD::PixelDiodeTree::DiodeProxyWithPosition::xPhiMax ( ) const
inline

for backward compatibility, return the position of the lower edge of the diode in local-y(phi, row) direction.

The center postion is cached.

Definition at line 251 of file PixelDiodeTree.h.

251 { return m_position[0]+width()[0]*.5; }

◆ xPhiMin()

double InDetDD::PixelDiodeTree::DiodeProxyWithPosition::xPhiMin ( ) const
inline

for backward compatibility, return the position of the lower edge of the diode in local-x(phi, row) direction.

The center postion is cached.

Definition at line 248 of file PixelDiodeTree.h.

248 { return m_position[0]-width()[0]*.5; }

Friends And Related Function Documentation

◆ PixelDiodeTree

friend class PixelDiodeTree
friend

Definition at line 231 of file PixelDiodeTree.h.

Member Data Documentation

◆ m_diodeIdx

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

Definition at line 188 of file PixelDiodeTree.h.

◆ m_diodeTree

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

Definition at line 186 of file PixelDiodeTree.h.

◆ m_position

Vector2D InDetDD::PixelDiodeTree::DiodeProxyWithPosition::m_position {}
protected

Definition at line 260 of file PixelDiodeTree.h.

◆ m_subMatrixIdx

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

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::width
const PixelDiodeTree::Vector2D & width() const
get the width stored for this diode.
Definition: PixelDiodeTree.h:195
InDetDD::PixelDiodeTree::DiodeProxy::DiodeProxy
DiodeProxy()
Definition: PixelDiodeTree.h:189
InDetDD::PixelDiodeTree::DiodeProxyWithPosition::position
const Vector2D & position() const
get the cached position of this diode
Definition: PixelDiodeTree.h:241
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::DiodeProxyWithPosition::m_position
Vector2D m_position
Definition: PixelDiodeTree.h:260
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