Index: examples/delphes_card_ATLAS_PileUp.tcl
===================================================================
--- examples/delphes_card_ATLAS_PileUp.tcl	(revision 8555f6d79db536e080012323c4f7fa9e8486cd47)
+++ examples/delphes_card_ATLAS_PileUp.tcl	(revision 22dc7fdf210b2c79eae0ce91d9aa4751b6469493)
@@ -65,6 +65,21 @@
   # average expected pile up
   set MeanPileUp 50
-  # spread in the beam direction in m (assumes gaussian)
-  set ZVertexSpread 0.07
+  
+  # maximum spread in the beam direction in m 
+  set ZVertexSpread 0.10
+  
+  # maximum spread in time in s
+  set TVertexSpread 1.5E-09
+
+  # vertex smearing formula f(z,t) (z,t need to be respectively given in m,s)
+  
+  set VertexDistributionFormula {exp(-(t^2/(2*(0.05/2.99792458E8*exp(-(z^2/(2*(0.05)^2))))^2)))}
+
+  #set VertexDistributionFormula { (abs(t) <= 1.0e-09) * (abs(z) <= 0.15) * (1.00) + \
+  #                                (abs(t) >  1.0e-09) * (abs(z) <= 0.15) * (0.00) + \
+  #				  (abs(t) <= 1.0e-09) * (abs(z) > 0.15)  * (0.00) + \
+  #				  (abs(t) >  1.0e-09) * (abs(z) > 0.15)  * (0.00)}
+
+
 }
 
Index: examples/delphes_card_CMS_PileUp.tcl
===================================================================
--- examples/delphes_card_CMS_PileUp.tcl	(revision 8555f6d79db536e080012323c4f7fa9e8486cd47)
+++ examples/delphes_card_CMS_PileUp.tcl	(revision 22dc7fdf210b2c79eae0ce91d9aa4751b6469493)
@@ -64,7 +64,22 @@
 
   # average expected pile up
-  set MeanPileUp 50
-  # spread in the beam direction in m (assumes gaussian)
-  set ZVertexSpread 0.07
+  set MeanPileUp 10
+  
+  # maximum spread in the beam direction in m 
+  set ZVertexSpread 0.10
+  
+  # maximum spread in time in s
+  set TVertexSpread 1.5E-09
+
+  # vertex smearing formula f(z,t) (z,t need to be respectively given in m,s)
+  
+  set VertexDistributionFormula {exp(-(t^2/(2*(0.05/2.99792458E8*exp(-(z^2/(2*(0.05)^2))))^2)))}
+
+  #set VertexDistributionFormula { (abs(t) <= 1.0e-09) * (abs(z) <= 0.15) * (1.00) + \
+  #                                (abs(t) >  1.0e-09) * (abs(z) <= 0.15) * (0.00) + \
+  #				  (abs(t) <= 1.0e-09) * (abs(z) > 0.15)  * (0.00) + \
+  #				  (abs(t) >  1.0e-09) * (abs(z) > 0.15)  * (0.00)}
+
+
 }
 
