ATLAS Offline Software
Loading...
Searching...
No Matches
MaterialLayer.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6// MaterialLayer.h, (c) ATLAS Detector software
8
9#ifndef TRKGEOMETRY_MATERIALLAYER_H
10#define TRKGEOMETRY_MATERIALLAYER_H
11
12class MsgStream;
13
16#include "TrkGeometry/Layer.h"
19#include "TrkSurfaces/Surface.h"
20//
21#include <memory>
22namespace Trk {
23
41
42class MaterialLayer : public Layer {
43 public:
44 MaterialLayer() = default;
45 virtual ~MaterialLayer() = default;
46
48 virtual const Surface& surfaceRepresentation() const override = 0;
49 virtual Surface& surfaceRepresentation() override = 0;
52 virtual bool isOnLayer(
53 const Amg::Vector3D& gp,
54 const BoundaryCheck& bcheck = BoundaryCheck(true)) const override = 0;
56 virtual void moveLayer(Amg::Transform3D&) override final {};
58 virtual void resizeLayer(const VolumeBounds&, double) override final {}
61 const Amg::Vector3D&,
62 double) override final {}
63};
64
65class MaterialLayerOwnSurf final : public MaterialLayer {
66 public:
67 virtual ~MaterialLayerOwnSurf() = default;
70 std::unique_ptr<LayerMaterialProperties> mlprop)
71 : Trk::MaterialLayer(),
73 m_layerMaterialProperties = std::move(mlprop);
75 }
76
77 virtual const Surface& surfaceRepresentation() const override final {
78 return *(m_surfaceRepresentation.get());
79 }
80 virtual Surface& surfaceRepresentation() override final {
81 return *(m_surfaceRepresentation.get());
82 }
83 virtual bool isOnLayer(
84 const Amg::Vector3D& gp,
85 const BoundaryCheck& bcheck = BoundaryCheck(true)) const override final {
86 return m_surfaceRepresentation.get()->isOnSurface(gp, bcheck);
87 }
88
89 private:
90 std::unique_ptr<Surface> m_surfaceRepresentation{};
91};
92
94 public:
95 virtual ~MaterialLayerNoOwnSurf() = default;
96
100 std::unique_ptr<LayerMaterialProperties> mlprop)
102 m_layerMaterialProperties = std::move(mlprop);
103 m_layerThickness = 1.;
104 }
105
106 virtual const Surface& surfaceRepresentation() const override final {
108 }
109 virtual Surface& surfaceRepresentation() override final {
111 }
112 virtual bool isOnLayer(
113 const Amg::Vector3D& gp,
114 const BoundaryCheck& bcheck = BoundaryCheck(true)) const override final {
115 return m_surfaceRepresentation->isOnSurface(gp, bcheck);
116 }
117
118 private:
120};
121
122} // namespace Trk
123
124#endif // TRKGEOMETRY_MATERIALLAYER_H
125
The BoundaryCheck class allows to steer the way surface boundaries are used for inside/outside checks...
Layer()=default
Default Constructor.
double m_layerThickness
descriptor for overlap/next surface (owning ptr)
Definition Layer.h:290
std::unique_ptr< LayerMaterialProperties > m_layerMaterialProperties
thickness of the Layer
Definition Layer.h:288
virtual const Surface & surfaceRepresentation() const override final
Transforms the layer into a Surface representation for extrapolation.
MaterialLayerNoOwnSurf(Surface *surfaceRepresentation, std::unique_ptr< LayerMaterialProperties > mlprop)
Constructor allowing the Material to be attached to an existing surface It does NOT own the represent...
virtual Surface & surfaceRepresentation() override final
virtual ~MaterialLayerNoOwnSurf()=default
virtual bool isOnLayer(const Amg::Vector3D &gp, const BoundaryCheck &bcheck=BoundaryCheck(true)) const override final
isOnLayer() method, using isOnSurface() with Layer specific tolerance
MaterialLayerOwnSurf(std::unique_ptr< Surface > surfaceRepresentation, std::unique_ptr< LayerMaterialProperties > mlprop)
Constructor with a surface representation.
virtual bool isOnLayer(const Amg::Vector3D &gp, const BoundaryCheck &bcheck=BoundaryCheck(true)) const override final
isOnLayer() method, using isOnSurface() with Layer specific tolerance
virtual Surface & surfaceRepresentation() override final
virtual const Surface & surfaceRepresentation() const override final
Transforms the layer into a Surface representation for extrapolation.
virtual ~MaterialLayerOwnSurf()=default
std::unique_ptr< Surface > m_surfaceRepresentation
virtual Surface & surfaceRepresentation() override=0
virtual void resizeAndRepositionLayer(const VolumeBounds &, const Amg::Vector3D &, double) override final
Resize the layer to the tracking volume - not implemented.
virtual const Surface & surfaceRepresentation() const override=0
Transforms the layer into a Surface representation for extrapolation.
MaterialLayer()=default
virtual void resizeLayer(const VolumeBounds &, double) override final
Resize the layer to the tracking volume - not implemented.
virtual ~MaterialLayer()=default
virtual void moveLayer(Amg::Transform3D &) override final
Move the layer - not implemented.
virtual bool isOnLayer(const Amg::Vector3D &gp, const BoundaryCheck &bcheck=BoundaryCheck(true)) const override=0
isOnLayer() method, using isOnSurface() with Layer specific tolerance
Abstract Base Class for tracking surfaces.
Pure Absract Base Class for Volume bounds.
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the ATLAS eigen extensions are properly loaded.
STL namespace.