ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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  return stripLayer(measHash).toOrigin();
105 }
106 
107 Amg::Vector2D sTgcReadoutElement::localChannelPosition(const IdentifierHash& measHash) const {
108  if (chType(measHash) == ReadoutChannelType::Strip) {
109  Amg::Vector2D stripCenter{Amg::Vector2D::Zero()};
110  const StripDesign& design{stripDesign(measHash)};
111  const int ch = channelNumber(measHash);
112 
113  std::optional<Amg::Vector2D> stripCenterOpt = design.center(ch);
114  if (!stripCenterOpt) {
115  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" The strip " << ch << " doesn't intersect with the edges of the trapezoid.");
116  return stripCenter;
117  }
118  ATH_MSG_VERBOSE("Fetch local strip position "<<idHelperSvc()->toString(measurementId(measHash))<<" "
119  <<" "<<Amg::toString(*stripCenterOpt)<<" "<<design);
120  stripCenter = std::move(*stripCenterOpt);
121  if (ch == 1 && firstStripPitch(measHash) < 0.75 * design.stripPitch()) {
122  stripCenter.x() += 0.25 * design.stripWidth();
123  }
124  if (ch == design.numStrips() && firstStripPitch(measHash) > 0.75 * design.stripPitch()) {
125  stripCenter.x() -= 0.25 * design.stripWidth();
126  }
127  return stripCenter;
128  } else if (chType(measHash) == ReadoutChannelType::Wire) {
129  Amg::Vector2D wireGroupCenter{Amg::Vector2D::Zero()};
130  const WireGroupDesign& design{wireDesign(measHash)};
131  const int ch = channelNumber(measHash);
132  std::optional<Amg::Vector2D> wireGroupCenterOpt = design.center(ch);
133  if (!wireGroupCenterOpt) {
134  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" The wireGroup" << ch << "doesn't intersect with the edges of the trapezoid.");
135  return wireGroupCenter;
136  }
137  wireGroupCenter = std::move(*wireGroupCenterOpt);
138  ATH_MSG_VERBOSE("Fetch local wire position "<<idHelperSvc()->toString(measurementId(measHash))<<" "
139  <<" "<<Amg::toString(wireGroupCenter)<<" "<<design);
140  if (ch == 1) {
141  ATH_MSG_DEBUG("The first wiregroup width is " <<design.numWiresInGroup(ch) << " firstWirePos: " << design.firstStripPos());
142  ATH_MSG_DEBUG("The last wire pos is: " << wireGroupCenter.x() + (0.5 * (design.numWiresInGroup(ch) + 1) - 1) * design.stripPitch() );
144  wireGroupCenter.x() = wireGroupCenter.x() + (0.5 * (design.numWiresInGroup(ch) + 1) - 1) * design.stripPitch();
147  wireGroupCenter.x() = 0.5 * (wireGroupCenter.x() - design.longHalfHeight());
148  } else if (ch == design.numStrips()) {
149  ATH_MSG_VERBOSE("The actual center of the last wire group is: " << wireGroupCenter.x());
151  wireGroupCenter.x() = wireGroupCenter.x() - 0.5 * (design.numWiresInGroup(ch) + 1) * design.stripPitch();
152  ATH_MSG_VERBOSE("The last wire of the last second group is at: " << wireGroupCenter.x());
155  wireGroupCenter.x() = 0.5 * (wireGroupCenter.x() + design.longHalfHeight());
156  }
159  return wireGroupCenter;
160  }
161  else if (chType(measHash) == ReadoutChannelType::Pad) {
162  Amg::Vector2D padCenter{Amg::Vector2D::Zero()};
163  std::optional<Amg::Vector2D> padCenterOpt = padDesign(measHash).stripPosition(channelNumber(measHash));
164  if (!padCenterOpt) {
165  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" The pad" << channelNumber(measHash) << "doesn't is not a valid pad number.");
166  return padCenter;
167  }
168  padCenter = std::move(*padCenterOpt);
169  return padCenter;
170  }
171  else {
172  ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<"Invalid channel type: " << chType(measHash));
173  return Amg::Vector2D::Zero();
174  }
175 }
176 
177 Amg::Vector3D sTgcReadoutElement::globalChannelPosition(const ActsGeometryContext& ctx, const IdentifierHash& measHash) const {
178  const IdentifierHash lHash = layerHash(measHash);
179  unsigned int layIdx = static_cast<unsigned int>(lHash);
180  unsigned int gasGap = gasGapNumber(measHash);
181  if((chType(measHash) < ReadoutChannelType::Pad || chType(measHash) > ReadoutChannelType::Wire) && gasGap < m_pars.padLayers.size()) {
182  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" The channel type "<<chType(measHash)
183  <<"with the layer hash "<<layIdx<<" is invalid. Maximum range "<<m_pars.stripLayers.size());
184  return Amg::Vector3D::Zero();
185  }
186  Amg::Vector3D channelPos{Amg::Vector3D::Zero()};
187  Amg::Vector2D localChannel = localChannelPosition(measHash);
188  channelPos.block<2,1>(0,0) = std::move(localChannel);
189  return localToGlobalTrans(ctx, lHash) * channelPos;
190 }
191 
192 using localCornerArray = std::array<Amg::Vector2D, 4>;
193 using globalCornerArray = std::array<Amg::Vector3D, 4>;
194 globalCornerArray sTgcReadoutElement::globalPadCorners(const ActsGeometryContext& ctx, const IdentifierHash& measHash) const {
195  const IdentifierHash lHash = layerHash(measHash);
196  unsigned int layIdx = static_cast<unsigned int>(lHash);
197  unsigned int gasGap = gasGapNumber(measHash);
198  globalCornerArray gPadCorners{make_array<Amg::Vector3D, 4>(Amg::Vector3D::Zero())};
199  if (chType(measHash) == ReadoutChannelType::Pad && gasGap < m_pars.padLayers.size()) {
200  localCornerArray lPadCorners = localPadCorners(measHash);
201  for (unsigned int corner = 0; corner < lPadCorners.size(); ++corner) {
202  gPadCorners[corner].block<2,1>(0,0) = std::move(lPadCorners[corner]);
203  gPadCorners[corner] = localToGlobalTrans(ctx, lHash) * gPadCorners[corner];
204  }
205  return gPadCorners;
206  }
207  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" The layer hash "<<layIdx
208  <<" is out of range. Maximum range "<<m_pars.padLayers.size());
209  return gPadCorners;
210 }
211 
212 Amg::Vector3D sTgcReadoutElement::chamberStripPos(const IdentifierHash& measHash) const {
213  const IdentifierHash lHash = layerHash(measHash);
214  unsigned int layIdx = static_cast<unsigned int>(lHash);
215  if (layIdx < m_pars.stripLayers.size()) {
216  return m_pars.stripLayers[layIdx].stripPosition(channelNumber(measHash));
217  }
218  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" The layer hash "<<layIdx
219  <<" is out of range. Maximum range "<<m_pars.stripLayers.size());
220  return Amg::Vector3D::Zero();
221 }
222 int sTgcReadoutElement::padNumber(const Amg::Vector2D& hitPos, const IdentifierHash& measHash) const {
223  int padEta = padDesign(measHash).channelNumber(hitPos).first;
224  int padPhi = padDesign(measHash).channelNumber(hitPos).second;
225  bool is_valid{true};
226  const Identifier padID = m_idHelper.padID(identify(), multilayer(), gasGapNumber(measHash) + 1, chType(measHash),
227  padEta, padPhi, is_valid);
228  int channel = m_idHelper.channel(padID);
229  return channel;
230 }
231 
232 Amg::Vector3D sTgcReadoutElement::leftStripEdge(const ActsGeometryContext& ctx, const IdentifierHash& measHash) const {
233  const IdentifierHash lHash = layerHash(measHash);
234  unsigned int gasGap = gasGapNumber(measHash);
235  unsigned int layIdx = static_cast<unsigned int>(lHash);
236 
237  if(chType(measHash) == ReadoutChannelType::Strip){
238  if(gasGap > m_pars.stripLayers.size()){
239  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" The layer hash "<<layIdx
240  <<" is out of range. Maximum range "<<m_pars.stripLayers.size());
241  return Amg::Vector3D::Zero();
242  }
243  Amg::Vector3D stripleftEdge{Amg::Vector3D::Zero()};
244  Amg::Vector2D localstripleftEdge{Amg::Vector2D::Zero()};
245  std::optional<Amg::Vector2D> stripleftEdgeOpt = stripDesign(measHash).leftEdge(channelNumber(measHash));
246  localstripleftEdge = std::move(*stripleftEdgeOpt);
247  stripleftEdge.block<2,1>(0,0) = std::move(localstripleftEdge);
248 
249  return localToGlobalTrans(ctx, lHash)*stripleftEdge;
250 
251  }else if(chType(measHash) == ReadoutChannelType::Wire){
252  if(gasGap > m_pars.wireGroupLayers.size()){
253  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" The layer hash "<<layIdx
254  <<" is out of range. Maximum range "<<m_pars.wireGroupLayers.size());
255  return Amg::Vector3D::Zero();
256 
257  }
258 
259  Amg::Vector3D wireleftEdge{Amg::Vector3D::Zero()};
260  Amg::Vector2D localwireleftEdge{Amg::Vector2D::Zero()};
261  std::optional<Amg::Vector2D> wireleftedgeOpt = wireDesign(measHash).leftEdge(channelNumber(measHash));
262  localwireleftEdge = std::move(*wireleftedgeOpt);
263  wireleftEdge.block<2,1>(0,0) = std::move(localwireleftEdge);
264 
265  return localToGlobalTrans(ctx, lHash)*wireleftEdge;
266 
267  }
268 
269  ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" The layer hash "<<layIdx
270  <<" is not valid Type "<< chType(measHash));
271  return Amg::Vector3D::Zero();
272 
273 }
274 
275 
276 Amg::Vector3D sTgcReadoutElement::rightStripEdge(const ActsGeometryContext& ctx, const IdentifierHash& measHash) const {
277  const IdentifierHash lHash = layerHash(measHash);
278  unsigned int gasGap = gasGapNumber(measHash);
279  unsigned int layIdx = static_cast<unsigned int>(lHash);
280 
281  if(chType(measHash) == ReadoutChannelType::Strip){
282  if(gasGap > m_pars.stripLayers.size()){
283  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" The layer hash "<<layIdx
284  <<" is out of range. Maximum range "<<m_pars.stripLayers.size());
285  return Amg::Vector3D::Zero();
286  }
287  Amg::Vector3D striprightEdge{Amg::Vector3D::Zero()};
288  Amg::Vector2D localstriprightEdge{Amg::Vector2D::Zero()};
289  std::optional<Amg::Vector2D> striprightEdgeOpt = stripDesign(measHash).rightEdge(channelNumber(measHash));
290  localstriprightEdge = std::move(*striprightEdgeOpt);
291  striprightEdge.block<2,1>(0,0) = std::move(localstriprightEdge);
292 
293  return localToGlobalTrans(ctx, lHash)*striprightEdge;
294 
295  }else if(chType(measHash) == ReadoutChannelType::Wire){
296  if(gasGap > m_pars.wireGroupLayers.size()){
297  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" The layer hash "<<layIdx
298  <<" is out of range. Maximum range "<<m_pars.wireGroupLayers.size());
299  return Amg::Vector3D::Zero();
300 
301  }
302 
303  Amg::Vector3D wirerightEdge{Amg::Vector3D::Zero()};
304  Amg::Vector2D localwirerightEdge{Amg::Vector2D::Zero()};
305  std::optional<Amg::Vector2D> wirerightedgeOpt = wireDesign(measHash).rightEdge(channelNumber(measHash));
306  localwirerightEdge = std::move(*wirerightedgeOpt);
307  wirerightEdge.block<2,1>(0,0) = std::move(localwirerightEdge);
308 
309  return localToGlobalTrans(ctx, lHash)*wirerightEdge;
310 
311  }
312 
313  ATH_MSG_FATAL(__FILE__<<":"<<__LINE__<<" The layer hash "<<layIdx
314  <<" is not valid Type "<< chType(measHash));
315  return Amg::Vector3D::Zero();
316 
317 
318 }
319 
320 bool sTgcReadoutElement::isEtaZero(const IdentifierHash& measurementHash, const Amg::Vector2D& localPosition) const {
321  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
322  const WireGroupDesign& design = wireDesign(measurementHash); // function is not checking for channel type so we just use its gas gap info
323 
324  double lpos = (chType(measurementHash) == ReadoutChannelType::Strip ? localPosition.x() : localPosition.y() );
325  if (lpos < design.halfWidth() - design.wireCutout()) return true;
326  return false;
327 }
328 
329 
330 } // 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
sendEI_SPB.ch
ch
Definition: sendEI_SPB.py:35
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:168
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
python.CaloAddPedShiftConfig.args
args
Definition: CaloAddPedShiftConfig.py:45
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:172
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:81
MuonGMR4::StripLayer::toOrigin
const Amg::Transform3D & toOrigin() const
Returns the transformation to go from the strip layer center to the origin of the Strip chamber.
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:48
MuonGMR4::MuonReadoutElement::createGeoTransform
StatusCode createGeoTransform()
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx:36
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
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:193
MuonGMR4::localCornerArray
std::array< Amg::Vector2D, 4 > localCornerArray
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/sTgcReadoutElement.cxx:192
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.
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
MuonGMR4
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
Definition: MdtCalibInput.h:19
sTgcIdHelper::channel
int channel(const Identifier &id) const override
Definition: sTgcIdHelper.cxx:1027
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:67
MuonGMR4::sTgcReadoutElement::chamberStripPos
Amg::Vector3D chamberStripPos(const IdentifierHash &measHash) const
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/sTgcReadoutElement.cxx:212
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:232
MuonGMR4::sTgcReadoutElement::chType
static unsigned int chType(const IdentifierHash &measHash)
Returns the channel type for a given identifierHash.
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:320
MuonGMR4::sTgcReadoutElement::parameterBook::halfChamberHeight
double halfChamberHeight
sTGC Chamber Details
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h:44
MuonGMR4::sTgcReadoutElement::measurementId
Identifier measurementId(const IdentifierHash &measHash) const override final
Converts the measurement hash back to the full Identifier.
MuonGMR4::sTgcReadoutElement::m_pars
parameterBook m_pars
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h:239
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:68
MuonGMR4::sTgcReadoutElement::parameterBook::layerBounds
ActsTrk::SurfaceBoundSetPtr< Acts::TrapezoidBounds > layerBounds
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h:75
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:240
MuonGMR4::sTgcReadoutElement::rightStripEdge
Amg::Vector3D rightStripEdge(const ActsGeometryContext &ctx, const IdentifierHash &measHash) const
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/sTgcReadoutElement.cxx:276
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::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:242
MuonGMR4::StripDesign::halfWidth
double halfWidth() const
Returns the half height of the strip panel.
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::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:40
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MuonDetectorBuilderTool.cxx:55
MuonGMR4::sTgcReadoutElement::stripLayer
const StripLayer & stripLayer(const Identifier &measId) const
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::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
MuonGMR4::sTgcReadoutElement::parameterBook::stripLayers
std::vector< StripLayer > stripLayers
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h:66
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:46
Identifier
Definition: IdentifierFieldParser.cxx:14