EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Pythia8Options.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Pythia8Options.cpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2019 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 
10 
12 #include "Acts/Utilities/Units.hpp"
16 
17 #include <boost/program_options.hpp>
18 
20  boost::program_options::options_description& opt) {
21  using namespace boost::program_options;
22 
23  opt.add_options()("evg-cms-energy", value<double>()->default_value(14000.),
24  "Center-of-mass energy collision in GeV")(
25  "evg-beam0", value<int32_t>()->default_value(Acts::PdgParticle::eProton),
26  "PDG number of the first beam particle")(
27  "evg-beam1", value<int32_t>()->default_value(Acts::PdgParticle::eProton),
28  "PDG number of the second beam particle")(
29  "evg-hard-process",
30  value<std::string>()->default_value("HardQCD:all = on"),
31  "Pythia8 process string for the hard scatter")(
32  "evg-pileup-process",
33  value<std::string>()->default_value("SoftQCD:all = on"),
34  "Pythi8 process string for the pile-up")(
35  "evg-pileup", value<double>()->default_value(200),
36  "Mean number of instantaneous pile-up events")(
37  "evg-vertex-xy-std", value<double>()->default_value(0.015),
38  "Transverse vertex standard deviation in mm")(
39  "evg-vertex-z-std", value<double>()->default_value(55.5),
40  "Longitudinal vertex standard deviation in mm")(
41  "evg-vertex-t-std", value<double>()->default_value(0.08),
42  "Temporal vertex standard deviation in ns");
43 }
44 
46  const boost::program_options::variables_map& vm, Acts::Logging::Level lvl) {
48  hard.pdgBeam0 = static_cast<Acts::PdgParticle>(vm["evg-beam0"].as<int32_t>());
49  hard.pdgBeam1 = static_cast<Acts::PdgParticle>(vm["evg-beam1"].as<int32_t>());
50  hard.cmsEnergy = vm["evg-cms-energy"].as<double>();
51  hard.settings = {vm["evg-hard-process"].as<std::string>()};
52 
54  pileup.pdgBeam0 =
55  static_cast<Acts::PdgParticle>(vm["evg-beam0"].as<int32_t>());
56  pileup.pdgBeam1 =
57  static_cast<Acts::PdgParticle>(vm["evg-beam1"].as<int32_t>());
58  pileup.cmsEnergy = vm["evg-cms-energy"].as<double>();
59  pileup.settings = {vm["evg-pileup-process"].as<std::string>()};
60 
61  auto mu = vm["evg-pileup"].as<double>();
62  auto vtxStdXY =
63  vm["evg-vertex-xy-std"].as<double>() * Acts::UnitConstants::mm;
64  auto vtxStdZ = vm["evg-vertex-z-std"].as<double>() * Acts::UnitConstants::mm;
65  auto vtxStdT = vm["evg-vertex-t-std"].as<double>() * Acts::UnitConstants::ns;
66 
68  cfg.generators = {
70  GaussianVertexGenerator{{vtxStdXY, vtxStdXY, vtxStdZ, vtxStdT}},
71  Pythia8Generator::makeFunction(hard, lvl)},
73  GaussianVertexGenerator{{vtxStdXY, vtxStdXY, vtxStdZ, vtxStdT}},
74  Pythia8Generator::makeFunction(pileup, lvl)},
75  };
76 
77  return cfg;
78 }