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