Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
5 #include <GeoModelKernel/GeoTube.h>
6 #include <GeoModelKernel/GeoAccessVolumeAction.h>
8 #include <GeoModelHelpers/TransformSorter.h>
9 #include <GeoModelHelpers/GeoPhysVolSorter.h>
10 #include <GeoModelHelpers/getChildNodesWithTrf.h>
16 return a.lastTube <
tube;
19 return tube <
a.firstTube;
22 return a.lastTube <
tube;
25 return tube <
a.firstTube;
31 if (
a.m_layTrf !=
b.m_layTrf) {
32 static const GeoTrf::TransformSorter trfSort{};
33 const int trfCmp = trfSort.compare(
a.layerTransform(),
b.layerTransform());
34 if (trfCmp)
return trfCmp < 0;
36 if (
a.m_layerNode !=
b.m_layerNode) {
37 static const GeoPhysVolSorter physSort{};
38 return physSort(
a.m_layerNode,
b.m_layerNode);
43 return (*
this)(*
a, *
b);
48 const GeoIntrusivePtr<const GeoTransform> toLayTrf,
50 m_layerNode{std::move(
layer)},
51 m_layTrf{std::move(toLayTrf)},
52 m_cutTubes{cutTubes} {
54 const std::vector<GeoChildNodeWithTrf>
children = getChildrenWithRef(m_layerNode,
true);
55 unsigned int firstTube{0};
56 bool firstTubeSet{
false};
57 for (
const GeoChildNodeWithTrf& child :
children) {
58 TubePositioner positioner{};
59 positioner.firstTube = firstTube;
60 positioner.lastTube = firstTube + child.nCopies -1;
61 positioner.firstTubePos = child.transform.translation();
62 positioner.tubeVol = child.volume;
63 if (!firstTubeSet && child.nCopies>1) {
64 m_tubePitch = child.inductionRule.translation();
67 firstTube = positioner.lastTube + 1;
68 m_tubePos.insert(std::move(positioner));
75 TubePositionerSet::const_iterator tube_itr =
m_tubePos.find(
tube);
78 <<
tube<<
" is requested. Please check.");
80 return tube_itr->tubeVol;
83 TubePositionerSet::const_iterator tube_itr =
m_tubePos.find(
tube);
86 <<
tube<<
" is requested. Please check.");
98 TubePositionerSet::const_iterator tube_itr =
m_tubePos.find(
tube);
101 <<
tube<<
" is requested. Please check.");
103 const GeoShape* shape = tube_itr->tubeVol->getLogVol()->getShape();
104 const GeoTube* tubeShape =
static_cast<const GeoTube*
>(shape);
105 return tubeShape->getZHalfLength();
110 return itr->unCutHalfLength;
Helper struct to avoid browsing with the serial transformer.
Amg::Vector3D m_tubePitch
The TransientConstSharedPtr allows non-const access if the pointer itself is non-const but in the con...
const Amg::Transform3D & layerTransform() const
: Returns the transformation from the layer to the muon station
Helper struct to retrieve the tube lengths and the tube centers directly from the GeoModel tree.
Visitor to process all volumes under a GeoModel node.
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
Eigen::Affine3d Transform3D
Constructor taking the GeoModel parent node of the tube nodes.
PVConstLink getTubeNode(unsigned int tube) const
returns the PVConst link to the n-th tube [0 - nTubes() -1]
bool operator()(const MdtTubeLayer &a, const MdtTubeLayer &b) const
bool operator<(const MdtTubeLayer::CutTubes &a, const unsigned int tube)
unsigned int nTubes() const
Returns the number of tubes in the layer.
double tubeHalfLength(const unsigned int tube) const
Returns the half-length of the given tube.
Eigen::Matrix< double, 3, 1 > Vector3D
#define THROW_EXCEPTION(MESSAGE)
const Amg::Transform3D tubeTransform(const unsigned int tube) const
Returns the transformation of the tube to the muon station Index counting [0 - nTubes()-1].
MdtTubeLayer(const PVConstLink layer, const GeoIntrusivePtr< const GeoTransform > toLayTrf, const CutTubeSet &cutTubes)
Standard constructor of a MdtTube layer.
TubePositionerSet m_tubePos
std::set< CutTubes, std::less<> > CutTubeSet
GeoIntrusivePtr< const GeoTransform > m_layTrf
const Amg::Vector3D tubePosInLayer(const unsigned int tube) const
Returns the tube position within the given tube layer.
Amg::Transform3D getTranslate3D(const double X, const double Y, const double Z)
: Returns a shift transformation along an arbitrary axis
double uncutHalfLength(const unsigned int tube) const
Returns the uncut-half length of the given tube.