ATLAS Offline Software
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
xAOD::MissingETAssociationMap_v1 Class Reference

#include <MissingETAssociationMap_v1.h>

Inheritance diagram for xAOD::MissingETAssociationMap_v1:
Collaboration diagram for xAOD::MissingETAssociationMap_v1:

Public Types

typedef BASE DataVector_BASE
 
typedef BASE DVL_BASE
 
typedef BASE::PtrVector PtrVector
 This is the type of the underlying std::vector (what stdcont returns). More...
 
typedef BASE::PtrVector BaseContainer
 
typedef MissingETAssociation_v1 *& reference
 
typedef MissingETAssociation_v1 *constconst_reference
 
typedef BASE::size_type size_type
 
typedef BASE::difference_type difference_type
 
typedef MissingETAssociation_v1value_type
 
typedef BASE::allocator_type allocator_type
 
typedef MissingETAssociation_v1 ** pointer
 
typedef MissingETAssociation_v1 *constconst_pointer
 
typedef const MissingETAssociation_v1const_value_type
 
typedef MissingETAssociation_v1 base_value_type
 The T value used as the template parameter. More...
 
typedef std::unique_ptr< base_value_typeunique_type
 Type of a unique_ptr that can be used to insert elements into this container. More...
 
typedef DataModel_detail::ElementProxy< DataVectorElementProxy
 This type is used to proxy lvalue accesses to DataVector elements, in order to handle ownership. More...
 
typedef DataModel_detail::const_iterator< DataVectorconst_iterator
 Standard const_iterator. More...
 
typedef DataModel_detail::iterator< DataVectoriterator
 Standard iterator. More...
 
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
 Standard const_reverse_iterator. More...
 
typedef std::reverse_iterator< iteratorreverse_iterator
 Standard reverse_iterator. More...
 
typedef DataVector base_data_vector
 
using Deleter = typename BASE::Deleter
 
typedef DataVector< MissingETAssociation_v1, BASE > self
 A helper typedef. More...
 

Public Member Functions

 MissingETAssociationMap_v1 (SG::OwnershipPolicy own=SG::OWN_ELEMENTS, SG::IndexTrackingPolicy trackIndices=SG::DEFAULT_TRACK_INDICES)
 Default constructor. More...
 
 MissingETAssociationMap_v1 (const MissingETAssociationMap_v1::iterator &first, const MissingETAssociationMap_v1::iterator &last, SG::OwnershipPolicy own=SG::OWN_ELEMENTS, SG::IndexTrackingPolicy trackIndices=SG::DEFAULT_TRACK_INDICES)
 Constructor from iterators. More...
 
virtual ~MissingETAssociationMap_v1 ()
 Base class destructor. More...
 
Size and capacity.
size_type size () const noexcept
 Returns the number of elements in the collection. More...
 
void resize (size_type sz)
 Resizes the collection to the specified number of elements. More...
 
void reserve (size_type n)
 Attempt to preallocate enough memory for a specified number of elements. More...
 
Element access.

Change the vector capacity to match the current size.

Note: this does not affect auxiliary data.

const MissingETAssociation_v1operator[] (size_type n) const
 Access an element, as an rvalue. More...
 
ElementProxy operator[] (size_type n)
 Access an element, as an lvalue. More...
 
const MissingETAssociation_v1get (size_type n) const
 Access an element, as an rvalue. More...
 
const MissingETAssociation_v1at (size_type n) const
 Access an element, as an rvalue. More...
 
ElementProxy at (size_type n)
 Access an element, as an lvalue. More...
 
const MissingETAssociation_v1front () const
 Access the first element in the collection as an rvalue. More...
 
ElementProxy front ()
 Access the first element in the collection as an lvalue. More...
 
const MissingETAssociation_v1back () const
 Access the last element in the collection as an rvalue. More...
 
ElementProxy back ()
 Access the last element in the collection as an lvalue. More...
 
Iterator creation.
const_iterator begin () const noexcept
 Return a const_iterator pointing at the beginning of the collection. More...
 
iterator begin () noexcept
 Return an iterator pointing at the beginning of the collection. More...
 
const_iterator end () const noexcept
 Return a const_iterator pointing past the end of the collection. More...
 
iterator end () noexcept
 Return an iterator pointing past the end of the collection. More...
 
const_reverse_iterator rbegin () const noexcept
 Return a const_reverse_iterator pointing past the end of the collection. More...
 
reverse_iterator rbegin () noexcept
 Return a reverse_iterator pointing past the end of the collection. More...
 
const_reverse_iterator rend () const noexcept
 Return a const_reverse_iterator pointing at the beginning of the collection. More...
 
reverse_iterator rend () noexcept
 Return a reverse_iterator pointing at the beginning of the collection. More...
 
const_iterator cbegin () const noexcept
 Return a const_iterator pointing at the beginning of the collection. More...
 
const_iterator cend () const noexcept
 Return a const_iterator pointing past the end of the collection. More...
 
const_reverse_iterator crbegin () const noexcept
 Return a const_reverse_iterator pointing past the end of the collection. More...
 
const_reverse_iterator crend () const noexcept
 Return a const_reverse_iterator pointing at the beginning of the collection. More...
 
Insertion operations.
value_type push_back (value_type pElem)
 Add an element to the end of the collection. More...
 
value_type push_back (std::unique_ptr< base_value_type > pElem)
 Add an element to the end of the collection. More...
 
value_type emplace_back (value_type pElem)
 Add an element to the end of the collection. More...
 
iterator insert (iterator position, value_type pElem)
 Add a new element to the collection. More...
 
iterator insert (iterator position, std::unique_ptr< base_value_type > pElem)
 Add a new element to the collection. More...
 
void insert (iterator position, InputIterator first, InputIterator last)
 Add a group of new elements to the collection. More...
 
void insert (iterator position, InputIterator first, InputIterator last)
 Add a group of new elements to the collection. More...
 
void insert (iterator position, std::initializer_list< value_type > l)
 Add a group of new elements to the collection. More...
 
iterator emplace (iterator position, value_type pElem)
 Add a new element to the collection. More...
 
void insertMove (iterator position, DataVector &other)
 Insert the contents of another DataVector, with auxiliary data copied via move semantics. More...
 
Erasure operations.
iterator erase (iterator position)
 Remove element at a given position. More...
 
iterator erase (iterator first, iterator last)
 Remove a range of elements. More...
 
void pop_back ()
 Remove the last element from the collection. More...
 
void clear ()
 Erase all the elements in the collection. More...
 
Find methods
const_iterator find (const Jet *pJet) const
 Find association from jet pointer. More...
 
iterator find (const Jet *pJet)
 Find association from jet pointer. More...
 
size_t findIndex (const Jet *pJet) const
 
const_iterator findByJetConst (const IParticle *pConst) const
 Find association from jet constituent. More...
 
iterator findByJetConst (const IParticle *pConst)
 Find association from jet constituent. More...
 
const_iterator findByJetConst (const ElementLink< IParticleContainer > &constLink) const
 Find association from jet constituent. More...
 
iterator findByJetConst (const ElementLink< IParticleContainer > &constLink)
 Find association from jet constituent. More...
 
size_t findIndexByJetConst (const IParticle *pConst) const
 
size_t findIndexByJetConst (const ElementLink< IParticleContainer > &pConstLink) const
 
const MissingETAssociation_v1getMiscAssociation () const
 Get an association for miscellaneous objects not associated to jets. More...
 
MissingETAssociation_v1getMiscAssociation ()
 
Jet constituent and overlap removal methods
bool setJetConstituents (const Jet *pJet)
 Set constituent map for a jet. More...
 
bool setJetConstituents (const std::vector< ElementLink< IParticleContainer > > &constLinks, const Jet *pJet)
 Set constituent map for a jet. More...
 
bool setJetConstituents (const std::vector< ElementLink< IParticleContainer > > &constLinks, size_t jetIndex)
 Set constituent map for a jet. More...
 
bool identifyOverlaps ()
 Do overlap-finding in all associations. More...
 
void clearOverlaps ()
 
const IParticleContainergetUniqueSignals (const IParticleContainer *signals, MissingETBase::UsageHandler::Policy p=MissingETBase::UsageHandler::TrackCluster) const
 Extract a container of constituents that are not in jets. More...
 
const IParticleContainergetOverlapRemovedSignals (const MissingETAssociationHelper &helper, const IParticleContainer *signals, MissingETBase::UsageHandler::Policy p=MissingETBase::UsageHandler::TrackCluster) const
 Extract a container of constituents that do not overlap physics objects. More...
 
Constructors, destructors, assignment.
void assign (InputIterator first, InputIterator last)
 Assign from iterators. More...
 
void assign (std::initializer_list< value_type > l)
 
Size and capacity.
size_type size () const noexcept
 Returns the number of elements in the collection. More...
 
void resize (size_type sz)
 Resizes the collection to the specified number of elements. More...
 
void reserve (size_type n)
 Attempt to preallocate enough memory for a specified number of elements. More...
 
Element access.

Change the vector capacity to match the current size.

Note: this does not affect auxiliary data.

const MissingETAssociation_v1operator[] (size_type n) const
 Access an element, as an rvalue. More...
 
ElementProxy operator[] (size_type n)
 Access an element, as an lvalue. More...
 
