Belle II Software
release-08-01-10
BremsstralungPhotons.py
1
#!/usr/bin/env python3
2
# -*- coding: utf-8 -*-
3
4
11
12
"""
13
This script saves bremsstrahlung photons in MCParticles.
14
15
Saves 100 EvtGen events + secondary bremsstrahlung photons created by Geant4 in MCParticles.
16
The corresponding secondaryPhysicsProcess ID is 3, which is defined as fBremsstrahlung in G4EmProcessSubType.h.
17
"""
18
19
import
basf2
as
b2
20
21
main = b2.create_path()
22
23
# create 100 events
24
main.add_module(
"EventInfoSetter"
, evtNumList=[100])
25
26
# using standard evtgen
27
main.add_module(
"EvtGenInput"
)
28
29
# and parameters
30
main.add_module(
"Gearbox"
)
31
32
# and the geometry
33
main.add_module(
"Geometry"
)
34
35
# as well as the simulation, saving Bremsstrahlung photons with kinetic energy > 10.0 MeV.
36
main.add_module(
"FullSim"
, StoreBremsstrahlungPhotons=
True
, BremsstrahlungPhotonsEnergyCut=10.0)
37
38
# output
39
main.add_module(
"RootOutput"
, outputFileName=
"EvtGenSimNoBkgYesBrems.root"
)
40
41
# run it
42
b2.process(main)
43
44
# Print call statistics
45
print(b2.statistics)
simulation
examples
BremsstralungPhotons.py
Generated on Mon Sep 23 2024 14:03:56 for Belle II Software by
1.9.1