Fork me on GitHub

Changeset 816b1a9 in git


Ignore:
Timestamp:
Mar 8, 2018, 11:48:59 AM (7 years ago)
Author:
Christophe Delaere <christophe.delaere@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
44b0a31
Parents:
a2152c2
Message:

merge README and README.md and rework CONTRIBUTING.md

Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • CONTRIBUTING.md

    ra2152c2 r816b1a9  
    1 Thanks for your interest in the development of Delphes.
     1**Thanks for your interest in the development of Delphes.**
    22
    3 The Delphes development model is community-based. Users willing to participate are encouraged to fork Delphes Git repository and to submit pull requests for improvements and bug fixes. The Delphes core development team from the CP3 centre of the Université catholique de Louvain is in charge of the maintenance, releases, and general support to users via the ticket system.
     3The Delphes development model is community-based. Users willing to participate are encouraged to fork Delphes Git repository and to submit pull requests for improvements and bug fixes. The Delphes core development team from the [CP3 centre of the Université catholique de Louvain](https://uclouvain.be/en/research-institutes/irmp/cp3) is in charge of the maintenance, releases, and general support to users via the ticket system.
    44
    5 Questions, suggestions and bug reports can be made through the ticket system available on our website.
     5Questions, suggestions and bug reports can be made through the [ticket system](https://cp3.irmp.ucl.ac.be/projects/delphes/report) available on our website. After checking that the issue is not already being adressed, you can [create a new ticket](https://cp3.irmp.ucl.ac.be/projects/delphes/newticket). Note that you will have to register first.
    66
    7 CP3 home page:
    8 https://uclouvain.be/en/research-institutes/irmp/cp3
     7Documentation is collected in the [Workbook](https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook).
     8A good starting point is the [Quick Tour](https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook/QuickTour).
    99
    10 Ticket system (you will have to register first):
    11 https://cp3.irmp.ucl.ac.be/projects/delphes/newticket
    12 
    13 Documentation is collected in the Workbook:
    14 https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook
    15 
    16 A good starting point is the Quick Tour:
    17 https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook/QuickTour
    18 
     10More details can be found on the [Delphes website](http://cp3.irmp.ucl.ac.be/projects/delphes).
  • README.md

    ra2152c2 r816b1a9  
    55
    66More details can be found on the Delphes website http://cp3.irmp.ucl.ac.be/projects/delphes
     7
     8Quick start with Delphes
     9========================
     10
     11Commands to get the code:
     12
     13```
     14   wget http://cp3.irmp.ucl.ac.be/downloads/Delphes-3.4.1.tar.gz
     15
     16   tar -zxf Delphes-3.4.1.tar.gz
     17```
     18
     19Commands to compile the code:
     20
     21```
     22   cd Delphes-3.4.1
     23
     24   make
     25```
     26
     27Finally, we can run Delphes:
     28
     29```
     30   ./DelphesHepMC
     31```
     32
     33Command line parameters:
     34
     35```
     36   ./DelphesHepMC config_file output_file [input_file(s)]
     37     config_file - configuration file in Tcl format
     38     output_file - output file in ROOT format,
     39     input_file(s) - input file(s) in HepMC format,
     40     with no input_file, or when input_file is -, read standard input.
     41```
     42
     43Let's simulate some Z->ee events:
     44
     45```
     46   wget http://cp3.irmp.ucl.ac.be/downloads/z_ee.hep.gz
     47   gunzip z_ee.hep.gz
     48   ./DelphesSTDHEP cards/delphes_card_CMS.tcl delphes_output.root z_ee.hep
     49```
     50
     51or
     52
     53```
     54   curl -s http://cp3.irmp.ucl.ac.be/downloads/z_ee.hep.gz | gunzip | ./DelphesSTDHEP cards/delphes_card_CMS.tcl delphes_output.root
     55```
     56
     57For more detailed documentation, please visit
     58
     59https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook
     60
     61Configure Delphes on lxplus.cern.ch
     62====================================
     63
     64```
     65git clone git://github.com/delphes/delphes.git Delphes
     66
     67cd Delphes
     68
     69source  /afs/cern.ch/sw/lcg/external/gcc/4.9.3/x86_64-slc6/setup.sh
     70
     71source /afs/cern.ch/sw/lcg/app/releases/ROOT/6.06.00/x86_64-slc6-gcc49-opt/root/bin/thisroot.sh
     72
     73make
     74```
     75
     76
     77Simple analysis using TTree::Draw
     78=================================
     79
     80Now we can start ROOT and look at the data stored in the output ROOT file.
     81
     82Start ROOT and load Delphes shared library:
     83
     84```
     85   root -l
     86   gSystem->Load("libDelphes");
     87```
     88
     89Open ROOT file and do some basic analysis using Draw or TBrowser:
     90
     91```
     92   TFile::Open("delphes_output.root");
     93   Delphes->Draw("Electron.PT");
     94   TBrowser browser;
     95```
     96
     97Note 1: Delphes - tree name, it can be learned e.g. from TBrowser
     98
     99Note 2: Electron - branch name; PT - variable (leaf) of this branch
     100
     101Complete description of all branches can be found in
     102
     103   doc/RootTreeDescription.html
     104
     105This information is also available at
     106
     107   https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook/RootTreeDescription
     108
     109Macro-based analysis
     110====================
     111
     112Analysis macro consists of histogram booking, event loop (histogram filling),
     113histogram display.
     114
     115Start ROOT and load Delphes shared library:
     116
     117```
     118   root -l
     119   gSystem->Load("libDelphes");
     120```
     121
     122Basic analysis macro:
     123
     124```
     125{
     126  // Create chain of root trees
     127  TChain chain("Delphes");
     128  chain.Add("delphes_output.root");
     129 
     130  // Create object of class ExRootTreeReader
     131  ExRootTreeReader *treeReader = new ExRootTreeReader(&chain);
     132  Long64_t numberOfEntries = treeReader->GetEntries();
     133 
     134  // Get pointers to branches used in this analysis
     135  TClonesArray *branchElectron = treeReader->UseBranch("Electron");
     136
     137  // Book histograms
     138  TH1 *histElectronPT = new TH1F("electron pt", "electron P_{T}", 50, 0.0, 100.0);
     139
     140  // Loop over all events
     141  for(Int_t entry = 0; entry < numberOfEntries; ++entry)
     142  {
     143
     144    // Load selected branches with data from specified event
     145    treeReader->ReadEntry(entry);
     146 
     147    // If event contains at least 1 electron
     148    if(branchElectron->GetEntries() > 0)
     149    {
     150      // Take first electron
     151      Electron *electron = (Electron*) branchElectron->At(0);
     152     
     153      // Plot electron transverse momentum
     154      histElectronPT->Fill(electron->PT);
     155     
     156      // Print electron transverse momentum
     157      cout << electron->PT << endl;
     158    }
     159
     160  }
     161
     162  // Show resulting histograms
     163  histElectronPT->Draw();
     164}
     165```
     166
     167
     168More advanced macro-based analysis
     169==================================
     170
     171The 'examples' directory contains ROOT macros Example1.C, Example2.C and Example3.C.
     172
     173Here are the commands to run these ROOT macros:
     174
     175```
     176   root -l
     177   .X examples/Example1.C("delphes_output.root");
     178```
     179
     180or
     181
     182```
     183   root -l examples/Example1.C'("delphes_output.root")'
     184```
Note: See TracChangeset for help on using the changeset viewer.