Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PropagationAlgorithm.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PropagationAlgorithm.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2017 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
10 
33 
34 #include <algorithm>
35 #include <cmath>
36 #include <cstddef>
37 #include <limits>
38 #include <memory>
39 #include <optional>
40 #include <random>
41 #include <string>
42 #include <unordered_map>
43 #include <utility>
44 #include <vector>
45 
46 namespace ActsExamples {
47 
48 class PropagatorInterface;
49 struct AlgorithmContext;
50 
53 
58  std::pair<std::pair<Acts::Vector3, Acts::Vector3>, RecordedMaterial>;
59 
61 using PropagationOutput =
62  std::pair<std::vector<Acts::detail::Step>, RecordedMaterial>;
63 
70  public:
71  struct Config {
73  std::shared_ptr<PropagatorInterface> propagatorImpl = nullptr;
74 
76  std::shared_ptr<RandomNumbers> randomNumberSvc = nullptr;
78  int mode = 0;
80  bool sterileLogger = false;
82  bool debugOutput = false;
84  bool energyLoss = true;
86  bool multipleScattering = true;
89 
91  size_t ntests = 100;
97  double phiSigma = 0.001;
99  double thetaSigma = 0.001;
101  double qpSigma = 0.0001 / 1 * Acts::UnitConstants::GeV;
105  std::pair<double, double> phiRange = {-M_PI, M_PI};
107  std::pair<double, double> etaRange = {-4., 4.};
109  std::pair<double, double> ptRange = {100 * Acts::UnitConstants::MeV,
116 
119 
122 
124  std::string propagationMaterialCollection = "RecordedMaterialTracks";
125 
127  bool covarianceTransport = false;
128 
130  Acts::BoundVector covariances = Acts::BoundVector::Zero();
131 
133  Acts::BoundSquareMatrix correlations = Acts::BoundSquareMatrix::Identity();
134  };
135 
140 
145  const AlgorithmContext& context) const override;
146 
148  const Config& config() const { return m_cfg; }
149 
150  private:
152 
154  m_outpoutPropagationSteps{this, "OutputPropagationSteps"};
155 
157  m_recordedMaterial{this, "RecordedMaterial"};
158 
162  std::optional<Acts::BoundSquareMatrix> generateCovariance(
164  std::normal_distribution<double>& gauss) const;
165 };
166 
167 } // namespace ActsExamples