Belle II Software  release-05-01-25
PairConversions.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 """
5 This script saves e+ or e- from photon conversions into a pair in MCParticles.
6 
7 <header>
8  <contact>dorisykim@ssu.ac.kr</contact>
9  <description>
10  Saves 100 EvtGen events + secondary e+ or e- from pair conversions created by Geant4 in MCParticles.
11  The corresponding secondaryPhysicsProcess ID is 14, which is defined as fGammaConversion 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 # as well as the simulation, saving e+ or e- from pair conversions with kinetic energy > 10.0 MeV.
33 main.add_module("FullSim", StorePairConversions=True, PairConversionsEnergyCut=10.0)
34 
35 # output
36 main.add_module("RootOutput", outputFileName="EvtGenSimNoBkgYesPairConversions.root")
37 
38 # run it
39 process(main)
40 
41 # Print call statistics
42 print(statistics)