24 std::shared_ptr<const ActsExamples::RandomNumbers> randomNumberSvc) {
29 std::string particlesCollection =
"particles_generated";
30 auto evgenInput = vm[
"evg-input-type"].template as<std::string>();
31 if (evgenInput ==
"gun") {
33 evgCfg.outputParticles = particlesCollection;
34 evgCfg.randomNumbers = randomNumberSvc;
35 sequencer.
addReader(std::make_shared<EventGenerator>(evgCfg, logLevel));
37 }
else if (evgenInput ==
"pythia8") {
39 evgCfg.outputParticles = particlesCollection;
40 evgCfg.randomNumbers = randomNumberSvc;
41 sequencer.
addReader(std::make_shared<EventGenerator>(evgCfg, logLevel));
44 throw std::runtime_error(
"unknown event generator input: " + evgenInput);
48 std::string outputDir = vm[
"output-dir"].template as<std::string>();
51 if (vm[
"output-csv"].
template as<bool>()) {
55 pWriterCsvConfig.
outputStem =
"particles_generated";
57 std::make_shared<CsvParticleWriter>(pWriterCsvConfig, logLevel));
61 if (vm[
"output-root"].
template as<bool>()) {
67 std::make_shared<RootParticleWriter>(pWriterRootConfig, logLevel));