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