Belle II Software  release-08-01-10
PairConversions.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 """
13 This script saves e+ or e- from photon conversions into a pair in MCParticles.
14 
15 Saves 100 EvtGen events + secondary e+ or e- from pair conversions created by Geant4 in MCParticles.
16 The corresponding secondaryPhysicsProcess ID is 14, which is defined as fGammaConversion 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 e+ or e- from pair conversions with kinetic energy > 10.0 MeV.
36 main.add_module("FullSim", StorePairConversions=True, PairConversionsEnergyCut=10.0)
37 
38 # output
39 main.add_module("RootOutput", outputFileName="EvtGenSimNoBkgYesPairConversions.root")
40 
41 # run it
42 b2.process(main)
43 
44 # Print call statistics
45 print(b2.statistics)