Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
hepsim:usage_truth [2017/02/07 21:51] 127.0.0.1 external edit |
hepsim:usage_truth [2020/05/22 02:48] (current) hepsim17 |
||
---|---|---|---|
Line 5: | Line 5: | ||
====== | ====== | ||
- | [[http:// | + | [[https:// |
- | to reconstruct | + | for plotting |
Many HepSim MC samples include *.py scripts to calculate differential cross sections. You can run | Many HepSim MC samples include *.py scripts to calculate differential cross sections. You can run | ||
them using downloaded ProMC files (in which case you pass the directory with *promc files as an argument). | them using downloaded ProMC files (in which case you pass the directory with *promc files as an argument). | ||
Line 12: | Line 12: | ||
In this case, data will be streamed to computer' | In this case, data will be streamed to computer' | ||
+ | You can create plots using a number of programming languages, Java, Python, C++, Ruby, Groovy etc. Plots can be done on any platform, without modifying your system. C++ analysis programs require ROOT and Linux. | ||
- | You can create plots using a number of programming languages, Java, Python, C++, Ruby, Groovy etc. Plots can be done on any platform, without modifying your system. C++ analysis programs require ROOT and Linux. | + | Below we will discuss how to analyse |
- | + | ||
- | Below we will discuss how to analyse | + | |
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 ===== | + | ====== Streaming over the network |
You can run validation scripts in a batch mode as: | You can run validation scripts in a batch mode as: | ||
<code bash> | <code bash> | ||
- | wget http:// | + | wget https:// |
hs-run ttbar_mg5.py | hs-run ttbar_mg5.py | ||
</ | </ | ||
- | Another approach is to use [[http:// | + | Another approach is to use [[https:// |
give more flexibility and more libraries for analysis. | give more flexibility and more libraries for analysis. | ||
- | In this example, we will run a Python script that downloads data from URL into the computer memory | + | In this example, we will run a Python script that downloads data from URL into the computer memory |
- | Here is how to process the analysis using [[http:// | + | Here is how to process the analysis using [[https:// |
<code bash> | <code bash> | ||
- | wget http:// | + | wget https:// |
tar -zvxf jas4pp.tgz | tar -zvxf jas4pp.tgz | ||
cd jas4pp | cd jas4pp | ||
source ./setup.sh # takes 5 sec for first-time optimization | source ./setup.sh # takes 5 sec for first-time optimization | ||
- | wget http:// | + | wget https:// |
fpad ttbar_mg5.py # process it in a batch mode. | fpad ttbar_mg5.py # process it in a batch mode. | ||
</ | </ | ||
Line 45: | Line 44: | ||
Look at the " | Look at the " | ||
- | Similarly, you can use a more complex [[http://jwork.org/ | + | Similarly, you can use a more complex [[https://datamelt.org|DataMelt]]: |
<code bash> | <code bash> | ||
wget -O dmelt.zip http:// | wget -O dmelt.zip http:// | ||
- | wget http:// | + | wget https:// |
unzip dmelt.zip | unzip dmelt.zip | ||
./ | ./ | ||
Line 59: | Line 58: | ||
</ | </ | ||
- | If you want to see a pop-up canvas with the output histogram on your screen, change the line " | + | If you want to see a pop-up canvas with the output histogram on your screen, change the line " |
- | ===== Method II. Running in a batch mode after downloading | + | |
+ | ====== Using Java WebStart ====== | ||
+ | |||
+ | |||
+ | Many " | ||
+ | |||
+ | To use Java Web Start, you should configure Java permissions: | ||
+ | |||
+ | |||
+ | ====== | ||
The above approach depends on network availability at the time when you do the analysis. | The above approach depends on network availability at the time when you do the analysis. | ||
Line 77: | Line 85: | ||
<code bash> | <code bash> | ||
- | wget http:// | + | wget https:// |
- | hs-get | + | hs-get |
./ | ./ | ||
</ | </ | ||
- | Similarly, | + | Similarly, |
- | ===== Method III. Running in a GUI mode ==== | + | |
+ | ====== | ||
You can perform short validation analysis using an editor as: | You can perform short validation analysis using an editor as: | ||
Line 108: | Line 117: | ||
It will open the Python script for editing. Next, run this script by clicking the image of green running man on the status bar (or press [F8]). | It will open the Python script for editing. Next, run this script by clicking the image of green running man on the status bar (or press [F8]). | ||
- | ===== Method IV. Running in a GUI mode using URL dialog | + | ====== Using GUI URL dialogue ====== |
- | + | If you use DMelt, you can run this code using a more conventional editor: | |
- | + | ||
- | If you use DMelt, you can run this code using | + | |
- | a more conventional editor: | + | |
<code bash> | <code bash> | ||
Line 136: | Line 142: | ||
First, download any ProMC file, i.e. | First, download any ProMC file, i.e. | ||
<code bash> | <code bash> | ||
- | wget http:// | + | wget https:// |
</ | </ | ||
Line 185: | Line 191: | ||
< | < | ||
- | {{: | + | {{:hepsim: |
</ | </ | ||
Line 191: | Line 197: | ||
< | < | ||
- | {{: | + | {{:hepsim: |
</ | </ | ||
Line 197: | Line 203: | ||
< | < | ||
- | {{: | + | {{:hepsim:view3d.py| Python code to show event in 3D}} |
</ | </ | ||
Line 209: | Line 215: | ||
<code bash> | <code bash> | ||
- | hs-view | + | hs-view |
</ | </ | ||
or: | or: | ||
<code bash> | <code bash> | ||
- | wget http:// | + | wget https:// |
hs-view gamma100tev_0000000.promc | hs-view gamma100tev_0000000.promc | ||
</ | </ | ||
- | + | Click the event number ('left pannel" | |
- | On the left panel, click on the event and then look at "Event info" | + | |
< | < | ||
- | {{: | + | {{:hepsim: |
</ | </ | ||
Line 231: | Line 236: | ||
You can also open a script as: | You can also open a script as: | ||
<code bash> | <code bash> | ||
- | wget http:// | + | wget https:// |
./dmelt.sh gamma_jetphox.py | ./dmelt.sh gamma_jetphox.py | ||
</ | </ | ||
- | Alternatively, | + | Alternatively, |
NLO event record includes 4-momenta of particles and event weights (double values). In addition, deviations form central weights are included as an array of integer values as: | NLO event record includes 4-momenta of particles and event weights (double values). In addition, deviations form central weights are included as an array of integer values as: | ||
- | {{: | + | {{:hepsim: |
You can calculate differential cross sections using online files using this example: | You can calculate differential cross sections using online files using this example: | ||
Line 245: | Line 250: | ||
<code bash> | <code bash> | ||
mkdir Higgs; cd Higgs; | mkdir Higgs; cd Higgs; | ||
- | wget http:// | + | wget https:// |
wget -O dmelt.zip http:// | wget -O dmelt.zip http:// | ||
unzip dmelt.zip | unzip dmelt.zip | ||
Line 251: | Line 256: | ||
</ | </ | ||
- | This example runs " | + | This example runs " |
- | We use DMelt to do the calculations (after updating one jar file). You can also use ROOT/C++ to do the same. | + | |
Line 285: | Line 289: | ||
<code bash> | <code bash> | ||
- | wget http:// | + | wget https:// |
promc_proto ggd_mu1_45_2000_run0_atlas50.promc | promc_proto ggd_mu1_45_2000_run0_atlas50.promc | ||
promc_code | promc_code | ||
Line 292: | Line 296: | ||
This creates directories with the C++/ | This creates directories with the C++/ | ||
- | For a longer description, | + | For a longer description, |
- | For C++/ROOT, you can use {{: | + | For C++/ROOT, you can use {{:hepsim: |
Untar it and compile using " | Untar it and compile using " | ||
all ProMC files in a given directory and fills ROOT histograms with cross sections. | all ProMC files in a given directory and fills ROOT histograms with cross sections. | ||
Line 300: | Line 304: | ||
Use this Doxygen description to work with C++: | Use this Doxygen description to work with C++: | ||
- | * [[http:// | + | * [[https:// |
- | * [[http:// | + | * [[https:// |
| | ||
- | Please look at HepSim [[: | + | Please look at HepSim [[:hepsim: |
- | Please refer [[asc:promc| ProMC web page]] on how to read/write ProMC files. | + | Please refer [[https:// |
Also, there is a simple example showing how to read Monte Carlo files from HepSim in a loop, | Also, there is a simple example showing how to read Monte Carlo files from HepSim in a loop, | ||
Line 311: | Line 315: | ||
<code bash> | <code bash> | ||
- | wget http:// | + | wget https:// |
cd hepsim-cpp/; | cd hepsim-cpp/; | ||
make | make | ||
Line 334: | Line 338: | ||
====== Converting to LCIO ====== | ====== Converting to LCIO ====== | ||
- | ProMC files can be converted to LCIO files for full detector simulations. | + | ProMC files can be converted to LCIO or STDHEP |
+ | files for full detector simulations. | ||
+ | Note that the converters are included inside the ProMC package (see the directory " | ||
+ | |||
+ | < | ||
<code bash> | <code bash> | ||
- | wget http:// | + | wget https:// |
tar -zvxf ProMC.tgz | tar -zvxf ProMC.tgz | ||
cd examples/ | cd examples/ | ||
Line 344: | Line 352: | ||
java promc2lcio file.promc file.slcio | java promc2lcio file.promc file.slcio | ||
</ | </ | ||
- | The last commends | + | </ |
+ | |||
+ | The last command | ||
Line 373: | Line 383: | ||
Many scripts of HepSim create SVG images and a cross platform | Many scripts of HepSim create SVG images and a cross platform | ||
- | [[http://jwork.org/dmelt/wikidoc/doku.php? | + | [[https://handwiki.org/wiki/DMelt:IO/8_Cross_Paltform_IO |
< | < | ||
<code python> | <code python> | ||
- | !/ | + | #!/ |
# Convert jdat to the standard Python | # Convert jdat to the standard Python | ||
# This can be used for converting data to pyROOT | # This can be used for converting data to pyROOT | ||
Line 411: | Line 421: | ||
- | Please look at the [[: | + | Please look at the [[:hepsim: |
Send comments to: --- // | Send comments to: --- // | ||