Index: modules/PileUpMerger.cc
===================================================================
--- modules/PileUpMerger.cc	(revision 3e2bb2b248f2524cb711b26e4232a990c4211148)
+++ modules/PileUpMerger.cc	(revision 341014c3f3bd3259d845de52bde54ba6c3b4ed08)
@@ -29,23 +29,23 @@
 #include "classes/DelphesClasses.h"
 #include "classes/DelphesFactory.h"
+#include "classes/DelphesPileUpReader.h"
 #include "classes/DelphesTF2.h"
-#include "classes/DelphesPileUpReader.h"
-
+
+#include "ExRootAnalysis/ExRootClassifier.h"
+#include "ExRootAnalysis/ExRootFilter.h"
 #include "ExRootAnalysis/ExRootResult.h"
-#include "ExRootAnalysis/ExRootFilter.h"
-#include "ExRootAnalysis/ExRootClassifier.h"
-
+
+#include "TDatabasePDG.h"
+#include "TFormula.h"
+#include "TLorentzVector.h"
 #include "TMath.h"
+#include "TObjArray.h"
+#include "TRandom3.h"
 #include "TString.h"
-#include "TFormula.h"
-#include "TRandom3.h"
-#include "TObjArray.h"
-#include "TDatabasePDG.h"
-#include "TLorentzVector.h"
 
 #include <algorithm>
-#include <stdexcept>
 #include <iostream>
 #include <sstream>
+#include <stdexcept>
 
 using namespace std;
@@ -59,5 +59,4 @@
 }
 
-
 //------------------------------------------------------------------------------
 
@@ -75,5 +74,5 @@
   fPileUpDistribution = GetInt("PileUpDistribution", 0);
 
-  fMeanPileUp  = GetDouble("MeanPileUp", 10);
+  fMeanPileUp = GetDouble("MeanPileUp", 10);
 
   fZVertexSpread = GetDouble("ZVertexSpread", 0.15);
@@ -135,5 +134,5 @@
   dt0 = -1.0e6;
 
-  dt *= c_light*1.0E3; // necessary in order to make t in mm/c
+  dt *= c_light * 1.0E3; // necessary in order to make t in mm/c
   dz *= 1.0E3; // necessary in order to make z in mm
 
@@ -150,5 +149,5 @@
   vertex = factory->NewCandidate();
 
-  while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
+  while((candidate = static_cast<Candidate *>(fItInputArray->Next())))
   {
     vx += candidate->Position.X();
@@ -159,7 +158,7 @@
 
     // take postion and time from first stable particle
-    if (dz0 < -999999.0)
+    if(dz0 < -999999.0)
       dz0 = z;
-    if (dt0 < -999999.0)
+    if(dt0 < -999999.0)
       dt0 = t;
 
@@ -172,8 +171,8 @@
     fParticleOutputArray->Add(candidate);
 
-    if(TMath::Abs(candidate->Charge) >  1.0E-9)
+    if(TMath::Abs(candidate->Charge) > 1.0E-9)
     {
       nch++;
-      sumpt2 += pt*pt;
+      sumpt2 += pt * pt;
       vertex->AddCandidate(candidate);
     }
@@ -198,20 +197,19 @@
   switch(fPileUpDistribution)
   {
-    case 0:
-      numberOfEvents = gRandom->Poisson(fMeanPileUp);
-      break;
-    case 1:
-      numberOfEvents = gRandom->Integer(2*fMeanPileUp + 1);
-      break;
-    case 2:
-      numberOfEvents = fMeanPileUp;
-      break;
-    default:
-      numberOfEvents = gRandom->Poisson(fMeanPileUp);
-      break;
+  case 0:
+    numberOfEvents = gRandom->Poisson(fMeanPileUp);
+    break;
+  case 1:
+    numberOfEvents = gRandom->Integer(2 * fMeanPileUp + 1);
+    break;
+  case 2:
+    numberOfEvents = fMeanPileUp;
+    break;
+  default:
+    numberOfEvents = gRandom->Poisson(fMeanPileUp);
+    break;
   }
 
   allEntries = fReader->GetEntries();
-
 
   for(event = 0; event < numberOfEvents; ++event)
@@ -219,15 +217,14 @@
     do
     {
-      entry = TMath::Nint(gRandom->Rndm()*allEntries);
-    }
-    while(entry >= allEntries);
+      entry = TMath::Nint(gRandom->Rndm() * allEntries);
+    } while(entry >= allEntries);
 
     fReader->ReadEntry(entry);
 
-   // --- Pile-up vertex smearing
+    // --- Pile-up vertex smearing
 
     fFunction->GetRandom2(dz, dt);
 
-    dt *= c_light*1.0E3; // necessary in order to make t in mm/c
+    dt *= c_light * 1.0E3; // necessary in order to make t in mm/c
     dz *= 1.0E3; // necessary in order to make z in mm
 
@@ -252,5 +249,5 @@
 
       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 = pdgParticle ? pdgParticle->Mass() : -999.9;
 
@@ -271,8 +268,8 @@
 
       ++numberOfParticles;
-      if(TMath::Abs(candidate->Charge) >  1.0E-9)
+      if(TMath::Abs(candidate->Charge) > 1.0E-9)
       {
         nch++;
-        sumpt2 += pt*pt;
+        sumpt2 += pt * pt;
         vertex->AddCandidate(candidate);
       }
@@ -299,5 +296,4 @@
 
     fVertexOutputArray->Add(vertex);
-
   }
 }
