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