Belle II Software
release-08-01-10
__init__.py
1
#!/usr/bin/env python3
2
# -*- coding: utf-8 -*-
3
4
11
12
"""
13
Functions related to building or using the simulation/reconstruction geometry
14
"""
15
16
import
basf2
17
18
19
def
check_components(components):
20
"""
21
Check list of geometry components. This function is used by the standard
22
scripts, for example `simulation.add_simulation()`. Thus, only the detector
23
components corresponding to subdetectors are allowed. In addition, TRG is
24
included. Trigger is not a geometry component, but it is used as an
25
additional component in raw-data and DQM scripts.
26
27
If there is a unsupported component in the list the function will raise a
28
FATAL error and is guaranteed to not return.
29
30
Parameters:
31
components (list(str)): List of geometry components.
32
"""
33
34
if
components
is
None
:
35
return
36
allowed_components = [
'PXD'
,
'SVD'
,
'CDC'
,
'ECL'
,
'TOP'
,
'ARICH'
,
'KLM'
,
'TRG'
]
37
for
component
in
components:
38
if
not
(component
in
allowed_components):
39
basf2.B2FATAL(
'Geometry component %s is unknown or it cannot be used in standard scripts.'
% (component))
geometry
scripts
geometry
__init__.py
Generated on Mon Sep 23 2024 13:59:44 for Belle II Software by
1.9.1