xAOD::MissingETComponentMap_v1 Class Reference

Inheritance diagram for xAOD::MissingETComponentMap_v1:
DataVector< MissingETComponent_v1 > KeepFirstTemplateArguments Base

List of all members.

Public Member Functions

 MissingETComponentMap_v1 (SG::OwnershipPolicy own=SG::OWN_ELEMENTS, SG::IndexTrackingPolicy trackIndices=SG::DEFAULT_TRACK_INDICES)
 Default constructor.
 MissingETComponentMap_v1 (MissingETComponentMap_v1::iterator first, MissingETComponentMap_v1::iterator last, SG::OwnershipPolicy own=SG::OWN_ELEMENTS, SG::IndexTrackingPolicy trackIndices=SG::DEFAULT_TRACK_INDICES)
 Constructor from iterators.
virtual ~MissingETComponentMap_v1 ()
 Base class destructor.
void resize (size_type sz)
void pop_back ()
void clear ()
void sort ()
 Sort the container.
template<class COMPARE >
void sort (COMPARE comp)
 Sort the container with a user-specified comparison operator.
void clear (SG::OwnershipPolicy ownPolicy)
void clear (SG::OwnershipPolicy ownPolicy, SG::IndexTrackingPolicy trackIndices)
iterator erase (iterator position)
 Remove element at a given position.
iterator erase (iterator first, iterator last)
 Remove a range of elements.
Find methods



const_iterator find (const MissingET *pMET) const
 Find MET object referenced by pointer.
const_iterator find (const std::string &name) const
 Find MET object referenced by name.
const_iterator find (MissingETBase::Types::bitmask_t src) const
 Find MET object referenced by source indicator.
iterator find (const MissingET *pMET)
 Find MET object referenced by pointer.
iterator find (const std::string &name)
 Find MET object referenced by name.
iterator find (MissingETBase::Types::bitmask_t src)
 Find MET object referenced by source indicator.
size_t findIndex (const MissingET *pMET) const
size_t findIndex (const std::string &name) const
size_t findIndex (MissingETBase::Types::bitmask_t sw) const
const MissingETretrieveMissingET (const std::string &name) const
 Retrieve MissingET object by name.
const MissingETretrieveMissingET (MissingETBase::Types::bitmask_t src, bool excl=false) const
 Retrieve MissingET object by source indicator.
const MissingETretrieveMissingET (MissingETBase::Types::bitmask_t src, MissingETBase::Types::bitmask_t sw, bool excl=false) const
 Retrieve MissingET object by source indicator and status word.
Client interactions with local cache



bool checkUsage (const IParticle *pPart, MissingETBase::UsageHandler::Policy p=MissingETBase::UsageHandler::OnlyCluster) const
 Check if a given object is already used in MET.
bool checkUsage (MissingETBase::Types::object_vector_t &sig, MissingETBase::UsageHandler::Policy p=MissingETBase::UsageHandler::OnlyCluster) const
 Check a list of objects for prior usage in MET reconstruction.
bool addObjects (const MissingET *pMET, const IParticle *pPart, const MissingETBase::Types::object_vector_t &signalList, MissingETBase::UsageHandler::Policy p=MissingETBase::UsageHandler::OnlyCluster)
bool setClusters (const MissingET *pMET, const IParticle *pPart, const MissingETBase::Types::object_vector_t &signalList)
bool setTracks (const MissingET *pMET, const IParticle *pPart, const MissingETBase::Types::object_vector_t &signalList)
bool setObjects (const MissingET *pMET, const IParticle *pPart, const MissingETBase::Types::object_vector_t &objectList)
size_t getComponentIndex (const IParticle *pPart) const
size_t getObjectIndex (const IParticle *pPart) const

Protected Types

Internal types for local cache handling



typedef size_t signal_key_t
 Key type for signals (clusters, tracks) is type of index in container.
typedef const IParticleparticle_key_t
 Key type for physics objects is the base pointer type of these objects.
typedef
MissingETBase::Types::indexedlink_t 
indexedlink_t
 Type for the description of the link locations.
typedef std::vector
< indexedlink_t
signal_vector_t
 Indexed list type for signal object link locations.
typedef std::map
< particle_key_t,
indexedlink_t
particle_map_t
 Map type for physics object.

Protected Member Functions

iterator f_find (const MissingET *pMET)
iterator f_find (const std::string &name)
iterator f_find (MissingETBase::Types::bitmask_t src)
void f_setCache (iterator fCont)
void resetCache () const
const MissingETf_retrieveMissingETExcl (MissingETBase::Types::bitmask_t src) const
const MissingETf_retrieveMissingETExcl (MissingETBase::Types::bitmask_t src, MissingETBase::Types::bitmask_t sw) const
const MissingETf_retrieveMissingETIncl (MissingETBase::Types::bitmask_t src) const
const MissingETf_retrieveMissingETIncl (MissingETBase::Types::bitmask_t src, MissingETBase::Types::bitmask_t sw) const
Internal functions for local cache handling



