Index: /trunk/Delphes.cpp
===================================================================
--- /trunk/Delphes.cpp	(revision 42)
+++ /trunk/Delphes.cpp	(revision 43)
@@ -168,5 +168,4 @@
   vector<TLorentzVector> TrackCentral;  
   vector<PhysicsTower> towers;
-  
   vector<fastjet::PseudoJet> input_particles;//for FastJet algorithm
   vector<fastjet::PseudoJet> inclusive_jets;
@@ -214,5 +213,5 @@
     // set up a CDF midpoint jet definition
 #ifdef ENABLE_PLUGIN_CDFCONES
-    plugins = new fastjet::CDFJetCluPlugin(DET->C_SEEDTHRESHOLD,DET->CONERADIUS,DET->C_ADJACENCYCUT,DET->C_MAXITERATIONS,DET->C_IRATCH,DET->C_OVERLAPTHRESHOLD);
+    plugins = new fastjet::CDFJetCluPlugin(DET->SEEDTHRESHOLD,DET->CONERADIUS,DET->C_ADJACENCYCUT,DET->C_MAXITERATIONS,DET->C_IRATCH,DET->OVERLAPTHRESHOLD);
     jet_def = fastjet::JetDefinition(plugins);
 #else
@@ -226,5 +225,5 @@
     // set up a CDF midpoint jet definition
 #ifdef ENABLE_PLUGIN_CDFCONES
-    plugins = new fastjet::CDFMidPointPlugin (DET->M_SEEDTHRESHOLD,DET->CONERADIUS,DET->M_CONEAREAFRACTION,DET->M_MAXPAIRSIZE,DET->M_MAXPAIRSIZE,DET->C_OVERLAPTHRESHOLD);
+    plugins = new fastjet::CDFMidPointPlugin (DET->SEEDTHRESHOLD,DET->CONERADIUS,DET->M_CONEAREAFRACTION,DET->M_MAXPAIRSIZE,DET->M_MAXPAIRSIZE,DET->OVERLAPTHRESHOLD);
     jet_def = fastjet::JetDefinition(plugins);
 #else
@@ -238,5 +237,5 @@
     int npass = 0;               // do infinite number of passes
     double protojet_ptmin = 0.0; // use all protojets
-    plugins = new fastjet::SISConePlugin (DET->CONERADIUS,DET->C_OVERLAPTHRESHOLD,npass, protojet_ptmin);
+    plugins = new fastjet::SISConePlugin (DET->CONERADIUS,DET->OVERLAPTHRESHOLD,npass, protojet_ptmin);
     jet_def = fastjet::JetDefinition(plugins);
 #else
@@ -262,5 +261,4 @@
       treeReader->ReadEntry(entry);
       treeWriter->Clear();
-      
       if((entry % 100) == 0 && entry > 0 )  cout << "** Processing element # " << entry << endl;
       
@@ -337,5 +335,6 @@
 	    // all final particles but muons and neutrinos	
 	    // for calorimetric towers and mission PT
-	    if(genMomentum.E()!=0) {
+	    
+	    if(genMomentum.E() !=0) {
 	      if(pid !=pMU) {
                 PhysicsTower CaloTower = PhysicsTower(LorentzVector(genMomentum.Px(),genMomentum.Py(),genMomentum.Pz(), genMomentum.E()));
@@ -371,5 +370,6 @@
 		TrackCentral.push_back(genMomentum);
 	      }
-	  } // switch
+	  
+} // switch
 	  
 	  // Forward particles in CASTOR ?
@@ -470,5 +470,4 @@
       }
       
-      
       // computes the Missing Transverse Momentum
       TLorentzVector Att(0.,0.,0.,0.);
@@ -483,20 +482,19 @@
       elementEtmis->Px = (-PTmis).Px();
       elementEtmis->Py = (-PTmis).Py();
-      
       //*****************************
       
       // run the jet clustering with the above jet definition
