Changeset 35cdc46 in git for external/fastjet/plugins/CDFCones/MidPointAlgorithm.cc
- Timestamp:
- Sep 3, 2014, 3:18:54 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- be2222c
- Parents:
- 5b5a56b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
external/fastjet/plugins/CDFCones/MidPointAlgorithm.cc
r5b5a56b r35cdc46 11 11 // History of changes compared to the original MidPointAlgorithm.cc file 12 12 // 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 // 13 18 // 2009-01-17 Gregory Soyez <soyez@fastjet.fr> 14 19 // … … 68 73 std::vector< std::vector<bool> > distanceOK; 69 74 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++){ 71 77 distanceOK[nCluster1 - 1].resize(nCluster1); 72 78 double cluster1Rapidity = stableCones[nCluster1].fourVector.y(); 73 79 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++){ 75 82 double cluster2Rapidity = stableCones[nCluster2].fourVector.y(); 76 83 double cluster2Phi = stableCones[nCluster2].fourVector.phi(); … … 94 101 // Loop over all combinations. Calculate MidPoint. Make midPointClusters. 95 102 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++){ 97 105 // Calculate rapidity, phi and pT of MidPoint. 98 106 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++) 100 109 midPoint.add(stableCones[pairs[iPair][iPairMember]].fourVector); 101 110 iterateCone(midPoint.y(),midPoint.phi(),midPoint.pt(),towers,stableCones,reduceConeSize); … … 174 183 if(testPair.size()) 175 184 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++){ 177 187 // Is new SeedCone less than 2*_coneRadius apart from all clusters in testPair? 178 188 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++) 180 191 if(!distanceOK[nextCluster - 1][testPair[iCluster]]) 181 192 addCluster = false; … … 187 198 pairs.push_back(testPair); 188 199 // 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) 190 202 addClustersToPairs(testPair,pairs,distanceOK,maxClustersInPair); 191 203 // All combinations containing testPair found. Remove last element.
Note:
See TracChangeset
for help on using the changeset viewer.