20 namespace ActsExamples {
29 std::normal_distribution<double>
gauss(0., 1.);
36 std::uniform_real_distribution<double> ptDist(
m_cfg.
ptRange.first,
38 std::uniform_real_distribution<double>
qDist(0., 1.);
40 std::shared_ptr<const Acts::PerigeeSurface>
surface =
41 Acts::Surface::makeShared<Acts::PerigeeSurface>(
45 std::vector<std::vector<Acts::detail::Step>> propagationSteps;
49 std::unordered_map<size_t, Acts::RecordedMaterialTrack> recordedMaterial;
58 double theta = 2 * std::atan(std::exp(-eta));
59 double pt = ptDist(rng);
60 double p = pt / std::sin(theta);
62 double qop = charge /
p;
80 propagationSteps.push_back(
std::move(pOutput.first));
82 !pOutput.second.materialInteractions.empty()) {
85 recordedMaterial.emplace(
86 it, std::make_pair(std::make_pair(sPosition, sMomentum),
104 std::normal_distribution<double>&
gauss)
const {
110 for (
size_t k = 0;
k < size_t(covs_smeared.size()); ++
k) {
111 covs_smeared[
k] *=
gauss(rnd);
114 for (
size_t i = 0;
i < size_t(newCov.rows()); ++
i) {
115 for (
size_t j = 0;
j < size_t(newCov.cols()); ++
j) {
116 (newCov)(
i,
j) *= covs_smeared[
i];
117 (newCov)(
i,
j) *= covs_smeared[
j];
129 throw std::invalid_argument(
"Config needs to contain a propagator");
132 throw std::invalid_argument(
"No random number generator given");