Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:18:10

0001 #include "ActsGsfTrackFittingAlgorithm.h"
0002 
0003 #include <utility>
0004 
0005 std::shared_ptr<ActsTrackFittingAlgorithm::TrackFitterFunction>
0006 ActsGsfTrackFittingAlgorithm::makeGsfFitterFunction(
0007     const std::shared_ptr<const Acts::TrackingGeometry>& trackingGeometry,
0008     std::shared_ptr<const Acts::MagneticFieldProvider> magneticField,
0009     BetheHeitlerApprox betheHeitlerApprox, std::size_t maxComponents,
0010     double weightCutoff,
0011     MixtureReductionAlgorithm finalReductionMethod, bool abortOnError,
0012     bool disableAllMaterialHandling, const Acts::Logger& logger)
0013 {
0014   MultiStepper stepper(std::move(magneticField),
0015                        logger.cloneWithSuffix("GSFStep"));
0016   const auto& geo = *trackingGeometry;
0017 
0018   // Standard fitter
0019   Acts::Navigator::Config cfg{trackingGeometry};
0020   cfg.resolvePassive = false;
0021   cfg.resolveMaterial = true;
0022   cfg.resolveSensitive = true;
0023   Acts::Navigator navigator(cfg, logger.cloneWithSuffix("GSFNavigator"));
0024   Propagator propagator(std::move(stepper), std::move(navigator),
0025                         logger.cloneWithSuffix("GSFPropagator"));
0026   Fitter trackFitter(std::move(propagator),
0027                      BetheHeitlerApprox(betheHeitlerApprox),
0028                      logger.cloneWithSuffix("GSFFitter"));
0029 
0030   // build the fitter functions. owns the fitter object.
0031   auto fitterFunction = std::make_shared<GsfFitterFunctionImpl>(
0032       std::move(trackFitter), geo);
0033   fitterFunction->maxComponents = maxComponents;
0034   fitterFunction->weightCutoff = weightCutoff;
0035   fitterFunction->abortOnError = abortOnError;
0036   fitterFunction->disableAllMaterialHandling = disableAllMaterialHandling;
0037   fitterFunction->reductionAlg = finalReductionMethod;
0038 
0039   return fitterFunction;
0040 }