8 #include "GaudiKernel/EventContext.h"
17 #include "Acts/Material/MaterialSlab.hpp"
34 return StatusCode::SUCCESS;
42 std::vector<Acts::MaterialInteraction> nStep;
53 ATH_MSG_WARNING(
"z-vertex position larger than expected for material mapping. Check the beamspot config used for production of material steps!");
55 Acts::Vector3 v_pos{0, 0, 0};
56 Acts::Vector3 v_imp{colStep.
back()->hitX(), colStep.
back()->hitY(), colStep.
back()->hitZ()};
57 v_imp = v_imp.normalized();
59 for(
auto const step: colStep) {
62 Acts::MaterialInteraction interaction;
63 interaction.position =
pos;
64 interaction.direction = Acts::Vector3(
pos.x(),
pos.y(),
pos.z());
65 interaction.direction = interaction.direction.normalized();
66 interaction.materialSlab = matProp;
67 sum_X0 +=
step->steplengthInX0();
68 sum_L0 +=
step->steplengthInL0();
69 nStep.push_back(interaction);
74 recorded.materialInteractions = nStep;
76 mTrack = std::make_pair(std::make_pair(v_pos, v_imp),
recorded);