32 #include <boost/program_options.hpp>
34 namespace po = boost::program_options;
73 auto matCollection = vm[
"mat-mapping-collection"].template as<std::string>();
74 auto mapSurface = vm[
"mat-mapping-surfaces"].template as<bool>();
75 auto mapVolume = vm[
"mat-mapping-volumes"].template as<bool>();
76 auto volumeStep = vm[
"mat-mapping-volume-stepsize"].template as<float>();
77 if (!mapSurface && !mapVolume) {
82 std::string intputDir = vm[
"input-dir"].template as<std::string>();
83 auto intputFiles = vm[
"input-files"].template as<read_strings>();
85 if (vm[
"input-root"].
template as<bool>()) {
88 if (not matCollection.empty()) {
89 matTrackReaderRootConfig.
collection = matCollection;
91 matTrackReaderRootConfig.
fileList = intputFiles;
92 auto matTrackReaderRoot =
93 std::make_shared<ActsExamples::RootMaterialTrackReader>(
94 matTrackReaderRootConfig);
105 Propagator propagator(std::move(stepper), std::move(navigator));
108 auto smm = std::make_shared<Acts::SurfaceMaterialMapper>(
109 smmConfig, std::move(propagator),
118 Propagator propagator(std::move(stepper), std::move(navigator));
122 auto vmm = std::make_shared<Acts::VolumeMaterialMapper>(
123 vmmConfig, std::move(propagator),
130 std::string materialFileName = vm[
"mat-output-file"].as<std::string>();
132 if (!materialFileName.empty() and vm[
"output-root"].template as<bool>()) {
135 rmwConfig.
fileName = materialFileName +
".root";
141 std::make_shared<RootWriter>(std::move(rmwImpl)));
146 matTrackWriterRootConfig.
filePath = materialFileName +
"_tracks.root";
151 auto matTrackWriterRoot =
152 std::make_shared<ActsExamples::RootMaterialTrackWriter>(
153 matTrackWriterRootConfig, logLevel);
158 if (!materialFileName.empty() and vm[
"output-json"].template as<bool>()) {
160 std::string fileName = vm[
"mat-output-file"].template as<std::string>();
164 jmConverterCfg.processSensitives =
165 vm[
"mat-output-sensitives"].template as<bool>();
166 jmConverterCfg.processApproaches =
167 vm[
"mat-output-approaches"].template as<bool>();
168 jmConverterCfg.processRepresenting =
169 vm[
"mat-output-representing"].template as<bool>();
170 jmConverterCfg.processBoundaries =
171 vm[
"mat-output-boundaries"].template as<bool>();
172 jmConverterCfg.processVolumes =
173 vm[
"mat-output-volumes"].template as<bool>();
174 jmConverterCfg.writeData = vm[
"mat-output-data"].template as<bool>();
177 materialFileName +
".json");
182 std::make_shared<JsonWriter>(std::move(jmwImpl)));
186 auto mmAlg = std::make_shared<ActsExamples::MaterialMapping>(mmAlgConfig);