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
PairConversions.py
1
#!/usr/bin/env python3
2
3
10
11
"""
12
This script saves e+ or e- from photon conversions into a pair in MCParticles.
13
14
Saves 100 EvtGen events + secondary e+ or e- from pair conversions created by Geant4 in MCParticles.
15
The corresponding secondaryPhysicsProcess ID is 14, which is defined as fGammaConversion in G4EmProcessSubType.h.
16
"""
17
18
import
basf2
as
b2
19
20
main = b2.create_path()
21
22
# create 100 events
23
main.add_module(
"EventInfoSetter"
, evtNumList=[100])
24
25
# using standard evtgen
26
main.add_module(
"EvtGenInput"
)
27
28
# and parameters
29
main.add_module(
"Gearbox"
)
30
31
# and the geometry
32
main.add_module(
"Geometry"
)
33
34
# as well as the simulation, saving e+ or e- from pair conversions with kinetic energy > 10.0 MeV.
35
main.add_module(
"FullSim"
, StorePairConversions=
True
, PairConversionsEnergyCut=10.0)
36
37
# output
38
main.add_module(
"RootOutput"
, outputFileName=
"EvtGenSimNoBkgYesPairConversions.root"
)
39
40
# run it
41
b2.process(main)
42
43
# Print call statistics
44
print(b2.statistics)
simulation
examples
PairConversions.py
Generated on Wed Apr 9 2025 02:44:37 for Belle II Software by
1.9.6