Belle II Software development
fullInvertedTrackingValidationBkg.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>FullInvertedTrackingValidationBkg.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
21from tracking import add_tracking_reconstruction
22import logging
23import basf2
24VALIDATION_OUTPUT_FILE = 'FullInvertedTrackingValidationBkg.root'
25N_EVENTS = 1000
26ACTIVE = True
27
28
29class InvertedFullBkg(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 def finder_module(self, path):
37 """Add the inverted track finding to the basf2 path"""
38 add_tracking_reconstruction(path, inverted_tracking=True)
39
40
41 tracking_coverage = {
42 'WhichParticles': [], # Include all particles, also secondaries
43 'UsePXDHits': True,
44 'UseSVDHits': True,
45 'UseCDCHits': True,
46 "UseReassignedHits": True,
47 'UseOnlyBeforeTOP': True,
48 'UseNLoops': 1
49 }
50
52 fit_tracks = False
53
54 use_fit_information = True
55
56 use_expert_folder = False
57
58 pulls = True
59
60 resolution = True
61
62 output_file_name = VALIDATION_OUTPUT_FILE
63
64 non_expert_parameters = []
65
66
67def main():
68 basf2.set_random_seed(1337)
69 validation_run = InvertedFullBkg()
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.")
None finder_module
Name of the finder module to be used - can be everything that is accepted by tracking....
Definition: main.py:1