LArSoft  v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
ShowerRecoAlgBase.cxx
Go to the documentation of this file.
1 #include "ShowerRecoAlgBase.h"
2 
6 
7 namespace showerreco {
8 
10  {
11  fInputClusters.clear();
12  }
13 
15  const std::vector<::cluster::ClusterParamsAlg>& cpan_v)
16  {
17  std::vector<::showerreco::ShowerCluster_t> clusters;
18  clusters.reserve(cpan_v.size());
19 
20  for (auto const& cpan : cpan_v) {
21 
22  clusters.push_back(::showerreco::ShowerCluster_t());
23 
24  (*clusters.rbegin()).start_point = cpan.GetParams().start_point;
25  (*clusters.rbegin()).end_point = cpan.GetParams().end_point;
26  (*clusters.rbegin()).angle_2d = cpan.GetParams().angle_2d;
27  (*clusters.rbegin()).plane_id = cpan.Plane();
28  (*clusters.rbegin()).hit_vector = cpan.GetHitVector();
29  }
30 
31  fInputClusters.push_back(clusters);
32  }
33 
34  std::vector<::recob::Shower> ShowerRecoAlgBase::Reconstruct(
35  geo::GeometryCore const& geom,
36  geo::WireReadoutGeom const& wireReadoutGeom,
37  detinfo::DetectorClocksData const& clockData,
38  detinfo::DetectorPropertiesData const& detProp)
39  {
41 
42  std::vector<::recob::Shower> output;
43  output.reserve(fInputClusters.size());
44 
45  for (auto const& clusters : fInputClusters)
46  output.push_back(RecoOneShower(geom, wireReadoutGeom, clockData, detProp, clusters));
47 
48  return output;
49  }
50 
51 }
virtual void ProcessInputClusters()
Function to reorganize input cluster information.
std::vector< std::vector< showerreco::ShowerCluster_t > > fInputClusters
Input clusters.
virtual void AppendInputClusters(const std::vector< cluster::ClusterParamsAlg > &cpan_v)
Setter for a matched combination of clusters.
std::vector< recob::Shower > Reconstruct(geo::GeometryCore const &geom, geo::WireReadoutGeom const &wireReadoutGeom, detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp)
Execute reconstruction.
virtual void Reset()
Function to reset algorithm, to be called @ beginning of each event.
Interface for a class providing readout channel mapping to geometry.
Description of the physical geometry of one entire detector.
Definition: GeometryCore.h:91
Contains all timing reference information for the detector.
Class def header for a class ShowerRecoAlgBase.
virtual ::recob::Shower RecoOneShower(geo::GeometryCore const &geom, geo::WireReadoutGeom const &wireReadoutGeom, detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const std::vector< showerreco::ShowerCluster_t > &clusters)=0
Function to reconstruct one shower.
Class def header for exception classes in ShowerReco3D package.