Fork me on GitHub

Ignore:
Timestamp:
Dec 9, 2014, 1:27:13 PM (10 years ago)
Author:
Michele <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
37deb3b, 9e991f8
Parents:
f6b6ee7 (diff), e7e90df (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'TestFastJet310b1'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • external/fastjet/plugins/CDFCones/MidPointAlgorithm.cc

    rf6b6ee7 r49234af  
    1111// History of changes compared to the original MidPointAlgorithm.cc file
    1212//
     13// 2014-08-13 Matteo Cacciari and Gavin Salam
     14//        * changed a number of int -> unsigned (and in one case
     15//          added explicit conversion to int) to eliminate
     16//          long-standing compiler warnings
     17//
    1318// 2009-01-17  Gregory Soyez  <soyez@fastjet.fr>
    1419//
     
    6873  std::vector< std::vector<bool> > distanceOK;
    6974  distanceOK.resize(stableCones.size() - 1);
    70   for(int nCluster1 = 1; nCluster1 < stableCones.size(); nCluster1++){
     75  // MC+GPS 2014-08-13, replaced int with unsigned
     76  for(unsigned nCluster1 = 1; nCluster1 < stableCones.size(); nCluster1++){
    7177    distanceOK[nCluster1 - 1].resize(nCluster1);
    7278    double cluster1Rapidity = stableCones[nCluster1].fourVector.y();
    7379    double cluster1Phi      = stableCones[nCluster1].fourVector.phi();
    74     for(int nCluster2 = 0; nCluster2 < nCluster1; nCluster2++){
     80    // MC+GPS 2014-08-13, replaced int with unsigned
     81    for(unsigned nCluster2 = 0; nCluster2 < nCluster1; nCluster2++){
    7582      double cluster2Rapidity = stableCones[nCluster2].fourVector.y();
    7683      double cluster2Phi      = stableCones[nCluster2].fourVector.phi();
     
    94101  // Loop over all combinations. Calculate MidPoint. Make midPointClusters.
    95102  bool reduceConeSize = false;
    96   for(int iPair = 0; iPair < pairs.size(); iPair++){
     103  // MC+GPS 2014-08-13, replaced int with unsigned
     104  for(unsigned iPair = 0; iPair < pairs.size(); iPair++){
    97105    // Calculate rapidity, phi and pT of MidPoint.
    98106    LorentzVector midPoint(0,0,0,0);
    99     for(int iPairMember = 0; iPairMember < pairs[iPair].size(); iPairMember++)
     107    // MC+GPS 2014-08-13, replaced int with unsigned
     108    for(unsigned iPairMember = 0; iPairMember < pairs[iPair].size(); iPairMember++)
    100109      midPoint.add(stableCones[pairs[iPair][iPairMember]].fourVector);
    101110    iterateCone(midPoint.y(),midPoint.phi(),midPoint.pt(),towers,stableCones,reduceConeSize);
     
    174183  if(testPair.size())
    175184    nextClusterStart = testPair.back() + 1;
    176   for(int nextCluster = nextClusterStart; nextCluster <= distanceOK.size(); nextCluster++){
     185  // MC+GPS 2014-08-13, replaced int nextCluster with unsigned
     186  for(unsigned nextCluster = nextClusterStart; nextCluster <= distanceOK.size(); nextCluster++){
    177187    // Is new SeedCone less than 2*_coneRadius apart from all clusters in testPair?
    178188    bool addCluster = true;
    179     for(int iCluster = 0; iCluster < testPair.size() && addCluster; iCluster++)
     189    // MC+GPS 2014-08-13, replaced int iCluster with unsigned
     190    for(unsigned iCluster = 0; iCluster < testPair.size() && addCluster; iCluster++)
    180191      if(!distanceOK[nextCluster - 1][testPair[iCluster]])
    181192        addCluster = false;
     
    187198        pairs.push_back(testPair);
    188199      // If not bigger than allowed, find more clusters within 2*_coneRadius.
    189       if(testPair.size() < maxClustersInPair)
     200      // GPS+MC 2014-08-13, replaced testPair.size() with int(testPair.size())
     201      if(int(testPair.size()) < maxClustersInPair)
    190202        addClustersToPairs(testPair,pairs,distanceOK,maxClustersInPair);
    191203      // All combinations containing testPair found. Remove last element.
Note: See TracChangeset for help on using the changeset viewer.