Index: trunk/Delphes.cpp
===================================================================
--- trunk/Delphes.cpp	(revision 556)
+++ trunk/Delphes.cpp	(revision 557)
@@ -626,5 +626,5 @@
 	  elementElec->PhiCalo = electron[i].PhiCalo();
 	  elementElec->Charge = - sign(electron[i].PID());
-	  elementElec->IsolFlag = DET->Isolation(electron[i],TrackCentral,DET->ISOL_PT,DET->ISOL_Cone,ptisoEl);
+	  elementElec->IsolFlag = DET->Isolation(electron[i],TrackCentral,DET->ISOL_trk_PT,ptisoEl);
 
 	  int electron_tower_index = DET->BinEtaPhi(elementElec->PhiCalo,elementElec->EtaCalo,iPhiEl,iEtaEl); 
@@ -646,5 +646,5 @@
 	  elementMu->EtaCalo = muon[i].EtaCalo(); 
 	  elementMu->PhiCalo = muon[i].PhiCalo();
-	  elementMu->IsolFlag = DET->Isolation(muon[i],TrackCentral,DET->ISOL_PT,DET->ISOL_Cone,ptisoMu); 
+	  elementMu->IsolFlag = DET->Isolation(muon[i],TrackCentral,DET->ISOL_trk_PT,ptisoMu); 
 	  elementMu->SumPt = ptisoMu;
           elementMu->SumEt = DET->IsolationSumEt(iPhiMu,iEtaMu, list_of_active_towers);
Index: trunk/data/DetectorCard.dat
===================================================================
--- trunk/data/DetectorCard.dat	(revision 556)
+++ trunk/data/DetectorCard.dat	(revision 557)
@@ -78,9 +78,9 @@
 
 # Charged lepton isolation. Pt and Et in GeV
-ISOL_PT          2.0      //minimal pt of tracks for isolation criteria
-ISOL_Cone        0.5      //Cone  for isolation criteria
-ISOL_Calo_ET     2.0      //minimal tower transverse energy for isolation criteria. 1E99 means "off"
-ISOL_Calo_Cone   0.4      //Cone for calorimetric isolation
-ISOL_Calo_Grid   3        //Grid size (N x N) for calorimetric isolation
+ISOL_trk_PT      2.0      //minimal pt of tracks for isolation criteria
+ISOL_trk_Cone    0.5      //Cone  for isolation criteria
+ISOL_calo_Cone   0.5      //Cone  for isolation criteria
+ISOL_calo_ET     1E99     //minimal tower transverse energy for isolation criteria. 1E99 means "off"
+ISOL_calo_Grid   3        //Grid size (N x N) for calorimetric isolation
 
 # General jet variable
Index: trunk/data/DetectorCard_ATLAS.dat
===================================================================
--- trunk/data/DetectorCard_ATLAS.dat	(revision 556)
+++ trunk/data/DetectorCard_ATLAS.dat	(revision 557)
@@ -78,9 +78,9 @@
 
 # Charged lepton isolation. Pt and Et in GeV
-ISOL_PT          2.0      //minimal pt of tracks for isolation criteria
-ISOL_Cone        0.5      //Cone  for isolation criteria
-ISOL_Calo_ET     1E99     //minimal tower transverse energy for isolation criteria. 1E99 means "off"
-ISOL_Calo_Cone   0.4      //Cone for calorimetric isolation
-ISOL_Calo_Grid   3        //Grid size (N x N) for calorimetric isolation
+ISOL_trk_PT      2.0      //minimal pt of tracks for isolation criteria
+ISOL_trk_Cone    0.5      //Cone  for isolation criteria
+ISOL_calo_Cone   0.5      //Cone  for isolation criteria
+ISOL_calo_ET     1E99     //minimal tower transverse energy for isolation criteria. 1E99 means "off"
+ISOL_calo_Grid   3        //Grid size (N x N) for calorimetric isolation
 
 # General jet variable
Index: trunk/data/DetectorCard_CMS.dat
===================================================================
--- trunk/data/DetectorCard_CMS.dat	(revision 556)
+++ trunk/data/DetectorCard_CMS.dat	(revision 557)
@@ -78,9 +78,9 @@
 
 # Charged lepton isolation. Pt and Et in GeV
