community:hepsim:usage_truth
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
community:hepsim:usage_truth [2016/04/28 15:32] – old revision restored (2016/04/28 10:21) asc | community:hepsim:usage_truth [2016/11/04 19:23] (current) – [Converting to LCIO] asc | ||
---|---|---|---|
Line 303: | Line 303: | ||
| | ||
- | + | Please look at HepSim | |
- | ====== Supported languages ====== | + | |
- | + | ||
- | * C++/ROOT | + | |
- | * CPython | + | |
- | * Java | + | |
- | * Jython (Python on the Java platform) | + | |
- | * Groovy | + | |
- | * 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:// | + | |
- | 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 | + | |
- | Please look at [[community: | + | |
- | + | ||
- | ===== Using C++ ===== | + | |
Please refer [[asc: | Please refer [[asc: | ||
Line 344: | Line 315: | ||
</ | </ | ||
Read " | Read " | ||
- | |||
- | ===== Using CPython ===== | ||
- | |||
- | |||
- | Use the example above to generate CPython code to read data. | ||
- | This is documentation for CPython approach | ||
- | |||
- | |||
- | * [[http:// | ||
- | * [[http:// | ||
- | |||
- | |||
- | Read the description of [[http:// | ||
- | |||
Line 373: | Line 330: | ||
./ | ./ | ||
</ | </ | ||
+ | |||
+ | ====== Converting to LCIO ====== | ||
+ | |||
+ | ProMC files can be converted to LCIO files for full detector simulations. | ||
+ | |||
+ | <code bash> | ||
+ | wget http:// | ||
+ | tar -zvxf ProMC.tgz | ||
+ | cd examples/ | ||
+ | source setup.sh | ||
+ | javac promc2lcio.java | ||
+ | java promc2lcio file.promc file.slcio | ||
+ | </ | ||
+ | The last commends creates | ||
+ | |||
+ | |||
+ | ====== Converting to other formats ====== | ||
+ | Look at other directories in " | ||
+ | ====== Extracting events | ||
+ | |||
+ | A file can be reduced in size by extracting N events as this: | ||
+ | |||
+ | < | ||
+ | hs-extract signal.promc N | ||
+ | </ | ||
+ | where signal.promc is the original file, and N is the number of events to extract. | ||
+ | |||
+ | ====== Comparing MC and data ====== | ||
+ | |||
+ | HepSim maintains analysis scripts that can be used for comparing Monte Carlo simulations with data from [[http:// | ||
+ | For example, click the link with [[http:// | ||
+ | * Navigate to " | ||
+ | * Start DMelt if you did not yet, and select [File]-[Read script from URL]. Copy and paster the URL link from the HepData database | ||
+ | * Click " | ||
+ | |||
+ | HepData maintain Jython scripts that use the same syntax as HepSim. You can start from a HepSim validation script, and before the " | ||
+ | the scripts with data from [[http:// | ||
Line 412: | Line 406: | ||
</ | </ | ||
</ | </ | ||
+ | |||
+ | ====== Programming with HepSim ====== | ||
+ | |||
+ | |||
+ | |||
+ | Please look at the [[community: | ||
Send comments to: --- // | Send comments to: --- // |
community/hepsim/usage_truth.1461857536.txt.gz · Last modified: 2016/04/28 15:32 by asc