Fork me on GitHub

Changeset 100 in svn for trunk/Utilities/Fastjet


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

Remove datacard bug + CaloTowers OK

Location:
trunk/Utilities/Fastjet/plugins/CDFCones
Files:
3 edited

Legend:

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

    r11 r100  
    11//STARTHEADER
    2 // $Id: CDFJetCluPlugin.cc,v 1.1 2008-11-06 14:32:10 ovyn Exp $
     2// $Id: CDFJetCluPlugin.cc,v 1.2 2008-12-18 13:38:29 ovyn Exp $
    33//
    44// Copyright (c) 2005-2006, Matteo Cacciari and Gavin Salam
     
    7272    LorentzVector fourvect(particle.px(), particle.py(),
    7373                           particle.pz(), particle.E());
     74//std::cout<<"avant la reconstruction "<<particle.eta()<<std::endl;
     75    //PhysicsTower tower(fourvect);
    7476    PhysicsTower tower(fourvect);
     77
     78std::cout<<"apres la reconstruction "<<tower.eta()<<std::endl;
     79//std::cout<<"apres la reconstruction ieta "<<tower.iEta()<<std::endl;
     80
     81
    7582    // add tracking information for later
    7683    tower.fjindex = i;
  • trunk/Utilities/Fastjet/plugins/CDFCones/interface/CalTower.hh

    r42 r100  
    77
    88#include <cmath>
     9#include <iostream>
    910
    1011#ifndef M_PI
     
    1415const double pi = acos(-1);
    1516
    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
     19const unsigned int ntower = 0;
     20const 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 };
    2123const double tower_eta_edges[ntower+1] = {
    2224    0.0,   0.130817437415,   0.259479460739,   0.384075299436,   0.503273260393,   0.616250691646,   0.72264587494,   0.822472442947,   
     
    2931*/
    3032
     33
    3134// CMS data
    3235const 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
    3337const 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
    3438    0., // lower limit of the most central tower
     
    3943    5.000}; // higher limit of the most forward tower
    4044
     45//const double tower_dphi[ntower] = {}; // list of the tower size in phi (in degrees)
    4146const double tower_dphi[ntower] = { // list of the tower size in phi (in degrees)
    4247     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"
    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.