Open erjft opened 3 days ago
I can't reproduce the problem. Here is my input file, it gives identical dose in region 2 between ausgab dose scoring and a calculation geometry:
:start geometry definition:
# WATER PHANTOM #
:start geometry:
name = surrounding_water_box
library = egs_box
box size = 15 15 15
:start media input:
media = H2O521ICRU
:stop media input:
:start transformation:
translation = 0 0 7.5
:stop transformation:
:stop geometry:
# INFINITE CYLINDER OF RADIUS 2.5 mm
:start geometry:
library = egs_cylinders
type = EGS_ZCylinders
name = sensitive_cylinder
midpoint = 0 0 0
radii = 0.25 # cm
:stop geometry:
# PLANES FOR 0 to 100 mm CYLINDERS step of 1 mm
:start geometry:
library = egs_planes
type = EGS_Zplanes
name = cylind_planes
positions = 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1\
1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2\
2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3\
3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 4\
4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 5\
5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 6\
6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9 7\
7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 7.9 8\
8.1 8.2 8.3 8.4 8.5 8.6 8.7 8.8 8.9 9\
9.1 9.2 9.3 9.4 9.5 9.6 9.7 9.8 9.9 10
:stop geometry:
# SPLIT INFINITE CYLINDER WITH PLANES
:start geometry:
library = egs_ndgeometry
name = phantom_cylinders
dimensions = cylind_planes sensitive_cylinder
:start media input:
media = H2O521ICRU
:stop media input:
:stop geometry:
# UNION INSTEAD OF ENVELOPE BUT HAVE TRIED BOTH WAYS AND HAS SAME RESULT (FAR BELOW) #
:start geometry:
name = water_phantom_not_moved
library = egs_gunion
geometries = phantom_cylinders surrounding_water_box
:stop geometry:
simulation geometry = water_phantom_not_moved
:stop geometry definition:
:start scoring options:
##### EACH CYLINDER SPECIFIED INDIVIDUALLY - so 100 of these definitions, see below
:start calculation geometry:
geometry name = water_phantom_not_moved
cavity regions = 2 # repeated from 2 to 101
cavity mass = 1
:stop calculation geometry:
:stop scoring options:
:start run control:
#ncase = 1e9
ncase = 1e5
nbatch = 10
:stop run control:
:start ausgab object definition:
# WATER AGAIN
:start ausgab object:
library = egs_dose_scoring
name = doseScoring
volume = 1
dose start region = 2 # first cylinder along z axis is region number 2
dose stop region = 101 # last cylinder along z axis is region number 101
:stop ausgab object:
:stop ausgab object definition:
:start source definition:
:start source:
library = egs_parallel_beam
name = my_source
:start shape:
library = egs_circle
radius = 1
:stop shape:
direction = 0 0 1
charge = 0
:start spectrum:
type = monoenergetic
energy = 6
:stop spectrum:
:stop source:
:stop source definition:
Hi Reid, thanks for the reply. I had a look into the problem today, and I was able to reproduce the problem when I had an ausgab definition, but no calculation geometry definition for a given geometry - it could be a definition that references any region in that geometry. Otherwise it works fine when you have both the ausgab and the geometry definition as you have above. I tested even putting the region number of the surrounding water envelope and scoring the ausgab of the inscribed regions and that works fine but the cavity dose in the surrounding water envelope is then 0. I also realised having two calculation geometries and one ausgab seemed to mess with the resulting values. So in summary I need one calculation geometry and one ausgab together referencing the same region to give nice results.
:start geometry definition:
:start geometry:
name = world_box
library = egs_box
box size = 50 50 70
:start media input:
media = vacuum
:stop media input:
:start transformation:
translation = 0 0 0
:stop transformation:
:stop geometry:
# WATER PHANTOM #
:start geometry:
name = surrounding_water_box
library = egs_box
box size = 15 15 15
:start media input:
media = H2O521ICRU
:stop media input:
:start transformation:
translation = 0 0 7.5
:stop transformation:
:stop geometry:
# INFINITE CYLINDER OF RADIUS 2.5 mm
:start geometry:
library = egs_cylinders
type = EGS_ZCylinders
name = sensitive_cylinder
midpoint = 0 0 0
radii = 0.25 # cm
:stop geometry:
# PLANES FOR 0 to 100 mm CYLINDERS step of 1 mm
:start geometry:
library = egs_planes
type = EGS_Zplanes
name = cylind_planes
positions = 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1\
1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2\
2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3\
3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 4\
4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 5\
5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 6\
6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9 7\
7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 7.9 8\
8.1 8.2 8.3 8.4 8.5 8.6 8.7 8.8 8.9 9\
9.1 9.2 9.3 9.4 9.5 9.6 9.7 9.8 9.9 10
:stop geometry:
# SPLIT INFINITE CYLINDER WITH PLANES
:start geometry:
library = egs_ndgeometry
name = phantom_cylinders
dimensions = cylind_planes sensitive_cylinder
:start media input:
media = H2O521ICRU
:stop media input:
:stop geometry:
# UNION INSTEAD OF ENVELOPE BUT HAVE TRIED BOTH WAYS AND HAS SAME RESULT (FAR BELOW) #
:start geometry:
name = water_phantom_not_moved
library = egs_gunion
geometries = phantom_cylinders surrounding_water_box
:stop geometry:
########### EXAMPLE DISK
:start geometry:
library = egs_cones
type = EGS_ConeStack
name = example_disk
axis = 0 0 20 0 0 1
:start layer:
thickness = 0.5
top radii = 3
bottom radii = 3
media = CU521ICRU
:stop layer:
:stop geometry:
########### EXAMPLE DISK
:start geometry:
name = full_simulation_geometry
library = egs_genvelope
base geometry = world_box
inscribed geometries = water_phantom_not_moved example_disk
:start transformation:
translation = 0 0 0
:stop transformation:
:stop geometry:
simulation geometry = full_simulation_geometry
:stop geometry definition:
:start scoring options:
:start calculation geometry:
geometry name = example_disk
cavity regions = 0
cavity mass = 1
:stop calculation geometry:
# UNCOMMENT FOR AUSGAB TO WORK
#:start calculation geometry:
# geometry name = water_phantom_not_moved
# cavity regions = 2
# cavity mass = 1
#:stop calculation geometry:
:stop scoring options:
:start run control:
#ncase = 1e9
ncase = 1e5
nbatch = 10
:stop run control:
:start ausgab object definition:
# WATER AGAIN
:start ausgab object:
library = egs_dose_scoring
name = doseScoring
volume = 1
dose start region = 2 # first cylinder along z axis is region number 2
dose stop region = 101 # last cylinder along z axis is region number 101
:stop ausgab object:
:stop ausgab object definition:
:start source definition:
:start source:
library = egs_parallel_beam
name = my_source
:start shape:
library = egs_circle
radius = 1
:stop shape:
direction = 0 0 1
charge = -1
:start spectrum:
type = monoenergetic
energy = 6
:stop spectrum:
:stop source:
:stop source definition:
I tried with just an ausgab object in egs_app, and just a calculation geometry in egs_chamber, and the results agree within statistical uncertainty. Of course the results won't be identical, because the two apps take different logical paths which means the same random number seeds don't result it the same simulation. Do your results disagree outside the uncertainties?
Describe the bug Hi I have a 10 cm thick cylinder of 0.25 cm radius that is cut up into 1 mm sections along the z axis, and inscribed in a square water phantom of 15x15x15 cm^3. I want to score the dose in all the cylindrical volumes from an electron/photon beam.
The ausgab output, when I choose the same regions, is different from the scoring options output. For scoring options this would mean repeating :start calculation geometry: definition 100 times which may be painful.
Then the output is:
When I use the scoring options with start calculation geometry it gives good results. I don't have the command line output but can attach a csv - it's just a depth dose for photons of 6 MV.
To Reproduce
Expected behavior Expect results to be consistent for dose between ausgab and scoring options versions of obtaining the dose in the regions
Operating system
EGSnrc version Most recent - installed from Github on 18/11/24
Notes