Belle II Software development
Collection.py
1#!/usr/bin/env python3
2
3
10
11# KLM alignment: reconstruction and collection.
12
13import sys
14import basf2
15from reconstruction import add_reconstruction
16
17basf2.conditions.append_testing_payloads('localdb/database.txt')
18
19# Create path.
20main = basf2.create_path()
21
22# Input.
23main.add_module('RootInput', inputFileName=sys.argv[1])
24
25# Histogram management.
26main.add_module('HistoManager', histoFileName=sys.argv[2])
27
28# Geometry and XML data.
29main.add_module('Gearbox')
30main.add_module('Geometry')
31
32# Reconstruction.
33add_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.
38basf2.set_module_parameters(main, 'Muid', MaxDt=1e9)
39
40# DAF fitter.
41main.add_module('DAFRecoFitter', resortHits=False)
42
43# Genfit extrapolation.
44main.add_module('SetupGenfitExtrapolation',
45 noiseBetheBloch=False,
46 noiseCoulomb=False,
47 noiseBrems=False)
48
49# Millepede collector.
50main.add_module('MillepedeCollector',
51 components=['BKLMAlignment', 'EKLMAlignment',
52 'EKLMSegmentAlignment'],
53 useGblTree=True,
54 minPValue=1e-5)
55
56# Progress.
57main.add_module('Progress')
58
59# Processing.
60basf2.process(main)
61
62# Print call statistics.
63print(basf2.statistics)