ATLAS Offline Software
Public Types | Public Member Functions | Protected Member Functions | List of all members
Trk::SurfaceBounds Class Referenceabstract

#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
}
 

Public Member Functions

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

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.

59  {
60  Cone = 0,
61  Cylinder = 1,
62  Diamond = 2,
63  Disc = 3,
64  Ellipse = 5,
65  Rectangle = 6,
66  RotatedTrapezoid = 7,
67  Trapezoid = 8,
68  Triangle = 9,
69  DiscTrapezoidal = 10,
70  Annulus = 11,
71  Other = 12
72 
73  };

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()

virtual SurfaceBounds* Trk::SurfaceBounds::clone ( ) const
pure virtual

◆ dump() [1/2]

virtual MsgStream& Trk::SurfaceBounds::dump ( MsgStream &  sl) const
pure virtual

◆ dump() [2/2]

virtual std::ostream& Trk::SurfaceBounds::dump ( std::ostream &  sl) const
pure virtual

◆ initCache()

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

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.

129 {}

◆ inside() [1/2]

virtual bool Trk::SurfaceBounds::inside ( const Amg::Vector2D locpo,
const BoundaryCheck bchk 
) const
pure virtual

◆ 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()

virtual double Trk::SurfaceBounds::minDistance ( const Amg::Vector2D pos) const
pure virtual

◆ 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==()

virtual bool Trk::SurfaceBounds::operator== ( const SurfaceBounds sb) const
pure virtual

◆ r()

virtual double Trk::SurfaceBounds::r ( ) const
pure virtual

◆ 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()

virtual BoundsType Trk::SurfaceBounds::type ( ) const
pure virtual

The documentation for this class was generated from the following file:
Trk::SurfaceBounds::DiscTrapezoidal
@ DiscTrapezoidal
Definition: SurfaceBounds.h:69
Trk::SurfaceBounds::Cone
@ Cone
Definition: SurfaceBounds.h:60
Trk::SurfaceBounds::Rectangle
@ Rectangle
Definition: SurfaceBounds.h:65
Trk::SurfaceBounds::Annulus
@ Annulus
Definition: SurfaceBounds.h:70
Trk::SurfaceBounds::Diamond
@ Diamond
Definition: SurfaceBounds.h:62
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
keylayer_zslicemap.sb
sb
Definition: keylayer_zslicemap.py:192
Trk::SurfaceBounds::Trapezoid
@ Trapezoid
Definition: SurfaceBounds.h:67
Trk::SurfaceBounds::Disc
@ Disc
Definition: SurfaceBounds.h:63
Trk::SurfaceBounds::RotatedTrapezoid
@ RotatedTrapezoid
Definition: SurfaceBounds.h:66
Trk::SurfaceBounds::Other
@ Other
Definition: SurfaceBounds.h:71
Trk::SurfaceBounds::Triangle
@ Triangle
Definition: SurfaceBounds.h:68
Trk::SurfaceBounds::Ellipse
@ Ellipse
Definition: SurfaceBounds.h:64
Trk::SurfaceBounds::Cylinder
@ Cylinder
Definition: SurfaceBounds.h:61