Skip to content
Snippets Groups Projects
Commit 3a508de3 authored by Frank Gaede's avatar Frank Gaede
Browse files

- fixed include for fabs

parent 4a084160
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,7 @@
#include <algorithm>
#include <sstream>
#include <stdexcept>
#include <cmath>
namespace DD4hep {
namespace DDSegmentation {
......@@ -58,11 +59,11 @@ Vector3D TiledLayerGridXY::position(const CellID& cID) const {
// check the integer cell boundary in x,
if ( ( _layerDimX.size() != 0 && _layerIndex <= _layerDimX.size() )
&&( _fractCellSizeXPerLayer.size() != 0 && _layerIndex <= _fractCellSizeXPerLayer.size() )
&&(fabs( cellPosition.X ) > ( _layerDimX.at(_layerIndex - 1) - _fractCellSizeXPerLayer.at(_layerIndex - 1) ))
&&(std::fabs( cellPosition.X ) > ( _layerDimX.at(_layerIndex - 1) - _fractCellSizeXPerLayer.at(_layerIndex - 1) ))
)
{
// and correct the fraction cell center position in x.
cellPosition.X = cellPosition.X/fabs(cellPosition.X)
cellPosition.X = cellPosition.X/std::fabs(cellPosition.X)
*(_layerDimX.at(_layerIndex - 1) - _fractCellSizeXPerLayer.at(_layerIndex - 1)/2.0) ;
}
} else {
......
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