|
ATLAS Offline Software
|
Go to the documentation of this file.
15 return os <<
info.source <<
", (" <<
info.link.persKey() <<
", " <<
info.link.persIndex() <<
")";
19 std::ostream &
operator<<(std::ostream &
os,
const std::vector<T> &
v)
24 for (
auto itr =
v.begin(); itr !=
v.end() - 1; ++itr)
36 std::set<const xAOD::IParticle *> seen;
38 if (!seen.insert(*
info.link).second)
45 std::set<std::pair<uint32_t, uint32_t>> seen;
49 if (!seen.insert(std::make_pair(roi.
link.persKey(), roi.
link.persIndex())).second)
58 std::set<std::pair<uint32_t, uint32_t>> seen;
62 if (!seen.insert(std::make_pair(roi.
link.persKey(), roi.
link.persIndex())).second)
74 return [](
const std::vector<LinkInfo<xAOD::IParticleContainer>> &) {
return true; };
80 throw std::runtime_error(
"Unhandled FilterType enum value!");
88 const std::vector<std::tuple<std::size_t, LInfoItr_t, LInfoItr_t>> &pieces,
90 : m_filter(std::move(
filter))
92 std::vector<KFromNItr> idxItrs;
93 idxItrs.reserve(pieces.size());
96 for (
const auto &tup : pieces)
98 std::size_t multiplicity = std::get<0>(tup);
103 size += multiplicity;
111 const std::vector<std::tuple<std::size_t, LInfoItr_t, LInfoItr_t>> &pieces,
132 throw std::runtime_error(
"Dereferencing past-the-end iterator");
139 throw std::runtime_error(
"Dereferencing past-the-end iterator");
170 return !(*
this ==
other);
180 for (std::size_t iLeg = 0; iLeg <
nLegs(); ++iLeg)
182 std::vector<std::size_t>
indices = *(*m_idxItr)[iLeg];
ProductItr< KFromNItr > m_idxItr
std::function< bool(const VecLInfo_t &)> m_filter
bool uniqueRoIs(const std::vector< LinkInfo< xAOD::IParticleContainer >> &links)
Helper function that returns true if no objects share a final RoI.
ElementLink< T > link
Link to the feature.
@ UniqueRoIs
Do not allow any two objects to share an RoI.
Iterates over all combinations of the provided input iterators.
std::size_t nLegs() const
The number of legs.
bool uniqueObjects(const std::vector< LinkInfo< xAOD::IParticleContainer >> &links)
Helper fucntion that returns true if no objects are repeated.
@ UniqueObjects
Do not allow any repeated objects.
std::pair< long int, long int > indices
reference operator*() const
Dereference.
void reset()
Reset the iterator to its starting point.
@ All
Allow all combinations.
std::vector< LinkInfo< xAOD::IParticleContainer > > VecLInfo_t
IPartCombItr()
A default constructed iterator acts as a past-the-end iterator.
std::size_t size() const
The size of each combination.
const value_type & reference
const std::string & initialRoIString()
VecLInfo_t::const_iterator LInfoItr_t
bool operator==(const IPartCombItr &other) const
Iterator comparison functions.
IPartCombItr & operator++()
Pre-increment operator.
bool operator!=(const IPartCombItr &other) const
std::ostream & operator<<(std::ostream &lhs, const TestGaudiProperty &rhs)
const value_type * pointer
std::function< bool(const std::vector< LinkInfo< xAOD::IParticleContainer >> &)> getFilter(FilterType filter)
Get a lambda corresponding to the specified FilterType enum.
pointer operator->() const
bool uniqueInitialRoIs(const std::vector< LinkInfo< xAOD::IParticleContainer >> &links)
Helper function that returns true if no objects share an initial RoI.
Helper to keep a Decision object, ElementLink and ActiveState (with respect to some requested ChainGr...
bool exhausted() const
True if this iterator is past the end.
setBGCode setTAP setLVL2ErrorBits bool
std::vector< LInfoItr_t > m_linkInfoItrs
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space