ATLAS Offline Software
Loading...
Searching...
No Matches
RectangleBounds.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
6// RectangleBounds.h, (c) ATLAS Detector software
8
9#ifndef TRKSURFACES_RECTANGLEBOUNDS_H
10#define TRKSURFACES_RECTANGLEBOUNDS_H
11
13
14class MsgStream;
15
16#ifdef TRKDETDESCR_USEFLOATPRECISON
17typedef float TDD_real_t;
18#else
19typedef double TDD_real_t;
20#endif
21
22namespace Trk {
23
36
37class RectangleBounds final : public SurfaceBounds
38{
39
40public:
43 {
47 };
48
51
53 RectangleBounds(const RectangleBounds& recbo);
54
57
59 RectangleBounds(RectangleBounds&& recbo) noexcept = default;
60
62 RectangleBounds& operator=(RectangleBounds&& recbo) noexcept = default;
63
65 virtual ~RectangleBounds() = default;
66
68 RectangleBounds(double halex, double haley);
69
71 virtual bool operator==(const SurfaceBounds& sbo) const override final;
72
74 virtual RectangleBounds* clone() const override;
75
77 virtual BoundsType type() const override final { return SurfaceBounds::Rectangle; }
78
80 virtual bool inside(const Amg::Vector2D& locpo, double tol1 = 0., double tol2 = 0.) const override final;
81
83 virtual bool inside(const Amg::Vector2D& locpo, const BoundaryCheck& bchk) const override final;
84
87 virtual bool insideLoc1(const Amg::Vector2D& locpo, double tol1 = 0.) const override final;
88
91 virtual bool insideLoc2(const Amg::Vector2D& locpo, double tol2 = 0.) const override final;
92
94 virtual double minDistance(const Amg::Vector2D& pos) const override final;
95
98
101
104
107
109 virtual double r() const override;
110
112 virtual MsgStream& dump(MsgStream& sl) const override;
113
115 virtual std::ostream& dump(std::ostream& sl) const override;
116
117private:
120};
121
122} // end of namespace
123#include "TrkSurfaces/RectangleBounds.icc"
124#endif // TRKSURFACES_RECTANGLEBOUNDS_H
double TDD_real_t
The BoundaryCheck class allows to steer the way surface boundaries are used for inside/outside checks...
Bounds for a rectangular, planar surface.
std::vector< TDD_real_t > m_boundValues
The internal version of the bounds can be float/double.
virtual BoundsType type() const override final
Return the type of the bounds for persistency.
virtual RectangleBounds * clone() const override
Virtual constructor.
BoundValues
for readability
virtual ~RectangleBounds()=default
Destructor.
double halflengthPhi() const
This method returns the halflength in phi (first coordinate of local surface frame)
virtual double minDistance(const Amg::Vector2D &pos) const override final
Minimal distance to boundary ( > 0 if outside and <=0 if inside)
virtual bool operator==(const SurfaceBounds &sbo) const override final
Equality operator.
RectangleBounds(RectangleBounds &&recbo) noexcept=default
Move constructor.
virtual bool insideLoc2(const Amg::Vector2D &locpo, double tol2=0.) const override final
This method checks inside bounds in loc2.
RectangleBounds & operator=(const RectangleBounds &recbo)
Assignment Operator.
virtual bool inside(const Amg::Vector2D &locpo, double tol1=0., double tol2=0.) const override final
This method checks if the provided local coordinates are inside the surface bounds.
double halflengthX() const
for consistant naming
virtual bool insideLoc1(const Amg::Vector2D &locpo, double tol1=0.) const override final
This method checks inside bounds in loc1.
virtual double r() const override
This method returns the maximal extension on the local plane, i.e.
double halflengthY() const
for consitant naming
RectangleBounds & operator=(RectangleBounds &&recbo) noexcept=default
Move Assignment Operator.
RectangleBounds()
Default Constructor - needed for persistency.
double halflengthEta() const
This method returns the halflength in Eta (second coordinate of local surface frame)
SurfaceBounds()=default
Default Constructor.
BoundsType
This enumerator simplifies the persistency, by saving a dynamic_cast to happen.
STL class.
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Matrix< double, 2, 1 > Vector2D
Ensure that the ATLAS eigen extensions are properly loaded.
-event-from-file
STL namespace.
#define private