Index: examples/delphes_card_CMS_PileUp_Timing.tcl
===================================================================
--- examples/delphes_card_CMS_PileUp_Timing.tcl	(revision 22dc7fdf210b2c79eae0ce91d9aa4751b6469493)
+++ examples/delphes_card_CMS_PileUp_Timing.tcl	(revision 22dc7fdf210b2c79eae0ce91d9aa4751b6469493)
@@ -0,0 +1,226 @@
+set MaxEvents 1000
+
+#######################################
+# Order of execution of various modules
+#######################################
+
+set ExecutionPath {
+
+  PileUpMerger
+  ParticlePropagator
+
+  ChargedHadronTrackingEfficiency
+  ElectronTrackingEfficiency
+  MuonTrackingEfficiency
+
+  ChargedHadronMomentumSmearing
+  ElectronEnergySmearing
+  MuonMomentumSmearing
+
+  MuonTimeSmearing
+
+  TreeWriter
+}
+
+
+###############
+# PileUp Merger
+###############
+
+module PileUpMerger PileUpMerger {
+  set InputArray Delphes/stableParticles
+
+  set ParticleOutputArray stableParticles
+  set VertexOutputArray vertices
+
+  # pre-generated minbias input file
+  set PileUpFile MinBias.pileup
+
+  # average expected pile up
+  set MeanPileUp 20
+  
+  # maximum spread in the beam direction in m 
+  set ZVertexSpread 0.05
+  
+  # maximum spread in time in s
+  set TVertexSpread 0.5E-09
+
+  # vertex smearing formula f(z,t) (z,t need to be respectively given in m,s)
+  
+  set VertexDistributionFormula {exp(-(t^2/(2*(0.05/2.99792458E8*exp(-(z^2/(2*(0.05)^2))))^2)))}
+
+  #set VertexDistributionFormula { (abs(t) <= 1.0e-09) * (abs(z) <= 0.15) * (1.00) + \
+  #                                (abs(t) >  1.0e-09) * (abs(z) <= 0.15) * (0.00) + \
+  #				  (abs(t) <= 1.0e-09) * (abs(z) > 0.15)  * (0.00) + \
+  #				  (abs(t) >  1.0e-09) * (abs(z) > 0.15)  * (0.00)}
+
+}
+
+#################################
+# Propagate particles in cylinder
+#################################
+
+module ParticlePropagator ParticlePropagator {
+  set InputArray PileUpMerger/stableParticles
+
+  set OutputArray stableParticles
+  set ChargedHadronOutputArray chargedHadrons
+  set ElectronOutputArray electrons
+  set MuonOutputArray muons
+
+  # radius of the magnetic field coverage, in m
+  set Radius 1.29
+  # half-length of the magnetic field coverage, in m
+  set HalfLength 3.00
+
+  # magnetic field
+  set Bz 3.8
+}
+
+####################################
+# Charged hadron tracking efficiency
+####################################
+
+module Efficiency ChargedHadronTrackingEfficiency {
+  set InputArray ParticlePropagator/chargedHadrons
+  set OutputArray chargedHadrons
+
+  # add EfficiencyFormula {efficiency formula as a function of eta and pt}
+
+  # tracking efficiency formula for charged hadrons
+  set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) + \
+                                           (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.70) + \
+                                           (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.95) + \
+                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.60) + \
+                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0)                  * (0.85) + \
+                         (abs(eta) > 2.5)                                                  * (0.00)}
+}
+
+##############################
+# Electron tracking efficiency
+##############################
+
+module Efficiency ElectronTrackingEfficiency {
+  set InputArray ParticlePropagator/electrons
+  set OutputArray electrons
+
+  # set EfficiencyFormula {efficiency formula as a function of eta and pt}
+
+  # tracking efficiency formula for electrons
+  set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) + \
+                                           (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.73) + \
+                                           (abs(eta) <= 1.5) * (pt > 1.0   && pt <= 1.0e2) * (0.95) + \
+                                           (abs(eta) <= 1.5) * (pt > 1.0e2)                * (0.99) + \
+                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.50) + \
+                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0   && pt <= 1.0e2) * (0.83) + \
+                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2)                * (0.90) + \
+                         (abs(eta) > 2.5)                                                  * (0.00)}
+}
+
+##########################
+# Muon tracking efficiency
+##########################
+
+module Efficiency MuonTrackingEfficiency {
+  set InputArray ParticlePropagator/muons
+  set OutputArray muons
+
+  # set EfficiencyFormula {efficiency formula as a function of eta and pt}
+
+  # tracking efficiency formula for muons
+  set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) + \
+                                           (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.75) + \
+                                           (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.99) + \
+                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.70) + \
+                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0)                  * (0.98) + \
+                         (abs(eta) > 2.5)                                                  * (0.00)}
+}
+
+########################################
+# Momentum resolution for charged tracks
+########################################
+
+module MomentumSmearing ChargedHadronMomentumSmearing {
+  set InputArray ChargedHadronTrackingEfficiency/chargedHadrons
+  set OutputArray chargedHadrons
+
+  # set ResolutionFormula {resolution formula as a function of eta and pt}
+
+  # resolution formula for charged hadrons
+  set ResolutionFormula {                  (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.02) + \
+                                           (abs(eta) <= 1.5) * (pt > 1.0   && pt <= 1.0e1) * (0.01) + \
+                                           (abs(eta) <= 1.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.03) + \
+                                           (abs(eta) <= 1.5) * (pt > 2.0e2)                * (0.05) + \
+                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.03) + \
+                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0   && pt <= 1.0e1) * (0.02) + \
+                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.04) + \
+                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2)                * (0.05)}
+}
+
+#################################
+# Energy resolution for electrons
+#################################
+
+module EnergySmearing ElectronEnergySmearing {
+  set InputArray ElectronTrackingEfficiency/electrons
+  set OutputArray electrons
+
+  # set ResolutionFormula {resolution formula as a function of eta and energy}
+
+  # resolution formula for electrons
+  set ResolutionFormula {                  (abs(eta) <= 2.5) * (energy > 0.1   && energy <= 2.0e1) * (energy*0.0225) + \
+                                           (abs(eta) <= 2.5) * (energy > 2.0e1)                    * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + \
+                         (abs(eta) > 2.5 && abs(eta) <= 3.0)                                       * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + \
+                         (abs(eta) > 3.0 && abs(eta) <= 5.0)                                       * sqrt(energy^2*0.107^2 + energy*2.08^2)}
+
+}
+
+###############################
+# Momentum resolution for muons
+###############################
+
+module MomentumSmearing MuonMomentumSmearing {
+  set InputArray MuonTrackingEfficiency/muons
+  set OutputArray muons
+
+  # set ResolutionFormula {resolution formula as a function of eta and pt}
+
+  # resolution formula for muons
+  set ResolutionFormula {                  (abs(eta) <= 0.5) * (pt > 0.1   && pt <= 5.0)   * (0.02) + \
+                                           (abs(eta) <= 0.5) * (pt > 5.0   && pt <= 1.0e2) * (0.015) + \
+                                           (abs(eta) <= 0.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.03) + \
+                                           (abs(eta) <= 0.5) * (pt > 2.0e2)                * (0.05 + pt*1.e-4) + \
+                         (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1   && pt <= 5.0)   * (0.03) + \
+                         (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 5.0   && pt <= 1.0e2) * (0.02) + \
+                         (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.04) + \
+                         (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 2.0e2)                * (0.05 + pt*1.e-4) + \
+                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 5.0)   * (0.04) + \
+                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 5.0   && pt <= 1.0e2) * (0.035) + \
+                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.05) + \
+                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2)                * (0.05 + pt*1.e-4)}
+}
+
+
+##############
+# Muon Timing 
+##############
+
+module TimeSmearing MuonTimeSmearing {
+  set InputArray ParticlePropagator/muons
+  set OutputArray muons
+  
+  set TimeResolution 1.0e-10
+
+}
+
+##################
+# ROOT tree writer
+##################
+
+module TreeWriter TreeWriter {
+# add Branch InputArray BranchName BranchClass
+  add Branch Delphes/allParticles Particle GenParticle
+  add Branch MuonTimeSmearing/muons MuonTimeSmeared Muon
+  add Branch PileUpMerger/vertices Vertex Vertex
+}
+
