File indexing completed on 2025-01-18 09:11:35
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "ActsExamples/Digitization/MeasurementCreation.hpp"
0010
0011 #include "Acts/EventData/MeasurementHelpers.hpp"
0012 #include "Acts/Geometry/GeometryIdentifier.hpp"
0013 #include "ActsExamples/EventData/Measurement.hpp"
0014
0015 #include <stdexcept>
0016 #include <string>
0017
0018 ActsExamples::VariableBoundMeasurementProxy ActsExamples::createMeasurement(
0019 MeasurementContainer& container, Acts::GeometryIdentifier geometryId,
0020 const DigitizedParameters& dParams) {
0021 if (dParams.indices.size() > 4u) {
0022 std::string errorMsg = "Invalid/mismatching measurement dimension: " +
0023 std::to_string(dParams.indices.size());
0024 throw std::runtime_error(errorMsg.c_str());
0025 }
0026
0027 return Acts::visit_measurement(
0028 dParams.indices.size(), [&](auto dim) -> VariableBoundMeasurementProxy {
0029 auto [indices, par, cov] = measurementConstituents<dim>(dParams);
0030 return VariableBoundMeasurementProxy{
0031 container.emplaceMeasurement<dim>(geometryId, indices, par, cov)};
0032 });
0033 }