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