CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
PFMETAlgorithmMVA Class Reference

#include <PFMETAlgorithmMVA.h>

Public Member Functions

void evaluateMVA ()
 
double getCovU1 () const
 
double getCovU2 () const
 
double getDPhi () const
 
reco::Candidate::LorentzVector getMEt () const
 
const reco::METCovMatrixgetMEtCov () const
 
double getU () const
 
void initialize (const edm::EventSetup &)
 
 PFMETAlgorithmMVA (const edm::ParameterSet &cfg)
 
void print (std::ostream &) const
 
void setHasPhotons (bool hasPhotons)
 
void setInput (const std::vector< reco::PUSubMETCandInfo > &, const std::vector< reco::PUSubMETCandInfo > &, const std::vector< reco::PUSubMETCandInfo > &, const std::vector< reco::Vertex::Point > &)
 
 ~PFMETAlgorithmMVA ()
 

Private Member Functions

void computeMET ()
 
std::unique_ptr< float[]> createFloatVector (std::vector< std::string > variableNames)
 
const float evaluateCovU1 ()
 
const float evaluateCovU2 ()
 
const float evaluateDPhi ()
 
const float evaluateU ()
 
const float GetResponse (const GBRForest *Reader, std::vector< std::string > &variableNames)
 
const GBRForestloadMVAfromDB (const edm::EventSetup &es, const std::string &mvaName)
 
const GBRForestloadMVAfromFile (const edm::FileInPath &inputFileName, const std::string &mvaName)
 
const std::string updateVariableNames (std::string input)
 

Private Attributes

edm::ParameterSet cfg_
 
double chargedSumLeptonPx_
 
double chargedSumLeptonPy_
 
double dZcut_
 
bool hasPhotons_
 
bool loadMVAfromDB_
 
float * mvaInputCovU1_
 
float * mvaInputCovU2_
 
float * mvaInputDPhi_
 
float * mvaInputU_
 
reco::Candidate::LorentzVector mvaMEt_
 
reco::METCovMatrix mvaMEtCov_
 
std::string mvaNameCovU1_
 
std::string mvaNameCovU2_
 
std::string mvaNameDPhi_
 
std::string mvaNameU_
 
float mvaOutputCovU1_
 
float mvaOutputCovU2_
 
float mvaOutputDPhi_
 
float mvaOutputU_
 
const GBRForestmvaReaderCovU1_
 
const GBRForestmvaReaderCovU2_
 
const GBRForestmvaReaderDPhi_
 
const GBRForestmvaReaderU_
 
int mvaType_
 
double sumLeptonPx_
 
double sumLeptonPy_
 
MvaMEtUtilities utils_
 
std::map< std::string, float > var_
 
std::vector< std::string > varForCovU1_
 
std::vector< std::string > varForCovU2_
 
std::vector< std::string > varForDPhi_
 
std::vector< std::string > varForU_
 

Detailed Description

MVA based algorithm for computing the particle-flow missing Et

Authors
Phil Harris, CERN Christian Veelken, LLR

Definition at line 31 of file PFMETAlgorithmMVA.h.

Constructor & Destructor Documentation

PFMETAlgorithmMVA::PFMETAlgorithmMVA ( const edm::ParameterSet cfg)

Definition at line 93 of file PFMETAlgorithmMVA.cc.

References edm::ParameterSet::getParameter(), kBaseline, loadMVAfromDB_, and mvaType_.

94  : utils_(cfg),
95  mvaReaderU_(nullptr),
96  mvaReaderDPhi_(nullptr),
97  mvaReaderCovU1_(nullptr),
98  mvaReaderCovU2_(nullptr),
99  cfg_(cfg)
100 {
102 
103  loadMVAfromDB_ = cfg.getParameter<bool>("loadMVAfromDB");
104 
105 }
T getParameter(std::string const &) const
MvaMEtUtilities utils_
const GBRForest * mvaReaderCovU1_
const GBRForest * mvaReaderCovU2_
edm::ParameterSet cfg_
const GBRForest * mvaReaderDPhi_
const GBRForest * mvaReaderU_
PFMETAlgorithmMVA::~PFMETAlgorithmMVA ( )

Definition at line 107 of file PFMETAlgorithmMVA.cc.

