Belle II Software  release-08-01-10
PhokharaEvtgenGenerate.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 """
5 <header>
6  <output>PhokharaEvtgenData.root</output>
7  <contact>Kirill Chilikin (K.A.Chilikin@inp.nsk.su)</contact>
8  <description>Generation of 25000 e+ e- -> J/psi eta_c events.</description>
9 </header>
10 """
11 
12 import basf2
13 import generators
14 from ROOT import Belle2
15 
16 # Logging level.
17 basf2.set_log_level(basf2.LogLevel.INFO)
18 
19 # Random seed.
20 basf2.set_random_seed(12345)
21 
22 # Create the main path.
23 main = basf2.create_path()
24 
25 # Event information
26 main.add_module("EventInfoSetter", expList=0, runList=1, evtNumList=25000)
27 
28 # Add combination of PHOKHARA and EvtGen.
29 user_decay_file_name = 'generators/examples/PhokharaEvtgenDoubleCharmonium.dec'
30 user_decay_file = Belle2.FileSystem.findFile(user_decay_file_name)
32  main, ['J/psi', 'eta_c'], user_decay_file, beam_energy_spread=False)
33 
34 # Output.
35 output = basf2.register_module('RootOutput')
36 output.param('outputFileName', 'PhokharaEvtgenData.root')
37 main.add_module(output)
38 
39 # Progress.
40 main.add_module('Progress')
41 
42 # Generate events.
43 basf2.process(main)
44 
45 # Show call statistics.
46 print(basf2.statistics)
static std::string findFile(const std::string &path, bool silent=false)
Search for given file or directory in local or central release directory, and return absolute path if...
Definition: FileSystem.cc:148
def add_phokhara_evtgen_combination(path, final_state_particles, user_decay_file, beam_energy_spread=True, isr_events=False, min_inv_mass_vpho=0.0, max_inv_mass_vpho=0.0, eventType='')
Definition: generators.py:679