+      cout<<input_particles.size()<<endl;
       if(input_particles.size()!=0)
 	{
 	  fastjet::ClusterSequence clust_seq(input_particles, jet_def);
-	  
-	  
 	  // extract the inclusive jets with pt > 5 GeV
 	  double ptmin = 5.0;
 	  inclusive_jets = clust_seq.inclusive_jets(ptmin);
-	  
+cout<<"inclusive_jets "<<inclusive_jets.size()<<endl;	  
 	  // sort jets into increasing pt
 	  sorted_jets = sorted_by_pt(inclusive_jets);
 	}
+cout<<"sorted_jets.size() "<<sorted_jets.size()<<endl;
       for (unsigned int i = 0; i < sorted_jets.size(); i++) {
 	TLorentzVector JET;
Index: /trunk/Resolutions.cpp
===================================================================
--- /trunk/Resolutions.cpp	(revision 42)
+++ /trunk/Resolutions.cpp	(revision 43)
@@ -224,5 +224,5 @@
   // set up a CDF midpoint jet definition
 #ifdef ENABLE_PLUGIN_CDFCONES
-  plugins = new fastjet::CDFJetCluPlugin(0,DET->CONERADIUS,DET->C_ADJACENCYCUT,DET->C_MAXITERATIONS,DET->C_IRATCH,DET->C_OVERLAPTHRESHOLD);
+  plugins = new fastjet::CDFJetCluPlugin(0,DET->CONERADIUS,DET->C_ADJACENCYCUT,DET->C_MAXITERATIONS,DET->C_IRATCH,DET->OVERLAPTHRESHOLD);
   jet_def = fastjet::JetDefinition(plugins);
 #else
@@ -232,5 +232,5 @@
   // set up a CDF midpoint jet definition
 #ifdef ENABLE_PLUGIN_CDFCONES
-  pluginsS = new fastjet::CDFJetCluPlugin(1,DET->CONERADIUS,DET->C_ADJACENCYCUT,DET->C_MAXITERATIONS,DET->C_IRATCH,DET->C_OVERLAPTHRESHOLD);
+  pluginsS = new fastjet::CDFJetCluPlugin(1,DET->CONERADIUS,DET->C_ADJACENCYCUT,DET->C_MAXITERATIONS,DET->C_IRATCH,DET->OVERLAPTHRESHOLD);
   jet_defS = fastjet::JetDefinition(pluginsS);
 #else
@@ -240,5 +240,5 @@
  // set up a CDF midpoint jet definition
  #ifdef ENABLE_PLUGIN_CDFCONES
- pluginsT = new fastjet::CDFJetCluPlugin(0,DET->CONERADIUS,DET->C_ADJACENCYCUT,DET->C_MAXITERATIONS,DET->C_IRATCH,DET->C_OVERLAPTHRESHOLD);
+ pluginsT = new fastjet::CDFJetCluPlugin(0,DET->CONERADIUS,DET->C_ADJACENCYCUT,DET->C_MAXITERATIONS,DET->C_IRATCH,DET->OVERLAPTHRESHOLD);
  jet_defT = fastjet::JetDefinition(pluginsT);
  #else
@@ -256,5 +256,4 @@
       treeReader->ReadEntry(entry);
       treeWriter->Clear();
-      
       if((entry % 100) == 0 && entry > 0 )  cout << "** Processing element # " << entry << endl;
       
@@ -329,5 +328,5 @@
 	      } // switch (pid)
 	      
