Belle II Software development
noCKFValidationBkg.py
1#!/usr/bin/env python3
2
3
10
11"""
12<header>
13 <contact>Nils.Braun@kit.edu</contact>
14 <input>EvtGenSim.root</input>
15 <output>NoCKFValidationBkg.root</output>
16 <description>This script validates the tracking chain without the CKF in Y(4S) runs with background.</description>
17</header>
18"""
19
20from tracking.validation.run import TrackingValidationRun
21from tracking import add_track_finding
22from tracking.path_utils import add_hit_preparation_modules
23import logging
24import basf2
25VALIDATION_OUTPUT_FILE = 'NoCKFValidationBkg.root'
26N_EVENTS = 1000
27ACTIVE = True
28
29
30def setupFinderModule(path):
31 add_hit_preparation_modules(path, components=["SVD", "PXD"])
32 add_track_finding(path, svd_ckf_mode="SVD_alone")
33
34
36 """Validate the track-finding chain, excluding the Kalman fitter/filter, with Y(4S) events and background overlay"""
37
38 n_events = N_EVENTS
39
40 generator_module = 'generic'
41
42 root_input_file = '../EvtGenSim.root'
43
44 finder_module = staticmethod(setupFinderModule)
45
46 tracking_coverage = {
47 'WhichParticles': [], # Include all particles, also secondaries
48 'UsePXDHits': True,
49 'UseSVDHits': True,
50 'UseCDCHits': True,
51 "UseReassignedHits": True,
52 'UseOnlyBeforeTOP': True,
53 'UseNLoops': 1
54 }
55
56 fit_tracks = True
57
58 use_fit_information = True
59
60 pulls = True
61
62 resolution = True
63
64 output_file_name = VALIDATION_OUTPUT_FILE
65
66
67def main():
68 basf2.set_random_seed(1337)
69 validation_run = CKFBkg()
70 validation_run.configure_and_execute_from_commandline()
71
72
73if __name__ == '__main__':
74 logging.basicConfig(level=logging.INFO)
75 if ACTIVE:
76 main()
77 else:
78 print("This validation deactivated and thus basf2 is not executed.\n"
79 "If you want to run this validation, please set the 'ACTIVE' flag above to 'True'.\n"
80 "Exiting.")
Definition: main.py:1