User Tools

Site Tools


community:hepsim:usage_truth

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
community:hepsim:usage_truth [2016/04/28 18:13]
asc [Extracting events]
community:hepsim:usage_truth [2016/11/04 19:23] (current)
asc [Converting to LCIO]
Line 303: Line 303:
      
  
- +Please look at HepSim [[community:hepsim:usage_truth|programming tutorials]] on how to design Jython scripts.
-====== Supported languages ====== +
- +
-  * C++/ROOT +
-  * CPython  (Python implemented in C++) or PyROOT +
-  * Java +
-  * Jython (Python on the Java platform) +
-  * Groovy  (scripting language) +
-  * BeanShell (scripting language) +
-  * JRuby (Ruby on the Java platform) +
- +
- +
-Some variations of the Java languages are also possible (such as Scala). For all Java-derived languages, see the [[http://jwork.org/dmelt/ | DatMelt]] project. +
-The Android platform has a limited support (but the files should be readable on Android).  +
- +
- +
-Although all example scripts are based on the Python language, the actual implementation of the validation online scripts is done in Jython (Java). +
-You can program in Java as well. C++/CPython will be discussed later. +
- +
- +
- +
- +
- +
-===== Using Jython ===== +
- +
-Jython and Java are chosen  to write validation scripts and to run such scripts using web pages. +
-Please look at [[community:refhepsim_analysisHepSim Analysis Primer]] manual. +
- +
-===== Using C++ ===== +
 Please refer [[asc:promc| ProMC web page]] on how to read/write ProMC files. Please refer [[asc:promc| ProMC web page]] on how to read/write ProMC files.
  
Line 344: Line 315:
 </code> </code>
 Read "README" inside this directory. Do not forget to populate the directory "data" with MC files before running this example. Read "README" inside this directory. Do not forget to populate the directory "data" with MC files before running this example.
- 
-===== Using CPython ===== 
- 
- 
-Use the example above to generate CPython code to read data. 
-This is documentation for CPython approach 
- 
- 
-      * [[http://atlaswww.hep.anl.gov/asc/promc/doc/cpython_promc/html/index.html | annotated classes]] - for complete MC event records 
-      * [[http://atlaswww.hep.anl.gov/asc/promc/doc/cpython_pronlo/html/index.html | annotated classes]] - for NLO event records 
- 
- 
-Read the description of [[http://atlaswww.hep.anl.gov/asc/promc/ | ProMC format]] about how to generate CPython code. 
- 
  
  
Line 374: Line 331:
 </code> </code>
  
 +====== Converting to LCIO ======
  
 +ProMC files can be converted to LCIO files for full detector simulations.  This is an example of such conversion (it requires Java installed):
 +
 +<code bash>
 +wget http://atlaswww.hep.anl.gov/asc/promc/download/current.php -O ProMC.tgz
 +tar -zvxf ProMC.tgz
 +cd examples/promc2lcio
 +source setup.sh
 +javac promc2lcio.java
 +java promc2lcio file.promc file.slcio
 +</code>
 +The last commends creates  file.slcio with "MCparticle" container. 
 +
 +
 +====== Converting to other formats ======
 +Look at other directories in "examples/". You can convert ProMC files to many other formats (most converters require  installation of the ProMC C++ package).
 ====== Extracting events  ====== ====== Extracting events  ======
  
Line 433: Line 406:
 </code> </code>
 </hidden> </hidden>
 +
 +====== Programming with HepSim ======
 +
 +
 +
 +Please look at the [[community:hepsim:usage_truth|tutorials]] which show how to create Python/Jython scripts to read ProMC files. 
  
  Send comments to:  --- //[[[email protected]|Sergei Chekanov (ANL)]] 2016/02/08 10:26//  Send comments to:  --- //[[[email protected]|Sergei Chekanov (ANL)]] 2016/02/08 10:26//
community/hepsim/usage_truth.1461867228.txt.gz · Last modified: 2016/04/28 18:13 by asc