Skip to content

Commit

Permalink
Add elementary egs++ geometry examples
Browse files Browse the repository at this point in the history
Add a simple example for each basic egs++ geometry. The examples are
also added to the documentation generated from the geometry *.h header
files.
  • Loading branch information
rtownson authored and ftessier committed Jan 24, 2017
1 parent f5a73d3 commit c952bce
Show file tree
Hide file tree
Showing 59 changed files with 2,313 additions and 7 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 17 additions & 1 deletion HEN_HOUSE/egs++/geometry/egs_box/egs_box.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#
# Author: Iwan Kawrakow, 2005
#
# Contributors:
# Contributors: Reid Townson
#
###############################################################################
*/
Expand Down Expand Up @@ -84,6 +84,22 @@ Note that a box at any location (not just about the origin) and/or
a rotated box can be obtained using a \link EGS_TransformedGeometry
transformed geometry. \endlink
A simple example:
\verbatim
:start geometry definition:
:start geometry:
name = my_box
library = egs_box
box size = 1 2 3
:start media input:
media = water
:stop media input:
:stop geometry:
simulation geometry = my_box
:stop geometry definition:
\endverbatim
*/
class EGS_BOX_EXPORT EGS_Box : public EGS_BaseGeometry {

Expand Down
56 changes: 55 additions & 1 deletion HEN_HOUSE/egs++/geometry/egs_cd_geometry/egs_cd_geometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#
# Contributors: Ernesto Mainegra-Hing
# Frederic Tessier
# Reid Townson
#
###############################################################################
*/
Expand Down Expand Up @@ -204,7 +205,60 @@ efficiently modeled with the help of a CD geometry. This can
be seen in the \c photon_linac.geom example geometry file.
Many of the other examples also employ a CD-geometry.
A simple example:
\verbatim
:start geometry definition:
# The base geometry, this will be the Chopping Device (CD)
# The base geometry can be any geometry, even a composite one
:start geometry:
name = my_cd_planes
library = egs_planes
type = EGS_Zplanes
positions = -3 3 5
# No media required
:stop geometry:
:start geometry:
name = my_cd_cylinder
library = egs_cylinders
type = EGS_ZCylinders
radii = 1.6 2
:start media input:
media = air water
set medium = 1 1
:stop media input:
:stop geometry:
:start geometry:
name = my_cd_sphere
library = egs_spheres
midpoint = 0 0 3
radii = 1.6 2
:start media input:
media = air water
set medium = 1 1
:stop media input:
:stop geometry:
# The composite geometry
:start geometry:
name = my_cd
library = egs_cdgeometry
base geometry = my_cd_planes
# set geometry = 1 geom means:
# "in region 1 of the basegeometry, use geometry "geom"
set geometry = 0 my_cd_cylinder
set geometry = 1 my_cd_sphere
# The final region numbers are attributed by the cd geometry object;
# Use the viewer to determine region numbers
:stop geometry:
simulation geometry = my_cd
:stop geometry definition:
\endverbatim
\image html egs_cd_geometry.png "A simple example with clipping plane 1,0,0,0"
*/
class EGS_CDGEOMETRY_EXPORT EGS_CDGeometry : public EGS_BaseGeometry {

Expand Down
125 changes: 125 additions & 0 deletions HEN_HOUSE/egs++/geometry/egs_cones/egs_cones.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#
# Contributors: Frederic Tessier
# Ernesto Mainegra-Hing
# Reid Townson
#
###############################################################################
*/
Expand Down Expand Up @@ -97,6 +98,27 @@ height = cone height in cm
The \c height key is optional and results in a cone extending
to infinity, if missing.
A simple example:
\verbatim
:start geometry definition:
:start geometry:
name = my_simple_cone
library = egs_cones
type = EGS_SimpleCone
apex = 0 0 3
axis = 0 0 -1
height = 4
opening angle = 30 # deg
:start media input:
media = water
:stop media input:
:stop geometry:
simulation geometry = my_simple_cone
:stop geometry definition:
\endverbatim
\image html egs_simplecone.png "A simple example"
*/

class EGS_CONES_EXPORT EGS_SimpleCone : public EGS_BaseGeometry {
Expand Down Expand Up @@ -669,6 +691,49 @@ apex distances = list of distances from the apex
\endverbatim
A simple example:
\verbatim
:start geometry definition:
:start geometry:
name = my_parallel_cones
library = egs_cones
type = EGS_ParallelCones
apex = 0 0 6
axis = 0 0 -1
apex distances = 1 2 3
opening angle = 30 # deg
:stop geometry:
# This sphere will be used to limit
# the size of the conical regions by a rounded end
:start geometry:
library = egs_spheres
name = sphere
midpoint = 0 0 0
radii = 5
:stop geometry:
# Now the actual geometry made from the
# parallel cones and the above sphere.
:start geometry:
library = egs_ndgeometry
name = cones
dimensions = sphere my_parallel_cones
hownear method = 1
:start media input:
media = water air
set medium = 0 0
set medium = 1 1
set medium = 2 0
set medium = 3 1
:stop media input:
:stop geometry:
simulation geometry = cones
:stop geometry definition:
\endverbatim
\image html egs_parallelcones.png "A simple example"
*/
class EGS_ParallelCones : public EGS_BaseGeometry {

Expand Down Expand Up @@ -967,6 +1032,28 @@ of the cone with the largest opening angle having index \f$N\f$.
An example for the use of an EGS_ConeSet is found in the
cones.geom example geometry file.
A simple example:
\verbatim
:start geometry definition:
:start geometry:
name = my_coneset
library = egs_cones
type = EGS_ConeSet
apex = 0 0 3
axis = 0 0 -1
opening angles = 10 20 30
:start media input:
media = water air water
set medium = 1 1
set medium = 2 2
:stop media input:
:stop geometry:
simulation geometry = my_coneset
:stop geometry definition:
\endverbatim
\image html egs_coneset.png "A simple example with clipping plane 1,0,0,0"
*/
class EGS_ConeSet : public EGS_BaseGeometry {

Expand Down Expand Up @@ -1331,6 +1418,44 @@ A cone stack is useful, for instance, for defining the upper portion of the trea
medical linear accelerators. Examples can be found in \c photon_linac.geom, \c car.geom and \c
rz1.geom example geometry files.
A simple example:
\verbatim
:start geometry definition:
:start geometry:
library = egs_cones
type = EGS_ConeStack
name = my_conestack
axis = 1.2417 0 0 -1 0 0
:start layer:
thickness = 0.0417
top radii = 0.
bottom radii = 0.0858
media = water
:stop layer:
:start layer:
thickness = 0.1283
top radii = 0. 0.0858
bottom radii = 0.3125 0.35
media = air water
:stop layer:
:start layer:
thickness = 0.2217
bottom radii = 0.3125 0.35
media = air water
:stop layer:
:start layer:
thickness = 2.05
top radii = 0.050 0.3125 0.35
bottom radii = 0.050 0.3125 0.35
media = water air water
:stop layer:
:stop geometry:
simulation geometry = my_conestack
:stop geometry definition:
\endverbatim
\image html egs_conestack.png "A simple example with clipping plane 0,0,1,0"
*/
class EGS_ConeStack : public EGS_BaseGeometry {

Expand Down
25 changes: 25 additions & 0 deletions HEN_HOUSE/egs++/geometry/egs_cylinders/egs_cylinders.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
# Author: Iwan Kawrakow, 2005
#
# Contributors: Ernesto Mainegra-Hing
# Reid Townson
#
###############################################################################
*/
Expand Down Expand Up @@ -105,6 +106,30 @@ Examples of the usage of cylinder sets can be found in
\c I6702.inp, \c rounded_ionchamber.geom, \c rz.geom and \c rz_phi.geom
example geometry files.
A simple example:
\verbatim
# Notice this creates infinite length cylinders along x
# Use egs_cdgeometry to cut the cylinders to size
:start geometry definition:
:start geometry:
name = my_cylinders
library = egs_cylinders
type = EGS_XCylinders
radii = 1 2 3
midpoint = 0
:start media input:
media = water air water
set medium = 1 1
set medium = 2 2
:stop media input:
:stop geometry:
simulation geometry = my_cylinders
:stop geometry definition:
\endverbatim
\image html egs_cylinders.png "A simple example with clipping plane 1,0,0,0"
\todo Get rid off the local projector classes, use the egspp classes
instead.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#
# Author: Iwan Kawrakow, 2006
#
# Contributors:
# Contributors: Reid Townson
#
###############################################################################
#
Expand Down Expand Up @@ -111,6 +111,29 @@ Examples of the usage of cylinder sets can be found in
\c I6702.inp, \c rounded_ionchamber.geom, \c rz.geom and \c rz_phi.geom
example geometry files.
A simple example:
\verbatim
:start geometry definition:
:start geometry:
name = my_cylinders
library = egs_elliptic_cylinders
type = EGS_EllipticCylindersXZ
midpoint = 0
x-radii = 1 2 3
y-radii = 1 4 7
:start media input:
media = water air water
set medium = 1 1
set medium = 2 2
:stop media input:
:stop geometry:
simulation geometry = my_cylinders
:stop geometry definition:
\endverbatim
\image html egs_elliptic_cylinders.png "A simple example with clipping plane 0,1,0,0"
\todo Get rid off the local projector classes, use the egspp classes
instead.
Expand Down
Loading

0 comments on commit c952bce

Please sign in to comment.