|
|
|||
File indexing completed on 2026-03-29 07:46:36
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/Material/MaterialSlab.hpp" 0012 0013 namespace Acts { 0014 0015 class Material; 0016 0017 /// Accumulate and average volume-based material properties. 0018 /// 0019 /// @ingroup material_mapping 0020 /// 0021 /// This class is intended to be used during the mapping process. 0022 class AccumulatedVolumeMaterial { 0023 public: 0024 /// Add one entry with the given material properties. 0025 /// @param mat The material slab to accumulate 0026 void accumulate(const MaterialSlab& mat); 0027 0028 /// Compute the average material collected so far. 0029 /// 0030 /// @returns Vacuum properties if no matter has been accumulated yet. 0031 const Material& average() { return m_average.material(); } 0032 0033 private: 0034 MaterialSlab m_average = MaterialSlab::Nothing(); 0035 }; 0036 0037 } // 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 |
|