Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
John Apostolakis
VecGeom
Commits
c5f4d1a1
Commit
c5f4d1a1
authored
Aug 09, 2021
by
Martin Kostelnik
Committed by
Andrei Gheata
Aug 25, 2021
Browse files
Reduce ShapeTester errors
parent
99f7387a
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
VecGeom/base/Math.h
View file @
c5f4d1a1
...
...
@@ -19,11 +19,13 @@ using Precision = float;
VECGEOM_CONST
Precision
kTolerance
=
1e-3
;
VECGEOM_CONST
Precision
kAngTolerance
=
1e-2
;
VECGEOM_CONST
Precision
kConeTolerance
=
1e-3
;
VECGEOM_CONST
Precision
kFarAway
=
1e5
;
#else
using
Precision
=
double
;
VECGEOM_CONST
Precision
kTolerance
=
1e-9
;
VECGEOM_CONST
Precision
kAngTolerance
=
1e-9
;
VECGEOM_CONST
Precision
kConeTolerance
=
1e-7
;
VECGEOM_CONST
Precision
kFarAway
=
1e10
;
#endif
using
namespace
vecCore
::
math
;
...
...
test/shape_tester/ShapeTester.cpp
View file @
c5f4d1a1
This diff is collapsed.
Click to expand it.
test/shape_tester/ShapeTester.h
View file @
c5f4d1a1
...
...
@@ -93,7 +93,7 @@ private:
void
FlushSS
(
std
::
stringstream
&
ss
);
void
Flush
(
const
std
::
string
&
s
);
Vec_t
GetPointOnOrb
(
double
r
);
Vec_t
GetPointOnOrb
(
Precision
r
);
Vec_t
GetRandomDirection
();
int
TestBoundaryPrecision
(
int
mode
);
...
...
@@ -121,7 +121,7 @@ private:
int
XRayProfile
(
double
theta
=
45
,
int
nphi
=
15
,
int
ngrid
=
1000
,
bool
useeps
=
true
);
int
Integration
(
double
theta
=
45
,
double
phi
=
45
,
int
ngrid
=
1000
,
bool
useeps
=
true
,
int
npercell
=
1
,
bool
graphics
=
true
);
double
CrossedLength
(
const
Vec_t
&
point
,
const
Vec_t
&
dir
,
bool
useeps
);
Precision
CrossedLength
(
const
Vec_t
&
point
,
const
Vec_t
&
dir
,
bool
useeps
);
void
CreatePointsAndDirections
();
void
CreatePointsAndDirectionsSurface
();
void
CreatePointsAndDirectionsEdge
();
...
...
@@ -174,7 +174,7 @@ private:
protected:
Vec_t
GetRandomPoint
()
const
;
double
GaussianRandom
(
const
double
cutoff
)
const
;
void
ReportError
(
int
*
nError
,
Vec_t
&
p
,
Vec_t
&
v
,
double
distance
,
std
::
string
comment
);
//, std::ostream &fLogger );
void
ReportError
(
int
*
nError
,
Vec_t
&
p
,
Vec_t
&
v
,
Precision
distance
,
std
::
string
comment
);
//, std::ostream &fLogger );
void
ClearErrors
();
int
CountErrors
()
const
;
...
...
test/shape_tester/shape_testBox.cpp
View file @
c5f4d1a1
...
...
@@ -32,6 +32,9 @@ int runTester(ImplT const *shape, int npoints, bool debug, bool stat)
tester
.
setDebug
(
debug
);
tester
.
setStat
(
stat
);
tester
.
SetMaxPoints
(
npoints
);
#ifdef VECGEOM_FLOAT_PRECISION
tester
.
SetSolidTolerance
(
1.e-4
);
#endif
int
errcode
=
tester
.
Run
(
shape
);
std
::
cout
<<
"Final Error count for Shape *** "
<<
shape
->
GetName
()
<<
"*** = "
<<
errcode
<<
"
\n
"
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment