Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-26 09:23:12

0001 # This file is part of the ACTS project.
0002 #
0003 # Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 #
0005 # This Source Code Form is subject to the terms of the Mozilla Public
0006 # License, v. 2.0. If a copy of the MPL was not distributed with this
0007 # file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 from detray_metadata import metadata
0010 from detray_metadata import Shape, Accelerator, GridBin, GridSerializer
0011 from detray_metadata import add_silicon_tracker_defaults
0012 
0013 import logging
0014 
0015 
0016 def configure(md: metadata):
0017     logger = logging.getLogger(__name__)
0018     logger.info("Define types required by the toy detector:")
0019 
0020     # Add default types for silicon trackers (cylindrical detector shape)
0021     add_silicon_tracker_defaults(
0022         metadata=md, use_homogeneous_mat=True, use_mat_maps=True, add_trapezoid=True
0023     )
0024 
0025     # Add surface grids with static bin capacity
0026     toy_grid_bin = GridBin.STATIC
0027     toy_grid_bin.param["capacity"] = 1
0028 
0029     md.add_accel_struct(
0030         Accelerator.CONCENTRIC_CYLINDER_GRID2D,
0031         "sensitive",
0032         grid_bin=toy_grid_bin,
0033         type_id=1,
0034     )
0035 
0036     md.add_accel_struct(
0037         Accelerator.DISC_GRID2D, "sensitive", grid_bin=toy_grid_bin, type_id=2
0038     )
0039 
0040     logger.info("Done")