Changeset 100 in svn for trunk/Utilities/Fastjet/plugins/CDFCones
- Timestamp:
- Dec 18, 2008, 2:39:26 PM (16 years ago)
- Location:
- trunk/Utilities/Fastjet/plugins/CDFCones
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Utilities/Fastjet/plugins/CDFCones/CDFJetCluPlugin.cc
r11 r100 1 1 //STARTHEADER 2 // $Id: CDFJetCluPlugin.cc,v 1. 1 2008-11-06 14:32:10ovyn Exp $2 // $Id: CDFJetCluPlugin.cc,v 1.2 2008-12-18 13:38:29 ovyn Exp $ 3 3 // 4 4 // Copyright (c) 2005-2006, Matteo Cacciari and Gavin Salam … … 72 72 LorentzVector fourvect(particle.px(), particle.py(), 73 73 particle.pz(), particle.E()); 74 //std::cout<<"avant la reconstruction "<<particle.eta()<<std::endl; 75 //PhysicsTower tower(fourvect); 74 76 PhysicsTower tower(fourvect); 77 78 std::cout<<"apres la reconstruction "<<tower.eta()<<std::endl; 79 //std::cout<<"apres la reconstruction ieta "<<tower.iEta()<<std::endl; 80 81 75 82 // add tracking information for later 76 83 tower.fjindex = i; -
trunk/Utilities/Fastjet/plugins/CDFCones/interface/CalTower.hh
r42 r100 7 7 8 8 #include <cmath> 9 #include <iostream> 9 10 10 11 #ifndef M_PI … … 14 15 const double pi = acos(-1); 15 16 16 /* 17 // CDF data : 22 towers. step=2.7° at the beginning, and after, it changes 18 const unsigned int ntower = 22; 19 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° 20 33.524, 36.822, 40.261, 43.614, 47.436, 51.790, 56.735, 62.310, 68.516, 75.297, 82.526, 90.000 }; 17 18 /* // CDF data : 22 towers. step=2.7° at the beginning, and after, it changes 19 const unsigned int ntower = 0; 20 const double TOWER_THETA[ntower+1] = {0},// step=2.7° 21 //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° 22 // 33.524, 36.822, 40.261, 43.614, 47.436, 51.790, 56.735, 62.310, 68.516, 75.297, 82.526, 90.000 }; 21 23 const double tower_eta_edges[ntower+1] = { 22 24 0.0, 0.130817437415, 0.259479460739, 0.384075299436, 0.503273260393, 0.616250691646, 0.72264587494, 0.822472442947, … … 29 31 */ 30 32 33 31 34 // CMS data 32 35 const unsigned int ntower = 40; 36 //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 33 37 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 34 38 0., // lower limit of the most central tower … … 39 43 5.000}; // higher limit of the most forward tower 40 44 45 //const double tower_dphi[ntower] = {}; // list of the tower size in phi (in degrees) 41 46 const double tower_dphi[ntower] = { // list of the tower size in phi (in degrees) 42 47 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, -
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.