Fork me on GitHub

Changes between Initial Version and Version 1 of OutDated/DocumenTation


Ignore:
Timestamp:
Jul 1, 2011, 10:40:11 AM (13 years ago)
Author:
cp3-support
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OutDated/DocumenTation

    v1 v1  
     1
     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
     21The 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.
     22Six 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).
     23An example (the default detector card) can be found here
     24The trigger card: contains the definition of all trigger bits
     25Cuts 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.
     26Be careful that the following structured should be used:
     27One trigger bit per line, the first entry in the line is the name of the trigger bit
     28If the trigger bit uses the presence of multiple identical objects, their transverse momentum thresholds must be defined in decreasing order
     29The different object requirements must be separated by a && flag
     30Example of a trigger bit line:
     31{{{
     32DoubleElec >> ELEC1_PT: '20' && ELEC2_PT: '10'
     33}}}
     34
     35The input list: contains only the list of input files to process
     36The listfile should contain one data file (with its relative/absolute path if needed) per line
     37All datafiles in the listfile should be of the same type
     38Supported types are StdHEP (.hep), Les Houches LHAF (.lhe), HepMC (.hepmc), HBook-root (.root)
     39The name of the listfile is arbitrary, but it is common to assign it the .list extension name
     40{{{
     41tar xzf tt_jj_small.hep.tar.gz
     42}}}
     43This tarball contains the events (tt_jj_small.hep) and the listfile (TEST_small_tt.list).
     44Running the code
     45
     46Create or modify the above cards (data/DetectorCard.dat and data/TriggerCard.dat)
     47Create a text file containing the list of input files that will be used by DELPHES (with extension *.lhe, *.root or *.hep)
     48To run the code, type the following
     49{{{
     50me@mylaptop:~$ ./Delphes inputlist.list OutputRootFileName.root data/DetectorCard.dat data/TriggerCard.dat
     51}}}
     52=== Running an analysis on your Delphes events ===
     53
     54The Examples/Analysis_Ex.cpp code comming with the package shows how to access the available reconstructed objects and the trigger information
     55The two following arguments are required: a text file containing the input DELPHES root files to run, and the name of the output root file.
     56To run the code:
     57{{{
     58./Analysis_Ex input_file.list output_file.root
     59}}}
     60=== Running the trigger on your Delphes events ===
     61
     62The 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.
     63To run the code:
     64{{{
     65./Trigger_Only input_file.root data/TriggerCard.dat
     66}}}
     67
     68=== Create a *.lhco file of your Delphes events ===
     69
     70The *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.
     71To run the code:
     72{{{
     73./LHCO_Only input_file.root
     74}}}
     75=== Running the FROG event display ===
     76
     77If 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.
     78
     79To display the events and the geometry, you first need to compile FROG. Go to the Utilities/FROG and type make
     80Go back into the main directory and type ./Utilities/FROG/frog
     81Running DELPHES on Mac OS-X
     82
     83Small modifications are required in the Makefile. Refer to the corresponding FAQ section.
     84
     85== ROOT basics ==
     86
     87For users who are not familiar with ROOT, here are a few useful commands.
     88Starting and exiting ROOT:
     89To start ROOT:
     90   me@mylaptop:~$ root
     91In order to avoid the display of the banner, you can add the -l option :
     92   me@mylaptop:~$ root -l
     93
     94Starting ROOT and opening a .root file (e.g. test.root) at the same time:
     95{{{
     96me@mylaptop:~$ root -l test.root
     97root [0]
     98Attaching file test.root as _file0...
     99Warning in <TClass::TClass>: no dictionary for class TRootGenEvent is available
     100Warning in <TClass::TClass>: no dictionary for ...
     101}}}
     102There are a couple of "Warning" lines that appear. This is normal and harmless.
     103
     104Quitting ROOT
     105   me@mylaptop:~$ root [0] .q
     106
     107Parsing a .root file:
     108{{{
     109root [1] TBrowser t
     110root [2] .ls
     111}}}
     112The 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.
     113
     114Looking more into a .root file produced by Delphes:
     115Delphes 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:
     116{{{
     117root [3] Analysis->GetEntries()
     118}}}
     119Similarly, you can list the branches in a tree, or the leaves in the branches, with GetListOfBranches() and GetListOfLeaves():
     120{{{
     121root [4] GEN->GetListOfBranches()->ls()
     122}}}
     123One can use wildcard (*) character to have a generic listing.
     124{{{
     125root [5] Analysis->GetListOfLeaves()->ls("Electron*")
     126OBJ: TLeafElement Electron_ Electron_ : 0 at: 0x9d13f60
     127OBJ: TLeafElement Electron.E E[Electron_] : 0 at: 0x9d13ed0
     128OBJ: TLeafElement Electron.Px Px[Electron_] : 0 at: 0x9d24f50
     129...
     130}}}
     131
     132Drawing 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.
     133{{{
     134root [6] Analysis->Draw("Jet.E")
     135root [7] Analysis->Draw("Jet.PT : Jet.Eta")
     136root [8] Analysis->Draw("Photon.Phi","Photon.E>15")
     137root [9] Analysis->Draw("RP220hits.E","RP220hits.side>0 && ZDChits.side>0")
     138root [10] Trigger->Draw("TrigResult.Accepted")
     139}}}
     140Moreover, drawing one variable with respect to another is possible by using the column character : as in the line root [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.