Belle II Software development
PhokharaEvtgenGenerate.py
1#!/usr/bin/env python3
2
3
10
11"""
12<header>
13 <output>PhokharaEvtgenData.root</output>
14 <contact>Kirill Chilikin (K.A.Chilikin@inp.nsk.su)</contact>
15 <description>Generation of 25000 e+ e- -> J/psi eta_c events.</description>
16</header>
17"""
18
19import basf2
20import generators
21from ROOT import Belle2
22
23# Logging level.
24basf2.set_log_level(basf2.LogLevel.INFO)
25
26# Random seed.
27basf2.set_random_seed(12345)
28
29# Create the main path.
30main = basf2.create_path()
31
32# Event information
33main.add_module("EventInfoSetter", expList=0, runList=1, evtNumList=25000)
34
35# Add combination of PHOKHARA and EvtGen.
36user_decay_file_name = 'generators/examples/PhokharaEvtgenDoubleCharmonium.dec'
37user_decay_file = Belle2.FileSystem.findFile(user_decay_file_name)
39 main, ['J/psi', 'eta_c'], user_decay_file, beam_energy_spread=False)
40
41# Output.
42output = basf2.register_module('RootOutput')
43output.param('outputFileName', 'PhokharaEvtgenData.root')
44main.add_module(output)
45
46# Progress.
47main.add_module('Progress')
48
49# Generate events.
50basf2.process(main)
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...
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='')