Belle II Software
development
Belle2PhyslistTestBrems.py
1
#!/usr/bin/env python3
2
3
10
11
"""
12
This script is based on BremsstralungPhotons.py and was developed to test Belle2PhysicsList.
13
14
Saves 100 EvtGen events + secondary bremsstrahlung photons created by Geant4 in MCParticles.
15
The corresponding secondaryPhysicsProcess ID is 3, which is defined as fBremsstrahlung 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
# Invoke Belle2 physics list instead of Geant4 reference physics list.
35
# New options StandardEM, UseHighPrecisionNeutrons have been added.
36
# Otherwise, same collection of bremsstrahlung photons with kinetic
37
# energy > 10.0 MeV.
38
main.add_module(
"FullSim"
, PhysicsList=
"Belle2"
, RunEventVerbosity=0,
39
RegisterOptics=
False
,
40
# StandardEM=True,
41
# UseHighPrecisionNeutrons=True,
42
# ProductionCut=0.07,
43
StoreBremsstrahlungPhotons=
True
, BremsstrahlungPhotonsEnergyCut=10.0)
44
45
# output
46
main.add_module(
"RootOutput"
, outputFileName=
"EvtGenSimNoBkgYesBrems.root"
)
47
48
# run it
49
b2.process(main)
50
51
# Print call statistics
52
print(b2.statistics)
simulation
examples
Belle2PhyslistTestBrems.py
Generated on Fri Nov 8 2024 02:41:23 for Belle II Software by
1.9.6