7 #include "Acts/Seeding/EstimateTrackParamsFromSeed.hpp"
8 #include "Acts/EventData/TransformationHelpers.hpp"
12 const std::string&
name,
34 return StatusCode::SUCCESS;
37 std::optional<Acts::BoundTrackParameters>
40 const Acts::GeometryContext& geoContext,
41 const Acts::MagneticFieldContext& magFieldContext,
42 std::function<
const Acts::Surface&(
const ActsTrk::Seed&)> retrieveSurface)
const
44 const auto& sp_collection = seed.sp();
45 if ( sp_collection.size() < 3 )
return std::nullopt;
46 const auto& bottom_sp =
m_useTopSp ? sp_collection.back() : sp_collection.front();
50 Acts::MagneticFieldProvider::Cache magFieldCache = magneticField.
makeCache( magFieldContext );
51 Acts::Vector3 bField = *magneticField.
getField( Acts::Vector3(bottom_sp->x(), bottom_sp->y(), bottom_sp->z()),
55 const Acts::Surface& surface = retrieveSurface(seed);
65 std::optional<Acts::BoundTrackParameters>
68 const Acts::GeometryContext& geoContext,
69 const Acts::Surface& surface,
70 const Acts::Vector3& bField,
71 double bFieldMin)
const
74 const auto& sp_collection = seed.sp();
75 if ( sp_collection.size() < 3 )
return std::nullopt;
78 std::optional<Acts::BoundVector> params_opt =
m_useTopSp ?
79 Acts::estimateTrackParamsFromSeed(geoContext,
80 sp_collection.rbegin(),
86 Acts::estimateTrackParamsFromSeed(geoContext,
87 sp_collection.begin(),
94 if ( not params_opt.has_value() ) {
98 auto&
params = params_opt.value();
105 Acts::EstimateTrackParamCovarianceConfig covarianceEstimationConfig = {
109 .noTimeVarInflation = 1.0,
111 Acts::BoundMatrix covariance = Acts::estimateTrackParamCovariance(covarianceEstimationConfig,
params,
false);
114 return Acts::BoundTrackParameters(surface.getSharedPtr(),