Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:10:45

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 #pragma once
0010 
0011 #include <any>
0012 
0013 namespace Acts {
0014 
0015 class Surface;
0016 
0017 namespace Experimental {
0018 
0019 class Portal;
0020 class DetectorVolume;
0021 
0022 /// @brief This is the interface for generating geometry ids and assign them
0023 /// to detector volumes, portals and surfaces
0024 ///
0025 class IGeometryIdGenerator {
0026  public:
0027   using GeoIdCache = std::any;
0028 
0029   virtual ~IGeometryIdGenerator() = default;
0030 
0031   /// @brief  Virtual interface method to generate a geometry id cache
0032   /// @return a geometry id cache wrapped in a std::any object
0033   virtual GeoIdCache generateCache() const = 0;
0034 
0035   /// The virtual interface definition for assigning a geometry id to
0036   /// a detector volume
0037   ///
0038   /// @param cache is the cache object for e.g. object counting
0039   /// @param dVolume the detector volume to assign the geometry id to
0040   virtual void assignGeometryId(GeoIdCache& cache,
0041                                 DetectorVolume& dVolume) const = 0;
0042 
0043   /// The virtual interface definition for assigning a geometry id to
0044   /// a portal
0045   ///
0046   /// @param cache is the cache object for e.g. object counting
0047   /// @param portal the portal to assign the geometry id to
0048   virtual void assignGeometryId(GeoIdCache& cache, Portal& portal) const = 0;
0049 
0050   /// @brief  The virtual interface definition for assigning a geometry id to
0051   /// a surface
0052   ///
0053   /// @param cache is the cache object for e.g. object counting
0054   /// @param surface the surface to assign the geometry id to
0055   virtual void assignGeometryId(GeoIdCache& cache, Surface& surface) const = 0;
0056 };
0057 
0058 }  // namespace Experimental
0059 }  // namespace Acts