42 std::vector<Acts::MaterialInteraction> nStep;
43 Acts::RecordedMaterial recorded;
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};
57 v_imp = v_imp.normalized();
59 for(
auto const step: colStep) {
60 Acts::Vector3 pos{step->hitX(), step->hitY(), step->hitZ()};
61 Acts::MaterialSlab matProp(Acts::Material::fromMassDensity(step->x0(), step->l0(), step->A(), step->Z(), (step->rho() * Acts::UnitConstants::g) ),step->steplength());
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);
72 recorded.materialInX0 = sum_X0;
73 recorded.materialInL0 = sum_L0;
74 recorded.materialInteractions = std::move(nStep);
76 mTrack = std::make_pair(std::make_pair(v_pos, v_imp), recorded);