Skip to content
Snippets Groups Projects
Commit dd52c56b authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

GeoDiamondSurface+GeoTrapezoidSurface: fixed cppcheck warnings

parent 95b2ae18
No related branches found
No related tags found
1 merge request!431GeoDiamondSurface+GeoTrapezoidSurface: fixed cppcheck warnings
Pipeline #11791787 passed
/*
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
*/
#ifndef GeoModelHelpers_THROWEXCEPT_H
#define GeoModelHelpers_THROWEXCEPT_H
#ifndef GEOMODELKERNEL_THROWEXCEPT_H
#define GEOMODELKERNEL_THROWEXCEPT_H
#include <exception>
#include <sstream>
......@@ -14,4 +14,4 @@
except_str<<MESSAGE; \
throw std::runtime_error(except_str.str()); \
}
#endif
\ No newline at end of file
#endif
......@@ -27,10 +27,8 @@ bool GeoDiamondSurface::isOnSurface (const double Px, const double Py, const dou
double Pp_y = P_prime_4d[1];
double Pp_z = P_prime_4d[2];
if(Pp_z != 0 && Pp_z > 1e-5 && Pp_z < -1e-5){
// now I take tolerance as 1e-5
return false;
}
// now I take tolerance as 1e-5
if(std::abs(Pp_z) > 1e-5) return false;
double x_bot = this -> getXbottomHalf(); double y_bot = this -> getYbottomHalf();
double x_mid = this -> getXmidHalf();
......
......@@ -25,10 +25,8 @@ bool GeoTrapezoidSurface::isOnSurface (const double Px, const double Py, const d
double Pp_y = P_prime_4d[1];
double Pp_z = P_prime_4d[2];
if(Pp_z != 0 && Pp_z > 1e-5 && Pp_z < -1e-5){
// now I take tolerance as 1e-5
return false;
}
// now I take tolerance as 1e-5
if(std::abs(Pp_z) > 1e-5) return false;
double half_x_max = this -> getXHalfLengthMax();
double half_x_min = this -> getXHalfLengthMin();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment