21 namespace ActsExamples {
36 inline std::tuple<Acts::Vector2, Acts::Vector4, Acts::Vector3>
averageSimHits(
40 using namespace Acts::UnitLiterals;
47 for (
auto [
_, simHitIdx] : hitSimHitsRange) {
52 const auto& simHit = *simHits.nth(simHitIdx);
58 simHit.direction(), 0.5_um);
60 avgLocal += result.value();
63 << simHitIdx <<
" is not on the corresponding surface "
64 << surface.
geometryId() <<
"; use [0,0] as local position");
68 avgPos4 += simHit.fourPosition();
69 avgDir += simHit.direction();
74 double scale = 1.0 /
n;
80 return {avgLocal, avgPos4, avgDir};