|
|
Go to the documentation of this file.
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")
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";
118 return mva.product();
123 mvaReaderU_(nullptr),
124 mvaReaderDPhi_(nullptr),
125 mvaReaderCovU1_(nullptr),
126 mvaReaderCovU2_(nullptr),
171 const std::vector<reco::PUSubMETCandInfo>&
jets,
172 const std::vector<reco::PUSubMETCandInfo>&
pfCandidates,
173 const std::vector<reco::Vertex::Point>&
vertices) {
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();
227 std::unique_ptr<float[]> floatVector(
new float[variableNames.size()]);
229 for (
auto variableName : variableNames) {
230 floatVector[
i++] =
var_[variableName];
243 var_[
"RecoilCor_UPhi"] =
var_[
"PhiCor_UPhi"];
251 if (
var_[
"track_U"] / sumLeptonPt < 0.1 ||
var_[
"noPileUp_U"] / sumLeptonPt < 0.1) {
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);
288 stream <<
"<PFMETAlgorithmMVA::print>:" << std::endl;
reco::Candidate::LorentzVector leadJetP4(const std::vector< reco::PUSubMETCandInfo > &)
static const std::string input
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
T getParameter(std::string const &) const
void computeAllSums(const std::vector< reco::PUSubMETCandInfo > &jets, const std::vector< reco::PUSubMETCandInfo > &leptons, const std::vector< reco::PUSubMETCandInfo > &pfCandidates)
Power< A, B >::type pow(const A &a, const B &b)
double getLeptonsChSumMEY() const
math::XYZTLorentzVector LorentzVector
Lorentz vector.
double getLeptonsSumMEY() const