const MissingETAssociation_v1get (size_type n) const
 Access an element, as an rvalue. More...
 
const MissingETAssociation_v1at (size_type n) const
 Access an element, as an rvalue. More...
 
ElementProxy at (size_type n)
 Access an element, as an lvalue. More...
 
const MissingETAssociation_v1front () const
 Access the first element in the collection as an rvalue. More...
 
ElementProxy front ()
 Access the first element in the collection as an lvalue. More...
 
const MissingETAssociation_v1back () const
 Access the last element in the collection as an rvalue. More...
 
ElementProxy back ()
 Access the last element in the collection as an lvalue. More...
 
Iterator creation.
const_iterator begin () const noexcept
 Return a const_iterator pointing at the beginning of the collection. More...
 
iterator begin () noexcept
 Return an iterator pointing at the beginning of the collection. More...
 
const_iterator end () const noexcept
 Return a const_iterator pointing past the end of the collection. More...
 
iterator end () noexcept
 Return an iterator pointing past the end of the collection. More...
 
const_reverse_iterator rbegin () const noexcept
 Return a const_reverse_iterator pointing past the end of the collection. More...
 
reverse_iterator rbegin () noexcept
 Return a reverse_iterator pointing past the end of the collection. More...
 
const_reverse_iterator rend () const noexcept
 Return a const_reverse_iterator pointing at the beginning of the collection. More...
 
reverse_iterator rend () noexcept
 Return a reverse_iterator pointing at the beginning of the collection. More...
 
const_iterator cbegin () const noexcept
 Return a const_iterator pointing at the beginning of the collection. More...
 
const_iterator cend () const noexcept
 Return a const_iterator pointing past the end of the collection. More...
 
const_reverse_iterator crbegin () const noexcept
 Return a const_reverse_iterator pointing past the end of the collection. More...
 
const_reverse_iterator crend () const noexcept
 Return a const_reverse_iterator pointing at the beginning of the collection. More...
 
Insertion operations.
value_type push_back (value_type pElem)
 Add an element to the end of the collection. More...
 
value_type push_back (std::unique_ptr< base_value_type > pElem)
 Add an element to the end of the collection. More...
 
value_type emplace_back (value_type pElem)
 Add an element to the end of the collection. More...
 
iterator insert (iterator position, value_type pElem)
 Add a new element to the collection. More...
 
iterator insert (iterator position, std::unique_ptr< base_value_type > pElem)
 Add a new element to the collection. More...
 
void insert (iterator position, InputIterator first, InputIterator last)
 Add a group of new elements to the collection. More...
 
void insert (iterator position, InputIterator first, InputIterator last)
 Add a group of new elements to the collection. More...
 
void insert (iterator position, std::initializer_list< value_type > l)
 Add a group of new elements to the collection. More...
 
iterator emplace (iterator position, value_type pElem)
 Add a new element to the collection. More...
 
void insertMove (iterator position, DataVector &other)
 Insert the contents of another DataVector, with auxiliary data copied via move semantics. More...
 
Erasure operations.
iterator erase (iterator position)
 Remove element at a given position. More...
 
iterator erase (iterator first, iterator last)
 Remove a range of elements. More...
 
void pop_back ()
 Remove the last element from the collection. More...
 
void clear ()
 Erase all the elements in the collection. More...
 

Public Attributes

ROOT_SELECTION_NS::MemberAttributes< kTransient > m_isMostDerived
 Automatically generate dictionary for contained vector. More...
 
ROOT_SELECTION_NS::MemberAttributes< kTransient > m_deleter
 
ROOT_SELECTION_NS::MemberAttributes< kTransient > m_ownPolicy
 We do not want to save this. More...
 

Static Public Attributes

static const bool has_virtual
 This is true for any DataVector class if we need to use virtual derivation to get to the base DataVector class. More...
 
static constexpr bool must_own
 If true, then this type must own its contents. More...
 

Protected Member Functions

void f_setJetConstMap (std::map< ElementLink< IParticleContainer >, size_t > map)
 
void f_clearJetConstMap ()
 
Internal find methods for constant access
const_iterator f_findConst (const Jet *pJet) const
 Find contribution by reference jet pointer. More...
 
iterator f_find (const Jet *pJet)
 

Protected Attributes

std::map< ElementLink< IParticleContainer >, size_t > m_jetConstLinks
 Map jet constituents to the jet index. More...
 

Swap and sort.

void swap (DataVector &rhs)
 Swap this collection with another. More...
 
void sort ()
 Sort the container. More...
 
void sort (COMPARE comp)
 Sort the container with a user-specified comparison operator. More...
 
static void iter_swap (iterator a, iterator b)
 Swap the referents of two DataVector iterators. More...
 

Non-standard operations.

void resize (size_type sz)
 
void pop_back ()
 
void clear (SG::OwnershipPolicy ownPolicy)
 Erase all the elements in the collection, and reset the ownership mode. More...
 
void clear (SG::OwnershipPolicy ownPolicy, SG::IndexTrackingPolicy trackIndices)
 
void clear (std::unique_ptr< Deleter > deleter)
 Erase all the elements in the collection, and change how elements are to be deleted. More...
 
void clear ()
 
void clear (SG::OwnershipPolicy ownPolicy, SG::IndexTrackingPolicy trackIndices=SG::DEFAULT_TRACK_INDICES)
 
void swapElement (size_type index, value_type newElem, reference oldElem)
 Swap one element out of the container. More...
 
void swapElement (iterator pos, value_type newElem, reference oldElem)
 Swap one element out of the container. More...
 
void swapElement (size_type index, std::unique_ptr< base_value_type > newElem, std::unique_ptr< base_value_type > &oldElem)
 Swap one element out of the container. More...
 
void swapElement (iterator pos, std::unique_ptr< base_value_type > newElem, std::unique_ptr< base_value_type > &oldElem)
 Swap one element out of the container. More...
 
virtual const DataModel_detail::DVLInfoBasedvlinfo_v () const
 Return the DV/DL info struct for this class. More...
 
const SG::AuxVectorBaseauxbase () const
 Convert to AuxVectorBase. More...
 
size_type max_size () const noexcept
 Returns the size() of the largest possible collection. More...
 
size_type capacity () const noexcept
 Returns the total number of elements that the collection can hold before needing to allocate more memory. More...
 
bool empty () const noexcept
 Returns true if the collection is empty. More...
 
void shrink_to_fit ()
 
const PtrVectorstdcont () const
 Return the underlying std::vector of the container. More...
 
SG::OwnershipPolicy ownPolicy () const
 Return the ownership policy setting for this container. More...
 
static const DataModel_detail::DVLInfoBasedvlinfo ()
 Return the DV/DL info struct for this class. More...
 
static int baseOffset (const std::type_info &ti)
 Return the offset of a base DataVector class. More...
 

Internal operations.

void resortAux (iterator beg, iterator end)
 Reset indices / reorder aux data after elements have been permuted. More...
 
void testInsert (const char *op)
 Test if we can insert; raise an exception if not. More...
 
void testInsertOol (const char *op)
 Test if we can insert; raise an exception if not. More...
 
void clearMostDerived ()
 Clear m_isMostDerived for this instance and for all bases. More...
 
virtual void setMostDerived ()
 Set m_isMostDerived for this instance and clear it for all bases. More...
 
typedef ROOT_SELECTION_NS::DataVector< MissingETAssociation_v1, DataVector_BASE >::self self
 
SG::IsMostDerivedFlag m_isMostDerived
 This flag is true if this DV instance is the most-derived one. More...
 
static int baseOffset1 (const char *p, const DataVector &dv, const std::type_info &ti)
 Helper for baseOffset. More...
 
static const MissingETAssociation_v1do_cast (const typename PtrVector::value_type p)
 Helper to shorten calls to DataModel_detail::DVLCast. More...
 
static MissingETAssociation_v1do_cast_nc (typename PtrVector::value_type p)
 Helper to shorten calls to DataModel_detail::DVLCast. More...
 
void assignElement (typename BaseContainer::iterator pos, value_type newElem)
 Handle element assignment. More...
 
void assignElement (typename BaseContainer::iterator pos, std::unique_ptr< base_value_type > newElem)
 Handle element assignment. More...
 
void assignBaseElement (typename BaseContainer::iterator pos, typename BaseContainer::value_type newElem)
 Handle element assignment from a base pointer. More...
 
void shift (size_t pos, ptrdiff_t offs)
 Shift the auxiliary elements of the container. More...
 
virtual const std::type_info & dv_typeid () const
 Find the most-derived DataVector class in the hierarchy. More...
 

Detailed Description

Definition at line 28 of file MissingETAssociationMap_v1.h.

Member Typedef Documentation

◆ allocator_type

typedef BASE::allocator_type DataVector< MissingETAssociation_v1 , BASE >::allocator_type
inherited

Definition at line 816 of file DataVector.h.

◆ base_data_vector

Definition at line 853 of file DataVector.h.

◆ base_value_type

The T value used as the template parameter.

