Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:11:25

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 #include "Acts/Material/HomogeneousSurfaceMaterial.hpp"
0010 
0011 #include "Acts/Material/MaterialSlab.hpp"
0012 
0013 #include <ostream>
0014 
0015 namespace Acts {
0016 
0017 HomogeneousSurfaceMaterial::HomogeneousSurfaceMaterial(const MaterialSlab& full,
0018                                                        double splitFactor,
0019                                                        MappingType mappingType)
0020     : ISurfaceMaterial(splitFactor, mappingType), m_fullMaterial(full) {}
0021 
0022 HomogeneousSurfaceMaterial& HomogeneousSurfaceMaterial::scale(double factor) {
0023   m_fullMaterial.scaleThickness(factor);
0024   return *this;
0025 }
0026 
0027 const MaterialSlab& HomogeneousSurfaceMaterial::materialSlab(
0028     const Vector2& /*lp*/) const {
0029   return m_fullMaterial;
0030 }
0031 
0032 const MaterialSlab& HomogeneousSurfaceMaterial::materialSlab(
0033     const Vector3& /*gp*/) const {
0034   return m_fullMaterial;
0035 }
0036 
0037 std::ostream& HomogeneousSurfaceMaterial::toStream(std::ostream& sl) const {
0038   sl << "HomogeneousSurfaceMaterial : " << std::endl;
0039   sl << "   - fullMaterial : " << m_fullMaterial << std::endl;
0040   sl << "   - split factor : " << m_splitFactor << std::endl;
0041   return sl;
0042 }
0043 
0044 }  // namespace Acts