Skip to content
Snippets Groups Projects
Commit f58ec712 authored by Radek Privara's avatar Radek Privara Committed by Simon Spannagel
Browse files

Spatial resolution calculated for a specific pixel

parent 2140b86c
No related branches found
No related tags found
No related merge requests found
...@@ -224,10 +224,12 @@ namespace corryvreckan { ...@@ -224,10 +224,12 @@ namespace corryvreckan {
/** /**
* @brief Get intrinsic spatial resolution of the detector * @brief Get intrinsic spatial resolution of the detector
* @param column (X-) Column index of the pixel to calculate the spatial resolution from
* @param row (Y-) Row index of the pixel to calculate the spatial resolution from
* @return Intrinsic spatial resolution in X and Y * @return Intrinsic spatial resolution in X and Y
* @todo: this is designed for PixelDetector, find a proper interface for other Detector type * @todo: this is designed for PixelDetector, find a proper interface for other Detector type
*/ */
virtual XYVector getSpatialResolution() const = 0; virtual XYVector getSpatialResolution(double column = 0, double row = 0) const = 0;
/** /**
* @brief Get intrinsic spatial resolution in global coordinates of the detector * @brief Get intrinsic spatial resolution in global coordinates of the detector
......
...@@ -147,8 +147,11 @@ namespace corryvreckan { ...@@ -147,8 +147,11 @@ namespace corryvreckan {
/** /**
* @brief Get intrinsic spatial resolution of the detector * @brief Get intrinsic spatial resolution of the detector
* @return Intrinsic spatial resolution in X and Y * @return Intrinsic spatial resolution in X and Y
*
* @note For a detector with variable pixel sizes this declaration could be changed to take column and row pixel
* indices to calculate the resolution for a specific pixel
*/ */
XYVector getSpatialResolution() const override { return m_spatial_resolution; } XYVector getSpatialResolution(double, double) const override { return m_spatial_resolution; }
/** /**
* @brief Get intrinsic spatial resolution in global coordinates of the detector * @brief Get intrinsic spatial resolution in global coordinates of the detector
......
...@@ -334,7 +334,7 @@ void Clustering4D::calculateClusterCentre(Cluster* cluster) { ...@@ -334,7 +334,7 @@ void Clustering4D::calculateClusterCentre(Cluster* cluster) {
cluster->setCharge(charge); cluster->setCharge(charge);
// Set uncertainty on position from intrinstic detector spatial resolution: // Set uncertainty on position from intrinstic detector spatial resolution:
cluster->setError(m_detector->getSpatialResolution()); cluster->setError(m_detector->getSpatialResolution(column, row));
cluster->setErrorMatrixGlobal(m_detector->getSpatialResolutionMatrixGlobal()); cluster->setErrorMatrixGlobal(m_detector->getSpatialResolutionMatrixGlobal());
cluster->setTimestamp(timestamp); cluster->setTimestamp(timestamp);
......
...@@ -259,7 +259,7 @@ void ClusteringSpatial::calculateClusterCentre(Cluster* cluster) { ...@@ -259,7 +259,7 @@ void ClusteringSpatial::calculateClusterCentre(Cluster* cluster) {
cluster->setCharge(charge); cluster->setCharge(charge);
// Set uncertainty on position from intrinstic detector spatial resolution: // Set uncertainty on position from intrinstic detector spatial resolution:
cluster->setError(m_detector->getSpatialResolution()); cluster->setError(m_detector->getSpatialResolution(column, row));
cluster->setErrorMatrixGlobal(m_detector->getSpatialResolutionMatrixGlobal()); cluster->setErrorMatrixGlobal(m_detector->getSpatialResolutionMatrixGlobal());
cluster->setDetectorID(detectorID); cluster->setDetectorID(detectorID);
......
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