Index: /trunk/CHANGELOG
===================================================================
--- /trunk/CHANGELOG	(revision 550)
+++ /trunk/CHANGELOG	(revision 551)
@@ -1,3 +1,4 @@
 * Changes relative to V.1.8
+   - new: ./configure for the installation
    - update: default jet algorithms have change in data cards
    - update: adding some missing "#include" statements due to a loss of 
Index: /trunk/Delphes.cpp
===================================================================
--- /trunk/Delphes.cpp	(revision 550)
+++ /trunk/Delphes.cpp	(revision 551)
@@ -629,9 +629,8 @@
 	  elementElec->IsolPt = ptisoEl;
 
-cout << "\nC'est un electron\n";
 	  int electron_tower_index = DET->BinEtaPhi(elementElec->PhiCalo,elementElec->EtaCalo,iPhiEl,iEtaEl); 
  	  D_CaloTower calElec(list_of_active_towers.getElement(iEtaEl,iPhiEl));
 	  elementElec->EHoverEE = calElec.getEhad()/calElec.getEem();
-          elementElec->EtRatio =  DET->CaloIsolation(muon[i], list_of_active_towers,iPhiEl,iEtaEl,electron_tower_index);
+          elementElec->EtRatio =  DET->CaloIsolation(electron[i], list_of_active_towers,iPhiEl,iEtaEl,electron_tower_index);
 	}			
       
@@ -648,6 +647,4 @@
 	  elementMu->IsolPt = ptisoMu;
 
-cout << "\nC'est un muon\n";
-          // binning of the muon position in calo
 	  int muon_tower_index = DET->BinEtaPhi(elementMu->PhiCalo,elementMu->EtaCalo,iPhiMu,iEtaMu);
 	  D_CaloTower calMuon(list_of_active_towers.getElement(iEtaMu,iPhiMu));
Index: /trunk/data/DetectorCard.dat
===================================================================
--- /trunk/data/DetectorCard.dat	(revision 550)
+++ /trunk/data/DetectorCard.dat	(revision 551)
@@ -136,5 +136,5 @@
 NEvents_Frog      100
 # Number of events to process 
-NEvents           100                    // -1 means 'all'
+NEvents           -1                    // -1 means 'all'
 
 # input PDG tables
Index: /trunk/src/CaloUtil.cc
===================================================================
--- /trunk/src/CaloUtil.cc	(revision 550)
+++ /trunk/src/CaloUtil.cc	(revision 551)
@@ -237,5 +237,4 @@
 		return _calotowers[i];
   }
-cout << "Xav!!!!! not found in getElement" << endl;
   return dummyTower; // if not found
 }
@@ -248,5 +247,4 @@
                 return _calotowers[i];
   }
-cout << "Xav!!!!! not found in getElement const" << endl;
   return dummyTower; // if not found
 }
Index: /trunk/src/SmearUtil.cc
===================================================================
--- /trunk/src/SmearUtil.cc	(revision 550)
+++ /trunk/src/SmearUtil.cc	(revision 551)
@@ -1445,8 +1445,4 @@
   // iTower is the index of the tower, in [0, n_tower]. iTower points only towers in positive range
 
-  // etrat, which is a percentage between 00 and 99. It is the ratio of the transverse energy 
-  // in a NÃN grid surrounding the muon to the pT of the muon. For well-isolated muons, both ptiso and etrat will be small.
-  // available parameters: ISOL_Calo_ET ,  ISOL_Calo_Grid
-
    if(ISOL_Calo_ET>1E10) return UNDEFINED; // avoid doing anything unreasonable...
    float et_sum=0;
@@ -1457,9 +1453,5 @@
                       // !! TOWER_eta_edges is only with eta>0
 
