Belle II Software
development
Toggle main menu visibility
Main Page
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
w
x
z
Typedefs
a
b
c
d
e
g
i
k
l
m
n
p
r
s
t
u
v
w
Enumerations
Enumerator
c
d
f
p
t
v
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
z
Related Functions
b
c
d
g
i
o
r
s
t
Files
File List
File Members
All
Functions
Typedefs
Macros
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 Wed Apr 9 2025 02:44:38 for Belle II Software by
1.9.6