12 """This steering file shows how to use EclDataAnalysis
13 module to dump ECL related quantities in an ntuple
14 starting from dst root file.
16 The user should provide input and output root filnames
17 as first and second argument respectively.
20 $ basf2 EclMaterialAnalysis.py [-- --withBkg]
25 from simulation
import add_simulation
26 from reconstruction
import add_reconstruction
31 parser = argparse.ArgumentParser()
33 parser.add_argument(
'--withBkg',
36 help=
'Add beam background'
37 'Default is False i.e. no beam background.')
41 args = argparser().parse_args()
44 mainPath = b2.create_path()
47 eventInfoSetter = b2.register_module(
'EventInfoSetter')
48 eventInfoSetter.param({
'evtNumList': [100000],
51 mainPath.add_module(eventInfoSetter)
54 b2.set_random_seed(123456)
84 particleGun = b2.register_module(
'ParticleGun')
88 'momentumGeneration':
'fixed',
89 'momentumParams': [0.5],
90 'thetaGeneration':
'uniform',
91 'thetaParams': [(12.01), (31.36)],
92 'phiGeneration':
'uniform',
93 'phiParams': [0., 360.],
94 'vertexGeneration':
'uniform',
95 'xVertexParams': [0.0, 0.0],
96 'yVertexParams': [0.0, 0.0],
97 'zVertexParams': [0.0, 0.0],
99 particleGun.param(param_particleGun)
100 mainPath.add_module(particleGun)
106 bkgdir +
'Coulomb_HER_100us.root',
107 bkgdir +
'Coulomb_LER_100us.root',
108 bkgdir +
'Coulomb_HER_100usECL.root',
109 bkgdir +
'Coulomb_LER_100usECL.root',
110 bkgdir +
'RBB_HER_100us.root',
111 bkgdir +
'RBB_LER_100us.root',
112 bkgdir +
'RBB_HER_100usECL.root',
113 bkgdir +
'RBB_LER_100usECL.root',
114 bkgdir +
'Touschek_HER_100us.root',
115 bkgdir +
'Touschek_LER_100us.root',
116 bkgdir +
'Touschek_HER_100usECL.root',
117 bkgdir +
'Touschek_LER_100usECL.root',
120 add_simulation(mainPath, bkgfiles=bkgFiles)
122 add_simulation(mainPath)
125 add_reconstruction(mainPath)
131 eclDataAnalysis = b2.register_module(
'ECLDataAnalysis')
132 eclDataAnalysis.param(
'rootFileName',
133 'EclDataAnalysis_500MeV_100000_Full_FWD.root')
134 eclDataAnalysis.param(
'doTracking', 0)
135 mainPath.add_module(eclDataAnalysis)
138 mainPath.add_module(
'Progress')