Belle II Software  release-08-01-10
Belle2PhyslistTestBrems.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 """
13 This script is based on BremsstralungPhotons.py and was developed to test Belle2PhysicsList.
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 # Invoke Belle2 physics list instead of Geant4 reference physics list.
36 # New options StandardEM, UseHighPrecisionNeutrons have been added.
37 # Otherwise, same collection of bremsstrahlung photons with kinetic
38 # energy > 10.0 MeV.
39 main.add_module("FullSim", PhysicsList="Belle2", RunEventVerbosity=0,
40  RegisterOptics=False,
41  # StandardEM=True,
42  # UseHighPrecisionNeutrons=True,
43  # ProductionCut=0.07,
44  StoreBremsstrahlungPhotons=True, BremsstrahlungPhotonsEnergyCut=10.0)
45 
46 # output
47 main.add_module("RootOutput", outputFileName="EvtGenSimNoBkgYesBrems.root")
48 
49 # run it
50 b2.process(main)
51 
52 # Print call statistics
53 print(b2.statistics)