Skip to content

Commit

Permalink
Fix/clean build hall (#38)
Browse files Browse the repository at this point in the history
* Define default geometries in makefile.

* Build 2 in parallel.

* Update CHANGELOG.

* Fix test workflow.
  • Loading branch information
ast0815 authored Dec 5, 2024
1 parent 8b32a99 commit fc29996
Show file tree
Hide file tree
Showing 6 changed files with 236 additions and 589 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup
run: pip install .
- name: Build default gdml files
run: ./build_hall.sh
run: make -j2
- name: Rename gdml files to include tag
run: |
for F in *.gdml
Expand Down
22 changes: 13 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,12 @@ jobs:
- name: Setup
run: pip install .
- name: Build defaul gdml
run: ./build_hall.sh
run: make -j2
- name: Upload default geometry
uses: actions/upload-artifact@v4
with:
name: Default Geometry
path: |
nd_hall_with_lar_tms_sand.gdml
anti_fiducial_nd_hall_with_lar_tms_sand.gdml
path: "*.gdml"
if-no-files-found: error
check_overlaps:
name: Check geometry for overlaps
Expand All @@ -45,15 +43,21 @@ jobs:
- name: Debug artifact
run: |
ls -l
head nd_hall_with_lar_tms_sand.gdml
head *.gdml
- name: Run standard overlap check
run: |
root -q -b 'checkOverlaps.C("nd_hall_with_lar_tms_sand.gdml", 0)' 2>&1 | tee check.log
grep "Number of illegal overlaps/extrusions : 0" check.log
for F in *.gdml
do
root -q -b "checkOverlaps.C(\"${F}\", 0)" 2>&1 | tee check.log
grep "Number of illegal overlaps/extrusions : 0" check.log
done
- name: Run sampling overlap check
run: |
root -q -b 'checkOverlaps.C("nd_hall_with_lar_tms_sand.gdml", 1)' 2>&1 | tee check.log
grep "Number of illegal overlaps/extrusions : 0" check.log
for F in *.gdml
do
root -q -b "checkOverlaps.C(\"${F}\", 1)" 2>&1 | tee check.log
grep "Number of illegal overlaps/extrusions : 0" check.log
done
put_online:
name: Put geometries online for visual inspection
runs-on: ubuntu-latest
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ Geometry releases will be tagged as `Descriptive_tag_v_X.Y.Z`.
### Changed

- Bump gegede to version 0.8.0
- Define default geometries in Makefile instead of bash script

### Removed

- Removed old gdml files from repo.
- Default geometry definitions that did not build (missing KLOE cfg file)

### Added

- generate complete ND geo with SAND provided with a Drift Chamber using `build_hall.sh sand_opt3_DRIFT1`
- generate complete ND geo with SAND provided with a Drift Chamber using target `sand_opt3_DRIFT1.gdml`

## [TDR_Production_geometry_v_1.0.3]

Expand Down
211 changes: 211 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
.PHONY: clean all prod tms tms_nosand gar garlite empty sandopt

# Default
prod: tms

# Other options
all: tms tms_nosand gar_nosand garlite_nosand empty sandopt

tms: nd_hall_with_lar_tms_sand.gdml \
anti_fiducial_nd_hall_with_lar_tms_sand.gdml

tms_nosand: nd_hall_with_lar_tms_nosand.gdml

gar_nosand: nd_hall_with_lar_gar_nosand.gdml

garlite_nosand: nd_hall_with_lar_garlite_nosand.gdml

empty: nd_hall_no_dets.gdml

sandopt: SAND_opt1_STT1.gdml \
SAND_opt2_STT1.gdml \
SAND_opt2_STT3.gdml \
SAND_opt3_STT1.gdml \
SAND_opt3_DRIFT1.gdml \
only_SAND_DRIFT.gdml

clean:
rm *.gdml

%.gdml:
gegede-cli $^ -w World -o $@

nd_hall_with_lar_tms_sand.gdml: duneggd/Config/WORLDggd.cfg \
duneggd/Config/ND_Hall_Air_Volume_LAr_TMS_SAND.cfg \
duneggd/Config/ND_Hall_Rock.cfg \
duneggd/Config/ND_ElevatorStruct.cfg \
duneggd/Config/ND_CraneRailStruct1.cfg \
duneggd/Config/ND_CraneRailStruct2.cfg \
duneggd/Config/ND_HallwayStruct.cfg \
duneggd/Config/ND_CryoStruct.cfg \
duneggd/Config/SAND_MAGNET.cfg \
duneggd/Config/SAND_INNERVOLOPT2.cfg \
duneggd/Config/SAND_ECAL.cfg \
duneggd/Config/SAND_STT/STT1.cfg \
duneggd/Config/SAND_GRAIN.cfg \
duneggd/Config/TMS.cfg \
duneggd/Config/ArgonCube/ArgonCubeCryostat.cfg \
duneggd/Config/ArgonCube/ArgonCubeDetector.cfg

anti_fiducial_nd_hall_with_lar_tms_sand.gdml: duneggd/Config/WORLDggd.cfg \
duneggd/Config/ND_Hall_Air_Volume_LAr_TMS_SAND.cfg \
duneggd/Config/ND_Hall_Rock.cfg \
duneggd/Config/ND_ElevatorStruct.cfg \
duneggd/Config/ND_CraneRailStruct1.cfg \
duneggd/Config/ND_CraneRailStruct2.cfg \
duneggd/Config/ND_HallwayStruct.cfg \
duneggd/Config/ND_CryoStruct.cfg \
duneggd/Config/SAND_MAGNET.cfg \
duneggd/Config/SAND_INNERVOLOPT2.cfg \
duneggd/Config/SAND_ECAL.cfg \
duneggd/Config/SAND_STT/STT1.cfg \
duneggd/Config/SAND_GRAIN.cfg \
duneggd/Config/TMS.cfg \
duneggd/Config/ArgonCube/ArgonCubeCryostat.cfg \
duneggd/Config/ArgonCube/ArgonCubeDetectorNoActive.cfg

nd_hall_with_lar_tms_nosand.gdml: duneggd/Config/WORLDggd.cfg \
duneggd/Config/ND_Hall_Air_Volume_LAr_TMS_noSAND.cfg \
duneggd/Config/ND_Hall_Rock.cfg \
duneggd/Config/ND_ElevatorStruct.cfg \
duneggd/Config/ND_CraneRailStruct1.cfg \
duneggd/Config/ND_CraneRailStruct2.cfg \
duneggd/Config/ND_HallwayStruct.cfg \
duneggd/Config/ND_CryoStruct.cfg \
duneggd/Config/TMS.cfg \
duneggd/Config/ArgonCube/ArgonCubeCryostat.cfg \
duneggd/Config/ArgonCube/ArgonCubeDetector.cfg

nd_hall_with_lar_gar_nosand.gdml: duneggd/Config/WORLDggd.cfg \
duneggd/Config/ND_Hall_Air_Volume_No_KLOE.cfg \
duneggd/Config/ND_Hall_Rock.cfg \
duneggd/Config/ND_ElevatorStruct.cfg \
duneggd/Config/ND_CraneRailStruct1.cfg \
duneggd/Config/ND_CraneRailStruct2.cfg \
duneggd/Config/ND_HallwayStruct.cfg \
duneggd/Config/ND_CryoStruct.cfg \
duneggd/Config/ND-GAr/ND-GAr-SPYv3_noTPC.cfg \
duneggd/Config/ND-GAr/ND-GAr-SPYv3.cfg \
duneggd/Config/ArgonCube/ArgonCubeCryostat.cfg \
duneggd/Config/ArgonCube/ArgonCubeDetector.cfg

nd_hall_with_lar_garlite_nosand.gdml: duneggd/Config/WORLDggd.cfg \
duneggd/Config/ND_Hall_Air_Volume_No_KLOE.cfg \
duneggd/Config/ND_Hall_Rock.cfg \
duneggd/Config/ND_ElevatorStruct.cfg \
duneggd/Config/ND_CraneRailStruct1.cfg \
duneggd/Config/ND_CraneRailStruct2.cfg \
duneggd/Config/ND_HallwayStruct.cfg \
duneggd/Config/ND_CryoStruct.cfg \
duneggd/Config/ArgonCube/ArgonCubeCryostat.cfg \
duneggd/Config/ArgonCube/ArgonCubeDetector.cfg \
duneggd/Config/ND-GAr-Lite/MPD_Temporary_SPY_v3_IntegratedMuID.cfg

SAND_opt1_STT1.gdml: duneggd/Config/WORLDggd.cfg \
duneggd/Config/ND_Hall_Air_Volume.cfg \
duneggd/Config/ND_Hall_Rock.cfg \
duneggd/Config/ND_ElevatorStruct.cfg \
duneggd/Config/SAND_MAGNET.cfg \
duneggd/Config/SAND_INNERVOLOPT1.cfg \
duneggd/Config/SAND_ECAL.cfg \
duneggd/Config/SAND_STT/STT1.cfg \
duneggd/Config/SAND_GRAIN.cfg \
duneggd/Config/ND_CraneRailStruct1.cfg \
duneggd/Config/ND_CraneRailStruct2.cfg \
duneggd/Config/ND_HallwayStruct.cfg \
duneggd/Config/ND_CryoStruct.cfg \
duneggd/Config/ND-GAr/ND-GAr-SPYv3_noTPC.cfg \
duneggd/Config/ND-GAr/ND-GAr-SPYv3.cfg \
duneggd/Config/ArgonCube/ArgonCubeCryostat.cfg \
duneggd/Config/ArgonCube/ArgonCubeDetector.cfg

SAND_opt2_STT1.gdml: duneggd/Config/WORLDggd.cfg \
duneggd/Config/ND_Hall_Air_Volume.cfg \
duneggd/Config/ND_Hall_Rock.cfg \
duneggd/Config/ND_ElevatorStruct.cfg \
duneggd/Config/SAND_MAGNET.cfg \
duneggd/Config/SAND_INNERVOLOPT2.cfg \
duneggd/Config/SAND_ECAL.cfg \
duneggd/Config/SAND_STT/STT1.cfg \
duneggd/Config/SAND_GRAIN.cfg \
duneggd/Config/ND_CraneRailStruct1.cfg \
duneggd/Config/ND_CraneRailStruct2.cfg \
duneggd/Config/ND_HallwayStruct.cfg \
duneggd/Config/ND_CryoStruct.cfg \
duneggd/Config/ND-GAr/ND-GAr-SPYv3_noTPC.cfg \
duneggd/Config/ND-GAr/ND-GAr-SPYv3.cfg \
duneggd/Config/ArgonCube/ArgonCubeCryostat.cfg \
duneggd/Config/ArgonCube/ArgonCubeDetector.cfg

SAND_opt2_STT3.gdml: duneggd/Config/WORLDggd.cfg \
duneggd/Config/ND_Hall_Air_Volume.cfg \
duneggd/Config/ND_Hall_Rock.cfg \
duneggd/Config/ND_ElevatorStruct.cfg \
duneggd/Config/SAND_MAGNET.cfg \
duneggd/Config/SAND_INNERVOLOPT2.cfg \
duneggd/Config/SAND_ECAL.cfg \
duneggd/Config/SAND_STT/STT3.cfg \
duneggd/Config/SAND_GRAIN.cfg \
duneggd/Config/ND_CraneRailStruct1.cfg \
duneggd/Config/ND_CraneRailStruct2.cfg \
duneggd/Config/ND_HallwayStruct.cfg \
duneggd/Config/ND_CryoStruct.cfg \
duneggd/Config/ND-GAr/ND-GAr-SPYv3_noTPC.cfg \
duneggd/Config/ND-GAr/ND-GAr-SPYv3.cfg \
duneggd/Config/ArgonCube/ArgonCubeCryostat.cfg \
duneggd/Config/ArgonCube/ArgonCubeDetector.cfg

SAND_opt3_STT1.gdml: duneggd/Config/WORLDggd.cfg \
duneggd/Config/ND_Hall_Air_Volume.cfg \
duneggd/Config/ND_Hall_Rock.cfg \
duneggd/Config/ND_ElevatorStruct.cfg \
duneggd/Config/SAND_MAGNET.cfg \
duneggd/Config/SAND_INNERVOLOPT3.cfg \
duneggd/Config/SAND_ECAL.cfg \
duneggd/Config/SAND_STT/STT1.cfg \
duneggd/Config/SAND_GRAIN.cfg \
duneggd/Config/ND_CraneRailStruct1.cfg \
duneggd/Config/ND_CraneRailStruct2.cfg \
duneggd/Config/ND_HallwayStruct.cfg \
duneggd/Config/ND_CryoStruct.cfg \
duneggd/Config/ND-GAr/ND-GAr-SPYv3_noTPC.cfg \
duneggd/Config/ND-GAr/ND-GAr-SPYv3.cfg \
duneggd/Config/ArgonCube/ArgonCubeCryostat.cfg \
duneggd/Config/ArgonCube/ArgonCubeDetector.cfg


SAND_opt3_DRIFT1.gdml: duneggd/Config/WORLDggd.cfg \
duneggd/Config/ND_Hall_Air_Volume.cfg \
duneggd/Config/ND_Hall_Rock.cfg \
duneggd/Config/ND_ElevatorStruct.cfg \
duneggd/Config/SAND_MAGNET.cfg \
duneggd/Config/SAND_INNERVOLOPTDRIFT1.cfg \
duneggd/Config/SAND_ECAL.cfg \
duneggd/Config/SAND_DRIFT_CHAMBER/DRIFT1.cfg \
duneggd/Config/SAND_GRAIN.cfg \
duneggd/Config/ND_CraneRailStruct1.cfg \
duneggd/Config/ND_CraneRailStruct2.cfg \
duneggd/Config/ND_HallwayStruct.cfg \
duneggd/Config/ND_CryoStruct.cfg \
duneggd/Config/ND-GAr/ND-GAr-SPYv3_noTPC.cfg \
duneggd/Config/ND-GAr/ND-GAr-SPYv3.cfg \
duneggd/Config/ArgonCube/ArgonCubeCryostat.cfg \
duneggd/Config/ArgonCube/ArgonCubeDetector.cfg

only_SAND_DRIFT.gdml: duneggd/Config/WORLDggd.cfg \
duneggd/Config/ND_Hall_Air_Volume_Only_SAND.cfg \
duneggd/Config/ND_Hall_Rock.cfg \
duneggd/Config/SAND_MAGNET.cfg \
duneggd/Config/SAND_INNERVOLOPTDRIFT1.cfg \
duneggd/Config/SAND_ECAL.cfg \
duneggd/Config/SAND_DRIFT_CHAMBER/DRIFT1.cfg \
duneggd/Config/SAND_GRAIN.cfg

nd_hall_no_dets.gdml: duneggd/Config/WORLDggd.cfg \
duneggd/Config/ND_Hall_Air_Volume_NoDets.cfg \
duneggd/Config/ND_Hall_Rock.cfg \
duneggd/Config/ND_ElevatorStruct.cfg \
duneggd/Config/ND_CraneRailStruct1.cfg \
duneggd/Config/ND_CraneRailStruct2.cfg \
duneggd/Config/ND_HallwayStruct.cfg \
duneggd/Config/ND_CryoStruct.cfg
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,18 @@ Don't forget to check your variable `PATH`:
export PATH=~/.local/bin/:${PATH}
```

# Example
To run an example containing basic detectors, you could process like:
```bash
gegede-cli duneggd/Config/PRIMggd_example.cfg duneggd/Config/DETENCLOSURE-prim-only.cfg duneggd/Config/WORLDggd.cfg -w World -o example.gdml
```
# Building default geometries

To run a full example containing surrounded magnet
The default geometries are defined in the `Makefile`. To build them just invoke
```bash
gegede-cli duneggd/Config/PRIMggd_example.cfg duneggd/Config/SECggd_example.cfg duneggd/Config/DETENCLOSURE.cfg duneggd/Config/WORLDggd.cfg -w World -o full_example.gdml
make prod
```

Have a look in the `Makefile` to see what kind of geometries are defined there.

Hint: The `nosand` geometries build much, _much_ faster than the geometries
including the `sand` detector.

# Quick Visualization
To do a quick check or your geometry file you can use ROOT-CERN:
```bash
Expand Down
Loading

0 comments on commit fc29996

Please sign in to comment.