Index: trunk/Utilities/Fastjet/plugins/CDFCones/CDFJetCluPlugin.cc
===================================================================
--- trunk/Utilities/Fastjet/plugins/CDFCones/CDFJetCluPlugin.cc	(revision 42)
+++ trunk/Utilities/Fastjet/plugins/CDFCones/CDFJetCluPlugin.cc	(revision 100)
@@ -1,4 +1,4 @@
 //STARTHEADER
-// $Id: CDFJetCluPlugin.cc,v 1.1 2008-11-06 14:32:10 ovyn Exp $
+// $Id: CDFJetCluPlugin.cc,v 1.2 2008-12-18 13:38:29 ovyn Exp $
 //
 // Copyright (c) 2005-2006, Matteo Cacciari and Gavin Salam
@@ -72,5 +72,12 @@
     LorentzVector fourvect(particle.px(), particle.py(),
 			   particle.pz(), particle.E());
+//std::cout<<"avant la reconstruction "<<particle.eta()<<std::endl;
+    //PhysicsTower tower(fourvect);
     PhysicsTower tower(fourvect);
+
+std::cout<<"apres la reconstruction "<<tower.eta()<<std::endl;
+//std::cout<<"apres la reconstruction ieta "<<tower.iEta()<<std::endl;
+
+
     // add tracking information for later
     tower.fjindex = i;
Index: trunk/Utilities/Fastjet/plugins/CDFCones/interface/CalTower.hh
===================================================================
--- trunk/Utilities/Fastjet/plugins/CDFCones/interface/CalTower.hh	(revision 42)
+++ trunk/Utilities/Fastjet/plugins/CDFCones/interface/CalTower.hh	(revision 100)
@@ -7,4 +7,5 @@
 
 #include <cmath>
+#include <iostream>
 
 #ifndef M_PI
@@ -14,9 +15,10 @@
 const double pi = acos(-1);
 
-/*
- // CDF data : 22 towers. step=2.7Â° at the beginning, and after, it changes
-const unsigned int ntower = 22;
-const double TOWER_THETA[ntower+1] = {3.000,  5.700,  8.400, 11.100, 13.800, 16.500, 19.200, 21.900, 24.600, 27.300, 30.000,// step=2.7Â°
-          33.524,  36.822, 40.261, 43.614, 47.436, 51.790, 56.735, 62.310, 68.516, 75.297, 82.526, 90.000 };
+
+/* // CDF data : 22 towers. step=2.7Â° at the beginning, and after, it changes
+const unsigned int ntower = 0;
+const double TOWER_THETA[ntower+1] = {0},// step=2.7Â°
+//const double TOWER_THETA[ntower+1] = {3.000,  5.700,  8.400, 11.100, 13.800, 16.500, 19.200, 21.900, 24.600, 27.300, 30.000,// step=2.7Â°
+//          33.524,  36.822, 40.261, 43.614, 47.436, 51.790, 56.735, 62.310, 68.516, 75.297, 82.526, 90.000 };
 const double tower_eta_edges[ntower+1] = {
     0.0,   0.130817437415,   0.259479460739,   0.384075299436,   0.503273260393,   0.616250691646,   0.72264587494,   0.822472442947,   
@@ -29,6 +31,8 @@
 */
 
+
 // CMS data
 const unsigned int ntower = 40;
+//const double tower_eta_edges[ntower+1] = {0}; // list of the edges of each tower, in eta, for eta>0, assuming a symmetric detector in eta<0 
 const double tower_eta_edges[ntower+1] = { // list of the edges of each tower, in eta, for eta>0, assuming a symmetric detector in eta<0 
     0., // lower limit of the most central tower
@@ -39,4 +43,5 @@
     5.000}; // higher limit of the most forward tower
 