-ISOL_PT          2.0      //minimal pt of tracks for isolation criteria
-ISOL_Cone        0.5      //Cone  for isolation criteria
-ISOL_Calo_ET     1E99     //minimal tower transverse energy for isolation criteria. 1E99 means "off"
-ISOL_Calo_Cone   0.4      //Cone for calorimetric isolation
-ISOL_Calo_Grid   3        //Grid size (N x N) for calorimetric isolation
+ISOL_trk_PT      2.0      //minimal pt of tracks for isolation criteria
+ISOL_trk_Cone    0.5      //Cone  for isolation criteria
+ISOL_calo_Cone   0.5      //Cone  for isolation criteria
+ISOL_calo_ET     1E99     //minimal tower transverse energy for isolation criteria. 1E99 means "off"
+ISOL_calo_Grid   3        //Grid size (N x N) for calorimetric isolation
 
 # General jet variable
Index: trunk/interface/SmearUtil.h
===================================================================
--- trunk/interface/SmearUtil.h	(revision 556)
+++ trunk/interface/SmearUtil.h	(revision 557)
@@ -184,8 +184,9 @@
   float ZDC_n_E;	// minimal energy of neutrons for reconstruction in ZDC
 
-  float ISOL_PT;      //minimal pt of tracks for isolation criteria
-  float ISOL_Cone;    //Cone  for isolation criteria
-  float ISOL_Calo_ET;  //minimal tower energy for isolation criteria
-  unsigned int ISOL_Calo_Grid; //Grid size (N x N) for calorimetric isolation
+  float ISOL_trk_PT;          //minimal pt of tracks for isolation criteria
+  float ISOL_trk_Cone;    //Cone  for tracking isolation criteria
+  float ISOL_calo_Cone;   //Cone  for tracking isolation criteria
+  float ISOL_calo_ET;     //minimal tower energy for isolation criteria
+  unsigned int ISOL_calo_Grid; //Grid size (N x N) for calorimetric isolation
 
   
@@ -275,5 +276,5 @@
 
   /// Lepton isolation based on tracking
-  bool Isolation(const D_Particle& part, const vector<TRootTracks> &tracks, const float& pt_second_track, const float& isolCone, float& ptiso);
+  bool Isolation(const D_Particle& part, const vector<TRootTracks> &tracks, const float& pt_second_track, float& ptiso);
 
   /// Lepton isolation based on calorimetry (optional. Default: off)
Index: trunk/src/LHCOConverter.cc
===================================================================
--- trunk/src/LHCOConverter.cc	(revision 556)
+++ trunk/src/LHCOConverter.cc	(revision 557)
@@ -299,5 +299,5 @@
                 << setw(7) << (float)closest_jet_ID << " ";
 	outfile << fixed << setprecision(0)
-                << setw(4) << floor(muon->IsolPt) << "." << ratio_string<<" ";	// E_had/E_em
+                << setw(4) << floor(muon->SumPt) << "." << ratio_string<<" ";	// E_had/E_em
 	outfile << fixed << setprecision(3)
                 << setw(7) << 0.0 << setw(7) << 0.0  // dummy/dummy
Index: trunk/src/SmearUtil.cc
===================================================================
--- trunk/src/SmearUtil.cc	(revision 556)
+++ trunk/src/SmearUtil.cc	(revision 557)
@@ -129,8 +129,9 @@
 
   // Isolation
-  ISOL_PT         = 2.0;      //minimal pt of tracks for isolation criteria
-  ISOL_Cone       = 0.5;      //Cone  for isolation criteria
-  ISOL_Calo_ET    = 1E99;     //minimal tower energy for isolation criteria. Default off = 1E99
-  ISOL_Calo_Grid  = 3;        //Grid size (N x N) for calorimetric isolation -- should be odd
+  ISOL_trk_PT         = 2.0;      //minimal pt of tracks for isolation criteria
+  ISOL_trk_Cone   = 0.5;      //Cone  for isolation criteria
+  ISOL_calo_Cone  = 0.5;      //Cone  for isolation criteria
+  ISOL_calo_ET    = 1E99;     //minimal tower energy for isolation criteria. Default off = 1E99
+  ISOL_calo_Grid  = 3;        //Grid size (N x N) for calorimetric isolation -- should be odd
 
   // General jet variable
@@ -291,8 +292,9 @@
 
   // Isolation
