CMS 3D CMS Logo

PFCPositionCalculatorBase.h
Go to the documentation of this file.
1 #ifndef __PFCPositionCalculatorBase_H__
2 #define __PFCPositionCalculatorBase_H__
3 
7 
8 #include <string>
9 
10 namespace edm {
11  class EventSetup;
12 }
13 
16 
17 public:
19  : _minFractionInCalc(conf.getParameter<double>("minFractionInCalc")),
20  _algoName(conf.getParameter<std::string>("algoName")) {}
21  virtual ~PFCPositionCalculatorBase() = default;
22  //get rid of things we should never use
23  PFCPositionCalculatorBase(const PosCalc&) = delete;
24  PosCalc& operator=(const PosCalc&) = delete;
25 
26  virtual void update(const edm::EventSetup&) {}
27 
28  // here we transform one PFCluster to use the new position calculation
29  virtual void calculateAndSetPosition(reco::PFCluster&) = 0;
30  // here you call a loop inside to transform the whole vector
31  virtual void calculateAndSetPositions(reco::PFClusterCollection&) = 0;
32 
33  const std::string& name() const { return _algoName; }
34 
35 protected:
36  const float _minFractionInCalc;
37 
38 private:
40 };
41 
42 // define the factory for this base class
45 
46 #endif
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
Definition: PFCluster.h:46
const std::string & name() const
virtual void update(const edm::EventSetup &)
edmplugin::PluginFactory< PFCPositionCalculatorBase *(const edm::ParameterSet &)> PFCPositionCalculatorFactory
PFCPositionCalculatorBase PosCalc
HLT enums.
std::vector< PFCluster > PFClusterCollection
collection of PFCluster objects
Definition: PFClusterFwd.h:9
PFCPositionCalculatorBase(const edm::ParameterSet &conf)