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