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
|
// This file is part of VecGeom and is distributed under the
// conditions in the file LICENSE.txt in the top directory.
// For the full list of authors see CONTRIBUTORS.txt and `git log`.
/// @file source/PlacedEllipsoid.cpp
/// @author Evgueni Tcherniaev
#include "VecGeom/volumes/PlacedEllipsoid.h"
#include "VecGeom/volumes/SpecializedEllipsoid.h"
#ifdef VECGEOM_ROOT
// Include header file for ROOT Ellipsoid as done for Elliptical Tube below
// #include "TGeoEltu.h"
#endif
#ifdef VECGEOM_GEANT4
#include "G4Ellipsoid.hh"
#endif
#include <stdio.h>
namespace vecgeom {
inline namespace VECGEOM_IMPL_NAMESPACE {
VECCORE_ATT_HOST_DEVICE
void PlacedEllipsoid::PrintType() const
{
printf("PlacedEllipsoid");
}
void PlacedEllipsoid::PrintType(std::ostream &s) const
{
s << "PlacedEllipsoid";
}
#ifndef VECCORE_CUDA
VPlacedVolume const *PlacedEllipsoid::ConvertToUnspecialized() const
{
return new SimpleEllipsoid(GetLabel().c_str(), GetLogicalVolume(), GetTransformation());
}
#ifdef VECGEOM_ROOT
TGeoShape const *PlacedEllipsoid::ConvertToRoot() const
{
// Return ROOT Ellipsoid
return nullptr; // There is no suitable TGeo shape 2019.06.17
}
#endif
#ifdef VECGEOM_GEANT4
G4VSolid const *PlacedEllipsoid::ConvertToGeant4() const
{
return new G4Ellipsoid("", GetDx(), GetDy(), GetDz(), GetZBottomCut(), GetZTopCut());
}
#endif
#endif // VECCORE_CUDA
} // namespace VECGEOM_IMPL_NAMESPACE
#ifdef VECCORE_CUDA
VECGEOM_DEVICE_INST_PLACED_VOLUME_ALLSPEC(SpecializedEllipsoid)
#endif // VECCORE_CUDA
} // namespace vecgeom
|