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