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 
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 public:
35 
36  void initialize(const edm::EventSetup&);
37 
38  void setHasPhotons(bool hasPhotons) { hasPhotons_ = hasPhotons; }
39 
40  void setInput(const std::vector<reco::PUSubMETCandInfo>&,
41  const std::vector<reco::PUSubMETCandInfo>&,
42  const std::vector<reco::PUSubMETCandInfo>&,
43  const std::vector<reco::Vertex::Point>&);
44 
45  void evaluateMVA();
46 
48  const reco::METCovMatrix& getMEtCov() const { return mvaMEtCov_; }
49 
50  double getU() const { return mvaOutputU_; }
51  double getDPhi() const { return mvaOutputDPhi_; }
52  double getCovU1() const { return mvaOutputCovU1_; }
53  double getCovU2() const { return mvaOutputCovU2_; }
54 
55  void print(std::ostream&) const;
56 
57 private:
60  const GBRForest* loadMVAfromDB(const edm::EventSetup& es, const std::string& mvaName);
61 
62  const float evaluateU();
63  const float evaluateDPhi();
64  const float evaluateCovU1();
65  const float evaluateCovU2();
66 
68 
73 
74  int mvaType_;
76 
77  double dZcut_;
78  std::unique_ptr<float[]> createFloatVector(std::vector<std::string> variableNames);
79  const float GetResponse(const GBRForest* Reader, std::vector<std::string>& variableNames);
80  void computeMET();
81  std::map<std::string, float> var_;
82 
83  float* mvaInputU_;
84  float* mvaInputDPhi_;
87 
88  float mvaOutputU_;
92 
93  std::vector<std::string> varForU_;
94  std::vector<std::string> varForDPhi_;
95  std::vector<std::string> varForCovU1_;
96  std::vector<std::string> varForCovU2_;
97 
98  double sumLeptonPx_;
99  double sumLeptonPy_;
102 
104  //TMatrixD mvaMEtCov_;
106 
111 
113 
115 };
116 #endif
PFMETAlgorithmMVA::loadMVAfromDB
const GBRForest * loadMVAfromDB(const edm::EventSetup &es, const std::string &mvaName)
Definition: PFMETAlgorithmMVA.cc:115
PFMETAlgorithmMVA
Definition: PFMETAlgorithmMVA.h:31
PFMETAlgorithmMVA::mvaOutputCovU1_
float mvaOutputCovU1_
Definition: PFMETAlgorithmMVA.h:90
input
static const std::string input
Definition: EdmProvDump.cc:48
PFMETAlgorithmMVA::PFMETAlgorithmMVA
PFMETAlgorithmMVA(const edm::ParameterSet &cfg)
Definition: PFMETAlgorithmMVA.cc:121
PFMETAlgorithmMVA::varForCovU1_
std::vector< std::string > varForCovU1_
Definition: PFMETAlgorithmMVA.h:95
GBRForest
Definition: GBRForest.h:25
PFMETAlgorithmMVA::mvaInputCovU2_
float * mvaInputCovU2_
Definition: PFMETAlgorithmMVA.h:86
PFMETAlgorithmMVA::initialize
void initialize(const edm::EventSetup &)
Definition: PFMETAlgorithmMVA.cc:143
PFMETAlgorithmMVA::mvaOutputU_
float mvaOutputU_
Definition: PFMETAlgorithmMVA.h:88
PFMETAlgorithmMVA::getCovU1
double getCovU1() const
Definition: PFMETAlgorithmMVA.h:52
PFMETAlgorithmMVA::varForDPhi_
std::vector< std::string > varForDPhi_
Definition: PFMETAlgorithmMVA.h:94
PFMETAlgorithmMVA::varForCovU2_
std::vector< std::string > varForCovU2_
Definition: PFMETAlgorithmMVA.h:96
PFMETAlgorithmMVA::computeMET
void computeMET()
Definition: PFMETAlgorithmMVA.cc:260
PFMETAlgorithmMVA::createFloatVector
std::unique_ptr< float[]> createFloatVector(std::vector< std::string > variableNames)
Definition: PFMETAlgorithmMVA.cc:226
PFMETAlgorithmMVA::loadMVAfromFile
const GBRForest * loadMVAfromFile(const edm::FileInPath &inputFileName, const std::string &mvaName)
Definition: PFMETAlgorithmMVA.cc:78
GBRForest.h
PFMETAlgorithmMVA::varForU_
std::vector< std::string > varForU_
Definition: PFMETAlgorithmMVA.h:93
PFMETAlgorithmMVA::getMEtCov
const reco::METCovMatrix & getMEtCov() const
Definition: PFMETAlgorithmMVA.h:48
PFMETAlgorithmMVA::mvaReaderDPhi_
const GBRForest * mvaReaderDPhi_
Definition: PFMETAlgorithmMVA.h:108
edm::FileInPath
Definition: FileInPath.h:64
PFMETAlgorithmMVA::mvaInputU_
float * mvaInputU_
Definition: PFMETAlgorithmMVA.h:83
InefficientDoubleROC.inputFileName
inputFileName
Definition: InefficientDoubleROC.py:437
PFMETAlgorithmMVA::var_
std::map< std::string, float > var_
Definition: PFMETAlgorithmMVA.h:81
PFMETAlgorithmMVA::~PFMETAlgorithmMVA
~PFMETAlgorithmMVA()
Definition: PFMETAlgorithmMVA.cc:133
PFMETAlgorithmMVA::mvaNameDPhi_
std::string mvaNameDPhi_
Definition: PFMETAlgorithmMVA.h:70
PFMETAlgorithmMVA::hasPhotons_
bool hasPhotons_
Definition: PFMETAlgorithmMVA.h:75
PFMETAlgorithmMVA::mvaOutputCovU2_
float mvaOutputCovU2_
Definition: PFMETAlgorithmMVA.h:91
PFMETAlgorithmMVA::evaluateDPhi
const float evaluateDPhi()
PFMETAlgorithmMVA::utils_
MvaMEtUtilities utils_
Definition: PFMETAlgorithmMVA.h:67
taus_updatedMVAIds_cff.mvaName
mvaName
Definition: taus_updatedMVAIds_cff.py:18
PFMETAlgorithmMVA::print
void print(std::ostream &) const
Definition: PFMETAlgorithmMVA.cc:287
PFMETAlgorithmMVA::sumLeptonPy_
double sumLeptonPy_
Definition: PFMETAlgorithmMVA.h:99
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Vertex.h
PFMETAlgorithmMVA::setHasPhotons
void setHasPhotons(bool hasPhotons)
Definition: PFMETAlgorithmMVA.h:38
PFMETAlgorithmMVA::sumLeptonPx_
double sumLeptonPx_
Definition: PFMETAlgorithmMVA.h:98
edm::ParameterSet
Definition: ParameterSet.h:47
PFMETAlgorithmMVA::updateVariableNames
const std::string updateVariableNames(std::string input)
Definition: PFMETAlgorithmMVA.cc:20
PFMETAlgorithmMVA::getU
double getU() const
Definition: PFMETAlgorithmMVA.h:50
PFMETAlgorithmMVA::dZcut_
double dZcut_
Definition: PFMETAlgorithmMVA.h:77
PFMETAlgorithmMVA::mvaReaderCovU1_
const GBRForest * mvaReaderCovU1_
Definition: PFMETAlgorithmMVA.h:109
PFMETAlgorithmMVA::chargedSumLeptonPy_
double chargedSumLeptonPy_
Definition: PFMETAlgorithmMVA.h:101
PFMETAlgorithmMVA::chargedSumLeptonPx_
double chargedSumLeptonPx_
Definition: PFMETAlgorithmMVA.h:100
edm::EventSetup
Definition: EventSetup.h:57
MvaMEtUtilities.h
PFMETAlgorithmMVA::mvaType_
int mvaType_
Definition: PFMETAlgorithmMVA.h:74
PFMETAlgorithmMVA::mvaNameCovU2_
std::string mvaNameCovU2_
Definition: PFMETAlgorithmMVA.h:72
PFMETAlgorithmMVA::mvaNameCovU1_
std::string mvaNameCovU1_
Definition: PFMETAlgorithmMVA.h:71
PFMETAlgorithmMVA::setInput
void setInput(const std::vector< reco::PUSubMETCandInfo > &, const std::vector< reco::PUSubMETCandInfo > &, const std::vector< reco::PUSubMETCandInfo > &, const std::vector< reco::Vertex::Point > &)
Definition: PFMETAlgorithmMVA.cc:170
looper.cfg
cfg
Definition: looper.py:297
PFMETAlgorithmMVA::mvaInputDPhi_
float * mvaInputDPhi_
Definition: PFMETAlgorithmMVA.h:84
MvaMEtUtilities
Definition: MvaMEtUtilities.h:13
PFMETAlgorithmMVA::getDPhi
double getDPhi() const
Definition: PFMETAlgorithmMVA.h:51
PFMETAlgorithmMVA::getMEt
reco::Candidate::LorentzVector getMEt() const
Definition: PFMETAlgorithmMVA.h:47
MET.h
PFMETAlgorithmMVA::mvaMEt_
reco::Candidate::LorentzVector mvaMEt_
Definition: PFMETAlgorithmMVA.h:103
PFMETAlgorithmMVA::mvaReaderU_
const GBRForest * mvaReaderU_
Definition: PFMETAlgorithmMVA.h:107
EventSetup.h
PFMETAlgorithmMVA::mvaMEtCov_
reco::METCovMatrix mvaMEtCov_
Definition: PFMETAlgorithmMVA.h:105
PFMETAlgorithmMVA::getCovU2
double getCovU2() const
Definition: PFMETAlgorithmMVA.h:53
PFMETAlgorithmMVA::mvaInputCovU1_
float * mvaInputCovU1_
Definition: PFMETAlgorithmMVA.h:85
PFMETAlgorithmMVA::evaluateU
const float evaluateU()
PFMETAlgorithmMVA::evaluateMVA
void evaluateMVA()
Definition: PFMETAlgorithmMVA.cc:236
Candidate.h
PFMETAlgorithmMVA::mvaOutputDPhi_
float mvaOutputDPhi_
Definition: PFMETAlgorithmMVA.h:89
PFMETAlgorithmMVA::evaluateCovU2
const float evaluateCovU2()
ParameterSet.h
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
PFMETAlgorithmMVA::mvaNameU_
std::string mvaNameU_
Definition: PFMETAlgorithmMVA.h:69
PFMETAlgorithmMVA::cfg_
edm::ParameterSet cfg_
Definition: PFMETAlgorithmMVA.h:114
reco::METCovMatrix
ROOT::Math::SMatrix< double, 2 > METCovMatrix
Definition: MET.h:39
PFMETAlgorithmMVA::loadMVAfromDB_
bool loadMVAfromDB_
Definition: PFMETAlgorithmMVA.h:112
PFMETAlgorithmMVA::mvaReaderCovU2_
const GBRForest * mvaReaderCovU2_
Definition: PFMETAlgorithmMVA.h:110
PFMETAlgorithmMVA::GetResponse
const float GetResponse(const GBRForest *Reader, std::vector< std::string > &variableNames)
Definition: PFMETAlgorithmMVA.cc:280
PFMETAlgorithmMVA::evaluateCovU1
const float evaluateCovU1()