File indexing completed on 2025-01-18 09:11:27
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "Acts/Propagator/detail/PointwiseMaterialInteraction.hpp"
0010
0011 #include "Acts/Material/Interactions.hpp"
0012
0013 namespace Acts::detail {
0014
0015 void PointwiseMaterialInteraction::evaluatePointwiseMaterialInteraction(
0016 bool multipleScattering, bool energyLoss) {
0017 if (energyLoss) {
0018 Eloss = computeEnergyLossBethe(slab, mass, qOverP, absQ);
0019 }
0020
0021 if (performCovarianceTransport) {
0022 covarianceContributions(multipleScattering, energyLoss);
0023 }
0024 }
0025
0026 void PointwiseMaterialInteraction::covarianceContributions(
0027 bool multipleScattering, bool energyLoss) {
0028
0029 if (multipleScattering) {
0030
0031 const float theta0 =
0032 computeMultipleScatteringTheta0(slab, absPdg, mass, qOverP, absQ);
0033
0034 const auto sigmaPhi = theta0 * (dir.norm() / VectorHelpers::perp(dir));
0035 variancePhi = sigmaPhi * sigmaPhi;
0036
0037 varianceTheta = theta0 * theta0;
0038 }
0039
0040 if (energyLoss) {
0041 const float sigmaQoverP =
0042 computeEnergyLossLandauSigmaQOverP(slab, mass, qOverP, absQ);
0043 varianceQoverP = sigmaQoverP * sigmaQoverP;
0044 }
0045 }
0046
0047 double PointwiseMaterialInteraction::updateVariance(
0048 double variance, double change, NoiseUpdateMode updateMode) const {
0049
0050
0051 return std::max(0., variance + std::copysign(change, updateMode));
0052 }
0053
0054 }