Belle II Software  release-08-01-10
EclChargedPidAnalysis.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 """This steering file shows how to use 'ECLChargedPIDDataAnalysis'
13  module to dump ECL-related quantities in an ntuple.
14 
15 Input:
16  File with DST format
17 
18 Output:
19  Ntuple with ECL-related quantities
20 
21 Usage:
22  $ basf2 -i <path_to_input_file> -n <number_of_events>
23  EclChargedPidAnalysis.py
24 """
25 
26 import basf2 as b2
27 
28 # Create path. Register necessary modules to this path.
29 mainPath = b2.create_path()
30 
31 # Register and add 'RootInput' module
32 inputFile = b2.register_module('RootInput')
33 mainPath.add_module(inputFile)
34 
35 # Register and add 'ECLChargedPIDDataAnalysis' module
36 eclChargedPIDDataAnalysis = b2.register_module('ECLChargedPIDDataAnalysis')
37 eclChargedPIDDataAnalysis.param('rootFileName',
38  'ECLChargedPIDDataAnalysis_Test.root')
39 mainPath.add_module(eclChargedPIDDataAnalysis)
40 
41 # Process the events and print call statistics
42 mainPath.add_module('Progress')
43 b2.process(mainPath)
44 print(b2.statistics)