APRILContent
Algorithm of Particle Reconstruction for ILC - implementation with PandoraSDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations
Static Public Member Functions | List of all members
april_content::ClusterHelper Class Reference

ClusterHelper class. More...

#include <ClusterHelper.h>

Static Public Member Functions

static pandora::StatusCode GetCentroid (const pandora::Cluster *const pCluster, pandora::CartesianVector &centroid)
 Get the cluster centroid. More...
 
static pandora::StatusCode GetClosestDistanceApproach (const pandora::Cluster *const pCluster, const pandora::CartesianVector &point, float &closestDistance, bool onlyUseConnectedHit=true)
 Get the closest distance approach between all the hits of the cluster and the given position vector. More...
 
static pandora::StatusCode GetClosestDistanceApproach (const pandora::CaloHitList &caloHitList, const pandora::CartesianVector &point, float &closestDistance, bool onlyUseConnectedHit=true)
 
static pandora::StatusCode GetCentroidDistance (const pandora::Cluster *const pCluster, const pandora::CartesianVector &point, float &centroidDistance)
 Get the distance between the cluster centroid and the given position vector. More...
 
static float GetHadronicEnergyInECAL (const pandora::Cluster *const pCluster)
 
static float GetEnergyRatio (const pandora::OrderedCaloHitList &orderedCaloHitList)
 
static pandora::StatusCode GetEnergyRatio (const pandora::OrderedCaloHitList &orderedCaloHitList, float &energyRatio, unsigned int &nHits)
 
static pandora::HitRegion GetRegion (const pandora::Cluster *const pCluster)
 
static float GetElectromagneticEnergyInECAL (const pandora::Cluster *const pCluster)
 
static pandora::StatusCode GetClusterVolume (const pandora::Cluster *const pCluster, float &clusterVolume)
 
static pandora::StatusCode FitStart (const pandora::Cluster *const pCluster, const unsigned int maxOccupiedLayers, pandora::ClusterFitResult &clusterFitResult)
 
static pandora::StatusCode FitFullCluster (const pandora::Cluster *const pCluster, pandora::ClusterFitResult &clusterFitResult, bool useMainCluster=false, float eps=50.)
 
static pandora::StatusCode GetMainClusterHits (const pandora::Cluster *const pCluster, pandora::CaloHitList &mainClusterHits)
 
static pandora::OrderedCaloHitList GetOrderedConnectedCaloHitList (const pandora::Cluster *const pCluster)
 
static float GetClusterAxisStartingPointAngle (const pandora::Cluster *const pCluster)
 
static void GetShowerStartingPoint (const pandora::Cluster *const pCluster, pandora::CartesianVector &startingPoint)
 
static void GetShowerStartingLayer (const pandora::Cluster *const pCluster, int &showerStartLayer)
 
static pandora::StatusCode GetClosestDistanceApproach (const pandora::Cluster *const pCluster, const pandora::CartesianVector &point, float &closestDistance, pandora::CartesianVector &distanceVector, bool onlyUseConnectedHit=true)
 Get the closest distance approach between all the hits of the clusters. More...
 
static pandora::StatusCode GetClosestDistanceApproach (const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, float &closestDistance, pandora::CartesianVector &distanceVector, bool onlyUseConnectedHit=true)
 
static pandora::StatusCode GetClosestDistanceApproach (const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, float &closestDistance, bool onlyUseConnectedHit=true)
 
static pandora::StatusCode GetClosestDistanceApproach (const pandora::CaloHitList &caloHitList1, const pandora::CaloHitList &caloHitList2, float &closestDistance, bool onlyUseConnectedHit=true)
 
static pandora::StatusCode GetTrackClusterDistance (const pandora::TrackState *const pTrackState, const pandora::Cluster *const pCluster, const unsigned int maxSearchLayer, const float parallelDistanceCut, const float minTrackClusterCosAngle, float &trackClusterDistance)
 
static pandora::StatusCode GetNCaloHitSeeds (const pandora::Cluster *const pCluster, unsigned int &nSeeds)
 Get the number of calo hit seeds in the cluster. More...
 
static bool IsClusterLeavingDetector (const pandora::Cluster *const pCluster, const unsigned int nOuterLayersToExamine=4, const unsigned int nMipLikeOccupiedLayers=4, const unsigned int nShowerLikeOccupiedLayers=3, const float showerLikeEnergyInOuterLayers=1.f)
 Whether the cluster is leaving the detector. More...
 
static bool ContainsHitInOuterSamplingLayer (const pandora::Cluster *const pCluster)
 