Note that this is different from value_type (that's T*).

Definition at line 824 of file DataVector.h.

◆ BaseContainer

typedef BASE::PtrVector DataVector< MissingETAssociation_v1 , BASE >::BaseContainer
inherited

Definition at line 806 of file DataVector.h.

◆ const_iterator

Standard const_iterator.

Definition at line 837 of file DataVector.h.

◆ const_pointer

Definition at line 818 of file DataVector.h.

◆ const_reference

Definition at line 812 of file DataVector.h.

◆ const_reverse_iterator

typedef std::reverse_iterator<const_iterator> DataVector< MissingETAssociation_v1 , BASE >::const_reverse_iterator
inherited

Standard const_reverse_iterator.

Definition at line 846 of file DataVector.h.

◆ const_value_type

Definition at line 820 of file DataVector.h.

◆ DataVector_BASE

typedef BASE DataVector< MissingETAssociation_v1 , BASE >::DataVector_BASE
inherited

Definition at line 796 of file DataVector.h.

◆ Deleter

using DataVector< MissingETAssociation_v1 , BASE >::Deleter = typename BASE::Deleter
inherited

Definition at line 856 of file DataVector.h.

◆ difference_type

typedef BASE::difference_type DataVector< MissingETAssociation_v1 , BASE >::difference_type
inherited

Definition at line 814 of file DataVector.h.

◆ DVL_BASE

typedef BASE DataVector< MissingETAssociation_v1 , BASE >::DVL_BASE
inherited

Definition at line 797 of file DataVector.h.

◆ ElementProxy

This type is used to proxy lvalue accesses to DataVector elements, in order to handle ownership.

Definition at line 832 of file DataVector.h.

◆ iterator

Standard iterator.

Note that lvalue references here will yield an ElementProxy, not a reference.

Definition at line 841 of file DataVector.h.

◆ pointer

Definition at line 817 of file DataVector.h.

◆ PtrVector

typedef BASE::PtrVector DataVector< MissingETAssociation_v1 , BASE >::PtrVector
inherited

This is the type of the underlying std::vector (what stdcont returns).

Definition at line 805 of file DataVector.h.

◆ reference

Definition at line 811 of file DataVector.h.

◆ reverse_iterator

typedef std::reverse_iterator<iterator> DataVector< MissingETAssociation_v1 , BASE >::reverse_iterator
inherited

Standard reverse_iterator.

Note that lvalue references here will yield an ElementProxy, not a reference.

Definition at line 851 of file DataVector.h.

◆ self [1/2]

typedef ROOT_SELECTION_NS::DataVector<MissingETAssociation_v1 , DataVector_BASE>::self DataVector< MissingETAssociation_v1 , BASE >::self
privateinherited

Definition at line 2042 of file DataVector.h.

◆ self [2/2]

A helper typedef.

Definition at line 3428 of file DataVector.h.

◆ size_type

typedef BASE::size_type DataVector< MissingETAssociation_v1 , BASE >::size_type
inherited

Definition at line 813 of file DataVector.h.

◆ unique_type

typedef std::unique_ptr<base_value_type> DataVector< MissingETAssociation_v1 , BASE >::unique_type
inherited

Type of a unique_ptr that can be used to insert elements into this container.

Definition at line 828 of file DataVector.h.

◆ value_type

Definition at line 815 of file DataVector.h.

Constructor & Destructor Documentation

◆ MissingETAssociationMap_v1() [1/2]

MissingETAssociationMap_v1::MissingETAssociationMap_v1 ( SG::OwnershipPolicy  own = SG::OWN_ELEMENTS,
SG::IndexTrackingPolicy  trackIndices = SG::DEFAULT_TRACK_INDICES 
)

Default constructor.

Definition at line 31 of file MissingETAssociationMap_v1.cxx.

32  : DataVector<MissingETAssociation_v1>(own,trackIndices)
33 {
34 }

◆ MissingETAssociationMap_v1() [2/2]

MissingETAssociationMap_v1::MissingETAssociationMap_v1 ( const MissingETAssociationMap_v1::iterator first,
const MissingETAssociationMap_v1::iterator last,
SG::OwnershipPolicy  own = SG::OWN_ELEMENTS,
SG::IndexTrackingPolicy  trackIndices = SG::DEFAULT_TRACK_INDICES 
)

Constructor from iterators.

Definition at line 36 of file MissingETAssociationMap_v1.cxx.

39  : DataVector<MissingETAssociation_v1>(first,last,own,trackIndices)
40 {
41 }

◆ ~MissingETAssociationMap_v1()

MissingETAssociationMap_v1::~MissingETAssociationMap_v1 ( )
virtual

Base class destructor.

Definition at line 43 of file MissingETAssociationMap_v1.cxx.

44 { }

Member Function Documentation

◆ assign() [1/2]

void DataVector< MissingETAssociation_v1 , BASE >::assign ( InputIterator  first,
InputIterator  last 
)
inherited

Assign from iterators.

Parameters
firstThe start of the range to put in the container.
lastThe end of the range to put in the container.

Any existing owned elements will be released. The DataVector's ownership policy determines whether it will take ownership of the new elements.

◆ assign() [2/2]

void DataVector< MissingETAssociation_v1 , BASE >::assign ( std::initializer_list< value_type l)
inherited
Parameters
lAn initializer list.

Any existing owned elements will be released. The DataVector's ownership policy determines whether it will take ownership of the new elements.

◆ assignBaseElement()

void DataVector< MissingETAssociation_v1 , BASE >::assignBaseElement ( typename BaseContainer::iterator  pos,
typename BaseContainer::value_type  newElem 
)
privateinherited

Handle element assignment from a base pointer.

Parameters
posPosition in the container to assign.
newElemThe new element to assign.

The old element is freed if this container owns elements. Auxiliary data are copied if appropriate.

◆ assignElement() [1/2]

void DataVector< MissingETAssociation_v1 , BASE >::assignElement ( typename BaseContainer::iterator  pos,
std::unique_ptr< base_value_type newElem 
)
privateinherited

Handle element assignment.

Parameters
posPosition in the container to assign.
newElemThe new element to assign.

The container must own its elements. Auxiliary data are copied if appropriate.

◆ assignElement() [2/2]

void DataVector< MissingETAssociation_v1 , BASE >::assignElement ( typename BaseContainer::iterator  pos,
value_type  newElem 
)
privateinherited

Handle element assignment.

Parameters
posPosition in the container to assign.
newElemThe new element to assign.

The old element is freed if this container owns elements. Auxiliary data are copied if appropriate.

◆ at() [1/2]

ElementProxy DataVector< MissingETAssociation_v1 , BASE >::at ( size_type  n)
inherited

Access an element, as an lvalue.

Parameters
nArray index to access.
Returns
Proxy to the element at n.

Will raise std::out_of_range if the index is out-of-bounds. Note that we return a proxy object rather than a reference; the proxy will handle deleting an owned element if it's assigned to.

◆ at() [2/2]

Access an element, as an rvalue.

Parameters
nArray index to access.
Returns
The element at n.

Will raise std::out_of_range if the index is out-of-bounds. Note that we return a const T* rather than a reference.

◆ auxbase()

Convert to AuxVectorBase.

Needed to get AuxVectorBase from a ConstDataVector. Present in DataVector as well for consistency. We only really need it in the base class; however, root6 fails constructing a TMethodCall for this if there is virtual derivation. A workaround is to redeclare this in the derived classes too.

◆ back() [1/2]

ElementProxy DataVector< MissingETAssociation_v1 , BASE >::back
inherited

Access the last element in the collection as an lvalue.

Returns
Proxy to the last element in the collection.

No checking is done to ensure that the container is not empty. Note that we return a proxy object rather than a reference; the proxy will handle deleting an owned element if it's assigned to.

◆ back() [2/2]

Access the last element in the collection as an rvalue.

Returns
The last element in the collection.

No checking is done to ensure that the container is not empty. Note that we return a const T* rather than a reference.

◆ baseOffset()

static int DataVector< MissingETAssociation_v1 , BASE >::baseOffset ( const std::type_info &  ti)
staticinherited

Return the offset of a base DataVector class.

Parameters
tistd::type_info of the desired class.

If ti represents a DataVector base class of this one, then return the offset of that base class. Otherwise, return -1.

This function is here due to limitations of root 6, which can't calculate these offsets correctly from the dictionary if virtual derivation is used.

◆ baseOffset1()

static int DataVector< MissingETAssociation_v1 , BASE >::baseOffset1 ( const char *  p,
const DataVector< MissingETAssociation_v1 > &  dv,
const std::type_info &  ti 
)
staticinherited

Helper for baseOffset.

Parameters
pPointer to the start of the top-level object.
dvReference to the DataVector object.
tistd::type_info of the desired class.

If ti represents a DataVector base class of this one, then return the offset of that base class. Otherwise, return -1.

◆ begin() [1/2]

const_iterator DataVector< MissingETAssociation_v1 , BASE >::begin
noexceptinherited

Return a const_iterator pointing at the beginning of the collection.

Returns
A const_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ begin() [2/2]

iterator DataVector< MissingETAssociation_v1 , BASE >::begin
noexceptinherited

Return an iterator pointing at the beginning of the collection.

Returns
An iterator.

Note that dereferencing the iterator will yield a proxy rather than a reference; the proxy will handle deleting an owned element if it's assigned to.

◆ capacity()

size_type DataVector< MissingETAssociation_v1 , BASE >::capacity
noexceptinherited

Returns the total number of elements that the collection can hold before needing to allocate more memory.

◆ cbegin()

const_iterator DataVector< MissingETAssociation_v1 , BASE >::cbegin
noexceptinherited

Return a const_iterator pointing at the beginning of the collection.

Returns
A const_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ cend()

const_iterator DataVector< MissingETAssociation_v1 , BASE >::cend
noexceptinherited

Return a const_iterator pointing past the end of the collection.

Returns
A const_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ clear() [1/6]

void DataVector< MissingETAssociation_v1 , BASE >::clear
inherited

Erase all the elements in the collection.

Erase all the elements in the collection, and reset the ownership mode.

If the container owns its elements, then the removed elements will be deleted. Any duplicates will be removed in this process, but don't rely on this.

Parameters
ownPolicyThe new ownership policy of the container.
trackIndicesThe index tracking policy.

If the container owns its elements, then the removed elements will be deleted. Any duplicates will be removed in this process, but don't rely on this.

◆ clear() [2/6]

void DataVector< MissingETAssociation_v1 , BASE >::clear
inherited

◆ clear() [3/6]

void DataVector< MissingETAssociation_v1 , BASE >::clear ( SG::OwnershipPolicy  ownPolicy)
inherited

Erase all the elements in the collection, and reset the ownership mode.

Parameters
ownPolicyThe new ownership policy of the container.

If the container owns its elements, then the removed elements will be deleted. Any duplicates will be removed in this process, but don't rely on this.

◆ clear() [4/6]

void DataVector< MissingETAssociation_v1 , BASE >::clear ( SG::OwnershipPolicy  ownPolicy,
SG::IndexTrackingPolicy  trackIndices 
)
inherited

◆ clear() [5/6]

void DataVector< MissingETAssociation_v1 , BASE >::clear ( SG::OwnershipPolicy  ownPolicy,
SG::IndexTrackingPolicy  trackIndices = SG::DEFAULT_TRACK_INDICES 
)
inherited

◆ clear() [6/6]

void DataVector< MissingETAssociation_v1 , BASE >::clear ( std::unique_ptr< Deleter deleter)
inherited

Erase all the elements in the collection, and change how elements are to be deleted.

Parameters
deleterObject to be used to delete object. Passing nullptr will change back to the default.

If the container owns its elements, then the removed elements will be deleted. Any duplicates will be removed in this process, but don't rely on this. After the current elements are deleted, the Deleter object is changed.

◆ clearMostDerived()

void DataVector< MissingETAssociation_v1 , BASE >::clearMostDerived
protectedinherited

Clear m_isMostDerived for this instance and for all bases.

Called from the constructor after setting m_isMostDerived.

◆ clearOverlaps()

void MissingETAssociationMap_v1::clearOverlaps ( )

Definition at line 211 of file MissingETAssociationMap_v1.cxx.

212 {
213  for(iterator iAssoc=this->begin(); iAssoc!=this->end(); ++iAssoc) {
214  (*iAssoc)->clearOverlaps();
215  }
216 }

◆ crbegin()

const_reverse_iterator DataVector< MissingETAssociation_v1 , BASE >::crbegin
noexceptinherited

Return a const_reverse_iterator pointing past the end of the collection.

Returns
A const_reverse_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ crend()

const_reverse_iterator DataVector< MissingETAssociation_v1 , BASE >::crend
noexceptinherited

Return a const_reverse_iterator pointing at the beginning of the collection.

Returns
A const_reverse_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ do_cast()

static const MissingETAssociation_v1 * DataVector< MissingETAssociation_v1 , BASE >::do_cast ( const typename PtrVector::value_type  p)
staticinherited

Helper to shorten calls to DataModel_detail::DVLCast.

Parameters
pThe value to convert.
Returns
The value as a const T*.

The conversion will be done with static_cast if possible, with dynamic_cast otherwise.

◆ do_cast_nc()

static MissingETAssociation_v1 * DataVector< MissingETAssociation_v1 , BASE >::do_cast_nc ( typename PtrVector::value_type  p)
staticinherited

Helper to shorten calls to DataModel_detail::DVLCast.

Parameters
pThe value to convert.
Returns
The value as a T*.

The conversion will be done with static_cast if possible, with dynamic_cast otherwise.

◆ dv_typeid()

virtual const std::type_info& DataVector< MissingETAssociation_v1 , BASE >::dv_typeid
privatevirtualinherited

Find the most-derived DataVector class in the hierarchy.

Returns
The type_info for the class for which this method gets run.

This is used to generate a nice error message when the most-derived check for insertions fails. Every DataVector defines this virtual method, so when it's called, the one corresponding to the most-derived DataVector gets run.

◆ dvlinfo()

static const DataModel_detail::DVLInfoBase& DataVector< MissingETAssociation_v1 , BASE >::dvlinfo
staticinherited

Return the DV/DL info struct for this class.

This can be used to make sure that it's instantiated.

◆ dvlinfo_v()

virtual const DataModel_detail::DVLInfoBase& DataVector< MissingETAssociation_v1 , BASE >::dvlinfo_v
virtualinherited

Return the DV/DL info struct for this class.

This can be used to make sure that it's instantiated.

◆ emplace()

iterator DataVector< MissingETAssociation_v1 , BASE >::emplace ( iterator  position,
value_type  pElem 
)
inherited

Add a new element to the collection.

Parameters
positionIterator before which the element will be added.
pElemThe element to add to the collection.
Returns
An iterator that points to the inserted data.

The container's ownership policy will determine if it takes ownership of the new element.

Note: this method may only be called using the most derived DataVector in the hierarchy.

For DataVector, this is just the same as insert. It's included just for interface compatibility with std::vector.

◆ emplace_back()

value_type DataVector< MissingETAssociation_v1 , BASE >::emplace_back ( value_type  pElem)
inherited

Add an element to the end of the collection.

Parameters
pElemThe element to add to the collection.

The container's ownership policy will determine if it takes ownership of the new element.

Note: this method may only be called using the most derived DataVector in the hierarchy.

For DataVector, this is like the same as push_back, and it returns the pushed element. It's included just for interface compatibility with std::vector.

◆ empty()

bool DataVector< MissingETAssociation_v1 , BASE >::empty
noexceptinherited

Returns true if the collection is empty.

◆ end() [1/2]

const_iterator DataVector< MissingETAssociation_v1 , BASE >::end
noexceptinherited

Return a const_iterator pointing past the end of the collection.

Returns
A const_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ end() [2/2]

iterator DataVector< MissingETAssociation_v1 , BASE >::end
noexceptinherited

Return an iterator pointing past the end of the collection.

Returns
An iterator.

Note that dereferencing the iterator will yield a proxy rather than a reference; the proxy will handle deleting an owned element if it's assigned to.

◆ erase() [1/2]

iterator DataVector< MissingETAssociation_v1 , BASE >::erase ( iterator  first,
iterator  last 
)
inherited

Remove a range of elements.

Parameters
firstIterator pointing to the first element to be removed.
lastIterator pointing one past the last element to be removed.
Returns
An iterator pointing to the element pointed to by last prior to erasing (or end()).

If the container owns its elements, then the removed elements will be deleted. Any duplicates will be removed in this process, but don't rely on this.

◆ erase() [2/2]

iterator DataVector< MissingETAssociation_v1 , BASE >::erase ( iterator  position)
inherited

Remove element at a given position.

Parameters
positionIterator pointing to the element to be removed.
Returns
An iterator pointing to the next element (or end()).

If the container owns its elements, then the pointed-to element will be deleted.

◆ f_clearJetConstMap()

void MissingETAssociationMap_v1::f_clearJetConstMap ( )
protected

Definition at line 98 of file MissingETAssociationMap_v1.cxx.

99 {
100  m_jetConstLinks.clear();
101 }

◆ f_find()

MissingETAssociationMap_v1::iterator MissingETAssociationMap_v1::f_find ( const Jet pJet)
protected

Definition at line 80 of file MissingETAssociationMap_v1.cxx.

81 {
82  iterator fAssoc(this->begin());
83  iterator lAssoc(this->end());
84  while ( fAssoc != lAssoc && !(*fAssoc)->isMisc() && (*fAssoc)->refJet() != pJet ) { ++fAssoc; }
85  return fAssoc;
86 }

◆ f_findConst()

MissingETAssociationMap_v1::const_iterator MissingETAssociationMap_v1::f_findConst ( const Jet pJet) const
protected

Find contribution by reference jet pointer.

This method finds a xAOD::MissingETAssociation_v1 object linked to the specified xAOD::Jet object. It is invoked internally by find(const Jet*). It uses an internal cache to determine if this jet has been found in the latest invocation of the find method, and returns without further action in this case. If a different jet is searched for, it initiates a linear search and updates the internal cache with the new pointer (will be NULL if referenced jet not found) and the datawords storing the const_iterator and the iterator referencing the non-modifiable and modifiable xAOD::MissingETAssociation_v1 object in the association map, respectively (both iterators will be set to the corresponding end iterator if the jet is not in the association map).

Returns
Valid const iterator referencing the MissingETAssociation_v1 object linking ot the requested jet. If this jet is not in the list, MissingETAssociationMap_v1::end() is returned.
Parameters
[in]pJetpointer to non-modifiable Jet object to be found in the association map.

Definition at line 72 of file MissingETAssociationMap_v1.cxx.

73 {
74  const_iterator fAssoc(this->begin());
75  const_iterator lAssoc(this->end());
76  while ( fAssoc != lAssoc && !(*fAssoc)->isMisc() && (*fAssoc)->refJet() != pJet ) { ++fAssoc; }
77  return fAssoc;
78 }

◆ f_setJetConstMap()

void MissingETAssociationMap_v1::f_setJetConstMap ( std::map< ElementLink< IParticleContainer >, size_t >  map)
protected

Definition at line 92 of file MissingETAssociationMap_v1.cxx.

93 {
94  m_jetConstLinks.clear();
95  m_jetConstLinks = std::move(map);
96 }

◆ find() [1/2]

MissingETAssociationMap_v1::iterator MissingETAssociationMap_v1::find ( const Jet pJet)

Find association from jet pointer.

Returns
Iterator referencing a modifiable xAOD::MissingETAssociation_v1 object linking to the given jet. If the reference jet is not in the association map, an end iterator is returned.
Parameters
[in]pJetpointer to the xAOD::Jet object searched for in the association map.

Definition at line 55 of file MissingETAssociationMap_v1.cxx.

56 {
57  return this->f_find(pJet);
58 }

◆ find() [2/2]

MissingETAssociationMap_v1::const_iterator MissingETAssociationMap_v1::find ( const Jet pJet) const

Find association from jet pointer.

Returns
Const iterator referencing a non-modifiable xAOD::MissingETAssociation_v1 object linking to the given jet. If the jet is not in the association map, an end const iterator is returned.
Parameters
[in]pJetpointer to the xAOD::Jet object searched for in the association map.

Definition at line 50 of file MissingETAssociationMap_v1.cxx.

51 {
52  return this->f_findConst(pJet);
53 }

◆ findByJetConst() [1/4]

MissingETAssociationMap_v1::iterator MissingETAssociationMap_v1::findByJetConst ( const ElementLink< IParticleContainer > &  constLink)

Find association from jet constituent.

Returns
Iterator referencing a modifiable xAOD::MissingETAssociation_v1 object linking to the jet containing this constituent. If the parent jet is not in the association map, an end iterator is returned.
Parameters
[in]ElementLinkto the xAOD::IParticle object searched for in the association map.

Definition at line 151 of file MissingETAssociationMap_v1.cxx.

152 {
154  size_t index = findIndexByJetConst(constLink);
156  iAssoc = this->begin() + index;
157  }
158  return iAssoc;
159 }

