Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NuclearInteractionOptions.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file NuclearInteractionOptions.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 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 
16 
17 #include <utility>
18 
19 #include "boost/program_options.hpp"
20 
21 namespace ActsExamples {
22 namespace Options {
23 
28 
31 readParametrisations(const std::string& fileName);
32 
37  const boost::program_options::variables_map& variables);
38 
45 template <typename simulator_t>
47  const std::string& nuclearInteractionParametrisation,
48  simulator_t& simulator) {
49  if (nuclearInteractionParametrisation.empty()) {
50  return;
51  }
52 
53  auto& chargedNuclearInteraction =
54  simulator.charged.interactions
55  .template get<ActsFatras::NuclearInteraction>();
56  auto& neutralNuclearInteraction =
57  simulator.neutral.interactions
58  .template get<ActsFatras::NuclearInteraction>();
59 
60  const auto mpp = readParametrisations(nuclearInteractionParametrisation);
61 
62  chargedNuclearInteraction.multiParticleParameterisation = mpp;
63  neutralNuclearInteraction.multiParticleParameterisation = mpp;
64 }
65 
66 } // namespace Options
67 } // namespace ActsExamples