Belle II Software  release-05-01-25
test0_LowMassTwoTrackPions.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 # Descriptor: e+e- --> pi+pi-(ISR)
4 
5 """
6 <header>
7  <output>../LowMassTwoTrackPions.dst.root</output>
8  <contact>zhouxy@buaa.edu.cn</contact>
9 </header>
10 """
11 
12 import basf2
13 from simulation import add_simulation
14 from reconstruction import add_reconstruction, add_mdst_output
15 
16 # Set the global log level
17 basf2.set_log_level(basf2.LogLevel.INFO)
18 
19 main = basf2.create_path()
20 
21 main.add_module("EventInfoSetter", expList=0, runList=1, evtNumList=10000)
22 
23 # ---------- Register the PHOKHARA module ----------
24 phokhara = basf2.register_module('PhokharaInput')
25 
26 # Set the logging level for the PHOKHARA module to INFO in order to see the cross sections etc.
27 phokhara.set_log_level(basf2.LogLevel.INFO)
28 
29 # Set the parameter file (EXPERTS ONLY!)
30 # phokhara.param('ParameterFile', 'test.dat')
31 
32 # Set the final state particles
33 # mu+mu-(0), pi+pi-(1), 2pi0pi+pi-(2), 2pi+2pi-(3), ppbar(4), nnbar(5), K+K-(6),
34 # K0K0bar(7), pi+pi-pi0(8), lamb(->pi-p)lambbar(->pi+pbar)(9), eta pi+ pi- (10)
35 phokhara.param('FinalState', 1)
36 
37 # soft photon cutoff, final result is indepedent of the cut off as long as its small (<1e-3)
38 # photon multiplicity (and exclusive cross sections depent on that parameter)
39 # EXPERTS ONLY
40 phokhara.param('Epsilon', 0.0001)
41 
42 # Events (weighted) to be used for maximum weight search before generation
43 phokhara.param('SearchMax', 5000)
44 
45 # Events (unweighted) before event loop is aborted
46 phokhara.param('nMaxTrials', 25000)
47 
48 # LO switch --> Born corresponds to 1 photon (0), Born corresponds to 0 photons (1), only Born: 0 photons (-1)
49 # original comment: ph0 Born: 1ph(0), Born: 0ph(1), only Born: 0ph(-1)
50 phokhara.param('LO', 0)
51 
52 # NLO switch --> only for LO=0: off(0), on(1)
53 # original comment: 1 photon : Born(0), NLO(1)
54 phokhara.param('NLO', 1)
55 
56 # QED corrections: ISR only(0), ISR+FSR(1), ISR+INT+FSR(2), if NLO=1 only 0 and 2 are possible
57 # original comment: ISR only(0), ISR+FSR(1), ISR+INT+FSR(2)
58 phokhara.param('QED', 0)
59 
60 # NLO options (only if NLO=1 and QED=2) - CODE RUNS VERY (!) SLOW
61 # original comment: IFSNLO: no(0), yes(1)
62 phokhara.param('NLOIFI', 0)
63 
64 # Vacuum polarization switch: off (0), on (1, [by Fred Jegerlehner, alphaQED/hadr5]), on (2,[by Thomas Teubner])
65 phokhara.param('Alpha', 0)
66 
67 # Pion FormFactor switch
68 # original comment: FF_pion: KS PionFormFactor(0),GS old (1),GS new (2)
69 phokhara.param('PionFF', 0)
70 
71 # Kaon FormFactor switch
72 # original comment: FF_kaon: KaonFormFactor constrained (0),KaonFormFactor unconstrained (1),KaonFormFactor old (2)
73 phokhara.param('KaonFF', 0)
74 
75 # Pion Structure
76 # original comment: for pi+pi- only: f0+f0(600): K+K- model(0), "no structure" model(1), no f0+f0(600)(2), f0 KLOE(3)
77 phokhara.param('PionStructure', 0)
78 
79 # Include narrow resonances (no Upsilon included yet!!!): no narrow resonances (0), j/psi (1) OR psi2s (2)
80 # original comment: narr_res: no narrow resonances (0), J/psi (1) and psi(2S) (2) only for pion = 0,1,6,7
81 phokhara.param('NarrowRes', 0)
82 
83 # Proton FormFactor switch
84 # original comment: FF_pp: ProtonFormFactor old(0), ProtonFormFactor new(1)
85 phokhara.param('ProtonFF', 1)
86 
87 # min/max angle of the photon
88 # original comment: minimal photon angle/missing momentum angle, maximal photon angle/missing momentum angle
89 phokhara.param('ScatteringAngleRangePhoton', [0., 180.])
90 
91 # min/max angle of the other final state particles
92 # original comment: minimal pions(muons,nucleons,kaons) angle, maximal pions(muons,nucleons,kaons) angle
93 phokhara.param('ScatteringAngleRangeFinalStates', [35., 145.])
94 
95 # Minimal hadrons/muons-gamma invariant mass squared [GeV^2]
96 # original comment: minimal hadrons(muons)-gamma-inv. mass squared
97 phokhara.param('MinInvMassHadronsGamma', 0.)
98 
99 # Minimal hadrons/muons invariant mass squared [GeV^2]
100 # original comment: minimal inv. mass squared of the hadrons(muons)
101 phokhara.param('MinInvMassHadrons', 0.01)
102 
103 # Maximal hadrons/muons invariant mass squared [GeV^2]
104 # original comment: maximal inv. mass squared of the hadrons(muons)
105 phokhara.param('MaxInvMassHadrons', 112.0)
106 
107 # Minimal photon energy/missing energy, must be larger than 0.01*(CMS energy) [GeV]
108 # original comment: minimal photon energy/missing energy
109 phokhara.param('MinEnergyGamma', 0.1058)
110 
111 # Create the main path and add the modules
112 main.add_module("Progress")
113 main.add_module(phokhara)
114 
115 # detector simulation
116 add_simulation(main)
117 
118 # reconstruction
119 add_reconstruction(main)
120 
121 # Finally add mdst output
122 output_filename = "../LowMassTwoTrackPions.dst.root"
123 add_mdst_output(main, filename=output_filename)
124 
125 # generate events
126 basf2.process(main)
127 
128 # show call statistics
129 print(basf2.statistics)
basf2.process
def process(path, max_event=0)
Definition: __init__.py:25