Index: modules/ModulesLinkDef.h
===================================================================
--- modules/ModulesLinkDef.h	(revision 03b9c0fbe7936bb91f439038c258bdfab33241c3)
+++ modules/ModulesLinkDef.h	(revision 7939c6c21a8883c84b61cd8136732ebe7b6bba38)
@@ -38,5 +38,4 @@
 #include "modules/ImpactParameterSmearing.h"
 #include "modules/TimeSmearing.h"
-#include "modules/TimeSmearingNeutral.h"
 #include "modules/SimpleCalorimeter.h"
 #include "modules/DenseTrackFilter.h"
@@ -95,5 +94,4 @@
 #pragma link C++ class ImpactParameterSmearing+;
 #pragma link C++ class TimeSmearing+;
-#pragma link C++ class TimeSmearingNeutral+;
 #pragma link C++ class SimpleCalorimeter+;
 #pragma link C++ class DenseTrackFilter+;
Index: modules/TimeSmearing.cc
===================================================================
--- modules/TimeSmearing.cc	(revision 03b9c0fbe7936bb91f439038c258bdfab33241c3)
+++ modules/TimeSmearing.cc	(revision 7939c6c21a8883c84b61cd8136732ebe7b6bba38)
@@ -53,7 +53,6 @@
 
 TimeSmearing::TimeSmearing() :
-  fFormula(0), fItInputArray(0)
+  fItInputArray(0)
 {
-  fFormula = new DelphesFormula;
 }
 
@@ -61,6 +60,5 @@
 
 TimeSmearing::~TimeSmearing()
-{
-  if(fFormula) delete fFormula;
+{  
 }
 
@@ -71,5 +69,5 @@
   // read resolution formula
 
-  fFormula->Compile(GetString("TimeResolution", "1.0"));
+  fTimeResolution = GetDouble("TimeResolution", 1.);
 
   // import input array
@@ -77,5 +75,4 @@
   fInputArray = ImportArray(GetString("InputArray", "MuonMomentumSmearing/muons"));
   fItInputArray = fInputArray->MakeIterator();
-
   // create output array
 
@@ -95,9 +92,12 @@
 {
   Candidate *candidate, *mother;
-  Double_t ti, tf_smeared, tf, timeResolution;
-  Double_t pt, eta, phi, e, d0, dz, ctgTheta;
+  Double_t ti, tf_smeared, tf;
+  Double_t pt, eta, phi, e, p, l;
+  Double_t sigma_t, beta_particle;
 
 
   const Double_t c_light = 2.99792458E8;
+
+  cout << " STARTINNNGG ---------->" << endl;
 
   fItInputArray->Reset();
@@ -114,28 +114,29 @@
     pt = candidateMomentum.Pt();
     e = candidateMomentum.E();
-    d0 = candidate->D0;
-    dz = candidate->DZ;
-    ctgTheta = candidate->CtgTheta;
+    p = candidateMomentum.P();
+    beta_particle = p/e;
+    l = candidate->L;
+    // apply smearing formula
 
-    // apply smearing formula
-    
-    timeResolution = fFormula->Eval(pt, eta, phi, e, d0, dz, ctgTheta);
-    if(fabs(candidate->Position.Eta())<fEtaMax)
+    if(candidate->Charge != 0)
     { 
-      tf_smeared = tf + timeResolution*gRandom->Gaus(0, 1);
+      tf_smeared = tf + fTimeResolution*gRandom->Gaus(0, 1);
+      //mother = candidate;
+      //candidate = static_cast<Candidate*>(candidate->Clone());  // I am not sure that we need these lines !!!
+      //candidate->AddCandidate(mother);
+      candidate->InitialPosition.SetT((100+ti)*1.0E3*c_light);
+      candidate->Position.SetT(tf_smeared*1.0E3*c_light);
+      candidate->ErrorT = fTimeResolution*1.0E3*c_light;
+      fOutputArray->Add(candidate);
     }
-    else continue;
-
-    // double beta_particle = candidate->Momentum.P()/candidate->Momentum.E();
-    // ti = tf_smeared - candidate->Ld*1.0E-3/(c_light*beta_particle);
-
-    mother = candidate;
-    candidate = static_cast<Candidate*>(candidate->Clone());
-    candidate->AddCandidate(mother);
-    candidate->InitialPosition.SetT((100+ti)*1.0E3*c_light);
-    candidate->Position.SetT(tf_smeared*1.0E3*c_light);
-    candidate->ErrorT = timeResolution*1.0E3*c_light;
-
-    fOutputArray->Add(candidate);
+    else
+    {
+    	sigma_t = sqrt(pow(20,2) + pow(150,2)/e);
+    	ti = sigma_t - l*1.0E3/(c_light*beta_particle);   
+    	candidate->InitialPosition.SetT(ti);
+    	candidate->ErrorT = sigma_t*1.0E3*c_light;		// Do we need to sum with 100 like in upside ?
+    	fOutputArray->Add(candidate);
+    }
+   
   }
 }
Index: modules/TimeSmearing.h
===================================================================
--- modules/TimeSmearing.h	(revision 03b9c0fbe7936bb91f439038c258bdfab33241c3)
+++ modules/TimeSmearing.h	(revision 7939c6c21a8883c84b61cd8136732ebe7b6bba38)
@@ -45,5 +45,5 @@
 
 private:
-  DelphesFormula *fFormula; //!
+  Double_t fTimeResolution; //!
   Double_t fEtaMax;
 
Index: modules/TrackTimingPileUpSubtractor.cc
===================================================================
--- modules/TrackTimingPileUpSubtractor.cc	(revision 03b9c0fbe7936bb91f439038c258bdfab33241c3)
+++ modules/TrackTimingPileUpSubtractor.cc	(revision 7939c6c21a8883c84b61cd8136732ebe7b6bba38)
@@ -75,6 +75,6 @@
 
   // read resolution formula in m
-  fZVertexResolution = GetDouble("ZVertexResolution", 3);
-  fTVertexResolution = GetDouble("TVertexResolution", 3);
+  fChargedMinSignificance = GetDouble("ChargedMinSignificance", 3);
+  fNeutralMinSignificance = GetDouble("NeutralMinSignificance", 3);
 
   fPTMin = GetDouble("PTMin", 0.);
@@ -173,9 +173,9 @@
       distanceNeutral = pow((tvtx - t),2)/pow((tvtx_err - t_err),2);
 
-      if(candidate->Charge != 0 && distanceCharged < fZVertexResolution)
+      if(candidate->Charge != 0 && distanceCharged < fChargedMinSignificance)
       {
         candidate->IsRecoPU = 1;
       }
-      else if(candidate->Charge == 0 && distanceNeutral < fTVertexResolution)
+      else if(candidate->Charge == 0 && distanceNeutral < fNeutralMinSignificance)
       {
         candidate->IsRecoPU = 1;
Index: modules/TrackTimingPileUpSubtractor.h
===================================================================
--- modules/TrackTimingPileUpSubtractor.h	(revision 03b9c0fbe7936bb91f439038c258bdfab33241c3)
+++ modules/TrackTimingPileUpSubtractor.h	(revision 7939c6c21a8883c84b61cd8136732ebe7b6bba38)
@@ -49,6 +49,6 @@
   DelphesFormula *fFormula; //!
 
-  Double_t fZVertexResolution;
-  Double_t fTVertexResolution;
+  Double_t fChargedMinSignificance;
+  Double_t fNeutralMinSignificance;
 
   Double_t fPTMin;
