From 3a508de389e7c1e69665ad1c2d2a19917fbc1d3c Mon Sep 17 00:00:00 2001 From: Frank Gaede <frank.gaede@desy.de> Date: Wed, 27 Apr 2016 09:06:50 +0000 Subject: [PATCH] - fixed include for fabs --- DDSegmentation/src/TiledLayerGridXY.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/DDSegmentation/src/TiledLayerGridXY.cpp b/DDSegmentation/src/TiledLayerGridXY.cpp index c0ef18d36..2c05b508a 100644 --- a/DDSegmentation/src/TiledLayerGridXY.cpp +++ b/DDSegmentation/src/TiledLayerGridXY.cpp @@ -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 { -- GitLab