ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkDetDescr
TrkSurfaces
TrkSurfaces
SurfaceBounds.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
// SurfaceBounds.h, (c) ATLAS Detector software
8
9
#ifndef TRKSURFACES_SURFACEBOUNDS_H
10
#define TRKSURFACES_SURFACEBOUNDS_H
11
12
// STD
13
#include <iomanip>
14
#include <iostream>
15
16
// GaudiKernel
17
#include "GaudiKernel/MsgStream.h"
18
19
// Geo & Math library
20
#include "
GeoPrimitives/GeoPrimitives.h
"
21
22
// Trk included
23
#include "
TrkSurfaces/BoundaryCheck.h
"
24
25
#ifdef TRKDETDESCR_USEFLOATPRECISON
26
typedef
float
TDD_real_t
;
27
#else
28
typedef
double
TDD_real_t
;
29
#endif
30
31
namespace
Trk
{
32
45
46
class
SurfaceBounds
47
{
48
49
public
:
58
enum
BoundsType
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
};
74
76
SurfaceBounds
() =
default
;
77
78
SurfaceBounds
(
const
SurfaceBounds
&) =
default
;
79
SurfaceBounds
&
operator=
(
const
SurfaceBounds
&) =
default
;
80
SurfaceBounds
(
SurfaceBounds
&&) noexcept = default;
81
SurfaceBounds
& operator=(
SurfaceBounds
&&) noexcept = default;
83
virtual ~
SurfaceBounds
() = default;
84
87
virtual
SurfaceBounds
*
clone
()
const
= 0;
88
90
virtual
bool
operator==(
const
SurfaceBounds
& sb)
const
= 0;
91
93
virtual
bool
operator!=(
const
SurfaceBounds
& sb)
const
;
94
96
virtual
BoundsType
type
()
const
= 0;
97
100
virtual
bool
inside
(
const
Amg
::Vector2D& locpo,
double
tol1 = 0.,
double
tol2 = 0.)
const
= 0;
101
virtual
bool
inside
(
const
Amg
::Vector2D& locpo,
const
BoundaryCheck
& bchk)
const
= 0;
105
virtual
bool
insideLoc1
(
const
Amg
::Vector2D& locpo,
double
tol1 = 0.)
const
= 0;
106
110
virtual
bool
insideLoc2
(
const
Amg
::Vector2D& locpo,
double
tol2 = 0.)
const
= 0;
111
113
virtual
double
minDistance
(
const
Amg
::Vector2D& pos)
const
= 0;
114
116
virtual
double
r
()
const
= 0;
117
119
virtual MsgStream&
dump
(MsgStream& sl)
const
= 0;
120
122
virtual
std
::
ostream
&
dump
(
std
::
ostream
& sl)
const
= 0;
123
124
protected
:
126
void
swap
(
double
& b1,
double
& b2);
127
129
virtual
void
initCache
() {}
130
};
131
132
inline
void
133
SurfaceBounds::swap
(
double
& b1,
double
& b2)
134
{
135
double
tmp = b1;
136
b1 = b2;
137
b2 = tmp;
138
}
139
140
inline
bool
141
SurfaceBounds::operator!=
(
const
SurfaceBounds
& sb)
const
142
{
143
return
!((*this) == sb);
144
}
145
147
MsgStream&
148
operator<<
(MsgStream& sl,
const
SurfaceBounds
& sb);
149
std::ostream&
150
operator<<
(std::ostream& sl,
const
SurfaceBounds
& sb);
151
152
}
// end of namespace
153
154
#endif
// TRKSURFACES_SURFACEBOUNDS_H
TDD_real_t
double TDD_real_t
Definition
AnnulusBounds.h:25
BoundaryCheck.h
GeoPrimitives.h
Trk::BoundaryCheck
The BoundaryCheck class allows to steer the way surface boundaries are used for inside/outside checks...
Definition
BoundaryCheck.h:51
Trk::SurfaceBounds
Abstract base class for surface bounds to be specified.
Definition
SurfaceBounds.h:47
Trk::SurfaceBounds::swap
void swap(double &b1, double &b2)
Swap method to be called from DiscBounds or TrapezoidalBounds.
Definition
SurfaceBounds.h:133
Trk::SurfaceBounds::SurfaceBounds
SurfaceBounds()=default
Default Constructor.
Trk::SurfaceBounds::insideLoc1
virtual bool insideLoc1(const Amg::Vector2D &locpo, double tol1=0.) const =0
Extend the interface to for single inside Loc 1 / Loc2 tests.
Trk::SurfaceBounds::r
virtual double r() const =0
Interface method for the maximal extension or the radius.
Trk::SurfaceBounds::initCache
virtual void initCache()
virtual initCache method for object persistency
Definition
SurfaceBounds.h:129
Trk::SurfaceBounds::minDistance
virtual double minDistance(const Amg::Vector2D &pos) const =0
Minimal distance to boundary ( > 0 if outside and <=0 if inside).
Trk::SurfaceBounds::inside
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.
Trk::SurfaceBounds::SurfaceBounds
SurfaceBounds(const SurfaceBounds &)=default
Trk::SurfaceBounds::insideLoc2
virtual bool insideLoc2(const Amg::Vector2D &locpo, double tol2=0.) const =0
Extend the interface to for single inside Loc 1 / Loc2 tests.
Trk::SurfaceBounds::type
virtual BoundsType type() const =0
Return the bounds type - for persistency optimization.
Trk::SurfaceBounds::operator=
SurfaceBounds & operator=(const SurfaceBounds &)=default
Trk::SurfaceBounds::BoundsType
BoundsType
This enumerator simplifies the persistency, by saving a dynamic_cast to happen.
Definition
SurfaceBounds.h:59
Trk::SurfaceBounds::Trapezoid
@ Trapezoid
Definition
SurfaceBounds.h:67
Trk::SurfaceBounds::Disc
@ Disc
Definition
SurfaceBounds.h:63
Trk::SurfaceBounds::Rectangle
@ Rectangle
Definition
SurfaceBounds.h:65
Trk::SurfaceBounds::Annulus
@ Annulus
Definition
SurfaceBounds.h:70
Trk::SurfaceBounds::Other
@ Other
Definition
SurfaceBounds.h:71
Trk::SurfaceBounds::Cylinder
@ Cylinder
Definition
SurfaceBounds.h:61
Trk::SurfaceBounds::Diamond
@ Diamond
Definition
SurfaceBounds.h:62
Trk::SurfaceBounds::Cone
@ Cone
Definition
SurfaceBounds.h:60
Trk::SurfaceBounds::Triangle
@ Triangle
Definition
SurfaceBounds.h:68
Trk::SurfaceBounds::Ellipse
@ Ellipse
Definition
SurfaceBounds.h:64
Trk::SurfaceBounds::DiscTrapezoidal
@ DiscTrapezoidal
Definition
SurfaceBounds.h:69
Trk::SurfaceBounds::RotatedTrapezoid
@ RotatedTrapezoid
Definition
SurfaceBounds.h:66
Trk::SurfaceBounds::clone
virtual SurfaceBounds * clone() const =0
clone() method to make deep copy in Surface copy constructor and for assigment operator of the Surfac...
Trk::SurfaceBounds::operator!=
virtual bool operator!=(const SurfaceBounds &sb) const
Non-Equality operator.
Definition
SurfaceBounds.h:141
Trk::SurfaceBounds::SurfaceBounds
SurfaceBounds(SurfaceBounds &&) noexcept=default
ostream
STL class.
const
Amg
Definition of ATLAS Math & Geometry primitives (Amg).
Definition
AmgStringHelpers.h:19
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition
FakeTrackBuilder.h:9
Trk::operator<<
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
Definition
AlignModule.cxx:204
dump
-event-from-file
std
STL namespace.
protected
#define protected
Definition
testRead.cxx:26
Generated on
for ATLAS Offline Software by
1.17.0