Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions docs/inputs-outputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,24 @@ See [Physics](physics.md) for the current standard-GPU interpretation of GDML
optical-surface properties such as `model`, `finish`, `type`, `EFFICIENCY`,
and `REFLECTIVITY`.

### Persisted CSGFoundry geometry

Service-style applications (consumers of `CSGOptiXService`) load a persisted
CSGFoundry geometry directory instead of importing GDML. Resolution is by an
environment variable pair, implemented in `spath::CFBaseFromGEOM`:
Comment on lines +36 to +38

```bash
export GEOM=<name>
export <name>_CFBaseFromGEOM=/path/to/base # directory containing CSGFoundry/
```

Both variables are required: `GEOM` names the geometry, and the variable
named `<name>_CFBaseFromGEOM` — the literal geometry name followed by
`_CFBaseFromGEOM` — carries its base directory. Setting `CFBASE` alone does
not resolve geometry on this path. A persisted geometry is produced from a
Geant4-integrated run with `G4CXOpticks__setGeometry_saveGeometry` pointing
at the base directory to be written.

## Photon source inputs

Simphony examples feed the GPU simulation in three common ways:
Expand Down
8 changes: 7 additions & 1 deletion examples/synrad/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,17 @@ target_link_libraries(synrad
# (sysrap NP/sphoton, the qudarap Cu table), so take the include directories
# from the imported targets without linking their libraries. sphoton.h sits
# on the CUDA vector types, so the CUDA headers are needed at compile time.
# The header chain also needs glm (stra.h uses gtx extensions, gated behind
# GLM_ENABLE_EXPERIMENTAL) and plog (OpticksPhoton.hh); both are header-only
# INTERFACE targets, so linking them propagates includes without libraries —
# required wherever they are not on default compiler paths.
find_package(plog REQUIRED)
find_package(CUDAToolkit REQUIRED)
add_executable(synrad_g4 synrad_g4.cpp)
get_target_property(_sysrap_inc simphony::SysRap INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(_qudarap_inc simphony::QUDARap INTERFACE_INCLUDE_DIRECTORIES)
target_include_directories(synrad_g4 PRIVATE ${_sysrap_inc} ${_qudarap_inc} ${CUDAToolkit_INCLUDE_DIRS})
target_link_libraries(synrad_g4 ${Geant4_LIBRARIES})
target_link_libraries(synrad_g4 ${Geant4_LIBRARIES} glm::glm plog::plog)
target_compile_definitions(synrad_g4 PRIVATE GLM_ENABLE_EXPERIMENTAL)

install(TARGETS synrad synrad_g4)
Loading