23 m_isWorkingPoint(false),
24 m_transferFunctionsPathPrefix(
"SetMe"),
25 m_transferFunctionsPath(
"SetMe"),
26 m_selectionName(
"SetMe"),
27 m_leptonType(
"SetMe"),
28 m_customParameters(
"SetMe"),
43 return StatusCode::FAILURE;
48 std::vector<std::string> custom_tokens;
50 std::string temp_option =
"";
62 m_myFitter = std::unique_ptr<KLFitter::Fitter>(
new KLFitter::Fitter {});
66 m_myDetector = std::make_unique<KLFitter::DetectorAtlas_8TeV>(transferFunctionAbsPath);
70 m_myDetector.get()),
"KLFitterTool::initialize() ERROR setting detector to fitter");
73 m_myLikelihood = std::make_unique<KLFitter::LikelihoodTopLeptonJets>();
96 if (
m_LHType !=
"ttbar_AllHadronic") {
113 ATH_MSG_ERROR(
" LeptonType kTriElectron is only defined for the ttZTrilepton likelihood");
114 return StatusCode::FAILURE;
123 ATH_MSG_ERROR(
" LeptonType kTriMuon is only defined for the ttZTrilepton likelihood");
124 return StatusCode::FAILURE;
132 ATH_MSG_ERROR(
" Please supply a valid LeptonType : kElectron or kMuon");
133 return StatusCode::FAILURE;
178 "Please supply a valid JetSelectionMode : kLeadingFour , kLeadingFive , kLeadingSix , kLeadingSeven , kLeadingEight , kBtagPriorityFourJets , kBtagPriorityFiveJets , kBtagPrioritySixJets , kBtagPrioritySevenJets , kBtagPriorityEightJets");
179 return StatusCode::FAILURE;
190 "You want to run the ttH or ttbar_AllHadronic Likelihood, you need to use either : kLeadingSix , kBtagPrioritySixJets , kLeadingSeven , kBtagPrioritySevenJets , kLeadingEight , kBtagPriorityEightJets");
191 return StatusCode::FAILURE;
196 std::string BTaggingMethod =
"";
197 if (
findOption(custom_tokens,
"KLFitterBTaggingMethod", temp_option)) BTaggingMethod = temp_option;
198 else BTaggingMethod =
m_config->KLFitterBTaggingMethod();
201 else if (BTaggingMethod ==
203 else if (BTaggingMethod ==
205 KLFitter::LikelihoodBase::BtaggingMethod::kVetoNoFitLight;
206 else if (BTaggingMethod ==
208 else if (BTaggingMethod ==
210 KLFitter::LikelihoodBase::BtaggingMethod::kVetoHybridNoFit;
211 else if (BTaggingMethod ==
"kWorkingPoint") {
214 }
else if (BTaggingMethod ==
216 else if (BTaggingMethod ==
218 else if (BTaggingMethod ==
222 "Please supply a valid BTaggingMethod : kNotag,kVetoNoFit,kVetoNoFitLight,kVetoNoFitBoth,kVetoHybridNoFit,kWorkingPoint,kVeto,kVetoLight or kVetoBoth");
223 return StatusCode::FAILURE;
241 bool FixTopMass =
true;
242 if (
findOption(custom_tokens,
"KLFitterTopMassFixed", temp_option)) {
243 if (temp_option.compare(
"True") == 0) FixTopMass =
true;
244 else if (temp_option.compare(
"False") == 0) FixTopMass =
false;
246 ATH_MSG_ERROR(
"Invalid KLFitterTopMassFixed custom option! Exiting.");
247 return StatusCode::FAILURE;
249 }
else FixTopMass =
m_config->KLFitterTopMassFixed();
262 "KLFitterTool::initialize() ERROR setting likelihood for KLFitter");
265 "KLFitterTool::initialize() ERROR setting likelihood for KLFitter");
268 "KLFitterTool::initialize() ERROR setting likelihood for KLFitter");
271 "KLFitterTool::initialize() ERROR setting likelihood for KLFitter");
279 m_myLikelihood_TTZ.get()),
"KLFitterTool::initialize() ERROR setting likelihood for KLFitter");
280 }
else if (
m_LHType ==
"ttZTrilepton") {
282 m_myLikelihood.get()),
"KLFitterTool::initialize() ERROR setting likelihood for KLFitter");
283 }
else if (
m_LHType ==
"ttbar_AllHadronic") {
286 "KLFitterTool::initialize() ERROR setting likelihood for KLFitter");
287 }
else if (
m_LHType ==
"ttbar_BoostedLJets") {
290 "KLFitterTool::initialize() ERROR setting likelihood for KLFitter");
292 ATH_MSG_ERROR(
"KLFitter: This likelihood is not defined...");
293 return StatusCode::FAILURE;
298 std::string btagWP =
"";
299 if (
findOption(custom_tokens,
"KLFitterBTaggingWP", temp_option)) btagWP = temp_option;
301 if (
m_config->bTagWP().size() != 1) {
304 " b-tagging WP - cannot pick b-jets. Please select only 1 WP or specify the desired one in your selection!");
305 return StatusCode::FAILURE;
309 if (btagWP.find(
"Continuous") != std::string::npos) {
311 "KLFitter is not able to run with (pseudo)continuous b-tagging! Please specify a different WP either in your configuration file or in your selection!");
312 return StatusCode::FAILURE;
324 ATH_MSG_INFO(
" Using transfer functions with full path " << transferFunctionAbsPath);
327 ATH_MSG_INFO(
" Using BTaggingMethod \t" << BTaggingMethod);
331 else ATH_MSG_INFO(
" Saving only the permutation with the highest event probability");
335 return StatusCode::SUCCESS;
341 for (
unsigned int t = 0;
t < full_options.size(); ++
t) {
342 if (full_options.at(
t).compare(
"") == 0)
continue;
344 ":") != std::string::npos),
345 "KLFitterTool::findOption Error! You specified an invalid option: " + full_options.at(
346 t) +
". Expected format is A:a B:b C:c...");
347 std::string
key = full_options.at(
t).substr(0, full_options.at(
t).find(
":"));
348 std::string
value = full_options.at(
t).substr(full_options.at(
t).find(
":") + 1);
349 if (
key.compare(option) == 0) {
388 el.SetPtEtaPhiE(
event.m_electrons.at(0)->pt() / 1.e3,
event.m_electrons.at(0)->eta(),
event.m_electrons.at(
389 0)->phi(),
event.m_electrons.at(0)->e() / 1.e3);
394 mu.SetPtEtaPhiE(
event.m_muons.at(0)->pt() / 1.e3,
event.m_muons.at(0)->eta(),
event.m_muons.at(
395 0)->phi(),
event.m_muons.at(0)->e() / 1.e3);
402 el.SetPtEtaPhiE(
event.m_electrons.at(0)->pt() / 1.e3,
event.m_electrons.at(0)->eta(),
event.m_electrons.at(
403 0)->phi(),
event.m_electrons.at(0)->e() / 1.e3);
408 mu.SetPtEtaPhiE(
event.m_muons.at(0)->pt() / 1.e3,
event.m_muons.at(0)->eta(),
event.m_muons.at(
409 0)->phi(),
event.m_muons.at(0)->e() / 1.e3);
413 if (
m_LHType ==
"ttbar_JetAngles") {
416 el.SetPtEtaPhiE(
event.m_electrons.at(0)->pt() / 1.e3,
event.m_electrons.at(0)->eta(),
event.m_electrons.at(
417 0)->phi(),
event.m_electrons.at(0)->e() / 1.e3);
422 mu.SetPtEtaPhiE(
event.m_muons.at(0)->pt() / 1.e3,
event.m_muons.at(0)->eta(),
event.m_muons.at(
423 0)->phi(),
event.m_muons.at(0)->e() / 1.e3);
430 el.SetPtEtaPhiE(
event.m_electrons.at(0)->pt() / 1.e3,
event.m_electrons.at(0)->eta(),
event.m_electrons.at(
431 0)->phi(),
event.m_electrons.at(0)->e() / 1.e3);
436 mu.SetPtEtaPhiE(
event.m_muons.at(0)->pt() / 1.e3,
event.m_muons.at(0)->eta(),
event.m_muons.at(
437 0)->phi(),
event.m_muons.at(0)->e() / 1.e3);
445 if (
event.m_electrons.size() < 3) {
446 ATH_MSG_ERROR(
"KLFitter: kTriElectron requires three electrons...");
447 return StatusCode::FAILURE;
450 for (
unsigned int i = 0;
i < 3; ++
i) {
451 const auto&
electron =
event.m_electrons.at(
i);
458 el.SetPtEtaPhiE(
event.m_electrons.at(0)->pt() / 1.e3,
event.m_electrons.at(0)->eta(),
event.m_electrons.at(
459 0)->phi(),
event.m_electrons.at(0)->e() / 1.e3);
460 myParticles->AddParticle(&
el,
event.m_electrons.at(0)->caloCluster()->etaBE(2),
468 if (
event.m_muons.size() < 3) {
470 return StatusCode::FAILURE;
473 for (
unsigned int i = 0;
i < 3; ++
i) {
474 const auto&
muon =
event.m_muons.at(
i);
481 mu.SetPtEtaPhiE(
event.m_muons.at(0)->pt() / 1.e3,
event.m_muons.at(0)->eta(),
event.m_muons.at(
482 0)->phi(),
event.m_muons.at(0)->e() / 1.e3);
487 if (
m_LHType ==
"ttbar_BoostedLJets") {
490 el.SetPtEtaPhiE(
event.m_electrons.at(0)->pt() / 1.e3,
event.m_electrons.at(0)->eta(),
event.m_electrons.at(
491 0)->phi(),
event.m_electrons.at(0)->e() / 1.e3);
496 mu.SetPtEtaPhiE(
event.m_muons.at(0)->pt() / 1.e3,
event.m_muons.at(0)->eta(),
event.m_muons.at(
497 0)->phi(),
event.m_muons.at(0)->e() / 1.e3);
505 "KLFitterTool::execute: error at event " <<
event.m_info->eventNumber() <<
506 ". It was not possible to properly fill the jets. Are you trying to use a KLeadingX Jet Selection mode with a signal region with less than X jets? Please check your configuration!");
507 return StatusCode::FAILURE;
512 ATH_MSG_ERROR(
"KLFitter: Error adding particles to fitter...");
513 return StatusCode::FAILURE;
517 const double met_ex =
event.m_met->mpx() / 1.e3;
518 const double met_ey =
event.m_met->mpy() / 1.e3;
519 const double met_sumet =
event.m_met->sumet() / 1.e3;
521 if (!
m_myFitter->SetET_miss_XY_SumET(met_ex, met_ey, met_sumet)) {
523 return StatusCode::FAILURE;
526 std::string outputSGKey(
"SetMe");
527 if (!
event.m_isLoose) {
530 if (
event.m_isLoose) {
531 outputSGKey =
m_config->sgKeyKLFitterLoose(
event.m_hashValue);
533 std::string outputSGKeyAux = outputSGKey +
"Aux.";
537 if ((!
m_config->KLFitterSaveAllPermutations()) ||
538 ((
m_config->KLFitterSaveAllPermutations()) &&
539 (!
evtStore()->tds()->contains<xAOD::KLFitterResultContainer>(outputSGKey)))) {
542 resultContainer->setStore(resultAuxContainer);
545 "KLFitterTools::execute(): can not retrieve xAOD::KLFitterResultContainer from evtStore()");
548 const int nperm =
m_myFitter->Permutations()->NPermutations();
549 for (
int iperm = 0; iperm < nperm; ++iperm) {
557 std::hash<std::string> hash_string;
560 unsigned int ConvergenceStatusBitWord =
m_myFitter->ConvergenceStatus();
561 bool MinuitDidNotConverge = (ConvergenceStatusBitWord &
m_myFitter->MinuitDidNotConvergeMask) != 0;
562 bool FitAbortedDueToNaN = (ConvergenceStatusBitWord &
m_myFitter->FitAbortedDueToNaNMask) != 0;
563 bool AtLeastOneFitParameterAtItsLimit =
564 (ConvergenceStatusBitWord &
m_myFitter->AtLeastOneFitParameterAtItsLimitMask) != 0;
565 bool InvalidTransferFunctionAtConvergence =
566 (ConvergenceStatusBitWord &
m_myFitter->InvalidTransferFunctionAtConvergenceMask) != 0;
568 result->setMinuitDidNotConverge(((MinuitDidNotConverge) ? 1 : 0));
569 result->setFitAbortedDueToNaN(((FitAbortedDueToNaN) ? 1 : 0));
570 result->setAtLeastOneFitParameterAtItsLimit(((AtLeastOneFitParameterAtItsLimit) ? 1 : 0));
571 result->setInvalidTransferFunctionAtConvergence(((InvalidTransferFunctionAtConvergence) ? 1 : 0));
576 result->setParameterErrors(
m_myFitter->Likelihood()->GetBestFitParameterErrors());
584 result->setModel_bhad_pt(myModelParticles->Parton(0)->Pt());
585 result->setModel_bhad_eta(myModelParticles->Parton(0)->Eta());
586 result->setModel_bhad_phi(myModelParticles->Parton(0)->Phi());
587 result->setModel_bhad_E(myModelParticles->Parton(0)->E());
588 result->setModel_bhad_jetIndex((*myPermutedParticles)->JetIndex(0));
590 result->setModel_blep_pt(myModelParticles->Parton(1)->Pt());
591 result->setModel_blep_eta(myModelParticles->Parton(1)->Eta());
592 result->setModel_blep_phi(myModelParticles->Parton(1)->Phi());
593 result->setModel_blep_E(myModelParticles->Parton(1)->E());
594 result->setModel_blep_jetIndex((*myPermutedParticles)->JetIndex(1));
596 result->setModel_lq1_pt(myModelParticles->Parton(2)->Pt());
597 result->setModel_lq1_eta(myModelParticles->Parton(2)->Eta());
598 result->setModel_lq1_phi(myModelParticles->Parton(2)->Phi());
599 result->setModel_lq1_E(myModelParticles->Parton(2)->E());
600 result->setModel_lq1_jetIndex((*myPermutedParticles)->JetIndex(2));
603 if (
m_LHType !=
"ttbar_BoostedLJets") {
604 result->setModel_lq2_pt(myModelParticles->Parton(3)->Pt());
605 result->setModel_lq2_eta(myModelParticles->Parton(3)->Eta());
606 result->setModel_lq2_phi(myModelParticles->Parton(3)->Phi());
607 result->setModel_lq2_E(myModelParticles->Parton(3)->E());
608 result->setModel_lq2_jetIndex((*myPermutedParticles)->JetIndex(3));
611 result->setModel_Higgs_b1_pt(myModelParticles->Parton(4)->Pt());
612 result->setModel_Higgs_b1_eta(myModelParticles->Parton(4)->Eta());
613 result->setModel_Higgs_b1_phi(myModelParticles->Parton(4)->Phi());
614 result->setModel_Higgs_b1_E(myModelParticles->Parton(4)->E());
615 result->setModel_Higgs_b1_jetIndex((*myPermutedParticles)->JetIndex(4));
617 result->setModel_Higgs_b2_pt(myModelParticles->Parton(5)->Pt());
618 result->setModel_Higgs_b2_eta(myModelParticles->Parton(5)->Eta());
619 result->setModel_Higgs_b2_phi(myModelParticles->Parton(5)->Phi());
620 result->setModel_Higgs_b2_E(myModelParticles->Parton(5)->E());
621 result->setModel_Higgs_b2_jetIndex((*myPermutedParticles)->JetIndex(5));
631 result->setModel_lep_pt(myModelParticles->Electron(0)->Pt());
632 result->setModel_lep_eta(myModelParticles->Electron(0)->Eta());
633 result->setModel_lep_phi(myModelParticles->Electron(0)->Phi());
634 result->setModel_lep_E(myModelParticles->Electron(0)->E());
637 result->setModel_lep_index((*myPermutedParticles)->ElectronIndex(0));
639 result->setModel_lepZ1_pt(myModelParticles->Electron(1)->Pt());
640 result->setModel_lepZ1_eta(myModelParticles->Electron(1)->Eta());
641 result->setModel_lepZ1_phi(myModelParticles->Electron(1)->Phi());
642 result->setModel_lepZ1_E(myModelParticles->Electron(1)->E());
643 result->setModel_lepZ1_index((*myPermutedParticles)->ElectronIndex(1));
645 result->setModel_lepZ2_pt(myModelParticles->Electron(2)->Pt());
646 result->setModel_lepZ2_eta(myModelParticles->Electron(2)->Eta());
647 result->setModel_lepZ2_phi(myModelParticles->Electron(2)->Phi());
648 result->setModel_lepZ2_E(myModelParticles->Electron(2)->E());
649 result->setModel_lepZ2_index((*myPermutedParticles)->ElectronIndex(2));
659 result->setModel_lep_pt(myModelParticles->Muon(0)->Pt());
660 result->setModel_lep_eta(myModelParticles->Muon(0)->Eta());
661 result->setModel_lep_phi(myModelParticles->Muon(0)->Phi());
662 result->setModel_lep_E(myModelParticles->Muon(0)->E());
665 result->setModel_lep_index((*myPermutedParticles)->MuonIndex(0));
667 result->setModel_lepZ1_pt(myModelParticles->Muon(1)->Pt());
668 result->setModel_lepZ1_eta(myModelParticles->Muon(1)->Eta());
669 result->setModel_lepZ1_phi(myModelParticles->Muon(1)->Phi());
670 result->setModel_lepZ1_E(myModelParticles->Muon(1)->E());
671 result->setModel_lepZ1_index((*myPermutedParticles)->MuonIndex(1));
673 result->setModel_lepZ2_pt(myModelParticles->Muon(2)->Pt());
674 result->setModel_lepZ2_eta(myModelParticles->Muon(2)->Eta());
675 result->setModel_lepZ2_phi(myModelParticles->Muon(2)->Phi());
676 result->setModel_lepZ2_E(myModelParticles->Muon(2)->E());
677 result->setModel_lepZ2_index((*myPermutedParticles)->MuonIndex(2));
681 result->setModel_nu_pt(myModelParticles->Neutrino(0)->Pt());
682 result->setModel_nu_eta(myModelParticles->Neutrino(0)->Eta());
683 result->setModel_nu_phi(myModelParticles->Neutrino(0)->Phi());
684 result->setModel_nu_E(myModelParticles->Neutrino(0)->E());
685 }
else if (
m_LHType ==
"ttbar_AllHadronic") {
686 result->setModel_b_from_top1_pt(myModelParticles->Parton(0)->Pt());
687 result->setModel_b_from_top1_eta(myModelParticles->Parton(0)->Eta());
688 result->setModel_b_from_top1_phi(myModelParticles->Parton(0)->Phi());
689 result->setModel_b_from_top1_E(myModelParticles->Parton(0)->E());
690 result->setModel_b_from_top1_jetIndex((*myPermutedParticles)->JetIndex(0));
692 result->setModel_b_from_top2_pt(myModelParticles->Parton(1)->Pt());
693 result->setModel_b_from_top2_eta(myModelParticles->Parton(1)->Eta());
694 result->setModel_b_from_top2_phi(myModelParticles->Parton(1)->Phi());
695 result->setModel_b_from_top2_E(myModelParticles->Parton(1)->E());
696 result->setModel_b_from_top2_jetIndex((*myPermutedParticles)->JetIndex(1));
698 result->setModel_lj1_from_top1_pt(myModelParticles->Parton(2)->Pt());
699 result->setModel_lj1_from_top1_eta(myModelParticles->Parton(2)->Eta());
700 result->setModel_lj1_from_top1_phi(myModelParticles->Parton(2)->Phi());
701 result->setModel_lj1_from_top1_E(myModelParticles->Parton(2)->E());
702 result->setModel_lj1_from_top1_jetIndex((*myPermutedParticles)->JetIndex(2));
704 result->setModel_lj2_from_top1_pt(myModelParticles->Parton(3)->Pt());
705 result->setModel_lj2_from_top1_eta(myModelParticles->Parton(3)->Eta());
706 result->setModel_lj2_from_top1_phi(myModelParticles->Parton(3)->Phi());
707 result->setModel_lj2_from_top1_E(myModelParticles->Parton(3)->E());
708 result->setModel_lj2_from_top1_jetIndex((*myPermutedParticles)->JetIndex(3));
710 result->setModel_lj1_from_top2_pt(myModelParticles->Parton(4)->Pt());
711 result->setModel_lj1_from_top2_eta(myModelParticles->Parton(4)->Eta());
712 result->setModel_lj1_from_top2_phi(myModelParticles->Parton(4)->Phi());
713 result->setModel_lj1_from_top2_E(myModelParticles->Parton(4)->E());
714 result->setModel_lj1_from_top2_jetIndex((*myPermutedParticles)->JetIndex(4));
716 result->setModel_lj2_from_top2_pt(myModelParticles->Parton(5)->Pt());
717 result->setModel_lj2_from_top2_eta(myModelParticles->Parton(5)->Eta());
718 result->setModel_lj2_from_top2_phi(myModelParticles->Parton(5)->Phi());
719 result->setModel_lj2_from_top2_E(myModelParticles->Parton(5)->E());
720 result->setModel_lj2_from_top2_jetIndex((*myPermutedParticles)->JetIndex(5));
726 float sumEventProbability(0.), bestEventProbability(0.);
727 unsigned int bestPermutation(999), iPerm(0);
730 for (
auto x : *resultContainer) {
731 float prob =
x->eventProbability();
732 short minuitDidNotConverge =
x->minuitDidNotConverge();
733 short fitAbortedDueToNaN =
x->fitAbortedDueToNaN();
734 short atLeastOneFitParameterAtItsLimit =
x->atLeastOneFitParameterAtItsLimit();
736 sumEventProbability +=
prob;
740 if (minuitDidNotConverge)
continue;
741 if (fitAbortedDueToNaN)
continue;
742 if (atLeastOneFitParameterAtItsLimit)
continue;
745 if (
prob > bestEventProbability) {
746 bestEventProbability =
prob;
748 bestPermutation = iPerm - 1;
754 for (
auto x : *resultContainer) {
755 x->setEventProbability(
x->eventProbability() / sumEventProbability);
756 if (iPerm == bestPermutation) {
757 x->setBestPermutation(1);
759 x->setBestPermutation(0);
769 if (
m_config->KLFitterSaveAllPermutations()) {
770 if (!
evtStore()->tds()->contains<xAOD::KLFitterResultContainer>(outputSGKey)) {
773 "KLFitterTools: ERROR! Was not able to write KLFitterResultContainer");
776 "KLFitterTools: ERROR! Was not able to write KLFitterResultAuxContainer");
784 if (!
evtStore()->tds()->contains<xAOD::KLFitterResultContainer>(outputSGKey)) {
787 bestContainer->setStore(bestAuxContainer);
790 "KLFitterTools::execute(): can not retrieve xAOD::KLFitterResultContainer from evtStore()");
792 for (
auto x : *resultContainer) {
793 if (
x->bestPermutation() == 1) {
799 if (!
evtStore()->tds()->contains<xAOD::KLFitterResultContainer>(outputSGKey)) {
802 "KLFitterTools: ERROR! Was not able to write KLFitterResultContainer with best permutation");
805 "KLFitterTools: ERROR! Was not able to write KLFitterResultAuxContainer with best permutation");
811 delete resultContainer;
812 delete resultAuxContainer;
817 "Failed to add KLFitterResults to top::Event");
822 return StatusCode::SUCCESS;
828 for (
const std::string& tagWP :
m_config->bTagWP()) {
829 if (tagWP.find(
"Continuous") != std::string::npos)
continue;
830 if (!
jet.isAvailable<
char>(
"isbtagged_" + tagWP)) {
831 ATH_MSG_ERROR(
"Failed to retrieve jet decoration isbtagged_" + tagWP);
834 return jet.auxdataConst<
char>(
"isbtagged_" + tagWP);
841 *inefficiency = 1. / 125.93;
845 jets.setStore(&jetsAux);
847 jets.push_back(jet_copy);
851 jet_copy->
setAttribute(
"HadronConeExclTruthLabelID", 5);
853 "Could not retrieve tagging efficiency for b-jet");
855 jet_copy->
setAttribute(
"HadronConeExclTruthLabelID", 0);
857 "Could not retrieve tagging efficiency for light jet");
937 const unsigned int njets) {
938 unsigned int index(0);
941 if (
m_config->KLFitterFailOnLessThanXJets()) {
942 if (
event.m_jets.size() < njets) {
944 "KLFitterTool::setJetskLeadingX: You required " << njets <<
" jets. Event has " <<
event.m_jets.size() <<
949 for (
const auto *
jet :
event.m_jets) {
950 if (
index > njets - 1)
break;
952 TLorentzVector jet_p4;
953 jet_p4.SetPtEtaPhiE(
jet->pt() / 1.e3,
jet->eta(),
jet->phi(),
jet->e() / 1.e3);
956 float eff(0), ineff(0);
963 inputParticles->AddParticle(&jet_p4, jet_p4.Eta(), KLFitter::Particles::kParton,
"",
index,
964 isTagged,
eff, 1. / ineff, KLFitter::Particles::kNone,
weight);
966 inputParticles->AddParticle(&jet_p4, jet_p4.Eta(), KLFitter::Particles::kParton,
"",
index, isTagged);
998 const unsigned int maxJets) {
1003 if (
m_config->KLFitterFailOnLessThanXJets()) {
1004 if (
event.m_jets.size() < maxJets) {
1006 "KLFitterTool::setJetskBtagPriority: You required " << maxJets <<
" jets. Event has " <<
event.m_jets.size() <<
1012 unsigned int totalJets(0);
1015 unsigned int index(0);
1017 for (
const auto *
jet :
event.m_jets) {
1018 if (totalJets >= maxJets)
break;
1020 TLorentzVector jet_p4;
1021 jet_p4.SetPtEtaPhiE(
jet->pt() / 1.e3,
jet->eta(),
jet->phi(),
jet->e() / 1.e3);
1024 float eff(0), ineff(0);
1027 inputParticles->AddParticle(&jet_p4, jet_p4.Eta(), KLFitter::Particles::kParton,
"",
index,
1028 true,
eff, 1. / ineff, KLFitter::Particles::kNone,
weight);
1030 inputParticles->AddParticle(&jet_p4, jet_p4.Eta(), KLFitter::Particles::kParton,
"",
index,
1042 for (
const auto *
jet :
event.m_jets) {
1043 if (totalJets >= maxJets)
break;
1045 TLorentzVector jet_p4;
1046 jet_p4.SetPtEtaPhiE(
jet->pt() / 1.e3,
jet->eta(),
jet->phi(),
jet->e() / 1.e3);
1049 float eff(0), ineff(0);
1052 inputParticles->AddParticle(&jet_p4, jet_p4.Eta(), KLFitter::Particles::kParton,
"",
index,
1053 false,
eff, 1. / ineff, KLFitter::Particles::kNone,
weight);
1055 inputParticles->AddParticle(&jet_p4, jet_p4.Eta(), KLFitter::Particles::kParton,
"",
index,
1069 return StatusCode::SUCCESS;