SeedFinderAlgBase.h
Go to the documentation of this file.
1 /**
2  * @file SeedFinderAlgBase.h
3  *
4  * @brief This is intended to define an interface to all Seed finder algorithms employed
5  * by the 3D clustering
6  *
7  */
8 #ifndef SeedFinderAlgBase_h
9 #define SeedFinderAlgBase_h
10 
11 // Framework Includes
12 #include "fhiclcpp/ParameterSet.h"
14 #include "lardata/RecoObjects/Cluster3D.h"
15 
16 //------------------------------------------------------------------------------------------------------------------------------------------
17 
18 namespace lar_cluster3d
19 {
20 typedef std::pair<recob::Seed, reco::HitPairListPtr> SeedHitPairListPair;
21 typedef std::vector<SeedHitPairListPair > SeedHitPairListPairVec;
22 
23 /**
24  * @brief SeedFinderAlgBase class
25  */
27 {
28 public:
29  /**
30  * @brief Require that a handler is definied in case the algorithm control parameters are to be reset
31  */
32  virtual void reconfigure(fhicl::ParameterSet const &pset) = 0;
33 
34  /**
35  * @brief Define the interface to take an input list of 3D hits and return seed candidates
36  * so hits are ordered along the axis
37  */
38  virtual bool findTrackSeeds(reco::HitPairListPtr& hitPairListPtr,
39  reco::PrincipalComponents& inputPCA,
40  SeedHitPairListPairVec& seedHitPairVec) const = 0;
41 
42 protected:
43 
44  /**
45  * @brief Define a comparator which will sort hits by arc length along a PCA axis
46  */
48  {
50  {
51  return left->getArclenToPoca() < right->getArclenToPoca();
52  }
53 
54  };
55 
56  /**
57  * @brief Define a comparator which will sort hits by the absolute value of arc length
58  * so hits are ordered closed to PCA origin to furthest
59  */
61  {
63  {
64  return fabs(left->getArclenToPoca()) < fabs(right->getArclenToPoca());
65  }
66 
67  };
68 
69 private:
70 };
71 
72 } // namespace lar_cluster3d
73 #endif
Define a comparator which will sort hits by arc length along a PCA axis.
SeedFinderAlgBase class.
bool operator()(const reco::ClusterHit3D *left, const reco::ClusterHit3D *right)
std::pair< recob::Seed, reco::HitPairListPtr > SeedHitPairListPair
Define a comparator which will sort hits by the absolute value of arc length so hits are ordered clos...
virtual void reconfigure(fhicl::ParameterSet const &pset)=0
Require that a handler is definied in case the algorithm control parameters are to be reset...
std::list< const reco::ClusterHit3D * > HitPairListPtr
Definition: Cluster3D.h:335
float getArclenToPoca() const
Definition: Cluster3D.h:170
std::vector< SeedHitPairListPair > SeedHitPairListPairVec
virtual bool findTrackSeeds(reco::HitPairListPtr &hitPairListPtr, reco::PrincipalComponents &inputPCA, SeedHitPairListPairVec &seedHitPairVec) const =0
Define the interface to take an input list of 3D hits and return seed candidates so hits are ordered ...
bool operator()(const reco::ClusterHit3D *left, const reco::ClusterHit3D *right)