References loadMVAfromDB_, mvaReaderCovU1_, mvaReaderCovU2_, mvaReaderDPhi_, and mvaReaderU_.

108 {
109  if ( !loadMVAfromDB_ ) {
110  delete mvaReaderU_;
111  delete mvaReaderDPhi_;
112  delete mvaReaderCovU1_;
113  delete mvaReaderCovU2_;
114  }
115 }
const GBRForest * mvaReaderCovU1_
const GBRForest * mvaReaderCovU2_
const GBRForest * mvaReaderDPhi_
const GBRForest * mvaReaderU_

Member Function Documentation

void PFMETAlgorithmMVA::computeMET ( )
private

Definition at line 244 of file PFMETAlgorithmMVA.cc.

References funct::cos(), mvaMEt_, mvaMEtCov_, mvaOutputCovU1_, mvaOutputCovU2_, colinearityKinematic::Phi, Pi, funct::sin(), mathSSE::sqrt(), sumLeptonPx_, sumLeptonPy_, mitigatedMETSequence_cff::U, and var_.

Referenced by evaluateMVA().

245 {
246  double U = var_["RecoilCor_U"];
247  double Phi = var_["PhiCor_UPhi"];
248  if ( U < 0. ) Phi += Pi; //RF: No sign flip for U necessary in that case?
249  double cosPhi = std::cos(Phi);
250  double sinPhi = std::sin(Phi);
251  double metPx = U*cosPhi - sumLeptonPx_;
252  double metPy = U*sinPhi - sumLeptonPy_;
253  double metPt = sqrt(metPx*metPx + metPy*metPy);
254  mvaMEt_.SetCoordinates(metPx, metPy, 0., metPt);
255  // compute MET uncertainties in dirrections parallel and perpendicular to hadronic recoil
256  // (neglecting uncertainties on lepton momenta)
257  mvaMEtCov_(0, 0) = mvaOutputCovU1_*cosPhi*cosPhi + mvaOutputCovU2_*sinPhi*sinPhi;
258  mvaMEtCov_(0, 1) = -mvaOutputCovU1_*sinPhi*cosPhi + mvaOutputCovU2_*sinPhi*cosPhi;
259  mvaMEtCov_(1, 0) = mvaMEtCov_(0, 1);
260  mvaMEtCov_(1, 1) = mvaOutputCovU1_*sinPhi*sinPhi + mvaOutputCovU2_*cosPhi*cosPhi;
261 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
T sqrt(T t)
Definition: SSEVec.h:18
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
reco::METCovMatrix mvaMEtCov_
const double Pi
std::map< std::string, float > var_
reco::Candidate::LorentzVector mvaMEt_
std::unique_ptr< float[]> PFMETAlgorithmMVA::createFloatVector ( std::vector< std::string >  variableNames)
private

Definition at line 206 of file PFMETAlgorithmMVA.cc.

References mps_fire::i, and var_.

Referenced by GetResponse().

207 {
208  std::unique_ptr<float[]> floatVector(new float[variableNames.size()]);
209  int i = 0;
210  for(auto variableName: variableNames)
211  {
212  floatVector[i++] = var_[variableName];
213  }
214  return floatVector;
215 }
std::map< std::string, float > var_
const float PFMETAlgorithmMVA::evaluateCovU1 ( )
private

Referenced by getCovU2().

const float PFMETAlgorithmMVA::evaluateCovU2 ( )
private

Referenced by getCovU2().

const float PFMETAlgorithmMVA::evaluateDPhi ( )
private

Referenced by getCovU2().

void PFMETAlgorithmMVA::evaluateMVA ( )

Definition at line 218 of file PFMETAlgorithmMVA.cc.

References computeMET(), GetResponse(), hasPhotons_, SiStripPI::max, mvaOutputCovU1_, mvaOutputCovU2_, mvaOutputDPhi_, mvaOutputU_, mvaReaderCovU1_, mvaReaderCovU2_, mvaReaderDPhi_, mvaReaderU_, funct::pow(), mathSSE::sqrt(), sumLeptonPx_, sumLeptonPy_, var_, varForCovU1_, varForCovU2_, varForDPhi_, and varForU_.

Referenced by reco::PFMETProducerMVA::produce(), and setHasPhotons().

219 {
220  // CV: MVAs needs to be evaluated in order { DPhi, U1, CovU1, CovU2 }
221  // as MVA for U1 (CovU1, CovU2) uses output of DPhi (DPhi and U1) MVA
223  var_["PhiCor_UPhi"] = var_["particleFlow_UPhi"] + mvaOutputDPhi_;
225  var_["RecoilCor_U"] = var_["particleFlow_U"] * mvaOutputU_;
226  var_["RecoilCor_UPhi"] = var_["PhiCor_UPhi"];
227  mvaOutputCovU1_ = std::pow(GetResponse(mvaReaderCovU1_, varForCovU1_)* mvaOutputU_ * var_["particleFlow_U"], 2);
228  mvaOutputCovU2_ = std::pow(GetResponse(mvaReaderCovU2_, varForCovU2_)* mvaOutputU_ * var_["particleFlow_U"], 2);
229 
230 
231  // compute MET(Photon check)
232  if(hasPhotons_) {
233  //Fix events with unphysical properties
235  if(var_["track_U"]/sumLeptonPt < 0.1 || var_["noPileUp_U"]/sumLeptonPt < 0.1 ) {
236  mvaOutputU_ = 1.;
237  mvaOutputDPhi_ = 0.;
238  }
239  }
240  computeMET();
241 }
std::vector< std::string > varForCovU2_
std::vector< std::string > varForU_
const GBRForest * mvaReaderCovU1_
const float GetResponse(const GBRForest *Reader, std::vector< std::string > &variableNames)
const GBRForest * mvaReaderCovU2_
const GBRForest * mvaReaderDPhi_
const GBRForest * mvaReaderU_
T sqrt(T t)
Definition: SSEVec.h:18
std::vector< std::string > varForCovU1_
std::vector< std::string > varForDPhi_
std::map< std::string, float > var_
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
const float PFMETAlgorithmMVA::evaluateU ( )
private

Referenced by getCovU2().

double PFMETAlgorithmMVA::getCovU1 ( ) const
inline

Definition at line 55 of file PFMETAlgorithmMVA.h.

References mvaOutputCovU1_.

55 { return mvaOutputCovU1_; }
double PFMETAlgorithmMVA::getCovU2 ( ) const
inline
double PFMETAlgorithmMVA::getDPhi ( ) const
inline

Definition at line 54 of file PFMETAlgorithmMVA.h.

References mvaOutputDPhi_.

54 { return mvaOutputDPhi_; }
reco::Candidate::LorentzVector PFMETAlgorithmMVA::getMEt ( ) const
inline

Definition at line 50 of file PFMETAlgorithmMVA.h.

References mvaMEt_.

Referenced by reco::PFMETProducerMVA::produce().

50 { return mvaMEt_; }
reco::Candidate::LorentzVector mvaMEt_
const reco::METCovMatrix& PFMETAlgorithmMVA::getMEtCov ( ) const
inline

Definition at line 51 of file PFMETAlgorithmMVA.h.

References mvaMEtCov_.

Referenced by reco::PFMETProducerMVA::produce().

51 { return mvaMEtCov_; }
reco::METCovMatrix mvaMEtCov_
const float PFMETAlgorithmMVA::GetResponse ( const GBRForest Reader,
std::vector< std::string > &  variableNames 
)
private

Definition at line 264 of file PFMETAlgorithmMVA.cc.

References createFloatVector(), GBRForest::GetResponse(), and mps_fire::result.

Referenced by evaluateMVA().

265 {
266  std::unique_ptr<float[]> mvaInputVector = createFloatVector(variableNames);
267  double result = Reader->GetResponse( mvaInputVector.get() );
268  return result;
269 }
double GetResponse(const float *vector) const
Definition: GBRForest.h:59
std::unique_ptr< float[]> createFloatVector(std::vector< std::string > variableNames)
double PFMETAlgorithmMVA::getU ( ) const
inline

Definition at line 53 of file PFMETAlgorithmMVA.h.

References mvaOutputU_.

53 { return mvaOutputU_; }
void PFMETAlgorithmMVA::initialize ( const edm::EventSetup es)

Definition at line 118 of file PFMETAlgorithmMVA.cc.

References cfg_, edm::ParameterSet::getParameter(), loadMVAfromDB(), loadMVAfromDB_, loadMVAfromFile(), mvaNameCovU1_, mvaNameCovU2_, mvaNameDPhi_, mvaNameU_, mvaReaderCovU1_, mvaReaderCovU2_, mvaReaderDPhi_, mvaReaderU_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by reco::PFMETProducerMVA::produce().

119 {
120  edm::ParameterSet cfgInputRecords = cfg_.getParameter<edm::ParameterSet>("inputRecords");
121  mvaNameU_ = cfgInputRecords.getParameter<std::string>("U");
122  mvaNameDPhi_ = cfgInputRecords.getParameter<std::string>("DPhi");
123  mvaNameCovU1_ = cfgInputRecords.getParameter<std::string>("CovU1");
124  mvaNameCovU2_ = cfgInputRecords.getParameter<std::string>("CovU2");
125 
126  if ( loadMVAfromDB_ ) {
127  mvaReaderU_ = loadMVAfromDB(es, mvaNameU_);
128  mvaReaderDPhi_ = loadMVAfromDB(es, mvaNameDPhi_);
129  mvaReaderCovU1_ = loadMVAfromDB(es, mvaNameCovU1_);
130  mvaReaderCovU2_ = loadMVAfromDB(es, mvaNameCovU2_);
131  } else {
132  edm::ParameterSet cfgInputFileNames = cfg_.getParameter<edm::ParameterSet>("inputFileNames");
133 
134  edm::FileInPath inputFileNameU = cfgInputFileNames.getParameter<edm::FileInPath>("U");
135  mvaReaderU_ = loadMVAfromFile(inputFileNameU, mvaNameU_);
136  edm::FileInPath inputFileNameDPhi = cfgInputFileNames.getParameter<edm::FileInPath>("DPhi");
137  mvaReaderDPhi_ = loadMVAfromFile(inputFileNameDPhi, mvaNameDPhi_);
138  edm::FileInPath inputFileNameCovU1 = cfgInputFileNames.getParameter<edm::FileInPath>("CovU1");
139  mvaReaderCovU1_ = loadMVAfromFile(inputFileNameCovU1, mvaNameCovU1_);
140  edm::FileInPath inputFileNameCovU2 = cfgInputFileNames.getParameter<edm::FileInPath>("CovU2");
141  mvaReaderCovU2_ = loadMVAfromFile(inputFileNameCovU2, mvaNameCovU2_);
142  }
143 }
T getParameter(std::string const &) const
const GBRForest * loadMVAfromFile(const edm::FileInPath &inputFileName, const std::string &mvaName)
const GBRForest * mvaReaderCovU1_
const GBRForest * mvaReaderCovU2_
edm::ParameterSet cfg_
std::string mvaNameCovU1_
const GBRForest * mvaReaderDPhi_
const GBRForest * mvaReaderU_
const GBRForest * loadMVAfromDB(const edm::EventSetup &es, const std::string &mvaName)
std::string mvaNameDPhi_
std::string mvaNameCovU2_
const GBRForest * PFMETAlgorithmMVA::loadMVAfromDB ( const edm::EventSetup es,
const std::string &  mvaName 
)
private
const GBRForest * PFMETAlgorithmMVA::loadMVAfromFile ( const edm::FileInPath inputFileName,
const std::string &  mvaName 
)
private

Definition at line 52 of file PFMETAlgorithmMVA.cc.

References Exception, edm::FileInPath::fullPath(), mps_fire::i, analyzePatCleaning_cfg::inputFile, edm::FileInPath::location(), DetachedQuadStep_cff::mva, mvaNameCovU1_, mvaNameCovU2_, mvaNameDPhi_, mvaNameU_, edm::FileInPath::Unknown, updateVariableNames(), varForCovU1_, varForCovU2_, varForDPhi_, and varForU_.

Referenced by getCovU2(), and initialize().

53 {
54  if ( inputFileName.location()==edm::FileInPath::Unknown ) throw cms::Exception("PFMETAlgorithmMVA::loadMVA")
55  << " Failed to find File = " << inputFileName << " !!\n";
56  std::unique_ptr<TFile> inputFile(new TFile(inputFileName.fullPath().data()) );
57 
58  std::vector<std::string> *lVec = (std::vector<std::string>*)inputFile->Get("varlist");
59 
60  if(lVec==nullptr) {
61  throw cms::Exception("PFMETAlgorithmMVA::loadMVA")
62  << " Failed to load mva file : " << inputFileName.fullPath().data() << " is not a proper file !!\n";
63  }
64 
65  std::vector<std::string> variableNames;
66  for(unsigned int i=0; i< lVec->size();++i)
67  {
68  variableNames.push_back(updateVariableNames(lVec->at(i)));
69  }
70 
71  if(mvaName.find(mvaNameU_) != std::string::npos) varForU_ = variableNames;
72  else if(mvaName.find(mvaNameDPhi_) != std::string::npos) varForDPhi_ = variableNames;
73  else if(mvaName.find(mvaNameCovU1_) != std::string::npos) varForCovU1_ = variableNames;
74  else if(mvaName.find(mvaNameCovU2_) != std::string::npos) varForCovU2_ = variableNames;
75  else throw cms::Exception("PFMETAlgorithmMVA::loadMVA") << "MVA MET weight file tree names do not match specified inputs" << std::endl;
76 
77 
78  const GBRForest* mva = (GBRForest*)inputFile->Get(mvaName.data());
79  if ( !mva )
80  throw cms::Exception("PFMETAlgorithmMVA::loadMVA")
81  << " Failed to load MVA = " << mvaName.data() << " from file = " << inputFileName.fullPath().data() << " !!\n";
82 
83  return mva;
84 }
std::vector< std::string > varForCovU2_
std::vector< std::string > varForU_
const std::string updateVariableNames(std::string input)
std::string mvaNameCovU1_
LocationCode location() const
Where was the file found?
Definition: FileInPath.cc:178
std::vector< std::string > varForCovU1_
std::vector< std::string > varForDPhi_
std::string mvaNameDPhi_
std::string fullPath() const
Definition: FileInPath.cc:184
std::string mvaNameCovU2_
void PFMETAlgorithmMVA::print ( std::ostream &  stream) const

Definition at line 272 of file PFMETAlgorithmMVA.cc.

References mps_splice::entry, mvaOutputCovU1_, mvaOutputCovU2_, mvaOutputDPhi_, mvaOutputU_, mathSSE::sqrt(), sumLeptonPx_, sumLeptonPy_, and var_.

Referenced by getCovU2().

273 {
274  stream << "<PFMETAlgorithmMVA::print>:" << std::endl;
275  for(auto entry: var_)
276  stream << entry.first << " = " << entry.second << std::endl;
277  stream << " covU1 = " << mvaOutputCovU1_ << ", covU2 = " << mvaOutputCovU2_ << std::endl;
278  stream << " sum(leptons): Pt = " << sqrt(sumLeptonPx_*sumLeptonPx_ + sumLeptonPy_*sumLeptonPy_) << ","
279  << " phi = " << atan2(sumLeptonPy_, sumLeptonPx_) << " "
280  << "(Px = " << sumLeptonPx_ << ", Py = " << sumLeptonPy_ << ")" ;
281  stream << " MVA output: U = " << mvaOutputU_ << ", dPhi = " << mvaOutputDPhi_ << "," << " covU1 = " << mvaOutputCovU1_ << ", covU2 = " << mvaOutputCovU2_ << std::endl;
282  stream << std::endl;
283 }
T sqrt(T t)
Definition: SSEVec.h:18
std::map< std::string, float > var_
void PFMETAlgorithmMVA::setHasPhotons ( bool  hasPhotons)
inline

Definition at line 41 of file PFMETAlgorithmMVA.h.

References evaluateMVA(), hasPhotons_, and setInput().

Referenced by reco::PFMETProducerMVA::produce().

41 { hasPhotons_ = hasPhotons; }
void PFMETAlgorithmMVA::setInput ( const std::vector< reco::PUSubMETCandInfo > &  leptons,
const std::vector< reco::PUSubMETCandInfo > &  jets,
const std::vector< reco::PUSubMETCandInfo > &  pfCandidates,
const std::vector< reco::Vertex::Point > &  vertices 
)

Definition at line 146 of file PFMETAlgorithmMVA.cc.

References chargedSumLeptonPx_, chargedSumLeptonPy_, MvaMEtUtilities::computeAllSums(), MvaMEtUtilities::computeRecoil(), MvaMEtUtilities::getCleanedJets(), MvaMEtUtilities::getLeptonsChSumMEX(), MvaMEtUtilities::getLeptonsChSumMEY(), MvaMEtUtilities::getLeptonsSumMEX(), MvaMEtUtilities::getLeptonsSumMEY(), MvaMEtUtilities::kChHS, MvaMEtUtilities::kHS, MvaMEtUtilities::kHSMinusNeutralPU, MvaMEtUtilities::kPF, MvaMEtUtilities::kPU, MvaMEtUtilities::leadJetP4(), CommonMETData::met, MvaMEtUtilities::numJetsAboveThreshold(), CommonMETData::phi, MvaMEtUtilities::subleadJetP4(), CommonMETData::sumet, sumLeptonPx_, sumLeptonPy_, utils_, and var_.

Referenced by reco::PFMETProducerMVA::produce(), and setHasPhotons().

150 {
151 
152 
154 
157 
160 
161  const std::vector<reco::PUSubMETCandInfo> jets_cleaned = utils_.getCleanedJets();
162 
168 
169  reco::Candidate::LorentzVector jet1P4 = utils_.leadJetP4(jets_cleaned);
170  reco::Candidate::LorentzVector jet2P4 = utils_.subleadJetP4(jets_cleaned);
171 
172 
173  var_["particleFlow_U"] = pfRecoil_data.met;
174  var_["particleFlow_SumET"] = pfRecoil_data.sumet;
175  var_["particleFlow_UPhi"] = pfRecoil_data.phi;
176 
177  var_["track_SumET"] = chHSRecoil_data.sumet/var_["particleFlow_SumET"];
178  var_["track_U"] = chHSRecoil_data.met;
179  var_["track_UPhi"] = chHSRecoil_data.phi;
180 
181  var_["noPileUp_SumET"] = hsRecoil_data.sumet/var_["particleFlow_SumET"];
182  var_["noPileUp_U"] = hsRecoil_data.met;
183  var_["noPileUp_UPhi"] = hsRecoil_data.phi;
184 
185  var_["pileUp_SumET"] = puRecoil_data.sumet/var_["particleFlow_SumET"];
186  var_["pileUp_MET"] = puRecoil_data.met;
187  var_["pileUp_METPhi"] = puRecoil_data.phi;
188 
189  var_["pileUpCorrected_SumET"] = hsMinusNeutralPUMEt_data.sumet/var_["particleFlow_SumET"];
190  var_["pileUpCorrected_U"] = hsMinusNeutralPUMEt_data.met;
191  var_["pileUpCorrected_UPhi"] = hsMinusNeutralPUMEt_data.phi;
192 
193  var_["jet1_pT"] = jet1P4.pt();
194  var_["jet1_eta"] = jet1P4.eta();
195  var_["jet1_Phi"] = jet1P4.phi();
196  var_["jet2_pT"] = jet2P4.pt();
197  var_["jet2_eta"] = jet2P4.eta();
198  var_["jet2_Phi"] = jet2P4.phi();
199 
200  var_["numJetsPtGt30"] = utils_.numJetsAboveThreshold(jets_cleaned, 30.);
201  var_["nJets"] = jets_cleaned.size();
202  var_["nPV"] = vertices.size();
203 }
const std::vector< reco::PUSubMETCandInfo > & getCleanedJets() const
double getLeptonsChSumMEX() const
double getLeptonsChSumMEY() const
unsigned numJetsAboveThreshold(const std::vector< reco::PUSubMETCandInfo > &, double)
MvaMEtUtilities utils_
reco::Candidate::LorentzVector subleadJetP4(const std::vector< reco::PUSubMETCandInfo > &)
double getLeptonsSumMEX() const
vector< PseudoJet > jets
Structure containing data common to all types of MET.
Definition: CommonMETData.h:12
void computeAllSums(const std::vector< reco::PUSubMETCandInfo > &jets, const std::vector< reco::PUSubMETCandInfo > &leptons, const std::vector< reco::PUSubMETCandInfo > &pfCandidates)
reco::Candidate::LorentzVector leadJetP4(const std::vector< reco::PUSubMETCandInfo > &)
double getLeptonsSumMEY() const
CommonMETData computeRecoil(int metType)
std::map< std::string, float > var_
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
const std::string PFMETAlgorithmMVA::updateVariableNames ( std::string  input)
private

Definition at line 20 of file PFMETAlgorithmMVA.cc.

References input.

Referenced by getCovU2(), and loadMVAfromFile().

21 {
22  if(input=="sumet") return "particleFlow_SumET";
23  if(input=="npv") return "nPV";
24  if(input=="pfu") return "particleFlow_U";
25  if(input=="pfuphi") return "particleFlow_UPhi";
26  if(input=="tksumet") return "track_SumET";
27  if(input=="tku") return "track_U";
28  if(input=="tkuphi") return "track_UPhi";
29  if(input=="nopusumet") return "noPileUp_SumET";
30  if(input=="nopuu") return "noPileUp_U";
31  if(input=="nopuuphi") return "noPileUp_UPhi";
32  if(input=="pusumet") return "pileUp_SumET";
33  if(input=="pumet") return "pileUp_MET";
34  if(input=="pumetphi") return "pileUp_METPhi";
35  if(input=="pucsumet") return "pileUpCorrected_SumET";
36  if(input=="pucu") return "pileUpCorrected_U";
37  if(input=="pucuphi") return "pileUpCorrected_UPhi";
38  if(input=="jetpt1") return "jet1_pT";
39  if(input=="jeteta1") return "jet1_eta";
40  if(input=="jetphi1") return "jet1_Phi";
41  if(input=="jetpt2") return "jet2_pT";
42  if(input=="jeteta2") return "jet2_eta";
43  if(input=="jetphi2") return "jet2_Phi";
44  if(input=="nalljet") return "nJets";
45  if(input=="njet") return "numJetsPtGt30";
46  if(input=="uphi_mva") return "PhiCor_UPhi";
47  if(input=="uphix_mva") return "PhiCor_UPhi";
48  if(input=="ux_mva") return "RecoilCor_U";
49  return input;
50 }
static std::string const input
Definition: EdmProvDump.cc:44

Member Data Documentation

edm::ParameterSet PFMETAlgorithmMVA::cfg_
private

Definition at line 119 of file PFMETAlgorithmMVA.h.

Referenced by initialize().

double PFMETAlgorithmMVA::chargedSumLeptonPx_
private

Definition at line 105 of file PFMETAlgorithmMVA.h.

Referenced by setInput().

double PFMETAlgorithmMVA::chargedSumLeptonPy_
private

Definition at line 106 of file PFMETAlgorithmMVA.h.

Referenced by setInput().

double PFMETAlgorithmMVA::dZcut_
private

Definition at line 80 of file PFMETAlgorithmMVA.h.

bool PFMETAlgorithmMVA::hasPhotons_
private

Definition at line 78 of file PFMETAlgorithmMVA.h.

Referenced by evaluateMVA(), and setHasPhotons().

bool PFMETAlgorithmMVA::loadMVAfromDB_
private

Definition at line 117 of file PFMETAlgorithmMVA.h.

Referenced by initialize(), PFMETAlgorithmMVA(), and ~PFMETAlgorithmMVA().

float* PFMETAlgorithmMVA::mvaInputCovU1_
private

Definition at line 89 of file PFMETAlgorithmMVA.h.

float* PFMETAlgorithmMVA::mvaInputCovU2_
private

Definition at line 90 of file PFMETAlgorithmMVA.h.

float* PFMETAlgorithmMVA::mvaInputDPhi_
private

Definition at line 88 of file PFMETAlgorithmMVA.h.

float* PFMETAlgorithmMVA::mvaInputU_
private

Definition at line 87 of file PFMETAlgorithmMVA.h.

reco::Candidate::LorentzVector PFMETAlgorithmMVA::mvaMEt_
private

Definition at line 108 of file PFMETAlgorithmMVA.h.

Referenced by computeMET(), and getMEt().

reco::METCovMatrix PFMETAlgorithmMVA::mvaMEtCov_
private

Definition at line 110 of file PFMETAlgorithmMVA.h.

Referenced by computeMET(), and getMEtCov().

std::string PFMETAlgorithmMVA::mvaNameCovU1_
private

Definition at line 74 of file PFMETAlgorithmMVA.h.

Referenced by initialize(), and loadMVAfromFile().

std::string PFMETAlgorithmMVA::mvaNameCovU2_
private

Definition at line 75 of file PFMETAlgorithmMVA.h.

Referenced by initialize(), and loadMVAfromFile().

std::string PFMETAlgorithmMVA::mvaNameDPhi_
private

Definition at line 73 of file PFMETAlgorithmMVA.h.

Referenced by initialize(), and loadMVAfromFile().

std::string PFMETAlgorithmMVA::mvaNameU_
private

Definition at line 72 of file PFMETAlgorithmMVA.h.

Referenced by initialize(), and loadMVAfromFile().

float PFMETAlgorithmMVA::mvaOutputCovU1_
private

Definition at line 94 of file PFMETAlgorithmMVA.h.

Referenced by computeMET(), evaluateMVA(), getCovU1(), and print().

float PFMETAlgorithmMVA::mvaOutputCovU2_
private

Definition at line 95 of file PFMETAlgorithmMVA.h.

Referenced by computeMET(), evaluateMVA(), getCovU2(), and print().

float PFMETAlgorithmMVA::mvaOutputDPhi_
private

Definition at line 93 of file PFMETAlgorithmMVA.h.

Referenced by evaluateMVA(), getDPhi(), and print().

float PFMETAlgorithmMVA::mvaOutputU_
private

Definition at line 92 of file PFMETAlgorithmMVA.h.

Referenced by evaluateMVA(), getU(), and print().

const GBRForest* PFMETAlgorithmMVA::mvaReaderCovU1_
private

Definition at line 114 of file PFMETAlgorithmMVA.h.

Referenced by evaluateMVA(), initialize(), and ~PFMETAlgorithmMVA().

const GBRForest* PFMETAlgorithmMVA::mvaReaderCovU2_
private

Definition at line 115 of file PFMETAlgorithmMVA.h.

Referenced by evaluateMVA(), initialize(), and ~PFMETAlgorithmMVA().

const GBRForest* PFMETAlgorithmMVA::mvaReaderDPhi_
private

Definition at line 113 of file PFMETAlgorithmMVA.h.

Referenced by evaluateMVA(), initialize(), and ~PFMETAlgorithmMVA().

const GBRForest* PFMETAlgorithmMVA::mvaReaderU_
private

Definition at line 112 of file PFMETAlgorithmMVA.h.

Referenced by evaluateMVA(), initialize(), and ~PFMETAlgorithmMVA().

int PFMETAlgorithmMVA::mvaType_
private

Definition at line 77 of file PFMETAlgorithmMVA.h.

Referenced by PFMETAlgorithmMVA().

double PFMETAlgorithmMVA::sumLeptonPx_
private

Definition at line 103 of file PFMETAlgorithmMVA.h.

Referenced by computeMET(), evaluateMVA(), print(), and setInput().

double PFMETAlgorithmMVA::sumLeptonPy_
private

Definition at line 104 of file PFMETAlgorithmMVA.h.

Referenced by computeMET(), evaluateMVA(), print(), and setInput().

MvaMEtUtilities PFMETAlgorithmMVA::utils_
private

Definition at line 70 of file PFMETAlgorithmMVA.h.

Referenced by setInput().

std::map<std::string, float> PFMETAlgorithmMVA::var_
private

Definition at line 84 of file PFMETAlgorithmMVA.h.

Referenced by computeMET(), createFloatVector(), evaluateMVA(), print(), and setInput().

std::vector<std::string> PFMETAlgorithmMVA::varForCovU1_
private

Definition at line 99 of file PFMETAlgorithmMVA.h.

Referenced by evaluateMVA(), and loadMVAfromFile().

std::vector<std::string> PFMETAlgorithmMVA::varForCovU2_
private

Definition at line 100 of file PFMETAlgorithmMVA.h.

Referenced by evaluateMVA(), and loadMVAfromFile().

std::vector<std::string> PFMETAlgorithmMVA::varForDPhi_
private

Definition at line 98 of file PFMETAlgorithmMVA.h.

Referenced by evaluateMVA(), and loadMVAfromFile().

std::vector<std::string> PFMETAlgorithmMVA::varForU_
private

Definition at line 97 of file PFMETAlgorithmMVA.h.

Referenced by evaluateMVA(), and loadMVAfromFile().