static bool IsClusterLeavingDetector (const pandora::Pandora &pandora, const pandora::Cluster *const pCluster, unsigned int nOuterLayersToExamine=3, float maxDistanceToDetectorEdge=50.f, unsigned int minNHitsNearEdges=3)
 
static bool ContainsHitType (const pandora::Cluster *const pCluster, const pandora::HitType hitType)
 Whether the cluster contains at least one hit of target type. More...
 
static pandora::StatusCode GetMeanSurroundingEnergy (const pandora::Cluster *const pCluster, float &meanSurroundingEnergy)
 Get the mean surrounding energy of the cluster. More...
 
static pandora::StatusCode GetMeanDensity (const pandora::Cluster *const pCluster, float &meanDensity)
 Get the mean density of the cluster. More...
 
static float GetMeanDensity (const pandora::Cluster *const pCluster)
 
static pandora::StatusCode GetChiClusterMerging (const pandora::Pandora &pandora, const pandora::Cluster *const pClusterToEnlarge, const pandora::Cluster *const pClusterToMerge, float &trackEnergy, float &oldChi, float &newChi)
 Evaluate the chi before and after to merge the two clusters. More...
 
static pandora::StatusCode MergeClusters (const pandora::Algorithm &algorithm, ClusterToClusterMap &clusterToClusterMap)
 Perform intelligent merging of clusters (daughter <-> parent relationship management) More...
 
static pandora::StatusCode GetTrackClusterDistance (const pandora::Pandora &pandora, const pandora::Cluster *const pCluster, const pandora::Track *const pTrack, const float maxTransverseDistance, float &trackClusterDistance)
 Get the track cluster distance. More...
 
static bool DoesClusterCrossGapRegion (const pandora::Pandora &pandora, const pandora::Cluster *const pCluster, const unsigned int startLayer, const unsigned int endLayer, const pandora::DetectorGap *&pDetectorGap, const unsigned int nSamplingPoints=50)
 Whether a linear fit to a cluster crosses a registered gap region. Only the region between the startlayer and endlayer is considered in the fit and in the comparison with registered gap regions. More...
 
static bool DoesFitCrossGapRegion (const pandora::Pandora &pandora, const pandora::ClusterFitResult &clusterFitResult, const pandora::CartesianVector &startPosition, const float propagationDistance, const pandora::DetectorGap *&pDetectorGap, const unsigned int nSamplingPoints=50)
 Whether a linear fit crosses a registered gap region. The fit will be propagated through the specified distance from its closest approach to the startPosition. Within this propagation, the fit will be sampled a specified number of times and the resulting position compared with registered gap regions. More...
 
static pandora::StatusCode GetDistanceToDetectorGap (const pandora::CartesianVector &positionVector, const pandora::DetectorGap *const pDetectorGap, float &distanceToGap)
 Get the distance to detector gap. More...
 
static pandora::StatusCode GetCaloHitsNearDetectorGaps (const pandora::Pandora &pandora, const pandora::Cluster *const pCluster, const float maxDistanceFine, const float maxDistanceCoarse, pandora::CaloHitList &caloHitList, bool shouldUseIsolatedHits)
 Get the calo hit list belonging to the cluster, close to all registered detector gaps. More...
 
static pandora::StatusCode GetCaloHitsNearDetectorGap (const pandora::Pandora &pandora, const pandora::Cluster *const pCluster, const pandora::DetectorGap *const pDetectorGap, const float maxDistanceFine, const float maxDistanceCoarse, pandora::CaloHitList &caloHitList, bool shouldUseIsolatedHits)
 Get the calo hit list belonging to the cluster, close to all registered detector gaps. More...
 
static pandora::StatusCode CleanAndDeleteCluster (const pandora::Algorithm &algorithm, const pandora::Cluster *const pCluster)
 
static pandora::StatusCode CleanAndDeleteClusters (const pandora::Algorithm &algorithm, const pandora::ClusterList &clusterList)
 
static bool CanMergeCluster (const pandora::Pandora &pandora, const pandora::Cluster *const pCluster, const float minMipFraction, const float maxAllHitsFitRms)
 
static float GetAverageTime (const pandora::Cluster *const pCluster, bool onlyForECALHit=false)
 
static float GetMeanHitPerLayer (const pandora::Cluster *const pCluster)
 
static pandora::StatusCode GetMainClusterHits (const pandora::Cluster *const pCluster, pandora::CaloHitList &mainClusterHits, float eps)
 
static pandora::StatusCode GetRMS (const pandora::Cluster *const pCluster, pandora::CartesianVector cog, pandora::CartesianVector axis, float &rms1, float &rms2)
 
