17 while (phi >=
M_PI) phi -= TWOPI;
18 while (phi < -
M_PI) phi += TWOPI;
23 unsigned int phiIndex(
float phi,
float binsize) {
return (phi +
M_PI)/binsize; }
27 m_phiBinSize(TWOPI/m_nphiBins),
28 m_phiBinnedLookUpTable(m_nphiBins)
44 std::vector<eflowRecCluster*>
result;
51 std::vector< std::pair<int,int> > iPhiRanges;
52 if( iPhiMin < iPhiMax ) {
53 iPhiRanges.emplace_back(iPhiMin,iPhiMax );
55 iPhiRanges.emplace_back(0,iPhiMax );
56 iPhiRanges.emplace_back(iPhiMin,
m_nphiBins-1 );
62 for(
auto&
range : iPhiRanges ){
63 unsigned int indexMin =
range.first;
64 unsigned int indexMax =
range.second;
65 for( ; indexMin <= indexMax; ++indexMin ){
69 auto it_min = std::lower_bound (phiClusters.begin(), phiClusters.end(), eta-
dr, [] (
const eflowRecCluster*
cl,
float etaval) {return cl->getCluster()->eta()<etaval;} );
70 auto it_max = std::upper_bound (it_min, phiClusters.end(), eta+
dr, [] (
float etaval,
const eflowRecCluster*
cl) {return etaval<cl->getCluster()->eta();} );
73 for( ;it_min!=it_max;++it_min ){
75 float deta = eta - xcluster.
eta();
77 float dr2 = deta*deta + dphi*dphi;
78 if( dr2 < dr2Cut )
result.push_back(*it_min);