CMS 3D CMS Logo

PFMETAlgorithmMVA.h
Go to the documentation of this file.
1 #ifndef RecoMET_METPUSubtraction_PFMETAlgorithmMVA_h
2 #define RecoMET_METPUSubtraction_PFMETAlgorithmMVA_h
3 
16 
19 
23 
25 
26 #include <Math/SMatrix.h>
27 
28 #include <string>
29 #include <vector>
30 #include <ostream>
31 
33 public:
36 
37  void initialize(const edm::EventSetup&);
38 
39  void setHasPhotons(bool hasPhotons) { hasPhotons_ = hasPhotons; }
40 
41  void setInput(const std::vector<reco::PUSubMETCandInfo>&,
42  const std::vector<reco::PUSubMETCandInfo>&,
43  const std::vector<reco::PUSubMETCandInfo>&,
44  const std::vector<reco::Vertex::Point>&);
45 
46  void evaluateMVA();
47 
49  const reco::METCovMatrix& getMEtCov() const { return mvaMEtCov_; }
50 
51  double getU() const { return mvaOutputU_; }
52  double getDPhi() const { return mvaOutputDPhi_; }
53  double getCovU1() const { return mvaOutputCovU1_; }
54  double getCovU2() const { return mvaOutputCovU2_; }
55 
56  void print(std::ostream&) const;
57 
58 private:
61 
62  const float evaluateU();
63  const float evaluateDPhi();
64  const float evaluateCovU1();
65  const float evaluateCovU2();
66 
68 
73 
78 
79  int mvaType_;
81 
82  double dZcut_;
83  std::unique_ptr<float[]> createFloatVector(std::vector<std::string> variableNames);
84  const float GetResponse(const GBRForest* Reader, std::vector<std::string>& variableNames);
85  void computeMET();
86  std::map<std::string, float> var_;
87 
88  float* mvaInputU_;
89  float* mvaInputDPhi_;
92 
93  float mvaOutputU_;
97 
98  std::vector<std::string> varForU_;
99  std::vector<std::string> varForDPhi_;
100  std::vector<std::string> varForCovU1_;
101  std::vector<std::string> varForCovU2_;
102 
103  double sumLeptonPx_;
104  double sumLeptonPy_;
107 
109  //TMatrixD mvaMEtCov_;
111 
116 
118 
120 };
121 #endif
std::vector< std::string > varForCovU2_
double getDPhi() const
double getU() const
MvaMEtUtilities utils_
const GBRForest * loadMVAfromFile(const edm::FileInPath &inputFileName, const std::string &mvaName)
std::vector< std::string > varForU_
const float evaluateU()
ROOT::Math::SMatrix< double, 2 > METCovMatrix
Definition: MET.h:39
const GBRForest * mvaReaderCovU1_
const float GetResponse(const GBRForest *Reader, std::vector< std::string > &variableNames)
const GBRForest * mvaReaderCovU2_
const float evaluateCovU2()
const std::string updateVariableNames(std::string input)
void print(std::ostream &) const
const reco::METCovMatrix & getMEtCov() const
edm::ParameterSet cfg_
std::string mvaNameCovU1_
void setInput(const std::vector< reco::PUSubMETCandInfo > &, const std::vector< reco::PUSubMETCandInfo > &, const std::vector< reco::PUSubMETCandInfo > &, const std::vector< reco::Vertex::Point > &)
static std::string const input
Definition: EdmProvDump.cc:50
reco::Candidate::LorentzVector getMEt() const
const GBRForest * mvaReaderDPhi_
const GBRForest * mvaReaderU_
std::unique_ptr< float[]> createFloatVector(std::vector< std::string > variableNames)
const float evaluateCovU1()
double getCovU1() const
edm::ESGetToken< GBRForest, GBRWrapperRcd > mvaTokenCovU1_
void initialize(const edm::EventSetup &)
void setHasPhotons(bool hasPhotons)
reco::METCovMatrix mvaMEtCov_
std::vector< std::string > varForCovU1_
edm::ESGetToken< GBRForest, GBRWrapperRcd > mvaTokenCovU2_
double getCovU2() const
PFMETAlgorithmMVA(const edm::ParameterSet &cfg, edm::ConsumesCollector iC)
std::vector< std::string > varForDPhi_
const float evaluateDPhi()
std::map< std::string, float > var_
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
std::string mvaNameDPhi_
reco::Candidate::LorentzVector mvaMEt_
edm::ESGetToken< GBRForest, GBRWrapperRcd > mvaTokenDPhi_
edm::ESGetToken< GBRForest, GBRWrapperRcd > mvaTokenU_
std::string mvaNameCovU2_