◆ findByJetConst() [2/4]

MissingETAssociationMap_v1::const_iterator MissingETAssociationMap_v1::findByJetConst ( const ElementLink< IParticleContainer > &  constLink) const

Find association from jet constituent.

Returns
Const iterator referencing a modifiable xAOD::MissingETAssociation_v1 object linking to the jet containing this constituent. If the parent jet is not in the association map, an end const iterator is returned.
Parameters
[in]ElementLinkto the xAOD::IParticle object searched for in the association map.

Definition at line 141 of file MissingETAssociationMap_v1.cxx.

142 {
144  size_t index = findIndexByJetConst(constLink);
146  iAssoc = this->begin() + index;
147  }
148  return iAssoc;
149 }

◆ findByJetConst() [3/4]

MissingETAssociationMap_v1::iterator MissingETAssociationMap_v1::findByJetConst ( const IParticle pConst)

Find association from jet constituent.

Returns
Iterator referencing a modifiable xAOD::MissingETAssociation_v1 object linking to the jet containing this constituent. If the parent jet is not in the association map, an end iterator is returned.
Parameters
[in]pointerto the xAOD::IParticle object searched for in the association map.

Definition at line 134 of file MissingETAssociationMap_v1.cxx.

135 {
136  const IParticleContainer* pCont = static_cast<const IParticleContainer*>(pConst->container());
137  ElementLink<IParticleContainer> el(*pCont,pConst->index());
138  return findByJetConst(el);
139 }

