LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
showerreco::ShowerRecoAlgBase Class Referenceabstract

#include "ShowerRecoAlgBase.h"

Inheritance diagram for showerreco::ShowerRecoAlgBase:
showerreco::ShowerRecoAlg

Public Member Functions

 ShowerRecoAlgBase ()
 Default constructor. More...
 
virtual ~ShowerRecoAlgBase ()
 Default destructor. More...
 
virtual void Reset ()=0
 Function to reset algorithm, to be called @ beginning of each event. More...
 
virtual void AppendInputClusters (const std::vector< cluster::ClusterParamsAlg > &cpan_v)
 Setter for a matched combination of clusters. More...
 
std::vector< recob::ShowerReconstruct ()
 Execute reconstruction. More...
 
virtual void Verbose (bool on=true)
 Verbosity switch. More...
 
void CaloAlgo (::calo::CalorimetryAlg *alg)
 Calorimetry algorithm setter. More...
 

Protected Member Functions

virtual void ProcessInputClusters ()
 Function to reorganize input cluster information. More...
 
virtual ::recob::Shower RecoOneShower (const std::vector< showerreco::ShowerCluster_t > &clusters)=0
 Function to reconstruct one shower. More...
 

Protected Attributes

bool fVerbosity
 Verbosity flag. More...
 
::calo::CalorimetryAlgfCaloAlg
 Calorimetry algorithm. More...
 
std::vector< std::vector< showerreco::ShowerCluster_t > > fInputClusters
 Input clusters. More...
 

Detailed Description

User defined class ShowerRecoAlgBase ... these comments are used to generate doxygen documentation!

Definition at line 41 of file ShowerRecoAlgBase.h.

Constructor & Destructor Documentation

showerreco::ShowerRecoAlgBase::ShowerRecoAlgBase ( )

Default constructor.

Definition at line 8 of file ShowerRecoAlgBase.cxx.

References fVerbosity.

9  {
10  fVerbosity = false;
11  }
std::vector< std::vector< showerreco::ShowerCluster_t > > fInputClusters
Input clusters.
bool fVerbosity
Verbosity flag.
virtual showerreco::ShowerRecoAlgBase::~ShowerRecoAlgBase ( )
inlinevirtual

Default destructor.

Definition at line 49 of file ShowerRecoAlgBase.h.

References Reset().

49 {}

Member Function Documentation

void showerreco::ShowerRecoAlgBase::AppendInputClusters ( const std::vector< cluster::ClusterParamsAlg > &  cpan_v)
virtual

Setter for a matched combination of clusters.

Definition at line 18 of file ShowerRecoAlgBase.cxx.

References fInputClusters.

Referenced by showerreco::ShowerRecoManager::Process().

19  {
20  std::vector< ::showerreco::ShowerCluster_t> clusters;
21  clusters.reserve(cpan_v.size());
22 
23  for(auto const& cpan : cpan_v) {
24 
25  clusters.push_back( ::showerreco::ShowerCluster_t() );
26 
27  (*clusters.rbegin()).start_point = cpan.GetParams().start_point;
28  (*clusters.rbegin()).end_point = cpan.GetParams().end_point;
29  (*clusters.rbegin()).angle_2d = cpan.GetParams().angle_2d;
30  (*clusters.rbegin()).plane_id = cpan.Plane();
31  (*clusters.rbegin()).hit_vector = cpan.GetHitVector();
32 
33  }
34 
35  fInputClusters.push_back(clusters);
36 
37  }
std::vector< std::vector< showerreco::ShowerCluster_t > > fInputClusters
Input clusters.
void showerreco::ShowerRecoAlgBase::CaloAlgo ( ::calo::CalorimetryAlg alg)
inline

Calorimetry algorithm setter.

Definition at line 64 of file ShowerRecoAlgBase.h.

Referenced by ShowerReco3D::ShowerReco3D().

64 { fCaloAlg = alg; }
::calo::CalorimetryAlg * fCaloAlg
Calorimetry algorithm.
virtual void showerreco::ShowerRecoAlgBase::ProcessInputClusters ( )
inlineprotectedvirtual

Function to reorganize input cluster information.

Definition at line 69 of file ShowerRecoAlgBase.h.

Referenced by Reconstruct().

70  { return; }
std::vector<::recob::Shower > showerreco::ShowerRecoAlgBase::Reconstruct ( )

Execute reconstruction.

Definition at line 39 of file ShowerRecoAlgBase.cxx.

References fCaloAlg, fInputClusters, ProcessInputClusters(), and RecoOneShower().

Referenced by showerreco::ShowerRecoManager::Process().

40  {
41 
42  if(!fCaloAlg) throw ShowerRecoException("Calorimetry algorithm must be provided!");
43 
45 
46  std::vector< ::recob::Shower> output;
47 
48  output.reserve(fInputClusters.size());
49 
50  for(auto const& clusters : fInputClusters)
51 
52  output.push_back( RecoOneShower(clusters) );
53 
54  return output;
55 
56  }
virtual void ProcessInputClusters()
Function to reorganize input cluster information.
::calo::CalorimetryAlg * fCaloAlg
Calorimetry algorithm.
std::vector< std::vector< showerreco::ShowerCluster_t > > fInputClusters
Input clusters.
virtual ::recob::Shower RecoOneShower(const std::vector< showerreco::ShowerCluster_t > &clusters)=0
Function to reconstruct one shower.
virtual ::recob::Shower showerreco::ShowerRecoAlgBase::RecoOneShower ( const std::vector< showerreco::ShowerCluster_t > &  clusters)
protectedpure virtual

Function to reconstruct one shower.

Referenced by Reconstruct().

void showerreco::ShowerRecoAlgBase::Reset ( )
pure virtual

Function to reset algorithm, to be called @ beginning of each event.

Implemented in showerreco::ShowerRecoAlg.

Definition at line 13 of file ShowerRecoAlgBase.cxx.

References fInputClusters.

Referenced by showerreco::ShowerRecoAlg::Reset(), and showerreco::ShowerRecoManager::Reset().

14  {
15  fInputClusters.clear();
16  }
std::vector< std::vector< showerreco::ShowerCluster_t > > fInputClusters
Input clusters.
virtual void showerreco::ShowerRecoAlgBase::Verbose ( bool  on = true)
inlinevirtual

Verbosity switch.

Definition at line 61 of file ShowerRecoAlgBase.h.

Referenced by ShowerReco3D::ShowerReco3D().

61 { fVerbosity=on; }
bool fVerbosity
Verbosity flag.

Member Data Documentation

::calo::CalorimetryAlg* showerreco::ShowerRecoAlgBase::fCaloAlg
protected

Calorimetry algorithm.

Definition at line 81 of file ShowerRecoAlgBase.h.

Referenced by Reconstruct(), and showerreco::ShowerRecoAlg::RecoOneShower().

std::vector<std::vector<showerreco::ShowerCluster_t> > showerreco::ShowerRecoAlgBase::fInputClusters
protected

Input clusters.

Definition at line 84 of file ShowerRecoAlgBase.h.

Referenced by AppendInputClusters(), Reconstruct(), and Reset().

bool showerreco::ShowerRecoAlgBase::fVerbosity
protected

The documentation for this class was generated from the following files: