All Projects → delphes → Delphes

delphes / Delphes

Licence: other
A framework for fast simulation of a generic collider experiment

Programming Languages

tcl
693 projects

Projects that are alternatives of or similar to Delphes

3dworld
3D Procedural Game Engine Using OpenGL
Stars: ✭ 527 (+652.86%)
Mutual labels:  physics-simulation
Homer
HOMER - 100% Open-Source SIP / VoIP Packet Capture & Monitoring
Stars: ✭ 855 (+1121.43%)
Mutual labels:  hep
Homer7 Docker
HOMER 7 Docker Images
Stars: ✭ 47 (-32.86%)
Mutual labels:  hep
Sngrep
Ncurses SIP Messages flow viewer
Stars: ✭ 605 (+764.29%)
Mutual labels:  hep
Physics Command
Physics platform is a tool for hardware systems (e.g: raspberryPi 3B ). It retrieves data passing through the network and sends it to a control panel. It works the same way as a botnet by receiving remote commands. (you can imagine that as a black box)
Stars: ✭ 23 (-67.14%)
Mutual labels:  physics-simulation
Nasoq
NASOQ:Numerically Accurate Sparsity Oriented QP Solver
Stars: ✭ 30 (-57.14%)
Mutual labels:  physics-simulation
Pymunk
Pymunk is a easy-to-use pythonic 2d physics library that can be used whenever you need 2d rigid body physics from Python
Stars: ✭ 513 (+632.86%)
Mutual labels:  physics-simulation
Aliphysics
ALICE Analysis Repository
Stars: ✭ 61 (-12.86%)
Mutual labels:  hep
Homer Api
HOMER 5: Back-End (API) DEPRICATED - use sipcapture/homer-app
Stars: ✭ 26 (-62.86%)
Mutual labels:  hep
Fitsio
fitsio is a pure-Go package to read and write `FITS` files
Stars: ✭ 40 (-42.86%)
Mutual labels:  hep
Wobble
A tiny (~1.7 KB gzipped) spring physics micro-library that models a damped harmonic oscillator.
Stars: ✭ 744 (+962.86%)
Mutual labels:  physics-simulation
Wave Simulator
A graphical 3D simulation of the wave and heat equations
Stars: ✭ 5 (-92.86%)
Mutual labels:  physics-simulation
Dgfem Acoustic
Discontinuous Galerkin finite element method (DGFEM) for Acoustic Wave Propagation
Stars: ✭ 31 (-55.71%)
Mutual labels:  physics-simulation
Rigs Of Rods
Main development repository for Rigs of Rods soft-body physics simulator
Stars: ✭ 586 (+737.14%)
Mutual labels:  physics-simulation
Flavio
A Python package for flavour physics phenomenology in the Standard model and beyond
Stars: ✭ 49 (-30%)
Mutual labels:  hep
Echo
A New Cross-Platform 2D 3D Game Engine
Stars: ✭ 520 (+642.86%)
Mutual labels:  physics-simulation
Chimera
Fourier-Bessel Particle-In-Cell code
Stars: ✭ 20 (-71.43%)
Mutual labels:  physics-simulation
Spirit
Atomistic Spin Simulation Framework
Stars: ✭ 67 (-4.29%)
Mutual labels:  physics-simulation
Mcmd
Monte Carlo and Molecular Dynamics Simulation Package
Stars: ✭ 52 (-25.71%)
Mutual labels:  physics-simulation
Latticeboltzmann
A 2D Lattice Boltzmann program
Stars: ✭ 34 (-51.43%)
Mutual labels:  physics-simulation

CI DOI

Delphes

Delphes is a C++ framework, performing a fast multipurpose detector response simulation.

More details can be found on the Delphes website http://cp3.irmp.ucl.ac.be/projects/delphes

Quick start with Delphes

Commands to get the code:

   wget http://cp3.irmp.ucl.ac.be/downloads/Delphes-3.4.2.tar.gz

   tar -zxf Delphes-3.4.2.tar.gz

Commands to compile the code:

   cd Delphes-3.4.2

   make

Finally, we can run Delphes:

   ./DelphesHepMC

Command line parameters:

   ./DelphesHepMC config_file output_file [input_file(s)]
     config_file - configuration file in Tcl format
     output_file - output file in ROOT format,
     input_file(s) - input file(s) in HepMC format,
     with no input_file, or when input_file is -, read standard input.

Let's simulate some Z->ee events:

   wget http://cp3.irmp.ucl.ac.be/downloads/z_ee.hep.gz
   gunzip z_ee.hep.gz
   ./DelphesSTDHEP cards/delphes_card_CMS.tcl delphes_output.root z_ee.hep

or

   curl -s http://cp3.irmp.ucl.ac.be/downloads/z_ee.hep.gz | gunzip | ./DelphesSTDHEP cards/delphes_card_CMS.tcl delphes_output.root

For more detailed documentation, please visit https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook

Configure Delphes on lxplus.cern.ch

git clone git://github.com/delphes/delphes.git Delphes

cd Delphes

source  /afs/cern.ch/sw/lcg/external/gcc/4.9.3/x86_64-slc6/setup.sh

source /afs/cern.ch/sw/lcg/app/releases/ROOT/6.06.00/x86_64-slc6-gcc49-opt/root/bin/thisroot.sh

make 

Simple analysis using TTree::Draw

Now we can start ROOT and look at the data stored in the output ROOT file.

Start ROOT and load Delphes shared library:

   root -l
   gSystem->Load("libDelphes");

Open ROOT file and do some basic analysis using Draw or TBrowser:

   TFile *f = TFile::Open("delphes_output.root");
   f->Get("Delphes")->Draw("Electron.PT");
   TBrowser browser;

Notes:

  • Delphes is the tree name. It can be learned e.g. from TBrowser.
  • Electronis the branch name; PT is a variable (leaf) of this branch.

Complete description of all branches can be found in doc/RootTreeDescription.html. This information is also available in the workbook.

Macro-based analysis

Analysis macro consists of histogram booking, event loop (histogram filling), histogram display.

Start ROOT and load Delphes shared library:

   root -l
   gSystem->Load("libDelphes");

Basic analysis macro:

{
  // Create chain of root trees
  TChain chain("Delphes");
  chain.Add("delphes_output.root");
  
  // Create object of class ExRootTreeReader
  ExRootTreeReader *treeReader = new ExRootTreeReader(&chain);
  Long64_t numberOfEntries = treeReader->GetEntries();
  
  // Get pointers to branches used in this analysis
  TClonesArray *branchElectron = treeReader->UseBranch("Electron");

  // Book histograms
  TH1 *histElectronPT = new TH1F("electron pt", "electron P_{T}", 50, 0.0, 100.0);

  // Loop over all events
  for(Int_t entry = 0; entry < numberOfEntries; ++entry)
  {

    // Load selected branches with data from specified event
    treeReader->ReadEntry(entry);
  
    // If event contains at least 1 electron
    if(branchElectron->GetEntries() > 0)
    {
      // Take first electron
      Electron *electron = (Electron*) branchElectron->At(0);
      
      // Plot electron transverse momentum
      histElectronPT->Fill(electron->PT);
      
      // Print electron transverse momentum
      cout << electron->PT << endl;
    }

  }

  // Show resulting histograms
  histElectronPT->Draw();
}

More advanced macro-based analysis

The 'examples' directory contains ROOT macros Example1.C, Example2.C and Example3.C.

Here are the commands to run these ROOT macros:

   root -l
   .X examples/Example1.C("delphes_output.root");

or

   root -l examples/Example1.C'("delphes_output.root")'
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].