8 #ifndef APRIL_MAIN_FRAGMENT_REMOVAL_ALGORITHM_H
9 #define APRIL_MAIN_FRAGMENT_REMOVAL_ALGORITHM_H 1
11 #include "Pandora/Algorithm.h"
17 namespace april_content
50 ChargedClusterContact(
const pandora::Pandora &pandora,
const pandora::Cluster *
const pDaughterCluster,
51 const pandora::Cluster *
const pParentCluster,
const Parameters ¶meters);
97 void ClusterHelixComparison(
const pandora::Pandora &pandora,
const pandora::Cluster *
const pDaughterCluster,
98 const pandora::Cluster *
const pParentCluster,
const Parameters ¶meters);
107 typedef std::vector<ChargedClusterContact> ChargedClusterContactVector;
108 typedef std::map<const pandora::Cluster *, ChargedClusterContactVector> ChargedClusterContactMap;
119 class Factory :
public pandora::AlgorithmFactory
122 pandora::Algorithm *CreateAlgorithm()
const;
126 pandora::StatusCode Run();
127 pandora::StatusCode ReadSettings(
const pandora::TiXmlHandle xmlHandle);
138 ChargedClusterContactMap &chargedClusterContactMap)
const;
156 pandora::StatusCode
GetClusterMergingCandidates(
const ChargedClusterContactMap &chargedClusterContactMap,
const pandora::Cluster *&pBestParentCluster,
157 const pandora::Cluster *&pBestDaughterCluster);
169 bool PassesPreselection(
const pandora::Cluster *
const pDaughterCluster,
const ChargedClusterContactVector &chargedClusterContactVector,
170 float &globalDeltaChi2)
const;
193 const unsigned int correctionLayer,
const float globalDeltaChi2);
214 pandora::StatusCode
GetAffectedClusters(
const ChargedClusterContactMap &chargedClusterContactMap,
const pandora::Cluster *
const pBestParentCluster,
215 const pandora::Cluster *
const pBestDaughterCluster, pandora::ClusterSet &affectedClusters)
const;
351 inline pandora::Algorithm *MainFragmentRemovalAlgorithm::Factory::CreateAlgorithm()
const
float m_closestTrackEvidence1d
Denominator for closest distance to helix evidence contribution 1.
Definition: MainFragmentRemovalAlgorithm.h:252
float m_leavingCorrection
Correction for clusters leaving calorimeters.
Definition: MainFragmentRemovalAlgorithm.h:282
float m_maxTrackClusterDeltaZ
Max z separation between track projection and cluster.
Definition: MainFragmentRemovalAlgorithm.h:39
float m_coneEvidenceFraction1
Cone fraction 1 value required for cone evidence contribution.
Definition: MainFragmentRemovalAlgorithm.h:248
float m_distanceEvidenceCloseFraction1Multiplier
Distance evidence multiplier for close hit fraction 1.
Definition: MainFragmentRemovalAlgorithm.h:262
ChargedClusterContact class, describing the interactions and proximity between parent and daughter ca...
Definition: MainFragmentRemovalAlgorithm.h:23
unsigned int m_contactEvidenceNLayers1
Contact evidence n layers cut 1.
Definition: MainFragmentRemovalAlgorithm.h:241
float m_layerCorrection1
Layer correction contribution 1.
Definition: MainFragmentRemovalAlgorithm.h:273
float m_lowEnergyCorrection1
Low energy correction contribution 1.
Definition: MainFragmentRemovalAlgorithm.h:290
float m_distanceEvidence1
Offset for distance evidence contribution 1.
Definition: MainFragmentRemovalAlgorithm.h:260
float m_energyCorrectionThreshold
Energy correction threshold.
Definition: MainFragmentRemovalAlgorithm.h:284
unsigned int m_maxLayersCrossedByHelix
Max no. of layers crossed by helix between track projection and cluster.
Definition: MainFragmentRemovalAlgorithm.h:38
float m_layerCorrection4
Layer correction contribution 4, applied if 1,2,3 not applicable.
Definition: MainFragmentRemovalAlgorithm.h:276
float m_contactCutMaxDistance
Max distance between closest hits to store cluster contact info.
Definition: MainFragmentRemovalAlgorithm.h:223
float m_coneFraction2
Fraction of daughter hits that lie within specified cone 2 along parent direction.
Definition: MainFragmentRemovalAlgorithm.h:101
float m_layerCorrectionMinInnerLayer
Daughter min inner layer for layer correction contribution 5.
Definition: MainFragmentRemovalAlgorithm.h:279
unsigned int m_contactEvidenceNLayers2
Contact evidence n layers cut 2.
Definition: MainFragmentRemovalAlgorithm.h:242
float m_angularCorrectionGradient
Gradient value for angular correction.
Definition: MainFragmentRemovalAlgorithm.h:296
float GetTotalEvidenceForMerge(const ChargedClusterContact &chargedClusterContact) const
Get a measure of the total evidence for merging the parent and daughter candidate clusters...
Definition: MainFragmentRemovalAlgorithm.cc:243
float m_coneCosineHalfAngle3
Cosine half angle for third cone comparison in cluster contact object.
Definition: MainFragmentRemovalAlgorithm.h:33
float m_contactEvidence1
Contact evidence contribution 1.
Definition: MainFragmentRemovalAlgorithm.h:244
float m_photonCorrectionShowerStart1
Photon correction profile shower start value 1.
Definition: MainFragmentRemovalAlgorithm.h:301
float m_photonCorrection7
Photon correction contribution 7.
Definition: MainFragmentRemovalAlgorithm.h:311
float m_lowEnergyCorrectionThreshold
Low energy correction threshold.
Definition: MainFragmentRemovalAlgorithm.h:286
float m_minDaughterHadronicEnergy
Min hadronic energy for daughter candidate clusters.
Definition: MainFragmentRemovalAlgorithm.h:221
float m_meanDistanceToHelix
Mean distance of daughter cluster from closest helix fit to parent associated tracks.
Definition: MainFragmentRemovalAlgorithm.h:103
float m_angularCorrectionOffset
Offset value for angular correction.
Definition: MainFragmentRemovalAlgorithm.h:294
float m_photonCorrectionEnergy2
Photon correction energy value 2.
Definition: MainFragmentRemovalAlgorithm.h:299
float m_coneCosineHalfAngle2
Cosine half angle for second cone comparison in cluster contact object.
Definition: MainFragmentRemovalAlgorithm.h:32
float m_chi2Base
Required evidence: min contribution from change in chi2.
Definition: MainFragmentRemovalAlgorithm.h:235
float m_maxGlobalChi2
Pre-selection: new global chi2 value to allow cluster merging.
Definition: MainFragmentRemovalAlgorithm.h:234
float m_contactWeight
Weight for layers in contact evidence.
Definition: MainFragmentRemovalAlgorithm.h:265
float GetClosestDistanceToHelix() const
Get the closest distance between daughter cluster and helix fits to parent associated tracks...
Definition: MainFragmentRemovalAlgorithm.h:346
float m_contactCutConeFraction1
Cone fraction 1 value to store cluster contact info.
Definition: MainFragmentRemovalAlgorithm.h:225
float m_contactCutCloseHitFraction2
Close hit fraction 2 value to store cluster contact info.
Definition: MainFragmentRemovalAlgorithm.h:227
unsigned int GetClusterCorrectionLayer(const pandora::Cluster *const pDaughterCluster) const
Get the cluster correction layer. Working from innermost to outermost layer, the correction layer is ...
Definition: MainFragmentRemovalAlgorithm.cc:425
float m_photonCorrectionShowerStart2
Photon correction profile shower start value 1.
Definition: MainFragmentRemovalAlgorithm.h:302
float m_photonCorrection4
Photon correction contribution 4.
Definition: MainFragmentRemovalAlgorithm.h:308
Parameters class.
Definition: MainFragmentRemovalAlgorithm.h:29
float m_helixComparisonMipFractionCut
Mip fraction cut used in cluster contact helix comparison.
Definition: MainFragmentRemovalAlgorithm.h:34
float GetConeFraction3() const
Get the fraction of daughter hits that lie within specified cone 3 along parent direction.
Definition: MainFragmentRemovalAlgorithm.h:332
float m_contactEvidence2
Contact evidence contribution 2.
Definition: MainFragmentRemovalAlgorithm.h:245
pandora::StatusCode GetClusterMergingCandidates(const ChargedClusterContactMap &chargedClusterContactMap, const pandora::Cluster *&pBestParentCluster, const pandora::Cluster *&pBestDaughterCluster)
Find the best candidate parent and daughter clusters for fragment removal merging.
Definition: MainFragmentRemovalAlgorithm.cc:150
float m_closestDistanceToHelix
Closest distance between daughter cluster and helix fits to parent associated tracks.
Definition: MainFragmentRemovalAlgorithm.h:104
float m_meanTrackEvidence2d
Denominator for mean distance to helix evidence contribution 1.
Definition: MainFragmentRemovalAlgorithm.h:258
float m_layerCorrection3
Layer correction contribution 3.
Definition: MainFragmentRemovalAlgorithm.h:275
float m_contactCutClosestDistanceToHelix
Closest distance to helix value to store cluster contact info.
Definition: MainFragmentRemovalAlgorithm.h:229
unsigned int m_lowEnergyCorrectionNHitLayers1
Number of hit layers below which to apply contribution 1.
Definition: MainFragmentRemovalAlgorithm.h:287
float m_closestTrackEvidence2
Offset for closest distance to helix evidence contribution 2.
Definition: MainFragmentRemovalAlgorithm.h:253
ContactParameters m_contactParameters
The charged cluster contact parameters.
Definition: MainFragmentRemovalAlgorithm.h:218
float m_meanTrackEvidence1
Offset for mean distance to helix evidence contribution 1.
Definition: MainFragmentRemovalAlgorithm.h:255
bool PassesPreselection(const pandora::Cluster *const pDaughterCluster, const ChargedClusterContactVector &chargedClusterContactVector, float &globalDeltaChi2) const
Whether the candidate parent and daughter clusters pass quick preselection for fragment removal mergi...
Definition: MainFragmentRemovalAlgorithm.cc:198
float m_angularCorrectionConstant
Constant value for angular correction.
Definition: MainFragmentRemovalAlgorithm.h:295
float m_layerCorrection2
Layer correction contribution 2.
Definition: MainFragmentRemovalAlgorithm.h:274
float m_contactCutMeanDistanceToHelix
Mean distance to helix value to store cluster contact info.
Definition: MainFragmentRemovalAlgorithm.h:228
float m_photonCorrection6
Photon correction contribution 6.
Definition: MainFragmentRemovalAlgorithm.h:310
float GetConeFraction2() const
Get the fraction of daughter hits that lie within specified cone 2 along parent direction.
Definition: MainFragmentRemovalAlgorithm.h:325
float m_photonCorrectionEnergy1
Photon correction energy value 1.
Definition: MainFragmentRemovalAlgorithm.h:298
Parameters class.
Definition: FragmentRemovalHelper.h:26
MainFragmentRemovalAlgorithm class.
Definition: MainFragmentRemovalAlgorithm.h:116
float m_contactCutCloseHitFraction1
Close hit fraction 1 value to store cluster contact info.
Definition: MainFragmentRemovalAlgorithm.h:226
float m_photonCorrectionEnergy3
Photon correction energy value 3.
Definition: MainFragmentRemovalAlgorithm.h:300
bool PassesClusterContactCuts(const ChargedClusterContact &chargedClusterContact) const
Whether candidate parent and daughter clusters are sufficiently in contact to warrant further investi...
Definition: MainFragmentRemovalAlgorithm.cc:129
unsigned int m_minDaughterCaloHits
Min number of calo hits in daughter candidate clusters.
Definition: MainFragmentRemovalAlgorithm.h:220
float GetRequiredEvidenceForMerge(const pandora::Cluster *const pDaughterCluster, const ChargedClusterContact &chargedClusterContact, const unsigned int correctionLayer, const float globalDeltaChi2)
Get the required evidence for merging the parent and daughter candidate clusters. ...
Definition: MainFragmentRemovalAlgorithm.cc:303
ChargedClusterContact(const pandora::Pandora &pandora, const pandora::Cluster *const pDaughterCluster, const pandora::Cluster *const pParentCluster, const Parameters ¶meters)
Constructor.
Definition: MainFragmentRemovalAlgorithm.cc:487
float m_maxChi2
Pre-selection: new chi2 value to allow cluster merging.
Definition: MainFragmentRemovalAlgorithm.h:233
float m_meanTrackEvidence2
Offset for mean distance to helix evidence contribution 2.
Definition: MainFragmentRemovalAlgorithm.h:257
ClusterContact class, describing the interactions and proximity between parent and daughter candidate...
Definition: FragmentRemovalHelper.h:20
unsigned int m_contactEvidenceNLayers3
Contact evidence n layers cut 3.
Definition: MainFragmentRemovalAlgorithm.h:243
unsigned int m_helixComparisonStartOffsetMip
Start layer offset used for mip-like clusters in helix comparison.
Definition: MainFragmentRemovalAlgorithm.h:36
float m_photonCorrectionShowerDiscrepancy1
Photon correction profile discrepancy value 1.
Definition: MainFragmentRemovalAlgorithm.h:303
void ClusterHelixComparison(const pandora::Pandora &pandora, const pandora::Cluster *const pDaughterCluster, const pandora::Cluster *const pParentCluster, const Parameters ¶meters)
Compare daughter cluster with helix fits to parent associated tracks.
Definition: MainFragmentRemovalAlgorithm.cc:500
float m_contactEvidence3
Contact evidence contribution 3.
Definition: MainFragmentRemovalAlgorithm.h:246
unsigned int m_layerCorrectionLayerValue2
Max value of correction layer for layer correction contribution 2.
Definition: MainFragmentRemovalAlgorithm.h:271
float m_distanceEvidence1d
Denominator for distance evidence contribution 1.
Definition: MainFragmentRemovalAlgorithm.h:261
float m_meanTrackEvidence1d
Denominator for mean distance to helix evidence contribution 1.
Definition: MainFragmentRemovalAlgorithm.h:256
float m_closestTrackEvidence1
Offset for closest distance to helix evidence contribution 1.
Definition: MainFragmentRemovalAlgorithm.h:251
float m_coneFraction3
Fraction of daughter hits that lie within specified cone 3 along parent direction.
Definition: MainFragmentRemovalAlgorithm.h:102
float m_photonCorrection1
Photon correction contribution 1.
Definition: MainFragmentRemovalAlgorithm.h:305
unsigned int m_layerCorrectionLayerValue1
Max value of correction layer for layer correction contribution 1.
Definition: MainFragmentRemovalAlgorithm.h:270
unsigned int m_contactCutMinDaughterInnerLayer
Min daughter cluster inner layer to store contact info.
Definition: MainFragmentRemovalAlgorithm.h:231
float m_globalChi2Penalty
Required evidence penalty for using global chi2 measure.
Definition: MainFragmentRemovalAlgorithm.h:236
pandora::StatusCode GetAffectedClusters(const ChargedClusterContactMap &chargedClusterContactMap, const pandora::Cluster *const pBestParentCluster, const pandora::Cluster *const pBestDaughterCluster, pandora::ClusterSet &affectedClusters) const
Get the list of clusters for which cluster contact information will be affected by a specified cluste...
Definition: MainFragmentRemovalAlgorithm.cc:451
float m_lowEnergyCorrection2
Low energy correction contribution 2.
Definition: MainFragmentRemovalAlgorithm.h:291
float m_coneWeight
Weight for cone extrapolation evidence.
Definition: MainFragmentRemovalAlgorithm.h:266
float m_photonCorrection2
Photon correction contribution 2.
Definition: MainFragmentRemovalAlgorithm.h:306
float m_lowEnergyCorrection3
Low energy correction contribution 3.
Definition: MainFragmentRemovalAlgorithm.h:292
float m_closestTrackEvidence2d
Denominator for closest distance to helix evidence contribution 2.
Definition: MainFragmentRemovalAlgorithm.h:254
unsigned int m_layerCorrectionLayerValue3
Max value of correction layer for layer correction contribution 3.
Definition: MainFragmentRemovalAlgorithm.h:272
unsigned int m_correctionLayerNHitLayers
Number of hit-layers passed to identify correction layer.
Definition: MainFragmentRemovalAlgorithm.h:238
float m_correctionLayerEnergyFraction
Fraction of total hadronic energy passed to identify correction layer.
Definition: MainFragmentRemovalAlgorithm.h:239
unsigned int m_contactCutNLayers
Number of contact layers to store cluster contact info.
Definition: MainFragmentRemovalAlgorithm.h:224
unsigned int m_nHelixComparisonLayers
Max number of layers used in helix comparison for non mip-like clusters.
Definition: MainFragmentRemovalAlgorithm.h:37
float m_trackExtrapolationWeight
Weight for track extrapolation evidence.
Definition: MainFragmentRemovalAlgorithm.h:268
float m_photonCorrection3
Photon correction contribution 3.
Definition: MainFragmentRemovalAlgorithm.h:307
float m_parentTrackEnergy
Sum of energies of tracks associated with parent cluster.
Definition: MainFragmentRemovalAlgorithm.h:100
pandora::StatusCode GetChargedClusterContactMap(bool &isFirstPass, const pandora::ClusterSet &affectedClusters, ChargedClusterContactMap &chargedClusterContactMap) const
Get cluster contact map, linking each daughter candidate cluster to a list of parent candidates and d...
Definition: MainFragmentRemovalAlgorithm.cc:59
float m_minRequiredEvidence
Minimum required evidence to merge parent/daughter clusters.
Definition: MainFragmentRemovalAlgorithm.h:313
float m_photonCorrection5
Photon correction contribution 5.
Definition: MainFragmentRemovalAlgorithm.h:309
float m_distanceEvidenceCloseFraction2Multiplier
Distance evidence multiplier for close hit fraction 2.
Definition: MainFragmentRemovalAlgorithm.h:263
float m_layerCorrection5
Layer correction contribution 5.
Definition: MainFragmentRemovalAlgorithm.h:280
float m_layerCorrectionLayerSpan
Daughter layer span for layer correction contribution 5.
Definition: MainFragmentRemovalAlgorithm.h:278
Definition: MainFragmentRemovalAlgorithm.h:119
unsigned int m_lowEnergyCorrectionNHitLayers2
Number of hit layers below which to apply contribution 2.
Definition: MainFragmentRemovalAlgorithm.h:288
float GetMeanDistanceToHelix() const
Get the mean distance of daughter cluster from closest helix fix to parent associated tracks...
Definition: MainFragmentRemovalAlgorithm.h:339
float m_coneEvidenceFineGranularityMultiplier
Cone evidence multiplier for fine granularity daughter clusters.
Definition: MainFragmentRemovalAlgorithm.h:249
float m_contactCutMaxHitDistance
Hit separation to store contact info.
Definition: MainFragmentRemovalAlgorithm.h:230
unsigned int m_helixComparisonStartOffset
Start layer offset used in cluster contact helix comparison.
Definition: MainFragmentRemovalAlgorithm.h:35
float m_photonCorrectionShowerDiscrepancy2
Photon correction profile discrepancy value 2.
Definition: MainFragmentRemovalAlgorithm.h:304
unsigned int m_lowEnergyCorrectionNHitLayers3
Number of hit layers above which to apply contribution 3.
Definition: MainFragmentRemovalAlgorithm.h:289
float GetParentTrackEnergy() const
Get the sum of energies of tracks associated with parent cluster.
Definition: MainFragmentRemovalAlgorithm.h:318
float m_distanceWeight
Weight for distance of closest approach evidence.
Definition: MainFragmentRemovalAlgorithm.h:267