Skip to content

Commit

Permalink
Merge pull request cms-sw#15 from clelange/PR18236_Followup
Browse files Browse the repository at this point in the history
fix magic numbers, remove superfluous include
  • Loading branch information
clelange authored Apr 18, 2017
2 parents c881803 + 45e3da7 commit 38018c2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion RecoLocalCalo/HGCalRecAlgos/interface/HGCalImagingAlgo.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ inline double distance(const Hexel &pt1, const Hexel &pt2) { //2-d distance on
}
double calculateLocalDensity(std::vector<KDNode> &, KDTree &, const unsigned int); //return max density
double calculateDistanceToHigher(std::vector<KDNode> &, KDTree &);
int findAndAssignClusters(std::vector<KDNode> &, KDTree &, double, KDTreeBox &, const int);
int findAndAssignClusters(std::vector<KDNode> &, KDTree &, double, KDTreeBox &, const unsigned int);
math::XYZPoint calculatePosition(std::vector<KDNode> &);

// attempt to find subclusters within a given set of hexels
Expand Down
6 changes: 3 additions & 3 deletions RecoLocalCalo/HGCalRecAlgos/src/HGCalImagingAlgo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -248,16 +248,16 @@ double HGCalImagingAlgo::calculateDistanceToHigher(std::vector<KDNode> &nd, KDTr
return maxdensity;
}

int HGCalImagingAlgo::findAndAssignClusters(std::vector<KDNode> &nd,KDTree &lp, double maxdensity, KDTreeBox &bounds, const int layer){
int HGCalImagingAlgo::findAndAssignClusters(std::vector<KDNode> &nd,KDTree &lp, double maxdensity, KDTreeBox &bounds, const unsigned int layer){

//this is called once per layer...
//so when filling the cluster temporary vector of Hexels we resize each time by the number
//of clusters found. This is always equal to the number of cluster centers...

unsigned int clusterIndex = 0;
float delta_c = 9999.;
if( layer<=28 ) delta_c = vecDeltas[0];
else if( layer<=40 ) delta_c = vecDeltas[1];
if( layer<=lastLayerEE ) delta_c = vecDeltas[0];
else if( layer<=lastLayerFH ) delta_c = vecDeltas[1];
else delta_c = vecDeltas[2];

std::vector<size_t> rs = sorted_indices(nd); // indices sorted by decreasing rho
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#include <memory>
#include <chrono>
#include <iostream>

#include "RecoLocalCalo/HGCalRecAlgos/interface/HGCalImagingAlgo.h"
#include "RecoLocalCalo/HGCalRecAlgos/interface/HGCalDepthPreClusterer.h"
Expand Down

0 comments on commit 38018c2

Please sign in to comment.