Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
PandoraImpl.cc
Go to the documentation of this file.
1
10
14#include "Managers/MCManager.h"
19
20#include "Pandora/Pandora.h"
21#include "Pandora/PandoraImpl.h"
23
24namespace pandora
25{
26
28{
32
33 UidToMCParticleWeightMap caloHitToPfoTargetsMap;
34 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, m_pPandora->m_pMCManager->CreateCaloHitToPfoTargetsMap(caloHitToPfoTargetsMap));
35 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, m_pPandora->m_pCaloHitManager->MatchCaloHitsToMCPfoTargets(caloHitToPfoTargetsMap));
36
37 UidToMCParticleWeightMap trackToPfoTargetsMap;
38 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, m_pPandora->m_pMCManager->CreateTrackToPfoTargetsMap(trackToPfoTargetsMap));
39 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, m_pPandora->m_pTrackManager->MatchTracksToMCPfoTargets(trackToPfoTargetsMap));
40
42
43 return STATUS_CODE_SUCCESS;
44}
45//------------------------------------------------------------------------------------------------------------------------------------------
46
48{
51
52 return STATUS_CODE_SUCCESS;
53}
54
55//------------------------------------------------------------------------------------------------------------------------------------------
56
61
62//------------------------------------------------------------------------------------------------------------------------------------------
63
68
69//------------------------------------------------------------------------------------------------------------------------------------------
70
71StatusCode PandoraImpl::RunAlgorithm(const std::string &algorithmName) const
72{
73 return m_pPandora->m_pPandoraContentApiImpl->RunAlgorithm(algorithmName);
74}
75
76//------------------------------------------------------------------------------------------------------------------------------------------
77
79{
80 return m_pPandora->m_pPandoraSettings->Initialize(pXmlHandle);
81}
82
83//------------------------------------------------------------------------------------------------------------------------------------------
84
89
90//------------------------------------------------------------------------------------------------------------------------------------------
91
93{
95}
96
97//------------------------------------------------------------------------------------------------------------------------------------------
98
112
113//------------------------------------------------------------------------------------------------------------------------------------------
114
116 m_pPandora(pPandora)
117{
118}
119
120} // namespace pandora
Header file for the algorithm manager class.
Header file for the calo hit manager class.
Header file for the cluster manager class.
Header file for the mc particle manager class.
Header file for the pandora class.
Header file for the pandora content api implementation class.
Header file for the pandora impl class.
Header file for the pandora settings class.
Header file for the particle flow object manager class.
Header file for the pandora plugin manager class.
#define PANDORA_RETURN_RESULT_IF(StatusCode1, Operator, Command)
Definition StatusCodes.h:19
Header file for the track manager class.
Header file for the vertex manager class.
const StringVector & GetPandoraAlgorithms() const
Get the list of algorithms to be run by pandora.
StatusCode InitializeAlgorithms(const TiXmlHandle *const pXmlHandle)
Initialize algorithms.
StatusCode ResetForNextEvent()
Call the reset callback in all managed algorithms and algorithm tools.
StatusCode MatchCaloHitsToMCPfoTargets(const UidToMCParticleWeightMap &caloHitToPfoTargetsMap)
Match calo hits to their correct mc particles for particle flow.
virtual StatusCode CreateInputList()
Create the input list (accessible to algorithms), using objects created by client application.
StatusCode CreateCaloHitToPfoTargetsMap(UidToMCParticleWeightMap &caloHitToPfoTargetsMap) const
Create a map relating calo hit uid to mc pfo target.
Definition MCManager.h:188
StatusCode SelectPfoTargets()
Select pfo targets.
Definition MCManager.cc:112
StatusCode IdentifyPfoTargets()
Identify pfo targets.
Definition MCManager.cc:92
StatusCode AddMCParticleRelationships() const
Apply mc particle associations (parent-daughter) that have been registered with the mc manager.
Definition MCManager.cc:214
StatusCode CreateTrackToPfoTargetsMap(UidToMCParticleWeightMap &trackToPfoTargetsMap) const
Create a map relating track uid to mc pfo target.
Definition MCManager.h:195
virtual StatusCode ResetForNextEvent()
Reset the manager.
Definition Manager.cc:247
StatusCode RunAlgorithm(const std::string &algorithmName) const
Run an algorithm registered with pandora.
Pandora class.
Definition Pandora.h:40
VertexManager * m_pVertexManager
The vertex manager.
Definition Pandora.h:127
MCManager * m_pMCManager
The MC manager.
Definition Pandora.h:123
TrackManager * m_pTrackManager
The track manager.
Definition Pandora.h:126
CaloHitManager * m_pCaloHitManager
The hit manager.
Definition Pandora.h:120
AlgorithmManager * m_pAlgorithmManager
The algorithm manager.
Definition Pandora.h:119
PandoraSettings * m_pPandoraSettings
The pandora settings instance.
Definition Pandora.h:129
PluginManager * m_pPluginManager
The pandora plugin manager.
Definition Pandora.h:125
ClusterManager * m_pClusterManager
The cluster manager.
Definition Pandora.h:121
ParticleFlowObjectManager * m_pPfoManager
The particle flow object manager.
Definition Pandora.h:124
PandoraContentApiImpl * m_pPandoraContentApiImpl
The pandora content api implementation.
Definition Pandora.h:131
StatusCode PrepareCaloHits() const
Prepare calo hits: order the hits by pseudo layer, calculate density weights, identify isolated hits,...
StatusCode ResetEvent() const
Ï event, calling manager reset functions and any registered reset functions.
Pandora * m_pPandora
The pandora object to provide an interface to.
Definition PandoraImpl.h:84
StatusCode PrepareTracks() const
Prepare tracks: add track associations (parent-daughter and sibling)
const StringVector & GetPandoraAlgorithms() const
Get the list of algorithms to be run by pandora.
StatusCode RunAlgorithm(const std::string &algorithmName) const
Run an algorithm registered with pandora.
StatusCode InitializeSettings(const TiXmlHandle *const pXmlHandle) const
Initialize pandora settings.
StatusCode InitializeAlgorithms(const TiXmlHandle *const pXmlHandle) const
Initialize pandora algorithms.
PandoraImpl(Pandora *const pPandora)
Constructor.
StatusCode InitializePlugins(const TiXmlHandle *const pXmlHandle) const
Initialize pandora plugins.
StatusCode PrepareMCParticles() const
Prepare mc particles: select mc pfo targets, match tracks and calo hits to the correct mc particles f...
StatusCode Initialize(const TiXmlHandle *const pXmlHandle)
Initialize pandora settings.
StatusCode ResetForNextEvent()
Call the reset callback in all managed plugins.
StatusCode InitializePlugins(const TiXmlHandle *const pXmlHandle)
Initialize plugins.
StatusCode AssociateTracks() const
Apply track associations (parent-daughter and sibling) that have been registered with the track manag...
StatusCode MatchTracksToMCPfoTargets(const UidToMCParticleWeightMap &trackToPfoTargetsMap)
Match tracks to their correct mc particles for particle flow.
std::vector< std::string > StringVector
StatusCode
The StatusCode enum.
std::unordered_map< Uid, MCParticleWeightMap > UidToMCParticleWeightMap