ATLAS Offline Software
Loading...
Searching...
No Matches
InDetDD::PixelReadoutScheme Class Reference

Class used to describe the connection scheme of a diode matrix to a set of readout circuits. More...

#include <PixelReadoutScheme.h>

Collaboration diagram for InDetDD::PixelReadoutScheme:

Public Member Functions

 PixelReadoutScheme (const int circuitsPerColumn, const int circuitsPerRow, const int cellColumnsPerCircuit, const int cellRowsPerCircuit, const int diodeColumnsPerCircuit, const int diodeRowsPerCircuit)
 Constructor with parameters:
 ~PixelReadoutScheme ()
 Destructor:
int numberOfCircuits () const
 total number of circuits:
int numberOfCircuitsPerColumn () const
 number of circuits per column:
int numberOfCircuitsPerRow () const
 number of circuits per row:
int columnsPerCircuit () const
 number of cell columns per circuit:
int rowsPerCircuit () const
 number of cell rows per circuit:
int columns () const
 number of cell columns per module:
int rows () const
 number of cell rows per module:
int numberOfConnectedCells (const SiReadoutCellId &readoutId) const
 number of cells connected to this readout.
SiCellId connectedCell (const SiReadoutCellId &readoutId, unsigned int number) const
 Cell ids of cell connected to this readout.
SiReadoutCellId readoutIdOfCell (const SiCellId &cellId) const
 Readout id of this diode.
SiCellId gangedCell (const SiCellId &cellId) const
 If cell is ganged return the other cell, otherwise return an invalid id.
void addMultipleRowConnection (const int lowerRow, const std::vector< int > &connections)
 Add a new multiple connection for rows: lower diode row for which the connection scheme is given vector containing, for each diode, the readout cell row number to which the corresponding diode is connected.

Private Member Functions

 PixelReadoutScheme ()

Private Attributes

PixelMultipleConnection1D m_rowConnections
 multiple connections for rows
int m_numberOfCircuits
 total number of circuits
int m_numberOfCircuitsPerColumn
 number of circuits per column
int m_numberOfCircuitsPerRow
 number of circuits per row
int m_columnsPerCircuit
 number of cell columns per circuit
int m_rowsPerCircuit
 number of cell rows per circuit
int m_columns
 Number of columns.
int m_rows
 Number of rows.

Detailed Description

Class used to describe the connection scheme of a diode matrix to a set of readout circuits.

  • to get the readout cell connected to a diode
  • to get the list of diodes connected to a readout cell
Author
David Calvet
  • modified on 5/10/04 Davide Costanzo. Replace PixelModulePosition with SiCellId
  • modified: Grant Gorfine, Andreas Salzburger

Definition at line 35 of file PixelReadoutScheme.h.

Constructor & Destructor Documentation

◆ PixelReadoutScheme() [1/2]

InDetDD::PixelReadoutScheme::PixelReadoutScheme ( const int circuitsPerColumn,
const int circuitsPerRow,
const int cellColumnsPerCircuit,
const int cellRowsPerCircuit,
const int diodeColumnsPerCircuit,
const int diodeRowsPerCircuit )

Constructor with parameters:

number of circuits in one circuit column number of circuits in one circuit row number of cell columns per circuit number of cell rows per circuit number of diode columns connected to one circuit number of diode rows connected to one circuit

Definition at line 22 of file PixelReadoutScheme.cxx.

27 :
28 m_numberOfCircuits(circuitsPerColumn*circuitsPerRow),
29 m_numberOfCircuitsPerColumn(circuitsPerColumn),
30 m_numberOfCircuitsPerRow(circuitsPerRow),
31 m_columnsPerCircuit(cellColumnsPerCircuit),
32 m_rowsPerCircuit(cellRowsPerCircuit),
33 m_columns(circuitsPerRow*diodeColumnsPerCircuit),
34 m_rows(circuitsPerColumn*diodeRowsPerCircuit)
35{
36 // protect against 0 columns or rows
37 if (!m_columns) throw std::runtime_error("PixelReadoutScheme: Number of columns is 0");
38 if (!m_rows) throw std::runtime_error("PixelReadoutScheme: Number of columns is 0");
39}
int m_numberOfCircuitsPerColumn
number of circuits per column
int m_numberOfCircuitsPerRow
number of circuits per row
int m_numberOfCircuits
total number of circuits
int m_rowsPerCircuit
number of cell rows per circuit
int m_columns
Number of columns.
int m_columnsPerCircuit
number of cell columns per circuit

