ATLAS Offline Software
Loading...
Searching...
No Matches
DetachedTrackingVolume.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
6// DetachedTrackingVolume.h, (c) ATLAS Detector software
8
9#ifndef TRKGEOMETRY_DETACHEDTRACKINGVOLUME_H
10#define TRKGEOMETRY_DETACHEDTRACKINGVOLUME_H
11
12class MsgStream;
13
15#include "TrkGeometry/Layer.h"
18#include "TrkSurfaces/Surface.h"
19// Amg
21#include <span>
22namespace Trk {
23class TrackingVolume;
24class Surface;
27
36
40 friend class TrackingVolume;
43
44 public:
47
49 DetachedTrackingVolume(std::string name, std::unique_ptr<TrackingVolume> vol);
50
52 DetachedTrackingVolume(std::string name,
53 std::unique_ptr<TrackingVolume> vol,
54 std::unique_ptr<Layer> layer,
55 std::unique_ptr<const std::vector<Layer*>> multilayer = nullptr);
56
59
61 const TrackingVolume* trackingVolume() const;
63
65 const std::string& name() const;
66
68 void move (Amg::Transform3D& shift);
69
71 DetachedTrackingVolume* clone(const std::string& name,
72 Amg::Transform3D& shift) const;
73
75 const Layer* layerRepresentation() const;
77
79 std::span<Layer const * const> multilayerRepresentation() const;
80 std::span<Layer * const> multilayerRepresentation();
81
83 void sign(GeometrySignature signat, GeometryType geotype);
84
87
90
93 void setBaseTransform(std::unique_ptr<Amg::Transform3D> transf = nullptr);
94
95 private:
97 void compactify(size_t& cSurfaces, size_t& tSurfaces);
98 std::unique_ptr<TrackingVolume> m_trkVolume = nullptr;
99 std::unique_ptr<Layer> m_layerRepresentation = nullptr;
100 //We own also the elements in the vector
101 std::unique_ptr<const std::vector<Layer*>> m_multilayerRepresentation = nullptr;
102 const std::string m_name{"undefined"};
103 // optional use (for alignment purpose)
104 std::unique_ptr<Amg::Transform3D> m_baseTransform = nullptr;
105};
106
108 return m_trkVolume.get();
109}
110
114
115inline const std::string& DetachedTrackingVolume::name() const { return (m_name); }
116
118 return m_layerRepresentation.get();
119}
120
124
125
126inline std::span<Layer const* const>
128{
130 return std::span<Layer const* const>(m_multilayerRepresentation->begin(),
132 }
133 return {};
134}
135
136inline std::span<Layer* const>
138{
140 return std::span<Layer* const>(m_multilayerRepresentation->begin(),
142 }
143 return {};
144}
145
146} // namespace Trk
147
148#endif // TRKGEOMETRY_DETACHEDTRACKINGVOLUME_H
149
std::unique_ptr< Layer > m_layerRepresentation
void move(Amg::Transform3D &shift)
moving object around
DetachedTrackingVolume * clone(const std::string &name, Amg::Transform3D &shift) const
clone with transform
GeometrySignature geometrySignature() const
return the Signature
DetachedTrackingVolume()
Default Constructor.
void sign(GeometrySignature signat, GeometryType geotype)
sign the volume - the geometry builder has to do that
const std::string & name() const
returns the Name
GeometryType geometryType() const
return the Type
const Layer * layerRepresentation() const
returns layer representation
std::unique_ptr< Amg::Transform3D > m_baseTransform
std::unique_ptr< const std::vector< Layer * > > m_multilayerRepresentation
friend class TrackingVolume
Declare the IDetachedTrackingVolumeBuilder as a friend, to be able to change the volumelink.
const TrackingVolume * trackingVolume() const
returns the TrackingVolume
void setBaseTransform(std::unique_ptr< Amg::Transform3D > transf=nullptr)
alignment methods: set base transform / default argument to current transform
std::unique_ptr< TrackingVolume > m_trkVolume
void compactify(size_t &cSurfaces, size_t &tSurfaces)
Compactify – set TG as owner to surfaces.
std::span< Layer const *const > multilayerRepresentation() const
returns (multi)layer representation
Base Class for a Detector Layer in the Tracking realm.
Definition Layer.h:72
magnetic field properties to steer the behavior of the extrapolation
Material with information about thickness of material.
Abstract Base Class for tracking surfaces.
Full Volume description used in Tracking, it inherits from Volume to get the geometrical structure,...
Eigen::Affine3d Transform3D
Ensure that the ATLAS eigen extensions are properly loaded.