78 dzCut_ =
cfg.getParameter<
double>(
"dZcut");
79 ptThreshold_ = (
cfg.exists(
"ptThreshold")) ?
cfg.getParameter<
int>(
"ptThreshold") : -1000;
92 if (
jetP4.pt() >= 30.)
117 std::vector<reco::PUSubMETCandInfo> jets_sorted =
jets;
118 std::sort(jets_sorted.rbegin(), jets_sorted.rend());
119 retVal = jets_sorted[
idx].p4();
125 for (std::vector<reco::PUSubMETCandInfo>::const_iterator
jet =
jets.begin();
jet !=
jets.end(); ++
jet) {
132 const std::vector<reco::PUSubMETCandInfo>&
leptons,
135 double dR2match = dRmatch * dRmatch;
136 std::vector<reco::PUSubMETCandInfo> retVal;
137 for (std::vector<reco::PUSubMETCandInfo>::const_iterator
jet =
jets.begin();
jet !=
jets.end(); ++
jet) {
138 bool isOverlap =
false;
139 for (std::vector<reco::PUSubMETCandInfo>::const_iterator lepton =
leptons.begin(); lepton !=
leptons.end();
141 if (
deltaR2(
jet->p4(), lepton->p4()) < dR2match)
145 retVal.push_back(*
jet);
151 const std::vector<reco::PUSubMETCandInfo>&
pfCandidates,
152 const std::vector<reco::PUSubMETCandInfo>&
leptons,
155 double dR2match = dRmatch * dRmatch;
156 std::vector<reco::PUSubMETCandInfo> retVal;
157 for (std::vector<reco::PUSubMETCandInfo>::const_iterator pfCandidate =
pfCandidates.begin();
160 bool isOverlap =
false;
161 for (std::vector<reco::PUSubMETCandInfo>::const_iterator lepton =
leptons.begin(); lepton !=
leptons.end();
163 if (
deltaR2(pfCandidate->p4(), lepton->p4()) < dR2match)
167 retVal.push_back(*pfCandidate);
174 metData.
phi = atan2(metData.
mey, metData.
mex);
182 const std::vector<reco::PUSubMETCandInfo>&
objects) {
188 for (std::vector<reco::PUSubMETCandInfo>::const_iterator
object =
objects.begin();
object !=
objects.end();
201 if (
object->dZ() < 0. && dZflag != 2)
203 if (
object->dZ() > dZmax && dZflag == 0)
205 if (
object->dZ() < dZmax && dZflag == 1)
212 pFrac =
object->chargedEnFrac();
219 if (passesMVAjetId && !mvaPassFlag)
221 if (!passesMVAjetId && mvaPassFlag)
224 pFrac = 1 -
object->chargedEnFrac();
227 retVal.
mex +=
object->p4().px() * pFrac;
228 retVal.
mey +=
object->p4().py() * pFrac;
229 retVal.
sumet +=
object->p4().pt() * pFrac;
283 const std::vector<reco::PUSubMETCandInfo>&
leptons,
284 const std::vector<reco::PUSubMETCandInfo>&
pfCandidates) {