33 #include <boost/program_options.hpp>
37 using namespace Acts::UnitLiterals;
38 using namespace ActsExamples;
41 int argc,
char* argv[],
42 const std::shared_ptr<ActsExamples::IBaseDetector>&
detector) {
55 auto opt = desc.add_options();
56 opt(
"digi-read-write-test", boost::program_options::bool_switch(),
57 "Test reading and writing roundtrip.");
60 detector->addOptions(desc);
74 auto contextDecorators =
geometry.second;
79 for (
const auto& cdr : contextDecorators) {
93 vm[
"digi-merge"].as<bool>(), vm[
"digi-merge-nsigma"].as<double>(),
94 vm[
"digi-merge-common-corner"].as<bool>(),
96 digiCfg.inputSimHits = simHitReaderCfg.outputSimHits;
100 if (not vm[
"dump-digi-config"].as<std::string>().empty()) {
106 std::pair<Acts::GeometryIdentifier, std::vector<Acts::BoundIndices>>>
109 if (vm[
"digi-read-write-test"].as<bool>()) {
112 measReaderCfg.inputDir = vm[
"input-dir"].as<
std::string>();
113 measReaderCfg.outputMeasurements = digiCfg.outputMeasurements;
114 measReaderCfg.outputSourceLinks = digiCfg.outputSourceLinks;
115 measReaderCfg.outputClusters = digiCfg.outputClusters;
116 measReaderCfg.outputMeasurementSimHitsMap =
117 digiCfg.outputMeasurementSimHitsMap;
119 std::make_shared<CsvMeasurementReader>(measReaderCfg,
logLevel));
122 std::make_shared<DigitizationAlgorithm>(digiCfg,
logLevel));
126 if (vm[
"output-root"].
template as<bool>()) {
130 measWriterRoot.
inputSimHits = simHitReaderCfg.outputSimHits;
132 digiCfg.outputMeasurementSimHitsMap;
137 digiCfg.getBoundIndices());
140 std::make_shared<RootMeasurementWriter>(measWriterRoot,
logLevel));
144 if (vm[
"output-csv"].
template as<bool>()) {
150 digiCfg.outputMeasurementSimHitsMap;
152 std::make_shared<CsvMeasurementWriter>(measWriterCsv,
logLevel));
155 return sequencer.
run();