ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkDetDescr
TrkSurfaces
TrkSurfaces
TriangleBounds.icc
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
namespace Trk {
6
7
inline TriangleBounds*
8
TriangleBounds::clone() const
9
{
10
return new TriangleBounds(*this);
11
}
12
13
14
inline bool
15
TriangleBounds::insideLoc1(const Amg::Vector2D& locpo, double tol1) const
16
{
17
return inside(locpo, tol1, tol1);
18
}
19
20
inline bool
21
TriangleBounds::insideLoc2(const Amg::Vector2D& locpo, double tol2) const
22
{
23
return inside(locpo, tol2, tol2);
24
}
25
26
inline std::vector<std::pair<TDD_real_t, TDD_real_t>>
27
TriangleBounds::vertices() const
28
{
29
std::vector<std::pair<TDD_real_t, TDD_real_t>> vertices;
30
vertices.resize(3);
31
for (size_t iv = 0; iv < 3; iv++)
32
vertices.emplace_back(m_boundValues[2 * iv], m_boundValues[2 * iv + 1]);
33
return vertices;
34
}
35
36
inline double
37
TriangleBounds::r() const
38
{
39
double rmax = 0.;
40
for (size_t iv = 0; iv < 3; iv++)
41
rmax = fmax(rmax,
42
m_boundValues[2 * iv] * m_boundValues[2 * iv] +
43
m_boundValues[2 * iv + 1] * m_boundValues[2 * iv + 1]);
44
return std::sqrt(rmax);
45
}
46
47
} // end of namespace
48
Generated on
for ATLAS Offline Software by
1.17.0