CMS 3D CMS Logo

PhotonMVAEstimator.h
Go to the documentation of this file.
1 #ifndef RecoEgamma_PhotonIdentification_PhotonMVAEstimator_H
2 #define RecoEgamma_PhotonIdentification_PhotonMVAEstimator_H
3 
12 
14 
15  public:
16 
17  // Constructor and destructor
19  ~PhotonMVAEstimator() override {};
20 
21  // Calculation of the MVA value
22  float mvaValue( const edm::Ptr<reco::Candidate>& candPtr, const edm::EventBase& iEvent, int &iCategory) const override;
23 
24  // Call this function once after the constructor to declare
25  // the needed event content pieces to the framework
26  void setConsumes(edm::ConsumesCollector&&) override;
27 
28  int findCategory( const edm::Ptr<reco::Candidate>& candPtr) const override;
29 
30  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
31 
32  private:
33 
34  int findCategory( const edm::Ptr<reco::Photon>& phoPtr ) const;
35 
36  // The number of categories and number of variables per category
38  std::vector<StringCutObjectSelector<reco::Photon>> categoryFunctions_;
39  std::vector<int> nVariables_;
40 
41  // Data members
42  std::vector< std::unique_ptr<const GBRForest> > gbrForests_;
43 
44  // There might be different variables for each category, so the variables
45  // names vector is itself a vector of length nCategories
46  std::vector<std::vector<int>> variables_;
47 
48  // The variable manager which stores how to obtain the variables
50 
51  // Other objects needed by the MVA
52  std::unique_ptr<EffectiveAreas> effectiveAreas_;
53  std::vector<double> phoIsoPtScalingCoeff_;
54  double phoIsoCutoff_;
55 
56 };
57 
58 #endif
PhotonMVAEstimator(const edm::ParameterSet &conf)
MVAVariableManager< reco::Photon > mvaVarMngr_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
int iEvent
Definition: GenABIO.cc:230
int findCategory(const edm::Ptr< reco::Candidate > &candPtr) const override
void setConsumes(edm::ConsumesCollector &&) override
std::vector< StringCutObjectSelector< reco::Photon > > categoryFunctions_
std::vector< std::unique_ptr< const GBRForest > > gbrForests_
float mvaValue(const edm::Ptr< reco::Candidate > &candPtr, const edm::EventBase &iEvent, int &iCategory) const override
std::vector< int > nVariables_
std::vector< double > phoIsoPtScalingCoeff_
std::unique_ptr< EffectiveAreas > effectiveAreas_
std::vector< std::vector< int > > variables_
~PhotonMVAEstimator() override