ATLAS Offline Software
Loading...
Searching...
No Matches
DiscTrapezoidalBounds.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// DiscTrapezoidalBounds.h, c) ATLAS Detector software
8
9#ifndef TRKSURFACES_DISCTRAPEZOIDALBOUNDS_H
10#define TRKSURFACES_DISCTRAPEZOIDALBOUNDS_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
40
42{
43
44public:
59
62
65
68
70 DiscTrapezoidalBounds(DiscTrapezoidalBounds&& disctrbo) noexcept = default;
71
73 DiscTrapezoidalBounds& operator=(DiscTrapezoidalBounds&& disctrbo) noexcept = default;
74
76 virtual ~DiscTrapezoidalBounds() =default ;
77
79 DiscTrapezoidalBounds(double minhalfx, double maxhalfx, double rMin, double rMax, double avephi, double stereo = 0.);
80
82 virtual bool operator==(const SurfaceBounds& sbo) const override;
83
85 virtual DiscTrapezoidalBounds* clone() const override;
86
89
92 virtual bool inside(const Amg::Vector2D& locpo, double tol1 = 0., double tol2 = 0.) const override final;
93 virtual bool inside(const Amg::Vector2D& locpo, const BoundaryCheck& bchk) const override final;
94
97 virtual bool insideLoc1(const Amg::Vector2D& locpo, double tol1 = 0.) const override final;
98
101 virtual bool insideLoc2(const Amg::Vector2D& locpo, double tol2 = 0.) const override final;
102
104 virtual double minDistance(const Amg::Vector2D& pos) const override final;
105
107 double rMin() const;
108
110 double rMax() const;
111
113 virtual double r() const override;
114
117
119 double rCenter() const;
120
122 double stereo() const;
123
126
129
132
135
137 virtual MsgStream& dump(MsgStream& sl) const override;
138
140 virtual std::ostream& dump(std::ostream& sl) const override;
141
142private:
145};
146
147} // end of namespace
148#include "TrkSurfaces/DiscTrapezoidalBounds.icc"
149#endif // TRKSURFACES_DISCTRAPEZOIDALBOUNDS_H
double TDD_real_t
The BoundaryCheck class allows to steer the way surface boundaries are used for inside/outside checks...
Class to describe the bounds for a planar DiscSurface.
virtual bool operator==(const SurfaceBounds &sbo) const override
Equality operator.
DiscTrapezoidalBounds & operator=(const DiscTrapezoidalBounds &disctrbo)
Assignment operator.
virtual double minDistance(const Amg::Vector2D &pos) const override final
Minimal distance to boundary ( > 0 if outside and <=0 if inside)
double rMin() const
This method returns inner radius.
double halflengthY() const
This method returns the halflength in Y (this is Rmax -Rmin)
virtual ~DiscTrapezoidalBounds()=default
Destructor.
virtual double r() const override
This method returns the maximum expansion on the plane (=rMax)
std::vector< TDD_real_t > m_boundValues
Internal members of the bounds (float/double)
BoundValues
enumeration for readability
virtual bool insideLoc1(const Amg::Vector2D &locpo, double tol1=0.) const override final
This method checks inside bounds in loc1.
double averagePhi() const
This method returns the average phi.
double maxHalflengthX() const
This method returns the maximal halflength in X.
double halfPhiSector() const
This method returns the halfPhiSector which is covered by the disc.
DiscTrapezoidalBounds(DiscTrapezoidalBounds &&disctrbo) noexcept=default
Move constructor.
double minHalflengthX() const
This method returns the minimal halflength in X.
virtual bool insideLoc2(const Amg::Vector2D &locpo, double tol2=0.) const override final
This method checks inside bounds in loc2.
virtual SurfaceBounds::BoundsType type() const override final
Return the type - mainly for persistency.
double stereo() const
This method returns the stereo angle.
double rMax() const
This method returns outer radius.
virtual DiscTrapezoidalBounds * clone() const override
Virtual constructor.
DiscTrapezoidalBounds & operator=(DiscTrapezoidalBounds &&disctrbo) noexcept=default
Move Assignment operator.
DiscTrapezoidalBounds()
Default Constructor.
double rCenter() const
This method returns the center radius.
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