Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
PandoraContentApi.h
Go to the documentation of this file.
1
8#ifndef PANDORA_CONTENT_API_H
9#define PANDORA_CONTENT_API_H 1
10
12#include "Pandora/Pandora.h"
14
15namespace pandora { class TiXmlElement; }
16
17//------------------------------------------------------------------------------------------------------------------------------------------
18
23{
24public:
25 /* Map object creation and metadata functionality into PandoraContentApi */
33
34 /* Accessors for plugins and global settings */
35
44
53
62
63
64 /* High-level steering functions */
65
72
83
93 std::string &daughterAlgorithmName);
94
102
113
114
115 /* List-manipulation functions */
116
123 template <typename T>
125
133 template <typename T>
134 static pandora::StatusCode GetCurrentList(const pandora::Algorithm &algorithm, const T *&pT, std::string &listName);
135
142 template <typename T>
144
152 template <typename T>
154
160 template <typename T>
162
170 template <typename T>
171 static pandora::StatusCode GetList(const pandora::Algorithm &algorithm, const std::string &listName, const T *&pT);
172
180 template <typename T>
181 static pandora::StatusCode RenameList(const pandora::Algorithm &algorithm, const std::string &oldListName, const std::string &newListName);
182
183
184 /* List-manipulation functions: input objects only (CaloHits, Tracks, MCParticles) */
185
193 template <typename T>
194 static pandora::StatusCode SaveList(const pandora::Algorithm &algorithm, const T &t, const std::string &newListName);
195
196
197 /* List-manipulation functions: algorithm objects only (Clusters, Pfos, Vertices) */
198
206 template <typename T>
207 static pandora::StatusCode SaveList(const pandora::Algorithm &algorithm, const std::string &newListName);
208
217 template <typename T>
218 static pandora::StatusCode SaveList(const pandora::Algorithm &algorithm, const std::string &oldListName, const std::string &newListName);
219
228 template <typename T>
229 static pandora::StatusCode SaveList(const pandora::Algorithm &algorithm, const std::string &newListName, const T &t);
230
240 template <typename T>
241 static pandora::StatusCode SaveList(const pandora::Algorithm &algorithm, const std::string &oldListName, const std::string &newListName,
242 const T &t);
243
252 template <typename T>
254
262 template <typename T>
264
265
266 /* Object-related functions */
267
276 template <typename T>
277 static bool IsAvailable(const pandora::Algorithm &algorithm, const T *const pT);
278
279
280 /* Object-related functions: algorithm objects only (Clusters, Pfos, Vertices) */
281
288 template <typename T>
289 static pandora::StatusCode Delete(const pandora::Algorithm &algorithm, const T *const pT);
290
298 template <typename T>
299 static pandora::StatusCode Delete(const pandora::Algorithm &algorithm, const T *const pT, const std::string &listName);
300
301
302 /* CaloHit-related functions */
303
311 template <typename T>
313
323 const pandora::CaloHit *const pCaloHit);
324
333 template <typename T>
335
345 const pandora::CaloHit *const pCaloHit);
346
360
373
374
375 /* Track-related functions */
376
385 const pandora::Cluster *const pCluster);
386
395 const pandora::Cluster *const pCluster);
396
403
410
411
412 /* MCParticle-related functions */
413
420
421
422 /* Cluster-related functions */
423
433
444 const pandora::Cluster *const pClusterToDelete, const std::string &enlargeListName, const std::string &deleteListName);
445
446
447 /* Pfo-related functions */
448
456 template <typename T>
458
467 template <typename T>
469
479
489
490
491 /* Reclustering functions */
492
503 std::string &originalClustersListName, std::string &fragmentClustersListName);
504
513 const std::string &clusterListToDeleteName);
514
526
534};
535
536#endif // #ifndef PANDORA_CONTENT_API_H
Header file for pandora object creation classes.
Header file for the pandora class.
Header file for the pandora object factories classes.
PandoraContentApi class.
static pandora::StatusCode Fragment(const pandora::Algorithm &algorithm, const pandora::CaloHit *const pOriginalCaloHit, const float fraction1, const pandora::CaloHit *&pDaughterCaloHit1, const pandora::CaloHit *&pDaughterCaloHit2, const pandora::ObjectFactory< object_creation::CaloHitFragment::Parameters, object_creation::CaloHitFragment::Object > &factory=pandora::PandoraObjectFactory< object_creation::CaloHitFragment::Parameters, object_creation::CaloHitFragment::Object >())
Fragment a calo hit into two daughter calo hits, with a specified energy division.
static pandora::StatusCode RemoveCurrentTrackClusterAssociations(const pandora::Algorithm &algorithm)
Remove all track-cluster associations from objects in the current track and cluster lists.
static pandora::StatusCode AddTrackClusterAssociation(const pandora::Algorithm &algorithm, const pandora::Track *const pTrack, const pandora::Cluster *const pCluster)
Add an association between a track and a cluster.
static pandora::StatusCode SaveList(const pandora::Algorithm &algorithm, const T &t, const std::string &newListName)
Save a provided input object list under a new name.
static pandora::StatusCode AddIsolatedToCluster(const pandora::Algorithm &algorithm, const pandora::Cluster *const pCluster, const T *const pT)
Add an isolated calo hit, or a list of isolated calo hits, to a cluster. An isolated calo hit is not ...
object_creation::Track Track
static pandora::StatusCode RemoveTrackClusterAssociation(const pandora::Algorithm &algorithm, const pandora::Track *const pTrack, const pandora::Cluster *const pCluster)
Remove an association between a track and a cluster.
static pandora::StatusCode RepeatEventPreparation(const pandora::Algorithm &algorithm)
Repeat the event preparation stages, which are used to calculate properties of input objects for late...
static bool IsAvailable(const pandora::Algorithm &algorithm, const T *const pT)
Is object, or a list of objects, available as a building block.
static pandora::StatusCode RemoveAllMCParticleRelationships(const pandora::Algorithm &algorithm)
Remove all mc particle relationships previously registered with the mc manager and linked to tracks/c...
static const pandora::GeometryManager * GetGeometry(const pandora::Algorithm &algorithm)
Get the pandora geometry instance.
static pandora::StatusCode ReplaceCurrentList(const pandora::Algorithm &algorithm, const std::string &newListName)
Replace the current list with a pre-saved list; use this new list as a permanent replacement for the ...
static pandora::StatusCode DropCurrentList(const pandora::Algorithm &algorithm)
Drop the current list, returning the current list to its default empty/null state.
static pandora::StatusCode RunClusteringAlgorithm(const pandora::Algorithm &algorithm, const std::string &clusteringAlgorithmName, const pandora::ClusterList *&pNewClusterList, std::string &newClusterListName)
Run a clustering algorithm (an algorithm that will create new cluster objects)
static pandora::StatusCode GetCurrentListName(const pandora::Algorithm &algorithm, std::string &listName)
Get the current list name.
static pandora::StatusCode AddToPfo(const pandora::Algorithm &algorithm, const pandora::ParticleFlowObject *const pPfo, const T *const pT)
Add a cluster to a particle flow object.
static pandora::StatusCode CreateTemporaryListAndSetCurrent(const pandora::Algorithm &algorithm, const T *&pT, std::string &temporaryListName)
Create a temporary list and set it to be the current list, enabling object creation.
static pandora::StatusCode InitializeFragmentation(const pandora::Algorithm &algorithm, const pandora::ClusterList &inputClusterList, std::string &originalClustersListName, std::string &fragmentClustersListName)
Initialize cluster fragmentation operations on clusters in the algorithm input list....
static pandora::StatusCode EndFragmentation(const pandora::Algorithm &algorithm, const std::string &clusterListToSaveName, const std::string &clusterListToDeleteName)
End cluster fragmentation operations on clusters in the algorithm input list.
static pandora::StatusCode RemoveIsolatedFromCluster(const pandora::Algorithm &algorithm, const pandora::Cluster *const pCluster, const pandora::CaloHit *const pCaloHit)
Remove an isolated calo hit from a cluster. Note this function will not remove the final calo hit fro...
static pandora::StatusCode CreateDaughterAlgorithm(const pandora::Algorithm &algorithm, pandora::TiXmlElement *const pXmlElement, std::string &daughterAlgorithmName)
Create an algorithm instance, via one of the algorithm factories registered with pandora....
object_creation::CaloHitFragment CaloHitFragment
static pandora::StatusCode GetCurrentList(const pandora::Algorithm &algorithm, const T *&pT)
Get the current list.
static pandora::StatusCode MergeAndDeleteClusters(const pandora::Algorithm &algorithm, const pandora::Cluster *const pClusterToEnlarge, const pandora::Cluster *const pClusterToDelete)
Merge two clusters in the current list, enlarging one cluster and deleting the second.
static pandora::StatusCode AddToCluster(const pandora::Algorithm &algorithm, const pandora::Cluster *const pCluster, const T *const pT)
Add a calo hit, or a list of calo hits, to a cluster.
static pandora::StatusCode SetPfoParentDaughterRelationship(const pandora::Algorithm &algorithm, const pandora::ParticleFlowObject *const pParentPfo, const pandora::ParticleFlowObject *const pDaughterPfo)
Set parent-daughter particle flow object relationship.
object_creation::ParticleFlowObject ParticleFlowObject
static pandora::StatusCode RemoveFromPfo(const pandora::Algorithm &algorithm, const pandora::ParticleFlowObject *const pPfo, const T *const pT)
Remove a cluster from a particle flow object. Note this function will not remove the final object (tr...
static pandora::StatusCode RemovePfoParentDaughterRelationship(const pandora::Algorithm &algorithm, const pandora::ParticleFlowObject *const pParentPfo, const pandora::ParticleFlowObject *const pDaughterPfo)
Remove parent-daughter particle flow object relationship.
static pandora::StatusCode EndReclustering(const pandora::Algorithm &algorithm, const std::string &selectedClusterListName)
End reclustering operations on clusters in the algorithm input list.
static pandora::StatusCode Delete(const pandora::Algorithm &algorithm, const T *const pT)
Delete an object from the current list.
static pandora::StatusCode RunDaughterAlgorithm(const pandora::Algorithm &algorithm, const std::string &daughterAlgorithmName)
Run an algorithm registered with pandora, from within a parent algorithm.
static const pandora::PluginManager * GetPlugins(const pandora::Algorithm &algorithm)
Get the pandora plugin instance, providing access to user registered functions and calculators.
static pandora::StatusCode InitializeReclustering(const pandora::Algorithm &algorithm, const pandora::TrackList &inputTrackList, const pandora::ClusterList &inputClusterList, std::string &originalClustersListName)
Initialize reclustering operations on clusters in the algorithm input list. This allows hits in a lis...
static pandora::StatusCode RemoveFromCluster(const pandora::Algorithm &algorithm, const pandora::Cluster *const pCluster, const pandora::CaloHit *const pCaloHit)
Remove a calo hit from a cluster. Note this function will not remove the final calo hit from a cluste...
object_creation::MCParticle MCParticle
object_creation::Cluster Cluster
object_creation::CaloHit CaloHit
static pandora::StatusCode TemporarilyReplaceCurrentList(const pandora::Algorithm &algorithm, const std::string &newListName)
Temporarily replace the current list with another list, which may only be a temporary list....
object_creation::Vertex Vertex
static pandora::StatusCode CreateAlgorithmTool(const pandora::Algorithm &algorithm, pandora::TiXmlElement *const pXmlElement, pandora::AlgorithmTool *&pAlgorithmTool)
Create an algorithm tool instance, via one of the algorithm tool factories registered with pandora....
static pandora::StatusCode RenameList(const pandora::Algorithm &algorithm, 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 n...
static pandora::StatusCode GetList(const pandora::Algorithm &algorithm, const std::string &listName, const T *&pT)
Get a named list.
static pandora::StatusCode RemoveAllTrackClusterAssociations(const pandora::Algorithm &algorithm)
Remove all associations between tracks and clusters.
static const pandora::PandoraSettings * GetSettings(const pandora::Algorithm &algorithm)
Get the pandora settings instance.
static pandora::StatusCode MergeFragments(const pandora::Algorithm &algorithm, const pandora::CaloHit *const pFragmentCaloHit1, const pandora::CaloHit *const pFragmentCaloHit2, const pandora::CaloHit *&pMergedCaloHit, const pandora::ObjectFactory< object_creation::CaloHitFragment::Parameters, object_creation::CaloHitFragment::Object > &factory=pandora::PandoraObjectFactory< object_creation::CaloHitFragment::Parameters, object_creation::CaloHitFragment::Object >())
Merge two calo hit fragments, originally from the same parent hit, to form a new calo hit.
Algorithm class. Algorithm addresses are held only by the algorithm manager. They have a fully define...
Definition Algorithm.h:21
AlgorithmTool class. Algorithm tools will tend to be tailored for specific parent algorithms,...
CaloHit class.
Definition CaloHit.h:26
Cluster class.
Definition Cluster.h:31
GeometryManager class.
MCParticle class.
Definition MCParticle.h:26
ObjectFactory class responsible for extended pandora object creation.
PandoraObjectFactory class.
PandoraSettings class.
ParticleFlowObject class.
PluginManager class.
Track class.
Definition Track.h:26
Vertex class.
Definition Vertex.h:26
Type definition helper class.
MANAGED_CONTAINER< const Cluster * > ClusterList
MANAGED_CONTAINER< const Track * > TrackList
StatusCode
The StatusCode enum.