ATLAS Offline Software
Loading...
Searching...
No Matches
SubtractedVolumeBounds.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// SubtractedVolumeBounds.h, (c) ATLAS Detector software
8
9#ifndef TRKVOLUMES_SUBTRACTEDVOLUMEBOUNDS_H
10#define TRKVOLUMES_SUBTRACTEDVOLUMEBOUNDS_H
11
12// Trk
14#include "TrkVolumes/Volume.h"
16// Eigen
18
19class MsgStream;
20
21namespace Trk {
22
23class SurfaceBounds;
24class Volume;
25class Surface;
26
39
41 public:
44
46 SubtractedVolumeBounds(std::unique_ptr<Volume> outerVol, std::unique_ptr<Volume> innerVol);
47
50
53
56
58 SubtractedVolumeBounds* clone() const override final;
59
62 bool inside(const Amg::Vector3D&, double tol = 0.) const override final;
63
66 (const Amg::Transform3D& transform) override final;
67
70 const Amg::Vector3D& gp, const Amg::Vector3D& dir,
71 bool forceInside = false) const override final;
72
75 Volume* outer();
76
79 Volume* inner();
80
83
85 MsgStream& dump(MsgStream& sl) const override;
86
88 std::ostream& dump(std::ostream& sl) const override final;
89
90 private:
92 Trk::Volume* subtrVol) ;
93
95 std::unique_ptr<Volume> m_inner{};
99 std::vector<bool> m_boundsOrientation{};
100};
101
105
107 double tol) const {
108 return (m_outer->inside(pos, tol) && !m_inner->inside(pos, -tol));
109}
110
111inline const Volume* SubtractedVolumeBounds::outer() const { return m_outer.get(); }
113
114inline const Volume* SubtractedVolumeBounds::inner() const { return m_inner.get(); }
116
121
122inline const std::vector<bool>& SubtractedVolumeBounds::boundsOrientation() const {
123 return (m_boundsOrientation);
124}
125
126} // namespace Trk
127
128#endif // TRKVOLUMES_SUBTRACTEDVOLUMEBOUNDS_H
129
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
SubtractedVolumeBounds()
Default Constructor.
EightObjectsAccessor m_objectAccessor
There's only one single object Acessor for the moment has to be implemented if Subtracteds are used m...
const Volume * inner() const
This method returns the inner Volume.
const Volume * outer() const
This method returns the outer Volume.
const std::vector< bool > & boundsOrientation() const
This method returns bounds orientation.
std::unique_ptr< Volume > m_inner
std::unique_ptr< Volume > m_outer
SubtractedVolumeBounds * clone() const override final
Virtual constructor.
virtual ~SubtractedVolumeBounds()
Destructor.
static Trk::Volume * createSubtractedVolume(const Amg::Transform3D &transf, Trk::Volume *subtrVol)
ObjectAccessor boundarySurfaceAccessor(const Amg::Vector3D &gp, const Amg::Vector3D &dir, bool forceInside=false) const override final
Provide accessor for BoundarySurfaces.
virtual std::vector< std::unique_ptr< Trk::Surface > > decomposeToSurfaces(const Amg::Transform3D &transform) override final
Method to decompose the Bounds into boundarySurfaces.
bool inside(const Amg::Vector3D &, double tol=0.) const override final
This method checks if position in the 3D volume frame is inside the cylinder.
SubtractedVolumeBounds & operator=(const SubtractedVolumeBounds &bobo)
Assignment operator.
std::vector< bool > m_boundsOrientation
Abstract base class for surface bounds to be specified.
Abstract Base Class for tracking surfaces.
Definition Surface.h:79
VolumeBounds()
Default Constructor.
Base class for all volumes inside the tracking realm, it defines the interface for inherited Volume c...
Definition Volume.h:36
STL class.
STL class.
Definition of ATLAS Math & Geometry primitives (Amg).
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the ATLAS eigen extensions are properly loaded.
std::array< ObjectAccessor::value_type, 8 > EightObjectsAccessor
-event-from-file
STL namespace.
#define private