12 """This steering file shows how to use 'EclDataAnalysis'
13 module to dump ECL-related quantities in an ntuple.
19 Ntuple with ECL-related quantities
22 $ basf2 -i <path_to_input_file> -n <number_of_events>
23 EclDataAnalysis.py [-- --withBkg]
30 from simulation
import add_simulation
31 from reconstruction
import add_reconstruction
36 parser = argparse.ArgumentParser()
38 parser.add_argument(
'--withBkg',
41 help=
'Add beam background'
42 'Default is False i.e. no beam background.')
46 args = argparser().parse_args()
49 mainPath = b2.create_path()
52 eventInfoSetter = b2.register_module(
'EventInfoSetter')
53 eventInfoSetter.param({
'evtNumList': [100],
56 mainPath.add_module(eventInfoSetter)
59 b2.set_random_seed(123456)
62 particleGun = b2.register_module(
'ParticleGun')
66 'momentumGeneration':
'fixed',
67 'momentumParams': [0.5],
68 'thetaGeneration':
'uniform',
69 'thetaParams': [0., 30.],
70 'phiGeneration':
'uniform',
71 'phiParams': [0., 360.],
72 'vertexGeneration':
'uniform',
73 'xVertexParams': [0.0, 0.0],
74 'yVertexParams': [0.0, 0.0],
75 'zVertexParams': [0.0, 0.0],
77 particleGun.param(param_particleGun)
78 mainPath.add_module(particleGun)
82 bgFiles = glob.glob(os.environ[
'BELLE2_BACKGROUND_DIR'] +
'*.root')
84 add_simulation(mainPath, bkgfiles=bgFiles)
87 add_simulation(mainPath)
90 add_reconstruction(mainPath)
93 eclDataAnalysis = b2.register_module(
'ECLDataAnalysis')
94 eclDataAnalysis.param(
'rootFileName',
95 'EclDataAnalysis_Test.root')
96 eclDataAnalysis.param(
'doTracking', 1)
97 eclDataAnalysis.param(
'doPureCsIStudy', 0)
98 mainPath.add_module(eclDataAnalysis)
101 mainPath.add_module(
'Progress')