diff --git a/.github/workflows/celeritas.json b/.github/workflows/celeritas.json new file mode 100644 index 0000000000..4a8ba362b2 --- /dev/null +++ b/.github/workflows/celeritas.json @@ -0,0 +1,29 @@ +{ + "geometry_file": "${detector_config}.gdml", + "event_file": "pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.hepmc", + "output_file": "pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.json", + "physics_output_file": "pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.root", + "offload_output_file": + "pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.offloaded.hepmc3", + "num_track_slots": 1024, + "initializer_capacity": 32768, + "secondary_stack_factor": 2, + "physics_list": "celer_ftfp_bert", + "field_type": "uniform", + "field": [ + 0.0, + 0.0, + 1.7 + ], + "field_options": { + "minimum_step": 1e-06, + "delta_chord": 0.025, + "delta_intersection": 1e-05, + "epsilon_step": 1e-05 + }, + "use_device": false, + "sd_type": "event_hit", + "step_diagnostic": false, + "step_diagnostic_bins": 8, + "slot_diagnostic_prefix": "slot-diag-cpu-" +} diff --git a/.github/workflows/celeritas.yml b/.github/workflows/celeritas.yml new file mode 100644 index 0000000000..e1704cac17 --- /dev/null +++ b/.github/workflows/celeritas.yml @@ -0,0 +1,47 @@ +name: Celeritas + +on: + workflow_call: + inputs: + detector_configs: + required: true + type: string + +jobs: + celeritas: + runs-on: ubuntu-latest + strategy: + matrix: + detector_config: ${{fromJson(inputs.detector_configs)}} + steps: + - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 + with: + name: build-gcc-fast-eic-shell + path: install/ + - uses: cvmfs-contrib/github-action-cvmfs@v4 + - uses: eic/run-cvmfs-osg-eic-shell@main + with: + platform-release: "jug_xl:nightly" + network_types: "none" + setup: install/bin/thisepic.sh + run: | + # convert to gdml, but with sensitive detectors included + scripts/convert_to_gdml.py --compact $DETECTOR_PATH/${{matrix.detector_config}}.xml --output ${{matrix.detector_config}}.gdml | sed '/G4Exception-START/,+7d' + # create celeritas input file from template + export detector_config=${{matrix.detector_config}} + cat .github/workflows/celeritas.json | envsubst > ${{matrix.detector_config}}.json + # copy remote file + xrdcp root://dtn-eic.jlab.org//work/eic2/EPIC/EVGEN/CI/pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.hepmc . + # run celeritas + celer-g4 ${{matrix.detector_config}}.json + - uses: actions/upload-artifact@v4 + with: + name: celeritas_${{matrix.detector_config}}_pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.json + path: "pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.json" + if-no-files-found: error + - uses: actions/upload-artifact@v4 + with: + name: celeritas_${{matrix.detector_config}}_pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.root + path: "pythia8NCDIS_5x41_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_1_20ev.root" + if-no-files-found: error diff --git a/.github/workflows/linux-eic-shell.yml b/.github/workflows/linux-eic-shell.yml index 51929f024e..70d2d595be 100644 --- a/.github/workflows/linux-eic-shell.yml +++ b/.github/workflows/linux-eic-shell.yml @@ -191,6 +191,14 @@ jobs: with: detector_configs: ${{needs.list-detector-configs.outputs.configs_json}} + celeritas: + needs: + - build + - list-detector-configs + uses: ./.github/workflows/celeritas.yml + with: + detector_configs: "['epic_craterlake_no_bhcal']" + dump-constants: runs-on: ubuntu-latest needs: build diff --git a/scripts/convert_to_gdml.py b/scripts/convert_to_gdml.py index f5675d3bfd..bded0f3608 100755 --- a/scripts/convert_to_gdml.py +++ b/scripts/convert_to_gdml.py @@ -37,9 +37,9 @@ def run(): writer.enableUI() kernel.registerGlobalAction(writer) ui.Commands = [ + '/run/initialize', '/ddg4/Writer/Output {}'.format(args.output), '/ddg4/Writer/OverWrite 1', - '/ddg4/Writer/ModuleDepth 1', '/ddg4/Writer/write' ] kernel.configure()