◆ findByJetConst() [4/4]

MissingETAssociationMap_v1::const_iterator MissingETAssociationMap_v1::findByJetConst ( const IParticle pConst) const

Find association from jet constituent.

Returns
Const iterator referencing a modifiable xAOD::MissingETAssociation_v1 object linking to the jet containing this constituent. If the parent jet is not in the association map, an end const iterator is returned.
Parameters
[in]pointerto the xAOD::IParticle object searched for in the association map.

Definition at line 127 of file MissingETAssociationMap_v1.cxx.

128 {
129  const IParticleContainer* pCont = static_cast<const IParticleContainer*>(pConst->container());
130  ElementLink<IParticleContainer> el(*pCont,pConst->index());
131  return findByJetConst(el);
132 }

◆ findIndex()

size_t MissingETAssociationMap_v1::findIndex ( const Jet pJet) const

Definition at line 60 of file MissingETAssociationMap_v1.cxx.

61 {
62  const_iterator fAssoc = this->f_findConst(pJet);
63  if(fAssoc != this->end() && !(*fAssoc)->isMisc())
64  return std::distance<const_iterator>(this->begin(),fAssoc);
66 }

◆ findIndexByJetConst() [1/2]

size_t MissingETAssociationMap_v1::findIndexByJetConst ( const ElementLink< IParticleContainer > &  pConstLink) const

Definition at line 168 of file MissingETAssociationMap_v1.cxx.

169 {
171  std::map<ElementLink<IParticleContainer>, size_t>::const_iterator iConstMap = m_jetConstLinks.find(constLink);
172  if (iConstMap==m_jetConstLinks.end()) {
173  for (std::map<ElementLink<IParticleContainer>, size_t>::const_iterator jConstMap = m_jetConstLinks.begin(); jConstMap!=m_jetConstLinks.end(); ++jConstMap)
174  {
175  if (*(jConstMap->first)==*constLink) iConstMap = jConstMap;
176  }
177  }
178  if(iConstMap!=m_jetConstLinks.end()) {
179  index = iConstMap->second;
180  const_iterator fAssoc(this->begin());
181  std::advance<const_iterator>(fAssoc,index);
182  }
183  return index;
184 }

◆ findIndexByJetConst() [2/2]

size_t MissingETAssociationMap_v1::findIndexByJetConst ( const IParticle pConst) const

Definition at line 161 of file MissingETAssociationMap_v1.cxx.

162 {
163  const IParticleContainer* pCont = static_cast<const IParticleContainer*>(pConst->container());
164  ElementLink<IParticleContainer> el(*pCont,pConst->index());
165  return findIndexByJetConst(el);
166 }

◆ front() [1/2]

ElementProxy DataVector< MissingETAssociation_v1 , BASE >::front
inherited

Access the first element in the collection as an lvalue.

Returns
Proxy to the first element in the collection.

No checking is done to ensure that the container is not empty. Note that we return a proxy object rather than a reference; the proxy will handle deleting an owned element if it's assigned to.

◆ front() [2/2]

Access the first element in the collection as an rvalue.

Returns
The first element in the collection.

No checking is done to ensure that the container is not empty. Note that we return a const T* rather than a reference.

◆ get()

Access an element, as an rvalue.

Parameters
nArray index to access.
Returns
The element at n.

