ATLAS Offline Software
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 
19 class MsgStream;
20 
21 namespace Trk {
22 
23 class SurfaceBounds;
24 class Volume;
25 class Surface;
26 
40 class SubtractedVolumeBounds final: public VolumeBounds {
41  public:
44 
46  SubtractedVolumeBounds(Volume* outerVol, Volume* innerVol);
47 
50 
52  virtual ~SubtractedVolumeBounds();
53 
56 
58  SubtractedVolumeBounds* clone() const override final;
59 
62  bool inside(const Amg::Vector3D&, double tol = 0.) const override final;
63 
65  const std::vector<const Trk::Surface*>* decomposeToSurfaces
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 
74  const Volume* outer() const;
75  Volume* outer();
76 
78  const Volume* inner() const;
79  Volume* inner();
80 
82  const std::vector<bool>& boundsOrientation() const;
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 
96 
100 
101  std::vector<bool> m_boundsOrientation;
102 };
103 
105  return new SubtractedVolumeBounds(*this);
106 }
107 
109  double tol) const {
110  return (m_outer->inside(pos, tol) && !m_inner->inside(pos, -tol));
111 }
112 
113 inline const Volume* SubtractedVolumeBounds::outer() const { return m_outer; }
115 
116 inline const Volume* SubtractedVolumeBounds::inner() const { return m_inner; }
118 
120  const Amg::Vector3D&, const Amg::Vector3D&, bool) const {
122 }
123 
124 inline const std::vector<bool>& SubtractedVolumeBounds::boundsOrientation() const {
125  return (m_boundsOrientation);
126 }
127 
128 } // namespace Trk
129 
130 #endif // TRKVOLUMES_SUBTRACTEDVOLUMEBOUNDS_H
131 
Trk::SubtractedVolumeBounds::m_inner
Volume * m_inner
Definition: SubtractedVolumeBounds.h:95
Trk::SubtractedVolumeBounds::boundsOrientation
const std::vector< bool > & boundsOrientation() const
This method returns bounds orientation.
Definition: SubtractedVolumeBounds.h:124
Trk::Volume::inside
bool inside(const Amg::Vector3D &gp, double tol=0.) const
Inside() method for checks.
Definition: Volume.cxx:90
Trk::EightObjectsAccessor
std::array< ObjectAccessor::value_type, 8 > EightObjectsAccessor
Definition: ObjectsAccessor.h:18
Trk::SubtractedVolumeBounds::dump
MsgStream & dump(MsgStream &sl) const override
Output Method for MsgStream.
Definition: SubtractedVolumeBounds.cxx:305
Surface
Definition: Trigger/TrigAccel/TrigCudaFitter/src/Surface.h:8
Trk::SubtractedVolumeBounds::decomposeToSurfaces
const std::vector< const Trk::Surface * > * decomposeToSurfaces(const Amg::Transform3D &transform) override final
Method to decompose the Bounds into boundarySurfaces.
Definition: SubtractedVolumeBounds.cxx:86
Trk::SubtractedVolumeBounds::m_outer
Volume * m_outer
Definition: SubtractedVolumeBounds.h:94
VolumeBounds.h
ObjectsAccessor.h
GeoPrimitives.h
Trk::VolumeBounds
Definition: VolumeBounds.h:45
Volume.h
Trk::SubtractedVolumeBounds::createSubtractedVolume
static Trk::Volume * createSubtractedVolume(const Amg::Transform3D &transf, Trk::Volume *subtrVol)
Definition: SubtractedVolumeBounds.cxx:331
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
Trk::SubtractedVolumeBounds::operator=
SubtractedVolumeBounds & operator=(const SubtractedVolumeBounds &bobo)
Assignment operator.
Definition: SubtractedVolumeBounds.cxx:70
Trk::SubtractedVolumeBounds::outer
const Volume * outer() const
This method returns the outer Volume.
Definition: SubtractedVolumeBounds.h:113
beamspotman.dir
string dir
Definition: beamspotman.py:623
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::SubtractedVolumeBounds::boundarySurfaceAccessor
ObjectAccessor boundarySurfaceAccessor(const Amg::Vector3D &gp, const Amg::Vector3D &dir, bool forceInside=false) const override final
Provide accessor for BoundarySurfaces.
Definition: SubtractedVolumeBounds.h:119
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::SubtractedVolumeBounds::clone
SubtractedVolumeBounds * clone() const override final
Virtual constructor.
Definition: SubtractedVolumeBounds.h:104
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Trk::ObjectAccessor
Definition: ObjectAccessor.h:15
Trk::SubtractedVolumeBounds
Definition: SubtractedVolumeBounds.h:40
Trk::SubtractedVolumeBounds::m_objectAccessor
EightObjectsAccessor m_objectAccessor
There's only one single object Acessor for the moment has to be implemented if Subtracteds are used m...
Definition: SubtractedVolumeBounds.h:99
Trk::SubtractedVolumeBounds::SubtractedVolumeBounds
SubtractedVolumeBounds()
Default Constructor.
Definition: SubtractedVolumeBounds.cxx:33
Trk::SubtractedVolumeBounds::~SubtractedVolumeBounds
virtual ~SubtractedVolumeBounds()
Destructor.
Definition: SubtractedVolumeBounds.cxx:62
Trk::SubtractedVolumeBounds::m_boundsOrientation
std::vector< bool > m_boundsOrientation
Definition: SubtractedVolumeBounds.h:101
Trk::Volume
Definition: Volume.h:35
Trk::SubtractedVolumeBounds::inner
const Volume * inner() const
This method returns the inner Volume.
Definition: SubtractedVolumeBounds.h:116
Trk::SubtractedVolumeBounds::inside
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.
Definition: SubtractedVolumeBounds.h:108