ATLAS Offline Software
|
#include <TrapezoidBounds.h>
Public Types | |
enum | BoundValues { bv_minHalfX = 0, bv_maxHalfX = 1, bv_halfY = 2, bv_length = 3 } |
enum | BoundsType { Cone = 0, Cylinder = 1, Diamond = 2, Disc = 3, Ellipse = 5, Rectangle = 6, RotatedTrapezoid = 7, Trapezoid = 8, Triangle = 9, DiscTrapezoidal = 10, Annulus = 11, Other = 12 } |
Public Member Functions | |
TrapezoidBounds () | |
Default Constructor, needed for persistency. More... | |
TrapezoidBounds (const TrapezoidBounds &trabo)=default | |
Copy constructor. More... | |
TrapezoidBounds & | operator= (const TrapezoidBounds &sbo)=default |
Assignment operator. More... | |
TrapezoidBounds (TrapezoidBounds &&trabo) noexcept=default | |
Move constructor. More... | |
TrapezoidBounds & | operator= (TrapezoidBounds &&sbo) noexcept=default |
Move Assignment operator. More... | |
virtual | ~TrapezoidBounds ()=default |
Destructor. More... | |
TrapezoidBounds (double minhalex, double maxhalex, double haley) | |
Constructor for symmetric Trapezoid. More... | |
TrapezoidBounds (double minhalex, double haley, double alpha, double beta) | |
Constructor for arbitrary Trapezoid. More... | |
virtual TrapezoidBounds * | clone () const override |
Virtual constructor. More... | |
virtual BoundsType | type () const override |
Return the type of the bounds for persistency. More... | |
virtual bool | operator== (const SurfaceBounds &trabo) const override |
Equality operator. More... | |
double | minHalflengthPhi () const |
This method returns the minimal halflength in phi (first coordinate of local surface frame) More... | |
double | maxHalflengthPhi () const |
This method returns the maximal halflength in phi (first coordinate of local surface frame) More... | |
double | halflengthEta () const |
This method returns the halflength in eta (second coordinate of local surface frame) More... | |
double | minHalflengthX () const |
This method returns the minimal halflength in X (first coordinate of local surface frame) More... | |
double | maxHalflengthX () const |
This method returns the maximal halflength in X (first coordinate of local surface frame) More... | |
double | halflengthY () const |
This method returns the halflength in Y (second coordinate of local surface frame) More... | |
virtual double | r () const override |
This method returns the maximal extension on the local plane. More... | |
double | alpha () const |
This method returns the opening angle alpha in point A (negative local phi) More... | |
double | beta () const |
This method returns the opening angle beta in point B (positive local phi) More... | |
virtual bool | inside (const Amg::Vector2D &locpo, double tol1=0., double tol2=0.) const override |
The orientation of the Trapezoid is according to the figure above, in words: the shorter of the two parallel sides of the trapezoid intersects with the negative \( y \) - axis of the local frame. More... | |
virtual bool | inside (const Amg::Vector2D &locpo, const BoundaryCheck &bchk) const override |
virtual bool | insideLoc1 (const Amg::Vector2D &locpo, double tol1=0.) const override |
This method checks inside bounds in loc1. More... | |
virtual bool | insideLoc2 (const Amg::Vector2D &locpo, double tol2=0.) const override |
This method checks inside bounds in loc2. More... | |
virtual double | minDistance (const Amg::Vector2D &pos) const override |
Minimal distance to boundary ( > 0 if outside and <=0 if inside) More... | |
virtual MsgStream & | dump (MsgStream &sl) const override |
Output Method for MsgStream. More... | |
virtual std::ostream & | dump (std::ostream &sl) const override |
Output Method for std::ostream. More... | |
virtual bool | operator!= (const SurfaceBounds &sb) const |
Non-Equality operator. More... | |
Protected Member Functions | |
void | swap (double &b1, double &b2) |
Swap method to be called from DiscBounds or TrapezoidalBounds. More... | |
virtual void | initCache () |
virtual initCache method for object persistency More... | |
Private Member Functions | |
bool | insideFull (const Amg::Vector2D &locpo, double tol1=0., double tol2=0.) const |
inside() method for a full symmetric trapezoid More... | |
bool | insideExclude (const Amg::Vector2D &locpo, double tol1=0., double tol2=0.) const |
inside() method for the triangular exclude area for an arbitrary trapezoid More... | |
Static Private Member Functions | |
static bool | isAbove (const Amg::Vector2D &locpo, double tol1, double tol2, double k, double d) |
isAbove() method for checking whether a point lies above or under a straight line More... | |
Private Attributes | |
std::vector< TDD_real_t > | m_boundValues |
TDD_real_t | m_alpha |
TDD_real_t | m_beta |
Friends | |
class | ::TrapezoidBoundsCnv_p1 |
Bounds for a trapezoidal, planar Surface.
Definition at line 42 of file TrapezoidBounds.h.
|
inherited |
This enumerator simplifies the persistency, by saving a dynamic_cast to happen.
Other is reserved for the GeometrySurfaces implementation.
Enumerator | |
---|---|
Cone | |
Cylinder | |
Diamond | |
Disc | |
Ellipse | |
Rectangle | |
RotatedTrapezoid | |
Trapezoid | |
Triangle | |
DiscTrapezoidal | |
Annulus | |
Other |
Definition at line 58 of file SurfaceBounds.h.
Enumerator | |
---|---|
bv_minHalfX | |
bv_maxHalfX | |
bv_halfY | |
bv_length |
Definition at line 47 of file TrapezoidBounds.h.
Trk::TrapezoidBounds::TrapezoidBounds | ( | ) |
Default Constructor, needed for persistency.
Definition at line 19 of file TrapezoidBounds.cxx.
|
default |
Copy constructor.
|
defaultnoexcept |
Move constructor.
|
virtualdefault |
Destructor.
Trk::TrapezoidBounds::TrapezoidBounds | ( | double | minhalex, |
double | maxhalex, | ||
double | haley | ||
) |
Trk::TrapezoidBounds::TrapezoidBounds | ( | double | minhalex, |
double | haley, | ||
double | alpha, | ||
double | beta | ||
) |
Constructor for arbitrary Trapezoid.
Definition at line 39 of file TrapezoidBounds.cxx.
double Trk::TrapezoidBounds::alpha | ( | ) | const |
This method returns the opening angle alpha in point A (negative local phi)
double Trk::TrapezoidBounds::beta | ( | ) | const |
This method returns the opening angle beta in point B (positive local phi)
|
overridevirtual |
Virtual constructor.
Implements Trk::SurfaceBounds.
|
overridevirtual |
Output Method for MsgStream.
Implements Trk::SurfaceBounds.
Definition at line 257 of file TrapezoidBounds.cxx.
|
overridevirtual |
Output Method for std::ostream.
Implements Trk::SurfaceBounds.
Definition at line 269 of file TrapezoidBounds.cxx.
double Trk::TrapezoidBounds::halflengthEta | ( | ) | const |
This method returns the halflength in eta (second coordinate of local surface frame)
double Trk::TrapezoidBounds::halflengthY | ( | ) | const |
This method returns the halflength in Y (second coordinate of local surface frame)
|
inlineprotectedvirtualinherited |
virtual initCache method for object persistency
Reimplemented in Trk::RotatedTrapezoidBounds, Trk::ConeBounds, Trk::RotatedDiamondBounds, and Trk::DiamondBounds.
Definition at line 129 of file SurfaceBounds.h.
|
overridevirtual |
|
overridevirtual |
The orientation of the Trapezoid is according to the figure above, in words: the shorter of the two parallel sides of the trapezoid intersects with the negative \( y \) - axis of the local frame.
The cases are:
(0) \( y \) or \( x \) bounds are 0 || 0
(1) LocalPosition is outside \( y \) bounds
(2) LocalPosition is inside \( y \) bounds, but outside maximum \( x \) bounds
(3) LocalPosition is inside \( y \) bounds AND inside minimum \( x \) bounds
(4) LocalPosition is inside \( y \) bounds AND inside maximum \( x \) bounds, so that it depends on the \( eta \) coordinate (5) LocalPosition fails test of (4)
The inside check is done using single equations of straight lines and one has to take care if a point lies on the positive \( x \) half area(I) or the negative one(II). Denoting \( |x_{min}| \) and \( | x_{max} | \) as minHalfX
respectively maxHalfX
, such as \( | y_{H} | \) as halfY
, the equations for the straing lines in (I) and (II) can be written as:
Implements Trk::SurfaceBounds.
Definition at line 139 of file TrapezoidBounds.cxx.
|
private |
inside() method for the triangular exclude area for an arbitrary trapezoid
Definition at line 176 of file TrapezoidBounds.cxx.
|
private |
inside() method for a full symmetric trapezoid
Definition at line 148 of file TrapezoidBounds.cxx.
|
overridevirtual |
This method checks inside bounds in loc1.
Implements Trk::SurfaceBounds.
|
overridevirtual |
This method checks inside bounds in loc2.
Implements Trk::SurfaceBounds.
|
staticprivate |
isAbove() method for checking whether a point lies above or under a straight line
Definition at line 192 of file TrapezoidBounds.cxx.
double Trk::TrapezoidBounds::maxHalflengthPhi | ( | ) | const |
This method returns the maximal halflength in phi (first coordinate of local surface frame)
double Trk::TrapezoidBounds::maxHalflengthX | ( | ) | const |
This method returns the maximal halflength in X (first coordinate of local surface frame)
|
overridevirtual |
Minimal distance to boundary ( > 0 if outside and <=0 if inside)
Implements Trk::SurfaceBounds.
Definition at line 200 of file TrapezoidBounds.cxx.
double Trk::TrapezoidBounds::minHalflengthPhi | ( | ) | const |
This method returns the minimal halflength in phi (first coordinate of local surface frame)
double Trk::TrapezoidBounds::minHalflengthX | ( | ) | const |
This method returns the minimal halflength in X (first coordinate of local surface frame)
|
inlinevirtualinherited |
Non-Equality operator.
Reimplemented in Trk::InvalidBounds.
Definition at line 141 of file SurfaceBounds.h.
|
default |
Assignment operator.
|
defaultnoexcept |
Move Assignment operator.
|
overridevirtual |
Equality operator.
Implements Trk::SurfaceBounds.
Definition at line 53 of file TrapezoidBounds.cxx.
|
overridevirtual |
This method returns the maximal extension on the local plane.
Implements Trk::SurfaceBounds.
|
inlineprotectedinherited |
Swap method to be called from DiscBounds or TrapezoidalBounds.
Definition at line 133 of file SurfaceBounds.h.
|
inlineoverridevirtual |
Return the type of the bounds for persistency.
Implements Trk::SurfaceBounds.
Definition at line 84 of file TrapezoidBounds.h.
|
friend |
Definition at line 166 of file TrapezoidBounds.h.
|
private |
Definition at line 178 of file TrapezoidBounds.h.
|
private |
Definition at line 179 of file TrapezoidBounds.h.
|
private |
Definition at line 177 of file TrapezoidBounds.h.