ATLAS Offline Software
Loading...
Searching...
No Matches
PrismVolumeBounds.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// PrismVolumeBounds.h, (c) ATLAS Detector software
8
9#ifndef TRKVOLUMES_PRISMVOLUMEBOUNDS_H
10#define TRKVOLUMES_PRISMVOLUMEBOUNDS_H
11
12// Trk
17class MsgStream;
18
19namespace Trk {
20
21class Surface;
22class PlaneSurface;
23class TriangleBounds;
24
43
44class PrismVolumeBounds final: public VolumeBounds {
45 public:
48
50 PrismVolumeBounds(std::vector<std::pair<float, float> > xyvtx,
51 float hlengthz);
52
54 PrismVolumeBounds(std::vector<std::pair<double, double> > xyvtx,
55 double hlengthz);
56
59
61 virtual ~PrismVolumeBounds();
62
65
67 PrismVolumeBounds* clone() const override final;
68
71 bool inside(const Amg::Vector3D&, double tol = 0.) const override final;
72
74 virtual std::vector<std::unique_ptr<Trk::Surface>> decomposeToSurfaces
75 (const Amg::Transform3D& transform) override final;
76
79 const Amg::Vector3D& gp, const Amg::Vector3D& dir,
80 bool forceInside = false) const override final;
81
83 const std::vector<std::pair<double, double> >& xyVertices() const;
84
86 double halflengthZ() const;
87
89 MsgStream& dump(MsgStream& sl) const override final;
90
92 std::ostream& dump(std::ostream& sl) const override final;
93
94 private:
96 std::unique_ptr<Trk::PlaneSurface> sideSurf(const Amg::Transform3D&, unsigned int,
97 unsigned int) const;
98
100 std::vector<std::pair<double, double> > mirror_xyVtx() const;
101
103 int ordering() const;
104
105 std::vector<std::pair<double, double> > m_xyVtx;
106 double m_halfZ;
109
114};
115
117 return new PrismVolumeBounds(*this);
118}
119
120inline const std::vector<std::pair<double, double> >& PrismVolumeBounds::xyVertices()
121 const {
122 return m_xyVtx;
123}
124
125inline double PrismVolumeBounds::halflengthZ() const { return m_halfZ; }
126
131
132} // namespace Trk
133
134#endif // TRKVOLUMES_PRISMVOLUMEBOUNDS_H
135
Cached value with atomic update.
Cached value with atomic update.
Definition CachedValue.h:55
Class for a planaer rectangular or trapezoidal surface in the ATLAS detector.
PrismVolumeBounds & operator=(const PrismVolumeBounds &bobo)
Assignment operator.
std::vector< std::pair< double, double > > mirror_xyVtx() const
mirror the input vertices for down-side boundary
double m_halfZ
halflength in z
const std::vector< std::pair< double, double > > & xyVertices() const
This method returns the set of xy generating vertices.
virtual ~PrismVolumeBounds()
Destructor.
Trk::EightObjectsAccessor m_objectAccessor
There's only one single object Acessor for the moment has to be implemented if Cuboids are used more ...
PrismVolumeBounds()
Default Constructor.
CxxUtils::CachedValue< int > m_ordering
cache vertex ordering
double halflengthZ() const
This method returns the halflength in local z.
std::vector< std::pair< double, double > > m_xyVtx
generating xy vertices
PrismVolumeBounds * clone() const override final
Virtual constructor.
Trk::TriangleBounds * m_baseBounds
base xy bounds
int ordering() const
assess ordering of vertices
virtual std::vector< std::unique_ptr< Trk::Surface > > decomposeToSurfaces(const Amg::Transform3D &transform) override final
Method to decompose the Bounds into Surfaces.
ObjectAccessor boundarySurfaceAccessor(const Amg::Vector3D &gp, const Amg::Vector3D &dir, bool forceInside=false) const override final
Provide accessor for BoundarySurfaces.
std::unique_ptr< Trk::PlaneSurface > sideSurf(const Amg::Transform3D &, unsigned int, unsigned int) const
method to construct side boundary planes
Abstract Base Class for tracking surfaces.
Bounds for a triangular, planar surface.
VolumeBounds()
Default Constructor.
Eigen::Affine3d Transform3D
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