Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:27:53

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 2018-2020 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 http://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 #include "Acts/Utilities/TypeTraits.hpp"
0019 
0020 namespace Acts::detail {
0021 
0022 template <typename traj_t>
0023 void voidFitterCalibrator(const GeometryContext& /*gctx*/,
0024                           const CalibrationContext& /*cctx*/,
0025                           const SourceLink& /*sourceLink*/,
0026                           typename traj_t::TrackStateProxy /*trackState*/) {
0027   throw std::runtime_error{"voidFitterCalibrator should not ever execute"};
0028 }
0029 
0030 template <typename traj_t>
0031 Result<void> voidFitterUpdater(const GeometryContext& /*gctx*/,
0032                                typename traj_t::TrackStateProxy trackState,
0033                                Direction /*direction*/,
0034                                const Logger& /*logger*/) {
0035   trackState.filtered() = trackState.predicted();
0036   trackState.filteredCovariance() = trackState.predictedCovariance();
0037   return Result<void>::success();
0038 }
0039 
0040 template <typename traj_t>
0041 Result<void> voidFitterSmoother(const GeometryContext& /*gctx*/,
0042                                 traj_t& trackStates, std::size_t entry,
0043                                 const Logger& /*logger*/) {
0044   trackStates.applyBackwards(entry, [](auto trackState) {
0045     trackState.smoothed() = trackState.filtered();
0046     trackState.smoothedCovariance() = trackState.filteredCovariance();
0047   });
0048 
0049   return Result<void>::success();
0050 }
0051 
0052 template <typename traj_t>
0053 bool voidOutlierFinder(typename traj_t::ConstTrackStateProxy /*trackState*/) {
0054   return false;
0055 }
0056 
0057 template <typename traj_t>
0058 bool voidReverseFilteringLogic(
0059     typename traj_t::ConstTrackStateProxy /*trackState*/) {
0060   return false;
0061 }
0062 
0063 inline const Surface* voidSurfaceAccessor(const SourceLink& /*sourceLink*/) {
0064   throw std::runtime_error{"voidSurfaceAccessor should not ever execute"};
0065 }
0066 
0067 template <typename component_t>
0068 void voidComponentReducer(std::vector<component_t>& /*components*/,
0069                           std::size_t /*n*/, const Surface& /*surface*/) {
0070   throw std::runtime_error{"voidComponentReducer should not ever execute"};
0071 }
0072 
0073 }  // namespace Acts::detail