21 return [](
const Ip* tp,
const Vertex&) {
return tp->pt();};
23 throw std::logic_error(
"Unknown sort function");
38 if (!link.isValid()) {
39 throw std::logic_error(
"invalid particle link");
41 particles.push_back(*link);
52 std::vector<std::pair<double, const xAOD::Jet*>> particles;
56 std::sort(particles.begin(), particles.end(), std::greater<>());
57 std::vector<const xAOD::Jet*> only_particles;
58 only_particles.reserve(particles.size());
59for (
const auto& particle: particles) {
60 only_particles.push_back(particle.second);
62 return only_particles;
65 std::tuple<std::string, FlavorTagInference::Inputs, std::vector<const xAOD::IParticle*>>
JetsLoader::getData(
68 std::vector<const xAOD::IParticle*> sorted_particles_ip;
69 for (
const auto& p: sorted_particles) {
70 sorted_particles_ip.push_back(p);
ElementLink implementation for ROOT usage.
IConstituentsLoader(const ConstituentsInputConfig &cfg)
ConstituentsInputConfig m_config
std::vector< const xAOD::Jet * > IPV
std::function< double(const xAOD::Jet *, const Vertex &)> JetSortVar
std::tuple< std::string, FlavorTagInference::Inputs, std::vector< const xAOD::IParticle * > > getData(const xAOD::Vertex &vertex) const override
getter_utils::CustomSequenceGetter< xAOD::Jet > m_customSequenceGetter
std::function< IPV(const Vertex &)> m_associator
JetSortVar m_iparticleSortVar
std::vector< const xAOD::Jet * > getJetsFromVertex(const xAOD::Vertex &vertex) const
static JetSortVar iparticleSortVar(ConstituentsSortOrder)
JetsLoader(const ConstituentsInputConfig &)
std::string getName() const override
ConstituentsType getType() const override
SG::ConstAccessor< T, ALLOC > ConstAccessor
Utils to produce Constituent -> vector<double> functions.
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Jet_v1 Jet
Definition of the current "jet version".
Vertex_v1 Vertex
Define the latest version of the vertex class.