ATLAS Offline Software
Loading...
Searching...
No Matches
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
20namespace ActsTrk {
21
22std::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{
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
39
40 ActsTrk::MutableTrackBackend trackContainerBackEnd;
41 ActsTrk::MutableTrackStateBackend multiTrajBackEnd;
42 ActsTrk::MutableTrackContainer tracks( std::move(trackContainerBackEnd),
43 std::move(multiTrajBackEnd));
44 auto result = m_directFitter->fit(trackSourceLinks.begin(),
45 trackSourceLinks.end(),
46 initialParams,
47 gsfOptions,
48 surfaces,
49 tracks);
50
51 // Convert
52 if (not result.ok()) return nullptr;
53 return makeTrack(ctx, tgContext, tracks, result);
54}
55
56}
57
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
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
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
Gaudi::Property< bool > m_useDirectNavigation
std::unique_ptr< DirectFitter > m_directFitter
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Acts::VectorMultiTrajectory MutableTrackStateBackend
Acts::TrackContainer< MutableTrackBackend, MutableTrackStateBackend, Acts::detail::ValueHolder > MutableTrackContainer
Acts::VectorTrackContainer MutableTrackBackend