template<int N>
size_t f_getIndex (const IParticle *pPart) const
Internal object lookup cache handlers



bool f_checkObjectUsage (MissingETBase::Types::object_vector_t &sig, signal_vector_t &signalLinks) const
 Check signal object usage.
bool f_checkObjectUsage (MissingETBase::Types::object_vector_t &objects, particle_map_t &physicsLinks) const
 Check physics object usage.
void f_fillLookupCache ()
 Fill the lookup cache from the composition map data content.
void f_clearLookupCache ()
 Clear the lookup cache.
void f_setupLookupCache (signal_vector_t &signalLinks, size_t reserve)
 Set up the signal object lookup.
template<int OBJTYPE>
bool f_extractSignal (MissingETBase::Types::object_vector_t &sig) const
 Signal type extractor.
Internal find methods for constant access



const_iterator f_findConst (const MissingET *pMET) const
 Find contribution by MET object pointer.
const_iterator f_findConst (const std::string &name) const
 Find contribution by MET object name.
const_iterator f_findConst (MissingETBase::Types::bitmask_t src) const
void f_setConstCache (const_iterator fCont) const

Protected Attributes

Internal data for local cache



signal_vector_t m_clusterLinks
 Store for linked cluuster signal information lookup.
signal_vector_t m_trackLinks
 Store for linked track signal information lookup.
particle_map_t m_particleLinks
 Store for linked physics object information lookup.

Member Typedef Documentation

Type for the description of the link locations.

This is a two-component type which allows holding the index of the xAOD::MissingETComponent_v1 object a physics or signal object is linked from, and the index of this linked object in the contributing object list.

Map type for physics object.

In case of physics objects, a map look-up is implemented as the lack of a common container for these objects does not allow using the index as a unique key. The object pointer is used instead, and the look-up is provided by a standard map (binary search). Typically, the number of entries in this map is rather small (much less than 100) so that this storage technology should not introduce performance problems.

Indexed list type for signal object link locations.

In case of a signal (xAOD::CaloCluster, xAOD::TrackParticle) object look-up, the index of these objects can be directly used to check if they have already been used in the actual MET composition (random access in this index parallel store - with respect to the actual xAOD::CaloClusterContainer and the xAOD::TrackParticleContainer).


Member Function Documentation

bool MissingETComponentMap_v1::checkUsage ( MissingETBase::Types::object_vector_t sig,
MissingETBase::UsageHandler::Policy  p = MissingETBase::UsageHandler::OnlyCluster 
) const

Check a list of objects for prior usage in MET reconstruction.

Returns:
true if any of the objects in the list has already been used in another MET contribution. The iput object list contains pointer references to objects which have not yet been used.
Parameters:
inout] sig reference to modifiable list of objects.
[in] p tags signal type to be checked to usage (optional, default is MissingETBase::UsageHandler::OnlyCluster).
Note:
The list of signals on input can contain various signal (object) types. The modified list contains only references to objects with types determined by the MissingETBase::UsageHandler::Policy. By default, those are clusters.
Usage is always measured with respect to the type given by MissingETBase::UsageHandler::Policy. For example, if the input signal list has mixed object types, its content on return contains only references to objects of the type determined by the MissingETBase::UsageHandler::Policy. By default, those are clusters. This modification of the input list does not indicate that any clusters in this list have already been used. This is done by the return value.
bool MissingETComponentMap_v1::checkUsage ( const IParticle pPart,
MissingETBase::UsageHandler::Policy  p = MissingETBase::UsageHandler::OnlyCluster 
) const

Check if a given object is already used in MET.

Returns:
true if the referenced signal object is already used.
Parameters:
[in] pPart generic (base class) pointer to signal object (xAOD::CaloCluster or xAOD::TrackParticle).
[in] p tags signal type to be checked to usage (optional, default is MissingETBase::UsageHandler::OnlyCluster).
xAOD::MissingETComponentMap_v1::iterator xAOD::MissingETComponentMap_v1::erase ( iterator  first,
iterator  last 
) [inline]

Remove a range of elements.

Parameters:
first Iterator pointing to the first element to be removed.
last Iterator 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.

Reimplemented from DataVector< MissingETComponent_v1 >.

xAOD::MissingETComponentMap_v1::iterator xAOD::MissingETComponentMap_v1::erase ( iterator  position  )  [inline]

