CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PFMETAlgorithmMVA.h
Go to the documentation of this file.
1 #ifndef RecoMET_METPUSubtraction_PFMETAlgorithmMVA_h
2 #define RecoMET_METPUSubtraction_PFMETAlgorithmMVA_h
3 
15 
17 
21 
23 
24 //#include <TMatrixD.h>
25 #include <Math/SMatrix.h>
26 
27 #include <string>
28 #include <vector>
29 #include <ostream>
30 
32 {
33 
34  public:
35 
38 
39  void initialize(const edm::EventSetup&);
40 
41  void setHasPhotons(bool hasPhotons) { hasPhotons_ = hasPhotons; }
42 
43  void setInput(const std::vector<reco::PUSubMETCandInfo>&,
44  const std::vector<reco::PUSubMETCandInfo>&,
45  const std::vector<reco::PUSubMETCandInfo>&,
46  const std::vector<reco::Vertex::Point>&);
47 
48  void evaluateMVA();
49 
51  const reco::METCovMatrix& getMEtCov() const { return mvaMEtCov_; }
52 
53  double getU() const { return mvaOutputU_; }
54  double getDPhi() const { return mvaOutputDPhi_; }
55  double getCovU1() const { return mvaOutputCovU1_; }
56  double getCovU2() const { return mvaOutputCovU2_; }
57 
58  void print(std::ostream&) const;
59 
60  private:
63  const GBRForest* loadMVAfromDB(const edm::EventSetup& es, const std::string& mvaName);
64 
65  const float evaluateU();
66  const float evaluateDPhi();
67  const float evaluateCovU1();
68  const float evaluateCovU2();
69 
71 
76 
77  int mvaType_;
79 
80  double dZcut_;
81  std::unique_ptr<float[]> createFloatVector(std::vector<std::string> variableNames);
82  const float GetResponse(const GBRForest *Reader, std::vector<std::string> &variableNames);
83  void computeMET();
84  std::map<std::string, float> var_;
85 
86 
87  float* mvaInputU_;
88  float* mvaInputDPhi_;
91 
92  float mvaOutputU_;
96 
97  std::vector<std::string> varForU_;
98  std::vector<std::string> varForDPhi_;
99  std::vector<std::string> varForCovU1_;
100  std::vector<std::string> varForCovU2_;
101 
102 
103  double sumLeptonPx_;
104  double sumLeptonPy_;
107 
109  //TMatrixD mvaMEtCov_;
111 
116 
118 
120 };
121 #endif
double getCovU1() const
std::vector< std::string > varForCovU2_
double getU() const
tuple cfg
Definition: looper.py:293
MvaMEtUtilities utils_
void print(std::ostream &) const
const GBRForest * loadMVAfromFile(const edm::FileInPath &inputFileName, const std::string &mvaName)
std::vector< std::string > varForU_
double getCovU2() const
const float evaluateU()
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)
ROOT::Math::SMatrix< double, 2 > METCovMatrix
Definition: MET.h:40
edm::ParameterSet cfg_
reco::Candidate::LorentzVector getMEt() const
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 > &)
const reco::METCovMatrix & getMEtCov() const
static std::string const input
Definition: EdmProvDump.cc:43
const GBRForest * mvaReaderDPhi_
const GBRForest * mvaReaderU_
PFMETAlgorithmMVA(const edm::ParameterSet &cfg)
std::unique_ptr< float[]> createFloatVector(std::vector< std::string > variableNames)
const float evaluateCovU1()
const GBRForest * loadMVAfromDB(const edm::EventSetup &es, const std::string &mvaName)
void initialize(const edm::EventSetup &)
void setHasPhotons(bool hasPhotons)
reco::METCovMatrix mvaMEtCov_
std::vector< std::string > varForCovU1_
std::vector< std::string > varForDPhi_
const float evaluateDPhi()
std::map< std::string, float > var_
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
std::string mvaNameDPhi_
reco::Candidate::LorentzVector mvaMEt_
double getDPhi() const
std::string mvaNameCovU2_