diff --git a/DDSegmentation/include/DDSegmentation/CylindricalSegmentation.h b/DDSegmentation/include/DDSegmentation/CylindricalSegmentation.h index f492d805d28c1e0b6d8d5e2c20246a7d84b340eb..1aaafa6140a2ab929ef315bcc14ef854fd40c7d7 100644 --- a/DDSegmentation/include/DDSegmentation/CylindricalSegmentation.h +++ b/DDSegmentation/include/DDSegmentation/CylindricalSegmentation.h @@ -21,7 +21,7 @@ public: virtual ~CylindricalSegmentation(); /// determine the radius based on the cell ID - std::string getRadius(const long64& cellID) const; + double getRadius(const long64& cellID) const; /// access the field name used for layer std::string getFieldNameLayer() const { return _layerID; diff --git a/DDSegmentation/src/CylindricalSegmentation.cpp b/DDSegmentation/src/CylindricalSegmentation.cpp index d3b16631996e03a5255949c7ab51670fe3d54feb..ad79bb1709ed7ead6fb550ca33f2f1f8e7f015d4 100644 --- a/DDSegmentation/src/CylindricalSegmentation.cpp +++ b/DDSegmentation/src/CylindricalSegmentation.cpp @@ -49,7 +49,7 @@ CylindricalSegmentation::~CylindricalSegmentation() { } /// determine the radius based on the cell ID -string CylindricalSegmentation::getRadius(const long64& cellID) const { +double CylindricalSegmentation::getRadius(const long64& cellID) const { _decoder->setValue(cellID); int layer = (*_decoder)[_layerID]; map<int, double>::const_iterator itMap = _layerRadiusMap.find(layer); diff --git a/DDSegmentation/src/ProjectiveCylinder.cpp b/DDSegmentation/src/ProjectiveCylinder.cpp index b5bacda6cae8b119b1a8dc08eee41a37d9fd122e..cadbfbe96f8d3f42a1dc79d89830508a870f3b73 100644 --- a/DDSegmentation/src/ProjectiveCylinder.cpp +++ b/DDSegmentation/src/ProjectiveCylinder.cpp @@ -57,7 +57,7 @@ ProjectiveCylinder::~ProjectiveCylinder() { } /// determine the local based on the cell ID -virtual std::vector<double> ProjectiveCylinder::getPosition(const long64& cellID) const { +std::vector<double> ProjectiveCylinder::getPosition(const long64& cellID) const { double r = getRadius(cellID); double theta = getTheta(cellID); double phi = getPhi(cellID); diff --git a/DDSegmentation/src/Segmentation.cpp b/DDSegmentation/src/Segmentation.cpp index 0604f1136fdffe2244d79324afd1123689397136..29a4fe3ad48e1d2c1f0c5f1eeabf90b2c0ae9a81 100644 --- a/DDSegmentation/src/Segmentation.cpp +++ b/DDSegmentation/src/Segmentation.cpp @@ -82,12 +82,12 @@ Parameters Segmentation::parameters() const { } /// helper method to convert a bin number to a 1D position -double CartesianGrid::binToPosition(long64 bin, double cellSize, double offset) const { +double Segmentation::binToPosition(long64 bin, double cellSize, double offset) const { return bin * cellSize + offset; } /// helper method to convert a 1D position to a cell ID -int CartesianGrid::positionToBin(double position, double cellSize, double offset) const { +int Segmentation::positionToBin(double position, double cellSize, double offset) const { if (cellSize == 0.) { throw std::runtime_error("Invalid cell size: 0.0"); }