11"""This steering file shows how to use EclDataAnalysis
12 module to dump ECL related quantities in an ntuple
13 starting from dst root file.
15The user should provide input and output root filenames
16as first and second argument respectively.
19 $ basf2 EclMaterialAnalysis.py [-- --withBkg]
24from simulation
import add_simulation
25from reconstruction
import add_reconstruction
30 parser = argparse.ArgumentParser()
32 parser.add_argument(
'--withBkg',
35 help=
'Add beam background'
36 'Default is False i.e. no beam background.')
40args = argparser().parse_args()
43mainPath = b2.create_path()
46eventInfoSetter = b2.register_module(
'EventInfoSetter')
47eventInfoSetter.param({
'evtNumList': [100000],
50mainPath.add_module(eventInfoSetter)
53b2.set_random_seed(123456)
83particleGun = b2.register_module(
'ParticleGun')
87 'momentumGeneration':
'fixed',
88 'momentumParams': [0.5],
89 'thetaGeneration':
'uniform',
90 'thetaParams': [(12.01), (31.36)],
91 'phiGeneration':
'uniform',
92 'phiParams': [0., 360.],
93 'vertexGeneration':
'uniform',
94 'xVertexParams': [0.0, 0.0],
95 'yVertexParams': [0.0, 0.0],
96 'zVertexParams': [0.0, 0.0],
98particleGun.param(param_particleGun)
99mainPath.add_module(particleGun)
105 bkgdir +
'Coulomb_HER_100us.root',
106 bkgdir +
'Coulomb_LER_100us.root',
107 bkgdir +
'Coulomb_HER_100usECL.root',
108 bkgdir +
'Coulomb_LER_100usECL.root',
109 bkgdir +
'RBB_HER_100us.root',
110 bkgdir +
'RBB_LER_100us.root',
111 bkgdir +
'RBB_HER_100usECL.root',
112 bkgdir +
'RBB_LER_100usECL.root',
113 bkgdir +
'Touschek_HER_100us.root',
114 bkgdir +
'Touschek_LER_100us.root',
115 bkgdir +
'Touschek_HER_100usECL.root',
116 bkgdir +
'Touschek_LER_100usECL.root',
119 add_simulation(mainPath, bkgfiles=bkgFiles)
121 add_simulation(mainPath)
124add_reconstruction(mainPath)
130eclDataAnalysis = b2.register_module(
'ECLDataAnalysis')
131eclDataAnalysis.param(
'rootFileName',
132 'EclDataAnalysis_500MeV_100000_Full_FWD.root')
133eclDataAnalysis.param(
'doTracking', 0)
134mainPath.add_module(eclDataAnalysis)
137mainPath.add_module(
'Progress')
138b2.process(mainPath, calculateStatistics=
True)