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