ATLAS Offline Software
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 
12 class MsgStream;
13 
15 #include "TrkGeometry/Layer.h"
17 #include "TrkGeometry/PlaneLayer.h"
18 #include "TrkSurfaces/Surface.h"
19 //CxxUtils
21 // Amg
23 
24 
25 #include <span>
26 namespace Trk {
27 class TrackingVolume;
28 class Surface;
29 class MaterialProperties;
30 class MagneticFieldProperties;
31 
32 // For local spans (typedef to make it easier for C++20 std:: one)
33 template<class T>
34 using ArraySpan = std::span<T>;
35 
36 
49  friend class TrackingVolume;
52 
53  public:
56 
58  DetachedTrackingVolume(std::string name, TrackingVolume* vol);
59 
61  DetachedTrackingVolume(std::string name,
62  TrackingVolume* vol,
63  Layer* layer,
64  const std::vector<Layer*>* multilayer = nullptr);
65 
68 
70  const TrackingVolume* trackingVolume() const;
72 
74  const std::string& name() const;
75 
77  void move (Amg::Transform3D& shift);
78 
80  DetachedTrackingVolume* clone(const std::string& name,
81  Amg::Transform3D& shift) const;
82 
84  const Layer* layerRepresentation() const;
86 
90 
92  void sign(GeometrySignature signat, GeometryType geotype);
93 
96 
98  GeometryType geometryType() const;
99 
101  void saveConstituents(
102  const std::vector<std::pair<std::unique_ptr<const Trk::Volume>, float>>*);
104  const std::vector<std::pair<std::unique_ptr<const Trk::Volume>, float>>*
105  constituents() const;
106 
110  void setBaseTransform(Amg::Transform3D* transf = nullptr);
111 
112  private:
114  void compactify(size_t& cSurfaces, size_t& tSurfaces);
115 
117  const std::string m_name;
119  const std::vector<Layer*>* m_multilayerRepresentation;
120  Amg::Transform3D* m_baseTransform; // optional use (for alignment purpose)
121  const std::vector<std::pair<std::unique_ptr<const Trk::Volume>, float>>*
123 };
124 
126  return (m_trkVolume);
127 }
128 
130  return (m_trkVolume);
131 }
132 
133 
134 inline const std::string& DetachedTrackingVolume::name() const { return (m_name); }
135 
137  return (m_layerRepresentation);
138 }
139 
141  return (m_layerRepresentation);
142 }
143 
146 {
149  &*m_multilayerRepresentation->end());
150  }
151  return {};
152 }
153 
156 {
159  &*m_multilayerRepresentation->end());
160  }
161  return {};
162 }
163 
165  const std::vector<std::pair<std::unique_ptr<const Trk::Volume>, float>>*
166  constituents) {
168 }
169 
170 inline const std::vector<std::pair<std::unique_ptr<const Trk::Volume>, float>>*
172  return m_constituents;
173 }
174 
175 
176 } // namespace Trk
177 
178 #endif // TRKGEOMETRY_DETACHEDTRACKINGVOLUME_H
179 
Trk::DetachedTrackingVolume::m_baseTransform
Amg::Transform3D * m_baseTransform
Definition: DetachedTrackingVolume.h:120
Trk::DetachedTrackingVolume::sign
void sign(GeometrySignature signat, GeometryType geotype)
sign the volume - the geometry builder has to do that
Definition: DetachedTrackingVolume.cxx:186
Trk::DetachedTrackingVolume::m_trkVolume
TrackingVolume * m_trkVolume
Definition: DetachedTrackingVolume.h:116
GeometrySignature.h
Surface.h
GeometrySignature
Trk::DetachedTrackingVolume::DetachedTrackingVolume
DetachedTrackingVolume()
Default Constructor.
Definition: DetachedTrackingVolume.cxx:17
Trk::DetachedTrackingVolume::trackingVolume
const TrackingVolume * trackingVolume() const
returns the TrackingVolume
Definition: DetachedTrackingVolume.h:125
OverlapDescriptor.h
Trk::DetachedTrackingVolume::DetachedTrackingVolumeBuilder
friend class DetachedTrackingVolumeBuilder
Definition: DetachedTrackingVolume.h:50
Trk::DetachedTrackingVolume::m_layerRepresentation
Layer * m_layerRepresentation
Definition: DetachedTrackingVolume.h:118
Surface
Definition: Trigger/TrigAccel/TrigCudaFitter/src/Surface.h:8
Trk::DetachedTrackingVolume::compactify
void compactify(size_t &cSurfaces, size_t &tSurfaces)
Compactify – set TG as owner to surfaces.
Definition: DetachedTrackingVolume.cxx:158
Layer.h
Trk::DetachedTrackingVolume::~DetachedTrackingVolume
~DetachedTrackingVolume()
Destructor.
Definition: DetachedTrackingVolume.cxx:49
GeoPrimitives.h
Trk::DetachedTrackingVolume::move
void move(Amg::Transform3D &shift)
moving object around
Definition: DetachedTrackingVolume.cxx:61
Trk::ArraySpan
std::span< T > ArraySpan
Definition: DetachedTrackingVolume.h:34
Trk::DetachedTrackingVolume::m_constituents
const std::vector< std::pair< std::unique_ptr< const Trk::Volume >, float > > * m_constituents
Definition: DetachedTrackingVolume.h:122
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
Trk::DetachedTrackingVolume::saveConstituents
void saveConstituents(const std::vector< std::pair< std::unique_ptr< const Trk::Volume >, float >> *)
set the simplified calculable components
Definition: DetachedTrackingVolume.h:164
Trk::DetachedTrackingVolume::clone
DetachedTrackingVolume * clone(const std::string &name, Amg::Transform3D &shift) const
clone with transform
Definition: DetachedTrackingVolume.cxx:75
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::DetachedTrackingVolume::name
const std::string & name() const
returns the Name
Definition: DetachedTrackingVolume.h:134
Trk::DetachedTrackingVolume::constituents
const std::vector< std::pair< std::unique_ptr< const Trk::Volume >, float > > * constituents() const
get the simplified calculable components
Definition: DetachedTrackingVolume.h:171
Trk::DetachedTrackingVolume::multilayerRepresentation
ArraySpan< Layer const *const > multilayerRepresentation() const
returns (multi)layer representation
Definition: DetachedTrackingVolume.h:145
Trk::IDetachedTrackingVolumeBuilder
Definition: IDetachedTrackingVolumeBuilder.h:28
Trk::DetachedTrackingVolume::m_name
const std::string m_name
Definition: DetachedTrackingVolume.h:117
Trk::DetachedTrackingVolume::setBaseTransform
void setBaseTransform(Amg::Transform3D *transf=nullptr)
alignment methods: set base transform / default argument to current transform
Definition: DetachedTrackingVolume.cxx:200
Trk::DetachedTrackingVolume::m_multilayerRepresentation
const std::vector< Layer * > * m_multilayerRepresentation
Definition: DetachedTrackingVolume.h:119
Trk::DetachedTrackingVolume::layerRepresentation
const Layer * layerRepresentation() const
returns layer representation
Definition: DetachedTrackingVolume.h:136
Trk::GeometryType
GeometryType
Definition: GeometrySignature.h:37
Trk::DetachedTrackingVolume::geometryType
GeometryType geometryType() const
return the Type
Definition: DetachedTrackingVolume.cxx:196
Trk::DetachedTrackingVolume
Definition: DetachedTrackingVolume.h:46
checker_macros.h
Define macros for attributes used to control the static checker.
Trk::DetachedTrackingVolume::geometrySignature
GeometrySignature geometrySignature() const
return the Signature
Definition: DetachedTrackingVolume.cxx:192
Trk::TrackingVolume
Definition: TrackingVolume.h:121
PlaneLayer.h
Trk::Layer
Definition: Layer.h:73