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++) {
83 LorentzVector j_temp1, j_temp2;
88 if (itemp / j_count == 1) {
89 j_temp1 += jets[
count];
91 j_temp2 += jets[
count];
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()) {
108 LorentzVector
temp = HEM_1;
119 double r = -1,
r2 = -1;
bool getByToken(EDGetToken token, Handle< PROD > &result) const
double CalcMTR(const LorentzVector &j1, const LorentzVector &j2, const pat::MET &met)
void assign(std::string var, double &value) const
edm::EDGetTokenT< std::vector< pat::MET > > metToken_
reco::Candidate::LorentzVector LorentzVector
T const * product() const
double CalcMR(const LorentzVector &ja, const LorentzVector &jb)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
edm::EDGetTokenT< std::vector< pat::Jet > > jetToken_