11 #include "Acts/EventData/NeutralParameters.hpp"
16 #include "Acts/Propagator/detail/DebugOutputActor.hpp"
17 #include "Acts/Propagator/detail/StandardAborters.hpp"
38 template <
typename charged_propagator_t,
typename charged_selector_t,
39 typename charged_interactor_t,
typename neutral_propagator_t,
40 typename neutral_selector_t,
typename neutral_interactor_t>
43 Simulator(charged_propagator_t chpropagator, neutral_propagator_t npropagator)
58 std::shared_ptr<const Acts::Logger>
mlogger =
nullptr;
76 template <
typename context_t,
typename generator_t,
77 typename event_collection_t,
typename hit_collection_t>
78 void operator()(context_t &fatrasContext, generator_t &fatrasGenerator,
79 event_collection_t &fatrasEvent,
80 hit_collection_t &fatrasHits)
const {
83 typedef Acts::detail::DebugOutputActor DebugOutput;
86 typedef Acts::ActionList<charged_interactor_t, DebugOutput>
88 typedef Acts::AbortList<Acts::detail::EndOfWorldReached> ChargedAbortList;
93 typedef Acts::ActionList<neutral_interactor_t, DebugOutput>
95 typedef Acts::AbortList<Acts::detail::EndOfWorldReached> NeutralAbortList;
101 for (
auto &
vertex : fatrasEvent) {
104 for (std::size_t
i = 0;
i <
vertex.outgoing.size();
i++) {
112 ChargedOptions chargedOptions(fatrasContext.geoContext,
113 fatrasContext.magFieldContext);
114 chargedOptions.debug =
debug;
116 auto &chargedInteractor =
117 chargedOptions.actionList.template get<charged_interactor_t>();
119 typedef typename charged_interactor_t::result_type ChargedResult;
121 chargedInteractor.generator = &fatrasGenerator;
123 chargedInteractor.initialParticle =
particle;
127 Acts::CurvilinearParameters
start(std::nullopt,
particle.position(),
133 const auto &fatrasResult = result.template get<ChargedResult>();
137 for (
const auto &fHit : fatrasResult.simulatedHits) {
138 fatrasHits.insert(fHit);
141 const auto &simparticles = fatrasResult.outgoing;
142 vertex.outgoing_insert(simparticles);
145 auto &fatrasDebug = result.template get<DebugOutput::result_type>();
150 NeutralOptions neutralOptions(fatrasContext.geoContext,
151 fatrasContext.magFieldContext);
152 neutralOptions.debug =
debug;
154 auto &neutralInteractor =
155 neutralOptions.actionList.template get<neutral_interactor_t>();
157 typedef typename neutral_interactor_t::result_type NeutralResult;
159 neutralInteractor.generator = &fatrasGenerator;
161 neutralInteractor.initialParticle =
particle;
163 Acts::NeutralCurvilinearParameters
start(
167 auto &fatrasResult = result.template get<NeutralResult>();
169 const auto &simparticles = fatrasResult.outgoing;
170 vertex.outgoing_insert(simparticles);
173 auto &fatrasDebug = result.template get<DebugOutput::result_type>();