File indexing completed on 2025-01-18 09:11:35
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "ActsExamples/Digitization/DigitizationConfig.hpp"
0010
0011 namespace ActsExamples {
0012
0013 std::vector<double> GeometricConfig::variances(
0014 const std::array<std::size_t, 2u>& csizes,
0015 const std::array<std::size_t, 2u>& cmins) const {
0016 std::vector<double> rVariances;
0017 for (const auto& bIndex : indices) {
0018 double var = 0.;
0019 if (varianceMap.contains(bIndex)) {
0020
0021 std::size_t lsize =
0022 std::min(csizes[bIndex], varianceMap.at(bIndex).size());
0023 var = varianceMap.at(bIndex).at(lsize - 1);
0024 } else {
0025
0026 std::size_t ictr = cmins[bIndex] + csizes[bIndex] / 2;
0027 var = std::pow(segmentation.binningData()[bIndex].width(ictr), 2) / 12.0;
0028 }
0029 rVariances.push_back(var);
0030 }
0031 return rVariances;
0032 }
0033
0034 }