1 #ifndef __InitialClusteringStepBase_H__ 2 #define __InitialClusteringStepBase_H__ 14 #include <unordered_map> 28 _nSeeds(0), _nClustersFound(0),
41 _algoName(conf.getParameter<
std::string>(
"algoName")) {
42 const std::vector<edm::ParameterSet>&
thresholds =
43 conf.getParameterSetVector(
"thresholdsByDetector");
44 for(
const auto&
pset : thresholds ) {
46 const double& thresh_E =
47 pset.getParameter<
double>(
"gatheringThreshold");
48 const double& thresh_pT =
49 pset.getParameter<
double>(
"gatheringThresholdPt");
50 const double thresh_pT2 = thresh_pT*thresh_pT;
51 auto entry = _layerMap.find(det);
52 if(
entry == _layerMap.end() ) {
54 <<
"Detector layer : " << det <<
" is not in the list of recognized" 55 <<
" detector layers!";
57 _thresholds.emplace(_layerMap.find(det)->second,
58 std::make_pair(thresh_E,thresh_pT2));
64 ICSB& operator=(
const ICSB&) =
delete;
71 const std::vector<bool>&
mask,
72 const std::vector<bool>& seeds,
76 o <<
"InitialClusteringStep with algo \"" << _algoName
77 <<
"\" located " << _nSeeds <<
" seeds and built " 78 << _nClustersFound <<
" clusters from those seeds. ";
82 void reset() { _nSeeds = _nClustersFound = 0; }
86 const unsigned i )
const {
90 const std::unordered_map<std::string,int>
_layerMap;
91 std::unordered_map<int,std::pair<double,double> >
const std::unordered_map< std::string, int > _layerMap
std::ostream & operator<<(std::ostream &o)
reco::PFRecHitRef makeRefhit(const edm::Handle< reco::PFRecHitCollection > &h, const unsigned i) const
InitialClusteringStepBase ICSB
edmplugin::PluginFactory< InitialClusteringStepBase *(const edm::ParameterSet &, edm::ConsumesCollector &) > InitialClusteringStepFactory
virtual void updateEvent(const edm::Event &)
const std::string _algoName
edm::Ref< PFRecHitCollection > PFRecHitRef
persistent reference to PFRecHit objects
virtual void update(const edm::EventSetup &)
InitialClusteringStepBase(const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
std::vector< PFCluster > PFClusterCollection
collection of PFCluster objects
std::unordered_map< int, std::pair< double, double > > _thresholds