Pandora
Pandora source code navigator
|
TrackManager class. More...
#include "TrackManager.h"
Public Member Functions | |
TrackManager (const Pandora *const pPandora) | |
Constructor. | |
~TrackManager () | |
Destructor. | |
template<> | |
bool | IsAvailable (const Track *const pTrack) const |
template<> | |
bool | IsAvailable (const TrackList *const pTrackList) const |
template<> | |
void | SetAvailability (const Track *const pTrack, bool isAvailable) const |
template<> | |
void | SetAvailability (const TrackList *const pTrackList, bool isAvailable) const |
Protected Types | |
typedef Manager< Track >::ObjectList | ObjectList |
typedef std::map< std::string, ObjectList * > | NameToListMap |
typedef std::unordered_map< const Algorithm *, AlgorithmInfo > | AlgorithmInfoMap |
Protected Member Functions | |
virtual StatusCode | CreateInputList () |
Create the input list (accessible to algorithms), using objects created by client application. | |
virtual StatusCode | CreateTemporaryListAndSetCurrent (const Algorithm *const pAlgorithm, const ObjectList &objectList, std::string &temporaryListName) |
Change the current list to a specified temporary list. | |
virtual StatusCode | CreateTemporaryListAndSetCurrent (const Algorithm *const pAlgorithm, std::string &temporaryListName) |
Create a temporary list associated with a particular algorithm. | |
virtual StatusCode | SaveList (const std::string &listName, const ObjectList &objectList) |
Save a list of objects in a list with a specified name; create new list if required. | |
virtual StatusCode | AddObjectsToList (const std::string &listName, const ObjectList &objectList) |
Add objects to a saved list with a specified name. | |
virtual StatusCode | RemoveObjectsFromList (const std::string &listName, const ObjectList &objectList) |
Remove objects from a saved list. | |
virtual StatusCode | RenameList (const std::string &oldListName, const std::string &newListName) |
Rename a saved list, altering its saved name from a specified old list name to a specified new list name. | |
virtual StatusCode | CreateInitialLists () |
Create initial lists. | |
virtual StatusCode | GetList (const std::string &listName, const ObjectList *&pObjectList) const |
Get a list. | |
virtual StatusCode | GetCurrentList (const ObjectList *&pObjectList, std::string &listName) const |
Get the current list. | |
virtual StatusCode | GetCurrentListName (std::string &listName) const |
Get the current list name. | |
virtual StatusCode | GetAlgorithmInputList (const Algorithm *const pAlgorithm, const ObjectList *&pObjectList, std::string &listName) const |
Get the algorithm input list. | |
virtual StatusCode | GetAlgorithmInputListName (const Algorithm *const pAlgorithm, std::string &listName) const |
Get the algorithm track list name. | |
virtual StatusCode | ResetCurrentListToAlgorithmInputList (const Algorithm *const pAlgorithm) |
Reset the current list to the algorithm input list. | |
virtual StatusCode | ReplaceCurrentAndAlgorithmInputLists (const Algorithm *const pAlgorithm, const std::string &listName) |
Replace the current and algorithm input lists with a pre-existing list. | |
virtual StatusCode | DropCurrentList (const Algorithm *const pAlgorithm) |
Drop the current list, returning the current list to its default empty/null state. | |
virtual StatusCode | RegisterAlgorithm (const Algorithm *const pAlgorithm) |
Register an algorithm with the manager. | |
virtual StatusCode | ResetAlgorithmInfo (const Algorithm *const pAlgorithm, bool isAlgorithmFinished) |
Remove temporary lists and reset the current list to that when algorithm was initialized. | |
virtual StatusCode | ResetForNextEvent () |
Reset the manager. | |
virtual T * | Modifiable (const T *const pT) const |
Access a modifiable object, when provided with address to const object. | |
Protected Attributes | |
const std::string | m_inputListName |
The name of the input list. | |
const std::string | m_nullListName |
The name of the default empty (NULL) list. | |
const Pandora *const | m_pPandora |
The associated pandora object. | |
NameToListMap | m_nameToListMap |
The name to list map. | |
AlgorithmInfoMap | m_algorithmInfoMap |
The algorithm info map. | |
std::string | m_currentListName |
The name of the current list. | |
StringSet | m_savedLists |
The set of saved lists. | |
Private Types | |
typedef std::unordered_map< Uid, const Track * > | UidToTrackMap |
typedef std::unordered_multimap< Uid, Uid > | TrackRelationMap |
Private Member Functions | |
StatusCode | Create (const object_creation::Track::Parameters ¶meters, const Track *&pTrack, const ObjectFactory< object_creation::Track::Parameters, object_creation::Track::Object > &factory) |
Create track. | |
template<typename T > | |
bool | IsAvailable (const T *const pT) const |
Is a track, or a list of tracks, available to add to a particle flow object. | |
template<typename T > | |
void | SetAvailability (const T *const pT, bool isAvailable) const |
Set availability of a track, or a list of tracks, to be added to a particle flow object. | |
StatusCode | EraseAllContent () |
Erase all track manager content. | |
StatusCode | MatchTracksToMCPfoTargets (const UidToMCParticleWeightMap &trackToPfoTargetsMap) |
Match tracks to their correct mc particles for particle flow. | |
StatusCode | RemoveAllMCParticleRelationships () |
Remove all mc particle associations that have been registered with tracks. | |
StatusCode | SetTrackParentDaughterRelationship (const Uid parentUid, const Uid daughterUid) |
Set a track parent-daughter relationship. | |
StatusCode | SetTrackSiblingRelationship (const Uid firstSiblingUid, const Uid secondSiblingUid) |
Set a track sibling relationship. | |
StatusCode | AssociateTracks () const |
Apply track associations (parent-daughter and sibling) that have been registered with the track manager. | |
StatusCode | AddParentDaughterAssociations () const |
Add parent-daughter associations to tracks. | |
StatusCode | AddSiblingAssociations () const |
Add sibling associations to tracks. | |
StatusCode | SetAssociatedCluster (const Track *const pTrack, const Cluster *const pCluster) const |
Set the cluster associated with a track. | |
StatusCode | RemoveAssociatedCluster (const Track *const pTrack, const Cluster *const pCluster) const |
Remove the association of a track with a cluster. | |
StatusCode | RemoveAllClusterAssociations () const |
Remove all track to cluster associations. | |
StatusCode | RemoveCurrentClusterAssociations (TrackToClusterMap &danglingClusters) const |
Remove track to cluster associations from all tracks in the current list. | |
StatusCode | RemoveClusterAssociations (const TrackList &trackList) const |
Remove track to cluster associations from a specified list of tracks. | |
StatusCode | InitializeReclustering (const Algorithm *const pAlgorithm, const TrackList &trackList, const std::string &originalReclusterListName) |
Initialize reclustering operations, preparing lists and metadata accordingly. | |
Private Attributes | |
UidToTrackMap | m_uidToTrackMap |
The uid to track map. | |
TrackRelationMap | m_parentDaughterRelationMap |
The track parent-daughter relation map. | |
TrackRelationMap | m_siblingRelationMap |
The track sibling relation map. | |
Friends | |
class | PandoraApiImpl |
class | PandoraContentApiImpl |
class | PandoraImpl |
TrackManager class.
Definition at line 22 of file TrackManager.h.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Definition at line 36 of file InputObjectManager.h.
|
private |
Definition at line 161 of file TrackManager.h.
|
private |
Definition at line 160 of file TrackManager.h.
pandora::TrackManager::TrackManager | ( | const Pandora *const | pPandora | ) |
Constructor.
pPandora | address of the associated pandora object |
Definition at line 21 of file TrackManager.cc.
pandora::TrackManager::~TrackManager | ( | ) |
Destructor.
Definition at line 29 of file TrackManager.cc.
|
protectedvirtualinherited |
Add objects to a saved list with a specified name.
listName | the list to add the objects to |
objectList | the list of objects to be added |
Definition at line 69 of file InputObjectManager.cc.
|
private |
Add parent-daughter associations to tracks.
Definition at line 180 of file TrackManager.cc.
|
private |
Add sibling associations to tracks.
Definition at line 220 of file TrackManager.cc.
|
private |
Apply track associations (parent-daughter and sibling) that have been registered with the track manager.
Definition at line 170 of file TrackManager.cc.
|
private |
Create track.
parameters | the track parameters |
pTrack | to receive the address of the track |
factory | the factory that performs the object allocation |
Definition at line 36 of file TrackManager.cc.
|
protectedvirtualinherited |
Create initial lists.
Reimplemented from pandora::Manager< T >.
Definition at line 95 of file InputObjectManager.cc.
|
protectedvirtualinherited |
Create the input list (accessible to algorithms), using objects created by client application.
Definition at line 41 of file InputObjectManager.cc.
|
protectedvirtualinherited |
Change the current list to a specified temporary list.
pAlgorithm | address of the algorithm changing the current list |
objectList | the specified temporary list |
temporaryListName | to receive the name of the temporary list |
Definition at line 52 of file InputObjectManager.cc.
|
protectedvirtualinherited |
Create a temporary list associated with a particular algorithm.
pAlgorithm | address of the algorithm |
temporaryListName | to receive the name of the temporary list |
Reimplemented in pandora::AlgorithmObjectManager< T >, pandora::AlgorithmObjectManager< Cluster >, pandora::AlgorithmObjectManager< ParticleFlowObject >, and pandora::AlgorithmObjectManager< Vertex >.
Definition at line 177 of file Manager.cc.
|
protectedvirtualinherited |
Drop the current list, returning the current list to its default empty/null state.
pAlgorithm | address of the algorithm altering the lists |
Reimplemented in pandora::AlgorithmObjectManager< T >, pandora::AlgorithmObjectManager< Cluster >, pandora::AlgorithmObjectManager< ParticleFlowObject >, and pandora::AlgorithmObjectManager< Vertex >.
Definition at line 134 of file Manager.cc.
|
privatevirtual |
Erase all track manager content.
Reimplemented from pandora::InputObjectManager< Track >.
Definition at line 101 of file TrackManager.cc.
|
protectedvirtualinherited |
Get the algorithm input list.
pAlgorithm | address of the algorithm |
pObjectList | to receive the algorithm input list |
listName | to receive the name of the algorithm input list |
Definition at line 69 of file Manager.cc.
|
inlineprotectedvirtualinherited |
Get the algorithm track list name.
pAlgorithm | address of the algorithm |
listName | to receive the algorithm input list name |
Definition at line 88 of file Manager.cc.
|
protectedvirtualinherited |
Get the current list.
pObjectList | to receive the current list |
listName | to receive the name of the current list |
Definition at line 48 of file Manager.cc.
|
inlineprotectedvirtualinherited |
Get the current list name.
listName | to receive the current list name |
Definition at line 57 of file Manager.cc.
|
protectedvirtualinherited |
Get a list.
listName | the name of the list |
pObjectList | to receive the list |
Definition at line 34 of file Manager.cc.
|
private |
Initialize reclustering operations, preparing lists and metadata accordingly.
pAlgorithm | address of the algorithm controlling reclustering |
clusterList | the input cluster list |
originalReclusterListName | the list name/key for the original recluster candidates |
Definition at line 322 of file TrackManager.cc.
|
private |
Is a track, or a list of tracks, available to add to a particle flow object.
pT | address of the object or object list |
bool pandora::TrackManager::IsAvailable | ( | const Track *const | pTrack | ) | const |
bool pandora::TrackManager::IsAvailable | ( | const TrackList *const | pTrackList | ) | const |
|
private |
Match tracks to their correct mc particles for particle flow.
trackToPfoTargetsMap | the track uid to mc pfo target map |
Definition at line 112 of file TrackManager.cc.
|
protectedvirtualinherited |
Access a modifiable object, when provided with address to const object.
pT | the address of the const object |
Definition at line 288 of file Manager.cc.
|
protectedvirtualinherited |
Register an algorithm with the manager.
pAlgorithm | address of the algorithm |
Definition at line 198 of file Manager.cc.
|
private |
Remove all track to cluster associations.
Definition at line 274 of file TrackManager.cc.
|
private |
Remove all mc particle associations that have been registered with tracks.
Definition at line 137 of file TrackManager.cc.
|
private |
Remove the association of a track with a cluster.
pTrack | the address of the relevant track |
pCluster | the address of the cluster with which the track is no longer associated |
Definition at line 267 of file TrackManager.cc.
|
private |
Remove track to cluster associations from a specified list of tracks.
trackList | the specified track list |
Definition at line 309 of file TrackManager.cc.
|
private |
Remove track to cluster associations from all tracks in the current list.
danglingClusters | to receive the list of "dangling" associations |
Definition at line 286 of file TrackManager.cc.
|
protectedvirtualinherited |
Remove objects from a saved list.
listName | the list to remove the objects from |
objectList | the list of objects to be removed |
Definition at line 77 of file InputObjectManager.cc.
|
protectedvirtualinherited |
Rename a saved list, altering its saved name from a specified old list name to a specified new list name.
oldListName | the old list name |
newListName | the new list name |
Reimplemented from pandora::Manager< T >.
Definition at line 85 of file InputObjectManager.cc.
|
protectedvirtualinherited |
Replace the current and algorithm input lists with a pre-existing list.
pAlgorithm | address of the algorithm changing the current list |
listName | the name of the new current (and algorithm input) list |
Reimplemented in pandora::AlgorithmObjectManager< T >, pandora::AlgorithmObjectManager< Cluster >, pandora::AlgorithmObjectManager< ParticleFlowObject >, and pandora::AlgorithmObjectManager< Vertex >.
Definition at line 110 of file Manager.cc.
|
protectedvirtualinherited |
Remove temporary lists and reset the current list to that when algorithm was initialized.
pAlgorithm | address of the algorithm altering the lists |
isAlgorithmFinished | whether the algorithm has completely finished and the algorithm info should be entirely removed |
Reimplemented in pandora::AlgorithmObjectManager< T >, pandora::AlgorithmObjectManager< Cluster >, pandora::AlgorithmObjectManager< ParticleFlowObject >, and pandora::AlgorithmObjectManager< Vertex >.
Definition at line 216 of file Manager.cc.
|
protectedvirtualinherited |
Reset the current list to the algorithm input list.
pAlgorithm | address of the algorithm changing the current track list |
Reimplemented in pandora::AlgorithmObjectManager< T >, pandora::AlgorithmObjectManager< Cluster >, pandora::AlgorithmObjectManager< ParticleFlowObject >, and pandora::AlgorithmObjectManager< Vertex >.
Definition at line 102 of file Manager.cc.
|
protectedvirtualinherited |
Reset the manager.
Definition at line 247 of file Manager.cc.
|
protectedvirtualinherited |
Save a list of objects in a list with a specified name; create new list if required.
listName | the list name |
objectList | the object list |
Definition at line 61 of file InputObjectManager.cc.
|
private |
Set the cluster associated with a track.
pTrack | the address of the relevant track |
pCluster | the address of the associated cluster |
Definition at line 260 of file TrackManager.cc.
|
private |
Set availability of a track, or a list of tracks, to be added to a particle flow object.
pT | the address of the object or object list |
isAvailable | the availability |
void pandora::TrackManager::SetAvailability | ( | const Track *const | pTrack, |
bool | isAvailable | ||
) | const |
void pandora::TrackManager::SetAvailability | ( | const TrackList *const | pTrackList, |
bool | isAvailable | ||
) | const |
|
private |
Set a track parent-daughter relationship.
parentUid | the parent track unique identifier |
daughterUid | the daughter track unique identifier |
Definition at line 152 of file TrackManager.cc.
|
private |
Set a track sibling relationship.
firstSiblingUid | the first sibling track unique identifier |
secondSiblingUid | the second sibling track unique identifier |
Definition at line 161 of file TrackManager.cc.
|
friend |
Definition at line 167 of file TrackManager.h.
|
friend |
Definition at line 168 of file TrackManager.h.
|
friend |
Definition at line 169 of file TrackManager.h.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
The name of the input list.
Definition at line 97 of file InputObjectManager.h.
|
protectedinherited |
|
protectedinherited |
|
private |
The track parent-daughter relation map.
Definition at line 164 of file TrackManager.h.
|
protectedinherited |
|
protectedinherited |
|
private |
The track sibling relation map.
Definition at line 165 of file TrackManager.h.
|
private |
The uid to track map.
Definition at line 163 of file TrackManager.h.