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