|
aegir
Phlex-based simulation framework for the SHiP experiment.
|
Phlex-based simulation framework for the SHiP experiment.
An automatic class reference is built using Doxygen from comments in the C++ code.
| Plugin | Type | Description |
|---|---|---|
particle_gun_source | Source | Configurable single-particle gun with Random123 RNG |
pythia8_source | Source | Pythia8 fixed-target p-p (serial or PythiaParallel) |
fixed_target_source | Source | Dual-target Pythia8 (p-p/p-n) with interaction point sampling |
geometry_builtin_provider | Provider | W target + Si scoring planes (test geometry) |
geometry_gdml_provider | Provider | GDML file loader |
geometry_geomodel_provider | Provider | GeoModel .db via SHiPGeometryService (optional) |
geant4_module | Transform | Geant4 simulation (direct worker, configurable concurrency) |
sim_output_module | Observer | RNTuple parallel writer + validation histograms |
Pixi resolves everything below from prefix.dev/ship-experiment/stable (the SHiP-specific packages live there, with rattler-build recipes in ship-conda-recipes) and conda-forge. The list is reference; you do not need to install these manually when using pixi.
Install pixi, then:
pixi run build depends on configure, so you do not need to run them separately. Available tasks (see pixi.toml):
configure — run CMake with CMAKE_PREFIX_PATH=$CONDA_PREFIX.build — cmake --build build -j. Depends on configure.install — cmake --install build, populating $CONDA_PREFIX/lib and bin. It also installs a CMake package for event-generator plugins built outside aegir (such as aegir-genie): find_package(aegir), link aegir::source_helper and include <aegir/mc_particle_source.hpp>.test — ctest --test-dir build --output-on-failure. Runs the integration tests registered in CMakeLists.txt, each a script in scripts/. CI runs this task.smoke — quick end-to-end check used by CI (scripts/smoke.sh).clean — rm -rf build.pixi run <task> (or pixi run <command>) activates the environment for the duration of one command. Use it for scripted invocations and CI.pixi shell drops you into an interactive subshell with the environment active until you exit. Use it for iterative development — just targets, ad-hoc phlex invocations, debugging.activate.sh sets PHLEX_PLUGIN_PATH, LD_LIBRARY_PATH, SHIPGEOMETRY_ROOT, and AEGIR_ROOT automatically in both modes.
For environments without pixi (e.g. existing aliBuild setups), the project is a plain CMake build. You are responsible for providing the dependencies; see ship-conda-recipes for the canonical version pins.
Pass -DSHiPDataModel_ROOT=/path/to/data-model/install if a dependency is not in the default search path.
workflows/ ships a sampler of jsonnet configs; the snippets below pick five common ones. ls workflows/ shows the full set (multi-threaded variants, no-op sinks, GeoModel-based geometry, etc.).
Phlex requires every job to name its processing stage, and labels the products the job creates with that name. The aegir workflows set ‘stage: 'simulation’at the top level (lib.stagein [workflows/lib.libsonnet](workflows/lib.libsonnet)). The event generator sources need the same name in their own block (stage: 'simulation'), because Phlex does not pass the top-level setting on to them. Thelibblocks already include it. If you write a workflow from scratch, set both.phlex –stage overrides only the top-level setting. Withphlex –stage foo, the generator products keep thesimulationlabel while the geometry, field and Geant4 products getfoo`. The job still runs, but its products carry two different stage labels.
If you built manually, point PHLEX_PLUGIN_PATH at the build tree yourself:
Three geometry providers are available, selectable via workflow configuration:
geometry_builtin_provider) — Tungsten target + Si scoring planes (test geometry). Used by workflows/gun_st.jsonnet and friends. No setup needed.geometry_gdml_provider) — load from a .gdml file. Set gdml_file in the workflow to an absolute path. Example: workflows/gun_st_gdml.jsonnet.GeoModel (geometry_geomodel_provider) — load from a GeoModel .db file via SHiPGeometryService. The shipgeometry conda package ships a build_geometry tool but does not bundle a pre-built DB; you generate one yourself:
Workflows reference the DB by bare filename (‘db_file: 'ship_geometry.db’); the provider resolves it against the CWD first and, failing that, against $SHIPGEOMETRY_ROOT/share/geometry/.activate.shsetsSHIPGEOMETRY_ROOT to$CONDA_PREFIXby default, so dropping a DB under $CONDA_PREFIX/share/geometry/` makes it discoverable from any CWD.
See docs/geant4_integration.md for details on the direct worker integration strategy.
See docs/benchmarks.md for details. The benchmark targets need hyperfine and just, which the bench pixi feature provides:
See CONTRIBUTING.md for details on our development workflow and coding standards.
-DGEANT4_USE_SYSTEM_ZLIB=ON — only relevant for manual builds; the conda-forge geant4 package already takes care of this.LGPL-3.0-or-later. See LICENSES/ for the full text.