|
ATLAS Offline Software
|
Go to the documentation of this file.
17 #ifndef PARTICLEEVENT_COMPOSITEPARTICLE_H
18 #define PARTICLEEVENT_COMPOSITEPARTICLE_H
25 #include "AthLinks/ElementLink.h"
26 #include "AthLinks/ElementLinkVector.h"
48 CompositeParticleNavigation,
94 std::vector<const INavigable4Momentum*> constituents;
95 this->get_constituents<INavigable4Momentum>(constituents);
103 template <
class Element>
108 cont.reserve( iMax );
109 for ( std::size_t
i = 0;
i != iMax; ++
i ) {
110 const Element* constituent = this->get_constituent<Element>(
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);
201 #endif //> PARTICLEEVENT_COMPOSITEPARTICLE_H
CompositeParticleNavigation navigable_type
publish the type of the base class (ie: 'traits-itize' it)
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
ConstituentsIter_t constituents_end() const
iterator over constituents of this composite
bool contains(const INavigable4Momentum *particle) const
check if a given particle is contained by this composite
virtual object_iter begin() const
void get_constituents(std::vector< const Element * > &cont) const
Fill a vector of elements with the constituents which compose that CompositeParticle.
Base_t::navigable_type Navigable_t
virtual object_iter end() const
void putElement(const INav4MomLink &ipart)
helper method to put elements into the underlying Navigable container
Navigable_t::object_iter ConstituentsIter_t
ParticleImpl< CompositeParticleNavigation, P4ImplPxPyPzE, ParticleEvent::Base > Base_t
virtual ~CompositeParticle()=default
Constructor with parameters:
std::vector< const INavigable4Momentum * > get_constituents() const
return the vector of constituents by value. FIXME: inefficient
const navigable_type & navigableBase() const
access to underlying base type (INavigable-like)
virtual double p2() const
square of momentum magnitude
const Element * get_constituent(std::size_t idx) const
Return a constituent given its index.
void add(const INav4MomLink &ipart)
bool contains(const INav4MomLink &ipart) const
check if a given particle is contained by this composite
Navigable< INavigable4MomentumCollection, double > CompositeParticleNavigation
virtual unsigned int size() const
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
macros to associate a CLID to a type
ConstituentsIter_t constituents_begin() const
iterator over constituents of this composite