File indexing completed on 2025-01-30 10:26:19
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef VECGEOM_VOLUMES_PLACEDTESSELLATED_H_
0010 #define VECGEOM_VOLUMES_PLACEDTESSELLATED_H_
0011
0012 #include "VecGeom/base/Global.h"
0013 #include "VecGeom/volumes/PlacedVolume.h"
0014 #include "VecGeom/volumes/UnplacedVolume.h"
0015 #include "VecGeom/volumes/kernel/TessellatedImplementation.h"
0016 #include "VecGeom/volumes/PlacedVolImplHelper.h"
0017 #include "VecGeom/volumes/UnplacedTessellated.h"
0018
0019 namespace vecgeom {
0020
0021 VECGEOM_DEVICE_FORWARD_DECLARE(class PlacedTessellated;);
0022 VECGEOM_DEVICE_DECLARE_CONV(class, PlacedTessellated);
0023
0024 inline namespace VECGEOM_IMPL_NAMESPACE {
0025
0026
0027 class PlacedTessellated : public PlacedVolumeImplHelper<UnplacedTessellated, VPlacedVolume> {
0028 using Base = PlacedVolumeImplHelper<UnplacedTessellated, VPlacedVolume>;
0029
0030 public:
0031 #ifndef VECCORE_CUDA
0032
0033 using Base::Base;
0034
0035
0036
0037
0038
0039 PlacedTessellated(char const *const label, LogicalVolume const *const logicalVolume,
0040 Transformation3D const *const transformation)
0041 : Base(label, logicalVolume, transformation)
0042 {
0043 }
0044
0045
0046
0047
0048 PlacedTessellated(LogicalVolume const *const logicalVolume, Transformation3D const *const transformation)
0049 : PlacedTessellated("", logicalVolume, transformation)
0050 {
0051 }
0052 #else
0053
0054 __device__ PlacedTessellated(LogicalVolume const *const logicalVolume, Transformation3D const *const transformation,
0055 const int id)
0056 : Base(logicalVolume, transformation, id)
0057 {
0058 }
0059 #endif
0060
0061
0062 VECCORE_ATT_HOST_DEVICE
0063 virtual ~PlacedTessellated() {}
0064
0065
0066 VECCORE_ATT_HOST_DEVICE
0067 UnplacedTessellated const *GetUnplacedVolume() const
0068 {
0069 return static_cast<UnplacedTessellated const *>(GetLogicalVolume()->GetUnplacedVolume());
0070 }
0071
0072 VECCORE_ATT_HOST_DEVICE
0073 virtual void PrintType() const override;
0074 virtual void PrintType(std::ostream &s) const override;
0075
0076 #ifndef VECCORE_CUDA
0077
0078 VECGEOM_FORCE_INLINE
0079 virtual int MemorySize() const override { return sizeof(*this); }
0080
0081 virtual VPlacedVolume const *ConvertToUnspecialized() const override;
0082
0083 #ifdef VECGEOM_ROOT
0084 virtual TGeoShape const *ConvertToRoot() const override { return nullptr; }
0085 #endif
0086 #ifdef VECGEOM_GEANT4
0087 G4VSolid const *ConvertToGeant4() const override;
0088 #endif
0089 #endif
0090 };
0091 }
0092 }
0093
0094 #endif