Pandora
Pandora source code navigator
|
#include "MCManager.h"
Public Member Functions | |
MCManager (const Pandora *const pPandora) | |
Constructor. | |
~MCManager () | |
Destructor. | |
Protected Types | |
typedef Manager< MCParticle >::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, float > | UidToWeightMap |
typedef std::unordered_map< Uid, UidToWeightMap > | ObjectRelationMap |
typedef std::unordered_multimap< Uid, Uid > | MCParticleRelationMap |
Private Member Functions | |
StatusCode | Create (const object_creation::MCParticle::Parameters ¶meters, const MCParticle *&pMCParticle, const ObjectFactory< object_creation::MCParticle::Parameters, object_creation::MCParticle::Object > &factory) |
Create a mc particle. | |
StatusCode | EraseAllContent () |
Erase all mc manager content. | |
StatusCode | SetMCParentDaughterRelationship (const Uid parentUid, const Uid daughterUid) |
Set mc particle relationship. | |
StatusCode | SetCaloHitToMCParticleRelationship (const Uid caloHitUid, const Uid mcParticleUid, const float mcParticleWeight) |
Set calo hit to mc particle relationship. | |
StatusCode | SetTrackToMCParticleRelationship (const Uid trackUid, const Uid mcParticleUid, const float mcParticleWeight) |
Set track to mc particle relationship. | |
StatusCode | IdentifyPfoTargets () |
Identify pfo targets. | |
StatusCode | SelectPfoTargets () |
Select pfo targets. | |
StatusCode | ApplyPfoSelectionRules (const MCParticle *const mcRootParticle, MCParticleSet &mcPfoSet) const |
Apply mc pfo selection rules. | |
StatusCode | SetPfoTargetInTree (const MCParticle *const pMCParticle, const MCParticle *const pPfoTarget, bool onlyDaughters=false) const |
Set pfo target for a mc tree. | |
StatusCode | CreateCaloHitToPfoTargetsMap (UidToMCParticleWeightMap &caloHitToPfoTargetsMap) const |
Create a map relating calo hit uid to mc pfo target. | |
StatusCode | CreateTrackToPfoTargetsMap (UidToMCParticleWeightMap &trackToPfoTargetsMap) const |
Create a map relating track uid to mc pfo target. | |
StatusCode | AddMCParticleRelationships () const |
Apply mc particle associations (parent-daughter) that have been registered with the mc manager. | |
StatusCode | RemoveAllMCParticleRelationships () |
Remove all mc particle associations that have been registered with the mc manager. | |
StatusCode | RemoveMCParticleRelationships (const MCParticle *const pMCParticle) const |
Remove all parent/daughter particle links from a mc particle and from its (previously) linked particles. | |
StatusCode | SetUidToMCParticleRelationship (const Uid objectUid, const Uid mcParticleUid, const float mcParticleWeight, ObjectRelationMap &objectRelationMap) const |
Set an object (e.g. calo hit or track) to mc particle relationship. | |
StatusCode | CreateUidToPfoTargetsMap (UidToMCParticleWeightMap &uidToMCParticleWeightMap, const ObjectRelationMap &objectRelationMap) const |
Create a map relating an object (calo hit or track) uid to mc pfo targets. | |
Private Attributes | |
const std::string | m_selectedListName |
The name of the selected list. | |
UidToMCParticleMap | m_uidToMCParticleMap |
The uid to mc particle map. | |
MCParticleRelationMap | m_parentDaughterRelationMap |
The mc particle parent-daughter relation map. | |
ObjectRelationMap | m_caloHitToMCParticleMap |
The calo hit to mc particle relation map. | |
ObjectRelationMap | m_trackToMCParticleMap |
The track to mc particle relation map. | |
Friends | |
class | PandoraApiImpl |
class | PandoraContentApiImpl |
class | PandoraImpl |
MCManager class.
Definition at line 22 of file MCManager.h.
|
protectedinherited |
|
private |
Definition at line 139 of file MCManager.h.
|
protectedinherited |
|
protectedinherited |
Definition at line 36 of file InputObjectManager.h.
|
private |
Definition at line 138 of file MCManager.h.
|
private |
Definition at line 137 of file MCManager.h.
pandora::MCManager::MCManager | ( | const Pandora *const | pPandora | ) |
Constructor.
pPandora | address of the associated pandora object |
Definition at line 24 of file MCManager.cc.
pandora::MCManager::~MCManager | ( | ) |
|
private |
Apply mc particle associations (parent-daughter) that have been registered with the mc manager.
Definition at line 214 of file MCManager.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 |
Apply mc pfo selection rules.
mcRootParticle | address of the mc root particle |
mcPfoSet | set of all MCPFOs selected so far |
Definition at line 158 of file MCManager.cc.
|
private |
Create a mc particle.
parameters | the mc particle parameters |
pMCParticle | address of the mc particle |
factory | the factory that performs the object allocation |
Definition at line 40 of file MCManager.cc.
|
inlineprivate |
Create a map relating calo hit uid to mc pfo target.
caloHitToPfoTargetMap | to receive the calo hit uid to mc pfo target map |
Definition at line 188 of file MCManager.h.
|
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.
|
inlineprivate |
Create a map relating track uid to mc pfo target.
trackToPfoTargetMap | to receive the track uid to mc pfo target map |
Definition at line 195 of file MCManager.h.
|
private |
Create a map relating an object (calo hit or track) uid to mc pfo targets.
uidToMCParticleWeightMap | to receive the calo hit uid to mc pfo target map |
objectRelationMap | the object relation map containing the information |
Definition at line 331 of file MCManager.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 mc manager content.
Reimplemented from pandora::InputObjectManager< MCParticle >.
Definition at line 71 of file MCManager.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 |
Identify pfo targets.
Definition at line 92 of file MCManager.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 mc particle associations that have been registered with the mc manager.
Definition at line 254 of file MCManager.cc.
|
private |
Remove all parent/daughter particle links from a mc particle and from its (previously) linked particles.
pMCParticle | address of the mc particle |
Definition at line 274 of file MCManager.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 |
Select pfo targets.
Definition at line 112 of file MCManager.cc.
|
inlineprivate |
Set calo hit to mc particle relationship.
caloHitUid | the calo hit unique identifier |
mcParticleUid | the mc particle unique identifier |
mcParticleWeight | weighting to assign to the mc particle |
Definition at line 174 of file MCManager.h.
|
private |
Set mc particle relationship.
parentUid | the parent unique identifier |
daughterUid | the daughter unique identifier |
Definition at line 83 of file MCManager.cc.
|
private |
Set pfo target for a mc tree.
pMCParticle | address of a particle in the mc tree |
pPfoTarget | address of the pfo target |
onlyDaughters | if "true" go through daughters only, if false go through parents as well |
Definition at line 189 of file MCManager.cc.
|
inlineprivate |
Set track to mc particle relationship.
trackUid | the track unique identifier |
mcParticleUid | the mc particle unique identifier |
mcParticleWeight | weighting to assign to the mc particle |
Definition at line 181 of file MCManager.h.
|
private |
Set an object (e.g. calo hit or track) to mc particle relationship.
uid | the unique identifier of the object |
mcParticleUid | the mc particle unique identifier |
mcParticleWeight | weighting to assign to the mc particle |
objectRelationMap | the uid relation map to populate |
Definition at line 297 of file MCManager.cc.
|
friend |
Definition at line 167 of file MCManager.h.
|
friend |
Definition at line 168 of file MCManager.h.
|
friend |
Definition at line 169 of file MCManager.h.
|
protectedinherited |
|
private |
The calo hit to mc particle relation map.
Definition at line 164 of file MCManager.h.
|
protectedinherited |
|
protectedinherited |
The name of the input list.
Definition at line 97 of file InputObjectManager.h.
|
protectedinherited |
|
protectedinherited |
|
private |
The mc particle parent-daughter relation map.
Definition at line 163 of file MCManager.h.
|
protectedinherited |
|
protectedinherited |
|
private |
The name of the selected list.
Definition at line 160 of file MCManager.h.
|
private |
The track to mc particle relation map.
Definition at line 165 of file MCManager.h.
|
private |
The uid to mc particle map.
Definition at line 162 of file MCManager.h.