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

#include <InvalidBounds.h>

Inheritance diagram for Trk::InvalidBounds:
Collaboration diagram for Trk::InvalidBounds:

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

 InvalidBounds ()=default
 Default Constructor. More...
 
 InvalidBounds (const InvalidBounds &)=default
 
InvalidBoundsoperator= (const InvalidBounds &)=default
 
 InvalidBounds (InvalidBounds &&) noexcept=default
 
InvalidBoundsoperator= (InvalidBounds &&) noexcept=default
 
virtual ~InvalidBounds ()=default
 Destructor. More...
 
virtual bool operator== (const SurfaceBounds &) const override
 Equality operator. More...
 
virtual bool operator!= (const SurfaceBounds &) const override
 Non-Equality operator. More...
 
InvalidBoundsoperator& ()
 'address of' will return nullptr More...
 
virtual SurfaceBounds::BoundsType type () const override
 Return SurfaceBounds for persistency. More...
 
virtual bool inside (const Amg::Vector2D &, double=0., double=0.) const override
 Method inside() returns false for any case. More...
 
virtual bool inside (const Amg::Vector2D &, const BoundaryCheck &) const override
 
virtual bool insideLoc1 (const Amg::Vector2D &, double=0.) const override
 This method checks inside bounds in loc1. More...
 
virtual bool insideLoc2 (const Amg::Vector2D &, double=0.) const override
 This method checks inside bounds in loc2. More...
 
virtual double minDistance (const Amg::Vector2D &) const override
 Minimal distance to boundary (=0 if inside) More...
 
virtual InvalidBoundsclone () const override
 Invalidate cloning of an invalid object. More...
 
virtual double r () const override
 r() method to complete inherited interface 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...
 

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

Invalid Bounds object

Author
Shaun Roe

Definition at line 29 of file InvalidBounds.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

◆ InvalidBounds() [1/3]

Trk::InvalidBounds::InvalidBounds ( )
default

Default Constructor.

◆ InvalidBounds() [2/3]

Trk::InvalidBounds::InvalidBounds ( const InvalidBounds )
default

◆ InvalidBounds() [3/3]

Trk::InvalidBounds::InvalidBounds ( InvalidBounds &&  )
defaultnoexcept

◆ ~InvalidBounds()

virtual Trk::InvalidBounds::~InvalidBounds ( )
virtualdefault

Destructor.

Member Function Documentation

◆ clone()

virtual InvalidBounds* Trk::InvalidBounds::clone ( ) const
inlineoverridevirtual

Invalidate cloning of an invalid object.

Implements Trk::SurfaceBounds.

Definition at line 69 of file InvalidBounds.h.

69 { return nullptr; }

◆ dump() [1/2]

MsgStream & Trk::InvalidBounds::dump ( MsgStream &  sl) const
inlineoverridevirtual

Output Method for MsgStream.

Implements Trk::SurfaceBounds.

Definition at line 84 of file InvalidBounds.h.

85 {
86  sl << "Trk::InvalidBounds ... invalid surface" << endmsg;
87  return sl;
88 }

◆ dump() [2/2]

std::ostream & Trk::InvalidBounds::dump ( std::ostream &  sl) const
inlineoverridevirtual

Output Method for std::ostream.

Implements Trk::SurfaceBounds.

Definition at line 91 of file InvalidBounds.h.

92 {
93  sl << "Trk::InvalidBounds ... invalid surface" << std::endl;
94  return sl;
95 }

◆ initCache()

virtual void Trk::SurfaceBounds::initCache ( )
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.

129 {}

◆ inside() [1/2]

virtual bool Trk::InvalidBounds::inside ( const Amg::Vector2D ,
const BoundaryCheck  
) const
inlineoverridevirtual

Implements Trk::SurfaceBounds.

Definition at line 56 of file InvalidBounds.h.

56 { return false; }

◆ inside() [2/2]

virtual bool Trk::InvalidBounds::inside ( const Amg::Vector2D ,
double  = 0.,
double  = 0. 
) const
inlineoverridevirtual

Method inside() returns false for any case.

Implements Trk::SurfaceBounds.

Definition at line 55 of file InvalidBounds.h.

55 { return false; }

◆ insideLoc1()

virtual bool Trk::InvalidBounds::insideLoc1 ( const Amg::Vector2D ,
double  = 0. 
) const
inlineoverridevirtual

This method checks inside bounds in loc1.

  • loc1/loc2 correspond to the natural coordinates of the surface

Implements Trk::SurfaceBounds.

Definition at line 59 of file InvalidBounds.h.

59 { return false; }

◆ insideLoc2()

virtual bool Trk::InvalidBounds::insideLoc2 ( const Amg::Vector2D ,
double  = 0. 
) const
inlineoverridevirtual

This method checks inside bounds in loc2.

  • loc1/loc2 correspond to the natural coordinates of the surface

Implements Trk::SurfaceBounds.

Definition at line 63 of file InvalidBounds.h.

63 { return false; }

◆ minDistance()

virtual double Trk::InvalidBounds::minDistance ( const Amg::Vector2D ) const
inlineoverridevirtual

Minimal distance to boundary (=0 if inside)

Implements Trk::SurfaceBounds.

Definition at line 66 of file InvalidBounds.h.

66 { return std::nan(""); }

◆ operator!=()

virtual bool Trk::InvalidBounds::operator!= ( const SurfaceBounds ) const
inlineoverridevirtual

Non-Equality operator.

Reimplemented from Trk::SurfaceBounds.

Definition at line 46 of file InvalidBounds.h.

46 { return true; }

◆ operator&()

InvalidBounds* Trk::InvalidBounds::operator& ( )
inline

'address of' will return nullptr

Definition at line 49 of file InvalidBounds.h.

49 { return nullptr; }

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ operator==()

virtual bool Trk::InvalidBounds::operator== ( const SurfaceBounds ) const
inlineoverridevirtual

Equality operator.

Implements Trk::SurfaceBounds.

Definition at line 43 of file InvalidBounds.h.

43 { return false; }

◆ r()

virtual double Trk::InvalidBounds::r ( ) const
inlineoverridevirtual

r() method to complete inherited interface

Implements Trk::SurfaceBounds.

Definition at line 72 of file InvalidBounds.h.

72 { return std::nan(""); }

◆ swap()

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

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 SurfaceBounds::BoundsType Trk::InvalidBounds::type ( ) const
inlineoverridevirtual

Return SurfaceBounds for persistency.

Implements Trk::SurfaceBounds.

Definition at line 52 of file InvalidBounds.h.

52 { return SurfaceBounds::Other; }

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
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
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