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