50 tmassTopQuark_ =
sqrt(
pow((metT + lepT + bT), 2) - (topT.px() * topT.px()) - (topT.py() * topT.py()));
64 std::vector<int> maxPtIndices;
65 maxPtIndices.push_back(-1);
66 maxPtIndices.push_back(-1);
67 maxPtIndices.push_back(-1);
72 for (
int kdx = 0; kdx <
maxNJets_; ++kdx) {
73 if (kdx ==
idx || kdx == jdx)
79 maxPtIndices.push_back(
idx);
80 maxPtIndices.push_back(jdx);
81 maxPtIndices.push_back(kdx);
91 std::vector<int> wMassIndices;
92 wMassIndices.push_back(-1);
93 wMassIndices.push_back(-1);
94 for (
unsigned idx = 0;
idx < maxPtIndices.size(); ++
idx) {
95 for (
unsigned jdx = 0; jdx < maxPtIndices.size(); ++jdx) {
96 if (jdx ==
idx || maxPtIndices[
idx] > maxPtIndices[jdx])
99 if (wDist < 0. || wDist > fabs(sum.mass() -
wMass_)) {
100 wDist = fabs(sum.mass() -
wMass_);
101 wMassIndices.clear();
102 wMassIndices.push_back(maxPtIndices[
idx]);
103 wMassIndices.push_back(maxPtIndices[jdx]);
117 if (
jets.size() != bjet.size()) {
124 std::vector<int> maxBPtIndices;
125 maxBPtIndices.push_back(-1);
126 maxBPtIndices.push_back(-1);
127 maxBPtIndices.push_back(-1);
131 for (
int kdx = 0; kdx <
maxNJets_; ++kdx) {
132 if (kdx ==
idx || kdx == jdx)
135 if ((bjet[
idx] > btagWP && bjet[jdx] <= btagWP && bjet[kdx] <= btagWP) ||
136 (bjet[
idx] <= btagWP && bjet[jdx] > btagWP && bjet[kdx] <= btagWP) ||
137 (bjet[
idx] <= btagWP && bjet[jdx] <= btagWP && bjet[kdx] > btagWP)) {
139 if (maxBPt < 0. || maxBPt < sum.pt()) {
141 maxBPtIndices.clear();
142 maxBPtIndices.push_back(
idx);
143 maxBPtIndices.push_back(jdx);
144 maxBPtIndices.push_back(kdx);
150 if (maxBPtIndices[0] < 0 || maxBPtIndices[1] < 0 || maxBPtIndices[2] < 0)
163 tmassTopQuark_(-1) {}
178 std::vector<double> VbtagWP,
216 tmassTopQuark_ =
sqrt(
pow((metT + lepT + bT), 2) - (topT.px() * topT.px()) - (topT.py() * topT.py()));
226 tmassTopQuark_ =
sqrt(
pow((metT + lepT + bT), 2) - (topT.px() * topT.px()) - (topT.py() * topT.py()));
240 std::vector<int> maxPtIndices;
241 maxPtIndices.push_back(-1);
242 maxPtIndices.push_back(-1);
243 maxPtIndices.push_back(-1);
248 for (
int kdx = 0; kdx <
maxNJets_; ++kdx) {
249 if (kdx ==
idx || kdx == jdx)
254 maxPtIndices.clear();
255 maxPtIndices.push_back(
idx);
256 maxPtIndices.push_back(jdx);
257 maxPtIndices.push_back(kdx);
267 std::vector<int> wMassIndices;
268 wMassIndices.push_back(-1);
269 wMassIndices.push_back(-1);
270 for (
unsigned idx = 0;
idx < maxPtIndices.size(); ++
idx) {
271 for (
unsigned jdx = 0; jdx < maxPtIndices.size(); ++jdx) {
272 if (jdx ==
idx || maxPtIndices[
idx] > maxPtIndices[jdx])
275 if (wDist < 0. || wDist > fabs(sum.mass() -
wMass_)) {
276 wDist = fabs(sum.mass() -
wMass_);
277 wMassIndices.clear();
278 wMassIndices.push_back(maxPtIndices[
idx]);
279 wMassIndices.push_back(maxPtIndices[jdx]);
295 if (
jets.size() != bjet.size()) {
302 std::vector<int> maxBPtIndices;
303 maxBPtIndices.push_back(-1);
304 maxBPtIndices.push_back(-1);
305 maxBPtIndices.push_back(-1);
309 for (
int kdx = 0; kdx <
maxNJets_; ++kdx) {
310 if (kdx ==
idx || kdx == jdx)
313 if ((bjet[
idx] > btagWP && bjet[jdx] <= btagWP && bjet[kdx] <= btagWP) ||
314 (bjet[
idx] <= btagWP && bjet[jdx] > btagWP && bjet[kdx] <= btagWP) ||
315 (bjet[
idx] <= btagWP && bjet[jdx] <= btagWP && bjet[kdx] > btagWP)) {
317 if (maxBPt < 0. || maxBPt < sum.pt()) {
319 maxBPtIndices.clear();
320 maxBPtIndices.push_back(
idx);
321 maxBPtIndices.push_back(jdx);
322 maxBPtIndices.push_back(kdx);
328 if (maxBPtIndices[0] < 0 || maxBPtIndices[1] < 0 || maxBPtIndices[2] < 0)