Index: converters/CMakeLists.txt
===================================================================
--- converters/CMakeLists.txt	(revision 4564cba9fa0180ca6c293da8cea545291a6d0116)
+++ 	(revision )
@@ -1,14 +1,0 @@
-include_directories(
-  ${CMAKE_SOURCE_DIR}
-  ${DelphesExternals_INCLUDE_DIR} 
-)
-
-# add all executables as targets
-file(GLOB executables RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
-
-foreach(sourcefile ${executables})
-  string(REPLACE ".cpp" "" name ${sourcefile})
-  add_executable(${name} ${sourcefile})
-  target_link_libraries(${name} Delphes)
-  install(TARGETS ${name} DESTINATION bin)
-endforeach()
Index: converters/hepmc2pileup.cpp
===================================================================
--- converters/hepmc2pileup.cpp	(revision 4564cba9fa0180ca6c293da8cea545291a6d0116)
+++ converters/hepmc2pileup.cpp	(revision d7d2da362406b9e37fdf238970417c94779b54b0)
@@ -1,44 +1,26 @@
-/*
- *  Delphes: a framework for fast simulation of a generic collider experiment
- *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
- *
- *  This program is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
+#include <stdexcept>
 #include <iostream>
 #include <sstream>
-#include <stdexcept>
 
 #include <signal.h>
 
+#include "TROOT.h"
 #include "TApplication.h"
-#include "TROOT.h"
 
+#include "TFile.h"
+#include "TObjArray.h"
+#include "TStopwatch.h"
 #include "TDatabasePDG.h"
-#include "TFile.h"
+#include "TParticlePDG.h"
 #include "TLorentzVector.h"
-#include "TObjArray.h"
-#include "TParticlePDG.h"
-#include "TStopwatch.h"
 
 #include "classes/DelphesClasses.h"
 #include "classes/DelphesFactory.h"
-#include "classes/DelphesHepMC2Reader.h"
+#include "classes/DelphesHepMCReader.h"
 #include "classes/DelphesPileUpWriter.h"
 
+#include "ExRootAnalysis/ExRootTreeWriter.h"
+#include "ExRootAnalysis/ExRootTreeBranch.h"
 #include "ExRootAnalysis/ExRootProgressBar.h"
-#include "ExRootAnalysis/ExRootTreeBranch.h"
-#include "ExRootAnalysis/ExRootTreeWriter.h"
 
 using namespace std;
@@ -65,5 +47,5 @@
   Candidate *candidate = 0;
   DelphesPileUpWriter *writer = 0;
-  DelphesHepMC2Reader *reader = 0;
+  DelphesHepMCReader *reader = 0;
   Int_t i;
   Long64_t length, eventCounter;
@@ -71,6 +53,5 @@
   if(argc < 2)
   {
-    cout << " Usage: " << appName << " output_file"
-         << " [input_file(s)]" << endl;
+    cout << " Usage: " << appName << " output_file" << " [input_file(s)]" << endl;
     cout << " output_file - output binary pile-up file," << endl;
     cout << " input_file(s) - input file(s) in HepMC format," << endl;
@@ -98,5 +79,5 @@
     itParticle = stableParticleOutputArray->MakeIterator();
 
-    reader = new DelphesHepMC2Reader;
+    reader = new DelphesHepMCReader;
 
     i = 2;
@@ -143,6 +124,5 @@
       reader->Clear();
       while(reader->ReadBlock(factory, allParticleOutputArray,
-              stableParticleOutputArray, partonOutputArray)
-        && !interrupted)
+        stableParticleOutputArray, partonOutputArray) && !interrupted)
       {
         if(reader->EventReady())
@@ -151,5 +131,5 @@
 
           itParticle->Reset();
-          while((candidate = static_cast<Candidate *>(itParticle->Next())))
+          while((candidate = static_cast<Candidate*>(itParticle->Next())))
           {
             const TLorentzVector &position = candidate->Position;
@@ -175,5 +155,6 @@
 
       ++i;
-    } while(i < argc);
+    }
+    while(i < argc);
 
     writer->WriteIndex();
Index: converters/lhco2root.cpp
===================================================================
--- converters/lhco2root.cpp	(revision 4564cba9fa0180ca6c293da8cea545291a6d0116)
+++ converters/lhco2root.cpp	(revision d7d2da362406b9e37fdf238970417c94779b54b0)
@@ -1,50 +1,32 @@
-/*
- *  Delphes: a framework for fast simulation of a generic collider experiment
- *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
- *
- *  This program is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
+#include <stdexcept>
 #include <iostream>
 #include <sstream>
-#include <stdexcept>
-
+
+#include <stdlib.h>
 #include <signal.h>
 #include <stdio.h>
-#include <stdlib.h>
-
+
+#include "TROOT.h"
 #include "TApplication.h"
-#include "TROOT.h"
-
+
+#include "TFile.h"
+#include "TObjArray.h"
+#include "TStopwatch.h"
 #include "TDatabasePDG.h"
-#include "TFile.h"
+#include "TParticlePDG.h"
 #include "TLorentzVector.h"
-#include "TObjArray.h"
-#include "TParticlePDG.h"
-#include "TStopwatch.h"
-
+
+#include "modules/Delphes.h"
+#include "classes/DelphesStream.h"
 #include "classes/DelphesClasses.h"
 #include "classes/DelphesFactory.h"
-#include "classes/DelphesStream.h"
-#include "modules/Delphes.h"
-
+
+#include "ExRootAnalysis/ExRootTreeWriter.h"
+#include "ExRootAnalysis/ExRootTreeBranch.h"
 #include "ExRootAnalysis/ExRootProgressBar.h"
-#include "ExRootAnalysis/ExRootTreeBranch.h"
-#include "ExRootAnalysis/ExRootTreeWriter.h"
 
 using namespace std;
 
-static const int kBufferSize = 1024;
+static const int kBufferSize  = 1024;
 
 /*
@@ -74,4 +56,5 @@
 
 private:
+
   void AddMissingEvents();
 
@@ -85,9 +68,5 @@
   void AnalyseMissingET(ExRootTreeBranch *branch);
 
-  enum
-  {
-    kIntParamSize = 2,
-    kDblParamSize = 7
-  };
+  enum {kIntParamSize = 2, kDblParamSize = 7};
   Int_t fIntParam[kIntParamSize];
   Double_t fDblParam[kDblParamSize];
@@ -109,4 +88,5 @@
   ExRootTreeBranch *fBranchJet;
   ExRootTreeBranch *fBranchMissingET;
+
 };
 
@@ -171,6 +151,5 @@
     if(!rc)
     {
-      cerr << "** ERROR: "
-           << "invalid event format" << endl;
+      cerr << "** ERROR: " << "invalid event format" << endl;
       return kFALSE;
     }
@@ -198,6 +177,5 @@
     if(!rc)
     {
-      cerr << "** ERROR: "
-           << "invalid object format" << endl;
+      cerr << "** ERROR: " << "invalid object format" << endl;
       return kFALSE;
     }
@@ -205,10 +183,10 @@
     switch(fIntParam[1])
     {
-    case 0: AnalysePhoton(fBranchPhoton); break;
-    case 1: AnalyseElectron(fBranchElectron); break;
-    case 2: AnalyseMuon(fBranchMuon); break;
-    case 3: AnalyseTau(fBranchJet); break;
-    case 4: AnalyseJet(fBranchJet); break;
-    case 6: AnalyseMissingET(fBranchMissingET); break;
+      case 0: AnalysePhoton(fBranchPhoton); break;
+      case 1: AnalyseElectron(fBranchElectron); break;
+      case 2: AnalyseMuon(fBranchMuon); break;
+      case 3: AnalyseTau(fBranchJet); break;
+      case 4: AnalyseJet(fBranchJet); break;
+      case 6: AnalyseMissingET(fBranchMissingET); break;
     }
   }
@@ -232,5 +210,5 @@
   LHCOEvent *element;
 
-  element = static_cast<LHCOEvent *>(branch->NewEntry());
+  element = static_cast<LHCOEvent*>(branch->NewEntry());
 
   element->Number = fEventNumber;
@@ -244,5 +222,5 @@
   Photon *element;
 
-  element = static_cast<Photon *>(branch->NewEntry());
+  element = static_cast<Photon*>(branch->NewEntry());
 
   element->Eta = fDblParam[0];
@@ -258,5 +236,5 @@
   Electron *element;
 
-  element = static_cast<Electron *>(branch->NewEntry());
+  element = static_cast<Electron*>(branch->NewEntry());
 
   element->Eta = fDblParam[0];
@@ -265,5 +243,5 @@
 
   element->Charge = fDblParam[4] < 0.0 ? -1 : 1;
-  /*
+/*
   element->Ntrk = TMath::Abs(fDblParam[4]);
 */
@@ -277,5 +255,5 @@
   Muon *element;
 
-  element = static_cast<Muon *>(branch->NewEntry());
+  element = static_cast<Muon*>(branch->NewEntry());
 
   element->Eta = fDblParam[0];
@@ -284,5 +262,5 @@
 
   element->Charge = fDblParam[4] < 0.0 ? -1 : 1;
-  /*
+/*
   element->Ntrk = TMath::Abs(fDblParam[4]);
 
@@ -300,5 +278,5 @@
   Jet *element;
 
-  element = static_cast<Jet *>(branch->NewEntry());
+  element = static_cast<Jet*>(branch->NewEntry());
 
   element->Eta = fDblParam[0];
@@ -312,5 +290,5 @@
 
   element->Charge = fDblParam[4] < 0 ? -1 : 1;
-  /*
+/*
   element->Ntrk = TMath::Abs(fDblParam[4]);
 */
@@ -324,5 +302,5 @@
   Jet *element;
 
-  element = static_cast<Jet *>(branch->NewEntry());
+  element = static_cast<Jet*>(branch->NewEntry());
 
   element->Eta = fDblParam[0];
@@ -331,5 +309,5 @@
 
   element->Mass = fDblParam[3];
-  /*
+/*
   element->Ntrk = TMath::Abs(Int_t(fDblParam[4]));
 */
@@ -340,5 +318,5 @@
 
   element->EhadOverEem = fDblParam[6];
-  /*
+/*
   element->Index = fIntParam[0];
 */
@@ -351,5 +329,5 @@
   MissingET *element;
 
-  element = static_cast<MissingET *>(branch->NewEntry());
+  element = static_cast<MissingET*>(branch->NewEntry());
 
   element->Phi = fDblParam[1];
@@ -380,6 +358,5 @@
   if(argc < 2)
   {
-    cout << " Usage: " << appName << " output_file"
-         << " [input_file(s)]" << endl;
+    cout << " Usage: " << appName << " output_file" << " [input_file(s)]" << endl;
     cout << " output_file - output file in ROOT format," << endl;
     cout << " input_file(s) - input file(s) in LHCO format," << endl;
@@ -461,5 +438,6 @@
 
       ++i;
-    } while(i < argc);
+    }
+    while(i < argc);
 
     cout << "** Exiting..." << endl;
