Belle II Software development
cdcAutomatonTrackingValidation.py
1#!/usr/bin/env python3
2
3
10
11"""
12<header>
13 <contact>software-tracking@belle2.org</contact>
14 <input>EvtGenSimNoBkg.root</input>
15 <output>CDCAutomatonTrackingValidation.root</output>
16 <description>
17 This module validates that cdc cellular automaton track finding
18 is capable of reconstructing tracks in Y(4S) runs.
19 </description>
20</header>
21"""
22
23from tracking.validation.run import TrackingValidationRun
24import logging
25import basf2
26VALIDATION_OUTPUT_FILE = 'CDCAutomatonTrackingValidation.root'
27CONTACT = 'software-tracking@belle2.org'
28N_EVENTS = 1000
29ACTIVE = False
30
31
32class CDCAutomaton(TrackingValidationRun):
33 """Validate the CDC TrackFinderAutomaton"""
34
35 n_events = N_EVENTS
36
37 generator_module = 'generic'
38
39 root_input_file = '../EvtGenSimNoBkg.root'
40
41 def finder_module(self, path):
42 """Add the CDC TrackFinderAutomaton to the basf2 path"""
43 path.add_module('TFCDC_TrackFinderAutomaton',
44 # UseNLoops = 1,
45 )
46
47
48 tracking_coverage = {
49 'WhichParticles': ['CDC'], # Include all particles seen in CDC, also secondaries
50 'UsePXDHits': False,
51 'UseSVDHits': False,
52 'UseCDCHits': True,
53 'UseOnlyAxialCDCHits': False,
54 "UseReassignedHits": True,
55 "UseNLoops": 1.0,
56 "UseOnlyBeforeTOP": True,
57 'MinCDCAxialHits': 8,
58 'MinCDCStereoHits': 6,
59 "AllowFirstCDCSuperLayerOnly": True,
60 'EnergyCut': 0,
61 }
62
63 pulls = True
64
65 contact = CONTACT
66
67 output_file_name = VALIDATION_OUTPUT_FILE
68
69
70def main():
71 basf2.set_random_seed(1337)
72 validation_run = CDCAutomaton()
73 validation_run.configure_and_execute_from_commandline()
74
75
76if __name__ == '__main__':
77 logging.basicConfig(level=logging.INFO)
78 if ACTIVE:
79 main()
80 else:
81 print("This validation deactivated and thus basf2 is not executed.\n"
82 "If you want to run this validation, please set the 'ACTIVE' flag above to 'True'.\n"
83 "Exiting.")
None finder_module
Name of the finder module to be used - can be everything that is accepted by tracking....
Definition: main.py:1