11"""This steering file shows how to use 'EclDataAnalysis'
12 module to dump ECL-related quantities in an ntuple.
18 Ntuple
with ECL-related quantities
21 $ basf2 -i <path_to_input_file> -n <number_of_events>
22 EclDataAnalysis.py [-- --withBkg]
29from simulation import add_simulation
30from reconstruction import add_reconstruction
35 parser = argparse.ArgumentParser()
37 parser.add_argument('--withBkg',
40 help=
'Add beam background'
41 'Default is False i.e. no beam background.')
45args = argparser().parse_args()
48mainPath = b2.create_path()
51eventInfoSetter = b2.register_module(
'EventInfoSetter')
52eventInfoSetter.param({
'evtNumList': [100],
55mainPath.add_module(eventInfoSetter)
58b2.set_random_seed(123456)
61particleGun = b2.register_module(
'ParticleGun')
65 'momentumGeneration':
'fixed',
66 'momentumParams': [0.5],
67 'thetaGeneration':
'uniform',
68 'thetaParams': [0., 30.],
69 'phiGeneration':
'uniform',
70 'phiParams': [0., 360.],
71 'vertexGeneration':
'uniform',
72 'xVertexParams': [0.0, 0.0],
73 'yVertexParams': [0.0, 0.0],
74 'zVertexParams': [0.0, 0.0],
76particleGun.param(param_particleGun)
77mainPath.add_module(particleGun)
81 bgFiles = glob.glob(os.environ[
'BELLE2_BACKGROUND_DIR'] +
'*.root')
83 add_simulation(mainPath, bkgfiles=bgFiles)
86 add_simulation(mainPath)
89add_reconstruction(mainPath)
92eclDataAnalysis = b2.register_module(
'ECLDataAnalysis')
93eclDataAnalysis.param(
'rootFileName',
94 'EclDataAnalysis_Test.root')
95eclDataAnalysis.param(
'doTracking', 1)
96eclDataAnalysis.param(
'doPureCsIStudy', 0)
97mainPath.add_module(eclDataAnalysis)
100mainPath.add_module(
'Progress')