11from basf2
import set_log_level, LogLevel, register_module, create_path, process, statistics, set_random_seed, print_params
14set_log_level(LogLevel.ERROR)
15set_random_seed(1028307)
18vertex1 = register_module(
'ParticleGun')
21vertex1.param(
'nTracks', -1)
22vertex1.param(
'pdgCodes', [-11, 11, -13, 13])
25vertex1.param(
'momentumGeneration',
'normal')
26vertex1.param(
'momentumParams', [1, 0.05])
28vertex1.param(
'thetaGeneration',
'uniform')
29vertex1.param(
'thetaParams', [17, 150])
31vertex1.param(
'phiGeneration',
'uniform')
32vertex1.param(
'phiParams', [0, 360])
35vertex1.param(
'independentVertices',
False)
37vertex1.param(
'vertexGeneration',
'fixed')
38vertex1.param(
'xVertexParams', [0.0, 0.0])
39vertex1.param(
'yVertexParams', [0.0, 0.0])
40vertex1.param(
'zVertexParams', [0.0, 0.0])
43vertex2 = register_module(
'ParticleGun')
46vertex2.param(
'nTracks', -1)
47vertex2.param(
'pdgCodes', [-211, 211, -211])
50vertex2.param(
'momentumGeneration',
'normal')
51vertex2.param(
'momentumParams', [1, 0.05])
53vertex2.param(
'thetaGeneration',
'uniform')
54vertex2.param(
'thetaParams', [17, 150])
56vertex2.param(
'phiGeneration',
'uniform')
57vertex2.param(
'phiParams', [0, 360])
60vertex2.param(
'independentVertices',
False)
62vertex2.param(
'vertexGeneration',
'fixed')
63vertex2.param(
'xVertexParams', [1, 1])
64vertex2.param(
'yVertexParams', [1, 1])
65vertex2.param(
'zVertexParams', [1, 1])
68vertex3 = register_module(
'ParticleGun')
71vertex3.param(
'nTracks', -1)
72vertex3.param(
'pdgCodes', [-11, 11])
75vertex3.param(
'momentumGeneration',
'normal')
76vertex3.param(
'momentumParams', [0.5, 0.01])
78vertex3.param(
'thetaGeneration',
'uniform')
79vertex3.param(
'thetaParams', [60, 120])
81vertex3.param(
'phiGeneration',
'uniform')
82vertex3.param(
'phiParams', [0, 360])
85vertex3.param(
'independentVertices',
False)
87vertex3.param(
'vertexGeneration',
'fixed')
88vertex3.param(
'xVertexParams', [0, 0])
89vertex3.param(
'yVertexParams', [0, 0])
90vertex3.param(
'zVertexParams', [3, 3])
102eventinfosetter = register_module(
'EventInfoSetter')
104progress = register_module(
'Progress')
106gearbox = register_module(
'Gearbox')
108geometry = register_module(
'Geometry')
110simulation = register_module(
'FullSim')
112output = register_module(
'RootOutput')
116eventinfosetter.param({
'evtNumList': [10],
'runList': [1]})
119output.param(
'outputFileName',
'ParticleGunOutput.root')
123mcparticleprinter = register_module(
'PrintMCParticles')
124mcparticleprinter.logging.log_level = LogLevel.INFO
126main.add_module(eventinfosetter)
127main.add_module(progress)
128main.add_module(gearbox)
129main.add_module(geometry)
130main.add_module(vertex1)
131main.add_module(vertex2)
132main.add_module(vertex3)
133main.add_module(mcparticleprinter)
134main.add_module(simulation)
135main.add_module(output)