This is a synonym for operator[] const, to be used when calling from root (where we can't readily call just the const version of a method).

◆ getMiscAssociation() [1/2]

MissingETAssociation_v1 * MissingETAssociationMap_v1::getMiscAssociation ( )

Definition at line 194 of file MissingETAssociationMap_v1.cxx.

195 {
198  while ( rIter != fAssoc && !(*rIter)->isMisc() ) { ++rIter; }
199  return rIter != fAssoc ? *rIter : (MissingETAssociation_v1*)nullptr;
200 }

◆ getMiscAssociation() [2/2]

const MissingETAssociation_v1 * MissingETAssociationMap_v1::getMiscAssociation ( ) const

Get an association for miscellaneous objects not associated to jets.

Returns
View container of non-overlapping constituents, which the user should delete

Definition at line 186 of file MissingETAssociationMap_v1.cxx.

187 {
190  while ( rIter != fAssoc && !(*rIter)->isMisc() ) { ++rIter; }
191  return rIter != fAssoc ? *rIter : (MissingETAssociation_v1*)nullptr;
192 }

◆ getOverlapRemovedSignals()

const xAOD::IParticleContainer * MissingETAssociationMap_v1::getOverlapRemovedSignals ( const MissingETAssociationHelper helper,
const IParticleContainer signals,
MissingETBase::UsageHandler::Policy  p = MissingETBase::UsageHandler::TrackCluster 
) const

Extract a container of constituents that do not overlap physics objects.

Returns
View container of non-overlapping constituents, which the user should delete
Parameters
[in]Non-modifiableIParticleContainer holding the constituents to be tested
[in]MissingETBase::UsageHandler::Policystating which types of constituents to check

Definition at line 269 of file MissingETAssociationMap_v1.cxx.

270 {
272  for(const auto *const sig : *signals) {
273  if(!MissingETAssociation_v1::testPolicy(*sig,p)) continue;
274 
275  size_t assocIndex = findIndexByJetConst(sig);
276  if(assocIndex==MissingETBase::Numerical::invalidIndex()) {
277  // test misc association
278  const MissingETAssociation_v1* assoc = this->getMiscAssociation();
279  if(!assoc) {
280  uniques->push_back(sig);
281  } else {
282  if(!assoc->checkUsage(helper,sig,p)) {
283  uniques->push_back(sig);
284  }
285  }
286  } // add if not associated to any jet
287  else {
288  if(!(*this)[assocIndex]->checkUsage(helper,sig,p)) {
289  uniques->push_back(sig);
290  } // add if not associated to any selected object in its parent jet
291  }
292  }
293 
294  return uniques->asDataVector();
295 }

◆ getUniqueSignals()

Extract a container of constituents that are not in jets.

Returns
View container of non-overlapping constituents, which the user should delete
Parameters
[in]Non-modifiableIParticleContainer holding the constituents to be tested
[in]MissingETBase::UsageHandler::Policystating which types of constituents to check

Definition at line 218 of file MissingETAssociationMap_v1.cxx.

219 {
222  iSig!=signals->end(); ++iSig) {
223  xAOD::Type::ObjectType objType = (*iSig)->type();
224  if(objType == xAOD::Type::FlowElement) objType = FEHelpers::signalToXAODType(static_cast<const xAOD::FlowElement&>(**iSig));
225  switch(p) {
227  if(objType==xAOD::Type::CaloCluster
228  || objType==xAOD::Type::TrackParticle) {break;}
229  else {continue;}
231  if(objType==xAOD::Type::CaloCluster) {break;}
232  else {continue;}
234  if(objType==xAOD::Type::TrackParticle) {break;}
235  else {continue;}
237  if(objType==xAOD::Type::ParticleFlow) {break;}
238  else {continue;}
240  if(objType==xAOD::Type::TruthParticle) {break;}
241  else {continue;}
243  if(objType!=xAOD::Type::TrackParticle) {break;}
244  else {continue;}
245  default: {continue;}
246  }
247 
248  size_t assocIndex = findIndexByJetConst(*iSig);
249  // printf("Cluster %lu (%p) ==> assoc %lu\n",(*iSig)->index(), (void*) *iSig, assocIndex);
250  if(assocIndex==MissingETBase::Numerical::invalidIndex()) {
251  // test misc association
252  const MissingETAssociation_v1* assoc = this->getMiscAssociation();
253  if(!assoc) {
254  uniques->push_back(*iSig);
255  } else {
256  if(!assoc->containsSignal(*iSig)) {
257  // printf("Cluster is unique\n");
258  uniques->push_back(*iSig);
259  } else {
260  // printf("Cluster is in misc\n");
261  }
262  }
263  } // add if not associated to any jet
264  }
265 
266  return uniques->asDataVector();
267 }

◆ identifyOverlaps()

bool MissingETAssociationMap_v1::identifyOverlaps ( )

Do overlap-finding in all associations.

Returns
Boolean stating whether any overlaps were identified

Definition at line 202 of file MissingETAssociationMap_v1.cxx.

203 {
204  bool foundOverlaps(false);
205  for(iterator iAssoc=this->begin(); iAssoc!=this->end(); ++iAssoc) {
206  foundOverlaps |= (*iAssoc)->identifyOverlaps();
207  }
208  return foundOverlaps;
209 }

◆ insert() [1/5]

void DataVector< MissingETAssociation_v1 , BASE >::insert ( iterator  position,
InputIterator  first,
InputIterator  last 
)
inherited

Add a group of new elements to the collection.

Parameters
positionIterator before which the element will be added.
firstThe start of the range to put in the container.
lastThe end of the range to put in the container.

The container's ownership policy will determine if it takes ownership of the new element.

Note: this method may only be called using the most derived DataVector in the hierarchy.

This overload is for the case where the iterator value type is convertible to T*.

◆ insert() [2/5]

void DataVector< MissingETAssociation_v1 , BASE >::insert ( iterator  position,
InputIterator  first,
InputIterator  last 
)
inherited

Add a group of new elements to the collection.

Parameters
positionIterator before which the element will be added.
firstThe start of the range to put in the container.
lastThe end of the range to put in the container.

The container's ownership policy will determine if it takes ownership of the new element.

Note: this method may only be called using the most derived DataVector in the hierarchy.

This overload is for the case where the iterator value type is convertible to unique_ptr<T>.

◆ insert() [3/5]

void DataVector< MissingETAssociation_v1 , BASE >::insert ( iterator  position,
std::initializer_list< value_type l 
)
inherited

Add a group of new elements to the collection.

Parameters
positionIterator before which the element will be added.
lAn initializer list.

The container's ownership policy will determine if it takes ownership of the new element.

Note: this method may only be called using the most derived DataVector in the hierarchy.

◆ insert() [4/5]

iterator DataVector< MissingETAssociation_v1 , BASE >::insert ( iterator  position,
std::unique_ptr< base_value_type pElem 
)
inherited

Add a new element to the collection.

Parameters
positionIterator before which the element will be added.
pElemThe element to add to the collection.
Returns
An iterator that points to the inserted data.

The container must be an owning container.

Note: this method may only be called using the most derived DataVector in the hierarchy.

◆ insert() [5/5]

iterator DataVector< MissingETAssociation_v1 , BASE >::insert ( iterator  position,
value_type  pElem 
)
inherited

Add a new element to the collection.

Parameters
positionIterator before which the element will be added.
pElemThe element to add to the collection.
Returns
An iterator that points to the inserted data.

The container's ownership policy will determine if it takes ownership of the new element.

Note: this method may only be called using the most derived DataVector in the hierarchy.

◆ insertMove()

void DataVector< MissingETAssociation_v1 , BASE >::insertMove ( iterator  position,
DataVector< MissingETAssociation_v1 > &  other 
)
inherited

Insert the contents of another DataVector, with auxiliary data copied via move semantics.

Parameters
positionIterator before which the new elements will be added.
otherThe vector to add.

The ownership mode of this vector must be the same as other; otherwise, an exception will be thrown.

If both vectors are view vectors, then this is the same as insert (position, other.begin(), other.end()) .

