Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-10-25 07:55:14

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/Algebra.hpp"
0012 #include "Acts/Definitions/Units.hpp"
0013 #include "Acts/Propagator/NavigationTarget.hpp"
0014 #include "Acts/Surfaces/BoundaryTolerance.hpp"
0015 
0016 #include <any>
0017 #include <cstddef>
0018 #include <vector>
0019 
0020 namespace Acts {
0021 
0022 class Surface;
0023 
0024 namespace Experimental {
0025 
0026 class Portal;
0027 class Detector;
0028 class DetectorVolume;
0029 
0030 /// @brief A navigation state struct that is holding the current navigation information
0031 ///
0032 /// It relies on Surfaces and Portals, all navigation entities have to be
0033 /// described in these terms.
0034 struct NavigationState {
0035   /// Surface candidate vector alias, this allows to use e.g. boost_small vector
0036   /// or other stl like containers
0037   using SurfaceCandidates = std::vector<NavigationTarget>;
0038 
0039   /// The current position
0040   Vector3 position = Vector3(0., 0., 0.);
0041 
0042   /// The current direction
0043   Vector3 direction = Vector3(0., 0., 0.);
0044 
0045   /// The current detector in processing
0046   const Detector* currentDetector = nullptr;
0047 
0048   /// The current volume in processing, i.e. the position is inside
0049   const DetectorVolume* currentVolume = nullptr;
0050 
0051   /// The current surface, i.e the position is on surface
0052   const Surface* currentSurface = nullptr;
0053 
0054   /// The current portal, i.e the position is on portal
0055   const Portal* currentPortal = nullptr;
0056 
0057   /// That are the candidate surfaces to process
0058   SurfaceCandidates surfaceCandidates = {};
0059 
0060   /// Starting index of the surface candidate to correctly identify the first
0061   /// surface
0062   int surfaceCandidateIndex = -1;
0063 
0064   /// Boundary directives for surfaces
0065   BoundaryTolerance surfaceBoundaryTolerance = BoundaryTolerance::None();
0066 
0067   /// An overstep tolerance
0068   double overstepTolerance = -100 * UnitConstants::um;
0069 
0070   /// Auxiliary attached information
0071   std::any auxiliary;
0072 
0073   /// Get the current surface candidate being processed
0074   /// @return Reference to the current surface candidate
0075   const NavigationTarget& surfaceCandidate() const {
0076     return surfaceCandidates.at(surfaceCandidateIndex);
0077   }
0078 };
0079 
0080 }  // namespace Experimental
0081 }  // namespace Acts