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::Muon*>> particles;
57 std::sort(particles.begin(), particles.end(), std::greater<>());
58 std::vector<const xAOD::Muon*> only_particles;
59 only_particles.reserve(particles.size());
60for (
const auto& particle: particles) {
61 only_particles.push_back(particle.second);
63 return only_particles;
66 std::tuple<std::string, FlavorTagInference::Inputs, std::vector<const xAOD::IParticle*>>
MuonsLoader::getData(
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
std::vector< const xAOD::Muon * > IPV
MuonSortVar m_iparticleSortVar
std::function< double(const xAOD::Muon *, const Vertex &)> MuonSortVar
std::vector< const xAOD::Muon * > getMuonsFromVertex(const xAOD::Vertex &vertex) const
ConstituentsType getType() const override
getter_utils::CustomSequenceGetter< xAOD::Muon > m_customSequenceGetter
static MuonSortVar iparticleSortVar(ConstituentsSortOrder)
std::tuple< std::string, FlavorTagInference::Inputs, std::vector< const xAOD::IParticle * > > getData(const xAOD::Vertex &vertex) const override
std::function< IPV(const Vertex &)> m_associator
std::string getName() const override
MuonsLoader(const ConstituentsInputConfig &cfg)
SG::ConstAccessor< T, ALLOC > ConstAccessor
Utils to produce Constituent -> vector<double> functions.
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
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.
Muon_v1 Muon
Reference the current persistent version: