Belle II Software  release-05-01-25
OverlapResiduals_example.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
14 
15 import basf2
16 from simulation import add_simulation
17 from reconstruction import add_reconstruction
18 
19 
20 # Register the necessary modules
21 
22 # =====================================================================================================
23 # Generate specific cosmic events
24 cosmics = basf2.register_module('Cosmics')
25 cosmics.param('level', 1)
26 cosmics.param('ipRequirement', 1)
27 cosmics.param('cylindricalR', 16.0)
28 # Setting the random seed for particle generation
29 basf2.set_random_seed(0)
30 # Create Event information
31 eventinfosetter = basf2.register_module('EventInfoSetter')
32 # Show progress of processing
33 progress = basf2.register_module('ProgressBar')
34 # Load parameters
35 gearbox = basf2.register_module('Gearbox')
36 # Create geometry
37 geometry = basf2.register_module('Geometry', excludedComponents=['MagneticField'])
38 # Manages created histograms
39 histos = basf2.register_module('HistoManager')
40 # The main module: studies hits in overlapping sensors of a same VXD layer to monitor the VXD alignment
41 VXDResiduals = basf2.register_module('OverlapResiduals')
42 # ======================================================================================================
43 
44 eventinfosetter.param({'evtNumList': [100], 'runList': [1]})
45 
46 # Run the modules
47 main = basf2.create_path()
48 main.add_module(eventinfosetter)
49 main.add_module(gearbox)
50 main.add_module(geometry)
51 main.add_module(histos)
52 # Performs generation
53 main.add_module(cosmics)
54 # Performs simulation
55 add_simulation(main)
56 # Performs reconstruction
57 add_reconstruction(main, pruneTracks=False)
58 # Runs module OverlapResiduals
59 main.add_module(VXDResiduals)
60 main.add_module(progress)
61 
62 # Process events
63 basf2.process(main)
64 
65 # Print call statistics
66 print(basf2.statistics)
basf2.process
def process(path, max_event=0)
Definition: __init__.py:25