This example shows how to write event records using PYTHIA 8 Monte Carlo and read events back using Jython or Java.
- Install Pythia 8.1. Go to the "example" directory and make sure that the example "main02.cc" can be compiled. Install Protocol Buffers library and untar CBook in the "example" directory. Compile CBook library (cd CBook/cmd; make). This creates a library CBook/lib/libcbook.a inside the "example" directory. Link this library in the "Makefile" of PYTHIA examples and make modifications in the file main02.cc as shown below. In addition, one should specify several include directories as in the example Makefile linked below.
- After compilation, run the executable "main02.exe". This creates a file main02.nbu with compressed PYTHIA events.
- Read events using the Jython script efile_read.py. Uncomment the line which prints particle characteristics. Rewrite this example using Java syntax if you need to write a Java application.
Warning: Undefined variable $list in /home4/jworkorg/public_html/scavis/examplesHEP/pythia_record/download.php on line 41
Download examples
Example file | size (KB) | Date |
---|---|---|
main02.nbu | 2687.22 KB | 09/05/2013 22:52:53 |
main02.cc | 2.36 KB | 09/05/2013 22:52:50 |
efile_read.py | 0.69 KB | 09/05/2013 22:52:50 |
Makefile | 2.76 KB | 09/05/2013 22:52:50 |