ATLAS Offline Software
InvalidBounds.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 // CylinderBounds.h, (c) ATLAS Detector software
8 
9 #ifndef TRKSURFACES_INVALIDBOUNDS_H
10 #define TRKSURFACES_INVALIDBOUNDS_H
11 
14 
15 // Eigen
17 
18 class MsgStream;
19 
20 namespace Trk {
21 
30 {
31 public:
33  InvalidBounds() = default;
34 
35  InvalidBounds(const InvalidBounds&) = default;
38  InvalidBounds& operator=(InvalidBounds&&) noexcept = default;
40  virtual ~InvalidBounds() = default;
41 
43  virtual bool operator==(const SurfaceBounds&) const override { return false; }
44 
46  virtual bool operator!=(const SurfaceBounds&) const override { return true; }
47 
49  InvalidBounds* operator&() { return nullptr; }
50 
52  virtual SurfaceBounds::BoundsType type() const override { return SurfaceBounds::Other; }
53 
55  virtual bool inside(const Amg::Vector2D&, double = 0., double = 0.) const override { return false; }
56  virtual bool inside(const Amg::Vector2D&, const BoundaryCheck&) const override { return false; }
59  virtual bool insideLoc1(const Amg::Vector2D&, double = 0.) const override { return false; }
60 
63  virtual bool insideLoc2(const Amg::Vector2D&, double = 0.) const override { return false; }
64 
66  virtual double minDistance(const Amg::Vector2D&) const override { return std::nan(""); }
67 
69  virtual InvalidBounds* clone() const override { return nullptr; }
70 
72  virtual double r() const override { return std::nan(""); }
73 
75  virtual MsgStream& dump(MsgStream& sl) const override;
76 
78  virtual std::ostream& dump(std::ostream& sl) const override;
79 
80 private:
81 };
82 
83 inline MsgStream&
84 InvalidBounds::dump(MsgStream& sl) const
85 {
86  sl << "Trk::InvalidBounds ... invalid surface" << endmsg;
87  return sl;
88 }
89 
90 inline std::ostream&
91 InvalidBounds::dump(std::ostream& sl) const
92 {
93  sl << "Trk::InvalidBounds ... invalid surface" << std::endl;
94  return sl;
95 }
96 
97 } // end of namespace
98 
99 #endif // TRKSURFACES_INVALIDBOUNDS_H
Trk::InvalidBounds::InvalidBounds
InvalidBounds(const InvalidBounds &)=default
Trk::SurfaceBounds::BoundsType
BoundsType
Definition: SurfaceBounds.h:59
Trk::InvalidBounds
Definition: InvalidBounds.h:30
Trk::InvalidBounds::type
virtual SurfaceBounds::BoundsType type() const override
Return SurfaceBounds for persistency.
Definition: InvalidBounds.h:52
Trk::InvalidBounds::insideLoc1
virtual bool insideLoc1(const Amg::Vector2D &, double=0.) const override
This method checks inside bounds in loc1.
Definition: InvalidBounds.h:59
Trk::InvalidBounds::inside
virtual bool inside(const Amg::Vector2D &, const BoundaryCheck &) const override
Definition: InvalidBounds.h:56
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
Trk::SurfaceBounds
Definition: SurfaceBounds.h:47
Trk::InvalidBounds::operator=
InvalidBounds & operator=(const InvalidBounds &)=default
Trk::InvalidBounds::inside
virtual bool inside(const Amg::Vector2D &, double=0., double=0.) const override
Method inside() returns false for any case.
Definition: InvalidBounds.h:55
Trk::InvalidBounds::operator&
InvalidBounds * operator&()
'address of' will return nullptr
Definition: InvalidBounds.h:49
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
ParamDefs.h
Trk::InvalidBounds::r
virtual double r() const override
r() method to complete inherited interface
Definition: InvalidBounds.h:72
GeoPrimitives.h
SurfaceBounds.h
Trk::InvalidBounds::minDistance
virtual double minDistance(const Amg::Vector2D &) const override
Minimal distance to boundary (=0 if inside)
Definition: InvalidBounds.h:66
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
Trk::InvalidBounds::insideLoc2
virtual bool insideLoc2(const Amg::Vector2D &, double=0.) const override
This method checks inside bounds in loc2.
Definition: InvalidBounds.h:63
Trk::InvalidBounds::clone
virtual InvalidBounds * clone() const override
Invalidate cloning of an invalid object.
Definition: InvalidBounds.h:69
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::InvalidBounds::InvalidBounds
InvalidBounds(InvalidBounds &&) noexcept=default
Trk::BoundaryCheck
Definition: BoundaryCheck.h:51
Trk::InvalidBounds::dump
virtual MsgStream & dump(MsgStream &sl) const override
Output Method for MsgStream.
Definition: InvalidBounds.h:84
Trk::SurfaceBounds::Other
@ Other
Definition: SurfaceBounds.h:71
python.CaloScaleNoiseConfig.default
default
Definition: CaloScaleNoiseConfig.py:79
Trk::InvalidBounds::InvalidBounds
InvalidBounds()=default
Default Constructor.
Trk::InvalidBounds::operator!=
virtual bool operator!=(const SurfaceBounds &) const override
Non-Equality operator.
Definition: InvalidBounds.h:46