Index: examples/Pythia8/configParticleGun.cmnd
===================================================================
--- examples/Pythia8/configParticleGun.cmnd	(revision 7b61e667aa27d5bf6b435473547a98e0d5121e05)
+++ examples/Pythia8/configParticleGun.cmnd	(revision 46fb86cf684ed7128200e842314e6d7af992155c)
@@ -3,9 +3,10 @@
 ! 1) Settings used in the main program.
 
-Main:numberOfEvents = 100000         ! number of events to generate
+Main:numberOfEvents = 10000        ! number of events to generate
 Main:timesAllowErrors = 3          ! how many aborts before run stops
-Main:spareFlag1 = on                ! true means particle gun
-Main:spareMode1 = ID               ! 1-5 - di-quark, 21 - di-gluon, 11 - single electron, 13 - single muon, 22 - single photon
-Main:spareParm1 = 10000           ! max pt
+Main:spareFlag1 = on               ! true means particle gun
+Main:spareMode1 = 11               ! 1-5 - di-quark, 21 - di-gluon, 11 - single electron, 13 - single muon, 15 - single tau, 22 - single photon
+Main:spareParm1 = 10000            ! max pt
+Main:spareParm2 = 2.5              ! max eta
 
 ! 2) Settings related to output in init(), next() and stat().
Index: examples/Validation.cpp
===================================================================
--- examples/Validation.cpp	(revision 7b61e667aa27d5bf6b435473547a98e0d5121e05)
+++ examples/Validation.cpp	(revision 46fb86cf684ed7128200e842314e6d7af992155c)
@@ -735,6 +735,4 @@
   std::pair<TH1D*,TH1D*> histos_el = GetEff<Electron>(branchElectron, branchParticleElectron, "Electron", elID, treeReaderElectron);
 
-  histos_el.second->SaveAs("test1.pdf");
-
   // tracking reconstruction efficiency
   std::pair <TH1D*,TH1D*> histos_eltrack = GetEff<Track>(branchTrackElectron, branchParticleElectron, "electronTrack", elID, treeReaderElectron);
@@ -836,6 +834,6 @@
   DrawAxis(mg_elFwd, leg_elFwd, 0.2);
 
-  C_el1->Print("validation.pdf(","pdf");
-  C_el2->Print("validation.pdf","pdf");
+  C_el1->Print("delphes_validation.pdf(","pdf");
+  C_el2->Print("delphes_validation.pdf","pdf");
 
   gDirectory->cd(0);
@@ -937,9 +935,6 @@
   DrawAxis(mg_muFwd, leg_muFwd, 0.3);
 
-  //C_mu1->SaveAs(muEff+".eps");
-  //C_mu->SaveAs(muRes+".eps");
-
-  C_mu1->Print("validation.pdf","pdf");
-  C_mu->Print("validation.pdf","pdf");
+  C_mu1->Print("delphes_validation.pdf","pdf");
+  C_mu->Print("delphes_validation.pdf","pdf");
 
   gDirectory->cd(0);
@@ -1008,6 +1003,4 @@
   leg_ph2->Draw();
 
-  C_ph1->SaveAs(phEff+".eps");
-
   TString phRes = "phERes";
   TString phResFwd = "phEResFwd";
@@ -1043,8 +1036,6 @@
   DrawAxis(mg_phFwd, leg_phFwd, 0.3);
 
-  C_ph->SaveAs(phRes+".eps");
-
-  C_ph1->Print("validation.pdf","pdf");
-  C_ph->Print("validation.pdf","pdf");
+  C_ph1->Print("delphes_validation.pdf","pdf");
+  C_ph->Print("delphes_validation.pdf","pdf");
 
   gDirectory->cd(0);
@@ -1177,7 +1168,4 @@
   DrawAxis(mg_jetFwd, leg_jetFwd, 0.25);
 
-  C_btag1->SaveAs(btagEff+".eps");
-  C_jet->SaveAs(jetRes+".eps");
-
   TString metRes = "MetRes";
   TCanvas *C_met = new TCanvas(metRes,metRes, 800, 600);
@@ -1199,10 +1187,8 @@
   mg_met->GetYaxis()->SetTitle("#sigma(ME_{x}) [GeV]");
 
-  C_met->SaveAs(metRes+".eps");
-
-  C_jet->Print("validation.pdf","pdf");
-  C_btag1->Print("validation.pdf","pdf");
-  C_tautag1->Print("validation.pdf","pdf");
-  C_met->Print("validation.pdf)","pdf");
+  C_jet->Print("delphes_validation.pdf","pdf");
+  C_btag1->Print("delphes_validation.pdf","pdf");
+  C_tautag1->Print("delphes_validation.pdf","pdf");
+  C_met->Print("delphes_validation.pdf)","pdf");
 
   TFile *fout = new TFile(outputFile,"recreate");
Index: examples/validation.sh
===================================================================
--- examples/validation.sh	(revision 7b61e667aa27d5bf6b435473547a98e0d5121e05)
+++ examples/validation.sh	(revision 46fb86cf684ed7128200e842314e6d7af992155c)
@@ -1,17 +1,17 @@
-#!/bin/bash
+#! /bin/sh
 function runParticleGun {
-    in=$1
-    ID=$2
-    outcmnd="examples/Pythia8/configParticleGun$in.cmnd"
-    sed 's/ID/'$ID'/g' examples/Pythia8/configParticleGun.cmnd > $outcmnd
-    ./DelphesPythia8 cards/delphes_card_CMS.tcl $outcmnd delphes_ParticleGun$in.root
+  name=$1
+  pid=$2
+  cmnd="examples/Pythia8/configParticleGun_$name.cmnd"
+  sed '/Main:spareMode1/s/=[[:space:]]*[0-9]*/= '$pid'/' examples/Pythia8/configParticleGun.cmnd > $cmnd
+  ./DelphesPythia8 cards/delphes_card_CMS.tcl $cmnd delphes_ParticleGun_$name.root
 }
-runParticleGun el 11
-runParticleGun mu 13
-runParticleGun ph 22
-runParticleGun b 5
+
+runParticleGun electron 11
+runParticleGun muon 13
+runParticleGun photon 22
 runParticleGun jet 1
-runParticleGun tau 15
+runParticleGun bjet 5
+runParticleGun taujet 15
 
-./Validation delphes_ParticleGunel.root delphes_ParticleGunmu.root delphes_ParticleGunph.root delphes_ParticleGunjet.root delphes_ParticleGunb.root delphes_ParticleGuntau.root validation.root
-
+./Validation delphes_ParticleGun_electron.root delphes_ParticleGun_muon.root delphes_ParticleGun_photon.root delphes_ParticleGun_jet.root delphes_ParticleGun_bjet.root delphes_ParticleGun_taujet.root delphes_validation.root
