ATLAS Offline Software
Loading...
Searching...
No Matches
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>
14namespace 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
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{};
59 Amg::Vector3D firstTubePos{Amg::Vector3D::Zero()};
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};
98 Amg::Vector3D m_tubePitch{Amg::Vector3D::Zero()};
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
static Double_t a
The TransientConstSharedPtr allows non-const access if the pointer itself is non-const but in the con...
Helper struct to retrieve the tube lengths and the tube centers directly from the GeoModel tree.
std::set< TubePositioner, std::less<> > TubePositionerSet
Amg::Vector3D m_tubePitch
MdtTubeLayer(const PVConstLink layer, const GeoIntrusivePtr< const GeoTransform > toLayTrf, const CutTubeSet &cutTubes)
Standard constructor of a MdtTube layer.
PVConstLink getTubeNode(unsigned int tube) const
returns the PVConst link to the n-th tube [0 - nTubes() -1]
const Amg::Transform3D & layerTransform() const
: Returns the transformation from the layer to the muon station
std::set< CutTubes, std::less<> > CutTubeSet
unsigned int nTubes() const
Returns the number of tubes in the layer.
const Amg::Vector3D tubePosInLayer(const unsigned int tube) const
Returns the tube position within the given tube layer.
const Amg::Transform3D tubeTransform(const unsigned int tube) const
Returns the transformation of the tube to the muon station Index counting [0 - nTubes()-1].
TubePositionerSet m_tubePos
double tubeHalfLength(const unsigned int tube) const
Returns the half-length of the given tube.
double uncutHalfLength(const unsigned int tube) const
Returns the uncut-half length of the given tube.
GeoIntrusivePtr< const GeoTransform > m_layTrf
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
bool operator<(const MdtTubeLayer::CutTubes &a, const unsigned int tube)
GeoModel::TransientConstSharedPtr< MdtTubeLayer > MdtTubeLayerPtr
std::set< MdtTubeLayerPtr, MdtTubeLayerSorter > MdtTubeLayerSet
Helper struct to sort equivalent MdtTubeLayers into a std::set.
bool operator()(const MdtTubeLayer &a, const MdtTubeLayer &b) const
Constructor taking the GeoModel parent node of the tube nodes.
unsigned int firstTube
First tube of the cut.
double unCutHalfLength
Tube length before cut.
unsigned int lastTube
Last tube of the cut.
bool operator<(const CutTubes &other) const
ordering operator for set look up
Helper struct to avoid browsing with the serial transformer.
unsigned int firstTube
First tube of the positioning.
bool operator<(const TubePositioner &other) const
ordering operator for set look up
unsigned int lastTube
Last tube of the positioning.
Amg::Vector3D firstTubePos
Transform to reach the first tube.
PVConstLink tubeVol
Underlying physical volume of the tube.