◆ ~PixelReadoutScheme()

InDetDD::PixelReadoutScheme::~PixelReadoutScheme ( )
inline

Destructor:

Definition at line 136 of file PixelReadoutScheme.h.

137{}

◆ PixelReadoutScheme() [2/2]

InDetDD::PixelReadoutScheme::PixelReadoutScheme ( )
private

Member Function Documentation

◆ addMultipleRowConnection()

void InDetDD::PixelReadoutScheme::addMultipleRowConnection ( const int lowerRow,
const std::vector< int > & connections )

Add a new multiple connection for rows: lower diode row for which the connection scheme is given vector containing, for each diode, the readout cell row number to which the corresponding diode is connected.

Definition at line 102 of file PixelReadoutScheme.cxx.

104{
105
106 m_rowConnections.set(lowerIndex, connections);
107}
PixelMultipleConnection1D m_rowConnections
multiple connections for rows

◆ columns()

int InDetDD::PixelReadoutScheme::columns ( ) const
inline

number of cell columns per module:

Definition at line 164 of file PixelReadoutScheme.h.

165{
166 return m_columns;
167}

◆ columnsPerCircuit()

int InDetDD::PixelReadoutScheme::columnsPerCircuit ( ) const
inline

number of cell columns per circuit:

Definition at line 154 of file PixelReadoutScheme.h.

155{
156 return m_columnsPerCircuit;
157}

◆ connectedCell()

SiCellId InDetDD::PixelReadoutScheme::connectedCell ( const SiReadoutCellId & readoutId,
unsigned int number ) const

Cell ids of cell connected to this readout.

Definition at line 59 of file PixelReadoutScheme.cxx.

60{
61 if (!readoutId.isValid()) return {};
62
63 // Do quick check to see if it is outside ganged pixel range.
64 int phiIndex = readoutId.phiIndex();
65 if (m_rowConnections.outsideReadout(phiIndex)) return readoutId;
66
67 int numConnected = m_rowConnections.numberOfConnectedCells(phiIndex);
68 if (!numConnected || static_cast<int>(number) >= numConnected) return {};
69
70 int newPhiIndex = m_rowConnections.connectedCell(phiIndex, number);
71 return {newPhiIndex, readoutId.etaIndex()};
72}
unsigned int phiIndex(float phi, float binsize)
calculate phi index for a given phi
Definition EtaPhiLUT.cxx:23
std::string number(const double &d, const std::string &s)
Definition utils.cxx:186

◆ gangedCell()

SiCellId InDetDD::PixelReadoutScheme::gangedCell ( const SiCellId & cellId) const

If cell is ganged return the other cell, otherwise return an invalid id.

Definition at line 91 of file PixelReadoutScheme.cxx.

92{
93 if (!cellId.isValid()) return cellId;
94 int phiIndex = cellId.phiIndex();
95 if (m_rowConnections.outsideReadout(phiIndex)) return {}; // Invalid ID
96 int newPhiIndex = m_rowConnections.gangedCell(phiIndex);
97 if (newPhiIndex == phiIndex) return {}; // Invalid ID
98 return {newPhiIndex, cellId.etaIndex()};
99}
int phiIndex() const
Get phi index. Equivalent to strip().
Definition SiCellId.h:122
bool isValid() const
Test if its in a valid state.
Definition SiCellId.h:136
int etaIndex() const
Get eta index.
Definition SiCellId.h:114

◆ numberOfCircuits()

int InDetDD::PixelReadoutScheme::numberOfCircuits ( ) const
inline

