From d1a00b5973694438af9237573e6f5e5459885cea Mon Sep 17 00:00:00 2001 From: Riccardo Maria Bianchi <riccardo.maria.bianchi@cern.ch> Date: Thu, 3 Oct 2024 16:20:06 +0200 Subject: [PATCH] Add EllipticalTube example --- GeoModelExamples/HelloToy/CMakeLists.txt | 2 +- .../step1_create_store_geo_and_publish_nodes.cpp | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/GeoModelExamples/HelloToy/CMakeLists.txt b/GeoModelExamples/HelloToy/CMakeLists.txt index 8bb74b077..c27e24baa 100644 --- a/GeoModelExamples/HelloToy/CMakeLists.txt +++ b/GeoModelExamples/HelloToy/CMakeLists.txt @@ -32,5 +32,5 @@ add_executable( helloToy_step1_write ${SRCS} ) add_executable( helloToy_step2_read ${SRCS_READ} ) # Link all needed libraries -target_link_libraries( helloToy_step1_write GeoModelCore::GeoModelKernel GeoModelIO::GeoModelWrite GeoModelHelpers ) +target_link_libraries( helloToy_step1_write GeoModelCore::GeoModelKernel GeoModelIO::GeoModelWrite GeoModelCore::GeoModelHelpers ) target_link_libraries( helloToy_step2_read GeoModelCore::GeoModelKernel GeoModelIO::GeoModelRead ) diff --git a/GeoModelExamples/HelloToy/step1_create_store_geo_and_publish_nodes.cpp b/GeoModelExamples/HelloToy/step1_create_store_geo_and_publish_nodes.cpp index 872340795..210f1f499 100644 --- a/GeoModelExamples/HelloToy/step1_create_store_geo_and_publish_nodes.cpp +++ b/GeoModelExamples/HelloToy/step1_create_store_geo_and_publish_nodes.cpp @@ -15,6 +15,7 @@ #include "GeoModelKernel/GeoDefinitions.h" #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/GeoBox.h" +#include "GeoModelKernel/GeoEllipticalTube.h" #include "GeoModelKernel/GeoTube.h" #include "GeoModelKernel/GeoCons.h" #include "GeoModelKernel/GeoPara.h" @@ -234,6 +235,14 @@ int main(int argc, char *argv[]) toyPhys->add(nBox); toyPhys->add(pBox); + // Add a test GeoEllipticalTube shape + GeoEllipticalTube *sEllipticalTube = new GeoEllipticalTube(5.0 * SYSTEM_OF_UNITS::cm, 30 * SYSTEM_OF_UNITS::cm, 30 * SYSTEM_OF_UNITS::cm); + GeoLogVol *lEllipticalTube = new GeoLogVol("ellipticaltube", sEllipticalTube, steel); + GeoPhysVol *pEllipticalTube = new GeoPhysVol(lEllipticalTube); + GeoNameTag *nEllipticalTube = new GeoNameTag("Shape-EllipticalTube"); + toyPhys->add(nEllipticalTube); + toyPhys->add(pEllipticalTube); + // Add a test GeoTube shape GeoTube *sTube = new GeoTube(5.0 * SYSTEM_OF_UNITS::cm, 10 * SYSTEM_OF_UNITS::cm, 30 * SYSTEM_OF_UNITS::cm); GeoLogVol *lTube = new GeoLogVol("tube", sTube, steel); -- GitLab