12 template <
typename propagator_t>
13 std::optional<Acts::BoundSymMatrix>
14 PropagationAlgorithm<propagator_t>::generateCovariance(
16 if (m_cfg.covarianceTransport) {
21 for (
size_t k = 0;
k < size_t(covs_smeared.size()); ++
k) {
22 covs_smeared[
k] *=
gauss(rnd);
25 for (
size_t i = 0; i < size_t(newCov.rows()); ++i) {
26 for (
size_t j = 0; j < size_t(newCov.cols()); ++j) {
27 (newCov)(i, j) *= covs_smeared[i];
28 (newCov)(i, j) *= covs_smeared[j];
36 template <
typename propagator_t>
37 PropagationAlgorithm<propagator_t>::PropagationAlgorithm(
40 : BareAlgorithm(
"PropagationAlgorithm", loglevel), m_cfg(cfg) {}
47 template <
typename propagator_t>
48 template <
typename parameters_t>
51 double pathLength)
const {
52 ACTS_DEBUG(
"Test propagation/extrapolation starts");
57 if (m_cfg.mode == 0) {
71 options.pathLimit = pathLength;
72 options.debug = m_cfg.debugOutput;
75 options.loopProtection =
80 auto& mInteractor = options.actionList.get<MaterialInteractor>();
81 mInteractor.multipleScattering = m_cfg.multipleScattering;
82 mInteractor.energyLoss = m_cfg.energyLoss;
83 mInteractor.recordInteractions = m_cfg.recordMaterialInteractions;
86 options.maxStepSize = m_cfg.maxStepSize;
90 m_cfg.propagator.propagate(startParameters, options).value();
91 auto steppingResults = result.template get<SteppingLogger::result_type>();
94 pOutput.first = std::move(steppingResults.steps);
96 if (m_cfg.recordMaterialInteractions) {
98 result.template get<MaterialInteractor::result_type>();
99 pOutput.second = std::move(materialResult);
103 if (m_cfg.debugOutput) {
104 auto& debugResult = result.template get<DebugOutput::result_type>();
111 template <
typename propagator_t>
118 std::normal_distribution<double>
gauss(0., 1.);
121 std::uniform_real_distribution<double>
phiDist(m_cfg.phiRange.first,
122 m_cfg.phiRange.second);
123 std::uniform_real_distribution<double>
etaDist(m_cfg.etaRange.first,
124 m_cfg.etaRange.second);
125 std::uniform_real_distribution<double> ptDist(m_cfg.ptRange.first,
126 m_cfg.ptRange.second);
127 std::uniform_real_distribution<double>
qDist(0., 1.);
129 std::shared_ptr<const Acts::PerigeeSurface>
surface =
130 Acts::Surface::makeShared<Acts::PerigeeSurface>(
134 std::vector<std::vector<Acts::detail::Step>> propagationSteps;
135 propagationSteps.reserve(m_cfg.ntests);
138 std::vector<RecordedMaterialTrack> recordedMaterial;
139 if (m_cfg.recordMaterialInteractions) {
140 recordedMaterial.reserve(m_cfg.ntests);
144 for (
size_t it = 0;
it < m_cfg.ntests; ++
it) {
146 double d0 = m_cfg.d0Sigma *
gauss(rng);
147 double z0 = m_cfg.z0Sigma *
gauss(rng);
150 double theta = 2 * atan(exp(-eta));
151 double pt = ptDist(rng);
152 double p = pt / sin(theta);
154 double qop = charge /
p;
155 double t = m_cfg.tSigma *
gauss(rng);
165 auto cov = generateCovariance(rng, gauss);
172 std::move(pars), surface);
173 sPosition = startParameters.position();
174 sMomentum = startParameters.momentum();
175 pOutput = executeTest<Acts::TrackParameters>(
context, startParameters);
179 context.
geoContext, std::move(cov), std::move(pars), surface);
180 sPosition = neutralParameters.position();
181 sMomentum = neutralParameters.momentum();
183 executeTest<Acts::NeutralParameters>(
context, neutralParameters);
186 propagationSteps.push_back(std::move(pOutput.first));
187 if (m_cfg.recordMaterialInteractions &&
188 pOutput.second.materialInteractions.size()) {
192 rmTrack.first.first = std::move(sPosition);
194 rmTrack.first.second = std::move(sMomentum);
196 rmTrack.second = std::move(pOutput.second);
198 recordedMaterial.push_back(std::move(rmTrack));
204 std::move(propagationSteps));
207 if (m_cfg.recordMaterialInteractions) {
209 std::move(recordedMaterial));