ClusterMergeHelper.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \file ClusterMergeHelper.h
3 //
4 // \brief ClusterMergeHelper header file
5 //
6 // \author kazuhiro@nevis.columbia.edu
7 //
8 ////////////////////////////////////////////////////////////////////////
9 
10 #ifndef CLUSTERMERGEHELPER_H
11 #define CLUSTERMERGEHELPER_H
12 
13 // ART includes
17 #include "fhiclcpp/fwd.h"
18 
19 // LArSoft
25 
26 // STL
27 #include <vector>
28 
29 namespace util {
30  class GeometryUtilities;
31 }
32 
33 namespace cluster {
34 
36  public:
39  {
40  return fMgr;
41  }
42 
43  /// Utility method to set cluster input information to CMergeManager from LArSoft data product (vector of recob::Hit art::Ptr)
44  void SetClusters(util::GeometryUtilities const& gser,
45  const std::vector<std::vector<art::Ptr<recob::Hit>>>& clusters);
46 
47  /// Utility method to set cluster input information to CMerteManager from art::Event and cluster data product label
48  void SetClusters(util::GeometryUtilities const& gser,
49  const art::Event& evt,
50  const std::string& cluster_module_label);
51 
52  /// Function to execute CMergeManager::Process()
53  void Process(util::GeometryUtilities const& gser);
54 
55  /// Utility method to retrieve merged clusters in terms of a vector of art::Ptr<recob::Hit>
56  const std::vector<std::vector<art::Ptr<recob::Hit>>>& GetMergedClusterHits() const;
57 
58  /// Utility method to retrieve merged clusters in terms of a vector of CPAN
59  const std::vector<cluster::ClusterParamsAlg>& GetMergedCPAN() const;
60 
61  /// Utility method to append result set to user's data product storage
62  void AppendResult(util::GeometryUtilities const& gser,
63  art::Event& ev,
64  std::vector<recob::Cluster>& out_clusters,
66 
67  protected:
68  /// Internal method to transfer input cluster information in the right format to CMergeManager
69  void
71  const std::vector<std::vector<util::PxHit>>& clusters)
72  {
73  fMgr.Reset();
74  fMgr.SetClusters(gser, clusters);
75  }
76 
77  protected:
78  /// CMergeManager instance
80 
81  /// GeometryUtilities
83 
84  /// Input clusters in terms of a vector of art::Ptr<recob::Hit> collection
85  std::vector<std::vector<art::Ptr<recob::Hit>>> fInputClusters;
86 
87  /// Output clusters in terms of a vector of art::Ptr<recob::Hit> collection
88  std::vector<std::vector<art::Ptr<recob::Hit>>> fOutputClusters;
89 
90  }; // class ClusterMergeHelper
91 
92 } //namespace cluster
93 #endif
void SetClusters(util::GeometryUtilities const &gser, const std::vector< std::vector< util::PxHit >> &clusters)
Internal method to transfer input cluster information in the right format to CMergeManager.
std::vector< std::vector< art::Ptr< recob::Hit > > > fInputClusters
Input clusters in terms of a vector of art::Ptr<recob::Hit> collection.
Namespace for general, non-LArSoft-specific utilities.
std::string string
Definition: nybbler.cc:12
struct vector vector
Cluster finding and building.
std::vector< std::vector< art::Ptr< recob::Hit > > > fOutputClusters
Output clusters in terms of a vector of art::Ptr<recob::Hit> collection.
::util::GeometryUtilities fGeoU
GeometryUtilities.
Declaration of signal hit object.
::cmtool::CMergeManager & GetManager()
TCEvent evt
Definition: DataStructs.cxx:7
::cmtool::CMergeManager fMgr
CMergeManager instance.
Class def header for a class CMergeManager.