File indexing completed on 2025-01-18 10:14:08
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef VECGEOM_VOLUMES_PLACEDELLIPTICALTUBE_H_
0010 #define VECGEOM_VOLUMES_PLACEDELLIPTICALTUBE_H_
0011
0012 #include "VecGeom/base/Global.h"
0013
0014 #include "VecGeom/volumes/PlacedVolume.h"
0015 #include "VecGeom/volumes/UnplacedVolume.h"
0016 #include "VecGeom/volumes/kernel/EllipticalTubeImplementation.h"
0017 #include "VecGeom/volumes/PlacedVolImplHelper.h"
0018 #include "VecGeom/volumes/UnplacedEllipticalTube.h"
0019
0020 namespace vecgeom {
0021
0022 VECGEOM_DEVICE_FORWARD_DECLARE(class PlacedEllipticalTube;);
0023 VECGEOM_DEVICE_DECLARE_CONV(class, PlacedEllipticalTube);
0024
0025 inline namespace VECGEOM_IMPL_NAMESPACE {
0026
0027
0028 class PlacedEllipticalTube : public PlacedVolumeImplHelper<UnplacedEllipticalTube, VPlacedVolume> {
0029 using Base = PlacedVolumeImplHelper<UnplacedEllipticalTube, VPlacedVolume>;
0030
0031 public:
0032 #ifndef VECCORE_CUDA
0033 using Base::Base;
0034
0035
0036
0037
0038
0039 PlacedEllipticalTube(char const *const label, LogicalVolume const *const logicalVolume,
0040 Transformation3D const *const transformation)
0041 : Base(label, logicalVolume, transformation)
0042 {
0043 }
0044
0045
0046
0047
0048 PlacedEllipticalTube(LogicalVolume const *const logicalVolume, Transformation3D const *const transformation)
0049 : PlacedEllipticalTube("", logicalVolume, transformation)
0050 {
0051 }
0052 #else
0053
0054 VECCORE_ATT_DEVICE PlacedEllipticalTube(LogicalVolume const *const logicalVolume,
0055 Transformation3D const *const transformation, const int id, const int copy_no,
0056 const int child_id)
0057 : Base(logicalVolume, transformation, id, copy_no, child_id)
0058 {
0059 }
0060 #endif
0061
0062 VECCORE_ATT_HOST_DEVICE
0063 virtual ~PlacedEllipticalTube() {}
0064
0065
0066 VECCORE_ATT_HOST_DEVICE
0067 VECGEOM_FORCE_INLINE
0068 Precision GetDx() const { return GetUnplacedVolume()->GetDx(); }
0069
0070
0071 VECCORE_ATT_HOST_DEVICE
0072 VECGEOM_FORCE_INLINE
0073 Precision GetDy() const { return GetUnplacedVolume()->GetDy(); }
0074
0075
0076 VECCORE_ATT_HOST_DEVICE
0077 VECGEOM_FORCE_INLINE
0078 Precision GetDz() const { return GetUnplacedVolume()->GetDz(); }
0079
0080
0081
0082
0083
0084 VECCORE_ATT_HOST_DEVICE
0085 VECGEOM_FORCE_INLINE
0086 void SetParameters(Precision dx, Precision dy, Precision dz)
0087 {
0088 const_cast<UnplacedEllipticalTube *>(GetUnplacedVolume())->SetParameters(dx, dy, dz);
0089 };
0090
0091
0092 VECCORE_ATT_HOST_DEVICE
0093 VECGEOM_FORCE_INLINE
0094 void SetDx(Precision dx) { const_cast<UnplacedEllipticalTube *>(GetUnplacedVolume())->SetDx(dx); };
0095
0096
0097 VECCORE_ATT_HOST_DEVICE
0098 VECGEOM_FORCE_INLINE
0099 void SetDy(Precision dy) { const_cast<UnplacedEllipticalTube *>(GetUnplacedVolume())->SetDy(dy); };
0100
0101
0102 VECCORE_ATT_HOST_DEVICE
0103 VECGEOM_FORCE_INLINE
0104 void SetDz(Precision dz) { const_cast<UnplacedEllipticalTube *>(GetUnplacedVolume())->SetDz(dz); };
0105
0106 VECCORE_ATT_HOST_DEVICE
0107 virtual void PrintType() const override;
0108 virtual void PrintType(std::ostream &os) const override;
0109
0110
0111 #ifndef VECCORE_CUDA
0112 virtual VPlacedVolume const *ConvertToUnspecialized() const override;
0113 #ifdef VECGEOM_ROOT
0114 virtual TGeoShape const *ConvertToRoot() const override;
0115 #endif
0116 #ifdef VECGEOM_GEANT4
0117 virtual G4VSolid const *ConvertToGeant4() const override;
0118 #endif
0119 #endif
0120 };
0121
0122 }
0123 }
0124
0125 #endif