ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_ReadoutScheme.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
6// SCT_ReadoutScheme.h
8// (c) ATLAS Detector software
10
11#ifndef INDETREADOUTGEOMETRY_SCT_READOUTSCHEME_H
12#define INDETREADOUTGEOMETRY_SCT_READOUTSCHEME_H
13
16
17#include <list>
18
19namespace InDetDD {
20
28
30
32 // Public methods:
34 public:
35
36 // Copy constructor:
38
39 // Constructor with parameters:
40 // number of crystals within module side
41 // number of diodes within crystal
42 // number of cells within module side
43 // index of diode connected to cell with index 0
44 SCT_ReadoutScheme(const int crystals,const int diodes,
45 const int cells,const int shift);
46
47 // Destructor:
48 virtual ~SCT_ReadoutScheme() = default;
49
50 // Assignment operator:
52
53 void setDiodes(int numDiodes);
54 void setCells(int numReadoutCells);
55
57 // Const methods:
59
60 // number of crystals within module side:
61 int crystals() const;
62
63 // number of diodes within crystal:
64 int diodes() const;
65
66 // number of cells within module side:
67 int cells() const;
68
69 // index of diode connected to cell with index 0:
70 int shift() const;
71
72 // readout id -> id of connected diodes
73 int numberOfConnectedCells(const SiReadoutCellId & readoutId) const;
74 SiCellId connectedCell(const SiReadoutCellId & readoutId, int number) const;
75
76 // diode id -> readout id
77 SiReadoutCellId readoutIdOfCell(const SiCellId & cellId) const;
78
79
80
82 // Non-const methods:
84
86 // Private methods:
88 private:
89
91
93 // Private data:
95 private:
96 int m_crystals; // number of crystals within module side
97 int m_diodes; // number of diodes within crystal
98 int m_cells; // number of cells within module side
99 int m_shift; // index of diode connected to cell with index 0
100};
101
103// Inline methods:
105inline void SCT_ReadoutScheme::setDiodes(int numDiodes) {
106 m_diodes = numDiodes;
107}
108
109inline void SCT_ReadoutScheme::setCells(int numReadoutCells) {
110 m_cells = numReadoutCells;
111}
112
114{
115 return m_crystals;
116}
117
119{
120 return m_diodes;
121}
122
123inline int SCT_ReadoutScheme::cells() const
124{
125 return m_cells;
126}
127
128inline int SCT_ReadoutScheme::shift() const
129{
130 return m_shift;
131}
132
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}
139
140
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}
147
148} // namespace InDetDD
149
150#endif // INDETREADOUTGEOMETRY_SCT_READOUTSCHEME_H
virtual ~SCT_ReadoutScheme()=default
void setCells(int numReadoutCells)
SCT_ReadoutScheme(const SCT_ReadoutScheme &scheme)
SiCellId connectedCell(const SiReadoutCellId &readoutId, int number) const
SCT_ReadoutScheme & operator=(const SCT_ReadoutScheme &scheme)
SiReadoutCellId readoutIdOfCell(const SiCellId &cellId) const
int numberOfConnectedCells(const SiReadoutCellId &readoutId) const
void setDiodes(int numDiodes)
Identifier for the strip or pixel cell.
Definition SiCellId.h:29
bool isValid() const
Test if its in a valid state.
Definition SiCellId.h:136
Identifier for the strip or pixel readout cell.
Message Stream Member.
std::string number(const double &d, const std::string &s)
Definition utils.cxx:186