@@ -478,2 +456,4 @@
   }
 }
+
+
Index: converters/pileup2root.cpp
===================================================================
--- converters/pileup2root.cpp	(revision 4564cba9fa0180ca6c293da8cea545291a6d0116)
+++ converters/pileup2root.cpp	(revision d7d2da362406b9e37fdf238970417c94779b54b0)
@@ -1,46 +1,32 @@
-/*
- *  Delphes: a framework for fast simulation of a generic collider experiment
- *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
- *
- *  This program is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
 
+#include <stdexcept>
 #include <iostream>
 #include <sstream>
-#include <stdexcept>
 
+#include <stdlib.h>
 #include <signal.h>
 #include <stdio.h>
-#include <stdlib.h>
 
+#include <rpc/types.h>
+#include <rpc/xdr.h>
+
+#include "TROOT.h"
 #include "TApplication.h"
-#include "TROOT.h"
 
+#include "TFile.h"
+#include "TObjArray.h"
+#include "TStopwatch.h"
 #include "TDatabasePDG.h"
-#include "TFile.h"
+#include "TParticlePDG.h"
 #include "TLorentzVector.h"
-#include "TObjArray.h"
-#include "TParticlePDG.h"
-#include "TStopwatch.h"
 
+#include "classes/DelphesStream.h"
 #include "classes/DelphesClasses.h"
 #include "classes/DelphesFactory.h"
 #include "classes/DelphesPileUpReader.h"
-#include "classes/DelphesStream.h"
 
+#include "ExRootAnalysis/ExRootTreeWriter.h"
+#include "ExRootAnalysis/ExRootTreeBranch.h"
 #include "ExRootAnalysis/ExRootProgressBar.h"
-#include "ExRootAnalysis/ExRootTreeBranch.h"
-#include "ExRootAnalysis/ExRootTreeWriter.h"
 
 using namespace std;
@@ -61,5 +47,5 @@
   while(reader->ReadParticle(pid, x, y, z, t, px, py, pz, e))
   {
-    particle = static_cast<GenParticle *>(branch->NewEntry());
+    particle = static_cast<GenParticle*>(branch->NewEntry());
 
     particle->PID = pid;
@@ -83,5 +69,5 @@
 
     pdgParticle = pdg->GetParticle(pid);
-    particle->Charge = pdgParticle ? Int_t(pdgParticle->Charge() / 3.0) : -999;
+    particle->Charge = pdgParticle ? Int_t(pdgParticle->Charge()/3.0) : -999;
 
     particle->Mass = pdgParticle ? pdgParticle->Mass() : -999.9;
@@ -91,6 +77,6 @@
     cosTheta = TMath::Abs(momentum.CosTheta());
     signPz = (momentum.Pz() >= 0.0) ? 1.0 : -1.0;
-    eta = (cosTheta == 1.0 ? signPz * 999.9 : momentum.Eta());
-    rapidity = (cosTheta == 1.0 ? signPz * 999.9 : momentum.Rapidity());
+    eta = (cosTheta == 1.0 ? signPz*999.9 : momentum.Eta());
+    rapidity = (cosTheta == 1.0 ? signPz*999.9 : momentum.Rapidity());
 
     particle->Eta = eta;
@@ -125,6 +111,5 @@
   if(argc != 3)
   {
-    cout << " Usage: " << appName << " output_file"
-         << " input_file" << endl;
+    cout << " Usage: " << appName << " output_file" << " input_file" << endl;
     cout << " output_file - output file in ROOT format," << endl;
     cout << " input_file - input binary pile-up file." << endl;
@@ -199,2 +184,4 @@
   }
 }
+
+
Index: converters/root2lhco.cpp
===================================================================
--- converters/root2lhco.cpp	(revision 4564cba9fa0180ca6c293da8cea545291a6d0116)
+++ converters/root2lhco.cpp	(revision d7d2da362406b9e37fdf238970417c94779b54b0)
@@ -1,40 +1,22 @@
-/*
- *  Delphes: a framework for fast simulation of a generic collider experiment
- *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
- *
- *  This program is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
+#include <stdexcept>
+#include <iostream>
 #include <fstream>
-#include <iostream>
 #include <sstream>
-#include <stdexcept>
 #include <string>
 
+#include <stdlib.h>
 #include <signal.h>
 #include <stdio.h>
-#include <stdlib.h>
-
+
+#include "TROOT.h"
 #include "TApplication.h"
-#include "TROOT.h"
-
+
+#include "TFile.h"
 #include "TClonesArray.h"
-#include "TFile.h"
 
 #include "classes/DelphesClasses.h"
 
+#include "ExRootAnalysis/ExRootTreeReader.h"
 #include "ExRootAnalysis/ExRootProgressBar.h"
-#include "ExRootAnalysis/ExRootTreeReader.h"
 
 using namespace std;
@@ -56,5 +38,5 @@
 {
 public:
-  LHCOWriter(ExRootTreeReader *treeReader, FILE *outputFile, string JetBranchName);
+  LHCOWriter(ExRootTreeReader *treeReader, FILE *outputFile);
   ~LHCOWriter();
 
@@ -62,4 +44,5 @@
 
 private:
+
   void Reset();
   void Write();
@@ -75,9 +58,5 @@
   void AnalyseMissingET();
 
-  enum
-  {
-    kIntParamSize = 2,
-    kDblParamSize = 9
-  };
+  enum {kIntParamSize = 2, kDblParamSize = 9};
   Int_t fIntParam[kIntParamSize];
   Double_t fDblParam[kDblParamSize];
@@ -110,8 +89,6 @@
 //------------------------------------------------------------------------------
 
-LHCOWriter::LHCOWriter(ExRootTreeReader *treeReader, FILE *outputFile, string jetBranchName) :
-  fTriggerWord(0), fEventNumber(1), fTreeReader(0), fOutputFile(0),
-  fBranchEvent(0), fBranchTrack(0), fBranchTower(0), fBranchPhoton(0),
-  fBranchElectron(0), fBranchMuon(0), fBranchJet(0), fBranchMissingET(0)
+LHCOWriter::LHCOWriter(ExRootTreeReader *treeReader, FILE *outputFile) :
+  fTriggerWord(0), fEventNumber(1), fTreeReader(0), fOutputFile(0)
 {
   fTreeReader = treeReader;
@@ -122,28 +99,22 @@
   // reconstructed tracks
   fBranchTrack = fTreeReader->UseBranch("Track");
+  fItTrack = fBranchTrack->MakeIterator();
   // calorimeter towers
   fBranchTower = fTreeReader->UseBranch("Tower");
+  fItTower = fBranchTower->MakeIterator();
   // reconstructed photons
   fBranchPhoton = fTreeReader->UseBranch("Photon");
+  fItPhoton = fBranchPhoton->MakeIterator();
   // reconstructed electrons
   fBranchElectron = fTreeReader->UseBranch("Electron");
+  fItElectron = fBranchElectron->MakeIterator();
   // reconstructed muons
   fBranchMuon = fTreeReader->UseBranch("Muon");
+  fItMuon = fBranchMuon->MakeIterator();
   // reconstructed jets
-  fBranchJet = fTreeReader->UseBranch(jetBranchName.c_str());
+  fBranchJet = fTreeReader->UseBranch("Jet");
+  fItJet = fBranchJet->MakeIterator();
   // missing transverse energy
   fBranchMissingET = fTreeReader->UseBranch("MissingET");
-
-  if(!fBranchEvent || !fBranchTrack || !fBranchTower || !fBranchPhoton || !fBranchElectron || !fBranchMuon || !fBranchJet || !fBranchMissingET)
-  {
-    throw runtime_error("ROOT file doesn't contain all required branches");
-  }
-
-  fItTrack = fBranchTrack->MakeIterator();
-  fItTower = fBranchTower->MakeIterator();
-  fItPhoton = fBranchPhoton->MakeIterator();
-  fItElectron = fBranchElectron->MakeIterator();
-  fItMuon = fBranchMuon->MakeIterator();
-  fItJet = fBranchJet->MakeIterator();
 }
 
@@ -204,5 +175,5 @@
   Event *element;
 
-  element = static_cast<Event *>(fBranchEvent->At(0));
+  element = static_cast<Event*>(fBranchEvent->At(0));
 
   fprintf(fOutputFile, "%4d %13lld %8d\n", 0, element->Number, 0);
@@ -218,5 +189,5 @@
 
   fItPhoton->Reset();
-  while((element = static_cast<Photon *>(fItPhoton->Next())))
+  while((element = static_cast<Photon*>(fItPhoton->Next())))
   {
     Reset();
@@ -241,5 +212,5 @@
 
   fItElectron->Reset();
-  while((element = static_cast<Electron *>(fItElectron->Next())))
+  while((element = static_cast<Electron*>(fItElectron->Next())))
   {
     Reset();
@@ -272,5 +243,5 @@
   muonCounter = 0;
   fItMuon->Reset();
-  while((element = static_cast<Muon *>(fItMuon->Next())))
+  while((element = static_cast<Muon*>(fItMuon->Next())))
   {
     Reset();
@@ -278,5 +249,5 @@
     sumPT = 0.0;
     fItTrack->Reset();
-    while((track = static_cast<Track *>(fItTrack->Next())))
+    while((track = static_cast<Track*>(fItTrack->Next())))
     {
       if(element->P4().DeltaR(track->P4()) < 0.5) sumPT += track->PT;
@@ -285,5 +256,5 @@
     sumET = 0.0;
     fItTower->Reset();
-    while((tower = static_cast<Tower *>(fItTower->Next())))
+    while((tower = static_cast<Tower*>(fItTower->Next())))
     {
       if(element->P4().DeltaR(tower->P4()) < 0.5) sumET += tower->ET;
@@ -295,5 +266,5 @@
     minDR = 1.0E9;
     fItJet->Reset();
-    while((jet = static_cast<Jet *>(fItJet->Next())))
+    while((jet = static_cast<Jet*>(fItJet->Next())))
     {
       if(jet->TauTag != 0)
@@ -327,5 +298,5 @@
     }
 
-    ratET = sumET / element->PT;
+    ratET = sumET/element->PT;
     fDblParam[6] = Float_t(TMath::Nint(sumPT)) + (ratET < 1.0 ? ratET : 0.99);
 
@@ -344,5 +315,5 @@
 
   fItJet->Reset();
-  while((element = static_cast<Jet *>(fItJet->Next())))
+  while((element = static_cast<Jet*>(fItJet->Next())))
   {
     if(element->TauTag == 0) continue;
@@ -350,7 +321,5 @@
     Reset();
 
-    counter = 1;
-
-    /*
+    counter = 0;
     fItTrack->Reset();
     while((track = static_cast<Track*>(fItTrack->Next())))
@@ -358,5 +327,5 @@
       if(element->P4().DeltaR(track->P4()) < 0.5) ++counter;
     }
-   */
+
     fIntParam[1] = 3;
 
