Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:20:32

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 2019 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 ///////////////////////////////////////////////////////////////////
0010 // MaterialWiper.hpp, Acts project
0011 ///////////////////////////////////////////////////////////////////
0012 
0013 #pragma once
0014 
0015 #include "Acts/Geometry/TrackingVolume.hpp"
0016 #include "Acts/Material/IMaterialDecorator.hpp"
0017 #include "Acts/Surfaces/Surface.hpp"
0018 
0019 // @note This file will go into the acts-core
0020 namespace Acts {
0021 
0022 /// @class MaterialWiper
0023 ///
0024 /// This decorator sets the nulls-material
0025 ///
0026 class MaterialWiper : public IMaterialDecorator {
0027  public:
0028   /// Decorate a surface
0029   ///
0030   /// @param surface the non-cost surface that is decorated
0031   void decorate(Surface& surface) const final {
0032     surface.assignSurfaceMaterial(nullptr);
0033   }
0034 
0035   /// Decorate a TrackingVolume
0036   ///
0037   /// @param volume the non-cost volume that is decorated
0038   void decorate(TrackingVolume& volume) const final {
0039     volume.assignVolumeMaterial(nullptr);
0040   }
0041 };
0042 
0043 }  // namespace Acts