diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/STgcClusterization/src/STgcClusterBuilderCommon.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/STgcClusterization/src/STgcClusterBuilderCommon.cxx index 2f2a7348d441fc25d826e80c86b4ded2c2d51d7d..0c2c4253a2f4ec785f0f8b178719f806dfe1f2da 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/STgcClusterization/src/STgcClusterBuilderCommon.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/STgcClusterization/src/STgcClusterBuilderCommon.cxx @@ -340,10 +340,18 @@ std::optional<Muon::STgcClusterPosition> Muon::STgcClusterBuilderCommon::caruana return std::nullopt; } + + Amg::Vector3D globalClusterPos {detEl->surface(clusterId).transform()*Amg::Vector3D{reconstructedPosX, 0,0}}; + Amg::Vector3D clusDir{ NswClustering::toLocal(detEl->surface(clusterId), globalClusterPos) }; + NswErrorCalibData::Input errorCalibIn{}; errorCalibIn.stripId = clusterId; errorCalibIn.clusterAuthor = static_cast<unsigned>(sTgcPrepData::Author::Caruana); - errorCalibIn.clusterError = std::sqrt(sigmaSq); + errorCalibIn.clusterError = std::sqrt(sigmaSq); + errorCalibIn.locPhi = clusDir.phi(); + errorCalibIn.locTheta = clusDir.theta(); + errorCalibIn.localPos = Amg::Vector2D{reconstructedPosX, 0}; + errorCalibIn.clusterSize = cluster.size(); const double localUncertainty = m_errorCalibData.clusterUncertainty(errorCalibIn);