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