Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-19 09:23:23

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 2019-2020 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/Material/MaterialSlab.hpp"
0012 
0013 namespace Acts {
0014 
0015 class Material;
0016 
0017 /// Accumulate and average volume-based material properties.
0018 ///
0019 /// This class is intended to be used during the mapping process.
0020 class AccumulatedVolumeMaterial {
0021  public:
0022   /// Add one entry with the given material properties.
0023   void accumulate(const MaterialSlab& mat);
0024 
0025   /// Compute the average material collected so far.
0026   ///
0027   /// @returns Vacuum properties if no matter has been accumulated yet.
0028   const Material& average() { return m_average.material(); }
0029 
0030  private:
0031   MaterialSlab m_average;
0032 };
0033 
0034 }  // namespace Acts