Index: trunk/Delphes.cpp
===================================================================
--- trunk/Delphes.cpp	(revision 318)
+++ trunk/Delphes.cpp	(revision 319)
@@ -326,5 +326,5 @@
   vector<int> NTrackJet;
 
-  TSimpleArray<TRootGenParticle> NFCentralQ;
+  TSimpleArray<GenParticle> NFCentralQ;
   
   D_CaloList list_of_calorimeters;
@@ -403,5 +403,5 @@
               particle->PT > DET->PT_QUARKS_MIN ) 
 	    {
-	      NFCentralQ.Add(particle);
+	        NFCentralQ.Add(particleG);
 	    }
 	  
Index: trunk/interface/JetsUtil.h
===================================================================
--- trunk/interface/JetsUtil.h	(revision 318)
+++ trunk/interface/JetsUtil.h	(revision 319)
@@ -83,5 +83,5 @@
   vector<fastjet::PseudoJet> RunJetsResol(const vector<fastjet::PseudoJet>&  input_particles);
   
-  void RunJetBtagging(ExRootTreeWriter *treeWriter, ExRootTreeBranch *branchJet,const vector<fastjet::PseudoJet> & sorted_jets,const TSimpleArray<TRootGenParticle> & NFCentralQ, const vector<int> &NTrackJet, const vector<float> &EHADEEM);
+  void RunJetBtagging(ExRootTreeWriter *treeWriter, ExRootTreeBranch *branchJet,const vector<fastjet::PseudoJet> & sorted_jets,const TSimpleArray<GenParticle> & NFCentralQ, const vector<int> &NTrackJet, const vector<float> &EHADEEM);
   
   void RunTauJets(ExRootTreeWriter *treeWriter, ExRootTreeBranch *branchTauJet,const vector<fastjet::PseudoJet> & sorted_jets,const vector<PhysicsTower> & towers, const vector<TRootTracks> & TrackCentral, const vector<int> &NTrackJet, const vector<float> &EHADEEM);
Index: trunk/interface/SmearUtil.h
===================================================================
--- trunk/interface/SmearUtil.h	(revision 318)
+++ trunk/interface/SmearUtil.h	(revision 319)
@@ -225,12 +225,11 @@
 
   /// b-jets
-  int Bjets(const TSimpleArray<TRootGenParticle> &subarray, const float eta, const float phi);
+  int Bjets(const TSimpleArray<GenParticle> &subarray, const float& eta, const float& phi);
   
   /// b-tag efficiency and misidentification
-  bool Btaggedjet(const TLorentzVector &JET, const TSimpleArray<TRootGenParticle> &subarray);
+  bool Btaggedjet(const TLorentzVector &JET, const TSimpleArray<GenParticle> &subarray);
 
   /// Lepton isolation
-  //bool Isolation(const float phi, const float eta,const vector<TLorentzVector> &tracks,float PT_TRACK2);
-  bool Isolation(const float phi, const float eta,const vector<TRootTracks> &tracks, const float PT_TRACK2, const float isolCone);
+  bool Isolation(const float phi, const float eta,const vector<TRootTracks> &tracks, const float& pt_second_track, const float& isolCone);
 
   //********************* returns a segmented value for eta and phi, for calo towers *****
Index: trunk/src/SmearUtil.cc
===================================================================
--- trunk/src/SmearUtil.cc	(revision 318)
+++ trunk/src/SmearUtil.cc	(revision 319)
@@ -1034,4 +1034,5 @@
   for(unsigned int i=0; i < tracks.size(); i++) { 
       if(tracks[i].PT < pt_track ) continue;
+      //float dr = DeltaR(phi,eta,tracks[i].PhiOuter,tracks[i].EtaOuter);
       float dr = DeltaR(phi,eta,tracks[i].Phi,tracks[i].Eta);
       if (dr > TAU_track_scone) continue; 
@@ -1041,30 +1042,9 @@
   return numbtrack;
 }
-/*
-unsigned int RESOLution::NumTracks(unsigned int& NumTracksR, float& charge, const vector<TRootTracks> &tracks, const float pt_track, const float eta, const float phi, const float R) {
-  unsigned int numbtrack=0; // number of track in the tau-jet cone, which is smaller than R;
-  charge=0;      NumTracksR=0; // total number of tracks
-  if (R<TAU_track_scone) cout << "Warning: jet radius smaller than tau-jet radius in RESOLution::NumTracks\n";
-  for(unsigned int i=0; i < tracks.size(); i++) {
-      if(tracks[i].PT < pt_track ) continue;
-      float dr = DeltaR(phi,eta,tracks[i].Phi,tracks[i].Eta);
-      if (dr > R) continue;
-
-      NumTracksR++;
-      if(dr < TAU_track_scone) {// previously R==TAU_track_scone, for tau-jets only
-        numbtrack++;
-        charge += tracks[i].Charge; // total charge in the cone for Tau-jet
-      }
-
-  }
-  return numbtrack;
-}
-*/
-
 
 //*** Returns the PID of the particle with the highest energy, in a cone with a radius CONERADIUS and an axis (eta,phi)  *********
 //used by Btaggedjet
 ///// Attention : bug removed => CONERADIUS/2 -> CONERADIUS !!
-int RESOLution::Bjets(const TSimpleArray<TRootGenParticle> &subarray, const float eta, const float phi) {
+int RESOLution::Bjets(const TSimpleArray<GenParticle> &subarray, const float& eta, const float& phi) {
   float emax=0;
   int Ppid=0;
@@ -1083,5 +1063,5 @@
 
 //******************** Simulates the b-tagging efficiency for real bjet, or the misendentification for other jets****************
-bool RESOLution::Btaggedjet(const TLorentzVector &JET, const TSimpleArray<TRootGenParticle> &subarray)	{
+bool RESOLution::Btaggedjet(const TLorentzVector &JET, const TSimpleArray<GenParticle> &subarray) {
   if(      rand()%100 < (BTAG_b+1)    && Bjets(subarray,JET.Eta(),JET.Phi())==pB ) return true; // b-tag of b-jets is 40%
   else if( rand()%100 < (BTAG_mistag_c+1) && Bjets(subarray,JET.Eta(),JET.Phi())==pC ) return true; // b-tag of c-jets is 10%
@@ -1092,6 +1072,5 @@
 //***********************Isolation criteria***********************
 //****************************************************************
-//bool RESOLution::Isolation(const float phi, const float eta,const vector<TLorentzVector> &tracks, const float pt_second_track)
-bool RESOLution::Isolation(const float phi, const float eta,const vector<TRootTracks> &tracks, const float pt_second_track, const float isolCone)
+bool RESOLution::Isolation(const float phi, const float eta,const vector<TRootTracks> &tracks, const float& pt_second_track, const float& isolCone)
 {
    bool isolated = false;
@@ -1121,5 +1100,4 @@
 		iEta = (eta>0) ? TOWER_eta_edges[i-1] : -TOWER_eta_edges[i];
 		index = i-1;
-		//cout << setw(15) << left << eta << "\t" << iEta << endl;
 		break;
 	}
