22 namespace ActsFatras {
28 std::function<Acts::Result<std::pair<double, double>>(double)>;
37 std::reference_wrapper<const Acts::GeometryContext> geoContext_,
38 std::shared_ptr<const Acts::Surface> surface_ =
nullptr)
43 std::reference_wrapper<const Hit>
hit;
44 std::reference_wrapper<const Acts::GeometryContext>
geoContext;
45 std::shared_ptr<const Acts::Surface>
surface =
nullptr;
73 using ParametersSmearer =
76 if (sInput.
surface ==
nullptr) {
77 return Result(ActsFatras::DigitizationError::NoSurfaceDefined);
80 const auto& hit = sInput.
hit.get();
82 auto dir = hit.unitDirection();
85 if (not gltResult.ok()) {
86 return Result(Acts::SurfaceError::GlobalPositionNotOnSurface);
88 const auto& lPosition = gltResult.value();
90 typename ParSet::FullParametersVector fParameters;
91 fParameters.setZero();
92 fParameters.template segment<2>(0) = lPosition;
96 typename ParSet::ParametersVector sParameters =
97 ParSet::projector() * fParameters;
99 typename ParSet::CovarianceMatrix sCovariance;
100 sCovariance.setZero();
104 if (not smearResult.ok()) {
105 return Result(smearResult.error());
107 return ParSet{sCovariance, sParameters};
131 using ParametersSmearer =
134 const auto& hit = sInput.
hit.get();
136 typename ParSet::FullParametersVector fParameters;
137 fParameters.setZero();
138 fParameters.template segment<4>(0) = hit.position4();
139 fParameters.template segment<3>(4) = hit.unitDirection();
140 typename ParSet::ParametersVector sParameters =
141 ParSet::projector() * fParameters;
142 typename ParSet::CovarianceMatrix sCovariance;
143 sCovariance.setZero();
147 if (not smearResult.ok()) {
148 return Result(smearResult.error());
150 return ParSet{sCovariance, sParameters};