Skip to content

[include] update TBetaGenerator.hh #112

[include] update TBetaGenerator.hh

[include] update TBetaGenerator.hh #112

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: BuildandTest
# Controls when the action will run.
on:
# Triggers the workflow on push (all branches) or pull request (only main)
push:
branches:
- "**"
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains one job called "BuildandTest"
BuildandTest:
# The type of runner that the job will run on
runs-on: ubuntu-latest
defaults:
run:
shell: bash
container: docker://tomgoffrey/qtnm_g4:latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
# Build Package
- name: Build
run: |
source /geant4-install/bin/geant4.sh
mkdir build && cd build
cmake .. -DBUILD_TESTS=ON
make
# Run Package
- name: Run
run: |
source /geant4-install/bin/geant4.sh
source /cern_root/bin/thisroot.sh
cd build
./qtnmSim -m ../example_input/example0.mac -g ../example_input/example.gdml -a 1
python3 ../utils/plot_example0.py
# Run Test0, elastic cross section
cd test/Test0
./TestEm0 -m TestEm0.in -o HydrogenElasticCrossSection.root
python3 test0.py --input HydrogenElasticCrossSection.root --output HydrogenElasticCrossSection.png
# Run Test0, inelastic cross section
./TestEm0 -m TestEm0.in -o HydrogenInelasticCrossSection.root -p InelasticScatteringList
python3 test0.py --input HydrogenInelasticCrossSection.root --output HydrogenInelasticCrossSection.png --yscale linear --reference_results=shah1987.txt
# Run Test0, combined cross section
./TestEm0 -m TestEm0.in -o HydrogenFullCrossSection.root -p MultipleScatteringList
python3 test0.py --input HydrogenFullCrossSection.root --output HydrogenFullCrossSection.png
- name: Upload results
uses: actions/upload-artifact@v4
with:
name: test-results
path: |
build/*.png
build/test/*/*.png
build/test/*/*.root