Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-07 10:11:39

0001 //------------------------------- -*- C++ -*- -------------------------------//
0002 // Copyright Celeritas contributors: see top-level COPYRIGHT file for details
0003 // SPDX-License-Identifier: (Apache-2.0 OR MIT)
0004 //---------------------------------------------------------------------------//
0005 //! \file celeritas/optical/surface/model/OnlyReflectionModel.hh
0006 //---------------------------------------------------------------------------//
0007 #pragma once
0008 
0009 #include "corecel/data/ParamsDataStore.hh"
0010 #include "celeritas/optical/surface/SurfaceModel.hh"
0011 
0012 #include "OnlyReflectionData.hh"
0013 
0014 namespace celeritas
0015 {
0016 namespace optical
0017 {
0018 //---------------------------------------------------------------------------//
0019 /*!
0020  * Only reflection model for optical surface physics.
0021  *
0022  * Applies only one \c ReflectionMode for a given surface. Used by Geant4's
0023  * painted finishes in the UNIFIED model which are only specular-spike
0024  * reflecting (polished-painted) or diffuse-lobe reflecting (ground-painted).
0025  */
0026 class OnlyReflectionModel : public SurfaceModel
0027 {
0028   public:
0029     //!@{
0030     //! \name Type aliases
0031     using InputT = ReflectionMode;
0032     //!@}
0033 
0034   public:
0035     //! Construct the model from an ID and layer map
0036     OnlyReflectionModel(SurfaceModelId, std::map<PhysSurfaceId, InputT> const&);
0037 
0038     //! Get the list of physical surfaces this model applies to
0039     VecSurfaceLayer const& get_surfaces() const final { return surfaces_; }
0040 
0041     // Execute the model with host data
0042     void step(CoreParams const&, CoreStateHost&) const final;
0043 
0044     // Execute the model with device data
0045     void step(CoreParams const&, CoreStateDevice&) const final;
0046 
0047   private:
0048     VecSurfaceLayer surfaces_;
0049     ParamsDataStore<OnlyReflectionData> data_;
0050 };
0051 
0052 //---------------------------------------------------------------------------//
0053 }  // namespace optical
0054 }  // namespace celeritas