|
|
#include <PFMETAlgorithmMVA.h>
MVA based algorithm for computing the particle-flow missing Et
- Authors
- Phil Harris, CERN Christian Veelken, LLR
Definition at line 30 of file PFMETAlgorithmMVA.h.
◆ PFMETAlgorithmMVA()
◆ ~PFMETAlgorithmMVA()
PFMETAlgorithmMVA::~PFMETAlgorithmMVA |
( |
| ) |
|
◆ computeMET()
void PFMETAlgorithmMVA::computeMET |
( |
| ) |
|
|
private |
Definition at line 260 of file PFMETAlgorithmMVA.cc.
261 double U =
var_[
"RecoilCor_U"];
262 double Phi =
var_[
"PhiCor_UPhi"];
269 double metPt =
sqrt(metPx * metPx + metPy * metPy);
270 mvaMEt_.SetCoordinates(metPx, metPy, 0., metPt);
References funct::cos(), Phase1L1TJetProducer_cfi::cosPhi, mvaMEt_, mvaMEtCov_, mvaOutputCovU1_, mvaOutputCovU2_, VtxSmearedParameters_cfi::Phi, Pi, funct::sin(), Phase1L1TJetProducer_cfi::sinPhi, mathSSE::sqrt(), sumLeptonPx_, sumLeptonPy_, mitigatedMETSequence_cff::U, and var_.
Referenced by evaluateMVA().
◆ createFloatVector()
std::unique_ptr< float[]> PFMETAlgorithmMVA::createFloatVector |
( |
std::vector< std::string > |
variableNames | ) |
|
|
private |
Definition at line 226 of file PFMETAlgorithmMVA.cc.
227 std::unique_ptr<float[]> floatVector(
new float[variableNames.size()]);
229 for (
const auto& variableName : variableNames) {
230 floatVector[
i++] =
var_[variableName];
References mps_fire::i, and var_.
Referenced by GetResponse().
◆ evaluateCovU1()
const float PFMETAlgorithmMVA::evaluateCovU1 |
( |
| ) |
|
|
private |
◆ evaluateCovU2()
const float PFMETAlgorithmMVA::evaluateCovU2 |
( |
| ) |
|
|
private |
◆ evaluateDPhi()
const float PFMETAlgorithmMVA::evaluateDPhi |
( |
| ) |
|
|
private |
◆ evaluateMVA()
void PFMETAlgorithmMVA::evaluateMVA |
( |
| ) |
|
Definition at line 236 of file PFMETAlgorithmMVA.cc.
243 var_[
"RecoilCor_UPhi"] =
var_[
"PhiCor_UPhi"];
251 if (
var_[
"track_U"] / sumLeptonPt < 0.1 ||
var_[
"noPileUp_U"] / sumLeptonPt < 0.1) {
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().
◆ evaluateU()
const float PFMETAlgorithmMVA::evaluateU |
( |
| ) |
|
|
private |
◆ getCovU1()
double PFMETAlgorithmMVA::getCovU1 |
( |
| ) |
const |
|
inline |
◆ getCovU2()
double PFMETAlgorithmMVA::getCovU2 |
( |
| ) |
const |
|
inline |
◆ getDPhi()
double PFMETAlgorithmMVA::getDPhi |
( |
| ) |
const |
|
inline |
◆ getMEt()
◆ getMEtCov()
◆ GetResponse()
const float PFMETAlgorithmMVA::GetResponse |
( |
const GBRForest * |
Reader, |
|
|
std::vector< std::string > & |
variableNames |
|
) |
| |
|
private |
◆ getU()
double PFMETAlgorithmMVA::getU |
( |
| ) |
const |
|
inline |
◆ initialize()
Definition at line 143 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().
◆ loadMVAfromDB()
◆ loadMVAfromFile()
const GBRForest * PFMETAlgorithmMVA::loadMVAfromFile |
( |
const edm::FileInPath & |
inputFileName, |
|
|
const std::string & |
mvaName |
|
) |
| |
|
private |
Definition at line 78 of file PFMETAlgorithmMVA.cc.
83 std::vector<std::string>* lVec = (std::vector<std::string>*)
inputFile->Get(
"varlist");
85 if (lVec ==
nullptr) {
87 <<
" Failed to load mva file : " <<
inputFileName.fullPath().data() <<
" is not a proper file !!\n";
90 std::vector<std::string> variableNames;
91 for (
unsigned int i = 0;
i < lVec->size(); ++
i) {
105 <<
"MVA MET weight file tree names do not match specified inputs" << std::endl;
110 <<
" Failed to load MVA = " <<
mvaName.data() <<
" from file = " <<
inputFileName.fullPath().data() <<
" !!\n";
References Exception, mps_fire::i, dtResolutionTest_cfi::inputFile, InefficientDoubleROC::inputFileName, beam_dqm_sourceclient-live_cfg::mva, taus_updatedMVAIds_cff::mvaName, mvaNameCovU1_, mvaNameCovU2_, mvaNameDPhi_, mvaNameU_, edm::FileInPath::Unknown, updateVariableNames(), varForCovU1_, varForCovU2_, varForDPhi_, and varForU_.
Referenced by initialize().
◆ print()
void PFMETAlgorithmMVA::print |
( |
std::ostream & |
stream | ) |
const |
◆ setHasPhotons()
void PFMETAlgorithmMVA::setHasPhotons |
( |
bool |
hasPhotons | ) |
|
|
inline |
◆ setInput()
Definition at line 170 of file PFMETAlgorithmMVA.cc.
193 var_[
"particleFlow_U"] = pfRecoil_data.
met;
194 var_[
"particleFlow_SumET"] = pfRecoil_data.
sumet;
195 var_[
"particleFlow_UPhi"] = pfRecoil_data.
phi;
197 var_[
"track_SumET"] = chHSRecoil_data.
sumet /
var_[
"particleFlow_SumET"];
198 var_[
"track_U"] = chHSRecoil_data.
met;
199 var_[
"track_UPhi"] = chHSRecoil_data.
phi;
201 var_[
"noPileUp_SumET"] = hsRecoil_data.
sumet /
var_[
"particleFlow_SumET"];
202 var_[
"noPileUp_U"] = hsRecoil_data.
met;
203 var_[
"noPileUp_UPhi"] = hsRecoil_data.
phi;
205 var_[
"pileUp_SumET"] = puRecoil_data.
sumet /
var_[
"particleFlow_SumET"];
206 var_[
"pileUp_MET"] = puRecoil_data.
met;
207 var_[
"pileUp_METPhi"] = puRecoil_data.
phi;
209 var_[
"pileUpCorrected_SumET"] = hsMinusNeutralPUMEt_data.
sumet /
var_[
"particleFlow_SumET"];
210 var_[
"pileUpCorrected_U"] = hsMinusNeutralPUMEt_data.
met;
211 var_[
"pileUpCorrected_UPhi"] = hsMinusNeutralPUMEt_data.
phi;
213 var_[
"jet1_pT"] = jet1P4.pt();
214 var_[
"jet1_eta"] = jet1P4.eta();
215 var_[
"jet1_Phi"] = jet1P4.phi();
216 var_[
"jet2_pT"] = jet2P4.pt();
217 var_[
"jet2_eta"] = jet2P4.eta();
218 var_[
"jet2_Phi"] = jet2P4.phi();
221 var_[
"nJets"] = jets_cleaned.size();
References chargedSumLeptonPx_, chargedSumLeptonPy_, MvaMEtUtilities::computeAllSums(), MvaMEtUtilities::computeRecoil(), MvaMEtUtilities::getCleanedJets(), MvaMEtUtilities::getLeptonsChSumMEX(), MvaMEtUtilities::getLeptonsChSumMEY(), MvaMEtUtilities::getLeptonsSumMEX(), MvaMEtUtilities::getLeptonsSumMEY(), singleTopDQM_cfi::jets, MvaMEtUtilities::kChHS, MvaMEtUtilities::kHS, MvaMEtUtilities::kHSMinusNeutralPU, MvaMEtUtilities::kPF, MvaMEtUtilities::kPU, MvaMEtUtilities::leadJetP4(), HLT_FULL_cff::leptons, CommonMETData::met, MvaMEtUtilities::numJetsAboveThreshold(), zmumugammaAnalyzer_cfi::pfCandidates, CommonMETData::phi, MvaMEtUtilities::subleadJetP4(), CommonMETData::sumet, sumLeptonPx_, sumLeptonPy_, utils_, var_, and AlignmentTracksFromVertexSelector_cfi::vertices.
Referenced by reco::PFMETProducerMVA::produce().
◆ updateVariableNames()
const std::string PFMETAlgorithmMVA::updateVariableNames |
( |
std::string |
input | ) |
|
|
private |
Definition at line 20 of file PFMETAlgorithmMVA.cc.
22 return "particleFlow_SumET";
26 return "particleFlow_U";
27 if (
input ==
"pfuphi")
28 return "particleFlow_UPhi";
29 if (
input ==
"tksumet")
33 if (
input ==
"tkuphi")
35 if (
input ==
"nopusumet")
36 return "noPileUp_SumET";
39 if (
input ==
"nopuuphi")
40 return "noPileUp_UPhi";
41 if (
input ==
"pusumet")
42 return "pileUp_SumET";
45 if (
input ==
"pumetphi")
46 return "pileUp_METPhi";
47 if (
input ==
"pucsumet")
48 return "pileUpCorrected_SumET";
50 return "pileUpCorrected_U";
51 if (
input ==
"pucuphi")
52 return "pileUpCorrected_UPhi";
53 if (
input ==
"jetpt1")
55 if (
input ==
"jeteta1")
57 if (
input ==
"jetphi1")
59 if (
input ==
"jetpt2")
61 if (
input ==
"jeteta2")
63 if (
input ==
"jetphi2")
65 if (
input ==
"nalljet")
68 return "numJetsPtGt30";
69 if (
input ==
"uphi_mva")
71 if (
input ==
"uphix_mva")
73 if (
input ==
"ux_mva")
References input.
Referenced by loadMVAfromFile().
◆ cfg_
◆ chargedSumLeptonPx_
double PFMETAlgorithmMVA::chargedSumLeptonPx_ |
|
private |
◆ chargedSumLeptonPy_
double PFMETAlgorithmMVA::chargedSumLeptonPy_ |
|
private |
◆ dZcut_
double PFMETAlgorithmMVA::dZcut_ |
|
private |
◆ hasPhotons_
bool PFMETAlgorithmMVA::hasPhotons_ |
|
private |
◆ loadMVAfromDB_
bool PFMETAlgorithmMVA::loadMVAfromDB_ |
|
private |
◆ mvaInputCovU1_
float* PFMETAlgorithmMVA::mvaInputCovU1_ |
|
private |
◆ mvaInputCovU2_
float* PFMETAlgorithmMVA::mvaInputCovU2_ |
|
private |
◆ mvaInputDPhi_
float* PFMETAlgorithmMVA::mvaInputDPhi_ |
|
private |
◆ mvaInputU_
float* PFMETAlgorithmMVA::mvaInputU_ |
|
private |
◆ mvaMEt_
◆ mvaMEtCov_
◆ mvaNameCovU1_
std::string PFMETAlgorithmMVA::mvaNameCovU1_ |
|
private |
◆ mvaNameCovU2_
std::string PFMETAlgorithmMVA::mvaNameCovU2_ |
|
private |
◆ mvaNameDPhi_
std::string PFMETAlgorithmMVA::mvaNameDPhi_ |
|
private |
◆ mvaNameU_
std::string PFMETAlgorithmMVA::mvaNameU_ |
|
private |
◆ mvaOutputCovU1_
float PFMETAlgorithmMVA::mvaOutputCovU1_ |
|
private |
◆ mvaOutputCovU2_
float PFMETAlgorithmMVA::mvaOutputCovU2_ |
|
private |
◆ mvaOutputDPhi_
float PFMETAlgorithmMVA::mvaOutputDPhi_ |
|
private |
◆ mvaOutputU_
float PFMETAlgorithmMVA::mvaOutputU_ |
|
private |
◆ mvaReaderCovU1_
const GBRForest* PFMETAlgorithmMVA::mvaReaderCovU1_ |
|
private |
◆ mvaReaderCovU2_
const GBRForest* PFMETAlgorithmMVA::mvaReaderCovU2_ |
|
private |
◆ mvaReaderDPhi_
const GBRForest* PFMETAlgorithmMVA::mvaReaderDPhi_ |
|
private |
◆ mvaReaderU_
const GBRForest* PFMETAlgorithmMVA::mvaReaderU_ |
|
private |
◆ mvaType_
int PFMETAlgorithmMVA::mvaType_ |
|
private |
◆ sumLeptonPx_
double PFMETAlgorithmMVA::sumLeptonPx_ |
|
private |
◆ sumLeptonPy_
double PFMETAlgorithmMVA::sumLeptonPy_ |
|
private |
◆ utils_
◆ var_
std::map<std::string, float> PFMETAlgorithmMVA::var_ |
|
private |
◆ varForCovU1_
std::vector<std::string> PFMETAlgorithmMVA::varForCovU1_ |
|
private |
◆ varForCovU2_
std::vector<std::string> PFMETAlgorithmMVA::varForCovU2_ |
|
private |
◆ varForDPhi_
std::vector<std::string> PFMETAlgorithmMVA::varForDPhi_ |
|
private |
◆ varForU_
std::vector<std::string> PFMETAlgorithmMVA::varForU_ |
|
private |
reco::Candidate::LorentzVector leadJetP4(const std::vector< reco::PUSubMETCandInfo > &)
static const std::string input
uint32_t const T *__restrict__ const uint32_t *__restrict__ int32_t int Histo::index_type cudaStream_t stream
reco::Candidate::LorentzVector subleadJetP4(const std::vector< reco::PUSubMETCandInfo > &)
double getLeptonsSumMEX() const
Structure containing data common to all types of MET.
Sin< T >::type sin(const T &t)
double GetResponse(const float *vector) const
Cos< T >::type cos(const T &t)
const std::vector< reco::PUSubMETCandInfo > & getCleanedJets() const
unsigned numJetsAboveThreshold(const std::vector< reco::PUSubMETCandInfo > &, double)
CommonMETData computeRecoil(int metType)
double getLeptonsChSumMEX() const
void computeAllSums(const std::vector< reco::PUSubMETCandInfo > &jets, const std::vector< reco::PUSubMETCandInfo > &leptons, const std::vector< reco::PUSubMETCandInfo > &pfCandidates)
T getParameter(std::string const &) const
Power< A, B >::type pow(const A &a, const B &b)
double getLeptonsChSumMEY() const
math::XYZTLorentzVector LorentzVector
Lorentz vector.
double getLeptonsSumMEY() const