User Tools

Site Tools


asc:promc:introduction

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
asc:promc:introduction [2014/05/21 01:09]
asc [Using C++ to write/read ProMC]
asc:promc:introduction [2017/03/22 11:29] (current)
asc [Available ProMC commands]
Line 82: Line 82:
  
 {{:asc:promc:sizereduction.png?500|}} {{:asc:promc:sizereduction.png?500|}}
- 
- 
- 
- 
- 
- 
- 
- 
- 
  
  
Line 130: Line 121:
 There are a few files used to create and read ProMC files: There are a few files used to create and read ProMC files:
  
-  * The description message is [[http://atlaswww.hep.anl.gov/asc/WebSVN/filedetails.php?repname=ProMC&path=%2FProMC%2Ftrunk%2Fproto%2Fpromc%2FProMCDescription.proto|ProMCDescription.proto]] +  * The description message is [[https://github.com/Argonne-National-Laboratory/ProMC/tree/master/proto/promc/ProMCDescription.proto|ProMCDescription.proto]] 
-  * The header of the file record is  [[http://atlaswww.hep.anl.gov/asc/WebSVN/filedetails.php?repname=ProMC&path=%2FProMC%2Ftrunk%2Fproto%2Fpromc%2FProMCHeader.proto|ProMCHeader.proto]]. Typically the header file created before the main loop ever events. +  * The header of the file record is  [[https://github.com/Argonne-National-Laboratory/ProMC/tree/master/proto/promc/ProMCHeader.proto|ProMCHeader.proto]]. Typically the header file created before the main loop ever events. 
-  * The MC event record (repeatable) [[http://atlaswww.hep.anl.gov/asc/WebSVN/filedetails.php?repname=ProMC&path=%2FProMC%2Ftrunk%2Fproto%2Fpromc%2FProMC.proto|ProMC.proto]] +  * The MC event record (repeatable) [[https://github.com/Argonne-National-Laboratory/ProMC/tree/master/proto/promc/ProMC.proto|ProMC.proto]] 
-  * The statistics of the generated events is stored in  [[http://atlaswww.hep.anl.gov/asc/WebSVN/filedetails.php?repname=ProMC&path=%2FProMC%2Ftrunk%2Fproto%2Fpromc%2FProMCStat.proto|ProMCStat.proto]]. This record is inserted last, after a MC accumulated statistics and final cross section calculation. +  * The statistics of the generated events is stored in  [[https://github.com/Argonne-National-Laboratory/ProMC/tree/master/proto/promc/ProMCStat.proto|ProMCStat.proto]]. This record is inserted last, after a MC accumulated statistics and final cross section calculation. 
  
 These are the files that are shipped with the default installation and suitable to keep truth MC information. A more complicated data layouts are given in examples/proto directory (to keep jets, leptons, jets with constituents etc.). These are the files that are shipped with the default installation and suitable to keep truth MC information. A more complicated data layouts are given in examples/proto directory (to keep jets, leptons, jets with constituents etc.).
Line 163: Line 154:
 |   promc_code                       | generates source files using "proto" directory. C++ code is generated in the directory src/, while Java code in the directory java/src | |   promc_code                       | generates source files using "proto" directory. C++ code is generated in the directory src/, while Java code in the directory java/src |
 |   promc_log <file>                 | extracts the log file "logfile.txt" (if attached to the ProMC file) | |   promc_log <file>                 | extracts the log file "logfile.txt" (if attached to the ProMC file) |
-|   hepmc2promc <HEPMC input>  <ProMC output> "description"               | converts HepMC file to ProMC file | 
-|   promc2hepmc <ProMC input>  <HepMC output>                | converts ProMC file to HEPMC file | 
-|   stdhep2promc <StdHEP input>  <ProMC output>                | converts StdHEP file to ProMC file | 
 |   promc_split <ProMC file>  N   | splits a ProMC files into N files in the directory "out" | |   promc_split <ProMC file>  N   | splits a ProMC files into N files in the directory "out" |
  
Line 212: Line 200:
  
 <code bash> <code bash>
-wget http://mc.hep.anl.gov/asc/snowmass2013/delphes36/promc/MadGraph5Pythia_wjets/MadGraph5Pythia_wjets_mu0.promc +wget http://atlaswww.hep.anl.gov/asc/promc/download/Pythia8.promc  
-unzip -l MadGraph5Pythia_wjets_mu0.promc+unzip -l Pythia8.promc
 </code> </code>
  
-You can uncompress events into files as "unzip MadGraph5Pythia_wjets_mu0.promc". You can extract any event, say event "100", as:+You can uncompress events into files as "unzip Pythia8.promc". You can extract any event, say event "100", as:
  
 <code bash> <code bash>
-unzip -p MadGraph5Pythia_wjets_mu0.promc 100 > 100.event +unzip -p Pythia8.promc 100 > 100.event 
-unzip -p MadGraph5Pythia_wjets_mu0.promc  ProMC.proto  > ProMC.proto+unzip -p Pythia8.promc ProMC.proto  > ProMC.proto
 </code> </code>
 This example  saves the event "100" in a file "100.events". The second line extract ProtocolBuffer template used to pack the event into the file This example  saves the event "100" in a file "100.events". The second line extract ProtocolBuffer template used to pack the event into the file
Line 228: Line 216:
 <code bash> <code bash>
 unzip -p <ProMC file>  logfile.txt  unzip -p <ProMC file>  logfile.txt 
-unzip -p <ProMC file>  promc_nevent +unzip -p <ProMC file>  promc_nevents 
 </code> </code>
  
-In these examples, we send the contents of the files "logfile.txt" and "promc\_nevent" via pipe into shell console.+In these examples, we send the contents of the files "logfile.txt" and "promc\_nevents" via pipe into shell console.
  
  
Line 242: Line 230:
 |   stdhep2promc <StdHEP input>  <ProMC output>                | converts StdHEP file to ProMC file | |   stdhep2promc <StdHEP input>  <ProMC output>                | converts StdHEP file to ProMC file |
 |   promc2root <ProMC input>  <ProMC output>                | converts ProMC file to ROOT | |   promc2root <ProMC input>  <ProMC output>                | converts ProMC file to ROOT |
 +|   promc2stdhep <ProMC input>  <STDHEP output>                | converts ProMC file to STDHEP |
 +|   promc2lcio <ProMC input>  <LCIO output>                | converts ProMC file to LCIO |
 +|   lhe2promc <LHE input>  <ProMC output>                | converts LHEF (TXT) file with MC events to ProMC |
 +|   txt2promc <TXT input>  <ProMC output>                | converts TXT file with MC events to ProMC |
 +| java -cp .:browser_promc.jar hepsim.MixPileup pN signal.promc minbias.promc output.promc | Pileup mixer. Mix N random events using a Poisson distribution with signal events |
  
 Note that the conversion tools (hepmc2promc,promc2hepmc) are build during the installation (see the installation instruction). Note that the conversion tools (hepmc2promc,promc2hepmc) are build during the installation (see the installation instruction).
Line 474: Line 467:
 The Java API of the part which access info inside the ProMC files is [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/index.html| here]]. But you only need a few classes if you use the default data layout shipped with the ProMC. The Java API of the part which access info inside the ProMC files is [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/index.html| here]]. But you only need a few classes if you use the default data layout shipped with the ProMC.
  
 +  * [[http://atlaswww.hep.anl.gov/asc/promc/hepsim/doc/api/ | HepSim API]] for FileMC, FileNLO and browser.
   * [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/promc/io/ProMCDescriptionFile.ProMCDescription.html| ProMCDescription]] - description   * [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/promc/io/ProMCDescriptionFile.ProMCDescription.html| ProMCDescription]] - description
   * [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/promc/io/ProMCHeaderFile.ProMCHeader.html|ProMCHeader]] header information (beginning of file)   * [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/promc/io/ProMCHeaderFile.ProMCHeader.html|ProMCHeader]] header information (beginning of file)
Line 480: Line 474:
   * [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/promc/io/ProMCStatFile.ProMCStat.html| ProMCStat]]  - statistics info (end of file)   * [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/promc/io/ProMCStatFile.ProMCStat.html| ProMCStat]]  - statistics info (end of file)
  
-If you create a different data layout, you can generate Jabva API yourself.+If you create a different data layout, you can generate Java API yourself.
  
  
Line 523: Line 517:
   * Use [[http://root.cern.ch/ | ROOT ]] classes and methods if you read data in C++   * Use [[http://root.cern.ch/ | ROOT ]] classes and methods if you read data in C++
   * Use  [[http://root.cern.ch/ | ROOT ]] classes and methods if you read data in Python. Use PyROOT. You can also use any other visualization  framework in Python, such as [[http://matplotlib.org/|MatPlotLib]]   * Use  [[http://root.cern.ch/ | ROOT ]] classes and methods if you read data in Python. Use PyROOT. You can also use any other visualization  framework in Python, such as [[http://matplotlib.org/|MatPlotLib]]
-  * Use [[http://jwork.org/scavis ScaVis]] classes and methods if you read data using Java +  * Use [[http://jwork.org/dmelt/ |DataMelt]] classes and methods if you read data using Java 
-  * Use [[http://jwork.org/scavis ScaVis]] classes and methods if you read data using [[http://www.jython.org/| Jython]] (Python implemented in Java)+  * Use [[http://jwork.org/dmelt/ |DatMelt]] classes and methods if you read data using [[http://www.jython.org/| Jython]] (Python implemented in Java)
  
  
Line 653: Line 647:
 ProMC is a rewrite of an older package (CBook)  ProMC is a rewrite of an older package (CBook) 
 for the community supported [[http://jwork.org/jhepwork/|jHepWork]]. for the community supported [[http://jwork.org/jhepwork/|jHepWork]].
-Currently, this program has the name [[http://jwork.org/scavis/|SCaVis]].  The current ProMC version is based on HEvent record format [[http://jwork.org/scavis/examplesHEP/|Examples]] and zipious++ library which was first publicly available since  2008.  (S.C.).+Currently, this program has the name [[http://jwork.org/dmelt/|DataMelt]].  The current ProMC version is based on HEvent record format [[http://jwork.org/scavis/examplesHEP/|Examples]] and zipious++ library which was first publicly available since  2008.  (S.C.).
  
  
Line 704: Line 698:
  
   * S.V.Chekanov, "Next generation input-output data format for HEP using Google's protocol buffers",  ANL-HEP-CP-13-32, Snowmass 2013 Proceedings. [[http://arxiv.org/abs/1306.6675| arxiv.org:1306.6675]]   * S.V.Chekanov, "Next generation input-output data format for HEP using Google's protocol buffers",  ANL-HEP-CP-13-32, Snowmass 2013 Proceedings. [[http://arxiv.org/abs/1306.6675| arxiv.org:1306.6675]]
-  * S.V. Chekanov, E.May, K. Strand, P. Van Gemmeren, ProMC: Input-output data format for HEP applications using varint encoding, ANL-HEP-PR-13-41 [[http://arxiv.org/abs/1311.1229|  arXiv:1311.1229]]+  * S.V. Chekanov, E.May, K. Strand, P. Van Gemmeren, ProMC: Input-output data format for HEP applications using varint encoding, ANL-HEP-PR-13-41 [[http://arxiv.org/abs/1311.1229|  arXiv:1311.1229]]. Computer Physics Communications 185 (2014), pp. 2629-2635
  
  
-   +Bibtex entry: 
 +<code> 
 +@article{Chekanov20142629, 
 +title = "ProMC: Input–output data format for \{HEP\} applications using varint encoding ", 
 +journal = "Computer Physics Communications ", 
 +volume = "185", 
 +number = "10", 
 +pages = "2629 - 2635", 
 +year = "2014", 
 +note = "", 
 +issn = "0010-4655", 
 +doi = "http://dx.doi.org/10.1016/j.cpc.2014.06.016", 
 +url = "http://www.sciencedirect.com/science/article/pii/S0010465514002215", 
 +author = "S.V. Chekanov and E. May and K. Strand and P. Van Gemmeren", 
 +keywords = "Data", 
 +keywords = "Format", 
 +keywords = "\{IO\}", 
 +keywords = "Input–output", 
 +keywords = "\{LHC\} ", 
 +abstract = "Abstract A new data format for Monte Carlo (MC) events, or any structural data, including experimental data, is discussed. The format is designed to store data in a compact binary form using variable-size integer encoding as implemented in the Google’s Protocol Buffers package. This approach is implemented in the ProMC library which produces smaller file sizes for \{MC\} records compared to the existing input–output libraries used in high-energy physics (HEP). Other important features of the proposed format are a separation of abstract data layouts from concrete programming implementations, self-description and random access. Data stored in ProMC files can be written, read and manipulated in a number of programming languages, such C++, JAVA, \{FORTRAN\} and PYTHON. " 
 +
 + 
 +</code>
  
  
asc/promc/introduction.1400634563.txt.gz · Last modified: 2014/05/21 01:09 by asc