@@ -382,5 +351,5 @@
 
   fItJet->Reset();
-  while((element = static_cast<Jet *>(fItJet->Next())))
+  while((element = static_cast<Jet*>(fItJet->Next())))
   {
     if(element->TauTag != 0) continue;
@@ -390,5 +359,5 @@
     counter = 0;
     fItTrack->Reset();
-    while((track = static_cast<Track *>(fItTrack->Next())))
+    while((track = static_cast<Track*>(fItTrack->Next())))
     {
       if(element->P4().DeltaR(track->P4()) < 0.5) ++counter;
@@ -415,5 +384,5 @@
   MissingET *element;
 
-  element = static_cast<MissingET *>(fBranchMissingET->At(0));
+  element = static_cast<MissingET*>(fBranchMissingET->At(0));
 
   Reset();
@@ -438,27 +407,6 @@
 //---------------------------------------------------------------------------
 
-vector<string> ArgSplitter(char *arg)
-{
-  string s = arg;
-  string delimiter = "=";
-  vector<string> result;
-  size_t first = 0, last = 0;
-
-  while((last = s.find(delimiter, first)) != string::npos)
-  {
-    result.push_back(s.substr(first, last - first));
-    first = last + delimiter.length();
-  }
-
-  result.push_back(s.substr(first, last));
-
-  return result;
-}
-
-//---------------------------------------------------------------------------
-
 int main(int argc, char *argv[])
 {
-  int i, j;
   char appName[] = "root2lhco";
   stringstream message;
@@ -468,34 +416,13 @@
   ExRootTreeReader *treeReader = 0;
   Long64_t entry, allEntries;
-  string jetBranchName = "Jet";
-  vector<string> result;
-
-  if(argc < 2 || argc > 4)
-  {
-    cerr << " Usage: " << appName << " input_file"
-         << " [output_file] [--jet-branch=Jet]" << endl;
-    cerr << " input_file - input file in ROOT format," << endl;
-    cerr << " output_file - output file in LHCO format," << endl;
-    cerr << " with no output_file, or when output_file is -, write to standard output." << endl;
+
+  if(argc < 2 || argc > 3)
+  {
+    cout << " Usage: " << appName << " input_file" << " [output_file]" << endl;
+    cout << " input_file - input file in ROOT format," << endl;
+    cout << " output_file - output file in LHCO format," << endl;
+    cout << " with no output_file, or when output_file is -, write to standard output." << endl;
     return 1;
   }
-
-  i = 2;
-  while(i < argc)
-  {
-    result = ArgSplitter(argv[i]);
-
-    if(result.size() == 2 && result[0] == "--jet-branch")
-    {
-      jetBranchName = result[1];
-      for(j = i + 1; j < argc; ++j) argv[j - 1] = argv[j];
-      --argc;
-    }
-    else
-    {
-      ++i;
-    }
-  }
-  cerr << "** Using the jet branch named " << jetBranchName << endl;
 
   signal(SIGINT, SignalHandler);
@@ -509,5 +436,5 @@
   try
   {
-    cerr << "** Reading " << argv[1] << endl;
+    cout << "** Reading " << argv[1] << endl;
     inputChain = new TChain("Delphes");
     inputChain->Add(argv[1]);
@@ -530,13 +457,11 @@
     }
 
-    fprintf(outputFile, "   #  typ      eta      phi      pt    jmas   ntrk   btag  had/em   dum1   dum2\n");
-
     allEntries = treeReader->GetEntries();
-    cerr << "** Input file contains " << allEntries << " events" << endl;
+    cout << "** Input file contains " << allEntries << " events" << endl;
 
     if(allEntries > 0)
     {
       // Create LHC Olympics converter:
-      writer = new LHCOWriter(treeReader, outputFile, jetBranchName);
+      writer = new LHCOWriter(treeReader, outputFile);
 
       ExRootProgressBar progressBar(allEntries - 1);
@@ -559,5 +484,5 @@
     }
 
-    cerr << "** Exiting..." << endl;
+    cout << "** Exiting..." << endl;
 
     if(outputFile != stdout) fclose(outputFile);
@@ -575,2 +500,4 @@
   }
 }
+
+
Index: converters/root2pileup.cpp
===================================================================
--- converters/root2pileup.cpp	(revision 4564cba9fa0180ca6c293da8cea545291a6d0116)
+++ converters/root2pileup.cpp	(revision d7d2da362406b9e37fdf238970417c94779b54b0)
@@ -1,38 +1,20 @@
-/*
- *  Delphes: a framework for fast simulation of a generic collider experiment
- *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
- *
- *  This program is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
+#include <stdexcept>
 #include <iostream>
 #include <sstream>
-#include <stdexcept>
 #include <string>
 
 #include <signal.h>
 
+#include "TROOT.h"
 #include "TApplication.h"
-#include "TROOT.h"
 
+#include "TFile.h"
 #include "TClonesArray.h"
-#include "TFile.h"
 
 #include "classes/DelphesClasses.h"
 #include "classes/DelphesPileUpWriter.h"
 
+#include "ExRootAnalysis/ExRootTreeReader.h"
 #include "ExRootAnalysis/ExRootProgressBar.h"
-#include "ExRootAnalysis/ExRootTreeReader.h"
 
 using namespace std;
@@ -64,6 +46,5 @@
   if(argc < 3)
   {
-    cout << " Usage: " << appName << " output_file"
-         << " input_file(s)" << endl;
+    cout << " Usage: " << appName << " output_file" << " input_file(s)" << endl;
     cout << " output_file - output binary pile-up file," << endl;
     cout << " input_file(s) - input file(s) in ROOT format." << endl;
@@ -109,5 +90,5 @@
 
         itParticle->Reset();
-        while((particle = static_cast<GenParticle *>(itParticle->Next())))
+        while((particle = static_cast<GenParticle*>(itParticle->Next())))
         {
           writer->WriteParticle(particle->PID,
@@ -115,5 +96,5 @@
             particle->Px, particle->Py, particle->Pz, particle->E);
         }
-
+        
         writer->WriteEntry();
 
Index: converters/stdhep2pileup.cpp
===================================================================
--- converters/stdhep2pileup.cpp	(revision 4564cba9fa0180ca6c293da8cea545291a6d0116)
+++ converters/stdhep2pileup.cpp	(revision d7d2da362406b9e37fdf238970417c94779b54b0)
@@ -1,44 +1,26 @@
-/*
- *  Delphes: a framework for fast simulation of a generic collider experiment
- *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
- *
- *  This program is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation, either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
+#include <stdexcept>
 #include <iostream>
 #include <sstream>
-#include <stdexcept>
 
 #include <signal.h>
 
+#include "TROOT.h"
 #include "TApplication.h"
-#include "TROOT.h"
 
+#include "TFile.h"
+#include "TObjArray.h"
+#include "TStopwatch.h"
 #include "TDatabasePDG.h"
-#include "TFile.h"
+#include "TParticlePDG.h"
 #include "TLorentzVector.h"
-#include "TObjArray.h"
-#include "TParticlePDG.h"
-#include "TStopwatch.h"
 
 #include "classes/DelphesClasses.h"
 #include "classes/DelphesFactory.h"
+#include "classes/DelphesSTDHEPReader.h"
 #include "classes/DelphesPileUpWriter.h"
-#include "classes/DelphesSTDHEPReader.h"
 
+#include "ExRootAnalysis/ExRootTreeWriter.h"
+#include "ExRootAnalysis/ExRootTreeBranch.h"
 #include "ExRootAnalysis/ExRootProgressBar.h"
-#include "ExRootAnalysis/ExRootTreeBranch.h"
-#include "ExRootAnalysis/ExRootTreeWriter.h"
 
 using namespace std;
@@ -71,6 +53,5 @@
   if(argc < 2)
   {
-    cout << " Usage: " << appName << " output_file"
-         << " [input_file(s)]" << endl;
+    cout << " Usage: " << appName << " output_file" << " [input_file(s)]" << endl;
     cout << " output_file - output binary pile-up file," << endl;
     cout << " input_file(s) - input file(s) in STDHEP format," << endl;
@@ -114,5 +95,5 @@
       {
         cout << "** Reading " << argv[i] << endl;
-        inputFile = fopen(argv[i], "rb");
+        inputFile = fopen(argv[i], "r");
 
         if(inputFile == NULL)
@@ -143,6 +124,5 @@
       reader->Clear();
       while(reader->ReadBlock(factory, allParticleOutputArray,
-              stableParticleOutputArray, partonOutputArray)
-        && !interrupted)
+        stableParticleOutputArray, partonOutputArray) && !interrupted)
       {
         if(reader->EventReady())
@@ -151,5 +131,5 @@
 
           itParticle->Reset();
-          while((candidate = static_cast<Candidate *>(itParticle->Next())))
+          while((candidate = static_cast<Candidate*>(itParticle->Next())))
           {
             const TLorentzVector &position = candidate->Position;
@@ -175,5 +155,6 @@
 
       ++i;
-    } while(i < argc);
+    }
+    while(i < argc);
 
     writer->WriteIndex();
