FairShip
Loading...
Searching...
No Matches
test_cavern_layout Namespace Reference

Functions

 layout ()
 test_ecn3_cross_section_matches_ship_cave (layout, quantity)

Variables

 ROOT = pytest.importorskip("ROOT")
 SOURCE = Path(__file__).resolve().parent.parent
dict QUANTITIES

Detailed Description

Check that the ECN3 cross-section of the geometry configuration is that of ShipCave.

ShipCave builds the cavern from the constants in passive/ShipCavernLayout.h,
while geometry_config places the UBT and its scoring planes from its own copy
of the ECN3 floor and side walls. Nothing else ties the two together, so if one
changed without the other, the UBT would stand off the floor or the scoring
planes would cut into the walls without any error.

Function Documentation

◆ layout()

test_cavern_layout.layout ( )
The ShipCavernLayout namespace, compiled by Cling from the header ShipCave uses.

Definition at line 32 of file test_cavern_layout.py.

32def layout():
33 """The ShipCavernLayout namespace, compiled by Cling from the header ShipCave uses."""
34 for directory in ("passive", "shipdata"):
35 ROOT.gInterpreter.AddIncludePath(str(SOURCE / directory))
36 assert ROOT.gInterpreter.Declare('#include "ShipCavernLayout.h"')
37 return ROOT.ShipCavernLayout
38
39
40@pytest.mark.parametrize("quantity", QUANTITIES)

◆ test_ecn3_cross_section_matches_ship_cave()

test_cavern_layout.test_ecn3_cross_section_matches_ship_cave ( layout,
quantity )

Definition at line 41 of file test_cavern_layout.py.

41def test_ecn3_cross_section_matches_ship_cave(layout, quantity):
42 # Both are in the FairShip length unit.
44 assert cave[quantity] == pytest.approx(getattr(layout, QUANTITIES[quantity]), abs=1.0e-6 * u.cm)
create_config(str DecayVolumeMedium="helium", float Yheight=6.0, int strawDesign=10, str shieldName="TRY_2026", int nuTargetPassive=1, bool SND=True, SND_design=None, TARGET_YAML=None)

Variable Documentation

◆ QUANTITIES

dict test_cavern_layout.QUANTITIES
Initial value:
1= {
2 "ECN3LeftX": "kECN3LeftX",
3 "ECN3RightX": "kECN3RightX",
4 "ECN3FloorY": "kECN3FloorY",
5}

Definition at line 24 of file test_cavern_layout.py.

◆ ROOT

test_cavern_layout.ROOT = pytest.importorskip("ROOT")

Definition at line 19 of file test_cavern_layout.py.

◆ SOURCE

test_cavern_layout.SOURCE = Path(__file__).resolve().parent.parent

Definition at line 21 of file test_cavern_layout.py.