ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_ReadoutScheme.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
6// SCT_ReadoutScheme.cxx
7// Implementation file for class SCT_ReadoutScheme
9// (c) ATLAS Detector software
11// Version 1.0 23/5/2001 Alessandro Fornaini
12// Modified: Grant Gorfine
14
16
17namespace InDetDD {
18
19// Copy constructor:
21
22= default;
23
24// Constructor with parameters:
26 const int cells,const int 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}
37
38// Assignment operator:
40{
41 if (this!=&scheme) {
43 m_diodes=scheme.m_diodes;
44 m_cells=scheme.m_cells;
45 m_shift=scheme.m_shift;
46 } else {}
47 return *this;
48}
49
50
51// diode id -> readout id
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}
63
64} // namespace InDetDD
Definition of the readout scheme in the SCT detector describing, number of sides, cells,...
SCT_ReadoutScheme(const SCT_ReadoutScheme &scheme)
SCT_ReadoutScheme & operator=(const SCT_ReadoutScheme &scheme)
SiReadoutCellId readoutIdOfCell(const SiCellId &cellId) const
Identifier for the strip or pixel cell.
Definition SiCellId.h:29
int strip() const
Get strip number. Equivalent to phiIndex().
Definition SiCellId.h:131
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.