CMS 3D CMS Logo

PFClusterBuilderBase.h
Go to the documentation of this file.
1 #ifndef __PFClusterBuilderBase_H__
2 #define __PFClusterBuilderBase_H__
3 
7 
9 
10 #include <string>
11 #include <iostream>
12 #include <memory>
13 
14 namespace edm {
15  class EventSetup;
16 }
17 
20 
21 public:
24  : _nSeeds(0),
25  _nClustersFound(0),
26  _minFractionToKeep(conf.getParameter<double>("minFractionToKeep")),
27  _algoName(conf.getParameter<std::string>("algoName")) {
28  if (conf.exists("positionCalc")) {
29  const edm::ParameterSet& pcConf = conf.getParameterSet("positionCalc");
30  const std::string& algo = pcConf.getParameter<std::string>("algoName");
32  }
33  }
34  virtual ~PFClusterBuilderBase() = default;
35  // get rid of things we should never use...
36  PFClusterBuilderBase(const PFCBB&) = delete;
37  PFCBB& operator=(const PFCBB&) = delete;
38 
39  virtual void update(const edm::EventSetup&) {}
40 
41  virtual void buildClusters(const reco::PFClusterCollection& topos,
42  const std::vector<bool>& seedable,
43  reco::PFClusterCollection& outclus) = 0;
44 
45  std::ostream& operator<<(std::ostream& o) const {
46  o << "PFClusterBuilder with algo \"" << _algoName << "\" located " << _nSeeds << " seeds and built "
47  << _nClustersFound << " PFClusters from those seeds"
48  << " using position calculation: " << _positionCalc->name() << "." << std::endl;
49  return o;
50  }
51 
52  void reset() { _nSeeds = _nClustersFound = 0; }
53 
54 protected:
55  unsigned _nSeeds, _nClustersFound; // basic performance information
56  const float _minFractionToKeep; // min fraction value to keep in clusters
57  std::unique_ptr<PosCalc> _positionCalc;
58 
59 private:
61 };
62 
63 std::ostream& operator<<(std::ostream& o, const PFClusterBuilderBase& a);
64 
67 
68 #endif
reco::PFClusterCollection
std::vector< PFCluster > PFClusterCollection
collection of PFCluster objects
Definition: PFClusterFwd.h:9
PFClusterBuilderBase::buildClusters
virtual void buildClusters(const reco::PFClusterCollection &topos, const std::vector< bool > &seedable, reco::PFClusterCollection &outclus)=0
PluginFactory.h
PFClusterBuilderBase::operator<<
std::ostream & operator<<(std::ostream &o) const
Definition: PFClusterBuilderBase.h:45
PFClusterBuilderBase::~PFClusterBuilderBase
virtual ~PFClusterBuilderBase()=default
PFClusterBuilderBase::PosCalc
PFCPositionCalculatorBase PosCalc
Definition: PFClusterBuilderBase.h:22
operator<<
std::ostream & operator<<(std::ostream &o, const PFClusterBuilderBase &a)
Definition: PFClusterBuilderBase.cc:3
edm
HLT enums.
Definition: AlignableModifier.h:19
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:36
cmsdt::algo
algo
Definition: constants.h:164
PFClusterBuilderBase::update
virtual void update(const edm::EventSetup &)
Definition: PFClusterBuilderBase.h:39
PFCluster.h
PFCPositionCalculatorBase.h
PFCPositionCalculatorBase
Definition: PFCPositionCalculatorBase.h:14
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet::exists
bool exists(std::string const &parameterName) const
checks if a parameter exists
Definition: ParameterSet.cc:681
edm::ParameterSet
Definition: ParameterSet.h:47
a
double a
Definition: hdecay.h:119
edmplugin::PluginFactory
Definition: PluginFactory.h:34
PFClusterBuilderBase::_nSeeds
unsigned _nSeeds
Definition: PFClusterBuilderBase.h:55
PFClusterFwd.h
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
PFClusterBuilderBase::_nClustersFound
unsigned _nClustersFound
Definition: PFClusterBuilderBase.h:55
std
Definition: JetResolutionObject.h:76
PFClusterBuilderBase::PFClusterBuilderBase
PFClusterBuilderBase(const edm::ParameterSet &conf)
Definition: PFClusterBuilderBase.h:23
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
PFClusterBuilderBase
Definition: PFClusterBuilderBase.h:18
EventSetup
PFClusterBuilderBase::reset
void reset()
Definition: PFClusterBuilderBase.h:52
ParameterSet.h
PFClusterBuilderBase::_positionCalc
std::unique_ptr< PosCalc > _positionCalc
Definition: PFClusterBuilderBase.h:57
PFClusterBuilderBase::_algoName
std::string _algoName
Definition: PFClusterBuilderBase.h:60
PFClusterBuilderBase::_minFractionToKeep
const float _minFractionToKeep
Definition: PFClusterBuilderBase.h:56
PFClusterBuilderBase::PFCBB
PFClusterBuilderBase PFCBB
Definition: PFClusterBuilderBase.h:19
PFClusterBuilderBase::operator=
PFCBB & operator=(const PFCBB &)=delete
edm::ParameterSet::getParameterSet
ParameterSet const & getParameterSet(std::string const &) const
Definition: ParameterSet.cc:2128