28 const IInterface*
p) :
32 declareInterface<IMaterialEffectsOnTrackProvider>(
this);
45 if (!m_calotsosparam.empty()) {
47 ATH_MSG_INFO(
"Retrieved tool " << m_calotsosparam.name());
52 return StatusCode::SUCCESS;
58 return StatusCode::SUCCESS;
64 const EventContext& ctx = Gaudi::Hive::currentContext();
65 std::vector<Trk::MaterialEffectsOnTrack> meots;
72 double X0outer{60}, X0inner{60};
75 std::pair<double, double>
energy{-3000, 500};
76 ATH_MSG_DEBUG(
"first x0: " << X0inner <<
" second x0: " << X0outer <<
" eloss: " <<
energy.first <<
" sigma: " <<
energy.second);
79 double sigmascat = std::sqrt(m_scattool->sigmaSquare(matprop, std::abs(1. / parm.parameters()[
Trk::qOverP]), 1.,
Trk::muon));
84 meots.emplace_back(X0inner, newsa, innersurf);
87 std::make_unique<Trk::EnergyLoss>(
energy.first,
energy.second),
90 meots.emplace_back(X0outer, newsa2, outersurf);
93 std::vector<std::unique_ptr<const Trk::TrackStateOnSurface>> tsosvec = m_calotsos->caloTSOS(ctx, parm);
94 if (tsosvec.size() != 3 && !m_calotsosparam.empty()) { tsosvec = m_calotsosparam->caloTSOS(ctx, parm); }
95 for (
const std::unique_ptr<const Trk::TrackStateOnSurface>& c_tsos : tsosvec) {
99 double qoverp = c_tsos->trackParameters()->parameters()[
Trk::qOverP];
102 std::unique_ptr<Trk::EnergyLoss> neweloss =
nullptr;
103 std::optional<Trk::ScatteringAngles> newsa = std::nullopt;
105 neweloss = std::make_unique<CaloEnergy>(*eloss);
108 double sigmascat = std::sqrt(m_scattool->sigmaSquare(matprop, std::abs(1. / qoverp), 1.,
Trk::muon));
111 meots.emplace_back(meot->
thicknessInX0(), newsa, std::move(neweloss), c_tsos->trackParameters()->associatedSurface());
114 if (meots.size() < 3) meots.clear();