From 3f459b70ecee1ce5dcba4d5afb891cddc2bc0b10 Mon Sep 17 00:00:00 2001 From: xai <xiaocong.ai@cern.ch> Date: Fri, 13 Dec 2019 13:43:58 +0800 Subject: [PATCH] Tidy-up --- Core/include/Acts/Fitter/KalmanFitter.hpp | 22 +++++++++---------- .../detail/PointwiseMaterialInteraction.hpp | 12 ++++------ 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/Core/include/Acts/Fitter/KalmanFitter.hpp b/Core/include/Acts/Fitter/KalmanFitter.hpp index 42d477847..b7f5c0e61 100644 --- a/Core/include/Acts/Fitter/KalmanFitter.hpp +++ b/Core/include/Acts/Fitter/KalmanFitter.hpp @@ -472,36 +472,36 @@ class KalmanFitter { /// @param surface The surface where the material interaction happens /// @param state The mutable propagator state object /// @param stepper The stepper in use - /// @param mStage The materal update stage + /// @param updateStage The materal update stage /// template <typename propagator_state_t, typename stepper_t> void materialInteractor(const Surface* surface, propagator_state_t& state, stepper_t& stepper, - const MaterialUpdateStage& mStage) const { + const MaterialUpdateStage& updateStage) const { // Prepare relevant input particle properties detail::PointwiseMaterialInteraction interaction(surface, state, stepper); // Evaluate the material properties - if (interaction.evaluateMaterialProperties(state, mStage)) { + if (interaction.evaluateMaterialProperties(state, updateStage)) { // Evaluate the material effects interaction.evaluatePointwiseMaterialInteraction(multipleScattering, energyLoss); ACTS_VERBOSE("Material effects on surface: " - << surface->geoID() << " at update stage: " << mStage + << surface->geoID() << " at update stage: " << updateStage << " are :"); ACTS_VERBOSE("eLoss = " - << interaction.Eloss << " and \n" - << "(variancePhi, varianceTheta, varianceQoverP) = (" - << interaction.variancePhi << ", " - << interaction.varianceTheta << ", " - << interaction.varianceQoverP << ")"); + << interaction.Eloss << ", " + << "variancePhi = " << interaction.variancePhi << ", " + << "varianceTheta = " << interaction.varianceTheta << ", " + << "varianceQoverP = " << interaction.varianceQoverP); // Update the state and stepper with material effects interaction.updateState(state, stepper); } else { - ACTS_VERBOSE("No material effects on surface: " - << surface->geoID() << " at update stage: " << mStage); + ACTS_VERBOSE("No material effects on surface: " << surface->geoID() + << " at update stage: " + << updateStage); } } diff --git a/Core/include/Acts/Propagator/detail/PointwiseMaterialInteraction.hpp b/Core/include/Acts/Propagator/detail/PointwiseMaterialInteraction.hpp index f1fb4f0a8..769902525 100644 --- a/Core/include/Acts/Propagator/detail/PointwiseMaterialInteraction.hpp +++ b/Core/include/Acts/Propagator/detail/PointwiseMaterialInteraction.hpp @@ -41,7 +41,6 @@ struct PointwiseMaterialInteraction { double Eloss = 0.; double nextP; - double nextQOverP; /// @brief Contructor /// @@ -65,9 +64,7 @@ struct PointwiseMaterialInteraction { mass(state.options.mass), pdg(state.options.absPdgCode), performCovarianceTransport(state.stepping.covTransport), - nav(state.stepping.navDir), - nextP(momentum), - nextQOverP(q / momentum) {} + nav(state.stepping.navDir) {} /// @brief This function evaluates the material properties to interact with /// @@ -90,9 +87,9 @@ struct PointwiseMaterialInteraction { } // Retrieve the material properties - const ISurfaceMaterial* sMaterial = - state.navigation.currentSurface->surfaceMaterial(); - slab = sMaterial->materialProperties(pos, nav, updateStage); + slab = + state.navigation.currentSurface->surfaceMaterial()->materialProperties( + pos, nav, updateStage); // Correct the material properties for non-zero incidence pathCorrection = surface->pathCorrection(state.geoContext, pos, dir); @@ -125,7 +122,6 @@ struct PointwiseMaterialInteraction { std::copysign(Eloss, nav); // put particle at rest if energy loss is too large nextP = (mass < nextE) ? std::sqrt(nextE * nextE - mass * mass) : 0; - nextQOverP = q / nextP; // update track parameters and covariance stepper.update(state.stepping, pos, dir, nextP, time); state.stepping.cov(ePHI, ePHI) = -- GitLab