-  ISOL_PT         = DET.ISOL_PT;     // tracking isolation
-  ISOL_Cone       = DET.ISOL_Cone;  
-  ISOL_Calo_ET    = DET.ISOL_Calo_ET;  // calorimeter isolation, defaut off
-  ISOL_Calo_Grid  = DET.ISOL_Calo_Grid; 
+  ISOL_trk_PT     = DET.ISOL_trk_PT;     // tracking isolation
+  ISOL_trk_Cone   = DET.ISOL_trk_Cone;  
+  ISOL_calo_Cone  = DET.ISOL_calo_Cone;  
+  ISOL_calo_ET    = DET.ISOL_calo_ET;  // calorimeter isolation, defaut off
+  ISOL_calo_Grid  = DET.ISOL_calo_Grid; 
 
 
@@ -447,8 +449,9 @@
 
   // Isolation
-  ISOL_PT         = DET.ISOL_PT;       // tracking isolation
-  ISOL_Cone       = DET.ISOL_Cone;    
-  ISOL_Calo_ET    = DET.ISOL_Calo_ET;  // calorimeter isolation, defaut off
-  ISOL_Calo_Grid  = DET.ISOL_Calo_Grid;
+  ISOL_trk_PT     = DET.ISOL_trk_PT;       // tracking isolation
+  ISOL_trk_Cone   = DET.ISOL_trk_Cone;    
+  ISOL_calo_Cone  = DET.ISOL_calo_Cone;    
+  ISOL_calo_ET    = DET.ISOL_calo_ET;  // calorimeter isolation, defaut off
+  ISOL_calo_Grid  = DET.ISOL_calo_Grid;
 
   // General jet variable
@@ -655,8 +658,9 @@
     else if(strstr(temp_string.c_str(),"ZDC_n_E"))          {curstring >> varname >> value; ZDC_n_E      = value;}
 
-    else if(strstr(temp_string.c_str(),"ISOL_PT"))          {curstring >> varname >> value; ISOL_PT           = value;}
-    else if(strstr(temp_string.c_str(),"ISOL_Cone"))        {curstring >> varname >> value; ISOL_Cone         = value;}
-    else if(strstr(temp_string.c_str(),"ISOL_Calo_ET"))     {curstring >> varname >> value; ISOL_Calo_ET      = value;}
-    else if(strstr(temp_string.c_str(),"ISOL_Calo_Grid"))   {curstring >> varname >> ivalue; ISOL_Calo_Grid    = ivalue;}
+    else if(strstr(temp_string.c_str(),"ISOL_trk_PT"))      {curstring >> varname >> value; ISOL_trk_PT      = value;}
+    else if(strstr(temp_string.c_str(),"ISOL_trk_Cone"))    {curstring >> varname >> value; ISOL_trk_Cone     = value;}
+    else if(strstr(temp_string.c_str(),"ISOL_calo_Cone"))    {curstring >> varname >> value; ISOL_calo_Cone     = value;}
+    else if(strstr(temp_string.c_str(),"ISOL_calo_ET"))     {curstring >> varname >> value; ISOL_calo_ET      = value;}
+    else if(strstr(temp_string.c_str(),"ISOL_calo_Grid"))   {curstring >> varname >> ivalue; ISOL_calo_Grid    = ivalue;}
 
     else if(strstr(temp_string.c_str(),"JET_coneradius"))   {curstring >> varname >> value; JET_coneradius    = value;}
@@ -699,7 +703,7 @@
   }
  
