Belle II Software development
PhokharaEvtgenDoubleCharmonium.py
1#!/usr/bin/env python3
2
3
10
11
21
22import basf2
23import beamparameters
24import generators
25
26# Set the global log level.
27basf2.set_log_level(basf2.LogLevel.INFO)
28
29main = basf2.create_path()
30
31main.add_module("EventInfoSetter", expList=0, runList=1, evtNumList=100)
32
33# Beam parameters.
35
36# PHOKHARA and EvtGen.
37decay_file = basf2.find_file('generators/examples/PhokharaEvtgenDoubleCharmonium.dec')
39 main, ['J/psi', 'eta_c'], decay_file, beam_energy_spread=True)
40
41# Output.
42output = basf2.register_module('RootOutput')
43output.param('outputFileName', 'phokhara_evtgen_double_charmonium.root')
44main.add_module(output)
45
46# Print MC particles.
47main.add_module('PrintMCParticles', logLevel=basf2.LogLevel.DEBUG, onlyPrimaries=False)
48
49# Progress.
50main.add_module('Progress')
51
52# Generate events.
53basf2.process(main)
54
55# show call statistics
56print(basf2.statistics)
def add_beamparameters(path, name, E_cms=None, **argk)
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:676