All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SlicingAlgorithm.h
Go to the documentation of this file.
1 /**
2  * @file larpandoracontent/LArControlFlow/SlicingAlgorithm.h
3  *
4  * @brief Header file for the master algorithm class.
5  *
6  * $Log: $
7  */
8 #ifndef LAR_SLICING_ALGORITHM_H
9 #define LAR_SLICING_ALGORITHM_H 1
10 
11 #include "Pandora/Algorithm.h"
12 #include "Pandora/AlgorithmTool.h"
13 
14 namespace lar_content
15 {
16 
17 class EventSlicingBaseTool;
18 
19 //------------------------------------------------------------------------------------------------------------------------------------------
20 
21 /**
22  * @brief SlicingAlgorithm class
23  */
24 class SlicingAlgorithm : public pandora::Algorithm
25 {
26 public:
27  /**
28  * @brief Slice class
29  */
30  class Slice
31  {
32  public:
33  pandora::CaloHitList m_caloHitListU; ///< The u calo hit list
34  pandora::CaloHitList m_caloHitListV; ///< The v calo hit list
35  pandora::CaloHitList m_caloHitListW; ///< The w calo hit list
36  };
37 
38  typedef std::vector<Slice> SliceList;
39  typedef std::map<pandora::HitType, std::string> HitTypeToNameMap;
40 
41  /**
42  * @brief Default constructor
43  */
45 
46 private:
47  pandora::StatusCode Run();
48  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
49 
50  EventSlicingBaseTool *m_pEventSlicingTool; ///< The address of the event slicing tool
51  std::string m_slicingListDeletionAlgorithm; ///< The name of the slicing list deletion algorithm
52 
53  HitTypeToNameMap m_caloHitListNames; ///< The hit type to calo hit list name map
54  HitTypeToNameMap m_clusterListNames; ///< The hit type to cluster list name map
55 
56  std::string m_sliceClusterListName; ///< The name of the output slice cluster list
57  std::string m_slicePfoListName; ///< The name of the output slice pfo list
58 };
59 
60 //------------------------------------------------------------------------------------------------------------------------------------------
61 //------------------------------------------------------------------------------------------------------------------------------------------
62 
63 /**
64  * @brief EventSlicingBaseTool class
65  */
66 class EventSlicingBaseTool : public pandora::AlgorithmTool
67 {
68 public:
69  /**
70  * @brief Run the slicing tool
71  *
72  * @param pAlgorithm address of the calling algorithm
73  * @param caloHitListNames the hit type to calo hit list name map
74  * @param clusterListNames the hit type to cluster list name map
75  * @param sliceList to receive the populated slice list
76  */
77  virtual void RunSlicing(const pandora::Algorithm *const pAlgorithm, const SlicingAlgorithm::HitTypeToNameMap &caloHitListNames,
78  const SlicingAlgorithm::HitTypeToNameMap &clusterListNames, SlicingAlgorithm::SliceList &sliceList) = 0;
79 };
80 
81 } // namespace lar_content
82 
83 #endif // #ifndef LAR_SLICING_ALGORITHM_H
SlicingAlgorithm class.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
HitTypeToNameMap m_caloHitListNames
The hit type to calo hit list name map.
EventSlicingBaseTool class.
std::string m_slicingListDeletionAlgorithm
The name of the slicing list deletion algorithm.
virtual void RunSlicing(const pandora::Algorithm *const pAlgorithm, const SlicingAlgorithm::HitTypeToNameMap &caloHitListNames, const SlicingAlgorithm::HitTypeToNameMap &clusterListNames, SlicingAlgorithm::SliceList &sliceList)=0
Run the slicing tool.
std::string m_sliceClusterListName
The name of the output slice cluster list.
HitTypeToNameMap m_clusterListNames
The hit type to cluster list name map.
pandora::CaloHitList m_caloHitListU
The u calo hit list.
pandora::CaloHitList m_caloHitListW
The w calo hit list.
SlicingAlgorithm()
Default constructor.
std::vector< Slice > SliceList
std::string m_slicePfoListName
The name of the output slice pfo list.
std::map< pandora::HitType, std::string > HitTypeToNameMap
pandora::CaloHitList m_caloHitListV
The v calo hit list.
EventSlicingBaseTool * m_pEventSlicingTool
The address of the event slicing tool.