ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
InDetDD::SCT_ReadoutScheme Class Reference

#include <SCT_ReadoutScheme.h>

Collaboration diagram for InDetDD::SCT_ReadoutScheme:

Public Member Functions

 SCT_ReadoutScheme (const SCT_ReadoutScheme &scheme)
 
 SCT_ReadoutScheme (const int crystals, const int diodes, const int cells, const int shift)
 
virtual ~SCT_ReadoutScheme ()=default
 
SCT_ReadoutSchemeoperator= (const SCT_ReadoutScheme &scheme)
 
void setDiodes (int numDiodes)
 
void setCells (int numReadoutCells)
 
int crystals () const
 
int diodes () const
 
int cells () const
 
int shift () const
 
int numberOfConnectedCells (const SiReadoutCellId &readoutId) const
 
SiCellId connectedCell (const SiReadoutCellId &readoutId, int number) const
 
SiReadoutCellId readoutIdOfCell (const SiCellId &cellId) const
 

Private Member Functions

 SCT_ReadoutScheme ()
 

Private Attributes

int m_crystals
 
int m_diodes
 
int m_cells
 
int m_shift
 

Detailed Description

Definition of the readout scheme in the SCT detector describing, number of sides, cells, crystals per module.

Author
Alessandro Fornaini, Grant Gorfine

Definition at line 29 of file SCT_ReadoutScheme.h.

Constructor & Destructor Documentation

◆ SCT_ReadoutScheme() [1/3]

InDetDD::SCT_ReadoutScheme::SCT_ReadoutScheme ( const SCT_ReadoutScheme scheme)
default

◆ SCT_ReadoutScheme() [2/3]

InDetDD::SCT_ReadoutScheme::SCT_ReadoutScheme ( const int  crystals,
const int  diodes,
const int  cells,
const int  shift 
)

Definition at line 25 of file SCT_ReadoutScheme.cxx.

26  :
29  m_cells(cells),
30  m_shift(shift)
31 {
32  //check if parameters are consistent
33  if (m_crystals<1) m_crystals=1;
34  if (m_diodes<0) m_diodes=0;
35  if (m_cells<0) m_cells=0;
36 }

◆ ~SCT_ReadoutScheme()

virtual InDetDD::SCT_ReadoutScheme::~SCT_ReadoutScheme ( )
virtualdefault

◆ SCT_ReadoutScheme() [3/3]

InDetDD::SCT_ReadoutScheme::SCT_ReadoutScheme ( )
private

Member Function Documentation

◆ cells()

int InDetDD::SCT_ReadoutScheme::cells ( ) const
inline

Definition at line 123 of file SCT_ReadoutScheme.h.

124 {
125  return m_cells;
126 }

◆ connectedCell()

SiCellId InDetDD::SCT_ReadoutScheme::connectedCell ( const SiReadoutCellId readoutId,
int  number 
) const
inline

Definition at line 141 of file SCT_ReadoutScheme.h.

142 {
143  // Assume a valid readout id is used.
144  // Always 1 to 1 correspondence in SCT
145  return readoutId; // Allowed to convert a SiReadoutCellId to a SiCellId.
146 }

◆ crystals()

int InDetDD::SCT_ReadoutScheme::crystals ( ) const
inline

Definition at line 113 of file SCT_ReadoutScheme.h.

114 {
115  return m_crystals;
116 }

◆ diodes()

int InDetDD::SCT_ReadoutScheme::diodes ( ) const
inline

Definition at line 118 of file SCT_ReadoutScheme.h.

119 {
120  return m_diodes;
121 }

◆ numberOfConnectedCells()

int InDetDD::SCT_ReadoutScheme::numberOfConnectedCells ( const SiReadoutCellId readoutId) const
inline

Definition at line 133 of file SCT_ReadoutScheme.h.

134 {
135  // Assume an in range readout id is used. No checks are made.
136  // Always 1 to 1 correspondence in SCT
137  return (readoutId.isValid()) ? 1 : 0;
138 }

◆ operator=()

SCT_ReadoutScheme & InDetDD::SCT_ReadoutScheme::operator= ( const SCT_ReadoutScheme scheme)

Definition at line 39 of file SCT_ReadoutScheme.cxx.

40 {
41  if (this!=&scheme) {
42  m_crystals=scheme.m_crystals;
43  m_diodes=scheme.m_diodes;
44  m_cells=scheme.m_cells;
45  m_shift=scheme.m_shift;
46  } else {}
47  return *this;
48 }

◆ readoutIdOfCell()

SiReadoutCellId InDetDD::SCT_ReadoutScheme::readoutIdOfCell ( const SiCellId cellId) const

Definition at line 53 of file SCT_ReadoutScheme.cxx.

54 {
55  // readout cell and diode numbering are the same.
56  // The range can be different due to the unconnected edge strips (if m_shift != 0).
57  if (!cellId.isValid()) return {}; // return an invalid id.
58  int strip = cellId.strip();
59  // I think this should be >= m_cells. But need to check if this has any implications.
60  if (strip < 0 || strip > m_cells) return {}; // return an invalid id.
61  return {strip};
62 }

◆ setCells()

void InDetDD::SCT_ReadoutScheme::setCells ( int  numReadoutCells)
inline

Definition at line 109 of file SCT_ReadoutScheme.h.

109  {
110  m_cells = numReadoutCells;
111 }

◆ setDiodes()

void InDetDD::SCT_ReadoutScheme::setDiodes ( int  numDiodes)
inline

Definition at line 105 of file SCT_ReadoutScheme.h.

105  {
106  m_diodes = numDiodes;
107 }

◆ shift()

int InDetDD::SCT_ReadoutScheme::shift ( ) const
inline

Definition at line 128 of file SCT_ReadoutScheme.h.

129 {
130  return m_shift;
131 }

Member Data Documentation

◆ m_cells

int InDetDD::SCT_ReadoutScheme::m_cells
private

Definition at line 98 of file SCT_ReadoutScheme.h.

◆ m_crystals

int InDetDD::SCT_ReadoutScheme::m_crystals
private

Definition at line 96 of file SCT_ReadoutScheme.h.

◆ m_diodes

int InDetDD::SCT_ReadoutScheme::m_diodes
private

Definition at line 97 of file SCT_ReadoutScheme.h.

◆ m_shift

int InDetDD::SCT_ReadoutScheme::m_shift
private

Definition at line 99 of file SCT_ReadoutScheme.h.


The documentation for this class was generated from the following files:
InDetDD::SCT_ReadoutScheme::cells
int cells() const
Definition: SCT_ReadoutScheme.h:123
InDetDD::SCT_ReadoutScheme::diodes
int diodes() const
Definition: SCT_ReadoutScheme.h:118
InDetDD::SCT_ReadoutScheme::m_crystals
int m_crystals
Definition: SCT_ReadoutScheme.h:96
InDetDD::SCT_ReadoutScheme::shift
int shift() const
Definition: SCT_ReadoutScheme.h:128
keylayer_zslicemap.strip
strip
Definition: keylayer_zslicemap.py:151
InDetDD::SCT_ReadoutScheme::m_cells
int m_cells
Definition: SCT_ReadoutScheme.h:98
JetTagCalibConfig.scheme
scheme
Definition: JetTagCalibConfig.py:10
InDetDD::SCT_ReadoutScheme::crystals
int crystals() const
Definition: SCT_ReadoutScheme.h:113
InDetDD::SCT_ReadoutScheme::m_diodes
int m_diodes
Definition: SCT_ReadoutScheme.h:97
InDetDD::SCT_ReadoutScheme::m_shift
int m_shift
Definition: SCT_ReadoutScheme.h:99