Belle II Software development
cosmicsTrackingValidation.py
1#!/usr/bin/env python3
2
3
10
11"""
12<header>
13 <contact>software-tracking@belle2.org</contact>
14 <input>CosmicsSimNoBkgTrackingVolume.root</input>
15 <output>CosmicsTrackingValidation.root</output>
16 <description>Validation of the default cosmic track finding (VXD+CDC).</description>
17</header>
18"""
19
20from tracking.validation.run import TrackingValidationRun
21from tracking import add_cr_tracking_reconstruction
22import logging
23import basf2
24VALIDATION_OUTPUT_FILE = 'CosmicsTrackingValidation.root'
25CONTACT = 'software-tracking@belle2.org'
26N_EVENTS = 10000
27ACTIVE = True
28
29
30class Cosmics(TrackingValidationRun):
31 """
32 derived class that sets up the cosmics validation
33 """
34
35 n_events = N_EVENTS
36
37 generator_module = 'Cosmics'
38
39 root_input_file = '../CosmicsSimNoBkgTrackingVolume.root'
40
41 components = None
42
43 finder_module = staticmethod(add_cr_tracking_reconstruction)
44
45 tracking_coverage = {
46 'WhichParticles': ['CDC'], # Include all particles seen in CDC, also secondaries (dont put SVD, PXD here)
47 'UsePXDHits': True,
48 'UseSVDHits': True,
49 'UseCDCHits': True,
50 'UseOnlyAxialCDCHits': False,
51 "UseReassignedHits": True,
52 'UseNLoops': 1
53 }
54
55 pulls = True
56
57 contact = CONTACT
58
59 output_file_name = VALIDATION_OUTPUT_FILE
60
61
62def main():
63 basf2.set_random_seed(1337)
64 validation_run = Cosmics()
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