Remove element at a given position.

Parameters:
position Iterator 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.

Reimplemented from DataVector< MissingETComponent_v1 >.

bool MissingETComponentMap_v1::f_checkObjectUsage ( MissingETBase::Types::object_vector_t objects,
particle_map_t physicsLinks 
) const [protected]

Check physics object usage.

Returns:
true if any of the physics objects in the input list is already marked as used. In addition, all used objects are removed from the input (physics) object list. If none of the objects in this list is already used, false is returned.
Parameters:
inout] objects reference to modifiable list of physics objects to be checked for usage in MET reconstruction.
[in] physicsLinks reference to modifiable map of link descriptors for physics objects already used (means linked to a MET contribution).
Note:
This method does not add yet unused physics objects to the signal link list, as this decision is controlled by the specific MET reconstruction tool.
bool MissingETComponentMap_v1::f_checkObjectUsage ( MissingETBase::Types::object_vector_t sig,
signal_vector_t signalLinks 
) const [protected]

Check signal object usage.

Returns:
true if any of the signal objects in the inout list is already marked as used. In addition, all used objects are removed from the input (signal) object list. If none of the objects in this list is already used, false is returned.
Parameters:
inout] sig reference to modifiable list of signal objects to be checked for usage in MET reconstruction.
[in] signalLinks reference to modifiable list of signals already used (means linked to a MET contribution).
Note:
This method does not add yet unused signal objects to the signal link list, as this decision is controlled by the specific MET reconstruction tool.
template<int OBJTYPE>
bool xAOD::MissingETComponentMap_v1::f_extractSignal ( MissingETBase::Types::object_vector_t sig  )  const [inline, protected]

Signal type extractor.

Returns:
true if input object list contains requested signal type, else false. The input object list is filtered on return, meaning it only contains objects of the requested type. A return of false thus indicates an empty list.
Template Parameters:
SIGNAL signal type of extracted objects.
Parameters:
inout] sig reference to modifiable list of signal objects to be checked for usage in MET reconstruction.
MissingETComponentMap_v1::const_iterator MissingETComponentMap_v1::f_findConst ( const std::string &  name  )  const [protected]

Find contribution by MET object name.

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

Returns:
Valid const iterator referencing the MissingETComponent_v1 object linking ot the requested MET object. If this MET object is not in the list, MissingETComponentMap_v1::end() is returned.
Parameters:
[in] name reference to the non-modifiable data word storing the name of the requested MET object.
MissingETComponentMap_v1::const_iterator MissingETComponentMap_v1::f_findConst ( const MissingET pMET  )  const [protected]

Find contribution by MET object pointer.

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

Returns:
Valid const iterator referencing the MissingETComponent_v1 object linking ot the requested MET object. If this MET object is not in the list, MissingETComponentMap_v1::end() is returned.
Parameters:
[in] pMET pointer to non-modifiable MissingET object to be found in the composition map.
MissingETComponentMap_v1::iterator MissingETComponentMap_v1::find ( MissingETBase::Types::bitmask_t  src  ) 

Find MET object referenced by source indicator.

Returns:
Iterator referencing a modifiable xAOD::MissingETComponent_v1 object linking to the given MET object. If the MET object is not in the ccomposition map, an end iterator is returned.
Parameters:
[in] src bit pattern with the requested source indicator.
Note:
It is generally expected that the source of the xAOD::MissingET object is unique for this composition. If not, the iterator referencing the first xAOD::MissingETComponent_v1 object containing a link to a xAOD::MissingET object with the requested source is returned.
MissingETComponentMap_v1::iterator MissingETComponentMap_v1::find ( const std::string &  name  ) 

Find MET object referenced by name.

Returns:
Iterator referencing a modifiable xAOD::MissingETComponent_v1 object linking to the given MET object. If the MET object is not in the ccomposition map, an end iterator is returned.
Parameters:
[in] name reference to non-modifiable string storing the name of the xAOD::MissingET object searched for.
Note:
It is generally expected that the name of the xAOD::MissingET object is unique for this composition. If not, the iterator referencing the first xAOD::MissingETComponent_v1 object containing a link to a xAOD::MissingET object with the requested name is returned.
MissingETComponentMap_v1::iterator MissingETComponentMap_v1::find ( const MissingET pMET  ) 

Find MET object referenced by pointer.

Returns:
Iterator referencing a modifiable xAOD::MissingETComponent_v1 object linking to the given MET object. If the MET object is not in the ccomposition map, an end iterator is returned.
Parameters:
[in] pMET pointer to the xAOD::MissingET object searched for in the composition map.
MissingETComponentMap_v1::const_iterator MissingETComponentMap_v1::find ( MissingETBase::Types::bitmask_t  src  )  const