Otherwise, the elements from other will be inserted into this vector. This vector will take ownership of the elements, and the ownership mode of other will be changed to VIEW_ELEMENTS. Auxiliary data for these elements will be transferred, using move semantics if possible. (Thus, the auxiliary store for other may be modified and must not be locked.) Finally, the auxiliary store pointer for other will be cleared (but the store itself will not be deleted since it's not owned by the vector).

Note: this method may only be called using the most derived DataVector in the hierarchy.

◆ iter_swap()

static void DataVector< MissingETAssociation_v1 , BASE >::iter_swap ( iterator  a,
iterator  b 
)
staticinherited

Swap the referents of two DataVector iterators.

Parameters
aThe first iterator for the swap.
bThe second iterator for the swap.

◆ max_size()

size_type DataVector< MissingETAssociation_v1 , BASE >::max_size
noexceptinherited

Returns the size() of the largest possible collection.

◆ operator[]() [1/2]

ElementProxy DataVector< MissingETAssociation_v1 , BASE >::operator[] ( size_type  n)
inherited

Access an element, as an lvalue.

Parameters
nArray index to access.
Returns
Proxy to the element at n.

No bounds checking is done. Note that we return a proxy object rather than a reference; the proxy will handle deleting an owned element if it's assigned to.

◆ operator[]() [2/2]

const MissingETAssociation_v1 * DataVector< MissingETAssociation_v1 , BASE >::operator[] ( size_type  n) const
inherited

Access an element, as an rvalue.

Parameters
nArray index to access.
Returns
The element at n.

No bounds checking is done. Note that we return a const T* rather than a reference.

◆ ownPolicy()

SG::OwnershipPolicy DataVector< MissingETAssociation_v1 , BASE >::ownPolicy
inherited

Return the ownership policy setting for this container.

◆ pop_back() [1/2]

void DataVector< MissingETAssociation_v1 , BASE >::pop_back
inherited

Remove the last element from the collection.

If the container owns its elements, then the removed element will be deleted.

◆ pop_back() [2/2]

void DataVector< MissingETAssociation_v1 , BASE >::pop_back
inherited

◆ push_back() [1/2]

value_type DataVector< MissingETAssociation_v1 , BASE >::push_back ( std::unique_ptr< base_value_type pElem)
inherited

Add an element to the end of the collection.

Parameters
pElemThe element to add to the collection.

The container must be an owning container.

Note: this method may only be called using the most derived DataVector in the hierarchy.

Returns the pushed pointer.

◆ push_back() [2/2]

value_type DataVector< MissingETAssociation_v1 , BASE >::push_back ( value_type  pElem)
inherited

Add an element to the end of the collection.

Parameters
pElemThe element to add to the collection.

The container's ownership policy will determine if it takes ownership of the new element.

Note: this method may only be called using the most derived DataVector in the hierarchy.

Returns the pushed pointer.

◆ rbegin() [1/2]

const_reverse_iterator DataVector< MissingETAssociation_v1 , BASE >::rbegin
noexceptinherited

Return a const_reverse_iterator pointing past the end of the collection.

Returns
A const_reverse_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ rbegin() [2/2]

reverse_iterator DataVector< MissingETAssociation_v1 , BASE >::rbegin
noexceptinherited

Return a reverse_iterator pointing past the end of the collection.

Returns
A reverse_iterator.

Note that dereferencing the iterator will yield a proxy rather than a reference; the proxy will handle deleting an owned element if it's assigned to.

◆ rend() [1/2]

const_reverse_iterator DataVector< MissingETAssociation_v1 , BASE >::rend
noexceptinherited

Return a const_reverse_iterator pointing at the beginning of the collection.

Returns
A const_reverse_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ rend() [2/2]

reverse_iterator DataVector< MissingETAssociation_v1 , BASE >::rend
noexceptinherited

Return a reverse_iterator pointing at the beginning of the collection.

Returns
A reverse_iterator.

Note that dereferencing the iterator will yield a proxy rather than a reference; the proxy will handle deleting an owned element if it's assigned to.

◆ reserve()

void DataVector< MissingETAssociation_v1 , BASE >::reserve ( size_type  n)
inherited

Attempt to preallocate enough memory for a specified number of elements.

Parameters
nNumber of elements required.

◆ resize() [1/2]

void DataVector< MissingETAssociation_v1 , BASE >::resize ( size_type  sz)
inherited

Resizes the collection to the specified number of elements.

Parameters
szThe new size of the collection.

Note that this function differs from the standard in that it does not allow specifying the value of any inserted elements. They will always be 0.

If the container is shrunk, elements will be deleted as with erase().

◆ resize() [2/2]

void DataVector< MissingETAssociation_v1 , BASE >::resize ( size_type  sz)
inherited

◆ resortAux()

void DataVector< MissingETAssociation_v1 , BASE >::resortAux ( iterator  beg,
iterator  end 
)
inherited

Reset indices / reorder aux data after elements have been permuted.

Parameters
begStart of the range of elements to process.
endEnd of the range of elements to process.

Call this after some operation that has permuted the elements in the container (such as sort). The index information in the elements will be used to permute all auxiliary data in the same way. Finally, all the indices will be reset in the correct order.

◆ setJetConstituents() [1/3]

bool MissingETAssociationMap_v1::setJetConstituents ( const Jet pJet)

Set constituent map for a jet.

Returns
Boolean stating whether or not jet is linked to an association in the map.
Parameters
[in]Pointerto the jet

Definition at line 103 of file MissingETAssociationMap_v1.cxx.

104 {
105  std::vector<ElementLink<IParticleContainer> > jetconst = pJet->constituentLinks();
106  return this->setJetConstituents(jetconst,pJet);
107 }

◆ setJetConstituents() [2/3]

bool MissingETAssociationMap_v1::setJetConstituents ( const std::vector< ElementLink< IParticleContainer > > &  constLinks,
const Jet pJet 
)

Set constituent map for a jet.

Returns
Boolean stating whether or not jet is linked to an association in the map.
Parameters
[in]Pointerto the jet
[in]Non-modifiablevector of ElementLink to the jet constituents

Definition at line 109 of file MissingETAssociationMap_v1.cxx.

110 {
111  size_t jetIdx = findIndex(pJet);
112  return this->setJetConstituents(constLinks,jetIdx);
113 }

◆ setJetConstituents() [3/3]

bool MissingETAssociationMap_v1::setJetConstituents ( const std::vector< ElementLink< IParticleContainer > > &  constLinks,
size_t  jetIndex 
)

Set constituent map for a jet.

Returns
Boolean stating whether or not jet is linked to an association in the map.
Parameters
[in]Indexof the jet's association in the map
[in]Non-modifiablevector of ElementLink to the jet constituents

Definition at line 115 of file MissingETAssociationMap_v1.cxx.

116 {
117  bool setConst = (jetIndex!=MissingETBase::Numerical::invalidIndex());
118  if(setConst) {
119  for(std::vector<ElementLink<IParticleContainer> >::const_iterator iEL=constLinks.begin();
120  iEL!=constLinks.end(); ++iEL) {
121  m_jetConstLinks[*iEL] = jetIndex;
122  }
123  }
124  return setConst;
125 }

◆ setMostDerived()

virtual void DataVector< MissingETAssociation_v1 , BASE >::setMostDerived
protectedvirtualinherited

Set m_isMostDerived for this instance and clear it for all bases.

Called from testInsert if the test fails. The flag may not have been set if this container was made via copy construction, so set it appropriately now so we can test again.

◆ shift()

void DataVector< MissingETAssociation_v1 , BASE >::shift ( size_t  pos,
ptrdiff_t  offs 
)
privateinherited

Shift the auxiliary elements of the container.

Parameters
posThe starting index for the shift.
offsThe (signed) amount of the shift.

The elements in the container should have already been shifted; this operation will then adjust the element indices and also shift the elements in the vectors for all aux data items. offs may be either positive or negative.

If offs is positive, then the container is growing. The container size should be increased by offs, the element at pos moved to pos + offs, and similarly for following elements. The elements between pos and pos + offs should be default-initialized.

If offs is negative, then the container is shrinking. The element at pos should be moved to pos + offs, and similarly for following elements. The container should then be shrunk by -offs elements (running destructors as appropriate).

◆ shrink_to_fit()

void DataVector< MissingETAssociation_v1 , BASE >::shrink_to_fit
inherited

◆ size()

size_type DataVector< MissingETAssociation_v1 , BASE >::size
noexceptinherited

Returns the number of elements in the collection.

Could in principle be inherited from the base class, but redeclared in the derived class to avoid root6 bugs.

◆ sort() [1/2]

void DataVector< MissingETAssociation_v1 , BASE >::sort
inherited

Sort the container.

This just sorts by pointer value, so it's probably not very useful.

◆ sort() [2/2]

void DataVector< MissingETAssociation_v1 , BASE >::sort ( COMPARE  comp)
inherited

Sort the container with a user-specified comparison operator.

Parameters
compFunctional to compare two values.

◆ stdcont()

const PtrVector & DataVector< MissingETAssociation_v1 , BASE >::stdcont
inherited

Return the underlying std::vector of the container.

Returns
Reference to the std::vector actually holding the collection.

Note that DataVector<T>::stdcont does not necessarily return a std::vector<T*> if DataVector inheritance is being used.

◆ swap()

void DataVector< MissingETAssociation_v1 , BASE >::swap ( DataVector< MissingETAssociation_v1 > &  rhs)
inherited

Swap this collection with another.

Parameters
rhsThe collection with which to swap.

Ownership is swapped along with the collection content.

Note: this method may only be called using the most-derived DataVector in the hierarchy. The rhs must also be referenced using the most-derived DataVector.

◆ swapElement() [1/4]

void DataVector< MissingETAssociation_v1 , BASE >::swapElement ( iterator  pos,
std::unique_ptr< base_value_type newElem,
std::unique_ptr< base_value_type > &  oldElem 
)
inherited

Swap one element out of the container.

Parameters
posThe element in the container to swap.
newElemNew element to put in the container. May be 0.
oldElemReference to receive the element removed from the container.

Reference oldElem is initialized with element pos of the collection (no bounds checking). Then element index is set to newElem.

The collection must own its elements to use its interface. The collection will take ownership of newElem and will return ownership of oldElem.

Note: this method may only be called using the most derived DataList in the hierarchy.

◆ swapElement() [2/4]

void DataVector< MissingETAssociation_v1 , BASE >::swapElement ( iterator  pos,
value_type  newElem,
reference  oldElem 
)
inherited

Swap one element out of the container.

Parameters
posThe element in the container to swap.
newElemNew element to put in the container. May be 0.
oldElemReference to receive the element removed from the container.

Reference oldElem is initialized with element pos of the collection (no bounds checking). Then element index is set to newElem. If the collection owns its elements, then it will take ownership of newElem and release (without deleting) the element returned through oldElem.

Note: this method may only be called using the most derived DataList in the hierarchy.

◆ swapElement() [3/4]

void DataVector< MissingETAssociation_v1 , BASE >::swapElement ( size_type  index,
std::unique_ptr< base_value_type newElem,
std::unique_ptr< base_value_type > &  oldElem 
)
inherited

Swap one element out of the container.

Parameters
indexIndex of the element in the container to swap.
newElemNew element to put in the container. May be 0.
oldElemReference to receive the element removed from the container.

Reference oldElem is initialized with element index of the collection (no bounds checking). Then element index is set to newElem.

The collection must own its elements to use its interface. The collection will take ownership of newElem and will return ownership of oldElem.

Note: this method may only be called using the most derived DataVector in the hierarchy.

◆ swapElement() [4/4]

void DataVector< MissingETAssociation_v1 , BASE >::swapElement ( size_type  index,
value_type  newElem,
reference  oldElem 
)
inherited

Swap one element out of the container.

Parameters
indexIndex of the element in the container to swap.
newElemNew element to put in the container. May be 0.
oldElemReference to receive the element removed from the container.

Reference oldElem is initialized with element index of the collection (no bounds checking). Then element index is set to newElem. If the collection owns its elements, then it will take ownership of newElem and release (without deleting) the element returned through oldElem.

Note: this method may only be called using the most derived DataVector in the hierarchy.

◆ testInsert()

void DataVector< MissingETAssociation_v1 , BASE >::testInsert ( const char *  op)
inherited

Test if we can insert; raise an exception if not.

Parameters
opDescription of the attempted operation.

In order to maintain type-safety, we can only allow insertions using the most-derived instance of DataVector. This checks this by testing the m_isMostDerived, which is set by the constructors to true only for the most-derived instance. If the test fails, we call to potentially out-of-line code to continue.

◆ testInsertOol()

void DataVector< MissingETAssociation_v1 , BASE >::testInsertOol ( const char *  op)
inherited

Test if we can insert; raise an exception if not.

Parameters
opDescription of the attempted operation.

This continues the test of testInsert. There is one case where m_isMostDerived may not be set correctly. If this container was made via copy construction, then all the m_isMostDerived flags will be false. So we call setMostDerived to set the flags correctly and test again. If the test fails again, then we raise an exception.

Member Data Documentation

◆ has_virtual

const bool DataVector< MissingETAssociation_v1 , BASE >::has_virtual
staticinherited

This is true for any DataVector class if we need to use virtual derivation to get to the base DataVector class.

Definition at line 801 of file DataVector.h.

◆ m_deleter

ROOT_SELECTION_NS::MemberAttributes< kTransient > DataVector< MissingETAssociation_v1 , BASE >::m_deleter
inherited

Definition at line 3436 of file DataVector.h.

◆ m_isMostDerived [1/2]

SG::IsMostDerivedFlag DataVector< MissingETAssociation_v1 , BASE >::m_isMostDerived
privateinherited

This flag is true if this DV instance is the most-derived one.

We set this to true in the top-level constructor; the constructor then calls clearMostDerived on the base classes.

Definition at line 2038 of file DataVector.h.

◆ m_isMostDerived [2/2]

ROOT_SELECTION_NS::MemberAttributes< kTransient > DataVector< MissingETAssociation_v1 , BASE >::m_isMostDerived
inherited

Automatically generate dictionary for contained vector.

Declare the automatically created variable transient

Definition at line 3435 of file DataVector.h.

◆ m_jetConstLinks

std::map<ElementLink<IParticleContainer>, size_t> xAOD::MissingETAssociationMap_v1::m_jetConstLinks
protected

Map jet constituents to the jet index.

Definition at line 157 of file MissingETAssociationMap_v1.h.

◆ m_ownPolicy

ROOT_SELECTION_NS::MemberAttributes< kTransient > DataVector< MissingETAssociation_v1 , BASE >::m_ownPolicy
inherited

We do not want to save this.

The P->T converter should decide the ownership mode.

Definition at line 3440 of file DataVector.h.

◆ must_own

constexpr bool DataVector< MissingETAssociation_v1 , BASE >::must_own
staticconstexprinherited

If true, then this type must own its contents.

Definition at line 859 of file DataVector.h.


The documentation for this class was generated from the following files:
xAOD::MissingETAssociationMap_v1::setJetConstituents
bool setJetConstituents(const Jet *pJet)
Set constituent map for a jet.
Definition: MissingETAssociationMap_v1.cxx:103
xAOD::MissingETAssociationMap_v1::findIndexByJetConst
size_t findIndexByJetConst(const IParticle *pConst) const
Definition: MissingETAssociationMap_v1.cxx:161
xAOD::MissingETAssociationMap_v1::m_jetConstLinks
std::map< ElementLink< IParticleContainer >, size_t > m_jetConstLinks
Map jet constituents to the jet index.
Definition: MissingETAssociationMap_v1.h:157
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
MissingETBase::UsageHandler::TruthParticle
@ TruthParticle
Truth particle based.
Definition: MissingETCompositionBase.h:189
DataVector< MissingETAssociation_v1 >::iterator
DataModel_detail::iterator< DataVector > iterator
Standard iterator.
Definition: DataVector.h:841
DataVector< MissingETAssociation_v1 >::const_iterator
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
Definition: DataVector.h:837
ObjectType
ObjectType
Definition: BaseObject.h:11
xAOD::MissingETAssociation_v1
MET association descriptor contains object links and corresponding parameters.
Definition: MissingETAssociation_v1.h:29
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
DataVector< MissingETAssociation_v1 >::rend
const_reverse_iterator rend() const noexcept
Return a const_reverse_iterator pointing at the beginning of the collection.
index
Definition: index.py:1
TruthParticle
HepMC::GenParticle TruthParticle
Definition: Simulation/G4Sim/MCTruth/MCTruth/TruthEvent.h:13
xAOD::MissingETAssociation_v1::containsSignal
bool containsSignal(const IParticle *pSig) const
Check if this signal object matches the constituents of any contributing objects.
Definition: MissingETAssociation_v1.cxx:804
MissingETBase::Numerical::invalidIndex
static size_t invalidIndex()
Access invalid index indicator.
Definition: MissingETBase.h:103
MissingETBase::UsageHandler::OnlyCluster
@ OnlyCluster
CaloCluster based only.
Definition: MissingETCompositionBase.h:184
xAOD::MissingETAssociationMap_v1::f_findConst
const_iterator f_findConst(const Jet *pJet) const
Find contribution by reference jet pointer.
Definition: MissingETAssociationMap_v1.cxx:72
xAOD::MissingETAssociation_v1::testPolicy
static bool testPolicy(const xAOD::IParticle &part, MissingETBase::UsageHandler::Policy p)
Definition: MissingETAssociation_v1.cxx:875
xAOD::CaloCluster
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Definition: Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloCluster.h:19
ConstDataVector::asDataVector
const DV * asDataVector() const
Return a pointer to this object, as a const DataVector.
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:112
xAOD::TrackParticle
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Definition: Event/xAOD/xAODTracking/xAODTracking/TrackParticle.h:13
DataVector< MissingETAssociation_v1 >::reverse_iterator
std::reverse_iterator< iterator > reverse_iterator
Standard reverse_iterator.
Definition: DataVector.h:851
xAOD::MissingETAssociationMap_v1::findIndex
size_t findIndex(const Jet *pJet) const
Definition: MissingETAssociationMap_v1.cxx:60
MissingETBase::Types::const_signal_vector_t
ConstDataVector< xAOD::IParticleContainer > const_signal_vector_t
Definition: MissingETCompositionBase.h:50
xAOD::FlowElement
FlowElement_v1 FlowElement
Definition of the current "pfo version".
Definition: FlowElement.h:16
python.BuildSignatureFlags.sig
sig
Definition: BuildSignatureFlags.py:215
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
xAODType::ParticleFlow
@ ParticleFlow
The object is a particle-flow object.
Definition: ObjectType.h:41
xAOD::MissingETAssociationMap_v1::findByJetConst
const_iterator findByJetConst(const IParticle *pConst) const
Find association from jet constituent.
Definition: MissingETAssociationMap_v1.cxx:127
xAOD::MissingETAssociationMap_v1::getMiscAssociation
const MissingETAssociation_v1 * getMiscAssociation() const
Get an association for miscellaneous objects not associated to jets.
Definition: MissingETAssociationMap_v1.cxx:186
SG::AuxElement::index
size_t index() const
Return the index of this element within its container.
FEHelpers::signalToXAODType
xAOD::Type::ObjectType signalToXAODType(const xAOD::FlowElement &fe)
Definition: FEHelpers.cxx:178
DataVector< MissingETAssociation_v1 >
DataVector< MissingETAssociation_v1 >::rbegin
const_reverse_iterator rbegin() const noexcept
Return a const_reverse_iterator pointing past the end of the collection.
python.L1.Config.LegacyTopoMergerMap.signals
signals
Definition: LegacyTopoMergerMap.py:13
MissingETBase::UsageHandler::TrackCluster
@ TrackCluster
Both cluster and track based.
Definition: MissingETCompositionBase.h:186
MissingETBase::UsageHandler::AllCalo
@ AllCalo
Inclusive except tracks.
Definition: MissingETCompositionBase.h:183
xAOD::MissingETAssociationMap_v1::f_find
iterator f_find(const Jet *pJet)
Definition: MissingETAssociationMap_v1.cxx:80
DataVector< MissingETAssociation_v1 >::const_reverse_iterator
std::reverse_iterator< const_iterator > const_reverse_iterator
Standard const_reverse_iterator.
Definition: DataVector.h:846
MissingETBase::UsageHandler::OnlyTrack
@ OnlyTrack
Track based only.
Definition: MissingETCompositionBase.h:185
ConstDataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
MissingETBase::UsageHandler::ParticleFlow
@ ParticleFlow
Particle Flow Object based.
Definition: MissingETCompositionBase.h:188
DataVector< MissingETAssociation_v1 >::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
DeMoScan.index
string index
Definition: DeMoScan.py:362
ConstDataVector
DataVector adapter that acts like it holds const pointers.
Definition: ConstDataVector.h:76
DeMoScan.first
bool first
Definition: DeMoScan.py:534
xAOD::MissingETAssociation_v1::checkUsage
bool checkUsage(const MissingETAssociationHelper &helper, const IParticle *pSig, MissingETBase::UsageHandler::Policy p) const
Check if this signal object matches the constituents of any flagged contributing objects.
Definition: MissingETAssociation_v1.cxx:818
xAOD::JetConstituentVector::iterator
Definition: JetConstituentVector.h:121
SG::AuxElement::container
const SG::AuxVectorData * container() const
Return the container holding this element.
DataVector< MissingETAssociation_v1 >::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
xAOD::FlowElement_v1
A detector object made of other lower level object(s)
Definition: FlowElement_v1.h:25