ATLAS Offline Software
Loading...
Searching...
No Matches
RotatedDiamondBounds.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// RotatedDiamondBounds.h, (c) ATLAS Detector software
8
9#ifndef TRKSURFACES_ROTATEDDIAMONDDBOUNDS_H
10#define TRKSURFACES_ROTATEDDIAMONDDBOUNDS_H
11
15
16#include <math.h>
17
18class MsgStream;
20
21#ifdef TRKDETDESCR_USEFLOATPRECISON
22typedef float TDD_real_t;
23#else
24typedef double TDD_real_t;
25#endif
26
27namespace Trk {
28
40
42{
43
44public:
55
58
61
64
66 RotatedDiamondBounds(RotatedDiamondBounds&& diabo) noexcept = default;
67
70
72 virtual ~RotatedDiamondBounds() = default;
73
75 RotatedDiamondBounds(double minhalex, double medhalex, double maxhalex, double haley1, double haley2);
76
78 RotatedDiamondBounds* clone() const override;
79
81 virtual bool operator==(const SurfaceBounds& diabo) const override;
82
84 virtual BoundsType type() const override { return SurfaceBounds::Diamond; }
85
87 double minHalflengthX() const;
88
90 double medHalflengthX() const;
91
93 double maxHalflengthX() const;
94
96 double halflengthY1() const;
97 double halflengthY2() const;
98
100 virtual double r() const override;
101
103 double alpha1() const;
104
106 double alpha2() const;
107
109 virtual bool inside(const Amg::Vector2D& locpo, double tol1 = 0., double tol2 = 0.) const override;
110 virtual bool inside(const Amg::Vector2D& locpo, const BoundaryCheck& bchk) const override;
111
117 virtual bool insideLoc1(const Amg::Vector2D& locpo, double tol1 = 0.) const override;
118
124 virtual bool insideLoc2(const Amg::Vector2D& locpo, double tol2 = 0.) const override;
125
127 virtual double minDistance(const Amg::Vector2D& pos) const override;
128
130 virtual MsgStream& dump(MsgStream& sl) const override;
131
133 virtual std::ostream& dump(std::ostream& sl) const override;
134
135private:
136 friend class ::RotatedDiamondBoundsCnv_p1;
137
139 bool insideFull(const Amg::Vector2D& locpo, double tol1 = 0., double tol2 = 0.) const;
140
142 virtual void initCache() override;
143
145 std::vector<TDD_real_t> m_boundValues;
148};
149
150} // end of namespace
151
153#endif // TRKSURFACES_DIAMONDBOUNDS_H
double TDD_real_t
The BoundaryCheck class allows to steer the way surface boundaries are used for inside/outside checks...
double alpha2() const
This method returns the opening angle alpha in point A'.
virtual void initCache() override
initialize the alpha1/2 cache - needed also for object persistency
virtual double minDistance(const Amg::Vector2D &pos) const override
Minimal distance to boundary ( > 0 if outside and <=0 if inside)
double medHalflengthX() const
This method returns the (maximal) halflength in X (first coordinate of local surface frame)
RotatedDiamondBounds()
Default Constructor, needed for persistency.
RotatedDiamondBounds * clone() const override
Virtual constructor.
RotatedDiamondBounds(RotatedDiamondBounds &&diabo) noexcept=default
Move constructor.
bool insideFull(const Amg::Vector2D &locpo, double tol1=0., double tol2=0.) const
inside() method for a full symmetric diamond
RotatedDiamondBounds(const RotatedDiamondBounds &diabo)=default
Copy constructor.
double minHalflengthX() const
This method returns the halflength in X at minimal Y (first coordinate of local surface frame)
RotatedDiamondBounds & operator=(const RotatedDiamondBounds &sbo)=default
Assignment operator.
virtual BoundsType type() const override
Return the bounds type.
virtual bool insideLoc1(const Amg::Vector2D &locpo, double tol1=0.) const override
This method checks inside bounds in loc1.
double maxHalflengthX() const
This method returns the halflength in X at maximal Y (first coordinate of local surface frame)
virtual ~RotatedDiamondBounds()=default
Destructor.
RotatedDiamondBounds & operator=(RotatedDiamondBounds &&sbo) noexcept=default
Assignment operator.
std::vector< TDD_real_t > m_boundValues
Internal parameters stored in the geometry.
double halflengthY1() const
This method returns the halflength in Y of trapezoid at negative/positive Y (second coordinate)
virtual bool operator==(const SurfaceBounds &diabo) const override
Equality operator.
double alpha1() const
This method returns the opening angle alpha in point A.
double halflengthY2() const
virtual bool insideLoc2(const Amg::Vector2D &locpo, double tol2=0.) const override
This method checks inside bounds in loc2.
virtual double r() const override
This method returns the maximal extension on the local plane.
BoundValues
BoundValues for better readability.
SurfaceBounds()=default
Default Constructor.
BoundsType
This enumerator simplifies the persistency, by saving a dynamic_cast to happen.
Eigen::Matrix< double, 2, 1 > Vector2D
Ensure that the ATLAS eigen extensions are properly loaded.
-event-from-file