Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/Acts/Navigation/NavigationState.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 2021 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/Algebra.hpp"
0012 #include "Acts/Definitions/Units.hpp"
0013 #include "Acts/Geometry/GeometryContext.hpp"
0014 #include "Acts/Surfaces/BoundaryCheck.hpp"
0015 #include "Acts/Utilities/Delegate.hpp"
0016 #include "Acts/Utilities/Intersection.hpp"
0017 
0018 #include <any>
0019 #include <cstddef>
0020 #include <vector>
0021 
0022 namespace Acts {
0023 
0024 class Surface;
0025 
0026 namespace Experimental {
0027 
0028 class Portal;
0029 class Detector;
0030 class DetectorVolume;
0031 
0032 /// @brief A navigation state struct that is holding the current navigation information
0033 ///
0034 /// It relies on Surfaces and Portals, all navigation entities have to be
0035 /// described in these terms.
0036 struct NavigationState {
0037   /// @brief  A surface candidate and its intersection
0038   ///
0039   /// A candidates can either be a surface or a portal (which contain a surface)
0040   struct SurfaceCandidate {
0041     /// A candidate intersection, in Surface view
0042     ObjectIntersection<Surface> objectIntersection;
0043     /// A candidate is either a detector Surface
0044     const Surface* surface = nullptr;
0045     /// Or a portal
0046     const Portal* portal = nullptr;
0047     /// The boundary check used for the candidate, boundary checks
0048     /// can differ for sensitive surfaces and portals
0049     BoundaryCheck boundaryCheck = BoundaryCheck(true);
0050   };
0051 
0052   /// Surface candidate vector alias, this allows to use e.g. boost_small vector
0053   /// or other stl like containers
0054   using SurfaceCandidates = std::vector<SurfaceCandidate>;
0055 
0056   /// The current position
0057   Vector3 position = Vector3(0., 0., 0.);
0058 
0059   /// The current direction
0060   Vector3 direction = Vector3(0., 0., 0.);
0061 
0062   /// The current absolute momentum
0063   ActsScalar absMomentum = 0.;
0064 
0065   /// The current absolute charge
0066   ActsScalar absCharge = 0.;
0067 
0068   /// The current magnetic field
0069   Vector3 magneticField = Vector3(0., 0., 0.);
0070 
0071   /// The current detector in processing
0072   const Detector* currentDetector = nullptr;
0073 
0074   /// The current volume in processing, i.e. the position is inside
0075   const DetectorVolume* currentVolume = nullptr;
0076 
0077   /// The current surface, i.e the position is on surface
0078   const Surface* currentSurface = nullptr;
0079 
0080   /// The current portal, i.e the position is on portal
0081   const Portal* currentPortal = nullptr;
0082 
0083   /// That are the candidate surfaces to process
0084   SurfaceCandidates surfaceCandidates = {};
0085   std::size_t surfaceCandidateIndex = 0;
0086 
0087   /// Boundary directives for surfaces
0088   BoundaryCheck surfaceBoundaryCheck = BoundaryCheck(true);
0089 
0090   /// An overstep tolerance
0091   ActsScalar overstepTolerance = -100 * UnitConstants::um;
0092 
0093   /// Auxiliary attached information
0094   std::any auxiliary;
0095 
0096   const SurfaceCandidate& surfaceCandidate() const {
0097     return surfaceCandidates.at(surfaceCandidateIndex);
0098   }
0099 };
0100 
0101 }  // namespace Experimental
0102 }  // namespace Acts