Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
TwoViewTransverseTracksAlgorithm.h
Go to the documentation of this file.
1
8#ifndef LAR_TWO_VIEW_TRANSVERSE_TRACKS_ALGORITHM_H
9#define LAR_TWO_VIEW_TRANSVERSE_TRACKS_ALGORITHM_H 1
10
11#include "Pandora/Algorithm.h"
13
16
19
20#include <random>
21
22namespace lar_content
23{
24
25class TransverseMatrixTool;
26
27//------------------------------------------------------------------------------------------------------------------------------------------
28
32class TwoViewTransverseTracksAlgorithm : public NViewTrackMatchingAlgorithm<TwoViewMatchingControl<TwoViewTransverseOverlapResult>>
33{
34public:
36 typedef std::set<unsigned int> UIntSet;
37
42
43private:
44 void CalculateOverlapResult(const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, const pandora::Cluster *const);
45
54 const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, TwoViewTransverseOverlapResult &overlapResult);
55
65 unsigned int CalculateNumberOfLocallyMatchingSamplingPoints(const DiscreteProbabilityVector &discreteProbabilityVector1,
66 const DiscreteProbabilityVector &discreteProbabilityVector2, std::mt19937 &randomNumberGenerator);
67
75 float GetPrimaryAxisDotDriftAxis(const pandora::Cluster *const pCluster);
76
79
80 typedef std::vector<TransverseMatrixTool *> MatrixToolVector;
82
84 unsigned int m_downsampleFactor;
85 unsigned int m_minSamples;
86 unsigned int m_nPermutations;
92};
93
94//------------------------------------------------------------------------------------------------------------------------------------------
95
100{
101public:
102 typedef TwoViewTransverseTracksAlgorithm::MatchingType::MatrixType MatrixType;
103 typedef std::vector<MatrixType::ElementList::const_iterator> IteratorList;
104
113 virtual bool Run(TwoViewTransverseTracksAlgorithm *const pAlgorithm, MatrixType &overlapMatrix) = 0;
114};
115
116} // namespace lar_content
117
118#endif // #ifndef LAR_TWO_VIEW_TRANSVERSE_TRACKS_ALGORITHM_H
Header file for the algorithm class.
Header file for the algorithm tool class.
Header file for the lar discrete probability vector class.
Header file for the lar track two view overlap result class.
Header file for the n view track matching algorithm class.
Header file for the two view matching control class.
TwoViewTransverseTracksAlgorithm::MatchingType::MatrixType MatrixType
virtual bool Run(TwoViewTransverseTracksAlgorithm *const pAlgorithm, MatrixType &overlapMatrix)=0
Run the algorithm tool.
std::vector< MatrixType::ElementList::const_iterator > IteratorList
void ExamineOverlapContainer()
Examine contents of overlap container, collect together best-matching 2D particles and modify cluster...
float GetPrimaryAxisDotDriftAxis(const pandora::Cluster *const pCluster)
Get the dot product between the cluster's primary axis and the drift axis.
void CalculateOverlapResult(const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, const pandora::Cluster *const)
Calculate cluster overlap result and store in container.
unsigned int CalculateNumberOfLocallyMatchingSamplingPoints(const DiscreteProbabilityVector &discreteProbabilityVector1, const DiscreteProbabilityVector &discreteProbabilityVector2, std::mt19937 &randomNumberGenerator)
Calculates the number of the sliding windows that contains charge bins that locally match.
unsigned int m_nPermutations
The number of permutations for calculating p-values.
float m_minOverallMatchingScore
M The maximum allowed cluster primary qxis Dot drift axis to fill the overlap result.
unsigned int m_minSamples
The minimum number of samples needed for comparing charges.
NViewTrackMatchingAlgorithm< TwoViewMatchingControl< TwoViewTransverseOverlapResult > > BaseAlgorithm
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
float m_localMatchingScoreThreshold
The minimum score to classify a local region as matching.
unsigned int m_downsampleFactor
The downsampling (hit merging) applied to hits in the overlap region.
float m_minOverallLocallyMatchedFraction
The minimum required lcoally matched fraction to fill the overlap result.
unsigned int m_nMaxMatrixToolRepeats
The maximum number of repeat loops over matrix tools.
std::mt19937 m_randomNumberGenerator
The random number generator.
MatrixToolVector m_algorithmToolVector
The algorithm tool vector.
AlgorithmTool class. Algorithm tools will tend to be tailored for specific parent algorithms,...
Cluster class.
Definition Cluster.h:31
StatusCode
The StatusCode enum.