CMS 3D CMS Logo

Classes | Functions
HGCalImagingAlgo.h File Reference
#include "Geometry/HGCalGeometry/interface/HGCalGeometry.h"
#include "Geometry/CaloTopology/interface/HGCalTopology.h"
#include "DataFormats/ForwardDetId/interface/HGCEEDetId.h"
#include "DataFormats/HGCRecHit/interface/HGCRecHitCollections.h"
#include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
#include "Geometry/CaloGeometry/interface/CaloGeometry.h"
#include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
#include "Geometry/CaloGeometry/interface/TruncatedPyramid.h"
#include "Geometry/Records/interface/CaloGeometryRecord.h"
#include "DataFormats/Math/interface/Point3D.h"
#include "DataFormats/EgammaReco/interface/BasicCluster.h"
#include "RecoLocalCalo/HGCalRecAlgos/interface/RecHitTools.h"
#include <string>
#include <vector>
#include <set>
#include <numeric>
#include "KDTreeLinkerAlgoT.h"

Go to the source code of this file.

Classes

struct  HGCalImagingAlgo::Hexel
 
class  HGCalImagingAlgo
 

Functions

template<typename T >
std::vector< size_t > sorted_indices (const std::vector< T > &v)
 

Function Documentation

template<typename T >
std::vector<size_t> sorted_indices ( const std::vector< T > &  v)

Definition at line 29 of file HGCalImagingAlgo.h.

References begin, end, training_settings::idx, and findQualityFiles::v.

Referenced by HGCalImagingAlgo::calculateDistanceToHigher(), HGCalImagingAlgo::findAndAssignClusters(), HGCalDepthPreClusterer::makePreClusters(), and HGCal3DClustering::organizeByLayer().

29  {
30 
31  // initialize original index locations
32  std::vector<size_t> idx(v.size());
33  std::iota (std::begin(idx), std::end(idx), 0);
34 
35  // sort indices based on comparing values in v
36  std::sort(idx.begin(), idx.end(),
37  [&v](size_t i1, size_t i2) {
38  return v[i1] > v[i2];
39  });
40 
41  return idx;
42 }
#define end
Definition: vmac.h:39
#define begin
Definition: vmac.h:32