CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Functions
LocalMaximumSeedFinder.cc File Reference
#include "CommonTools/Utils/interface/DynArray.h"
#include "DataFormats/Math/interface/deltaPhi.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "RecoParticleFlow/PFClusterProducer/interface/SeedFinderBase.h"
#include <algorithm>
#include <cfloat>
#include <tuple>
#include <unordered_map>
#include <queue>

Go to the source code of this file.

Classes

class  LocalMaximumSeedFinder
 

Functions

 for (const auto &pset:thresholds)
 
static const
SeedFinderFactory::PMaker
< LocalMaximumSeedFinder
s_maker__LINE__ ("LocalMaximumSeedFinder")
 

Function Documentation

for ( const auto &pset:thresholds  )

Definition at line 58 of file LocalMaximumSeedFinder.cc.

References LocalMaximumSeedFinder::_layerMap, LocalMaximumSeedFinder::_thresholds, mps_splice::entry, Exception, mps_fire::i, LocalMaximumSeedFinder::layerOffset, TrackValidation_cff::pset, and AlCaHLTBitMon_QueryRunRegistry::string.

58  : thresholds) {
59  const std::string& det = pset.getParameter<std::string>("detector");
60 
61  std::vector<int> depths;
62  std::vector<double> thresh_E;
63  std::vector<double> thresh_pT;
64  std::vector<double> thresh_pT2;
65 
66  if (det == std::string("HCAL_BARREL1") || det == std::string("HCAL_ENDCAP")) {
67  depths = pset.getParameter<std::vector<int> >("depths");
68  thresh_E = pset.getParameter<std::vector<double> >("seedingThreshold");
69  thresh_pT = pset.getParameter<std::vector<double> >("seedingThresholdPt");
70  if (thresh_E.size() != depths.size() || thresh_pT.size() != depths.size()) {
71  throw cms::Exception("InvalidGatheringThreshold") << "gatheringThresholds mismatch with the numbers of depths";
72  }
73  } else {
74  depths.push_back(0);
75  thresh_E.push_back(pset.getParameter<double>("seedingThreshold"));
76  thresh_pT.push_back(pset.getParameter<double>("seedingThresholdPt"));
77  }
78 
79  for (unsigned int i = 0; i < thresh_pT.size(); ++i) {
80  thresh_pT2.push_back(thresh_pT[i] * thresh_pT[i]);
81  }
82 
83  auto entry = _layerMap.find(det);
84  if (entry == _layerMap.end()) {
85  throw cms::Exception("InvalidDetectorLayer") << "Detector layer : " << det << " is not in the list of recognized"
86  << " detector layers!";
87  }
88 
89  _thresholds[entry->second + layerOffset] = std::make_tuple(depths, thresh_E, thresh_pT2);
90  }
list entry
Definition: mps_splice.py:68
static const SeedFinderFactory ::PMaker< LocalMaximumSeedFinder > s_maker__LINE__ ( "LocalMaximumSeedFinder"  )
static