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 MissingET * | retrieveMissingET (const std::string &name) const |
Retrieve MissingET object by name. | |
const MissingET * | retrieveMissingET (MissingETBase::Types::bitmask_t src, bool excl=false) const |
Retrieve MissingET object by source indicator. | |
const MissingET * | retrieveMissingET (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 IParticle * | particle_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 MissingET * | f_retrieveMissingETExcl (MissingETBase::Types::bitmask_t src) const |
const MissingET * | f_retrieveMissingETExcl (MissingETBase::Types::bitmask_t src, MissingETBase::Types::bitmask_t sw) const |
const MissingET * | f_retrieveMissingETIncl (MissingETBase::Types::bitmask_t src) const |
const MissingET * | f_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. |
typedef MissingETBase::Types::indexedlink_t xAOD::MissingETComponentMap_v1::indexedlink_t [protected] |
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.
typedef std::map<particle_key_t,indexedlink_t> xAOD::MissingETComponentMap_v1::particle_map_t [protected] |
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.
typedef std::vector<indexedlink_t> xAOD::MissingETComponentMap_v1::signal_vector_t [protected] |
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).
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.
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.inout] | sig reference to modifiable list of objects. | |
[in] | p | tags signal type to be checked to usage (optional, default is MissingETBase::UsageHandler::OnlyCluster). |
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.
true
if the referenced signal object is already used.[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.
first | Iterator pointing to the first element to be removed. | |
last | Iterator pointing one past the last element to be removed. |
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.
position | Iterator pointing to the element to be removed. |
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.
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.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). |
bool MissingETComponentMap_v1::f_checkObjectUsage | ( | MissingETBase::Types::object_vector_t & | sig, | |
signal_vector_t & | signalLinks | |||
) | const [protected] |
Check signal object usage.
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.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). |
bool xAOD::MissingETComponentMap_v1::f_extractSignal | ( | MissingETBase::Types::object_vector_t & | sig | ) | const [inline, protected] |
Signal type extractor.
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.SIGNAL | signal type of extracted objects. |
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).
[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).
[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.
[in] | src | bit pattern with the requested source indicator. |
MissingETComponentMap_v1::iterator MissingETComponentMap_v1::find | ( | const std::string & | name | ) |
Find MET object referenced by name.
[in] | name | reference to non-modifiable string storing the name of the xAOD::MissingET object searched for. |
MissingETComponentMap_v1::iterator MissingETComponentMap_v1::find | ( | const MissingET * | pMET | ) |
Find MET object referenced by pointer.
[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.
[in] | src | bit pattern with the requested source indicator. |
MissingETComponentMap_v1::const_iterator MissingETComponentMap_v1::find | ( | const std::string & | name | ) | const |
Find MET object referenced by name.
[in] | name | reference to non-modifiable string storing the name of the xAOD::MissingET object searched for. |
MissingETComponentMap_v1::const_iterator MissingETComponentMap_v1::find | ( | const MissingET * | pMET | ) | const |
Find MET object referenced by pointer.
[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.
[in] | sw | bit pattern defining the status of the MET contribution linking to the requested MET object. |
const MissingET * MissingETComponentMap_v1::retrieveMissingET | ( | MissingETBase::Types::bitmask_t | src, | |
bool | excl = false | |||
) | const |
Retrieve MissingET object by source indicator.
[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.
[in] | name | reference to non-modifiable dataword holding the name of the requested MET object. |
void xAOD::MissingETComponentMap_v1::sort | ( | COMPARE | comp | ) | [inline] |
Sort the container with a user-specified comparison operator.
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 >.
signal_vector_t xAOD::MissingETComponentMap_v1::m_clusterLinks [mutable, protected] |
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).
particle_map_t xAOD::MissingETComponentMap_v1::m_particleLinks [mutable, protected] |
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.
signal_vector_t xAOD::MissingETComponentMap_v1::m_trackLinks [mutable, protected] |
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).