File indexing completed on 2026-04-20 08:37:38
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef TUNPLACEDBOOLEANMINUSVOLUME_H_
0009 #define TUNPLACEDBOOLEANMINUSVOLUME_H_
0010
0011 #include "VecGeom/base/Cuda.h"
0012 #include "VecGeom/base/Global.h"
0013 #include "VecGeom/base/AlignedBase.h"
0014 #include "VecGeom/base/Vector3D.h"
0015 #include "VecGeom/volumes/UnplacedVolume.h"
0016
0017
0018 namespace VECGEOM_NAMESPACE {
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038 typedef VPlacedVolume LeftUnplacedVolume_t;
0039 typedef VPlacedVolume RightPlacedVolume_t;
0040 class TUnplacedBooleanMinusVolume : public VUnplacedVolume, public AlignedBase {
0041
0042 public:
0043 VPlacedVolume const *fLeftVolume;
0044 VPlacedVolume const *fRightVolume;
0045
0046
0047
0048 public:
0049
0050 TUnplacedBooleanMinusVolume(LeftUnplacedVolume_t const *left, RightPlacedVolume_t const *right)
0051 : fLeftVolume(left), fRightVolume(right)
0052 {
0053 }
0054
0055 typedef LeftUnplacedVolume_t LeftType;
0056 typedef RightPlacedVolume_t RightType;
0057
0058 virtual int MemorySize() const { return sizeof(*this); }
0059
0060 #ifdef VECGEOM_CUDA_INTERFACE
0061 virtual VUnplacedVolume *CopyToGpu() const;
0062 virtual VUnplacedVolume *CopyToGpu(VUnplacedVolume *const gpu_ptr) const;
0063 #endif
0064
0065 VECCORE_ATT_HOST_DEVICE
0066 VECGEOM_FORCE_INLINE
0067 Precision Capacity() const
0068 {
0069
0070 return 0.;
0071 }
0072
0073 VECCORE_ATT_HOST_DEVICE
0074 VECGEOM_FORCE_INLINE
0075 Precision SurfaceArea() const
0076 {
0077
0078 return 0.;
0079 }
0080
0081 VECCORE_ATT_HOST_DEVICE
0082 void Extent(Vector3D<Precision> &, Vector3D<Precision> &) const {
0083
0084 };
0085
0086 VECCORE_ATT_HOST_DEVICE
0087 virtual void Print() const {};
0088
0089 virtual void Print(std::ostream &os) const {};
0090
0091 #ifndef VECCORE_CUDA
0092 template <typename LeftUnplacedVolume_t, typename RightPlacedVolume_t>
0093 static VPlacedVolume *Create(LogicalVolume const *const logical_volume, Transformation3D const *const transformation,
0094 VPlacedVolume *const placement = NULL)
0095 {
0096 }
0097
0098 static VPlacedVolume *CreateSpecializedVolume(LogicalVolume const *const volume,
0099 Transformation3D const *const transformation,
0100 VPlacedVolume *const placement = NULL)
0101 {
0102 }
0103
0104 #else
0105 VECCORE_ATT_DEVICE
0106 static VPlacedVolume *Create(LogicalVolume const *const logical_volume, Transformation3D const *const transformation,
0107 const int id, VPlacedVolume *const placement = NULL);
0108
0109 VECCORE_ATT_DEVICE static VPlacedVolume *CreateSpecializedVolume(LogicalVolume const *const volume,
0110 Transformation3D const *const transformation,
0111 const int id, VPlacedVolume *const placement = NULL);
0112 #endif
0113
0114 private:
0115 #ifndef VECCORE_CUDA
0116 virtual VPlacedVolume *SpecializedVolume(LogicalVolume const *const volume,
0117 Transformation3D const *const transformation,
0118 VPlacedVolume *const placement = NULL) const
0119 {
0120 return CreateSpecializedVolume(volume, transformation, placement);
0121 }
0122 #else
0123 VECCORE_ATT_DEVICE virtual VPlacedVolume *SpecializedVolume(LogicalVolume const *const volume,
0124 Transformation3D const *const transformation,
0125 const int id, VPlacedVolume *const placement = NULL) const
0126 {
0127 return CreateSpecializedVolume(volume, transformation, id, placement);
0128 }
0129 #endif
0130
0131 };
0132
0133 }
0134
0135 #endif