static pandora::StatusCode GetRMS (const pandora::CaloHitList &clusterHits, pandora::CartesianVector cog, pandora::CartesianVector axis, float &rms1, float &rms2)
 
static unsigned int GetClusterConnectorNumber (const pandora::Cluster *const pCluster)
 

Detailed Description

ClusterHelper class.

Member Function Documentation

bool april_content::ClusterHelper::ContainsHitType ( const pandora::Cluster *const  pCluster,
const pandora::HitType  hitType 
)
static

Whether the cluster contains at least one hit of target type.

Parameters
pClusterto check
hitTypethe hit type to look for
bool april_content::ClusterHelper::DoesClusterCrossGapRegion ( const pandora::Pandora &  pandora,
const pandora::Cluster *const  pCluster,
const unsigned int  startLayer,
const unsigned int  endLayer,
const pandora::DetectorGap *&  pDetectorGap,
const unsigned int  nSamplingPoints = 50 
)
static

Whether a linear fit to a cluster crosses a registered gap region. Only the region between the startlayer and endlayer is considered in the fit and in the comparison with registered gap regions.

Parameters
pandorathe associated pandora instance
pClusteraddress of the cluster
startLayerthe start layer (adjusted to maximum of specified layer and cluster inner layer)
endLayerthe end layer (adjusted to minimum of specified layer and cluster outer layer)
pDetectorGapthe crossing gap to receive, if any
nSamplingPointsnumber of points at which to sample the fit within the specified layer region
Returns
boolean
bool april_content::ClusterHelper::DoesFitCrossGapRegion ( const pandora::Pandora &  pandora,
const pandora::ClusterFitResult &  clusterFitResult,
const pandora::CartesianVector &  startPosition,
const float  propagationDistance,
const pandora::DetectorGap *&  pDetectorGap,
const unsigned int  nSamplingPoints = 50 
)
static

Whether a linear fit crosses a registered gap region. The fit will be propagated through the specified distance from its closest approach to the startPosition. Within this propagation, the fit will be sampled a specified number of times and the resulting position compared with registered gap regions.

Parameters
pandorathe associated pandora instance
clusterFitResultthe cluster fit result
startPositionthe propagation start position (adjusted to closest point on fit trajectory)
propagationDistancethe propagation distance, which can be negative for propagation towards the ip
pDetectorGapthe detector gap to receive, if any
nSamplingPointsnumber of points at which to sample the fit within its propagation
Returns
boolean
pandora::StatusCode april_content::ClusterHelper::GetCaloHitsNearDetectorGap ( const pandora::Pandora &  pandora,
const pandora::Cluster *const  pCluster,
const pandora::DetectorGap *const  pDetectorGap,
const float  maxDistanceFine,
const float  maxDistanceCoarse,
pandora::CaloHitList &  caloHitList,
bool  shouldUseIsolatedHits 
)
static

Get the calo hit list belonging to the cluster, close to all registered detector gaps.

Parameters
pandorathe pandora instance to access pandora content
pClusterthe input cluster address
pDetectorGapthe detector gap to consider
maxDistancethe maximum distance between the gap and a calo hit
caloHitListthe list of calo hit near a detector gap
shouldUseIsolatedHitswhether to consider isolated calo hits from the input cluster
pandora::StatusCode april_content::ClusterHelper::GetCaloHitsNearDetectorGaps ( const pandora::Pandora &  pandora,
const pandora::Cluster *const  pCluster,
const float  maxDistanceFine,
const float  maxDistanceCoarse,
pandora::CaloHitList &  caloHitList,
bool  shouldUseIsolatedHits 
)
static

Get the calo hit list belonging to the cluster, close to all registered detector gaps.

Parameters
pandorathe pandora instance to access pandora content
pClusterthe input cluster address
maxDistancethe maximum distance between the gap and a calo hit
caloHitListthe list of calo hit near a detector gap
shouldUseIsolatedHitswhether to consider isolated calo hits from the input cluster
pandora::StatusCode april_content::ClusterHelper::GetCentroid ( const pandora::Cluster *const  pCluster,
pandora::CartesianVector &  centroid 
)
static

Get the cluster centroid.

Parameters
pClusterthe cluster to evaluate the centroid
centroidthe centroid to receive
pandora::StatusCode april_content::ClusterHelper::GetCentroidDistance ( const pandora::Cluster *const  pCluster,
const pandora::CartesianVector &  point,
float &  centroidDistance 
)
static

Get the distance between the cluster centroid and the given position vector.

