CMS 3D CMS Logo

PFClusterBuilderBase.h
Go to the documentation of this file.
1 #ifndef __PFClusterBuilderBase_H__
2 #define __PFClusterBuilderBase_H__
3 
8 
12 
13 #include <string>
14 #include <iostream>
15 #include <memory>
16 
17 namespace edm {
18  class EventSetup;
19 }
20 
23 
24 public:
27  : _nSeeds(0),
28  _nClustersFound(0),
29  _minFractionToKeep(conf.getParameter<double>("minFractionToKeep")),
30  _algoName(conf.getParameter<std::string>("algoName")) {
31  const auto& pcConf = conf.getParameterSet("positionCalc");
32  if (!pcConf.empty()) {
33  const std::string& algo = pcConf.getParameter<std::string>("algoName");
34  if (!algo.empty())
36  }
37  }
38  virtual ~PFClusterBuilderBase() = default;
39  // get rid of things we should never use...
40  PFClusterBuilderBase(const PFCBB&) = delete;
41  PFCBB& operator=(const PFCBB&) = delete;
42 
43  virtual void update(const edm::EventSetup&) {}
44 
45  virtual void buildClusters(const reco::PFClusterCollection& topos,
46  const std::vector<bool>& seedable,
48  const HcalPFCuts*) = 0;
49 
50  std::ostream& operator<<(std::ostream& o) const {
51  o << "PFClusterBuilder with algo \"" << _algoName << "\" located " << _nSeeds << " seeds and built "
52  << _nClustersFound << " PFClusters from those seeds"
53  << " using position calculation: " << _positionCalc->name() << "." << std::endl;
54  return o;
55  }
56 
57  void reset() { _nSeeds = _nClustersFound = 0; }
58 
59 protected:
60  unsigned _nSeeds, _nClustersFound; // basic performance information
61  const float _minFractionToKeep; // min fraction value to keep in clusters
62  std::unique_ptr<PosCalc> _positionCalc;
63 
64 private:
66 };
67 
68 std::ostream& operator<<(std::ostream& o, const PFClusterBuilderBase& a);
69 
73 
74 #endif
std::ostream & operator<<(std::ostream &o) const
PFCBB & operator=(const PFCBB &)=delete
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
std::unique_ptr< PosCalc > _positionCalc
ParameterSet const & getParameterSet(std::string const &) const
edmplugin::PluginFactory< PFClusterBuilderBase *(const edm::ParameterSet &, edm::ConsumesCollector &)> PFClusterBuilderFactory
std::ostream & operator<<(std::ostream &o, const PFClusterBuilderBase &a)
PFClusterBuilderBase PFCBB
virtual void update(const edm::EventSetup &)
virtual ~PFClusterBuilderBase()=default
virtual void buildClusters(const reco::PFClusterCollection &topos, const std::vector< bool > &seedable, reco::PFClusterCollection &outclus, const HcalPFCuts *)=0
HLT enums.
double a
Definition: hdecay.h:121
PFClusterBuilderBase(const edm::ParameterSet &conf, edm::ConsumesCollector &cc)
std::vector< PFCluster > PFClusterCollection
collection of PFCluster objects
Definition: PFClusterFwd.h:9
#define get
PFCPositionCalculatorBase PosCalc