11 #include <boost/program_options.hpp>
24 namespace po = boost::program_options;
26 int main(
int argc,
char* argv[]) {
43 int randomSeed1 = 536235167;
44 int randomSeed2 = 729237523;
52 auto dd4HepDetectorConfig =
53 FW::Options::readDD4hepConfig<po::variables_map>(vm);
55 std::make_shared<FW::DD4hep::DD4hepGeometryService>(dd4HepDetectorConfig);
56 std::shared_ptr<const Acts::TrackingGeometry>
tGeometry =
57 geometrySvc->trackingGeometry(geoContext);
64 auto dd4hepToG4Svc = std::make_shared<FW::DD4hepG4::DD4hepToG4Svc>(dgConfig);
75 g4rConfig.tracksPerEvent = nTracks;
76 g4rConfig.seed1 = randomSeed1;
77 g4rConfig.seed2 = randomSeed2;
83 std::string outputDir = vm[
"output-dir"].template as<std::string>();
84 std::string matCollection = g4rConfig.geantMaterialCollection;
87 if (vm[
"output-root"].
template as<bool>()) {
92 matTrackWriterRootConfig.
collection = matCollection;
95 auto matTrackWriterRoot =
96 std::make_shared<FW::RootMaterialTrackWriter>(matTrackWriterRootConfig);
97 g4sequencer.
addWriter(matTrackWriterRoot);