20from simulation
import add_simulation
21from reconstruction
import add_reconstruction
36 'deuteron+': 1000010020,
37 'deuteron-': -1000010020,
44pdgCode = getpdgCode(particle)
46nEvent = int(sys.argv[2])
51main = basf2.create_path()
54eventInfoSetter = basf2.register_module(
'EventInfoSetter')
55eventInfoSetter.param(
'expList', [0])
56eventInfoSetter.param(
'runList', [0])
57eventInfoSetter.param(
'evtNumList', [nEvent])
58main.add_module(eventInfoSetter)
63pGun = basf2.register_module(
'ParticleGun')
65 'pdgCodes': [pdgCode, pdgCodeNeg],
68 'momentumGeneration':
'uniform',
69 'momentumParams': [2.5, 7.0],
70 'thetaGeneration':
'uniformCos',
71 'thetaParams': [15., 150.],
72 'phiGeneration':
'uniform',
73 'phiParams': [0.0, 360.0],
74 'vertexGeneration':
'uniform',
75 'xVertexParams': [0.0, 0.0],
76 'yVertexParams': [0.0, 0.0],
77 'zVertexParams': [0.0, 0.0],
86add_reconstruction(main)
88output = basf2.register_module(
'RootOutput')
89outfile = f
'{particle}_{stream}.root'
90output.param(
'outputFileName', outfile)
91output.param(
'branchNames', [
'MCParticles',
'Muids'])
92main.add_module(output)
97print(basf2.statistics)