20 return [](
const Ip* tp,
const Vertex&) {
return tp->pt();};
22 throw std::logic_error(
"Unknown sort function");
39 if (!link.isValid()) {
40 throw std::logic_error(
"invalid particle link");
42 particles.push_back(*link);
53 std::vector<std::pair<double, const xAOD::Photon*>> particles;
57 std::sort(particles.begin(), particles.end(), std::greater<>());
58 std::vector<const xAOD::Photon*> only_particles;
59 only_particles.reserve(particles.size());
60for (
const auto& particle: particles) {
61 only_particles.push_back(particle.second);
63 return only_particles;
69 std::vector<const xAOD::IParticle*> sorted_particles_ip;
70 for (
const auto& p: sorted_particles) {
71 sorted_particles_ip.push_back(p);
ElementLink implementation for ROOT usage.
IConstituentsLoader(const ConstituentsInputConfig &cfg)
ConstituentsInputConfig m_config
PhotonSortVar m_iparticleSortVar
std::vector< const xAOD::Photon * > Photons
std::string getName() const override
std::vector< const xAOD::Photon * > getPhotonsFromVertex(const xAOD::Vertex &vertex) const
getter_utils::CustomSequenceGetter< xAOD::Photon > m_customSequenceGetter
std::vector< const xAOD::Photon * > IPV
std::function< IPV(const Vertex &)> m_associator
ConstituentsType getType() const override
PhotonsLoader(const ConstituentsInputConfig &cfg)
std::tuple< std::string, FlavorTagInference::Inputs, std::vector< const xAOD::IParticle * > > getData(const xAOD::Vertex &vertex) const override
static PhotonSortVar iparticleSortVar(ConstituentsSortOrder)
std::function< double(const xAOD::Photon *, const Vertex &)> PhotonSortVar
SG::ConstAccessor< T, ALLOC > ConstAccessor
Class describing an photon.
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.
Vertex_v1 Vertex
Define the latest version of the vertex class.
Photon_v1 Photon
Definition of the current "egamma version".