CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AnyMVAEstimatorRun2Base.h
Go to the documentation of this file.
1 #ifndef RecoEgamma_EgammaTools_AnyMVAEstimatorRun2Base_H
2 #define RecoEgamma_EgammaTools_AnyMVAEstimatorRun2Base_H
3 
5 
9 
11 
13 
14  public:
15  // Constructor, destructor
18 
19  // Functions that must be provided in derived classes
20  // These function should work on electrons or photons
21  // of the reco or pat type
22 
23  virtual float mvaValue( const edm::Ptr<reco::Candidate>& particle) = 0;
24 
25  // A specific implementation of MVA is expected to have data members
26  // that will contain particle's quantities on which the MVA operates.
27  // This function fill their value for a given particle.
28  virtual void fillMVAVariables(const edm::Ptr<reco::Candidate>& particle) = 0;
29  // A specific implementation of MVA is expected to have one or more categories
30  // defined with respect to eta, pt, etc.
31  // This function determines the category for a given particle.
32  virtual int findCategory( const edm::Ptr<reco::Candidate>& particle) = 0;
33  virtual int getNCategories() = 0;
34  // The name is a unique name associated with a particular MVA implementation,
35  // it is found as a const data member in a derived class.
36  virtual const std::string getName() = 0;
37 
38  //
39  // Extra event content - if needed.
40  //
41  // Some MVA implementation may require direct access to event content.
42  // Implement these methods only if needed in the derived classes (use "override"
43  // for certainty).
44  // This method needs to be used only once after this MVA estimator is constructed
45  virtual void setConsumes(edm::ConsumesCollector &&cc){};
46  // This method needs to be called for each event
47  virtual void getEventContent(const edm::Event& iEvent){};
48 
49  //
50  // Data members
51  //
52  // Configuration
54 
55 };
56 
57 // define the factory for this base class
61 
62 #endif
const edm::ParameterSet _conf
AnyMVAEstimatorRun2Base(const edm::ParameterSet &conf)
virtual int findCategory(const edm::Ptr< reco::Candidate > &particle)=0
virtual int getNCategories()=0
virtual void getEventContent(const edm::Event &iEvent)
virtual const std::string getName()=0
virtual float mvaValue(const edm::Ptr< reco::Candidate > &particle)=0
virtual void setConsumes(edm::ConsumesCollector &&cc)
int iEvent
Definition: GenABIO.cc:230
tuple conf
Definition: dbtoconf.py:185
virtual void fillMVAVariables(const edm::Ptr< reco::Candidate > &particle)=0
edmplugin::PluginFactory< AnyMVAEstimatorRun2Base *(const edm::ParameterSet &) > AnyMVAEstimatorRun2Factory