8 #ifndef APRIL_FRAGMENT_REMOVAL_HELPER_H
9 #define APRIL_FRAGMENT_REMOVAL_HELPER_H 1
11 #include "Pandora/PandoraInternal.h"
12 #include "Pandora/StatusCodes.h"
14 namespace april_content
44 ClusterContact(
const pandora::Pandora &pandora,
const pandora::Cluster *
const pDaughterCluster,
const pandora::Cluster *
const pParentCluster,
112 void HitDistanceComparison(
const pandora::Cluster *
const pDaughterCluster,
const pandora::Cluster *
const pParentCluster,
const Parameters ¶meters);
125 typedef std::vector<ClusterContact> ClusterContactVector;
126 typedef std::map<const pandora::Cluster *, ClusterContactVector> ClusterContactMap;
145 static float GetFractionOfCloseHits(
const pandora::Cluster *
const pClusterI,
const pandora::Cluster *
const pClusterJ,
const float distanceThreshold);
159 static float GetFractionOfHitsInCone(
const pandora::Pandora &pandora,
const pandora::Cluster *
const pClusterI,
const pandora::Cluster *
const pClusterJ,
160 const float coneCosineHalfAngle);
171 static float GetFractionOfHitsInCone(
const pandora::Cluster *
const pCluster,
const pandora::Track *
const pTrack,
const float coneCosineHalfAngle);
183 static float GetFractionOfHitsInCone(
const pandora::Cluster *
const pCluster,
const pandora::CartesianVector &coneApex,
184 const pandora::CartesianVector &coneDirection,
const float coneCosineHalfAngle);
197 static unsigned int GetNLayersCrossed(
const pandora::Pandora &pandora,
const pandora::Helix &helix,
const float zStart,
198 const float zEnd,
const unsigned int nSamplingPoints = 100);
211 static pandora::StatusCode
GetClusterHelixDistance(
const pandora::Cluster *
const pCluster,
const pandora::Helix &helix,
212 const unsigned int startLayer,
const unsigned int endLayer,
const unsigned int maxOccupiedLayers,
float &closestDistanceToHit,
213 float &meanDistanceToHits);
224 static pandora::StatusCode
GetClusterContactDetails(
const pandora::Cluster *
const pClusterI,
const pandora::Cluster *
const pClusterJ,
225 const float distanceThreshold,
unsigned int &nContactLayers,
float &contactFraction);
float GetConeFraction1() const
Get the fraction of daughter hits that lie within specified cone 1 along parent direction.
Definition: FragmentRemovalHelper.h:300
static float GetFractionOfCloseHits(const pandora::Cluster *const pClusterI, const pandora::Cluster *const pClusterJ, const float distanceThreshold)
Get the fraction of calo hits in cluster I that lie within a specified distance of a calo hit in clus...
Definition: FragmentRemovalHelper.cc:18
const pandora::Cluster * m_pDaughterCluster
Address of the daughter candidate cluster.
Definition: FragmentRemovalHelper.h:114
float m_closeHitFraction1
Fraction of daughter hits that lie within sepcified distance 1 of parent cluster. ...
Definition: FragmentRemovalHelper.h:120
float GetDistanceToClosestHit() const
Distance between closest hits in parent and daughter clusters, units mm.
Definition: FragmentRemovalHelper.h:279
static pandora::StatusCode GetClusterContactDetails(const pandora::Cluster *const pClusterI, const pandora::Cluster *const pClusterJ, const float distanceThreshold, unsigned int &nContactLayers, float &contactFraction)
Get the number of contact layers for two clusters and also the ratio of the number of contact layers ...
Definition: FragmentRemovalHelper.cc:255
float m_closeHitFraction2
Fraction of daughter hits that lie within sepcified distance 2 of parent cluster. ...
Definition: FragmentRemovalHelper.h:121
float m_closeHitDistance2
Second distance used to identify close hits in cluster contact object.
Definition: FragmentRemovalHelper.h:31
unsigned int GetNContactLayers() const
Get the number of contact layers for parent and daughter clusters two clusters.
Definition: FragmentRemovalHelper.h:265
static float GetEMEnergyWeightedLayerSeparation(const pandora::Cluster *const pClusterI, const pandora::Cluster *const pClusterJ)
Get the electromagnetic energy-weighted mean common layer separation for a pair of provided clusters ...
Definition: FragmentRemovalHelper.cc:312
void HitDistanceComparison(const pandora::Cluster *const pDaughterCluster, const pandora::Cluster *const pParentCluster, const Parameters ¶meters)
Compare hits in daughter cluster with those in parent cluster to calculate minimum hit separation and...
Definition: FragmentRemovalHelper.cc:415
FragmentRemovalHelper class.
Definition: FragmentRemovalHelper.h:133
unsigned int m_nContactLayers
The number of contact layers for parent and daughter clusters.
Definition: FragmentRemovalHelper.h:117
const pandora::Cluster * GetDaughterCluster() const
Get the address of the daughter candidate cluster.
Definition: FragmentRemovalHelper.h:251
ClusterContact(const pandora::Pandora &pandora, const pandora::Cluster *const pDaughterCluster, const pandora::Cluster *const pParentCluster, const Parameters ¶meters)
Constructor.
Definition: FragmentRemovalHelper.cc:397
float GetContactFraction() const
Get the ratio of the number of contact layers to the number of overlap layers.
Definition: FragmentRemovalHelper.h:272
static float GetFractionOfHitsInCone(const pandora::Pandora &pandora, const pandora::Cluster *const pClusterI, const pandora::Cluster *const pClusterJ, const float coneCosineHalfAngle)
Get the fraction of calo hits in cluster I that lie within a cone along the direction of cluster J...
Parameters class.
Definition: FragmentRemovalHelper.h:26
static pandora::CartesianVector GetEMEnergyWeightedPosition(const pandora::Cluster *const pCluster)
Get the electromagnetic energy-weighted mean cluster position for a provided cluster.
Definition: FragmentRemovalHelper.cc:371
const pandora::Cluster * GetParentCluster() const
Get the address of the parent candidate cluster.
Definition: FragmentRemovalHelper.h:258
float m_closeHitDistance1
First distance used to identify close hits in cluster contact object.
Definition: FragmentRemovalHelper.h:30
float m_contactFraction
The ratio of the number of contact layers to the number of overlap layers.
Definition: FragmentRemovalHelper.h:118
float m_coneFraction1
Fraction of daughter hits that lie within specified cone 1 along parent direction.
Definition: FragmentRemovalHelper.h:119
ClusterContact class, describing the interactions and proximity between parent and daughter candidate...
Definition: FragmentRemovalHelper.h:20
static pandora::StatusCode GetClusterHelixDistance(const pandora::Cluster *const pCluster, const pandora::Helix &helix, const unsigned int startLayer, const unsigned int endLayer, const unsigned int maxOccupiedLayers, float &closestDistanceToHit, float &meanDistanceToHits)
Get the distance between hits in a cluster and a helix, typically the result of a fit to a track...
Definition: FragmentRemovalHelper.cc:208
static unsigned int GetNLayersCrossed(const pandora::Pandora &pandora, const pandora::Helix &helix, const float zStart, const float zEnd, const unsigned int nSamplingPoints=100)
Get the number of pseudo layers crossed by helix in specified range of z coordinates.
Definition: FragmentRemovalHelper.cc:153
const pandora::Cluster * m_pParentCluster
Address of the parent candidate cluster.
Definition: FragmentRemovalHelper.h:115
float GetCloseHitFraction1() const
Get the fraction of daughter hits that lie within sepcified distance 1 of parent cluster.
Definition: FragmentRemovalHelper.h:286
float m_minCosOpeningAngle
Min opening angle between two clusters to perform contact hit comparisons.
Definition: FragmentRemovalHelper.h:32
float m_distanceThreshold
Number of calorimeter cell-widths used to identify cluster contact layers.
Definition: FragmentRemovalHelper.h:33
float m_distanceToClosestHit
Distance between closest hits in parent and daughter clusters, units mm.
Definition: FragmentRemovalHelper.h:122
float GetCloseHitFraction2() const
Get the fraction of daughter hits that lie within sepcified distance 2 of parent cluster.
Definition: FragmentRemovalHelper.h:293
float m_coneCosineHalfAngle1
Cosine half angle for first cone comparison in cluster contact object.
Definition: FragmentRemovalHelper.h:29