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
hepsim:usage_analysis [2017/07/17 19:49]
hepsim17
hepsim:usage_analysis [2021/02/17 00:14] (current)
hepsim17 [Using ProIO files]
Line 6: Line 6:
    
  
-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]].
  
Line 13: Line 13:
  
   * [[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]]
  
Line 21: Line 21:
  
   *  Using Java web start from the browser.   *  Using Java web start from the browser.
-  * "hs-ide file.py" command to launch the editor (from the 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 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]] 
  
  
Line 33: Line 33:
 <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
Line 76: Line 76:
 </code> </code>
 This methods takes file list, and identify pT ranges given between the strings "_pt" and "_". In the above example, the output list will be [1000,5000]. This methods takes file list, and identify pT ranges given between the strings "_pt" and "_". In the above example, the output list will be [1000,5000].
-====== Reading the file header ======+ 
 +====== Using ProMC files ====== 
 + 
 + 
 +===== Reading the file header =====
  
 To read data from a ProMC file, you will need these statements: To read data from a ProMC file, you will need these statements:
Line 93: Line 97:
 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
  
  
-====== Reading the event records ======+===== Reading the event records =====
  
  
Line 114: Line 118:
 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>
Line 228: Line 232:
 Look at a typical example of jet clustering in the [[http://atlaswww.hep.anl.gov/hepsim/code.php?item=88&code=qcd_pythia8_ptbins_jets.py| qcd_pythia8_ptbins_jets.py code]]. Look at a typical example of jet clustering in the [[http://atlaswww.hep.anl.gov/hepsim/code.php?item=88&code=qcd_pythia8_ptbins_jets.py| qcd_pythia8_ptbins_jets.py code]].
  
-====== Event statistics ======+===== Event statistics =====
  
 Before closing ProMC file, you may need to access event statistics, cross sections and errors on cross sections.  Before closing ProMC file, you may need to access event statistics, cross sections and errors on cross sections. 
Line 246: Line 250:
   * [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/promc/io/ProMCStatFile.ProMCStat.html | ProMCStat]] for MC   * [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/promc/io/ProMCStatFile.ProMCStat.html | ProMCStat]] for MC
   * [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/pronlo/io/ProMCStatFile.ProMCStat.html | ProMCStat]] for NLO   * [[http://atlaswww.hep.anl.gov/asc/promc/doc/api/pronlo/io/ProMCStatFile.ProMCStat.html | ProMCStat]] for NLO
 +
 +
 +
 +====== Using ProIO files ======
 +
 +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)
 +
 +====== Using ROOT files ======
 +
 +ROOT files are used to store Delphes fast simulations.
 +To analyses ROOT files, either use ROOT (see Delphes manual) or the [[https://atlaswww.hep.anl.gov/asc/jas4pp/|Jas4pp program]].
 +
 +
 +
 +
  
 ====== Plots and histograms ====== ====== Plots and histograms ======
Line 276: Line 296:
 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.
  
  
Line 287: Line 307:
 ===== 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) 
      
      
Line 309: Line 329:
  
  
-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 =====
Line 316: Line 336:
 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
  
  
Line 325: Line 345:
 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.
  
  
Line 333: Line 353:
 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//