CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Macros | Functions
Basic2DGenericPFlowClusterizer.cc File Reference
#include "DataFormats/Math/interface/deltaR.h"
#include "DataFormats/ParticleFlowReco/interface/PFRecHit.h"
#include "DataFormats/ParticleFlowReco/interface/PFRecHitFraction.h"
#include "FWCore/Framework/interface/ConsumesCollector.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "RecoParticleFlow/PFClusterProducer/interface/PFClusterBuilderBase.h"
#include "Math/GenVector/VectorUtil.h"
#include "vdt/vdtMath.h"
#include <iterator>
#include <unordered_map>

Go to the source code of this file.

Classes

class  Basic2DGenericPFlowClusterizer
 

Macros

#define LOGDRESSED(x)   LogDebug(x)
 
#define LOGERR(x)   edm::LogError(x)
 
#define LOGVERB(x)   LogTrace(x)
 
#define LOGWARN(x)   edm::LogWarning(x)
 

Functions

 for (const auto &pset:thresholds)
 
 if (conf.exists("allCellsPositionCalc"))
 
 if (conf.exists("positionCalcForConvergence"))
 
static const
PFClusterBuilderFactory::PMaker
< Basic2DGenericPFlowClusterizer
s_maker__LINE__ ("Basic2DGenericPFlowClusterizer")
 

Macro Definition Documentation

#define LOGDRESSED (   x)    LogDebug(x)
#define LOGERR (   x)    edm::LogError(x)

Definition at line 70 of file Basic2DGenericPFlowClusterizer.cc.

#define LOGVERB (   x)    LogTrace(x)

Definition at line 68 of file Basic2DGenericPFlowClusterizer.cc.

#define LOGWARN (   x)    edm::LogWarning(x)

Definition at line 69 of file Basic2DGenericPFlowClusterizer.cc.

Function Documentation

for ( const auto &pset:thresholds  )

Definition at line 94 of file Basic2DGenericPFlowClusterizer.cc.

References Basic2DGenericPFlowClusterizer::_layerMap, Basic2DGenericPFlowClusterizer::_recHitEnergyNorms, mps_splice::entry, Exception, TrackValidation_cff::pset, and AlCaHLTBitMon_QueryRunRegistry::string.

94  : thresholds) {
95  const std::string& det = pset.getParameter<std::string>("detector");
96 
97  std::vector<int> depths;
98  std::vector<double> rhE_norm;
99 
100  if (det == std::string("HCAL_BARREL1") || det == std::string("HCAL_ENDCAP")) {
101  depths = pset.getParameter<std::vector<int> >("depths");
102  rhE_norm = pset.getParameter<std::vector<double> >("recHitEnergyNorm");
103  } else {
104  depths.push_back(0);
105  rhE_norm.push_back(pset.getParameter<double>("recHitEnergyNorm"));
106  }
107 
108  if (rhE_norm.size() != depths.size()) {
109  throw cms::Exception("InvalidPFRecHitThreshold")
110  << "PFlowClusterizerThreshold mismatch with the numbers of depths";
111  }
112 
113  auto entry = _layerMap.find(det);
114  if (entry == _layerMap.end()) {
115  throw cms::Exception("InvalidDetectorLayer") << "Detector layer : " << det << " is not in the list of recognized"
116  << " detector layers!";
117  }
118  _recHitEnergyNorms.emplace(_layerMap.find(det)->second, std::make_pair(depths, rhE_norm));
119  }
list entry
Definition: mps_splice.py:68
if ( conf.  exists"allCellsPositionCalc")

Definition at line 121 of file Basic2DGenericPFlowClusterizer.cc.

References Basic2DGenericPFlowClusterizer::_allCellsPosCalc, get, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterSet(), and AlCaHLTBitMon_QueryRunRegistry::string.

121  {
122  const edm::ParameterSet& acConf = conf.getParameterSet("allCellsPositionCalc");
123  const std::string& algoac = acConf.getParameter<std::string>("algoName");
124  _allCellsPosCalc = PFCPositionCalculatorFactory::get()->create(algoac, acConf, cc);
125  }
ParameterSet const & getParameterSet(std::string const &) const
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
#define get
if ( conf.  exists"positionCalcForConvergence")

Definition at line 127 of file Basic2DGenericPFlowClusterizer.cc.

References Basic2DGenericPFlowClusterizer::_convergencePosCalc, get, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterSet(), and AlCaHLTBitMon_QueryRunRegistry::string.

127  {
128  const edm::ParameterSet& convConf = conf.getParameterSet("positionCalcForConvergence");
129  const std::string& algoconv = convConf.getParameter<std::string>("algoName");
130  _convergencePosCalc = PFCPositionCalculatorFactory::get()->create(algoconv, convConf, cc);
131  }
ParameterSet const & getParameterSet(std::string const &) const
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
#define get
static const PFClusterBuilderFactory ::PMaker< Basic2DGenericPFlowClusterizer > s_maker__LINE__ ( "Basic2DGenericPFlowClusterizer"  )
static