Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 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/Definitions/Algebra.hpp"
0012 #include "Acts/Material/IVolumeMaterial.hpp"
0013 #include "Acts/Material/Material.hpp"
0014 
0015 #include <iosfwd>
0016 
0017 namespace Acts {
0018 
0019 /// @class HomogeneousVolumeMaterial
0020 ///
0021 /// It extends the IVolumeMaterial base class to describe a simple
0022 /// homogeneous material in a volume
0023 class HomogeneousVolumeMaterial : public IVolumeMaterial {
0024  public:
0025   /// Explicit constructor
0026   ///
0027   /// @param material is the material held by this
0028   HomogeneousVolumeMaterial(const Material& material);
0029 
0030   /// Copy Constructor
0031   ///
0032   /// @param hvm is the source material
0033   HomogeneousVolumeMaterial(const HomogeneousVolumeMaterial& hvm) = default;
0034 
0035   /// Copy Move Constructor
0036   ///
0037   /// @param hvm is the source material
0038   HomogeneousVolumeMaterial(HomogeneousVolumeMaterial&& hvm) = default;
0039 
0040   /// Destructor
0041   ~HomogeneousVolumeMaterial() override = default;
0042 
0043   /// Assignment operator
0044   ///
0045   /// @param hvm is the source material
0046   HomogeneousVolumeMaterial& operator=(const HomogeneousVolumeMaterial& hvm) =
0047       default;
0048 
0049   /// Equality operator
0050   ///
0051   /// @param hvm is the source material
0052   bool operator==(const HomogeneousVolumeMaterial& hvm) const;
0053 
0054   /// Access to actual material
0055   ///
0056   /// @param position is the request position for the material call
0057   /// @note @p position is ignored
0058   /// @todo interface to change including 'cell'
0059   const Material material(const Vector3& position) const final;
0060 
0061   /// Output Method for std::ostream
0062   ///
0063   /// @param sl The outoput stream
0064   std::ostream& toStream(std::ostream& sl) const final;
0065 
0066  private:
0067   Material m_material = Material();
0068 };
0069 
0070 inline const Material HomogeneousVolumeMaterial::material(
0071     const Vector3& /*position*/) const {
0072   return (m_material);
0073 }
0074 
0075 inline bool HomogeneousVolumeMaterial::operator==(
0076     const HomogeneousVolumeMaterial& hvm) const {
0077   return (m_material == hvm.m_material);
0078 }
0079 
0080 }  // namespace Acts