ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkDetDescr
TrkSurfaces
TrkSurfaces
BoundaryCheck.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// BoundaryCheck.h, (c) ATLAS Detector software
8
9
#ifndef TRKSURFACES_BOUNDARYCHECK_H
10
#define TRKSURFACES_BOUNDARYCHECK_H
11
12
#include "
EventPrimitives/EventPrimitives.h
"
13
#include "
GeoPrimitives/GeoPrimitives.h
"
14
#include "
TrkEventPrimitives/ParamDefs.h
"
15
namespace
Trk
{
16
33
34
// maint struct for comparing the extent of arbitrary convex polygons relative to prefixed axes
35
struct
KDOP
36
{
37
float
min
;
38
// Minimum distance (from origin) along axes
39
float
max
;
40
// Maximum distance (from origin) along axes
41
};
42
43
// struct needed for FastSinCos method (see below)
44
struct
sincosCache
45
{
46
double
sinC
;
47
double
cosC
;
48
};
49
50
class
BoundaryCheck
51
{
52
// saves us a lot of function calls in the EllipseToPoly method
53
static
constexpr
double
s_cos22
= 0.923879532511286756128183189396788286822416625863642486115097;
54
static
constexpr
double
s_cos45
= 0.707106781186547524400844362104849039284835937688474036588339;
55
static
constexpr
double
s_cos67
= 0.382683432365089771728459984030398866761344562485627041433800;
56
57
public
:
58
enum
BoundaryCheckType
59
{
60
absolute
= 0,
61
chi2corr
= 1
62
};
63
64
65
bool
checkLoc1
;
66
bool
checkLoc2
;
67
int
nSigmas
;
68
double
toleranceLoc1
;
69
double
toleranceLoc2
;
70
BoundaryCheckType
bcType
;
71
AmgSymMatrix
(2) lCovariance;
72
73
75
BoundaryCheck
(
bool
sCheck)
76
:
checkLoc1
(sCheck)
77
,
checkLoc2
(sCheck)
78
,
nSigmas
(-1)
79
,
toleranceLoc1
(0.)
80
,
toleranceLoc2
(0.)
81
,
bcType
(
absolute
)
82
, lCovariance(
AmgSymMatrix
(2)::Identity())
83
{}
84
86
BoundaryCheck
(
bool
chkL1,
bool
chkL2,
double
tloc1 = 0.,
double
tloc2 = 0.)
87
:
checkLoc1
(chkL1)
88
,
checkLoc2
(chkL2)
89
,
nSigmas
(-1)
90
,
toleranceLoc1
(tloc1)
91
,
toleranceLoc2
(tloc2)
92
,
bcType
(
absolute
)
93
, lCovariance(
AmgSymMatrix
(2)::Identity())
94
{}
95
97
BoundaryCheck
(
const
AmgSymMatrix
(2) & lCov,
int
nsig = 1,
bool
chkL1 =
true
,
bool
chkL2 =
true
)
98
:
checkLoc1
(chkL1)
99
,
checkLoc2
(chkL2)
100
,
nSigmas
(nsig)
101
,
toleranceLoc1
(0.)
102
,
toleranceLoc2
(0.)
103
,
bcType
(
chi2corr
)
104
, lCovariance(lCov)
105
{}
106
108
operator
bool()
const
{
return
(
checkLoc1
||
checkLoc2
); }
109
112
void
ComputeKDOP
(
const
std::vector<Amg::Vector2D> &
v
,
const
std::vector<Amg::Vector2D> &KDOPAxes,
113
std::vector<KDOP>& kdop)
const
;
114
115
std::vector<Amg::Vector2D>
EllipseToPoly
(
int
resolution = 3)
const
;
116
117
bool
TestKDOPKDOP
(
const
std::vector<KDOP>&
a
,
const
std::vector<KDOP>& b)
const
;
118
119
double
FastArcTan
(
double
x
)
const
;
120
121
sincosCache
FastSinCos
(
double
x
)
const
;
122
};
123
124
}
125
126
#include "
TrkSurfaces/BoundaryCheck.icc
"
127
#endif
// TRKSURFACES_BOUNDARYCHECK_H
BoundaryCheck.icc
EventPrimitives.h
AmgSymMatrix
#define AmgSymMatrix(dim)
Definition
EventPrimitives.h:50
GeoPrimitives.h
a
static Double_t a
Definition
LArPhysWaveHECTool.cxx:38
ParamDefs.h
Trk::BoundaryCheck::BoundaryCheck
BoundaryCheck(bool sCheck)
Constructor for single boolean behavious.
Definition
BoundaryCheck.h:75
Trk::BoundaryCheck::BoundaryCheck
BoundaryCheck(bool chkL1, bool chkL2, double tloc1=0., double tloc2=0.)
Constructor for tolerance based check.
Definition
BoundaryCheck.h:86
Trk::BoundaryCheck::nSigmas
int nSigmas
allowed sigmas for chi2 boundary check
Definition
BoundaryCheck.h:67
Trk::BoundaryCheck::AmgSymMatrix
AmgSymMatrix(2) lCovariance
local covariance matrix
Trk::BoundaryCheck::bcType
BoundaryCheckType bcType
Definition
BoundaryCheck.h:70
Trk::BoundaryCheck::EllipseToPoly
std::vector< Amg::Vector2D > EllipseToPoly(int resolution=3) const
Trk::BoundaryCheck::TestKDOPKDOP
bool TestKDOPKDOP(const std::vector< KDOP > &a, const std::vector< KDOP > &b) const
Trk::BoundaryCheck::ComputeKDOP
void ComputeKDOP(const std::vector< Amg::Vector2D > &v, const std::vector< Amg::Vector2D > &KDOPAxes, std::vector< KDOP > &kdop) const
Each Bounds has a method inside, which checks if a LocalPosition is inside the bounds.
Trk::BoundaryCheck::toleranceLoc2
double toleranceLoc2
absolute tolerance in local 2 coordinate
Definition
BoundaryCheck.h:69
Trk::BoundaryCheck::checkLoc2
bool checkLoc2
check local 2 coordinate
Definition
BoundaryCheck.h:66
Trk::BoundaryCheck::checkLoc1
bool checkLoc1
check local 1 coordinate
Definition
BoundaryCheck.h:65
Trk::BoundaryCheck::s_cos67
static constexpr double s_cos67
Definition
BoundaryCheck.h:55
Trk::BoundaryCheck::BoundaryCheckType
BoundaryCheckType
Definition
BoundaryCheck.h:59
Trk::BoundaryCheck::chi2corr
@ chi2corr
relative (chi2 based) with full correlations
Definition
BoundaryCheck.h:61
Trk::BoundaryCheck::absolute
@ absolute
absolute check including tolerances
Definition
BoundaryCheck.h:60
Trk::BoundaryCheck::BoundaryCheck
BoundaryCheck(const AmgSymMatrix(2) &lCov, int nsig=1, bool chkL1=true, bool chkL2=true)
Constructor for chi2 based check.
Definition
BoundaryCheck.h:97
Trk::BoundaryCheck::FastArcTan
double FastArcTan(double x) const
Trk::BoundaryCheck::s_cos45
static constexpr double s_cos45
Definition
BoundaryCheck.h:54
Trk::BoundaryCheck::FastSinCos
sincosCache FastSinCos(double x) const
Trk::BoundaryCheck::s_cos22
static constexpr double s_cos22
Definition
BoundaryCheck.h:53
Trk::BoundaryCheck::toleranceLoc1
double toleranceLoc1
absolute tolerance in local 1 coordinate
Definition
BoundaryCheck.h:68
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition
FakeTrackBuilder.h:9
Trk::x
@ x
Definition
ParamDefs.h:55
Trk::v
@ v
Definition
ParamDefs.h:78
Trk::KDOP
Definition
BoundaryCheck.h:36
Trk::KDOP::min
float min
Definition
BoundaryCheck.h:37
Trk::KDOP::max
float max
Definition
BoundaryCheck.h:39
Trk::sincosCache
Definition
BoundaryCheck.h:45
Trk::sincosCache::sinC
double sinC
Definition
BoundaryCheck.h:46
Trk::sincosCache::cosC
double cosC
Definition
BoundaryCheck.h:47
Generated on
for ATLAS Offline Software by
1.17.0