Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DigitizationInput.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file DigitizationInput.cpp
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 #include "DigitizationInput.hpp"
10 
15 
18  ActsExamples::Sequencer& sequencer) {
19  using namespace ActsExamples;
20 
21  // Read some standard options
22  auto logLevel = Options::readLogLevel(vars);
23 
24  // Read truth hits from CSV files
25  auto simHitReaderCfg = Options::readCsvSimHitReaderConfig(vars);
26  simHitReaderCfg.inputStem = "hits";
27  simHitReaderCfg.outputSimHits = "hits";
28  sequencer.addReader(
29  std::make_shared<CsvSimHitReader>(simHitReaderCfg, logLevel));
30 
31  return simHitReaderCfg;
32 }
33 
36  ActsExamples::Sequencer& sequencer) {
37  using namespace ActsExamples;
38 
39  // Read some standard options
40  auto logLevel = Options::readLogLevel(vars);
41 
42  // Read particles (initial states) from CSV files
43  auto particleReader = Options::readCsvParticleReaderConfig(vars);
44  particleReader.inputStem = "particles_initial";
45  particleReader.outputParticles = "particles_initial";
46  sequencer.addReader(
47  std::make_shared<CsvParticleReader>(particleReader, logLevel));
48 
49  return particleReader;
50 }