File indexing completed on 2025-01-30 10:26:15
0001 #ifndef VECGEOM_VOLUMES_UTILITIES_GENERATION_UTILITIES_H
0002 #define VECGEOM_VOLUMES_UTILITIES_GENERATION_UTILITIES_H
0003
0004 namespace vecgeom {
0005 inline namespace VECGEOM_IMPL_NAMESPACE {
0006
0007 template <typename SpecializationT>
0008 VECCORE_ATT_DEVICE
0009 VPlacedVolume *CreateSpecializedWithPlacement(LogicalVolume const *const logical_volume,
0010 Transformation3D const *const transformation,
0011 #ifdef VECCORE_CUDA
0012 const int id, const int copy_no, const int child_id,
0013 #endif
0014 VPlacedVolume *const placement)
0015 {
0016
0017 if (placement) {
0018 return new (placement) SpecializationT(logical_volume, transformation
0019 #ifdef VECCORE_CUDA
0020 ,
0021 id, copy_no, child_id
0022 #endif
0023 );
0024 }
0025
0026 return new SpecializationT(
0027 #ifdef VECCORE_CUDA
0028 logical_volume, transformation, id, copy_no, child_id);
0029 #else
0030 logical_volume, transformation);
0031 #endif
0032 }
0033 }
0034 }
0035
0036 #endif