![]() |
|
|||
File indexing completed on 2025-04-05 07:57:23
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/Volume.hpp" 0012 #include "Acts/Geometry/VolumeResizeStrategy.hpp" 0013 #include "Acts/Utilities/AxisDefinitions.hpp" 0014 0015 #include <span> 0016 #include <vector> 0017 0018 namespace Acts { 0019 0020 /// @class VolumeStack 0021 /// @brief A stack of volumes 0022 /// @note This is a base class for the different types of volume stacks 0023 class VolumeStack : public Volume { 0024 public: 0025 /// @param volumes is the vector of volumes 0026 /// @param direction is the direction of the stack 0027 /// @param resizeStrategy is the resize strategy 0028 VolumeStack(std::vector<Volume*>& volumes, AxisDirection direction, 0029 VolumeResizeStrategy resizeStrategy); 0030 0031 /// Access the gap volume that were created during attachment or resizing. 0032 /// @return the vector of gap volumes 0033 const std::vector<std::shared_ptr<Volume>>& gaps() const; 0034 0035 /// Check if a volume is a gap volume 0036 /// @param volume is the volume to check 0037 /// @return true if the volume is a gap volume, false otherwise 0038 bool isGapVolume(const Volume& volume) const; 0039 0040 private: 0041 /// Helper to get the first volume in the input, and throw an exception if 0042 /// there is not one. 0043 /// @param volumes is the vector of volumes 0044 /// @return the first volume 0045 static Volume& initialVolume(std::span<Volume*> volumes); 0046 0047 protected: 0048 /// @param transform is the transform of the gap volume 0049 /// @param bounds is the bounds of the gap volume 0050 /// @return the shared pointer to the gap volume 0051 std::shared_ptr<Volume> addGapVolume( 0052 const Transform3& transform, const std::shared_ptr<VolumeBounds>& bounds); 0053 0054 AxisDirection m_direction{}; 0055 VolumeResizeStrategy m_resizeStrategy{}; 0056 0057 std::vector<std::shared_ptr<Volume>> m_gaps{}; 0058 std::vector<Volume*>& m_volumes; 0059 }; 0060 } // 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 |
![]() ![]() |