Belle II Software  release-05-01-25
Belle2PhyslistTestBrems.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 """
5 This script is based on BremsstralungPhotons.py and was developed to test Belle2PhysicsList.
6 
7 <header>
8  <contact>dwright@slac.stanford.edu</contact>
9  <description>
10  Saves 100 EvtGen events + secondary bremsstrahlung photons created by Geant4 in MCParticles.
11  The corresponding secondaryPhysicsProcess ID is 3, which is defined as fBremsstrahlung in G4EmProcessSubType.h.
12  </description>
13 </header>
14 """
15 
16 from basf2 import *
17 
18 main = create_path()
19 
20 # create 100 events
21 main.add_module("EventInfoSetter", evtNumList=[100])
22 
23 # using standard evtgen
24 main.add_module("EvtGenInput")
25 
26 # and parameters
27 main.add_module("Gearbox")
28 
29 # and the geometry
30 main.add_module("Geometry")
31 
32 # Invoke Belle2 physics list instead of Geant4 reference physics list.
33 # New options StandardEM, UseHighPrecisionNeutrons have been added.
34 # Otherwise, same collection of bremsstrahlung photons with kinetic
35 # energy > 10.0 MeV.
36 main.add_module("FullSim", PhysicsList="Belle2", RunEventVerbosity=0,
37  RegisterOptics=False,
38  # StandardEM=True,
39  # UseHighPrecisionNeutrons=True,
40  # ProductionCut=0.07,
41  StoreBremsstrahlungPhotons=True, BremsstrahlungPhotonsEnergyCut=10.0)
42 
43 # output
44 main.add_module("RootOutput", outputFileName="EvtGenSimNoBkgYesBrems.root")
45 
46 # run it
47 process(main)
48 
49 # Print call statistics
50 print(statistics)