ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::SurfaceBounds Class Referenceabstract

Abstract base class for surface bounds to be specified. More...

#include <SurfaceBounds.h>

Inherited by Trk::AnnulusBounds, Trk::AnnulusBoundsPC, Trk::ConeBounds, Trk::CylinderBounds, Trk::DiamondBounds, Trk::DiscBounds, Trk::DiscTrapezoidalBounds, Trk::EllipseBounds, Trk::InvalidBounds, Trk::NoBounds, Trk::RectangleBounds, Trk::RotatedDiamondBounds, Trk::RotatedTrapezoidBounds, Trk::TrapezoidBounds, and Trk::TriangleBounds.

Collaboration diagram for Trk::SurfaceBounds:

Public Types

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
}
 This enumerator simplifies the persistency, by saving a dynamic_cast to happen. More...

Public Member Functions

 SurfaceBounds ()=default
 Default Constructor.
 SurfaceBounds (const SurfaceBounds &)=default
SurfaceBoundsoperator= (const SurfaceBounds &)=default
 SurfaceBounds (SurfaceBounds &&) noexcept=default
SurfaceBoundsoperator= (SurfaceBounds &&) noexcept=default
virtual ~SurfaceBounds ()=default
 Destructor.
virtual SurfaceBoundsclone () const =0
 clone() method to make deep copy in Surface copy constructor and for assigment operator of the Surface class.
virtual bool operator== (const SurfaceBounds &sb) const =0
 Equality operator.
virtual bool operator!= (const SurfaceBounds &sb) const
 Non-Equality operator.
virtual BoundsType type () const =0
 Return the bounds type - for persistency optimization.
virtual bool inside (const Amg::Vector2D &locpo, double tol1=0., double tol2=0.) const =0
 Each Bounds has a method inside, which checks if a LocalPosition is inside the bounds.
virtual bool inside (const Amg::Vector2D &locpo, const BoundaryCheck &bchk) const =0
virtual bool insideLoc1 (const Amg::Vector2D &locpo, double tol1=0.) const =0
 Extend the interface to for single inside Loc 1 / Loc2 tests.
virtual bool insideLoc2 (const Amg::Vector2D &locpo, double tol2=0.) const =0
 Extend the interface to for single inside Loc 1 / Loc2 tests.
virtual double minDistance (const Amg::Vector2D &pos) const =0
 Minimal distance to boundary ( > 0 if outside and <=0 if inside)
virtual double r () const =0
 Interface method for the maximal extension or the radius.
virtual MsgStream & dump (MsgStream &sl) const =0
 Output Method for MsgStream, to be overloaded by child classes.
virtual std::ostream & dump (std::ostream &sl) const =0
 Output Method for std::ostream, to be overloaded by child classes.

Protected Member Functions

void swap (double &b1, double &b2)
 Swap method to be called from DiscBounds or TrapezoidalBounds.
virtual void initCache ()
 virtual initCache method for object persistency

Detailed Description

Abstract base class for surface bounds to be specified.

Surface bounds provide:

Author
Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch

Definition at line 46 of file SurfaceBounds.h.

Member Enumeration Documentation

◆ BoundsType

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.

Constructor & Destructor Documentation

◆ SurfaceBounds() [1/3]

Trk::SurfaceBounds::SurfaceBounds ( )
default

Default Constructor.

◆ SurfaceBounds() [2/3]

Trk::SurfaceBounds::SurfaceBounds ( const SurfaceBounds & )
default

◆ SurfaceBounds() [3/3]

Trk::SurfaceBounds::SurfaceBounds ( SurfaceBounds && )
defaultnoexcept

◆ ~SurfaceBounds()

virtual Trk::SurfaceBounds::~SurfaceBounds ( )
virtualdefault

Destructor.

Member Function Documentation

◆ clone()

◆ dump() [1/2]

◆ dump() [2/2]

◆ initCache()

virtual void Trk::SurfaceBounds::initCache ( )
inlineprotectedvirtual

virtual initCache method for object persistency

Reimplemented in Trk::ConeBounds, Trk::DiamondBounds, Trk::RotatedDiamondBounds, and Trk::RotatedTrapezoidBounds.

Definition at line 129 of file SurfaceBounds.h.

129{}

◆ inside() [1/2]

◆ inside() [2/2]

virtual bool Trk::SurfaceBounds::inside ( const Amg::Vector2D & locpo,
double tol1 = 0.,
double tol2 = 0. ) const
pure virtual

◆ insideLoc1()

virtual bool Trk::SurfaceBounds::insideLoc1 ( const Amg::Vector2D & locpo,
double tol1 = 0. ) const
pure virtual

◆ insideLoc2()

virtual bool Trk::SurfaceBounds::insideLoc2 ( const Amg::Vector2D & locpo,
double tol2 = 0. ) const
pure virtual

◆ minDistance()

◆ operator!=()

bool Trk::SurfaceBounds::operator!= ( const SurfaceBounds & sb) const
inlinevirtual

Non-Equality operator.

Reimplemented in Trk::InvalidBounds.

Definition at line 141 of file SurfaceBounds.h.

142{
143 return !((*this) == sb);
144}

◆ operator=() [1/2]

SurfaceBounds & Trk::SurfaceBounds::operator= ( const SurfaceBounds & )
default

◆ operator=() [2/2]

SurfaceBounds & Trk::SurfaceBounds::operator= ( SurfaceBounds && )
defaultnoexcept

◆ operator==()

◆ r()

◆ swap()

void Trk::SurfaceBounds::swap ( double & b1,
double & b2 )
inlineprotected

Swap method to be called from DiscBounds or TrapezoidalBounds.

Definition at line 133 of file SurfaceBounds.h.

134{
135 double tmp = b1;
136 b1 = b2;
137 b2 = tmp;
138}

◆ type()


The documentation for this class was generated from the following file: