12Functions related to building or using the simulation/reconstruction geometry
18def check_components(components):
20 Check list of geometry components. This function is used by the standard
21 scripts,
for example `simulation.add_simulation()`. Thus, only the detector
22 components corresponding to subdetectors are allowed. In addition, TRG
is
23 included. Trigger
is not a geometry component, but it
is used
as an
24 additional component
in raw-data
and DQM scripts.
26 If there
is a unsupported component
in the list the function will
raise a
27 FATAL error
and is guaranteed to
not return.
30 components (list(str)): List of geometry components.
33 if components
is None:
35 allowed_components = [
'PXD',
'SVD',
'CDC',
'ECL',
'TOP',
'ARICH',
'KLM',
'TRG']
36 for component
in components:
37 if not (component
in allowed_components):
38 basf2.B2FATAL(f
'Geometry component {component} is unknown or it cannot be used in standard scripts.')