Fork me on GitHub

Ignore:
Timestamp:
Nov 17, 2008, 11:07:45 PM (16 years ago)
Author:
Xavier Rouby
Message:

first attemp towers CMS

File:
1 edited

Legend:

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

    r11 r35  
    1818  std::vector< std::vector<bool> > distanceOK;
    1919  distanceOK.resize(stableCones.size() - 1);
    20   for(int nCluster1 = 1; nCluster1 < stableCones.size(); nCluster1++){
     20  for(unsigned int nCluster1 = 1; nCluster1 < stableCones.size(); nCluster1++){
    2121    distanceOK[nCluster1 - 1].resize(nCluster1);
    2222    double cluster1Rapidity = stableCones[nCluster1].fourVector.y();
    2323    double cluster1Phi      = stableCones[nCluster1].fourVector.phi();
    24     for(int nCluster2 = 0; nCluster2 < nCluster1; nCluster2++){
     24    for(unsigned int nCluster2 = 0; nCluster2 < nCluster1; nCluster2++){
    2525      double cluster2Rapidity = stableCones[nCluster2].fourVector.y();
    2626      double cluster2Phi      = stableCones[nCluster2].fourVector.phi();
     
    3737  std::vector< std::vector<int> > pairs(0);
    3838  std::vector<int> testPair(0);
    39   int maxClustersInPair = _maxPairSize;
     39  unsigned int maxClustersInPair = _maxPairSize;
    4040  if(!maxClustersInPair)
    4141    maxClustersInPair = stableCones.size();
     
    4444  // Loop over all combinations. Calculate MidPoint. Make midPointClusters.
    4545  bool reduceConeSize = false;
    46   for(int iPair = 0; iPair < pairs.size(); iPair++){
     46  for(unsigned int iPair = 0; iPair < pairs.size(); iPair++){
    4747    // Calculate rapidity, phi and pT of MidPoint.
    4848    LorentzVector midPoint(0,0,0,0);
    49     for(int iPairMember = 0; iPairMember < pairs[iPair].size(); iPairMember++)
     49    for(unsigned int iPairMember = 0; iPairMember < pairs[iPair].size(); iPairMember++)
    5050      midPoint.add(stableCones[pairs[iPair][iPairMember]].fourVector);
    5151    iterateCone(midPoint.y(),midPoint.phi(),midPoint.pt(),towers,stableCones,reduceConeSize);
     
    116116
    117117void MidPointAlgorithm::addClustersToPairs(std::vector<int>& testPair, std::vector< std::vector<int> >& pairs,
    118                                            std::vector< std::vector<bool> >& distanceOK, int maxClustersInPair)
     118                                           std::vector< std::vector<bool> >& distanceOK, unsigned int maxClustersInPair)
    119119{
    120120  // Recursively adds clusters to pairs, triplets, ... whose mid-points are then calculated.
     
    124124  if(testPair.size())
    125125    nextClusterStart = testPair.back() + 1;
    126   for(int nextCluster = nextClusterStart; nextCluster <= distanceOK.size(); nextCluster++){
     126  for(unsigned int nextCluster = nextClusterStart; nextCluster <= distanceOK.size(); nextCluster++){
    127127    // Is new SeedCone less than 2*_coneRadius apart from all clusters in testPair?
    128128    bool addCluster = true;
    129     for(int iCluster = 0; iCluster < testPair.size() && addCluster; iCluster++)
     129    for(unsigned int iCluster = 0; iCluster < testPair.size() && addCluster; iCluster++)
    130130      if(!distanceOK[nextCluster - 1][testPair[iCluster]])
    131131        addCluster = false;
Note: See TracChangeset for help on using the changeset viewer.