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