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:31] – asc | community:hepsim:usage_truth [2016/11/04 19:23] (current) – [Converting to LCIO] asc | ||
---|---|---|---|
Line 17: | Line 17: | ||
platform (Linux, Mac, Windows) and does not require installation of any platform-specific program. | platform (Linux, Mac, Windows) and does not require installation of any platform-specific program. | ||
As before, make sure that [[http:// | As before, make sure that [[http:// | ||
- | |||
===== Method I. Running in a batch mode without downloaded ProMC files ===== | ===== Method I. Running in a batch mode without downloaded ProMC files ===== | ||
Line 304: | 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 345: | 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 374: | 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 414: | Line 407: | ||
</ | </ | ||
- | ====== | + | ====== |
- | This [[community: | + | Please look at the [[community: |
Send comments to: --- // | Send comments to: --- // |
community/hepsim/usage_truth.1461857509.txt.gz · Last modified: 2016/04/28 15:31 by asc