Find MET object referenced by source indicator.

Returns:
Const iterator referencing a non-modifiable xAOD::MissingETComponent_v1 object linking to the given MET object. If the MET object is not in the ccomposition map, an end const iterator is returned.
Parameters:
[in] src bit pattern with the requested source indicator.
Note:
It is generally expected that the source of the xAOD::MissingET object is unique for this composition. If not, the iterator referencing the first xAOD::MissingETComponent_v1 object containing a link to a xAOD::MissingET object with the requested source is returned.
MissingETComponentMap_v1::const_iterator MissingETComponentMap_v1::find ( const std::string &  name  )  const

Find MET object referenced by name.

Returns:
Const iterator referencing a non-modifiable xAOD::MissingETComponent_v1 object linking to the given MET object. If the MET object is not in the ccomposition map, an end const iterator is returned.
Parameters:
[in] name reference to non-modifiable string storing the name of the xAOD::MissingET object searched for.
Note:
It is generally expected that the name of the xAOD::MissingET object is unique for this composition. If not, the iterator referencing the first xAOD::MissingETComponent_v1 object containing a link to a xAOD::MissingET object with the requested name is returned.
MissingETComponentMap_v1::const_iterator MissingETComponentMap_v1::find ( const MissingET pMET  )  const

Find MET object referenced by pointer.

Returns:
Const iterator referencing a non-modifiable xAOD::MissingETComponent_v1 object linking to the given MET object. If the MET object is not in the ccomposition map, an end const iterator is returned.
Parameters:
[in] pMET pointer to the xAOD::MissingET object searched for in the composition map.
const MissingET * MissingETComponentMap_v1::retrieveMissingET ( MissingETBase::Types::bitmask_t  src,
MissingETBase::Types::bitmask_t  sw,
bool  excl = false 
) const

Retrieve MissingET object by source indicator and status word.

Parameters:
[in] sw bit pattern defining the status of the MET contribution linking to the requested MET object.
Note:
While the MissingET object name should be unique within a given MET composition, MET objects can have the same source with a different contribution status. This method supports a query for a MET object with a given source/status combination.
const MissingET * MissingETComponentMap_v1::retrieveMissingET ( MissingETBase::Types::bitmask_t  src,
bool  excl = false 
) const

Retrieve MissingET object by source indicator.

Returns:
Valid pointer to MissingET typed object representing a MET term. If the requested object cannot be found, NULL is returned.
Parameters:
[in] src bit pattern defining the source of the requested MET object.
[in] excl flag controlling the bit pattern test - if false, the pointer to the first MET object found with a source indicator containing the requested bit pattern is returned; if true, the first MET object found with exactly the requested bit pattern as a source indicator is returned.
const MissingET * MissingETComponentMap_v1::retrieveMissingET ( const std::string &  name  )  const

Retrieve MissingET object by name.

Returns:
Valid pointer to MissingET typed object representing a MET term. If the requested object cannot be found, NULL is returned.
Parameters:
[in] name reference to non-modifiable dataword holding the name of the requested MET object.
template<class COMPARE >
void xAOD::MissingETComponentMap_v1::sort ( COMPARE  comp  )  [inline]

Sort the container with a user-specified comparison operator.

Parameters:
comp Functional to compare two values.

Reimplemented from DataVector< MissingETComponent_v1 >.

void xAOD::MissingETComponentMap_v1::sort (  )  [inline]

Sort the container.

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

Reimplemented from DataVector< MissingETComponent_v1 >.


Member Data Documentation

Store for linked cluuster signal information lookup.

In case of a signal (xAOD::CaloCluster, xAOD::TrackParticle) object look-up, the index of these objects can be directly used to check if they have already been used in the actual MET composition (random access in this index parallel store - with respect to the actual xAOD::CaloClusterContainer and the xAOD::TrackParticleContainer).

Store for linked physics object information lookup.

In case of physics objects, a map look-up is implemented as the lack of a common container for these objects does not allow using the index as a unique key. The object pointer is used instead, and the look-up is provided by a standard map (binary search). Typically, the number of entries in this map is rather small (much less than 100) so that this storage technology should not introduce performance problems.

Store for linked track signal information lookup.

In case of a signal (xAOD::CaloCluster, xAOD::TrackParticle) object look-up, the index of these objects can be directly used to check if they have already been used in the actual MET composition (random access in this index parallel store - with respect to the actual xAOD::CaloClusterContainer and the xAOD::TrackParticleContainer).


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 15 Apr 2017 for RootCore Packages by  doxygen 1.6.1