ATLAS Offline Software
Loading...
Searching...
No Matches
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
double phiWidth () const
 for backward compatibility, return the pitch of a diode in local-x(phi, row) direction
double etaWidth () const
 for backward compatibility, return the pitch of a diode in local-y(eta, column) direction
double xPhiMin () const
 for backward compatibility, return the position of the lower edge of the diode in local-x(phi, row) direction.
double xPhiMax () const
 for backward compatibility, return the position of the lower edge of the diode in local-y(phi, row) direction.
double xEtaMin () const
 for backward compatibility, return the position of the lower edge of the diode in local-y(eta, column) direction.
double xEtaMax () const
 for backward compatibility, return the position of the upper edge of the diode in local-y(eta, column) direction.
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

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 {}
const Vector2D & position() const
get the cached position of this diode

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 {
221 return m_diodeTree->computeIndex(m_subMatrixIdx, m_diodeIdx, pos);
222 }
PixelDiodeTree::IndexType m_diodeIdx
PixelDiodeTree::IndexType m_subMatrixIdx

◆ 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 {
217 return m_diodeTree->computePosition(m_subMatrixIdx, m_diodeIdx, idx);
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());
207 return m_diodeTree->m_diodeParam.m_attribute[m_diodeIdx];
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]; }
const PixelDiodeTree::Vector2D & width() const
get the width stored for this diode.

◆ 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());
202 return m_diodeTree->m_diodeParam.m_invWidth[m_diodeIdx];
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(); }
bool isValid() const
return true if this proxy refers to a valide diode

◆ 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());
212 return m_diodeTree->m_attribute[m_subMatrixIdx];
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());
197 return m_diodeTree->m_diodeParam.m_width[m_diodeIdx];
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; }

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

188{};

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

260{};

◆ m_subMatrixIdx

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

Definition at line 187 of file PixelDiodeTree.h.

187{};

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