Changeset 100 in svn for trunk/Utilities/Fastjet/plugins/CDFCones/src
- Timestamp:
- Dec 18, 2008, 2:39:26 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Utilities/Fastjet/plugins/CDFCones/src/JetCluAlgorithm.cc
r11 r100 1 #include "../interface/CalTower.hh" 1 2 #include "../interface/JetCluAlgorithm.hh" 2 3 #include "../interface/ClusterComparisons.hh" … … 4 5 #include <algorithm> 5 6 #include <cmath> 6 7 void JetCluAlgorithm::makeSeedTowers(std::vector<PhysicsTower>& towers, std::vector<Cluster>& seedTowers) 7 #include <iostream> 8 9 using namespace std; 10 /*void JetCluAlgorithm::makeSeedTowers(std::vector<PhysicsTower>& towers, std::vector<Cluster>& seedTowers) 8 11 { 9 12 for(int iEta = 4; iEta < 48; iEta++){ … … 22 25 } 23 26 sort(seedTowers.begin(),seedTowers.end(),ClusterCentroidEtGreater()); 24 } 27 }*/ 28 29 void JetCluAlgorithm::makeSeedTowers(std::vector<PhysicsTower>& towers, std::vector<Cluster>& seedTowers) 30 { 31 for(int iEta = 0; iEta < 2*ntower; iEta++){ 32 33 int myphiindex = (iEta<ntower) ? iEta : iEta-ntower; 34 int nphi = (int) 360/tower_dphi[myphiindex]; // number of phi segments for this eta 35 for(int iPhi = 0; iPhi < nphi; iPhi++){ 36 Cluster seed; 37 for(std::vector<PhysicsTower>::iterator towerIter = towers.begin(); towerIter != towers.end(); towerIter++) 38 if(towerIter->iEta() == iEta && towerIter->iPhi() == iPhi ) { 39 seed.addTower(*towerIter); 40 } 41 if(seed.centroid.Et > _seedThreshold) { 42 seedTowers.push_back(seed); 43 } 44 } 45 } 46 sort(seedTowers.begin(),seedTowers.end(),ClusterCentroidEtGreater()); 47 } 48 25 49 26 50 void JetCluAlgorithm::buildPreClusters(std::vector<Cluster>& seedTowers, std::vector<PhysicsTower>& towers, … … 40 64 int iEtaSeedTower = seedTowerIter->towerList.begin()->iEta(); 41 65 int iPhiSeedTower = seedTowerIter->towerList.begin()->iPhi(); 42 if(iEtaSeedTower >= 8 && iEtaSeedTower < 14 || iEtaSeedTower >= 38 && iEtaSeedTower < 44)43 iPhiSeedTower = iPhiSeedTower/2;66 // if(iEtaSeedTower >= 8 && iEtaSeedTower < 14 || iEtaSeedTower >= 38 && iEtaSeedTower < 44) 67 // iPhiSeedTower = iPhiSeedTower/2; 44 68 for(std::vector<PhysicsTower>::iterator preClusterTowerIter = preClusterIter->towerList.begin(); 45 69 preClusterTowerIter != preClusterIter->towerList.end() && !seedTowerAddedToPreCluster; … … 47 71 int iEtaPreClusterTower = preClusterTowerIter->iEta(); 48 72 int iPhiPreClusterTower = preClusterTowerIter->iPhi(); 49 if(iEtaPreClusterTower >= 8 && iEtaPreClusterTower < 14 || iEtaPreClusterTower >= 38 && iEtaPreClusterTower < 44)50 iPhiPreClusterTower = iPhiPreClusterTower/2;73 // if(iEtaPreClusterTower >= 8 && iEtaPreClusterTower < 14 || iEtaPreClusterTower >= 38 && iEtaPreClusterTower < 44) 74 // iPhiPreClusterTower = iPhiPreClusterTower/2; 51 75 int dIEta = abs(iEtaSeedTower - iEtaPreClusterTower); 52 76 int dIPhi = abs(iPhiSeedTower - iPhiPreClusterTower); 53 if(dIPhi > 12)54 dIPhi = 24 - dIPhi;77 // if(dIPhi > 12) 78 // dIPhi = 24 - dIPhi; 55 79 int adj = dIPhi*dIPhi + dIEta*dIEta; 56 80 if(adj <= _adjacencyCut){
Note:
See TracChangeset
for help on using the changeset viewer.