22 <output>pion-ExtMuidValidation.root</output>
23 <contact>depietro@infn.it</contact>
24 <description>Create events with 1 pion track for ext/muid validation.</description>
31 from simulation
import add_simulation
32 from reconstruction
import add_reconstruction
34 b2.set_random_seed(654321)
36 output_filename =
'../pion-ExtMuidValidation.root'
38 print(output_filename)
40 path = b2.create_path()
42 eventinfosetter = b2.register_module(
'EventInfoSetter')
43 eventinfosetter.param(
'evtNumList', [1000])
44 path.add_module(eventinfosetter)
46 progress = b2.register_module(
'Progress')
47 path.add_module(progress)
49 pgun = b2.register_module(
'ParticleGun')
51 'pdgCodes': [-211, 211],
54 'momentumGeneration':
'uniform',
55 'momentumParams': [0.5, 5.0],
56 'thetaGeneration':
'uniformCos',
57 'thetaParams': [15., 150.],
58 'phiGeneration':
'uniform',
59 'phiParams': [0.0, 360.0],
60 'vertexGeneration':
'fixed',
61 'xVertexParams': [0.0],
62 'yVertexParams': [0.0],
63 'zVertexParams': [0.0],
65 pgun.param(param_pgun)
69 if 'BELLE2_BACKGROUND_DIR' in os.environ:
70 background_files = glob.glob(os.environ[
'BELLE2_BACKGROUND_DIR'] +
'/*.root')
71 add_simulation(path, bkgfiles=background_files)
73 b2.B2FATAL(
'BELLE2_BACKGROUND_DIR is not set.')
75 add_reconstruction(path)
77 output = b2.register_module(
'RootOutput')
78 output.param(
'outputFileName', output_filename)
79 output.param(
'branchNames', [
'MCParticles',
'ExtHits',
'KLMMuidLikelihoods',
'BKLMHit2ds',
'EKLMHit2ds'])
80 path.add_module(output)