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 "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 i, training_settings::idx, and findQualityFiles::v.

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

29  {
30 
31  // initialize original index locations
32  std::vector<size_t> idx(v.size());
33  for (size_t i = 0; i != idx.size(); ++i) idx[i] = i;
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) {return v[i1] > v[i2];});
38 
39  return idx;
40 }
int i
Definition: DBlmapReader.cc:9