Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-05 08:19:03

0001 def test_load_material_map():
0002     #! [Load Material Map]
0003     import acts
0004     from acts.examples.odd import getOpenDataDetectorDirectory, getOpenDataDetector
0005 
0006     # Any of .json, .cbor or .root produced by the mapping step works here.
0007     material_map = getOpenDataDetectorDirectory() / "data/odd-material-maps.root"
0008 
0009     decorator = acts.IMaterialDecorator.fromFile(material_map)
0010     detector = getOpenDataDetector(materialDecorator=decorator)
0011     trackingGeometry = detector.trackingGeometry()
0012     #! [Load Material Map]
0013 
0014     #! [Extract Material Surfaces]
0015     # The surfaces the mapping writes onto, and reads back when mapping again.
0016     materialSurfaces = trackingGeometry.extractMaterialSurfaces()
0017     #! [Extract Material Surfaces]
0018 
0019     assert len(materialSurfaces) > 0