ATLAS Offline Software
GaussianSumFitterToolDirectFit.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 // ATHENA
9 
10 // ACTS
11 #include "Acts/Surfaces/Surface.hpp"
12 #include "Acts/EventData/VectorMultiTrajectory.hpp"
13 #include "Acts/EventData/VectorTrackContainer.hpp"
14 #include "Acts/EventData/TrackParameters.hpp"
16 
17 // STL
18 #include <vector>
19 
20 namespace ActsTrk {
21 
22 std::unique_ptr<Trk::Track>
24  const Acts::GeometryContext& tgContext,
25  const Acts::GsfOptions<ActsTrk::MutableTrackStateBackend>& gsfOptions,
26  const std::vector<Acts::SourceLink>& trackSourceLinks,
27  const Acts::BoundTrackParameters& initialParams,
28  const std::vector<const Acts::Surface*>& surfaces) const
29 {
30  if (!m_useDirectNavigation) {
31  ATH_MSG_ERROR("ACTS GSF UseDirectNavigation is false, but direct navigation is used");
32  return nullptr;
33  }
34  if (trackSourceLinks.empty()) {
35  ATH_MSG_DEBUG("input contain measurement but no source link created, probable issue with the converter, reject fit ");
36  return nullptr;
37  }
38 
40  auto result = m_directFitter->fit(trackSourceLinks.begin(),
41  trackSourceLinks.end(),
42  initialParams,
43  gsfOptions,
44  surfaces,
45  tracks);
46 
47  // Convert
48  if (not result.ok()) return nullptr;
49  return makeTrack(ctx, tgContext, tracks, result);
50 }
51 
52 }
53 
get_generator_info.result
result
Definition: get_generator_info.py:21
GaussianSumFitterTool.h
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ActsTrk::GaussianSumFitterTool::performDirectFit
std::unique_ptr< Trk::Track > performDirectFit(const EventContext &ctx, const Acts::GeometryContext &tgContext, const Acts::GsfOptions< ActsTrk::MutableTrackStateBackend > &gsfOptions, const std::vector< Acts::SourceLink > &trackSourceLinks, const Acts::BoundTrackParameters &initialParams, const std::vector< const Acts::Surface * > &surfaces) const
Definition: GaussianSumFitterToolDirectFit.cxx:23
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TrackSummary.h
ActsTrk::GaussianSumFitterTool::m_useDirectNavigation
Gaudi::Property< bool > m_useDirectNavigation
Definition: GaussianSumFitterTool.h:154
ActsTrk::GaussianSumFitterTool::m_directFitter
std::unique_ptr< DirectFitter > m_directFitter
Definition: GaussianSumFitterTool.h:179
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MuonDetectorBuilderTool.cxx:54
ActsTrk::GaussianSumFitterTool::makeTrack
std::unique_ptr< Trk::Track > makeTrack(const EventContext &ctx, const Acts::GeometryContext &tgContext, ActsTrk::MutableTrackContainer &tracks, Acts::Result< typename ActsTrk::MutableTrackContainer::TrackProxy, std::error_code > &fitResult) const
Definition: GaussianSumFitterTool.cxx:398
ActsTrk::MutableTrackContainer
Definition: TrackContainer.h:122
TrackContainer.h