Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:11:06

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include "Acts/Definitions/Direction.hpp"
0012 #include "Acts/EventData/MultiTrajectory.hpp"
0013 #include "Acts/EventData/SourceLink.hpp"
0014 #include "Acts/Geometry/GeometryContext.hpp"
0015 #include "Acts/Utilities/CalibrationContext.hpp"
0016 #include "Acts/Utilities/Logger.hpp"
0017 #include "Acts/Utilities/Result.hpp"
0018 
0019 namespace Acts::detail {
0020 
0021 template <typename traj_t>
0022 void voidFitterCalibrator(const GeometryContext& /*gctx*/,
0023                           const CalibrationContext& /*cctx*/,
0024                           const SourceLink& /*sourceLink*/,
0025                           typename traj_t::TrackStateProxy /*trackState*/) {
0026   throw std::runtime_error{"voidFitterCalibrator should not ever execute"};
0027 }
0028 
0029 template <typename traj_t>
0030 Result<void> voidFitterUpdater(const GeometryContext& /*gctx*/,
0031                                typename traj_t::TrackStateProxy trackState,
0032                                const Logger& /*logger*/) {
0033   trackState.filtered() = trackState.predicted();
0034   trackState.filteredCovariance() = trackState.predictedCovariance();
0035   return Result<void>::success();
0036 }
0037 
0038 template <typename traj_t>
0039 Result<void> voidFitterSmoother(const GeometryContext& /*gctx*/,
0040                                 traj_t& trackStates, std::size_t entry,
0041                                 const Logger& /*logger*/) {
0042   trackStates.applyBackwards(entry, [](auto trackState) {
0043     trackState.smoothed() = trackState.filtered();
0044     trackState.smoothedCovariance() = trackState.filteredCovariance();
0045   });
0046 
0047   return Result<void>::success();
0048 }
0049 
0050 template <typename traj_t>
0051 bool voidOutlierFinder(typename traj_t::ConstTrackStateProxy /*trackState*/) {
0052   return false;
0053 }
0054 
0055 template <typename traj_t>
0056 bool voidReverseFilteringLogic(
0057     typename traj_t::ConstTrackStateProxy /*trackState*/) {
0058   return false;
0059 }
0060 
0061 inline const Surface* voidSurfaceAccessor(const SourceLink& /*sourceLink*/) {
0062   throw std::runtime_error{"voidSurfaceAccessor should not ever execute"};
0063 }
0064 
0065 template <typename component_t>
0066 void voidComponentReducer(std::vector<component_t>& /*components*/,
0067                           std::size_t /*n*/, const Surface& /*surface*/) {
0068   throw std::runtime_error{"voidComponentReducer should not ever execute"};
0069 }
0070 
0071 }  // namespace Acts::detail