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 int numLayers{0};
59 unsigned int nChTypes{0};
61 double yCutout{0.};
63 std::vector<double> firstStripPitch{};
64
65 std::vector<StripLayer> stripLayers{};
66 std::vector<StripLayer> wireGroupLayers{};
67 std::vector<StripLayer> padLayers{};
68
72
73#ifndef SIMULATIONBASE
74 std::shared_ptr<Acts::SurfaceBoundFactory> layerBounds{};
75#endif
76
77 };
78
81
84
85 const parameterBook& getParameters() const;
90
91 StatusCode initElement() override final;
92
94 double chamberHeight() const; //Length
96 double sChamberLength() const; //sWidth
98 double lChamberLength() const; //lWidth
101
103 double thickness() const override final; //chamberTck
111 unsigned int numLayers() const;
114
118
119
122 unsigned int numChannels(const Identifier& measId) const;
125 unsigned int numChannels(const IdentifierHash& measHash) const;
126
131 unsigned int nChTypes() const;
132
134 unsigned int numPadEta(const Identifier& measId) const;
135 unsigned int numPadEta(const IdentifierHash& measHash) const;
137 unsigned int numPadPhi(const Identifier& measId) const;
138 unsigned int numPadPhi(const IdentifierHash& measHash) const;
149 unsigned int maxPadEta(const Identifier& measId) const;
150 unsigned int maxPadEta(const IdentifierHash& measHash) const;
152 unsigned int padNumberSeq(const Identifier& measId) const;
153 unsigned int padNumberSeq(const IdentifierHash& measHash) const;
158 unsigned int padEta(const Identifier& measId) const;
159 unsigned int padEta(const IdentifierHash& measHash) const;
161 unsigned int padPhi(const Identifier& measId) const;
162 unsigned int padPhi(const IdentifierHash& measHash) const;
167 using localCornerArray = std::array<Amg::Vector2D, 4>;
171 using globalCornerArray = std::array<Amg::Vector3D, 4>;
173 globalCornerArray globalPadCorners(const ActsTrk::GeometryContext& ctx, const IdentifierHash& measHash) const;
175 int padNumber(const Amg::Vector2D& hitPos, const Identifier& measId) const;
176 int padNumber(const Amg::Vector2D& hitPos, const IdentifierHash& measHash) const;
177
181
188
191 Amg::Vector3D globalChannelPosition(const ActsTrk::GeometryContext& ctx, const IdentifierHash& measHash) const;
195
196 // Returns the global left/right edge position of strip or wire
197 Amg::Vector3D leftStripEdge(const ActsTrk::GeometryContext& ctx, const IdentifierHash& measHash) const;
198 Amg::Vector3D rightStripEdge(const ActsTrk::GeometryContext& ctx, const IdentifierHash& measHash) const;
199
209
212
219
220 static IdentifierHash createHash(const unsigned int gasGap,
221 const unsigned int channelType,
222 const unsigned int channel,
223 const unsigned int wireInGrp = 0);
224 friend class ActsTrk::TransformCacheDetEle<sTgcReadoutElement>;
225
226 bool isEtaZero(const IdentifierHash& measurementHash, const Amg::Vector2D& localPosition) const;
227
228 private:
230 static unsigned int channelNumber(const IdentifierHash& measHash);
232 static unsigned int chType(const IdentifierHash& measHash);
234 static unsigned int gasGapNumber(const IdentifierHash& measHash);
237
240 const int m_multiLayer{m_idHelper.multilayer(identify())};
241 double m_gasGapPitch{-1.};
242
244 const unsigned int m_hashShiftChType = 2*std::popcount(static_cast<unsigned int>(numLayers()));
245};
246
247std::ostream& operator<<(std::ostream& ostr, const MuonGMR4::sTgcReadoutElement::parameterBook& pars);
248} // namespace MuonGMR4
249
250namespace ActsTrk{
251 template <> Amg::Transform3D
253 template <> Identifier
255}
256
258#endif
Eigen::Affine3d Transform3D
unsigned int uint
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
Amg::Vector2D localChannelPosition(const Identifier &measId) const
Returns the local pad/strip/wireGroup position.
Amg::Vector3D globalChannelPosition(const ActsTrk::GeometryContext &ctx, const Identifier &measId) const
Returns the global pad/strip/wireGroup position.
IdentifierHash measurementHash(const Identifier &measId) const override final
Constructs the identifier hash from the full measurement Identifier.
localCornerArray localPadCorners(const Identifier &measId) const
Amg::Vector3D leftStripEdge(const ActsTrk::GeometryContext &ctx, const IdentifierHash &measHash) const
const StripLayer & stripLayer(const Identifier &measId) const
const WireGroupDesign & wireDesign(const Identifier &measId) const
Retrieves the readoutElement Layer given the Identifier/Hash.
double firstStripPitch(const Identifier &measId) const
Gas Gaps.
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.
double stripLength(const Identifier &measId) const
Length of each strip.
const PadDesign & padDesign(const Identifier &measId) const
Retrieves the readoutElement Layer given the Identifier/Hash.
double sFrameWidth() const
Width of the chamber frame on the short side.
globalCornerArray globalPadCorners(const ActsTrk::GeometryContext &ctx, const Identifier &measId) const
double gasGapThickness() const
Returns the thickness of the gas gap.
unsigned int padPhi(const Identifier &measId) const
Returns the Phi index of the pad for the given pad identifier.
std::pair< uint, uint > padEtaPhi(const Identifier &measId) const
Returns a pair of Eta and Phi index for the given pad identifier.
int multilayer() const
Returns the multilayer of the sTgcReadoutElement.
static unsigned int gasGapNumber(const IdentifierHash &measHash)
Returns the gasGap (0 to 3) for a given identifierHash.
std::array< Amg::Vector3D, 4 > globalCornerArray
Returns an array of four 3D vectors representing corner positions of the pads.
std::array< Amg::Vector2D, 4 > localCornerArray
Returns an array of four 2D vectors representing corner positions of the pads.
static unsigned int channelNumber(const IdentifierHash &measHash)
Returns channel position for a given identifierHash.
Identifier measurementId(const IdentifierHash &measHash) const override final
Converts the measurement hash back to the full Identifier.
const StripDesign & stripDesign(const Identifier &measId) const
Retrieves the readoutElement Layer given the Identifier/Hash.
unsigned int maxPadEta(const Identifier &measId) const
Returns the maximum number of pads that can be contained in a column of a pad. Used to match the pad ...
double thickness() const override final
Thickness of the chamber.
unsigned int numPadPhi(const Identifier &measId) const
Returns the number of pads in the Phi direction in the given gasGap layer.
unsigned int numPadEta(const Identifier &measId) const
Returns the number of pads in the eta direction in the given layer.
Amg::Vector3D rightStripEdge(const ActsTrk::GeometryContext &ctx, const IdentifierHash &measHash) const
double sChamberLength() const
Length of the chamber on the short side.
unsigned int nChTypes() const
Number of Channel Types.
static unsigned int chType(const IdentifierHash &measHash)
Returns the channel type for a given identifierHash.
ActsTrk::DetectorType detectorType() const override final
Overload from the ActsTrk::IDetectorElement.
unsigned int numLayers() const
Returns the number of gas gap layers.
bool isEtaZero(const IdentifierHash &measurementHash, const Amg::Vector2D &localPosition) const
double padPhiShift(const Identifier &measId) const
Returns the staggering shift of inner pad edges in the phi direction.
double lFrameWidth() const
Width of the chamber frame on the long side.
int padNumber(const Amg::Vector2D &hitPos, const Identifier &measId) const
Returns the pad Number given local position of hit and Identifier/Hash.
IdentifierHash layerHash(const Identifier &measId) const override final
Transforms the Identifier into a layer hash.
const unsigned int m_hashShiftChType
Auxillary variables to translate the Identifier to a measurement hash and back.
unsigned int padEta(const Identifier &measId) const
Returns the Eta index of the pad for the given pad identifier.
double chamberHeight() const
Height of the chamber.
ReadoutChannelType
ReadoutChannelType to distinguish the available readout channels Pad - pad readout channel Strip - et...
double padHeight(const Identifier &measId) const
Returns the height of all the pads that are not adjacent to the bottom edge of the trapezoid active a...
double lChamberLength() const
Length of the chamber on the long side.
double anglePadPhi(const Identifier &measId) const
Returns the angular pitch of the pads in the phi direction.
unsigned int numChannels(const Identifier &measId) const
Returns the number of strips / wires / pads in a given gasGap.
Amg::Transform3D fromGapToChamOrigin(const IdentifierHash &layerHash) const
double beamlineRadius(const Identifier &measId) const
Returns the distance between the gasGap center and the beamline.
unsigned int padNumberSeq(const Identifier &measId) const
Returns the pad number in the sequential numbering (1,2,3,...17,18,19,20,...)scheme from a pad identi...
double gasGapPitch() const
Distance between 2 gas gaps.
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
GeoModel::TransientConstSharedPtr< WireGroupDesign > WireDesignPtr
GeoModel::TransientConstSharedPtr< StripDesign > StripDesignPtr
Definition StripDesign.h:29
GeoModel::TransientConstSharedPtr< PadDesign > PadDesignPtr
Definition PadDesign.h:22
STL namespace.
#define private