Index: readers/DelphesCMSFWLite.cpp
===================================================================
--- readers/DelphesCMSFWLite.cpp	(revision 28863286681620d75def662f60ac0ea2a0c098e4)
+++ readers/DelphesCMSFWLite.cpp	(revision 6455202899ab4afd733c9cc0b4d78dd392cbb843)
@@ -18,42 +18,42 @@
 
 #include <algorithm>
+#include <iostream>
+#include <memory>
+#include <sstream>
 #include <stdexcept>
-#include <iostream>
-#include <sstream>
-#include <memory>
 
 #include <map>
 #include <vector>
 
-#include <stdlib.h>
 #include <signal.h>
 #include <stdio.h>
-
+#include <stdlib.h>
+
+#include "TApplication.h"
 #include "TROOT.h"
-#include "TApplication.h"
-
+
+#include "TDatabasePDG.h"
 #include "TFile.h"
+#include "TLorentzVector.h"
 #include "TObjArray.h"
+#include "TParticlePDG.h"
 #include "TStopwatch.h"
-#include "TDatabasePDG.h"
-#include "TParticlePDG.h"
-#include "TLorentzVector.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/ExRootProgressBar.h"
+#include "ExRootAnalysis/ExRootTreeBranch.h"
 #include "ExRootAnalysis/ExRootTreeWriter.h"
-#include "ExRootAnalysis/ExRootTreeBranch.h"
-#include "ExRootAnalysis/ExRootProgressBar.h"
-
-#include "FWCore/FWLite/interface/FWLiteEnabler.h"
+
 #include "DataFormats/FWLite/interface/Event.h"
 #include "DataFormats/FWLite/interface/Handle.h"
 #include "DataFormats/HepMCCandidate/interface/GenParticle.h"
 #include "DataFormats/PatCandidates/interface/PackedGenParticle.h"
+#include "FWCore/FWLite/interface/FWLiteEnabler.h"
+#include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h"
 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
-#include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h"
 #include "SimDataFormats/GeneratorProducts/interface/LHEEventProduct.h"
 #include "SimDataFormats/GeneratorProducts/interface/WeightsInfo.h"
@@ -69,14 +69,14 @@
 {
 
-  fwlite::Handle< GenEventInfoProduct > handleGenEventInfo;
-  fwlite::Handle< LHEEventProduct > handleLHEEvent;
-  fwlite::Handle< vector< reco::GenParticle > > handleParticle;
-  fwlite::Handle< vector< pat::PackedGenParticle > > handlePackedParticle;
-
-  vector< reco::GenParticle >::const_iterator itParticle;
-  vector< pat::PackedGenParticle >::const_iterator itPackedParticle;
-
-  vector< const reco::Candidate * > vectorCandidate;
-  vector< const reco::Candidate * >::iterator itCandidate;
+  fwlite::Handle<GenEventInfoProduct> handleGenEventInfo;
+  fwlite::Handle<LHEEventProduct> handleLHEEvent;
+  fwlite::Handle<vector<reco::GenParticle>> handleParticle;
+  fwlite::Handle<vector<pat::PackedGenParticle>> handlePackedParticle;
+
+  vector<reco::GenParticle>::const_iterator itParticle;
+  vector<pat::PackedGenParticle>::const_iterator itPackedParticle;
+
+  vector<const reco::Candidate *> vectorCandidate;
+  vector<const reco::Candidate *>::iterator itCandidate;
 
   handleGenEventInfo.getByLabel(event, "generator");
@@ -99,5 +99,5 @@
     handleParticle.getByLabel(event, "genParticles");
   }
