ATLAS Offline Software
Loading...
Searching...
No Matches
SiDetectorElement.icc
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5/**
6 * @file SiDetectorElement.icc
7 **/
8
9namespace InDetDD {
10
11 ///////////////////////////////////////////////////////////////////
12 // Inline methods:
13 ///////////////////////////////////////////////////////////////////
14
15 inline Trk::DetectorElemType SiDetectorElement::detectorType() const{
16 return Trk::DetectorElemType::Silicon;
17 }
18 inline void SiDetectorElement::setNextInEta(const SiDetectorElement* element)
19 {
20 m_nextInEta = element;
21 }
22
23 inline void SiDetectorElement::setPrevInEta(const SiDetectorElement* element)
24 {
25 m_prevInEta = element;
26 }
27
28 inline void SiDetectorElement::setNextInPhi(const SiDetectorElement* element)
29 {
30 m_nextInPhi = element;
31 }
32
33 inline void SiDetectorElement::setPrevInPhi(const SiDetectorElement* element)
34 {
35 m_prevInPhi = element;
36 }
37
38 inline void SiDetectorElement::setOtherSide(const SiDetectorElement* element) // For SCT only
39 {
40 m_otherSide = element;
41 }
42
43 inline const SiDetectorElement * SiDetectorElement::nextInEta() const
44 {
45 return m_nextInEta;
46 }
47
48 inline const SiDetectorElement * SiDetectorElement::prevInEta() const
49 {
50 return m_prevInEta;
51 }
52
53 inline const SiDetectorElement * SiDetectorElement::nextInPhi() const
54 {
55 return m_nextInPhi;
56 }
57
58 inline const SiDetectorElement * SiDetectorElement::prevInPhi() const
59 {
60 return m_prevInPhi;
61 }
62
63 inline const SiDetectorElement * SiDetectorElement::otherSide() const
64 {
65 return m_otherSide;
66 }
67
68 inline bool SiDetectorElement::isPixel() const {
69 return m_isPixel;
70 }
71
72 inline bool SiDetectorElement::isSCT() const {
73 return m_isSCT;
74 }
75
76 inline bool SiDetectorElement::isPLR() const {
77 return m_isPLR;
78 }
79
80 inline bool SiDetectorElement::isDBM() const {
81 return m_isDBM;
82 }
83
84 inline bool SiDetectorElement::isBarrel() const {
85 return m_isBarrel;
86 }
87
88 inline bool SiDetectorElement::isEndcap() const
89 {
90 return (!isBarrel() && !isDBM());
91 }
92
93 inline const SiDetectorDesign& SiDetectorElement::design() const
94 {
95 return *m_siDesign;
96 }
97
98 inline double SiDetectorElement::phiPitch() const
99 {
100 return m_siDesign->phiPitch();
101 }
102
103 inline double SiDetectorElement::phiPitch(const Amg::Vector2D& localPosition) const
104 {
105 return m_siDesign->phiPitch(localPosition);
106 }
107
108 inline InDetDD::CarrierType SiDetectorElement::carrierType() const
109 {
110 return m_siDesign->carrierType();
111 }
112
113 inline bool SiDetectorElement::swapPhiReadoutDirection() const
114 {
115 // equivalent to (m_siDesign->swapHitPhiReadoutDirection() xor !m_phiDirection)
116 bool dir = this->phiDirection();
117 return ((!m_siDesign->swapHitPhiReadoutDirection() && !dir)
118 || (m_siDesign->swapHitPhiReadoutDirection() && dir));
119 }
120
121 inline bool SiDetectorElement::swapEtaReadoutDirection() const
122 {
123 bool dir = this->etaDirection();
124 // equivalent to (m_siDesign->swapHitEtaReadoutDirection() xor !m_etaDirection)
125 return ((!m_siDesign->swapHitEtaReadoutDirection() && !dir)
126 || (m_siDesign->swapHitEtaReadoutDirection() && dir));
127 }
128
129 inline SiCellId SiDetectorElement::gangedCell(const SiCellId& cellId) const
130 {
131 return m_siDesign->gangedCell(cellId);
132 }
133
134 inline MsgStream& SiDetectorElement::msg(MSG::Level lvl) const
135 {
136 return m_commonItems->msg(lvl);
137 }
138
139 inline bool SiDetectorElement::msgLvl(MSG::Level lvl) const
140 {
141 return m_commonItems->msgLvl(lvl);
142 }
143
144
145
146} // namespace InDetDD