Belle II Software
development
SecondaryParticles.py
1
#!/usr/bin/env python3
2
3
10
11
"""
12
This script saves all the secondary particles in MCParticles.
13
14
Saves 100 EvtGen events + all the secondary particles created by Geant4 in MCParticles.
15
"""
16
17
import
basf2
as
b2
18
19
main = b2.create_path()
20
21
# create 100 events
22
main.add_module(
"EventInfoSetter"
, evtNumList=[100])
23
24
# using standard evtgen
25
main.add_module(
"EvtGenInput"
)
26
27
# and parameters
28
main.add_module(
"Gearbox"
)
29
30
# and the geometry
31
main.add_module(
"Geometry"
)
32
33
# as well as the simulation, saving secondary particles with kinetic energy > 1.0 MeV.
34
main.add_module(
"FullSim"
, StoreAllSecondaries=
True
, SecondariesEnergyCut=1.0)
35
36
# output
37
main.add_module(
"RootOutput"
, outputFileName=
"EvtGenSimNoBkgYesSecondaries.root"
)
38
39
# run it
40
b2.process(main)
41
42
# Print call statistics
43
print(b2.statistics)
simulation
examples
SecondaryParticles.py
Generated on Fri Nov 8 2024 02:41:24 for Belle II Software by
1.9.6