5 #include <TLorentzVector.h>
12 Megajet::Megajet(vector<float> Px_vector,
13 vector<float> Py_vector,
14 vector<float> Pz_vector,
15 vector<float> E_vector,
16 int megajet_association_method)
17 : Object_Px(Px_vector),
21 megajet_meth(megajet_association_method),
24 cout <<
"Error in Megajet: you should provide at least two jets to form Megajets" << endl;
25 for (
int j = 0;
j < (
int)
jIN.size(); ++
j) {
32 Megajet::Megajet(vector<float> Px_vector, vector<float> Py_vector, vector<float> Pz_vector, vector<float> E_vector)
33 : Object_Px(Px_vector), Object_Py(Py_vector), Object_Pz(Pz_vector), Object_E(E_vector),
status(0) {
35 cout <<
"Error in Megajet: you should provide at least two jets to form Megajets" << endl;
36 for (
int j = 0;
j < (
int)
jIN.size(); ++
j) {
89 int N_JETS = (
int)
jIN.size();
92 for (
int i = 0;
i < N_JETS;
i++) {
104 for (
int j = 0;
j < 5; ++
j) {
110 for (
int i = 1;
i < N_comb - 1;
i++) {
111 TLorentzVector j_temp1, j_temp2;
113 j_count = N_comb / 2;
115 while (j_count > 0) {
116 if (itemp / j_count == 1) {
121 itemp -= j_count * (itemp / j_count);
126 j1.push_back(j_temp1);
127 j2.push_back(j_temp2);
134 TLorentzVector myJ1 = TLorentzVector(0, 0, 0, 0);
135 TLorentzVector myJ2 = TLorentzVector(0, 0, 0, 0);
136 for (
int i = 0;
i < (
int)
j1.size();
i++) {
137 double M_temp =
j1[
i].M2() +
j2[
i].M2();
138 if (M_min < 0 || M_temp < M_min) {
148 if (myJ1.Pt() > myJ2.Pt()) {
149 jOUT.push_back(myJ1);
150 jOUT.push_back(myJ2);
152 jOUT.push_back(myJ2);
153 jOUT.push_back(myJ1);
161 TLorentzVector myJ1 = TLorentzVector(0, 0, 0, 0);
162 TLorentzVector myJ2 = TLorentzVector(0, 0, 0, 0);
163 for (
int i = 0;
i < (
int)
j1.size();
i++) {
164 double M_temp =
j1[
i].M2() /
j1[
i].E() +
j2[
i].M2() /
j2[
i].E();
165 if (M_min < 0 || M_temp < M_min) {
176 if (myJ1.Pt() > myJ2.Pt()) {
177 jOUT.push_back(myJ1);
178 jOUT.push_back(myJ2);
180 jOUT.push_back(myJ2);
181 jOUT.push_back(myJ1);
187 double M_max = -10000;
189 TLorentzVector myJ1 = TLorentzVector(0, 0, 0, 0);
190 TLorentzVector myJ2 = TLorentzVector(0, 0, 0, 0);
191 for (
int i = 0;
i < (
int)
j1.size();
i++) {
193 double M_temp = (
j1[
i].E() - myBeta *
j1[
i].M2() /
j1[
i].E()) + (
j2[
i].E() - myBeta *
j2[
i].M2() /
j2[
i].E());
194 if (M_max < -9999 || M_temp > M_max) {
205 if (myJ1.Pt() > myJ2.Pt()) {
206 jOUT.push_back(myJ1);
207 jOUT.push_back(myJ2);
209 jOUT.push_back(myJ2);
210 jOUT.push_back(myJ1);
216 double dHT_min = 999999999999999.0;
218 TLorentzVector myJ1 = TLorentzVector(0, 0, 0, 0);
219 TLorentzVector myJ2 = TLorentzVector(0, 0, 0, 0);
220 for (
int i = 0;
i < (
int)
j1.size();
i++) {
221 double dHT_temp = fabs(
j1[
i].E() -
j2[
i].E());
222 if (dHT_temp < dHT_min) {
230 if (myJ1.Pt() > myJ2.Pt()) {
231 jOUT.push_back(myJ1);
232 jOUT.push_back(myJ2);
234 jOUT.push_back(myJ2);
235 jOUT.push_back(myJ1);