ATLAS Offline Software
Loading...
Searching...
No Matches
DiscBounds.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// DiscBounds.h, c) ATLAS Detector software
8
9#ifndef TRKSURFACES_DISCBOUNDS_H
10#define TRKSURFACES_DISCBOUNDS_H
11
12// Trk
15//
16#include <cmath>
17#include <math.h>
18// Eigen
20
21class MsgStream;
22
23#ifdef TRKDETDESCR_USEFLOATPRECISON
24typedef float TDD_real_t;
25#else
26typedef double TDD_real_t;
27#endif
28
29namespace Trk {
30
42
43class DiscBounds final: public SurfaceBounds
44{
45
46public:
56
57 DiscBounds();
58
60 DiscBounds(const DiscBounds&) = default;
61
63 DiscBounds& operator=(const DiscBounds& discbo) = default;
64
66 DiscBounds(DiscBounds&& discbo) noexcept = default;
67
69 DiscBounds& operator=(DiscBounds&& discbo) noexcept = default;
70
72 virtual ~DiscBounds() = default;
73
75 DiscBounds(double minrad, double maxrad, double hphisec = M_PI);
76
78 DiscBounds(double minrad, double maxrad, double avephi, double hphisec);
79
81 virtual bool operator==(const SurfaceBounds& sbo) const override;
82
84 virtual DiscBounds* clone() const override final;
85
87 virtual SurfaceBounds::BoundsType type() const override final { return SurfaceBounds::Disc; }
88
91 virtual bool inside(const Amg::Vector2D& locpo, double tol1 = 0., double tol2 = 0.) const override final;
92 virtual bool inside(const Amg::Vector2D& locpo, const BoundaryCheck& bchk) const override final;
93
96 virtual bool insideLoc1(const Amg::Vector2D& locpo, double tol1 = 0.) const override final;
97
100 virtual bool insideLoc2(const Amg::Vector2D& locpo, double tol2 = 0.) const override final;
101
103 virtual double minDistance(const Amg::Vector2D& pos) const override final;
104
106 double rMin() const;
107
109 double rMax() const;
110
112 virtual double r() const override final;
113
116
119
121 virtual MsgStream& dump(MsgStream& sl) const override;
122
124 virtual std::ostream& dump(std::ostream& sl) const override;
125
126private:
129};
130
131} // end of namespace
132
133#include "TrkSurfaces/DiscBounds.icc"
134#endif // TRKSURFACES_DISCBOUNDS_H
#define M_PI
double TDD_real_t
DiscBounds()
Default Constructor.
The BoundaryCheck class allows to steer the way surface boundaries are used for inside/outside checks...
BoundValues
enumeration for readability
Definition DiscBounds.h:49
double rMax() const
This method returns outer radius.
virtual bool operator==(const SurfaceBounds &sbo) const override
Equality operator.
virtual bool insideLoc1(const Amg::Vector2D &locpo, double tol1=0.) const override final
This method checks inside bounds in loc1.
DiscBounds(const DiscBounds &)=default
Default copy constructor.
DiscBounds(DiscBounds &&discbo) noexcept=default
Default move constructor.
double averagePhi() const
This method returns the average phi.
virtual double r() const override final
This method returns the maximum expansion on the plane (=rMax)
virtual ~DiscBounds()=default
Destructor.
virtual double minDistance(const Amg::Vector2D &pos) const override final
Minimal distance to boundary ( > 0 if outside and <=0 if inside)
virtual bool insideLoc2(const Amg::Vector2D &locpo, double tol2=0.) const override final
This method checks inside bounds in loc2.
double rMin() const
This method returns inner radius.
double halfPhiSector() const
This method returns the halfPhiSector which is covered by the disc.
DiscBounds & operator=(DiscBounds &&discbo) noexcept=default
Default move assignment operator.
virtual SurfaceBounds::BoundsType type() const override final
Return the type - mainly for persistency.
Definition DiscBounds.h:87
std::vector< TDD_real_t > m_boundValues
Internal members of the bounds (float/double)
Definition DiscBounds.h:128
virtual DiscBounds * clone() const override final
Virtual constructor.
DiscBounds & operator=(const DiscBounds &discbo)=default
Default assignment operator.
DiscBounds()
Default Constructor.
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