-
I have a geometry that does not fit well as an XYZ geometry (lot of curved pieces using ConeStacks) but would like to get a 3D dose map based on geometric location, not just region number. Essentially, I would like to create a 3d grid-like "overlay structure" that records energy or dose deposited in each small cube of the grid, no matter what region of the overall geometry it was deposited in. Is there a way to do this? Can I create an XYZGeometry in the location of my main geometry but not give it a media then use a 3ddose ausgab scoring object? Or make the XYZ over the main geometry with a random media (air/vacuum/etc) with a Union prioritizing my main geometry? Will that keep track of the XYZ region number where energy is deposited or does the Union mean the code 'forgets' the XYZGeometry is there if it's overwritten by another geometry? The simulations are being done in egs_chamber with egs_2021 if that matters. (I cannot change/update the version as the copy on our computer cluster is controlled by someone else) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
This is an interesting problem that hinges on the mechanics of the electron transport algorithm. While it might seem straightforward to modify the source code and use a separate grid geometry to record energy deposition events in grid cells as they occur, this approach would generally yield incorrect results. For example, consider a simple transport region the size of two cubes side by side, and a separate scoring grid composed of those two cubes. When an electron is transported through the actual region, the algorithm only provides the total energy deposited within the entire region. There's no way to determine how that energy is partitioned between the two sides of the region—unless, that is, we transport the electron in two separate, real cubes! And we are back to square (or cube) one. Even with a region large enough to contain a few electron steps, there would still be a bias due to the unknown curvilinear path between the endpoints of the straight electron displacement step. Note the Geant4 implements this "overlay" idea with Parallel Geometries, see also doi:10.1109/NSSMIC.2008.4774535 Here are three potential avenues that come to mind for EGSnrc, ordered by implementation difficulty: 1. Create an XYZ geometry grid
2. Use an octree geometry
3. Modify source code to handle dual geometries
|
Beta Was this translation helpful? Give feedback.
-
This is already possible using an There is an undocumented option for passing a geometry to an EGS_XYZGeometry to be voxelized. Here is an example on how to do this for a geometry named
The voxel midpoints of geometry The main challenge arises when objects within the geometry vary significantly in size. Small objects may be missed entirely, and finer details could be lost. Adjusting the grid resolution is necessary to mitigate these issues. For instance if one voxelizes the geometry
Original: Voxelized (misses the In those cases, one could voxelize the geometry into different geometries and then combine them. |
Beta Was this translation helpful? Give feedback.
This is already possible using an
EGS_XYZGeometry
geometry!There is an undocumented option for passing a geometry to an EGS_XYZGeometry to be voxelized.
Here is an example on how to do this for a geometry named
seed
:The voxel midpoints of geometry
seed_voxelized
are mapped onto the original geometryseed
using the geometry methodisWhere()
, and each voxel's medium is assigned bas…