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