std::vector<Jet> MuXboostedBTagging::CoreCandidates(std::vector<Lepton> const &muons, Jet const &jet) const { INFO0; auto recluster_input = muons; for (auto const &consituent : jet.Constituents()) { if (consituent.Info().ContainsDetectorPart(DetectorPart::tower) && consituent.Pt() < min_tower_pt_ratio_ * jet.Pt()) continue; // Don't use recluster_input.emplace_back(consituent); } // Recluster the jet, to find core candidates auto cluster_sequence = boca::ClusterSequence {recluster_input, fastjet::JetDefinition(fastjet::antikt_algorithm, core_jet_radius / rad, &Settings::Recombiner())}; // Get the core candidates (NOT sorted by pT until we remove muons) auto core_candidates = cluster_sequence.InclusiveJets(); if (core_candidates.empty()) return core_candidates; cluster_sequence.NoLongerNeeded(); // If a taggable muon is inside a core candidate, remove the muon p4 for (auto const &muon : muons) for (auto &core_candidate : core_candidates) if (muon.DeltaRTo(core_candidate) < core_jet_radius) { core_candidate -= muon; break; } // Sort the core candidates by pT (highest to lowest) core_candidates = SortedByPt(core_candidates); return core_candidates; }
std::vector<Jet> Base::SubJets(Jet const& jet, int sub_jet_number) const { INFO0; auto cluster_sequence = ClusterSequence{jet.Constituents(), Settings::SubJetDefinition()}; return cluster_sequence.ExclusiveJetsUpTo(sub_jet_number); }