Both sides previous revision
Previous revision
Next revision
|
Previous revision
Last revision
Both sides next revision
|
hepsim:usage_analysis [2018/07/28 13:42] hepsim17 [Event statistics] |
hepsim:usage_analysis [2020/05/22 02:32] hepsim17 |
| |
| |
This analysis tutorial covers Python codding on the Java platform (Jython). Look at the [[http://atlaswww.hep.anl.gov/hepsim/description.php|main description]] for other topics. | This analysis tutorial covers Python codding on the Java platform (Jython). Look at the [[https://atlaswww.hep.anl.gov/hepsim/description.php|main description]] for other topics. |
For C++/ROOT, please refer [[https://atlaswww.hep.anl.gov/asc/promc/| ProMC web page]]. | For C++/ROOT, please refer [[https://atlaswww.hep.anl.gov/asc/promc/| ProMC web page]]. |
| |
| |
* [[http://www.jython.org/jythonbook/en/1.0/| Jython book]] | * [[http://www.jython.org/jythonbook/en/1.0/| Jython book]] |
* [[http://jwork.org/dmelt/| DMelt (community version)]] | * [[https://datamelt.org/| DataMelt (community version)]] |
* [[https://github.com/gavalian/groot/wiki| GRoot]] | * [[https://github.com/gavalian/groot/wiki| GRoot]] |
| |
| |
* Using Java web start from the browser. | * Using Java web start from the browser. |
* "hs-ide file.py" command to launch the editor (from [[http://atlaswww.hep.anl.gov/hepsim/doc/doku.php?id=hepsim:hs-tools|hs-tools]] package) | * "hs-ide file.py" command to launch the editor (from [[https://atlaswww.hep.anl.gov/hepsim/doc/doku.php?id=hepsim:hs-tools|hs-tools]] package) |
* "hs-run file.py" command to run using a command-line ("batch mode", from the [[http://atlaswww.hep.anl.gov/hepsim/doc/doku.php?id=hepsim:hs-tools|hs-tools]] package) | * "hs-run file.py" command to run using a command-line ("batch mode", from the [[https://atlaswww.hep.anl.gov/hepsim/doc/doku.php?id=hepsim:hs-tools|hs-tools]] package) |
* [[http://atlaswww.hep.anl.gov/asc/jas4pp/| Jas4pp]] | * [[https://atlaswww.hep.anl.gov/asc/jas4pp/| Jas4pp]] |
* [[http://jwork.org/dmelt/ |DMelt IDE]] | * [[https://datamelt.org/ |DataMelt IDE]] |
| |
| |
<code python> | <code python> |
from hepsim import HepSim | from hepsim import HepSim |
url="http://mc.hep.anl.gov/asc/hepsim/events/pp/100tev/higgs_pythia8/" | url="https://mc.hep.anl.gov/asc/hepsim/events/pp/100tev/higgs_pythia8/" |
flist=HepSim.getList(url) | flist=HepSim.getList(url) |
print flist | print flist |
The header file also stores some additional information. Look at Java API | The header file also stores some additional information. Look at Java API |
| |
* [[http://atlaswww.hep.anl.gov/asc/promc/hepsim/doc/api/ | HepSim API]] for FileMC | * [[https://atlaswww.hep.anl.gov/asc/promc/hepsim/doc/api/ | HepSim API]] for FileMC |
* [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/promc/io/ProMCHeaderFile.ProMCHeader.html | ProMCHeader]] for MC records | * [[https://atlaswww.hep.anl.gov/asc/promc/doc/api/promc/io/ProMCHeaderFile.ProMCHeader.html | ProMCHeader]] for MC records |
* [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/pronlo/io/ProMCHeaderFile.ProMCHeader.html | ProMCHeader]] for NLO records | * [[https://atlaswww.hep.anl.gov/asc/promc/doc/api/pronlo/io/ProMCHeaderFile.ProMCHeader.html | ProMCHeader]] for NLO records |
| |
| |
Look at Java API of the ProMCEvent class: | Look at Java API of the ProMCEvent class: |
| |
* [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/promc/io/ProMC.ProMCEvent.Event.html | Event ]] for MC | * [[https://atlaswww.hep.anl.gov/asc/promc/doc/api/promc/io/ProMC.ProMCEvent.Event.html | Event ]] for MC |
* [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/pronlo/io/ProMC.ProMCEvent.Event.html | Event ]] for NLO | * [[https://atlaswww.hep.anl.gov/asc/promc/doc/api/pronlo/io/ProMC.ProMCEvent.Event.html | Event ]] for NLO |
| |
Here is the Java API for "Particles": | Here is the Java API for "Particles": |
* [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/promc/io/ProMC.ProMCEvent.Particles.html | Particles]] for MC | * [[https://atlaswww.hep.anl.gov/asc/promc/doc/api/promc/io/ProMC.ProMCEvent.Particles.html | Particles]] for MC |
* [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/pronlo/io/ProMC.ProMCEvent.Particles.html | Particles]] for NLO | * [[https://atlaswww.hep.anl.gov/asc/promc/doc/api/pronlo/io/ProMC.ProMCEvent.Particles.html | Particles]] for NLO |
| |
In the above example, "pa" is an object [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/pronlo/io/ProMC.ProMCEvent.Particles.html | Particles]] with particle information. We can create a typical Lorentz particle using the class [[http://jwork.org/dmelt/api/doc.php/hephysics/particle/LParticle|LParticle]] as: | In the above example, "pa" is an object [[https://atlaswww.hep.anl.gov/asc/promc/doc/api/pronlo/io/ProMC.ProMCEvent.Particles.html | Particles]] with particle information. We can create a typical Lorentz particle using the class [[https://datamelt.org/api/doc.php/hephysics/particle/LParticle|LParticle]] as: |
| |
<code python> | <code python> |
| |
| |
===== Using ProIO files ===== | ====== Using ProIO files ====== |
| |
ProIO files have their own API (https://github.com/decibelcooper/proio). | ProIO files have their own API (https://github.com/decibelcooper/proio). |
It is at early stage of development. You can look at example of how to use ProIO here [http://atlaswww.hep.anl.gov/hepsim/info.php?item=325] | It is at early stage of development. You can look at example of how to use ProIO here [http://atlaswww.hep.anl.gov/hepsim/info.php?item=325) |
| |
| |
print p1.toString() | print p1.toString() |
</code> | </code> |
The object p1 belongs to the class [[http://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/jhplot/P1D.html|P1D]]. Analogously, one can store histograms etc. | The object p1 belongs to the class [[https://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/jhplot/P1D.html|P1D]]. Analogously, one can store histograms etc. |
| |
| |
===== Histograms and plots ===== | ===== Histograms and plots ===== |
| |
* [[http://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/jhplot/HPlot.html|HPlot]] - canvas to show X-Y data and histograms in 2D | * [[https://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/jhplot/HPlot.html|HPlot]] - canvas to show X-Y data and histograms in 2D |
* [[http://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/jhplot/HPlot.html|HPlot3D]] - canvas to show X-Y-Z data and histograms in 3D | * [[https://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/jhplot/HPlot.html|HPlot3D]] - canvas to show X-Y-Z data and histograms in 3D |
* [[http://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/jhplot/H1D.html|H1D]] - 1D histogram | * [[https://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/jhplot/H1D.html|H1D]] - 1D histogram |
* [[http://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/jhplot/H1D.html|H2D]] - 2D histogram | * [[https://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/jhplot/H1D.html|H2D]] - 2D histogram |
* [[http://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/jhplot/P1D.html|P1D]] - X-Y container with support of 2-level errors | * [[https://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/jhplot/P1D.html|P1D]] - X-Y container with support of 2-level errors |
| |
See also other math and graphics classes in the [[http://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/jhplot/package-summary.html | jhplot package]]. | See also other math and graphics classes in the [[https://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/jhplot/package-summary.html | jhplot package]]. |
| |
===== Lorentz particles and Jets ===== | ===== Lorentz particles and Jets ===== |
| |
* [[http://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/hephysics/hepsim/PromcUtil.html|PromcUtil]] convenient method to fill arrays with particles from ProMC files | * [[https://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/hephysics/hepsim/PromcUtil.html|PromcUtil]] convenient method to fill arrays with particles from ProMC files |
* [[http://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/hephysics/particle/LParticle.html|LParticle]] a HEP particle with the Lorentz transformations | * [[https://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/hephysics/particle/LParticle.html|LParticle]] a HEP particle with the Lorentz transformations |
* [[http://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/hephysics/jet/FastParticle.html|FastParticle]] a HEP particles with precomputed Et2,Eta,Phi for jet algorithms. | * [[https://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/hephysics/jet/FastParticle.html|FastParticle]] a HEP particles with precomputed Et2,Eta,Phi for jet algorithms. |
* [[http://java.freehep.org/freehep-physics/apidocs/hep/physics/vec/package-summary.html|Physics vectors]] typical HEP physics vectors the Lorentz transformations | * [[https://java.freehep.org/freehep-physics/apidocs/hep/physics/vec/package-summary.html|Physics vectors]] typical HEP physics vectors the Lorentz transformations |
* [[http://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/hephysics/jet/JetN2.html|JetN2]] recommended kt-type jet clustering ng algorithms (kT, anti-kT, CA) implemented in Java using N^2 approach, similar to the FastJet algorithm. Recommended for hadron collisions | * [[https://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/hephysics/jet/JetN2.html|JetN2]] recommended kt-type jet clustering ng algorithms (kT, anti-kT, CA) implemented in Java using N^2 approach, similar to the FastJet algorithm. Recommended for hadron collisions |
* [[http://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/hepsimjar/api/hephysics/jet/SCJet.html|SCJet]] traditional kt-type jet clustering algorithms (kT, anti-kT) for pp implemented in Java using N^3 approach (slow) | * [[https://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/hepsimjar/api/hephysics/jet/SCJet.html|SCJet]] traditional kt-type jet clustering algorithms (kT, anti-kT) for pp implemented in Java using N^3 approach (slow) |
* [[http://java.freehep.org/freehep-physics/apidocs/hep/physics/jet/package-summary.html|Jets and event shapes]] traditional jet algorithms and event shapes for e+e- (Geneva, Jade, Durham jets) | * [[https://java.freehep.org/freehep-physics/apidocs/hep/physics/jet/package-summary.html|Jets and event shapes]] traditional jet algorithms and event shapes for e+e- (Geneva, Jade, Durham jets) |
| |
| |
| |
| |
You can build the standard kt-jets using [[http://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/hephysics/hepsim/PromcUtil.html | PromcUtil]], followed by the | You can build the standard kt-jets using [[https://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/hephysics/hepsim/PromcUtil.html | PromcUtil]], followed by the |
[[http://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/hephysics/jet/KTjet.html | KTjet]] class. | [[https://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/hephysics/jet/KTjet.html | KTjet]] class. |
| |
===== Working with ProMC files ===== | ===== Working with ProMC files ===== |
Also, look at the ProMC Java API that is used to store data: | Also, look at the ProMC Java API that is used to store data: |
| |
* [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/promc/io/ProMCHeaderFile.ProMCHeader.html | ProMCHeader]] for MC and [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/pronlo/io/ProMCHeaderFile.ProMCHeader.html | ProMCHeader]] for NLO | * [[https://atlaswww.hep.anl.gov/asc/promc/doc/api/promc/io/ProMCHeaderFile.ProMCHeader.html | ProMCHeader]] for MC and [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/pronlo/io/ProMCHeaderFile.ProMCHeader.html | ProMCHeader]] for NLO |
* [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/promc/io/ProMC.ProMCEvent.Event.html | Event ]] for MC and [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/pronlo/io/ProMC.ProMCEvent.Event.html | Event ]] for NLO | * [[https://atlaswww.hep.anl.gov/asc/promc/doc/api/promc/io/ProMC.ProMCEvent.Event.html | Event ]] for MC and [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/pronlo/io/ProMC.ProMCEvent.Event.html | Event ]] for NLO |
* [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/promc/io/ProMC.ProMCEvent.Particles.html | Particles]] for MC and [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/pronlo/io/ProMC.ProMCEvent.Particles.html | Particles]] for NLO | * [[https://atlaswww.hep.anl.gov/asc/promc/doc/api/promc/io/ProMC.ProMCEvent.Particles.html | Particles]] for MC and [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/pronlo/io/ProMC.ProMCEvent.Particles.html | Particles]] for NLO |
* [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/promc/io/ProMCStatFile.ProMCStat.html | ProMCStat]] for MC and [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/pronlo/io/ProMCStatFile.ProMCStat.html | ProMCStat]] for NLO | * [[https://atlaswww.hep.anl.gov/asc/promc/doc/api/promc/io/ProMCStatFile.ProMCStat.html | ProMCStat]] for MC and [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/pronlo/io/ProMCStatFile.ProMCStat.html | ProMCStat]] for NLO |
| |
| |
information on event weights and uncertainties. | information on event weights and uncertainties. |
| |
The project uses the community edition of [[http://jwork.org/dmelt/|DMelt]] project and the FreeHEP Java Libraries. | The project uses the community edition of [[https://datamelt.org/|DataMelt]] project and the FreeHEP Java Libraries. |
| |
| |
In addition, this tool supports GRoot histograms and canvases (see [[https://github.com/gavalian/groot/wiki| GRoot poject]]). The syntax for histogram creation and plotting is similar to the PyROOT commands, thus it is easier | In addition, this tool supports GRoot histograms and canvases (see [[https://github.com/gavalian/groot/wiki| GRoot poject]]). The syntax for histogram creation and plotting is similar to the PyROOT commands, thus it is easier |
to use this package for PyROOT users. | to use this package for PyROOT users. |
You can find the Java API of this package in [[http://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/|here]]. | You can find the Java API of this package in [[https://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/|here]]. |
| |
| |
The following histograms are available: | The following histograms are available: |
| |
* [[http://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/org/jlab/groot/data/H1F.html|H1F 1D histogram]] | * [[https://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/org/jlab/groot/data/H1F.html|H1F 1D histogram]] |
* [[http://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/org/jlab/groot/data/H1F.html|H2F 2D histogram]] | * [[https://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/org/jlab/groot/data/H1F.html|H2F 2D histogram]] |
| |
They can be plotted on the [[http://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/org/jlab/groot/graphics/EmbeddedCanvas.html|EmbeddedCanvas]]. | They can be plotted on the [[https://atlaswww.hep.anl.gov/hepsim/hepsimjar/api/org/jlab/groot/graphics/EmbeddedCanvas.html|EmbeddedCanvas]]. |
| |
| |
--- //[[[email protected]|Sergei Chekanov]] 2015/03/06 08:49// | --- //[[[email protected]|Sergei Chekanov]] 2015/03/06 08:49// |