File indexing completed on 2026-07-14 08:50:34
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 virtual void PrintType() const override;
0050 virtual void PrintType(std::ostream &os) const override;
0051
0052 VECCORE_ATT_HOST_DEVICE
0053 UnplacedExtruded const *GetUnplacedVolume() const
0054 {
0055 return static_cast<UnplacedExtruded const *>(GetLogicalVolume()->GetUnplacedVolume());
0056 }
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 { return GetUnplacedVolume()->ConvertToRoot(GetName()); }
0067 #endif
0068
0069 #ifdef VECGEOM_GEANT4
0070 G4VSolid const *ConvertToGeant4() const override { return GetUnplacedVolume()->ConvertToGeant4(GetName()); }
0071 #endif
0072 #endif
0073 };
0074 }
0075 }
0076
0077 #endif