Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FatrasSimulation.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file FatrasSimulation.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2017-2021 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 
22 
23 #include <cstddef>
24 #include <memory>
25 #include <string>
26 
27 namespace Acts {
28 class MagneticFieldProvider;
29 class TrackingGeometry;
30 } // namespace Acts
31 
32 namespace ActsExamples {
33 class RandomNumbers;
34 struct AlgorithmContext;
35 
36 namespace detail {
37 struct FatrasSimulation;
38 }
39 
41 class FatrasSimulation final : public IAlgorithm {
42  public:
43  struct Config {
54  "nuclearInteractionParameters";
56  std::shared_ptr<const RandomNumbers> randomNumbers;
58  std::shared_ptr<const Acts::TrackingGeometry> trackingGeometry;
60  std::shared_ptr<const Acts::MagneticFieldProvider> magneticField;
61 
62  // tuning parameters
66  bool emScattering = true;
70  bool emEnergyLossRadiation = true;
72  bool emPhotonConversion = true;
76  bool generateHitsOnMaterial = false;
79  bool generateHitsOnPassive = false;
80 
87  };
88 
94  ~FatrasSimulation() override;
95 
99  ActsExamples::ProcessCode execute(const AlgorithmContext& ctx) const override;
100 
102  const Config& config() const { return m_cfg; }
103 
105 
107 
109  this, "OutputParticlesInitial"};
111  this, "OutputParticlesFinal"};
112 
113  private:
115  std::unique_ptr<detail::FatrasSimulation> m_sim;
116 };
117 
118 } // namespace ActsExamples