CMS 3D CMS Logo

Functions
ComputeClusterTime.cc File Reference
#include "RecoLocalCalo/HGCalRecProducers/interface/ComputeClusterTime.h"

Go to the source code of this file.

Functions

std::vector< size_t > decrease_sorted_indices (const std::vector< float > &v)
 

Function Documentation

◆ decrease_sorted_indices()

std::vector<size_t> decrease_sorted_indices ( const std::vector< float > &  v)

Definition at line 14 of file ComputeClusterTime.cc.

14  {
15  // initialize original index locations
16  std::vector<size_t> idx(v.size());
17  std::iota(idx.begin(), idx.end(), 0);
18 
19  // sort indices based on comparing values in v (decreasing order)
20  std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) { return v[i1] < v[i2]; });
21  return idx;
22 };

References testProducerWithPsetDescEmpty_cfi::i1, testProducerWithPsetDescEmpty_cfi::i2, heavyIonCSV_trainingSettings::idx, jetUpdater_cfi::sort, and findQualityFiles::v.

Referenced by hgcalsimclustertime::ComputeClusterTime::fixSizeHighestDensity().

testProducerWithPsetDescEmpty_cfi.i2
i2
Definition: testProducerWithPsetDescEmpty_cfi.py:46
testProducerWithPsetDescEmpty_cfi.i1
i1
Definition: testProducerWithPsetDescEmpty_cfi.py:45
findQualityFiles.v
v
Definition: findQualityFiles.py:179
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29