EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrkrClusterFindingAlgorithmFinderFunction.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TrkrClusterFindingAlgorithmFinderFunction.cpp
2 
7 namespace {
8  template <typename Finder>
9  struct TrkrFindingFunctionImpl
10  {
11  Finder finder;
12 
13  TrkrFindingFunctionImpl(Finder&& f) : finder(std::move(f)) {}
14 
16  operator()(
17  const std::vector<SourceLink>& sourceLinks,
18  const ActsExamples::TrackParameters& initialParameters,
20  {
22  return finder.findTracks(sourceLinks, initialParameters, options);
23  };
24  };
25 } // namespace
26 
32  std::shared_ptr<const Acts::TrackingGeometry> trackingGeometry,
34 {
35  using Updater = Acts::GainMatrixUpdater;
36  using Smoother = Acts::GainMatrixSmoother;
37 
40  return std::visit(
41  [trackingGeometry](auto&& inputField) -> FinderFunction {
43  using InputMagneticField = typename std::decay_t<decltype(inputField)>::element_type;
44  using MagneticField = Acts::SharedBField<InputMagneticField>;
46  using Navigator = Acts::Navigator;
48  using SourceLinkSelector = Acts::CKFSourceLinkSelector;
49  using Finder = Acts::CombinatorialKalmanFilter
50  <Propagator, Updater, Smoother, SourceLinkSelector>;
51 
53  MagneticField field(std::move(inputField));
54  Stepper stepper(std::move(field));
55  Navigator navigator(trackingGeometry);
56  navigator.resolvePassive = false;
57  navigator.resolveMaterial = true;
58  navigator.resolveSensitive = true;
59  Propagator propagator(std::move(stepper), std::move(navigator));
60  Finder finder(std::move(propagator));
61 
63  return TrkrFindingFunctionImpl<Finder>(std::move(finder));
64  },
65  std::move(magneticField));
66 }