ATLAS Offline Software
Loading...
Searching...
No Matches
PixelMultipleConnection1D.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
6// PixelMultipleConnection1D.h
8// (c) ATLAS Pixel Detector software
10
11
12#ifndef READOUTGEOMETRYBASE_PIXELMULTIPLECONNECTION1D_H
13#define READOUTGEOMETRYBASE_PIXELMULTIPLECONNECTION1D_H
14
15#include <vector>
16
17namespace InDetDD {
18
26
28
30 // Public methods:
32 public:
33
35
40 PixelMultipleConnection1D(const int lowerIndex, const std::vector<int> &connections);
41
42
43 void set(const int lowerIndex, const std::vector<int> &connections);
44
45
47 // Const methods:
49
51 bool outsideReadout(const int index) const;
52
54 bool outsideDiode(const int cell) const;
55
57 int numberOfConnectedCells(const int index) const;
58
62 int connectedCell(const int index, unsigned int number) const;
63
65 int readoutOfDiode(const int index) const;
66
69 int gangedCell(const int index) const;
70
72 // Private data:
74 private:
79 std::vector< std::vector<int> > m_readoutToDiode;
80 std::vector<int> m_diodeToReadout;
81 std::vector<int> m_diodeGanged;
82
84 // Private methods:
86 void debugPrintout();
87
88};
89
91// Inline methods:
93
94inline bool PixelMultipleConnection1D::outsideReadout(const int readout) const
95{
96 return (readout<m_lowerReadout || readout>m_upperReadout);
97}
98
99
100inline bool PixelMultipleConnection1D::outsideDiode(const int diode) const
101{
102 return (diode<m_lowerDiode || diode>m_upperDiode);
103}
104
105
107{
108 return m_readoutToDiode[index - m_lowerReadout].size();
109}
110
111inline int PixelMultipleConnection1D::connectedCell(const int index, unsigned int number) const
112{
114}
115
117{
119}
120
122{
124}
125
126} // namespace InDetDD
127
128#endif // READOUTGEOMETRYBASE_PIXELMULTIPLECONNECTION1D_H
int m_lowerDiode
lower diode index to which it applies
int gangedCell(const int index) const
If the diode is gnaged return the other diode.
bool outsideReadout(const int index) const
Check if the readout cell is in the range; Also for index of gangedCell.
std::vector< int > m_diodeGanged
connection table diode -> other diode.
bool outsideDiode(const int cell) const
Check if the diode is in the range:
int m_upperReadout
upper cell to which it applies
void set(const int lowerIndex, const std::vector< int > &connections)
int m_upperDiode
upper diode index to which it applies
std::vector< std::vector< int > > m_readoutToDiode
connection table readout -> diodes
int connectedCell(const int index, unsigned int number) const
Return the diode index corresponding the this readout.
int m_lowerReadout
lower cell to which it applies
int numberOfConnectedCells(const int index) const
Return the number of diodes that are connected to this readout cell, Must check outsideReadout first.
int readoutOfDiode(const int index) const
Return readout cell id of this diode, Must check outsideDiode first.
std::vector< int > m_diodeToReadout
connection table diode -> readout
Message Stream Member.
Definition index.py:1
std::string number(const double &d, const std::string &s)
Definition utils.cxx:186