-cout << "iEta= " << iEta << "\tiPhi= " << iPhi << endl;
-   //cout << "la particule est dans la " << index << "eme cellule, entre " << TOWER_eta_edges[index] << " et " << TOWER_eta_edges[index+1] << endl;
-   //float centre = (iEta>0) ? ((TOWER_eta_edges[index]+TOWER_eta_edges[index+1])/2.0) : -((TOWER_eta_edges[index]+TOWER_eta_edges[index+1])/2.0);
-   //cout << "le centre de cette tour est " << centre << endl; 
-
+   //cout << "iEta= " << iEta << "\tiPhi= " << iPhi << endl;
    if(index != iUNDEFINED) {
       int range = (int) (N-1)/2;           // the (int) conversion is needed, as N is "unsigned int"
@@ -1467,11 +1459,12 @@
       // goal : to identify the center of each cell in the NxN grid.
       // the eta/phi coordinates of each center will be in (eta_ith_tower,phi_ith_tower)
-
          unsigned int i_eta = (index+i>=0) ? index + i : (int) -1*(index + i +1); // i_eta is the index in [0; index_eta_max]
-         //cout << i_eta << "\t";
+         if(i_eta>=TOWER_number) continue; // avoid going too far: TOWER_dphi[TOWER_number], TOWER_eta_edges[TOWER_number+1]
+         //cout << "i_eta" << i_eta << "\t TOWER_number = " << TOWER_number << endl;
+
          float dphi = TOWER_dphi[i_eta]*pi/180.; // in rad // size in phi of the cells for this eta
          float eta_ith_tower = (TOWER_eta_edges[i_eta]+TOWER_eta_edges[i_eta+1])/2.0;
          if(iEta<0) eta_ith_tower *= -1;     // needed if the central tower is in negative region
-         if(index+i<0) eta_ith_tower *= -1;  // needed if the central part is crossed by the grid
+         if(index+i<0) eta_ith_tower *= -1;  // needed if the "eta=0"-axis is crossed by the grid
          //cout << "pour eta_ith_tower=" << eta_ith_tower << ", on va dphi = " << dphi << endl;
          // !!! at this point, eta_ith_tower is the value in eta of the center of the current calo cell
@@ -1484,18 +1477,14 @@
             
             D_CaloTower calMuon(towers.getElement(eta_ith_tower,phi_ith_tower));
-            cout << "eta_ith_tower= "   << eta_ith_tower     << "\tphi_ith_tower= " << phi_ith_tower <<"\t"
-                 << "calMuon.getEta= " << calMuon.getEta() << "\tcalMuon.getPhi()= " << calMuon.getPhi() <<"\t";
-
-            if(calMuon.getEta() != UNDEFINED )
-             if(calMuon.getET() > ISOL_Calo_ET) {
-              et_sum += calMuon.getET();
-              //cout << "eta/phi/Et = " << eta_ith_tower << "\t" << phi_ith_tower << "\t" << calMuon.getET() << " GeV" << endl;
-              cout << calMuon.getET() << " GeV";
+            //cout << "eta_ith_tower= "   << eta_ith_tower     << "\tphi_ith_tower= " << phi_ith_tower <<"\t"
+            //     << "calMuon.getEta= " << calMuon.getEta() << "\tcalMuon.getPhi()= " << calMuon.getPhi() <<"\t";
+
+            if(calMuon.getEta() != UNDEFINED && calMuon.getET() > ISOL_Calo_ET) {
+               et_sum += calMuon.getET();
+               //cout << calMuon.getET() << " GeV";
             }
-            //else cout << "eta/phi = " << eta_ith_tower << "\t" << phi_ith_tower << "\tnot active\n";
-            else cout << phi_ith_tower << "\tnot active";
-            cout << endl;
-         }
-      }
+            //else cout << " not active";
+         } // j-loop (phi indices)
+      } // i-loop (eta indices)
    }  // undefined index
    else {
@@ -1503,19 +1492,7 @@
      if (CEN_max_mu < CEN_max_calo_fwd) 
         cout << "**    ERROR in RESOLution::CaloIsolation: 'muon'-tower not found!  **" << endl; 
-   }
-        // should never happen ! this would be a bug
-  //cout << "etrat = " << et_sum << "\t Pt=" << part.Pt() << endl;
-  
-  // should return a number between 0 and 99 (due to LHCO definitions)
-  // which is Pt(muon) / sum(ET)
-  float etrat = 0.;
-/*  if(et_sum==0) etrat = 99.;
-  //else if(et_sum>0) etrat = 100*part.Pt()/et_sum;
-  if(etrat<0) cout << "Error: negative etrat in CaloIsolation (" << etrat <<")\n";
-  //else if(etrat>99) cout << "Error: etrat should be in [0;99] in CaloIsolation (" << etrat <<")\n";
-  if(etrat>99) etrat = 99;
-*/
-  etrat = et_sum/part.Pt();
-  return etrat; 
+   }      // should never happen ! this would be a bug
+  
+  return (part.Pt()==0)? UNDEFINED: et_sum/part.Pt();
 }
 
