Belle II Software development
__init__.py
1#!/usr/bin/env python3
2
3
10
11"""
12Functions related to building or using the simulation/reconstruction geometry
13"""
14
15import basf2
16
17
18def check_components(components):
19 """
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.
25
26 If there is a unsupported component in the list the function will raise a
27 FATAL error and is guaranteed to not return.
28
29 Parameters:
30 components (list(str)): List of geometry components.
31 """
32
33 if components is None:
34 return
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.')
def add_simulation(path, components=None, bkgfiles=None, bkgOverlay=True, forceSetPXDDataReduction=False, usePXDDataReduction=True, cleanupPXDDataReduction=True, generate_2nd_cdc_hits=False, simulateT0jitter=True, isCosmics=False, FilterEvents=False, usePXDGatedMode=False, skipExperimentCheckForBG=False, save_slow_pions_in_mc=False, save_all_charged_particles_in_mc=False)
Definition: simulation.py:138