27 const PfoList *pPfoList(
nullptr);
35 for (
const Cluster *
const pPfoCluster : twoDClusters)
39 return STATUS_CODE_SUCCESS;
52 std::cout <<
"CheatingCosmicRayShowerMatchingAlg - Could not access cluster list with name " << clusterListName << std::endl;
56 candidateClusterList.insert(candidateClusterList.end(), pClusterList->begin(), pClusterList->end());
71 for (
const Cluster *
const pCandidateCluster : candidateClusterList)
79 if (pPfoCluster == pCandidateCluster)
108 return STATUS_CODE_SUCCESS;
Header file for the cosmic ray shower matching cheater class.
Header file for the cluster helper class.
Header file for the lar monte carlo particle helper helper class.
Header file for the pfo helper class.
#define PANDORA_THROW_RESULT_IF(StatusCode1, Operator, Command)
#define PANDORA_RETURN_RESULT_IF(StatusCode1, Operator, Command)
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 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 GetList(const pandora::Algorithm &algorithm, const std::string &listName, const T *&pT)
Get a named list.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
void GetCandidateClusters(pandora::ClusterList &candidateClusterList) const
Get the list of candidate clusters for matching with existing pfos.
std::string m_inputPfoListName
The input pfo list name.
pandora::StatusCode Run()
Run the algorithm.
void CosmicRayShowerMatching(const pandora::ParticleFlowObject *const pPfo, const pandora::Cluster *const pPfoCluster, const pandora::ClusterList &candidateClusterList) const
Perform cosmic ray shower matching for a specific cluster in a pfo.
pandora::StringVector m_inputClusterListNames
The input cluster list names.
static pandora::HitType GetClusterHitType(const pandora::Cluster *const pCluster)
Get the hit type associated with a two dimensional cluster.
static bool IsNeutrino(const pandora::MCParticle *const pMCParticle)
Whether a mc particle is a neutrino or antineutrino.
static const pandora::MCParticle * GetParentMCParticle(const pandora::MCParticle *const pMCParticle)
Get the parent mc particle.
static void GetTwoDClusterList(const pandora::ParticleFlowObject *const pPfo, pandora::ClusterList &clusterList)
Get the list of 2D clusters from an input pfo.
static const MCParticle * GetMainMCParticle(const T *const pT)
Find the mc particle making the largest contribution to a specified calo hit, track or cluster.
ParticleFlowObject class.
StatusCodeException class.
static StatusCode ReadVectorOfValues(const TiXmlHandle &xmlHandle, const std::string &xmlElementName, std::vector< T > &vector)
Read a vector of values from a (space separated) list in an xml element.
static StatusCode ReadValue(const TiXmlHandle &xmlHandle, const std::string &xmlElementName, T &t)
Read a value from an xml element.
HitType
Calorimeter hit type enum.
MANAGED_CONTAINER< const Cluster * > ClusterList
StatusCode
The StatusCode enum.
MANAGED_CONTAINER< const ParticleFlowObject * > PfoList