Fork me on GitHub

Changes between Initial Version and Version 1 of OutDated/UserManual


Ignore:
Timestamp:
Oct 5, 2010, 10:51:35 PM (14 years ago)
Author:
cp3-support
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OutDated/UserManual

    v1 v1  
     1The available code is a tar file which comes with everything you need to run the DELPHES package. Nevertheless in order to visualise the events with the FROG program, you need to install libraries as explained here.
     2
     3== Getting started ==
     4
     5In order to run DELPHES on your system, first download is sources and compile it:
     6{{{
     7me@mylaptop:~$ wget http://www.fynu.ucl.ac.be/users/s.ovyn/Delphes/files/Delphes_V_*.*.tar.gz
     8me@mylaptop:~$ tar -xvf Delphes_V_*.*.tar.gz
     9me@mylaptop:~$ cd Delphes_V_*.*
     10me@mylaptop:~$ ./genMakefile.tcl > Makefile
     11me@mylaptop:~$ make
     12}}}
     13
     14== Running Delphes on your events ==
     15
     16=== Setting the run configuration ===
     17
     18The program is driven by two datacards (default cards are data/DetectorCard.dat and data/TriggerCard.dat) which allow a large spectrum of running conditions.
     19
     20The detector card: contains all needed information to run DELPHES
     21
     22    * The following parameters are available: detector parameters, including calorimeter and tracking coverage and resolution, transverse energy thresholds allowed for reconstructed objects, jet algorithm to use as well as jet parameters.
     23    * Six flags, FLAG_bfield, FLAG_vfd, FLAG_RP, FLAG_trigger, FLAG_frog and FLAG_lhco should be set in order to configure the magnetic field propagation, the very forward detectors simulation, the use of very forward taggers, the trigger selection, the preparation for FROG display and the creation of an output file in *.lhco text format (respectively).
     24    * An example (the default detector card) can be found here
     25
     26The trigger card: contains the definition of all trigger bits
     27
     28    * Cuts can be applied on the transverse momentum of electrons, muons, jets, b-jets, tau-jets, photons and transverse missing energy, as well as isolated electrons and isolated muons.
     29    * Be careful that the following structured should be used:
     30         1. One trigger bit per line, the first entry in the line is the name of the trigger bit
     31         2. If the trigger bit uses the presence of multiple identical objects, their transverse momentum thresholds must be defined in decreasing order
     32         3. The different object requirements must be separated by a && flag
     33         4. Example of a trigger bit line:
     34{{{
     35            DoubleElec >> ELEC1_PT: '20' && ELEC2_PT: '10'
     36}}}
     37    * An example (the default trigger card) can be found here
     38
     39The input list: contains only the list of input files to process
     40
     41    * The listfile should contain one data file (with its relative/absolute path if needed) per line
     42    * All datafiles in the listfile should be of the same type
     43    * Supported types are StdHEP (.hep), Les Houches LHAF (.lhe), HepMC (.hepmc), HBook-root (.root)
     44    * The name of the listfile is arbitrary, but it is common to assign it the .list extension name
     45    * An example can be found here:
     46{{{
     47      tar xzf tt_jj_small.hep.tar.gz
     48}}}
     49      This tarball contains the events (tt_jj_small.hep) and the listfile (TEST_small_tt.list).
     50
     51=== Running the code===
     52
     53Create or modify the above cards (data/DetectorCard.dat and data/TriggerCard.dat)
     54
     55Create a text file containing the list of input files that will be used by DELPHES (with extension *.lhe, *.root or *.hep)
     56
     57To run the code, type the following
     58{{{
     59me@mylaptop:~$ ./Delphes inputlist.list OutputRootFileName.root data/DetectorCard.dat data/TriggerCard.dat
     60}}}
     61
     62=== Running an analysis on your Delphes events ===
     63
     64The Examples/Analysis_Ex.cpp code comming with the package shows how to access the available reconstructed objects and the trigger information
     65The two following arguments are required: a text file containing the input DELPHES root files to run, and the name of the output root file.
     66To run the code:
     67{{{
     68./Analysis_Ex input_file.list output_file.root
     69}}}
     70
     71=== Running the trigger on your Delphes events ===
     72
     73The !Examples/Trigger_Only.cpp code permits to run the trigger selection separately from the general detector simulation on output DELPHES root files. An input DELPHES root file is mandatory as argument. The new tree containing the trigger information will be added in these file. The trigger datacard is also necessary.
     74To run the code:
     75{{{
     76./Trigger_Only input_file.root data/TriggerCard.dat
     77}}}
     78
     79=== Create a *.lhco file of your Delphes events ===
     80
     81The *lhco file format is a text-ascii data format. An exhaustive description is provided on http://v1.jthaler.net/olympicswiki The !Examples/LHCO_Only.cpp code permits to create an output text file in the LHCO format separately from the general Delphes.cpp code on output DELPHES root files. An input DELPHES root file is mandatory as argument. The name of the new created file is identical to the input one, but with the .root extension remplaced by _events.lhco.
     82To run the code:
     83{{{
     84./LHCO_Only input_file.root
     85}}}
     86
     87=== Running the FROG event display ===
     88
     89    * If the FLAG_frog was switched on, two files were created during the run of DELPHES: !DelphesToFrog.vis and !DelphesToFrog.geom. They contain all the needed information to run frog.
     90
     91    * To display the events and the geometry, you first need to compile FROG. Go to the Utilities/FROG and type make
     92    * Go back into the main directory and type ./Utilities/FROG/frog
     93
     94=== Running DELPHES on Mac OS-X ===
     95Small modifications are required in the Makefile. Refer to the corresponding FAQ section.
     96
     97=== ROOT basics ===
     98For users who are not familiar with ROOT, here are a few useful commands.
     99
     100   1. Starting and exiting ROOT:
     101      * To start ROOT:
     102{{{
     103      me@mylaptop:~$ root
     104}}}
     105      * To avoid the display of the banner, you can add the -l option :
     106{{{
     107      me@mylaptop:~$ root -l
     108}}}
     109      * Starting ROOT and opening a .root file (e.g. test.root) at the same time:
     110{{{
     111      me@mylaptop:~$ root -l test.root
     112      root [0]
     113      Attaching file test.root as _file0...
     114      Warning in <TClass::TClass>: no dictionary for class TRootGenEvent is available
     115      Warning in <TClass::TClass>: no dictionary for ...
     116}}}
     117      There are a couple of "Warning" lines that appear. This is normal and harmless.
     118      * Quitting ROOT:
     119{{{
     120      me@mylaptop:~$ root [0] .q
     121}}}
     122
     123   2. Parsing a .root file:
     124{{{
     125      root [1] TBrowser t
     126      root [2] .ls
     127}}}
     128      The first command line will open a browser that allows you to see the contents and the structure of your .root file. You can then click on the various branches and double-click on the leaves in order to display automatically the corresponding histograms. The second line lists the currently known symbols.
     129
     130   3. Looking more into a .root file produced by Delphes:
     131      Delphes creates a file with three trees, called GEN, Analysis and Trigger. To know how many events are in a tree, for instance Analysis or GEN, use the !GetEntries() method:
     132{{{
     133      root [3] Analysis->GetEntries()
     134}}}
     135      Similarly, you can list the branches in a tree, or the leaves in the branches, with !GetListOfBranches() and !GetListOfLeaves():
     136{{{
     137      root [4] GEN->GetListOfBranches()->ls()
     138}}}
     139      One can use wildcard (*) character to have a generic listing.
     140{{{
     141      root [5] Analysis->GetListOfLeaves()->ls("Electron*")
     142      OBJ: TLeafElement Electron_ Electron_ : 0 at: 0x9d13f60
     143      OBJ: TLeafElement Electron.E E[Electron_] : 0 at: 0x9d13ed0
     144      OBJ: TLeafElement Electron.Px Px[Electron_] : 0 at: 0x9d24f50
     145      ...
     146}}}
     147
     148   4. Drawing distributions: The distributions corresponding to a given variable (e.g. jet energies) can be plot as an histogram by using the Draw method of any tree.
     149{{{
     150      root [6] Analysis->Draw("Jet.E")
     151      root [7] Analysis->Draw("Jet.PT : Jet.Eta")
     152      root [8] Analysis->Draw("Photon.Phi","Photon.E>15")
     153      root [9] Analysis->Draw("RP220hits.E","RP220hits.side>0 && ZDChits.side>0")
     154      root [10] Trigger->Draw("TrigResult.Accepted")
     155}}}
     156      Moreover, drawing one variable with respect to another is possible by using the column character : as in the line 7 here above. Finally, one or several cuts can be applied as a second argument of the Draw method (see lines 8 and 9). Alternatively, a double-click in a TBrowser on a given leaf will also display the distribution of the corresponding variable in the form of an histogram.