Commit c5f4d1a1 authored by Martin Kostelnik's avatar Martin Kostelnik Committed by Andrei Gheata
Browse files

Reduce ShapeTester errors

parent 99f7387a
......@@ -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;
......
This diff is collapsed.
......@@ -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;
......
......@@ -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";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment