ATLAS Offline Software
MdtTubeLayer.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef MUONREADOUTGEOMETRYR4_MDTTUBELAYER_H
5 #define MUONREADOUTGEOMETRYR4_MDTTUBELAYER_H
6 
8 #include <GeoModelKernel/GeoVPhysVol.h>
9 #include <GeoModelKernel/GeoTransform.h>
10 #include <GeoModelKernel/GeoVolumeCursor.h>
12 
13 #include <set>
14 namespace MuonGMR4{
16  class MdtTubeLayer;
20  bool operator()(const MdtTubeLayer& a, const MdtTubeLayer& b) const;
21  bool operator()(const MdtTubeLayerPtr&a, const MdtTubeLayerPtr& b) const;
22  };
23  using MdtTubeLayerSet = std::set<MdtTubeLayerPtr, MdtTubeLayerSorter>;
24 
28  class MdtTubeLayer{
32  public:
33 
36  struct CutTubes {
38  unsigned int firstTube{0};
40  unsigned int lastTube{0};
42  double unCutHalfLength{0.};
44  bool operator<(const CutTubes& other) const {
45  return lastTube <= other.firstTube;
46  }
47  };
48  using CutTubeSet = std::set<CutTubes, std::less<>>;
49 
53  unsigned int firstTube{0};
55  unsigned int lastTube{0};
57  PVConstLink tubeVol{};
61  bool operator<(const TubePositioner& other) const {
62  return lastTube < other.firstTube;
63  }
64  };
65  using TubePositionerSet = std::set<TubePositioner, std::less<>>;
66 
73  MdtTubeLayer(const PVConstLink layer,
74  const GeoIntrusivePtr<const GeoTransform> toLayTrf,
75  const CutTubeSet& cutTubes);
77  unsigned int nTubes() const;
79  const Amg::Transform3D& layerTransform() const;
82  const Amg::Transform3D tubeTransform(const unsigned int tube) const;
84  const Amg::Vector3D tubePosInLayer(const unsigned int tube) const;
86  double tubeHalfLength(const unsigned int tube) const;
88  double uncutHalfLength(const unsigned int tube) const;
90  PVConstLink getTubeNode(unsigned int tube) const;
91 
92 
93  private:
94  PVConstLink m_layerNode{nullptr};
95  GeoIntrusivePtr<const GeoTransform> m_layTrf{nullptr};
99  };
100 
101  bool operator<(const MdtTubeLayer::CutTubes& a, const unsigned int tube);
102  bool operator<(const unsigned int tube, const MdtTubeLayer::CutTubes& a);
103 
104  bool operator<(const MdtTubeLayer::TubePositioner&a,const unsigned int tube);
105  bool operator<(const unsigned int tube, const MdtTubeLayer::TubePositioner& a);
106 
107 }
108 #endif
MuonGMR4::MdtTubeLayer::CutTubes::unCutHalfLength
double unCutHalfLength
Tube length before cut
Definition: MdtTubeLayer.h:42
MuonGMR4::MdtTubeLayer::TubePositioner
Helper struct to avoid browsing with the serial transformer.
Definition: MdtTubeLayer.h:51
MuonGMR4::MdtTubeLayer::m_tubePitch
Amg::Vector3D m_tubePitch
Definition: MdtTubeLayer.h:98
GeoModel::TransientConstSharedPtr
The TransientConstSharedPtr allows non-const access if the pointer itself is non-const but in the con...
Definition: TransientConstSharedPtr.h:13
MuonGMR4::MdtTubeLayer::layerTransform
const Amg::Transform3D & layerTransform() const
: Returns the transformation from the layer to the muon station
Definition: MdtTubeLayer.cxx:71
MuonGMR4::MdtTubeLayer::TubePositioner::firstTubePos
Amg::Vector3D firstTubePos
Transform to reach the first tube.
Definition: MdtTubeLayer.h:59
MuonGMR4::MdtTubeLayerSorter
Helper struct to sort equivalent MdtTubeLayers into a std::set.
Definition: MdtTubeLayer.h:19
MuonGMR4::MdtTubeLayer
Helper struct to retrieve the tube lengths and the tube centers directly from the GeoModel tree.
Definition: MdtTubeLayer.h:28
MuonGMR4::MdtTubeLayer::TubePositioner::operator<
bool operator<(const TubePositioner &other) const
ordering operator for set look up
Definition: MdtTubeLayer.h:61
MuonGMR4
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
Definition: MdtCalibInput.h:20
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
MuonGMR4::MdtTubeLayer::CutTubes
Constructor taking the GeoModel parent node of the tube nodes.
Definition: MdtTubeLayer.h:36
MuonGMR4::MdtTubeLayer::CutTubes::firstTube
unsigned int firstTube
First tube of the cut.
Definition: MdtTubeLayer.h:38
MuonGMR4::MdtTubeLayer::getTubeNode
PVConstLink getTubeNode(unsigned int tube) const
returns the PVConst link to the n-th tube [0 - nTubes() -1]
Definition: MdtTubeLayer.cxx:74
MuonGMR4::MdtTubeLayer::m_cutTubes
CutTubeSet m_cutTubes
Definition: MdtTubeLayer.h:96
MuonGMR4::MdtTubeLayerSorter::operator()
bool operator()(const MdtTubeLayer &a, const MdtTubeLayer &b) const
Definition: MdtTubeLayer.cxx:28
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
MuonGMR4::operator<
bool operator<(const MdtTubeLayer::CutTubes &a, const unsigned int tube)
Definition: MdtTubeLayer.cxx:15
MuonGMR4::MdtTubeLayer::nTubes
unsigned int nTubes() const
Returns the number of tubes in the layer.
Definition: MdtTubeLayer.cxx:94
MuonGMR4::MdtTubeLayer::tubeHalfLength
double tubeHalfLength(const unsigned int tube) const
Returns the half-length of the given tube.
Definition: MdtTubeLayer.cxx:97
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonGMR4::MdtTubeLayer::TubePositioner::firstTube
unsigned int firstTube
First tube of the positioning.
Definition: MdtTubeLayer.h:53
MuonGMR4::MdtTubeLayer::tubeTransform
const Amg::Transform3D tubeTransform(const unsigned int tube) const
Returns the transformation of the tube to the muon station Index counting [0 - nTubes()-1].
Definition: MdtTubeLayer.cxx:82
MuonGMR4::MdtTubeLayer::MdtTubeLayer
MdtTubeLayer(const PVConstLink layer, const GeoIntrusivePtr< const GeoTransform > toLayTrf, const CutTubeSet &cutTubes)
Standard constructor of a MdtTube layer.
Definition: MdtTubeLayer.cxx:47
MuonGMR4::MdtTubeLayer::m_tubePos
TubePositionerSet m_tubePos
Definition: MdtTubeLayer.h:97
MuonGMR4::MdtTubeLayer::m_layerNode
PVConstLink m_layerNode
Definition: MdtTubeLayer.h:94
a
TList * a
Definition: liststreamerinfos.cxx:10
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
MuonGMR4::MdtTubeLayerSet
std::set< MdtTubeLayerPtr, MdtTubeLayerSorter > MdtTubeLayerSet
Definition: MdtTubeLayer.h:23
TransientConstSharedPtr.h
MuonGMR4::MdtTubeLayer::TubePositionerSet
std::set< TubePositioner, std::less<> > TubePositionerSet
Definition: MdtTubeLayer.h:65
MuonGMR4::MdtTubeLayer::TubePositioner::lastTube
unsigned int lastTube
Last tube of the positioning.
Definition: MdtTubeLayer.h:55
MuonGMR4::MdtTubeLayer::CutTubes::operator<
bool operator<(const CutTubes &other) const
ordering operator for set look up
Definition: MdtTubeLayer.h:44
MuonDetectorDefs.h
MuonGMR4::MdtTubeLayer::CutTubeSet
std::set< CutTubes, std::less<> > CutTubeSet
Definition: MdtTubeLayer.h:48
MuonGMR4::MdtTubeLayer::CutTubes::lastTube
unsigned int lastTube
Last tube of the cut.
Definition: MdtTubeLayer.h:40
MuonGMR4::MdtTubeLayer::m_layTrf
GeoIntrusivePtr< const GeoTransform > m_layTrf
Definition: MdtTubeLayer.h:95
MuonGMR4::MdtTubeLayer::tubePosInLayer
const Amg::Vector3D tubePosInLayer(const unsigned int tube) const
Returns the tube position within the given tube layer.
Definition: MdtTubeLayer.cxx:91
calibdata.tube
tube
Definition: calibdata.py:31
MuonGMR4::MdtTubeLayer::MdtTubeLayerSorter
friend MdtTubeLayerSorter
Definition: MdtTubeLayer.h:67
MuonGMR4::MdtTubeLayer::TubePositioner::tubeVol
PVConstLink tubeVol
Underlying physical volume of the tube.
Definition: MdtTubeLayer.h:57
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
MuonGMR4::MdtTubeLayer::uncutHalfLength
double uncutHalfLength(const unsigned int tube) const
Returns the uncut-half length of the given tube.
Definition: MdtTubeLayer.cxx:107