-	      if(pid != pMU)
+	      if(pid != pMU && genMomentum.Et() !=0)
 		{
 		  towers.push_back(PhysicsTower(LorentzVector(genMomentum.Px(),genMomentum.Py(),genMomentum.Pz(), genMomentum.E())));
@@ -354,22 +353,13 @@
     
      TLorentzVector Att(0.,0.,0.,0.);
-     float ScalarEt=0;
      for(unsigned int i=0; i < towers.size(); i++) 
        {
          Att.SetPxPyPzE(towers[i].fourVector.px,towers[i].fourVector.py,towers[i].fourVector.pz,towers[i].fourVector.E);
-         ScalarEt = ScalarEt + Att.Et();
          PTmisS = PTmisS + Att;
        }
-//cout<<"non smeare "<<PTmis.Pt()<<" "<<PTmisS.Pt()<<endl;
-//cout<<"smeare "<<PTmis.Px()<<" "<<PTmisS.Px()<<endl;
-//cout<<"**********"<<endl;
 
       elementEtmis= (ETMIS*) branchetmis->NewEntry();
       elementEtmis->Et = (PTmis).Pt();
-      elementEtmis->Ex = (-PTmis).Px();
-      elementEtmis->SEt = ScalarEt;
-
       elementEtmis->EtSmeare = (PTmisS).Pt()-(PTmis).Pt();
-      elementEtmis->ExSmeare = (-PTmisS).Px()-(PTmis).Px();
       
       //*****************************
Index: /trunk/interface/SmearUtil.h
===================================================================
--- /trunk/interface/SmearUtil.h	(revision 42)
+++ /trunk/interface/SmearUtil.h	(revision 43)
@@ -93,17 +93,18 @@
   double CONERADIUS;
   int JETALGO;
+
+  //General jet variable
+  double SEEDTHRESHOLD;    
+  double OVERLAPTHRESHOLD; 
+
   // MidPoint algorithm definition
-  double M_SEEDTHRESHOLD;    
   double M_CONEAREAFRACTION; 
   int    M_MAXPAIRSIZE;      
   int    M_MAXITERATIONS;    
-  double M_OVERLAPTHRESHOLD; 
  
   // Define Cone algorithm.
-  double C_SEEDTHRESHOLD;
   int    C_ADJACENCYCUT;
   int    C_MAXITERATIONS;
   int    C_IRATCH;
-  double C_OVERLAPTHRESHOLD;
 
   /// Reads the data card for the initialisation of the parameters 
Index: /trunk/src/SmearUtil.cc
===================================================================
--- /trunk/src/SmearUtil.cc	(revision 42)
+++ /trunk/src/SmearUtil.cc	(revision 43)
@@ -80,17 +80,18 @@
 CONERADIUS   = 0.7; 	// generic jet radius ; not for tau's !!!
 JETALGO      =   1;     // 1 for Cone algorithm, 2 for MidPoint algorithm, 3 for SIScone algorithm, 4 for kt algorithm
+
+//General jet parameters
+SEEDTHRESHOLD     = 1.0;
+OVERLAPTHRESHOLD = 0.75;
+
 // Define Cone algorithm.
-C_SEEDTHRESHOLD     = 1.0;
 C_ADJACENCYCUT     = 2;
 C_MAXITERATIONS    = 100;
 C_IRATCH           = 1;
-C_OVERLAPTHRESHOLD = 0.75;
 
 //Define MidPoint algorithm.
-M_SEEDTHRESHOLD     =   1.0;
 M_CONEAREAFRACTION  =   0.25;
 M_MAXPAIRSIZE       =   2;
 M_MAXITERATIONS     =   100;
-M_OVERLAPTHRESHOLD  =  0.75;
 
 }
@@ -149,17 +150,17 @@
   }
 
+// General jet variables
+ SEEDTHRESHOLD     = 1.0;
+ OVERLAPTHRESHOLD = 0.75;
+
 // Define Cone algorithm.
- C_SEEDTHRESHOLD     = 1.0;
  C_ADJACENCYCUT     = 2;
  C_MAXITERATIONS    = 100;
  C_IRATCH           = 1;
- C_OVERLAPTHRESHOLD = 0.75;
 
 //Define MidPoint algorithm.
- M_SEEDTHRESHOLD     =   1.0;
  M_CONEAREAFRACTION  =   0.25;
  M_MAXPAIRSIZE       =   2;
  M_MAXITERATIONS     =   100;
- M_OVERLAPTHRESHOLD  =  0.75;
 
 }
@@ -250,5 +251,5 @@
   double Energie=0;
   for(unsigned int i=0; i < towers.size(); i++) {
-      if(towers[i].fourVector.pt() < M_SEEDTHRESHOLD) continue;
+      if(towers[i].fourVector.pt() < SEEDTHRESHOLD) continue;
       if((DeltaR(phi,eta,towers[i].fourVector.phi(),towers[i].fourVector.eta()) < TAU_CONE_ENERGY)) {
           Energie += towers[i].fourVector.E;
