Changeset 35 in svn for trunk/Utilities/Fastjet/plugins/CDFCones/src
- Timestamp:
- Nov 17, 2008, 11:07:45 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Utilities/Fastjet/plugins/CDFCones/src/MidPointAlgorithm.cc
r11 r35 18 18 std::vector< std::vector<bool> > distanceOK; 19 19 distanceOK.resize(stableCones.size() - 1); 20 for( int nCluster1 = 1; nCluster1 < stableCones.size(); nCluster1++){20 for(unsigned int nCluster1 = 1; nCluster1 < stableCones.size(); nCluster1++){ 21 21 distanceOK[nCluster1 - 1].resize(nCluster1); 22 22 double cluster1Rapidity = stableCones[nCluster1].fourVector.y(); 23 23 double cluster1Phi = stableCones[nCluster1].fourVector.phi(); 24 for( int nCluster2 = 0; nCluster2 < nCluster1; nCluster2++){24 for(unsigned int nCluster2 = 0; nCluster2 < nCluster1; nCluster2++){ 25 25 double cluster2Rapidity = stableCones[nCluster2].fourVector.y(); 26 26 double cluster2Phi = stableCones[nCluster2].fourVector.phi(); … … 37 37 std::vector< std::vector<int> > pairs(0); 38 38 std::vector<int> testPair(0); 39 int maxClustersInPair = _maxPairSize;39 unsigned int maxClustersInPair = _maxPairSize; 40 40 if(!maxClustersInPair) 41 41 maxClustersInPair = stableCones.size(); … … 44 44 // Loop over all combinations. Calculate MidPoint. Make midPointClusters. 45 45 bool reduceConeSize = false; 46 for( int iPair = 0; iPair < pairs.size(); iPair++){46 for(unsigned int iPair = 0; iPair < pairs.size(); iPair++){ 47 47 // Calculate rapidity, phi and pT of MidPoint. 48 48 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++) 50 50 midPoint.add(stableCones[pairs[iPair][iPairMember]].fourVector); 51 51 iterateCone(midPoint.y(),midPoint.phi(),midPoint.pt(),towers,stableCones,reduceConeSize); … … 116 116 117 117 void 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) 119 119 { 120 120 // Recursively adds clusters to pairs, triplets, ... whose mid-points are then calculated. … … 124 124 if(testPair.size()) 125 125 nextClusterStart = testPair.back() + 1; 126 for( int nextCluster = nextClusterStart; nextCluster <= distanceOK.size(); nextCluster++){126 for(unsigned int nextCluster = nextClusterStart; nextCluster <= distanceOK.size(); nextCluster++){ 127 127 // Is new SeedCone less than 2*_coneRadius apart from all clusters in testPair? 128 128 bool addCluster = true; 129 for( int iCluster = 0; iCluster < testPair.size() && addCluster; iCluster++)129 for(unsigned int iCluster = 0; iCluster < testPair.size() && addCluster; iCluster++) 130 130 if(!distanceOK[nextCluster - 1][testPair[iCluster]]) 131 131 addCluster = false;
Note:
See TracChangeset
for help on using the changeset viewer.