User Tools

Site Tools


asc:promc:examples

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
asc:promc:examples [2014/10/14 18:51]
asc
asc:promc:examples [2015/03/20 01:16]
asc [Default data layouts]
Line 6: Line 6:
 (written by S.Chekanov, ANL) (written by S.Chekanov, ANL)
  
-ProMC binary files are very compact and self-describing files, typically 30-50% smaller than   ROOT files or gzipped HEPMC files due to variable-byte encoding (small numbers use smaller number of bytes). Look at the examples below which show how to write,read, browser and convert HEPMC files+ProMC files are compact and self-describing binary files, typically 30-50% smaller than   ROOT files or gzipped HEPMC files due to the use of a variable-byte encoding (small numbers use smaller number of bytes). They can be processed in C++, Java, Python and other languages. Look at the examples below which show how to write,read, browser and convert HEPMC files
 to ProMC files. More information is in the [[asc:promc:introduction|Introduction]]. Since ProMC is the main format for [[http://atlaswww.hep.anl.gov/hepsim/| HepSim]], check the description of that database. to ProMC files. More information is in the [[asc:promc:introduction|Introduction]]. Since ProMC is the main format for [[http://atlaswww.hep.anl.gov/hepsim/| HepSim]], check the description of that database.
  
Line 33: Line 33:
 Look at the Python examples discussed bellow how to  use a random access via the network. Look at the Python examples discussed bellow how to  use a random access via the network.
  
 +
 +Note that the browser can open ProMC files of any size, since it loads only a fraction of data. This is especially useful compared to limitations
 +of some formats that cannot be viewed in text editors if their sizes are too large.
  
  
Line 59: Line 62:
 </code> </code>
  
-If you already know that your files includes a parton-shower MC information, look at the examples:+If you already know that your file include information from typical parton-shower Monte Carlo model, look at the example:
  
 <code bash> <code bash>
 $PROMC/examples/reader_mc  $PROMC/examples/reader_mc 
 </code> </code>
-that reads ProMC (and links libpromc.a library).+that reads ProMC file. The makefile links "libpromc.alibrary which describes the event structure.
  
-If you know that stored data are NLO, looks at the reader in:+If you know that stored data are from a NLO program, looks at:
  
 <code bash> <code bash>
 $PROMC/examples/reader_nlo $PROMC/examples/reader_nlo
 </code> </code>
-that links libpronlo.a library+that links the "libpronlo.alibrary describing a typical NLO record.
  
-ProMC files are self-describing, therefore you can read any type of data. +ProMC files are self-describing, therefore you can read and write any type of data and generate static libraries from platform-neutral templates
 You can generate  analysis codes in C++, Java, Python  You can generate  analysis codes in C++, Java, Python 
 if you happen to have a ProMC file but do not know how the data are organized inside the file. You need to install [[asc:promc:installation|ProMC]]. if you happen to have a ProMC file but do not know how the data are organized inside the file. You need to install [[asc:promc:installation|ProMC]].
Line 209: Line 212:
 The example given in the directory "examples/root" shows how to fill ROOT tree from ProMC record. We assume that the file "output.promc" from the previous example was already created. Go to " examples/root" and type "make" (ROOT should be installed). Then dump the ProMC record to the ROOT  Tree file. We assume that 4-momenta is written as "Double32_t"  (written as a 4 bytes floats). The output file will be found "out/output.root" The example given in the directory "examples/root" shows how to fill ROOT tree from ProMC record. We assume that the file "output.promc" from the previous example was already created. Go to " examples/root" and type "make" (ROOT should be installed). Then dump the ProMC record to the ROOT  Tree file. We assume that 4-momenta is written as "Double32_t"  (written as a 4 bytes floats). The output file will be found "out/output.root"
  
- 
-===== Benchmark summary   ===== 
- 
-Here is a comparison of file sizes for the same event records written by "examples/random/out/output.promc". The benchmarks is done using examples from  "examples" directory 
- 
- 
-^   File format                          ^  Size (MB) ^ 
-|   ASCII TXT file  ("HEPMC"           |  346       | 
-|   gzipped ASCII TXT file                138       | 
-|   ROOT tree (Double32_t)                158       | 
-|   ProMC                                |  112       | 
- 
- 
-As one can see,  the ProMC files are 40% more compact than the equivalent ROOT files and 23% more compact than gzipped ASCII TXT ("HEPMC"). 
  
  
Line 253: Line 242:
 </code> </code>
  
-An example program which fills ProMC file record is given here  +An example program which fills ProMC file record is given in 
-[[http://atlaswww.hep.anl.gov/asc/WebSVN/filedetails.php?repname=ProMC&path=%2FProMC%2Ftrunk%2Fexamples%2Fpythia%2Fwriter_pythia.cc|writer_pythia.cc]]. The make file is located here [[http://atlaswww.hep.anl.gov/asc/WebSVN/filedetails.php?repname=ProMC&path=%2FProMC%2Ftrunk%2Fexamples%2Fpythia%2FMakefile|Makefile]]+[[https://github.com/Argonne-National-Laboratory/ProMC/blob/master/examples/pythia/|Pythia8 to ProMC example]] 
  
  
Line 475: Line 464:
  
  
-  - [[http://atlaswww.hep.anl.gov/asc/WebSVN/filedetails.php?repname=ProMC&path=%2FProMC%2Ftrunk%2Fproto%2Fpromc%2FProMC.proto|ProMC.proto]] - This is simplest data layout to keep only truth particle information. It is shipped with the default ProMC installation. +  - [[https://github.com/Argonne-National-Laboratory/ProMC/tree/master/proto/promc|ProMC record]] - This is simplest data layout to keep only truth particle information. It is shipped with the default ProMC installation. 
-  - [[http://atlaswww.hep.anl.gov/asc/WebSVN/filedetails.php?repname=ProMC&path=%2FProMC%2Ftrunk%2Fexamples%2Fproto%2Fdelphes%2FProMC.proto | ProMC.proto for Delphes]] - This is a more complicated data layout suitable for data and reconstructed MC. It shows how to include reconstructed objects (jets,photons, muons)+  - [[https://github.com/Argonne-National-Laboratory/ProMC/tree/master/proto/proreco | ProMC for Delphes]] - This is a more complicated data layout suitable for data and reconstructed MC. It shows how to include reconstructed objects (jets,photons, muons)
   - [[http://atlaswww.hep.anl.gov/asc/WebSVN/filedetails.php?repname=ProMC&path=%2FProMC%2Ftrunk%2Fexamples%2Fproto%2Fdelphes_constituents%2FProMC.proto | ProMC.proto for Delphes plus jet constituents]] - This is more complicated layout. It shows how to include clusters (jet constituents) for each jet   - [[http://atlaswww.hep.anl.gov/asc/WebSVN/filedetails.php?repname=ProMC&path=%2FProMC%2Ftrunk%2Fexamples%2Fproto%2Fdelphes_constituents%2FProMC.proto | ProMC.proto for Delphes plus jet constituents]] - This is more complicated layout. It shows how to include clusters (jet constituents) for each jet
 +  - [[https://github.com/Argonne-National-Laboratory/ProMC/tree/master/proto/pronlo|ProMC NLO record]] - This is a data layout to keep NLO calculations 
 +   
 +   
 More complex layout files (for example, foe Delphes fast simulation) can be found More complex layout files (for example, foe Delphes fast simulation) can be found
 inside the directory "examples/" inside the directory "examples/"
asc/promc/examples.txt · Last modified: 2015/05/10 21:08 by asc