18 return "particleFlow_SumET";
22 return "particleFlow_U";
23 if (
input ==
"pfuphi")
24 return "particleFlow_UPhi";
25 if (
input ==
"tksumet")
29 if (
input ==
"tkuphi")
31 if (
input ==
"nopusumet")
32 return "noPileUp_SumET";
35 if (
input ==
"nopuuphi")
36 return "noPileUp_UPhi";
37 if (
input ==
"pusumet")
38 return "pileUp_SumET";
41 if (
input ==
"pumetphi")
42 return "pileUp_METPhi";
43 if (
input ==
"pucsumet")
44 return "pileUpCorrected_SumET";
46 return "pileUpCorrected_U";
47 if (
input ==
"pucuphi")
48 return "pileUpCorrected_UPhi";
49 if (
input ==
"jetpt1")
51 if (
input ==
"jeteta1")
53 if (
input ==
"jetphi1")
55 if (
input ==
"jetpt2")
57 if (
input ==
"jeteta2")
59 if (
input ==
"jetphi2")
61 if (
input ==
"nalljet")
64 return "numJetsPtGt30";
65 if (
input ==
"uphi_mva")
67 if (
input ==
"uphix_mva")
69 if (
input ==
"ux_mva")
79 std::vector<std::string>* lVec = (std::vector<std::string>*)
inputFile->Get(
"varlist");
81 if (lVec ==
nullptr) {
83 <<
" Failed to load mva file : " <<
inputFileName.fullPath().data() <<
" is not a proper file !!\n";
86 std::vector<std::string> variableNames;
87 for (
unsigned int i = 0;
i < lVec->size(); ++
i) {
101 <<
"MVA MET weight file tree names do not match specified inputs" << std::endl;
106 <<
" Failed to load MVA = " <<
mvaName.data() <<
" from file = " <<
inputFileName.fullPath().data() <<
" !!\n";
113 mvaReaderU_(nullptr),
114 mvaReaderDPhi_(nullptr),
115 mvaReaderCovU1_(nullptr),
116 mvaReaderCovU2_(nullptr),
167 const std::vector<reco::PUSubMETCandInfo>&
jets,
168 const std::vector<reco::PUSubMETCandInfo>&
pfCandidates,
169 const std::vector<reco::Vertex::Point>&
vertices) {
189 var_[
"particleFlow_U"] = pfRecoil_data.
met;
190 var_[
"particleFlow_SumET"] = pfRecoil_data.
sumet;
191 var_[
"particleFlow_UPhi"] = pfRecoil_data.
phi;
193 var_[
"track_SumET"] = chHSRecoil_data.
sumet /
var_[
"particleFlow_SumET"];
194 var_[
"track_U"] = chHSRecoil_data.
met;
195 var_[
"track_UPhi"] = chHSRecoil_data.
phi;
197 var_[
"noPileUp_SumET"] = hsRecoil_data.
sumet /
var_[
"particleFlow_SumET"];
198 var_[
"noPileUp_U"] = hsRecoil_data.
met;
199 var_[
"noPileUp_UPhi"] = hsRecoil_data.
phi;
201 var_[
"pileUp_SumET"] = puRecoil_data.
sumet /
var_[
"particleFlow_SumET"];
202 var_[
"pileUp_MET"] = puRecoil_data.
met;
203 var_[
"pileUp_METPhi"] = puRecoil_data.
phi;
205 var_[
"pileUpCorrected_SumET"] = hsMinusNeutralPUMEt_data.
sumet /
var_[
"particleFlow_SumET"];
206 var_[
"pileUpCorrected_U"] = hsMinusNeutralPUMEt_data.
met;
207 var_[
"pileUpCorrected_UPhi"] = hsMinusNeutralPUMEt_data.
phi;
209 var_[
"jet1_pT"] = jet1P4.pt();
210 var_[
"jet1_eta"] = jet1P4.eta();
211 var_[
"jet1_Phi"] = jet1P4.phi();
212 var_[
"jet2_pT"] = jet2P4.pt();
213 var_[
"jet2_eta"] = jet2P4.eta();
214 var_[
"jet2_Phi"] = jet2P4.phi();
217 var_[
"nJets"] = jets_cleaned.size();
223 std::unique_ptr<float[]> floatVector(
new float[variableNames.size()]);
225 for (
const auto& variableName : variableNames) {
226 floatVector[
i++] =
var_[variableName];
239 var_[
"RecoilCor_UPhi"] =
var_[
"PhiCor_UPhi"];
247 if (
var_[
"track_U"] / sumLeptonPt < 0.1 ||
var_[
"noPileUp_U"] / sumLeptonPt < 0.1) {
257 double U =
var_[
"RecoilCor_U"];
258 double Phi =
var_[
"PhiCor_UPhi"];
265 double metPt =
sqrt(metPx * metPx + metPy * metPy);
266 mvaMEt_.SetCoordinates(metPx, metPy, 0., metPt);
284 stream <<
"<PFMETAlgorithmMVA::print>:" << std::endl;
T getParameter(std::string const &) const
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
unsigned numJetsAboveThreshold(const std::vector< reco::PUSubMETCandInfo > &, double)
double getLeptonsChSumMEX() const
Sin< T >::type sin(const T &t)
reco::Candidate::LorentzVector subleadJetP4(const std::vector< reco::PUSubMETCandInfo > &)
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
static std::string const input
Cos< T >::type cos(const T &t)
double getLeptonsSumMEY() const
Structure containing data common to all types of MET.
void computeAllSums(const std::vector< reco::PUSubMETCandInfo > &jets, const std::vector< reco::PUSubMETCandInfo > &leptons, const std::vector< reco::PUSubMETCandInfo > &pfCandidates)
const std::vector< reco::PUSubMETCandInfo > & getCleanedJets() const
reco::Candidate::LorentzVector leadJetP4(const std::vector< reco::PUSubMETCandInfo > &)
double getLeptonsSumMEX() const
CommonMETData computeRecoil(int metType)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
double getLeptonsChSumMEY() const
double GetResponse(const float *vector) const
Power< A, B >::type pow(const A &a, const B &b)