Skip to content
Snippets Groups Projects
Commit d1a00b59 authored by Riccardo Maria Bianchi's avatar Riccardo Maria Bianchi :sunny:
Browse files

Add EllipticalTube example

parent 9ae0b4f2
No related branches found
No related tags found
1 merge request!355Add support for the GeoEllipticalTube shape in I/O
......@@ -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 )
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment