21 <output>pion-ExtMuidValidation.root</output>
22 <contact>giacomo.pietro@kit.edu</contact>
23 <description>Create events with 1 pion track for ext/muid validation.</description>
30 from simulation
import add_simulation
31 from reconstruction
import add_reconstruction
33 b2.set_random_seed(654321)
35 output_filename =
'../pion-ExtMuidValidation.root'
37 print(output_filename)
39 path = b2.create_path()
41 eventinfosetter = b2.register_module(
'EventInfoSetter')
42 eventinfosetter.param(
'evtNumList', [1000])
43 path.add_module(eventinfosetter)
45 progress = b2.register_module(
'Progress')
46 path.add_module(progress)
48 pgun = b2.register_module(
'ParticleGun')
50 'pdgCodes': [-211, 211],
53 'momentumGeneration':
'uniform',
54 'momentumParams': [0.5, 5.0],
55 'thetaGeneration':
'uniformCos',
56 'thetaParams': [15., 150.],
57 'phiGeneration':
'uniform',
58 'phiParams': [0.0, 360.0],
59 'vertexGeneration':
'fixed',
60 'xVertexParams': [0.0],
61 'yVertexParams': [0.0],
62 'zVertexParams': [0.0],
64 pgun.param(param_pgun)
68 if 'BELLE2_BACKGROUND_DIR' in os.environ:
69 background_files = glob.glob(os.environ[
'BELLE2_BACKGROUND_DIR'] +
'/*.root')
70 add_simulation(path, bkgfiles=background_files)
72 b2.B2FATAL(
'BELLE2_BACKGROUND_DIR is not set.')
74 add_reconstruction(path)
76 output = b2.register_module(
'RootOutput')
77 output.param(
'outputFileName', output_filename)
78 output.param(
'branchNames', [
'MCParticles',
'ExtHits',
'KLMMuidLikelihoods',
'KLMHit2ds'])
79 path.add_module(output)