All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ThreeViewRemnantsAlgorithm.h
Go to the documentation of this file.
1 /**
2  * @file larpandoracontent/LArThreeDReco/LArShowerFragments/ThreeViewRemnantsAlgorithm.h
3  *
4  * @brief Header file for the three view remnants algorithm class.
5  *
6  * $Log: $
7  */
8 #ifndef LAR_THREE_VIEW_REMNANTS_ALGORITHM_H
9 #define LAR_THREE_VIEW_REMNANTS_ALGORITHM_H 1
10 
11 #include "Pandora/Algorithm.h"
12 #include "Pandora/AlgorithmTool.h"
13 
16 
17 namespace lar_content
18 {
19 
20 class RemnantTensorTool;
21 
22 //------------------------------------------------------------------------------------------------------------------------------------------
23 
24 /**
25  * @brief ThreeViewRemnantsAlgorithm class
26  */
27 class ThreeViewRemnantsAlgorithm : public NViewMatchingAlgorithm<ThreeViewMatchingControl<float>>
28 {
29 public:
31 
32  /**
33  * @brief Default constructor
34  */
36 
37  void SelectInputClusters(const pandora::ClusterList *const pInputClusterList, pandora::ClusterList &selectedClusterList) const;
38 
39 private:
40  void CalculateOverlapResult(const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW);
42 
43  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
44 
45  typedef std::vector<RemnantTensorTool *> RemnantTensorToolVector;
46  RemnantTensorToolVector m_algorithmToolVector; ///< The algorithm tool list
47 
48  unsigned int m_nMaxTensorToolRepeats; ///< The maximum number of repeat loops over tensor tools
49  unsigned int m_minClusterCaloHits; ///< The selection cut on the number of cluster calo hits
50  float m_xOverlapWindow; ///< The sampling pitch in the x coordinate
51  float m_pseudoChi2Cut; ///< The selection cut on the matched chi2
52 };
53 
54 //------------------------------------------------------------------------------------------------------------------------------------------
55 
56 /**
57  * @brief RemnantTensorTool class
58  */
59 class RemnantTensorTool : public pandora::AlgorithmTool
60 {
61 public:
63  typedef std::vector<TensorType::ElementList::const_iterator> IteratorList;
64 
65  /**
66  * @brief Run the algorithm tool
67  *
68  * @param pAlgorithm address of the calling algorithm
69  * @param overlapTensor the overlap tensor
70  *
71  * @return whether changes have been made by the tool
72  */
73  virtual bool Run(ThreeViewRemnantsAlgorithm *const pAlgorithm, TensorType &overlapTensor) = 0;
74 };
75 
76 } // namespace lar_content
77 
78 #endif // #ifndef LAR_THREE_VIEW_REMNANTS_ALGORITHM_H
NViewMatchingAlgorithm class.
float m_pseudoChi2Cut
The selection cut on the matched chi2.
virtual bool Run(ThreeViewRemnantsAlgorithm *const pAlgorithm, TensorType &overlapTensor)=0
Run the algorithm tool.
void CalculateOverlapResult(const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW)
Calculate cluster overlap result and store in container.
RemnantTensorToolVector m_algorithmToolVector
The algorithm tool list.
Header file for the n view matching algorithm class.
void ExamineOverlapContainer()
Examine contents of overlap container, collect together best-matching 2D particles and modify cluster...
NViewMatchingAlgorithm< ThreeViewMatchingControl< float > > BaseAlgorithm
Header file for the three view matching control class.
unsigned int m_minClusterCaloHits
The selection cut on the number of cluster calo hits.
std::vector< RemnantTensorTool * > RemnantTensorToolVector
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
ThreeViewRemnantsAlgorithm::MatchingType::TensorType TensorType
float m_xOverlapWindow
The sampling pitch in the x coordinate.
unsigned int m_nMaxTensorToolRepeats
The maximum number of repeat loops over tensor tools.
std::vector< TensorType::ElementList::const_iterator > IteratorList
void SelectInputClusters(const pandora::ClusterList *const pInputClusterList, pandora::ClusterList &selectedClusterList) const
Select a subset of input clusters for processing in this algorithm.