Belle II Software  release-05-02-19
Collection.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 # KLM alignment: reconstruction and collection.
5 
6 import sys
7 import basf2
8 from reconstruction import add_reconstruction
9 
10 basf2.conditions.append_testing_payloads('localdb/database.txt')
11 
12 # Create path.
13 main = basf2.create_path()
14 
15 # Input.
16 main.add_module('RootInput', inputFileName=sys.argv[1])
17 
18 # Histogram management.
19 main.add_module('HistoManager', histoFileName=sys.argv[2])
20 
21 # Geometry and XML data.
22 main.add_module('Gearbox')
23 main.add_module('Geometry')
24 
25 # Reconstruction.
26 add_reconstruction(main, pruneTracks=False, add_muid_hits=True)
27 # Disable the time window in muid module by setting it to 1 second.
28 # This is necessary because the alignment needs to be performed before
29 # the time calibration; if the time window is not disabled, then all
30 # scintillator hits are rejected.
31 basf2.set_module_parameters(main, 'Muid', MaxDt=1e9)
32 
33 # DAF fitter.
34 main.add_module('DAFRecoFitter', resortHits=True)
35 
36 # Genfit extrapolation.
37 main.add_module('SetupGenfitExtrapolation',
38  noiseBetheBloch=False,
39  noiseCoulomb=False,
40  noiseBrems=False)
41 
42 # Millepede collector.
43 main.add_module('MillepedeCollector',
44  components=['BKLMAlignment', 'EKLMAlignment',
45  'EKLMSegmentAlignment'],
46  useGblTree=True,
47  minPValue=1e-5)
48 
49 # Progress.
50 main.add_module('Progress')
51 
52 # Processing.
53 basf2.process(main)
54 
55 # Print call statistics.
56 print(basf2.statistics)
basf2.process
def process(path, max_event=0)
Definition: __init__.py:25