ATLAS Offline Software
MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/sTgcReadoutElement.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
5 
8 #include <GaudiKernel/SystemOfUnits.h>
9 
10 #ifndef SIMULATIONBASE
11 # include "Acts/Surfaces/TrapezoidBounds.hpp"
12 # include "Acts/Surfaces/Surface.hpp"
13 #endif
14 
15 using namespace ActsTrk;
16 
17 namespace MuonGMR4 {
19 std::ostream& operator<<(std::ostream& ostr, const parameterBook& pars) {
20  if (pars.stripDesign) ostr<<"Strips: "<<(*pars.stripDesign)<<std::endl;
21  if (pars.wireGroupDesign) ostr<<"Wire Groups: "<<(*pars.wireGroupDesign)<<std::endl;
22  if (pars.padDesign) ostr<<"Pads: "<<(*pars.padDesign)<<std::endl;
23  return ostr;
24 }
25 sTgcReadoutElement::~sTgcReadoutElement() = default;
26 sTgcReadoutElement::sTgcReadoutElement(defineArgs&& args)
28  m_pars{std::move(args)} {
29 }
30 
32 
34  ATH_MSG_DEBUG("Parameter book "<<parameterBook());
35 
37 #ifndef SIMULATIONBASE
38 
42 #endif
43 
44  if (m_pars.stripLayers.empty() || m_pars.wireGroupLayers.empty()) {
45  ATH_MSG_FATAL("The readout element "<<idHelperSvc()->toStringDetEl(identify())<<" doesn't have any layers defined");
46  return StatusCode::FAILURE;
47  }
48  for (unsigned int layer = 0; layer < m_pars.stripLayers.size(); ++layer) {
49  IdentifierHash layHash{layer};
50  if (gasGapNumber(m_pars.stripLayers[layer].hash()) != layHash) {
51  ATH_MSG_FATAL("Layer "<<m_pars.stripLayers[layer]<<" has a very strange hash. Expect "<<layer);
52  return StatusCode::FAILURE;
53  }
54  ATH_CHECK(insertTransform<sTgcReadoutElement>(m_pars.stripLayers[layer].hash()));
55 
56 #ifndef SIMULATIONBASE
57  const StripDesign& design{m_pars.stripLayers[layer].design()};
59  m_pars.layerBounds->make_bounds(design.shortHalfHeight(),
60  design.longHalfHeight(),
61  design.halfWidth(),
62  90.*Gaudi::Units::deg)));
63 #endif
64 
65  }
66  for (unsigned int layer = 0; layer < m_pars.wireGroupLayers.size(); ++layer) {
67  IdentifierHash layHash{layer};
68  if (gasGapNumber(m_pars.wireGroupLayers[layer].hash()) != layHash) {
69  ATH_MSG_FATAL("Layer "<<m_pars.wireGroupLayers[layer]<<" has a very strange hash. Expect "<<layer);
70  return StatusCode::FAILURE;
71  }
72  ATH_CHECK(insertTransform<sTgcReadoutElement>(m_pars.wireGroupLayers[layer].hash()));
73 #ifndef SIMULATIONBASE
74  const StripDesign& design{m_pars.wireGroupLayers[layer].design()};
76  m_pars.layerBounds->make_bounds(design.shortHalfHeight(),
77  design.longHalfHeight(),
78  design.halfWidth())));
79 #endif
80  }
81  for (unsigned int layer = 0; layer < m_pars.padLayers.size(); ++layer) {
82  IdentifierHash layHash{layer};
83  if (gasGapNumber(m_pars.padLayers[layer].hash()) != layHash) {
84  ATH_MSG_FATAL("Layer "<<m_pars.padLayers[layer]<<" has a very strange hash. Expect "<<layer);
85  return StatusCode::FAILURE;
86  }
87  ATH_CHECK(insertTransform<sTgcReadoutElement>(m_pars.padLayers[layer].hash()));
88 #ifndef SIMULATIONBASE
89  const StripDesign& design{m_pars.padLayers[layer].design()};
91  m_pars.layerBounds->make_bounds(design.shortHalfHeight(),
92  design.longHalfHeight(),
93  design.halfWidth())));
94 #endif
95 
96  }
97  ActsGeometryContext gctx{};
98  m_gasGapPitch = (center(gctx, createHash(1, sTgcIdHelper::sTgcChannelTypes::Strip, 0)) -
99  center(gctx, createHash(2, sTgcIdHelper::sTgcChannelTypes::Strip, 0))).mag();
100  return StatusCode::SUCCESS;
101 }
102 
103 Amg::Transform3D sTgcReadoutElement::fromGapToChamOrigin(const IdentifierHash& measHash) const{
104  unsigned int layIdx = static_cast<unsigned int>(measHash);
105  unsigned int gasGap = gasGapNumber(measHash);
106  if(chType(measHash) == ReadoutChannelType::Strip && gasGap < m_pars.stripLayers.size()) {
107  return m_pars.stripLayers[gasGap].toOrigin();
108  }
109  else if (chType(measHash) == ReadoutChannelType::Wire && gasGap < m_pars.wireGroupLayers.size()) {
110  return m_pars.wireGroupLayers[gasGap].toOrigin();
111  }
112  else if (chType(measHash) == ReadoutChannelType::Pad && gasGap < m_pars.padLayers.size()) {
113  return m_pars.padLayers[gasGap].toOrigin();
114  }
115  else {
116  unsigned int maxReadoutLayers = m_pars.stripLayers.size() + m_pars.wireGroupLayers.size() + m_pars.padLayers.size();
117  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" The layer hash "<<layIdx
118  <<" is out of range. Maximum range "<< maxReadoutLayers);
119  return Amg::Transform3D::Identity();
120  }
121 }
122 
123 Amg::Vector2D sTgcReadoutElement::localChannelPosition(const IdentifierHash& measHash) const {
124  if (chType(measHash) == ReadoutChannelType::Strip) {
125  Amg::Vector2D stripCenter{Amg::Vector2D::Zero()};
126  std::optional<Amg::Vector2D> stripCenterOpt = stripDesign(measHash).center(channelNumber(measHash));
127  if (!stripCenterOpt) {
128  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" The strip " << channelNumber(measHash) << " doesn't intersect with the edges of the trapezoid.");
129  return stripCenter;
130  }
131  stripCenter = std::move(*stripCenterOpt);
132  if (channelNumber(measHash) == 1 && firstStripPitch(measHash) < stripPitch(measHash)) {
133  stripCenter.x() += 0.25 * stripWidth(measHash);
134  }
135  if (channelNumber(measHash) == numStrips(measHash) && firstStripPitch(measHash) == stripPitch(measHash)) {
136  stripCenter.x() -= 0.25 * stripWidth(measHash);
137  }
138  return stripCenter;
139  }
140  else if (chType(measHash) == ReadoutChannelType::Wire) {
141  Amg::Vector2D wireGroupCenter{Amg::Vector2D::Zero()};
142  std::optional<Amg::Vector2D> wireGroupCenterOpt = wireDesign(measHash).center(channelNumber(measHash));
143  if (!wireGroupCenterOpt) {
144  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" The wireGroup" << channelNumber(measHash) << "doesn't intersect with the edges of the trapezoid.");
145  return wireGroupCenter;
146  }
147  wireGroupCenter = std::move(*wireGroupCenterOpt);
148  unsigned int gasGap = gasGapNumber(measHash) + 1;
149  if (channelNumber(measHash) == 1) {
150  ATH_MSG_DEBUG("The first wiregroup width is " <<firstWireGroupWidth(gasGap));
151  ATH_MSG_DEBUG("The last wire pos is: " << wireGroupCenter.x() + ((firstWireGroupWidth(gasGap) + 1) / 2 - 1) * wirePitch(measHash) );
153  wireGroupCenter.x() = wireGroupCenter.x() + ((firstWireGroupWidth(gasGap) + 1) / 2 - 1) * wirePitch(measHash);
156  wireGroupCenter.x() = 0.5 * (wireGroupCenter.x() - 0.5 * lPadLength(measHash));
157  }
158  else if (channelNumber(measHash) == numWireGroups(gasGap)) {
159  ATH_MSG_DEBUG("The last wire center before modification is: " << wireGroupCenter.x());
160  unsigned int lastWireGroupWidth = numWires(gasGap) - firstWireGroupWidth(gasGap) - (numWireGroups(gasGap) - 2) * wireGroupWidth(gasGap);
161  ATH_MSG_DEBUG("The last wire group width is: " << lastWireGroupWidth << " and half of that is: "<< lastWireGroupWidth / 2);
163  wireGroupCenter.x() = wireGroupCenter.x() - (lastWireGroupWidth / 2 + 1) * wirePitch(measHash);
164  ATH_MSG_DEBUG("The last wire of the last second group is at: " << wireGroupCenter.x());
167  wireGroupCenter.x() = 0.5 * (wireGroupCenter.x() + 0.5 * lPadLength(measHash));
168  }
169  else {
172  wireGroupCenter.x() = wireGroupCenter.x() - wirePitch(measHash);
173  }
174  return wireGroupCenter;
175  }
176  else if (chType(measHash) == ReadoutChannelType::Pad) {
177  Amg::Vector2D padCenter{Amg::Vector2D::Zero()};
178  std::optional<Amg::Vector2D> padCenterOpt = padDesign(measHash).stripPosition(channelNumber(measHash));
179  if (!padCenterOpt) {
180  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" The pad" << channelNumber(measHash) << "doesn't is not a valid pad number.");
181  return padCenter;
182  }
183  padCenter = std::move(*padCenterOpt);
184  return padCenter;
185  }
186  else {
187  ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<"Invalid channel type: " << chType(measHash));
188  return Amg::Vector2D::Zero();
189  }
190 }
191 
192 Amg::Vector3D sTgcReadoutElement::globalChannelPosition(const ActsGeometryContext& ctx, const IdentifierHash& measHash) const {
193  const IdentifierHash lHash = layerHash(measHash);
194  unsigned int layIdx = static_cast<unsigned int>(lHash);
195  unsigned int gasGap = gasGapNumber(measHash);
196  if((chType(measHash) < ReadoutChannelType::Pad || chType(measHash) > ReadoutChannelType::Wire) && gasGap < m_pars.padLayers.size()) {
197  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" The channel type "<<chType(measHash)
198  <<"with the layer hash "<<layIdx<<" is invalid. Maximum range "<<m_pars.stripLayers.size());
199  return Amg::Vector3D::Zero();
200  }
201  Amg::Vector3D channelPos{Amg::Vector3D::Zero()};
202  Amg::Vector2D localChannel = localChannelPosition(measHash);
203  channelPos.block<2,1>(0,0) = std::move(localChannel);
204  return localToGlobalTrans(ctx, lHash) * channelPos;
205 }
206 
207 using localCornerArray = std::array<Amg::Vector2D, 4>;
208 using globalCornerArray = std::array<Amg::Vector3D, 4>;
209 globalCornerArray sTgcReadoutElement::globalPadCorners(const ActsGeometryContext& ctx, const IdentifierHash& measHash) const {
210  const IdentifierHash lHash = layerHash(measHash);
211  unsigned int layIdx = static_cast<unsigned int>(lHash);
212  unsigned int gasGap = gasGapNumber(measHash);
213  globalCornerArray gPadCorners{make_array<Amg::Vector3D, 4>(Amg::Vector3D::Zero())};
214  if (chType(measHash) == ReadoutChannelType::Pad && gasGap < m_pars.padLayers.size()) {
215  localCornerArray lPadCorners = localPadCorners(measHash);
216  for (unsigned int corner = 0; corner < lPadCorners.size(); ++corner) {
217  gPadCorners[corner].block<2,1>(0,0) = std::move(lPadCorners[corner]);
218  gPadCorners[corner] = localToGlobalTrans(ctx, lHash) * gPadCorners[corner];
219  }
220  return gPadCorners;
221  }
222  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" The layer hash "<<layIdx
223  <<" is out of range. Maximum range "<<m_pars.padLayers.size());
224  return gPadCorners;
225 }
226 
227 Amg::Vector3D sTgcReadoutElement::chamberStripPos(const IdentifierHash& measHash) const {
228  const IdentifierHash lHash = layerHash(measHash);
229  unsigned int layIdx = static_cast<unsigned int>(lHash);
230  if (layIdx < m_pars.stripLayers.size()) {
231  return m_pars.stripLayers[layIdx].stripPosition(channelNumber(measHash));
232  }
233  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" The layer hash "<<layIdx
234  <<" is out of range. Maximum range "<<m_pars.stripLayers.size());
235  return Amg::Vector3D::Zero();
236 }
237 int sTgcReadoutElement::padNumber(const Amg::Vector2D& hitPos, const IdentifierHash& measHash) const {
238  int padEta = padDesign(measHash).channelNumber(hitPos).first;
239  int padPhi = padDesign(measHash).channelNumber(hitPos).second;
240  bool is_valid{true};
241  const Identifier padID = m_idHelper.padID(identify(), multilayer(), gasGapNumber(measHash) + 1, chType(measHash),
242  padEta, padPhi, is_valid);
243  int channel = m_idHelper.channel(padID);
244  return channel;
245 }
246 
247 Amg::Vector3D sTgcReadoutElement::leftStripEdge(const ActsGeometryContext& ctx, const IdentifierHash& measHash) const {
248  const IdentifierHash lHash = layerHash(measHash);
249  unsigned int gasGap = gasGapNumber(measHash);
250  unsigned int layIdx = static_cast<unsigned int>(lHash);
251 
252  if(chType(measHash) == ReadoutChannelType::Strip){
253  if(gasGap > m_pars.stripLayers.size()){
254  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" The layer hash "<<layIdx
255  <<" is out of range. Maximum range "<<m_pars.stripLayers.size());
256  return Amg::Vector3D::Zero();
257  }
258  Amg::Vector3D stripleftEdge{Amg::Vector3D::Zero()};
259  Amg::Vector2D localstripleftEdge{Amg::Vector2D::Zero()};
260  std::optional<Amg::Vector2D> stripleftEdgeOpt = stripDesign(measHash).leftEdge(channelNumber(measHash));
261  localstripleftEdge = std::move(*stripleftEdgeOpt);
262  stripleftEdge.block<2,1>(0,0) = std::move(localstripleftEdge);
263 
264  return localToGlobalTrans(ctx, lHash)*stripleftEdge;
265 
266  }else if(chType(measHash) == ReadoutChannelType::Wire){
267  if(gasGap > m_pars.wireGroupLayers.size()){
268  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" The layer hash "<<layIdx
269  <<" is out of range. Maximum range "<<m_pars.wireGroupLayers.size());
270  return Amg::Vector3D::Zero();
271 
272  }
273 
274  Amg::Vector3D wireleftEdge{Amg::Vector3D::Zero()};
275  Amg::Vector2D localwireleftEdge{Amg::Vector2D::Zero()};
276  std::optional<Amg::Vector2D> wireleftedgeOpt = wireDesign(measHash).leftEdge(channelNumber(measHash));
277  localwireleftEdge = std::move(*wireleftedgeOpt);
278  wireleftEdge.block<2,1>(0,0) = std::move(localwireleftEdge);
279 
280  return localToGlobalTrans(ctx, lHash)*wireleftEdge;
281 
282  }
283 
284  ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" The layer hash "<<layIdx
285  <<" is not valid Type "<< chType(measHash));
286  return Amg::Vector3D::Zero();
287 
288 }
289 
290 
291 Amg::Vector3D sTgcReadoutElement::rightStripEdge(const ActsGeometryContext& ctx, const IdentifierHash& measHash) const {
292  const IdentifierHash lHash = layerHash(measHash);
293  unsigned int gasGap = gasGapNumber(measHash);
294  unsigned int layIdx = static_cast<unsigned int>(lHash);
295 
296  if(chType(measHash) == ReadoutChannelType::Strip){
297  if(gasGap > m_pars.stripLayers.size()){
298  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" The layer hash "<<layIdx
299  <<" is out of range. Maximum range "<<m_pars.stripLayers.size());
300  return Amg::Vector3D::Zero();
301  }
302  Amg::Vector3D striprightEdge{Amg::Vector3D::Zero()};
303  Amg::Vector2D localstriprightEdge{Amg::Vector2D::Zero()};
304  std::optional<Amg::Vector2D> striprightEdgeOpt = stripDesign(measHash).rightEdge(channelNumber(measHash));
305  localstriprightEdge = std::move(*striprightEdgeOpt);
306  striprightEdge.block<2,1>(0,0) = std::move(localstriprightEdge);
307 
308  return localToGlobalTrans(ctx, lHash)*striprightEdge;
309 
310  }else if(chType(measHash) == ReadoutChannelType::Wire){
311  if(gasGap > m_pars.wireGroupLayers.size()){
312  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" The layer hash "<<layIdx
313  <<" is out of range. Maximum range "<<m_pars.wireGroupLayers.size());
314  return Amg::Vector3D::Zero();
315 
316  }
317 
318  Amg::Vector3D wirerightEdge{Amg::Vector3D::Zero()};
319  Amg::Vector2D localwirerightEdge{Amg::Vector2D::Zero()};
320  std::optional<Amg::Vector2D> wirerightedgeOpt = wireDesign(measHash).rightEdge(channelNumber(measHash));
321  localwirerightEdge = std::move(*wirerightedgeOpt);
322  wirerightEdge.block<2,1>(0,0) = std::move(localwirerightEdge);
323 
324  return localToGlobalTrans(ctx, lHash)*wirerightEdge;
325 
326  }
327 
328  ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" The layer hash "<<layIdx
329  <<" is not valid Type "<< chType(measHash));
330  return Amg::Vector3D::Zero();
331 
332 
333 }
334 
335 bool sTgcReadoutElement::isEtaZero(const IdentifierHash& measurementHash, const Amg::Vector2D& localPosition) const {
336  if(std::abs(m_idHelper.stationEta(identify())) != 1 ) return false; // if we are not in a Q1 ro element we do not have to check further
337  const WireGroupDesign& wireDes = wireDesign(measurementHash); // function is not checking for channel type so we just use its gas gap info
338 
339  double lpos = (chType(measurementHash) == ReadoutChannelType::Strip ? localPosition.x() : localPosition.y() );
340  if (lpos < 0.5 * gapHeight(measurementHash) - wireDes.wireCutout()) return true;
341  return false;
342 }
343 
344 
345 } // namespace MuonGMR4
MuonGMR4::sTgcReadoutElement::localChannelPosition
Amg::Vector2D localChannelPosition(const Identifier &measId) const
Returns the local pad/strip/wireGroup position.
MuonGMR4::sTgcReadoutElement::fromGapToChamOrigin
Amg::Transform3D fromGapToChamOrigin(const IdentifierHash &layerHash) const
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/sTgcReadoutElement.cxx:103
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
MuonGMR4::sTgcReadoutElement::multilayer
int multilayer() const
Returns the multilayer of the sTgcReadoutElement.
MuonGMR4::parameterBook
MmReadoutElement::parameterBook parameterBook
Definition: MmReadoutElement.cxx:22
MuonGMR4::sTgcReadoutElement::firstStripPitch
double firstStripPitch(const Identifier &measId) const
Gas Gaps.
dumpTgcDigiDeadChambers.gasGap
list gasGap
Definition: dumpTgcDigiDeadChambers.py:33
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
MuonGMR4::StripDesign
Definition: StripDesign.h:30
MuonGMR4::WireGroupDesign
Definition: WireGroupDesign.h:23
MuonGMR4::WireGroupDesign::wireCutout
double wireCutout() const
Extract the wireCutout for a wireGroup layer.
Definition: WireGroupDesign.cxx:59
MuonGMR4::sTgcReadoutElement::localCornerArray
std::array< Amg::Vector2D, 4 > localCornerArray
Returns an array of four 2D vectors representing corner positions of the pads.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h:214
MuonGMR4::sTgcReadoutElement::padEta
unsigned int padEta(const Identifier &measId) const
Returns the Eta index of the pad for the given pad identifier.
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
AthCheckMacros.h
MuonGMR4::StripDesign::leftEdge
CheckVector2D leftEdge(int stripNumb) const
Returns the left edge of the strip (Global numbering scheme)
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
MuonGMR4::sTgcReadoutElement::globalCornerArray
std::array< Amg::Vector3D, 4 > globalCornerArray
Returns an array of four 3D vectors representing corner positions of the pads.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h:218
MuonGMR4::sTgcReadoutElement::stripDesign
const StripDesign & stripDesign(const Identifier &measId) const
Retrieves the readoutElement Layer given the Identifier/Hash.
MuonGMR4::sTgcReadoutElement::defineArgs
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h:80
MuonGMR4::MuonReadoutElement
The MuonReadoutElement is an abstract class representing the geometry representing the muon detector.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonReadoutElement.h:38
deg
#define deg
Definition: SbPolyhedron.cxx:17
SurfaceBoundSet.h
MuonGMR4::sTgcReadoutElement::parameterBook::lHalfChamberLength
double lHalfChamberLength
Length of the chamber on the long side.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h:47
MuonGMR4::MuonReadoutElement::createGeoTransform
StatusCode createGeoTransform()
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx:36
MuonGMR4::sTgcReadoutElement::initElement
StatusCode initElement() override final
Element initialization.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/sTgcReadoutElement.cxx:33
MuonGMR4::sTgcReadoutElement::padNumber
unsigned int padNumber(const Identifier &measId) const
Returns the pad number in the conventional pad numbering scheme from the sequential channel number.
MuonGMR4::sTgcReadoutElement::measurementHash
IdentifierHash measurementHash(const Identifier &measId) const override final
Constructs the identifier hash from the full measurement Identifier.
MuonGMR4::PadDesign::channelNumber
std::pair< int, int > channelNumber(const Amg::Vector2D &hitPos) const
Function to retrieve the pad eta and phi given a local position coordinate.
MuonGMR4::globalCornerArray
std::array< Amg::Vector3D, 4 > globalCornerArray
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/sTgcReadoutElement.cxx:208
MuonGMR4::localCornerArray
std::array< Amg::Vector2D, 4 > localCornerArray
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/sTgcReadoutElement.cxx:207
sTgcReadoutElement.h
MuonGMR4::sTgcReadoutElement::wireDesign
const WireGroupDesign & wireDesign(const Identifier &measId) const
Retrieves the readoutElement Layer given the Identifier/Hash.
MuonGMR4::sTgcReadoutElement::createHash
static IdentifierHash createHash(const unsigned int gasGap, const unsigned int channelType, const unsigned int channel, const unsigned int wireInGrp=0)
Create a measurement hash from the Identifier fields.
MuonGMR4
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
Definition: MdtCalibInput.h:20
sTgcIdHelper::channel
int channel(const Identifier &id) const override
Definition: sTgcIdHelper.cxx:1027
MuonGMR4::sTgcReadoutElement::numWireGroups
unsigned int numWireGroups(unsigned int gasGap) const
Number of wire groups in the gas gap.
MuonGMR4::MuonReadoutElement::idHelperSvc
const Muon::IMuonIdHelperSvc * idHelperSvc() const
Returns the pointer to the muonIdHelperSvc.
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
MuonGMR4::sTgcReadoutElement::parameterBook::wireGroupLayers
std::vector< StripLayer > wireGroupLayers
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h:66
MuonGMR4::sTgcReadoutElement::chamberStripPos
Amg::Vector3D chamberStripPos(const IdentifierHash &measHash) const
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/sTgcReadoutElement.cxx:227
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
MuonGMR4::sTgcReadoutElement::getParameters
const parameterBook & getParameters() const
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/sTgcReadoutElement.cxx:31
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
MuonGMR4::sTgcReadoutElement::leftStripEdge
Amg::Vector3D leftStripEdge(const ActsGeometryContext &ctx, const IdentifierHash &measHash) const
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/sTgcReadoutElement.cxx:247
MuonGMR4::sTgcReadoutElement::chType
static unsigned int chType(const IdentifierHash &measHash)
Returns the channel type for a given identifierHash.
MuonGMR4::sTgcReadoutElement::gapHeight
double gapHeight(const Identifier &measId) const
Height of gas Gap.
MuonGMR4::MuonReadoutElement::center
Amg::Vector3D center(const ActsGeometryContext &ctx) const
Returns the detector center (Which is the same as the detector center of the first measurement layer)
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
ActsTrk::operator<<
MsgStream & operator<<(MsgStream &out, const ActsUtils::Stat &stat)
Definition: TrackToTruthAssociationAlg.cxx:25
MuonGMR4::sTgcReadoutElement::isEtaZero
bool isEtaZero(const IdentifierHash &measurementHash, const Amg::Vector2D &localPosition) const
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/sTgcReadoutElement.cxx:335
MuonGMR4::sTgcReadoutElement::parameterBook::halfChamberHeight
double halfChamberHeight
sTGC Chamber Details
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h:43
MuonGMR4::sTgcReadoutElement::m_pars
parameterBook m_pars
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h:292
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:27
MuonGMR4::sTgcReadoutElement::parameterBook::padLayers
std::vector< StripLayer > padLayers
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h:67
MuonGMR4::sTgcReadoutElement::parameterBook::layerBounds
ActsTrk::SurfaceBoundSetPtr< Acts::TrapezoidBounds > layerBounds
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h:74
MuonGMR4::StripDesign::center
CheckVector2D center(int stripNumb) const
Returns the bisector of the strip (Global numbering scheme)
MuonGMR4::sTgcReadoutElement::globalChannelPosition
Amg::Vector3D globalChannelPosition(const ActsGeometryContext &ctx, const Identifier &measId) const
Returns the global pad/strip/wireGroup position.
MuonGMR4::MuonReadoutElement::geoTransformHash
static IdentifierHash geoTransformHash()
Returns the hash that is associated with the surface cache holding the transformation that is placing...
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx:44
sTgcIdHelper::padID
Identifier padID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channelType, int padEta, int padPhi) const
Definition: sTgcIdHelper.cxx:939
MuonGMR4::sTgcReadoutElement::gasGapNumber
static unsigned int gasGapNumber(const IdentifierHash &measHash)
Returns the gasGap (0 to 3) for a given identifierHash.
MuonGMR4::sTgcReadoutElement::m_idHelper
const sTgcIdHelper & m_idHelper
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h:293
MuonGMR4::sTgcReadoutElement::wireGroupWidth
unsigned int wireGroupWidth(unsigned int gasGap) const
Number of wires in a normal wire group.
MuonGMR4::sTgcReadoutElement::rightStripEdge
Amg::Vector3D rightStripEdge(const ActsGeometryContext &ctx, const IdentifierHash &measHash) const
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/sTgcReadoutElement.cxx:291
MuonIdHelper::stationEta
int stationEta(const Identifier &id) const
Definition: MuonIdHelper.cxx:805
MuonGMR4::MuonReadoutElement::identify
Identifier identify() const override final
Return the athena identifier.
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonGMR4::sTgcReadoutElement::numWires
unsigned int numWires(unsigned int gasGap) const
Number of wires in the gas gap.
MuonGMR4::sTgcReadoutElement::padPhi
unsigned int padPhi(const Identifier &measId) const
Returns the Phi index of the pad for the given pad identifier.
MuonGMR4::sTgcReadoutElement::padDesign
const PadDesign & padDesign(const Identifier &measId) const
Retrieves the readoutElement Layer given the Identifier/Hash.
MuonGMR4::sTgcReadoutElement::m_gasGapPitch
double m_gasGapPitch
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h:295
MuonGMR4::sTgcReadoutElement::firstWireGroupWidth
unsigned int firstWireGroupWidth(unsigned int gasGap) const
Number of wires in the first wire group.
MuonGMR4::sTgcReadoutElement::stripWidth
double stripWidth(const Identifier &measId) const
Width of a strip.
MuonGMR4::MuonReadoutElement::planeSurfaceFactory
StatusCode planeSurfaceFactory(const IdentifierHash &hash, std::shared_ptr< Acts::PlanarBounds > pBounds)
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx:125
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
MuonGMR4::sTgcReadoutElement::globalPadCorners
globalCornerArray globalPadCorners(const ActsGeometryContext &ctx, const Identifier &measId) const
MuonGMR4::sTgcReadoutElement::localPadCorners
localCornerArray localPadCorners(const Identifier &measId) const
MuonGMR4::sTgcReadoutElement::numStrips
unsigned int numStrips(const Identifier &measId) const
Strips Number of strips in a chamber.
MuonGMR4::MuonReadoutElement::localToGlobalTrans
const Amg::Transform3D & localToGlobalTrans(const ActsGeometryContext &ctx) const
Returns the local to global transformation into the ATLAS coordinate system.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx:81
MuonGMR4::sTgcReadoutElement::parameterBook
Set of parameters to describe an sTGC chamber.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h:39
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MuonDetectorBuilderTool.cxx:54
MuonGMR4::sTgcReadoutElement::wirePitch
double wirePitch(const Identifier &measId) const
Wires Pitch of the wire.
MuonGMR4::StripDesign::rightEdge
CheckVector2D rightEdge(int stripNumb) const
Returns the right edge of the strip (Global numbering scheme)
MuonGMR4::PadDesign::stripPosition
Amg::Vector2D stripPosition(int stripNum) const override final
Override from stripDesign. This function will give the center of the pad by taking the sequential cha...
MuonGMR4::sTgcReadoutElement::lPadLength
double lPadLength(const Identifier &measId) const
Length of gas Gap on long side for wireGroup/Pads.
MuonGMR4::sTgcReadoutElement::layerHash
IdentifierHash layerHash(const Identifier &measId) const override final
Transforms the Identifier into a layer hash.
MuonGMR4::sTgcReadoutElement::channelNumber
static unsigned int channelNumber(const IdentifierHash &measHash)
Returns channel position for a given identifierHash.
mag
Scalar mag() const
mag method
Definition: AmgMatrixBasePlugin.h:26
python.CaloScaleNoiseConfig.args
args
Definition: CaloScaleNoiseConfig.py:80
MuonGMR4::sTgcReadoutElement::stripPitch
double stripPitch(const Identifier &measId) const
Pitch of a strip.
MuonGMR4::sTgcReadoutElement::parameterBook::stripLayers
std::vector< StripLayer > stripLayers
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h:65
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
MuonGMR4::sTgcReadoutElement::parameterBook::sHalfChamberLength
double sHalfChamberLength
Length of the chamber on the short side.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h:45
Identifier
Definition: IdentifierFieldParser.cxx:14