17#ifndef PARTICLEEVENT_COMPOSITEPARTICLE_H
18#define PARTICLEEVENT_COMPOSITEPARTICLE_H
25#include "AthLinks/ElementLink.h"
26#include "AthLinks/ElementLinkVector.h"
48 CompositeParticleNavigation,
76 CompositeParticle( const CompositeParticle& rhs );
79 CompositeParticle& operator=( const CompositeParticle& rhs );
94 std::vector<const INavigable4Momentum*> constituents;
103 template <
class Element>
108 cont.reserve( iMax );
109 for ( std::size_t i = 0; i != iMax; ++i ) {
112 cont.push_back( constituent );
122 template <
class Element>
128 const Element * element = 0;
135 while ( idx-- ) { ++o; }
136 element =
dynamic_cast<const Element*
>(*o);
Navigable< INavigable4MomentumCollection, double > CompositeParticleNavigation
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
ElementLink< INavigable4MomentumCollection > INav4MomLink
class which is made from the composition of other particles.
Base_t::navigable_type Navigable_t
ConstituentsIter_t constituents_end() const
iterator over constituents of this composite
ConstituentsIter_t constituents_begin() const
iterator over constituents of this composite
bool contains(const INavigable4Momentum *particle) const
check if a given particle is contained by this composite
Navigable_t::object_iter ConstituentsIter_t
void putElement(const INav4MomLink &ipart)
helper method to put elements into the underlying Navigable container
const Element * get_constituent(std::size_t idx) const
Return a constituent given its index.
void add(const INav4MomLink &ipart)
void get_constituents(std::vector< const Element * > &cont) const
Fill a vector of elements with the constituents which compose that CompositeParticle.
bool contains(const INav4MomLink &ipart) const
check if a given particle is contained by this composite
ParticleImpl< CompositeParticleNavigation, P4ImplPxPyPzE, ParticleEvent::Base > Base_t
std::vector< const INavigable4Momentum * > get_constituents() const
return the vector of constituents by value. FIXME: inefficient
virtual ~CompositeParticle()=default
Constructor with parameters:
virtual unsigned int size() const
virtual object_iter begin() const
NavigableIterator< INavigable4MomentumCollection, double, typename NavigationDefaults::DefaultChildColl< INavigable4MomentumCollection, double >::type > object_iter
virtual object_iter end() const
const navigable_type & navigableBase() const
CompositeParticleNavigation navigable_type
virtual double p2() const