ATLAS Offline Software
TriangleBounds.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 // TriangleBounds.h, (c) ATLAS Detector software
8 
9 #ifndef TRKSURFACES_TRIANGLEBOUNDS_H
10 #define TRKSURFACES_TRIANGLEBOUNDS_H
11 
15 #include <utility>
16 
17 class MsgStream;
18 
19 #ifdef TRKDETDESCR_USEFLOATPRECISON
20 typedef float TDD_real_t;
21 #else
22 typedef double TDD_real_t;
23 #endif
24 
25 namespace Trk {
26 
38 class TriangleBounds final : public SurfaceBounds
39 {
40 
41 public:
44  {
45  bv_x1 = 0,
46  bv_y1 = 1,
47  bv_x2 = 2,
48  bv_y2 = 3,
49  bv_x3 = 4,
50  bv_y3 = 5,
51  bv_length = 6
52  };
53 
56 
58  TriangleBounds(const TriangleBounds& tribo) = default;
59 
61  TriangleBounds& operator=(const TriangleBounds& recbo) = default;
62 
64  TriangleBounds(TriangleBounds&& tribo) noexcept = default;
65 
67  TriangleBounds& operator=(TriangleBounds&& recbo) noexcept = default;
68 
70  virtual ~TriangleBounds() = default;
71 
73  TriangleBounds(const std::vector<std::pair<float, float>>&);
74 
76  TriangleBounds(const std::vector<std::pair<double, double>>&);
77 
80 
82  virtual bool operator==(const SurfaceBounds& sbo) const override;
83 
85  virtual TriangleBounds* clone() const override;
86 
88  virtual BoundsType type() const override final { return SurfaceBounds::Triangle; }
89 
91  virtual bool inside(const Amg::Vector2D& locpo, double tol1 = 0., double tol2 = 0.) const override final;
92  virtual bool inside(const Amg::Vector2D& locpo, const BoundaryCheck& bchk) const override final;
93 
96  virtual bool insideLoc1(const Amg::Vector2D& locpo, double tol1 = 0.) const override final;
97 
100  virtual bool insideLoc2(const Amg::Vector2D& locpo, double tol2 = 0.) const override final;
101 
103  virtual double minDistance(const Amg::Vector2D& pos) const override final;
104 
107 
109  virtual double r() const override final;
110 
112  virtual MsgStream& dump(MsgStream& sl) const override;
113 
115  virtual std::ostream& dump(std::ostream& sl) const override;
116 
117 private:
119 };
120 } // end of namespace
121 
122 #include "TrkSurfaces/TriangleBounds.icc"
123 #endif // TRKSURFACES_RECTANGLEBOUNDS_H
Trk::SurfaceBounds::BoundsType
BoundsType
Definition: SurfaceBounds.h:59
Trk::TriangleBounds::~TriangleBounds
virtual ~TriangleBounds()=default
Destructor.
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
Trk::SurfaceBounds
Definition: SurfaceBounds.h:47
Trk::TriangleBounds::inside
virtual bool inside(const Amg::Vector2D &locpo, double tol1=0., double tol2=0.) const override final
This method checks if the provided local coordinates are inside the surface bounds.
Definition: TriangleBounds.cxx:73
Trk::TriangleBounds::TriangleBounds
TriangleBounds(const TriangleBounds &tribo)=default
Copy constructor.
Trk::TriangleBounds::r
virtual double r() const override final
This method returns the maximal extension on the local plane, i.e.
TRTCalib_cfilter.p1
p1
Definition: TRTCalib_cfilter.py:130
Trk::TriangleBounds::BoundValues
BoundValues
Definition: TriangleBounds.h:44
Trk::TriangleBounds::type
virtual BoundsType type() const override final
Return the type of the bounds for persistency.
Definition: TriangleBounds.h:88
Trk::TriangleBounds::bv_length
@ bv_length
Definition: TriangleBounds.h:51
Trk::TriangleBounds::vertices
std::vector< std::pair< TDD_real_t, TDD_real_t > > vertices() const
This method returns the coordinates of vertices.
Trk::TriangleBounds::clone
virtual TriangleBounds * clone() const override
Virtual constructor.
Trk::TriangleBounds::bv_x3
@ bv_x3
Definition: TriangleBounds.h:49
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
Trk::TriangleBounds::operator=
TriangleBounds & operator=(const TriangleBounds &recbo)=default
Assignment Operator.
ParamDefs.h
Trk::TriangleBounds::m_boundValues
std::vector< TDD_real_t > m_boundValues
Definition: TriangleBounds.h:118
Trk::TriangleBounds::bv_y2
@ bv_y2
Definition: TriangleBounds.h:48
GeoPrimitives.h
SurfaceBounds.h
TRTCalib_cfilter.p2
p2
Definition: TRTCalib_cfilter.py:131
Trk::TriangleBounds
Definition: TriangleBounds.h:39
Trk::TriangleBounds::minDistance
virtual double minDistance(const Amg::Vector2D &pos) const override final
Minimal distance to boundary ( > 0 if outside and <=0 if inside)
Definition: TriangleBounds.cxx:176
vector
Definition: MultiHisto.h:13
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Amg
Definition of ATLAS Math & Geometry primitives (Amg)
Definition: AmgStringHelpers.h:19
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
Trk::TriangleBounds::dump
virtual MsgStream & dump(MsgStream &sl) const override
Output Method for MsgStream.
Definition: TriangleBounds.cxx:226
Trk::TriangleBounds::bv_x2
@ bv_x2
Definition: TriangleBounds.h:47
Trk::TriangleBounds::insideLoc2
virtual bool insideLoc2(const Amg::Vector2D &locpo, double tol2=0.) const override final
This method checks inside bounds in loc2.
Trk::TriangleBounds::operator==
virtual bool operator==(const SurfaceBounds &sbo) const override
Equality operator.
Definition: TriangleBounds.cxx:63
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Trk::TriangleBounds::TriangleBounds
TriangleBounds(TriangleBounds &&tribo) noexcept=default
Move constructor.
Trk::TriangleBounds::insideLoc1
virtual bool insideLoc1(const Amg::Vector2D &locpo, double tol1=0.) const override final
This method checks inside bounds in loc1.
Trk::TriangleBounds::operator=
TriangleBounds & operator=(TriangleBounds &&recbo) noexcept=default
Move Assignment Operator.
Trk::BoundaryCheck
Definition: BoundaryCheck.h:51
Trk::TriangleBounds::bv_y3
@ bv_y3
Definition: TriangleBounds.h:50
Trk::TriangleBounds::bv_x1
@ bv_x1
Definition: TriangleBounds.h:45
TDD_real_t
double TDD_real_t
Definition: TriangleBounds.h:17
TRTCalib_cfilter.p3
p3
Definition: TRTCalib_cfilter.py:132
Trk::SurfaceBounds::Triangle
@ Triangle
Definition: SurfaceBounds.h:68
Trk::TriangleBounds::bv_y1
@ bv_y1
Definition: TriangleBounds.h:46
Trk::TriangleBounds::TriangleBounds
TriangleBounds()
Default Constructor - needed for persistency.
Definition: TriangleBounds.cxx:18
TDD_real_t
double TDD_real_t
Definition: AnnulusBounds.h:20