Fork me on GitHub

Ignore:
Timestamp:
Dec 18, 2008, 2:39:26 PM (16 years ago)
Author:
severine ovyn
Message:

Remove datacard bug + CaloTowers OK

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Utilities/Fastjet/plugins/CDFCones/src/JetCluAlgorithm.cc

    r11 r100  
     1#include "../interface/CalTower.hh"
    12#include "../interface/JetCluAlgorithm.hh"
    23#include "../interface/ClusterComparisons.hh"
     
    45#include <algorithm>
    56#include <cmath>
    6 
    7 void JetCluAlgorithm::makeSeedTowers(std::vector<PhysicsTower>& towers, std::vector<Cluster>& seedTowers)
     7#include <iostream>
     8
     9using namespace std;
     10/*void JetCluAlgorithm::makeSeedTowers(std::vector<PhysicsTower>& towers, std::vector<Cluster>& seedTowers)
    811{
    912  for(int iEta = 4; iEta < 48; iEta++){
     
    2225  }
    2326  sort(seedTowers.begin(),seedTowers.end(),ClusterCentroidEtGreater());
    24 }
     27}*/
     28
     29void 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
    2549
    2650void JetCluAlgorithm::buildPreClusters(std::vector<Cluster>& seedTowers, std::vector<PhysicsTower>& towers,
     
    4064        int iEtaSeedTower = seedTowerIter->towerList.begin()->iEta();
    4165        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;
    4468        for(std::vector<PhysicsTower>::iterator preClusterTowerIter = preClusterIter->towerList.begin();
    4569            preClusterTowerIter != preClusterIter->towerList.end() && !seedTowerAddedToPreCluster;
     
    4771          int iEtaPreClusterTower = preClusterTowerIter->iEta();
    4872          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;
    5175          int dIEta = abs(iEtaSeedTower - iEtaPreClusterTower);
    5276          int dIPhi = abs(iPhiSeedTower - iPhiPreClusterTower);
    53           if(dIPhi > 12)
    54             dIPhi = 24 - dIPhi;
     77//        if(dIPhi > 12)
     78//          dIPhi = 24 - dIPhi;
    5579          int adj = dIPhi*dIPhi + dIEta*dIEta;
    5680          if(adj <= _adjacencyCut){
Note: See TracChangeset for help on using the changeset viewer.