+//const double tower_dphi[ntower] = {}; // list of the tower size in phi (in degrees)
 const double tower_dphi[ntower] = { // list of the tower size in phi (in degrees)
      5, 5, 5, 5, 5,  5, 5, 5, 5, 5,  5, 5, 5, 5, 5,  5, 5, 5, 5, 10,
Index: trunk/Utilities/Fastjet/plugins/CDFCones/src/JetCluAlgorithm.cc
===================================================================
--- trunk/Utilities/Fastjet/plugins/CDFCones/src/JetCluAlgorithm.cc	(revision 42)
+++ trunk/Utilities/Fastjet/plugins/CDFCones/src/JetCluAlgorithm.cc	(revision 100)
@@ -1,2 +1,3 @@
+#include "../interface/CalTower.hh"
 #include "../interface/JetCluAlgorithm.hh"
 #include "../interface/ClusterComparisons.hh"
@@ -4,6 +5,8 @@
 #include <algorithm>
 #include <cmath>
-
-void JetCluAlgorithm::makeSeedTowers(std::vector<PhysicsTower>& towers, std::vector<Cluster>& seedTowers)
+#include <iostream>
+
+using namespace std;
+/*void JetCluAlgorithm::makeSeedTowers(std::vector<PhysicsTower>& towers, std::vector<Cluster>& seedTowers)
 {
   for(int iEta = 4; iEta < 48; iEta++){
@@ -22,5 +25,26 @@
   }
   sort(seedTowers.begin(),seedTowers.end(),ClusterCentroidEtGreater());
-}
+}*/
+
+void JetCluAlgorithm::makeSeedTowers(std::vector<PhysicsTower>& towers, std::vector<Cluster>& seedTowers)
+{
+  for(int iEta = 0; iEta < 2*ntower; iEta++){
+
+    int myphiindex = (iEta<ntower) ? iEta : iEta-ntower;
+    int nphi =  (int) 360/tower_dphi[myphiindex]; // number of phi segments for this eta
+    for(int iPhi = 0; iPhi < nphi; iPhi++){
+      Cluster seed;
+      for(std::vector<PhysicsTower>::iterator towerIter = towers.begin(); towerIter != towers.end(); towerIter++)
+        if(towerIter->iEta() == iEta && towerIter->iPhi() == iPhi ) {
+          seed.addTower(*towerIter);
+	}
+      if(seed.centroid.Et > _seedThreshold) {
+        seedTowers.push_back(seed);
+      }
+    }
+  }
+  sort(seedTowers.begin(),seedTowers.end(),ClusterCentroidEtGreater());
+}
+
 
 void JetCluAlgorithm::buildPreClusters(std::vector<Cluster>& seedTowers, std::vector<PhysicsTower>& towers,
@@ -40,6 +64,6 @@
 	int iEtaSeedTower = seedTowerIter->towerList.begin()->iEta();
 	int iPhiSeedTower = seedTowerIter->towerList.begin()->iPhi();
-	if(iEtaSeedTower >= 8 && iEtaSeedTower < 14 || iEtaSeedTower >= 38 && iEtaSeedTower < 44)
-	  iPhiSeedTower = iPhiSeedTower/2;
+//	if(iEtaSeedTower >= 8 && iEtaSeedTower < 14 || iEtaSeedTower >= 38 && iEtaSeedTower < 44)
+//	  iPhiSeedTower = iPhiSeedTower/2;
  	for(std::vector<PhysicsTower>::iterator preClusterTowerIter = preClusterIter->towerList.begin();
 	    preClusterTowerIter != preClusterIter->towerList.end() && !seedTowerAddedToPreCluster;
@@ -47,10 +71,10 @@
 	  int iEtaPreClusterTower = preClusterTowerIter->iEta();
 	  int iPhiPreClusterTower = preClusterTowerIter->iPhi();
-	  if(iEtaPreClusterTower >= 8 && iEtaPreClusterTower < 14 || iEtaPreClusterTower >= 38 && iEtaPreClusterTower < 44)
-	    iPhiPreClusterTower = iPhiPreClusterTower/2;
+//	  if(iEtaPreClusterTower >= 8 && iEtaPreClusterTower < 14 || iEtaPreClusterTower >= 38 && iEtaPreClusterTower < 44)
+//	    iPhiPreClusterTower = iPhiPreClusterTower/2;
 	  int dIEta = abs(iEtaSeedTower - iEtaPreClusterTower);
 	  int dIPhi = abs(iPhiSeedTower - iPhiPreClusterTower);
-	  if(dIPhi > 12)
-	    dIPhi = 24 - dIPhi;
+//	  if(dIPhi > 12)
+//	    dIPhi = 24 - dIPhi;
 	  int adj = dIPhi*dIPhi + dIEta*dIEta;
 	  if(adj <= _adjacencyCut){
