File indexing completed on 2025-12-16 10:33:33
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef VECGEOM_VOLUMES_PLACEDTET_H_
0010 #define VECGEOM_VOLUMES_PLACEDTET_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/TetImplementation.h"
0017 #include "VecGeom/volumes/PlacedVolImplHelper.h"
0018 #include "VecGeom/volumes/UnplacedTet.h"
0019
0020 namespace vecgeom {
0021
0022 VECGEOM_DEVICE_FORWARD_DECLARE(class PlacedTet;);
0023 VECGEOM_DEVICE_DECLARE_CONV(class, PlacedTet);
0024
0025 inline namespace VECGEOM_IMPL_NAMESPACE {
0026
0027
0028 class PlacedTet : public PlacedVolumeImplHelper<UnplacedTet, VPlacedVolume> {
0029 using Base = PlacedVolumeImplHelper<UnplacedTet, VPlacedVolume>;
0030
0031 public:
0032 #ifndef VECCORE_CUDA
0033
0034 using Base::Base;
0035
0036
0037
0038
0039
0040 PlacedTet(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 PlacedTet(LogicalVolume const *const logicalVolume, Transformation3D const *const transformation)
0050 : PlacedTet("", logicalVolume, transformation)
0051 {
0052 }
0053 #else
0054
0055 VECCORE_ATT_DEVICE PlacedTet(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 VECCORE_ATT_HOST_DEVICE
0063 virtual ~PlacedTet() {}
0064
0065
0066
0067
0068
0069
0070 VECCORE_ATT_HOST_DEVICE
0071 VECGEOM_FORCE_INLINE
0072 void GetVertices(Vector3D<Precision> &p0, Vector3D<Precision> &p1, Vector3D<Precision> &p2,
0073 Vector3D<Precision> &p3) const
0074 {
0075 GetUnplacedVolume()->GetVertices(p0, p1, p2, p3);
0076 }
0077
0078 VECCORE_ATT_HOST_DEVICE
0079 virtual void PrintType() const override;
0080 virtual void PrintType(std::ostream &os) const override;
0081
0082
0083 #ifndef VECCORE_CUDA
0084 virtual VPlacedVolume const *ConvertToUnspecialized() const override;
0085 #ifdef VECGEOM_ROOT
0086 virtual TGeoShape const *ConvertToRoot() const override
0087 {
0088 return nullptr;
0089 }
0090 #endif
0091 #ifdef VECGEOM_GEANT4
0092 virtual G4VSolid const *ConvertToGeant4() const override;
0093 #endif
0094 #endif
0095 };
0096
0097 }
0098 }
0099
0100 #endif