Index: modules/ModulesLinkDef.h
===================================================================
--- modules/ModulesLinkDef.h	(revision 62764fb0e5e05cc717492319d6ffa7236572bffd)
+++ modules/ModulesLinkDef.h	(revision c7e90d80f05e237dd622a2aeebe9134cc02f1881)
@@ -56,7 +56,8 @@
 #include "modules/PileUpMerger.h"
 #include "modules/JetPileUpSubtractor.h"
-#include "modules/TrackTimingPileUpSubtractor.h"
+#include "modules/TrackPileUpSubtractor.h"
 #include "modules/TaggingParticlesSkimmer.h"
 #include "modules/PileUpJetID.h"
+#include "modules/PileUpSubtractor4D.h"
 #include "modules/PhotonID.h"
 #include "modules/ConstituentFilter.h"
@@ -113,7 +114,8 @@
 #pragma link C++ class PileUpMerger+;
 #pragma link C++ class JetPileUpSubtractor+;
-#pragma link C++ class TrackTimingPileUpSubtractor+;
+#pragma link C++ class TrackPileUpSubtractor+;
 #pragma link C++ class TaggingParticlesSkimmer+;
 #pragma link C++ class PileUpJetID+;
+#pragma link C++ class PileUpSubtractor4D+;
 #pragma link C++ class PhotonID+;
 #pragma link C++ class ConstituentFilter+;
Index: modules/PileUpSubtractor4D.cc
===================================================================
--- modules/PileUpSubtractor4D.cc	(revision 62764fb0e5e05cc717492319d6ffa7236572bffd)
+++ modules/PileUpSubtractor4D.cc	(revision c7e90d80f05e237dd622a2aeebe9134cc02f1881)
@@ -17,9 +17,10 @@
  */
 
-/** \class TrackPileUpSubtractor
+/** \class PileUpSubtractor4D
  *
- *  Subtract pile-up contribution from tracks.
+ *  Subtract pile-up contribution from tracks using both spatial and timing
+ *  information
  *
- *  \author P. Demin - UCL, Louvain-la-Neuve
+ *  \author M. Selvaggi - CERN
  *
  */
@@ -52,8 +53,6 @@
 //------------------------------------------------------------------------------
 
-PileUpSubtractor4D::PileUpSubtractor4D() :
-  fFormula(0)
+PileUpSubtractor4D::PileUpSubtractor4D()
 {
-  fFormula = new DelphesFormula;
 }
 
@@ -62,5 +61,4 @@
 PileUpSubtractor4D::~PileUpSubtractor4D()
 {
-  if(fFormula) delete fFormula;
 }
 
@@ -107,5 +105,4 @@
   {
     iterator = itInputMap->first;
-
     if(iterator) delete iterator;
   }
@@ -118,15 +115,14 @@
 void PileUpSubtractor4D::Process()
 {
-  Candidate *candidate, *particle;
+  Candidate *candidate;
   map<TIterator *, TObjArray *>::iterator itInputMap;
   TIterator *iterator;
   TObjArray *array;
   Double_t z, zvtx = 0;
-  Double_t z_err, zvtx_err = 0;
+  Double_t zvtx_err = 0;
   Double_t t, tvtx = 0;
-  Double_t t_err, tvtx_err = 0;
+  Double_t tvtx_err = 0;
   Double_t sumPTSquare = 0;
   Double_t tempPTSquare = 0;
-  Double_t pt, eta, phi, e;
   Double_t distanceCharged, distanceNeutral = 0;
 
@@ -144,5 +140,5 @@
       tvtx = candidate->Position.T();
       tvtx_err = candidate->PositionError.T();
-    } 
+    }
   }
 
@@ -157,16 +153,7 @@
     while((candidate = static_cast<Candidate *>(iterator->Next())))
     {
-      particle = static_cast<Candidate *>(candidate->GetCandidates()->At(0));
-      const TLorentzVector &candidateMomentum = particle->Momentum;
 
-      eta = candidateMomentum.Eta();
-      pt = candidateMomentum.Pt();
-      phi = candidateMomentum.Phi();
-      e = candidateMomentum.E();
-
-      z = particle->Position.Z();
-      z_err = particle->PositionError.Z();
-      t = particle->InitialPosition.T();
-      t_err = particle->PositionError.T();
+      z = candidate->Position.Z();
+      t = candidate->InitialPosition.T();
 
       distanceCharged = TMath::Sqrt(pow((zvtx - z),2)/pow((zvtx_err),2) + pow((tvtx - t),2)/pow((tvtx_err),2));
@@ -176,13 +163,14 @@
       {
         candidate->IsRecoPU = 0;
+        if(candidate->Momentum.Pt() > fPTMin) array->Add(candidate);
       }
       else if(candidate->Charge == 0 && distanceNeutral < fNeutralMinSignificance)
       {
         candidate->IsRecoPU = 0;
-      }  
+        if(candidate->Momentum.Pt() > fPTMin) array->Add(candidate);
+      }
       else
       {
         candidate->IsRecoPU = 1;
-        if(candidate->Momentum.Pt() > fPTMin) array->Add(candidate);
       }
     }
Index: modules/PileUpSubtractor4D.h
===================================================================
--- modules/PileUpSubtractor4D.h	(revision 62764fb0e5e05cc717492319d6ffa7236572bffd)
+++ modules/PileUpSubtractor4D.h	(revision c7e90d80f05e237dd622a2aeebe9134cc02f1881)
@@ -34,5 +34,4 @@
 class TIterator;
 class TObjArray;
-class DelphesFormula;
 
 class PileUpSubtractor4D: public DelphesModule
@@ -47,18 +46,17 @@
 
 private:
-  DelphesFormula *fFormula; //!
 
   Double_t fChargedMinSignificance;
   Double_t fNeutralMinSignificance;
-
   Double_t fPTMin;
 
   std::map<TIterator *, TObjArray *> fInputMap; //!
 
+  TIterator *fItVertexInputArray; //!
+
+  const TObjArray *fVertexInputArray; //!
+
   ClassDef(PileUpSubtractor4D, 1)
 
-    TIterator *fItVertexInputArray; //!
-
-  const TObjArray *fVertexInputArray; //!
 };
 