-  else if(!((handlePackedParticle.getBranchNameFor(event, "packedGenParticles")).empty()) && !((handleParticle.getBranchNameFor(event,"prunedGenParticles")).empty()))
+  else if(!((handlePackedParticle.getBranchNameFor(event, "packedGenParticles")).empty()) && !((handleParticle.getBranchNameFor(event, "prunedGenParticles")).empty()))
   {
     handleParticle.getByLabel(event, "prunedGenParticles");
@@ -106,10 +106,10 @@
   else
   {
-    std::cout<<"Wrong GenParticle Label! Please, check the input file."<<std::endl;
+    std::cout << "Wrong GenParticle Label! Please, check the input file." << std::endl;
     exit(-1);
   }
 
   Bool_t foundLHE = !((handleLHEEvent.getBranchNameFor(event, "source")).empty()) || !((handleLHEEvent.getBranchNameFor(event, "externalLHEProducer")).empty());
-  Bool_t isMiniAOD = !((handlePackedParticle.getBranchNameFor(event, "packedGenParticles")).empty()) && ((handleParticle.getBranchNameFor(event, "genParticles")).empty()) ;
+  Bool_t isMiniAOD = !((handlePackedParticle.getBranchNameFor(event, "packedGenParticles")).empty()) && ((handleParticle.getBranchNameFor(event, "genParticles")).empty());
 
   HepMCEvent *element;
@@ -148,6 +148,6 @@
   if(foundLHE)
   {
-    const vector< gen::WeightsInfo > &vectorWeightsInfo = handleLHEEvent->weights();
-    vector< gen::WeightsInfo >::const_iterator itWeightsInfo;
+    const vector<gen::WeightsInfo> &vectorWeightsInfo = handleLHEEvent->weights();
+    vector<gen::WeightsInfo>::const_iterator itWeightsInfo;
 
     for(itWeightsInfo = vectorWeightsInfo.begin(); itWeightsInfo != vectorWeightsInfo.end(); ++itWeightsInfo)
@@ -173,6 +173,12 @@
     status = particle.status();
     if(isMiniAOD && particle.status() == 1) continue;
-    px = particle.px(); py = particle.py(); pz = particle.pz(); e = particle.energy(); mass = particle.mass();
-    x = particle.vx(); y = particle.vy(); z = particle.vz();
+    px = particle.px();
+    py = particle.py();
+    pz = particle.pz();
+    e = particle.energy();
+    mass = particle.mass();
+    x = particle.vx();
+    y = particle.vy();
+    z = particle.vz();
 
     candidate = factory->NewCandidate();
@@ -196,10 +202,10 @@
 
     pdgParticle = pdg->GetParticle(pid);
-    candidate->Charge = pdgParticle ? Int_t(pdgParticle->Charge()/3.0) : -999;
+    candidate->Charge = pdgParticle ? Int_t(pdgParticle->Charge() / 3.0) : -999;
     candidate->Mass = mass;
 
     candidate->Momentum.SetPxPyPzE(px, py, pz, e);
 
-    candidate->Position.SetXYZT(x*10.0, y*10.0, z*10.0, 0.0);
+    candidate->Position.SetXYZT(x * 10.0, y * 10.0, z * 10.0, 0.0);
 
     allParticleOutputArray->Add(candidate);
@@ -232,6 +238,12 @@
     pid = particle.pdgId();
     status = particle.status();
-    px = particle.px(); py = particle.py(); pz = particle.pz(); e = particle.energy(); mass = particle.mass();
-    x = particle.vx(); y = particle.vy(); z = particle.vz();
+    px = particle.px();
+    py = particle.py();
+    pz = particle.pz();
+    e = particle.energy();
+    mass = particle.mass();
+    x = particle.vx();
+    y = particle.vy();
+    z = particle.vz();
 
     candidate = factory->NewCandidate();
@@ -255,10 +267,10 @@
 
     pdgParticle = pdg->GetParticle(pid);
-    candidate->Charge = pdgParticle ? Int_t(pdgParticle->Charge()/3.0) : -999;
+    candidate->Charge = pdgParticle ? Int_t(pdgParticle->Charge() / 3.0) : -999;
     candidate->Mass = mass;
 
     candidate->Momentum.SetPxPyPzE(px, py, pz, e);
 
-    candidate->Position.SetXYZT(x*10.0, y*10.0, z*10.0, 0.0);
+    candidate->Position.SetXYZT(x * 10.0, y * 10.0, z * 10.0, 0.0);
 
     allParticleOutputArray->Add(candidate);
@@ -303,5 +315,7 @@
   if(argc < 4)
   {
-    cout << " Usage: " << appName << " config_file" << " output_file" << " input_file(s)" << endl;
+    cout << " Usage: " << appName << " config_file"
+         << " output_file"
+         << " input_file(s)" << endl;
     cout << " config_file - configuration file in Tcl format," << endl;
     cout << " output_file - output file in ROOT format," << endl;
