44 using namespace Acts::UnitLiterals;
45 using namespace ActsExamples;
46 using namespace std::filesystem;
50 auto opt = desc.add_options();
51 opt(
"reco-with-misalignment-correction", value<bool>()->default_value(
false),
52 "Correct for detector misalignment effects.");
53 opt(
"alignment-geo-config-file", value<std::string>()->default_value(
""),
54 "Json file for alignment geometry elements selection");
58 int argc,
char* argv[],
59 const std::shared_ptr<ActsExamples::IBaseDetector>&
detector,
73 detector->addOptions(desc);
90 auto rnd = std::make_shared<const ActsExamples::RandomNumbers>(
93 if (vm[
"fit-directed-navigation"].as<bool>()) {
94 throw std::runtime_error(
95 "Directed navigation not supported anymore in the examples binaries."
96 "Please refer to the RefittingAlgorithm in the python bindings.");
103 for (
const auto& cdr :
geometry.second) {
116 simHitReaderCfg.outputSimHits);
123 particleSelectorCfg.
inputParticles = particleReader.outputParticles;
125 digiCfg.outputMeasurementParticlesMap;
128 particleSelectorCfg.
ptMin = 500._MeV;
130 std::make_shared<TruthSeedSelector>(particleSelectorCfg,
logLevel));
136 auto particleSmearingCfg =
146 digiCfg.outputMeasurementParticlesMap;
149 std::make_shared<TruthTrackFinder>(trackFinderCfg,
logLevel));
151 if (vm[
"reco-with-misalignment-correction"].as<bool>()) {
159 particleSmearingCfg.outputTrackParameters;
163 if (not path.empty()) {
172 alignment.
align = AlignmentAlgorithm::makeAlignmentFunction(
175 std::make_shared<AlignmentAlgorithm>(alignment,
logLevel));
184 particleSmearingCfg.outputTrackParameters;
186 fitter.
pickTrack = vm[
"fit-pick-track"].as<
int>();
189 vm[
"fit-multiple-scattering-correction"].as<bool>(),
190 vm[
"fit-energy-loss-correction"].as<bool>());
192 std::make_shared<TrackFittingAlgorithm>(fitter,
logLevel));
196 tracksToTrajCfg.outputTrajectories =
"trajectories";
198 (std::make_shared<TracksToTrajectories>(tracksToTrajCfg,
logLevel)));
204 trackStatesWriter.
inputSimHits = simHitReaderCfg.outputSimHits;
206 digiCfg.outputMeasurementParticlesMap;
208 digiCfg.outputMeasurementSimHitsMap;
210 sequencer.
addWriter(std::make_shared<RootTrajectoryStatesWriter>(
218 digiCfg.outputMeasurementParticlesMap;
220 sequencer.
addWriter(std::make_shared<RootTrajectorySummaryWriter>(
229 digiCfg.outputMeasurementParticlesMap;
232 std::make_shared<TrackFinderPerformanceWriter>(perfFinder,
logLevel));
238 digiCfg.outputMeasurementParticlesMap;
241 std::make_shared<TrackFitterPerformanceWriter>(perfFitter,
logLevel));
243 return sequencer.
run();