total number of circuits:

Definition at line 139 of file PixelReadoutScheme.h.

140{
141 return m_numberOfCircuits;
142}

◆ numberOfCircuitsPerColumn()

int InDetDD::PixelReadoutScheme::numberOfCircuitsPerColumn ( ) const
inline

number of circuits per column:

Definition at line 144 of file PixelReadoutScheme.h.

145{
147}

◆ numberOfCircuitsPerRow()

int InDetDD::PixelReadoutScheme::numberOfCircuitsPerRow ( ) const
inline

number of circuits per row:

Definition at line 149 of file PixelReadoutScheme.h.

150{
152}

◆ numberOfConnectedCells()

int InDetDD::PixelReadoutScheme::numberOfConnectedCells ( const SiReadoutCellId & readoutId) const

number of cells connected to this readout.

Definition at line 45 of file PixelReadoutScheme.cxx.

46{
47 if (!readoutId.isValid()) return 0;
48
49 // Do quick check to see if it is outside ganged pixel range.
50 int phiIndex = readoutId.phiIndex();
51 if (m_rowConnections.outsideReadout(phiIndex)) return 1;
52
53 return m_rowConnections.numberOfConnectedCells(phiIndex);
54
55}

◆ readoutIdOfCell()

SiReadoutCellId InDetDD::PixelReadoutScheme::readoutIdOfCell ( const SiCellId & cellId) const

Readout id of this diode.

Definition at line 76 of file PixelReadoutScheme.cxx.

77{
78 if (!cellId.isValid()) return {};
79
80 int phiIndex = cellId.phiIndex();
81 int newPhiIndex = phiIndex;
82 if (!m_rowConnections.outsideDiode(phiIndex)) {
83 newPhiIndex = m_rowConnections.readoutOfDiode(phiIndex);
84 }
85
86 return {newPhiIndex, cellId.etaIndex()};
87
88}

◆ rows()

int InDetDD::PixelReadoutScheme::rows ( ) const
inline

number of cell rows per module:

Definition at line 169 of file PixelReadoutScheme.h.

170{
171 return m_rows;
172}

◆ rowsPerCircuit()

int InDetDD::PixelReadoutScheme::rowsPerCircuit ( ) const
inline

number of cell rows per circuit:

Definition at line 159 of file PixelReadoutScheme.h.

160{
161 return m_rowsPerCircuit;
162}

Member Data Documentation

◆ m_columns

int InDetDD::PixelReadoutScheme::m_columns
private

Number of columns.

Definition at line 128 of file PixelReadoutScheme.h.

◆ m_columnsPerCircuit

int InDetDD::PixelReadoutScheme::m_columnsPerCircuit
private

number of cell columns per circuit

Definition at line 126 of file PixelReadoutScheme.h.

◆ m_numberOfCircuits

int InDetDD::PixelReadoutScheme::m_numberOfCircuits
private

total number of circuits

Definition at line 123 of file PixelReadoutScheme.h.

◆ m_numberOfCircuitsPerColumn

int InDetDD::PixelReadoutScheme::m_numberOfCircuitsPerColumn
private

number of circuits per column

Definition at line 124 of file PixelReadoutScheme.h.

◆ m_numberOfCircuitsPerRow

int InDetDD::PixelReadoutScheme::m_numberOfCircuitsPerRow
private

number of circuits per row

Definition at line 125 of file PixelReadoutScheme.h.

◆ m_rowConnections

PixelMultipleConnection1D InDetDD::PixelReadoutScheme::m_rowConnections
private

multiple connections for rows

Definition at line 122 of file PixelReadoutScheme.h.

◆ m_rows

int InDetDD::PixelReadoutScheme::m_rows
private

Number of rows.

Definition at line 129 of file PixelReadoutScheme.h.

◆ m_rowsPerCircuit

int InDetDD::PixelReadoutScheme::m_rowsPerCircuit
private

number of cell rows per circuit

Definition at line 127 of file PixelReadoutScheme.h.


The documentation for this class was generated from the following files: