Belle II Software  release-08-01-10
EclChargedPidModuleTest.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 """This steering file tests the 'ECLChargedPID' module.
13 
14 Input:
15  It must run on DST files, or reduced DSTs containing
16  ECLShowers, Tracks, and all relevant relational containers:
17 
18  - Tracks
19  - TrackFitResults
20  - ECLClusters
21  - ECLShowers
22  - TracksToECLClusters
23  - TracksToECLShowers
24  - ECLClustersToECLShowers
25  - ECLConnectedRegions
26  - ECLPidLikelihoods
27  - PIDLikelihoods
28  - TracksToECLPidLikelihoods
29  - TracksToPIDLikelihoods
30 Usage:
31  $ basf2 -i <path_to_input_file> -n <number_of_events>
32  EclChargedPidModuleTest.py
33 """
34 
35 import basf2 as b2
36 
37 # Create path. Register necessary modules to this path.
38 mainPath = b2.create_path()
39 
40 # Register and add 'RootInput' module to read input DST file.
41 inputFile = b2.register_module('RootInput')
42 mainPath.add_module(inputFile)
43 
44 # Register and add 'ECLChargedPID' module
45 eclChargedPID = b2.register_module('ECLChargedPID')
46 mainPath.add_module(eclChargedPID)
47 
48 # Set debug options for 'ECLChargedPID' module.
49 eclChargedPID.logging.log_level = b2.LogLevel.DEBUG
50 eclChargedPID.logging.debug_level = 20
51 
52 """Register and add 'PrintCollections' module.
53  This prints the data model objects in the store.
54 """
55 printCollections = b2.register_module('PrintCollections')
56 mainPath.add_module(printCollections)
57 
58 # Process the events and print call statistics
59 mainPath.add_module('Progress')
60 b2.process(mainPath)
61 print(b2.statistics)