1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
/// @file PlacedMultiUnion.h
/// @author mihaela.gheata@cern.ch
#ifndef VECGEOM_VOLUMES_PLACEDMULTIUNION_H_
#define VECGEOM_VOLUMES_PLACEDMULTIUNION_H_
#include "VecGeom/base/Global.h"
#include "VecGeom/volumes/PlacedVolume.h"
#include "VecGeom/volumes/UnplacedVolume.h"
#include "VecGeom/volumes/UnplacedMultiUnion.h"
#include "VecGeom/volumes/kernel/MultiUnionImplementation.h"
#include "VecGeom/volumes/PlacedVolImplHelper.h"
namespace vecgeom {
VECGEOM_DEVICE_FORWARD_DECLARE(class PlacedMultiUnion;);
VECGEOM_DEVICE_DECLARE_CONV(class, PlacedMultiUnion);
inline namespace VECGEOM_IMPL_NAMESPACE {
class PlacedMultiUnion : public PlacedVolumeImplHelper<UnplacedMultiUnion, VPlacedVolume> {
using Base = PlacedVolumeImplHelper<UnplacedMultiUnion, VPlacedVolume>;
public:
#ifndef VECCORE_CUDA
// constructor inheritance;
using Base::Base;
PlacedMultiUnion(char const *const label, LogicalVolume const *const logicalVolume,
Transformation3D const *const transformation)
: Base(label, logicalVolume, transformation)
{
}
PlacedMultiUnion(LogicalVolume const *const logicalVolume, Transformation3D const *const transformation)
: PlacedMultiUnion("", logicalVolume, transformation)
{
}
#else
__device__ PlacedMultiUnion(LogicalVolume const *const logicalVolume, Transformation3D const *const transformation,
const int id)
: Base(logicalVolume, transformation, id)
{
}
#endif
VECCORE_ATT_HOST_DEVICE
virtual ~PlacedMultiUnion() {}
VECCORE_ATT_HOST_DEVICE
UnplacedMultiUnion const *GetUnplacedVolume() const
{
return static_cast<UnplacedMultiUnion const *>(GetLogicalVolume()->GetUnplacedVolume());
}
VECCORE_ATT_HOST_DEVICE
virtual void PrintType() const override;
virtual void PrintType(std::ostream &s) const override;
#ifndef VECCORE_CUDA
/** @brief Memory size in bytes */
VECGEOM_FORCE_INLINE
virtual int MemorySize() const override { return sizeof(*this); }
virtual VPlacedVolume const *ConvertToUnspecialized() const override;
#ifdef VECGEOM_ROOT
virtual TGeoShape const *ConvertToRoot() const override;
#endif
#ifdef VECGEOM_GEANT4
G4VSolid const *ConvertToGeant4() const override;
#endif
#endif // VECCORE_CUDA
};
} // namespace VECGEOM_IMPL_NAMESPACE
} // namespace vecgeom
#endif // VECGEOM_VOLUMES_PLACEDMULTIUNION_H_
|