|
|
|||
File indexing completed on 2025-12-15 09:42:10
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/Geometry/GeometryContext.hpp" 0013 #include "Acts/MagneticField/MagneticFieldContext.hpp" 0014 #include "Acts/Material/MaterialInteraction.hpp" 0015 #include "Acts/Utilities/Logger.hpp" 0016 0017 #include <memory> 0018 0019 namespace Acts { 0020 0021 class IAssignmentFinder; 0022 0023 /// @brief The material validater is a tool that allows to record the material 0024 /// seen by a ray through a set of material surfaces. 0025 /// 0026 /// It does uses a material assigner that can be either done using the 0027 /// propagator or a more sinmple trial and error intersection; 0028 class MaterialValidater { 0029 public: 0030 /// Nested configuration struct 0031 struct Config { 0032 /// Assignment finder for material interaction collection 0033 std::shared_ptr<const IAssignmentFinder> materialAssigner = nullptr; 0034 }; 0035 0036 /// Constructor 0037 /// @param cfg The configuration struct carrying the used tools 0038 /// @param mlogger The logging object 0039 explicit MaterialValidater(const Config& cfg, 0040 std::unique_ptr<const Logger> mlogger = 0041 getDefaultLogger("MaterialValidater", 0042 Logging::INFO)); 0043 0044 /// Method to record the material along a ray 0045 /// @param gctx the geometry context 0046 /// @param mctx the magnetic field context 0047 /// @param position the starting position of the ray 0048 /// @param direction the direction of the ray (unit vector) 0049 /// 0050 /// @return a rerorded material track 0051 RecordedMaterialTrack recordMaterial(const GeometryContext& gctx, 0052 const MagneticFieldContext& mctx, 0053 const Vector3& position, 0054 const Vector3& direction) const; 0055 0056 private: 0057 /// Access method to the logger 0058 const Logger& logger() const { return *m_logger; } 0059 0060 /// The configuration 0061 Config m_cfg; 0062 0063 // The logger 0064 std::unique_ptr<const Logger> m_logger; 0065 }; 0066 0067 } // namespace Acts
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|