Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-25 08:20:18

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/Geometry/GeometryContext.hpp"
0012 #include "Acts/MagneticField/MagneticFieldContext.hpp"
0013 #include "Acts/Material/MaterialInteraction.hpp"
0014 
0015 #include <tuple>
0016 #include <utility>
0017 #include <vector>
0018 
0019 namespace Acts {
0020 
0021 /// @brief Interface for the material mapping that seeks the possible
0022 /// assignment candidates for the material interactiosn
0023 /// @ingroup material_mapping
0024 class IAssignmentFinder {
0025  public:
0026   /// Virtual destructor
0027   virtual ~IAssignmentFinder() = default;
0028 
0029   /// @brief SurfaceAssignment is a surface, a position and a direction
0030   struct SurfaceAssignment {
0031     /// The surface to which the material interaction is assigned to
0032     const Surface* surface = nullptr;
0033     /// Position of the assignment
0034     Vector3 position = Vector3::Zero();
0035     /// Direction of the assignment
0036     Vector3 direction = Vector3::Zero();
0037   };
0038 
0039   /// @brief VolumeAssignment is a volume and a entry and exit of the volume
0040   struct VolumeAssignment {
0041     /// The volume to which the material interaction is assigned to
0042     InteractionVolume volume{};
0043     /// Entry point of the volume
0044     Vector3 entry = Vector3::Zero();
0045     /// Exit point of the volume
0046     Vector3 exit = Vector3::Zero();
0047   };
0048 
0049   /// @brief Interface method for generating assignment candidates for the
0050   /// material interaction assignment to surfaces or volumes
0051   ///
0052   /// @param gctx is the geometry context
0053   /// @param mctx is the magnetic field context
0054   /// @param position is the position of the initial ray
0055   /// @param direction is the direction of initial ray
0056   ///
0057   /// @return a vector of Surface Assignments and Volume Assignments
0058   virtual std::pair<std::vector<SurfaceAssignment>,
0059                     std::vector<VolumeAssignment>>
0060   assignmentCandidates(const GeometryContext& gctx,
0061                        const MagneticFieldContext& mctx,
0062                        const Vector3& position,
0063                        const Vector3& direction) const = 0;
0064 };
0065 
0066 }  // namespace Acts