-  if(ISOL_Calo_Grid%2 ==0) {
-    ISOL_Calo_Grid++;
-    cout <<"**        WARNING: ISOL_Calo_Grid is not odd. Set it to  "<< ISOL_Calo_Grid << "        **" << endl;
+  if(ISOL_calo_Grid%2 ==0) {
+    ISOL_calo_Grid++;
+    cout <<"**        WARNING: ISOL_Calo_Grid is not odd. Set it to  "<< ISOL_calo_Grid << "        **" << endl;
   }
  
@@ -1061,15 +1065,18 @@
   f_out<<"#*******************                                                 *"<<"\n";
   f_out<<"*                                                                    *"<<"\n";
-  f_out << left << setw(40) <<"* Minimum pT for tracks [GeV]: "<<""
-        << left << setw(20) <<ISOL_PT               <<""<< right << setw(10)<<"*"<<"\n";
-  f_out << left << setw(40) <<"* Cone for isolation criteria: "<<""
-        << left << setw(20) <<ISOL_Cone             <<""<< right << setw(10)<<"*"<<"\n";
-
-  if(ISOL_Calo_ET > 1E98) f_out<<"# No Calorimetric isolation applied                                  *"<<"\n";
+  f_out << left << setw(40) <<"* Minimum pT for tracking isolation [GeV]: "<<""
+        << left << setw(20) <<ISOL_trk_PT              <<""<< right << setw(10)<<"*"<<"\n";
+  f_out << left << setw(40) <<"* Cone for tracking isolation criteria: "<<""
+        << left << setw(20) <<ISOL_trk_Cone         <<""<< right << setw(10)<<"*"<<"\n";
+  f_out << left << setw(40) <<"* Cone for calorimetric isolation criteria: "<<""
+        << left << setw(20) <<ISOL_calo_Cone         <<""<< right << setw(10)<<"*"<<"\n";
+
+
+  if(ISOL_calo_ET > 1E98) f_out<<"# No Calorimetric isolation applied                                  *"<<"\n";
   else {
    f_out << left << setw(40) <<"* Minimum ET for towers [GeV]: "<<""
-         << left << setw(20) <<ISOL_Calo_ET               <<""<< right << setw(10)<<"*"<<"\n";
+         << left << setw(20) <<ISOL_calo_ET               <<""<< right << setw(10)<<"*"<<"\n";
    f_out << left << setw(40) <<"* Grid size (NxN) for calorimetric isolation: "<<""
-         << left << setw(20) <<ISOL_Calo_Grid             <<""<< right << setw(4)<<"*"<<"\n";
+         << left << setw(20) <<ISOL_calo_Grid             <<""<< right << setw(4)<<"*"<<"\n";
   }
 
@@ -1416,5 +1423,5 @@
 //***********************Isolation criteria***********************
 //****************************************************************
-bool RESOLution::Isolation(const D_Particle& part, const vector<TRootTracks> &tracks, const float& pt_second_track, const float& isolCone, float& ptiso )
+bool RESOLution::Isolation(const D_Particle& part, const vector<TRootTracks> &tracks, const float& pt_second_track, float& ptiso )
 {
    bool isolated = false;
@@ -1433,7 +1440,7 @@
 
          // as long as (genDeltaR==0) is put above, the particle itself is not taken into account
-	 if( genDeltaR < ISOL_Cone) ptiso += tracks[i].PT; // dR cut on tracks
+	 if( genDeltaR < ISOL_trk_Cone && tracks[i].PT>ISOL_trk_PT) ptiso += tracks[i].PT; // dR cut on tracks
       }
-   if(deltar > isolCone) isolated = true;
+   if(deltar > ISOL_trk_Cone) isolated = true;
    return isolated;
 }
@@ -1442,11 +1449,9 @@
 {
    float etiso = 0; // sum of all track pt in isolation cone
-cout<<"*************************"<<endl;
    for (unsigned int i=0; i< towers.size(); i++) {
 //       cout<<" eta part "<<iEta<<" eta tour "<<towers[i].getEta()<<endl;
 //       cout<<" phi part "<<iPhi<<" phi tour "<<towers[i].getPhi()<<endl;
 
-        if(DeltaR(iPhi,iEta,towers[i].getPhi(),towers[i].getEta())<ISOL_Cone) {
-          cout<<"delta R pour lequel on add "<<DeltaR(iPhi,iEta,towers[i].getPhi(),towers[i].getEta())<<endl;
+        if(DeltaR(iPhi,iEta,towers[i].getPhi(),towers[i].getEta()) < ISOL_calo_Cone) {
            etiso += towers[i].getET(); // dR cut on tracks
           }
@@ -1464,8 +1469,8 @@
   // iTower is the index of the tower, in [0, n_tower]. iTower points only towers in positive range
 
-   if(ISOL_Calo_ET>1E10) return UNDEFINED; // avoid doing anything unreasonable...
+   if(ISOL_calo_ET>1E10) return UNDEFINED; // avoid doing anything unreasonable...
    float et_sum=0;
 
-   unsigned int N = ISOL_Calo_Grid;
+   unsigned int N = ISOL_calo_Grid;
    if(N%2 ==0 || N==0) { cout << "Warning: ISOL_Calo_Grid must be odd. ISOL_Calo_Grid = 3 will be used\n"; N=3;}
    int index= iTower; // index of the central tower of the grid in TOWER_eta_edges[.]; 
@@ -1499,5 +1504,5 @@
             //     << "calMuon.getEta= " << calMuon.getEta() << "\tcalMuon.getPhi()= " << calMuon.getPhi() <<"\t";
 
-            if(calMuon.getEta() != UNDEFINED && calMuon.getET() > ISOL_Calo_ET) {
+            if(calMuon.getEta() != UNDEFINED && calMuon.getET() > ISOL_calo_ET) {
                et_sum += calMuon.getET();
                //cout << calMuon.getET() << " GeV";