Parameters
pClusterthe cluster to evaluate the closest distance approach
pointthe position vector
centroidDistancethe distance between the point and the cluster centroid, unit mm
pandora::StatusCode april_content::ClusterHelper::GetChiClusterMerging ( const pandora::Pandora &  pandora,
const pandora::Cluster *const  pClusterToEnlarge,
const pandora::Cluster *const  pClusterToMerge,
float &  trackEnergy,
float &  oldChi,
float &  newChi 
)
static

Evaluate the chi before and after to merge the two clusters.

Parameters
pandorathe pandora instance to access internal content
pClusterToEnlargethe cluster to enlarge
pClusterToMergethe cluster to merge
oldChithe chi of the cluster to enlarge
newChithe chi of the clusters after a potential merging
pandora::StatusCode april_content::ClusterHelper::GetClosestDistanceApproach ( const pandora::Cluster *const  pCluster,
const pandora::CartesianVector &  point,
float &  closestDistance,
bool  onlyUseConnectedHit = true 
)
static

Get the closest distance approach between all the hits of the cluster and the given position vector.

Parameters
pClusterthe cluster to evaluate the closest distance approach
pointthe position vector
closestDistancethe closest distance approach between the point and the cluster, unit mm
pandora::StatusCode april_content::ClusterHelper::GetClosestDistanceApproach ( const pandora::Cluster *const  pCluster,
const pandora::CartesianVector &  point,
float &  closestDistance,
pandora::CartesianVector &  distanceVector,
bool  onlyUseConnectedHit = true 
)
static

Get the closest distance approach between all the hits of the clusters.

Parameters
pClusterthe first cluster
pClusterthe second cluster
closestDistancethe closest distance approach between the two clusters, unit mm
pandora::StatusCode april_content::ClusterHelper::GetDistanceToDetectorGap ( const pandora::CartesianVector &  positionVector,
const pandora::DetectorGap *const  pDetectorGap,
float &  distanceToGap 
)
static

Get the distance to detector gap.

Parameters
positionVectorthe position in space to test
pDetectorGapthe detector gap to consider
distanceToGapthe distance to detector gap to receive
pandora::StatusCode april_content::ClusterHelper::GetMeanDensity ( const pandora::Cluster *const  pCluster,
float &  meanDensity 
)
static

Get the mean density of the cluster.

Parameters
pClusterthe input cluster
meanDensitythe mean density to receive
pandora::StatusCode april_content::ClusterHelper::GetMeanSurroundingEnergy ( const pandora::Cluster *const  pCluster,
float &  meanSurroundingEnergy 
)
static

Get the mean surrounding energy of the cluster.

Parameters
pClusterthe input cluster
meanSurroundingEnergythe mean surrounding energy to receive
pandora::StatusCode april_content::ClusterHelper::GetNCaloHitSeeds ( const pandora::Cluster *const  pCluster,
unsigned int &  nSeeds 
)
static

Get the number of calo hit seeds in the cluster.

Parameters
pClusterthe cluster to get the number of calo hit seeds
nSeedsthe number of seeds to receive
pandora::StatusCode april_content::ClusterHelper::GetTrackClusterDistance ( const pandora::Pandora &  pandora,
const pandora::Cluster *const  pCluster,
const pandora::Track *const  pTrack,
const float  maxTransverseDistance,
float &  trackClusterDistance 
)
static

Get the track cluster distance.

Parameters
pandorathe pandora instance to access internal content
pClusterthe input cluster
pTrackthe input track
maxTransverseDistancethe maximum distance between cluster hits and the track helix
trackClusterDistancethe track cluster distance to receive
bool april_content::ClusterHelper::IsClusterLeavingDetector ( const pandora::Cluster *const  pCluster,
const unsigned int  nOuterLayersToExamine = 4,
const unsigned int  nMipLikeOccupiedLayers = 4,
const unsigned int  nShowerLikeOccupiedLayers = 3,
const float  showerLikeEnergyInOuterLayers = 1.f 
)
static

Whether the cluster is leaving the detector.

Parameters
pandorathe pandora instance to access internal content
pClusterthe cluster address
nOuterLayersToExaminethe number of outer layers of the cluster to examine
maxDistanceToDetectorEdgethe distance to the detector edge for a target calo hit
minNHitsNearEdgesthe minimum number of calo hit near the detector edge to consider the cluster as leaving the detector
pandora::StatusCode april_content::ClusterHelper::MergeClusters ( const pandora::Algorithm &  algorithm,
ClusterToClusterMap &  clusterToClusterMap 
)
static

Perform intelligent merging of clusters (daughter <-> parent relationship management)

Parameters
algorithmthe algorithm that requests the merging
clusterToClusterMapthe mapping of clusters to merge (daughter -> parent)

The documentation for this class was generated from the following files: