Pandora
Pandora source code navigator
|
CaloHitManager class. More...
#include "CaloHitManager.h"
Public Member Functions | |
CaloHitManager (const Pandora *const pPandora) | |
Constructor. | |
~CaloHitManager () | |
Destructor. | |
template<> | |
bool | IsAvailable (const CaloHit *const pCaloHit) const |
template<> | |
bool | IsAvailable (const CaloHitList *const pCaloHitList) const |
template<> | |
StatusCode | SetAvailability (const CaloHit *const pCaloHit, bool isAvailable) |
template<> | |
StatusCode | SetAvailability (const CaloHitList *const pCaloHitList, bool isAvailable) |
Protected Types | |
typedef Manager< CaloHit >::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 Member Functions | |
StatusCode | Create (const object_creation::CaloHit::Parameters ¶meters, const CaloHit *&pCaloHit, const ObjectFactory< object_creation::CaloHit::Parameters, object_creation::CaloHit::Object > &factory) |
Create calo hit. | |
StatusCode | AlterMetadata (const CaloHit *const pCaloHit, const object_creation::CaloHit::Metadata &metadata) const |
Alter the metadata information stored in a calo hit. | |
template<typename T > | |
bool | IsAvailable (const T *const pT) const |
Is a calo hit, or a list of calo hits, available to add to a cluster. | |
template<typename T > | |
StatusCode | SetAvailability (const T *const pT, bool isAvailable) |
Set availability of a calo hit, or a list of calo hits, to be added to a cluster. | |
StatusCode | CreateTemporaryListAndSetCurrent (const Algorithm *const pAlgorithm, const ClusterList &clusterList, std::string &temporaryListName) |
Change the current calo hit list to the constituent hits of a cluster list. | |
StatusCode | EraseAllContent () |
Erase all calo hit manager content. | |
StatusCode | MatchCaloHitsToMCPfoTargets (const UidToMCParticleWeightMap &caloHitToPfoTargetsMap) |
Match calo hits to their correct mc particles for particle flow. | |
StatusCode | RemoveAllMCParticleRelationships () |
Remove all mc particle associations that have been registered with calo hits. | |
StatusCode | FragmentCaloHit (const CaloHit *const pOriginalCaloHit, const float fraction1, const CaloHit *&pDaughterCaloHit1, const CaloHit *&pDaughterCaloHit2, const ObjectFactory< object_creation::CaloHitFragment::Parameters, object_creation::CaloHitFragment::Object > &factory) |
Fragment a calo hit into two daughter calo hits, with a specified energy division. | |
StatusCode | MergeCaloHitFragments (const CaloHit *const pFragmentCaloHit1, const CaloHit *const pFragmentCaloHit2, const CaloHit *&pMergedCaloHit, const ObjectFactory< object_creation::CaloHitFragment::Parameters, object_creation::CaloHitFragment::Object > &factory) |
Merge two calo hit fragments, originally from the same parent hit, to form a new calo hit. | |
bool | CanFragmentCaloHit (const CaloHit *const pOriginalCaloHit, const float fraction1) const |
Whether a calo hit can be fragmented into two daughter calo hits with the specified energy division. | |
bool | CanMergeCaloHitFragments (const CaloHit *const pFragmentCaloHit1, const CaloHit *const pFragmentCaloHit2) const |
Whether two candidate calo hit fragments can be merged. | |
StatusCode | InitializeReclustering (const Algorithm *const pAlgorithm, const ClusterList &clusterList, const std::string &originalReclusterListName) |
Initialize reclustering operations, preparing lists and metadata accordingly. | |
StatusCode | PrepareForClustering (const Algorithm *const pAlgorithm, const std::string &newReclusterListName) |
Prepare metadata to allow for construction of new recluster candidates. | |
StatusCode | EndReclustering (const Algorithm *const pAlgorithm, const std::string &selectedReclusterListName) |
End reclustering operations and update calo hit lists accordingly. | |
StatusCode | Update (const CaloHitMetadata &caloHitMetadata) |
Update all calo hit lists to account for changes by daughter recluster processes. | |
StatusCode | Update (const CaloHitReplacement &caloHitReplacement) |
Update all calo hit lists to account for a specific calo hit replacement. | |
StatusCode | Update (CaloHitList *const pCaloHitList, const CaloHitReplacement &caloHitReplacement) |
Update a calo hit list to account for a specific calo hit replacement. | |
Private Attributes | |
unsigned int | m_nReclusteringProcesses |
The number of reclustering algorithms currently in operation. | |
ReclusterMetadata * | m_pCurrentReclusterMetadata |
Address of the current recluster metadata. | |
ReclusterMetadataList | m_reclusterMetadataList |
The recluster metadata list. | |
Friends | |
class | PandoraApiImpl |
class | PandoraContentApiImpl |
class | PandoraImpl |
CaloHitManager class.
Definition at line 23 of file CaloHitManager.h.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Definition at line 36 of file InputObjectManager.h.
pandora::CaloHitManager::CaloHitManager | ( | const Pandora *const | pPandora | ) |
Constructor.
pPandora | address of the associated pandora object |
Definition at line 27 of file CaloHitManager.cc.
pandora::CaloHitManager::~CaloHitManager | ( | ) |
Destructor.
Definition at line 37 of file CaloHitManager.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 |
Alter the metadata information stored in a calo hit.
pCaloHit | address of the calo hit to modify |
metaData | the metadata (only populated metadata fields will be propagated to the object) |
Definition at line 78 of file CaloHitManager.cc.
|
private |
Whether a calo hit can be fragmented into two daughter calo hits with the specified energy division.
pOriginalCaloHit | address of the original calo hit |
fraction1 | the fraction of energy to be assigned to daughter fragment 1 |
Definition at line 288 of file CaloHitManager.cc.
|
private |
Whether two candidate calo hit fragments can be merged.
pFragmentCaloHit1 | address of first candidate calo hit fragment |
pFragmentCaloHit2 | address of second candidate calo hit fragment |
Definition at line 309 of file CaloHitManager.cc.
|
private |
Create calo hit.
parameters | the calo hit parameters |
pCaloHit | to receive the address of the calo hit |
factory | the factory that performs the object allocation |
Definition at line 44 of file CaloHitManager.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.
|
private |
Change the current calo hit list to the constituent hits of a cluster list.
pAlgorithm | address of the algorithm changing the current calo hit list |
clusterList | the cluster list containing the hits |
temporaryListName | to receive the name of the temporary list |
Definition at line 140 of file CaloHitManager.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.
|
private |
End reclustering operations and update calo hit lists accordingly.
pAlgorithm | address of the algorithm controlling reclustering |
selectedReclusterListName | the list name/key for the chosen recluster candidates |
Definition at line 376 of file CaloHitManager.cc.
|
privatevirtual |
Erase all calo hit manager content.
Reimplemented from pandora::InputObjectManager< CaloHit >.
Definition at line 159 of file CaloHitManager.cc.
|
private |
Fragment a calo hit into two daughter calo hits, with a specified energy division.
pOriginalCaloHit | address of the original calo hit, which will be deleted |
fraction1 | the fraction of energy to be assigned to daughter fragment 1 |
pDaughterCaloHit1 | to receive the address of daughter fragment 1 |
pDaughterCaloHit2 | to receive the address of daughter fragment 2 |
factory | to create the calo hit fragments |
Definition at line 213 of file CaloHitManager.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 336 of file CaloHitManager.cc.
bool pandora::CaloHitManager::IsAvailable | ( | const CaloHit *const | pCaloHit | ) | const |
bool pandora::CaloHitManager::IsAvailable | ( | const CaloHitList *const | pCaloHitList | ) | const |
|
private |
Is a calo hit, or a list of calo hits, available to add to a cluster.
pT | address of the object or object list |
|
private |
Match calo hits to their correct mc particles for particle flow.
caloHitToPfoTargetsMap | the calo hit uid to mc pfo target map |
Definition at line 173 of file CaloHitManager.cc.
|
private |
Merge two calo hit fragments, originally from the same parent hit, to form a new calo hit.
pFragmentCaloHit1 | address of calo hit fragment 1, which will be deleted |
pFragmentCaloHit2 | address of calo hit fragment 2, which will be deleted |
pMergedCaloHit | to receive the address of the merged calo hit |
factory | to create the merged calo hit |
Definition at line 252 of file CaloHitManager.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.
|
private |
Prepare metadata to allow for construction of new recluster candidates.
pAlgorithm | address of the algorithm controlling reclustering |
newReclusterListName | the list name/key for the new recluster candidates |
Definition at line 356 of file CaloHitManager.cc.
|
protectedvirtualinherited |
Register an algorithm with the manager.
pAlgorithm | address of the algorithm |
Definition at line 198 of file Manager.cc.
|
private |
Remove all mc particle associations that have been registered with calo hits.
Definition at line 198 of file CaloHitManager.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.
StatusCode pandora::CaloHitManager::SetAvailability | ( | const CaloHit *const | pCaloHit, |
bool | isAvailable | ||
) |
StatusCode pandora::CaloHitManager::SetAvailability | ( | const CaloHitList *const | pCaloHitList, |
bool | isAvailable | ||
) |
|
private |
Set availability of a calo hit, or a list of calo hits, to be added to a cluster.
pT | the address of the object or object list |
isAvailable | the availability |
|
private |
Update a calo hit list to account for a specific calo hit replacement.
pCaloHitList | address of the calo hit list |
caloHitReplacement | the calo hit replacement |
Definition at line 448 of file CaloHitManager.cc.
|
private |
Update all calo hit lists to account for changes by daughter recluster processes.
caloHitMetadata | description of the changes made by daughter reclustering processes |
Definition at line 408 of file CaloHitManager.cc.
|
private |
Update all calo hit lists to account for a specific calo hit replacement.
caloHitReplacement | the calo hit replacement |
Definition at line 433 of file CaloHitManager.cc.
|
friend |
Definition at line 199 of file CaloHitManager.h.
|
friend |
Definition at line 200 of file CaloHitManager.h.
|
friend |
Definition at line 201 of file CaloHitManager.h.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
The name of the input list.
Definition at line 97 of file InputObjectManager.h.
|
protectedinherited |
|
private |
The number of reclustering algorithms currently in operation.
Definition at line 195 of file CaloHitManager.h.
|
protectedinherited |
|
private |
Address of the current recluster metadata.
Definition at line 196 of file CaloHitManager.h.
|
protectedinherited |
|
private |
The recluster metadata list.
Definition at line 197 of file CaloHitManager.h.
|
protectedinherited |