ATLAS Offline Software
Loading...
Searching...
No Matches
StripLayer.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_STRIPLAYER_H
5#define MUONREADOUTGEOMETRYR4_STRIPLAYER_H
6
10
11#include <GeoModelKernel/GeoTransform.h>
12#include <GaudiKernel/SystemOfUnits.h>
13
14namespace MuonGMR4{
19 class StripLayer {
20 public:
21 using TransformPtr = GeoIntrusivePtr<const GeoTransform>;
29 StripLayer(TransformPtr layerTransform,
31 const IdentifierHash hash);
38 StripLayer(TransformPtr layerTransform,
39 StripDesignPtr etaDesign,
40 StripDesignPtr phiDesign,
41 const IdentifierHash hash);
42
45 const Amg::Transform3D& toOrigin() const;
49 const StripDesign& design(bool phiView = false) const;
51 const IdentifierHash hash() const;
56 Amg::Vector3D localStripPosition(unsigned int stripum,
57 bool phiView = false) const;
63 Amg::Vector3D localStripLeftEdge(unsigned int stripNum,
64 bool phiView = false) const;
70 Amg::Vector3D localStripRightEdge(unsigned int stripNum,
71 bool phiView = false) const;
73 bool operator<(const StripLayer& other) const;
75 bool hasPhiDesign() const;
81 Amg::Vector3D to3D(CheckVector2D&& vec, const bool phiView) const;
86 Amg::Vector2D to2D(const Amg::Vector3D& vec, const bool phiView) const;
88 void flipPhiRotation();
89 private:
98 double m_phiRot{90.*Gaudi::Units::deg};
99 };
103 bool operator()( const StripLayerPtr&a, const StripLayerPtr& b) const{
104 return (*a) < (*b);
105 }
106 };
107 std::ostream& operator<<(std::ostream& ostr, const StripLayer& lay);
108}
109
111#endif
std::vector< size_t > vec
static Double_t a
The TransientConstSharedPtr allows non-const access if the pointer itself is non-const but in the con...
This is a "hash" representation of an Identifier.
std::optional< Amg::Vector2D > CheckVector2D
Definition StripDesign.h:82
IdentifierHash m_hash
Hash of the strip layer.
Definition StripLayer.h:97
const StripDesign & design(bool phiView=false) const
Returns the underlying strip design.
bool hasPhiDesign() const
Returns whether the strip layer also describes strips in the phi direction.
Amg::Vector3D localStripRightEdge(unsigned int stripNum, bool phiView=false) const
Returns the position of the right strip edge at (negative y in the strip design description) in the l...
StripDesignPtr m_phiDesign
Pointer to the phi strip design.
Definition StripLayer.h:95
Amg::Vector3D localStripPosition(unsigned int stripum, bool phiView=false) const
Returns the position of the strip centre expressed in the frame of the local readout plane.
GeoIntrusivePtr< const GeoTransform > TransformPtr
Definition StripLayer.h:21
const IdentifierHash hash() const
Returns the hash of the strip layer.
Amg::Vector2D to2D(const Amg::Vector3D &vec, const bool phiView) const
Transforms a 3D vector from the strip design into a 2D vector.
bool operator<(const StripLayer &other) const
Comparison operator to recycle equivalent StripLayers for multiple readout elements.
Amg::Vector3D to3D(CheckVector2D &&vec, const bool phiView) const
Transforms the 2D vector from the strip design into a 3D vector If phi view is switched on,...
const Amg::Transform3D & toOrigin() const
Returns the transformation to go from the strip layer center to the origin of the Strip chamber.
Amg::Vector3D localStripLeftEdge(unsigned int stripNum, bool phiView=false) const
Returns the position of the strip edge at (positive y in the strip design description) in the local c...
void flipPhiRotation()
Flips the phi rotation from 90 -> -90 degrees.
StripDesign::CheckVector2D CheckVector2D
Definition StripLayer.h:76
StripLayer(TransformPtr layerTransform, StripDesignPtr design, const IdentifierHash hash)
Standard constructor taking the transform to decribe a strip layer, a pointer to the eta strip design...
TransformPtr m_transform
Pointer to the GeoModelTransform.
Definition StripLayer.h:91
StripDesignPtr m_etaDesign
Pointer to the eta strip design.
Definition StripLayer.h:93
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
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< StripDesign > StripDesignPtr
Definition StripDesign.h:29
GeoModel::TransientConstSharedPtr< StripLayer > StripLayerPtr
Definition StripLayer.h:100
Helper struct to share strip layer instances across the readout elements.
Definition StripLayer.h:102
bool operator()(const StripLayerPtr &a, const StripLayerPtr &b) const
Definition StripLayer.h:103