ATLAS Offline Software
Loading...
Searching...
No Matches
MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef MUONREADOUTGEOMETRYR4_STGCREADOUTELEMENT_H
5#define MUONREADOUTGEOMETRYR4_STGCREADOUTELEMENT_H
6
12#include <bit>
13
14#ifndef SIMULATIONBASE
15# include "Acts/Utilities/BoundFactory.hpp"
16#endif
17
18namespace MuonGMR4 {
19
21
22 public:
23
37
41
43 double halfChamberHeight{0.}; //Length
45 double sHalfChamberLength{0.}; //sWidth
47 double lHalfChamberLength{0.}; //lWidth
49 double halfChamberTck{0.}; //Tck
51 double sFrameWidth{0.};
53 double lFrameWidth{0.};
55 double gasTck{0.};
57 unsigned numLayers{0};
59 unsigned nChTypes{0};
61 double yCutout{0.};
63 std::vector<double> firstStripPitch{};
65 std::vector<StripLayer> stripLayers{};
67 std::vector<StripLayer> padLayers{};
68
69#ifndef SIMULATIONBASE
70 std::shared_ptr<Acts::SurfaceBoundFactory> layerBounds{};
71#endif
72
73 };
74
77
80
81 const parameterBook& getParameters() const;
86
87 StatusCode initElement() override final;
88
90 double chamberHeight() const; //Length
92 double sChamberLength() const; //sWidth
94 double lChamberLength() const; //lWidth
97
99 double thickness() const override final; //chamberTck
107 unsigned numLayers() const;
110
113
117
121 unsigned nChTypes() const;
122
124 unsigned numPadEta(const IdentifierHash& measHash) const;
126 unsigned numPadPhi(const IdentifierHash& measHash) const;
134 unsigned maxPadEta(const IdentifierHash& measHash) const;
138 std::pair<unsigned, unsigned> padEtaPhi(const IdentifierHash& measHash) const;
140 unsigned padEta(const IdentifierHash& measHash) const;
142 unsigned padPhi(const IdentifierHash& measHash) const;
146 using localCornerArray = std::array<Amg::Vector2D, 4>;
149 using globalCornerArray = std::array<Amg::Vector3D, 4>;
150 globalCornerArray globalPadCorners(const ActsTrk::GeometryContext& ctx, const IdentifierHash& measHash) const;
152 int padNumber(const Amg::Vector2D& hitPos, const IdentifierHash& measHash) const;
153
156
161
163 Amg::Vector3D globalChannelPosition(const ActsTrk::GeometryContext& ctx, const IdentifierHash& measHash) const;
169 // Returns the global left/right edge position of strip or wire
170 Amg::Vector3D leftStripEdge(const ActsTrk::GeometryContext& ctx, const IdentifierHash& measHash) const;
171 Amg::Vector3D rightStripEdge(const ActsTrk::GeometryContext& ctx, const IdentifierHash& measHash) const;
172
182
189
190 static IdentifierHash createHash(const unsigned gasGap,
191 const unsigned channelType,
192 const unsigned channel,
193 const unsigned wireInGrp = 0);
194 friend class ActsTrk::TransformCacheDetEle<sTgcReadoutElement>;
195
197
198 private:
200 static unsigned channelNumber(const IdentifierHash& measHash);
202 static unsigned chType(const IdentifierHash& measHash);
204 static unsigned gasGapNumber(const IdentifierHash& measHash);
207
210 const int m_multiLayer{m_idHelper.multilayer(identify())};
211 double m_gasGapPitch{-1.};
212};
213
214std::ostream& operator<<(std::ostream& ostr, const MuonGMR4::sTgcReadoutElement::parameterBook& pars);
215} // namespace MuonGMR4
216
217namespace ActsTrk{
218 template <> Amg::Transform3D
220 template <> Identifier
222}
223
225#endif
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
Amg::Transform3D fetchTransform(const DetectorAlignStore *store) const override final
Identifier identify() const override final
Returns the Identifier of the transform cache.
This is a "hash" representation of an Identifier.
Identifier identify() const override final
Return the athena identifier.
const Muon::IMuonIdHelperSvc * idHelperSvc() const
Returns the pointer to the muonIdHelperSvc.
The StripLayer interfaces the 2D description of the strip plane layout with the 3D description of the...
Definition StripLayer.h:19
unsigned numChannels(const IdentifierHash &measHash) const
Returns the number of strips / wires / pads in a given gasGap.
IdentifierHash measurementHash(const Identifier &measId) const override final
Constructs the identifier hash from the full measurement Identifier.
const PadDesign & padDesign(const IdentifierHash &measHash) const
Retrieves the readoutElement Layer given the Identifier/Hash.
Amg::Vector3D leftStripEdge(const ActsTrk::GeometryContext &ctx, const IdentifierHash &measHash) const
static unsigned gasGapNumber(const IdentifierHash &measHash)
Returns the gasGap (0 to 3) for a given identifierHash.
double padHeight(const IdentifierHash &measHash) const
Returns the height of all the pads that are not adjacent to the bottom edge of the trapezoid active a...
unsigned padEta(const IdentifierHash &measHash) const
Returns the Eta index of the pad for the given pad identifier.
double sFrameWidth() const
Width of the chamber frame on the short side.
double gasGapThickness() const
Returns the thickness of the gas gap.
double firstStripPitch(const IdentifierHash &measHash) const
Gas Gaps.
static unsigned chType(const IdentifierHash &measHash)
Returns the channel type for a given identifierHash.
int multilayer() const
Returns the multilayer of the sTgcReadoutElement.
unsigned nChTypes() const
Number of Channel Types.
localCornerArray localPadCorners(const IdentifierHash &measHash) const
std::array< Amg::Vector3D, 4 > globalCornerArray
Returns an array of four 3D vectors representing corner positions of the pads.
unsigned padNumberSeq(const IdentifierHash &measHash) const
Returns the pad number in the sequential numbering (1,2,3,...17,18,19,20,...)scheme from a pad identi...
double stripLength(const IdentifierHash &measHash) const
Length of each strip.
std::array< Amg::Vector2D, 4 > localCornerArray
Returns an array of four 2D vectors representing corner positions of the pads.
Identifier measurementId(const IdentifierHash &measHash) const override final
Converts the measurement hash back to the full Identifier.
double thickness() const override final
Thickness of the chamber.
double padPhiShift(const IdentifierHash &measHash) const
Returns the staggering shift of inner pad edges in the phi direction.
int padNumber(const Amg::Vector2D &hitPos, const IdentifierHash &measHash) const
Returns the pad Number given local position of hit and Identifier/Hash.
Amg::Vector3D rightStripEdge(const ActsTrk::GeometryContext &ctx, const IdentifierHash &measHash) const
double sChamberLength() const
Length of the chamber on the short side.
const StripDesign & stripDesign(const IdentifierHash &measHash) const
Retrieves the readoutElement Layer given the Identifier/Hash.
globalCornerArray globalPadCorners(const ActsTrk::GeometryContext &ctx, const IdentifierHash &measHash) const
ActsTrk::DetectorType detectorType() const override final
Overload from the ActsTrk::IDetectorElement.
bool isEtaZero(const IdentifierHash &measurementHash, const Amg::Vector2D &localPosition) const
unsigned numLayers() const
Returns the number of gas gap layers.
unsigned maxPadEta(const IdentifierHash &measHash) const
Returns the maximum number of pads that can be contained in a column of a pad. Used to match the pad ...
double lFrameWidth() const
Width of the chamber frame on the long side.
double anglePadPhi(const IdentifierHash &measHash) const
Returns the angular pitch of the pads in the phi direction.
IdentifierHash layerHash(const Identifier &measId) const override final
Transforms the Identifier into a layer hash.
unsigned numPadEta(const IdentifierHash &measHash) const
Returns the number of pads in the eta direction in the given layer.
unsigned padPhi(const IdentifierHash &measHash) const
Returns the Phi index of the pad for the given pad identifier.
double beamlineRadius(const IdentifierHash &measHash) const
Returns the distance between the gasGap center and the beamline.
double chamberHeight() const
Height of the chamber.
ReadoutChannelType
ReadoutChannelType to distinguish the available readout channels Pad - pad readout channel Strip - et...
Amg::Vector3D localPosition(const IdentifierHash &measHash) const
Returns the local position in the local gasGap frame.
double lChamberLength() const
Length of the chamber on the long side.
static unsigned channelNumber(const IdentifierHash &measHash)
Returns channel position for a given identifierHash.
Amg::Transform3D fromGapToChamOrigin(const IdentifierHash &layerHash) const
Returns the transform to go from the gasGap -> chamber origin.
Amg::Vector3D globalChannelPosition(const ActsTrk::GeometryContext &ctx, const IdentifierHash &measHash) const
Returns the global pad/strip/wireGroup position.
unsigned numPadPhi(const IdentifierHash &measHash) const
Returns the number of pads in the Phi direction in the given gasGap layer.
std::pair< unsigned, unsigned > padEtaPhi(const IdentifierHash &measHash) const
Returns a pair of Eta and Phi index for the given pad identifier.
Amg::Vector2D localChannelPosition(const IdentifierHash &measHash) const
Returns the local position of the measurement in the repsective frame.
const WireGroupDesign & wireDesign(const IdentifierHash &measHash) const
Retrieves the readoutElement Layer given the Identifier/Hash.
static IdentifierHash createHash(const unsigned gasGap, const unsigned channelType, const unsigned channel, const unsigned wireInGrp=0)
Create a measurement hash from the Identifier fields.
double gasGapPitch() const
Distance between 2 gas gaps.
const StripLayer & stripLayer(const IdentifierHash &measId) const
virtual const sTgcIdHelper & stgcIdHelper() const =0
access to TgcIdHelper
STL class.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
DetectorType
Simple enum to Identify the Type of the ACTS sub detector.
@ sTgc
Micromegas (NSW)
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Affine3d Transform3D
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
std::ostream & operator<<(std::ostream &ostr, const Chamber::defineArgs &args)
Definition Chamber.cxx:14
STL namespace.
std::vector< double > firstStripPitch
firstStripPitch needed for the globalChannelPosition function
#define private