2 #include "TLorentzVector.h"
33 double temp =
sqrt((
A +
B) * (
A +
B) - (az + bz) * (az + bz));
38 double temp =
met.et() * (j1.Pt() + j2.Pt()) -
met.px() * (j1.X() + j2.X()) -
met.py() * (j1.Y() + j2.Y());
57 std::vector<LorentzVector>
jets;
58 jets.reserve(
jetH.product()->size());
59 for (std::vector<pat::Jet>::const_iterator jetit =
jetH.product()->begin(); jetit !=
jetH.product()->end(); ++jetit) {
60 if (jetit->et() >
pt_ && fabs(jetit->eta()) <
eta_) {
61 jets.push_back(jetit->p4());
67 HEM_1.SetPxPyPzE(0.0, 0.0, 0.0, 0.0);
68 HEM_2.SetPxPyPzE(0.0, 0.0, 0.0, 0.0);
70 if (
jets.size() < 2) {
72 unsigned int N_comb = 1;
73 for (
unsigned int i = 0;
i <
jets.size();
i++) {
79 double M_min = 9999999999.0;
82 for (
unsigned int i = 1;
i < N_comb - 1;
i++) {
88 if (itemp / j_count == 1) {
93 itemp -= j_count * (itemp / j_count);
98 M_temp = j_temp1.M2() + j_temp2.M2();
100 if (M_temp < M_min) {
107 if (HEM_2.Pt() > HEM_1.Pt()) {
119 double r = -1,
r2 = -1;