29 #ifndef APRILCONTENTAPI_H
30 #define APRILCONTENTAPI_H
32 #include "Api/PandoraContentApi.h"
41 #define APRIL_LOG( message ) if( PandoraContentApi::GetSettings(*this)->ShouldDisplayAlgorithmInfo() ) std::cout << message
56 pandora::InputFloat m_surroundingEnergy;
57 pandora::InputFloat m_density;
181 unsigned int creationStage = -1);
241 static pandora::StatusCode
InitializeReclustering(
const pandora::Algorithm &algorithm,
const pandora::TrackList &inputTrackList,
242 const pandora::ClusterList &inputClusterList, std::string &originalClustersListName);
252 static pandora::StatusCode
RunReclusteringAlgorithm(
const pandora::Algorithm &algorithm,
const std::string &clusteringAlgorithmName,
253 const pandora::ClusterList *&pNewClusterList, std::string &newClusterListName);
269 static pandora::StatusCode
EndReclustering(
const pandora::Algorithm &algorithm,
const std::string &selectedClusterListName);
271 static pandora::StatusCode Create(
const pandora::Algorithm &algorithm,
272 PandoraContentApi::Cluster::Parameters clusterParameters,
const pandora::Cluster *&pCluster);
274 static pandora::StatusCode CreateAPRILCluster(
const pandora::Algorithm &algorithm,
275 PandoraContentApi::Cluster::Parameters clusterParameters,
const pandora::Cluster *&pCluster);
277 static pandora::StatusCode AddToCluster(
const pandora::Algorithm &algorithm,
278 const pandora::Cluster *
const pCluster,
const pandora::CaloHitList *
const pCaloHitList);
280 static pandora::StatusCode MergeAndDeleteClusters(
const pandora::Algorithm &algorithm,
281 const pandora::Cluster *
const pClusterToEnlarge,
const pandora::Cluster *pClusterToDelete);
283 static pandora::StatusCode RemoveFromCluster(
const pandora::Algorithm &algorithm,
284 const pandora::Cluster *
const pCluster,
const pandora::CaloHit *
const pCaloHit);
295 template <
typename T>
308 #endif // APRILCONTENTAPI_H
static pandora::StatusCode ResetTags(const april_content::CaloHit *const pCaloHit)
Reset the calo hit tags.
Definition: APRILContentApi.cc:224
static pandora::StatusCode PostRunReclusteringAlgorithm(const pandora::Algorithm &algorithm, const std::string &clusterListName)
Function to call just after a re-clustering algorithm and potential association algorithms.
Definition: APRILContentApi.cc:273
Connector class.
Definition: Connector.h:44
static bool IsSeed(const april_content::CaloHit *const pCaloHit)
Whether the calo hit is a seed calo hit in the tree.
Definition: APRILContentApi.cc:108
static bool IsConnected(const april_content::CaloHit *const pCaloHit1, const april_content::CaloHit *const pCaloHit2)
Whether the two calo hits are connected (backward or forward directions)
Definition: APRILContentApi.cc:58
ClusterFactory class.
Definition: ObjectFactories.h:126
CaloHit class.
Definition: CaloHit.h:52
static bool IsLeaf(const april_content::CaloHit *const pCaloHit)
Whether the calo hit is a leaf calo hit in the tree.
Definition: APRILContentApi.cc:115
static pandora::StatusCode AlterMetadata(const pandora::Algorithm &algorithm, const april_content::CaloHit *const pCaloHit, const CaloHitMetadata &caloHitMetadata)
Alter calo hit meta data.
Definition: APRILContentApi.cc:39
HitTag
HitTag enumerator.
Definition: APRILInputTypes.h:67
static pandora::StatusCode Tag(const april_content::CaloHit *const pCaloHit, april_content::HitTag tag, bool value)
Set the calo hit tag.
Definition: APRILContentApi.cc:209
static pandora::StatusCode RemoveConnectionBetween(const april_content::CaloHit *const pCaloHit1, const april_content::CaloHit *const pCaloHit2)
Remove and delete the connection between the two calo hits.
Definition: APRILContentApi.cc:149
static pandora::StatusCode RemoveAndDeleteAllConnections(const april_content::CaloHit *const pCaloHit)
Remove and delete all the connections of the calo hit.
Definition: APRILContentApi.cc:185
static pandora::StatusCode EndReclustering(const pandora::Algorithm &algorithm, const std::string &selectedClusterListName)
End the re-clustering procedure.
Definition: APRILContentApi.cc:296
static april_content::ClusterFactory m_clusterFactory
Remove the connection. Destructor not called, the connector responsibility is forwarded to the caller...
Definition: APRILContentApi.h:304
static T * Modifiable(const T *const pT)
Alter the object (const_cast<T*>) for internal modification through the API.
Definition: APRILContentApi.cc:409
static bool HasAnyConnection(const april_content::CaloHit *const pCaloHit)
Whether the calo hit has at least one connection.
Definition: APRILContentApi.cc:87
static pandora::StatusCode Connect(const april_content::CaloHit *const pCaloHit1, const april_content::CaloHit *const pCaloHit2, april_content::ConnectorDirection direction, float referenceLength=1.f, unsigned int creationStage=-1)
Connect the two calo hits in a given direction.
Definition: APRILContentApi.cc:122
CaloHitMetadata class.
Definition: APRILContentApi.h:53
static bool IsTagged(const april_content::CaloHit *const pCaloHit, april_content::HitTag tag)
Whether the calo hit has been tagged.
Definition: APRILContentApi.cc:217
ConnectorDirection
ConnectorDirection enumerator.
Definition: APRILInputTypes.h:56
static pandora::StatusCode RemoveAndDeleteConnector(const april_content::Connector *const pConnector)
Remove the connection between the two calo hits and delete the connector.
Definition: APRILContentApi.cc:175
static pandora::StatusCode FindConnector(const april_content::CaloHit *const pCaloHit1, const april_content::CaloHit *const pCaloHit2, const april_content::Connector *&pConnector)
Find a connector that links the two calo hits.
Definition: APRILContentApi.cc:72
APRILContentApi class.
Definition: APRILContentApi.h:47
static pandora::StatusCode RunReclusteringAlgorithm(const pandora::Algorithm &algorithm, const std::string &clusteringAlgorithmName, const pandora::ClusterList *&pNewClusterList, std::string &newClusterListName)
Run a re-clustering algorithm. Must be called only to run a clustering algorithm in a re-clustering p...
Definition: APRILContentApi.cc:263
static const april_content::ConnectorList & GetConnectorList(const april_content::CaloHit *const pCaloHit)
Get the global connector list (backward and forward) of the calo hit.
Definition: APRILContentApi.cc:94
static pandora::StatusCode InitializeReclustering(const pandora::Algorithm &algorithm, const pandora::TrackList &inputTrackList, const pandora::ClusterList &inputClusterList, std::string &originalClustersListName)
Initialize APRIL re-clustering. Save calo hit meta data and create a new one for each calo hit...
Definition: APRILContentApi.cc:236